Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11000 for code/branches


Ignore:
Timestamp:
Dec 30, 2015, 3:17:35 PM (9 years ago)
Author:
landauf
Message:

using strongly typed enum classes for RadarViewable::Shape

Location:
code/branches/cpp11_v2/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/gametypes/OldRaceCheckPoint.cc

    r10624 r11000  
    4949
    5050        this->setRadarObjectColour(ColourValue::Blue);
    51         this->setRadarObjectShape(RadarViewable::Triangle);
     51        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    5252        this->setRadarVisibility(false);
    5353    }
  • code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc

    r10916 r11000  
    5353
    5454        this->setRadarObjectColour(ColourValue::Blue);
    55         this->setRadarObjectShape(RadarViewable::Triangle);
     55        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    5656        this->setRadarVisibility(false);
    5757        this->settingsChanged();
  • code/branches/cpp11_v2/src/modules/objects/triggers/CheckPoint.cc

    r10624 r11000  
    5656
    5757        this->setRadarObjectColour(ColourValue::Green);
    58         this->setRadarObjectShape(RadarViewable::Dot);
     58        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    5959        this->setRadarVisibility(false);
    6060
  • code/branches/cpp11_v2/src/modules/overlays/hud/HUDRadar.cc

    r10919 r11000  
    6565        this->setMaximumDotSize3D(0.07f);
    6666
    67         this->shapeMaterials_[RadarViewable::Dot]      = "RadarDot.png";
    68         this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png";
    69         this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.png";
     67        this->shapeMaterials_[RadarViewable::Shape::Dot]      = "RadarDot.png";
     68        this->shapeMaterials_[RadarViewable::Shape::Triangle] = "RadarTriangle.png";
     69        this->shapeMaterials_[RadarViewable::Shape::Square]   = "RadarSquare.png";
    7070        this->owner_ = nullptr;
    7171
  • code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc

    r10768 r11000  
    5757
    5858        this->setRadarObjectColour(ColourValue::White);
    59         this->setRadarObjectShape(RadarViewable::Dot);
     59        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    6060        this->setRadarVisibility(true);
    6161        if( GameMode::isMaster() )
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc

    r10919 r11000  
    4141        //Make the Field visible on Radar and minimap.
    4242        this->setRadarObjectColour(ColourValue(1.0, 0.0, 0.2,1)); // Red
    43         this->setRadarObjectShape(RadarViewable::Dot);
     43        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    4444        this->setRadarObjectScale(1.0f);
    4545       
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/Rocket.cc

    r10768 r11000  
    128128
    129129        this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange
    130         this->setRadarObjectShape(RadarViewable::Triangle);
     130        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    131131        this->setRadarObjectScale(0.5f);
    132132    }
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/RocketOld.cc

    r10768 r11000  
    128128
    129129        this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange
    130         this->setRadarObjectShape(RadarViewable::Triangle);
     130        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    131131        this->setRadarObjectScale(0.5f);
    132132    }
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/SimpleRocket.cc

    r10299 r11000  
    101101
    102102        this->setRadarObjectColour(ColourValue(1.0, 1.0, 0.0)); // yellow
    103         this->setRadarObjectShape(RadarViewable::Triangle);
     103        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    104104        this->setRadarObjectScale(0.5f);
    105105    }
  • code/branches/cpp11_v2/src/orxonox/Radar.cc

    r10920 r11000  
    5555        // TODO: make this mapping configurable. Maybe there's a possibility with self configured
    5656        //       configValues..
    57         this->objectTypes_["Asteroid"] = RadarViewable::Dot;
    58         this->objectTypes_["SpaceShip"] = RadarViewable::Square;
    59         this->objectTypes_["AsdfQwerty"] = RadarViewable::Triangle;
     57        this->objectTypes_["Asteroid"] = RadarViewable::Shape::Dot;
     58        this->objectTypes_["SpaceShip"] = RadarViewable::Shape::Square;
     59        this->objectTypes_["AsdfQwerty"] = RadarViewable::Shape::Triangle;
    6060
    6161        /*WorldEntity* object;
     
    113113        std::map<std::string, RadarViewable::Shape>::iterator it = this->objectTypes_.find(name);
    114114        if (it == this->objectTypes_.end())
    115             return this->objectTypes_[name] = RadarViewable::Square; // default, configure!!
     115            return this->objectTypes_[name] = RadarViewable::Shape::Square; // default, configure!!
    116116        else
    117117            return this->objectTypes_[name];
  • code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.cc

    r10624 r11000  
    4949        , wePtr_(wePtr)
    5050        , radarObjectCamouflage_(0.0f)
    51         , radarObjectShape_(Dot)
     51        , radarObjectShape_(Shape::Dot)
    5252        , radarObjectDescription_("staticObject")
    5353        , scale_(1.0f)
  • code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.h

    r10768 r11000  
    4949    {
    5050    public:
    51         enum Shape
     51        enum class Shape
    5252        {
    5353            Square,
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc

    r10919 r11000  
    9494
    9595        this->setRadarObjectColour(ColourValue::Red);
    96         this->setRadarObjectShape(RadarViewable::Dot);
     96        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    9797
    9898        this->registerVariables();
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc

    r10919 r11000  
    5151        }
    5252
    53         this->setRadarObjectShape(RadarViewable::Triangle);
     53        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    5454    }
    5555
Note: See TracChangeset for help on using the changeset viewer.