diff options
author | Paul Gilbert | 2007-07-26 10:11:31 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-07-26 10:11:31 +0000 |
commit | cfff436ca7b294557f0833044c2751c37a4853da (patch) | |
tree | 51a441291bfcbd146ab4738a5f5a49f7b1891fcc /engines/lure/game.cpp | |
parent | 872a1ea36970af4a5440b81ac434a4e109e9cc51 (diff) | |
download | scummvm-rg350-cfff436ca7b294557f0833044c2751c37a4853da.tar.gz scummvm-rg350-cfff436ca7b294557f0833044c2751c37a4853da.tar.bz2 scummvm-rg350-cfff436ca7b294557f0833044c2751c37a4853da.zip |
Added proper room change fading effect
svn-id: r28212
Diffstat (limited to 'engines/lure/game.cpp')
-rw-r--r-- | engines/lure/game.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index 3ac25f83b8..5bffc6ade8 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -52,7 +52,7 @@ Game::~Game() { delete _debugger; } -void Game::tick() { +void Game::tick(bool fastSpeed) { // Call the tick method for each hotspot - this is somewaht complicated // by the fact that a tick proc can unload both itself and/or others, // so we first get a list of the Ids, and call the tick proc for each @@ -65,7 +65,11 @@ void Game::tick() { int idSize = 0; for (i = res.activeHotspots().begin(); i != res.activeHotspots().end(); ++i) { Hotspot *hotspot = *i; - idList[idSize++] = hotspot->hotspotId(); + + if (!fastSpeed || ((hotspot->layer() != 0xff) && + (hotspot->hotspotId() < FIRST_NONCHARACTER_ID))) + // Add hotspot to list to execute + idList[idSize++] = hotspot->hotspotId(); } debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot ticks begin"); @@ -289,6 +293,7 @@ void Game::playerChangeRoom() { uint16 roomNum = fields.playerNewPos().roomNumber; fields.playerNewPos().roomNumber = 0; Point &newPos = fields.playerNewPos().position; + delayList.clear(); RoomData *roomData = res.getRoom(roomNum); @@ -302,7 +307,9 @@ void Game::playerChangeRoom() { displayChuteAnimation(); else if (animFlag != 0) displayBarrelAnimation(); + fields.setField(ROOM_EXIT_ANIMATION, 0); + roomData->exitTime = g_system->getMillis(); // Change to the new room Hotspot *player = res.getActiveHotspot(PLAYER_ID); |