aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/state.h
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-12-27 01:50:13 +0100
committerThierry Crozat2018-01-23 02:15:44 +0000
commit3ae3ee6978f91beed9d6bb38f441db25103e28b7 (patch)
treee668e3b148e572a7e82dafe332cdbd0e9bda2ef4 /engines/supernova/state.h
parent586162760259fb226dfc8f3a3175f0ac290407b8 (diff)
downloadscummvm-rg350-3ae3ee6978f91beed9d6bb38f441db25103e28b7.tar.gz
scummvm-rg350-3ae3ee6978f91beed9d6bb38f441db25103e28b7.tar.bz2
scummvm-rg350-3ae3ee6978f91beed9d6bb38f441db25103e28b7.zip
SUPERNOVA: Fixes inventory scrolling
Correctly moves inventory view when items are added/removed/cleared
Diffstat (limited to 'engines/supernova/state.h')
-rw-r--r--engines/supernova/state.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index 568d4cf22e..e47c906aa5 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -63,7 +63,10 @@ struct GameState {
class Inventory {
public:
- Inventory();
+ Inventory(int &inventoryScroll)
+ : _numObjects(0)
+ , _inventoryScroll(inventoryScroll)
+ {}
void add(Object &obj);
void remove(Object &obj);
@@ -74,6 +77,7 @@ public:
private:
Object *_inventory[kMaxCarry];
+ int &_inventoryScroll;
int _numObjects;
};