diff options
author | Joseph-Eugene Winzer | 2017-08-04 11:16:54 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 01:01:18 +0000 |
commit | 8ce533bb1b4ec744cd97213f14abde9d4e972cff (patch) | |
tree | f8c12ae43f54d9731a194cb5bb1c714132c7a8f4 /engines/supernova | |
parent | 99d7e7c1f6e69afc5cf89b0ae8edacf687bc12b2 (diff) | |
download | scummvm-rg350-8ce533bb1b4ec744cd97213f14abde9d4e972cff.tar.gz scummvm-rg350-8ce533bb1b4ec744cd97213f14abde9d4e972cff.tar.bz2 scummvm-rg350-8ce533bb1b4ec744cd97213f14abde9d4e972cff.zip |
SUPERNOVA: Adds clear() to Inventory Class
Diffstat (limited to 'engines/supernova')
-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; } |