[Scummvm-git-logs] scummvm master -> 0ff7abe060a6cfd99e50fa124f3eda64521a36a3
neuromancer
noreply at scummvm.org
Tue Aug 13 11:22:16 UTC 2024
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ce4228d82a FREESCAPE: removed scopes in action code
0e44b878e4 FREESCAPE: added proper loading of sounds for one of the eclipse zx demos
460e41a5fe FREESCAPE: fixed corner case in setColorMap
650bd105a6 FREESCAPE: added more sound index in driller and dark
0ff7abe060 FREESCAPE: added more sound index variables for the common end games
Commit: ce4228d82aa42f77abb4a7844bfc46bb053273f1
https://github.com/scummvm/scummvm/commit/ce4228d82aa42f77abb4a7844bfc46bb053273f1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-13T13:23:34+02:00
Commit Message:
FREESCAPE: removed scopes in action code
Changed paths:
engines/freescape/games/dark/dark.cpp
engines/freescape/games/driller/driller.cpp
engines/freescape/games/eclipse/eclipse.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 3aac485231f..3b7f80ecb2a 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -171,73 +171,70 @@ void DarkEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *infoS
FreescapeEngine::initKeymaps(engineKeyMap, infoScreenKeyMap, target);
Common::Action *act;
- {
- act = new Common::Action("SAVE", _("Save Game"));
- act->setCustomEngineActionEvent(kActionSave);
- act->addDefaultInputMapping("s");
- infoScreenKeyMap->addAction(act);
+ act = new Common::Action("SAVE", _("Save Game"));
+ act->setCustomEngineActionEvent(kActionSave);
+ act->addDefaultInputMapping("s");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("LOAD", _("Load Game"));
+ act->setCustomEngineActionEvent(kActionLoad);
+ act->addDefaultInputMapping("l");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("QUIT", _("Quit Game"));
+ act->setCustomEngineActionEvent(kActionEscape);
+ if (isSpectrum())
+ act->addDefaultInputMapping("1");
+ else
+ act->addDefaultInputMapping("ESCAPE");
- act = new Common::Action("LOAD", _("Load Game"));
- act->setCustomEngineActionEvent(kActionLoad);
- act->addDefaultInputMapping("l");
- infoScreenKeyMap->addAction(act);
+ infoScreenKeyMap->addAction(act);
- act = new Common::Action("QUIT", _("Quit Game"));
- act->setCustomEngineActionEvent(kActionEscape);
- if (isSpectrum())
- act->addDefaultInputMapping("1");
- else
- act->addDefaultInputMapping("ESCAPE");
+ if (!(isAmiga() || isAtariST())) {
+ act = new Common::Action("TOGGLESOUND", _("Toggle Sound"));
+ act->setCustomEngineActionEvent(kActionToggleSound);
+ act->addDefaultInputMapping("t");
infoScreenKeyMap->addAction(act);
-
- if (!(isAmiga() || isAtariST())) {
- act = new Common::Action("TOGGLESOUND", _("Toggle Sound"));
- act->setCustomEngineActionEvent(kActionToggleSound);
- act->addDefaultInputMapping("t");
- infoScreenKeyMap->addAction(act);
- }
}
- {
- act = new Common::Action("ROTL", _("Rotate Left"));
- act->setCustomEngineActionEvent(kActionRotateLeft);
- act->addDefaultInputMapping("q");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("ROTR", _("Rotate Right"));
- act->setCustomEngineActionEvent(kActionRotateRight);
- act->addDefaultInputMapping("w");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("INCSTEPSIZE", _("Increase Step Size"));
- act->setCustomEngineActionEvent(kActionIncreaseStepSize);
- act->addDefaultInputMapping("s");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("DECSTEPSIZE", _("Decrease Step Size"));
- act->setCustomEngineActionEvent(kActionDecreaseStepSize);
- act->addDefaultInputMapping("x");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("RISE", _("Rise/Fly up"));
- act->setCustomEngineActionEvent(kActionRiseOrFlyUp);
- act->addDefaultInputMapping("JOY_B");
- act->addDefaultInputMapping("r");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("LOWER", _("Lower/Fly down"));
- act->setCustomEngineActionEvent(kActionLowerOrFlyDown);
- act->addDefaultInputMapping("JOY_Y");
- act->addDefaultInputMapping("f");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("JETPACK", _("Enable/Disable Jetpack"));
- act->setCustomEngineActionEvent(kActionToggleFlyMode);
- act->addDefaultInputMapping("JOY_LEFT_SHOULDER");
- act->addDefaultInputMapping("JOY_RIGHT_SHOULDER");
- act->addDefaultInputMapping("j");
- engineKeyMap->addAction(act);
- }
+ act = new Common::Action("ROTL", _("Rotate Left"));
+ act->setCustomEngineActionEvent(kActionRotateLeft);
+ act->addDefaultInputMapping("q");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("ROTR", _("Rotate Right"));
+ act->setCustomEngineActionEvent(kActionRotateRight);
+ act->addDefaultInputMapping("w");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("INCSTEPSIZE", _("Increase Step Size"));
+ act->setCustomEngineActionEvent(kActionIncreaseStepSize);
+ act->addDefaultInputMapping("s");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("DECSTEPSIZE", _("Decrease Step Size"));
+ act->setCustomEngineActionEvent(kActionDecreaseStepSize);
+ act->addDefaultInputMapping("x");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("RISE", _("Rise/Fly up"));
+ act->setCustomEngineActionEvent(kActionRiseOrFlyUp);
+ act->addDefaultInputMapping("JOY_B");
+ act->addDefaultInputMapping("r");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("LOWER", _("Lower/Fly down"));
+ act->setCustomEngineActionEvent(kActionLowerOrFlyDown);
+ act->addDefaultInputMapping("JOY_Y");
+ act->addDefaultInputMapping("f");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("JETPACK", _("Enable/Disable Jetpack"));
+ act->setCustomEngineActionEvent(kActionToggleFlyMode);
+ act->addDefaultInputMapping("JOY_LEFT_SHOULDER");
+ act->addDefaultInputMapping("JOY_RIGHT_SHOULDER");
+ act->addDefaultInputMapping("j");
+ engineKeyMap->addAction(act);
}
void DarkEngine::initGameState() {
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index f1f7e6fe18f..73312a0d6e0 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -135,51 +135,49 @@ void DrillerEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *in
infoScreenKeyMap->addAction(act);
}
- {
- act = new Common::Action("ROTL", _("Rotate Left"));
- act->setCustomEngineActionEvent(kActionRotateLeft);
- act->addDefaultInputMapping("q");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("ROTR", _("Rotate Right"));
- act->setCustomEngineActionEvent(kActionRotateRight);
- act->addDefaultInputMapping("w");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("INCSTEPSIZE", _("Increase Step Size"));
- act->setCustomEngineActionEvent(kActionIncreaseStepSize);
- act->addDefaultInputMapping("s");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("DECSTEPSIZE", _("Decrease Step Size"));
- act->setCustomEngineActionEvent(kActionDecreaseStepSize);
- act->addDefaultInputMapping("x");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("RISE", _("Rise/Fly up"));
- act->setCustomEngineActionEvent(kActionRiseOrFlyUp);
- act->addDefaultInputMapping("JOY_B");
- act->addDefaultInputMapping("r");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("LOWER", _("Lower/Fly down"));
- act->setCustomEngineActionEvent(kActionLowerOrFlyDown);
- act->addDefaultInputMapping("JOY_Y");
- act->addDefaultInputMapping("f");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("DEPLOY", _("Deploy drilling rig"));
- act->setCustomEngineActionEvent(kActionDeployDrillingRig);
- act->addDefaultInputMapping("JOY_LEFT_SHOULDER");
- act->addDefaultInputMapping("d");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("COLLECT", _("Collect drilling rig"));
- act->setCustomEngineActionEvent(kActionCollectDrillingRig);
- act->addDefaultInputMapping("c");
- act->addDefaultInputMapping("JOY_RIGHT_SHOULDER");
- engineKeyMap->addAction(act);
- }
+ act = new Common::Action("ROTL", _("Rotate Left"));
+ act->setCustomEngineActionEvent(kActionRotateLeft);
+ act->addDefaultInputMapping("q");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("ROTR", _("Rotate Right"));
+ act->setCustomEngineActionEvent(kActionRotateRight);
+ act->addDefaultInputMapping("w");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("INCSTEPSIZE", _("Increase Step Size"));
+ act->setCustomEngineActionEvent(kActionIncreaseStepSize);
+ act->addDefaultInputMapping("s");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("DECSTEPSIZE", _("Decrease Step Size"));
+ act->setCustomEngineActionEvent(kActionDecreaseStepSize);
+ act->addDefaultInputMapping("x");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("RISE", _("Rise/Fly up"));
+ act->setCustomEngineActionEvent(kActionRiseOrFlyUp);
+ act->addDefaultInputMapping("JOY_B");
+ act->addDefaultInputMapping("r");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("LOWER", _("Lower/Fly down"));
+ act->setCustomEngineActionEvent(kActionLowerOrFlyDown);
+ act->addDefaultInputMapping("JOY_Y");
+ act->addDefaultInputMapping("f");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("DEPLOY", _("Deploy drilling rig"));
+ act->setCustomEngineActionEvent(kActionDeployDrillingRig);
+ act->addDefaultInputMapping("JOY_LEFT_SHOULDER");
+ act->addDefaultInputMapping("d");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("COLLECT", _("Collect drilling rig"));
+ act->setCustomEngineActionEvent(kActionCollectDrillingRig);
+ act->addDefaultInputMapping("c");
+ act->addDefaultInputMapping("JOY_RIGHT_SHOULDER");
+ engineKeyMap->addAction(act);
}
void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 2b210727029..be277d5bb55 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -173,67 +173,63 @@ void EclipseEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *in
FreescapeEngine::initKeymaps(engineKeyMap, infoScreenKeyMap, target);
Common::Action *act;
- {
- act = new Common::Action("SAVE", _("Save Game"));
- act->setCustomEngineActionEvent(kActionSave);
- act->addDefaultInputMapping("s");
- infoScreenKeyMap->addAction(act);
-
- act = new Common::Action("LOAD", _("Load Game"));
- act->setCustomEngineActionEvent(kActionLoad);
- act->addDefaultInputMapping("l");
- infoScreenKeyMap->addAction(act);
-
- act = new Common::Action("QUIT", _("Quit Game"));
- act->setCustomEngineActionEvent(kActionEscape);
- if (isSpectrum())
- act->addDefaultInputMapping("1");
- else
- act->addDefaultInputMapping("ESCAPE");
- infoScreenKeyMap->addAction(act);
-
- act = new Common::Action("TOGGLESOUND", _("Toggle Sound"));
- act->setCustomEngineActionEvent(kActionToggleSound);
- act->addDefaultInputMapping("t");
- infoScreenKeyMap->addAction(act);
- }
-
- {
- act = new Common::Action("ROTL", _("Rotate Left"));
- act->setCustomEngineActionEvent(kActionRotateLeft);
- act->addDefaultInputMapping("q");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("ROTR", _("Rotate Right"));
- act->setCustomEngineActionEvent(kActionRotateRight);
- act->addDefaultInputMapping("w");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("CHNGANGLE", _("Change Angle"));
- act->setCustomEngineActionEvent(kActionChangeAngle);
- act->addDefaultInputMapping("a");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("CHNGSTEPSIZE", _("Change Step Size"));
- act->setCustomEngineActionEvent(kActionChangeStepSize);
- act->addDefaultInputMapping("s");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("TGGLHEIGHT", _("Toggle Height"));
- act->setCustomEngineActionEvent(kActionToggleRiseLower);
- act->addDefaultInputMapping("h");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("REST", _("Rest"));
- act->setCustomEngineActionEvent(kActionRest);
- act->addDefaultInputMapping("r");
- engineKeyMap->addAction(act);
-
- act = new Common::Action("FACEFRWARD", _("Face Forward"));
- act->setCustomEngineActionEvent(kActionFaceForward);
- act->addDefaultInputMapping("f");
- engineKeyMap->addAction(act);
- }
+ act = new Common::Action("SAVE", _("Save Game"));
+ act->setCustomEngineActionEvent(kActionSave);
+ act->addDefaultInputMapping("s");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("LOAD", _("Load Game"));
+ act->setCustomEngineActionEvent(kActionLoad);
+ act->addDefaultInputMapping("l");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("QUIT", _("Quit Game"));
+ act->setCustomEngineActionEvent(kActionEscape);
+ if (isSpectrum())
+ act->addDefaultInputMapping("1");
+ else
+ act->addDefaultInputMapping("ESCAPE");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("TOGGLESOUND", _("Toggle Sound"));
+ act->setCustomEngineActionEvent(kActionToggleSound);
+ act->addDefaultInputMapping("t");
+ infoScreenKeyMap->addAction(act);
+
+ act = new Common::Action("ROTL", _("Rotate Left"));
+ act->setCustomEngineActionEvent(kActionRotateLeft);
+ act->addDefaultInputMapping("q");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("ROTR", _("Rotate Right"));
+ act->setCustomEngineActionEvent(kActionRotateRight);
+ act->addDefaultInputMapping("w");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("CHNGANGLE", _("Change Angle"));
+ act->setCustomEngineActionEvent(kActionChangeAngle);
+ act->addDefaultInputMapping("a");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("CHNGSTEPSIZE", _("Change Step Size"));
+ act->setCustomEngineActionEvent(kActionChangeStepSize);
+ act->addDefaultInputMapping("s");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("TGGLHEIGHT", _("Toggle Height"));
+ act->setCustomEngineActionEvent(kActionToggleRiseLower);
+ act->addDefaultInputMapping("h");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("REST", _("Rest"));
+ act->setCustomEngineActionEvent(kActionRest);
+ act->addDefaultInputMapping("r");
+ engineKeyMap->addAction(act);
+
+ act = new Common::Action("FACEFRWARD", _("Face Forward"));
+ act->setCustomEngineActionEvent(kActionFaceForward);
+ act->addDefaultInputMapping("f");
+ engineKeyMap->addAction(act);
}
void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
Commit: 0e44b878e46e04f9625717275b5a771277adf298
https://github.com/scummvm/scummvm/commit/0e44b878e46e04f9625717275b5a771277adf298
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-13T13:23:34+02:00
Commit Message:
FREESCAPE: added proper loading of sounds for one of the eclipse zx demos
Changed paths:
engines/freescape/games/eclipse/zx.cpp
engines/freescape/sound.cpp
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index ddb24bd8645..68dcdd04498 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -119,6 +119,7 @@ void EclipseEngine::loadAssetsZXDemo() {
error("Failed to open totaleclipse.zx.data");
if (_variant & GF_ZX_DEMO_MICROHOBBY) {
+ loadSpeakerFxZX(&file, 0x798, 0x7ec);
loadMessagesFixedSize(&file, 0x2ac, 16, 23);
loadMessagesFixedSize(&file, 0x56e6, 264, 1);
loadFonts(&file, 0x5f7b, _font);
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index 5bbf4909ec9..09872fb517a 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -24,6 +24,7 @@
#include "audio/decoders/raw.h"
#include "freescape/freescape.h"
+#include "freescape/games/eclipse/eclipse.h"
namespace Freescape {
@@ -33,6 +34,9 @@ void FreescapeEngine::loadSpeakerFxZX(Common::SeekableReadStream *file, int sfxT
if (isDark())
numberSounds = 34;
+ if (isEclipse() && (_variant & GF_ZX_DEMO_MICROHOBBY))
+ numberSounds = 21;
+
for (int i = 1; i < numberSounds; i++) {
debugC(1, kFreescapeDebugParser, "Reading sound table entry: %d ", i);
_soundsSpeakerFxZX[i] = new Common::Array<soundUnitZX>();
Commit: 460e41a5fef258d946f60368069bf5229ac529b3
https://github.com/scummvm/scummvm/commit/460e41a5fef258d946f60368069bf5229ac529b3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-13T13:23:34+02:00
Commit Message:
FREESCAPE: fixed corner case in setColorMap
Changed paths:
engines/freescape/gfx.cpp
diff --git a/engines/freescape/gfx.cpp b/engines/freescape/gfx.cpp
index df95cc4c165..4c79902ad32 100644
--- a/engines/freescape/gfx.cpp
+++ b/engines/freescape/gfx.cpp
@@ -231,7 +231,7 @@ void Renderer::setColorMap(ColorMap *colorMap_) {
}
if (_isAccelerated && _authenticGraphics) {
- for (int i = 1; i < 14; i++) {
+ for (int i = 1; i <= 14; i++) {
scaleStipplePattern(_stipples[i], _stipples[15]);
memcpy(_stipples[i], _stipples[15], 128);
scaleStipplePattern(_stipples[i], _stipples[15]);
Commit: 650bd105a6d2d2de5f56796486d97385feb605ca
https://github.com/scummvm/scummvm/commit/650bd105a6d2d2de5f56796486d97385feb605ca
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-13T13:23:34+02:00
Commit Message:
FREESCAPE: added more sound index in driller and dark
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/dark/dark.cpp
engines/freescape/games/driller/driller.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index bcdade6c01c..1eb7bdffd1e 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -156,8 +156,8 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
_soundIndexMenu = -1;
_soundIndexStart = -1;
_soundIndexAreaChange = -1;
+ _soundIndexHit = -1;
//_soundIndexEndGame = -1;
- //_soundIndexSensor = -1;
_fullscreenViewArea = Common::Rect(0, 0, _screenW, _screenH);
_viewArea = _fullscreenViewArea;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 2db5f694c06..a9789945c58 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -449,6 +449,7 @@ public:
int _soundIndexMenu;
int _soundIndexStart;
int _soundIndexAreaChange;
+ int _soundIndexHit;
// Rendering
int _screenW, _screenH;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 3b7f80ecb2a..6c5667e7055 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -41,6 +41,7 @@ DarkEngine::DarkEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEn
_soundIndexMenu = -1;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
+ _soundIndexHit = 2;
_soundIndexRestoreECD = 19;
if (isDOS())
@@ -784,8 +785,7 @@ void DarkEngine::drawIndicator(Graphics::Surface *surface, int xPosition, int yP
void DarkEngine::drawSensorShoot(Sensor *sensor) {
if (_gameStateControl == kFreescapeGameStatePlaying) {
// Avoid playing new sounds, so the endgame can progress
- if (isSpectrum())
- playSound(2, true);
+ playSound(_soundIndexHit, true);
}
Math::Vector3d target;
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 73312a0d6e0..644805f9c37 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -98,8 +98,8 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_soundIndexFall = 3;
_soundIndexClimb = -1;
_soundIndexMenu = -1;
- _soundIndexStart = -1;
- _soundIndexAreaChange = -1;
+ _soundIndexStart = 9;
+ _soundIndexAreaChange = 5;
}
DrillerEngine::~DrillerEngine() {
@@ -233,7 +233,7 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
if (areaID == _startArea && entranceID == _startEntrance) {
_yaw = 280;
_pitch = 0;
- playSound(9, true);
+ playSound(_soundIndexStart, true);
} else if (areaID == 127) {
assert(entranceID == 0);
_yaw = 90;
@@ -242,7 +242,7 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
// Show the number of completed areas
_areaMap[127]->_name.replace(0, 3, Common::String::format("%4d", _gameStateVars[32]));
} else
- playSound(5, false);
+ playSound(_soundIndexAreaChange, false);
debugC(1, kFreescapeDebugMove, "starting player position: %f, %f, %f", _position.x(), _position.y(), _position.z());
clearTemporalMessages();
@@ -903,6 +903,11 @@ bool DrillerEngine::onScreenControls(Common::Point mouse) {
}
void DrillerEngine::drawSensorShoot(Sensor *sensor) {
+ if (_gameStateControl == kFreescapeGameStatePlaying) {
+ // Avoid playing new sounds, so the endgame can progress
+ playSound(_soundIndexHit, true);
+ }
+
Math::Vector3d target;
target = _position;
target.y() = target.y() - _playerHeight;
Commit: 0ff7abe060a6cfd99e50fa124f3eda64521a36a3
https://github.com/scummvm/scummvm/commit/0ff7abe060a6cfd99e50fa124f3eda64521a36a3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-13T13:23:34+02:00
Commit Message:
FREESCAPE: added more sound index variables for the common end games
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/dark/dark.cpp
engines/freescape/games/dark/zx.cpp
engines/freescape/games/eclipse/eclipse.cpp
engines/freescape/games/eclipse/zx.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 1eb7bdffd1e..f4305688600 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -157,7 +157,14 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
_soundIndexStart = -1;
_soundIndexAreaChange = -1;
_soundIndexHit = -1;
- //_soundIndexEndGame = -1;
+
+ _soundIndexNoShield = -1;
+ _soundIndexNoEnergy = -1;
+ _soundIndexFallen = -1;
+ _soundIndexTimeout = -1;
+ _soundIndexForceEndGame = -1;
+ _soundIndexCrushed = -1;
+ _soundIndexMissionComplete = -1;
_fullscreenViewArea = Common::Rect(0, 0, _screenW, _screenH);
_viewArea = _fullscreenViewArea;
@@ -800,45 +807,40 @@ bool FreescapeEngine::checkIfGameEnded() {
return false;
if (_gameStateVars[k8bitVariableShield] == 0) {
- if (isSpectrum())
- playSound(14, true);
+ playSound(_soundIndexNoShield, true);
if (!_noShieldMessage.empty())
insertTemporaryMessage(_noShieldMessage, _countdown - 2);
_gameStateControl = kFreescapeGameStateEnd;
} else if (_gameStateVars[k8bitVariableEnergy] == 0) {
- if (isSpectrum())
- playSound(14, true);
+ playSound(_soundIndexNoEnergy, true);
if (!_noEnergyMessage.empty())
insertTemporaryMessage(_noEnergyMessage, _countdown - 2);
_gameStateControl = kFreescapeGameStateEnd;
} else if (_hasFallen) {
_hasFallen = false;
- if (isSpectrum())
- playSound(14, false);
+ playSound(_soundIndexFallen, false);
if (!_fallenMessage.empty())
insertTemporaryMessage(_fallenMessage, _countdown - 4);
_gameStateControl = kFreescapeGameStateEnd;
} else if (_countdown <= 0) {
- if (isSpectrum())
- playSound(14, false);
+ playSound(_soundIndexTimeout, false);
if (!_timeoutMessage.empty())
insertTemporaryMessage(_timeoutMessage, _countdown - 4);
_gameStateControl = kFreescapeGameStateEnd;
} else if (_playerWasCrushed) {
- if (isSpectrum())
- playSound(25, true);
+ playSound(_soundIndexCrushed, true);
_playerWasCrushed = false;
if (!_crushedMessage.empty())
insertTemporaryMessage(_crushedMessage, _countdown - 4);
_gameStateControl = kFreescapeGameStateEnd;
} else if (_forceEndGame) {
- if (isSpectrum())
- playSound(14, true);
+ playSound(_soundIndexForceEndGame, true);
+
_forceEndGame = false;
if (!_forceEndGameMessage.empty())
insertTemporaryMessage(_forceEndGameMessage, _countdown - 4);
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index a9789945c58..2a1be1696db 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -451,6 +451,14 @@ public:
int _soundIndexAreaChange;
int _soundIndexHit;
+ int _soundIndexNoShield;
+ int _soundIndexNoEnergy;
+ int _soundIndexFallen;
+ int _soundIndexTimeout;
+ int _soundIndexForceEndGame;
+ int _soundIndexCrushed;
+ int _soundIndexMissionComplete;
+
// Rendering
int _screenW, _screenH;
Renderer *_gfx;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 6c5667e7055..7b6422a474a 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -44,6 +44,14 @@ DarkEngine::DarkEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEn
_soundIndexHit = 2;
_soundIndexRestoreECD = 19;
+ _soundIndexNoShield = -1;
+ _soundIndexNoEnergy = -1;
+ _soundIndexFallen = -1;
+ _soundIndexTimeout = -1;
+ _soundIndexForceEndGame = -1;
+ _soundIndexCrushed = -1;
+ _soundIndexMissionComplete = -1;
+
if (isDOS())
initDOS();
else if (isSpectrum())
diff --git a/engines/freescape/games/dark/zx.cpp b/engines/freescape/games/dark/zx.cpp
index d6c2ac591a9..ba7e8b78a35 100644
--- a/engines/freescape/games/dark/zx.cpp
+++ b/engines/freescape/games/dark/zx.cpp
@@ -40,6 +40,14 @@ void DarkEngine::initZX() {
_soundIndexStart = 11;
_soundIndexAreaChange = 0x1c;
_soundIndexRestoreECD = 30;
+
+ _soundIndexNoShield = 14;
+ _soundIndexNoEnergy = 14;
+ _soundIndexFallen = 7;
+ _soundIndexTimeout = 14;
+ _soundIndexForceEndGame = 14;
+ _soundIndexCrushed = 25;
+ _soundIndexMissionComplete = 8;
}
void DarkEngine::loadAssetsZXFullGame() {
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index be277d5bb55..77662ecdfbc 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -42,6 +42,14 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_soundIndexStart = -1;
_soundIndexAreaChange = -1;
+ _soundIndexNoShield = -1;
+ _soundIndexNoEnergy = -1;
+ _soundIndexFallen = -1;
+ _soundIndexTimeout = -1;
+ _soundIndexForceEndGame = -1;
+ _soundIndexCrushed = -1;
+ _soundIndexMissionComplete = -1;
+
if (isDOS())
initDOS();
else if (isCPC())
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 68dcdd04498..8cae05ec0c6 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -39,6 +39,14 @@ void EclipseEngine::initZX() {
_soundIndexMenu = -1;
_soundIndexStart = -1;
_soundIndexAreaChange = -1;
+
+ _soundIndexNoShield = 8;
+ _soundIndexNoEnergy = -1;
+ _soundIndexFallen = 8;
+ _soundIndexTimeout = 8;
+ _soundIndexForceEndGame = 8;
+ _soundIndexCrushed = 8;
+ _soundIndexMissionComplete = 16;
}
void EclipseEngine::loadAssetsZXFullGame() {
More information about the Scummvm-git-logs
mailing list