Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 1, 2009, 11:44:53 AM (15 years ago)
Author:
rgrieder
Message:

Moved the singleton creation/destruction mess to the Core class by using just two possible Scopes:

  • ScopeID::Root for singletons that may always persists
  • ScopeID::Graphics for singletons that only work when graphics was loaded
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gamestates/GSGraphics.cc

    r5842 r5850  
    4646#include "core/Loader.h"
    4747#include "core/XMLFile.h"
    48 #include "overlays/InGameConsole.h"
    49 #include "sound/SoundManager.h"
    5048
    5149// HACK:
     
    5856    GSGraphics::GSGraphics(const GameStateInfo& info)
    5957        : GameState(info)
    60         , console_(0)
    61         , soundManager_(0)
    6258        , masterKeyBinder_(0)
    6359        , masterInputState_(0)
     
    10096        masterKeyBinder_->loadBindings("masterKeybindings.ini");
    10197
    102         // Load the SoundManager
    103         soundManager_ = new SoundManager();
    104 
    105         // Load the InGameConsole
    106         console_ = new InGameConsole();
    107         console_->initialise();
    108 
    10998        // add console command to toggle GUI
    11099        this->ccToggleGUI_ = createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI");
     
    131120*/
    132121
    133         this->console_->destroy();
    134 
    135122        Loader::unload(this->debugOverlay_);
    136123        delete this->debugOverlay_;
    137 
    138         this->soundManager_->destroy();
    139124
    140125        // HACK: (destroys a resource smart pointer)
     
    170155            Game::getInstance().requestState("mainMenu");
    171156        }
    172 
    173         this->console_->update(time);
    174157    }
    175158}
Note: See TracChangeset for help on using the changeset viewer.