Changeset 5740 for code/branches/ggz2
- Timestamp:
- Sep 1, 2009, 5:35:16 PM (15 years ago)
- Location:
- code/branches/ggz2
- Files:
-
- 7 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ggz2
- Property svn:mergeinfo changed
/code/branches/ggz (added) merged: 2803,2810,2888-2889,2997,3000,3002,3009,3106-3107,3109
- Property svn:mergeinfo changed
-
code/branches/ggz2/bin/ggz/module.dsc
- Property svn:eol-style set to native
-
code/branches/ggz2/bin/ggz/orxonox.dsc
- Property svn:eol-style set to native
-
code/branches/ggz2/bin/ggz/orxonox.room
- Property svn:eol-style set to native
-
code/branches/ggz2/cmake/FindGGZ.cmake
- Property svn:eol-style set to native
-
code/branches/ggz2/cmake/LibraryConfig.cmake
r5695 r5740 91 91 FIND_PACKAGE(ALUT REQUIRED) 92 92 FIND_PACKAGE(ZLIB REQUIRED) 93 FIND_PACKAGE(GGZ ) 94 IF(NOT GGZMOD_FOUND) 95 MESSAGE(STATUS "GGZMOD not found, disabling GGZ support") 96 ENDIF(NOT GGZMOD_FOUND) 93 97 IF(WIN32) 94 98 FIND_PACKAGE(DirectX REQUIRED) -
code/branches/ggz2/src/SpecialConfig.h.in
r5695 r5740 69 69 #cmakedefine CMAKE_CONFIGURATION_TYPES 70 70 71 /** 72 @def GGZMOD_FOUND 73 Macro for availability of the ggzmod library 74 */ 75 #cmakedefine GGZMOD_FOUND 76 71 77 // Handle default ConfigValues 72 78 namespace orxonox { namespace specialConfig -
code/branches/ggz2/src/modules/gamestates/GSClient.cc
r5738 r5740 24 24 * Co-authors: 25 25 * Fabian 'x3n' Landau 26 * Adrian Friedli 26 27 * 27 28 */ 28 29 29 30 #include "GSClient.h" 31 #include "SpecialConfig.h" 30 32 31 33 #include "util/Exception.h" … … 35 37 #include "core/GameMode.h" 36 38 #include "network/Client.h" 39 #ifdef GGZMOD_FOUND 40 #include "GGZClient.h" 41 #endif /* GGZMOD_FOUND */ 37 42 38 43 namespace orxonox … … 45 50 : GameState(info) 46 51 , client_(0) 52 , ggzClient(0) 47 53 { 48 54 } … … 56 62 GameMode::setIsClient(true); 57 63 58 this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); 64 #ifdef GGZMOD_FOUND 65 if (GGZClient::isActive()) 66 { 67 this->ggzClient = new GGZClient(this); 68 return; 69 } 70 #endif /* GGZMOD_FOUND */ 71 72 this->connect(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); 73 } 74 75 void GSClient::connect(const std::string& address, int port) 76 { 77 this->client_ = new Client(address, port); 59 78 60 79 if(!client_->establishConnection()) … … 68 87 client_->closeConnection(); 69 88 89 #ifdef GGZMOD_FOUND 90 if (ggzClient) 91 { 92 delete ggzClient; 93 } 94 #endif /* GGZMOD_FOUND */ 95 70 96 // destroy client 71 97 delete this->client_; … … 76 102 void GSClient::update(const Clock& time) 77 103 { 78 client_->update(time); 104 if (client_) 105 { 106 client_->update(time); 107 } 79 108 } 80 109 } -
code/branches/ggz2/src/modules/gamestates/GSClient.h
r5738 r5740 23 23 * Reto Grieder 24 24 * Co-authors: 25 * ...25 * Adrian Friedli 26 26 * 27 27 */ … … 42 42 GSClient(const GameStateInfo& info); 43 43 ~GSClient(); 44 void connect(const std::string& address, int port); 44 45 45 46 void activate(); … … 49 50 private: 50 51 Client* client_; 52 GGZClient* ggzClient; 51 53 }; 52 54 } -
code/branches/ggz2/src/orxonox/CMakeLists.txt
r5738 r5740 30 30 Scene.cc 31 31 ) 32 33 IF(GGZMOD_FOUND) 34 ADD_SOURCE_FILES(ORXONOX_SRC_FILES GGZClient.cc) 35 ENDIF(GGZMOD_FOUND) 32 36 33 37 ADD_SUBDIRECTORY(collisionshapes) … … 65 69 ${VORBIS_LIBRARY} 66 70 ${OGG_LIBRARY} 71 ${GGZMOD_LIBRARIES} 67 72 tinyxml++_orxonox 68 73 tolua++_orxonox -
code/branches/ggz2/src/orxonox/GGZClient.cc
- Property svn:eol-style set to native
-
code/branches/ggz2/src/orxonox/GGZClient.h
- Property svn:eol-style set to native
-
code/branches/ggz2/src/orxonox/OrxonoxPrereqs.h
r5738 r5740 193 193 class SoundManager; 194 194 class SoundMainMenu; 195 196 // GGZ 197 class GGZClient; 195 198 } 196 199
Note: See TracChangeset
for help on using the changeset viewer.