Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 4:08:51 AM (16 years ago)
Author:
landauf
Message:

many changes, most important: BaseObject takes now a pointer to it's creator which is needed to build a level hierarchy (with different scenes)

Location:
code/branches/objecthierarchy/src/orxonox/overlays
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/overlays/OrxonoxOverlay.cc

    r1755 r2019  
    5555    SetConsoleCommand(OrxonoxOverlay, rotateOverlay, false).accessLevel(AccessLevel::User);
    5656
    57     OrxonoxOverlay::OrxonoxOverlay()
    58         : overlay_(0)
     57    OrxonoxOverlay::OrxonoxOverlay(BaseObject* creator)
     58        : BaseObject(creator)
     59        , overlay_(0)
    5960        , background_(0)
    6061    {
     
    148149            return this->background_->getMaterialName();
    149150        else
    150             return blankString;
     151            return BLANKSTRING;
    151152    }
    152153
  • code/branches/objecthierarchy/src/orxonox/overlays/OrxonoxOverlay.h

    r1747 r2019  
    8484
    8585    public:
    86         OrxonoxOverlay();
     86        OrxonoxOverlay(BaseObject* creator);
    8787        virtual ~OrxonoxOverlay();
    8888
  • code/branches/objecthierarchy/src/orxonox/overlays/OverlayGroup.cc

    r1993 r2019  
    5050    SetConsoleCommand(OverlayGroup, scrollGroup, false).accessLevel(AccessLevel::User);
    5151
    52     OverlayGroup::OverlayGroup()
     52    OverlayGroup::OverlayGroup(BaseObject* creator) : BaseObject(creator)
    5353    {
    5454        RegisterObject(OverlayGroup);
  • code/branches/objecthierarchy/src/orxonox/overlays/OverlayGroup.h

    r1747 r2019  
    5454    {
    5555    public:
    56         OverlayGroup();
     56        OverlayGroup(BaseObject* creator);
    5757        //! Empty destructor.
    5858        ~OverlayGroup() { }
  • code/branches/objecthierarchy/src/orxonox/overlays/OverlayText.cc

    r1993 r2019  
    4141    CreateFactory(OverlayText);
    4242
    43     OverlayText::OverlayText()
    44         : text_(0)
     43    OverlayText::OverlayText(BaseObject* creator) : OrxonoxOverlay(creator), text_(0)
    4544    {
    4645        RegisterObject(OverlayText);
     
    6059        {
    6160            this->text_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
    62                 .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberStr()));
     61                .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberString()));
    6362            this->text_->setCharHeight(1.0);
    6463
     
    8483            return this->text_->getFontName();
    8584        else
    86             return blankString;
     85            return BLANKSTRING;
    8786    }
    8887
  • code/branches/objecthierarchy/src/orxonox/overlays/OverlayText.h

    r1993 r2019  
    4242    {
    4343    public:
    44         OverlayText();
     44        OverlayText(BaseObject* creator);
    4545        virtual ~OverlayText();
    4646
  • code/branches/objecthierarchy/src/orxonox/overlays/debug/DebugFPSText.cc

    r1755 r2019  
    3838    CreateFactory(DebugFPSText);
    3939
    40     DebugFPSText::DebugFPSText()
     40    DebugFPSText::DebugFPSText(BaseObject* creator) : OverlayText(creator)
    4141    {
    4242        RegisterObject(DebugFPSText);
  • code/branches/objecthierarchy/src/orxonox/overlays/debug/DebugFPSText.h

    r1747 r2019  
    4040    {
    4141    public:
    42         DebugFPSText();
     42        DebugFPSText(BaseObject* creator);
    4343        ~DebugFPSText();
    4444
  • code/branches/objecthierarchy/src/orxonox/overlays/debug/DebugRTRText.cc

    r1755 r2019  
    3838    CreateFactory(DebugRTRText);
    3939
    40     DebugRTRText::DebugRTRText()
     40    DebugRTRText::DebugRTRText(BaseObject* creator) : OverlayText(creator)
    4141    {
    4242        RegisterObject(DebugRTRText);
  • code/branches/objecthierarchy/src/orxonox/overlays/debug/DebugRTRText.h

    r1747 r2019  
    4040    {
    4141    public:
    42         DebugRTRText();
     42        DebugRTRText(BaseObject* creator);
    4343        ~DebugRTRText();
    4444
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc

    r2012 r2019  
    3939
    4040#include "GraphicsEngine.h"
    41 #include "objects/infos/Level.h"
     41#include "LevelManager.h"
    4242#include "objects/infos/PlayerInfo.h"
    4343#include "overlays/console/InGameConsole.h"
     
    5050    CreateFactory(ChatOverlay);
    5151
    52     ChatOverlay::ChatOverlay()
     52    ChatOverlay::ChatOverlay(BaseObject* creator) : OverlayText(creator)
    5353    {
    5454        RegisterObject(ChatOverlay);
     
    7676            std::string name = "unknown";
    7777
    78             PlayerInfo* player = Level::getClient(senderID);
     78            PlayerInfo* player = LevelManager::getInstance().getClient(senderID);
    7979            if (player)
    8080                name = player->getName();
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h

    r1968 r2019  
    4242    {
    4343        public:
    44             ChatOverlay();
     44            ChatOverlay(BaseObject* creator);
    4545            ~ChatOverlay();
    4646
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDBar.cc

    r1854 r2019  
    3838
    3939#include "util/Convert.h"
     40#include "util/String.h"
    4041#include "core/CoreIncludes.h"
    4142#include "core/XMLPort.h"
     
    4546    CreateFactory(BarColour);
    4647
    47     BarColour::BarColour()
    48         : position_(0.0)
     48    BarColour::BarColour(BaseObject* creator) : BaseObject(creator), position_(0.0)
    4949    {
    5050        RegisterObject(BarColour);
     
    6363    unsigned int HUDBar::materialcount_s = 0;
    6464
    65     HUDBar::HUDBar()
    66         : bar_(0)
    67         , textureUnitState_(0)
     65    HUDBar::HUDBar(BaseObject* creator) : OrxonoxOverlay(creator), bar_(0), textureUnitState_(0)
    6866    {
    6967        RegisterObject(HUDBar);
     
    9290
    9391            this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
    94                 .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberStr()));
     92                .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberString()));
    9593            this->bar_->setMaterialName(materialname);
    9694            this->background_->addChild(bar_);
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDBar.h

    r1747 r2019  
    4444    {
    4545    public:
    46         BarColour();
     46        BarColour(BaseObject* creator);
    4747        ~BarColour() { }
    4848
     
    6464    {
    6565    public:
    66         HUDBar();
     66        HUDBar(BaseObject* creator);
    6767        virtual ~HUDBar();
    6868
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDNavigation.cc

    r1993 r2019  
    4646    CreateFactory(HUDNavigation);
    4747
    48     HUDNavigation::HUDNavigation()
    49         : navMarker_(0)
     48    HUDNavigation::HUDNavigation(BaseObject* creator)
     49        : OrxonoxOverlay(creator)
     50        , navMarker_(0)
    5051        , aimMarker_(0)
    5152        , navText_(0)
     
    7273            // create nav text
    7374            navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
    74                 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberStr()));
     75                .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString()));
    7576
    7677            // create nav marker
    7778            navMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
    78                 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberStr()));
     79                .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString()));
    7980            navMarker_->setMaterialName("Orxonox/NavArrows");
    8081            wasOutOfView_ = true; // just to ensure the material is changed right the first time..
     
    8283            // create aim marker
    8384            aimMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
    84                 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr()));
     85                .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberString()));
    8586            aimMarker_->setMaterialName("Orxonox/NavCrosshair");
    8687
     
    112113            return this->navText_->getFontName();
    113114        else
    114             return blankString;
     115            return BLANKSTRING;
    115116    }
    116117
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDNavigation.h

    r1747 r2019  
    4141    {
    4242    public:
    43         HUDNavigation();
     43        HUDNavigation(BaseObject* creator);
    4444        ~HUDNavigation();
    4545
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDRadar.cc

    r1916 r2019  
    3535
    3636#include "util/Math.h"
     37#include "util/String.h"
    3738#include "core/ConsoleCommand.h"
    3839#include "core/CoreIncludes.h"
     
    4546    CreateFactory(HUDRadar);
    4647
    47     HUDRadar::HUDRadar()
    48         : marker_(0)
     48    HUDRadar::HUDRadar(BaseObject* creator) : OrxonoxOverlay(creator), marker_(0)
    4949    {
    5050        RegisterObject(HUDRadar);
     
    6969        {
    7070            marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
    71                 .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberStr()));
     71                .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberString()));
    7272            marker_->setMaterialName("Orxonox/RadarMarker");
    7373            overlay_->add2D(marker_);
     
    107107            // we have to create a new entry
    108108            panel = static_cast<Ogre::PanelOverlayElement*>(
    109                 Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberStr()));
     109                Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString()));
    110110            radarDots_.push_back(panel);
    111111            // get right material
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDRadar.h

    r1819 r2019  
    4545    {
    4646    public:
    47         HUDRadar();
     47        HUDRadar(BaseObject* creator);
    4848        ~HUDRadar();
    4949
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDSpeedBar.cc

    r1916 r2019  
    3636    CreateFactory(HUDSpeedBar);
    3737
    38     HUDSpeedBar::HUDSpeedBar()
     38    HUDSpeedBar::HUDSpeedBar(BaseObject* creator) : HUDBar(creator)
    3939    {
    4040        RegisterObject(HUDSpeedBar);
  • code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDSpeedBar.h

    r1747 r2019  
    4141    {
    4242    public:
    43         HUDSpeedBar();
     43        HUDSpeedBar(BaseObject* creator);
    4444        ~HUDSpeedBar();
    4545
Note: See TracChangeset for help on using the changeset viewer.