AVALANCHE: Use Room enum instead of byte in misc place

This commit is contained in:
Strangerke 2013-09-24 08:15:28 +02:00
parent f4e37939c7
commit 0b7de38dc1
11 changed files with 177 additions and 157 deletions

View file

@ -210,7 +210,7 @@ void AnimationType::walk() {
bounce();
break;
case Avalot::kMagicTransport:
_anim->flipRoom(magic->_data >> 8, magic->_data & 0xff);
_anim->_vm->_avalot->flipRoom((Room)(magic->_data >> 8), magic->_data & 0xff);
break;
case Avalot::kMagicUnfinished: {
bounce();
@ -222,7 +222,7 @@ void AnimationType::walk() {
_anim->callSpecial(magic->_data);
break;
case Avalot::kMagicOpenDoor:
_anim->openDoor(magic->_data >> 8, magic->_data & 0xff, magicColor);
_anim->_vm->_avalot->openDoor((Room)(magic->_data >> 8), magic->_data & 0xff, magicColor);
break;
}
}
@ -418,20 +418,20 @@ void Animation::catacombMove(byte ped) {
switch (xy_uint16) {
case 1801: // Exit catacombs
flipRoom(kRoomLustiesRoom, 4);
_vm->_avalot->flipRoom(kRoomLustiesRoom, 4);
_vm->_dialogs->displayText("Phew! Nice to be out of there!");
return;
case 1033:{ // Oubliette
flipRoom(kRoomOubliette, 1);
_vm->_avalot->flipRoom(kRoomOubliette, 1);
Common::String tmpStr = Common::String::format("Oh, NO!%c1%c", Dialogs::kControlRegister, Dialogs::kControlSpeechBubble);
_vm->_dialogs->displayText(tmpStr);
}
return;
case 4:
flipRoom(kRoomGeidas, 1);
_vm->_avalot->flipRoom(kRoomGeidas, 1);
return;
case 2307:
flipRoom(kRoomLusties, 5);
_vm->_avalot->flipRoom(kRoomLusties, 5);
_vm->_dialogs->displayText("Oh no... here we go again...");
_vm->_avalot->_userMovesAvvy = false;
_sprites[0]._moveY = 1;
@ -771,7 +771,7 @@ void Animation::callSpecial(uint16 which) {
_sprites[1].walkTo(2);
_sprites[1]._vanishIfStill = true;
_sprites[1]._doCheck = true; // One of them must have Check_Me switched on.
_vm->_avalot->_whereIs[kPeopleFriarTuck - 150] = kRoomDummy; // Not here, then.
_vm->_avalot->setRoom(kPeopleFriarTuck, kRoomDummy); // Not here, then.
_vm->_timer->addTimer(364, Timer::kProcHangAround, Timer::kReasonHangingAround);
}
break;
@ -867,67 +867,6 @@ void Animation::callSpecial(uint16 which) {
}
}
/**
* Open the Door.
* This slides the door open. The data really ought to be saved in
* the Also file, and will be next time. However, for now, they're
* here.
* @remarks Originally called 'open_the_door'
*/
void Animation::openDoor(byte whither, byte ped, byte magicnum) {
switch (_vm->_avalot->_room) {
case kRoomOutsideYours:
case kRoomOutsideNottsPub:
case kRoomOutsideDucks:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(2);
_vm->_sequence->thenShow(3);
break;
case kRoomInsideCardiffCastle:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(5);
break;
case kRoomAvvysGarden:
case kRoomEntranceHall:
case kRoomInsideAbbey:
case kRoomYourHall:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(2);
break;
case kRoomMusicRoom:
case kRoomOutsideArgentPub:
_vm->_sequence->firstShow(5);
_vm->_sequence->thenShow(6);
break;
case kRoomLusties:
switch (magicnum) {
case 14:
if (_vm->_avalot->_avvysInTheCupboard) {
hideInCupboard();
_vm->_sequence->firstShow(8);
_vm->_sequence->thenShow(7);
_vm->_sequence->startToClose();
return;
} else {
appearPed(0, 5);
_sprites[0]._facingDir = kDirRight; // added by TT 12/3/1995
_vm->_sequence->firstShow(8);
_vm->_sequence->thenShow(9);
}
break;
case 12:
_vm->_sequence->firstShow(4);
_vm->_sequence->thenShow(5);
_vm->_sequence->thenShow(6);
break;
}
break;
}
_vm->_sequence->thenFlip(whither, ped);
_vm->_sequence->startToOpen();
}
void Animation::updateSpeed() {
// Given that you've just changed the speed in triptype._speedX, this adjusts _moveX.
@ -1254,47 +1193,6 @@ void Animation::hideInCupboard() {
}
}
void Animation::flipRoom(byte room, byte ped) {
assert((ped > 0) && (ped < 15));
if (!_vm->_avalot->_alive) {
// You can't leave the room if you're dead.
_sprites[0]._moveX = 0;
_sprites[0]._moveY = 0; // Stop him from moving.
return;
}
if ((room == kRoomDummy) && (_vm->_avalot->_room == kRoomLusties)) {
hideInCupboard();
return;
}
if ((_vm->_avalot->_jumpStatus > 0) && (_vm->_avalot->_room == kRoomInsideCardiffCastle)) {
// You can't *jump* out of Cardiff Castle!
_sprites[0]._moveX = 0;
return;
}
_vm->_avalot->exitRoom(_vm->_avalot->_room);
_vm->_avalot->dusk();
for (int16 i = 1; i < kSpriteNumbMax; i++) {
if (_sprites[i]._quick)
_sprites[i].remove();
} // Deallocate sprite
if (_vm->_avalot->_room == kRoomLustiesRoom)
_vm->_avalot->_enterCatacombsFromLustiesRoom = true;
_vm->_avalot->enterRoom(room, ped);
appearPed(0, ped - 1);
_vm->_avalot->_enterCatacombsFromLustiesRoom = false;
_oldDirection = _direction;
_direction = _sprites[0]._facingDir;
_vm->_avalot->drawDirection();
_vm->_avalot->dawn();
}
bool Animation::inField(byte which) {
FieldType *curField = &_vm->_avalot->_fields[which];
int16 yy = _sprites[0]._y + _sprites[0]._info._yLength;

View file

@ -121,16 +121,15 @@ public:
void animLink();
void loadAnims(); // Original: loadtrip().
void callSpecial(uint16 which);
void openDoor(byte whither, byte ped, byte magicnum); // Handles slidey-open doors.
void catacombMove(byte ped); // When you enter a new position in the catacombs, this procedure should be called. It changes the 'also' codes so that they may match the picture on the screen.
void stopWalking();
void setMoveSpeed(byte t, Direction dir);
void appearPed(byte sprNum, byte pedNum);
void flipRoom(byte room, byte ped);
bool inField(byte which); // Returns true if you're within field "which".
bool nearDoor(); // Returns True if you're near a door.
void updateSpeed();
void handleMoveKey(const Common::Event &event); // To replace tripkey().
void hideInCupboard();
void setDirection(Direction dir);
void setOldDirection(Direction dir);
@ -150,7 +149,6 @@ private:
void grabAvvy(byte tripnum);
void arrowProcs(byte tripnum);
void hideInCupboard();
// Different movements for NPCs:
void followAvalotY(byte tripnum); // Original: follow_avvy_y().

View file

@ -419,7 +419,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_background->forgetBackgroundSprites();
_avalot->minorRedraw();
_menu->setup();
_avalot->_whereIs[kPeopleAvalot - 150] = _avalot->_room;
_avalot->setRoom(kPeopleAvalot, _avalot->_room);
_avalot->_alive = true;
_avalot->refreshObjectList();
_animation->updateSpeed();

View file

@ -143,7 +143,7 @@ const TuneType Avalot::kTune = {
kPitchHigher, kPitchLower, kPitchLower, kPitchLower, kPitchLower, kPitchSame, kPitchLower, kPitchHigher, kPitchSame, kPitchLower, kPitchHigher
};
byte Avalot::_whereIs[29] = {
Room Avalot::_whereIs[29] = {
// The Lads
kRoomYours, // Avvy
kRoomSpludwicks, // Spludwick
@ -162,7 +162,14 @@ byte Avalot::_whereIs[29] = {
kRoomNottsPub, // Port
kRoomNottsPub, // Spurge
kRoomMusicRoom, // Jacques
0, 0, 0, 0, 0, 0, 0, 0,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
kRoomNowhere,
// The Lasses
kRoomYours, // Arkata
kRoomGeidas, // Geida
@ -747,23 +754,23 @@ void Avalot::putGeidaAt(byte whichPed, byte ped) {
spr1->_eachStepProc = Animation::kProcGeida;
}
void Avalot::enterRoom(byte room, byte ped) {
void Avalot::enterRoom(Room roomId, byte ped) {
_seeScroll = true; // This stops the trippancy system working over the length of this procedure.
findPeople(room);
_room = room;
findPeople(roomId);
_room = roomId;
if (ped != 0)
_roomCount[room]++;
_roomCount[roomId]++;
loadRoom(room);
loadRoom(roomId);
if ((_roomCount[room] == 0) && (!setFlag('S')))
if ((_roomCount[roomId] == 0) && (!setFlag('S')))
incScore(1);
_whereIs[kPeopleAvalot - 150] = _room;
if (_geidaFollows)
_whereIs[kPeopleGeida - 150] = room;
_whereIs[kPeopleGeida - 150] = roomId;
_roomTime = 0;
@ -771,7 +778,7 @@ void Avalot::enterRoom(byte room, byte ped) {
if ((_lastRoom == kRoomMap) && (_lastRoomNotMap != _room))
enterNewTown();
switch (room) {
switch (roomId) {
case kRoomYours:
if (_avvyInBed) {
_vm->_background->drawBackgroundSprite(-1, -1, 2);
@ -891,8 +898,8 @@ void Avalot::enterRoom(byte room, byte ped) {
}
if (_beenTiedUp) {
_whereIs[kPeopleRobinHood - 150] = 0;
_whereIs[kPeopleFriarTuck - 150] = 0;
_whereIs[kPeopleRobinHood - 150] = kRoomNowhere;
_whereIs[kPeopleFriarTuck - 150] = kRoomNowhere;
}
if (_tiedUp)
@ -1004,7 +1011,7 @@ void Avalot::enterRoom(byte room, byte ped) {
_vm->_graphics->refreshBackground();
_vm->_background->drawBackgroundSprite(-1, -1, 3);
_magics[kColorBrown - 1]._operation = Avalot::kMagicNothing;
_whereIs[kPeopleJacques - 150] = 0;
_whereIs[kPeopleJacques - 150] = kRoomNowhere;
}
if (ped != 0) {
_vm->_background->drawBackgroundSprite(-1, -1, 5);
@ -1647,7 +1654,7 @@ void Avalot::resetVariables() {
_nextBell = 0;
_givenPotionToGeida = false;
_lustieIsAsleep = false;
_flipToWhere = 0;
_flipToWhere = kRoomNowhere;
_flipToPed = 0;
_beenTiedUp = false;
_sittingInPub = false;
@ -1705,7 +1712,7 @@ void Avalot::newGame() {
_avvyInBed = true;
_enidFilename = "";
enterRoom(1, 1);
enterRoom(kRoomYours, 1);
avvy->_visible = false;
drawScore();
_vm->_menu->setup();
@ -1939,4 +1946,114 @@ void Avalot::hangAroundForAWhile() {
for (int i = 0; i < 28; i++)
slowDown();
}
void Avalot::flipRoom(Room room, byte ped) {
assert((ped > 0) && (ped < 15));
if (!_alive) {
// You can't leave the room if you're dead.
_vm->_animation->_sprites[0]._moveX = 0;
_vm->_animation->_sprites[0]._moveY = 0; // Stop him from moving.
return;
}
if ((room == kRoomDummy) && (_room == kRoomLusties)) {
_vm->_animation->hideInCupboard();
return;
}
if ((_jumpStatus > 0) && (_room == kRoomInsideCardiffCastle)) {
// You can't *jump* out of Cardiff Castle!
_vm->_animation->_sprites[0]._moveX = 0;
return;
}
exitRoom(_room);
dusk();
for (int16 i = 1; i < _vm->_animation->kSpriteNumbMax; i++) {
if (_vm->_animation->_sprites[i]._quick)
_vm->_animation->_sprites[i].remove();
} // Deallocate sprite
if (_room == kRoomLustiesRoom)
_enterCatacombsFromLustiesRoom = true;
enterRoom(room, ped);
_vm->_animation->appearPed(0, ped - 1);
_enterCatacombsFromLustiesRoom = false;
_vm->_animation->setOldDirection(_vm->_animation->getDirection());
_vm->_animation->setDirection(_vm->_animation->_sprites[0]._facingDir);
drawDirection();
dawn();
}
/**
* Open the Door.
* This slides the door open. The data really ought to be saved in
* the Also file, and will be next time. However, for now, they're
* here.
* @remarks Originally called 'open_the_door'
*/
void Avalot::openDoor(Room whither, byte ped, byte magicnum) {
switch (_room) {
case kRoomOutsideYours:
case kRoomOutsideNottsPub:
case kRoomOutsideDucks:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(2);
_vm->_sequence->thenShow(3);
break;
case kRoomInsideCardiffCastle:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(5);
break;
case kRoomAvvysGarden:
case kRoomEntranceHall:
case kRoomInsideAbbey:
case kRoomYourHall:
_vm->_sequence->firstShow(1);
_vm->_sequence->thenShow(2);
break;
case kRoomMusicRoom:
case kRoomOutsideArgentPub:
_vm->_sequence->firstShow(5);
_vm->_sequence->thenShow(6);
break;
case kRoomLusties:
switch (magicnum) {
case 14:
if (_avvysInTheCupboard) {
_vm->_animation->hideInCupboard();
_vm->_sequence->firstShow(8);
_vm->_sequence->thenShow(7);
_vm->_sequence->startToClose();
return;
} else {
_vm->_animation->appearPed(0, 5);
_vm->_animation->_sprites[0]._facingDir = kDirRight; // added by TT 12/3/1995
_vm->_sequence->firstShow(8);
_vm->_sequence->thenShow(9);
}
break;
case 12:
_vm->_sequence->firstShow(4);
_vm->_sequence->thenShow(5);
_vm->_sequence->thenShow(6);
break;
}
break;
}
_vm->_sequence->thenFlip(whither, ped);
_vm->_sequence->startToOpen();
}
void Avalot::setRoom(byte persId, Room roomId) {
_whereIs[persId - 150] = roomId;
}
Room Avalot::getRoom(byte persId) {
return _whereIs[persId - 150];
}
} // End of namespace Avalanche

View file

@ -240,14 +240,13 @@ public:
// If this is greater than zero, the next line you type is stored in the DNA in a position dictated by the value.
// If a scroll comes up, or you leave the room, it's automatically set to zero.
byte _interrogation;
static byte _whereIs[29];
// Former DNA structure
byte _carryNum; // How many objects you're carrying...
bool _objects[kObjectNum]; // ...and which ones they are.
int16 _dnascore; // your score, of course
int32 _money; // your current amount of dosh
byte _room; // your current room
Room _room; // your current room
byte _roomCount[100]; // Add one to each every time you enter a room
bool _wonNim; // Have you *won* Nim? (That's harder.)
byte _wineState; // 0=good (Notts), 1=passable(Argent) ... 3=vinegar.
@ -297,7 +296,8 @@ public:
byte _nextBell; // For the ringing.
bool _givenPotionToGeida; // Does Geida have the potion?
bool _lustieIsAsleep; // Is BDL asleep?
byte _flipToWhere, _flipToPed; // For the sequencer.
Room _flipToWhere;
byte _flipToPed; // For the sequencer.
bool _beenTiedUp; // In r__Robins.
bool _sittingInPub; // Are you sitting down in the pub?
byte _spurgeTalkCount; // Count for talking to Spurge.
@ -364,7 +364,7 @@ public:
void drawAlsoLines();
void loadRoom(byte num);
void exitRoom(byte x);
void enterRoom(byte room, byte ped);
void enterRoom(Room room, byte ped);
void thinkAbout(byte object, bool type); // Hey!!! Get it and put it!!!
void loadDigits(); // Load the scoring digits & rwlites
void drawToolbar();
@ -411,9 +411,16 @@ public:
Common::String getItem(byte which); // Called get_better in the original.
Common::String f5Does(); // This procedure determines what f5 does.
void openDoor(Room whither, byte ped, byte magicnum); // Handles slidey-open doors.
void flipRoom(Room room, byte ped);
void setRoom(byte persId, Room roomId);
Room getRoom(byte persId);
private:
AvalancheEngine *_vm;
static Room _whereIs[29];
Common::File file;
Common::String readAlsoStringFromFile();
void scram(Common::String &str);

View file

@ -1071,7 +1071,7 @@ void Dialogs::talkTo(byte whom) {
_vm->_avalot->refreshObjectList();
displayScrollChain('q', 1); // Circular from Cardiff.
_vm->_avalot->_talkedToCrapulus = true;
_vm->_avalot->_whereIs[kPeopleCrapulus - 150] = kRoomDummy; // Crapulus walks off.
_vm->_avalot->setRoom(kPeopleCrapulus, kRoomDummy); // Crapulus walks off.
AnimationType *spr = &_vm->_animation->_sprites[1];
spr->_vanishIfStill = true;

View file

@ -452,7 +452,7 @@ void Menu::setupMenuPeople() {
_activeMenuItem.reset();
for (int i = 150; i <= 178; i++) {
if (_vm->_avalot->_whereIs[i - 150] == _vm->_avalot->_room) {
if (_vm->_avalot->getRoom(i) == _vm->_avalot->_room) {
_activeMenuItem.setupOption(_vm->_avalot->getName(i), _vm->_avalot->getNameChar(i), "", true);
people += i;
}
@ -488,7 +488,7 @@ void Menu::setupMenuWith() {
// or (c), the _person you've selected is YOU!
if ((_vm->_avalot->_lastPerson == kPeopleAvalot) || (_vm->_avalot->_lastPerson == _vm->_parser->kNothing)
|| (_vm->_avalot->_whereIs[_vm->_avalot->_lastPerson - 150] != _vm->_avalot->_room))
|| (_vm->_avalot->getRoom(_vm->_avalot->_lastPerson) != _vm->_avalot->_room))
_activeMenuItem.setupOption("Give to...", 'G', "", false); // Not here.
else {
_activeMenuItem.setupOption(Common::String("Give to ") + _vm->_avalot->getName(_vm->_avalot->_lastPerson), 'G', "", true);

View file

@ -929,7 +929,7 @@ void Parser::examineObject() {
}
bool Parser::isPersonHere() { // Person equivalent of "holding".
if ((_person == kPardon) || (_person == 0) || (_vm->_avalot->_whereIs[_person - 150] == _vm->_avalot->_room))
if ((_person == kPardon) || (_person == 0) || (_vm->_avalot->getRoom(_person) == _vm->_avalot->_room))
return true;
else {
Common::String tmpStr;
@ -1107,8 +1107,8 @@ void Parser::swallow() { // Eat something.
void Parser::peopleInRoom() {
byte numPeople = 0; // Number of people in the room.
for (int i = 1; i < 29; i++) { // Start at 1 so we don't list Avvy himself!
if (_vm->_avalot->_whereIs[i] == _vm->_avalot->_room)
for (int i = 151; i < 179; i++) { // Start at 1 so we don't list Avvy himself!
if (_vm->_avalot->getRoom(i) == _vm->_avalot->_room)
numPeople++;
}
@ -1117,8 +1117,8 @@ void Parser::peopleInRoom() {
Common::String tmpStr;
byte actPerson = 0; // Actually listed people.
for (int i = 1; i < 29; i++) {
if (_vm->_avalot->_whereIs[i] == _vm->_avalot->_room) {
for (int i = 151; i < 179; i++) {
if (_vm->_avalot->getRoom(i) == _vm->_avalot->_room) {
actPerson++;
if (actPerson == 1) // First on the list.
tmpStr = _vm->_avalot->getName(i + 150);
@ -1210,7 +1210,7 @@ void Parser::openDoor() {
_vm->_dialogs->displayScrollChain('x', portal->_data);
break;
case Avalot::kMagicTransport:
_vm->_animation->flipRoom((portal->_data) >> 8, portal->_data & 0x0F);
_vm->_avalot->flipRoom((Room)((portal->_data) >> 8), portal->_data & 0x0F);
break;
case Avalot::kMagicUnfinished:
_vm->_animation->_sprites[0].bounce();
@ -1220,7 +1220,7 @@ void Parser::openDoor() {
_vm->_animation->callSpecial(portal->_data);
break;
case Avalot::kMagicOpenDoor:
_vm->_animation->openDoor(portal->_data >> 8, portal->_data & 0x0F, i + 9);
_vm->_avalot->openDoor((Room)(portal->_data >> 8), portal->_data & 0x0F, i + 9);
break;
}
@ -1391,7 +1391,7 @@ void Parser::drink() {
_vm->_avalot->refreshObjectList();
_vm->_avalot->dusk();
_vm->_avalot->hangAroundForAWhile();
_vm->_animation->flipRoom(1, 1);
_vm->_avalot->flipRoom(kRoomYours, 1);
_vm->_avalot->setBackgroundColor(14);
_vm->_animation->_sprites[0]._visible = false;
}
@ -1552,13 +1552,13 @@ void Parser::winSequence() {
Common::String Parser::personSpeaks() {
if ((_person == kPardon) || (_person == 0)) {
if ((_vm->_avalot->_him == kPardon) || (_vm->_avalot->_whereIs[_vm->_avalot->_him - 150] != _vm->_avalot->_room))
if ((_vm->_avalot->_him == kPardon) || (_vm->_avalot->getRoom(_vm->_avalot->_him) != _vm->_avalot->_room))
_person = _vm->_avalot->_her;
else
_person = _vm->_avalot->_him;
}
if (_vm->_avalot->_whereIs[_person - 150] != _vm->_avalot->_room) {
if (_vm->_avalot->getRoom(_person) != _vm->_avalot->_room) {
return Common::String::format("%c1", Dialogs::kControlRegister); // Avvy himself!
}
@ -1923,10 +1923,10 @@ void Parser::doThat() {
case kObjectLute :
_vm->_dialogs->displayScrollChain('U', 7);
if (_vm->_avalot->_whereIs[kPeopleCwytalot - 150] == _vm->_avalot->_room)
if (_vm->_avalot->getRoom(kPeopleCwytalot) == _vm->_avalot->_room)
_vm->_dialogs->displayScrollChain('U', 10);
if (_vm->_avalot->_whereIs[kPeopleDuLustie - 150] == _vm->_avalot->_room)
if (_vm->_avalot->getRoom(kPeopleDuLustie) == _vm->_avalot->_room)
_vm->_dialogs->displayScrollChain('U', 15);
break;
case 52:
@ -1993,7 +1993,7 @@ void Parser::doThat() {
else {
if ((_vm->_avalot->_room == kRoomSpludwicks) & (_vm->_animation->inField(1))) { // Avaricius appears!
_vm->_dialogs->displayScrollChain('q', 17);
if (_vm->_avalot->_whereIs[1] == kRoomSpludwicks)
if (_vm->_avalot->getRoom(kPeopleSpludwick) == kRoomSpludwicks)
_vm->_dialogs->displayScrollChain('q', 18);
else {
Avalanche::AnimationType *spr = &_vm->_animation->_sprites[1];
@ -2143,7 +2143,7 @@ void Parser::doThat() {
case kVerbCodeAttack:
if ((_vm->_avalot->_room == kRoomBrummieRoad) &&
((_person == kPeopleCwytalot) || (_thing == kObjectCrossbow) || (_thing == kObjectBolt)) &&
(_vm->_avalot->_whereIs[kPeopleCwytalot - 150] == _vm->_avalot->_room)) {
(_vm->_avalot->getRoom(kPeopleCwytalot) == _vm->_avalot->_room)) {
switch (_vm->_avalot->_objects[kObjectBolt - 1] + _vm->_avalot->_objects[kObjectCrossbow - 1] * 2) {
// 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both.
case 0:
@ -2167,7 +2167,7 @@ void Parser::doThat() {
_vm->_animation->_sprites[1].walkTo(1);
_vm->_animation->_sprites[1]._vanishIfStill = true;
_vm->_animation->_sprites[1]._callEachStepFl = false;
_vm->_avalot->_whereIs[kPeopleCwytalot - 150] = kRoomDummy;
_vm->_avalot->setRoom(kPeopleCwytalot, kRoomDummy);
break;
default:
_vm->_dialogs->displayScrollChain('Q', 10); // Please try not to be so violent!

View file

@ -57,7 +57,7 @@ void Sequence::thenShow(byte what) {
}
}
void Sequence::thenFlip(byte where, byte ped) {
void Sequence::thenFlip(Room where, byte ped) {
thenShow(kNowFlip);
_vm->_avalot->_flipToWhere = where;
@ -90,7 +90,7 @@ void Sequence::callSequencer() {
break;
case 177: // Flip room.
_vm->_avalot->_userMovesAvvy = true;
_vm->_animation->flipRoom(_vm->_avalot->_flipToWhere, _vm->_avalot->_flipToPed);
_vm->_avalot->flipRoom(_vm->_avalot->_flipToWhere, _vm->_avalot->_flipToPed);
if (curSeq == 177)
shoveLeft();
break;

View file

@ -46,7 +46,7 @@ public:
void firstShow(byte what);
void thenShow(byte what);
void thenFlip(byte where, byte ped);
void thenFlip(Room where, byte ped);
void startToClose();
void startToOpen();
void callSequencer();

View file

@ -324,7 +324,7 @@ void Timer::hangAround() {
AnimationType *avvy = &_vm->_animation->_sprites[0];
avvy->init(7, true, _vm->_animation); // Robin Hood
_vm->_avalot->_whereIs[kPeopleRobinHood - 150] = kRoomRobins;
_vm->_avalot->setRoom(kPeopleRobinHood, kRoomRobins);
_vm->_animation->appearPed(0, 1);
_vm->_dialogs->displayScrollChain('q', 39);
avvy->walkTo(6);
@ -336,7 +336,7 @@ void Timer::hangAround2() {
AnimationType *spr = &_vm->_animation->_sprites[1];
spr->_vanishIfStill = false;
spr->walkTo(3);
_vm->_avalot->_whereIs[kPeopleFriarTuck - 150] = kRoomRobins;
_vm->_avalot->setRoom(kPeopleFriarTuck, kRoomRobins);
_vm->_dialogs->displayScrollChain('q', 41);
_vm->_animation->_sprites[0].remove();
spr->remove(); // Get rid of Robin Hood and Friar Tuck.
@ -351,7 +351,7 @@ void Timer::hangAround2() {
void Timer::afterTheShootemup() {
// Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented!
_vm->_animation->flipRoom(_vm->_avalot->_room, 1);
_vm->_avalot->flipRoom(_vm->_avalot->_room, 1);
_vm->_animation->_sprites[0].init(0, true, _vm->_animation); // Avalot.
_vm->_animation->appearPed(0, 1);
@ -400,7 +400,7 @@ void Timer::jacquesWakesUp() {
case 3 : // Gone through the door.
_vm->_background->drawBackgroundSprite(-1, -1, 1); // Not on the floor, either.
_vm->_background->drawBackgroundSprite(-1, -1, 3); // He's gone... so the door's open.
_vm->_avalot->_whereIs[kPeopleJacques - 150] = 0; // Gone!
_vm->_avalot->setRoom(kPeopleJacques, kRoomNowhere); // Gone!
break;
}