[Orxonox-commit 531] r3079 - in trunk/src/orxonox: . objects/pickup objects/pickup/items
landauf at orxonox.net
landauf at orxonox.net
Tue May 26 02:28:24 CEST 2009
Author: landauf
Date: 2009-05-26 02:28:24 +0200 (Tue, 26 May 2009)
New Revision: 3079
Modified:
trunk/src/orxonox/OrxonoxPrereqs.h
trunk/src/orxonox/objects/pickup/DroppedItem.cc
trunk/src/orxonox/objects/pickup/DroppedItem.h
trunk/src/orxonox/objects/pickup/ModifierPickup.cc
trunk/src/orxonox/objects/pickup/PickupCollection.cc
trunk/src/orxonox/objects/pickup/PickupCollection.h
trunk/src/orxonox/objects/pickup/PickupInventory.cc
trunk/src/orxonox/objects/pickup/PickupInventory.h
trunk/src/orxonox/objects/pickup/PickupSpawner.cc
trunk/src/orxonox/objects/pickup/PickupSpawner.h
trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
trunk/src/orxonox/objects/pickup/items/HealthUsable.cc
trunk/src/orxonox/objects/pickup/items/HealthUsable.h
trunk/src/orxonox/objects/pickup/items/Jump.cc
trunk/src/orxonox/objects/pickup/items/Jump.h
Log:
Added forward declarations to OrxonoxPrereqs.h.
Modified: trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- trunk/src/orxonox/OrxonoxPrereqs.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/OrxonoxPrereqs.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -118,6 +118,7 @@
class MovableEntity;
class Sublevel;
class ForceField;
+ class Attacher;
class Model;
class Billboard;
@@ -145,6 +146,20 @@
class TeamBaseMatchBase;
class Destroyer;
+ class BaseItem;
+ class DroppedItem;
+ class EquipmentItem;
+ class ModifierPickup;
+ class PassiveItem;
+ class PickupCollection;
+ class PickupInventory;
+ class PickupSpawner;
+ class UsableItem;
+
+ class Jump;
+ class HealthUsable;
+ class PassiveItem;
+
class Item;
class Engine;
class MultiStateEngine;
Modified: trunk/src/orxonox/objects/pickup/DroppedItem.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/DroppedItem.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/DroppedItem.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -1,3 +1,31 @@
+/*
+ * 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:
+ * Daniel 'Huty' Haggenmueller
+ * Co-authors:
+ * ...
+ *
+ */
+
#include "DroppedItem.h"
#include "BaseItem.h"
@@ -6,7 +34,6 @@
#include "objects/worldentities/Billboard.h"
#include "core/CoreIncludes.h"
-#include "core/Core.h"
namespace orxonox
{
@@ -67,7 +94,7 @@
DroppedItem* drop = new DroppedItem(item);
Model* model = new Model(item);
Billboard* billboard = new Billboard(item);
-
+
model->setMeshSource("sphere.mesh");
model->setScale(3.0f);
Modified: trunk/src/orxonox/objects/pickup/DroppedItem.h
===================================================================
--- trunk/src/orxonox/objects/pickup/DroppedItem.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/DroppedItem.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -42,9 +42,6 @@
namespace orxonox
{
- class BaseItem;
- class Pawn;
-
class _OrxonoxExport DroppedItem : public StaticEntity, public Tickable
{
public:
@@ -65,7 +62,7 @@
inline void setTriggerDistance(float distance)
{ this->triggerDistance_ = distance; }
- inline BaseItem* getItem() const
+ inline BaseItem* getItem() const
{ return this->item_; }
inline void setItem(BaseItem* item)
{ this->item_ = item; }
Modified: trunk/src/orxonox/objects/pickup/ModifierPickup.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/ModifierPickup.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/ModifierPickup.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -36,12 +36,9 @@
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
-#include "core/Core.h"
#include "objects/worldentities/pawns/Pawn.h"
-#include "util/Debug.h"
-
namespace orxonox
{
CreateFactory(ModifierPickup);
@@ -109,7 +106,7 @@
executor->setDefaultValues(pawn);
this->timer_.setTimer(this->duration_, false, this, executor);
}
-
+
return true;
}
return false;
@@ -139,7 +136,7 @@
{
pawn->getPickups().removeMultiplicativeModifier((*it).first, (*it).second);
}
-
+
if (this->timer_.getRemainingTime() > 0.0f)
this->timer_.stopTimer();
Modified: trunk/src/orxonox/objects/pickup/PickupCollection.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupCollection.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupCollection.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -40,8 +40,6 @@
#include "core/CoreIncludes.h"
-#include "objects/worldentities/pawns/Pawn.h"
-
namespace orxonox
{
typedef std::pair<std::multimap<std::string, BaseItem*>::iterator, std::multimap<std::string, BaseItem*>::iterator> item_range;
Modified: trunk/src/orxonox/objects/pickup/PickupCollection.h
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupCollection.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupCollection.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -40,18 +40,12 @@
#include <deque>
#include <string>
-#include "util/Math.h"
+#include "util/Math.h"
#include "ModifierType.h"
namespace orxonox
{
- class BaseItem;
- class EquipmentItem;
- class PassiveItem;
- class UsableItem;
- class Pawn;
-
/**
@brief PickupCollection for organising items.
@author Daniel 'Huty' Haggenmueller
@@ -96,7 +90,7 @@
@brief Get the owner of the PickupCollection.
@return Returns the pawn which owns the PickupCollection.
*/
- inline Pawn* getOwner() const
+ inline Pawn* getOwner() const
{ return this->owner_; }
/**
@brief Set the owner of the PickupCollection.
Modified: trunk/src/orxonox/objects/pickup/PickupInventory.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupInventory.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupInventory.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -32,7 +32,6 @@
#include "PassiveItem.h"
#include "UsableItem.h"
-#include "core/CoreIncludes.h"
#include "core/ConsoleCommand.h"
#include "core/input/InputManager.h"
@@ -49,8 +48,7 @@
namespace orxonox
{
- orxonox::ConsoleCommand& function_PickupInventory_ToggleInventory_0 =
- orxonox::CommandExecutor::addConsoleCommandShortcut(orxonox::createConsoleCommand(orxonox::createFunctor(&PickupInventory::toggleInventory), "toggleInventory"), true);
+ SetConsoleCommandShortcut(PickupInventory, toggleInventory);
PickupInventory* PickupInventory::pickupInventory_s = NULL;
PickupInventory* PickupInventory::getSingleton()
@@ -82,8 +80,8 @@
{
}
-
+
void PickupInventory::toggleInventory()
{
if(PickupInventory::getSingleton()->isVisible()) {
@@ -302,7 +300,7 @@
}
void PickupInventory::createItemWindows(CEGUI::WindowManager* winMgr, const std::string& id, int x, int y)
- {
+ {
if(!winMgr) { return; }
CEGUI::Window* frame = winMgr->createWindow("TaharezLook/StaticImage", "orxonox/Inventory/Frame/" + id);
Modified: trunk/src/orxonox/objects/pickup/PickupInventory.h
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupInventory.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupInventory.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -44,12 +44,10 @@
namespace orxonox
{
// tolua_end
- class _OrxonoxExport BaseItem;
-
/**
@brief Static class for the inventory GUI window.
@author Daniel 'Huty' Haggenmueller
- */
+ */
// tolua_begin
class _OrxonoxExport PickupInventory
{
Modified: trunk/src/orxonox/objects/pickup/PickupSpawner.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupSpawner.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupSpawner.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -41,7 +41,6 @@
#include "core/Template.h"
#include "objects/worldentities/pawns/Pawn.h"
-#include "objects/worldentities/triggers/DistanceTrigger.h"
namespace orxonox
{
Modified: trunk/src/orxonox/objects/pickup/PickupSpawner.h
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupSpawner.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/PickupSpawner.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -36,15 +36,12 @@
#include "OrxonoxPrereqs.h"
-#include "core/BaseObject.h"
#include "objects/Tickable.h"
#include "objects/worldentities/StaticEntity.h"
#include "tools/Timer.h"
namespace orxonox
{
- class BaseItem;
-
/**
@brief PickupSpawner.
@author Daniel 'Huty' Haggenmueller
Modified: trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -37,7 +37,6 @@
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
-#include "core/Core.h"
namespace orxonox
{
Modified: trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthImmediate.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/HealthImmediate.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -36,12 +36,10 @@
#include "OrxonoxPrereqs.h"
-#include "../PassiveItem.h"
+#include "objects/pickup/PassiveItem.h"
namespace orxonox
{
- class Pawn;
-
/**
@brief Health-item, immediatly recovers health when picked up.
*/
Modified: trunk/src/orxonox/objects/pickup/items/HealthUsable.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthUsable.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/HealthUsable.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -32,13 +32,12 @@
*/
#include "HealthUsable.h"
-#include "../DroppedItem.h"
+#include "objects/pickup/DroppedItem.h"
#include "objects/worldentities/pawns/Pawn.h"
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
-#include "core/Core.h"
namespace orxonox
{
Modified: trunk/src/orxonox/objects/pickup/items/HealthUsable.h
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthUsable.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/HealthUsable.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -36,13 +36,11 @@
#include "OrxonoxPrereqs.h"
-#include "../UsableItem.h"
+#include "objects/pickup/UsableItem.h"
#include "util/Math.h"
namespace orxonox
{
- class Pawn;
-
/**
@brief Health-item, enables player recover health when used.
*/
Modified: trunk/src/orxonox/objects/pickup/items/Jump.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/items/Jump.cc 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/Jump.cc 2009-05-26 00:28:24 UTC (rev 3079)
@@ -38,7 +38,6 @@
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
-#include "core/Core.h"
namespace orxonox
{
Modified: trunk/src/orxonox/objects/pickup/items/Jump.h
===================================================================
--- trunk/src/orxonox/objects/pickup/items/Jump.h 2009-05-25 21:49:42 UTC (rev 3078)
+++ trunk/src/orxonox/objects/pickup/items/Jump.h 2009-05-26 00:28:24 UTC (rev 3079)
@@ -43,8 +43,6 @@
namespace orxonox
{
- class Pawn;
-
/**
@brief Jump-item, enables player to "jump" into a direction.
*/
More information about the Orxonox-commit
mailing list