diff options
-rw-r--r-- | engines/lure/game.cpp | 25 | ||||
-rw-r--r-- | engines/lure/luredefs.h | 6 |
2 files changed, 31 insertions, 0 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index a7be42487a..3096c6182d 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -251,8 +251,11 @@ void Game::handleMenuResponse(uint8 selection) { } void Game::playerChangeRoom() { + OSystem &system = System::getReference(); Resources &res = Resources::getReference(); + Screen &screen = Screen::getReference(); Room &room = Room::getReference(); + Mouse &mouse = Mouse::getReference(); ValueTableData &fields = res.fieldList(); SequenceDelayList &delayList = Resources::getReference().delayList(); @@ -265,6 +268,28 @@ void Game::playerChangeRoom() { assert(roomData); roomData->flags |= HOTSPOTFLAG_FOUND; + // Check for any room change animation + + int animFlag = fields.getField(ROOM_EXIT_ANIMATION); + if (animFlag == 1) + { + Palette palette(CHUTE_PALETTE_ID); + AnimationSequence *anim = new AnimationSequence(screen, system, + CHUTE_ANIM_ID, palette, false); + mouse.cursorOff(); + anim->show(); + mouse.cursorOn(); + } else if (animFlag != 0) + { + Palette palette(BARREL_PALETTE_ID); + AnimationSequence *anim = new AnimationSequence(screen, system, + BARREL_ANIM_ID, palette, false); + mouse.cursorOff(); + anim->show(); + mouse.cursorOn(); + } + + // Change to the new room Hotspot *player = res.getActiveHotspot(PLAYER_ID); player->currentActions().clear(); player->setRoomNumber(roomNum); diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h index 1462d9e94e..b24f5d4814 100644 --- a/engines/lure/luredefs.h +++ b/engines/lure/luredefs.h @@ -115,6 +115,12 @@ enum Action { // Palette and animation for Skorl catching player #define SKORL_CATCH_PALETTE_ID 0x4060 #define SKORL_CATCH_ANIM_ID 0x4061 +// Palette and animation for chute animation +#define CHUTE_PALETTE_ID 0x404C +#define CHUTE_ANIM_ID 0x404D +// Palette and animation for hiding in barrel +#define BARREL_PALETTE_ID 0xE9F0 +#define BARREL_ANIM_ID 0xE9F1 // Specifies the maximum buffer sized allocated for decoding animation data #define MAX_ANIM_DECODER_BUFFER_SIZE 300000 |