X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FItem.h;h=7e757ff245095e8f55e81b8c4f86d5b32595b450;hb=670dd3c61cba875345b6755d41f479cff8d964c4;hp=ffa50e32f116ff09d61c3e0da3d8cb0077970588;hpb=147732d7eaf3c082b9120a7f2b815a4a7886aa97;p=l2e.git diff --git a/src/common/Item.h b/src/common/Item.h index ffa50e3..7e757ff 100644 --- a/src/common/Item.h +++ b/src/common/Item.h @@ -8,22 +8,20 @@ #ifndef COMMON_ITEM_H_ #define COMMON_ITEM_H_ +#include "fwd.h" #include "HeroGroup.h" #include "TargetingMode.h" +#include "../graphics/fwd.h" #include -namespace graphics { - class Animation; - class Sprite; -} - namespace common { -class Ikari; - class Item { +public: + static const int TYPE_ID = 303; + public: Item(); @@ -31,7 +29,7 @@ public: const char *Name() const { return name; } bool IsMostUseful() const { return mostUseful; } - bool IsEquipable() const { return equipable; } + bool IsEquipable() const { return equipability; } bool IsCursed() const { return cursed; } bool IsFruit() const { return fruit; } bool IsScenario() const { return scenario; } @@ -80,6 +78,8 @@ public: bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; } bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; } + static bool Less(const Item &, const Item &); + // temporary setters public: void SetName(const char *n) { name = n; } @@ -89,6 +89,7 @@ public: void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; } static void CreateTypeDescription(); + static void Construct(void *); private: enum Equipable { @@ -130,12 +131,11 @@ private: Uint16 properties; TargetingMode targettingMode; - Uint8 equipability; + int equipability; HeroGroup equipableBy; // TODO: turn these back into bits as soon as fields are implemented in the loader bool mostUseful; - bool equipable; bool cursed; bool fruit; bool scenario;