00001 // --------------------------------------------------------------------------- 00002 // PLATFORM: All - 00003 // PRODUCT: Fourplay - 00004 // VISIBILITY: Public - 00005 // --------------------------------------------------------------------------- 00006 // - 00007 // PURPOSE: Multiplayer match class. - 00008 // - 00009 // --------------------------------------------------------------------------- 00010 00011 #ifndef MULTIPLAYERMATCH_H 00012 #define MULTIPLAYERMATCH_H 00013 00014 #include "Match.h" 00015 #include "HttpHandler.h" 00016 00021 class MultiplayerMatch : public Match 00022 { 00023 public: 00027 MultiplayerMatch(); 00028 00032 ~MultiplayerMatch() override; 00033 00040 int Update(double deltaTime, 00041 CIw2DFont *font) override; 00042 00047 void HandleLobby(CIw2DFont *font); 00048 00053 void HandleUpdate(double deltaTime, 00054 CIw2DFont *font); 00055 00061 CIwFVec2 StringToPosition(std::string pos); 00062 00068 char* PositionToString(CIwFVec2 pos); 00069 00070 protected: 00072 Net *m_net; 00073 00075 HttpHandler *m_handler; 00076 00078 char* m_ip; 00079 00083 void ObtainIP(); 00084 00088 void InitialiseNet(); 00089 00091 bool m_hasIp; 00092 00094 bool m_wasDiscLaunched; 00095 }; 00096 00097 #endif