Changeset 3245 for code/branches/core4/src/core
- Timestamp:
- Jun 29, 2009, 1:32:40 PM (16 years ago)
- Location:
- code/branches/core4/src/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/CMakeLists.txt
r3196 r3245 68 68 TOLUA_FILES 69 69 CommandExecutor.h 70 Game.h71 70 LuaBind.h 72 71 DEFINE_SYMBOL -
code/branches/core4/src/core/Game.cc
r3243 r3245 149 149 SetConfigValue(statisticsAvgLength_, 1000000) 150 150 .description("Sets the time in microseconds interval at which average fps, etc. gets calculated."); 151 SetConfigValue(levelName_, "presentation_dm.oxw")152 .description("Sets the preselection of the level in the main menu.");153 }154 155 void Game::setLevel(std::string levelName)156 {157 ModifyConfigValue(levelName_, set, levelName);158 }159 160 std::string Game::getLevel()161 {162 std::string levelName;163 CommandLine::getValue("level", &levelName);164 if (levelName == "")165 return levelName_;166 else167 return levelName;168 151 } 169 152 -
code/branches/core4/src/core/Game.h
r3243 r3245 64 64 Main class responsible for running the game. 65 65 */ 66 class _CoreExport Game 67 // tolua_end 68 : public OrxonoxClass 69 // tolua_begin 66 class _CoreExport Game : public OrxonoxClass 70 67 { 71 //tolua_end72 68 public: 73 69 Game(int argc, char** argv); … … 94 90 template <class T> 95 91 static bool declareGameState(const std::string& className, const std::string& stateName, bool bIgnoreTickTime, bool bConsoleMode); 96 static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; } //tolua_export 97 98 void setLevel(std::string levelName); //tolua_export 99 std::string getLevel(); //tolua_export 92 static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 100 93 101 94 private: … … 163 156 unsigned int statisticsRefreshCycle_; 164 157 unsigned int statisticsAvgLength_; 165 std::string levelName_;166 158 167 159 static std::map<std::string, GameStateInfo> gameStateDeclarations_s; 168 160 static Game* singletonRef_s; //!< Pointer to the Singleton 169 }; // tolua_export161 }; 170 162 171 163 template <class T> … … 193 185 return true; 194 186 } 195 } // tolua_export187 } 196 188 197 189 #endif /* _Game_H__ */
Note: See TracChangeset
for help on using the changeset viewer.