Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (15 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/Main.cc

    r3196 r3280  
    3737
    3838#include "util/Debug.h"
    39 #include "core/Identifier.h"
     39#include "util/Exception.h"
    4040#include "core/Game.h"
    4141
     
    5050#endif
    5151{
     52    using namespace orxonox;
     53
     54    Game* game = 0;
     55    try
    5256    {
    53         orxonox::Game orxonox(argc, argv);
     57        game = new Game(argc, argv);
    5458
    55         orxonox.setStateHierarchy(
     59        game->setStateHierarchy(
    5660        "root"
    5761        " graphics"
     
    6872        );
    6973
    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    }
    7188
    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;
    7991
    8092    return 0;
Note: See TracChangeset for help on using the changeset viewer.