diff options
Diffstat (limited to 'engines/xeen/items.cpp')
-rw-r--r-- | engines/xeen/items.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/xeen/items.cpp b/engines/xeen/items.cpp index e9425f7ee9..f7dfeccbb1 100644 --- a/engines/xeen/items.cpp +++ b/engines/xeen/items.cpp @@ -21,6 +21,7 @@ */ #include "xeen/items.h" +#include "xeen/resources.h" namespace Xeen { @@ -36,6 +37,23 @@ void XeenItem::synchronize(Common::Serializer &s) { s.syncAsByte(_equipped); } +int XeenItem::getElementalCategory() const { + int idx; + for (idx = 0; ELEMENTAL_CATEGORIES[idx] < _material; ++idx) + ; + + return idx; +} + +int XeenItem::getAttributeCategory() const { + int m = _material - 59; + int idx; + for (idx = 0; ATTRIBUTE_CATEGORIES[idx] < m; ++idx) + ; + + return idx; +} + Treasure::Treasure() { _hasItems = false; } |