aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/game.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2006-11-05 06:56:58 +0000
committerPaul Gilbert2006-11-05 06:56:58 +0000
commit64817e38872684bd4133e4459a40c54dacedd612 (patch)
tree070b3f80e4313a42d46fb86355cbf8f7fdb85271 /engines/lure/game.cpp
parenta2abbf919df8a07df872d69f75d372579bbe271a (diff)
downloadscummvm-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
Diffstat (limited to 'engines/lure/game.cpp')
-rw-r--r--engines/lure/game.cpp25
1 files changed, 25 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);