Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2009, 1:32:40 PM (16 years ago)
Author:
rgrieder
Message:

Moved Game::getLevel to LevelManager::getStartLevel and Game::setLevel to LevelManager::setStartLevel.

Location:
code/branches/core4/src/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/CMakeLists.txt

    r3196 r3245  
    6868  TOLUA_FILES
    6969    CommandExecutor.h
    70     Game.h
    7170    LuaBind.h
    7271  DEFINE_SYMBOL
  • code/branches/core4/src/core/Game.cc

    r3243 r3245  
    149149        SetConfigValue(statisticsAvgLength_, 1000000)
    150150            .description("Sets the time in microseconds interval at which average fps, etc. gets calculated.");
    151         SetConfigValue(levelName_, "presentation_dm.oxw")
    152             .description("Sets the preselection of the level in the main menu.");
    153     }
    154 
    155     void Game::setLevel(std::string levelName)
    156     {
    157         ModifyConfigValue(levelName_, set, levelName);
    158     }
    159 
    160     std::string Game::getLevel()
    161     {
    162         std::string levelName;
    163         CommandLine::getValue("level", &levelName);
    164         if (levelName == "")
    165             return levelName_;
    166         else
    167             return levelName;
    168151    }
    169152
  • code/branches/core4/src/core/Game.h

    r3243 r3245  
    6464        Main class responsible for running the game.
    6565    */
    66     class _CoreExport Game
    67     // tolua_end
    68         : public OrxonoxClass
    69     // tolua_begin
     66    class _CoreExport Game : public OrxonoxClass
    7067    {
    71     //tolua_end
    7268    public:
    7369        Game(int argc, char** argv);
     
    9490        template <class T>
    9591        static bool declareGameState(const std::string& className, const std::string& stateName, bool bIgnoreTickTime, bool bConsoleMode);
    96         static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; } //tolua_export
    97 
    98         void setLevel(std::string levelName); //tolua_export
    99         std::string getLevel(); //tolua_export
     92        static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
    10093
    10194    private:
     
    163156        unsigned int                    statisticsRefreshCycle_;
    164157        unsigned int                    statisticsAvgLength_;
    165         std::string                     levelName_;
    166158
    167159        static std::map<std::string, GameStateInfo> gameStateDeclarations_s;
    168160        static Game* singletonRef_s;        //!< Pointer to the Singleton
    169     }; // tolua_export
     161    };
    170162
    171163    template <class T>
     
    193185        return true;
    194186    }
    195 } // tolua_export
     187}
    196188
    197189#endif /* _Game_H__ */
Note: See TracChangeset for help on using the changeset viewer.