Skip to content

Commit

Permalink
TEENAGENT: Further symbol migration for processCallback() usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Jul 16, 2012
1 parent d7dcbb2 commit 5563aba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions engines/teenagent/callbacks.cpp
Expand Up @@ -776,7 +776,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
SET_FLAG(0, 0);
break;

case 0x5189: // guard is drinking, boo!
case csAddr_guardDrinking:
SET_FLAG(0, 0);
setTimerCallback(0, 0);
scene->getAnimation(0)->free();
Expand Down Expand Up @@ -2837,7 +2837,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
SET_FLAG(0, 0);
break;

case 0x8d57:
case csAddr_putRockInHole:
if (CHECK_FLAG(0, 0)) {
playSound(5, 2);
playSound(15, 12);
Expand Down Expand Up @@ -3923,7 +3923,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
}
break;

case 0x99e0: // success getting an anchor
case csAddr_gotAnchor:
SET_FLAG(0, 0);
setTimerCallback(0, 0);
scene->getActorAnimation()->free();
Expand Down
6 changes: 6 additions & 0 deletions engines/teenagent/resources.h
Expand Up @@ -34,6 +34,12 @@ namespace TeenAgent {
// Code Segment Addresses (Read Only)
// Intro function : 0x024c
const uint16 csAddr_intro = 0x024c;
// Guard Drinking function : 0x5189
const uint16 csAddr_guardDrinking = 0x5189;
// Putting Rock in Hole function : 0x8d57
const uint16 csAddr_putRockInHole = 0x8d57;
// Successfully Got Anchor function : 0x99e0
const uint16 csAddr_gotAnchor = 0x99e0;
// Display Message function : 0xa055
const uint16 csAddr_displayMsg = 0xa055;
// Reject Message function : 0xa4d6
Expand Down
2 changes: 1 addition & 1 deletion engines/teenagent/scene.h
Expand Up @@ -172,7 +172,7 @@ class Scene {
void playAnimation(byte idx, uint id, bool loop, bool paused, bool ignore);
void playActorAnimation(uint id, bool loop, bool ignore);

byte palette[768];
byte palette[3 * 256];
void paletteEffect(byte step);
byte findFade() const;

Expand Down
8 changes: 4 additions & 4 deletions engines/teenagent/teenagent.cpp
Expand Up @@ -93,7 +93,7 @@ bool TeenAgentEngine::trySelectedObject() {
if ((res->dseg.get_byte(0) == 1 && inv->id == 49 && dst_object->id == 5) ||
(res->dseg.get_byte(0) == 2 && inv->id == 29 && dst_object->id == 5)) {
//putting rock into hole or superglue on rock
processCallback(0x8d57);
processCallback(csAddr_putRockInHole);
return true;
}

Expand Down Expand Up @@ -563,7 +563,7 @@ Common::Error TeenAgentEngine::run() {
return Common::kNoError;
scene->intro = true;
scene_busy = true;
processCallback(0x024c);
processCallback(csAddr_intro);
}

CursorMan.showMouse(true);
Expand Down Expand Up @@ -615,11 +615,11 @@ Common::Error TeenAgentEngine::run() {
break;

if (res->dseg.get_byte(0) == 3 && current_object->id == 1) {
processCallback(0x5189); // guard is drinking, boo!
processCallback(csAddr_guardDrinking);
break;
}
if (res->dseg.get_byte(0) == 4 && current_object->id == 5) {
processCallback(0x99e0); // success getting an anchor
processCallback(csAddr_gotAnchor);
break;
}
use(current_object);
Expand Down

0 comments on commit 5563aba

Please sign in to comment.