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:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/GameState.h

    r3280 r3370  
    4545    /**
    4646    @brief
    47         Helper class to group construction parameters for better genericity.
    48     */
    49     struct GameStateConstrParams
    50     {
    51         std::string name;
    52         bool bIgnoreTickTime;
    53     };
    54 
    55     /**
    56     @brief
    5747        An implementation of a tree to manage game states.
    5848        This leads to a certain hierarchy that is created at runtime.
     
    8777
    8878    public:
    89         GameState(const GameStateConstrParams& params);
     79        GameState(const GameStateInfo& info);
    9080        virtual ~GameState();
    9181
    92         const std::string& getName() const { return name_; }
    93         State getActivity()          const { return this->activity_; }
    94         GameState* getParent()       const { return this->parent_; }
    95 
    96         bool ignoreTickTime()        const { return this->bIgnoreTickTime_; }
    97 
    98         void addChild(GameState* state);
    99         void removeChild(GameState* state);
     82        const std::string& getName()   const;
     83        State getActivity()            const { return activity_; }
     84        const GameStateInfo& getInfo() const { return info_; }
    10085
    10186    protected:
     
    10590
    10691    private:
    107         void setParent(GameState* state) { this->parent_ = state; }
    10892        void setActivity(State activity);
    10993        void activateInternal();
     
    11195        void updateInternal(const Clock& time);
    11296
    113         const std::string                        name_;
    114         State                                    activity_;
    115         const bool                               bIgnoreTickTime_;
    116         GameState*                               parent_;
    117         std::map<std::string, GameState*>        children_;
     97        const GameStateInfo& info_;
     98        State                activity_;
    11899    };
    119100}
Note: See TracChangeset for help on using the changeset viewer.