Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 7, 2011, 10:51:54 PM (13 years ago)
Author:
landauf
Message:

added some output (user and internal) throughout the initialization of the game, graphics, and game states

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/Game.cc

    r8806 r8830  
    8484        , destructionHelper_(this)
    8585    {
     86        orxout(internal_status) << "initializing Game object..." << endl;
     87
    8688#ifdef ORXONOX_PLATFORM_WINDOWS
    8789        minimumSleepTime_ = 1000/*us*/;
     
    106108
    107109        // Create the Core
     110        orxout(internal_info) << "creating Core object:" << endl;
    108111        this->core_ = new Core(cmdLine);
    109112
     
    125128        this->loadedTopStateNode_ = this->rootStateNode_;
    126129        this->loadedStates_.push_back(this->getState(rootStateNode_->name_));
     130
     131        orxout(internal_status) << "finished initializing Game object" << endl;
    127132    }
    128133
    129134    void Game::destroy()
    130135    {
     136        orxout(internal_status) << "destroying Game object..." << endl;
     137
    131138        // Remove us from the object lists again to avoid problems when destroying them
    132139        this->unregisterObject();
     
    139146        safeObjectDelete(&core_);
    140147        safeObjectDelete(&gameClock_);
     148
     149        orxout(internal_status) << "finished destroying Game object..." << endl;
    141150    }
    142151
     
    165174            orxout(user_error) << "Starting game without requesting GameState. This automatically terminates the program." << endl;
    166175
     176        // Update the GameState stack if required. We do this already here to have a properly initialized game before entering the main loop
     177        this->updateGameStateStack();
     178
     179        orxout(user_status) << "Game loaded" << endl;
     180        orxout(internal_status) << "--------------------------------------------------" << endl;
     181        orxout(internal_status) << "starting main loop..." << endl;
     182
    167183        // START GAME
    168184        // first delta time should be about 0 seconds
     
    217233                this->updateFPSLimiter();
    218234        }
     235
     236        orxout(internal_status) << "finished main loop" << endl;
     237        orxout(internal_status) << "--------------------------------------------------" << endl;
    219238
    220239        // UNLOAD all remaining states
     
    338357    void Game::stop()
    339358    {
     359        orxout(user_status) << "Exit" << endl;
    340360        this->bAbort_ = true;
    341361    }
     
    507527        if (!GameMode::showsGraphics())
    508528        {
     529            orxout(user_status) << "Loading graphics" << endl;
     530            orxout(internal_info) << "loading graphics in Game" << endl;
     531
    509532            core_->loadGraphics();
    510533            Loki::ScopeGuard graphicsUnloader = Loki::MakeObjGuard(*this, &Game::unloadGraphics);
     
    524547            }
    525548            graphicsUnloader.Dismiss();
     549
     550            orxout(internal_info) << "finished loading graphics in Game" << endl;
    526551        }
    527552    }
     
    531556        if (GameMode::showsGraphics())
    532557        {
     558            orxout(user_status) << "Unloading graphics" << endl;
     559            orxout(internal_info) << "unloading graphics in Game" << endl;
     560
    533561            // Destroy all the GameStates that require graphics
    534562            for (GameStateMap::iterator it = constructedStates_.begin(); it != constructedStates_.end();)
     
    555583    void Game::loadState(const std::string& name)
    556584    {
     585        orxout(internal_status) << "loading state '" << name << "'" << endl;
     586
    557587        this->bChangingState_ = true;
    558588        LOKI_ON_BLOCK_EXIT_OBJ(*this, &Game::resetChangingState); (void)LOKI_ANONYMOUS_VARIABLE(scopeGuard);
     
    577607    void Game::unloadState(const std::string& name)
    578608    {
     609        orxout(internal_status) << "unloading state '" << name << "'" << endl;
     610
    579611        this->bChangingState_ = true;
    580612        try
Note: See TracChangeset for help on using the changeset viewer.