aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2012-07-12 21:03:47 +0100
committerD G Turner2012-07-12 21:03:47 +0100
commit85cf79a57f52c15f9f214ba8ea924bc0b68b7c02 (patch)
treecbdd348f3ddcc0225ff34f3c55ca276ecbc49c90 /engines
parent8dcc42691165330d2c6ed3eba6863bf8e064fbb9 (diff)
downloadscummvm-rg350-85cf79a57f52c15f9f214ba8ea924bc0b68b7c02.tar.gz
scummvm-rg350-85cf79a57f52c15f9f214ba8ea924bc0b68b7c02.tar.bz2
scummvm-rg350-85cf79a57f52c15f9f214ba8ea924bc0b68b7c02.zip
TEENAGENT: Minor formatting fixes for consistency.
This is mainly ensuring that all hexadecimal usages i.e. addresses are in lowercase for consistency, but also includes some minor comment formatting correction.
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/callbacks.cpp678
-rw-r--r--engines/teenagent/inventory.cpp8
-rw-r--r--engines/teenagent/music.cpp18
-rw-r--r--engines/teenagent/notes.txt109
-rw-r--r--engines/teenagent/resources.cpp14
-rw-r--r--engines/teenagent/scene.cpp59
-rw-r--r--engines/teenagent/teenagent.cpp46
7 files changed, 517 insertions, 415 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index 3093222414..79a4c9f7f3 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -179,7 +179,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4094: // climbing to the pole near mudpool
- if (CHECK_FLAG(0xDBE4, 1)) {
+ if (CHECK_FLAG(0xdbe4, 1)) {
displayMessage(0x57b2);
} else {
for (byte i = 11; i <= 27; i += 4)
@@ -203,10 +203,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
inventory->add(0x56);
moveTo(86, 195, 1, true);
playActorAnimation(868);
- SET_FLAG(0xDBE4, 1);
+ SET_FLAG(0xdbe4, 1);
} else {
processCallback(0x4173);
- dialog->pop(scene, 0xDB72, 0, 0, 0xd1, 0xd1, 0, 0);
+ dialog->pop(scene, 0xdb72, 0, 0, 0xd1, 0xd1, 0, 0);
}
}
break;
@@ -273,7 +273,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(70, 6);
playActorAnimation(962);
loadScene(7, 30, 184, 2);
- if (res->dseg.get_byte(0xDBDF) < 2) {
+ if (res->dseg.get_byte(0xdbdf) < 2) {
wait(150);
moveTo(134, 167, 2);
displayMessage(0x54f7);
@@ -291,12 +291,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
dialog->showMono(150, scene, 0, 0xd1, 0);
- SET_FLAG(0xDBDF, 1);
+ SET_FLAG(0xdbdf, 1);
}
break;
case 0x4482:
- if (CHECK_FLAG(0xDBDF, 0)) {
+ if (CHECK_FLAG(0xdbdf, 0)) {
playActorAnimation(968);
displayMessage(0x5511);
} else {
@@ -318,14 +318,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x44cb:
- if (CHECK_FLAG(0xDBE5, 1)) {
+ if (CHECK_FLAG(0xdbe5, 1)) {
displayMessage(0x57c0);
} else {
playSound(49, 14);
playSound(5, 21);
playActorAnimation(869);
inventory->add(0x58);
- SET_FLAG(0xDBE5, 1);
+ SET_FLAG(0xdbe5, 1);
}
break;
@@ -372,8 +372,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4662:
- if (CHECK_FLAG(0xDBDD, 3)) {
- if (CHECK_FLAG(0xDBDE, 1)) {
+ if (CHECK_FLAG(0xdbdd, 3)) {
+ if (CHECK_FLAG(0xdbde, 1)) {
displayMessage(0x5608);
} else {
moveTo(280, 179, 2);
@@ -381,7 +381,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 17);
playActorAnimation(827);
inventory->add(0x4d);
- SET_FLAG(0xDBDE, 1);
+ SET_FLAG(0xdbde, 1);
}
} else
displayMessage(0x5905);
@@ -428,7 +428,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4794: // prison cell door
- if (res->dseg.get_byte(0xDBDF) >= 2) {
+ if (res->dseg.get_byte(0xdbdf) >= 2) {
loadScene(5, 287, 143);
} else {
displayMessage(0x592f);
@@ -443,18 +443,18 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x47db: // prison: use switch
- if (CHECK_FLAG(0xDBDF, 1)) {
+ if (CHECK_FLAG(0xdbdf, 1)) {
playSound(71, 4);
playActorAnimation(823);
- if (CHECK_FLAG(0xDBDD, 0)) {
+ if (CHECK_FLAG(0xdbdd, 0)) {
displayMessage(0x4d80);
} else {
playSound(74, 1);
playAnimation(824, 1);
- if (CHECK_FLAG(0xDBDD, 1)) {
+ if (CHECK_FLAG(0xdbdd, 1)) {
wait(100);
displayMessage(0x559a);
- SET_FLAG(0xDBDD, 2);
+ SET_FLAG(0xdbdd, 2);
}
}
} else {
@@ -468,8 +468,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4893: // taking pills
- if (CHECK_FLAG(0xDBE6, 1)) {
- SET_FLAG(0xDBE6, 2);
+ if (CHECK_FLAG(0xdbe6, 1)) {
+ SET_FLAG(0xdbe6, 2);
setOns(1, 0x67);
playSound(5, 9);
playActorAnimation(872);
@@ -482,9 +482,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4918: // talking with barmen
- if (CHECK_FLAG(0xDBE7, 1)) {
+ if (CHECK_FLAG(0xdbe7, 1)) {
moveTo(140, 152, 1);
- if (CHECK_FLAG(0xDBE8, 1)) {
+ if (CHECK_FLAG(0xdbe8, 1)) {
dialog->showMono(177, scene, 0, 0xd1, 0);
displayMessage(0x5883, 0xef, 21472);
//reloadLan();
@@ -498,15 +498,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
shakeScreen();
disableObject(1);
disableObject(2);
- SET_FLAG(0xDBE9, 1);
+ SET_FLAG(0xdbe9, 1);
} else
displayMessage(0x5855);
} else {
- if (CHECK_FLAG(0xDBDF, 3)) {
- if (CHECK_FLAG(0xDBE3, 1)) {
+ if (CHECK_FLAG(0xdbdf, 3)) {
+ if (CHECK_FLAG(0xdbe3, 1)) {
dialog->show(168, scene, 0, 857, 0xd1, 0xef, 0, 1);
} else {
- dialog->show(166, scene, 0, 857, 0xd1, 0xef, 0, 1); //taking mug
+ dialog->show(166, scene, 0, 857, 0xd1, 0xef, 0, 1); // taking mug
playActorAnimation(859, true);
playAnimation(858, 0, true);
waitAnimation();
@@ -514,21 +514,21 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(860);
dialog->show(167, scene, 0, 857, 0xd1, 0xef, 0, 1);
inventory->add(0x55);
- SET_FLAG(0xDBE3, 1);
- SET_FLAG(0xDBF0, 0);
+ SET_FLAG(0xdbe3, 1);
+ SET_FLAG(0xdbf0, 0);
}
} else {
- dialog->pop(scene, 0xDB68, 0, 857, 0xd1, 0xef, 0, 1);
+ dialog->pop(scene, 0xdb68, 0, 857, 0xd1, 0xef, 0, 1);
}
}
break;
case 0x4f14: // use the hollow
- displayMessage(CHECK_FLAG(0xDBA1, 1) ? 0x370f : 0x36c2);
+ displayMessage(CHECK_FLAG(0xdba1, 1) ? 0x370f : 0x36c2);
break;
case 0x4a64:
- if (CHECK_FLAG(0xDBF0, 1)) {
+ if (CHECK_FLAG(0xdbf0, 1)) {
displayMessage(0x5e25);
} else {
loadScene(5, 35, 162);
@@ -559,14 +559,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4a8c:
- if (CHECK_FLAG(0xDBE9, 1)) {
+ if (CHECK_FLAG(0xdbe9, 1)) {
playSound(89, 5);
playActorAnimation(958);
loadScene(9, 240, 182, 4);
- } else if (CHECK_FLAG(0xDBE7, 1)) {
+ } else if (CHECK_FLAG(0xdbe7, 1)) {
displayMessage(0x5894);
} else {
- dialog->pop(scene, 0xDB8A, 0, 857, 0xd1, 0xef, 0, 1);
+ dialog->pop(scene, 0xdb8a, 0, 857, 0xd1, 0xef, 0, 1);
}
break;
@@ -608,15 +608,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(863, 1);
inventory->add(0x54);
disableObject(1);
- SET_FLAG(0xDBE2, 2);
+ SET_FLAG(0xdbe2, 2);
break;
case 0x4c70:
- if (CHECK_FLAG(0xDBE2, 0)) {
- if (CHECK_FLAG(0xDBDA, 1)) { // papers are shown
- dialog->pop(scene, 0xDB4C, 0, 809, 0xd1, 0xd0, 0, 1);
+ if (CHECK_FLAG(0xdbe2, 0)) {
+ if (CHECK_FLAG(0xdbda, 1)) { // papers are shown
+ dialog->pop(scene, 0xdb4c, 0, 809, 0xd1, 0xd0, 0, 1);
} else {
- dialog->pop(scene, 0xDB40, 0, 809, 0xd1, 0xd0, 0, 1);
+ dialog->pop(scene, 0xdb40, 0, 809, 0xd1, 0xd0, 0, 1);
}
} else {
displayMessage(0x5722);
@@ -631,12 +631,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4cac:
- if (CHECK_FLAG(0xdbda, 1)) { //papers are shown
+ if (CHECK_FLAG(0xdbda, 1)) { // papers are shown
loadScene(5, 124, 199);
} else {
dialog->show(144, scene, 0, 809, 0xd1, 0xd0, 0, 1);
moveTo(269, 175, 4);
- dialog->pop(scene, 0xDB56, 0, 809, 0xd1, 0xd0, 0, 1);
+ dialog->pop(scene, 0xdb56, 0, 809, 0xd1, 0xd0, 0, 1);
}
break;
@@ -668,7 +668,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(2, 50);
dialog->show(88, scene, 0, 666, 0xd1, 0xd0, 0, 2);
setOns(3, 0);
- setFlag(0xDBEC, 0);
+ setFlag(0xdbec, 0);
reloadLan();
playSound(82, 19);
playAnimation(669, 1);
@@ -713,8 +713,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x4f32: // use tree near the mansion
- if (CHECK_FLAG(0xDBA1, 1)) {
- if (CHECK_FLAG(0xDBA2, 1)) {
+ if (CHECK_FLAG(0xdba1, 1)) {
+ if (CHECK_FLAG(0xdba2, 1)) {
displayMessage(0x3766);
} else {
playSound(26, 13);
@@ -731,7 +731,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(591);
wait(50);
displayMessage(0x372e);
- SET_FLAG(0xDBA2, 1);
+ SET_FLAG(0xdba2, 1);
processCallback(0x9d45);
}
} else {
@@ -748,10 +748,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x500d: // picking up wild plant
- if (CHECK_FLAG(0xDB9E, 1)) {
- displayMessage(0x35E8); // there are no more
+ if (CHECK_FLAG(0xdb9e, 1)) {
+ displayMessage(0x35e8); // there are no more
} else {
- SET_FLAG(0xDB9E, 1);
+ SET_FLAG(0xdb9e, 1);
setOns(2, 0);
playSound(21, 9);
playSound(34, 21);
@@ -764,7 +764,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x5104:
loadScene(11, 319, 198, 4);
- if (!CHECK_FLAG(0xDB9C, 1)) {
+ if (!CHECK_FLAG(0xdb9c, 1)) {
// guard is drinking
SET_FLAG(0, 3);
setTimerCallback(0x516d, 40);
@@ -780,7 +780,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
SET_FLAG(0, 0);
setTimerCallback(0, 0);
scene->getAnimation(0)->free();
- SET_FLAG(0xDB9C, 1);
+ SET_FLAG(0xdb9c, 1);
displayAsyncMessage(0x3563, 320 * 130 + 300, 1, 5);
setOns(0, 16);
@@ -790,8 +790,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(545, 0);
dialog->show(5, scene, 0, 546, 0xd1, 0xd9, 0, 1);
- SET_FLAG(0xDA96, 1);
- SET_FLAG(0xDA97, 0);
+ SET_FLAG(0xda96, 1);
+ SET_FLAG(0xda97, 0);
break;
case 0x51f0:
@@ -803,14 +803,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5217:
- displayMessage(CHECK_FLAG(0xDB9F, 1) ? 0x402e : 0x34e1);
+ displayMessage(CHECK_FLAG(0xdb9f, 1) ? 0x402e : 0x34e1);
break;
case 0x5237:
- if (!CHECK_FLAG(0xDB9F, 1)) {
+ if (!CHECK_FLAG(0xdb9f, 1)) {
displayMessage(0x34e1);
- } else if (CHECK_FLAG(0xDBA0, 1))
- displayMessage(0x3E31);
+ } else if (CHECK_FLAG(0xdba0, 1))
+ displayMessage(0x3e31);
else {
moveTo(173, 138, 2);
playSound(28, 5);
@@ -828,37 +828,38 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(586);
moveTo(138, 163, 3);
displayMessage(0x3650);
- SET_FLAG(0xDBA0, 1);
+ SET_FLAG(0xdba0, 1);
processCallback(0x9d45); // another mansion try
}
break;
- case 0x55a8: {
- uint16 d = dialog->pop(scene, 0xdb08, 0, 0, 0xd1, 0xd1, 0, 0);
- if (d == 0x2c5d) {
- waitLanAnimationFrame(1, 0x23);
- setOns(0, 0);
- playSound(52, 9);
- playSound(52, 11);
- playSound(52, 13);
- playSound(53, 32);
- playAnimation(570, 0);
- wait(50);
- displayMessage(0x551f);
- disableObject(5);
- SET_FLAG(0xDBB0, 1);
- } else if (d != 0x2c9b) {
- waitLanAnimationFrame(1, 0x23);
- playSound(52, 9);
- playSound(52, 11);
- playSound(52, 13);
- playAnimation(569, 0);
+ case 0x55a8:
+ {
+ uint16 d = dialog->pop(scene, 0xdb08, 0, 0, 0xd1, 0xd1, 0, 0);
+ if (d == 0x2c5d) {
+ waitLanAnimationFrame(1, 0x23);
+ setOns(0, 0);
+ playSound(52, 9);
+ playSound(52, 11);
+ playSound(52, 13);
+ playSound(53, 32);
+ playAnimation(570, 0);
+ wait(50);
+ displayMessage(0x551f);
+ disableObject(5);
+ SET_FLAG(0xdbb0, 1);
+ } else if (d != 0x2c9b) {
+ waitLanAnimationFrame(1, 0x23);
+ playSound(52, 9);
+ playSound(52, 11);
+ playSound(52, 13);
+ playAnimation(569, 0);
+ }
}
- }
break;
case 0x5663:
- displayMessage(CHECK_FLAG(0xDBB0, 1) ? 0x41b1 : 0x417e);
+ displayMessage(CHECK_FLAG(0xdbb0, 1) ? 0x41b1 : 0x417e);
break;
case 0x569c:
@@ -883,12 +884,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5793:
- if (!CHECK_FLAG(0xDB94, 1)) {
+ if (!CHECK_FLAG(0xdb94, 1)) {
displayMessage(0x3e63);
- } else if (CHECK_FLAG(0xDB95, 1)) {
+ } else if (CHECK_FLAG(0xdb95, 1)) {
displayMessage(0x3e75);
} else {
- SET_FLAG(0xDB95, 1);
+ SET_FLAG(0xdb95, 1);
moveTo(188, 179, 0);
playSound(7, 16);
playActorAnimation(519);
@@ -899,10 +900,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5d88:
- if (CHECK_FLAG(0xDBA5, 1)) { // dry laundry
- SET_FLAG(0xDBA5, 2);
+ if (CHECK_FLAG(0xdba5, 1)) { // dry laundry
+ SET_FLAG(0xdba5, 2);
dialog->show(46, scene, 0, 523, 0xd1, 0xe5, 0, 1);
- //waitLanAnimationFrame(1, 1); //another long waiting
+ //waitLanAnimationFrame(1, 1); // another long waiting
playAnimation(604, 0);
loadScene(21, scene->getPosition());
@@ -921,14 +922,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(100);
moveRel(0, 0, 3);
wait(50);
- displayMessage(0x34d5); //I give up
+ displayMessage(0x34d5); // I give up
wait(50);
}
}
break;
case 0x5ff3: // get duster
- if (CHECK_FLAG(0xDB9A, 0)) {
+ if (CHECK_FLAG(0xdb9a, 0)) {
dialog->pop(scene, 0xdaf6, 0, 523, 0xd1, 0xe5, 0, 1);
} else {
dialog->show(43, scene, 0, 523, 0xd1, 0xe5, 0, 1);
@@ -942,7 +943,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x603e:
- if (CHECK_FLAG(0xDBB3, 1)) {
+ if (CHECK_FLAG(0xdbb3, 1)) {
displayMessage(0x44a7);
} else {
displayMessage(0x4412);
@@ -953,26 +954,26 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(150);
displayMessage(0x4492);
wait(150);
- SET_FLAG(0xDBB3, 1);
+ SET_FLAG(0xdbb3, 1);
}
break;
case 0x6205:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
displayMessage(0x450e);
else
processCallback(0x61fe);
break;
case 0x6217:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
displayMessage(0x44d6);
else
processCallback(0x61fe);
break;
case 0x62c1:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
retVal = false;
else
processCallback(0x61fe);
@@ -997,14 +998,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6507:
- if (CHECK_FLAG(0xDB96, 1))
+ if (CHECK_FLAG(0xdb96, 1))
rejectMessage();
else
displayMessage(0x47e7);
break;
case 0x65c3:
- if (CHECK_FLAG(0xDBA9, 1)) {
+ if (CHECK_FLAG(0xdba9, 1)) {
playActorAnimation(635);
setOns(5, 0);
playSound(63, 11);
@@ -1015,8 +1016,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
inventory->add(48);
moveTo(scene->getPosition().x - 1, 139, 1, true);
displayMessage(0x3b83);
- SET_FLAG(0xDBA9, 2);
- SET_FLAG(0xDBA8, 0);
+ SET_FLAG(0xdba9, 2);
+ SET_FLAG(0xdba8, 0);
} else
displayMessage(0x4808);
break;
@@ -1030,9 +1031,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x7878:
{
- byte v = res->dseg.get_byte(0xDBDB) + 1;
+ byte v = res->dseg.get_byte(0xdbdb) + 1;
if (v <= 6)
- SET_FLAG(0xDBDB, v);
+ SET_FLAG(0xdbdb, v);
switch (v) {
case 1:
@@ -1058,21 +1059,21 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x78a9:
- if (CHECK_FLAG(0xDBE6, 1))
+ if (CHECK_FLAG(0xdbe6, 1))
displayMessage(0x5827);
else
retVal = false;
break;
case 0x78bb:
- if (CHECK_FLAG(0xDBE8, 1))
+ if (CHECK_FLAG(0xdbe8, 1))
displayMessage(0x58b0);
else
retVal = false;
break;
case 0x78ce:
- if (!CHECK_FLAG(0xDBA1, 1))
+ if (!CHECK_FLAG(0xdba1, 1))
displayMessage(0x3694);
else
retVal = false;
@@ -1080,15 +1081,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x792b: // left click on ann
moveTo(245, 198, 1);
- if (!CHECK_FLAG(0xDBAF, 1)) {
+ if (!CHECK_FLAG(0xdbaf, 1)) {
dialog->showMono(50, scene, 0, 0xd1, 0);
- SET_FLAG(0xDBAF, 1);
+ SET_FLAG(0xdbaf, 1);
} else
retVal = false;
break;
case 0x79c3:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
retVal = false;
else
processCallback(0x61fe);
@@ -1107,11 +1108,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(0, 0x60);
moveTo(281, scene->getPosition().y, 0, true);
disableObject(4);
- SET_FLAG(0xDBE1, 1);
+ SET_FLAG(0xdbe1, 1);
break;
case 0x7b89: // digging mysterious object
- if (CHECK_FLAG(0xDBE1, 1)) {
+ if (CHECK_FLAG(0xdbe1, 1)) {
playActorAnimation(844);
setOns(1, 0);
playSound(5, 5);
@@ -1173,7 +1174,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7d1a: // captain's key + door
- if (res->dseg.get_byte(0xDBDF) <= 1) {
+ if (res->dseg.get_byte(0xdbdf) <= 1) {
playSound(5, 2);
playSound(57, 12);
playSound(70, 19);
@@ -1200,7 +1201,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
//playAnimation(831, 1);
- SET_FLAG(0xDBDF, 2);
+ SET_FLAG(0xdbdf, 2);
} else
displayMessage(0x52f6);
@@ -1242,8 +1243,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
moveTo(30, 181, 0);
disableObject(1);
setLan(1, 0);
- SET_FLAG(0xDBDF, 3);
- SET_FLAG(0xDBF0, 1);
+ SET_FLAG(0xdbdf, 3);
+ SET_FLAG(0xdbf0, 1);
loadScene(8, 155, 199);
break;
@@ -1263,7 +1264,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
//playAnimation(879, 0); // background bartender animation
inventory->remove(0x5c);
enableObject(1);
- SET_FLAG(0xDBE7, 1);
+ SET_FLAG(0xdbe7, 1);
break;
case 0x8047:
@@ -1274,20 +1275,20 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(2, 0x6b);
inventory->remove(0x56);
inventory->add(0x55);
- SET_FLAG(0xDBE8, 1);
+ SET_FLAG(0xdbe8, 1);
break;
case 0x808b:
- if (CHECK_FLAG(0xDBDA, 1)) {
+ if (CHECK_FLAG(0xdbda, 1)) {
// already shown
- displayMessage(0x53F2);
+ displayMessage(0x53f2);
} else {
- displayMessage(0x53DD);
+ displayMessage(0x53dd);
playSound(5, 2);
playSound(5, 18);
playActorAnimation(810);
dialog->show(147, scene, 0, 809, 0xd1, 0xd0, 0, 1);
- SET_FLAG(0xDBDA, 1);
+ SET_FLAG(0xdbda, 1);
}
break;
@@ -1305,7 +1306,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
inventory->add(0x53);
inventory->remove(0x52);
enableObject(1);
- SET_FLAG(0xDBE2, 1);
+ SET_FLAG(0xdbe2, 1);
break;
// Shore
@@ -1314,7 +1315,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
if (CHECK_FLAG(0xdb99, 1)) { // got broken paddle from boat
displayMessage(0x351f);
} else {
- SET_FLAG(0xDB99, 1);
+ SET_FLAG(0xdb99, 1);
playSound(57, 6);
playActorAnimation(536);
dialog->showMono(77, scene, 0, 0xd1, 0);
@@ -1336,7 +1337,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
displayMessage(0x410f, 0xe5, 52712);
wait(100);
displayMessage(0x4091, 0xe5, 52728);
- SET_FLAG(0xDBB2, 1);
+ SET_FLAG(0xdbb2, 1);
}
break;
@@ -1351,8 +1352,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
byte *scene_15_ons = scene->getOns(15); // patch ons for the scene 15
scene_15_ons[0] = 0;
- byte f = GET_FLAG(0xDB98) + 1;
- SET_FLAG(0xDB98, f);
+ byte f = GET_FLAG(0xdb98) + 1;
+ SET_FLAG(0xdb98, f);
if (f >= 2) {
// disable object boat for scene 15!!
disableObject(1, 15);
@@ -1370,8 +1371,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
disableObject(2);
setOns(1, 10);
setOns(1, 0, 15);
- byte f = GET_FLAG(0xDB98) + 1;
- SET_FLAG(0xDB98, f);
+ byte f = GET_FLAG(0xdb98) + 1;
+ SET_FLAG(0xdb98, f);
if (f >= 2) {
// disable object boat for scene 15!!
disableObject(1, 15);
@@ -1457,7 +1458,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x58df: // Pull trunk lever in car
- SET_FLAG(0xDB94, 1);
+ SET_FLAG(0xdb94, 1);
playSound(6, 1);
setOns(3, 6);
playActorAnimation(515);
@@ -1467,7 +1468,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(89, 4);
playActorAnimation(980);
loadScene(23, 76, 199, 1);
- if (CHECK_FLAG(0xDBEE, 1))
+ if (CHECK_FLAG(0xdbee, 1))
playMusic(7);
break;
@@ -1490,12 +1491,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(52, 25);
playActorAnimation(601);
moveTo(230, 179, 3);
- if (!CHECK_FLAG(0xDBA4, 1))
+ if (!CHECK_FLAG(0xdba4, 1))
displayMessage(0x37ea); // it's kinda dark here
break;
case 0x5a8b:
- if (!CHECK_FLAG(0xDBAD, 1)) {
+ if (!CHECK_FLAG(0xdbad, 1)) {
playSound(43, 4); // grrrrrr
playSound(42, 15);
playSound(42, 17);
@@ -1503,17 +1504,17 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(656, 0);
wait(50);
displayMessage(0x3c16);
- } else if (!CHECK_FLAG(0xDBA3, 1)) { // Dog has bone
+ } else if (!CHECK_FLAG(0xdba3, 1)) { // Dog has bone
playSound(28, 3);
playActorAnimation(596);
setOns(1, 30);
- SET_FLAG(0xDBA3, 1);
+ SET_FLAG(0xdba3, 1);
enableObject(8);
} else {
setOns(1, 0);
playSound(4, 4);
playActorAnimation(597);
- SET_FLAG(0xDBA3, 0);
+ SET_FLAG(0xdba3, 0);
disableObject(8);
displayMessage(0x37b8);
setOns(1, 32, 24);
@@ -1522,7 +1523,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5b3a: // Click on dog
- dialog->popMark(scene, 0xDB14);
+ dialog->popMark(scene, 0xdb14);
break;
case 0x5b59: // picking up the rope
@@ -1544,7 +1545,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5be1: // Talk to grandpa
- dialog->pop(scene, 0xDAC4, 0, 522, 0xd1, 0xd8, 0, 1);
+ dialog->pop(scene, 0xdac4, 0, 522, 0xd1, 0xd8, 0, 1);
break;
case 0x5bee:
@@ -1555,10 +1556,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5c0d: // grandpa - drawers
- if (CHECK_FLAG(0xDBA7, 1)) {
+ if (CHECK_FLAG(0xdba7, 1)) {
displayMessage(0x3bac);
} else {
- if (!CHECK_FLAG(0xDB92, 1))
+ if (!CHECK_FLAG(0xdb92, 1))
dialog->show(24, scene, 0, 522, 0xd1, 0xd8, 0, 1);
playSound(66, 5);
@@ -1566,19 +1567,19 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 23);
playActorAnimation(631);
inventory->add(47);
- SET_FLAG(0xDBA7, 1);
+ SET_FLAG(0xdba7, 1);
}
break;
case 0x5c84:
- if (CHECK_FLAG(0xDB92, 1)) {
+ if (CHECK_FLAG(0xdb92, 1)) {
inventory->add(2);
disableObject(7);
playSound(32, 7);
setOns(0, 0);
playActorAnimation(520);
} else {
- dialog->pop(scene, 0xDACE, 0, 522, 0xd1, 0xd8, 0, 1);
+ dialog->pop(scene, 0xdace, 0, 522, 0xd1, 0xd8, 0, 1);
}
break;
@@ -1589,31 +1590,31 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5d24: // getting the fan
- if (CHECK_FLAG(0xDB92, 1)) {
+ if (CHECK_FLAG(0xdb92, 1)) {
setLan(2, 0);
playSound(32, 7);
playActorAnimation(508);
disableObject(13);
inventory->add(7);
} else {
- dialog->pop(scene, 0xDAD4, 0, 522, 0xd1, 0xd8, 0, 1);
+ dialog->pop(scene, 0xdad4, 0, 522, 0xd1, 0xd8, 0, 1);
}
break;
case 0x5e4d: // right click on ann
- if (!CHECK_FLAG(0xDB97, 0)) {
+ if (!CHECK_FLAG(0xdb97, 0)) {
displayMessage(0x3d59);
} else {
moveTo(245, 198, 1);
dialog->show(51, scene, 0, 524, 0xd1, 0xe5, 0, 2);
- //waitLanAnimationFrame(2, 1); //too long, about 200 frames! seems to be present in original game (sic)
- SET_FLAG(0xDB97, 1);
+ //waitLanAnimationFrame(2, 1); // too long, about 200 frames! seems to be present in original game (sic)
+ SET_FLAG(0xdb97, 1);
for (byte i = 10; i <= 20; i += 2)
playSound(13, i);
playAnimation(528, 1);
wait(50);
playMusic(7);
- SET_FLAG(0xDBEE, 1);
+ SET_FLAG(0xdbee, 1);
for (byte i = 3; i <= 17; i += 2)
playSound(56, i);
playActorAnimation(525);
@@ -1633,16 +1634,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x5f73: // exiting ann's house
- if (CHECK_FLAG(0xDBEE, 1))
+ if (CHECK_FLAG(0xdbee, 1))
playMusic(6);
loadScene(21, 99, 180, 3);
break;
case 0x5fba:
- if (CHECK_FLAG(0xDBB1, 1)) {
+ if (CHECK_FLAG(0xdbb1, 1)) {
displayMessage(0x4380);
} else {
- dialog->pop(scene, 0xDAFC, 0, 523, 0xd1, 0xe5, 0, 1);
+ dialog->pop(scene, 0xdafc, 0, 523, 0xd1, 0xe5, 0, 1);
}
break;
@@ -1651,7 +1652,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6083:
- if (CHECK_FLAG(0xDBA4, 1)) {
+ if (CHECK_FLAG(0xdba4, 1)) {
setOns(0, 0);
playSound(56, 10);
playActorAnimation(599);
@@ -1662,7 +1663,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x60b5:
- if (CHECK_FLAG(0xDBAE, 1)) {
+ if (CHECK_FLAG(0xdbae, 1)) {
processCallback(0x60d9);
dialog->showMark(75, scene);
} else {
@@ -1695,7 +1696,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6176:
- if (CHECK_FLAG(0xDBA4, 1)) {
+ if (CHECK_FLAG(0xdba4, 1)) {
displayMessage(0x3801);
} else {
playSound(71, 6);
@@ -1705,22 +1706,22 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setLan(1, 0);
playAnimation(660, 0);
disableObject(1);
- SET_FLAG(0xDBA4, 1);
+ SET_FLAG(0xdba4, 1);
loadScene(24, scene->getPosition());
}
break;
case 0x61e9:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
dialog->popMark(scene, 0xdb1e);
else
processCallback(0x61fe);
break;
case 0x6229: // shelves in cellar
- if (CHECK_FLAG(0xDBA4, 1)) {
+ if (CHECK_FLAG(0xdba4, 1)) {
Common::Point p = scene->getPosition();
- byte v = GET_FLAG(0xDBB4);
+ byte v = GET_FLAG(0xdbb4);
switch (v) {
case 0:
displayMessage(0x4532);
@@ -1734,13 +1735,13 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
displayMessage(0x458e);
moveTo(p, 3);
displayMessage(0x459f);
- SET_FLAG(0xDBB4, 1);
+ SET_FLAG(0xdbb4, 1);
break;
case 1:
displayMessage(0x45b8);
wait(100);
displayMessage(0x45da);
- SET_FLAG(0xDBB4, 2);
+ SET_FLAG(0xdbb4, 2);
break;
default:
displayMessage(0x4603);
@@ -1751,7 +1752,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6480: // dive mask
- if (CHECK_FLAG(0xDB96, 1)) {
+ if (CHECK_FLAG(0xdb96, 1)) {
playSound(56, 7);
playSound(5, 15);
playActorAnimation(613);
@@ -1764,7 +1765,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x64c4: // flippers
- if (CHECK_FLAG(0xDB96, 1)) {
+ if (CHECK_FLAG(0xdb96, 1)) {
setOns(2, 35);
playSound(63, 8);
playSound(24, 10);
@@ -1799,7 +1800,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6351:
- if (CHECK_FLAG(0xdaca, 1)) { //cave bush is cut down
+ if (CHECK_FLAG(0xdaca, 1)) { // cave bush is cut down
playMusic(8);
loadScene(26, 319, 169, 4);
} else
@@ -1815,7 +1816,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6411: // Kick hen
- if (CHECK_FLAG(0xdb93, 1)) { //already kicked hen
+ if (CHECK_FLAG(0xdb93, 1)) { // already kicked hen
displayMessage(0x3e08);
} else {
SET_FLAG(0xdb93, 1);
@@ -1898,15 +1899,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x71ae:
- if (CHECK_FLAG(0xDBCD, 1)) {
- if (CHECK_FLAG(0xDBCE, 1)) {
+ if (CHECK_FLAG(0xdbcd, 1)) {
+ if (CHECK_FLAG(0xdbce, 1)) {
displayMessage(0x4f9b);
} else {
displayMessage(0x4fb1);
playSound(32, 6);
playActorAnimation(717);
inventory->add(66);
- SET_FLAG(0xDBCE, 1);
+ SET_FLAG(0xdbce, 1);
}
} else
dialog->showMark(97, scene);
@@ -1920,7 +1921,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x70e0:
- if (!CHECK_FLAG(0xDBCC, 1)) {
+ if (!CHECK_FLAG(0xdbcc, 1)) {
displayMessage(0x4ece);
retVal = false;
}
@@ -1942,7 +1943,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x712c:
if (processCallback(0x70e0)) {
- if (CHECK_FLAG(0xDBCF, 1)) {
+ if (CHECK_FLAG(0xdbcf, 1)) {
playSound(89, 4);
playActorAnimation(719);
setOns(4, 67);
@@ -1957,7 +1958,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(718);
wait(100);
displayMessage(0x4fe2);
- SET_FLAG(0xDBCF, 1);
+ SET_FLAG(0xdbcf, 1);
}
}
break;
@@ -1977,7 +1978,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7255:
- if (CHECK_FLAG(0xDBD0, 1)) {
+ if (CHECK_FLAG(0xdbd0, 1)) {
setOns(4, 69);
playSound(32, 5);
playActorAnimation(725);
@@ -2014,7 +2015,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7408:
- if (CHECK_FLAG(0xDBC4, 1)) {
+ if (CHECK_FLAG(0xdbc4, 1)) {
displayMessage(0x4d2a);
} else {
setOns(0, 0);
@@ -2029,15 +2030,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(2, 61);
dialog->showMark(92, scene);
enableObject(11);
- SET_FLAG(0xDBC4, 1);
+ SET_FLAG(0xdbc4, 1);
}
break;
case 0x7476:
- if (CHECK_FLAG(0xDBC9, 1)) {
+ if (CHECK_FLAG(0xdbc9, 1)) {
displayMessage(0x4dbb);
} else {
- SET_FLAG(0xDBC9, 1);
+ SET_FLAG(0xdbc9, 1);
dialog->showMark(94, scene);
playSound(61, 5);
playSound(5, 14);
@@ -2056,8 +2057,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7513: // fatso + doctor: pre-final
- if (CHECK_FLAG(0xDBD7, 1)) {
- if (CHECK_FLAG(0xDBD8, 1)) {
+ if (CHECK_FLAG(0xdbd7, 1)) {
+ if (CHECK_FLAG(0xdbd8, 1)) {
playSound(88, 4);
playActorAnimation(979);
loadScene(37, 51, 183);
@@ -2083,7 +2084,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(771, 1, true, true, true);
playAnimation(776, 0);
- dialog->show(128, scene, 777, 778, 0xd0, 0xe5, 1, 2); //i have to kill you anyway
+ dialog->show(128, scene, 777, 778, 0xd0, 0xe5, 1, 2);
playAnimation(779, 0, true, true, true);
playAnimation(780, 1, true, true, true);
@@ -2150,7 +2151,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(0, 3);
loadScene(31, 298, 177, 4);
- SET_FLAG(0xDBD9, 1);
+ SET_FLAG(0xdbd9, 1);
} else
displayMessage(0x52fe);
} else
@@ -2162,7 +2163,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7966:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
retVal = false;
else
retVal = processCallback(0x60b5);
@@ -2174,11 +2175,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7ab9:
- if (CHECK_FLAG(0xDBB6, 1))
+ if (CHECK_FLAG(0xdbb6, 1))
retVal = false;
else {
dialog->showMono(90, scene, 0, 0xd1, 0);
- SET_FLAG(0xDBB6, 1);
+ SET_FLAG(0xdbb6, 1);
}
break;
@@ -2189,8 +2190,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
retVal = false;
break;
- case 0x7f23://Use grenade on captains drawer
- if (CHECK_FLAG(0xDBDF, 3)) {
+ case 0x7f23: // Use grenade on captains drawer
+ if (CHECK_FLAG(0xdbdf, 3)) {
enableOn(false);
playSound(5, 3);
playSound(58, 11);
@@ -2200,7 +2201,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(870);
playSound(54, 15);
playActorAnimation(871);
- SET_FLAG(0xDBE6, 1);
+ SET_FLAG(0xdbe6, 1);
setOns(1, 0x66);
moveTo(224, 194, 0, true);
displayCutsceneMessage(0x57df, 30423);
@@ -2231,14 +2232,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7802:
- if (CHECK_FLAG(0xDBD7, 1)) {
- if (CHECK_FLAG(0xDBD8, 1))
+ if (CHECK_FLAG(0xdbd7, 1)) {
+ if (CHECK_FLAG(0xdbd8, 1))
displayMessage(0x52f6);
else {
playSound(71, 4);
playActorAnimation(796);
setLan(1, 0);
- SET_FLAG(0xDBD8, 1);
+ SET_FLAG(0xdbd8, 1);
}
} else
displayMessage(0x52cb);
@@ -2260,28 +2261,28 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x78f5:
- if (CHECK_FLAG(0xDB95, 1)) {
+ if (CHECK_FLAG(0xdb95, 1)) {
displayMessage(0x3575);
} else
retVal = false;
break;
case 0x7919:
- if (!CHECK_FLAG(0xDBA5, 1))
+ if (!CHECK_FLAG(0xdba5, 1))
retVal = false;
else
- displayMessage(0x3E98);
+ displayMessage(0x3e98);
break;
case 0x7950:
- if (!CHECK_FLAG(0xDBB1, 1))
+ if (!CHECK_FLAG(0xdbb1, 1))
retVal = false;
else
- displayMessage(0x3DAF);
+ displayMessage(0x3daf);
break;
case 0x7975:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
retVal = false;
else
displayMessage(0x3832);
@@ -2291,14 +2292,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x7996:
case 0x79a5:
case 0x79b4:
- if (CHECK_FLAG(0xDBA4, 1))
+ if (CHECK_FLAG(0xdba4, 1))
retVal = false;
else
retVal = processCallback(0x61fe);
break;
case 0x79d2:
- if (!CHECK_FLAG(0xDB9D, 1))
+ if (!CHECK_FLAG(0xdb9d, 1))
retVal = false;
else
displayMessage(0x3590);
@@ -2356,7 +2357,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(50);
displayMessage(0x367f);
inventory->remove(34);
- SET_FLAG(0xDBA1, 1);
+ SET_FLAG(0xdba1, 1);
break;
case 0x823d: // grappling hook on the wall
@@ -2437,7 +2438,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(55, 18);
playAnimation(581, 1);
disableObject(2);
- SET_FLAG(0xDB9F, 1);
+ SET_FLAG(0xdb9f, 1);
break;
case 0x84c7: // using paddle on boat
@@ -2456,7 +2457,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x8538: // Sharpen sickle on well
moveTo(236, 190, 0);
setOns(2, 0);
- //TODO: Remove handle sprite
+ // TODO: Remove handle sprite
playSound(5, 4);
playSound(14, 14);
playSound(14, 33);
@@ -2469,14 +2470,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x85eb:
- if (CHECK_FLAG(0xDBB0, 1)) {
+ if (CHECK_FLAG(0xdbb0, 1)) {
enableObject(6);
playSound(25, 10);
playSound(25, 14);
playSound(25, 18);
playActorAnimation(559);
setOns(1, 23);
- SET_FLAG(0xDBB0, 2);
+ SET_FLAG(0xdbb0, 2);
} else
displayMessage(0x3d86);
break;
@@ -2500,14 +2501,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x862c:
- displayMessage(CHECK_FLAG(0xDBB0, 1) ? 0x4882 : 0x3457);
+ displayMessage(CHECK_FLAG(0xdbb0, 1) ? 0x4882 : 0x3457);
break;
case 0x86a9: // correcting height of the pole with spanner
- if (CHECK_FLAG(0xDB92, 1)) {
+ if (CHECK_FLAG(0xdb92, 1)) {
displayMessage(0x3d40);
} else {
- SET_FLAG(0xDB92, 1);
+ SET_FLAG(0xdb92, 1);
dialog->show(17, scene, 0, 502, 0xd0, 0xe5, 0, 1);
waitLanAnimationFrame(1, 7);
playSound(5, 16);
@@ -2587,13 +2588,13 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
}
break;
- case 0x88c9: //give flower to old lady
- if (CHECK_FLAG(0xDB9A, 1))
+ case 0x88c9: // give flower to old lady
+ if (CHECK_FLAG(0xdb9a, 1))
retVal = processCallback(0x890b);
else {
inventory->remove(10);
- SET_FLAG(0xDB9A, 1);
- processCallback(0x88DE);
+ SET_FLAG(0xdb9a, 1);
+ processCallback(0x88de);
}
break;
@@ -2608,26 +2609,26 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x890b:
- dialog->pop(scene, 0xDAF0, 0, 523, 0xd1, 0xe5, 0, 1);
+ dialog->pop(scene, 0xdaf0, 0, 523, 0xd1, 0xe5, 0, 1);
break;
- case 0x8918://give flower to old lady
- if (CHECK_FLAG(0xDB9A, 1))
- retVal = processCallback(0x890B);
+ case 0x8918: // give flower to old lady
+ if (CHECK_FLAG(0xdb9a, 1))
+ retVal = processCallback(0x890b);
else {
inventory->remove(11);
- SET_FLAG(0xDB9A, 1);
- processCallback(0x88DE);
+ SET_FLAG(0xdb9a, 1);
+ processCallback(0x88de);
}
break;
case 0x892d:
- if (CHECK_FLAG(0xDB9B, 1))
+ if (CHECK_FLAG(0xdb9b, 1))
retVal = processCallback(0x89aa);
else {
processCallback(0x8942);
inventory->remove(10);
- SET_FLAG(0xDB9B, 1);
+ SET_FLAG(0xdb9b, 1);
}
break;
@@ -2654,12 +2655,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x89b7:
- if (CHECK_FLAG(0xDB9B, 1))
+ if (CHECK_FLAG(0xdb9b, 1))
retVal = processCallback(0x89aa);
else {
processCallback(0x8942);
inventory->remove(11);
- SET_FLAG(0xDB9B, 1);
+ SET_FLAG(0xdb9b, 1);
}
break;
@@ -2685,11 +2686,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(50);
dialog->show(44, scene, 0, 523, 0xd1, 0xe5, 0, 1);
dialog->show(45, scene, 0, 523, 0xd1, 0xe5, 0, 1);
- SET_FLAG(0xDBB1, 1);
+ SET_FLAG(0xdbb1, 1);
break;
case 0x8a6f: // banknote + ann
- if (CHECK_FLAG(0xDBB5, 1)) {
+ if (CHECK_FLAG(0xdbb5, 1)) {
dialog->show(63, scene, 0, 524, 0xd1, 0xe5, 0, 2);
playSound(5, 3);
playSound(5, 20);
@@ -2733,7 +2734,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 3);
playActorAnimation(603);
setOns(0, 27);
- SET_FLAG(0xDBA5, 1);
+ SET_FLAG(0xdba5, 1);
break;
case 0x8bfc: // Give bone to dog
@@ -2748,7 +2749,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(659, 0);
inventory->remove(36);
- SET_FLAG(0xDBAD, 1);
+ SET_FLAG(0xdbad, 1);
{
Object *o = scene->getObject(7);
o->actor_rect.left = o->actor_rect.right = 297;
@@ -2862,7 +2863,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(0, 42);
enableObject(6);
disableObject(5);
- SET_FLAG(0xDBAB, 1);
+ SET_FLAG(0xdbab, 1);
SET_FLAG(0, 0);
setTimerCallback(0, 0);
}
@@ -2884,7 +2885,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
disableObject(2);
disableObject(3);
inventory->remove(2);
- SET_FLAG(0xDB96, 1);
+ SET_FLAG(0xdb96, 1);
break;
case 0x8fc8:
@@ -2897,14 +2898,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(41, 10);
playSound(41, 47);
playSound(55, 52);
- if (CHECK_FLAG(0xDBA8, 1)) {
+ if (CHECK_FLAG(0xdba8, 1)) {
setLan(2, 0);
playActorAnimation(628, true);
playAnimation(634, 1, true);
waitAnimation();
disableObject(4);
displayMessage(0x3b6c);
- SET_FLAG(0xDBA9, 1);
+ SET_FLAG(0xdba9, 1);
} else {
playActorAnimation(628, true);
playAnimation(630, 1, true);
@@ -2914,7 +2915,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x9054: // mouse hole
- if (CHECK_FLAG(0xDBAB, 1)) {
+ if (CHECK_FLAG(0xdbab, 1)) {
displayMessage(0x3c0b);
} else {
playSound(5, 11);
@@ -2923,10 +2924,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(5, 40);
moveTo(239, 139, 0, true);
playActorAnimation(633);
- SET_FLAG(0xDBA8, 1);
+ SET_FLAG(0xdba8, 1);
inventory->remove(47);
- if (!CHECK_FLAG(0xDBAA, 1)) {
- SET_FLAG(0xDBAA, 1);
+ if (!CHECK_FLAG(0xdbaa, 1)) {
+ SET_FLAG(0xdbaa, 1);
displayMessage(0x3b8b);
}
}
@@ -2949,7 +2950,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(74, 25);
playActorAnimation(716);
setOns(1, 66);
- SET_FLAG(0xDBCD, 1);
+ SET_FLAG(0xdbcd, 1);
}
}
break;
@@ -2964,7 +2965,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
}
break;
- case 0x93d5: //burning sheet + plate
+ case 0x93d5: // burning sheet + plate
setOns(4, 0);
playSound(87, 7);
playActorAnimation(722);
@@ -2979,10 +2980,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(4, 68);
displayMessage(0x503e);
inventory->remove(68);
- SET_FLAG(0xDBD0, 1);
+ SET_FLAG(0xdbd0, 1);
break;
- case 0x98fa:// Right click to open toolbox
+ case 0x98fa: // Right click to open toolbox
inventory->remove(3);
inventory->add(4);
inventory->add(35);
@@ -3002,8 +3003,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x671d: // very last part of the game
moveTo(153, 163, 4);
playActorAnimation(973);
- if (CHECK_FLAG(0xDBC1, 0)) {
- SET_FLAG(0xDBC1, _rnd.getRandomNumber(5) + 1);
+ if (CHECK_FLAG(0xdbc1, 0)) {
+ SET_FLAG(0xdbc1, _rnd.getRandomNumber(5) + 1);
}
loadScene(30, 18, 159, 2);
break;
@@ -3037,16 +3038,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x687a: // using the book
- if (CHECK_FLAG(0xDBC2, 1)) {
+ if (CHECK_FLAG(0xdbc2, 1)) {
displayMessage(0x4ca0);
} else {
playSound(49, 5);
playSound(49, 17);
playActorAnimation(691);
if (!processCallback(0x68e6)) {
- if (!CHECK_FLAG(0xDBC0, 1)) {
+ if (!CHECK_FLAG(0xdbc0, 1)) {
displayMessage(0x4c61);
- SET_FLAG(0xDBC0, 1);
+ SET_FLAG(0xdbc0, 1);
}
} else {
playSound(15, 8); // secret compartment
@@ -3054,21 +3055,20 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(6, 59);
enableObject(4);
displayMessage(0x4c84);
- SET_FLAG(0xDBC2, 1);
+ SET_FLAG(0xdbc2, 1);
}
}
break;
case 0x68e6: // checking drawers
{
- uint16 v = GET_FLAG(0xDBC1) - 1;
- uint bx = 0xDBB7;
- if (GET_FLAG(bx + v) != 1)
+ uint16 v = GET_FLAG(0xdbc1) - 1;
+ if (GET_FLAG(0xdbb7 + v) != 1)
retVal = false;
else {
uint16 sum = 0;
for (uint i = 0; i < 6; ++i)
- sum += GET_FLAG(bx + i);
+ sum += GET_FLAG(0xdbb7 + i);
if (sum != 1)
retVal = false;
}
@@ -3079,10 +3079,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
if (inventory->has(55))
displayMessage(0x4cd9);
else {
- if (!CHECK_FLAG(0xDBC3, 1)) {
+ if (!CHECK_FLAG(0xdbc3, 1)) {
playActorAnimation(695);
dialog->showMark(91, scene);
- SET_FLAG(0xDBC3, 1);
+ SET_FLAG(0xdbc3, 1);
}
playSound(5, 11);
@@ -3092,85 +3092,85 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x6962:
- if (CHECK_FLAG(0xDBB7, 1)) {
+ if (CHECK_FLAG(0xdbb7, 1)) {
setOns(0, 0);
playSound(67, 4);
playActorAnimation(678);
- SET_FLAG(0xDBB7, 0);
- } else if (CHECK_FLAG(0xDBB8, 1)) {
+ SET_FLAG(0xdbb7, 0);
+ } else if (CHECK_FLAG(0xdbb8, 1)) {
processCallback(0x6b86);
} else {
playSound(66, 4);
playActorAnimation(677);
setOns(0, 53);
- SET_FLAG(0xDBB7, 1);
+ SET_FLAG(0xdbb7, 1);
}
break;
case 0x69b8:
- if (CHECK_FLAG(0xDBB8, 1)) {
+ if (CHECK_FLAG(0xdbb8, 1)) {
setOns(1, 0);
playSound(67, 4);
playActorAnimation(680);
- SET_FLAG(0xDBB8, 0);
- } else if (CHECK_FLAG(0xDBB7, 1)) {
+ SET_FLAG(0xdbb8, 0);
+ } else if (CHECK_FLAG(0xdbb7, 1)) {
processCallback(0x6b86);
- } else if (CHECK_FLAG(0xDBB9, 1)) {
+ } else if (CHECK_FLAG(0xdbb9, 1)) {
processCallback(0x6b86);
} else {
playSound(66, 5);
playActorAnimation(679);
setOns(1, 54);
- SET_FLAG(0xDBB8, 1);
+ SET_FLAG(0xdbb8, 1);
}
break;
case 0x6a1b:
- if (CHECK_FLAG(0xDBB9, 1)) {
+ if (CHECK_FLAG(0xdbb9, 1)) {
setOns(2, 0);
playSound(67, 5);
playActorAnimation(682);
- SET_FLAG(0xDBB9, 0);
- } else if (CHECK_FLAG(0xDBB8, 1)) {
+ SET_FLAG(0xdbb9, 0);
+ } else if (CHECK_FLAG(0xdbb8, 1)) {
processCallback(0x6b86);
} else {
playSound(67, 5);
playActorAnimation(681);
setOns(2, 55);
- SET_FLAG(0xDBB9, 1);
+ SET_FLAG(0xdbb9, 1);
}
break;
case 0x6a73:
- if (CHECK_FLAG(0xDBBA, 1)) {
+ if (CHECK_FLAG(0xdbba, 1)) {
setOns(3, 0);
playSound(67, 4);
playActorAnimation(684);
- SET_FLAG(0xDBBA, 0);
- } else if (!CHECK_FLAG(0xDBBB, 1)) {
+ SET_FLAG(0xdbba, 0);
+ } else if (!CHECK_FLAG(0xdbbb, 1)) {
playSound(66, 4);
playActorAnimation(683);
setOns(3, 56);
- SET_FLAG(0xDBBA, 1);
+ SET_FLAG(0xdbba, 1);
} else
processCallback(0x6b86);
break;
case 0x6acb:
- if (CHECK_FLAG(0xDBBB, 1)) {
+ if (CHECK_FLAG(0xdbbb, 1)) {
setOns(4, 0);
playSound(67, 4);
playActorAnimation(686);
- SET_FLAG(0xDBBB, 0);
- } else if (CHECK_FLAG(0xDBBA, 1)) {
+ SET_FLAG(0xdbbb, 0);
+ } else if (CHECK_FLAG(0xdbba, 1)) {
processCallback(0x6b86);
- } else if (CHECK_FLAG(0xDBBC, 1)) {
+ } else if (CHECK_FLAG(0xdbbc, 1)) {
processCallback(0x6b86);
} else {
playSound(66, 5);
playActorAnimation(685);
setOns(4, 57);
- SET_FLAG(0xDBBB, 1);
+ SET_FLAG(0xdbbb, 1);
}
break;
@@ -3186,22 +3186,22 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(66, 6);
playActorAnimation(687);
setOns(5, 58);
- SET_FLAG(0xDBBC, 1);
+ SET_FLAG(0xdbbc, 1);
}
break;
case 0x6b86:
- if (CHECK_FLAG(0xDBBD, 1))
+ if (CHECK_FLAG(0xdbbd, 1))
displayMessage(0x4b39);
else {
displayMessage(0x4acd);
displayMessage(0x4b0d);
- SET_FLAG(0xDBBD, 1);
+ SET_FLAG(0xdbbd, 1);
}
break;
case 0x6be1: // handle to the bathroom
- if (CHECK_FLAG(0xDBD9, 1))
+ if (CHECK_FLAG(0xdbd9, 1))
displayMessage(0x5326); // i'd better catch johnny
else {
playSound(88, 4);
@@ -3218,7 +3218,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x6c45:
playSound(89, 6);
- playActorAnimation(CHECK_FLAG(0xDBEF, 1) ? 985 : 806);
+ playActorAnimation(CHECK_FLAG(0xdbef, 1) ? 985 : 806);
loadScene(34, 40, 133, 2);
break;
@@ -3226,7 +3226,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitLanAnimationFrame(1, 1);
dialog->pop(scene, 0xdb2e, 0, 727, 0xd1, 0xef, 0, 1);
scene->getObject(1)->setName((const char *)res->dseg.ptr(0xaa94));
- SET_FLAG(0xDBD1, 1);
+ SET_FLAG(0xdbd1, 1);
break;
case 0x6c9d: // getting jar
@@ -3308,11 +3308,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
disableObject(3);
enableObject(7);
- SET_FLAG(0xDBD5, 1);
+ SET_FLAG(0xdbd5, 1);
break;
case 0x6f20:
- if (CHECK_FLAG(0xDBD5, 1))
+ if (CHECK_FLAG(0xdbd5, 1))
displayMessage(0x51a7);
else
rejectMessage();
@@ -3351,18 +3351,18 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
enableObject(8);
disableObject(7);
- SET_FLAG(0xDBD5, 0);
+ SET_FLAG(0xdbd5, 0);
break;
case 0x6f4d:
- if (CHECK_FLAG(0xDBD5, 1))
+ if (CHECK_FLAG(0xdbd5, 1))
displayMessage(0x51bb);
else
loadScene(31, 139, 172, 3);
break;
case 0x6f32:
- if (CHECK_FLAG(0xDBD5, 1)) {
+ if (CHECK_FLAG(0xdbd5, 1)) {
displayMessage(0x51a7);
} else {
playActorAnimation(977);
@@ -3385,16 +3385,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x72c2:
- if (CHECK_FLAG(0xDBD6, 2)) {
+ if (CHECK_FLAG(0xdbd6, 2)) {
displayMessage(0x522c);
} else {
playSound(79, 6);
playSound(84, 9);
playActorAnimation(801);
wait(50);
- if (CHECK_FLAG(0xDBD6, 1)) {
+ if (CHECK_FLAG(0xdbd6, 1)) {
displayMessage(0x538d);
- SET_FLAG(0xDBD6, 2);
+ SET_FLAG(0xdbd6, 2);
} else
displayMessage(0x5372);
}
@@ -3408,7 +3408,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x77d5:
- if (CHECK_FLAG(0xdbd7, 1) && !CHECK_FLAG(0xdbd8, 1)) { //disallow exiting through the first door until switch turned on, not present in original game
+ if (CHECK_FLAG(0xdbd7, 1) && !CHECK_FLAG(0xdbd8, 1)) { // disallow exiting through the first door until switch turned on, not present in original game
displayMessage(0x52cb);
} else {
playSound(89, 6);
@@ -3422,25 +3422,25 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
retVal = false;
break;
- case 0x79eb: //color of the book
- displayMessage(res->dseg.get_word(0x5f3c + GET_FLAG(0xDBC1) * 2 - 2));
+ case 0x79eb: // color of the book
+ displayMessage(res->dseg.get_word(0x5f3c + GET_FLAG(0xdbc1) * 2 - 2));
break;
case 0x79fd:
- if (CHECK_FLAG(0xDBB7, 1))
+ if (CHECK_FLAG(0xdbb7, 1))
displayMessage(0x4b6c);
else
retVal = false;
break;
case 0x7a0f:
- if (CHECK_FLAG(0xDBB8, 1)) {
- if (!CHECK_FLAG(0xDBBF, 1)) {
+ if (CHECK_FLAG(0xdbb8, 1)) {
+ if (!CHECK_FLAG(0xdbbf, 1)) {
displayMessage(0x4c32);
playSound(5, 11);
playActorAnimation(690);
inventory->add(53);
- SET_FLAG(0xDBBF, 1);
+ SET_FLAG(0xdbbf, 1);
}
displayMessage(0x4b87);
} else
@@ -3448,34 +3448,34 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7a49:
- if (CHECK_FLAG(0xDBB9, 1))
+ if (CHECK_FLAG(0xdbb9, 1))
displayMessage(0x4ba1);
else
retVal = false;
break;
case 0x7a5b:
- if (CHECK_FLAG(0xDBBA, 1))
+ if (CHECK_FLAG(0xdbba, 1))
displayMessage(0x4bbc);
else
retVal = false;
break;
case 0x7a6d:
- if (CHECK_FLAG(0xDBBB, 1))
+ if (CHECK_FLAG(0xdbbb, 1))
displayMessage(0x4bd8);
else
retVal = false;
break;
case 0x7a7f:
- if (CHECK_FLAG(0xDBBC, 1)) {
- if (!CHECK_FLAG(0xDBBE, 1)) {
- displayMessage(0x4c0f); //there's dictaphone inside!
+ if (CHECK_FLAG(0xdbbc, 1)) {
+ if (!CHECK_FLAG(0xdbbe, 1)) {
+ displayMessage(0x4c0f); // there's a dictaphone inside!
playSound(5, 12);
playActorAnimation(689);
inventory->add(52);
- SET_FLAG(0xDBBE, 1);
+ SET_FLAG(0xdbbe, 1);
}
displayMessage(0x4bf4);
} else
@@ -3483,7 +3483,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x7af7:
- if (CHECK_FLAG(0xDBD0, 1))
+ if (CHECK_FLAG(0xdbd0, 1))
displayMessage(0x5082);
else
retVal = false;
@@ -3491,7 +3491,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x7b09:
{
- byte v = GET_FLAG(0xDBD6);
+ byte v = GET_FLAG(0xdbd6);
switch (v) {
case 1:
displayMessage(0x51f8);
@@ -3507,14 +3507,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x9166:
- if (!CHECK_FLAG(0xDBD1, 1)) {
+ if (!CHECK_FLAG(0xdbd1, 1)) {
displayMessage(0x50a6);
retVal = false;
}
break;
case 0x9175:
- if (!(CHECK_FLAG(0xDBD2, 0) || CHECK_FLAG(0xDBD3, 0) || CHECK_FLAG(0xDBD4, 0))) {
+ if (!(CHECK_FLAG(0xdbd2, 0) || CHECK_FLAG(0xdbd3, 0) || CHECK_FLAG(0xdbd4, 0))) {
waitLanAnimationFrame(1, 1);
playSound(89, 2);
playActorAnimation(731);
@@ -3534,15 +3534,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
inventory->remove(73);
disableObject(2);
enableObject(3);
- SET_FLAG(0xDBEF, 1);
+ SET_FLAG(0xdbef, 1);
break;
case 0x90fc: // dictaphone on robot
if (processCallback(0x9166)) {
- if (CHECK_FLAG(0xDBD2, 1)) {
+ if (CHECK_FLAG(0xdbd2, 1)) {
displayMessage(0x50c3);
} else {
- if (!CHECK_FLAG(0xDBCB, 1)) {
+ if (!CHECK_FLAG(0xdbcb, 1)) {
displayMessage(0x5101);
} else {
displayMessage(0x50e1);
@@ -3555,7 +3555,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitLanAnimationFrame(1, 1);
dialog->show(98, scene, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD2, 1);
+ SET_FLAG(0xdbd2, 1);
processCallback(0x9175);
}
}
@@ -3564,7 +3564,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x91cb: // use socks on robot
if (processCallback(0x9166)) {
- if (CHECK_FLAG(0xDBD3, 1)) {
+ if (CHECK_FLAG(0xdbd3, 1)) {
displayMessage(0x50c3);
} else {
displayMessage(0x5138);
@@ -3576,7 +3576,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitLanAnimationFrame(1, 1);
dialog->show(99, scene, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD3, 1);
+ SET_FLAG(0xdbd3, 1);
processCallback(0x9175);
}
}
@@ -3584,7 +3584,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x9209: // photo on robot
if (processCallback(0x9166)) {
- if (CHECK_FLAG(0xDBD4, 1)) {
+ if (CHECK_FLAG(0xdbd4, 1)) {
displayMessage(0x50c3);
} else {
displayMessage(0x5161);
@@ -3596,7 +3596,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitLanAnimationFrame(1, 1);
dialog->show(100, scene, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD4, 1);
+ SET_FLAG(0xdbd4, 1);
processCallback(0x9175);
}
}
@@ -3644,7 +3644,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
obj->actor_orientation = 1;
obj->save();
}
- SET_FLAG(0xDBCC, 1);
+ SET_FLAG(0xdbcc, 1);
break;
case 0x9472:
@@ -3653,10 +3653,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(793);
displayMessage(0x5218);
inventory->remove(60);
- SET_FLAG(0xDBD6, 1);
+ SET_FLAG(0xdbd6, 1);
break;
- case 0x9449: //meat + stew
+ case 0x9449: // meat + stew
playSound(5, 4);
playSound(63, 12);
playActorAnimation(726);
@@ -3666,7 +3666,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
break;
case 0x949b:
- if (CHECK_FLAG(0xDBD6, 2)) {
+ if (CHECK_FLAG(0xdbd6, 2)) {
playSound(5, 4);
playSound(5, 25);
playActorAnimation(802);
@@ -3709,7 +3709,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(0, 0, true);
reloadLan();
- if (CHECK_FLAG(0xDBC6, 1)) {
+ if (CHECK_FLAG(0xdbc6, 1)) {
displayMessage(0x4da6);
}
} else {
@@ -3726,36 +3726,36 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 3);
playSound(5, 16);
playActorAnimation(703);
- if (!CHECK_FLAG(0xDBC8, 1))
- displayMessage(0x4D80); //nothing happened
+ if (!CHECK_FLAG(0xdbc8, 1))
+ displayMessage(0x4d80); // nothing happened
else {
//0x955a
- if (CHECK_FLAG(0xDBC6, 0)) {
- if (CHECK_FLAG(0xDBC5, 1)) { //tv on
- if (!CHECK_FLAG(0xDBC7, 1))
- displayMessage(0x4d93); //the tape started
+ if (CHECK_FLAG(0xdbc6, 0)) {
+ if (CHECK_FLAG(0xdbc5, 1)) { // tv on
+ if (!CHECK_FLAG(0xdbc7, 1))
+ displayMessage(0x4d93); // the tape started
- SET_FLAG(0xDBC6, 1);
+ SET_FLAG(0xdbc6, 1);
reloadLan();
- if (!CHECK_FLAG(0xDBC7, 1)) {
+ if (!CHECK_FLAG(0xdbc7, 1)) {
dialog->show(93, scene, 0, 702, 0xd1, 0xd0, 0, 1);
- SET_FLAG(0xDBC7, 1);
+ SET_FLAG(0xdbc7, 1);
}
} else
- displayMessage(0x4d5b); //i just realized that tv is off
+ displayMessage(0x4d5b); // i just realized that tv is off
} else {
- SET_FLAG(0xDBC6, 0);
- if (CHECK_FLAG(0xDBC5, 1)) { //tv on
+ SET_FLAG(0xdbc6, 0);
+ if (CHECK_FLAG(0xdbc5, 1)) { // tv on
reloadLan();
- displayMessage(0x4da6); //much better!
+ displayMessage(0x4da6); // much better!
}
}
}
break;
case 0x95eb: // polaroid + tv
- if (CHECK_FLAG(0xDBC6, 1)) {
- if (CHECK_FLAG(0xDBCA, 1)) {
+ if (CHECK_FLAG(0xdbc6, 1)) {
+ if (CHECK_FLAG(0xdbca, 1)) {
displayMessage(0x4de6);
} else {
playSound(5, 3);
@@ -3763,22 +3763,22 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(90, 18);
playActorAnimation(707);
inventory->add(61);
- SET_FLAG(0xDBCA, 1);
+ SET_FLAG(0xdbca, 1);
}
} else
displayMessage(0x4ea5);
break;
case 0x962f: // polaroid + tv
- if (CHECK_FLAG(0xDBC6, 1)) {
- if (CHECK_FLAG(0xDBCB, 1)) {
+ if (CHECK_FLAG(0xdbc6, 1)) {
+ if (CHECK_FLAG(0xdbcb, 1)) {
displayMessage(0x4e32);
} else {
displayMessage(0x4e05);
playSound(5, 3);
playSound(5, 27);
playActorAnimation(708);
- SET_FLAG(0xDBCB, 1);
+ SET_FLAG(0xdbcb, 1);
}
} else
displayMessage(0x4ea5);
@@ -3789,7 +3789,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(91, 12);
playActorAnimation(706);
inventory->remove(54);
- SET_FLAG(0xDBC8, 1);
+ SET_FLAG(0xdbc8, 1);
break;
case 0x9673: // hit fatso - final scene
@@ -3867,7 +3867,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(954, 0);
dialog->showMono(211, scene, 955, 0xe3, 1);
playMusic(2);
- displayCredits(0xe47c, 4500); //3 minutes (infinite until key pressed in original)
+ displayCredits(0xe47c, 4500); // 3 minutes (infinite until key pressed in original)
scene->push(SceneEvent(SceneEvent::kQuit));
break;
@@ -3897,11 +3897,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
}
break;
- case 0x9a1d: //no anchor, timeout
+ case 0x9a1d: // no anchor, timeout
SET_FLAG(0, 0);
processCallback(0x9a7a);
- INC_FLAG(0xDBA6);
- switch (GET_FLAG(0xDBA6)) {
+ INC_FLAG(0xdba6);
+ switch (GET_FLAG(0xdba6)) {
case 1:
displayMessage(0x39ae);
break;
@@ -3923,7 +3923,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
}
break;
- case 0x99e0: //success getting an anchor
+ case 0x99e0: // success getting an anchor
SET_FLAG(0, 0);
setTimerCallback(0, 0);
scene->getActorAnimation()->free();
@@ -3984,24 +3984,24 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(100);
displayMessage(0x3cea);
inventory->remove(37);
- processCallback(0x9d45); //another mansion try
+ processCallback(0x9d45); // another mansion try
} else
displayMessage(0x3c58);
break;
case 0x9c6d:
displayMessage(0x49d1);
- SET_FLAG(0xDBB5, 1);
+ SET_FLAG(0xdbb5, 1);
retVal = false;
break;
case 0x9c79: // use pills
if (scene->getId() != 36) {
displayMessage(0x52a9);
- } else if (CHECK_FLAG(0xDBF1, 1)) {
- displayMessage(0x52F6);
+ } else if (CHECK_FLAG(0xdbf1, 1)) {
+ displayMessage(0x52f6);
} else {
- SET_FLAG(0xDBF1, 1);
+ SET_FLAG(0xdbf1, 1);
moveTo(102, 195, 2);
playSound(5, 3);
playSound(75, 12);
@@ -4034,14 +4034,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
obj->actor_orientation = 1;
obj->save();
- SET_FLAG(0xDBD7, 1);
+ SET_FLAG(0xdbd7, 1);
}
break;
case 0x9d45:
{
wait(50);
- byte attempts = ++ *(res->dseg.ptr(0xDBEA));
+ byte attempts = ++ *(res->dseg.ptr(0xdbea));
debugC(0, kDebugCallbacks, "mansion intrusion attempt #%u", attempts);
if (attempts >= 7)
retVal = false;
@@ -4131,7 +4131,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(3, 51);
playAnimation(911, 1);
playAnimation(899, 1);
- setFlag(0xDBEC, 1);
+ setFlag(0xdbec, 1);
reloadLan();
wait(200);
enableObject(8);
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 05beb419c0..ec46936b7e 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -142,7 +142,7 @@ void Inventory::add(byte item) {
bool Inventory::tryObjectCallback(InventoryObject *obj) {
byte id = obj->id;
uint i = 0;
- for (byte *table = _vm->res->dseg.ptr(0xBB6F + 3); table[0] != 0 && i < 7; table += 3, ++i) {
+ for (byte *table = _vm->res->dseg.ptr(0xbb6f + 3); table[0] != 0 && i < 7; table += 3, ++i) {
if (table[0] == id) {
resetSelectedObject();
activate(false);
@@ -209,7 +209,7 @@ bool Inventory::processEvent(const Common::Event &event) {
return true;
debugC(0, kDebugInventory, "combine(%u, %u)!", id1, id2);
- byte *table = _vm->res->dseg.ptr(0xC335);
+ byte *table = _vm->res->dseg.ptr(0xc335);
while (table[0] != 0 && table[1] != 0) {
if ((id1 == table[0] && id2 == table[1]) || (id2 == table[0] && id1 == table[1])) {
byte new_obj = table[2];
@@ -240,7 +240,7 @@ bool Inventory::processEvent(const Common::Event &event) {
if (_hoveredObj != NULL) {
debugC(0, kDebugInventory, "rclick object %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
- if (_hoveredObj->id != 51 && tryObjectCallback(_hoveredObj)) //do not process callback for banknote on r-click
+ if (_hoveredObj->id != 51 && tryObjectCallback(_hoveredObj)) // do not process callback for banknote on r-click
return true;
}
@@ -254,7 +254,7 @@ bool Inventory::processEvent(const Common::Event &event) {
activate(false);
return true;
}
- if (event.kbd.keycode == Common::KEYCODE_RETURN) { //triangle button on psp
+ if (event.kbd.keycode == Common::KEYCODE_RETURN) { // triangle button on psp
activate(!_active);
return true;
}
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index ad8d9c8515..446ae9656a 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -50,7 +50,7 @@ bool MusicPlayer::load(int id) {
char header[4];
stream->read(header, 4);
- //check header?
+ // check header?
Common::StackLock lock(_mutex);
// Load the samples
@@ -62,7 +62,7 @@ bool MusicPlayer::load(int id) {
byte sample = stream->readByte();
// Load the sample data
- byte sampleResource = ((sample >> 4) & 0x0F) * 10 + (sample & 0x0F);
+ byte sampleResource = ((sample >> 4) & 0x0f) * 10 + (sample & 0x0f);
debugC(0, kDebugMusic, "currSample = %d, sample = 0x%02x, resource: %d", currSample, sample, sampleResource);
uint32 sampleSize = _vm->res->sam_mmm.getSize(sampleResource);
if (sampleSize == 0) {
@@ -88,15 +88,15 @@ bool MusicPlayer::load(int id) {
row.channels[1].note = stream->readByte();
row.channels[2].note = stream->readByte();
_rows.push_back(row);
- } else if ((cmd & 0xF0) == 0x50) {
+ } else if ((cmd & 0xf0) == 0x50) {
byte sample = stream->readByte();
debugC(1, kDebugMusic, "%02x: set sample %02x", cmd, sample);
- row.channels[(cmd & 0x0F) - 1].sample = sample;
- } else if ((cmd & 0xF0) == 0x40) {
+ row.channels[(cmd & 0x0f) - 1].sample = sample;
+ } else if ((cmd & 0xf0) == 0x40) {
byte vol = stream->readByte();
- debugC(1, kDebugMusic, "%02x: set volume %02x -> %02x", cmd, row.channels[(cmd & 0x0F) - 1].volume, vol);
- //channel volume 0x40 * music volume 0x40 mixed with high bytes
- row.channels[(cmd & 0x0F) - 1].volume = vol * 16;
+ debugC(1, kDebugMusic, "%02x: set volume %02x -> %02x", cmd, row.channels[(cmd & 0x0f) - 1].volume, vol);
+ // channel volume 0x40 * music volume 0x40 mixed with high bytes
+ row.channels[(cmd & 0x0f) - 1].volume = vol * 16;
} else {
debugC(0, kDebugMusic, "unhandled music command %02x", cmd);
}
@@ -140,7 +140,7 @@ void MusicPlayer::interrupt() {
}
setChannelData(chn, (const int8 *)_samples[sample].data, NULL, _samples[sample].size, 0);
- setChannelPeriod(chn, noteToPeriod[((note >> 4) & 0x0F) - 1][(note & 0x0F)]);
+ setChannelPeriod(chn, noteToPeriod[((note >> 4) & 0x0f) - 1][(note & 0x0f)]);
}
}
diff --git a/engines/teenagent/notes.txt b/engines/teenagent/notes.txt
new file mode 100644
index 0000000000..e8c9104808
--- /dev/null
+++ b/engines/teenagent/notes.txt
@@ -0,0 +1,109 @@
+// Dialog #0: Offset 0x0000
+// Dialog #1: Offset 0x01b4
+// Dialog #2: Offset 0x046f
+// Dialog #3: Offset 0x07cb
+// Dialog #4: Offset 0x0901
+
+// Dialog #6: Offset 0x0936
+// Dialog #7: Offset 0x0a02
+// Dialog #8: Offset 0x0a2d
+
+// Dialog #13: Offset 0x0c43
+// Dialog #14: Offset 0x0d75
+// Dialog #15: Offset 0x0f0e
+// Dialog #16: Offset 0x0fb8
+
+// Dialog #18: Offset 0x10db
+// Dialog #19: Offset 0x11ac
+// Dialog #20: Offset 0x12d9
+// Dialog #21: Offset 0x1468
+// Dialog #22: Offset 0x1485
+// Dialog #23: Offset 0x1528
+
+// Dialog #25: Offset 0x16de
+// Dialog #26: Offset 0x1726
+// Dialog #27: Offset 0x1752
+// Dialog #28: Offset 0x178c
+// Dialog #29: Offset 0x1913
+// Dialog #30: Offset 0x1a3e
+// Dialog #31: Offset 0x1a63
+// Dialog #32: Offset 0x1a84
+// Dialog #33: Offset 0x1ac9
+// Dialog #34: Offset 0x1af7
+// Dialog #35: Offset 0x1b27
+// Dialog #36: Offset 0x1b4a
+
+// Dialog #39: Offset 0x1c97
+// Dialog #40: Offset 0x1cec
+// Dialog #41: Offset 0x1d2c
+// Dialog #42: Offset 0x1dd8
+
+// Dialog #48: Offset 0x2041
+// Dialog #49: Offset 0x215f
+
+// Dialog #58: Offset 0x2582
+// Dialog #59: Offset 0x25fe
+
+// Dialog #61: Offset 0x280a
+
+// Dialog #65: Offset 0x2b6f
+// Dialog #66: Offset 0x2bb2
+// Dialog #67: Offset 0x2bdd
+// Dialog #68: Offset 0x2c5d
+// Dialog #69: Offset 0x2c9b
+
+// Dialog #78: Offset 0x3102
+// Dialog #79: Offset 0x311b
+// Dialog #80: Offset 0x3137
+// Dialog #81: Offset 0x316f
+// Dialog #82: Offset 0x317d
+// Dialog #83: Offset 0x3215
+
+// Dialog #101: Offset 0x3e41
+// Dialog #102: Offset 0x3ea3
+// Dialog #103: Offset 0x3f08
+// Dialog #104: Offset 0x3fea
+// Dialog #105: Offset 0x400d
+// Dialog #106: Offset 0x4439
+// Dialog #107: Offset 0x446a
+
+// Dialog #131: Offset 0x58e2
+// Dialog #132: Offset 0x59c5
+// Dialog #133: Offset 0x5a9d
+// Dialog #134: Offset 0x5ad7
+// Dialog #135: Offset 0x5af3
+// Dialog #136: Offset 0x5ba9
+// Dialog #137: Offset 0x5c53
+// Dialog #138: Offset 0x5c99
+// Dialog #139: Offset 0x5d3e
+// Dialog #140: Offset 0x5d5b
+// Dialog #141: Offset 0x5f0a
+// Dialog #142: Offset 0x5fae
+// Dialog #143: Offset 0x5fcf
+
+// Dialog #145: Offset 0x5ffe
+// Dialog #146: Offset 0x6088
+
+// Dialog #151: Offset 0x62f0
+// Dialog #152: Offset 0x6318
+// Dialog #153: Offset 0x6347
+// Dialog #154: Offset 0x636b
+// Dialog #155: Offset 0x6382
+
+// Dialog #158: Offset 0x64fc
+// Dialog #159: Offset 0x654c
+// Dialog #160: Offset 0x65ab
+
+// Dialog #169: Offset 0x6bf7
+// Dialog #170: Offset 0x6d7f
+// Dialog #171: Offset 0x6e7b
+// Dialog #172: Offset 0x6ea4
+// Dialog #173: Offset 0x6ec0
+// Dialog #174: Offset 0x6ee9
+// Dialog #175: Offset 0x6f03
+
+// Dialog #187: Offset 0x735e
+// Dialog #188: Offset 0x73b3
+// Dialog #189: Offset 0x73e8
+// Dialog #190: Offset 0x7405
+// Dialog #191: Offset 0x7459 \ No newline at end of file
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 93e8c45c26..500b44cfe3 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -153,13 +153,13 @@ Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
switch (id) {
case 81:
- if (dseg.get_byte(0xDBAD))
+ if (dseg.get_byte(0xdbad))
return lan500.getStream(160);
break;
case 137:
- if (dseg.get_byte(0xDBC5) == 1) {
- if (dseg.get_byte(0xDBC6) == 1)
+ if (dseg.get_byte(0xdbc5) == 1) {
+ if (dseg.get_byte(0xdbc6) == 1)
return lan500.getStream(203);
else
return lan500.getStream(202);
@@ -167,7 +167,7 @@ Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
break;
case 25:
- if (dseg.get_byte(0xDBDF) == 2) {
+ if (dseg.get_byte(0xdbdf) == 2) {
return lan500.getStream(332);
}
break;
@@ -181,17 +181,17 @@ Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
break;
case 29:
- if (dseg.get_byte(0xDBE7) == 1) {
+ if (dseg.get_byte(0xdbe7) == 1) {
return lan500.getStream(380);
}
case 30:
- if (dseg.get_byte(0xDBE7) == 1) {
+ if (dseg.get_byte(0xdbe7) == 1) {
return lan500.getStream(381);
}
case 42:
- if (dseg.get_byte(0xDBEC) == 1) {
+ if (dseg.get_byte(0xdbec) == 1) {
return lan500.getStream(400);
}
}
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index c26c10d13c..fdb0acb59d 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -343,7 +343,7 @@ void Scene::loadOns() {
void Scene::loadLans() {
debugC(0, kDebugScene, "loading lans animation");
- //load lan000
+ // load lan000
for (byte i = 0; i < 4; ++i) {
animation[i].free();
@@ -379,9 +379,9 @@ void Scene::init(int id, const Common::Point &pos) {
_vm->res->loadOff(background, palette, id);
if (id == 24) {
- //dark scene
- if (_vm->res->dseg.get_byte(0xDBA4) != 1) {
- //dim down palette
+ // ark scene
+ if (_vm->res->dseg.get_byte(0xdba4) != 1) {
+ // dim down palette
uint i;
for (i = 0; i < 624; ++i) {
palette[i] = palette[i] > 0x20 ? palette[i] - 0x20 : 0;
@@ -394,7 +394,7 @@ void Scene::init(int id, const Common::Point &pos) {
Common::ScopedPtr<Common::SeekableReadStream> stream(_vm->res->on.getStream(id));
int sub_hack = 0;
- if (id == 7) { //something patched in the captains room
+ if (id == 7) { // something patched in the captains room
switch (_vm->res->dseg.get_byte(0xdbe6)) {
case 2:
break;
@@ -410,11 +410,11 @@ void Scene::init(int id, const Common::Point &pos) {
loadOns();
loadLans();
- //check music
+ // check music
int now_playing = _vm->music->getId();
- if (now_playing != _vm->res->dseg.get_byte(0xDB90))
- _vm->music->load(_vm->res->dseg.get_byte(0xDB90));
+ if (now_playing != _vm->res->dseg.get_byte(0xdb90))
+ _vm->music->load(_vm->res->dseg.get_byte(0xdb90));
_vm->_system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h);
setPalette(0);
@@ -466,7 +466,7 @@ void Scene::push(const SceneEvent &event) {
SceneEvent &prev = events.back();
if (prev.type == SceneEvent::kWalk && prev.color == event.color) {
debugC(0, kDebugScene, "fixing double-move [skipping event!]");
- if ((event.color & 2) != 0) { //relative move
+ if ((event.color & 2) != 0) { // relative move
prev.dst.x += event.dst.x;
prev.dst.y += event.dst.y;
} else {
@@ -561,7 +561,6 @@ int Scene::lookupZoom(uint y) const {
return 256;
}
-
void Scene::paletteEffect(byte step) {
byte *src = _vm->res->dseg.ptr(0x6609);
byte *dst = palette + 3 * 0xf2;
@@ -608,7 +607,7 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
switch (current_event.type) {
case SceneEvent::kCredits: {
_vm->_system->fillScreen(0);
- //TODO: optimize me
+ // TODO: optimize me
Graphics::Surface *surface = _vm->_system->lockScreen();
_vm->res->font7.render(surface, current_event.dst.x, current_event.dst.y -= game_delta, current_event.message, current_event.color);
_vm->_system->unlockScreen();
@@ -756,7 +755,7 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
}
if (tick_mark) {
- int speed_x = zoom / 32; //8 * zoom / 256
+ int speed_x = zoom / 32; // 8 * zoom / 256
int speed_y = (o == kActorDown || o == kActorUp ? 2 : 1) * zoom / 256;
if (speed_x == 0)
speed_x = 1;
@@ -777,7 +776,7 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
path.pop_front();
if (path.empty()) {
if (orientation == 0)
- orientation = o; //save last orientation
+ orientation = o; // save last orientation
nextEvent();
got_any_animation = true;
restart = true;
@@ -799,12 +798,10 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
_vm->_system->unlockScreen();
continue;
}
- //removed mark == null. In final scene of chapter 2 mark rendered above table.
- //if it'd cause any bugs, add hack here. (_id != 23 && mark == NULL)
- if (on_enabled &&
- debug_features.feature[DebugFeatures::kShowOn]) {
+ // removed mark == null. In final scene of chapter 2 mark rendered above table.
+ // if it'd cause any bugs, add hack here. (_id != 23 && mark == NULL)
+ if (on_enabled && debug_features.feature[DebugFeatures::kShowOn])
on.render(surface, actor_animation_position);
- }
for (; z_order_it != z_order.end(); ++z_order_it) {
Surface *s = *z_order_it;
@@ -940,7 +937,7 @@ bool Scene::processEventQueue() {
if (current_event.orientation != 0)
orientation = current_event.orientation;
} else {
- //special case, empty scene
+ // special case, empty scene
background.free();
on.free();
delete[] ons;
@@ -956,7 +953,7 @@ bool Scene::processEventQueue() {
case SceneEvent::kWalk: {
Common::Point dst = current_event.dst;
- if ((current_event.color & 2) != 0) { //relative move
+ if ((current_event.color & 2) != 0) { // relative move
dst.x += position.x;
dst.y += position.y;
}
@@ -1012,12 +1009,12 @@ bool Scene::processEventQueue() {
message_color = current_event.color;
if (message_first_frame)
- current_event.clear(); //async message, clearing event
+ current_event.clear(); // async message, clearing event
}
break;
case SceneEvent::kPlayAnimation: {
- byte slot = current_event.slot & 7; //0 - mark's
+ byte slot = current_event.slot & 7; // 0 - mark's
if (current_event.animation != 0) {
debugC(0, kDebugScene, "playing animation %u in slot %u(%02x)", current_event.animation, slot, current_event.slot);
if (slot != 0) {
@@ -1040,7 +1037,7 @@ bool Scene::processEventQueue() {
break;
case SceneEvent::kPauseAnimation: {
- byte slot = current_event.slot & 7; //0 - mark's
+ byte slot = current_event.slot & 7; // 0 - mark's
if (slot != 0) {
--slot;
debugC(1, kDebugScene, "pause animation in slot %u", slot);
@@ -1068,7 +1065,7 @@ bool Scene::processEventQueue() {
case SceneEvent::kPlayMusic:
debugC(0, kDebugScene, "setting music %u", current_event.music);
_vm->setMusic(current_event.music);
- _vm->res->dseg.set_byte(0xDB90, current_event.music);
+ _vm->res->dseg.set_byte(0xdb90, current_event.music);
current_event.clear();
break;
@@ -1108,19 +1105,19 @@ bool Scene::processEventQueue() {
break;
case SceneEvent::kEffect:
- _vm->_system->delayMillis(80); //2 vsyncs
+ _vm->_system->delayMillis(80); // 2 vsyncs
_vm->_system->setShakePos(8);
_vm->_system->updateScreen();
- _vm->_system->delayMillis(80); //2 vsyncs
+ _vm->_system->delayMillis(80); // 2 vsyncs
_vm->_system->setShakePos(0);
_vm->_system->updateScreen();
- _vm->_system->delayMillis(80); //2 vsyncs
+ _vm->_system->delayMillis(80); // 2 vsyncs
_vm->_system->setShakePos(4);
_vm->_system->updateScreen();
- _vm->_system->delayMillis(80); //2 vsyncs
+ _vm->_system->delayMillis(80); // 2 vsyncs
_vm->_system->setShakePos(0);
_vm->_system->updateScreen();
@@ -1155,10 +1152,12 @@ bool Scene::processEventQueue() {
error("empty/unhandler event[%d]", (int)current_event.type);
}
}
+
if (events.empty()) {
message_color = 0xd1;
hide_actor = false;
}
+
return !current_event.empty();
}
@@ -1215,8 +1214,8 @@ Common::Point Scene::messagePosition(const Common::String &str, Common::Point me
}
uint Scene::messageDuration(const Common::String &str) {
- //original game uses static delays: 100-slow, 50, 20 and 1 tick - crazy speed.
- //total delay = total message length * delay / 8 + 60.
+ // original game uses static delays: 100-slow, 50, 20 and 1 tick - crazy speed.
+ // total delay = total message length * delay / 8 + 60.
uint total_width = str.size();
int speed = ConfMan.getInt("talkspeed");
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 34719077b5..ddcefb3607 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -112,7 +112,7 @@ bool TeenAgentEngine::trySelectedObject() {
}
}
- //error
+ // error
inventory->resetSelectedObject();
displayMessage(0x3457);
return true;
@@ -153,7 +153,6 @@ void TeenAgentEngine::processObject() {
}
}
-
void TeenAgentEngine::use(Object *object) {
if (object == NULL || scene->eventRunning())
return;
@@ -178,10 +177,10 @@ void TeenAgentEngine::examine(const Common::Point &point, Object *object) {
debugC(0, kDebugObject, "click %d, %d, object %d, %d", point.x, point.y, dst.x, dst.y);
action = kActionExamine;
if (object->actor_rect.valid())
- scene->moveTo(dst, object->actor_orientation, true); //validate examine message. Original engine does not let you into walkboxes
+ scene->moveTo(dst, object->actor_orientation, true); // validate examine message. Original engine does not let you into walkboxes
dst_object = object;
} else if (!scene_busy) {
- //do not reset anything while scene is busy, but allow interrupts while walking.
+ // do not reset anything while scene is busy, but allow interrupts while walking.
debugC(0, kDebugObject, "click %d, %d", point.x, point.y);
action = kActionNone;
scene->moveTo(point, 0, true);
@@ -250,10 +249,10 @@ Common::Error TeenAgentEngine::loadGameState(int slot) {
inventory->activate(false);
inventory->reload();
- setMusic(res->dseg.get_byte(0xDB90));
+ setMusic(res->dseg.get_byte(0xdb90));
- int id = res->dseg.get_byte(0xB4F3);
- uint16 x = res->dseg.get_word(0x64AF), y = res->dseg.get_word(0x64B1);
+ int id = res->dseg.get_byte(0xb4f3);
+ uint16 x = res->dseg.get_word(0x64af), y = res->dseg.get_word(0x64b1);
scene->loadObjectData();
scene->init(id, Common::Point(x, y));
scene->setPalette(4);
@@ -267,10 +266,10 @@ Common::Error TeenAgentEngine::saveGameState(int slot, const Common::String &des
if (!out)
return Common::kWritingFailed;
- res->dseg.set_byte(0xB4F3, scene->getId());
+ res->dseg.set_byte(0xb4f3, scene->getId());
Common::Point pos = scene->getPosition();
- res->dseg.set_word(0x64AF, pos.x);
- res->dseg.set_word(0x64B1, pos.y);
+ res->dseg.set_word(0x64af, pos.x);
+ res->dseg.set_word(0x64b1, pos.y);
assert(res->dseg.size() >= 0x6478 + 0x777a);
strncpy((char *)res->dseg.ptr(0x6478), desc.c_str(), 0x16);
@@ -282,7 +281,6 @@ Common::Error TeenAgentEngine::saveGameState(int slot, const Common::String &des
return Common::kNoError;
}
-
int TeenAgentEngine::skipEvents() const {
Common::EventManager *_event = _system->getEventManager();
Common::Event event;
@@ -329,7 +327,7 @@ bool TeenAgentEngine::showCDLogo() {
for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
_system->copyRectToScreen(bg, 320, 0, 0, 320, 200);
_system->updateScreen();
@@ -375,7 +373,7 @@ bool TeenAgentEngine::showLogo() {
for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
free(palette);
@@ -434,7 +432,7 @@ bool TeenAgentEngine::showMetropolis() {
palette[c] *= 4;
}
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
free(palette);
@@ -565,7 +563,7 @@ Common::Error TeenAgentEngine::run() {
return Common::kNoError;
scene->intro = true;
scene_busy = true;
- processCallback(0x24c);
+ processCallback(0x024c);
}
CursorMan.showMouse(true);
@@ -617,11 +615,11 @@ Common::Error TeenAgentEngine::run() {
break;
if (res->dseg.get_byte(0) == 3 && current_object->id == 1) {
- processCallback(0x5189); //boo!
+ processCallback(0x5189); // guard is drinking, boo!
break;
}
if (res->dseg.get_byte(0) == 4 && current_object->id == 5) {
- processCallback(0x99e0); //getting an anchor
+ processCallback(0x99e0); // success getting an anchor
break;
}
use(current_object);
@@ -728,7 +726,7 @@ void TeenAgentEngine::displayMessage(const Common::String &str, byte color, uint
return;
}
- if (color == 0xd1) { //mark's
+ if (color == 0xd1) { // mark's
SceneEvent e(SceneEvent::kPlayAnimation);
e.animation = 0;
e.slot = 0x80;
@@ -781,7 +779,6 @@ void TeenAgentEngine::displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 f
scene->push(event);
}
-
void TeenAgentEngine::displayCredits(uint16 addr, uint16 timer) {
SceneEvent event(SceneEvent::kCreditsMessage);
@@ -792,7 +789,7 @@ void TeenAgentEngine::displayCredits(uint16 addr, uint16 timer) {
event.dst.y = *src;
while (true) {
- ++src; //skip y position
+ ++src; // skip y position
Common::String line((const char *)src);
event.message += line;
src += line.size() + 1;
@@ -880,7 +877,6 @@ void TeenAgentEngine::playActorAnimation(uint16 id, bool async, bool ignore) {
waitAnimation();
}
-
void TeenAgentEngine::loadScene(byte id, const Common::Point &pos, byte o) {
loadScene(id, pos.x, pos.y, o);
}
@@ -940,7 +936,6 @@ void TeenAgentEngine::reloadLan() {
scene->push(event);
}
-
void TeenAgentEngine::playMusic(byte id) {
SceneEvent event(SceneEvent::kPlayMusic);
event.music = id;
@@ -1041,15 +1036,14 @@ void TeenAgentEngine::playSoundNow(byte id) {
debug(3, "playing %u samples...", size);
Audio::AudioStream *stream = Audio::makeRawStream(data, size, 11025, 0);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); //dispose is YES by default
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); // dispose is YES by default
}
-
void TeenAgentEngine::setMusic(byte id) {
debugC(0, kDebugMusic, "starting music %u", id);
- if (id != 1) //intro music
- *res->dseg.ptr(0xDB90) = id;
+ if (id != 1) // intro music
+ *res->dseg.ptr(0xdb90) = id;
if (_gameDescription->flags & ADGF_CD) {
byte track2cd[] = {7, 2, 0, 9, 3, 6, 8, 10, 4, 5, 11};