Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2009, 3:14:45 PM (15 years ago)
Author:
rgrieder
Message:

Unified enumeration layout according to the style guide (which I have edited recently ;)).
There is one exception though: XMLPort::Mode. Since that would involve 182 changed files, I have decided not to rename it for now. Moreover its syntax is not too bad ;)

Location:
code/branches/core4/src/orxonox/objects/worldentities/pawns
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3214 r3257  
    117117    void Pawn::registerVariables()
    118118    {
    119         registerVariable(this->bAlive_,        variableDirection::toclient);
    120         registerVariable(this->health_,        variableDirection::toclient);
    121         registerVariable(this->initialHealth_, variableDirection::toclient);
    122         registerVariable(this->bReload_,       variableDirection::toserver);
     119        registerVariable(this->bAlive_,        VariableDirection::ToClient);
     120        registerVariable(this->health_,        VariableDirection::ToClient);
     121        registerVariable(this->initialHealth_, VariableDirection::ToClient);
     122        registerVariable(this->bReload_,       VariableDirection::ToServer);
    123123    }
    124124
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r3239 r3257  
    9090    void SpaceShip::registerVariables()
    9191    {
    92         registerVariable(this->primaryThrust_,  variableDirection::toclient);
    93         registerVariable(this->auxilaryThrust_, variableDirection::toclient);
    94         registerVariable(this->rotationThrust_, variableDirection::toclient);
     92        registerVariable(this->primaryThrust_,  VariableDirection::ToClient);
     93        registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
     94        registerVariable(this->rotationThrust_, VariableDirection::ToClient);
    9595    }
    9696
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3196 r3257  
    9393    void Spectator::registerVariables()
    9494    {
    95         registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    96         registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     95        registerVariable(this->bGreetingFlareVisible_, VariableDirection::ToClient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     96        registerVariable(this->bGreeting_,             VariableDirection::ToServer, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    9797    }
    9898
     
    145145        ControllableEntity::setPlayer(player);
    146146
    147 //        this->setObjectMode(objectDirection::toclient);
     147//        this->setObjectMode(ObjectDirection::ToClient);
    148148    }
    149149
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc

    r3239 r3257  
    4343        RegisterObject(TeamBaseMatchBase);
    4444
    45         this->state_ = BaseState::uncontrolled;
     45        this->state_ = BaseState::Uncontrolled;
    4646
    4747        TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype());
     
    6666        switch (this->state_)
    6767        {
    68             case BaseState::controlTeam1:
     68            case BaseState::ControlTeam1:
    6969                colour = gametype->getTeamColour(0);
    7070                break;
    71             case BaseState::controlTeam2:
     71            case BaseState::ControlTeam2:
    7272                colour = gametype->getTeamColour(1);
    7373                break;
    74             case BaseState::uncontrolled:
     74            case BaseState::Uncontrolled:
    7575            default:
    7676                colour = ColourValue(0.5, 0.5, 0.5, 1.0);
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h

    r3196 r3257  
    3838    namespace BaseState
    3939    {
    40         enum Enum
     40        enum Value
    4141        {
    42             uncontrolled,
    43             controlTeam1,
    44             controlTeam2,
     42            Uncontrolled,
     43            ControlTeam1,
     44            ControlTeam2,
    4545        };
    4646    }
     
    5858
    5959            // Set the state of a base to whatever the argument of the function is
    60             void setState(BaseState::Enum state)
     60            void setState(BaseState::Value state)
    6161            {
    6262                this->state_ = state;
     
    6666
    6767            // Get the state of a base as a return value
    68             BaseState::Enum getState() const
     68            BaseState::Value getState() const
    6969            {
    7070                return this->state_;
     
    7575            void changeTeamColour();
    7676
    77             BaseState::Enum state_;
     77            BaseState::Value state_;
    7878    };
    7979}
Note: See TracChangeset for help on using the changeset viewer.