diff options
author | uruk | 2013-08-30 11:56:16 +0200 |
---|---|---|
committer | uruk | 2013-08-30 11:56:16 +0200 |
commit | 73048872b2c2e9381fa0d11c207a11125d04ce2a (patch) | |
tree | 29cbe343b01c59d51aa5454042720ad61e5463f3 /engines | |
parent | 06d0ce1b0f4ed08260bdfc408fe31e9d9ebdefa7 (diff) | |
download | scummvm-rg350-73048872b2c2e9381fa0d11c207a11125d04ce2a.tar.gz scummvm-rg350-73048872b2c2e9381fa0d11c207a11125d04ce2a.tar.bz2 scummvm-rg350-73048872b2c2e9381fa0d11c207a11125d04ce2a.zip |
AVALANCHE: Upgrade show_one() so it can replace show_one_at(), preventing code duplication.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/acci2.cpp | 34 | ||||
-rw-r--r-- | engines/avalanche/celer2.cpp | 78 | ||||
-rw-r--r-- | engines/avalanche/celer2.h | 9 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 48 | ||||
-rw-r--r-- | engines/avalanche/sequence2.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/timeout2.cpp | 26 | ||||
-rw-r--r-- | engines/avalanche/trip6.cpp | 120 |
7 files changed, 157 insertions, 160 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index 586f2280ab..0b982dbc3d 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -758,7 +758,7 @@ bool Acci::holding() { void Acci::openBox(bool before) { if ((_vm->_gyro->dna.room == r__yours) && (thing == 54)) { - _vm->_celer->show_one(5); + _vm->_celer->show_one(-1, -1, 5); _vm->_celer->pics_link(); _vm->_trip->trippancy_link(); @@ -767,7 +767,7 @@ void Acci::openBox(bool before) { _vm->_system->delayMillis(55); if (!before) { - _vm->_celer->show_one(6); + _vm->_celer->show_one(-1, -1, 6); _vm->_celer->pics_link(); _vm->_trip->trippancy_link(); _vm->_graphics->refreshScreen(); @@ -1039,7 +1039,7 @@ void Acci::putproc() { /* Called when you call vb_put. */ if (_vm->_gyro->dna.wearing == thing) _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(-1, -1, 5); // Open box. openBox(true); _vm->_gyro->dna.box_contents = thing; @@ -1047,7 +1047,7 @@ void Acci::putproc() { /* Called when you call vb_put. */ _vm->_lucerna->objectlist(); _vm->_scrolls->display("OK, it's in the box."); - //_vm->_celer->show_one(6); // Shut box. + //_vm->_celer->show_one(-1, -1, 6); // Shut box. openBox(false); } } @@ -1169,7 +1169,7 @@ void Acci::stand_up() { _vm->_gyro->dna.user_moves_avvy = true; _vm->_trip->apped(1, 2); _vm->_gyro->dna.rw = _vm->_gyro->left; - _vm->_celer->show_one(4); /* Picture of empty pillow. */ + _vm->_celer->show_one(-1, -1, 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); @@ -1183,7 +1183,7 @@ void Acci::stand_up() { case r__nottspub: if (_vm->_gyro->dna.sitting_in_pub) { - _vm->_celer->show_one(4); /* Not sitting down. */ + _vm->_celer->show_one(-1, -1, 4); /* Not sitting down. */ _vm->_trip->tr[0].visible = true; /* But standing up. */ _vm->_trip->apped(1, 4); /* And walking away. */ _vm->_gyro->dna.sitting_in_pub = false; /* Really not sitting down. */ @@ -1202,12 +1202,12 @@ void Acci::getproc(char thing) { case r__yours: if (_vm->_trip->infield(2)) { if (_vm->_gyro->dna.box_contents == thing) { - _vm->_celer->show_one(5); + _vm->_celer->show_one(-1, -1, 5); _vm->_scrolls->display("OK, I've got it."); _vm->_gyro->dna.obj[thing - 1] = true; _vm->_lucerna->objectlist(); _vm->_gyro->dna.box_contents = nowt; - _vm->_celer->show_one(6); + _vm->_celer->show_one(-1, -1, 6); } else _vm->_scrolls->display(Common::String("I can't see ") + _vm->_gyro->get_better(thing) + " in the box."); } else @@ -1223,7 +1223,7 @@ void Acci::getproc(char thing) { _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->_celer->show_one(-1, -1, 4); /* No pen there now. */ _vm->_trip->call_special(3); /* Zap! */ _vm->_gyro->dna.taken_pen = true; _vm->_gyro->dna.obj[_vm->_gyro->pen - 1] = true; @@ -1244,7 +1244,7 @@ void Acci::getproc(char thing) { break; case r__robins: if ((thing == _vm->_gyro->mushroom) & (_vm->_trip->infield(1)) & (_vm->_gyro->dna.mushroom_growing)) { - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_scrolls->display("Got it!"); _vm->_gyro->dna.mushroom_growing = false; _vm->_gyro->dna.taken_mushroom = true; @@ -1464,8 +1464,8 @@ void Acci::do_that() { _vm->_gyro->dna.obj[_vm->_gyro->badge - 1] = false; _vm->_gyro->dna.obj[_vm->_gyro->habit - 1] = true; _vm->_gyro->dna.givenbadgetoiby = true; - _vm->_celer->show_one(8); - _vm->_celer->show_one(9); + _vm->_celer->show_one(-1, -1, 8); + _vm->_celer->show_one(-1, -1, 9); } else heythanks(); break; @@ -1770,11 +1770,11 @@ void Acci::do_that() { if (_vm->_gyro->dna.alcohol == 0) _vm->_lucerna->points(3); - _vm->_celer->show_one(12); + _vm->_celer->show_one(-1, -1, 12); _vm->_scrolls->display(booze[thing - 51] + ", please." + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble); _vm->_gyro->dna.drinking = thing; - _vm->_celer->show_one(10); + _vm->_celer->show_one(-1, -1, 10); _vm->_gyro->dna.malagauche = 177; _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuydrinks, _vm->_timeout->reason_drinks); break; @@ -1795,11 +1795,11 @@ void Acci::do_that() { return; } - _vm->_celer->show_one(12); + _vm->_celer->show_one(-1, -1, 12); _vm->_scrolls->display(Common::String("Wine, please.") + _vm->_scrolls->kControlRegister + '1' + _vm->_scrolls->kControlSpeechBubble); if (_vm->_gyro->dna.alcohol == 0) _vm->_lucerna->points(3); - _vm->_celer->show_one(10); + _vm->_celer->show_one(-1, -1, 10); _vm->_gyro->dna.malagauche = 177; _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuywine, _vm->_timeout->reason_drinks); @@ -1967,7 +1967,7 @@ void Acci::do_that() { _vm->_gyro->dna.avvy_is_awake = true; _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(-1, -1, 3); /* Picture of Avvy, awake in bed. */ if (_vm->_gyro->dna.teetotal) _vm->_visa->dixi('d', 13); } else diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp index 7f1966223d..25093a9348 100644 --- a/engines/avalanche/celer2.cpp +++ b/engines/avalanche/celer2.cpp @@ -62,22 +62,22 @@ void Celer::pics_link() { switch (_vm->_gyro->dna.room) { case r__outsideargentpub: if ((_vm->_gyro->roomtime % 12) == 0) - show_one(1 + (_vm->_gyro->roomtime / 12) % 4); + show_one(-1, -1, 1 + (_vm->_gyro->roomtime / 12) % 4); break; case r__brummieroad: if ((_vm->_gyro->roomtime % 2) == 0) - show_one(1 + (_vm->_gyro->roomtime / 2) % 4); + show_one(-1, -1, 1 + (_vm->_gyro->roomtime / 2) % 4); break; case r__bridge: if ((_vm->_gyro->roomtime % 2) == 0) - show_one(4 + (_vm->_gyro->roomtime / 2) % 4); + show_one(-1, -1, 4 + (_vm->_gyro->roomtime / 2) % 4); break; case r__yours: if ((!_vm->_gyro->dna.avvy_is_awake) && ((_vm->_gyro->roomtime % 4) == 0)) - show_one(1 + (_vm->_gyro->roomtime / 12) % 2); + show_one(-1, -1, 1 + (_vm->_gyro->roomtime / 12) % 2); break; case r__argentpub: @@ -88,16 +88,16 @@ void Celer::pics_link() { case 1: case 11: case 21: - show_one(12); + show_one(-1, -1, 12); break; /* Looks forwards. */ case 8: case 18: case 28: case 32: - show_one(11); + show_one(-1, -1, 11); break; /* Looks at you. */ case 30: - show_one(13); + show_one(-1, -1, 13); break; /* Winks. */ case 33: _vm->_gyro->dna.malagauche = 0; @@ -108,14 +108,14 @@ void Celer::pics_link() { switch (_vm->_gyro->roomtime % 200) { case 179: case 197: - show_one(5); + show_one(-1, -1, 5); break; /* Dogfood's drinking cycle */ case 182: case 194: - show_one(6); + show_one(-1, -1, 6); break; case 185: - show_one(7); + show_one(-1, -1, 7); break; case 199: _vm->_gyro->dna.dogfoodpos = 177; @@ -131,7 +131,7 @@ void Celer::pics_link() { xx = 4; if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ - show_one(xx); + show_one(-1, -1, xx); _vm->_gyro->dna.dogfoodpos = xx; } } @@ -141,16 +141,16 @@ void Celer::pics_link() { if ((_vm->_gyro->roomtime % 3) == 0) { switch ((_vm->_gyro->roomtime / int32(3)) % int32(6)) { case 4: - show_one(1); + show_one(-1, -1, 1); break; case 1: case 3: case 5: - show_one(2); + show_one(-1, -1, 2); break; case 0: case 2: - show_one(3); + show_one(-1, -1, 3); break; } } @@ -170,7 +170,7 @@ void Celer::pics_link() { xx = 3; /* Right. */ if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ - show_one(xx); + show_one(-1, -1, xx); _vm->_gyro->dna.dogfoodpos = xx; /* We use DogfoodPos here too- why not? */ } } @@ -180,10 +180,10 @@ void Celer::pics_link() { if ((!_vm->_gyro->dna.ayles_is_awake) && (_vm->_gyro->roomtime % 14 == 0)) { switch ((_vm->_gyro->roomtime / 14) % 2) { case 0: - show_one(1); + show_one(-1, -1, 1); break; /* Frame 2: EGA. */ case 1: - show_one(3); + show_one(-1, -1, 3); break; /* Frame 1: Natural. */ } } @@ -193,10 +193,10 @@ void Celer::pics_link() { if (_vm->_gyro->dna.tied_up) { switch (_vm->_gyro->roomtime % 54) { case 20: - show_one(4); + show_one(-1, -1, 4); break; /* Frame 4: Avalot blinks. */ case 23: - show_one(2); + show_one(-1, -1, 2); break; /* Frame 1: Back to normal. */ } } @@ -215,23 +215,23 @@ void Celer::pics_link() { xx--; /* Blinks */ if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ - show_one(xx); + show_one(-1, -1, xx); _vm->_gyro->dna.dogfoodpos = xx; /* We use DogfoodPos here too- why not? */ } switch (_vm->_gyro->roomtime % 50) { case 45 : - show_one(9); + show_one(-1, -1, 9); break; /* Spurge blinks */ case 49 : - show_one(10); + show_one(-1, -1, 10); break; } break; case r__ducks: if ((_vm->_gyro->roomtime % 3) == 0) /* The fire flickers */ - show_one(1 + (_vm->_gyro->roomtime / 3) % 3); + show_one(-1, -1, 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))) @@ -245,7 +245,7 @@ void Celer::pics_link() { xx += 1; /* Duck blinks */ if (xx != _vm->_gyro->dna.dogfoodpos) { /* Only if it's changed.*/ - show_one(xx); + show_one(-1, -1, xx); _vm->_gyro->dna.dogfoodpos = xx; /* We use DogfoodPos here too- why not? */ } break; @@ -348,18 +348,22 @@ void Celer::display_it(int16 x, int16 y, int16 xl, int16 yl, flavourtype flavour } // These pictures are practically parts of the background. -10 is for the drop-down menu. - _vm->_graphics->drawPicture(_vm->_graphics->_background, picture, x * 8, y - 10); + _vm->_graphics->drawPicture(_vm->_graphics->_background, picture, x, y - 10); } -void Celer::show_one(byte which) { +void Celer::show_one(int16 destX, int16 destY, byte which) { chunkblocktype ch; which--; // For the difference between the Pascal and C array indexes. //setactivepage(3); warning("STUB: Celer::show_one()"); - if (memos[which].x > on_disk) - display_it(memos[which].x, memos[which].y, memos[which].xl, memos[which].yl, memos[which].flavour, memory[which]); - else { + if (memos[which].x > on_disk) { + if (destX == -1) { + destX = memos[which].x * 8; + destY = memos[which].y; + } + display_it(destX, destY, memos[which].xl, memos[which].yl, memos[which].flavour, memory[which]); + } else { if (!f.open(filename)) { /* Filename was set in load_chunks() */ warning("AVALANCHE: Celer: File not found: %s", filename.c_str()); return; @@ -378,7 +382,11 @@ void Celer::show_one(byte which) { ::Graphics::Surface picture = _vm->_graphics->loadPictureRow(f, ch.xl * 8, ch.yl + 1); - display_it(ch.x, ch.y, ch.xl, ch.yl, ch.flavour, picture); + if (destX == -1) { + destX = ch.x * 8; + destY = ch.y; + } + display_it(destX, destY, ch.xl, ch.yl, ch.flavour, picture); picture.free(); f.close(); @@ -393,14 +401,4 @@ void Celer::show_one(byte which) { -void Celer::display_it_at(int16 xl, int16 yl, flavourtype flavour, const ::Graphics::Surface &picture, int16 &xxx, int16 &yyy) { - warning("STUB: Celer::display_it_at()"); -} - -void Celer::show_one_at(byte which, int16 xxx, int16 yyy) { - warning("STUB: Celer::show_one_at()"); -} - - - } // End of namespace Avalanche. diff --git a/engines/avalanche/celer2.h b/engines/avalanche/celer2.h index 46ba53f910..3c7eda3cd9 100644 --- a/engines/avalanche/celer2.h +++ b/engines/avalanche/celer2.h @@ -78,9 +78,10 @@ public: void forget_chunks(); - void show_one(byte which); - - void show_one_at(byte which, int16 xxx, int16 yyy); + // Settint the destination to -1,-1 means the picture should be drawn to it's original position. + // If you give it positive values, the picture will be plotted to the desired coordinates on the screen. + // By that we get rid of show_one_at(), which would be almost identical and cause a lot of code duplication. + void show_one(int16 destX, int16 destY, byte which); private: AvalancheEngine *_vm; @@ -92,8 +93,6 @@ private: static const int16 on_disk; /* Value of memos[fv].x when it's not in memory. */ void display_it(int16 x, int16 y, int16 xl, int16 yl, flavourtype flavour, const ::Graphics::Surface &picture); - - void display_it_at(int16 xl, int16 yl, flavourtype flavour, const ::Graphics::Surface &picture, int16 &xxx, int16 &yyy); }; } // End of namespace Avalanche. diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index c54d56763b..036ae4e2c3 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -391,7 +391,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(-1, -1, 3); _vm->_graphics->refreshBackground(); _vm->_timeout->set_up_timer(100, _vm->_timeout->procarkata_shouts, _vm->_timeout->reason_arkata_shouts); } @@ -492,7 +492,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(-1, -1, 3); /* Position of drawbridge */ _vm->_graphics->refreshBackground(); _vm->_gyro->magics[green - 1].op = _vm->_gyro->nix; /* You may enter the drawbridge. */ } @@ -518,10 +518,10 @@ void Lucerna::enterroom(byte x, byte ped) { } if (_vm->_gyro->dna.tied_up) - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); if (!_vm->_gyro->dna.mushroom_growing) - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_graphics->refreshBackground(); } break; @@ -603,11 +603,11 @@ void Lucerna::enterroom(byte x, byte ped) { case r__argentpub: { if (_vm->_gyro->dna.wonnim) - _vm->_celer->show_one(1); /* No lute by the settle. */ + _vm->_celer->show_one(-1, -1, 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(-1, -1, 8); + _vm->_celer->show_one(-1, -1, 9); } _vm->_graphics->refreshBackground(); } @@ -624,7 +624,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); + _vm->_celer->show_one(-1, -1, 5); _vm->_graphics->refreshBackground(); } } @@ -634,14 +634,14 @@ 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(-1, -1, 2); _vm->_graphics->refreshBackground(); - _vm->_celer->show_one(4); + _vm->_celer->show_one(-1, -1, 4); _vm->_gyro->magics[brown - 1].op = _vm->_gyro->nix; _vm->_gyro->whereis[_vm->_gyro->pjacques - 150] = 0; } if (ped != 0) { - _vm->_celer->show_one(6); + _vm->_celer->show_one(-1, -1, 6); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(6); _vm->_sequence->then_show(5); @@ -653,7 +653,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__outsidenottspub: if (ped == 2) { - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(3); _vm->_sequence->then_show(2); @@ -665,7 +665,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__outsideargentpub: if (ped == 2) { - _vm->_celer->show_one(6); + _vm->_celer->show_one(-1, -1, 6); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(6); _vm->_sequence->then_show(5); @@ -692,7 +692,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__insidecardiffcastle: if (ped > 0) { _vm->_trip->tr[1].init(10, false, _vm->_trip); /* Define the dart. */ - _vm->_celer->show_one(1); + _vm->_celer->show_one(-1, -1, 1); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(1); if (_vm->_gyro->dna.arrow_in_the_door) @@ -701,22 +701,22 @@ void Lucerna::enterroom(byte x, byte ped) { _vm->_sequence->then_show(2); if (_vm->_gyro->dna.taken_pen) - _vm->_celer->show_one(4); + _vm->_celer->show_one(-1, -1, 4); _vm->_sequence->start_to_close(); } else { - _vm->_celer->show_one(1); + _vm->_celer->show_one(-1, -1, 1); if (_vm->_gyro->dna.arrow_in_the_door) - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); else - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_graphics->refreshBackground(); } break; case r__avvysgarden: if (ped == 1) { - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(2); _vm->_sequence->then_show(1); @@ -730,12 +730,12 @@ void Lucerna::enterroom(byte x, byte ped) { case r__yourhall: if (ped == 2) { /* It was the original: - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_sequence->first_show(1); _vm->_sequence->then_show(3); _vm->_sequence->start_to_close();*/ - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(2); _vm->_sequence->then_show(1); @@ -746,7 +746,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__aylesoffice: if (_vm->_gyro->dna.ayles_is_awake) - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_graphics->refreshBackground(); break; /* Ayles awake. */ @@ -766,7 +766,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(-1, -1, 3); _vm->_gyro->dna.dogfoodpos = 1; /* Actually, du Lustie pos. */ } break; @@ -774,7 +774,7 @@ void Lucerna::enterroom(byte x, byte ped) { case r__outsideducks: if (ped == 2) { /* Shut the door */ - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_graphics->refreshBackground(); _vm->_sequence->first_show(3); _vm->_sequence->first_show(2); diff --git a/engines/avalanche/sequence2.cpp b/engines/avalanche/sequence2.cpp index f41ac128c6..d9f52a3b17 100644 --- a/engines/avalanche/sequence2.cpp +++ b/engines/avalanche/sequence2.cpp @@ -102,7 +102,7 @@ void Sequence::call_sequencer() { if ((seq[0] >= 1) && (seq[0] <= 176)) { /* Show a frame. */ - _vm->_celer->show_one(seq[0]); + _vm->_celer->show_one(-1, -1, seq[0]); shove_left(); } diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp index f147ad7550..d68b943013 100644 --- a/engines/avalanche/timeout2.cpp +++ b/engines/avalanche/timeout2.cpp @@ -242,7 +242,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(-1, -1, _vm->_gyro->dna.drawbridge_open - 1); if (_vm->_gyro->dna.drawbridge_open == 4) _vm->_gyro->magics[1].op = _vm->_gyro->nix; /* You may enter the drawbridge. */ @@ -285,7 +285,7 @@ void Timeout::bang2() { void Timeout::stairs() { _vm->_gyro->blip(); _vm->_trip->tr[0].walkto(4); - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_gyro->dna.brummie_stairs = 2; _vm->_gyro->magics[10].op = _vm->_gyro->special; _vm->_gyro->magics[10].data = 2; /* Reached the bottom of the stairs. */ @@ -399,17 +399,17 @@ void Timeout::jacques_wakes_up() { switch (_vm->_gyro->dna.jacques_awake) { /* Additional pictures. */ case 1 : - _vm->_celer->show_one(1); /* Eyes open. */ + _vm->_celer->show_one(-1, -1, 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(-1, -1, 2); /* Not on the floor. */ + _vm->_celer->show_one(-1, -1, 3); /* But going through the door. */ _vm->_gyro->magics[5].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(-1, -1, 2); /* Not on the floor, either. */ + _vm->_celer->show_one(-1, -1, 4); /* He's gone... so the door's open. */ _vm->_gyro->whereis[_vm->_gyro->pjacques - 150] = 0; /* Gone! */ break; } @@ -441,7 +441,7 @@ void Timeout::naughty_duke() { _vm->_trip->tr[1].walkto(3); /* He walks over to you. */ /* Let's get the door opening. */ - _vm->_celer->show_one(1); + _vm->_celer->show_one(-1, -1, 1); _vm->_sequence->first_show(2); _vm->_sequence->start_to_close(); @@ -456,7 +456,7 @@ void Timeout::naughty_duke2() { } void Timeout::naughty_duke3() { - _vm->_celer->show_one(1); + _vm->_celer->show_one(-1, -1, 1); _vm->_sequence->first_show(2); _vm->_sequence->start_to_close(); } @@ -498,7 +498,7 @@ void Timeout::jump() { if (_vm->_gyro->dna.carrying >= maxobjs) _vm->_scrolls->display("You fail to grab it, because your hands are full."); else { - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_gyro->dna.arrow_in_the_door = false; /* You've got it. */ _vm->_gyro->dna.obj[_vm->_gyro->bolt - 1] = true; _vm->_lucerna->objectlist(); @@ -514,7 +514,7 @@ void Timeout::crapulus_says_splud_out() { } void Timeout::buydrinks() { - _vm->_celer->show_one(11); /* Malagauche gets up again. */ + _vm->_celer->show_one(-1, -1, 11); /* Malagauche gets up again. */ _vm->_gyro->dna.malagauche = 0; _vm->_visa->dixi('D', _vm->_gyro->dna.drinking); /* _vm->_scrolls->display message about it. */ @@ -526,7 +526,7 @@ void Timeout::buydrinks() { } void Timeout::buywine() { - _vm->_celer->show_one(11); /* Malagauche gets up again. */ + _vm->_celer->show_one(-1, -1, 11); /* Malagauche gets up again. */ _vm->_gyro->dna.malagauche = 0; _vm->_visa->dixi('D', 50); /* You buy the wine. */ @@ -619,7 +619,7 @@ void Timeout::avvy_sit_down() { if (_vm->_trip->tr[0].homing) /* Still walking */ set_up_timer(1, procavvy_sit_down, reason_sitting_down); else { - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_gyro->dna.sitting_in_pub = true; _vm->_gyro->dna.user_moves_avvy = false; _vm->_trip->tr[0].visible = false; diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index 2b3018b7b8..f83bfc07b9 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -578,59 +578,59 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(28); + _vm->_celer->show_one(-1, -1, 28); break; case 0x1: /* no connection (wall + shield), */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(28); /* Wall, plus... */ - _vm->_celer->show_one(29); /* ...shield. */ + _vm->_celer->show_one(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 29); /* ...shield. */ break; case 0x2: /* wall with door */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].op = _vm->_gyro->special; /* Door. */ - _vm->_celer->show_one(28); /* Wall, plus... */ - _vm->_celer->show_one(30); /* ...door. */ + _vm->_celer->show_one(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 30); /* ...door. */ break; case 0x3: /* wall with door and shield */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].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(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 30); /* ...door, and... */ + _vm->_celer->show_one(-1, -1, 29); /* ...shield. */ break; case 0x4: /* no connection (wall + window), */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(28); /* Wall, plus... */ - _vm->_celer->show_one(5); /* ...window. */ + _vm->_celer->show_one(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 5); /* ...window. */ break; case 0x5: /* wall with door and window */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].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(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 30); /* ...door, and... */ + _vm->_celer->show_one(-1, -1, 5); /* ...window. */ break; case 0x6: /* no connection (wall + torches), */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].op = _vm->_gyro->nix; /* No door. */ - _vm->_celer->show_one(28); /* Wall, plus... */ - _vm->_celer->show_one(7); /* ...torches. */ + _vm->_celer->show_one(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 7); /* ...torches. */ break; case 0x7: /* wall with door and torches */ _vm->_gyro->magics[1].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[2].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[4].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(-1, -1, 28); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 30); /* ...door, and... */ + _vm->_celer->show_one(-1, -1, 7); /* ...torches. */ break; case 0xf: /* straight-through corridor. */ _vm->_gyro->magics[1].op = _vm->_gyro->nix; /* Sloping wall. */ @@ -645,44 +645,44 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(19); + _vm->_celer->show_one(-1, -1, 19); break; case 0x1: /* no connection (wall + window), */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(19); /* Wall, plus... */ - _vm->_celer->show_one(20); /* ...window. */ + _vm->_celer->show_one(-1, -1, 19); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 20); /* ...window. */ break; case 0x2: /* wall with door */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].op = _vm->_gyro->special; /* Door. */ - _vm->_celer->show_one(19); /* Wall, plus... */ - _vm->_celer->show_one(21); /* ...door. */ + _vm->_celer->show_one(-1, -1, 19); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 21); /* ...door. */ break; case 0x3: /* wall with door and window */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].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(-1, -1, 19); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 20); /* ...door, and... */ + _vm->_celer->show_one(-1, -1, 21); /* ...window. */ break; case 0x6: /* no connection (wall + torches), */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].op = _vm->_gyro->nix; /* No door. */ - _vm->_celer->show_one(19); /* Wall, plus... */ - _vm->_celer->show_one(18); /* ...torches. */ + _vm->_celer->show_one(-1, -1, 19); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 18); /* ...torches. */ break; case 0x7: /* wall with door and torches */ _vm->_gyro->magics[4].op = _vm->_gyro->bounces; /* Sloping wall. */ _vm->_gyro->magics[5].op = _vm->_gyro->nix; /* Straight wall. */ _vm->_gyro->portals[6].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(-1, -1, 19); /* Wall, plus... */ + _vm->_celer->show_one(-1, -1, 21); /* ...door, and... */ + _vm->_celer->show_one(-1, -1, 18); /* ...torches. */ break; case 0xf: /* straight-through corridor. */ _vm->_gyro->magics[4].op = _vm->_gyro->nix; /* Sloping wall. */ @@ -700,7 +700,7 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[12].op = _vm->_gyro->bounces; break; case 0x1: - _vm->_celer->show_one(22); + _vm->_celer->show_one(-1, -1, 22); if ((xy_uint16 == 2051) && (_vm->_gyro->dna.geida_follows)) _vm->_gyro->magics[12].op = _vm->_gyro->exclaim; @@ -711,13 +711,13 @@ void Trip::catamove(byte ped) { _vm->_gyro->magics[11].op = _vm->_gyro->bounces; break; case 0x2: - _vm->_celer->show_one(23); + _vm->_celer->show_one(-1, -1, 23); _vm->_gyro->magics[6].op = _vm->_gyro->special; /* Middle exit south. */ _vm->_gyro->magics[11].op = _vm->_gyro->bounces; _vm->_gyro->magics[12].op = _vm->_gyro->bounces; break; case 0x3: - _vm->_celer->show_one(24); + _vm->_celer->show_one(-1, -1, 24); _vm->_gyro->magics[11].op = _vm->_gyro->special; /* Left exit south. */ _vm->_gyro->magics[6].op = _vm->_gyro->bounces; _vm->_gyro->magics[12].op = _vm->_gyro->bounces; @@ -732,36 +732,36 @@ void Trip::catamove(byte ped) { // LEFT handles: /* case 0x1: - _vm->_celer->show_one(4); + _vm->_celer->show_one(-1, -1, 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(-1, -1, 4); _vm->_gyro->magics[0].op = _vm->_gyro->bounces; // Middle exit north. _vm->_gyro->portals[3].op = _vm->_gyro->special; // Door. break; /* case 0x3: - _vm->_celer->show_one(4); + _vm->_celer->show_one(-1, -1, 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(-1, -1, 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(-1, -1, 3); _vm->_gyro->magics[0].op = _vm->_gyro->bounces; /* Middle exit north. */ _vm->_gyro->portals[3].op = _vm->_gyro->special; /* Door. */ break; /* case 0x6: - _vm->_celer->show_one(3); + _vm->_celer->show_one(-1, -1, 3); _vm->_gyro->magics[1].op = _vm->_gyro->bounces; // { Right exit north. } _vm->_gyro->portals[12].op = _vm->_gyro->special; // { Door. } break; @@ -770,12 +770,12 @@ void Trip::catamove(byte ped) { case 0x7: case 0x8: case 0x9: { - _vm->_celer->show_one(6); + _vm->_celer->show_one(-1, -1, 6); if (((here & 0xf000) >> 12) > 0x7) - _vm->_celer->show_one(31); + _vm->_celer->show_one(-1, -1, 31); if (((here & 0xf000) >> 12) == 0x9) - _vm->_celer->show_one(32); + _vm->_celer->show_one(-1, -1, 32); _vm->_gyro->magics[0].op = _vm->_gyro->special; /* Middle arch north. */ _vm->_gyro->portals[3].op = _vm->_gyro->nix; /* Door. */ @@ -785,50 +785,50 @@ void Trip::catamove(byte ped) { case 0xd: /* No connection + WINDOW */ _vm->_gyro->magics[0].op = _vm->_gyro->bounces; _vm->_gyro->portals[3].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(14); + _vm->_celer->show_one(-1, -1, 14); break; case 0xe: /* No connection + TORCH */ _vm->_gyro->magics[0].op = _vm->_gyro->bounces; _vm->_gyro->portals[3].op = _vm->_gyro->nix; /* Door. */ - _vm->_celer->show_one(8); + _vm->_celer->show_one(-1, -1, 8); break; /* Recessed door: */ case 0xf: _vm->_gyro->magics[0].op = _vm->_gyro->nix; /* Door to Geida's room. */ - _vm->_celer->show_one(1); + _vm->_celer->show_one(-1, -1, 1); _vm->_gyro->portals[3].op = _vm->_gyro->special; /* Door. */ break; } switch (xy_uint16) { case 514: - _vm->_celer->show_one(17); + _vm->_celer->show_one(-1, -1, 17); break; /* [2,2] : "Art Gallery" sign over door. */ case 264: - _vm->_celer->show_one(9); + _vm->_celer->show_one(-1, -1, 9); break; /* [8,1] : "The Wrong Way!" sign. */ case 1797: - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 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(130 + fv * 120, 70, 15); + _vm->_celer->show_one(184 + fv * 120, 78, 16); } break; case 1287: for (fv = 10; fv <= 13; fv++) - _vm->_celer->show_one(fv); + _vm->_celer->show_one(-1, -1, fv); break; /* [7,5] : 4 candles. */ case 776: - _vm->_celer->show_one(10); + _vm->_celer->show_one(-1, -1, 10); break; /* [8,3] : 1 candle. */ case 2049: - _vm->_celer->show_one(11); + _vm->_celer->show_one(-1, -1, 11); break; /* [1,8] : another candle. */ case 257: - _vm->_celer->show_one(12); - _vm->_celer->show_one(13); + _vm->_celer->show_one(-1, -1, 12); + _vm->_celer->show_one(-1, -1, 13); break; /* [1,1] : the other two. */ } @@ -851,7 +851,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, -1, 1); _vm->_gyro->dna.brummie_stairs = 1; _vm->_gyro->magics[9].op = _vm->_gyro->nix; _vm->_timeout->set_up_timer(10, _vm->_timeout->procstairs, _vm->_timeout->reason_brummiestairs); @@ -897,7 +897,7 @@ void Trip::call_special(uint16 which) { _vm->_visa->dixi('q', 35); tr[0].done(); /*tr[1].vanishifstill:=true;*/ - _vm->_celer->show_one(2); + _vm->_celer->show_one(-1, -1, 2); _vm->_visa->dixi('q', 36); _vm->_gyro->dna.tied_up = true; _vm->_gyro->dna.friar_will_tie_you_up = false; @@ -1246,7 +1246,7 @@ void Trip::arrow_procs(byte tripnum) { } } 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(-1, -1, 3); /* Show pic of arrow stuck into the door. */ _vm->_gyro->dna.arrow_in_the_door = true; /* So that we can pick it up. */ } @@ -1493,7 +1493,7 @@ void Trip::hide_in_the_cupboard() { _vm->_scrolls->display(Common::String("You walk into the room...") + _vm->_scrolls->kControlParagraph + "It 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(-1, -1, 8); } } |