aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2012-07-17 00:04:27 +0100
committerD G Turner2012-07-17 00:04:27 +0100
commit5563abae6dead0cfe4a3c8796e2f07e63b1022b1 (patch)
treebaedfed2304a74cadfca1af778c5f7f7236ed6dd /engines
parentd7dcbb2c2d59e200995d41db7085fcc12dd9bc11 (diff)
downloadscummvm-rg350-5563abae6dead0cfe4a3c8796e2f07e63b1022b1.tar.gz
scummvm-rg350-5563abae6dead0cfe4a3c8796e2f07e63b1022b1.tar.bz2
scummvm-rg350-5563abae6dead0cfe4a3c8796e2f07e63b1022b1.zip
TEENAGENT: Further symbol migration for processCallback() usage.
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/callbacks.cpp6
-rw-r--r--engines/teenagent/resources.h6
-rw-r--r--engines/teenagent/scene.h2
-rw-r--r--engines/teenagent/teenagent.cpp8
4 files changed, 14 insertions, 8 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index 79a4c9f7f3..d6e9c13fab 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -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();
@@ -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);
@@ -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();
diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h
index 68d94f913c..3beddfd662 100644
--- a/engines/teenagent/resources.h
+++ b/engines/teenagent/resources.h
@@ -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
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 7270b2ec9a..472cdf6edb 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -172,7 +172,7 @@ private:
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;
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 3a68edd1fe..fe9baacebb 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -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;
}
@@ -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);
@@ -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);