diff options
author | Martin Kiewitz | 2017-02-10 19:43:16 +0100 |
---|---|---|
committer | Martin Kiewitz | 2017-02-10 19:43:16 +0100 |
commit | eeaddfb20aa3e03aaa5f5bffe54178b046489661 (patch) | |
tree | bf533877112b9a56e542e5e6f033f516e2ecb7ba /engines | |
parent | 4872c0dadf72e9bb20db21651240692c7674a01d (diff) | |
download | scummvm-rg350-eeaddfb20aa3e03aaa5f5bffe54178b046489661.tar.gz scummvm-rg350-eeaddfb20aa3e03aaa5f5bffe54178b046489661.tar.bz2 scummvm-rg350-eeaddfb20aa3e03aaa5f5bffe54178b046489661.zip |
AGI: Make MH1 nightclub arcade sequence slower for AppleIIgs
Thanks waltervn for pointing this issue out
AppleIIgs adjustment tables had to be extended, because the first
3 arcade sequences were running way too fast, while the last one
ran fine and all of those are part of one single room.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/appleIIgs_timedelay_overwrite.h | 54 | ||||
-rw-r--r-- | engines/agi/cycle.cpp | 17 | ||||
-rw-r--r-- | engines/agi/picture.h | 2 |
3 files changed, 41 insertions, 32 deletions
diff --git a/engines/agi/appleIIgs_timedelay_overwrite.h b/engines/agi/appleIIgs_timedelay_overwrite.h index c24d7cb5bd..06b94bf3fc 100644 --- a/engines/agi/appleIIgs_timedelay_overwrite.h +++ b/engines/agi/appleIIgs_timedelay_overwrite.h @@ -28,46 +28,50 @@ namespace Agi { struct AgiAppleIIgsDelayOverwriteRoomEntry { int16 fromRoom; int16 toRoom; - int16 timeDelayOverwrite; // time delay here is like on PC, so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles - bool onlyWhenPlayerNotInControl; + int16 activePictureNr; // resource number of current active background picture + int16 timeDelayOverwrite; // time delay here is like on PC + // so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles, -1 means do not touch speed set by scripts + bool onlyWhenPlayerNotInControl; // only sets spee, when play is not in control }; struct AgiAppleIIgsDelayOverwriteGameEntry { uint32 gameId; - int16 defaultTimeDelayOverwrite; // time delay here is like on PC, so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles - const AgiAppleIIgsDelayOverwriteRoomEntry *roomTable; + int16 defaultTimeDelayOverwrite; // time delay here is like on PC + // so 0 - unlimited, 1 - 20 cycles, 2 - 10 cycles, -1 means do not touch speed set by scripts + const AgiAppleIIgsDelayOverwriteRoomEntry *roomTable; // pointer to room table (optional) }; static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteKQ4[] = { - { 120, 121, -1, true }, // Part of the intro: Graham gets his hat, throws it and breaks down, don't touch speed (3 is set) - { 128, 128, -1, true }, // Part of the intro: first actual room for gameplay, but during intro, don't touch speed (3 is set) - { 92, 92, -1, true }, // Part of caught by gargoyle w/ Lolotte cutscene (3 is set) + { 120, 121, -1, -1, true }, // Part of the intro: Graham gets his hat, throws it and breaks down, don't touch speed (3 is set) + { 128, 128, -1, -1, true }, // Part of the intro: first actual room for gameplay, but during intro, don't touch speed (3 is set) + { 92, 92, -1, -1, true }, // Part of caught by gargoyle w/ Lolotte cutscene (3 is set) // room 54 sets the speed for a short time to 3 right after entering "clean" command. It doesn't seem to hurt that we switch it down to 2 // room 92 is dual use, part of cutscenes, part of gameplay, that's why we only stop touching it, when player is not in control - { 135, 135, -1, true }, // Part of ending cutscene. Don't touch speed (3 is set) - { -1, -1, -1, false } + { 135, 135, -1, -1, true }, // Part of ending cutscene. Don't touch speed (3 is set) + { -1, -1, -1, -1, false } }; static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteMH1[] = { - //{ 153, 153, 2, false }, // Intro w/ credits - //{ 104, 104, 2, false }, // Intro cutscene - //{ 117, 117, 2, false }, // Intro cutscene (ego waking up) - { 114, 114, -1, false }, // interactive MAD map - { 124, 125, -1, false }, // MAD during intro (tracking), seem to work properly at given speed - { 132, 133, -1, false }, // MAD day 2 intro (tracking) - { 137, 137, -1, false }, // Night Club 4th arcade game - game sets speed to 7 - { 115, 116, -1, false }, // MAD day 3 intro (tracking) - { 148, 148, -1, false }, // day 3: arcade sequence under pawn shop (game sets speed to 6) - { 103, 103, -1, false }, // MAD day 4 intro (tracking) - { 105, 105, -1, false }, // day 4 tracking mini game right at the start (game sets speed to 3) - { 107, 107, -1, false }, // MAD day 4 intro (tracking) - { 112, 112, -1, false }, // MAD day 4 intro (tracking) - { -1, -1, -1, false } + //{ 153, 153, -1, 2, false }, // Intro w/ credits + //{ 104, 104, -1, 2, false }, // Intro cutscene + //{ 117, 117, -1, 2, false }, // Intro cutscene (ego waking up) + { 114, 114, -1, -1, false }, // interactive MAD map + { 124, 125, -1, -1, false }, // MAD during intro (tracking), seem to work properly at given speed + { 132, 133, -1, -1, false }, // MAD day 2 intro (tracking) + { 137, 137, 17, -1, false }, // Night Club 4th arcade game - game sets speed to 7, needs to run that slow to be playable + { 137, 137, -1, 4, false }, // Night Club first few arcade games - game sets speed to 0, we need to fix it + { 115, 116, -1, -1, false }, // MAD day 3 intro (tracking) + { 148, 148, -1, -1, false }, // day 3: arcade sequence under pawn shop (game sets speed to 6) + { 103, 103, -1, -1, false }, // MAD day 4 intro (tracking) + { 105, 105, -1, -1, false }, // day 4 tracking mini game right at the start (game sets speed to 3) + { 107, 107, -1, -1, false }, // MAD day 4 intro (tracking) + { 112, 112, -1, -1, false }, // MAD day 4 intro (tracking) + { -1, -1, -1, -1, false } }; static const AgiAppleIIgsDelayOverwriteRoomEntry appleIIgsDelayOverwriteSQ2[] = { - { 1, 1, -1, false }, // Intro: space ship entering space port, don't touch speed - { -1, -1, -1, false } + { 1, 1, -1, -1, false }, // Intro: space ship entering space port, don't touch speed + { -1, -1, -1, -1, false } }; static const AgiAppleIIgsDelayOverwriteGameEntry appleIIgsDelayOverwriteGameTable[] = { diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 4148306de2..d09a9501d6 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -377,19 +377,22 @@ int AgiEngine::playGame() { // Now check, if we got a time delay overwrite entry for current room if (appleIIgsDelayOverwrite->roomTable) { byte curRoom = getVar(VM_VAR_CURRENT_ROOM); + int16 curPictureNr = _picture->getResourceNr(); appleIIgsDelayRoomOverwrite = appleIIgsDelayOverwrite->roomTable; while (appleIIgsDelayRoomOverwrite->fromRoom >= 0) { if ((appleIIgsDelayRoomOverwrite->fromRoom <= curRoom) && (appleIIgsDelayRoomOverwrite->toRoom >= curRoom)) { - if (appleIIgsDelayRoomOverwrite->onlyWhenPlayerNotInControl) { - if (_game.playerControl) { - // Player is actually currently in control? -> then skip this entry - appleIIgsDelayRoomOverwrite++; - continue; + if ((appleIIgsDelayRoomOverwrite->activePictureNr == curPictureNr) || (appleIIgsDelayRoomOverwrite->activePictureNr == -1)) { + if (appleIIgsDelayRoomOverwrite->onlyWhenPlayerNotInControl) { + if (_game.playerControl) { + // Player is actually currently in control? -> then skip this entry + appleIIgsDelayRoomOverwrite++; + continue; + } } + timeDelayOverwrite = appleIIgsDelayRoomOverwrite->timeDelayOverwrite; + break; } - timeDelayOverwrite = appleIIgsDelayRoomOverwrite->timeDelayOverwrite; - break; } appleIIgsDelayRoomOverwrite++; } diff --git a/engines/agi/picture.h b/engines/agi/picture.h index dfc505d8d0..2cb5bfabc8 100644 --- a/engines/agi/picture.h +++ b/engines/agi/picture.h @@ -64,6 +64,8 @@ class PictureMgr { public: PictureMgr(AgiBase *agi, GfxMgr *gfx); + int16 getResourceNr() { return _resourceNr; }; + private: void draw_xCorner(bool skipOtherCoords = false); void yCorner(bool skipOtherCoords = false); |