diff options
author | Filippos Karapetis | 2008-06-05 15:03:48 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-05 15:03:48 +0000 |
commit | 5f573fea1150ef939c4ec8c71e3ae49f6f4930c3 (patch) | |
tree | 75c90b936c90917d0999a19a26aeadfcf2a57417 /engines | |
parent | dd4a0efe0290891000d3b44a69fec65eafc00ce9 (diff) | |
download | scummvm-rg350-5f573fea1150ef939c4ec8c71e3ae49f6f4930c3.tar.gz scummvm-rg350-5f573fea1150ef939c4ec8c71e3ae49f6f4930c3.tar.bz2 scummvm-rg350-5f573fea1150ef939c4ec8c71e3ae49f6f4930c3.zip |
Added enums for all items up to chapter 3 and some of chapter 4
svn-id: r32556
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/animation.cpp | 30 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 53 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 32 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 14 |
4 files changed, 81 insertions, 48 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 91920df920..13425f7250 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1089,11 +1089,11 @@ void DrasculaEngine::animation_23_2() { talk_vb(19); if (flags[25] == 0) { talk_vb(20); - if (removeObject(7) == 0) + if (removeObject(kItemMoney) == 0) flags[30] = 1; - if (removeObject(18) == 0) + if (removeObject(kItemTwoCoins) == 0) flags[31] = 1; - if (removeObject(19) == 0) + if (removeObject(kItemOneCoin) == 0) flags[32] = 1; } talk_vb(21); @@ -1185,17 +1185,17 @@ void DrasculaEngine::animation_27_2() { flags[22] = 1; withoutVerb(); - removeObject(23); - addObject(11); + removeObject(kItemEarWithEarPlug); + addObject(kItemEarplugs); talk_vb(23); talk_vb(24); if (flags[30] == 1) - addObject(7); + addObject(kItemMoney); if (flags[31] == 1) - addObject(18); + addObject(kItemTwoCoins); if (flags[32] == 1) - addObject(19); + addObject(kItemOneCoin); talk_vb(25); talk_vb(26); } @@ -1280,12 +1280,12 @@ void DrasculaEngine::animation_31_2() { flags[38] = 0; flags[36] = 1; withoutVerb(); - removeObject(8); - removeObject(13); - removeObject(15); - removeObject(16); - removeObject(17); - addObject(20); + removeObject(kItemLeaves); + removeObject(kItemBubbleGum); + removeObject(kItemTissues); + removeObject(kItemCigarettes); + removeObject(kItemCandle); + addObject(kItemReefer); } void DrasculaEngine::animation_35_2() { @@ -2234,7 +2234,7 @@ void DrasculaEngine::animation_26_2() { updateAnim(121, 225, 113, 50, 59, 6, extraSurface); pickObject(11); - removeObject(12); + removeObject(kItemBook); if (_lang == kSpanish) textSurface = extraSurface; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ccf5ae7f92..0b22ba3170 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -453,7 +453,7 @@ bool DrasculaEngine::escoba() { gotoObject(65, 145); } } else if (currentChapter == 2) { - addObject(28); + addObject(kItemPhone); trackProtagonist = 3; objExit = 162; if (hay_que_load == 0) @@ -464,13 +464,13 @@ bool DrasculaEngine::escoba() { } } } else if (currentChapter == 3) { - addObject(28); - addObject(11); - addObject(14); - addObject(22); - addObject(9); - addObject(20); - addObject(19); + addObject(kItemPhone); + addObject(kItemEarplugs); + addObject(kItemSickle); + addObject(kItemHandbag); + addObject(kItemCross); + addObject(kItemReefer); + addObject(kItemOneCoin); flags[1] = 1; trackProtagonist = 1; objExit = 99; @@ -481,11 +481,12 @@ bool DrasculaEngine::escoba() { return true; } } + // From here onwards the items have different IDs } else if (currentChapter == 4) { - addObject(28); - addObject(9); - addObject(20); - addObject(22); + addObject(kItemPhone2); + addObject(kItemCross2); + addObject(kItemReefer2); + addObject(kItemOneCoin2); objExit = 100; if (hay_que_load == 0) { enterRoom(21); @@ -718,11 +719,11 @@ void DrasculaEngine::chooseObject(int objeto) { pickedObject = objeto; } -int DrasculaEngine::removeObject(int osj) { +int DrasculaEngine::removeObject(int obj) { int result = 1; for (int h = 1; h < 43; h++) { - if (inventoryObjects[h] == osj) { + if (inventoryObjects[h] == obj) { inventoryObjects[h] = 0; result = 0; break; @@ -2345,10 +2346,10 @@ void DrasculaEngine::moveCharacters() { void DrasculaEngine::showMenu() { int h, n, x; - char texto_icono[13]; + char textIcon[13]; x = whichObject(); - strcpy(texto_icono, iconName[x]); + strcpy(textIcon, iconName[x]); for (n = 1; n < 43; n++) { h = inventoryObjects[n]; @@ -2366,18 +2367,18 @@ void DrasculaEngine::showMenu() { } if (x < 7) - print_abc(texto_icono, itemLocations[x].x - 2, itemLocations[x].y - 7); + print_abc(textIcon, itemLocations[x].x - 2, itemLocations[x].y - 7); } void DrasculaEngine::clearMenu() { - int n, sobre_verbo = 1; + int n, verbActivated = 1; for (n = 0; n < 7; n++) { if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) - sobre_verbo = 0; - copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, verbBarX[n], 2, + verbActivated = 0; + copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, verbBarX[n], 2, OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); - sobre_verbo = 1; + verbActivated = 1; } } @@ -2454,8 +2455,8 @@ bool DrasculaEngine::exitRoom(int l) { } if (objectNum[l] == 176 && flags[29] == 1) { flags[29] = 0; - removeObject(23); - addObject(11); + removeObject(kItemEarWithEarPlug); + addObject(kItemEarplugs); } clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); @@ -3302,18 +3303,18 @@ void DrasculaEngine::response(int function) { } } -void DrasculaEngine::addObject(int osj) { +void DrasculaEngine::addObject(int obj) { int h, position = 0; for (h = 1; h < 43; h++) { - if (inventoryObjects[h] == osj) + if (inventoryObjects[h] == obj) position = 1; } if (position == 0) { for (h = 1; h < 43; h++) { if (inventoryObjects[h] == 0) { - inventoryObjects[h] = osj; + inventoryObjects[h] = obj; position = 1; break; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f125bb399d..f8af3cb7d1 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -68,6 +68,38 @@ enum Verbs { kVerbMove = 6 }; +// Items up to chapter 3 +enum InventoryItems { + kItemMoney = 7, + kItemLeaves = 8, + kItemCross = 9, + kItemSpike = 10, + kItemEarplugs = 11, + kItemBook = 12, + kItemBubbleGum = 13, + kItemSickle = 14, + kItemTissues = 15, + kItemCigarettes = 16, + kItemCandle = 17, + kItemTwoCoins = 18, + kItemOneCoin = 19, + kItemReefer = 20, + kItemKey = 21, + kItemHandbag = 22, + kItemEarWithEarPlug = 23, + kItemPhone = 28 +}; + +// Items from chapter 4 onwards +enum InventoryItems2 { + kItemKey2 = 7, + kItemCross2 = 9, + kItemRope2 = 19, + kItemReefer2 = 20, + kItemOneCoin2 = 22, + kItemPhone2 = 28 +}; + enum Colors { kColorBrown = 1, kColorDarkBlue = 2, diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c1100c1115..cf503b8010 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -269,7 +269,7 @@ void DrasculaEngine::room_5(int fl) { talk(14); else if (pickedObject == 10 && fl == 136) { animation_5_2(); - removeObject(10); + removeObject(kItemSpike); } else hasAnswer = 0; } @@ -374,7 +374,7 @@ void DrasculaEngine::room_9(int fl){ animation_33_2(); else if (pickedObject == 7 && fl == 51) { animation_6_2(); - removeObject(7); + removeObject(kItemMoney); pickObject(14);} else hasAnswer = 0; @@ -451,7 +451,7 @@ void DrasculaEngine::room_15(int fl) { talk(338); flags[27] = 0; pickObject(19); - removeObject(18); + removeObject(kItemTwoCoins); } else if (pickedObject == kVerbMove && fl == 188 && flags[27] == 0) { animation_34_2(); talk(339); @@ -519,7 +519,7 @@ void DrasculaEngine::room_17(int fl) { talk(347); flags[29] = 1; pickObject(23); - removeObject(11); + removeObject(kItemEarplugs); } else hasAnswer = 0; } @@ -564,7 +564,7 @@ void DrasculaEngine::room_18(int fl) { talk(347); flags[29] = 1; pickObject(23); - removeObject(11); + removeObject(kItemEarplugs); } else hasAnswer = 0; } @@ -1728,8 +1728,8 @@ bool DrasculaEngine::checkAction(int fl) { talk(164); flags[23] = 1; withoutVerb(); - addObject(7); - addObject(18); + addObject(kItemMoney); + addObject(kItemTwoCoins); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(307); else if (pickedObject == kVerbLook && fl == 28) |