Changeset 3280 for code/trunk/src/orxonox/Main.cc
- Timestamp:
- Jul 12, 2009, 11:58:01 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 (added) merged: 3235-3237,3245-3250,3253-3254,3260-3261,3265,3270
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/Main.cc
r3196 r3280 37 37 38 38 #include "util/Debug.h" 39 #include " core/Identifier.h"39 #include "util/Exception.h" 40 40 #include "core/Game.h" 41 41 … … 50 50 #endif 51 51 { 52 using namespace orxonox; 53 54 Game* game = 0; 55 try 52 56 { 53 orxonox::Game orxonox(argc, argv);57 game = new Game(argc, argv); 54 58 55 orxonox.setStateHierarchy(59 game->setStateHierarchy( 56 60 "root" 57 61 " graphics" … … 68 72 ); 69 73 70 orxonox.run(); 74 game->requestState("root"); 75 } 76 catch (const std::exception& ex) 77 { 78 COUT(0) << "Orxonox failed to initialise: " << ex.what() << std::endl; 79 COUT(0) << "Terminating program." << std::endl; 80 return 1; 81 } 82 catch (...) 83 { 84 COUT(0) << "Orxonox failed to initialise: " << std::endl; 85 COUT(0) << "Terminating program." << std::endl; 86 return 1; 87 } 71 88 72 // destroy the GameStates created pre-mainly 73 orxonox::Game::destroyStates(); 74 } // orxonox gets destroyed right here! 75 76 // Clean up class hierarchy stuff (identifiers, xmlport, configvalue, consolecommand) 77 // Needs to be done after Game destructor because of ~OrxonoxClass 78 orxonox::Identifier::destroyAllIdentifiers(); 89 game->run(); 90 delete game; 79 91 80 92 return 0;
Note: See TracChangeset
for help on using the changeset viewer.