diff options
author | D G Turner | 2012-07-28 10:57:26 +0100 |
---|---|---|
committer | D G Turner | 2012-07-28 10:57:26 +0100 |
commit | d4591dcfb5e240138e478bd86d4de6ad75ca60c7 (patch) | |
tree | c158dc30f5a064c96a8143f9d71a80b75573d41b /engines/teenagent | |
parent | 955f5b5180e3852b0440638bfff00b1a65dd734e (diff) | |
download | scummvm-rg350-d4591dcfb5e240138e478bd86d4de6ad75ca60c7.tar.gz scummvm-rg350-d4591dcfb5e240138e478bd86d4de6ad75ca60c7.tar.bz2 scummvm-rg350-d4591dcfb5e240138e478bd86d4de6ad75ca60c7.zip |
TEENAGENT: Further addition of variable locations used in Callbacks.
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/callbacks.cpp | 28 | ||||
-rw-r--r-- | engines/teenagent/resources.h | 11 |
2 files changed, 25 insertions, 14 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index 3d2c95f80d..3df9065e4a 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -219,14 +219,14 @@ void TeenAgentEngine::fnLeaveCellar() { } void TeenAgentEngine::fnPutRockInHole() { - if (CHECK_FLAG(0, 0)) { + if (CHECK_FLAG(0x0000, 0)) { playSound(5, 2); playSound(15, 12); playActorAnimation(638); inventory->remove(48); setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100); SET_FLAG(0x0000, 1); - } else if (CHECK_FLAG(0, 1)) { + } else if (CHECK_FLAG(0x0000, 1)) { playSound(5, 2); playSound(52, 13); playActorAnimation(648); @@ -234,7 +234,7 @@ void TeenAgentEngine::fnPutRockInHole() { inventory->remove(49); setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100); SET_FLAG(0x0000, 2); - } else if (CHECK_FLAG(0, 2)) { + } else if (CHECK_FLAG(0x0000, 2)) { playActorAnimation(649); setOns(1, 47); wait(300); @@ -244,7 +244,7 @@ void TeenAgentEngine::fnPutRockInHole() { setOns(0, 42); enableObject(6); disableObject(5); - SET_FLAG(0xdbab, 1); + SET_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1); SET_FLAG(0x0000, 0); setTimerCallback(0, 0); } @@ -1375,7 +1375,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { break; case 0x65c3: - if (CHECK_FLAG(0xdba9, 1)) { + if (CHECK_FLAG(dsAddr_mouseHoleState, 1)) { playActorAnimation(635); setOns(5, 0); playSound(63, 11); @@ -1386,7 +1386,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { inventory->add(48); moveTo(scene->getPosition().x - 1, 139, 1, true); displayMessage(dsAddr_yikesMsg); // "Yikes!" - SET_FLAG(0xdba9, 2); + SET_FLAG(dsAddr_mouseHoleState, 2); SET_FLAG(0xdba8, 0); } else displayMessage(dsAddr_noSearchWarrantMsg); // "I don't have a search-warrant" @@ -1401,9 +1401,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) { case 0x7878: { - byte v = res->dseg.get_byte(0xdbdb) + 1; + byte v = res->dseg.get_byte(dsAddr_graffitiMsgId) + 1; if (v <= 6) - SET_FLAG(0xdbdb, v); + SET_FLAG(dsAddr_graffitiMsgId, v); switch (v) { case 1: @@ -3117,7 +3117,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { break; case csAddr_mouseOutOfHoleTimeout: // mouse falls back from the hole (cave) - if (CHECK_FLAG(0, 1)) { + if (CHECK_FLAG(0x0000, 1)) { inventory->add(48); playSound(24, 26); playActorAnimation(650, true); @@ -3138,7 +3138,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { inventory->add(49); setLan(2, 4, 27); enableObject(4, 27); - SET_FLAG(0xdba9, 0); + SET_FLAG(dsAddr_mouseHoleState, 0); } SET_FLAG(0x0000, 0); break; @@ -3183,7 +3183,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { waitAnimation(); disableObject(4); displayMessage(dsAddr_trappedMouseMsg); // "The mouse is trapped!" - SET_FLAG(0xdba9, 1); + SET_FLAG(dsAddr_mouseHoleState, 1); } else { playActorAnimation(628, true); playAnimation(630, 1, true); @@ -3193,7 +3193,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { break; case 0x9054: // mouse hole - if (CHECK_FLAG(0xdbab, 1)) { + if (CHECK_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1)) { displayMessage(dsAddr_nonsenseMsg); // "Nonsense" } else { playSound(5, 11); @@ -3204,8 +3204,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) { playActorAnimation(633); SET_FLAG(0xdba8, 1); inventory->remove(47); - if (!CHECK_FLAG(0xdbaa, 1)) { - SET_FLAG(0xdbaa, 1); + if (!CHECK_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1)) { + SET_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1); displayMessage(dsAddr_mouseNerveMsg); // "Boy, this mouse has some nerve!" } } diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h index 1cf128619a..e059eaa46f 100644 --- a/engines/teenagent/resources.h +++ b/engines/teenagent/resources.h @@ -703,6 +703,17 @@ const uint16 dsAddr_currentMusic = 0xdb90; // 1 byte // Light On Flag : 0xdba4 const uint16 dsAddr_lightOnFlag = 0xdba4; // 1 byte + +// Mouse Hole State : 0xdba9, 0 = Mouse Gone, 1 = Mouse Trapped, 2 = Mouse Success(?) +const uint16 dsAddr_mouseHoleState = 0xdba9; // 1 byte +// Mouse Nerve Message Said Flag : 0xdbaa +const uint16 dsAddr_mouseNerveMsgSaidFlag = 0xdbaa; // 1 byte +// Mouse Already Got Gold Nugget Flag : 0xdbab +const uint16 dsAddr_mouseGotGoldNuggetFlag = 0xdbab; // 1 byte + +// Graffiti Message Id : 0xdbdb, 0 to 6 +const uint16 dsAddr_graffitiMsgId = 0xdbdb; // 1 byte + // Captain Drawer State : 0xdbe6 const uint16 dsAddr_captainDrawerState = 0xdbe6; // 1 byte |