Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 10, 2009, 10:58:53 PM (16 years ago)
Author:
rgrieder
Message:

Header file section clean up in orxonox/overlays (without stats). Also reduced dependencies as much as possible.

Location:
code/branches/pch/src/orxonox/overlays/hud
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/orxonox/overlays/hud/AnnounceMessage.h

    r3099 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
     35#include "objects/GametypeMessageListener.h"
    3436#include "overlays/FadeoutText.h"
    35 #include "objects/GametypeMessageListener.h"
    3637
    3738namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/ChatOverlay.cc

    r3142 r3144  
    3131#include <OgreTextAreaOverlayElement.h>
    3232
     33#include "util/Convert.h"
    3334#include "util/UTFStringConversions.h"
    3435#include "core/CoreIncludes.h"
     
    3637#include "core/Executor.h"
    3738
    38 #include "network/ClientInformation.h"
    39 
     39#include "tools/Timer.h"
     40#include "objects/infos/PlayerInfo.h"
    4041#include "PlayerManager.h"
    41 #include "objects/infos/PlayerInfo.h"
    42 #include "tools/Timer.h"
    43 
    44 #include "util/Convert.h"
    4542
    4643namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/ChatOverlay.h

    r2171 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgreTextAreaOverlayElement.h>
     34#include <string>
     35#include <list>
     36#include <OgreUTFString.h>
    3537
    3638#include "network/ChatListener.h"
     
    4345        public:
    4446            ChatOverlay(BaseObject* creator);
    45             ~ChatOverlay();
     47            virtual ~ChatOverlay();
    4648
    4749            void setConfigValues();
  • code/branches/pch/src/orxonox/overlays/hud/DeathMessage.h

    r3099 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
     35#include "objects/GametypeMessageListener.h"
    3436#include "overlays/FadeoutText.h"
    35 #include "objects/GametypeMessageListener.h"
    3637
    3738namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/GametypeStatus.cc

    r3110 r3144  
    2929#include "GametypeStatus.h"
    3030
    31 #include <OgreTextAreaOverlayElement.h>
    32 
     31#include "util/Convert.h"
    3332#include "core/CoreIncludes.h"
    34 #include "util/Convert.h"
    3533#include "objects/infos/GametypeInfo.h"
    3634#include "objects/infos/PlayerInfo.h"
  • code/branches/pch/src/orxonox/overlays/hud/GametypeStatus.h

    r2973 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "objects/Tickable.h"
    3435#include "overlays/OverlayText.h"
    35 #include "objects/Tickable.h"
    3636
    3737namespace orxonox
     
    4141        public:
    4242            GametypeStatus(BaseObject* creator);
    43             ~GametypeStatus();
     43            virtual ~GametypeStatus();
    4444
    4545            virtual void tick(float dt);
  • code/branches/pch/src/orxonox/overlays/hud/HUDBar.cc

    r3110 r3144  
    3434#include <OgreMaterialManager.h>
    3535#include <OgreTechnique.h>
     36#include <OgrePass.h>
    3637#include <OgrePanelOverlayElement.h>
    3738
  • code/branches/pch/src/orxonox/overlays/hud/HUDBar.h

    r2662 r3144  
    3535
    3636#include <map>
     37#include <vector>
    3738#include <OgrePrerequisites.h>
     39
    3840#include "util/Math.h"
     41#include "core/BaseObject.h"
    3942#include "overlays/OrxonoxOverlay.h"
    4043
     
    4548    public:
    4649        BarColour(BaseObject* creator);
    47         ~BarColour() { }
     50        virtual ~BarColour() { }
    4851
    4952        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
  • code/branches/pch/src/orxonox/overlays/hud/HUDHealthBar.cc

    r3110 r3144  
    2929#include "HUDHealthBar.h"
    3030
    31 #include <OgreOverlayManager.h>
    32 #include <OgrePanelOverlayElement.h>
    33 
     31#include "util/Convert.h"
    3432#include "core/CoreIncludes.h"
    3533#include "core/XMLPort.h"
    3634#include "objects/worldentities/pawns/Pawn.h"
    37 #include "objects/items/Engine.h"
    3835#include "overlays/OverlayGroup.h"
    39 #include "util/Convert.h"
    4036
    4137namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/HUDHealthBar.h

    r2662 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "HUDBar.h"
     34#include "util/Math.h"
    3535#include "objects/Tickable.h"
    3636#include "overlays/OverlayText.h"
     37#include "HUDBar.h"
    3738
    3839namespace orxonox
     
    4243        public:
    4344            HUDHealthBar(BaseObject* creator);
    44             ~HUDHealthBar();
     45            virtual ~HUDHealthBar();
    4546
    4647            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     
    6465                { return this->bUseBarColour_; }
    6566
    66             inline void setTextAlignment(Ogre::TextAreaOverlayElement::Alignment alignment)
     67            inline void setTextAlignment(OverlayText::Alignment alignment)
    6768                { this->textoverlay_->setAlignment(alignment); }
    68             inline Ogre::TextAreaOverlayElement::Alignment getTextAlignment() const
     69            inline OverlayText::Alignment getTextAlignment() const
    6970                { return this->textoverlay_->getAlignment(); }
    7071
  • code/branches/pch/src/orxonox/overlays/hud/HUDNavigation.cc

    r3110 r3144  
    3636#include "util/String.h"
    3737#include "util/Convert.h"
    38 #include "core/ConsoleCommand.h"
    3938#include "core/CoreIncludes.h"
    4039#include "core/XMLPort.h"
  • code/branches/pch/src/orxonox/overlays/hud/HUDNavigation.h

    r2087 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include <OgrePrerequisites.h>
     36#include "objects/Tickable.h"
    3537#include "overlays/OrxonoxOverlay.h"
    36 #include "objects/Tickable.h"
    3738
    3839namespace orxonox
     
    4243    public:
    4344        HUDNavigation(BaseObject* creator);
    44         ~HUDNavigation();
     45        virtual ~HUDNavigation();
    4546
    4647        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
  • code/branches/pch/src/orxonox/overlays/hud/HUDRadar.cc

    r3110 r3144  
    3535#include "util/Math.h"
    3636#include "util/String.h"
    37 #include "core/ConsoleCommand.h"
    3837#include "core/CoreIncludes.h"
    3938#include "core/XMLPort.h"
    40 #include "objects/Radar.h"
     39#include "tools/TextureGenerator.h"
    4140#include "objects/worldentities/WorldEntity.h"
    4241#include "objects/worldentities/pawns/Pawn.h"
    43 #include "tools/TextureGenerator.h"
    4442
    4543namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/HUDRadar.h

    r2662 r3144  
    3333#include "OrxonoxPrereqs.h"
    3434
     35#include <map>
    3536#include <vector>
    36 #include <map>
    3737#include <OgrePrerequisites.h>
     38
    3839#include "overlays/OrxonoxOverlay.h"
    3940#include "objects/RadarListener.h"
     
    4647    public:
    4748        HUDRadar(BaseObject* creator);
    48         ~HUDRadar();
     49        virtual ~HUDRadar();
    4950
    5051        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
  • code/branches/pch/src/orxonox/overlays/hud/HUDSpeedBar.cc

    r3110 r3144  
    2929
    3030#include "HUDSpeedBar.h"
     31
    3132#include "core/CoreIncludes.h"
    3233#include "objects/worldentities/pawns/SpaceShip.h"
  • code/branches/pch/src/orxonox/overlays/hud/HUDSpeedBar.h

    r2662 r3144  
    3333#include "OrxonoxPrereqs.h"
    3434
     35#include "objects/Tickable.h"
    3536#include "HUDBar.h"
    36 #include "objects/Tickable.h"
    3737
    3838namespace orxonox
     
    4242    public:
    4343        HUDSpeedBar(BaseObject* creator);
    44         ~HUDSpeedBar();
     44        virtual ~HUDSpeedBar();
    4545
    4646        virtual void tick(float dt);
  • code/branches/pch/src/orxonox/overlays/hud/HUDTimer.cc

    r3110 r3144  
    2929#include "HUDTimer.h"
    3030
     31#include "util/Convert.h"
    3132#include "core/CoreIncludes.h"
    32 #include "util/Convert.h"
    3333#include "objects/worldentities/ControllableEntity.h"
    3434#include "objects/gametypes/Gametype.h"
     
    3636namespace orxonox
    3737{
    38   CreateFactory(HUDTimer);
     38    CreateFactory(HUDTimer);
    3939
    40   HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
    41   {
    42     RegisterObject(HUDTimer);
     40    HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
     41    {
     42        RegisterObject(HUDTimer);
    4343
    44     this->owner_ = 0;
    45   }
     44        this->owner_ = 0;
     45    }
    4646
    47   HUDTimer::~HUDTimer()
    48   {
    49   }
     47    HUDTimer::~HUDTimer()
     48    {
     49    }
    5050
    51   void HUDTimer::tick(float dt)
    52   {
    53     SUPER(HUDTimer, tick, dt);
     51    void HUDTimer::tick(float dt)
     52    {
     53        SUPER(HUDTimer, tick, dt);
    5454
    55     Gametype* gametype = this->getGametype();
    56    
    57     if(gametype)
     55        Gametype* gametype = this->getGametype();
     56
     57        if (gametype)
     58        {
     59            if (gametype->getTimerIsActive())
     60            {
     61                this->setCaption(convertToString((int)gametype->getTime() + 1));
     62            }
     63        }
     64    }
     65
     66    void HUDTimer::changedOwner()
    5867    {
    59       if (gametype->getTimerIsActive())
    60       {
    61         this->setCaption(convertToString((int)gametype->getTime() + 1));
    62       }
     68        SUPER(HUDTimer, changedOwner);
     69
     70        this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());
    6371    }
    64   }
    65 
    66   void HUDTimer::changedOwner()
    67   {
    68     SUPER(HUDTimer, changedOwner);
    69 
    70     this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());
    71   }
    7272}
  • code/branches/pch/src/orxonox/overlays/hud/HUDTimer.h

    r3033 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "objects/Tickable.h"
    3435#include "overlays/OverlayText.h"
    35 #include "objects/Tickable.h"
    3636
    3737namespace orxonox
    3838{
    39   class _OrxonoxExport HUDTimer : public OverlayText, public Tickable
    40   {
     39    class _OrxonoxExport HUDTimer : public OverlayText, public Tickable
     40    {
    4141    public:
    42       HUDTimer(BaseObject* creator);
    43       ~HUDTimer();
     42        HUDTimer(BaseObject* creator);
     43        virtual ~HUDTimer();
    4444
    45       virtual void tick(float dt);
     45        virtual void tick(float dt);
    4646
    47       virtual void changedOwner();
     47        virtual void changedOwner();
    4848
    49       private:
     49    private:
    5050        ControllableEntity* owner_;
    51   };
     51    };
    5252}
    5353#endif /* _HUDTimer_H__ */
  • code/branches/pch/src/orxonox/overlays/hud/KillMessage.h

    r3099 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
     35#include "objects/GametypeMessageListener.h"
    3436#include "overlays/FadeoutText.h"
    35 #include "objects/GametypeMessageListener.h"
    3637
    3738namespace orxonox
  • code/branches/pch/src/orxonox/overlays/hud/PongScore.cc

    r3110 r3144  
    2929#include "PongScore.h"
    3030
    31 #include <OgreTextAreaOverlayElement.h>
    32 
     31#include "util/Convert.h"
    3332#include "core/CoreIncludes.h"
    3433#include "core/XMLPort.h"
    35 #include "util/Convert.h"
    3634#include "objects/gametypes/Pong.h"
    3735#include "objects/infos/PlayerInfo.h"
  • code/branches/pch/src/orxonox/overlays/hud/PongScore.h

    r3078 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "objects/Tickable.h"
    3435#include "overlays/OverlayText.h"
    35 #include "objects/Tickable.h"
    3636
    3737namespace orxonox
     
    4141        public:
    4242            PongScore(BaseObject* creator);
    43             ~PongScore();
     43            virtual ~PongScore();
    4444
    4545            virtual void tick(float dt);
  • code/branches/pch/src/orxonox/overlays/hud/TeamBaseMatchScore.cc

    r3110 r3144  
    2828
    2929#include "TeamBaseMatchScore.h"
    30 
    31 #include <OgreTextAreaOverlayElement.h>
    3230
    3331#include "core/CoreIncludes.h"
  • code/branches/pch/src/orxonox/overlays/hud/TeamBaseMatchScore.h

    r3104 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "objects/Tickable.h"
    3435#include "overlays/OverlayText.h"
    35 #include "objects/Tickable.h"
    3636
    3737namespace orxonox
     
    4141        public:
    4242            TeamBaseMatchScore(BaseObject* creator);
    43             ~TeamBaseMatchScore();
     43            virtual ~TeamBaseMatchScore();
    4444
    4545            virtual void tick(float dt);
  • code/branches/pch/src/orxonox/overlays/hud/UnderAttackHealthBar.h

    r3104 r3144  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
     35#include "tools/Timer.h"
    3436#include "HUDHealthBar.h"
    35 #include "tools/Timer.h"
    3637
    3738namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.