diff options
28 files changed, 858 insertions, 862 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index b9958f10b0..e87e120d0f 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -216,7 +216,7 @@ const Acci::ranktype Acci::ranks[9] = { }; -void Acci::setParent(AvalancheEngine *vm) { +Acci::Acci(AvalancheEngine *vm) { _vm = vm; } @@ -264,7 +264,7 @@ begin blockwrite(f,a,12080); end; close(f); on; - _vm->_scrolls.display('Dumped.'); + _vm->_scrolls->display('Dumped.'); end;*/ Common::String Acci::rank() { @@ -323,7 +323,7 @@ void Acci::displaywhat(char ch, bool animate, bool &ambigous) { /* << it's an ad byte ff; Common::String z; - warning("STUB: Acci::_vm->_scrolls.displaywhat()"); + warning("STUB: Acci::_vm->_scrolls->displaywhat()"); } bool Acci::do_pronouns() { @@ -430,38 +430,38 @@ void Acci::others() { void Acci::lookaround() { /* This is called when you say "look." */ - _vm->_scrolls.display(*_vm->_gyro->also[0][1]); + _vm->_scrolls->display(*_vm->_gyro->also[0][1]); switch (_vm->_gyro->dna.room) { case r__spludwicks: if (_vm->_gyro->dna.avaricius_talk > 0) - _vm->_visa.dixi('q', 23); + _vm->_visa->dixi('q', 23); else others(); break; case r__robins: if (_vm->_gyro->dna.tied_up) - _vm->_visa.dixi('q', 38); + _vm->_visa->dixi('q', 38); if (_vm->_gyro->dna.mushroom_growing) - _vm->_visa.dixi('q', 55); + _vm->_visa->dixi('q', 55); break; case r__insidecardiffcastle: if (!_vm->_gyro->dna.taken_pen) - _vm->_visa.dixi('q', 49); + _vm->_visa->dixi('q', 49); break; case r__lustiesroom: if (_vm->_gyro->dna.lustie_is_asleep) - _vm->_visa.dixi('q', 65); + _vm->_visa->dixi('q', 65); break; case r__catacombs: switch (_vm->_gyro->dna.cat_y * 256 + _vm->_gyro->dna.cat_x) { case 258 : - _vm->_visa.dixi('q', 80); + _vm->_visa->dixi('q', 80); break; /* Inside art gallery */ case 514 : - _vm->_visa.dixi('q', 81); + _vm->_visa->dixi('q', 81); break; /* Outside ditto */ case 260 : - _vm->_visa.dixi('q', 82); + _vm->_visa->dixi('q', 82); break; /* Outside Geida's room. */ } break; @@ -475,7 +475,7 @@ void Acci::opendoor() { /* so whaddya THINK this does?! */ switch (_vm->_gyro->dna.room) { /* Special cases. */ case r__yours: - if (_vm->_trip.infield(2)) { + if (_vm->_trip->infield(2)) { /* Opening the box. */ thing = 54; /* The box. */ person = pardon; examine(); @@ -484,7 +484,7 @@ void Acci::opendoor() { /* so whaddya THINK this does?! */ break; case r__spludwicks: if (thing == 61) { - _vm->_visa.dixi('q', 85); + _vm->_visa->dixi('q', 85); return; } break; @@ -495,26 +495,26 @@ void Acci::opendoor() { /* so whaddya THINK this does?! */ return; /* No doors can open if you can't move Avvy. */ for (fv = 9; fv <= 15; fv++) { - if (_vm->_trip.infield(fv)) { + if (_vm->_trip->infield(fv)) { { _vm->_gyro->portals[fv]; switch (_vm->_gyro->portals[fv].op) { case _vm->_gyro->exclaim: - _vm->_trip.tr[1].bounce(); - _vm->_visa.dixi('x', _vm->_gyro->portals[fv].data); + _vm->_trip->tr[1].bounce(); + _vm->_visa->dixi('x', _vm->_gyro->portals[fv].data); break; case _vm->_gyro->transport: - _vm->_trip.fliproom((_vm->_gyro->portals[fv].data) >> 8 /*High byte*/, (_vm->_gyro->portals[fv].data) & 0x0F /*Low byte*/); + _vm->_trip->fliproom((_vm->_gyro->portals[fv].data) >> 8 /*High byte*/, (_vm->_gyro->portals[fv].data) & 0x0F /*Low byte*/); break; case _vm->_gyro->unfinished: - _vm->_trip.tr[1].bounce(); - _vm->_scrolls.display("Sorry. This place is not available yet!"); + _vm->_trip->tr[1].bounce(); + _vm->_scrolls->display("Sorry. This place is not available yet!"); break; case _vm->_gyro->special: - _vm->_trip.call_special(_vm->_gyro->portals[fv].data); + _vm->_trip->call_special(_vm->_gyro->portals[fv].data); break; case _vm->_gyro->mopendoor: - _vm->_trip.open_the_door((_vm->_gyro->portals[fv].data) >> 8, (_vm->_gyro->portals[fv].data) & 0x0F, fv); + _vm->_trip->open_the_door((_vm->_gyro->portals[fv].data) >> 8, (_vm->_gyro->portals[fv].data) & 0x0F, fv); break; } } @@ -523,18 +523,18 @@ void Acci::opendoor() { /* so whaddya THINK this does?! */ } if (_vm->_gyro->dna.room == r__map) - _vm->_scrolls.display(Common::String("Avvy, you can complete the whole game without ever going " + _vm->_scrolls->display(Common::String("Avvy, you can complete the whole game without ever going " "to anywhere other than Argent, Birmingham, Cardiff, " "Nottingham and Norwich.")); else - _vm->_scrolls.display("Door? What door?"); + _vm->_scrolls->display("Door? What door?"); } void Acci::silly() { - _vm->_scrolls.display("Don't be silly!"); + _vm->_scrolls->display("Don't be silly!"); } void Acci::putproc() { /* Called when you call vb_put. */ @@ -555,15 +555,15 @@ void Acci::putproc() { /* Called when you call vb_put. */ case _vm->_gyro->wine: if (thing == _vm->_gyro->onion) { if (_vm->_gyro->dna.rotten_onion) - _vm->_scrolls.display(Common::String("That's a bit like shutting the stable door after the " + _vm->_scrolls->display(Common::String("That's a bit like shutting the stable door after the " "horse has bolted!")); else { /* Put onion into wine? */ if (_vm->_gyro->dna.winestate != 3) - _vm->_scrolls.display("\6Oignon au vin\22 is a bit too strong for your tastes!"); + _vm->_scrolls->display("\6Oignon au vin\22 is a bit too strong for your tastes!"); else { /* Put onion into vinegar! Yes! */ _vm->_gyro->dna.onion_in_vinegar = true; - _vm->_lucerna.points(7); - _vm->_visa.dixi('u', 9); + _vm->_lucerna->points(7); + _vm->_visa->dixi('u', 9); } } } else @@ -573,33 +573,33 @@ void Acci::putproc() { /* Called when you call vb_put. */ case 54: if (_vm->_gyro->dna.room == 1) { /* Put something into the box. */ if (_vm->_gyro->dna.box_contents != nowt) - _vm->_scrolls.display(Common::String("There's something in the box already, Avvy. Try taking" + _vm->_scrolls->display(Common::String("There's something in the box already, Avvy. Try taking" " that out first.")); else { switch (thing) { case _vm->_gyro->money: - _vm->_scrolls.display("You'd better keep some ready cash on you!"); + _vm->_scrolls->display("You'd better keep some ready cash on you!"); break; case _vm->_gyro->bell: - _vm->_scrolls.display("That's a silly place to keep a bell."); + _vm->_scrolls->display("That's a silly place to keep a bell."); break; case _vm->_gyro->bodkin: - _vm->_scrolls.display("But you might need it!"); + _vm->_scrolls->display("But you might need it!"); break; case _vm->_gyro->onion: - _vm->_scrolls.display("Just give it to Spludwick, Avvy!"); + _vm->_scrolls->display("Just give it to Spludwick, Avvy!"); break; default: /* Put the object into the box... */ if (_vm->_gyro->dna.wearing == thing) - _vm->_scrolls.display(Common::String("You'd better take ") + _vm->_gyro->get_better(thing) + " off first!"); + _vm->_scrolls->display(Common::String("You'd better take ") + _vm->_gyro->get_better(thing) + " off first!"); else { - _vm->_celer.show_one(5); /* Open box. */ + _vm->_celer->show_one(5); /* Open box. */ _vm->_gyro->dna.box_contents = thing; _vm->_gyro->dna.obj[thing] = false; - _vm->_lucerna.objectlist(); - _vm->_scrolls.display("OK, it's in the box."); - _vm->_celer.show_one(6); /* Shut box. */ + _vm->_lucerna->objectlist(); + _vm->_scrolls->display("OK, it's in the box."); + _vm->_celer->show_one(6); /* Shut box. */ } } } @@ -615,15 +615,15 @@ void Acci::putproc() { /* Called when you call vb_put. */ /* The result of this fn is whether or not he says "Hey, thanks!" */ void Acci::not_in_order() { - _vm->_scrolls.display(Common::String("Sorry, I need the ingredients in the right order for this potion.") + + _vm->_scrolls->display(Common::String("Sorry, I need the ingredients in the right order for this potion.") + " What I need next is " + _vm->_gyro->get_better(_vm->_gyro->spludwick_order[_vm->_gyro->dna.given2spludwick]) + ".\232\2"); } void Acci::go_to_cauldron() { - _vm->_trip.tr[2].call_eachstep = false; /* Stops Geida_Procs. */ + _vm->_trip->tr[2].call_eachstep = false; /* Stops Geida_Procs. */ _vm->_timeout->set_up_timer(1, _vm->_timeout->procspludwick_goes_to_cauldron, _vm->_timeout->reason_spludwalk); - _vm->_trip.tr[2].walkto(2); + _vm->_trip->tr[2].walkto(2); } bool Acci::give2spludwick() { @@ -638,31 +638,31 @@ bool Acci::give2spludwick() { case _vm->_gyro->onion: _vm->_gyro->dna.obj[_vm->_gyro->onion] = false; if (_vm->_gyro->dna.rotten_onion) - _vm->_visa.dixi('q', 22); + _vm->_visa->dixi('q', 22); else { _vm->_gyro->dna.given2spludwick += 1; - _vm->_visa.dixi('q', 20); + _vm->_visa->dixi('q', 20); go_to_cauldron(); - _vm->_lucerna.points(3); + _vm->_lucerna->points(3); } - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); break; case _vm->_gyro->ink: _vm->_gyro->dna.obj[_vm->_gyro->ink] = false; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); _vm->_gyro->dna.given2spludwick += 1; - _vm->_visa.dixi('q', 24); + _vm->_visa->dixi('q', 24); go_to_cauldron(); - _vm->_lucerna.points(3); + _vm->_lucerna->points(3); break; case _vm->_gyro->mushroom: _vm->_gyro->dna.obj[_vm->_gyro->mushroom] = false; - _vm->_visa.dixi('q', 25); - _vm->_lucerna.points(5); + _vm->_visa->dixi('q', 25); + _vm->_lucerna->points(5); _vm->_gyro->dna.given2spludwick += 1; go_to_cauldron(); _vm->_gyro->dna.obj[_vm->_gyro->potion] = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); break; default: give2spludwick_result = true; @@ -678,36 +678,36 @@ void Acci::have_a_drink() { _vm->_gyro->dna.teetotal = true; _vm->_gyro->dna.avvy_is_awake = false; _vm->_gyro->dna.avvy_in_bed = true; - _vm->_lucerna.objectlist(); - _vm->_lucerna.dusk(); + _vm->_lucerna->objectlist(); + _vm->_lucerna->dusk(); _vm->_gyro->hang_around_for_a_while(); - _vm->_trip.fliproom(1, 1); + _vm->_trip->fliproom(1, 1); _vm->_gyro->background(14); - _vm->_trip.new_game_for_trippancy(); /* Not really */ + _vm->_trip->new_game_for_trippancy(); /* Not really */ } } void Acci::cardiff_climbing() { if (_vm->_gyro->dna.standing_on_dais) { /* Clamber up. */ - _vm->_scrolls.display("You climb down, back onto the floor."); + _vm->_scrolls->display("You climb down, back onto the floor."); _vm->_gyro->dna.standing_on_dais = false; - _vm->_trip.apped(1, 3); + _vm->_trip->apped(1, 3); } else { /* Clamber down. */ - if (_vm->_trip.infield(1)) { - _vm->_scrolls.display("You clamber up onto the dais."); + if (_vm->_trip->infield(1)) { + _vm->_scrolls->display("You clamber up onto the dais."); _vm->_gyro->dna.standing_on_dais = true; - _vm->_trip.apped(1, 2); + _vm->_trip->apped(1, 2); } else - _vm->_scrolls.display("Get a bit closer, Avvy."); + _vm->_scrolls->display("Get a bit closer, Avvy."); } } /* Called when you ask Avvy to stand. */ void Acci::already() { - _vm->_scrolls.display("You're already standing!"); + _vm->_scrolls->display("You're already standing!"); } void Acci::stand_up() { @@ -715,16 +715,16 @@ void Acci::stand_up() { case r__yours: /* Avvy isn't asleep. */ if (_vm->_gyro->dna.avvy_in_bed) { /* But he's in bed. */ if (_vm->_gyro->dna.teetotal) { - _vm->_visa.dixi('d', 12); + _vm->_visa->dixi('d', 12); _vm->_gyro->background(0); - _vm->_visa.dixi('d', 14); + _vm->_visa->dixi('d', 14); } - _vm->_trip.tr[1].visible = true; + _vm->_trip->tr[1].visible = true; _vm->_gyro->dna.user_moves_avvy = true; - _vm->_trip.apped(1, 2); + _vm->_trip->apped(1, 2); _vm->_gyro->dna.rw = _vm->_gyro->left; - _vm->_celer.show_one(4); /* Picture of empty pillow. */ - _vm->_lucerna.points(1); + _vm->_celer->show_one(4); /* Picture of empty pillow. */ + _vm->_lucerna->points(1); _vm->_gyro->dna.avvy_in_bed = false; _vm->_timeout->lose_timer(_vm->_timeout->reason_arkata_shouts); } else @@ -737,9 +737,9 @@ void Acci::stand_up() { case r__nottspub: if (_vm->_gyro->dna.sitting_in_pub) { - _vm->_celer.show_one(4); /* Not sitting down. */ - _vm->_trip.tr[1].visible = true; /* But standing up. */ - _vm->_trip.apped(1, 4); /* And walking away. */ + _vm->_celer->show_one(4); /* Not sitting down. */ + _vm->_trip->tr[1].visible = true; /* But standing up. */ + _vm->_trip->apped(1, 4); /* And walking away. */ _vm->_gyro->dna.sitting_in_pub = false; /* Really not sitting down. */ _vm->_gyro->dna.user_moves_avvy = true; /* And ambulant. */ } else @@ -754,93 +754,93 @@ void Acci::stand_up() { void Acci::getproc(char thing) { switch (_vm->_gyro->dna.room) { case r__yours: - if (_vm->_trip.infield(2)) { + if (_vm->_trip->infield(2)) { if (_vm->_gyro->dna.box_contents == thing) { - _vm->_celer.show_one(5); - _vm->_scrolls.display("OK, I've got it."); + _vm->_celer->show_one(5); + _vm->_scrolls->display("OK, I've got it."); _vm->_gyro->dna.obj[thing] = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); _vm->_gyro->dna.box_contents = nowt; - _vm->_celer.show_one(6); + _vm->_celer->show_one(6); } else - _vm->_scrolls.display(Common::String("I can't see ") + _vm->_gyro->get_better(thing) + " in the box."); + _vm->_scrolls->display(Common::String("I can't see ") + _vm->_gyro->get_better(thing) + " in the box."); } else - _vm->_visa.dixi('q', 57); + _vm->_visa->dixi('q', 57); break; case r__insidecardiffcastle: switch (thing) { case _vm->_gyro->pen: - if (_vm->_trip.infield(2)) { + if (_vm->_trip->infield(2)) { /* Standing on the dais. */ if (_vm->_gyro->dna.taken_pen) - _vm->_scrolls.display("It's not there, Avvy."); + _vm->_scrolls->display("It's not there, Avvy."); else { /* OK: we're taking the pen, and it's there. */ - _vm->_celer.show_one(4); /* No pen there now. */ - _vm->_trip.call_special(3); /* Zap! */ + _vm->_celer->show_one(4); /* No pen there now. */ + _vm->_trip->call_special(3); /* Zap! */ _vm->_gyro->dna.taken_pen = true; _vm->_gyro->dna.obj[_vm->_gyro->pen] = true; - _vm->_lucerna.objectlist(); - _vm->_scrolls.display("Taken."); + _vm->_lucerna->objectlist(); + _vm->_scrolls->display("Taken."); } } else if (_vm->_gyro->dna.standing_on_dais) - _vm->_visa.dixi('q', 53); + _vm->_visa->dixi('q', 53); else - _vm->_visa.dixi('q', 51); + _vm->_visa->dixi('q', 51); break; case _vm->_gyro->bolt: - _vm->_visa.dixi('q', 52); + _vm->_visa->dixi('q', 52); break; default: - _vm->_visa.dixi('q', 57); + _vm->_visa->dixi('q', 57); } break; case r__robins: - if ((thing == _vm->_gyro->mushroom) & (_vm->_trip.infield(1)) & (_vm->_gyro->dna.mushroom_growing)) { - _vm->_celer.show_one(3); - _vm->_scrolls.display("Got it!"); + if ((thing == _vm->_gyro->mushroom) & (_vm->_trip->infield(1)) & (_vm->_gyro->dna.mushroom_growing)) { + _vm->_celer->show_one(3); + _vm->_scrolls->display("Got it!"); _vm->_gyro->dna.mushroom_growing = false; _vm->_gyro->dna.taken_mushroom = true; _vm->_gyro->dna.obj[_vm->_gyro->mushroom] = true; - _vm->_lucerna.objectlist(); - _vm->_lucerna.points(3); + _vm->_lucerna->objectlist(); + _vm->_lucerna->points(3); } else - _vm->_visa.dixi('q', 57); + _vm->_visa->dixi('q', 57); break; default: - _vm->_visa.dixi('q', 57); + _vm->_visa->dixi('q', 57); } } void Acci::give_geida_the_lute() { if (_vm->_gyro->dna.room != r__lustiesroom) { - _vm->_scrolls.display("Not yet. Try later!\232\2"); + _vm->_scrolls->display("Not yet. Try later!\232\2"); return; } _vm->_gyro->dna.obj[_vm->_gyro->lute] = false; - _vm->_lucerna.objectlist(); - _vm->_visa.dixi('q', 64); /* She plays it. */ + _vm->_lucerna->objectlist(); + _vm->_visa->dixi('q', 64); /* She plays it. */ /* And the rest has been moved to Timeout... under give_lute_to_Geida. */ _vm->_timeout->set_up_timer(1, _vm->_timeout->procgive_lute_to_geida, _vm->_timeout->reason_geida_sings); - _vm->_enid.back_to_bootstrap(4); + _vm->_enid->back_to_bootstrap(4); } void Acci::play_harp() { - if (_vm->_trip.infield(7)) - _vm->_scrolls.musical_scroll(); + if (_vm->_trip->infield(7)) + _vm->_scrolls->musical_scroll(); else - _vm->_scrolls.display("Get a bit closer to it, Avvy!"); + _vm->_scrolls->display("Get a bit closer to it, Avvy!"); } void Acci::winsequence() { - _vm->_visa.dixi('q', 78); - _vm->_sequence.first_show(7); - _vm->_sequence.then_show(8); - _vm->_sequence.then_show(9); - _vm->_sequence.start_to_close(); + _vm->_visa->dixi('q', 78); + _vm->_sequence->first_show(7); + _vm->_sequence->then_show(8); + _vm->_sequence->then_show(9); + _vm->_sequence->start_to_close(); _vm->_timeout->set_up_timer(30, _vm->_timeout->procwinning, _vm->_timeout->reason_winning); } @@ -858,15 +858,15 @@ void Acci::person_speaks() { } if (_vm->_gyro->whereis[person] != _vm->_gyro->dna.room) { - _vm->_scrolls.display("\231\4"); /* Avvy _vm->_gyro->himself! */ + _vm->_scrolls->display("\231\4"); /* Avvy _vm->_gyro->himself! */ return; } found = false; /* The person we're looking for's code is in Person. */ - for (fv = 1; fv <= _vm->_trip.numtr; fv++) { - if (_vm->_trip.tr[fv].quick && ((_vm->_trip.tr[fv].a.accinum + 149) == person)) { - _vm->_scrolls.display(Common::String('\23') + char(fv + 48) + '\4'); + for (fv = 1; fv <= _vm->_trip->numtr; fv++) { + if (_vm->_trip->tr[fv].quick && ((_vm->_trip->tr[fv].a.accinum + 149) == person)) { + _vm->_scrolls->display(Common::String('\23') + char(fv + 48) + '\4'); found = true; } } @@ -875,7 +875,7 @@ void Acci::person_speaks() { for (fv = 10; fv <= 25; fv++) { _vm->_gyro->quasipeds[fv]; if ((_vm->_gyro->quasipeds[fv].who == person) && (_vm->_gyro->quasipeds[fv].room == _vm->_gyro->dna.room)) { - _vm->_scrolls.display(Common::String('\23') + char(fv + 55) + '\4'); + _vm->_scrolls->display(Common::String('\23') + char(fv + 55) + '\4'); } } } @@ -883,7 +883,7 @@ void Acci::person_speaks() { void Acci::heythanks() { person_speaks(); - _vm->_scrolls.display("Hey, thanks!\2(But now, you've lost it!)"); + _vm->_scrolls->display("Hey, thanks!\2(But now, you've lost it!)"); _vm->_gyro->dna.obj[thing] = false; } @@ -908,7 +908,7 @@ void Acci::do_that() { !(set::of(vb_load, vb_save, vb_quit, vb_info, vb_help, vb_larrypass, vb_phaon, vb_boss, vb_cheat, vb_restart, vb_dir, vb_score, vb_highscores, vb_smartalec, eos).has(verb))) { - _vm->_scrolls.display(Common::String("You're dead, so don't talk. What are you, a ghost ") + + _vm->_scrolls->display(Common::String("You're dead, so don't talk. What are you, a ghost ") + "or something? Try restarting, or restoring a saved game!"); return; } @@ -917,7 +917,7 @@ void Acci::do_that() { !(set::of(vb_load, vb_save, vb_quit, vb_info, vb_help, vb_larrypass, vb_phaon, vb_boss, vb_cheat, vb_restart, vb_dir, vb_die, vb_score, vb_highscores, vb_smartalec, vb_expletive, vb_wake, eos).has(verb))) { - _vm->_scrolls.display("Talking in your sleep? Try waking up!"); + _vm->_scrolls->display("Talking in your sleep? Try waking up!"); return; } */ @@ -931,37 +931,37 @@ void Acci::do_that() { opendoor(); break; case vb_pause: - _vm->_scrolls.display(Common::String("Game paused.") + '\3' + '\15' + '\15' + "Press Enter, Esc, or click " + + _vm->_scrolls->display(Common::String("Game paused.") + '\3' + '\15' + '\15' + "Press Enter, Esc, or click " + "the mouse on the `O.K.\" box to continue."); break; case vb_get: if (thing != pardon) { /* Legitimate try to pick something up. */ if (_vm->_gyro->dna.carrying >= maxobjs) - _vm->_scrolls.display("You can't carry any more!"); + _vm->_scrolls->display("You can't carry any more!"); else getproc(thing); } else { /* Not... ditto. */ if (person != pardon) - _vm->_scrolls.display("You can't sweep folk off their feet!"); + _vm->_scrolls->display("You can't sweep folk off their feet!"); else - _vm->_scrolls.display("I assure you, you don't need it."); + _vm->_scrolls->display("I assure you, you don't need it."); } break; case vb_drop: - _vm->_scrolls.display(Common::String("Two years ago you dropped a florin in the street. Three days ") + + _vm->_scrolls->display(Common::String("Two years ago you dropped a florin in the street. Three days ") + "later it was gone! So now you never leave ANYTHING lying around. OK?"); break; - /* begin _vm->_gyro->dna.obj[thing]:=false; _vm->_lucerna.objectlist(); end;*/ + /* begin _vm->_gyro->dna.obj[thing]:=false; _vm->_lucerna->objectlist(); end;*/ case vb_inv: inv(); break; case vb_talk: if (person == pardon) { if (_vm->_gyro->subjnumber == 99) /* They typed "say passuint16". */ - _vm->_scrolls.display("Yes, but what \6is\22 the passuint16?"); + _vm->_scrolls->display("Yes, but what \6is\22 the passuint16?"); /* else if (set::of(range(1, 49), 253, 249, eos).has(subjnumber)) { Delete(thats, 1, 1); @@ -973,38 +973,38 @@ void Acci::do_that() { person = _vm->_gyro->subjnumber; subjnumber = 0; if (set::of(pardon, '\0', eos).has(person)) - _vm->_scrolls.display("Talk to whom?"); + _vm->_scrolls->display("Talk to whom?"); else if (personshere()) talkto(ord(person)); } */ else if (person == pardon) - _vm->_scrolls.display("Talk to whom?"); + _vm->_scrolls->display("Talk to whom?"); } else if (personshere()) - _vm->_visa.talkto(person); + _vm->_visa->talkto(person); break; case vb_give: if (holding()) { if (person == pardon) - _vm->_scrolls.display("Give to whom?"); + _vm->_scrolls->display("Give to whom?"); else if (personshere()) { switch (thing) { case _vm->_gyro->money : - _vm->_scrolls.display("You can't bring yourself to give away your moneybag."); + _vm->_scrolls->display("You can't bring yourself to give away your moneybag."); break; case _vm->_gyro->bodkin: case _vm->_gyro->bell: case _vm->_gyro->clothes: case _vm->_gyro->habit : - _vm->_scrolls.display("Don't give it away, it might be useful!"); + _vm->_scrolls->display("Don't give it away, it might be useful!"); break; default: switch (person) { case _vm->_gyro->pcrapulus: switch (thing) { case _vm->_gyro->wine: - _vm->_scrolls.display("Crapulus grabs the wine and gulps it down."); + _vm->_scrolls->display("Crapulus grabs the wine and gulps it down."); _vm->_gyro->dna.obj[_vm->_gyro->wine] = false; break; default: @@ -1013,7 +1013,7 @@ void Acci::do_that() { break; case _vm->_gyro->pcwytalot: /*if (set::of(crossbow, bolt, eos).has(thing)) - _vm->_scrolls.display(Common::String("You might be able to influence ") + + _vm->_scrolls->display(Common::String("You might be able to influence ") + "Cwytalot more if you used it!"); else */heythanks(); break; @@ -1023,13 +1023,13 @@ void Acci::do_that() { break; case _vm->_gyro->pibythneth: if (thing == _vm->_gyro->badge) { - _vm->_visa.dixi('q', 32); /* Thanks! Wow! */ - _vm->_lucerna.points(3); + _vm->_visa->dixi('q', 32); /* Thanks! Wow! */ + _vm->_lucerna->points(3); _vm->_gyro->dna.obj[_vm->_gyro->badge] = false; _vm->_gyro->dna.obj[_vm->_gyro->habit] = true; _vm->_gyro->dna.givenbadgetoiby = true; - _vm->_celer.show_one(8); - _vm->_celer.show_one(9); + _vm->_celer->show_one(8); + _vm->_celer->show_one(9); } else heythanks(); break; @@ -1037,24 +1037,24 @@ void Acci::do_that() { if (_vm->_gyro->dna.ayles_is_awake) { if (thing == _vm->_gyro->pen) { _vm->_gyro->dna.obj[_vm->_gyro->pen] = false; - _vm->_visa.dixi('q', 54); + _vm->_visa->dixi('q', 54); _vm->_gyro->dna.obj[_vm->_gyro->ink] = true; _vm->_gyro->dna.given_pen_to_ayles = true; - _vm->_lucerna.objectlist(); - _vm->_lucerna.points(2); + _vm->_lucerna->objectlist(); + _vm->_lucerna->points(2); } else heythanks(); } else - _vm->_scrolls.display("But he's asleep!"); + _vm->_scrolls->display("But he's asleep!"); break; case _vm->_gyro->pgeida: switch (thing) { case _vm->_gyro->potion: _vm->_gyro->dna.obj[_vm->_gyro->potion] = false; - _vm->_visa.dixi('u', 16); /* She drinks it. */ - _vm->_lucerna.points(2); + _vm->_visa->dixi('u', 16); /* She drinks it. */ + _vm->_lucerna->points(2); _vm->_gyro->dna.geida_given_potion = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); break; case _vm->_gyro->lute: give_geida_the_lute(); @@ -1069,7 +1069,7 @@ void Acci::do_that() { if (_vm->_gyro->dna.geida_given_potion) winsequence(); else - _vm->_visa.dixi('q', 77); + _vm->_visa->dixi('q', 77); break; /* That Geida woman! */ default: heythanks(); @@ -1080,7 +1080,7 @@ void Acci::do_that() { } } } - _vm->_lucerna.objectlist(); /* Just in case... */ + _vm->_lucerna->objectlist(); /* Just in case... */ } break; @@ -1090,98 +1090,98 @@ void Acci::do_that() { swallow(); break; case vb_load: - _vm->_enid.edna_load(realwords[2]); + _vm->_enid->edna_load(realwords[2]); break; case vb_save: if (_vm->_gyro->alive) - _vm->_enid.edna_save(realwords[2]); + _vm->_enid->edna_save(realwords[2]); else - _vm->_scrolls.display("It's a bit late now to save your game!"); + _vm->_scrolls->display("It's a bit late now to save your game!"); break; case vb_pay: - _vm->_scrolls.display("No money need change hands."); + _vm->_scrolls->display("No money need change hands."); break; case vb_look: lookaround(); break; case vb_break: - _vm->_scrolls.display("Vandalism is prohibited within this game!"); + _vm->_scrolls->display("Vandalism is prohibited within this game!"); break; case vb_quit: /* quit */ //if (_vm->_gyro->demo) { - // _vm->_visa.dixi('q', 31); + // _vm->_visa->dixi('q', 31); // close(demofile); // exit(0); /* Change this later!!! */ //} if (!polite) - _vm->_scrolls.display("How about a `please\", Avvy?"); - else if (_vm->_scrolls.ask("\23C\26Do you really want to quit?")) + _vm->_scrolls->display("How about a `please\", Avvy?"); + else if (_vm->_scrolls->ask("\23C\26Do you really want to quit?")) _vm->_gyro->lmo = true; break; case vb_go: - _vm->_scrolls.display("Just use the arrow keys to walk there."); + _vm->_scrolls->display("Just use the arrow keys to walk there."); break; case vb_info: - _vm->_scrolls.aboutscroll = true; - /* _vm->_scrolls.display('Thorsoft of Letchworth presents:'+^c+^m+^m+ + _vm->_scrolls->aboutscroll = true; + /* _vm->_scrolls->display('Thorsoft of Letchworth presents:'+^c+^m+^m+ 'The medi‘val descendant of'+^m+ 'Denarius Avaricius Sextus'+^m+'in:'+ ^m+^m+'LORD AVALOT D''ARGENT'+ ^m+'version '+vernum+^m+^m+'Copyright ï ' +copyright+', Mark, Mike and Thomas Thurman.');*/ - _vm->_scrolls.display(Common::String("\r\r\r\r\r\r\r") + "LORD AVALOT D'ARGENT" + "\3\r" + + _vm->_scrolls->display(Common::String("\r\r\r\r\r\r\r") + "LORD AVALOT D'ARGENT" + "\3\r" + "The medi‘val descendant of" + '\15' + "Denarius Avaricius Sextus" + '\15' + '\15' + "version " + _vm->_gyro->vernum + '\15' + '\15' + "Copyright ï " + _vm->_gyro->copyright + ", Mark, Mike and Thomas Thurman." + '\23' + 'Y' + '\26'); - _vm->_scrolls.aboutscroll = false; + _vm->_scrolls->aboutscroll = false; break; case vb_undress: if (_vm->_gyro->dna.wearing == nowt) - _vm->_scrolls.display("You're already stark naked!"); + _vm->_scrolls->display("You're already stark naked!"); else if (_vm->_gyro->dna.avvys_in_the_cupboard) { - _vm->_scrolls.display(Common::String("You take off ") + _vm->_gyro->get_better(_vm->_gyro->dna.wearing) + '.'); + _vm->_scrolls->display(Common::String("You take off ") + _vm->_gyro->get_better(_vm->_gyro->dna.wearing) + '.'); _vm->_gyro->dna.wearing = nowt; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); } else - _vm->_scrolls.display("Hadn't you better find somewhere more private, Avvy?"); + _vm->_scrolls->display("Hadn't you better find somewhere more private, Avvy?"); break; case vb_wear: if (holding()) { /* wear something */ switch (thing) { case _vm->_gyro->chastity: - _vm->_scrolls.display("Hey, what kind of a weirdo are you\??!"); + _vm->_scrolls->display("Hey, what kind of a weirdo are you\??!"); break; case _vm->_gyro->clothes: case _vm->_gyro->habit: /* Change this! */ if (_vm->_gyro->dna.wearing != nowt) { if (_vm->_gyro->dna.wearing == thing) - _vm->_scrolls.display("You're already wearing that."); + _vm->_scrolls->display("You're already wearing that."); else - _vm->_scrolls.display(Common::String("You'll be rather warm wearing two ") + + _vm->_scrolls->display(Common::String("You'll be rather warm wearing two ") + "sets of clothes!"); return; } else _vm->_gyro->dna.wearing = thing; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); if (thing == _vm->_gyro->habit) fv = 3; else fv = 0; - if (_vm->_trip.tr[1].whichsprite != fv) { - sx = _vm->_trip.tr[1].x; - sy = _vm->_trip.tr[1].y; - _vm->_trip.tr[1].done(); - _vm->_trip.tr[1].init(fv, true, &_vm->_trip); - _vm->_trip.tr[1].appear(sx, sy, _vm->_trip.left); - _vm->_trip.tr[1].visible = false; + if (_vm->_trip->tr[1].whichsprite != fv) { + sx = _vm->_trip->tr[1].x; + sy = _vm->_trip->tr[1].y; + _vm->_trip->tr[1].done(); + _vm->_trip->tr[1].init(fv, true, _vm->_trip); + _vm->_trip->tr[1].appear(sx, sy, _vm->_trip->left); + _vm->_trip->tr[1].visible = false; } break; default: - _vm->_scrolls.display(what); + _vm->_scrolls->display(what); } } break; @@ -1199,38 +1199,38 @@ void Acci::do_that() { } else if (holding()) { switch (thing) { case _vm->_gyro->lute : - _vm->_visa.dixi('U', 7); + _vm->_visa->dixi('U', 7); if (_vm->_gyro->whereis[_vm->_gyro->pcwytalot] == _vm->_gyro->dna.room) - _vm->_visa.dixi('U', 10); + _vm->_visa->dixi('U', 10); if (_vm->_gyro->whereis[_vm->_gyro->pdulustie] == _vm->_gyro->dna.room) - _vm->_visa.dixi('U', 15); + _vm->_visa->dixi('U', 15); break; case 52: if (_vm->_gyro->dna.room == r__musicroom) play_harp(); else - _vm->_scrolls.display(what); + _vm->_scrolls->display(what); break; case 55: if (_vm->_gyro->dna.room == r__argentpub) ; /*play_nim(); - Don't implement yet.*/ else - _vm->_scrolls.display(what); + _vm->_scrolls->display(what); break; default: - _vm->_scrolls.display(what); + _vm->_scrolls->display(what); } } break; case vb_ring: if (holding()) { if (thing == _vm->_gyro->bell) { - _vm->_scrolls.display("Ding, dong, ding, dong, ding, dong, ding, dong..."); + _vm->_scrolls->display("Ding, dong, ding, dong, ding, dong, ding, dong..."); if ((_vm->_gyro->dna.ringing_bells) & (_vm->_gyro->flagset('B'))) - _vm->_scrolls.display("(Are you trying to join in, Avvy\?\?!)"); + _vm->_scrolls->display("(Are you trying to join in, Avvy\?\?!)"); } else - _vm->_scrolls.display(what); + _vm->_scrolls->display(what); } break; case vb_help: @@ -1238,10 +1238,10 @@ void Acci::do_that() { // I don't want to implement help yet. break; case vb_larrypass: - _vm->_scrolls.display("Wrong game!"); + _vm->_scrolls->display("Wrong game!"); break; case vb_phaon: - _vm->_scrolls.display("Hello, Phaon!"); + _vm->_scrolls->display("Hello, Phaon!"); break; case vb_boss: // bosskey(); @@ -1249,72 +1249,72 @@ void Acci::do_that() { break; case vb_pee: if (_vm->_gyro->flagset('P')) { - _vm->_scrolls.display("Hmm, I don't think anyone will notice..."); + _vm->_scrolls->display("Hmm, I don't think anyone will notice..."); _vm->_timeout->set_up_timer(4, _vm->_timeout->procurinate, _vm->_timeout->reason_gototoilet); } else - _vm->_scrolls.display("It would be \6VERY\22 unwise to do that here, Avvy!"); + _vm->_scrolls->display("It would be \6VERY\22 unwise to do that here, Avvy!"); break; case vb_cheat: - _vm->_scrolls.display(Common::String('\6') + "Cheat mode now enabled."); + _vm->_scrolls->display(Common::String('\6') + "Cheat mode now enabled."); _vm->_gyro->cheat = true; break; case vb_magic: if (_vm->_gyro->dna.avaricius_talk > 0) - _vm->_visa.dixi('q', 19); + _vm->_visa->dixi('q', 19); else { - if ((_vm->_gyro->dna.room == 12) & (_vm->_trip.infield(2))) { + if ((_vm->_gyro->dna.room == 12) & (_vm->_trip->infield(2))) { /* Avaricius appears! */ - _vm->_visa.dixi('q', 17); + _vm->_visa->dixi('q', 17); if (_vm->_gyro->whereis['\227'] == 12) - _vm->_visa.dixi('q', 18); + _vm->_visa->dixi('q', 18); else { - _vm->_trip.tr[2].init(1, false, &_vm->_trip); /* Avaricius */ - _vm->_trip.apped(2, 4); - _vm->_trip.tr[2].walkto(5); - _vm->_trip.tr[2].call_eachstep = true; - _vm->_trip.tr[2].eachstep = _vm->_trip.procback_and_forth; + _vm->_trip->tr[2].init(1, false, _vm->_trip); /* Avaricius */ + _vm->_trip->apped(2, 4); + _vm->_trip->tr[2].walkto(5); + _vm->_trip->tr[2].call_eachstep = true; + _vm->_trip->tr[2].eachstep = _vm->_trip->procback_and_forth; _vm->_gyro->dna.avaricius_talk = 14; _vm->_timeout->set_up_timer(177, _vm->_timeout->procavaricius_talks, _vm->_timeout->reason_avariciustalks); } } else - _vm->_scrolls.display("Nothing appears to happen..."); + _vm->_scrolls->display("Nothing appears to happen..."); } break; case vb_smartalec: - _vm->_scrolls.display("Listen, smart alec, that was just rhetoric."); + _vm->_scrolls->display("Listen, smart alec, that was just rhetoric."); break; case vb_expletive: switch (_vm->_gyro->dna.swore) { case 0: - _vm->_scrolls.display(Common::String("Avvy! Do you mind? There might be kids playing!\r\r") + + _vm->_scrolls->display(Common::String("Avvy! Do you mind? There might be kids playing!\r\r") + "(I shouldn't say it again, if I were you!)"); break; case 1: - _vm->_scrolls.display(Common::String("You hear a distant rumble of thunder. Must you always ") + + _vm->_scrolls->display(Common::String("You hear a distant rumble of thunder. Must you always ") + "do things I tell you not to?\r\rDon't do it again!"); break; default: _vm->_pingo->zonk(); - _vm->_scrolls.display(Common::String("A crack of lightning shoots from the sky, ") + + _vm->_scrolls->display(Common::String("A crack of lightning shoots from the sky, ") + "and fries you.\r\r(`Such is the anger of the gods, Avvy!\")"); - _vm->_lucerna.gameover(); + _vm->_lucerna->gameover(); } _vm->_gyro->dna.swore++; break; case vb_listen: if ((_vm->_gyro->dna.ringing_bells) & (_vm->_gyro->flagset('B'))) - _vm->_scrolls.display(Common::String("All other noise is drowned out by the ringing of ") + + _vm->_scrolls->display(Common::String("All other noise is drowned out by the ringing of ") + "the bells."); else if (_vm->_gyro->listen == "") - _vm->_scrolls.display("You can't hear anything much at the moment, Avvy."); + _vm->_scrolls->display("You can't hear anything much at the moment, Avvy."); else - _vm->_scrolls.display(_vm->_gyro->listen); + _vm->_scrolls->display(_vm->_gyro->listen); break; case vb_buy: /* What are they trying to buy? */ switch (_vm->_gyro->dna.room) { case r__argentpub: - if (_vm->_trip.infield(6)) { + if (_vm->_trip->infield(6)) { /* We're in a pub, and near the bar. */ switch (thing) { case '\63': @@ -1322,22 +1322,22 @@ void Acci::do_that() { case '\66': case '\72': /* Beer, whisky, cider or mead */ if (_vm->_gyro->dna.malagauche == 177) { /* Already getting us one. */ - _vm->_visa.dixi('D', 15); + _vm->_visa->dixi('D', 15); return; } if (_vm->_gyro->dna.teetotal) { - _vm->_visa.dixi('D', 6); + _vm->_visa->dixi('D', 6); return; } if (_vm->_gyro->dna.alcohol == 0) - _vm->_lucerna.points(3); - _vm->_celer.show_one(12); - _vm->_scrolls.display(booze[thing] + ", please.\231\2"); + _vm->_lucerna->points(3); + _vm->_celer->show_one(12); + _vm->_scrolls->display(booze[thing] + ", please.\231\2"); _vm->_gyro->dna.drinking = thing; - _vm->_celer.show_one(10); + _vm->_celer->show_one(10); _vm->_gyro->dna.malagauche = 177; _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuydrinks, _vm->_timeout->reason_drinks); break; @@ -1346,23 +1346,23 @@ void Acci::do_that() { break; /* We have a right one here- buy Pepsi??! */ case _vm->_gyro->wine: if (_vm->_gyro->dna.obj[_vm->_gyro->wine]) /* We've already got the wine! */ - _vm->_visa.dixi('D', 2); /* 1 bottle's shufishent! */ + _vm->_visa->dixi('D', 2); /* 1 bottle's shufishent! */ else { if (_vm->_gyro->dna.malagauche == 177) { /* Already getting us one. */ - _vm->_visa.dixi('D', 15); + _vm->_visa->dixi('D', 15); return; } if (_vm->_gyro->dna.carrying >= maxobjs) { - _vm->_scrolls.display("Your hands are full."); + _vm->_scrolls->display("Your hands are full."); return; } - _vm->_celer.show_one(12); - _vm->_scrolls.display("Wine, please.\231\2"); + _vm->_celer->show_one(12); + _vm->_scrolls->display("Wine, please.\231\2"); if (_vm->_gyro->dna.alcohol == 0) - _vm->_lucerna.points(3); - _vm->_celer.show_one(10); + _vm->_lucerna->points(3); + _vm->_celer->show_one(10); _vm->_gyro->dna.malagauche = 177; _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuywine, _vm->_timeout->reason_drinks); @@ -1370,41 +1370,41 @@ void Acci::do_that() { break; } } else - _vm->_visa.dixi('D', 5); + _vm->_visa->dixi('D', 5); break; /* Go to the bar! */ case r__outsideducks: - if (_vm->_trip.infield(6)) { + if (_vm->_trip->infield(6)) { if (thing == _vm->_gyro->onion) { if (_vm->_gyro->dna.obj[_vm->_gyro->onion]) - _vm->_visa.dixi('D', 10); /* not planning to juggle with the things! */ + _vm->_visa->dixi('D', 10); /* not planning to juggle with the things! */ else if (_vm->_gyro->dna.carrying >= maxobjs) - _vm->_scrolls.display("Before you ask, you remember that your hands are full."); + _vm->_scrolls->display("Before you ask, you remember that your hands are full."); else { if (_vm->_gyro->dna.bought_onion) - _vm->_visa.dixi('D', 11); + _vm->_visa->dixi('D', 11); else { - _vm->_visa.dixi('D', 9); - _vm->_lucerna.points(3); + _vm->_visa->dixi('D', 9); + _vm->_lucerna->points(3); } _vm->_gyro->pennycheck(3); /* It costs thruppence. */ _vm->_gyro->dna.obj[_vm->_gyro->onion] = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); _vm->_gyro->dna.bought_onion = true; _vm->_gyro->dna.rotten_onion = false; /* It's OK when it leaves the stall! */ _vm->_gyro->dna.onion_in_vinegar = false; } } else - _vm->_visa.dixi('D', 0); + _vm->_visa->dixi('D', 0); } else - _vm->_visa.dixi('D', 0); + _vm->_visa->dixi('D', 0); break; case r__nottspub: - _vm->_visa.dixi('n', 15); + _vm->_visa->dixi('n', 15); break; /* Can't sell to southerners. */ default: - _vm->_visa.dixi('D', 0); /* Can't buy that. */ + _vm->_visa->dixi('D', 0); /* Can't buy that. */ } break; case vb_attack: @@ -1415,39 +1415,39 @@ void Acci::do_that() { /* 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both. */ case 0: - _vm->_visa.dixi('Q', 10); - _vm->_scrolls.display("(At the very least, don't use your bare hands!)"); + _vm->_visa->dixi('Q', 10); + _vm->_scrolls->display("(At the very least, don't use your bare hands!)"); break; case 1: - _vm->_scrolls.display(Common::String("Attack _vm->_gyro->him with only a crossbow bolt? Are you ") + + _vm->_scrolls->display(Common::String("Attack _vm->_gyro->him with only a crossbow bolt? Are you ") + "planning on playing darts?!"); break; case 2: - _vm->_scrolls.display(Common::String("Come on, Avvy! You're not going to get very far ") + + _vm->_scrolls->display(Common::String("Come on, Avvy! You're not going to get very far ") + "with only a crossbow!"); break; case 3: - _vm->_visa.dixi('Q', 11); + _vm->_visa->dixi('Q', 11); _vm->_gyro->dna.cwytalot_gone = true; _vm->_gyro->dna.obj[_vm->_gyro->bolt] = false; _vm->_gyro->dna.obj[_vm->_gyro->crossbow] = false; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); _vm->_gyro->magics[12].op = _vm->_gyro->nix; - _vm->_lucerna.points(7); - _vm->_trip.tr[2].walkto(2); - _vm->_trip.tr[2].vanishifstill = true; - _vm->_trip.tr[2].call_eachstep = false; + _vm->_lucerna->points(7); + _vm->_trip->tr[2].walkto(2); + _vm->_trip->tr[2].vanishifstill = true; + _vm->_trip->tr[2].call_eachstep = false; _vm->_gyro->whereis['\235'] = 177; break; default: - _vm->_visa.dixi('Q', 10); /* Please try not to be so violent! */ + _vm->_visa->dixi('Q', 10); /* Please try not to be so violent! */ } } else - _vm->_visa.dixi('Q', 10); + _vm->_visa->dixi('Q', 10); break; case vb_password: if (_vm->_gyro->dna.room != r__bridge) - _vm->_visa.dixi('Q', 12); + _vm->_visa->dixi('Q', 12); else { ok = true; for (ff = 1; ff <= thats.size(); ff++) { @@ -1461,25 +1461,25 @@ void Acci::do_that() { if (ok) { if (_vm->_gyro->dna.drawbridge_open != 0) - _vm->_scrolls.display("Contrary to your expectations, the drawbridge fails to close again."); + _vm->_scrolls->display("Contrary to your expectations, the drawbridge fails to close again."); else { - _vm->_lucerna.points(4); - _vm->_scrolls.display("The drawbridge opens!"); + _vm->_lucerna->points(4); + _vm->_scrolls->display("The drawbridge opens!"); _vm->_timeout->set_up_timer(7, _vm->_timeout->procopen_drawbridge, _vm->_timeout->reason_drawbridgefalls); _vm->_gyro->dna.drawbridge_open = 1; } } else - _vm->_visa.dixi('Q', 12); + _vm->_visa->dixi('Q', 12); } break; case vb_dir: - _vm->_enid.dir(realwords[2]); + _vm->_enid->dir(realwords[2]); break; case vb_die: - _vm->_lucerna.gameover(); + _vm->_lucerna->gameover(); break; case vb_score: - _vm->_scrolls.display(Common::String("Your score is ") + _vm->_gyro->strf(_vm->_gyro->dna.score) + ",\3\rout of a " + + _vm->_scrolls->display(Common::String("Your score is ") + _vm->_gyro->strf(_vm->_gyro->dna.score) + ",\3\rout of a " + "possible 128.\r\rThis gives you a rank of " + rank() + ".\r\r" + totaltime()); break; @@ -1492,23 +1492,23 @@ void Acci::do_that() { case vb_kiss: if (person == pardon) - _vm->_scrolls.display("Kiss whom?"); + _vm->_scrolls->display("Kiss whom?"); else if (personshere()) { switch (person) { case _vm->_gyro->parkata: - _vm->_visa.dixi('U', 12); + _vm->_visa->dixi('U', 12); break; case _vm->_gyro->pgeida: - _vm->_visa.dixi('U', 13); + _vm->_visa->dixi('U', 13); break; case _vm->_gyro->pwisewoman: - _vm->_visa.dixi('U', 14); + _vm->_visa->dixi('U', 14); break; default: - _vm->_visa.dixi('U', 5); /* You WHAT? */ + _vm->_visa->dixi('U', 5); /* You WHAT? */ } } else if ((150 <= person) && (person <= 174)) - _vm->_scrolls.display("Hey, what kind of a weirdo are you??"); + _vm->_scrolls->display("Hey, what kind of a weirdo are you??"); break; @@ -1516,7 +1516,7 @@ void Acci::do_that() { if (_vm->_gyro->dna.room == r__insidecardiffcastle) cardiff_climbing(); else /* In the wrong room! */ - _vm->_scrolls.display("Not with your head for heights, Avvy!"); + _vm->_scrolls->display("Not with your head for heights, Avvy!"); break; case vb_jump: @@ -1537,66 +1537,66 @@ void Acci::do_that() { case '\0': if (!_vm->_gyro->dna.avvy_is_awake) { _vm->_gyro->dna.avvy_is_awake = true; - _vm->_lucerna.points(1); + _vm->_lucerna->points(1); _vm->_gyro->dna.avvy_in_bed = true; - _vm->_celer.show_one(3); /* Picture of Avvy, awake in bed. */ + _vm->_celer->show_one(3); /* Picture of Avvy, awake in bed. */ if (_vm->_gyro->dna.teetotal) - _vm->_visa.dixi('d', 13); + _vm->_visa->dixi('d', 13); } else - _vm->_scrolls.display("You're already awake, Avvy!"); + _vm->_scrolls->display("You're already awake, Avvy!"); break; case _vm->_gyro->payles: if (!_vm->_gyro->dna.ayles_is_awake) - _vm->_scrolls.display("You can't seem to wake _vm->_gyro->him by yourself."); + _vm->_scrolls->display("You can't seem to wake _vm->_gyro->him by yourself."); break; case _vm->_gyro->pjacques: - _vm->_scrolls.display(Common::String("Brother Jacques, Brother Jacques, are you asleep?\231\2") + + _vm->_scrolls->display(Common::String("Brother Jacques, Brother Jacques, are you asleep?\231\2") + "Hmmm... that doesn't seem to do any good..."); break; default: - _vm->_scrolls.display("It's difficult to awaken people who aren't asleep...!"); + _vm->_scrolls->display("It's difficult to awaken people who aren't asleep...!"); } break; case vb_sit: if (_vm->_gyro->dna.room == r__nottspub) { if (_vm->_gyro->dna.sitting_in_pub) - _vm->_scrolls.display("You're already sitting!"); + _vm->_scrolls->display("You're already sitting!"); else { - _vm->_trip.tr[1].walkto(4); /* Move Avvy to the place, and sit _vm->_gyro->him down. */ + _vm->_trip->tr[1].walkto(4); /* Move Avvy to the place, and sit _vm->_gyro->him down. */ _vm->_timeout->set_up_timer(1, _vm->_timeout->procavvy_sit_down, _vm->_timeout->reason_sitting_down); } } else { /* Default doodah. */ - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->hang_around_for_a_while(); - _vm->_lucerna.dawn(); - _vm->_scrolls.display("A few hours later...\20nothing much has happened..."); + _vm->_lucerna->dawn(); + _vm->_scrolls->display("A few hours later...\20nothing much has happened..."); } break; case vb_restart: - if (_vm->_scrolls.ask("Restart game and lose changes?")) { - _vm->_lucerna.dusk(); + if (_vm->_scrolls->ask("Restart game and lose changes?")) { + _vm->_lucerna->dusk(); _vm->_gyro->newgame(); - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); } break; case pardon: - _vm->_scrolls.display("Hey, a verb would be helpful!"); + _vm->_scrolls->display("Hey, a verb would be helpful!"); break; case vb_hello: person_speaks(); - _vm->_scrolls.display("Hello.\2"); + _vm->_scrolls->display("Hello.\2"); break; case vb_thanks: person_speaks(); - _vm->_scrolls.display("That's OK.\2"); + _vm->_scrolls->display("That's OK.\2"); break; default: - _vm->_scrolls.display(Common::String('\7') + "Parser bug!"); + _vm->_scrolls->display(Common::String('\7') + "Parser bug!"); } } diff --git a/engines/avalanche/acci2.h b/engines/avalanche/acci2.h index 5650146414..40cda48af1 100644 --- a/engines/avalanche/acci2.h +++ b/engines/avalanche/acci2.h @@ -130,7 +130,7 @@ public: - void setParent(AvalancheEngine *vm); + Acci(AvalancheEngine *vm); void init(); diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index e490ace48a..919481679c 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -63,8 +63,18 @@ AvalancheEngine::~AvalancheEngine() { delete _enhanced; delete _logger; delete _pingo; - + delete _scrolls; + delete _visa; + delete _lucerna; + delete _enid; + delete _celer; + delete _sequence; delete _timeout; + delete _trip; + delete _acci; + delete _basher; + delete _dropdown; + delete _closing; } Common::ErrorCode AvalancheEngine::initialize() { @@ -75,25 +85,25 @@ Common::ErrorCode AvalancheEngine::initialize() { _enhanced = new Enhanced(this); _logger = new Logger(this); _pingo = new Pingo(this); - _scrolls.setParent(this); - _visa.setParent(this); - _lucerna.setParent(this); - _enid.setParent(this); - _celer.setParent(this); - _sequence.setParent(this); + _scrolls = new Scrolls(this); + _visa = new Visa(this); + _lucerna = new Lucerna(this); + _enid = new Enid(this); + _celer = new Celer(this); + _sequence = new Sequence(this); _timeout = new Timeout(this); - _trip.setParent(this); - _acci.setParent(this); - _basher.setParent(this); - _dropdown.setParent(this); - _closing.setParent(this); + _trip = new Trip(this); + _acci = new Acci(this); + _basher = new Basher(this); + _dropdown = new Dropdown(this); + _closing = new Closing(this); _graphics->init(); - _scrolls.init(); - _lucerna.init(); - _acci.init(); - _basher.init(); + _scrolls->init(); + _lucerna->init(); + _acci->init(); + _basher->init(); return Common::kNoError; diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 66bfd22ae5..f43b6a7a06 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -72,18 +72,18 @@ public: Enhanced *_enhanced; Logger *_logger; Pingo *_pingo; - Scrolls _scrolls; - Visa _visa; - Lucerna _lucerna; - Enid _enid; - Celer _celer; - Sequence _sequence; + Scrolls *_scrolls; + Visa *_visa; + Lucerna *_lucerna; + Enid *_enid; + Celer *_celer; + Sequence *_sequence; Timeout *_timeout; - Trip _trip; - Acci _acci; - Basher _basher; - Dropdown _dropdown; - Closing _closing; + Trip *_trip; + Acci *_acci; + Basher *_basher; + Dropdown *_dropdown; + Closing *_closing; OSystem *_system; diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 64f679fea0..4674ceacaa 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -69,16 +69,16 @@ void Avalot::setup() { _vm->_gyro->visible = _vm->_gyro->m_no; _vm->_gyro->to_do = 0; _vm->_gyro->lmo = false; - _vm->_scrolls.resetscroll(); + _vm->_scrolls->resetscroll(); _vm->_gyro->setup_vmc(); _vm->_gyro->on_virtual(); gd = 3; gm = 0; //initgraph(gd: gm: ""); _vm->_gyro->holdthedawn = true; - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->cmp = 177; - _vm->_lucerna.mouse_init(); /*on;*/ + _vm->_lucerna->mouse_init(); /*on;*/ _vm->_gyro->dropsok = true; _vm->_gyro->ctrl = ckey; _vm->_gyro->oldjw = 177; @@ -86,7 +86,7 @@ void Avalot::setup() { _vm->_gyro->c = 999; //settextjustify(0: 0); _vm->_gyro->ddmnow = false; - _vm->_lucerna.load_digits(); + _vm->_lucerna->load_digits(); _vm->_gyro->cheat = false; _vm->_gyro->cp = 0; _vm->_gyro->curpos = 1; @@ -96,8 +96,8 @@ void Avalot::setup() { /* TSkellern:=0; { Replace with a more local variable sometime }*/ _vm->_gyro->dna.rw = _vm->_gyro->stopped; _vm->_gyro->enid_filename = ""; /* undefined. */ - _vm->_lucerna.toolbar(); - _vm->_scrolls.state(2); + _vm->_lucerna->toolbar(); + _vm->_scrolls->state(2); _vm->_graphics->refreshScreen(); //_vm->_pingo->copy03(); Replace it with refreshScreen() since they 'almost' have the same functionality. for (byte i = 0; i < 3; i++) _vm->_gyro->lastscore[i] = -1; /* impossible digits */ @@ -107,7 +107,7 @@ void Avalot::setup() { setactivepage(gd); outtextxy(7:177:chr(48+gd)); end;*/ - _vm->_trip.loadtrip(); + _vm->_trip->loadtrip(); _vm->_gyro->reloaded = false; // TODO: Remove it later: when SAVE/LOAD system is implemented. Until then: we always start a new game. @@ -115,18 +115,18 @@ void Avalot::setup() { _vm->_gyro->newgame(); /* no game was requested- load the default */ else { if (! _vm->_gyro->reloaded) - _vm->_enid.avvy_background(); - _vm->_dropdown.standard_bar(); - _vm->_lucerna.sprite_run(); + _vm->_enid->avvy_background(); + _vm->_dropdown->standard_bar(); + _vm->_lucerna->sprite_run(); if (_vm->_gyro->reloaded) - _vm->_enid.edna_reload(); + _vm->_enid->edna_reload(); else { /* Filename given on the command line (or loadfirst) */ - _vm->_enid.edna_load(_vm->_gyro->filetoload); - if (_vm->_enid.there_was_a_problem()) { - _vm->_scrolls.display("So let's start from the beginning instead..."); + _vm->_enid->edna_load(_vm->_gyro->filetoload); + if (_vm->_enid->there_was_a_problem()) { + _vm->_scrolls->display("So let's start from the beginning instead..."); _vm->_gyro->holdthedawn = true; - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->newgame(); } } @@ -134,21 +134,21 @@ void Avalot::setup() { if (! _vm->_gyro->reloaded) { _vm->_gyro->soundfx = ! _vm->_gyro->soundfx; - _vm->_lucerna.fxtoggle(); - _vm->_lucerna.thinkabout(_vm->_gyro->money, _vm->_gyro->a_thing); + _vm->_lucerna->fxtoggle(); + _vm->_lucerna->thinkabout(_vm->_gyro->money, _vm->_gyro->a_thing); } - _vm->_trip.get_back_loretta(); + _vm->_trip->get_back_loretta(); //gm = getpixel(0: 0); //setcolor(7); _vm->_gyro->holdthedawn = false; - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); _vm->_gyro->cursoron = false; - _vm->_basher.cursor_on(); - _vm->_trip.newspeed(); + _vm->_basher->cursor_on(); + _vm->_trip->newspeed(); if (! _vm->_gyro->reloaded) - _vm->_visa.dixi('q', 83); /* Info on the game: etc. */ + _vm->_visa->dixi('q', 83); /* Info on the game: etc. */ } @@ -169,7 +169,7 @@ void Avalot::handleKeyDown(const Common::Event &event) { case Common::KEYCODE_HOME: case Common::KEYCODE_END: case Common::KEYCODE_KP5: - _vm->_trip.handleMoveKey(event); // Fallthroughs are intended. + _vm->_trip->handleMoveKey(event); // Fallthroughs are intended. break; } } @@ -180,19 +180,19 @@ void Avalot::run(Common::String arg) { setup(); do { - _vm->_lucerna.clock_lucerna(); - _vm->_basher.keyboard_link(); - _vm->_dropdown.menu_link(); - _vm->_trip.readstick(); + _vm->_lucerna->clock_lucerna(); + _vm->_basher->keyboard_link(); + _vm->_dropdown->menu_link(); + _vm->_trip->readstick(); _vm->_gyro->force_numlock(); - _vm->_trip.get_back_loretta(); - _vm->_trip.trippancy_link(); - _vm->_celer.pics_link(); - _vm->_lucerna.checkclick(); + _vm->_trip->get_back_loretta(); + _vm->_trip->trippancy_link(); + _vm->_celer->pics_link(); + _vm->_lucerna->checkclick(); if (_vm->_gyro->visible == _vm->_gyro->m_virtual) _vm->_gyro->plot_vmc(_vm->_gyro->mx, _vm->_gyro->my, _vm->_gyro->cp); - _vm->_lucerna.flip_page(); /* <<<! */ + _vm->_lucerna->flip_page(); /* <<<! */ _vm->_gyro->slowdown(); if (_vm->_gyro->visible == _vm->_gyro->m_virtual) _vm->_gyro->wipe_vmc(_vm->_gyro->cp); @@ -213,7 +213,7 @@ void Avalot::run(Common::String arg) { //if (logging) // close(logfile); - _vm->_closing.end_of_program(); + _vm->_closing->end_of_program(); } } // End of namespace Avalanche diff --git a/engines/avalanche/basher2.cpp b/engines/avalanche/basher2.cpp index 3f2b01bdb6..0ce98e71fe 100644 --- a/engines/avalanche/basher2.cpp +++ b/engines/avalanche/basher2.cpp @@ -50,7 +50,7 @@ namespace Avalanche { -void Basher::setParent(AvalancheEngine *vm) { +Basher::Basher(AvalancheEngine *vm) { _vm = vm; } diff --git a/engines/avalanche/basher2.h b/engines/avalanche/basher2.h index 1a97a8568e..eadf3dd3b1 100644 --- a/engines/avalanche/basher2.h +++ b/engines/avalanche/basher2.h @@ -45,7 +45,7 @@ public: - void setParent(AvalancheEngine *vm); + Basher(AvalancheEngine *vm); void init(); diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp index e73f51c835..3cedb67a7a 100644 --- a/engines/avalanche/celer2.cpp +++ b/engines/avalanche/celer2.cpp @@ -42,12 +42,9 @@ namespace Avalanche { const int16 Celer::on_disk = -1; -Celer::Celer() { - num_chunks = 0; -} - -void Celer::setParent(AvalancheEngine *vm) { +Celer::Celer(AvalancheEngine *vm) { _vm = vm; + num_chunks = 0; } void Celer::pics_link() { @@ -121,11 +118,11 @@ void Celer::pics_link() { } if ((_vm->_gyro->roomtime % 200 >= 0) && (_vm->_gyro->roomtime % 200 <= 178)) { /* Normally. */ - if (((_vm->_lucerna.bearing(2) >= 1) && (_vm->_lucerna.bearing(2) <= 90)) || ((_vm->_lucerna.bearing(2) >= 358) && (_vm->_lucerna.bearing(2) <= 360))) + if (((_vm->_lucerna->bearing(2) >= 1) && (_vm->_lucerna->bearing(2) <= 90)) || ((_vm->_lucerna->bearing(2) >= 358) && (_vm->_lucerna->bearing(2) <= 360))) xx = 3; - else if ((_vm->_lucerna.bearing(2) >= 293) && (_vm->_lucerna.bearing(2) <= 357)) + else if ((_vm->_lucerna->bearing(2) >= 293) && (_vm->_lucerna->bearing(2) <= 357)) xx = 2; - else if ((_vm->_lucerna.bearing(2) >= 271) && (_vm->_lucerna.bearing(2) <= 292)) + else if ((_vm->_lucerna->bearing(2) >= 271) && (_vm->_lucerna->bearing(2) <= 292)) xx = 4; if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ @@ -160,11 +157,11 @@ void Celer::pics_link() { xx = 4; /* du Lustie blinks */ /* Bearing of Avvy from du Lustie. */ - else if (((_vm->_lucerna.bearing(2) >= 0) && (_vm->_lucerna.bearing(2) <= 45)) || ((_vm->_lucerna.bearing(2) >= 315) && (_vm->_lucerna.bearing(2) <= 360))) + else if (((_vm->_lucerna->bearing(2) >= 0) && (_vm->_lucerna->bearing(2) <= 45)) || ((_vm->_lucerna->bearing(2) >= 315) && (_vm->_lucerna->bearing(2) <= 360))) xx = 1; /* Middle. */ - else if ((_vm->_lucerna.bearing(2) >= 45) && (_vm->_lucerna.bearing(2) <= 180)) + else if ((_vm->_lucerna->bearing(2) >= 45) && (_vm->_lucerna->bearing(2) <= 180)) xx = 2; /* Left. */ - else if ((_vm->_lucerna.bearing(2) >= 181) && (_vm->_lucerna.bearing(2) <= 314)) + else if ((_vm->_lucerna->bearing(2) >= 181) && (_vm->_lucerna->bearing(2) <= 314)) xx = 3; /* Right. */ if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ @@ -202,11 +199,11 @@ void Celer::pics_link() { case r__nottspub: /* Bearing of Avvy from Port. */ - if (((_vm->_lucerna.bearing(5) >= 0) && (_vm->_lucerna.bearing(5) <= 45)) || ((_vm->_lucerna.bearing(5) >= 315) && (_vm->_lucerna.bearing(5) <= 360))) + if (((_vm->_lucerna->bearing(5) >= 0) && (_vm->_lucerna->bearing(5) <= 45)) || ((_vm->_lucerna->bearing(5) >= 315) && (_vm->_lucerna->bearing(5) <= 360))) xx = 2; /* Middle. */ - else if ((_vm->_lucerna.bearing(5) >= 45) && (_vm->_lucerna.bearing(5) <= 180)) + else if ((_vm->_lucerna->bearing(5) >= 45) && (_vm->_lucerna->bearing(5) <= 180)) xx = 6; /* Left. */ - else if ((_vm->_lucerna.bearing(5) >= 181) && (_vm->_lucerna.bearing(5) <= 314)) + else if ((_vm->_lucerna->bearing(5) >= 181) && (_vm->_lucerna->bearing(5) <= 314)) xx = 8; /* Right. */ if ((_vm->_gyro->roomtime % int32(60)) > 57) @@ -231,12 +228,12 @@ void Celer::pics_link() { if ((_vm->_gyro->roomtime % 3) == 0) /* The fire flickers */ show_one(1 + (_vm->_gyro->roomtime / 3) % 3); - {/* _vm->_lucerna.bearing of Avvy from Duck. */ - if (((_vm->_lucerna.bearing(2) >= 0) && (_vm->_lucerna.bearing(2) <= 45)) || ((_vm->_lucerna.bearing(2) >= 315) && (_vm->_lucerna.bearing(2) <= 360))) + {/* _vm->_lucerna->bearing of Avvy from Duck. */ + if (((_vm->_lucerna->bearing(2) >= 0) && (_vm->_lucerna->bearing(2) <= 45)) || ((_vm->_lucerna->bearing(2) >= 315) && (_vm->_lucerna->bearing(2) <= 360))) xx = 4; /* Middle. */ - else if ((_vm->_lucerna.bearing(2) >= 45) && (_vm->_lucerna.bearing(2) <= 180)) + else if ((_vm->_lucerna->bearing(2) >= 45) && (_vm->_lucerna->bearing(2) <= 180)) xx = 6; /* Left. */ - else if ((_vm->_lucerna.bearing(2) >= 181) && (_vm->_lucerna.bearing(2) <= 314)) + else if ((_vm->_lucerna->bearing(2) >= 181) && (_vm->_lucerna->bearing(2) <= 314)) xx = 8; /* Right. */ if ((_vm->_gyro->roomtime % int32(45)) > 42) @@ -468,7 +465,7 @@ void Celer::show_one(byte which) { warning("STUB: Celer::show_one()"); for (byte fv = 0; fv < 2; fv ++) - _vm->_trip.getset[fv].remember(r); + _vm->_trip->getset[fv].remember(r); } @@ -517,7 +514,7 @@ void Celer::show_one_at(byte which, int16 xxx, int16 yyy) { warning("STUB: Celer::show_one_at()"); for (byte fv = 0; fv < 2; fv ++) - _vm->_trip.getset[fv].remember(r); + _vm->_trip->getset[fv].remember(r); } diff --git a/engines/avalanche/celer2.h b/engines/avalanche/celer2.h index 88baa3df5e..1d350054a2 100644 --- a/engines/avalanche/celer2.h +++ b/engines/avalanche/celer2.h @@ -65,9 +65,8 @@ public: bytefield r; - Celer(); - void setParent(AvalancheEngine *vm); + Celer(AvalancheEngine *vm); void pics_link(); diff --git a/engines/avalanche/closing2.cpp b/engines/avalanche/closing2.cpp index 3336a5f954..431b1af82e 100644 --- a/engines/avalanche/closing2.cpp +++ b/engines/avalanche/closing2.cpp @@ -38,12 +38,9 @@ namespace Avalanche { -Closing::Closing() { - warning("STUB: Closing::Closing()"); -} - -void Closing::setParent(AvalancheEngine *vm) { +Closing::Closing(AvalancheEngine *vm) { _vm = vm; + warning("STUB: Closing::Closing()"); } void Closing::get_screen(byte which) { diff --git a/engines/avalanche/closing2.h b/engines/avalanche/closing2.h index 122a8e23a9..ed73f9f321 100644 --- a/engines/avalanche/closing2.h +++ b/engines/avalanche/closing2.h @@ -43,9 +43,7 @@ public: static const int16 scr_nagscreen = 3; static const int16 scr_twocopies = 5; - Closing(); - - void setParent(AvalancheEngine *vm); + Closing(AvalancheEngine *vm); void quit_with(byte which, byte errorlev); diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp index 985eb7f088..134a3b0905 100644 --- a/engines/avalanche/dropdown2.cpp +++ b/engines/avalanche/dropdown2.cpp @@ -206,7 +206,7 @@ void menuset::update() { ddms[fv].display(); for (page_ = 0; page_ <= 1; page_ ++) - _dr->_vm->_trip.getset[page_].remember(menuspace); + _dr->_vm->_trip->getset[page_].remember(menuspace); _dr->_vm->_gyro->cp = savecp; } @@ -246,7 +246,7 @@ void menuset::getmenu(int16 x) { -void Dropdown::setParent(AvalancheEngine *vm) { +Dropdown::Dropdown(AvalancheEngine *vm) { _vm = vm; } @@ -255,26 +255,26 @@ void Dropdown::find_what_you_can_do_with_it() { case _vm->_gyro->wine: case _vm->_gyro->potion: case _vm->_gyro->ink: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_drink; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_drink; break; case _vm->_gyro->bell: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_ring; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_ring; break; case _vm->_gyro->chastity: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_wear; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_wear; break; case _vm->_gyro->lute: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_play; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_play; break; case _vm->_gyro->mushroom: case _vm->_gyro->onion: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_eat; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_eat; break; case _vm->_gyro->clothes: - _vm->_gyro->verbstr = Common::String(_vm->_acci.vb_exam) + _vm->_acci.vb_wear; + _vm->_gyro->verbstr = Common::String(_vm->_acci->vb_exam) + _vm->_acci->vb_wear; break; default: - _vm->_gyro->verbstr = _vm->_acci.vb_exam; /* anything else */ + _vm->_gyro->verbstr = _vm->_acci->vb_exam; /* anything else */ } } @@ -310,7 +310,7 @@ void Dropdown::chalk(int16 x, int16 y, char t, Common::String z, bool valid) { } } - _vm->_lucerna.blitfix(); + _vm->_lucerna->blitfix(); } void Dropdown::hlchalk(int16 x, int16 y, char t, Common::String z, bool valid) { @@ -418,12 +418,12 @@ void Dropdown::ddm__action() { ddm_o.opt(Common::String(n.c_str() + 2, 253), n[1], "f5", true); ddm_o.opt("Pause game", 'P', "f6", true); if (_vm->_gyro->dna.room == 99) - ddm_o.opt("Journey thither", 'J', "f7", _vm->_trip.neardoor()); + ddm_o.opt("Journey thither", 'J', "f7", _vm->_trip->neardoor()); else - ddm_o.opt("Open the door", 'O', "f7", _vm->_trip.neardoor()); + ddm_o.opt("Open the door", 'O', "f7", _vm->_trip->neardoor()); ddm_o.opt("Look around", 'L', "f8", true); ddm_o.opt("Inventory", 'I', "Tab", true); - if (_vm->_trip.tr[1].xs == _vm->_gyro->walk) + if (_vm->_trip->tr[1].xs == _vm->_gyro->walk) ddm_o.opt("Run fast", 'R', "^R", true); else ddm_o.opt("Walk slowly", 'W', "^W", true); @@ -501,19 +501,19 @@ void Dropdown::do__game() { switch (ddm_o.choicenum) { /* Help, boss, untrash screen. */ case 0: - _vm->_lucerna.callverb(_vm->_acci.vb_help); + _vm->_lucerna->callverb(_vm->_acci->vb_help); break; case 1: - _vm->_lucerna.callverb(_vm->_acci.vb_boss); + _vm->_lucerna->callverb(_vm->_acci->vb_boss); break; case 2: - _vm->_lucerna.major_redraw(); + _vm->_lucerna->major_redraw(); break; case 3: - _vm->_lucerna.callverb(_vm->_acci.vb_score); + _vm->_lucerna->callverb(_vm->_acci->vb_score); break; case 4: - _vm->_lucerna.callverb(_vm->_acci.vb_info); + _vm->_lucerna->callverb(_vm->_acci->vb_info); break; } } @@ -522,26 +522,26 @@ void Dropdown::do__file() { switch (ddm_o.choicenum) { /* New game, load, save, save as, DOS shell, about, quit. */ case 0: - _vm->_lucerna.callverb(_vm->_acci.vb_restart); + _vm->_lucerna->callverb(_vm->_acci->vb_restart); break; case 1: { - _vm->_acci.realwords[2] = ""; - _vm->_lucerna.callverb(_vm->_acci.vb_load); + _vm->_acci->realwords[2] = ""; + _vm->_lucerna->callverb(_vm->_acci->vb_load); } break; case 2: { - _vm->_acci.realwords[2] = ""; - _vm->_lucerna.callverb(_vm->_acci.vb_save); + _vm->_acci->realwords[2] = ""; + _vm->_lucerna->callverb(_vm->_acci->vb_save); } break; case 3: - _vm->_basher.filename_edit(); + _vm->_basher->filename_edit(); break; case 4: - _vm->_enid.back_to_bootstrap(2); + _vm->_enid->back_to_bootstrap(2); break; case 5: - _vm->_lucerna.callverb(_vm->_acci.vb_quit); + _vm->_lucerna->callverb(_vm->_acci->vb_quit); break; } } @@ -551,99 +551,99 @@ void Dropdown::do__action() { switch (ddm_o.choicenum) { /* Get up/pause game/open door/look/inv/walk-run */ case 0: { - _vm->_acci.person = _vm->_acci.pardon; - _vm->_acci.thing = _vm->_acci.pardon; + _vm->_acci->person = _vm->_acci->pardon; + _vm->_acci->thing = _vm->_acci->pardon; n = _vm->_gyro->f5_does(); - _vm->_lucerna.callverb(n[1]); + _vm->_lucerna->callverb(n[1]); } break; case 1: - _vm->_lucerna.callverb(_vm->_acci.vb_pause); + _vm->_lucerna->callverb(_vm->_acci->vb_pause); break; case 2: - _vm->_lucerna.callverb(_vm->_acci.vb_open); + _vm->_lucerna->callverb(_vm->_acci->vb_open); break; case 3: - _vm->_lucerna.callverb(_vm->_acci.vb_look); + _vm->_lucerna->callverb(_vm->_acci->vb_look); break; case 4: - _vm->_lucerna.callverb(_vm->_acci.vb_inv); + _vm->_lucerna->callverb(_vm->_acci->vb_inv); break; case 5: { - if (_vm->_trip.tr[1].xs == _vm->_gyro->walk) _vm->_trip.tr[1].xs = _vm->_gyro->run; - else _vm->_trip.tr[1].xs = _vm->_gyro->walk; - _vm->_trip.newspeed(); + if (_vm->_trip->tr[1].xs == _vm->_gyro->walk) _vm->_trip->tr[1].xs = _vm->_gyro->run; + else _vm->_trip->tr[1].xs = _vm->_gyro->walk; + _vm->_trip->newspeed(); } break; } } void Dropdown::do__objects() { - _vm->_lucerna.thinkabout(_vm->_gyro->objlist[ddm_o.choicenum + 1], _vm->_gyro->a_thing); + _vm->_lucerna->thinkabout(_vm->_gyro->objlist[ddm_o.choicenum + 1], _vm->_gyro->a_thing); } void Dropdown::do__people() { - _vm->_lucerna.thinkabout(people[ddm_o.choicenum + 1], _vm->_gyro->a_person); + _vm->_lucerna->thinkabout(people[ddm_o.choicenum + 1], _vm->_gyro->a_person); _vm->_gyro->last_person = people[ddm_o.choicenum + 1]; } void Dropdown::do__with() { - _vm->_acci.thing = _vm->_gyro->thinks; + _vm->_acci->thing = _vm->_gyro->thinks; if (_vm->_gyro->thinkthing) { - _vm->_acci.thing += 49; + _vm->_acci->thing += 49; - if (_vm->_gyro->verbstr[ddm_o.choicenum + 1] == _vm->_acci.vb_give) - _vm->_acci.person = _vm->_gyro->last_person; + if (_vm->_gyro->verbstr[ddm_o.choicenum + 1] == _vm->_acci->vb_give) + _vm->_acci->person = _vm->_gyro->last_person; else - _vm->_acci.person = '\376'; + _vm->_acci->person = '\376'; } else { switch (_vm->_gyro->verbstr[ddm_o.choicenum + 1]) { case '\144': { - _vm->_acci.thing = '\144'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\144'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Beer */ case '\145': { - _vm->_acci.thing = '\62'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\62'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Wine */ case '\146': { - _vm->_acci.thing = '\146'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\146'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Whisky */ case '\147': { - _vm->_acci.thing = '\147'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\147'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Cider */ case '\150': { - _vm->_acci.thing = '\153'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\153'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Mead */ case '\151': { - _vm->_acci.thing = '\103'; - _vm->_lucerna.callverb(_vm->_acci.vb_buy); + _vm->_acci->thing = '\103'; + _vm->_lucerna->callverb(_vm->_acci->vb_buy); return; } break; /* Onion (trader) */ default: { - _vm->_acci.person = _vm->_acci.thing; - _vm->_acci.thing = '\376'; + _vm->_acci->person = _vm->_acci->thing; + _vm->_acci->thing = '\376'; } } } - _vm->_lucerna.callverb(_vm->_gyro->verbstr[ddm_o.choicenum + 1]); + _vm->_lucerna->callverb(_vm->_gyro->verbstr[ddm_o.choicenum + 1]); } /*$F- That's all. Now for the ...bar funcs. */ diff --git a/engines/avalanche/dropdown2.h b/engines/avalanche/dropdown2.h index abcc81b155..51be377beb 100644 --- a/engines/avalanche/dropdown2.h +++ b/engines/avalanche/dropdown2.h @@ -122,8 +122,6 @@ public: friend onemenu; friend menuset; - void setParent(AvalancheEngine *vm); - onemenu ddm_o; menuset ddm_m; @@ -131,6 +129,8 @@ public: + Dropdown(AvalancheEngine *vm); + void find_what_you_can_do_with_it(); void parsekey(char r, char re); diff --git a/engines/avalanche/enid2.cpp b/engines/avalanche/enid2.cpp index 7284b888b4..9b67359ff0 100644 --- a/engines/avalanche/enid2.cpp +++ b/engines/avalanche/enid2.cpp @@ -45,7 +45,7 @@ namespace Avalanche { -void Enid::setParent(AvalancheEngine *vm) { +Enid::Enid(AvalancheEngine *vm) { _vm = vm; } @@ -117,7 +117,7 @@ Common::String Enid::expanddate(byte d, byte m, uint16 y) { } void Enid::show_bug(char icon, Common::String strn) { - _vm->_scrolls.display(Common::String("\7\6\23") + icon + "\26\r" + strn + '\15'); + _vm->_scrolls->display(Common::String("\7\6\23") + icon + "\26\r" + strn + '\15'); } bool Enid::test_bug(byte what) { @@ -150,9 +150,9 @@ void Enid::edna_save(Common::String name) { void Enid::loaderror(Common::String x, char icon) { if (_vm->_gyro->holdthedawn) { _vm->_gyro->holdthedawn = false; - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); } - _vm->_scrolls.display(Common::String('\7') + '\6' + '\23' + icon + '\26' + "Loading error: " + "\r\r\22" + x); + _vm->_scrolls->display(Common::String('\7') + '\6' + '\23' + icon + '\26' + "Loading error: " + "\r\r\22" + x); bug = true; } @@ -161,7 +161,7 @@ void Enid::edna_load(Common::String name) { } void Enid::showheader() { - _vm->_scrolls.display(Common::String("Dir: ") + path + "\r\r\4"); + _vm->_scrolls->display(Common::String("Dir: ") + path + "\r\r\4"); } void Enid::dir(Common::String where) { /* OK, it worked in Avaricius, let's do it in Avalot! */ @@ -246,7 +246,7 @@ void Enid::avvy_background() { /* Not really a filing procedure, @the_end: end; */ - _vm->_lucerna.blitfix(); + _vm->_lucerna->blitfix(); } void Enid::to_sundry(sundry &sund) { @@ -277,17 +277,17 @@ void Enid::edna_reload() { _vm->_gyro->seescroll = true; /* This prevents display of the new sprites before the new picture is loaded. */ - _vm->_lucerna.major_redraw(); + _vm->_lucerna->major_redraw(); _vm->_gyro->whereis[_vm->_gyro->pavalot] = _vm->_gyro->dna.room; _vm->_gyro->alive = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); if (_vm->_gyro->holdthedawn) { _vm->_gyro->holdthedawn = false; - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); } } diff --git a/engines/avalanche/enid2.h b/engines/avalanche/enid2.h index 87b81d3991..6fac687ac0 100644 --- a/engines/avalanche/enid2.h +++ b/engines/avalanche/enid2.h @@ -38,7 +38,7 @@ class AvalancheEngine; class Enid { public: - void setParent(AvalancheEngine *vm); + Enid(AvalancheEngine *vm); void edna_save(Common::String name); diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp index dd1157b628..f759f89313 100644 --- a/engines/avalanche/gyro2.cpp +++ b/engines/avalanche/gyro2.cpp @@ -348,19 +348,19 @@ void Gyro::shbox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t) { void Gyro::newgame() { /* This sets up the DNA for a completely new game. */ for (byte gm = 0; gm < numtr; gm ++) { - if (_vm->_trip.tr[gm].quick) - _vm->_trip.tr[gm].done(); + if (_vm->_trip->tr[gm].quick) + _vm->_trip->tr[gm].done(); } /* Deallocate sprite. Sorry, beta testers! */ - _vm->_trip.tr[0].init(0, true, &_vm->_trip); + _vm->_trip->tr[0].init(0, true, _vm->_trip); alive = true; score = 0; /*for gd:=0 to 5 do which[gd]:=1;*/ memset(&_vm->_gyro->dna, 0, sizeof(dnatype)); - _vm->_scrolls.natural(); - _vm->_basher.normal_edit(); - _vm->_lucerna.mousepage(0); + _vm->_scrolls->natural(); + _vm->_basher->normal_edit(); + _vm->_lucerna->mousepage(0); dna.spare_evening = "answer a questionnaire"; dna.like2drink = "beer"; @@ -372,12 +372,12 @@ void Gyro::newgame() { /* This sets up the DNA for a completely new game. */ dna.obj[clothes] = true; thinks = 2; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); ontoolbar = false; seescroll = false; ppos[0][1] = -177; - _vm->_trip.tr[0].appear(300,117,right); + _vm->_trip->tr[0].appear(300,117,right); //for (gd = 0; gd <= 30; gd ++) for (gm = 0; gm <= 1; gm ++) also[gd][gm] = nil; /* fillchar(previous^,sizeof(previous^),#0); { blank out array } */ him = 254; @@ -393,16 +393,16 @@ void Gyro::newgame() { /* This sets up the DNA for a completely new game. */ for (byte gd = 0; gd <= 1; gd ++) { cp = 1 - cp; - _vm->_trip.getback(); + _vm->_trip->getback(); } - _vm->_lucerna.enterroom(1, 1); - _vm->_trip.new_game_for_trippancy(); - _vm->_lucerna.showscore(); + _vm->_lucerna->enterroom(1, 1); + _vm->_trip->new_game_for_trippancy(); + _vm->_lucerna->showscore(); - _vm->_dropdown.standard_bar(); - _vm->_lucerna.clock_lucerna(); - _vm->_lucerna.sprite_run(); + _vm->_dropdown->standard_bar(); + _vm->_lucerna->clock_lucerna(); + _vm->_lucerna->sprite_run(); } void Gyro::click() { /* "Audio keyboard feedback" */ diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index c11a2454bb..1d22deb975 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -54,9 +54,7 @@ namespace Avalanche { -Lucerna::Lucerna() : fxhidden(false) {} - -void Lucerna::setParent(AvalancheEngine *vm) { +Lucerna::Lucerna(AvalancheEngine *vm) : fxhidden(false) { _vm = vm; } @@ -68,16 +66,16 @@ void Lucerna::init() { } void Lucerna::callverb(char n) { - if (n == _vm->_acci.pardon) { - _vm->_scrolls.display(Common::String("The f5 key lets you do a particular action in certain ") + + if (n == _vm->_acci->pardon) { + _vm->_scrolls->display(Common::String("The f5 key lets you do a particular action in certain ") + "situations. However, at the moment there is nothing " + "assigned to it. You may press alt-A to see what the " + "current setting of this key is."); } else { _vm->_gyro->weirdword = false; - _vm->_acci.polite = true; - _vm->_acci.verb = n; - _vm->_acci.do_that(); + _vm->_acci->polite = true; + _vm->_acci->verb = n; + _vm->_acci->do_that(); } } @@ -272,7 +270,7 @@ void Lucerna::load(byte n) { /* Load2, actually */ load_also(xx); - _vm->_celer.load_chunks(xx); + _vm->_celer->load_chunks(xx); _vm->_graphics->refreshScreen(); // _vm->_pingo->copy03(); - See Avalot::setup() @@ -307,7 +305,7 @@ void Lucerna::find_people(byte room) { void Lucerna::exitroom(byte x) { //nosound(); - _vm->_celer.forget_chunks(); + _vm->_celer->forget_chunks(); _vm->_gyro->seescroll = true; /* This stops the trippancy system working over the length of this procedure. */ switch (x) { @@ -340,7 +338,7 @@ void Lucerna::exitroom(byte x) { } void Lucerna::new_town() { /* You've just entered a town from the map. */ - _vm->_dropdown.standard_bar(); + _vm->_dropdown->standard_bar(); switch (_vm->_gyro->dna.room) { case r__outsidenottspub: /* Entry into Nottingham. */ @@ -371,10 +369,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[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; } void Lucerna::enterroom(byte x, byte ped) { @@ -405,7 +403,7 @@ void Lucerna::enterroom(byte x, byte ped) { switch (x) { case r__yours: if (_vm->_gyro->dna.avvy_in_bed) { - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); _vm->_timeout->set_up_timer(100, _vm->_timeout->procarkata_shouts, _vm->_timeout->reason_arkata_shouts); } break; @@ -415,25 +413,25 @@ void Lucerna::enterroom(byte x, byte ped) { if (! _vm->_gyro->dna.talked_to_crapulus) { _vm->_gyro->whereis[_vm->_gyro->pcrapulus] = r__outsideyours; - _vm->_trip.tr[2].init(8, false, &_vm->_trip); /* load Crapulus */ + _vm->_trip->tr[2].init(8, false, _vm->_trip); /* load Crapulus */ if (_vm->_gyro->dna.rooms[r__outsideyours] == 1) { - _vm->_trip.apped(2, 4); /* Start on the right-hand side of the screen. */ - _vm->_trip.tr[2].walkto(5); /* Walks up to greet you. */ + _vm->_trip->apped(2, 4); /* Start on the right-hand side of the screen. */ + _vm->_trip->tr[2].walkto(5); /* Walks up to greet you. */ } else { - _vm->_trip.apped(2, 5); /* Starts where he was before. */ - _vm->_trip.tr[2].face = 3; + _vm->_trip->apped(2, 5); /* Starts where he was before. */ + _vm->_trip->tr[2].face = 3; } - _vm->_trip.tr[2].call_eachstep = true; - _vm->_trip.tr[2].eachstep = _vm->_trip.procface_avvy; /* He always faces Avvy. */ + _vm->_trip->tr[2].call_eachstep = true; + _vm->_trip->tr[2].eachstep = _vm->_trip->procface_avvy; /* He always faces Avvy. */ } else _vm->_gyro->whereis[_vm->_gyro->pcrapulus] = r__nowhere; if (_vm->_gyro->dna.crapulus_will_tell) { - _vm->_trip.tr[2].init(8, false, &_vm->_trip); - _vm->_trip.apped(2, 2); - _vm->_trip.tr[2].walkto(4); + _vm->_trip->tr[2].init(8, false, _vm->_trip); + _vm->_trip->apped(2, 2); + _vm->_trip->tr[2].walkto(4); _vm->_timeout->set_up_timer(20, _vm->_timeout->proccrapulus_splud_out, _vm->_timeout->reason_crapulus_says_spludwick_out); _vm->_gyro->dna.crapulus_will_tell = false; } @@ -452,15 +450,15 @@ void Lucerna::enterroom(byte x, byte ped) { 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->_trip->tr[2].init(2, false, _vm->_trip); /* load Spludwick */ + _vm->_trip->apped(2, 2); _vm->_gyro->whereis['\227'] = 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; + _vm->_trip->tr[2].call_eachstep = true; + _vm->_trip->tr[2].eachstep = _vm->_trip->procgeida_procs; } else _vm->_gyro->whereis['\227'] = r__nowhere; break; @@ -471,18 +469,18 @@ void Lucerna::enterroom(byte x, byte ped) { _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[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->_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(2, 2); /* He appears on the right of the screen... */ + _vm->_trip->tr[2].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(2, 4); /* He's standing in your way straight away... */ + _vm->_trip->tr[2].face = _vm->_trip->left; } } } @@ -493,10 +491,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[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; 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); @@ -506,7 +504,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__bridge: { if (_vm->_gyro->dna.drawbridge_open == 4) { /*open*/ - _vm->_celer.show_one(3); /* Position of drawbridge */ + _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 */ @@ -517,9 +515,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[2].init(6, false, _vm->_trip); + _vm->_trip->apped(2, 2); + _vm->_trip->tr[2].walkto(3); _vm->_timeout->set_up_timer(36, _vm->_timeout->procget_tied_up, _vm->_timeout->reason_getting_tied_up); } } @@ -530,10 +528,10 @@ void Lucerna::enterroom(byte x, byte ped) { } if (_vm->_gyro->dna.tied_up) - _vm->_celer.show_one(2); + _vm->_celer->show_one(2); if (! _vm->_gyro->dna.mushroom_growing) - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); } break; @@ -541,9 +539,9 @@ 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[2].init(9, false, _vm->_trip); + _vm->_trip->apped(2, 2); + _vm->_trip->tr[2].walkto(3); _vm->_timeout->set_up_timer(47, _vm->_timeout->proccardiffsurvey, _vm->_timeout->reason_cardiffsurvey); } break; @@ -551,9 +549,9 @@ void Lucerna::enterroom(byte x, byte ped) { _vm->_gyro->magics[2].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[2].init(9, false, _vm->_trip); + _vm->_trip->apped(2, 3); + _vm->_trip->tr[2].face = _vm->_trip->right; _vm->_timeout->set_up_timer(3, _vm->_timeout->proccardiff_return, _vm->_timeout->reason_cardiffsurvey); } } @@ -574,18 +572,18 @@ void Lucerna::enterroom(byte x, byte ped) { break; case r__argentpub: { - if (_vm->_gyro->dna.wonnim) _vm->_celer.show_one(1); /* No lute by the settle. */ + if (_vm->_gyro->dna.wonnim) _vm->_celer->show_one(1); /* No lute by the settle. */ _vm->_gyro->dna.malagauche = 0; /* Ready to boot Malagauche */ if (_vm->_gyro->dna.givenbadgetoiby) { - _vm->_celer.show_one(8); - _vm->_celer.show_one(9); + _vm->_celer->show_one(8); + _vm->_celer->show_one(9); } } break; 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[1].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. */ @@ -593,7 +591,7 @@ void Lucerna::enterroom(byte x, byte ped) { if (_vm->_gyro->dna.geida_follows) { put_geida_at(5, ped); - if (_vm->_gyro->dna.lustie_is_asleep) _vm->_celer.show_one(5); + if (_vm->_gyro->dna.lustie_is_asleep) _vm->_celer->show_one(5); } } break; @@ -601,96 +599,96 @@ void Lucerna::enterroom(byte x, byte ped) { case r__musicroom: { if (_vm->_gyro->dna.jacques_awake > 0) { _vm->_gyro->dna.jacques_awake = 5; - _vm->_celer.show_one(2); - _vm->_celer.show_one(4); + _vm->_celer->show_one(2); + _vm->_celer->show_one(4); _vm->_gyro->magics[brown].op = _vm->_gyro->nix; _vm->_gyro->whereis[_vm->_gyro->pjacques] = 0; } if (ped != 0) { - _vm->_celer.show_one(6); - _vm->_sequence.first_show(5); - _vm->_sequence.then_show(7); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(6); + _vm->_sequence->first_show(5); + _vm->_sequence->then_show(7); + _vm->_sequence->start_to_close(); } } break; case r__outsidenottspub: if (ped == 2) { - _vm->_celer.show_one(3); - _vm->_sequence.first_show(2); - _vm->_sequence.then_show(1); - _vm->_sequence.then_show(4); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(3); + _vm->_sequence->first_show(2); + _vm->_sequence->then_show(1); + _vm->_sequence->then_show(4); + _vm->_sequence->start_to_close(); } break; case r__outsideargentpub: if (ped == 2) { - _vm->_celer.show_one(6); - _vm->_sequence.first_show(5); - _vm->_sequence.then_show(7); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(6); + _vm->_sequence->first_show(5); + _vm->_sequence->then_show(7); + _vm->_sequence->start_to_close(); } break; case r__wisewomans: { - _vm->_trip.tr[2].init(11, false, &_vm->_trip); + _vm->_trip->tr[2].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(2, 2); /* Start on the right-hand side of the screen. */ + _vm->_trip->tr[2].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(2, 4); /* Starts where she was before. */ + _vm->_trip->tr[2].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[2].call_eachstep = true; + _vm->_trip->tr[2].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->_sequence.first_show(1); + _vm->_trip->tr[2].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); + _vm->_sequence->then_show(3); else - _vm->_sequence.then_show(2); + _vm->_sequence->then_show(2); if (_vm->_gyro->dna.taken_pen) - _vm->_celer.show_one(4); + _vm->_celer->show_one(4); - _vm->_sequence.start_to_close(); + _vm->_sequence->start_to_close(); } else { - _vm->_celer.show_one(1); - if (_vm->_gyro->dna.arrow_in_the_door) _vm->_celer.show_one(3); - else _vm->_celer.show_one(2); + _vm->_celer->show_one(1); + if (_vm->_gyro->dna.arrow_in_the_door) _vm->_celer->show_one(3); + else _vm->_celer->show_one(2); } break; case r__avvysgarden: if (ped == 1) { - _vm->_celer.show_one(2); - _vm->_sequence.first_show(1); - _vm->_sequence.then_show(3); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(2); + _vm->_sequence->first_show(1); + _vm->_sequence->then_show(3); + _vm->_sequence->start_to_close(); } break; case r__entrancehall: case r__insideabbey: if (ped == 2) { - _vm->_celer.show_one(2); - _vm->_sequence.first_show(1); - _vm->_sequence.then_show(3); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(2); + _vm->_sequence->first_show(1); + _vm->_sequence->then_show(3); + _vm->_sequence->start_to_close(); } break; case r__aylesoffice: if (_vm->_gyro->dna.ayles_is_awake) - _vm->_celer.show_one(2); + _vm->_celer->show_one(2); break; /* Ayles awake. */ case r__geidas: @@ -707,7 +705,7 @@ void Lucerna::enterroom(byte x, byte ped) { break; case r__nottspub: { - if (_vm->_gyro->dna.sitting_in_pub) _vm->_celer.show_one(3); + if (_vm->_gyro->dna.sitting_in_pub) _vm->_celer->show_one(3); _vm->_gyro->dna.dogfoodpos = 1; /* Actually, du Lustie pos. */ } break; @@ -715,11 +713,11 @@ void Lucerna::enterroom(byte x, byte ped) { case r__outsideducks: if (ped == 2) { /* Shut the door */ - _vm->_celer.show_one(3); - _vm->_sequence.first_show(2); - _vm->_sequence.then_show(1); - _vm->_sequence.then_show(4); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(3); + _vm->_sequence->first_show(2); + _vm->_sequence->then_show(1); + _vm->_sequence->then_show(4); + _vm->_sequence->start_to_close(); } break; case r__ducks: @@ -779,7 +777,7 @@ void Lucerna::thinkabout(byte z, bool th) { /* Hey!!! Get it and put it!!! * setactivepage(1 - cp);*/ for (byte fv = 0; fv <= 1; fv ++) - _vm->_trip.getset[fv].remember(thinkspace); + _vm->_trip->getset[fv].remember(thinkspace); _vm->_gyro->on(); _vm->_gyro->thinkthing = th; @@ -862,7 +860,7 @@ void Lucerna::showscore() { _vm->_graphics->drawPicture(_vm->_gyro->digit[numbers[fv]], 250 + (fv + 1) * 15, 177); for (byte fv = 0; fv < 2; fv ++) - _vm->_trip.getset[fv].remember(scorespace); + _vm->_trip->getset[fv].remember(scorespace); //setactivepage(1 - cp); @@ -887,7 +885,7 @@ void Lucerna::points(byte num) { /* Add on no. of points */ void Lucerna::topcheck() { /* Menuset */ - _vm->_dropdown.ddm_m.getmenu(_vm->_gyro->mpx); + _vm->_dropdown->ddm_m.getmenu(_vm->_gyro->mpx); /* Do this one */ } @@ -943,46 +941,46 @@ void Lucerna::verte() { return; - /* _vm->_trip.tr[0] : that's the only one we're interested in here */ - if (_vm->_gyro->mx < _vm->_trip.tr[0].x) + /* _vm->_trip->tr[0] : that's the only one we're interested in here */ + if (_vm->_gyro->mx < _vm->_trip->tr[0].x) what = 1; - else if (_vm->_gyro->mx > (unsigned char)(_vm->_trip.tr[0].x + _vm->_trip.tr[0]._info.xl)) + else if (_vm->_gyro->mx > (unsigned char)(_vm->_trip->tr[0].x + _vm->_trip->tr[0]._info.xl)) what = 2; else what = 0; /* On top */ - if (_vm->_gyro->my < _vm->_trip.tr[0].y) + if (_vm->_gyro->my < _vm->_trip->tr[0].y) what += 3; - else if (_vm->_gyro->my > (unsigned char)(_vm->_trip.tr[0].y + _vm->_trip.tr[0]._info.yl)) + else if (_vm->_gyro->my > (unsigned char)(_vm->_trip->tr[0].y + _vm->_trip->tr[0]._info.yl)) what += 6; switch (what) { case 0: - _vm->_trip.stopwalking(); + _vm->_trip->stopwalking(); break; /* Clicked on Avvy- no movement */ case 1: - _vm->_trip.rwsp(1, _vm->_trip.left); + _vm->_trip->rwsp(1, _vm->_trip->left); break; case 2: - _vm->_trip.rwsp(1, _vm->_trip.right); + _vm->_trip->rwsp(1, _vm->_trip->right); break; case 3: - _vm->_trip.rwsp(1, _vm->_trip.up); + _vm->_trip->rwsp(1, _vm->_trip->up); break; case 4: - _vm->_trip.rwsp(1, _vm->_trip.ul); + _vm->_trip->rwsp(1, _vm->_trip->ul); break; case 5: - _vm->_trip.rwsp(1, _vm->_trip.ur); + _vm->_trip->rwsp(1, _vm->_trip->ur); break; case 6: - _vm->_trip.rwsp(1, _vm->_trip.down); + _vm->_trip->rwsp(1, _vm->_trip->down); break; case 7: - _vm->_trip.rwsp(1, _vm->_trip.dl); + _vm->_trip->rwsp(1, _vm->_trip->dl); break; case 8: - _vm->_trip.rwsp(1, _vm->_trip.dr); + _vm->_trip->rwsp(1, _vm->_trip->dr); break; } /* no other values are possible... */ @@ -1209,7 +1207,7 @@ void Lucerna::delavvy() { _vm->_gyro->off(); - triptype &with = _vm->_trip.tr[0]; + triptype &with = _vm->_trip->tr[0]; for (page_ = 0; page_ <= 1; page_ ++) mblit(with.x / 8, with.y, (with.x + with._info.xl) / 8 + 1, with.y + with._info.yl, 3, page_); @@ -1223,16 +1221,16 @@ void Lucerna::gameover() { _vm->_gyro->dna.user_moves_avvy = false; - sx = _vm->_trip.tr[1].x; - sy = _vm->_trip.tr[1].y; + sx = _vm->_trip->tr[1].x; + sy = _vm->_trip->tr[1].y; - _vm->_trip.tr[1].done(); - _vm->_trip.tr[1].init(12, true, &_vm->_trip); /* 12 = Avalot falls */ - _vm->_trip.tr[1].step = 0; - _vm->_trip.tr[1].appear(sx, sy, 0); + _vm->_trip->tr[1].done(); + _vm->_trip->tr[1].init(12, true, _vm->_trip); /* 12 = Avalot falls */ + _vm->_trip->tr[1].step = 0; + _vm->_trip->tr[1].appear(sx, sy, 0); _vm->_timeout->set_up_timer(3, _vm->_timeout->procavalot_falls, _vm->_timeout->reason_falling_over); - /* _vm->_scrolls.display(^m^m^m^m^m^m^i^i^i^i^i^i^s'Z'^v);*/ + /* _vm->_scrolls->display(^m^m^m^m^m^m^i^i^i^i^i^i^s'Z'^v);*/ _vm->_gyro->alive = false; } @@ -1247,7 +1245,7 @@ void Lucerna::minor_redraw() { for (fv = 0; fv <= 1; fv ++) { _vm->_gyro->cp = 1 - _vm->_gyro->cp; - _vm->_trip.getback(); + _vm->_trip->getback(); } for (byte i = 0; i < 3; i++) @@ -1268,16 +1266,16 @@ uint16 Lucerna::bearing(byte whichped) { uint16 bearing_result; { pedtype &with = _vm->_gyro->peds[whichped]; - if (_vm->_trip.tr[1].x == with.x) + if (_vm->_trip->tr[1].x == with.x) bearing_result = 0; /* This would cause a division by zero if we let it through. */ else { /* - bearing:=trunc(((arctan((_vm->_trip.tr[1].y-y)/(_vm->_trip.tr[1].x-x)))*rad2deg)+90) mod 360*/ + bearing:=trunc(((arctan((_vm->_trip->tr[1].y-y)/(_vm->_trip->tr[1].x-x)))*rad2deg)+90) mod 360*/ - if (_vm->_trip.tr[1].x < with.x) - bearing_result = (atan(double((_vm->_trip.tr[1].y - with.y)) / (_vm->_trip.tr[1].x - with.x)) * rad2deg) + 90; + if (_vm->_trip->tr[1].x < with.x) + bearing_result = (atan(double((_vm->_trip->tr[1].y - with.y)) / (_vm->_trip->tr[1].x - with.x)) * rad2deg) + 90; else - bearing_result = (atan(double((_vm->_trip.tr[1].y - with.y)) / (_vm->_trip.tr[1].x - with.x)) * rad2deg) + 270; + bearing_result = (atan(double((_vm->_trip->tr[1].y - with.y)) / (_vm->_trip->tr[1].x - with.x)) * rad2deg) + 270; } } return bearing_result; @@ -1293,8 +1291,8 @@ void Lucerna::sprite_run() { _vm->_gyro->doing_sprite_run = true; for (fv = 0; fv <= 1; fv ++) { - _vm->_trip.get_back_loretta(); - _vm->_trip.trippancy_link(); + _vm->_trip->get_back_loretta(); + _vm->_trip->trippancy_link(); flip_page(); } @@ -1306,7 +1304,7 @@ void Lucerna::sprite_run() { void Lucerna::fix_flashers() { _vm->_gyro->ledstatus = 177; _vm->_gyro->oldrw = 177; - _vm->_scrolls.state(2); + _vm->_scrolls->state(2); showrw(); } diff --git a/engines/avalanche/lucerna2.h b/engines/avalanche/lucerna2.h index 6a62a7d39e..7486b0d364 100644 --- a/engines/avalanche/lucerna2.h +++ b/engines/avalanche/lucerna2.h @@ -38,9 +38,7 @@ class AvalancheEngine; class Lucerna { public: - Lucerna(); - - void setParent(AvalancheEngine *vm); + Lucerna(AvalancheEngine *vm); void init(); diff --git a/engines/avalanche/pingo2.cpp b/engines/avalanche/pingo2.cpp index 7b341678be..00c99788be 100644 --- a/engines/avalanche/pingo2.cpp +++ b/engines/avalanche/pingo2.cpp @@ -111,7 +111,7 @@ void Pingo::winning_pic() { Common::File f; char r; - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); if (!f.open("finale.avd")) { warning("AVALANCHE: Lucerna: File not found: finale.avd"); @@ -128,12 +128,12 @@ void Pingo::winning_pic() { warning("STUB: Pingo::winning_pic()"); f.close(); - _vm->_lucerna.blitfix(); + _vm->_lucerna->blitfix(); //setvisualpage(0); warning("STUB: Pingo::winning_pic()"); - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); /*do { _vm->_gyro->check(); diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp index 0a76168ada..63358630c4 100644 --- a/engines/avalanche/scrolls2.cpp +++ b/engines/avalanche/scrolls2.cpp @@ -47,7 +47,7 @@ namespace Avalanche { -void Scrolls::setParent(AvalancheEngine *vm) { +Scrolls::Scrolls(AvalancheEngine *vm) { _vm = vm; } @@ -154,7 +154,7 @@ void Scrolls::resetscrolldriver() { /* phew */ void Scrolls::dingdongbell() { /* Pussy's in the well. Who put her in? Little... */ byte fv; - for (fv = 1; fv <= _vm->_gyro->scrollbells; fv ++) _vm->_lucerna.errorled(); /* ring the bell "x" times */ + for (fv = 1; fv <= _vm->_gyro->scrollbells; fv ++) _vm->_lucerna->errorled(); /* ring the bell "x" times */ } void Scrolls::dodgem() { /* This moves the mouse pointer off the scroll so that you can read it. */ @@ -329,7 +329,7 @@ void Scrolls::musical_scroll() { display(Common::String("To play the harp...\r\rUse these keys:\r\n") + "Q W E R T Y U I O P [ ]\r\rOr press Enter to stop playing.\4"); - _vm->_lucerna.sprite_run(); + _vm->_lucerna->sprite_run(); was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual; diff --git a/engines/avalanche/scrolls2.h b/engines/avalanche/scrolls2.h index 2536e66396..5fdbab7f86 100644 --- a/engines/avalanche/scrolls2.h +++ b/engines/avalanche/scrolls2.h @@ -45,10 +45,10 @@ public: + Scrolls(AvalancheEngine *vm); + void init(); - void setParent(AvalancheEngine *vm); - void state(byte x); /* Sets "Ready" light to whatever */ void drawscroll(func2 gotoit); /* This is one of the oldest funcs in the game. */ diff --git a/engines/avalanche/sequence2.cpp b/engines/avalanche/sequence2.cpp index 5edb00a2be..bdc809e5ca 100644 --- a/engines/avalanche/sequence2.cpp +++ b/engines/avalanche/sequence2.cpp @@ -39,7 +39,7 @@ namespace Avalanche { -void Sequence::setParent(AvalancheEngine *vm) { +Sequence::Sequence(AvalancheEngine *vm) { _vm = vm; } @@ -77,7 +77,7 @@ void Sequence::start_to_close() { void Sequence::start_to_open() { _vm->_gyro->dna.user_moves_avvy = false; /* They can't move. */ - _vm->_trip.stopwalking(); /* And they're not moving now. */ + _vm->_trip->stopwalking(); /* And they're not moving now. */ start_to_close(); /* Apart from that, it's the same thing. */ } @@ -95,7 +95,7 @@ void Sequence::call_sequencer() { break; /* No more routines. */ case 177: _vm->_gyro->dna.user_moves_avvy = true; - _vm->_trip.fliproom(_vm->_gyro->dna.flip_to_where, _vm->_gyro->dna.flip_to_ped); /* 177 = Flip room. */ + _vm->_trip->fliproom(_vm->_gyro->dna.flip_to_where, _vm->_gyro->dna.flip_to_ped); /* 177 = Flip room. */ if (seq[0] == 177) shove_left(); break; @@ -103,7 +103,7 @@ void Sequence::call_sequencer() { if ((seq[0] >= 1) && (seq[0] <= 176)) { /* Show a frame. */ - _vm->_celer.show_one(seq[1]); + _vm->_celer->show_one(seq[1]); shove_left(); } diff --git a/engines/avalanche/sequence2.h b/engines/avalanche/sequence2.h index 7bd79bc61b..d93cf426e0 100644 --- a/engines/avalanche/sequence2.h +++ b/engines/avalanche/sequence2.h @@ -46,7 +46,7 @@ public: byte seq[seq_length]; - void setParent(AvalancheEngine *vm); + Sequence(AvalancheEngine *vm); void first_show(byte what); diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp index 9deae84585..7a10d670cc 100644 --- a/engines/avalanche/timeout2.cpp +++ b/engines/avalanche/timeout2.cpp @@ -142,13 +142,13 @@ void Timeout::one_tick() { jump(); break; case procsequence: - _vm->_sequence.call_sequencer(); + _vm->_sequence->call_sequencer(); break; case proccrapulus_splud_out: crapulus_says_splud_out(); break; case procdawn_delay: - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); break; case procbuydrinks: buydrinks(); @@ -239,7 +239,7 @@ end;*/ void Timeout::open_drawbridge() { _vm->_gyro->dna.drawbridge_open++; - _vm->_celer.show_one(_vm->_gyro->dna.drawbridge_open - 1); + _vm->_celer->show_one(_vm->_gyro->dna.drawbridge_open - 1); if (_vm->_gyro->dna.drawbridge_open == 4) _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* You may enter the drawbridge. */ @@ -250,39 +250,39 @@ void Timeout::open_drawbridge() { /* --- */ void Timeout::avaricius_talks() { - _vm->_visa.dixi('q', _vm->_gyro->dna.avaricius_talk); + _vm->_visa->dixi('q', _vm->_gyro->dna.avaricius_talk); _vm->_gyro->dna.avaricius_talk++; if (_vm->_gyro->dna.avaricius_talk < 17) set_up_timer(177, procavaricius_talks, reason_avariciustalks); else - _vm->_lucerna.points(3); + _vm->_lucerna->points(3); } void Timeout::urinate() { - _vm->_trip.tr[1].turn(_vm->_trip.up); - _vm->_trip.stopwalking(); - _vm->_lucerna.showrw(); + _vm->_trip->tr[1].turn(_vm->_trip->up); + _vm->_trip->stopwalking(); + _vm->_lucerna->showrw(); set_up_timer(14, proctoilet2, reason_gototoilet); } void Timeout::toilet2() { - _vm->_scrolls.display("That's better!"); + _vm->_scrolls->display("That's better!"); } void Timeout::bang() { - _vm->_scrolls.display("\6< BANG! >"); + _vm->_scrolls->display("\6< BANG! >"); set_up_timer(30, procbang2, reason_explosion); } void Timeout::bang2() { - _vm->_scrolls.display("Hmm... sounds like Spludwick's up to something..."); + _vm->_scrolls->display("Hmm... sounds like Spludwick's up to something..."); } void Timeout::stairs() { _vm->_gyro->blip(); - _vm->_trip.tr[0].walkto(4); - _vm->_celer.show_one(2); + _vm->_trip->tr[0].walkto(4); + _vm->_celer->show_one(2); _vm->_gyro->dna.brummie_stairs = 2; _vm->_gyro->magics[11].op = _vm->_gyro->special; _vm->_gyro->magics[11].data = 2; /* Reached the bottom of the stairs. */ @@ -293,68 +293,68 @@ void Timeout::cardiff_survey() { switch (_vm->_gyro->dna.cardiff_things) { case 0: _vm->_gyro->dna.cardiff_things += 1; - _vm->_visa.dixi('q', 27); + _vm->_visa->dixi('q', 27); break; } - _vm->_visa.dixi('z', _vm->_gyro->dna.cardiff_things); + _vm->_visa->dixi('z', _vm->_gyro->dna.cardiff_things); _vm->_gyro->interrogation = _vm->_gyro->dna.cardiff_things; set_up_timer(182, proccardiffsurvey, reason_cardiffsurvey); } void Timeout::cardiff_return() { - _vm->_visa.dixi('q', 28); + _vm->_visa->dixi('q', 28); cardiff_survey(); /* add end of question. */ } void Timeout::cwytalot_in_herts() { - _vm->_visa.dixi('q', 29); + _vm->_visa->dixi('q', 29); } void Timeout::get_tied_up() { - _vm->_visa.dixi('q', 34); /* ...Trouble! */ + _vm->_visa->dixi('q', 34); /* ...Trouble! */ _vm->_gyro->dna.user_moves_avvy = false; _vm->_gyro->dna.been_tied_up = true; - _vm->_trip.stopwalking(); - _vm->_trip.tr[2].stopwalk(); - _vm->_trip.tr[2].stophoming(); - _vm->_trip.tr[2].call_eachstep = true; - _vm->_trip.tr[2].eachstep = _vm->_trip.procgrab_avvy; + _vm->_trip->stopwalking(); + _vm->_trip->tr[2].stopwalk(); + _vm->_trip->tr[2].stophoming(); + _vm->_trip->tr[2].call_eachstep = true; + _vm->_trip->tr[2].eachstep = _vm->_trip->procgrab_avvy; set_up_timer(70, procget_tied_up2, reason_getting_tied_up); } void Timeout::get_tied_up2() { - _vm->_trip.tr[1].walkto(4); - _vm->_trip.tr[2].walkto(5); + _vm->_trip->tr[1].walkto(4); + _vm->_trip->tr[2].walkto(5); _vm->_gyro->magics[4].op = _vm->_gyro->nix; /* No effect when you touch the boundaries. */ _vm->_gyro->dna.friar_will_tie_you_up = true; } void Timeout::hang_around() { - _vm->_trip.tr[2].check_me = false; - _vm->_trip.tr[1].init(7, true, &_vm->_trip); /* Robin Hood */ + _vm->_trip->tr[2].check_me = false; + _vm->_trip->tr[1].init(7, true, _vm->_trip); /* Robin Hood */ _vm->_gyro->whereis[_vm->_gyro->probinhood] = r__robins; - _vm->_trip.apped(1, 2); - _vm->_visa.dixi('q', 39); - _vm->_trip.tr[1].walkto(7); + _vm->_trip->apped(1, 2); + _vm->_visa->dixi('q', 39); + _vm->_trip->tr[1].walkto(7); set_up_timer(55, prochang_around2, reason_hanging_around); } void Timeout::hang_around2() { - _vm->_visa.dixi('q', 40); - _vm->_trip.tr[2].vanishifstill = false; - _vm->_trip.tr[2].walkto(4); + _vm->_visa->dixi('q', 40); + _vm->_trip->tr[2].vanishifstill = false; + _vm->_trip->tr[2].walkto(4); _vm->_gyro->whereis[_vm->_gyro->pfriartuck] = r__robins; - _vm->_visa.dixi('q', 41); - _vm->_trip.tr[1].done(); - _vm->_trip.tr[2].done(); /* Get rid of Robin Hood and Friar Tuck. */ + _vm->_visa->dixi('q', 41); + _vm->_trip->tr[1].done(); + _vm->_trip->tr[2].done(); /* Get rid of Robin Hood and Friar Tuck. */ set_up_timer(1, procafter_the_shootemup, reason_hanging_around); /* Immediately call the following proc (when you have a chance). */ _vm->_gyro->dna.tied_up = false; - _vm->_enid.back_to_bootstrap(1); /* Call the shoot-'em-up. */ + _vm->_enid->back_to_bootstrap(1); /* Call the shoot-'em-up. */ } void Timeout::after_the_shootemup() { @@ -366,17 +366,17 @@ void Timeout::jacques_wakes_up() { switch (_vm->_gyro->dna.jacques_awake) { /* Additional pictures. */ case 1 : - _vm->_celer.show_one(1); /* Eyes open. */ - _vm->_visa.dixi('Q', 45); + _vm->_celer->show_one(1); /* Eyes open. */ + _vm->_visa->dixi('Q', 45); break; case 2 : /* Going through the door. */ - _vm->_celer.show_one(2); /* Not on the floor. */ - _vm->_celer.show_one(3); /* But going through the door. */ + _vm->_celer->show_one(2); /* Not on the floor. */ + _vm->_celer->show_one(3); /* But going through the door. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* You can't wake him up now. */ break; case 3 : /* Gone through the door. */ - _vm->_celer.show_one(2); /* Not on the floor, either. */ - _vm->_celer.show_one(4); /* He's gone... so the door's open. */ + _vm->_celer->show_one(2); /* Not on the floor, either. */ + _vm->_celer->show_one(4); /* He's gone... so the door's open. */ _vm->_gyro->whereis[_vm->_gyro->pjacques] = 0; /* Gone! */ break; } @@ -385,7 +385,7 @@ void Timeout::jacques_wakes_up() { if (_vm->_gyro->dna.jacques_awake == 5) { _vm->_gyro->dna.ringing_bells = true; _vm->_gyro->dna.ayles_is_awake = true; - _vm->_lucerna.points(2); + _vm->_lucerna->points(2); } switch (_vm->_gyro->dna.jacques_awake) { @@ -403,29 +403,29 @@ void Timeout::jacques_wakes_up() { void Timeout::naughty_duke() { /* This is when the Duke comes in and takes your money. */ - _vm->_trip.tr[2].init(9, false, &_vm->_trip); /* Here comes the Duke. */ - _vm->_trip.apped(2, 1); /* He starts at the door... */ - _vm->_trip.tr[2].walkto(3); /* He walks over to you. */ + _vm->_trip->tr[2].init(9, false, _vm->_trip); /* Here comes the Duke. */ + _vm->_trip->apped(2, 1); /* He starts at the door... */ + _vm->_trip->tr[2].walkto(3); /* He walks over to you. */ /* Let's get the door opening. */ - _vm->_celer.show_one(1); - _vm->_sequence.first_show(2); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(1); + _vm->_sequence->first_show(2); + _vm->_sequence->start_to_close(); set_up_timer(50, procnaughty_duke2, reason_naughty_duke); } void Timeout::naughty_duke2() { - _vm->_visa.dixi('q', 48); /* Ha ha, it worked again! */ - _vm->_trip.tr[2].walkto(1); /* Walk to the door. */ - _vm->_trip.tr[2].vanishifstill = true; /* Then go away! */ + _vm->_visa->dixi('q', 48); /* Ha ha, it worked again! */ + _vm->_trip->tr[2].walkto(1); /* Walk to the door. */ + _vm->_trip->tr[2].vanishifstill = true; /* Then go away! */ set_up_timer(32, procnaughty_duke3, reason_naughty_duke); } void Timeout::naughty_duke3() { - _vm->_celer.show_one(1); - _vm->_sequence.first_show(2); - _vm->_sequence.start_to_close(); + _vm->_celer->show_one(1); + _vm->_sequence->first_show(2); + _vm->_sequence->start_to_close(); } void Timeout::jump() { @@ -433,7 +433,7 @@ void Timeout::jump() { with.jumpstatus += 1; - triptype &with1 = _vm->_trip.tr[1]; + triptype &with1 = _vm->_trip->tr[1]; switch (with.jumpstatus) { case 1: case 2: @@ -465,80 +465,80 @@ void Timeout::jump() { if ((with.jumpstatus == 10) /* You're at the highest point of your jump. */ && (_vm->_gyro->dna.room == r__insidecardiffcastle) && (_vm->_gyro->dna.arrow_in_the_door == true) - && (_vm->_trip.infield(3))) { /* beside the wall*/ + && (_vm->_trip->infield(3))) { /* beside the wall*/ /* Grab the arrow! */ if (_vm->_gyro->dna.carrying >= maxobjs) - _vm->_scrolls.display("You fail to grab it, because your hands are full."); + _vm->_scrolls->display("You fail to grab it, because your hands are full."); else { - _vm->_celer.show_one(2); + _vm->_celer->show_one(2); _vm->_gyro->dna.arrow_in_the_door = false; /* You've got it. */ _vm->_gyro->dna.obj[_vm->_gyro->bolt] = true; - _vm->_lucerna.objectlist(); - _vm->_visa.dixi('q', 50); - _vm->_lucerna.points(3); + _vm->_lucerna->objectlist(); + _vm->_visa->dixi('q', 50); + _vm->_lucerna->points(3); } } } void Timeout::crapulus_says_splud_out() { - _vm->_visa.dixi('q', 56); + _vm->_visa->dixi('q', 56); _vm->_gyro->dna.crapulus_will_tell = false; } void Timeout::buydrinks() { - _vm->_celer.show_one(11); /* Malagauche gets up again. */ + _vm->_celer->show_one(11); /* Malagauche gets up again. */ _vm->_gyro->dna.malagauche = 0; - _vm->_visa.dixi('D', _vm->_gyro->dna.drinking); /* _vm->_scrolls.display message about it. */ + _vm->_visa->dixi('D', _vm->_gyro->dna.drinking); /* _vm->_scrolls->display message about it. */ _vm->_pingo->wobble(); /* Do the special effects. */ - _vm->_visa.dixi('D', 1); /* That'll be thruppence. */ + _vm->_visa->dixi('D', 1); /* That'll be thruppence. */ if (_vm->_gyro->pennycheck(3)) /* Pay 3d. */ - _vm->_visa.dixi('D', 3); /* Tell 'em you paid up. */ - _vm->_acci.have_a_drink(); + _vm->_visa->dixi('D', 3); /* Tell 'em you paid up. */ + _vm->_acci->have_a_drink(); } void Timeout::buywine() { - _vm->_celer.show_one(11); /* Malagauche gets up again. */ + _vm->_celer->show_one(11); /* Malagauche gets up again. */ _vm->_gyro->dna.malagauche = 0; - _vm->_visa.dixi('D', 50); /* You buy the wine. */ - _vm->_visa.dixi('D', 1); /* It'll be thruppence. */ + _vm->_visa->dixi('D', 50); /* You buy the wine. */ + _vm->_visa->dixi('D', 1); /* It'll be thruppence. */ if (_vm->_gyro->pennycheck(3)) { - _vm->_visa.dixi('D', 4); /* You paid up. */ + _vm->_visa->dixi('D', 4); /* You paid up. */ _vm->_gyro->dna.obj[_vm->_gyro->wine] = true; - _vm->_lucerna.objectlist(); + _vm->_lucerna->objectlist(); _vm->_gyro->dna.winestate = 1; /* OK Wine */ } } void Timeout::callsguards() { - _vm->_visa.dixi('Q', 58); /* GUARDS!!! */ - _vm->_lucerna.gameover(); + _vm->_visa->dixi('Q', 58); /* GUARDS!!! */ + _vm->_lucerna->gameover(); } void Timeout::greetsmonk() { - _vm->_visa.dixi('Q', 59); + _vm->_visa->dixi('Q', 59); _vm->_gyro->dna.entered_lusties_room_as_monk = true; } void Timeout::fall_down_oubliette() { _vm->_gyro->magics[9].op = _vm->_gyro->nix; - _vm->_trip.tr[1].iy += 1; /* increments dx/dy! */ - _vm->_trip.tr[1].y += _vm->_trip.tr[1].iy; /* Dowwwn we go... */ + _vm->_trip->tr[1].iy += 1; /* increments dx/dy! */ + _vm->_trip->tr[1].y += _vm->_trip->tr[1].iy; /* Dowwwn we go... */ set_up_timer(3, procfall_down_oubliette, reason_falling_down_oubliette); } void Timeout::meet_avaroid() { if (_vm->_gyro->dna.met_avaroid) { - _vm->_scrolls.display("You can't expect to be \6that\22 lucky twice in a row!"); - _vm->_lucerna.gameover(); + _vm->_scrolls->display("You can't expect to be \6that\22 lucky twice in a row!"); + _vm->_lucerna->gameover(); } else { - _vm->_visa.dixi('Q', 60); + _vm->_visa->dixi('Q', 60); _vm->_gyro->dna.met_avaroid = true; set_up_timer(1, procrise_up_oubliette, reason_rising_up_oubliette); - triptype &with = _vm->_trip.tr[1]; - with.face = _vm->_trip.left; + triptype &with = _vm->_trip->tr[1]; + with.face = _vm->_trip->left; with.x = 151; with.ix = -3; with.iy = -5; @@ -548,7 +548,7 @@ void Timeout::meet_avaroid() { } void Timeout::rise_up_oubliette() { - triptype &with = _vm->_trip.tr[1]; + triptype &with = _vm->_trip->tr[1]; with.visible = true; with.iy += 1; /* decrements dx/dy! */ @@ -560,96 +560,96 @@ void Timeout::rise_up_oubliette() { } void Timeout::robin_hood_and_geida() { - _vm->_trip.tr[1].init(7, true, &_vm->_trip); - _vm->_trip.apped(1, 7); - _vm->_trip.tr[1].walkto(6); - _vm->_trip.tr[2].stopwalk(); - _vm->_trip.tr[2].face = _vm->_trip.left; + _vm->_trip->tr[1].init(7, true, _vm->_trip); + _vm->_trip->apped(1, 7); + _vm->_trip->tr[1].walkto(6); + _vm->_trip->tr[2].stopwalk(); + _vm->_trip->tr[2].face = _vm->_trip->left; set_up_timer(20, procrobin_hood_and_geida_talk, reason_robin_hood_and_geida); _vm->_gyro->dna.geida_follows = false; } void Timeout::robin_hood_and_geida_talk() { - _vm->_visa.dixi('q', 66); - _vm->_trip.tr[1].walkto(2); - _vm->_trip.tr[2].walkto(2); - _vm->_trip.tr[1].vanishifstill = true; - _vm->_trip.tr[2].vanishifstill = true; + _vm->_visa->dixi('q', 66); + _vm->_trip->tr[1].walkto(2); + _vm->_trip->tr[2].walkto(2); + _vm->_trip->tr[1].vanishifstill = true; + _vm->_trip->tr[2].vanishifstill = true; set_up_timer(162, procavalot_returns, reason_robin_hood_and_geida); } void Timeout::avalot_returns() { - _vm->_trip.tr[1].done(); - _vm->_trip.tr[2].done(); - _vm->_trip.tr[1].init(0, true, &_vm->_trip); - _vm->_trip.apped(1, 1); - _vm->_visa.dixi('q', 67); + _vm->_trip->tr[1].done(); + _vm->_trip->tr[2].done(); + _vm->_trip->tr[1].init(0, true, _vm->_trip); + _vm->_trip->apped(1, 1); + _vm->_visa->dixi('q', 67); _vm->_gyro->dna.user_moves_avvy = true; } void Timeout::avvy_sit_down() { /* This is used when you sit down in the pub in Notts. It loops around so that it will happen when Avvy stops walking. */ - if (_vm->_trip.tr[1].homing) /* Still walking */ + if (_vm->_trip->tr[1].homing) /* Still walking */ set_up_timer(1, procavvy_sit_down, reason_sitting_down); else { - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); _vm->_gyro->dna.sitting_in_pub = true; _vm->_gyro->dna.user_moves_avvy = false; - _vm->_trip.tr[1].visible = false; + _vm->_trip->tr[1].visible = false; } } void Timeout::ghost_room_phew() { - _vm->_scrolls.display("\6PHEW!\22 You're glad to get out of \6there!"); + _vm->_scrolls->display("\6PHEW!\22 You're glad to get out of \6there!"); } void Timeout::arkata_shouts() { if (_vm->_gyro->dna.teetotal) return; - _vm->_visa.dixi('q', 76); + _vm->_visa->dixi('q', 76); set_up_timer(160, procarkata_shouts, reason_arkata_shouts); } void Timeout::winning() { - _vm->_visa.dixi('q', 79); + _vm->_visa->dixi('q', 79); _vm->_pingo->winning_pic(); do { - _vm->_lucerna.checkclick(); + _vm->_lucerna->checkclick(); } while (!(_vm->_gyro->mrelease == 0)); - _vm->_lucerna.callverb(_vm->_acci.vb_score); - _vm->_scrolls.display(" T H E E N D "); + _vm->_lucerna->callverb(_vm->_acci->vb_score); + _vm->_scrolls->display(" T H E E N D "); _vm->_gyro->lmo = true; } void Timeout::avalot_falls() { - if (_vm->_trip.tr[1].step < 5) { - _vm->_trip.tr[1].step += 1; + if (_vm->_trip->tr[1].step < 5) { + _vm->_trip->tr[1].step += 1; set_up_timer(3, procavalot_falls, reason_falling_over); } else - _vm->_scrolls.display("\r\r\r\r\r\r\n\n\n\n\n\n\23Z\26"); + _vm->_scrolls->display("\r\r\r\r\r\r\n\n\n\n\n\n\23Z\26"); } void Timeout::spludwick_goes_to_cauldron() { - if (_vm->_trip.tr[2].homing) + if (_vm->_trip->tr[2].homing) set_up_timer(1, procspludwick_goes_to_cauldron, reason_spludwalk); else set_up_timer(17, procspludwick_leaves_cauldron, reason_spludwalk); } void Timeout::spludwick_leaves_cauldron() { - _vm->_trip.tr[2].call_eachstep = true; /* So that normal procs will continue. */ + _vm->_trip->tr[2].call_eachstep = true; /* So that normal procs will continue. */ } void Timeout::give_lute_to_geida() { /* Moved here from Acci. */ - _vm->_visa.dixi('Q', 86); - _vm->_lucerna.points(4); + _vm->_visa->dixi('Q', 86); + _vm->_lucerna->points(4); _vm->_gyro->dna.lustie_is_asleep = true; - _vm->_sequence.first_show(5); - _vm->_sequence.then_show(6); /* He falls asleep... */ - _vm->_sequence.start_to_close(); /* Not really closing, but we're using the same procedure. */ + _vm->_sequence->first_show(5); + _vm->_sequence->then_show(6); /* He falls asleep... */ + _vm->_sequence->start_to_close(); /* Not really closing, but we're using the same procedure. */ } /* "This is all!" */ diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index 492c6bf7dc..181cde8f81 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -234,7 +234,7 @@ void triptype::walk() { break; case _tr->_vm->_gyro->unfinished: { bounce(); - _tr->_vm->_scrolls.display("\7Sorry.\3\rThis place is not available yet!"); + _tr->_vm->_scrolls->display("\7Sorry.\3\rThis place is not available yet!"); } break; case _tr->_vm->_gyro->special: @@ -265,7 +265,7 @@ void triptype::bounce() { else stopwalk(); _tr->_vm->_gyro->oncandopageswap = false; - _tr->_vm->_lucerna.showrw(); + _tr->_vm->_lucerna->showrw(); _tr->_vm->_gyro->oncandopageswap = true; } @@ -465,15 +465,13 @@ void getsettype::recall(bytefield &r) { -Trip::Trip() { +Trip::Trip(AvalancheEngine *vm) { + _vm = vm; + getsetclear(); mustexclaim = false; } -void Trip::setParent(AvalancheEngine *vm) { - _vm = vm; -} - void Trip::loadtrip() { byte gm; @@ -541,18 +539,18 @@ void Trip::catamove(byte ped) { switch (xy_uint16) { case 1801: /* Exit catacombs */ fliproom(r__lustiesroom, 4); - _vm->_scrolls.display("Phew! Nice to be out of there!"); + _vm->_scrolls->display("Phew! Nice to be out of there!"); return; case 1033: /* Oubliette */ fliproom(r__oubliette, 1); - _vm->_scrolls.display("Oh, NO!\231\2"); + _vm->_scrolls->display("Oh, NO!\231\2"); return; case 4: fliproom(r__geidas, 1); return; case 2307: fliproom(r__lusties, 5); - _vm->_scrolls.display("Oh no... here we go again..."); + _vm->_scrolls->display("Oh no... here we go again..."); _vm->_gyro->dna.user_moves_avvy = false; tr[1].iy = 1; tr[1].ix = 0; @@ -560,7 +558,7 @@ void Trip::catamove(byte ped) { } if (!_vm->_gyro->dna.enter_catacombs_from_lusties_room) - _vm->_lucerna.load(29); + _vm->_lucerna->load(29); here = _vm->_gyro->catamap[_vm->_gyro->dna.cat_y][_vm->_gyro->dna.cat_x]; switch (here & 0xf) { /* West. */ @@ -568,59 +566,59 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(28); + _vm->_celer->show_one(28); break; case 0x1: /* no connection (wall + shield), */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(29); /* ...shield. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(29); /* ...shield. */ break; case 0x2: /* wall with door */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(30); /* ...door. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(30); /* ...door. */ break; case 0x3: /* wall with door and shield */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(30); /* ...door, and... */ - _vm->_celer.show_one(29); /* ...shield. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(30); /* ...door, and... */ + _vm->_celer->show_one(29); /* ...shield. */ break; case 0x4: /* no connection (wall + window), */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(5); /* ...window. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(5); /* ...window. */ break; case 0x5: /* wall with door and window */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(30); /* ...door, and... */ - _vm->_celer.show_one(5); /* ...window. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(30); /* ...door, and... */ + _vm->_celer->show_one(5); /* ...window. */ break; case 0x6: /* no connection (wall + torches), */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->nix; /* No door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(7); /* ...torches. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(7); /* ...torches. */ break; case 0x7: /* wall with door and torches */ _vm->_gyro->magics[2].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[3].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[13].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(28); /* Wall, plus... */ - _vm->_celer.show_one(30); /* ...door, and... */ - _vm->_celer.show_one(7); /* ...torches. */ + _vm->_celer->show_one(28); /* Wall, plus... */ + _vm->_celer->show_one(30); /* ...door, and... */ + _vm->_celer->show_one(7); /* ...torches. */ break; case 0xf: /* straight-through corridor. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Sloping wall. */ @@ -635,44 +633,44 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(19); + _vm->_celer->show_one(19); break; case 0x1: /* no connection (wall + window), */ _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(19); /* Wall, plus... */ - _vm->_celer.show_one(20); /* ...window. */ + _vm->_celer->show_one(19); /* Wall, plus... */ + _vm->_celer->show_one(20); /* ...window. */ break; case 0x2: /* wall with door */ _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(19); /* Wall, plus... */ - _vm->_celer.show_one(21); /* ...door. */ + _vm->_celer->show_one(19); /* Wall, plus... */ + _vm->_celer->show_one(21); /* ...door. */ break; case 0x3: /* wall with door and window */ _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(19); /* Wall, plus... */ - _vm->_celer.show_one(20); /* ...door, and... */ - _vm->_celer.show_one(21); /* ...window. */ + _vm->_celer->show_one(19); /* Wall, plus... */ + _vm->_celer->show_one(20); /* ...door, and... */ + _vm->_celer->show_one(21); /* ...window. */ break; case 0x6: /* no connection (wall + torches), */ _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->nix; /* No door. */ - _vm->_celer.show_one(19); /* Wall, plus... */ - _vm->_celer.show_one(18); /* ...torches. */ + _vm->_celer->show_one(19); /* Wall, plus... */ + _vm->_celer->show_one(18); /* ...torches. */ break; case 0x7: /* wall with door and torches */ _vm->_gyro->magics[5].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[6].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[15].op = _vm->_gyro->special; /* Door. */ - _vm->_celer.show_one(19); /* Wall, plus... */ - _vm->_celer.show_one(21); /* ...door, and... */ - _vm->_celer.show_one(18); /* ...torches. */ + _vm->_celer->show_one(19); /* Wall, plus... */ + _vm->_celer->show_one(21); /* ...door, and... */ + _vm->_celer->show_one(18); /* ...torches. */ break; case 0xf: /* straight-through corridor. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Sloping wall. */ @@ -690,7 +688,7 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[13].op = _vm->_gyro->bounces; break; case 0x1: - _vm->_celer.show_one(22); + _vm->_celer->show_one(22); if ((xy_uint16 == 2051) & (_vm->_gyro->dna.geida_follows)) _vm->_gyro->magics[13].op = _vm->_gyro->exclaim; @@ -701,13 +699,13 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[12].op = _vm->_gyro->bounces; break; case 0x2: - _vm->_celer.show_one(23); + _vm->_celer->show_one(23); _vm->_gyro->magics[7].op = _vm->_gyro->special; /* Middle exit south. */ _vm->_gyro->magics[12].op = _vm->_gyro->bounces; _vm->_gyro->magics[13].op = _vm->_gyro->bounces; break; case 0x3: - _vm->_celer.show_one(24); + _vm->_celer->show_one(24); _vm->_gyro->magics[12].op = _vm->_gyro->special; /* Left exit south. */ _vm->_gyro->magics[7].op = _vm->_gyro->bounces; _vm->_gyro->magics[13].op = _vm->_gyro->bounces; @@ -722,36 +720,36 @@ void Trip::catamove(byte ped) { // LEFT handles: /* case 0x1: - _vm->_celer.show_one(4); + _vm->_celer->show_one(4); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // { Left exit north. } { Change magic number! } _vm->_gyro->portals[12].op = _vm->_gyro->special; // { Door. } break; */ case 0x2: - _vm->_celer.show_one(4); + _vm->_celer->show_one(4); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // Middle exit north. _vm->_gyro->portals[12].op = _vm->_gyro->special; // Door. break; /* case 0x3: - _vm->_celer.show_one(4); + _vm->_celer->show_one(4); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // { Right exit north. } { Change magic number! } _vm->_gyro->portals[12].op = _vm->_gyro->special; // { Door. } break; // RIGHT handles: case 0x4: - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // { Left exit north. } { Change magic number! } _vm->_gyro->portals[12].op = _vm->_gyro->special; // { Door. } break; */ case 0x5: - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Middle exit north. */ _vm->_gyro->portals[12].op = _vm->_gyro->special; /* Door. */ break; /* case 0x6: - _vm->_celer.show_one(3); + _vm->_celer->show_one(3); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // { Right exit north. } _vm->_gyro->portals[12].op = _vm->_gyro->special; // { Door. } break; @@ -760,12 +758,12 @@ void Trip::catamove(byte ped) { case 0x7: case 0x8: case 0x9: { - _vm->_celer.show_one(6); + _vm->_celer->show_one(6); if (((here & 0xf000) >> 12) > 0x7) - _vm->_celer.show_one(31); + _vm->_celer->show_one(31); if (((here & 0xf000) >> 12) == 0x9) - _vm->_celer.show_one(32); + _vm->_celer->show_one(32); _vm->_gyro->magics[1].op = _vm->_gyro->special; /* Middle arch north. */ _vm->_gyro->portals[12].op = _vm->_gyro->nix; /* Door. */ @@ -775,50 +773,50 @@ void Trip::catamove(byte ped) { case 0xd: /* No connection + WINDOW */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; _vm->_gyro->portals[12].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(14); + _vm->_celer->show_one(14); break; case 0xe: /* No connection + TORCH */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; _vm->_gyro->portals[12].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer.show_one(8); + _vm->_celer->show_one(8); break; /* Recessed door: */ case 0xf: _vm->_gyro->magics[1].op = _vm->_gyro->nix; /* Door to Geida's room. */ - _vm->_celer.show_one(1); + _vm->_celer->show_one(1); _vm->_gyro->portals[12].op = _vm->_gyro->special; /* Door. */ break; } switch (xy_uint16) { case 514: - _vm->_celer.show_one(17); + _vm->_celer->show_one(17); break; /* [2,2] : "Art Gallery" sign over door. */ case 264: - _vm->_celer.show_one(9); + _vm->_celer->show_one(9); break; /* [8,1] : "The Wrong Way!" sign. */ case 1797: - _vm->_celer.show_one(2); + _vm->_celer->show_one(2); break; /* [5,7] : "Ite Mingite" sign. */ case 258: for (fv = 0; fv <= 2; fv++) { /* [2,1] : Art gallery - pictures */ - _vm->_celer.show_one_at(15, 130 + fv * 120, 70); - _vm->_celer.show_one_at(16, 184 + fv * 120, 78); + _vm->_celer->show_one_at(15, 130 + fv * 120, 70); + _vm->_celer->show_one_at(16, 184 + fv * 120, 78); } break; case 1287: for (fv = 10; fv <= 13; fv++) - _vm->_celer.show_one(fv); + _vm->_celer->show_one(fv); break; /* [7,5] : 4 candles. */ case 776: - _vm->_celer.show_one(10); + _vm->_celer->show_one(10); break; /* [8,3] : 1 candle. */ case 2049: - _vm->_celer.show_one(11); + _vm->_celer->show_one(11); break; /* [1,8] : another candle. */ case 257: - _vm->_celer.show_one(12); - _vm->_celer.show_one(13); + _vm->_celer->show_one(12); + _vm->_celer->show_one(13); break; /* [1,1] : the other two. */ } @@ -843,7 +841,7 @@ void Trip::dawndelay() { void Trip::call_special(uint16 which) { switch (which) { case 1: /* _vm->_gyro->special 1: Room 22: top of stairs. */ - _vm->_celer.show_one(1); + _vm->_celer->show_one(1); _vm->_gyro->dna.brummie_stairs = 1; _vm->_gyro->magics[10].op = _vm->_gyro->nix; _vm->_timeout->set_up_timer(10, _vm->_timeout->procstairs, _vm->_timeout->reason_brummiestairs); @@ -857,7 +855,7 @@ void Trip::call_special(uint16 which) { _vm->_gyro->magics[12].data = 5; _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Now works as planned! */ stopwalking(); - _vm->_visa.dixi('q', 26); + _vm->_visa->dixi('q', 26); _vm->_gyro->dna.user_moves_avvy = true; break; case 3: /* _vm->_gyro->special 3: Room 71: triggers dart. */ @@ -877,20 +875,20 @@ void Trip::call_special(uint16 which) { } break; case 4: /* This is the ghost room link. */ - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); tr[1].turn(right); /* you'll see this after we get back from bootstrap */ _vm->_timeout->set_up_timer(1, _vm->_timeout->procghost_room_phew, _vm->_timeout->reason_ghost_room_phew); - _vm->_enid.back_to_bootstrap(3); + _vm->_enid->back_to_bootstrap(3); break; case 5: if (_vm->_gyro->dna.friar_will_tie_you_up) { /* _vm->_gyro->special 5: Room 42: touched tree, and get tied up. */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Boundary effect is now working again. */ - _vm->_visa.dixi('q', 35); + _vm->_visa->dixi('q', 35); tr[1].done(); /*tr[1].vanishifstill:=true;*/ - _vm->_celer.show_one(2); - _vm->_visa.dixi('q', 36); + _vm->_celer->show_one(2); + _vm->_visa->dixi('q', 36); _vm->_gyro->dna.tied_up = true; _vm->_gyro->dna.friar_will_tie_you_up = false; tr[2].walkto(3); @@ -912,18 +910,18 @@ void Trip::call_special(uint16 which) { _vm->_gyro->magics[10].op = _vm->_gyro->nix; stopwalking(); _vm->_timeout->lose_timer(_vm->_timeout->reason_falling_down_oubliette); - _vm->_lucerna.mblit(12, 80, 38, 160, 3, 0); - _vm->_lucerna.mblit(12, 80, 38, 160, 3, 1); - _vm->_scrolls.display("Oh dear, you seem to be down the bottom of an oubliette."); + _vm->_lucerna->mblit(12, 80, 38, 160, 3, 0); + _vm->_lucerna->mblit(12, 80, 38, 160, 3, 1); + _vm->_scrolls->display("Oh dear, you seem to be down the bottom of an oubliette."); _vm->_timeout->set_up_timer(200, _vm->_timeout->procmeet_avaroid, _vm->_timeout->reason_meeting_avaroid); break; case 8: /* _vm->_gyro->special 8: leave du Lustie's room. */ if ((_vm->_gyro->dna.geida_follows) && (!_vm->_gyro->dna.lustie_is_asleep)) { - _vm->_visa.dixi('q', 63); + _vm->_visa->dixi('q', 63); tr[2].turn(down); tr[2].stopwalk(); tr[2].call_eachstep = false; /* Geida */ - _vm->_lucerna.gameover(); + _vm->_lucerna->gameover(); } break; case 9: /* _vm->_gyro->special 9: lose Geida to Robin Hood... */ @@ -939,18 +937,18 @@ void Trip::call_special(uint16 which) { if ((_vm->_gyro->dna.cat_x == 4) && (_vm->_gyro->dna.cat_y == 1)) { /* Into Geida's room. */ if (_vm->_gyro->dna.obj[_vm->_gyro->key]) - _vm->_visa.dixi('q', 62); + _vm->_visa->dixi('q', 62); else { - _vm->_visa.dixi('q', 61); + _vm->_visa->dixi('q', 61); return; } } - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->dna.cat_y -= 1; catamove(4); if (_vm->_gyro->dna.room != r__catacombs) return; - _vm->_lucerna.delavvy(); + _vm->_lucerna->delavvy(); switch ((_vm->_gyro->catamap[_vm->_gyro->dna.cat_y][_vm->_gyro->dna.cat_x] & 0xf00) >> 8) { case 0x1: apped(1, 12); @@ -965,34 +963,34 @@ void Trip::call_special(uint16 which) { dawndelay(); break; case 11: /* _vm->_gyro->special 11: transfer east in catacombs. */ - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->dna.cat_x += 1; catamove(1); if (_vm->_gyro->dna.room != r__catacombs) return; - _vm->_lucerna.delavvy(); + _vm->_lucerna->delavvy(); apped(1, 1); getback(); dawndelay(); break; case 12: /* _vm->_gyro->special 12: transfer south in catacombs. */ - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->dna.cat_y += 1; catamove(2); if (_vm->_gyro->dna.room != r__catacombs) return; - _vm->_lucerna.delavvy(); + _vm->_lucerna->delavvy(); apped(1, 2); getback(); dawndelay(); break; case 13: /* _vm->_gyro->special 13: transfer west in catacombs. */ - _vm->_lucerna.dusk(); + _vm->_lucerna->dusk(); _vm->_gyro->dna.cat_x -= 1; catamove(3); if (_vm->_gyro->dna.room != r__catacombs) return; - _vm->_lucerna.delavvy(); + _vm->_lucerna->delavvy(); apped(1, 3); getback(); dawndelay(); @@ -1010,52 +1008,52 @@ void Trip::open_the_door(byte whither, byte ped, byte magicnum) { case r__outsideyours: case r__outsidenottspub: case r__outsideducks: - _vm->_sequence.first_show(1); - _vm->_sequence.then_show(2); - _vm->_sequence.then_show(3); + _vm->_sequence->first_show(1); + _vm->_sequence->then_show(2); + _vm->_sequence->then_show(3); break; case r__insidecardiffcastle: - _vm->_sequence.first_show(1); - _vm->_sequence.then_show(5); + _vm->_sequence->first_show(1); + _vm->_sequence->then_show(5); break; case r__avvysgarden: case r__entrancehall: case r__insideabbey: - _vm->_sequence.first_show(1); - _vm->_sequence.then_show(2); + _vm->_sequence->first_show(1); + _vm->_sequence->then_show(2); break; case r__musicroom: case r__outsideargentpub: - _vm->_sequence.first_show(5); - _vm->_sequence.then_show(6); + _vm->_sequence->first_show(5); + _vm->_sequence->then_show(6); break; case r__lusties: switch (magicnum) { case 14: if (_vm->_gyro->dna.avvys_in_the_cupboard) { hide_in_the_cupboard(); - _vm->_sequence.first_show(8); - _vm->_sequence.then_show(7); - _vm->_sequence.start_to_close(); + _vm->_sequence->first_show(8); + _vm->_sequence->then_show(7); + _vm->_sequence->start_to_close(); return; } else { apped(1, 6); tr[1].face = right; /* added by TT 12/3/1995 */ - _vm->_sequence.first_show(8); - _vm->_sequence.then_show(9); + _vm->_sequence->first_show(8); + _vm->_sequence->then_show(9); } break; case 12: - _vm->_sequence.first_show(4); - _vm->_sequence.then_show(5); - _vm->_sequence.then_show(6); + _vm->_sequence->first_show(4); + _vm->_sequence->then_show(5); + _vm->_sequence->then_show(6); break; } break; } - _vm->_sequence.then_flip(whither, ped); - _vm->_sequence.start_to_open(); + _vm->_sequence->then_flip(whither, ped); + _vm->_sequence->start_to_open(); } void Trip::newspeed() { @@ -1133,10 +1131,10 @@ void Trip::getback() { end; */ - _vm->_lucerna.mblit(r.x1, r.y1, r.x2, r.y2, 3, 1 - _vm->_gyro->cp); + _vm->_lucerna->mblit(r.x1, r.y1, r.x2, r.y2, 3, 1 - _vm->_gyro->cp); } - _vm->_lucerna.blitfix(); + _vm->_lucerna->blitfix(); /* if endangered then @@ -1199,7 +1197,7 @@ void Trip::arrow_procs(byte tripnum) { /* OK, it's hit him... what now? */ tr[2].call_eachstep = false; /* prevent recursion. */ - _vm->_visa.dixi('Q', 47); /* Complaint! */ + _vm->_visa->dixi('Q', 47); /* Complaint! */ tr[tripnum].done(); /* Deallocate the arrow. */ /* tr[1].done; { Deallocate normal pic of Avvy. } @@ -1211,14 +1209,14 @@ void Trip::arrow_procs(byte tripnum) { end; on;*/ - _vm->_lucerna.gameover(); + _vm->_lucerna->gameover(); _vm->_gyro->dna.user_moves_avvy = false; /* Stop the user from moving him. */ _vm->_timeout->set_up_timer(55, _vm->_timeout->procnaughty_duke, _vm->_timeout->reason_naughty_duke); } } else { /* Arrow has hit the wall! */ tr[tripnum].done(); /* Deallocate the arrow. */ - _vm->_celer.show_one(3); /* Show pic of arrow stuck into the door. */ + _vm->_celer->show_one(3); /* Show pic of arrow stuck into the door. */ _vm->_gyro->dna.arrow_in_the_door = true; /* So that we can pick it up. */ } @@ -1282,7 +1280,7 @@ void Trip::spin(byte whichway, byte &tripnum) { _vm->_gyro->dna.geida_spin += 1; _vm->_gyro->dna.geida_time = 20; if (_vm->_gyro->dna.geida_spin == 5) { - _vm->_scrolls.display("Steady on, Avvy, you'll make the poor girl dizzy!"); + _vm->_scrolls->display("Steady on, Avvy, you'll make the poor girl dizzy!"); _vm->_gyro->dna.geida_spin = 0; _vm->_gyro->dna.geida_time = 0; /* knock out records */ } @@ -1399,7 +1397,7 @@ void Trip::trippancy_link() { } if (mustexclaim) { mustexclaim = false; - _vm->_visa.dixi('x', saywhat); + _vm->_visa->dixi('x', saywhat); } } @@ -1506,26 +1504,26 @@ void Trip::hide_in_the_cupboard() { if (_vm->_gyro->dna.avvys_in_the_cupboard) { if (_vm->_gyro->dna.wearing == nowt) - _vm->_scrolls.display("\6AVVY!\22 Get dressed first!"); + _vm->_scrolls->display("\6AVVY!\22 Get dressed first!"); else { tr[1].visible = true; _vm->_gyro->dna.user_moves_avvy = true; apped(1, 3); /* Walk out of the cupboard. */ - _vm->_scrolls.display("You leave the cupboard. Nice to be out of there!"); + _vm->_scrolls->display("You leave the cupboard. Nice to be out of there!"); _vm->_gyro->dna.avvys_in_the_cupboard = false; - _vm->_sequence.first_show(8); - _vm->_sequence.then_show(7); - _vm->_sequence.start_to_close(); + _vm->_sequence->first_show(8); + _vm->_sequence->then_show(7); + _vm->_sequence->start_to_close(); } } else { /* Not hiding in the cupboard */ tr[1].visible = false; _vm->_gyro->dna.user_moves_avvy = false; - _vm->_scrolls.display(Common::String("You walk into the room...\20It seems to be an empty, ") + + _vm->_scrolls->display(Common::String("You walk into the room...\20It seems to be an empty, ") + "but dusty, cupboard. Hmmmm... you leave the door slightly open to " + "avoid suffocation."); _vm->_gyro->dna.avvys_in_the_cupboard = true; - _vm->_celer.show_one(8); + _vm->_celer->show_one(8); } } @@ -1564,8 +1562,8 @@ void Trip::fliproom(byte room, byte ped) { beforex = _vm->_gyro->mx; beforey = _vm->_gyro->my; - _vm->_lucerna.exitroom(_vm->_gyro->dna.room); - _vm->_lucerna.dusk(); + _vm->_lucerna->exitroom(_vm->_gyro->dna.room); + _vm->_lucerna->dusk(); getsetclear(); @@ -1577,18 +1575,18 @@ void Trip::fliproom(byte room, byte ped) { if (_vm->_gyro->dna.room == r__lustiesroom) _vm->_gyro->dna.enter_catacombs_from_lusties_room = true; - _vm->_lucerna.enterroom(room, ped); + _vm->_lucerna->enterroom(room, ped); apped(1, ped); _vm->_gyro->dna.enter_catacombs_from_lusties_room = false; _vm->_gyro->oldrw = _vm->_gyro->dna.rw; _vm->_gyro->dna.rw = tr[1].face; - _vm->_lucerna.showrw(); + _vm->_lucerna->showrw(); for (fv = 0; fv <= 1; fv++) { _vm->_gyro->cp = 1 - _vm->_gyro->cp; getback(); } - _vm->_lucerna.dawn(); + _vm->_lucerna->dawn(); /* Tidy up after mouse. I know it's a kludge... */ /* tidy_after_mouse;*/ diff --git a/engines/avalanche/trip6.h b/engines/avalanche/trip6.h index 4b84221e11..30fcba2a16 100644 --- a/engines/avalanche/trip6.h +++ b/engines/avalanche/trip6.h @@ -154,9 +154,7 @@ public: friend triptype; friend getsettype; - Trip(); - void setParent(AvalancheEngine *vm); static const int16 up = 0; static const int16 right = 1; @@ -187,6 +185,9 @@ public: static const int16 procgeida_procs = 7; + + Trip(AvalancheEngine *vm); + void trippancy_link(); void get_back_loretta(); diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp index 935959533f..4ffedc236d 100644 --- a/engines/avalanche/visa2.cpp +++ b/engines/avalanche/visa2.cpp @@ -41,7 +41,7 @@ namespace Avalanche { - void Visa::setParent(AvalancheEngine *vm) { + Visa::Visa(AvalancheEngine *vm) { _vm = vm; } @@ -86,7 +86,7 @@ namespace Avalanche { if (report_dixi_errors) { Common::String todisplay; todisplay.format("%cError accessing scroll %c%s", 7, block, _vm->_gyro->strf(point).c_str()); - _vm->_scrolls.display(todisplay); + _vm->_scrolls->display(todisplay); } return; } @@ -103,7 +103,7 @@ namespace Avalanche { if (bubbling) do_the_bubble(); - _vm->_scrolls.calldrivers(); + _vm->_scrolls->calldrivers(); } void Visa::speech(byte who, byte subject) { @@ -152,7 +152,7 @@ namespace Avalanche { unskrimble(); do_the_bubble(); - _vm->_scrolls.calldrivers(); + _vm->_scrolls->calldrivers(); went_ok = true; } diff --git a/engines/avalanche/visa2.h b/engines/avalanche/visa2.h index e33045c374..c3aa3f6255 100644 --- a/engines/avalanche/visa2.h +++ b/engines/avalanche/visa2.h @@ -37,7 +37,7 @@ class AvalancheEngine; class Visa { public: - void Visa::setParent(AvalancheEngine *vm); + Visa(AvalancheEngine *vm); void dixi(char block, byte point); |