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/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/objects/gametypes/Gametype.h

    r3196 r3257  
    4545    namespace PlayerState
    4646    {
    47         enum Enum
     47        enum Value
    4848        {
    4949            Uninitialized,
     
    5757    {
    5858        PlayerInfo* info_;
    59         PlayerState::Enum state_;
     59        PlayerState::Value state_;
    6060        int frags_;
    6161        int killed_;
  • code/branches/core4/src/orxonox/objects/gametypes/TeamBaseMatch.cc

    r3239 r3257  
    6666                if (teamnr == 0)
    6767                {
    68                     base->setState(BaseState::controlTeam1);
     68                    base->setState(BaseState::ControlTeam1);
    6969                    this->gtinfo_.sendAnnounceMessage("The red team captured a base");
    7070                }
    7171                if (teamnr == 1)
    7272                {
    73                     base->setState(BaseState::controlTeam2);
     73                    base->setState(BaseState::ControlTeam2);
    7474                    this->gtinfo_.sendAnnounceMessage("The blue team captured a base");
    7575                }
     
    107107            switch (base->getState())
    108108            {
    109                 case BaseState::controlTeam1:
     109                case BaseState::ControlTeam1:
    110110                    teamnrbase = 0;
    111111                    break;
    112                 case BaseState::controlTeam2:
     112                case BaseState::ControlTeam2:
    113113                    teamnrbase = 1;
    114114                    break;
    115                 case BaseState::uncontrolled:
     115                case BaseState::Uncontrolled:
    116116                default:
    117117                    teamnrbase = -1;
     
    155155        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    156156        {
    157             if((*it)->getState() == BaseState::controlTeam1)
     157            if((*it)->getState() == BaseState::ControlTeam1)
    158158            {
    159159                amountControlled++;
    160160            }
    161             if((*it)->getState() == BaseState::controlTeam2)
     161            if((*it)->getState() == BaseState::ControlTeam2)
    162162            {
    163163                amountControlled2++;
     
    241241        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    242242        {
    243             if ((*it)->getState() == BaseState::controlTeam1 && team == 0)
     243            if ((*it)->getState() == BaseState::ControlTeam1 && team == 0)
    244244                count++;
    245             if ((*it)->getState() == BaseState::controlTeam2 && team == 1)
     245            if ((*it)->getState() == BaseState::ControlTeam2 && team == 1)
    246246                count++;
    247247        }
     
    253253    {
    254254        this->bases_.insert(base);
    255         base->setState(BaseState::uncontrolled);
     255        base->setState(BaseState::Uncontrolled);
    256256    }
    257257
Note: See TracChangeset for help on using the changeset viewer.