aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/engine.cpp3
-rw-r--r--engines/mohawk/myst_scripts.cpp9
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp18
-rw-r--r--engines/mohawk/myst_stacks/mechanical.h11
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp2
-rw-r--r--engines/mohawk/riven_graphics.cpp4
-rw-r--r--engines/scumm/akos.cpp9
7 files changed, 41 insertions, 15 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 8f412ba911..99f2713b7f 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -259,11 +259,12 @@ void splashScreen() {
logo->free();
delete logo;
+ g_system->updateScreen();
+
// Delay 0.6 secs
uint time0 = g_system->getMillis();
Common::Event event;
while (time0 + 600 > g_system->getMillis()) {
- g_system->updateScreen();
(void)g_system->getEventManager()->pollEvent(event);
g_system->delayMillis(10);
}
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index a2a0c5e171..aac0bd30bf 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -561,6 +561,15 @@ void MystScriptParser::o_toggleAreasActivation(uint16 var, const ArgumentsArray
void MystScriptParser::o_playSound(uint16 var, const ArgumentsArray &args) {
uint16 soundId = args[0];
+ // WORKAROUND: In the Myst age, when in front of the cabin coming from the left
+ // with the door open, when trying to go left, a script tries to play a sound
+ // with id 4197. That sound does not exist in the game archives. However, when
+ // going right another script plays a door closing sound with id 4191.
+ // Here, we replace the incorrect sound id with a proper one.
+ if (soundId == 4197) {
+ soundId = 4191;
+ }
+
_vm->_sound->playEffect(soundId);
}
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index 2481ca66e7..226be6b052 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -56,7 +56,7 @@ Mechanical::Mechanical(MohawkEngine_Myst *vm) :
_crystalLit = 0;
_mystStaircaseState = false;
- _fortressPosition = 0;
+ _fortressDirection = kSouth;
_gearsWereRunning = false;
_fortressRotationShortMovieWorkaround = false;
@@ -183,9 +183,9 @@ uint16 Mechanical::getVar(uint16 var) {
case 4: // Myst Book Room Staircase State
return _mystStaircaseState;
case 5: // Fortress Position
- return _fortressPosition;
+ return _fortressDirection;
case 6: // Fortress Position - Big Cog Visible Through Doorway
- return _fortressPosition == 0;
+ return _fortressDirection == kSouth;
case 7: // Fortress Elevator Open
if (_state.elevatorRotation == 4)
return 1; // Open
@@ -645,7 +645,7 @@ void Mechanical::o_fortressRotationSetPosition(uint16 var, const ArgumentsArray
moviePosition += 3600 * _fortressRotationShortMovieCount;
}
- _fortressPosition = (moviePosition + 900) / 1800 % 4;
+ _fortressDirection = (moviePosition + 900) / 1800 % 4;
// Stop the gears video so that it does not play while the elevator is going up
_fortressRotationGears->getVideo()->stop();
@@ -803,17 +803,17 @@ void Mechanical::fortressRotation_run() {
_gearsWereRunning = true;
} else if (_gearsWereRunning) {
// The fortress has stopped. Set its new position
- _fortressPosition = (moviePosition + 900) / 1800 % 4;
+ _fortressDirection = (moviePosition + 900) / 1800 % 4;
gears->setRate(0);
if (!_fortressRotationShortMovieWorkaround) {
- gears->seek(Audio::Timestamp(0, 1800 * _fortressPosition, 600));
+ gears->seek(Audio::Timestamp(0, 1800 * _fortressDirection, 600));
} else {
- gears->seek(Audio::Timestamp(0, 1800 * (_fortressPosition % 2), 600));
+ gears->seek(Audio::Timestamp(0, 1800 * (_fortressDirection % 2), 600));
}
- _vm->playSoundBlocking(_fortressRotationSounds[_fortressPosition]);
+ _vm->playSoundBlocking(_fortressRotationSounds[_fortressDirection]);
_gearsWereRunning = false;
}
@@ -824,7 +824,7 @@ void Mechanical::o_fortressRotation_init(uint16 var, const ArgumentsArray &args)
VideoEntryPtr gears = _fortressRotationGears->playMovie();
gears->setLooping(true);
- gears->seek(Audio::Timestamp(0, 1800 * _fortressPosition, 600));
+ gears->seek(Audio::Timestamp(0, 1800 * _fortressDirection, 600));
gears->setRate(0);
_fortressRotationSounds[0] = args[0];
diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h
index 52cd7e7732..6b3ff40f8d 100644
--- a/engines/mohawk/myst_stacks/mechanical.h
+++ b/engines/mohawk/myst_stacks/mechanical.h
@@ -57,6 +57,13 @@ private:
void fortressRotation_run();
void fortressSimulation_run();
+ enum Direction {
+ kSouth = 0, // Starting Island with Myst linking book
+ kEast = 1, // Island with right half of code
+ kNorth = 2, // Island with left half of code
+ kWest = 3 // No island, just water
+ };
+
DECLARE_OPCODE(o_throneEnablePassage);
DECLARE_OPCODE(o_birdCrankStart);
DECLARE_OPCODE(o_birdCrankStop);
@@ -80,7 +87,7 @@ private:
DECLARE_OPCODE(o_elevatorWindowMovie);
DECLARE_OPCODE(o_elevatorGoMiddle);
DECLARE_OPCODE(o_elevatorTopMovie);
- DECLARE_OPCODE(o_fortressRotationSetPosition);
+ DECLARE_OPCODE(o_fortressRotationSetPosition); // Rotator control button (above elevator) has been pressed
DECLARE_OPCODE(o_mystStaircaseMovie);
DECLARE_OPCODE(o_elevatorWaitTimeout);
DECLARE_OPCODE(o_crystalEnterYellow);
@@ -107,7 +114,7 @@ private:
bool _gearsWereRunning;
uint16 _fortressRotationSpeed; // 78
uint16 _fortressRotationBrake; // 80
- uint16 _fortressPosition; // 82
+ uint16 _fortressDirection; // 82
uint16 _fortressRotationSounds[4]; // 86 to 92
MystAreaVideo *_fortressRotationGears; // 172
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 481a6247be..0cb0f05a36 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -1862,7 +1862,7 @@ void Myst::o_observatoryGoButton(uint16 var, const ArgumentsArray &args) {
while (end > _vm->getTotalPlayTime()) {
_vm->wait(50);
- observatoryUpdateVisualizer(_vm->_rnd->getRandomNumber(409), _vm->_rnd->getRandomNumber(409));
+ observatoryUpdateVisualizer(_vm->_rnd->getRandomNumber(406), _vm->_rnd->getRandomNumber(406));
_vm->redrawResource(_observatoryVisualizer);
}
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp
index d4ea8fc703..e19a56da92 100644
--- a/engines/mohawk/riven_graphics.cpp
+++ b/engines/mohawk/riven_graphics.cpp
@@ -823,8 +823,8 @@ void FliesEffect::initFlies(uint16 count) {
}
void FliesEffect::initFlyRandomPosition(uint index) {
- int posX = _vm->_rnd->getRandomNumber(_gameRect.right - 3);
- int posY = _vm->_rnd->getRandomNumber(_gameRect.bottom - 3);
+ int posX = _vm->_rnd->getRandomNumber(_gameRect.right - 4);
+ int posY = _vm->_rnd->getRandomNumber(_gameRect.bottom - 4);
if (posY < 100) {
posY = 100;
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 6d80315ccb..3d98a7b9b2 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -1632,6 +1632,15 @@ bool ScummEngine_v6::akos_increaseAnim(Actor *a, int chan, const byte *aksq, con
case AKC_Jump:
curpos = GUW(2);
+
+ // WORKAROUND bug #3813: In the German version of SPY Fox 3: Operation Ozone
+ // the wig maker room 21 contains a costume animation 352 of an LED ticker
+ // with a jump to an erroneous position 846.
+ // To prevent an undefined 'uSweat token' the animation is reset to its start.
+ if (_game.id == GID_HEGAME && _language == Common::DE_DEU && \
+ _currentRoom == 21 && a->_costume == 352 && curpos == 846) {
+ curpos = a->_cost.start[chan];
+ }
break;
case AKC_Return: