[Orxonox-commit 4663] r9334 - in code/branches/presentation2012merge: data/levels data/overlays src/modules/overlays src/modules/overlays/hud src/orxonox/gametypes
landauf at orxonox.net
landauf at orxonox.net
Sun Jul 22 22:21:36 CEST 2012
Author: landauf
Date: 2012-07-22 22:21:36 +0200 (Sun, 22 Jul 2012)
New Revision: 9334
Removed:
code/branches/presentation2012merge/data/overlays/underAttackHUD.oxo
code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.cc
code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.h
Modified:
code/branches/presentation2012merge/data/levels/underAttack.oxw
code/branches/presentation2012merge/src/modules/overlays/OverlaysPrereqs.h
code/branches/presentation2012merge/src/modules/overlays/hud/CMakeLists.txt
code/branches/presentation2012merge/src/orxonox/gametypes/UnderAttack.cc
Log:
removed UnderAttackHealthBar which is not needed anymore because of HUDEnemyHealthBar
Modified: code/branches/presentation2012merge/data/levels/underAttack.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/underAttack.oxw 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/data/levels/underAttack.oxw 2012-07-22 20:21:36 UTC (rev 9334)
@@ -11,7 +11,6 @@
include("templates/spaceshipAssff.oxt")
include("templates/lodInformation.oxt")
?>
-<!--OUTDATED: include("underAttackHUD.oxo") -->
<Level
gametype = "UnderAttack"
Deleted: code/branches/presentation2012merge/data/overlays/underAttackHUD.oxo
===================================================================
--- code/branches/presentation2012merge/data/overlays/underAttackHUD.oxo 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/data/overlays/underAttackHUD.oxo 2012-07-22 20:21:36 UTC (rev 9334)
@@ -1,26 +0,0 @@
-< Template name="UnderAttackHUD">
- <OverlayGroup name="UnderAttackHUD" scale = "1, 1">
- <OUTDATED-- UnderAttackHealthBar
- name = "HealthBar"
- background = "Orxonox/HealthBarBackground"
- size = "0.45, 0.0875"
- position = "0.99 , 0.01"
- pickpoint = "1, 0"
- bartexture = "healthbar_bar.png"
- textfont = "VeraMono"
- textusebarcolour = true
- textsize = 0.039
- textoffset = "0.315, 0.05"
- textpickpoint = "0, 0"
- textalign = "right"
- correctaspect = false
- textcorrectaspect = false
- descriptionpickpoint = "0, 0"
- descriptionoffset = "0.5, 1"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </UnderAttackHealthBar>
- </OverlayGroup>
-</Template>
Modified: code/branches/presentation2012merge/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/branches/presentation2012merge/src/modules/overlays/OverlaysPrereqs.h 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/src/modules/overlays/OverlaysPrereqs.h 2012-07-22 20:21:36 UTC (rev 9334)
@@ -94,7 +94,6 @@
class LastManStandingInfos;
class PauseNotice;
class TeamBaseMatchScore;
- class UnderAttackHealthBar;
// stats
class CreateLines;
Modified: code/branches/presentation2012merge/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/presentation2012merge/src/modules/overlays/hud/CMakeLists.txt 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/src/modules/overlays/hud/CMakeLists.txt 2012-07-22 20:21:36 UTC (rev 9334)
@@ -11,7 +11,6 @@
AnnounceMessage.cc
KillMessage.cc
DeathMessage.cc
- UnderAttackHealthBar.cc
TeamBaseMatchScore.cc
GametypeStaticMessage.cc
GametypeFadingMessage.cc
Deleted: code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.cc 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.cc 2012-07-22 20:21:36 UTC (rev 9334)
@@ -1,108 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "UnderAttackHealthBar.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "infos/PlayerInfo.h"
-#include "gametypes/UnderAttack.h"
-#include "worldentities/pawns/Destroyer.h"
-#include "overlays/OverlayGroup.h"
-
-namespace orxonox
-{
- CreateFactory(UnderAttackHealthBar);
-
- UnderAttackHealthBar::UnderAttackHealthBar(BaseObject* creator) : HUDHealthBar(creator)
- {
- RegisterObject(UnderAttackHealthBar);
-
- this->owner_ = 0;
-
- this->text_ = new OverlayText(this);
- this->text_->setFont("Monofur");
- this->text_->setTextSize(0.04f);
- this->text_->setAlignmentString("center");
- this->text_->setColour(ColourValue::White);
- this->text_->setPickPoint(Vector2(0.5, 0));
-
- this->inittimer_.setTimer(0.0f, false, createExecutor(createFunctor(&UnderAttackHealthBar::init, this)));
- }
-
- UnderAttackHealthBar::~UnderAttackHealthBar()
- {
- if (this->isInitialized())
- {
- this->text_->destroy();
- this->text_ = 0;
- }
- }
-
- void UnderAttackHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(UnderAttackHealthBar, XMLPort, xmlelement, mode);
-
- XMLPortParam(UnderAttackHealthBar, "descriptionpickpoint", setDescriptionPickPoint, getDescriptionPickPoint, xmlelement, mode);
- XMLPortParam(UnderAttackHealthBar, "descriptionoffset", setDescriptionOffset, getDescriptionOffset, xmlelement, mode);
- }
-
- void UnderAttackHealthBar::changedOwner()
- {
- SUPER(UnderAttackHealthBar, changedOwner);
-
- PlayerInfo* player = orxonox_cast<PlayerInfo*>(this->getOwner());
- if (player)
- {
- this->owner_ = player;
-
- UnderAttack* ua = orxonox_cast<UnderAttack*>(player->getGametype().get());
- if (ua)
- {
- this->setOwner(ua->getDestroyer());
-
- if (ua->getTeam(player) == 0)
- this->text_->setCaption("Attack the Transporter!");
- else
- this->text_->setCaption("Defend the Transporter!");
- }
- }
- }
-
- void UnderAttackHealthBar::changedOverlayGroup()
- {
- SUPER(UnderAttackHealthBar, changedOverlayGroup);
-
- this->getOverlayGroup()->addElement(this->text_.get());
- }
-
- void UnderAttackHealthBar::init()
- {
- this->setOwner(this->owner_);
- }
-}
Deleted: code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.h 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/src/modules/overlays/hud/UnderAttackHealthBar.h 2012-07-22 20:21:36 UTC (rev 9334)
@@ -1,68 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _UnderAttackHealthBar_H__
-#define _UnderAttackHealthBar_H__
-
-#include "overlays/OverlaysPrereqs.h"
-
-#include "util/Math.h"
-#include "tools/Timer.h"
-#include "HUDHealthBar.h"
-
-namespace orxonox
-{
- class _OverlaysExport UnderAttackHealthBar : public HUDHealthBar
- {
- public:
- UnderAttackHealthBar(BaseObject* creator);
- virtual ~UnderAttackHealthBar();
-
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- virtual void changedOwner();
- virtual void changedOverlayGroup();
-
- inline void setDescriptionPickPoint(const Vector2& pickpoint)
- { this->text_->setPickPoint(pickpoint); }
- inline Vector2 getDescriptionPickPoint() const
- { return this->text_->getPickPoint(); }
-
- inline void setDescriptionOffset(const Vector2& position)
- { this->text_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
- inline Vector2 getDescriptionOffset() const
- { return (this->text_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
-
- private:
- void init();
-
- PlayerInfo* owner_;
- SmartPtr<OverlayText> text_;
- Timer inittimer_;
- };
-}
-#endif /* _UnderAttackHealthBar_H__ */
Modified: code/branches/presentation2012merge/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/gametypes/UnderAttack.cc 2012-07-22 20:04:10 UTC (rev 9333)
+++ code/branches/presentation2012merge/src/orxonox/gametypes/UnderAttack.cc 2012-07-22 20:21:36 UTC (rev 9334)
@@ -48,8 +48,6 @@
this->destroyer_.setCallback(createFunctor(&UnderAttack::killedDestroyer, this));
this->gameEnded_ = false;
- //this->setHUDTemplate("UnderAttackHUD");
- //This HUD is in conflict with the HUDEnemyHealthBar
this->setConfigValues();
this->timesequence_ = static_cast<int>(this->gameTime_);
}
More information about the Orxonox-commit
mailing list