aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2007-01-31 02:34:55 +0000
committerPaul Gilbert2007-01-31 02:34:55 +0000
commita83be36a978d9225294079898e846cd7610ea20c (patch)
treed1a65653b2f16585b7e47360170a1758a86c68aa /engines
parent33707d6e42df7eca0fcf842daae6615155d9b60e (diff)
downloadscummvm-rg350-a83be36a978d9225294079898e846cd7610ea20c.tar.gz
scummvm-rg350-a83be36a978d9225294079898e846cd7610ea20c.tar.bz2
scummvm-rg350-a83be36a978d9225294079898e846cd7610ea20c.zip
Expanded the chute animation to display the full sequence as the player leaves the dungeon
svn-id: r25302
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/game.cpp70
-rw-r--r--engines/lure/game.h2
2 files changed, 53 insertions, 19 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 3096c6182d..e436442776 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -251,11 +251,8 @@ 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();
@@ -272,22 +269,10 @@ void Game::playerChangeRoom() {
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();
- }
+ displayChuteAnimation();
+ else if (animFlag != 0)
+ displayBarrelAnimation();
+ fields.setField(ROOM_EXIT_ANIMATION, 0);
// Change to the new room
Hotspot *player = res.getActiveHotspot(PLAYER_ID);
@@ -299,6 +284,53 @@ void Game::playerChangeRoom() {
room.setRoomNumber(roomNum, false);
}
+void Game::displayChuteAnimation()
+{
+ OSystem &system = System::getReference();
+ Resources &res = Resources::getReference();
+ Screen &screen = Screen::getReference();
+ Mouse &mouse = Mouse::getReference();
+
+ ValueTableData &fields = res.fieldList();
+ Palette palette(CHUTE_PALETTE_ID);
+
+ debugC(ERROR_INTERMEDIATE, kLureDebugAnimations, "Starting chute animation");
+ mouse.cursorOff();
+
+ AnimationSequence *anim = new AnimationSequence(screen, system,
+ CHUTE_ANIM_ID, palette, false);
+ anim->show();
+ delete anim;
+
+ anim = new AnimationSequence(screen, system, CHUTE2_ANIM_ID,
+ palette, false);
+ anim->show();
+ delete anim;
+
+ anim = new AnimationSequence(screen, system, CHUTE3_ANIM_ID,
+ palette, false);
+ anim->show();
+ delete anim;
+
+ mouse.cursorOn();
+ fields.setField(82, 1);
+}
+
+void Game::displayBarrelAnimation()
+{
+ OSystem &system = System::getReference();
+ Screen &screen = Screen::getReference();
+ Mouse &mouse = Mouse::getReference();
+
+ debugC(ERROR_INTERMEDIATE, kLureDebugAnimations, "Starting barrel animation");
+ Palette palette(BARREL_PALETTE_ID);
+ AnimationSequence *anim = new AnimationSequence(screen, system,
+ BARREL_ANIM_ID, palette, false);
+ mouse.cursorOff();
+ anim->show();
+ mouse.cursorOn();
+}
+
void Game::handleClick() {
Resources &res = Resources::getReference();
Room &room = Room::getReference();
diff --git a/engines/lure/game.h b/engines/lure/game.h
index a8960ee580..8858b3a70b 100644
--- a/engines/lure/game.h
+++ b/engines/lure/game.h
@@ -52,6 +52,8 @@ private:
void doAction(Action action, uint16 hotspotId, uint16 usedId);
void playerChangeRoom();
+ void displayChuteAnimation();
+ void displayBarrelAnimation();
void handleBootParam(int value);
public:
Game();