Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r3327 r3370  
    6060    SetConsoleCommand(InGameConsole, closeConsole, true);
    6161
    62     InGameConsole* InGameConsole::singletonRef_s = 0;
     62    InGameConsole* InGameConsole::singletonPtr_s = 0;
    6363
    6464    /**
     
    7676        RegisterObject(InGameConsole);
    7777
    78         assert(singletonRef_s == 0);
    79         singletonRef_s = this;
    80 
    8178        this->bActive_ = false;
    8279        this->cursor_ = 0.0f;
     
    131128        if (this->consoleOverlay_)
    132129            Ogre::OverlayManager::getSingleton().destroy(consoleOverlay_);
    133 
    134         singletonRef_s = 0;
    135130    }
    136131
  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r3327 r3370  
    3434
    3535#include <string>
     36
    3637#include "util/OgreForwardRefs.h"
     38#include "util/Singleton.h"
    3739#include "core/Shell.h"
    3840#include "core/WindowEventListener.h"
     
    4042namespace orxonox
    4143{
    42     class _OrxonoxExport InGameConsole : public ShellListener, public WindowEventListener
     44    class _OrxonoxExport InGameConsole : public Singleton<InGameConsole>, public ShellListener, public WindowEventListener
    4345    {
     46        friend class Singleton<InGameConsole>;
    4447    public: // functions
    4548        InGameConsole();
     
    5154
    5255        void update(const Clock& time);
    53 
    54         static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
    55         static InGameConsole* getInstancePtr() { return singletonRef_s; }
    5656
    5757        static void openConsole();
     
    112112        bool bHidesAllInput_;
    113113
    114         static InGameConsole* singletonRef_s;
     114        static InGameConsole* singletonPtr_s;
    115115    };
    116116}
Note: See TracChangeset for help on using the changeset viewer.