aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script_hof.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/script_hof.cpp')
-rw-r--r--engines/kyra/script_hof.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index f30f5787e7..d57bb7efc5 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -410,7 +410,7 @@ int KyraEngine_HoF::o2_countItemsInScene(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_countItemsInScene(%p) (%d)", (const void *)script, stackPos(0));
int count = 0;
for (int i = 0; i < 30; ++i) {
- if (_itemList[i].sceneId == stackPos(0) && _itemList[i].id != 0xFFFF)
+ if (_itemList[i].sceneId == stackPos(0) && _itemList[i].id != kItemNone)
++count;
}
return count;
@@ -1039,7 +1039,7 @@ int KyraEngine_HoF::o2_setColorCodeValue(EMCState *script) {
int KyraEngine_HoF::o2_countItemInstances(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_countItemInstances(%p) (%d)", (const void *)script, stackPos(0));
- uint16 item = stackPos(0);
+ Item item = stackPos(0);
int count = 0;
for (int i = 0; i < 20; ++i) {
@@ -1047,7 +1047,7 @@ int KyraEngine_HoF::o2_countItemInstances(EMCState *script) {
++count;
}
- if (_itemInHand == int16(item))
+ if (_itemInHand == item)
++count;
for (int i = 0; i < 30; ++i) {
@@ -1075,7 +1075,7 @@ int KyraEngine_HoF::o2_removeItemFromScene(EMCState *script) {
const uint16 item = stackPos(1);
for (int i = 0; i < 30; ++i) {
if (_itemList[i].sceneId == scene && _itemList[i].id == item)
- _itemList[i].id = 0xFFFF;
+ _itemList[i].id = kItemNone;
}
return 0;
}