aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche/lucerna2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche/lucerna2.cpp')
-rw-r--r--engines/avalanche/lucerna2.cpp106
1 files changed, 55 insertions, 51 deletions
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index a35cc1246c..e996d5706d 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -388,10 +388,10 @@ void Lucerna::new_town() { /* You've just entered a town from the map. */
void Lucerna::put_geida_at(byte whichped, byte &ped) {
if (ped == 0)
return;
- _vm->_trip->tr[2].init(5, false, _vm->_trip); /* load Geida */
- _vm->_trip->apped(2, whichped);
- _vm->_trip->tr[2].call_eachstep = true;
- _vm->_trip->tr[2].eachstep = _vm->_trip->procgeida_procs;
+ _vm->_trip->tr[1].init(5, false, _vm->_trip); /* load Geida */
+ _vm->_trip->apped(1, whichped);
+ _vm->_trip->tr[1].call_eachstep = true;
+ _vm->_trip->tr[1].eachstep = _vm->_trip->procgeida_procs;
}
void Lucerna::enterroom(byte x, byte ped) {
@@ -457,49 +457,49 @@ void Lucerna::enterroom(byte x, byte ped) {
}
break;
- /* Need to find out which room is this!
-
- case r__outsidespludwicks:
+
+ case r__outsidespludwicks:
if ((_vm->_gyro->dna.rooms[r__outsidespludwicks] == 1) && (ped == 1)) {
_vm->_timeout->set_up_timer(20, _vm->_timeout->procbang, _vm->_timeout->reason_explosion);
_vm->_gyro->dna.spludwicks_here = true;
}
- break;*/
+ break;
case r__spludwicks:
if (_vm->_gyro->dna.spludwicks_here) {
if (ped > 0) {
- _vm->_trip->tr[2].init(2, false, _vm->_trip); /* load Spludwick */
- _vm->_trip->apped(2, 2);
- _vm->_gyro->whereis['\227'] = r__spludwicks;
+ _vm->_trip->tr[1].init(2, false, _vm->_trip); /* load Spludwick */
+ _vm->_trip->apped(1, 1);
+ _vm->_gyro->whereis[1] = r__spludwicks;
}
_vm->_gyro->dna.dogfoodpos = 0; /* _vm->_gyro->also Spludwick pos. */
- _vm->_trip->tr[2].call_eachstep = true;
- _vm->_trip->tr[2].eachstep = _vm->_trip->procgeida_procs;
- } else _vm->_gyro->whereis['\227'] = r__nowhere;
+ _vm->_trip->tr[1].call_eachstep = true;
+ _vm->_trip->tr[1].eachstep = _vm->_trip->procgeida_procs;
+ } else _vm->_gyro->whereis[1] = r__nowhere;
break;
case r__brummieroad: {
- if (_vm->_gyro->dna.geida_follows) put_geida_at(5, ped);
+ if (_vm->_gyro->dna.geida_follows)
+ put_geida_at(4, ped);
if (_vm->_gyro->dna.cwytalot_gone) {
_vm->_gyro->magics[lightred].op = _vm->_gyro->nix;
_vm->_gyro->whereis[_vm->_gyro->pcwytalot] = r__nowhere;
} else {
if (ped > 0) {
- _vm->_trip->tr[2].init(4, false, _vm->_trip); /* 4=Cwytalot*/
- _vm->_trip->tr[2].call_eachstep = true;
- _vm->_trip->tr[2].eachstep = _vm->_trip->procfollow_avvy_y;
+ _vm->_trip->tr[1].init(4, false, _vm->_trip); /* 4=Cwytalot*/
+ _vm->_trip->tr[1].call_eachstep = true;
+ _vm->_trip->tr[1].eachstep = _vm->_trip->procfollow_avvy_y;
_vm->_gyro->whereis[_vm->_gyro->pcwytalot] = r__brummieroad;
if (_vm->_gyro->dna.rooms[r__brummieroad] == 1) { /* First time here... */
- _vm->_trip->apped(2, 2); /* He appears on the right of the screen... */
- _vm->_trip->tr[2].walkto(4); /* ...and he walks up... */
+ _vm->_trip->apped(1, 1); /* He appears on the right of the screen... */
+ _vm->_trip->tr[1].walkto(4); /* ...and he walks up... */
} else {
/* You've been here before. */
- _vm->_trip->apped(2, 4); /* He's standing in your way straight away... */
- _vm->_trip->tr[2].face = _vm->_trip->left;
+ _vm->_trip->apped(1, 3); /* He's standing in your way straight away... */
+ _vm->_trip->tr[1].face = _vm->_trip->left;
}
}
}
@@ -510,10 +510,10 @@ void Lucerna::enterroom(byte x, byte ped) {
dnatype &with = _vm->_gyro->dna;
if ((with.cwytalot_gone) && (! with.cwytalot_in_herts) && (ped == 2) &&
(_vm->_gyro->dna.rooms[r__argentroad] > 3)) {
- _vm->_trip->tr[2].init(4, false, _vm->_trip); /* 4=Cwytalot again*/
- _vm->_trip->apped(2, 1);
- _vm->_trip->tr[2].walkto(2);
- _vm->_trip->tr[2].vanishifstill = true;
+ _vm->_trip->tr[1].init(4, false, _vm->_trip); /* 4=Cwytalot again*/
+ _vm->_trip->apped(1, 0);
+ _vm->_trip->tr[1].walkto(1);
+ _vm->_trip->tr[1].vanishifstill = true;
with.cwytalot_in_herts = true;
/*_vm->_gyro->whereis[#157]:=r__Nowhere;*/ /* can we fit this in? */
_vm->_timeout->set_up_timer(20, _vm->_timeout->proc_cwytalot_in_herts, _vm->_timeout->reason_cwytalot_in_herts);
@@ -526,7 +526,8 @@ void Lucerna::enterroom(byte x, byte ped) {
_vm->_celer->show_one(3); /* Position of drawbridge */
_vm->_gyro->magics[green].op = _vm->_gyro->nix; /* You may enter the drawbridge. */
}
- if (_vm->_gyro->dna.geida_follows) put_geida_at(ped + 3, ped); /* load Geida */
+ if (_vm->_gyro->dna.geida_follows)
+ put_geida_at(ped + 2, ped); /* load Geida */
}
break;
@@ -534,9 +535,9 @@ void Lucerna::enterroom(byte x, byte ped) {
if (ped > 0) {
if (! _vm->_gyro->dna.been_tied_up) {
/* A welcome party... or maybe not... */
- _vm->_trip->tr[2].init(6, false, _vm->_trip);
- _vm->_trip->apped(2, 2);
- _vm->_trip->tr[2].walkto(3);
+ _vm->_trip->tr[1].init(6, false, _vm->_trip);
+ _vm->_trip->apped(1, 1);
+ _vm->_trip->tr[1].walkto(2);
_vm->_timeout->set_up_timer(36, _vm->_timeout->procget_tied_up, _vm->_timeout->reason_getting_tied_up);
}
}
@@ -558,19 +559,19 @@ void Lucerna::enterroom(byte x, byte ped) {
if (ped > 0)
switch (_vm->_gyro->dna.cardiff_things) {
case 0 : { /* You've answered NONE of his questions. */
- _vm->_trip->tr[2].init(9, false, _vm->_trip);
- _vm->_trip->apped(2, 2);
- _vm->_trip->tr[2].walkto(3);
+ _vm->_trip->tr[1].init(9, false, _vm->_trip);
+ _vm->_trip->apped(1, 1);
+ _vm->_trip->tr[1].walkto(2);
_vm->_timeout->set_up_timer(47, _vm->_timeout->proccardiffsurvey, _vm->_timeout->reason_cardiffsurvey);
}
break;
case 5 :
- _vm->_gyro->magics[2].op = _vm->_gyro->nix;
+ _vm->_gyro->magics[1].op = _vm->_gyro->nix;
break; /* You've answered ALL his questions. => nothing happens. */
default: { /* You've answered SOME of his questions. */
- _vm->_trip->tr[2].init(9, false, _vm->_trip);
- _vm->_trip->apped(2, 3);
- _vm->_trip->tr[2].face = _vm->_trip->right;
+ _vm->_trip->tr[1].init(9, false, _vm->_trip);
+ _vm->_trip->apped(1, 2);
+ _vm->_trip->tr[1].face = _vm->_trip->right;
_vm->_timeout->set_up_timer(3, _vm->_timeout->proccardiff_return, _vm->_timeout->reason_cardiffsurvey);
}
}
@@ -602,15 +603,16 @@ void Lucerna::enterroom(byte x, byte ped) {
case r__lustiesroom: {
_vm->_gyro->dna.dogfoodpos = 1; /* Actually, du Lustie pos. */
- if (_vm->_trip->tr[1].whichsprite == 0) /* Avvy in his normal clothes */
+ if (_vm->_trip->tr[0].whichsprite == 0) /* Avvy in his normal clothes */
_vm->_timeout->set_up_timer(3, _vm->_timeout->proccallsguards, _vm->_timeout->reason_du_lustie_talks);
else if (! _vm->_gyro->dna.entered_lusties_room_as_monk) /*already*/
/* Presumably, Avvy dressed as a monk. */
_vm->_timeout->set_up_timer(3, _vm->_timeout->procgreetsmonk, _vm->_timeout->reason_du_lustie_talks);
if (_vm->_gyro->dna.geida_follows) {
- put_geida_at(5, ped);
- if (_vm->_gyro->dna.lustie_is_asleep) _vm->_celer->show_one(5);
+ put_geida_at(4, ped);
+ if (_vm->_gyro->dna.lustie_is_asleep)
+ _vm->_celer->show_one(5);
}
}
break;
@@ -652,23 +654,23 @@ void Lucerna::enterroom(byte x, byte ped) {
break;
case r__wisewomans: {
- _vm->_trip->tr[2].init(11, false, _vm->_trip);
+ _vm->_trip->tr[1].init(11, false, _vm->_trip);
if ((_vm->_gyro->dna.rooms[r__wisewomans] == 1) && (ped > 0)) {
- _vm->_trip->apped(2, 2); /* Start on the right-hand side of the screen. */
- _vm->_trip->tr[2].walkto(4); /* Walks up to greet you. */
+ _vm->_trip->apped(1, 1); /* Start on the right-hand side of the screen. */
+ _vm->_trip->tr[1].walkto(4); /* Walks up to greet you. */
} else {
- _vm->_trip->apped(2, 4); /* Starts where she was before. */
- _vm->_trip->tr[2].face = 3;
+ _vm->_trip->apped(1, 3); /* Starts where she was before. */
+ _vm->_trip->tr[1].face = 3;
}
- _vm->_trip->tr[2].call_eachstep = true;
- _vm->_trip->tr[2].eachstep = _vm->_trip->procface_avvy; /* She always faces Avvy. */
+ _vm->_trip->tr[1].call_eachstep = true;
+ _vm->_trip->tr[1].eachstep = _vm->_trip->procface_avvy; /* She always faces Avvy. */
}
break;
case r__insidecardiffcastle:
if (ped > 0) {
- _vm->_trip->tr[2].init(10, false, _vm->_trip); /* Define the dart. */
+ _vm->_trip->tr[1].init(10, false, _vm->_trip); /* Define the dart. */
_vm->_sequence->first_show(1);
if (_vm->_gyro->dna.arrow_in_the_door)
_vm->_sequence->then_show(3);
@@ -711,16 +713,18 @@ void Lucerna::enterroom(byte x, byte ped) {
break; /* Ayles awake. */
case r__geidas:
- put_geida_at(2, ped);
+ put_geida_at(1, ped);
break; /* load Geida */
case r__easthall:
case r__westhall:
- if (_vm->_gyro->dna.geida_follows) put_geida_at(ped + 2, ped);
+ if (_vm->_gyro->dna.geida_follows)
+ put_geida_at(ped + 1, ped);
break;
case r__lusties:
- if (_vm->_gyro->dna.geida_follows) put_geida_at(ped + 6, ped);
+ if (_vm->_gyro->dna.geida_follows)
+ put_geida_at(ped + 5, ped);
break;
case r__nottspub: {