diff options
author | D G Turner | 2012-07-26 01:49:46 +0100 |
---|---|---|
committer | D G Turner | 2012-07-26 01:49:46 +0100 |
commit | 9128f8a8de83f2491c03640d97f20a866f82577b (patch) | |
tree | 4f141d963b5d6d995866e41ac8fd32c53559f252 | |
parent | ebef5fefeaea18f43cfef31c77739390d1300814 (diff) | |
download | scummvm-rg350-9128f8a8de83f2491c03640d97f20a866f82577b.tar.gz scummvm-rg350-9128f8a8de83f2491c03640d97f20a866f82577b.tar.bz2 scummvm-rg350-9128f8a8de83f2491c03640d97f20a866f82577b.zip |
TEENAGENT: Further recursive processCallback() migration work.
Added extra debug output to processCallback cseg functions. Used this to
resolve the FIXME unknown functions. 0x61fe is trivial callback, but
0x50c5 is a typo. Corrected.
-rw-r--r-- | engines/teenagent/callbacks.cpp | 23 | ||||
-rw-r--r-- | engines/teenagent/resources.h | 10 |
2 files changed, 19 insertions, 14 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index c01994c6bf..6ecdab8196 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -216,7 +216,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { // call display_message, r uint16 msg = READ_LE_UINT16(code + 1); uint16 func = 6 + addr + READ_LE_UINT16(code + 4); - debugC(0, kDebugCallbacks, "call %04x", func); + debugC(0, kDebugCallbacks, "call %04x msg:0x%04x", func, msg); debugC(0, kDebugCallbacks, "trivial callback, showing message %s", (const char *)res->dseg.ptr(addr)); if (func == csAddr_displayMsg) { displayMessage(msg); @@ -236,6 +236,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { if (code[0] == 0xc7 && code[1] == 0x06 && code[2] == 0xf3 && code[3] == 0xb4 && code[6] == 0xb8 && code[9] == 0xbb && code[12] == 0xbf && code[22] == 0xe8 && code[25] == 0xc3) { + debugC(0, kDebugCallbacks, "loadScene(%d) callback", code[4]); loadScene(code[4], Common::Point( (READ_LE_UINT16(code + 7) + READ_LE_UINT16(code + 13) + 1) / 2 , READ_LE_UINT16(code + 10))); @@ -1039,21 +1040,21 @@ bool TeenAgentEngine::processCallback(uint16 addr) { if (CHECK_FLAG(0xdba4, 1)) displayMessage(dsAddr_tooHeavyMsg); // "It's too heavy. Not that I'm wimp" else - processCallback(0x61fe); + processCallback(csAddr_TooDark); break; case 0x6217: if (CHECK_FLAG(0xdba4, 1)) displayMessage(dsAddr_noDentistsMsg); // "I don't want to have anything in common with dentists" else - processCallback(0x61fe); + processCallback(csAddr_TooDark); break; case 0x62c1: if (CHECK_FLAG(0xdba4, 1)) retVal = false; else - processCallback(0x61fe); + processCallback(csAddr_TooDark); break; case 0x63bc: @@ -1169,7 +1170,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { if (CHECK_FLAG(0xdba4, 1)) retVal = false; else - processCallback(0x61fe); + processCallback(csAddr_TooDark); break; case 0x7b26: // cutting the fence @@ -1791,7 +1792,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) { if (CHECK_FLAG(0xdba4, 1)) dialog->popMark(scene, 0xdb1e); else - processCallback(0x61fe); + processCallback(csAddr_TooDark); + break; + + case csAddr_TooDark: + displayMessage(dsAddr_TooDarkMsg); // "It's too dark to see clearly" break; case 0x6229: // shelves in cellar @@ -1824,7 +1829,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { break; } } else - processCallback(0x61fe); + processCallback(csAddr_TooDark); break; case 0x6480: // dive mask @@ -2322,7 +2327,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { break; case 0x78e0: - processCallback(0x50c5); + processCallback(csAddr_egoSuspiciousPosition); retVal = false; break; @@ -2371,7 +2376,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { if (CHECK_FLAG(0xdba4, 1)) retVal = false; else - retVal = processCallback(0x61fe); + retVal = processCallback(csAddr_TooDark); break; case 0x79d2: diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h index 7c1b2b4c98..cc7eb52193 100644 --- a/engines/teenagent/resources.h +++ b/engines/teenagent/resources.h @@ -38,9 +38,6 @@ const uint16 csAddr_intro = 0x024c; const uint16 csAddr_poleClimbFail = 0x4173; // Move Ego (Mark) To Suspicious Position function : 0x505c const uint16 csAddr_egoSuspiciousPosition = 0x505c; - -// FIXME - Find and replace Unknown callback functions with symbols: 0x50c5, 0x61fe - // Guard Drinking function : 0x5189 const uint16 csAddr_guardDrinking = 0x5189; // Move Ego (Mark) To Default Position function : 0x557e @@ -55,6 +52,8 @@ const uint16 csAddr_egoScaredBySpider = 0x60b5; const uint16 csAddr_moveToLadderAndLeaveCellar = 0x60d9; // Leave Cellar function : 0x612b const uint16 csAddr_leaveCellar = 0x612b; +// Too Dark function : 0x61fe +const uint16 csAddr_TooDark = 0x61fe; // Move Ego (Mark) To Bottom-Right or Turn function : 0x6849 const uint16 csAddr_egoBottomRightTurn = 0x6849; // Checking Drawers function : 0x68e6 @@ -316,9 +315,10 @@ const uint16 dsAddr_getMeOutJamMsg = 0x459f; // "Get me out of this jam!" const uint16 dsAddr_rosemaryJamMsg = 0x45b8; // "Oh, and there is Rosemary jam" // Know Rosemary Message : 0x45da to 0x4602 const uint16 dsAddr_knowRosemaryMsg = 0x45da; // "I used to know someone called Rosemary" -// Umwanted Jams Message : 0x4603 to 0x461c +// Unwanted Jams Message : 0x4603 to 0x461c const uint16 dsAddr_unwantedJamsMsg = 0x4603; // "I don't want those jams" - +// Too Dark Message : 0x461d to 0x463b +const uint16 dsAddr_TooDarkMsg = 0x461d; // "It's too dark to see clearly" // Yeow Message : 0x463c to 0x4649 const uint16 dsAddr_yeowMsg = 0x463c; // "YEEEOOOWWWW!" // Yawn Message : 0x464a to 0x4651 |