Changeset 3247 for code/branches/core4/src/orxonox
- Timestamp:
- Jun 29, 2009, 2:01:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/Main.cc
r3243 r3247 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.requestState("root"); 71 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; 72 87 } 73 88 74 // Clean up class hierarchy stuff (identifiers, xmlport, configvalue, consolecommand) 75 // Needs to be done after Game destructor because of ~OrxonoxClass 76 orxonox::Identifier::destroyAllIdentifiers(); 89 game->run(); 77 90 78 91 return 0;
Note: See TracChangeset
for help on using the changeset viewer.