From 7337e03e5b17139fdab6de9507291597d2f2eba4 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 29 Jul 2012 14:02:43 +0100 Subject: TEENAGENT: Further migration of callbacks from cseg usage. --- engines/teenagent/callbacks.cpp | 125 +++++++++++++++++++++++++++++++++++++++- engines/teenagent/resources.h | 32 ++++++++-- 2 files changed, 152 insertions(+), 5 deletions(-) (limited to 'engines/teenagent') diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index 5843a6aba5..4b83448c2c 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -1359,16 +1359,23 @@ bool TeenAgentEngine::processCallback(uint16 addr) { } break; - case 0x5320: loadScene(11, Common::Point(30, 124)); scene->setOrientation(2); break; + case 0x533a: + displayMessage(dsAddr_noLongHandsMsg); // "I really don't have such long hands" + break; + case 0x5341: displayMessage(dsAddr_tooFarToSwimMsg); // "It's too far to swim there" break; + case 0x5403: + displayMessage(dsAddr_noBucketMsg); // "It's not a barrel-organ. And there's no bucket." + break; + case 0x540a: loadScene(20, Common::Point(10, 185)); scene->setOrientation(2); @@ -1379,6 +1386,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) { scene->setOrientation(2); break; + case 0x543e: + loadScene(18, Common::Point(224, 199)); + scene->setOrientation(4); + break; + + case 0x5547: + loadScene(15, Common::Point(15, 172)); + scene->setOrientation(2); + break; + case 0x55a8: { uint16 d = dialog->pop(scene, 0xdb08, 0, 0, 0xd1, 0xd1, 0, 0); @@ -1411,6 +1428,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) { displayMessage(dsAddr_hmmGrassMsg); // "Hmmm. Grass..." break; + + case 0x5674: + loadScene(18, Common::Point(94, 115)); + scene->setOrientation(3); + break; + + case 0x5695: + displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it" + break; + case 0x569c: playSound(67, 5); playActorAnimation(983); @@ -1424,6 +1451,30 @@ bool TeenAgentEngine::processCallback(uint16 addr) { displayMessage(dsAddr_emptyMsg); // "It's Empty" break; + case 0x56d6: + displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump" + break; + + case 0x56dd: + displayMessage(dsAddr_dontNeedItMsg); // "I don't need it" + break; + + case 0x56e4: + displayMessage(dsAddr_notSantaClausMsg); // "I'm not Santa Claus" + break; + + case 0x56eb: + displayMessage(dsAddr_noPlasticImitationsMsg); // "I don't need plastic imitations" + break; + + case 0x56f2: + rejectMessage(); + break; + + case 0x5721: + displayMessage(dsAddr_dontNeedItMsg); // "I don't need it" + break; + case 0x5728: inventory->add(0x0d); disableObject(14); @@ -1432,6 +1483,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) { playActorAnimation(566); break; + case 0x574f: + displayMessage(dsAddr_tooFragileMsg); // "It's too fragile to carry around" + break; + case 0x5793: if (!CHECK_FLAG(0xdb94, 1)) { displayMessage(dsAddr_shutTightMsg); // "It's shut tight" @@ -1448,6 +1503,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) { } break; + case 0x57fa: + displayMessage(dsAddr_dontNeedItMsg); // "I don't need it" + break; + case 0x584d: displayMessage(dsAddr_pullObjMsg2); break; @@ -1471,6 +1530,31 @@ bool TeenAgentEngine::processCallback(uint16 addr) { displayMessage(dsAddr_notTakingSocksMsg); // "I really don't want to walk around with someone else's socks" break; + case 0x5c72: + displayMessage(dsAddr_notTiredMsg); // "Thanks, I'm not tired" + break; + + case 0x5c79: + displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it" + break; + + case 0x5c80: + rejectMessage(); + break; + + case 0x5cdb: + case 0x5ce2: + displayMessage(dsAddr_dontNeedItMsg); // "I don't need it" + break; + + case 0x5ce9: + displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it" + break; + + case 0x5d1d: + displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump" + break; + case 0x5d88: if (CHECK_FLAG(0xdba5, 1)) { // dry laundry SET_FLAG(0xdba5, 2); @@ -1500,6 +1584,22 @@ bool TeenAgentEngine::processCallback(uint16 addr) { } break; + case 0x5fa1: + displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it" + break; + + case 0x5fa8: + displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump" + break; + + case 0x5fe5: + displayMessage(dsAddr_jugMeMsg); // "They can jug me if I steal this" + break; + + case 0x5fec: + displayMessage(dsAddr_leaveFlowersAloneMsg); // "I'd better leave it. Women are really oversensitive about flowers." + break; + case 0x5ff3: // get duster if (CHECK_FLAG(0xdb9a, 0)) { dialog->pop(scene, 0xdaf6, 0, 523, 0xd1, 0xe5, 0, 1); @@ -1514,6 +1614,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) { } break; + case 0x603a: + rejectMessage(); + break; + case 0x603e: if (CHECK_FLAG(0xdbb3, 1)) { displayMessage(dsAddr_busyThinkingMsg); // "I'd better not interrupt it's thought process" @@ -1530,6 +1634,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) { } break; + case 0x6078: + displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it" + break; + case 0x6205: if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) displayMessage(dsAddr_tooHeavyMsg); // "It's too heavy. Not that I'm wimp" @@ -1555,6 +1663,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) { displayMessage(dsAddr_noHandsSharpThornsMsg); // "I can't remove it with my hands. these thorns look really sharp" break; + case 0x637f: + loadScene(21, Common::Point(201, 199)); + scene->setOrientation(1); + break; + + case 0x6399: + displayMessage(dsAddr_rockWalkingGeeMsg); // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..." + break; + case 0x63bc: playMusic(6); loadScene(25, 151, 156, 2); @@ -3007,6 +3124,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) { inventory->add(0x2e); break; + case 0x85d6: + displayMessage(dsAddr_paddleBrokenMsg); // "The paddle is BROKEN" + break; + case 0x85eb: if (CHECK_FLAG(0xdbb0, 1)) { enableObject(6); @@ -4511,6 +4632,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) { default: warning("unknown callback %04x called", addr); + // FIXME - unknown non-trivial callback 0x5b44 called! Need to analyse cseg data to work out what this is. + // try decoding trivial callbacks by cseg if not in switch byte *code = res->cseg.ptr(addr); if (code[0] == 0xbb && code[3] == 0xe8 && code[6] == 0xc3) { diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h index ff2a1b756c..5b09df162e 100644 --- a/engines/teenagent/resources.h +++ b/engines/teenagent/resources.h @@ -281,7 +281,8 @@ const uint16 dsAddr_tooMuchResinToClimbMsg = 0x3f54; // "I could climb it if the const uint16 dsAddr_dontWannaTouchHedgehogMsg = 0x3fec; // "I don't wanna touch it. Its spines could hurt my delicate hands" // Not Hungry Message : 0x402e to 0x4046 const uint16 dsAddr_notHungryMsg = 0x402e; // "Thanks, I'm not hungry" - +// No Long Hands Message : 0x4047 to 0x406c +const uint16 dsAddr_noLongHandsMsg = 0x4047; // "I really don't have such long hands" // Too Far To Swim Message : 0x406d to 0x4089 const uint16 dsAddr_tooFarToSwimMsg = 0x406d; // "It's too far to swim there" // Echo Message : 0x408a to 0x4090 @@ -302,21 +303,39 @@ const uint16 dsAddr_throwRockMsg = 0x40e8; // "OR I WILL THROW A ROCK DOWN THERE const uint16 dsAddr_orIWillMsg = 0x410f; // "OR I WILL" // Still There Message : 0x411d to 0x4132 const uint16 dsAddr_stillThereMsg = 0x411d; // "Are you still there?" - +// No Bucket Message : 0x4133 to 0x4163 +const uint16 dsAddr_noBucketMsg = 0x4133; // "It's not a barrel-organ. And there's no bucket." +// Dont Need To Open Message : 0x4164 to 0x417d +const uint16 dsAddr_dontNeedToOpenMsg = 0x4164; // "I don't need to open it" // Hmm Grass Message : 0x417e to 41b0 const uint16 dsAddr_hmmGrassMsg = 0x417e; // "Hmmm. Grass..." // Find Nut Message : 0x41b1 to 0x41ee const uint16 dsAddr_findNutMsg = 0x41b1; // "I won't find the nut just like that. The grass is too dense" +// Can't Jump So High Message : 0x41ff to 0x423e +const uint16 dsAddr_CantJumpMsg = 0x41ff; // "No way I can jump so high, cause, err, white men can't jump" +// Don't Need It Message : 0x423f to 0x4250 +const uint16 dsAddr_dontNeedItMsg = 0x423f; // "I don't need it" +// Not Santa Claus Message : 0x4251 to 0x4266 +const uint16 dsAddr_notSantaClausMsg = 0x4251; // "I'm not Santa Claus" +// No Plastic Imitations Message : 0x4267 to 0x4288 +const uint16 dsAddr_noPlasticImitationsMsg = 0x4267; // "I don't need plastic imitations" +// Too Fragile Message : 0x4289 to 0x42ab +const uint16 dsAddr_tooFragileMsg = 0x4289; // "It's too fragile to carry around" + // Not Taking Socks Message : 0x42c7 to 0x4305 const uint16 dsAddr_notTakingSocksMsg = 0x42c7; // "I really don't want to walk around with someone else's socks" - +// Not Tired Message : 0x4306 to 0x431d +const uint16 dsAddr_notTiredMsg = 0x4306; // "Thanks, I'm not tired" // Too Big Message : 0x431e to 0x434d const uint16 dsAddr_tooBigMsg = 0x431e; // "It's too big and I doubt if I'll ever need it" // No Fruit Message : 0x4380 to 0x43ab const uint16 dsAddr_noFruitMsg = 0x4380; // "There are no more interesting fruits here" - +// Jug Me Message : 0x43ac to 0x43cd +const uint16 dsAddr_jugMeMsg = 0x43ac; // "They can jug me if I steal this" +// Leave Flowers Alone Message : 0x43ce to 0x4411 +const uint16 dsAddr_leaveFlowersAloneMsg = 0x43ce; // "I'd better leave it. Women are really oversensitive about flowers." // Mirror Mirror Message : 0x4412 to 0x444e const uint16 dsAddr_mirrorMirrorMsg = 0x4412; // "Mirror, Mirror on the wall...." // Think Too Long Message : 0x444f to 0x446a @@ -360,6 +379,9 @@ const uint16 dsAddr_laughterMsg = 0x4652; // "(laughter)" // No Hands Sharp Thorns Message : 0x465e to 0x46a0 const uint16 dsAddr_noHandsSharpThornsMsg = 0x465e; // "I can't remove it with my hands. these thorns look really sharp" +// Rock Walking Gee Message : 0x46f7 to 0x473c +const uint16 dsAddr_rockWalkingGeeMsg = 0x46f7; // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..." + // Bird Attack Message : 0x47e7 to 0x4807 const uint16 dsAddr_birdAttackMsg = 0x47e7; // "Hey You! Wake up! Bird attack!" // No Search Warrant Message : 0x4808 to 0x4827 @@ -367,6 +389,8 @@ const uint16 dsAddr_noSearchWarrantMsg = 0x4808; // "I don't have a search-warra // Nut Rake Message : 0x4882 to 0x48be const uint16 dsAddr_nutRakeMsg = 0x4882; // "It's pointless, the nut will slip between the rake's teeth" +// Paddle Broken Message : 0x48bf to 0x48d5 +const uint16 dsAddr_paddleBrokenMsg = 0x48bf; // "The paddle is BROKEN" // Bribe Message : 0x49ae to 0x49d0 const uint16 dsAddr_BribeMsg = 0x49ae; // "Here, let's make your pocket fat." -- cgit v1.2.3