From 3653613443d8def9ae7f552eb799d1f039fd8097 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 22 Oct 2010 02:09:16 +0000 Subject: KYRA: Add a datatype for the item ids and convert Kyra1 to use it. svn-id: r53696 --- engines/kyra/kyra_lok.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'engines/kyra/kyra_lok.h') diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 50f36d7b71..ddf21c7cc2 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -30,6 +30,7 @@ #include "kyra/script.h" #include "kyra/screen_lok.h" #include "kyra/gui_lok.h" +#include "kyra/item.h" namespace Kyra { @@ -46,7 +47,7 @@ struct Character { uint8 height; uint8 facing; uint16 currentAnimFrame; - uint8 inventoryItems[10]; + int8 inventoryItems[10]; int16 x1, y1, x2, y2; }; @@ -62,13 +63,13 @@ struct Room { uint16 eastExit; uint16 southExit; uint16 westExit; - uint8 itemsTable[12]; + int8 itemsTable[12]; uint16 itemsXPos[12]; uint8 itemsYPos[12]; uint8 needInit[12]; }; -struct Item { +struct ItemDescription { uint8 unk1; uint8 height; uint8 unk2; @@ -290,9 +291,9 @@ protected: // -> mouse item void setHandItem(uint16 item); void removeHandItem(); - void setMouseItem(uint16 item); + void setMouseItem(Item item); - int getItemListIndex(uint16 item); + int getItemListIndex(Item item); // -> graphics effects void wipeDownMouseItem(int xpos, int ypos); @@ -402,7 +403,7 @@ protected: bool _menuDirectlyToLoad; uint8 *_itemBkgBackUp[2]; uint8 *_shapes[373]; - int8 _itemInHand; + Item _itemInHand; bool _changedScene; int _unkScreenVar1, _unkScreenVar2, _unkScreenVar3; int _beadStateVar; @@ -455,7 +456,7 @@ protected: int8 *_sceneAnimTable[50]; - Item _itemTable[145]; + ItemDescription _itemTable[145]; int _lastProcessedItem; int _lastProcessedItemHeight; -- cgit v1.2.3