Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6498 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Jan 11, 2006, 9:58:22 PM (19 years ago)
Author:
patrick
Message:

trunk: merged the network branche into the trunk

Location:
trunk/src/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/hud.cc

    r6446 r6498  
    143143void Hud::updateResolution()
    144144{
    145   this->resX = State::resX();
    146   this->resY = State::resY();
     145  this->resX = State::getResX();
     146  this->resY = State::getResY();
    147147  if (this->energyWidget != NULL)
    148148  {
     
    174174void Hud::tick(float dt)
    175175{
    176   if (this->resY != State::resY() || this->resX != State::resY())
     176  if (this->resY != State::getResY() || this->resX != State::getResY())
    177177    this->updateResolution();
    178178}
  • trunk/src/util/state.cc

    r6468 r6498  
    2929PNode* State::cameraTarget = NULL;
    3030
    31 Player* State::_localPlayer = NULL;
    32 SkyBox* State::_skyBox = NULL;
     31SkyBox* State::skyBox = NULL;
    3332
    3433ObjectManager* State::objectManager = NULL;
    3534
    36 unsigned int State::_resX = 1;
    37 unsigned int State::_resY = 1;
     35
     36unsigned int State::resX = 1;
     37unsigned int State::resY = 1;
     38
     39StoryEntity* State::storyEntity = NULL;
     40
     41Player* State::player = NULL;
     42
    3843
    3944/**
  • trunk/src/util/state.h

    r6468 r6498  
    77#define _STATE_H
    88
     9
    910// FORWARD DECLARATION
    1011class PNode;
    1112class WorldEntity;
     13class Player;
     14class SkyBox;
     15class StoryEntity;
    1216class ObjectManager;
    13 class SkyBox;
    14 class Player;
    1517
    1618
     
    3436  static inline PNode* getCameraTarget() { return State::cameraTarget; };
    3537
    36   /** @returns the Local Player */
    37   static inline Player* localsPlayer() { return State::_localPlayer; };
    38   /** @param localPlayer the local Player */
    39   static inline void setLocalPlayer(Player* localPlayer) { State::_localPlayer = localPlayer; };
    40 
     38  ////////////////
     39  /// SKYBOX   ///
     40  ////////////////
    4141  /** @returns the current SkyBox */
    42   static inline SkyBox* skyBox() { return State::_skyBox; };
     42  static inline SkyBox* getSkyBox() { return State::skyBox; };
    4343  /** @param skyBox the SkyBox */
    44   static inline SkyBox* setSkyBox(SkyBox* skyBox) { State::_skyBox = skyBox; };
    45 
     44  static inline SkyBox* setSkyBox(SkyBox* skyBox) { State::skyBox = skyBox; };
    4645
    4746  //////////////////////
     
    5352  static inline ObjectManager* getObjectManager() { return State::objectManager; };
    5453
     54  static inline void setResolution(unsigned int resX, unsigned int resY) { State::resX = resX; State::resY = resY; };
     55  static inline unsigned int getResX() { return State::resX; };
     56  static inline unsigned int getResY() { return State::resY; };
    5557
    56   static inline void setResolution(unsigned int resX, unsigned int resY) { State::_resX = resX; State::_resY = resY; };
    57   static inline unsigned int resX() { return State::_resX; };
    58   static inline unsigned int resY() { return State::_resY; };
     58  //////////////////////
     59  /// STORY-ENTITY   ///
     60  //////////////////////
     61  /** @param storyEntity sets the current StoryEntity that is been played */
     62  static inline void setCurrentStoryEntity(StoryEntity* storyEntity) { State::storyEntity = storyEntity; };
     63  /** @returns the current StoryEntity played */
     64  static inline StoryEntity* getCurrentStoryEntity() { return State::storyEntity; };
    5965
    60   /////////////////////////
    61   /// WORLD_ENTITY_LIST ///
    62   /////////////////////////
     66  //////////////
     67  /// PLAYER ///
     68  //////////////
     69  /** @param player sets the current local player */
     70  static inline void setPlayer(Player* player) { State::player = player; };
     71  /** @returns the local player*/
     72  static inline Player* getPlayer() { return State::player; };
     73
     74
    6375
    6476 private:
     
    6880  static PNode*                 cameraTarget;       //!< A reference to the cameraTarget
    6981  static PNode*                 nullParent;         //!< A reference to the Null-PNode.
    70   static ObjectManager*         objectManager;      //!< A referenct to the current ObjectManager
     82  static ObjectManager*         objectManager;      //!< A reference to the current ObjectManager
     83  static StoryEntity*           storyEntity;        //!< A reference to the current StoryEntity played
     84  static Player*                player;             //!< A reference to the Player
    7185
    72   static Player*                _localPlayer;       //!< The Local Player.
    73   static SkyBox*                _skyBox;            //!< The SkyBox used in the current world.
    74   static unsigned int           _resX;              //!< The X Resolution of the screen.
    75   static unsigned int           _resY;              //!< The Y Resolution of the screen.
     86  static SkyBox*                skyBox;            //!< The SkyBox used in the current world.
     87  static unsigned int           resX;              //!< The X Resolution of the screen.
     88  static unsigned int           resY;              //!< The Y Resolution of the screen.
    7689  };
    7790
Note: See TracChangeset for help on using the changeset viewer.