aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-04 13:11:17 +0000
committerJohannes Schickel2008-05-04 13:11:17 +0000
commit7342629944ae7a9c196ba003e4192252b25f58f9 (patch)
treedb79a3d4a81c13bd1baaee67d54e4e5716e96c7b
parentc43cbeae967b779d5869b382b79ce5380d1a81d8 (diff)
downloadscummvm-rg350-7342629944ae7a9c196ba003e4192252b25f58f9.tar.gz
scummvm-rg350-7342629944ae7a9c196ba003e4192252b25f58f9.tar.bz2
scummvm-rg350-7342629944ae7a9c196ba003e4192252b25f58f9.zip
Cleanup.
svn-id: r31860
-rw-r--r--engines/kyra/gui_v2.cpp2
-rw-r--r--engines/kyra/kyra_hof.h6
-rw-r--r--engines/kyra/script_hof.cpp23
3 files changed, 14 insertions, 17 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index aadb35d62d..a063109667 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -529,7 +529,7 @@ int KyraEngine_HoF::findFreeVisibleInventorySlot() {
return -1;
}
-void KyraEngine_HoF::removeItemFromInventory(int slot) {
+void KyraEngine_HoF::removeSlotFromInventory(int slot) {
_mainCharacter.inventory[slot] = 0xFFFF;
if (slot < 10) {
_screen->hideMouse();
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index ec35eee3e4..b8fdaf696a 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -461,7 +461,7 @@ protected:
static const uint16 _itemMagicTable[];
int getInventoryItemSlot(uint16 item);
- void removeItemFromInventory(int slot);
+ void removeSlotFromInventory(int slot);
bool checkInventoryItemExchange(uint16 item, int slot);
void drawInventoryShape(int page, uint16 item, int slot);
void clearInventorySlot(int slot, int page);
@@ -730,7 +730,7 @@ protected:
int o2_addItemToCurScene(EMCState *script);
int o2_checkForItem(EMCState *script);
int o2_loadSoundFile(EMCState *script);
- int o2_removeItemSlotFromInventory(EMCState *script);
+ int o2_removeSlotFromInventory(EMCState *script);
int o2_removeItemFromInventory(EMCState *script);
int o2_countItemInInventory(EMCState *script);
int o2_countItemsInScene(EMCState *script);
@@ -786,7 +786,7 @@ protected:
int o2_getCountDown(EMCState *script);
int o2_pressColorKey(EMCState *script);
int o2_objectChat(EMCState *script);
- int o2_chapterChange(EMCState *script);
+ int o2_changeChapter(EMCState *script);
int o2_getColorCodeFlag1(EMCState *script);
int o2_setColorCodeFlag1(EMCState *script);
int o2_getColorCodeFlag2(EMCState *script);
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index 45d1e6cc87..3f134d4199 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -420,9 +420,9 @@ int KyraEngine_HoF::o2_loadSoundFile(EMCState *script) {
return 0;
}
-int KyraEngine_HoF::o2_removeItemSlotFromInventory(EMCState *script) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_removeItemSlotFromInventory(%p) (%d)", (const void *)script, stackPos(0));
- removeItemFromInventory(stackPos(0));
+int KyraEngine_HoF::o2_removeSlotFromInventory(EMCState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_removeSlotFromInventory(%p) (%d)", (const void *)script, stackPos(0));
+ removeSlotFromInventory(stackPos(0));
return 0;
}
@@ -431,7 +431,7 @@ int KyraEngine_HoF::o2_removeItemFromInventory(EMCState *script) {
uint16 item = stackPos(0);
int slot = -1;
while ((slot = getInventoryItemSlot(item)) != -1)
- removeItemFromInventory(slot);
+ removeSlotFromInventory(slot);
return 0;
}
@@ -680,9 +680,9 @@ int KyraEngine_HoF::o2_switchScene(EMCState *script) {
setGameFlag(0x1EF);
_mainCharX = _mainCharacter.x1;
_mainCharY = _mainCharacter.y1;
- _noScriptEnter = 0;
+ _noScriptEnter = false;
enterNewScene(stackPos(0), _mainCharacter.facing, 0, 0, 0);
- _noScriptEnter = 1;
+ _noScriptEnter = true;
return 0;
}
@@ -1012,8 +1012,8 @@ int KyraEngine_HoF::o2_objectChat(EMCState *script) {
return 0;
}
-int KyraEngine_HoF::o2_chapterChange(EMCState *script) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_chapterChange(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
+int KyraEngine_HoF::o2_changeChapter(EMCState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_changeChapter(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
const int chapter = stackPos(0);
const int scene = stackPos(1);
@@ -1555,7 +1555,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
// 0x20
Opcode(o2_checkForItem);
Opcode(o2_loadSoundFile);
- Opcode(o2_removeItemSlotFromInventory);
+ Opcode(o2_removeSlotFromInventory);
Opcode(o2_defineItem);
// 0x24
Opcode(o2_removeItemFromInventory);
@@ -1674,7 +1674,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
Opcode(o2_pressColorKey);
// 0x80
Opcode(o2_objectChat);
- Opcode(o2_chapterChange);
+ Opcode(o2_changeChapter);
Opcode(o2_getColorCodeFlag1);
Opcode(o2_setColorCodeFlag1);
// 0x84
@@ -1755,6 +1755,3 @@ void KyraEngine_HoF::setupOpcodeTable() {
} // end of namespace Kyra
-
-
-