diff options
author | Paul Gilbert | 2006-11-05 06:56:58 +0000 |
---|---|---|
committer | Paul Gilbert | 2006-11-05 06:56:58 +0000 |
commit | 64817e38872684bd4133e4459a40c54dacedd612 (patch) | |
tree | 070b3f80e4313a42d46fb86355cbf8f7fdb85271 | |
parent | a2abbf919df8a07df872d69f75d372579bbe271a (diff) | |
download | scummvm-rg350-64817e38872684bd4133e4459a40c54dacedd612.tar.gz scummvm-rg350-64817e38872684bd4133e4459a40c54dacedd612.tar.bz2 scummvm-rg350-64817e38872684bd4133e4459a40c54dacedd612.zip |
Added display of the two special between room animations: falling down the chute and hiding in the barrel
svn-id: r24623
-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 |