diff options
author | Eugene Sandulenko | 2008-06-05 20:28:50 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-06-05 20:28:50 +0000 |
commit | 35cdc7aae478f55765bf213b0f929d0ba34cac8f (patch) | |
tree | badce337945954e3ab32d0bd46419568d7316e56 /engines | |
parent | 9cbf46a7a42f0f71797856dcbcf987ef11ae6723 (diff) | |
download | scummvm-rg350-35cdc7aae478f55765bf213b0f929d0ba34cac8f.tar.gz scummvm-rg350-35cdc7aae478f55765bf213b0f929d0ba34cac8f.tar.bz2 scummvm-rg350-35cdc7aae478f55765bf213b0f929d0ba34cac8f.zip |
Converted most of checkAction() to pseudorooms 200 and 201, putting
them into roomActions.
svn-id: r32560
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/rooms.cpp | 252 | ||||
-rw-r--r-- | engines/drascula/staticdata.h | 122 |
2 files changed, 140 insertions, 234 deletions
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 6f4dd821fe..ea6b7766e2 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1619,15 +1619,16 @@ bool DrasculaEngine::checkAction(int fl) { hasAnswer = 1; - if (menuScreen == 1) { + if (menuScreen == 1 && roomParse(200, fl)) { + ; + } else if (menuScreen != 1 && roomParse(201, fl)) { + ; + } else if (menuScreen == 1) { if (currentChapter == 1) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 2) { if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) - || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { + || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { talk(164); flags[23] = 1; withoutVerb(); @@ -1635,93 +1636,10 @@ bool DrasculaEngine::checkAction(int fl) { addObject(kItemTwoCoins); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); else hasAnswer = 0; } else if (currentChapter == 3) { - if (pickedObject == kVerbLook && fl == 22) - talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); @@ -1730,120 +1648,33 @@ bool DrasculaEngine::checkAction(int fl) { removeObject(19); } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) talk(484); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(480); else if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 10) - talk(485); - else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 12) - talk(486); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(122); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 16) - talk(491); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 18) - talk(493); - else if (pickedObject == kVerbLook && fl == 19) { + } else if (pickedObject == kVerbLook && fl == 19) { talk(494); talk(495); - } else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 21) - talk(496); - else if (pickedObject == kVerbLook && fl == 22) - talk(161); - else + } else hasAnswer = 0; } else if (currentChapter == 5) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(120); - else if (pickedObject == kVerbLook && fl == 9) { + if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(121); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else + } else hasAnswer = 0; } else if (currentChapter == 6) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 9) { + if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 20) - talk(123); - else if (pickedObject == kVerbLook && fl == 21) - talk(441); - else + } else hasAnswer = 0; } } else { if (currentChapter == 1) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 2) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); // Note: the original check was strcmp(num_room, "18.alg") - else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) + if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) talk(315); else if (pickedObject == 13 && fl == 50) talk(156); @@ -1852,19 +1683,7 @@ bool DrasculaEngine::checkAction(int fl) { else hasAnswer = 0; } else if (currentChapter == 3) { - if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else if (roomNumber == 13) { + if (roomNumber == 13) { if (room_13(fl)) return true; } else @@ -1872,18 +1691,6 @@ bool DrasculaEngine::checkAction(int fl) { } else if (currentChapter == 4) { if (roomNumber == 28) talk(178); - else if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); else if (pickedObject == 8 && fl == 50 && flags[18] == 0) talk(481); else if (pickedObject == 9 && fl == 50) @@ -1898,20 +1705,7 @@ bool DrasculaEngine::checkAction(int fl) { } else hasAnswer = 0; } else if (currentChapter == 5) { - // TODO: These are not translated - if (pickedObject == kVerbLook && fl == 50) - talk("Cuanto mas me miro, mas me gusto", "54.als"); - else if (pickedObject == kVerbOpen && fl == 50) - talk("y luego como me cierro", "19.als"); - else if (pickedObject == kVerbClose && fl == 50) - talk("Tendre que abrirme primero no", "19.als"); - else if (pickedObject == kVerbMove && fl == 50) - talk("Estoy bien donde estoy", "19.als"); - else if (pickedObject == kVerbPick && fl == 50) - talk("Ya me tengo", "11.als"); - else if (pickedObject == kVerbTalk && fl == 50) - talk("hola yo", "16.als"); - else if (pickedObject == 20 && fl == 50) + if (pickedObject == 20 && fl == 50) talk(487); else if (roomNumber == 56) { if (room_56(fl)) @@ -1923,16 +1717,6 @@ bool DrasculaEngine::checkAction(int fl) { talk(308); else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) talk(310); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); else if (roomNumber == 102) room_102(fl); else if (roomNumber == 60) { diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index fb3d966ec3..58bf24f75d 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -418,6 +418,128 @@ RoomTalkAction roomActions[] = { // ================================== { 102, -1, kVerbLook, 100, 452 }, { 102, -1, kVerbLook, 101, 123 }, + // ================================== + // Pseudoroom. checkAction() menuScreen == 1 + { 200, 1, kVerbLook, 28, 328 }, + // ---------------------------------- + { 200, 2, kVerbLook, 28, 328 }, + { 200, 2, kVerbLook, 7, 143 }, + { 200, 2, kVerbLook, 8, 145 }, + { 200, 2, kVerbLook, 9, 147 }, + { 200, 2, kVerbLook, 10, 151 }, + { 200, 2, kVerbLook, 11, 152 }, + { 200, 2, kVerbLook, 12, 154 }, + { 200, 2, kVerbLook, 13, 155 }, + { 200, 2, kVerbLook, 14, 157 }, + { 200, 2, kVerbLook, 15, 58 }, + { 200, 2, kVerbLook, 16, 158 }, + { 200, 2, kVerbLook, 17, 159 }, + { 200, 2, kVerbLook, 18, 160 }, + { 200, 2, kVerbLook, 19, 161 }, + { 200, 2, kVerbLook, 23, 152 }, + { 200, 2, kVerbTalk, 7, 144 }, + { 200, 2, kVerbTalk, 8, 146 }, + { 200, 2, kVerbTalk, 9, 148 }, + { 200, 2, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 3, kVerbLook, 22, 307 }, + { 200, 3, kVerbLook, 28, 328 }, + { 200, 3, kVerbLook, 7, 143 }, + { 200, 3, kVerbLook, 8, 145 }, + { 200, 3, kVerbLook, 9, 147 }, + { 200, 3, kVerbLook, 10, 151 }, + { 200, 3, kVerbLook, 11, 152 }, + { 200, 3, kVerbLook, 12, 154 }, + { 200, 3, kVerbLook, 13, 155 }, + { 200, 3, kVerbLook, 14, 157 }, + { 200, 3, kVerbLook, 15, 58 }, + { 200, 3, kVerbLook, 16, 158 }, + { 200, 3, kVerbLook, 17, 159 }, + { 200, 3, kVerbLook, 18, 160 }, + { 200, 3, kVerbLook, 19, 161 }, + { 200, 3, kVerbLook, 20, 162 }, + { 200, 3, kVerbLook, 23, 152 }, + { 200, 3, kVerbTalk, 7, 144 }, + { 200, 3, kVerbTalk, 8, 146 }, + { 200, 3, kVerbTalk, 9, 148 }, + { 200, 3, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 4, kVerbLook, 7, 478 }, + { 200, 4, kVerbLook, 8, 480 }, + { 200, 4, kVerbLook, 10, 485 }, + { 200, 4, kVerbLook, 11, 488 }, + { 200, 4, kVerbLook, 12, 486 }, + { 200, 4, kVerbLook, 13, 490 }, + { 200, 4, kVerbLook, 14, 122 }, + { 200, 4, kVerbLook, 15, 117 }, + { 200, 4, kVerbLook, 16, 491 }, + { 200, 4, kVerbLook, 17, 478 }, + { 200, 4, kVerbLook, 18, 493 }, + { 200, 4, kVerbLook, 20, 162 }, + { 200, 4, kVerbLook, 21, 496 }, + { 200, 4, kVerbLook, 22, 161 }, + { 200, 4, kVerbLook, 28, 328 }, + { 200, 4, kVerbTalk, 15, 118 }, + { 200, 4, kVerbOpen, 15, 119 }, + // ---------------------------------- + { 200, 5, kVerbLook, 7, 478 }, + { 200, 5, kVerbLook, 8, 120 }, + { 200, 5, kVerbLook, 11, 488 }, + { 200, 5, kVerbLook, 13, 490 }, + { 200, 5, kVerbLook, 14, 121 }, + { 200, 5, kVerbLook, 15, 117 }, + { 200, 5, kVerbLook, 17, 478 }, + { 200, 5, kVerbLook, 20, 162 }, + { 200, 5, kVerbLook, 28, 328 }, + { 200, 5, kVerbTalk, 15, 118 }, + { 200, 5, kVerbOpen, 15, 119 }, + // ---------------------------------- + { 200, 6, kVerbLook, 20, 123 }, + { 200, 6, kVerbLook, 21, 441 }, + { 200, 6, kVerbLook, 28, 328 }, + // ================================== + // Pseudoroom. checkAction() menuScreen != 1 + { 201, 1, kVerbLook, 50, 308 }, + { 201, 1, kVerbOpen, 50, 310 }, + { 201, 1, kVerbClose, 50, 311 }, + { 201, 1, kVerbMove, 50, 312 }, + { 201, 1, kVerbPick, 50, 313 }, + { 201, 1, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 2, kVerbLook, 50, 308 }, + { 201, 2, kVerbOpen, 50, 310 }, + { 201, 2, kVerbClose, 50, 311 }, + { 201, 2, kVerbMove, 50, 312 }, + { 201, 2, kVerbPick, 50, 313 }, + { 201, 2, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 3, kVerbLook, 50, 309 }, + { 201, 3, kVerbOpen, 50, 310 }, + { 201, 3, kVerbClose, 50, 311 }, + { 201, 3, kVerbMove, 50, 312 }, + { 201, 3, kVerbPick, 50, 313 }, + { 201, 3, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 4, kVerbLook, 50, 309 }, + { 201, 4, kVerbOpen, 50, 310 }, + { 201, 4, kVerbClose, 50, 311 }, + { 201, 4, kVerbMove, 50, 312 }, + { 201, 4, kVerbPick, 50, 313 }, + { 201, 4, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 5, kVerbLook, 50, 309 }, // Originally these are with + { 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices + { 201, 5, kVerbClose, 50, 311 }, + { 201, 5, kVerbMove, 50, 312 }, + { 201, 5, kVerbPick, 50, 313 }, + { 201, 5, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 6, kVerbOpen, 50, 310 }, + { 201, 6, kVerbClose, 50, 311 }, + { 201, 6, kVerbMove, 50, 312 }, + { 201, 6, kVerbPick, 50, 313 }, + { 201, 6, kVerbTalk, 50, 314 }, + }; const char *_text[][501] = { |