Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2181


Ignore:
Timestamp:
Nov 12, 2008, 12:56:15 AM (16 years ago)
Author:
rgrieder
Message:

Moved instantiation of stats overlay from GSLevel to Gametype.

Location:
code/branches/overlay/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/overlay/src/orxonox/gamestates/GSLevel.cc

    r2140 r2181  
    6060        , radar_(0)
    6161        , startFile_(0)
    62         , stats_(0)
    6362        , cameraManager_(0)
    6463        , levelManager_(0)
     
    9493            // Start the Radar
    9594            this->radar_ = new Radar();
    96 
    97             stats_ = new XMLFile(Settings::getDataPath() + "overlay/stats.oxo");
    98             Loader::open(stats_);
    9995        }
    10096
  • code/branches/overlay/src/orxonox/gamestates/GSLevel.h

    r2140 r2181  
    6868        Radar*                radar_;            //!< represents the Radar (not the HUD part)
    6969        XMLFile*              startFile_;        //!< current hard coded default level
    70         XMLFile*              stats_;
    7170        CameraManager*        cameraManager_;
    7271        LevelManager*         levelManager_;
  • code/branches/overlay/src/orxonox/objects/gametypes/Gametype.cc

    r2087 r2181  
    3434
    3535#include "core/CoreIncludes.h"
     36#include "core/ConfigValueIncludes.h"
     37#include "core/Loader.h"
     38#include "core/XMLFile.h"
    3639#include "objects/infos/PlayerInfo.h"
    3740#include "objects/worldentities/pawns/Spectator.h"
     
    5861        this->startCountdown_ = 0;
    5962        this->bStartCountdownRunning_ = false;
     63
     64        this->statsOverlay_ = 0;
     65
     66        setConfigValues();
     67
     68        // load the corresponding score board
     69        statsOverlay_ = new XMLFile(Settings::getDataPath() + "overlay/" + this->statsOverlayName_);
     70        Loader::open(statsOverlay_);
     71    }
     72
     73    void Gametype::setConfigValues()
     74    {
     75        SetConfigValue(statsOverlayName_, "stats.oxo");
    6076    }
    6177
  • code/branches/overlay/src/orxonox/objects/gametypes/Gametype.h

    r2087 r2181  
    4444    {
    4545        friend class PlayerInfo;
     46        friend class ClassIdentifier<Gametype>;
    4647
    4748        public:
     
    8283
    8384        private:
     85            void setConfigValues();
     86
    8487            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
    8588
     
    105108            std::set<SpawnPoint*> spawnpoints_;
    106109            SubclassIdentifier<ControllableEntity> defaultControllableEntity_;
     110
     111            XMLFile* statsOverlay_;
     112
     113            // Config Values
     114            std::string statsOverlayName_;
    107115    };
    108116}
  • code/branches/overlay/src/orxonox/overlays/OrxonoxOverlay.cc

    r2087 r2181  
    8787        setPosition(Vector2(0.0f, 0.0f));
    8888        setRotation(Degree(0.0));
    89         setAspectCorrection(true);
     89        setAspectCorrection(false);
    9090        setBackgroundMaterial("");
    9191    }
Note: See TracChangeset for help on using the changeset viewer.