aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/inventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/teenagent/inventory.h')
-rw-r--r--engines/teenagent/inventory.h115
1 files changed, 109 insertions, 6 deletions
diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h
index 61e5364542..d487848c2c 100644
--- a/engines/teenagent/inventory.h
+++ b/engines/teenagent/inventory.h
@@ -33,9 +33,112 @@ namespace TeenAgent {
struct InventoryObject;
class TeenAgentEngine;
+// Maximum number of items found within game
+const uint8 kNumInventoryItems = 92;
+
+// Inventory Item Ids
+enum {
+ kInvItemNoItem = 0, // No item i.e. empty inventory slot
+ kInvItemFeather = 1,
+ kInvItemShotgun = 2,
+ kInvItemToolboxFull = 3, // Contains Car Jack and Spanner
+ kInvItemToolboxHalfEmpty = 4, // Contains Spanner
+ kInvItemSpanner = 5,
+ kInvItemComb = 6,
+ kInvItemFan = 7,
+ kInvItemBrokenPaddle = 8,
+ kInvItemPaddle = 9, // Repaired - BrokenPaddle combined with Branch (with Glue)
+ kInvItemFirstFlower = 10, // Smells nice
+ kInvItemSecondFlower = 11, // Really beautiful
+ kInvItemFeatherDusterClean = 12,
+ kInvItemChainsaw = 13, // Unfueled
+ kInvItemDrunkenChainsaw = 14, // Fueled with Whisky (Chainsaw combined with Whiskey)
+ kInvItemBranch = 15,
+ kInvItemWhisky = 16,
+ kInvItemNeedle = 17,
+ kInvItemWrapper = 18,
+ kInvItemChocCandy = 19,
+ kInvItemPotato = 20,
+ kInvItemRakeBroken = 21,
+ kInvItemHeartShapedCandy = 22,
+ kInvItemWrappedCandy = 23, // HeartShapedCandy combined with Wrapper
+ kInvItemRibbon = 24,
+ kInvItemRakeFixed = 25, // Rake combined with Ribbon
+ kInvItemNut = 26,
+ kInvItemPlasticApple = 27,
+ kInvItemCone = 28,
+ kInvItemSuperGlue = 29,
+ kInvItemConeAndNeedle = 30, // Cone combined with Needle
+ kInvItemConeAndFeather = 31, // Cone combined with Feather
+ kInvItemDart = 32, // Needle combined with ConeAndFeather or Feather combined with ConeAndNeedle
+ kInvItemFeatherDusterDirty = 33,
+ kInvItemPaintedPotato = 34, // Potato combined with Dirty Feather Duster (Soot)
+ kInvItemCarJack = 35,
+ kInvItemBone = 36,
+ kInvItemShovelAct2 = 37,
+ kInvItemRopeAct2 = 38,
+ kInvItemMask = 39,
+ kInvItemFins = 40,
+ kInvItemDiveEquipment = 41, // Mask combined with Fins
+ kInvItemAnchor = 42,
+ kInvItemGrapplingHook = 43,
+ kInvItemSickleBlunt = 44,
+ kInvItemCheese = 45,
+ kInvItemSickleSharp = 46,
+ kInvItemHandkerchief = 47,
+ kInvItemMouse = 48,
+ kInvItemRock = 49,
+ kInvItemNugget = 50,
+ kInvItemBanknote = 51,
+ kInvItemDictaphoneNoBatteries = 52,
+ kInvItemPolaroidCamera = 53,
+ kInvItemVideoTape = 54,
+ kInvItemSheetOfPaper = 55,
+ kInvItemCognac = 56,
+ kInvItemRemoteControl = 57,
+ kInvItemIceTongs = 58,
+ kInvItemCork = 59,
+ kInvItemWrappedCork = 60, // Cork combined with Sheet Of Paper
+ kInvItemPhoto = 61,
+ kInvItemChilliWithLabel = 62,
+ kInvItemPastryRoller = 63,
+ kInvItemFakeChilli = 64,
+ kInvItemLabel = 65,
+ kInvItemBatteries = 66,
+ kInvItemDictaphoneWithBatteries = 67, // Dictaphone combined with Batteries
+ kInvItemBurningPaper = 68,
+ kInvItemMeat = 69,
+ kInvItemPlasticBag = 70,
+ kInvItemSocks = 71,
+ kInvItemTimePills = 72,
+ kInvItemHandle = 73,
+ kInvItemChilliNoLabel = 74,
+ kInvItemPass = 75,
+ kInvItemBulb = 76,
+ kInvItemJailKey = 77,
+ kInvItemDelicatePlant = 78,
+ kInvItemSwissArmyKnife = 79,
+ kInvItemSpring = 80,
+ kInvItemShovelAct1 = 81,
+ kInvItemKaleidoscope = 82,
+ kInvItemSoldierNews = 83,
+ kInvItemGrenade = 84,
+ kInvItemMug = 85, // Empty
+ kInvItemMugOfMud = 86, // Full of mud
+ kInvItemCrumbs = 87,
+ kInvItemRopeAct1 = 88,
+ kInvItemRopeAndGrenade = 89, // Rope combined with Grenade
+ kInvItemMedicine = 90,
+ kInvItemDruggedFood = 91, // Crumbs combined with Medicine
+ kInvItemBird = 92
+};
+
+// Maximum number of inventory items held by Ego (Mark)
+const uint8 kInventorySize = 24;
+
class Inventory {
public:
- Inventory(TeenAgentEngine *engine);
+ Inventory(TeenAgentEngine *vm);
~Inventory();
void render(Graphics::Surface *surface, int delta);
@@ -55,10 +158,10 @@ public:
void resetSelectedObject() { _selectedObj = NULL; }
private:
- TeenAgentEngine *_engine;
+ TeenAgentEngine *_vm;
Surface _background;
byte *_items;
- uint _offset[93];
+ uint _offset[kNumInventoryItems+1];
Common::Array<InventoryObject> _objects;
byte *_inventory;
@@ -71,12 +174,12 @@ private:
Item() : _hovered(false) {}
void free();
- void load(Inventory *inventory, uint item_id);
+ void load(Inventory *inventory, uint itemId);
void backgroundEffect(Graphics::Surface *s);
- void render(Inventory *inventory, uint item_id, Graphics::Surface *surface, int delta);
+ void render(Inventory *inventory, uint itemId, Graphics::Surface *surface, int delta);
};
- Item _graphics[24];
+ Item _graphics[kInventorySize];
bool _active;
Common::Point _mouse;