aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/character.cpp')
-rw-r--r--engines/xeen/character.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 333bad80fe..72d8ed653e 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -37,6 +37,17 @@ void AttributePair::synchronize(Common::Serializer &s) {
/*------------------------------------------------------------------------*/
+int CharacterArray::indexOf(const Character &c) {
+ for (uint idx = 0; idx < size(); ++idx) {
+ if ((*this)[idx] == c)
+ return idx;
+ }
+
+ return -1;
+}
+
+/*------------------------------------------------------------------------*/
+
Character::Character(): _weapons(this), _armor(this), _accessories(this), _misc(this), _items(this) {
clear();
_faceSprites = nullptr;