[Scummvm-git-logs] scummvm master -> f392eb81e40015d8d0c6d4204542d99df63e7ff1
neuromancer
noreply at scummvm.org
Fri Sep 26 22:00:13 UTC 2025
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2364034dda FREESCAPE: restore some driller (dos) sounds
1d292f067a FREESCAPE: renamed some sound index variables and added some sound fixes for driller
cfc6cf5556 FREESCAPE: renamed some sound index variables and added some sound fixes for driller
f392eb81e4 FREESCAPE: improved sounds for driller amiga/atari
Commit: 2364034dda41a55a5795bb3c8affc33acad2b7bb
https://github.com/scummvm/scummvm/commit/2364034dda41a55a5795bb3c8affc33acad2b7bb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-09-26T18:58:43-03:00
Commit Message:
FREESCAPE: restore some driller (dos) sounds
Changed paths:
engines/freescape/games/driller/driller.cpp
engines/freescape/movement.cpp
engines/freescape/sound.cpp
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 8da3eceb92f..159aab1aa79 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -95,10 +95,10 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_endEntrance = 0;
_soundIndexShoot = 1;
- _soundIndexCollide = -1;
+ _soundIndexCollide = 2;
_soundIndexFall = 3;
- _soundIndexClimb = -1;
- _soundIndexMenu = -1;
+ _soundIndexClimb = 4;
+ _soundIndexMenu = 2;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index a145a7be1b5..6e568d46962 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -544,6 +544,10 @@ void FreescapeEngine::resolveCollisions(Math::Vector3d const position) {
stopMovement();
}
+ if (isSteppingUp && (newPosition - _lastPosition).length() <= 1) {
+ isCollidingWithWall = true;
+ isSteppingUp = false;
+ }
if (isSteppingUp) {
debug("Stepping up sound!");
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index daf3041ce94..a48f09c2854 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -448,7 +448,6 @@ void FreescapeEngine::playSoundFx(int index, bool sync) {
}
void FreescapeEngine::stopAllSounds(Audio::SoundHandle &handle) {
- _speaker->stop();
_mixer->stopHandle(handle);
}
Commit: 1d292f067a833d819902db44f004fba5a33b2e16
https://github.com/scummvm/scummvm/commit/1d292f067a833d819902db44f004fba5a33b2e16
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-09-26T18:58:43-03:00
Commit Message:
FREESCAPE: renamed some sound index variables and added some sound fixes for driller
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/castle/cpc.cpp
engines/freescape/games/castle/zx.cpp
engines/freescape/games/dark/dark.cpp
engines/freescape/games/dark/zx.cpp
engines/freescape/games/driller/driller.cpp
engines/freescape/games/eclipse/eclipse.cpp
engines/freescape/games/eclipse/zx.cpp
engines/freescape/movement.cpp
engines/freescape/sound.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 4304147c0eb..62033fd352a 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -175,7 +175,8 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
_soundIndexShoot = 1;
_soundIndexCollide = -1;
_soundIndexFall = -1;
- _soundIndexClimb = -1;
+ _soundIndexStepUp = -1;
+ _soundIndexStepDown = -1;
_soundIndexMenu = -1;
_soundIndexStart = -1;
_soundIndexAreaChange = -1;
@@ -616,6 +617,7 @@ void FreescapeEngine::processInput() {
_savedScreen = nullptr;
break;
case kActionChangeMode:
+ playSound(_soundIndexCollide, false, _movementSoundHandle);
_shootMode = !_shootMode;
centerCrossair();
if (!_shootMode) {
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index c35356fc9f4..2dc5bdc51ac 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -495,8 +495,9 @@ public:
Common::HashMap<uint16, Common::Array<soundUnitZX>*> _soundsSpeakerFxZX;
int _soundIndexShoot;
int _soundIndexCollide;
+ int _soundIndexStepDown;
+ int _soundIndexStepUp;
int _soundIndexFall;
- int _soundIndexClimb;
int _soundIndexMenu;
int _soundIndexStart;
int _soundIndexAreaChange;
diff --git a/engines/freescape/games/castle/cpc.cpp b/engines/freescape/games/castle/cpc.cpp
index be0146918a8..bd149ea3ca9 100644
--- a/engines/freescape/games/castle/cpc.cpp
+++ b/engines/freescape/games/castle/cpc.cpp
@@ -32,8 +32,9 @@ void CastleEngine::initCPC() {
_viewArea = Common::Rect(40, 33 - 2, 280, 152);
_soundIndexShoot = 5;
_soundIndexCollide = -1;
- _soundIndexFall = -1;
- _soundIndexClimb = -1;
+ _soundIndexFallen = -1;
+ _soundIndexStepUp = -1;
+ _soundIndexStepDown = -1;
_soundIndexMenu = -1;
_soundIndexStart = 6;
_soundIndexAreaChange = 7;
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 1484a2eb7a2..b22c384db58 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -31,8 +31,9 @@ void CastleEngine::initZX() {
_viewArea = Common::Rect(64, 36, 256, 148);
_soundIndexShoot = 5;
_soundIndexCollide = -1;
- _soundIndexFall = -1;
- _soundIndexClimb = -1;
+ _soundIndexFallen = -1;
+ _soundIndexStepUp = -1;
+ _soundIndexStepDown = -1;
_soundIndexMenu = -1;
_soundIndexStart = 6;
_soundIndexAreaChange = 7;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 1a553822265..6699935f182 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -36,8 +36,8 @@ DarkEngine::DarkEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEn
// These sounds can be overriden by the class of each platform
_soundIndexShoot = 8;
_soundIndexCollide = -1;
- _soundIndexFall = 3;
- _soundIndexClimb = 4;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 4;
_soundIndexMenu = -1;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
diff --git a/engines/freescape/games/dark/zx.cpp b/engines/freescape/games/dark/zx.cpp
index 598d610d8d7..4ff7e9bd67e 100644
--- a/engines/freescape/games/dark/zx.cpp
+++ b/engines/freescape/games/dark/zx.cpp
@@ -34,8 +34,8 @@ void DarkEngine::initZX() {
_soundIndexShoot = 5;
_soundIndexCollide = -1; // Scripted
- _soundIndexFall = 3;
- _soundIndexClimb = 4;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 4;
_soundIndexMenu = 25;
_soundIndexStart = 11;
_soundIndexAreaChange = 0x1c;
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 159aab1aa79..d6beb8ea4ea 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -96,12 +96,14 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_soundIndexShoot = 1;
_soundIndexCollide = 2;
- _soundIndexFall = 3;
- _soundIndexClimb = 4;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 4;
_soundIndexMenu = 2;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
+ _soundIndexHit = 2;
+ _soundIndexFall = 14;
_soundIndexNoShield = 20;
_soundIndexNoEnergy = 20;
_soundIndexFallen = 20;
@@ -965,7 +967,7 @@ bool DrillerEngine::onScreenControls(Common::Point mouse) {
}
void DrillerEngine::drawSensorShoot(Sensor *sensor) {
- if (_gameStateControl == kFreescapeGameStatePlaying) {
+ if (_underFireFrames == 1 && _gameStateControl == kFreescapeGameStatePlaying) {
// Avoid playing new sounds, so the endgame can progress
playSound(_soundIndexHit, true, _soundFxHandle);
}
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 0103cf481d8..3e24e136d62 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -36,8 +36,8 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
// These sounds can be overriden by the class of each platform
_soundIndexShoot = 8;
_soundIndexCollide = 1;
- _soundIndexFall = 3;
- _soundIndexClimb = 3;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 3;
_soundIndexMenu = -1;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 07de90a3ef9..d19f024a14e 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -34,8 +34,8 @@ void EclipseEngine::initZX() {
_soundIndexShoot = 5;
_soundIndexCollide = -1;
- _soundIndexFall = 3;
- _soundIndexClimb = 4;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 4;
_soundIndexMenu = -1;
_soundIndexStart = 7;
_soundIndexAreaChange = 7;
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 6e568d46962..1d36cc86502 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -532,6 +532,8 @@ void FreescapeEngine::resolveCollisions(Math::Vector3d const position) {
_endGameDelayTicks = 60 * 5;
if (isEclipse()) // No need for an variable index, since these are special types of sound
playSoundFx(0, true);
+ else
+ playSound(_soundIndexFall, false, _movementSoundHandle);
if (_hasFallen)
stopMovement();
@@ -552,11 +554,11 @@ void FreescapeEngine::resolveCollisions(Math::Vector3d const position) {
if (isSteppingUp) {
debug("Stepping up sound!");
if (!_mixer->isSoundHandleActive(_movementSoundHandle))
- playSound(_soundIndexClimb, false, _movementSoundHandle);
+ playSound(_soundIndexStepUp, false, _movementSoundHandle);
} else if (isSteppingDown) {
debug("Stepping down sound!");
if (!_mixer->isSoundHandleActive(_movementSoundHandle))
- playSound(_soundIndexFall, false, _movementSoundHandle);
+ playSound(_soundIndexStepDown, false, _movementSoundHandle);
} else if (isCollidingWithWall) {
debug("Colliding with wall sound!");
if (!_mixer->isSoundHandleActive(_movementSoundHandle))
@@ -582,6 +584,8 @@ bool FreescapeEngine::runCollisionConditions(Math::Vector3d const lastPosition,
Object *collided = nullptr;
_gotoExecuted = false;
+ _speaker->stop();
+
Math::Ray ray(newPosition, -_upVector);
collided = _currentArea->checkCollisionRay(ray, _playerHeight + 3);
if (collided) {
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index a48f09c2854..b82d3dd0e58 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -233,7 +233,7 @@ void FreescapeEngine::loadSpeakerFxZX(Common::SeekableReadStream *file, int sfxT
void FreescapeEngine::loadSpeakerFxDOS(Common::SeekableReadStream *file, int offsetFreq, int offsetTable) {
debugC(1, kFreescapeDebugParser, "Reading PC speaker sound table for DOS");
- for (int i = 1; i < 20; i++) {
+ for (int i = 1; i <= 20; i++) {
debugC(1, kFreescapeDebugParser, "Reading sound table entry: %d ", i);
int soundIdx = (i - 1) * 4;
file->seek(offsetFreq + soundIdx);
Commit: cfc6cf5556490cbc247a1ba29549e80fba62e25b
https://github.com/scummvm/scummvm/commit/cfc6cf5556490cbc247a1ba29549e80fba62e25b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-09-26T18:58:43-03:00
Commit Message:
FREESCAPE: renamed some sound index variables and added some sound fixes for driller
Changed paths:
engines/freescape/games/driller/driller.cpp
engines/freescape/movement.cpp
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index d6beb8ea4ea..40419d2b204 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -597,6 +597,8 @@ void DrillerEngine::pressedKey(const int keycode) {
} else
_drillStatusByArea[_currentArea->getAreaID()] = kDrillerRigOutOfPlace;
executeMovementConditions();
+ if (isDOS())
+ playSound(_soundIndexAreaChange, false, _soundFxHandle);
} else if (keycode == kActionCollectDrillingRig) {
if (isDOS() && isDemo()) // No support for drilling here yet
return;
@@ -638,6 +640,8 @@ void DrillerEngine::pressedKey(const int keycode) {
assert(scoreToRemove <= uint32(_gameStateVars[k8bitVariableScore]));
_gameStateVars[k8bitVariableScore] -= scoreToRemove;
executeMovementConditions();
+ if (isDOS())
+ playSound(_soundIndexAreaChange, false, _soundFxHandle);
}
}
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 1d36cc86502..df51ce01974 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -579,7 +579,9 @@ void FreescapeEngine::stopMovement() {
}
bool FreescapeEngine::runCollisionConditions(Math::Vector3d const lastPosition, Math::Vector3d const newPosition) {
- bool executed = false;
+ bool floorExecuted = false;
+ bool wallExecuted = false;
+
GeometricObject *gobj = nullptr;
Object *collided = nullptr;
_gotoExecuted = false;
@@ -591,7 +593,7 @@ bool FreescapeEngine::runCollisionConditions(Math::Vector3d const lastPosition,
if (collided) {
gobj = (GeometricObject *)collided;
debugC(1, kFreescapeDebugMove, "Collided down with object id %d of size %f %f %f", gobj->getObjectID(), gobj->getSize().x(), gobj->getSize().y(), gobj->getSize().z());
- executed |= executeObjectConditions(gobj, false, true, false);
+ floorExecuted |= executeObjectConditions(gobj, false, true, false);
}
if (_gotoExecuted) {
@@ -616,16 +618,17 @@ bool FreescapeEngine::runCollisionConditions(Math::Vector3d const lastPosition,
if (collided) {
gobj = (GeometricObject *)collided;
debugC(1, kFreescapeDebugMove, "Collided with object id %d of size %f %f %f", gobj->getObjectID(), gobj->getSize().x(), gobj->getSize().y(), gobj->getSize().z());
- executed |= executeObjectConditions(gobj, false, true, false);
- //break;
+ wallExecuted |= executeObjectConditions(gobj, false, true, false);
}
if (_gotoExecuted) {
executeMovementConditions();
return true;
}
+ if (wallExecuted)
+ break;
}
- return executed;
+ return floorExecuted || wallExecuted;
}
} // namespace Freescape
Commit: f392eb81e40015d8d0c6d4204542d99df63e7ff1
https://github.com/scummvm/scummvm/commit/f392eb81e40015d8d0c6d4204542d99df63e7ff1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-09-26T18:58:43-03:00
Commit Message:
FREESCAPE: improved sounds for driller amiga/atari
Changed paths:
engines/freescape/games/driller/amiga.cpp
engines/freescape/games/driller/dos.cpp
engines/freescape/games/driller/driller.cpp
engines/freescape/movement.cpp
engines/freescape/sound.cpp
engines/freescape/sound.h
diff --git a/engines/freescape/games/driller/amiga.cpp b/engines/freescape/games/driller/amiga.cpp
index a2568accf83..7081cbbc561 100644
--- a/engines/freescape/games/driller/amiga.cpp
+++ b/engines/freescape/games/driller/amiga.cpp
@@ -330,6 +330,16 @@ void DrillerEngine::initAmigaAtari() {
_borderExtra = nullptr;
_borderExtraTexture = nullptr;
+
+ _soundIndexShoot = 1;
+ _soundIndexCollide = 19;
+ _soundIndexStepDown = 19;
+ _soundIndexStepUp = 19;
+ _soundIndexAreaChange = 5;
+ _soundIndexHit = 2;
+ _soundIndexFall = 25;
+ _soundIndexFallen = 11;
+ _soundIndexForceEndGame = 11;
}
} // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index 0f4a128118c..3698c728f6b 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -50,6 +50,23 @@ void DrillerEngine::initDOS() {
_moveDownArea = Common::Rect(219, 157, 243, 167);
_deployDrillArea = Common::Rect(140, 175, 179, 191);
_infoScreenArea = Common::Rect(130, 125, 188, 144);
+
+ _soundIndexShoot = 1;
+ _soundIndexCollide = 2;
+ _soundIndexStepDown = 3;
+ _soundIndexStepUp = 4;
+ _soundIndexMenu = 2;
+ _soundIndexStart = 9;
+ _soundIndexAreaChange = 5;
+ _soundIndexHit = 2;
+
+ _soundIndexFall = 14;
+ _soundIndexNoShield = 20;
+ _soundIndexNoEnergy = 20;
+ _soundIndexFallen = 20;
+ _soundIndexTimeout = 20;
+ _soundIndexForceEndGame = 20;
+ _soundIndexCrushed = 20;
}
/*
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 40419d2b204..af291a7ed8d 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -94,23 +94,6 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_endArea = 127;
_endEntrance = 0;
- _soundIndexShoot = 1;
- _soundIndexCollide = 2;
- _soundIndexStepDown = 3;
- _soundIndexStepUp = 4;
- _soundIndexMenu = 2;
- _soundIndexStart = 9;
- _soundIndexAreaChange = 5;
- _soundIndexHit = 2;
-
- _soundIndexFall = 14;
- _soundIndexNoShield = 20;
- _soundIndexNoEnergy = 20;
- _soundIndexFallen = 20;
- _soundIndexTimeout = 20;
- _soundIndexForceEndGame = 20;
- _soundIndexCrushed = 20;
-
_borderExtra = nullptr;
_borderExtraTexture = nullptr;
_playerSid = nullptr;
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index df51ce01974..38e9a5a0732 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -551,6 +551,11 @@ void FreescapeEngine::resolveCollisions(Math::Vector3d const position) {
isSteppingUp = false;
}
+ if (isSteppingDown && (newPosition - _lastPosition).length() <= 1) {
+ isCollidingWithWall = true;
+ isSteppingDown = false;
+ }
+
if (isSteppingUp) {
debug("Stepping up sound!");
if (!_mixer->isSoundHandleActive(_movementSoundHandle))
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index b82d3dd0e58..ff1d34f8cd8 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -432,19 +432,15 @@ void FreescapeEngine::playSoundFx(int index, bool sync) {
int size = _soundsFx[index]->size;
int sampleRate = _soundsFx[index]->sampleRate;
+ int repetitions = _soundsFx[index]->repetitions;
byte *data = _soundsFx[index]->data;
- int loops = 1;
-
- if (index == 10)
- loops = 5;
- else if (index == 15)
- loops = 50;
if (size > 4) {
Audio::SeekableAudioStream *s = Audio::makeRawStream(data, size, sampleRate, Audio::FLAG_16BITS, DisposeAfterUse::NO);
- Audio::AudioStream *stream = new Audio::LoopingAudioStream(s, loops);
+ Audio::AudioStream *stream = new Audio::LoopingAudioStream(s, repetitions);
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundFxHandle, stream);
- }
+ } else
+ debugC(1, kFreescapeDebugMedia, "WARNING: Sound %d is empty", index);
}
void FreescapeEngine::stopAllSounds(Audio::SoundHandle &handle) {
@@ -556,13 +552,14 @@ void FreescapeEngine::loadSoundsFx(Common::SeekableReadStream *file, int offset,
int zero = file->readUint16BE();
assert(zero == 0);
int size = file->readUint16BE();
- int sampleRate = file->readUint16BE();
- debugC(1, kFreescapeDebugParser, "Loading sound: %d (size: %d, sample rate: %d) at %" PRIx64, i, size, sampleRate, file->pos());
+ float sampleRate = float(file->readUint16BE()) / 2;
+ debugC(1, kFreescapeDebugParser, "Loading sound: %d (size: %d, sample rate: %f) at %" PRIx64, i, size, sampleRate, file->pos());
byte *data = (byte *)malloc(size * sizeof(byte));
file->read(data, size);
sound->sampleRate = sampleRate;
sound->size = size;
sound->data = (byte *)data;
+ sound->repetitions = 1;
_soundsFx[i] = sound;
}
}
diff --git a/engines/freescape/sound.h b/engines/freescape/sound.h
index 1f5849ebdc2..b4ca66c6699 100644
--- a/engines/freescape/sound.h
+++ b/engines/freescape/sound.h
@@ -30,6 +30,7 @@ namespace Freescape {
struct soundFx {
int size;
float sampleRate;
+ int repetitions;
byte *data;
};
More information about the Scummvm-git-logs
mailing list