diff options
author | Joseph-Eugene Winzer | 2018-04-14 11:40:08 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-04-15 18:47:33 +0100 |
commit | d4592b6077aebaf1630b05d1904723c6544d4537 (patch) | |
tree | a5aea1e248fec56f337a19d789de46d1686cbffd /engines/supernova/state.h | |
parent | 94ebc96705314eb1e0846fa605943aec20afad72 (diff) | |
download | scummvm-rg350-d4592b6077aebaf1630b05d1904723c6544d4537.tar.gz scummvm-rg350-d4592b6077aebaf1630b05d1904723c6544d4537.tar.bz2 scummvm-rg350-d4592b6077aebaf1630b05d1904723c6544d4537.zip |
SUPERNOVA: Removes global nullObject
Before nullObject was a static member of Object class and now a member
of GameManager. Also the Inventory constructor was extended for taking a
pointer to the nullObject that Invetory::get() returns if no Object was
found.
Diffstat (limited to 'engines/supernova/state.h')
-rw-r--r-- | engines/supernova/state.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/supernova/state.h b/engines/supernova/state.h index e3de0eb94b..1b885ccbdd 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -65,8 +65,9 @@ struct GameState { class Inventory { public: - Inventory(int &inventoryScroll) + Inventory(Object *nullObject, int &inventoryScroll) : _numObjects(0) + , _nullObject(nullObject) , _inventoryScroll(inventoryScroll) {} @@ -79,6 +80,7 @@ public: private: Object *_inventory[kMaxCarry]; + Object *_nullObject; int &_inventoryScroll; int _numObjects; }; @@ -154,6 +156,7 @@ public: bool _animationEnabled; byte _roomBrightness; Action _inputVerb; + Object _nullObject; Object *_currentInputObject; Object *_inputObject[2]; bool _waitEvent; @@ -175,6 +178,8 @@ public: byte _rowsStart[6]; void takeObject(Object &obj); + void setObjectNull(Object *&obj); + bool isNullObject(Object *obj); void initState(); void initRooms(); |