diff options
-rw-r--r-- | engines/supernova/state.cpp | 4 | ||||
-rw-r--r-- | engines/supernova/state.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 7548f920ac..0e99885e2e 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -53,6 +53,10 @@ void Inventory::remove(Object &obj) { } } +void Inventory::clear() { + _numObjects = 0; +} + Object *Inventory::get(int index) const { if (index < _numObjects) return _inventory[index]; diff --git a/engines/supernova/state.h b/engines/supernova/state.h index a9741d77d7..85c81c34ca 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -64,6 +64,7 @@ public: void add(Object &obj); void remove(Object &obj); + void clear(); Object *get(int index) const; Object *get(ObjectID id) const; int getSize() const { return _numObjects; } |