Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 23, 2008, 3:37:29 PM (16 years ago)
Author:
rgrieder
Message:
  • changed the static interface of the InputManager to a member one with getInstance()
  • converted InputManager and InGameConsole to Ogre Singletons (c'tor and d'tor public, but assert in c'tor to prevent multiple instances at runtime)
  • added toluabind_orxonox files to tolua folder that contains a pimped version of tolua (I'll write a little cmake project soon to automate it; Currently that only works with msvc)
  • commented out Loader::unload() from Orxonox destructor because that deleted the ParticleSpawners, which were using a method of a sceneNode that belonged to a already destroyed SpaceShip. —> Results in a memory leak. Previously Loader::unload() was called for all BaseObjects (now calling unload(level_)). And since 'P' from ParticleSpawner comes before 'S' like SpaceShip, the order was correct.
  • Added factory feature for InputStates (can now be created by string if there is Factory entry for it)
  • Created factory entries for SimpleInputState and ExtendedInputState
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.h

    r1641 r1642  
    4646    {
    4747    public: // functions
     48        InGameConsole();
     49        ~InGameConsole();
     50
    4851        void initialise();
    4952        void destroy();
     
    5255        void tick(float dt);
    5356
    54         static InGameConsole& getInstance();
     57        static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
     58        static InGameConsole* getInstancePtr() { return singletonRef_s; }
    5559
    5660        static void openConsole();
     
    5862
    5963    private: // functions
    60         InGameConsole();
    6164        InGameConsole(const InGameConsole& other) {}
    62         ~InGameConsole();
    6365
    6466        void activate();
     
    107109        float noiseSize_;
    108110        char cursorSymbol_;
     111
     112        static InGameConsole* singletonRef_s;
    109113    };
    110114}
Note: See TracChangeset for help on using the changeset viewer.