aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/inventory.h
diff options
context:
space:
mode:
authorwhiterandrek2018-04-07 11:36:09 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitdac8d2a72b427cdecedfe4a951aa6166ce7b3720 (patch)
tree04bcc501b922dffa5d76ac1ae6a3559eddcda950 /engines/pink/objects/inventory.h
parent78c4ed85ab7a84b18c8c7fd2e93c6bf2798acab6 (diff)
downloadscummvm-rg350-dac8d2a72b427cdecedfe4a951aa6166ce7b3720.tar.gz
scummvm-rg350-dac8d2a72b427cdecedfe4a951aa6166ce7b3720.tar.bz2
scummvm-rg350-dac8d2a72b427cdecedfe4a951aa6166ce7b3720.zip
PINK: bugfixes and added basic inventory implementation
Diffstat (limited to 'engines/pink/objects/inventory.h')
-rw-r--r--engines/pink/objects/inventory.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/engines/pink/objects/inventory.h b/engines/pink/objects/inventory.h
index 908f2a8d2f..db67f4e2e3 100644
--- a/engines/pink/objects/inventory.h
+++ b/engines/pink/objects/inventory.h
@@ -25,6 +25,7 @@
#include <common/array.h>
+#include <common/rect.h>
#include "engines/pink/objects/object.h"
namespace Pink {
@@ -45,26 +46,51 @@ private:
};
class LeadActor;
+class Actor;
class InventoryMgr : public Object {
public:
InventoryMgr();
virtual ~InventoryMgr();
virtual void deserialize(Archive &archive);
-
virtual void toConsole();
+ void update();
+ void onClick(Common::Point point);
+
+ bool start(bool playOpening);
+
void setLeadActor(LeadActor *lead);
- InventoryItem* findInventoryItem(Common::String &name);
+ InventoryItem* findInventoryItem(const Common::String &name);
bool isPinkOwnsAnyItems();
void setItemOwner(const Common::String &owner, InventoryItem *item);
private:
- LeadActor *_lead;
+ void close();
+ enum Direction {
+ kLeft = 0,
+ kRight = 1,
+ };
+ void showNextItem(bool direction);
+
+
InventoryItem *_item;
Common::Array<InventoryItem*> _items;
- // other fields. haven't RE them yet
+
+ LeadActor *_lead;
+ Actor *_window;
+ Actor *_itemActor;
+ Actor *_rightArrow;
+ Actor *_leftArrow;
+
+ enum State {
+ kIdle = 0,
+ kOpening = 1,
+ kReady = 2,
+ kClosing = 3,
+ } _state;
+ bool _isClickedOnItem;
};
} // End of namespace Pink