From d8d9232a67a03548b827bdb0515fe7a620a488f8 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 15 Aug 2010 21:28:10 -0600 Subject: Move more to the event system Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram --- src/variabledata.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/variabledata.h') diff --git a/src/variabledata.h b/src/variabledata.h index f73ebab2..19e09795 100644 --- a/src/variabledata.h +++ b/src/variabledata.h @@ -23,6 +23,9 @@ #include +class ActorSprite; +class Item; + namespace Mana { @@ -35,7 +38,9 @@ class VariableData DATA_INT, DATA_STRING, DATA_FLOAT, - DATA_BOOL + DATA_BOOL, + DATA_ITEM, + DATA_ACTOR }; virtual ~VariableData() {}; @@ -95,6 +100,32 @@ private: bool mData; }; +class ItemData : public VariableData +{ +public: + ItemData(Item *value) { mData = value; } + + Item *getData() const { return mData; } + + int getType() const { return DATA_ITEM; } + +private: + Item *mData; +}; + +class ActorData : public VariableData +{ +public: + ActorData(ActorSprite *value) { mData = value; } + + ActorSprite *getData() const { return mData; } + + int getType() const { return DATA_ACTOR; } + +private: + ActorSprite *mData; +}; + } // namespace Mana #endif -- cgit v1.2.3-70-g09d2