aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-22 02:11:50 +0000
committerJohannes Schickel2010-10-22 02:11:50 +0000
commitb816a81c028730c586e29045ac24e11d49e2ca0f (patch)
treedb681da4328a59abe7da635f49be49cc6f4df30f /engines/kyra
parent5ff20cb12d26b80e0e23a5dab734412d24fa0289 (diff)
downloadscummvm-rg350-b816a81c028730c586e29045ac24e11d49e2ca0f.tar.gz
scummvm-rg350-b816a81c028730c586e29045ac24e11d49e2ca0f.tar.bz2
scummvm-rg350-b816a81c028730c586e29045ac24e11d49e2ca0f.zip
KYRA: More cleanup.
svn-id: r53699
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/items_hof.cpp4
-rw-r--r--engines/kyra/items_lok.cpp4
-rw-r--r--engines/kyra/items_lol.cpp2
-rw-r--r--engines/kyra/items_mr.cpp4
-rw-r--r--engines/kyra/items_v2.cpp4
-rw-r--r--engines/kyra/kyra_hof.h2
-rw-r--r--engines/kyra/kyra_lok.h2
-rw-r--r--engines/kyra/kyra_mr.h2
-rw-r--r--engines/kyra/kyra_v1.h3
-rw-r--r--engines/kyra/kyra_v2.h4
-rw-r--r--engines/kyra/lol.h2
11 files changed, 17 insertions, 16 deletions
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index 2ae784b0e1..6a78a77c23 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -413,12 +413,12 @@ bool KyraEngine_HoF::itemIsFlask(Item item) {
return false;
}
-void KyraEngine_HoF::setMouseCursor(uint16 item) {
+void KyraEngine_HoF::setMouseCursor(Item item) {
int shape = 0;
int hotX = 1;
int hotY = 1;
- if (item != 0xFFFF) {
+ if (item != kItemNone) {
hotX = 8;
hotY = 15;
shape = item+64;
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index b1f2232b26..322314e3ad 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -173,10 +173,10 @@ void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) {
}
}
-void KyraEngine_LoK::setHandItem(uint16 item) {
+void KyraEngine_LoK::setHandItem(Item item) {
_screen->hideMouse();
setMouseItem(item);
- _itemInHand = (Item)item;
+ _itemInHand = item;
_screen->showMouse();
}
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index 5b566d51db..52c75f8b5e 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -270,7 +270,7 @@ void LoLEngine::runItemScript(int charNum, int item, int flags, int next, int re
}
}
-void LoLEngine::setHandItem(uint16 itemIndex) {
+void LoLEngine::setHandItem(Item itemIndex) {
if (itemIndex && _itemProperties[_itemsInPlay[itemIndex].itemPropertyIndex].flags & 0x80) {
runItemScript(-1, itemIndex, 0x400, 0, 0);
if (_itemsInPlay[itemIndex].shpCurFrame_flg & 0x8000)
diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp
index 144982335d..2bc268ace3 100644
--- a/engines/kyra/items_mr.cpp
+++ b/engines/kyra/items_mr.cpp
@@ -76,12 +76,12 @@ int KyraEngine_MR::checkItemCollision(int x, int y) {
return itemIndex;
}
-void KyraEngine_MR::setMouseCursor(uint16 item) {
+void KyraEngine_MR::setMouseCursor(Item item) {
int shape = 0;
int hotX = 1;
int hotY = 1;
- if (item != 0xFFFF) {
+ if (item != kItemNone) {
hotX = 12;
hotY = 19;
shape = item+248;
diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp
index 92308d1f07..90b6194f0d 100644
--- a/engines/kyra/items_v2.cpp
+++ b/engines/kyra/items_v2.cpp
@@ -84,11 +84,11 @@ void KyraEngine_v2::resetItem(int index) {
_itemList[index].y = 0;
}
-void KyraEngine_v2::setHandItem(uint16 item) {
+void KyraEngine_v2::setHandItem(Item item) {
Screen *scr = screen();
scr->hideMouse();
- if (item == 0xFFFF) {
+ if (item == kItemNone) {
removeHandItem();
} else {
setMouseCursor(item);
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 02ac0a0fff..df7cd5eff4 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -443,7 +443,7 @@ protected:
bool lineIsPassable(int x, int y);
// item
- void setMouseCursor(uint16 item);
+ void setMouseCursor(Item item);
uint8 _itemHtDat[176];
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index 4b075ee0f3..6fa862b1d6 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -282,7 +282,7 @@ protected:
void placeItemInGenericMapScene(int item, int index);
// -> mouse item
- void setHandItem(uint16 item);
+ void setHandItem(Item item);
void removeHandItem();
void setMouseItem(Item item);
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index 0bf4bcc253..460bbdbeb1 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -315,7 +315,7 @@ private:
// -> hand item
void setItemMouseCursor();
- void setMouseCursor(uint16 item);
+ void setMouseCursor(Item item);
// shapes
void initMouseShapes();
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index b4b1e720c9..2a6541a466 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -37,6 +37,7 @@
#include "sound/mixer.h"
#include "kyra/script.h"
+#include "kyra/item.h"
namespace Common {
class SeekableReadStream;
@@ -339,7 +340,7 @@ protected:
// items
int _mouseState;
- virtual void setHandItem(uint16 item) = 0;
+ virtual void setHandItem(Item item) = 0;
virtual void removeHandItem() = 0;
// game flags
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index d1a81fd64c..39c9f0875e 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -313,9 +313,9 @@ protected:
void resetItemList();
void resetItem(int index);
- virtual void setMouseCursor(uint16 item) = 0;
+ virtual void setMouseCursor(Item item) = 0;
- void setHandItem(uint16 item);
+ void setHandItem(Item item);
void removeHandItem();
// character
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 57c127a94f..3d8c6b610e 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -1209,7 +1209,7 @@ private:
void deleteItem(int itemIndex);
ItemInPlay *findObject(uint16 index);
void runItemScript(int charNum, int item, int flags, int next, int reg4);
- void setHandItem(uint16 itemIndex);
+ void setHandItem(Item itemIndex);
bool itemEquipped(int charNum, uint16 itemType);
void setItemPosition(int item, uint16 x, uint16 y, int flyingHeight, int b);