[Scummvm-git-logs] scummvm master -> 5f5849069e9e8eceb42734f52644b80a1642dfe4

neuromancer noreply at scummvm.org
Sat Oct 4 20:04:42 UTC 2025


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
71b4337438 FREESCAPE: missing sounds for castle for zx
ebb5a5f3d5 FREESCAPE: improved position and rendering of energy bar in castle for zx
5f5849069e FREESCAPE: restored ghost buzz in castle for zx


Commit: 71b4337438c8ad04e75c949ec78e65babd27a8ef
    https://github.com/scummvm/scummvm/commit/71b4337438c8ad04e75c949ec78e65babd27a8ef
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-10-04T17:02:39-03:00

Commit Message:
FREESCAPE: missing sounds for castle for zx

Changed paths:
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/zx.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 6ade2160b6e..d0368852101 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -418,6 +418,7 @@ void CastleEngine::initGameState() {
 	_countdown = INT_MAX - 8;
 	_keysCollected.clear();
 	_spiritsMeter = 32;
+	_spiritsMeterPosition = _spiritsMeter * _spiritsToKill / _spiritsToKill;
 
 	_exploredAreas[_startArea] = true;
 	if (_useRockTravel) // Enable cheat
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 63a81cbcc3c..644a01f7493 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -30,13 +30,13 @@ namespace Freescape {
 void CastleEngine::initZX() {
 	_viewArea = Common::Rect(64, 36, 256, 148);
 	_soundIndexShoot = 5;
-	_soundIndexCollide = -1;
-	_soundIndexFallen = -1;
-	_soundIndexStepUp = -1;
-	_soundIndexStepDown = -1;
-	_soundIndexMenu = -1;
-	_soundIndexStart = 6;
-	_soundIndexAreaChange = 6;
+	_soundIndexCollide = 3;
+	_soundIndexFallen = 6;
+	_soundIndexStepUp = 12;
+	_soundIndexStepDown = 12;
+	_soundIndexMenu = 3;
+	_soundIndexStart = 7;
+	_soundIndexAreaChange = 7;
 }
 
 Graphics::ManagedSurface *CastleEngine::loadFrameWithHeader(Common::SeekableReadStream *file, int pos, uint32 front, uint32 back) {


Commit: ebb5a5f3d52c9d2b2edea0da3508f7b94e6c834c
    https://github.com/scummvm/scummvm/commit/ebb5a5f3d52c9d2b2edea0da3508f7b94e6c834c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-10-04T17:02:39-03:00

Commit Message:
FREESCAPE: improved position and rendering of energy bar in castle for zx

Changed paths:
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/zx.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index d0368852101..07ae2c8b987 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -1174,7 +1174,15 @@ void CastleEngine::drawEnergyMeter(Graphics::Surface *surface, Common::Point ori
 
 	if (isDOS())
 		back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
-	surface->copyRectToSurfaceWithKey((const Graphics::Surface)*_strenghtBarFrame, origin.x + 5, origin.y + 8, Common::Rect(0, 0, _strenghtBarFrame->w, _strenghtBarFrame->h), black);
+
+	Common::Point barFrameOrigin = origin;
+
+	if (isDOS())
+		barFrameOrigin += Common::Point(5, 6);
+	else if (isSpectrum())
+		barFrameOrigin += Common::Point(0, 6);
+
+	surface->copyRectToSurfaceWithKey((const Graphics::Surface)*_strenghtBarFrame, barFrameOrigin.x, barFrameOrigin.y, Common::Rect(0, 0, _strenghtBarFrame->w, _strenghtBarFrame->h), black);
 
 	Common::Point weightPoint;
 	int frameIdx = -1;
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 644a01f7493..e3039b4cd0e 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -44,6 +44,7 @@ Graphics::ManagedSurface *CastleEngine::loadFrameWithHeader(Common::SeekableRead
 	file->seek(pos);
 	int16 width = file->readByte();
 	int16 height = file->readByte();
+	debugC(kFreescapeDebugParser, "Frame size: %d x %d", width, height);
 	surface->create(width * 8, height, _gfx->_texturePixelFormat);
 
 	/*byte mask =*/ file->readByte();
@@ -179,12 +180,12 @@ void CastleEngine::loadAssetsZXFullGame() {
 	_strenghtBackgroundFrame = loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xee6 : 0xed7, yellow, black);
 	_strenghtBarFrame = loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xf72 : 0xf63, yellow, black);
 
-	Graphics::ManagedSurface *bar = new Graphics::ManagedSurface();
-	bar->create(_strenghtBarFrame->w - 4, _strenghtBarFrame->h, _gfx->_texturePixelFormat);
-	_strenghtBarFrame->copyRectToSurface(*bar, 4, 0, Common::Rect(4, 0, _strenghtBarFrame->w - 4, _strenghtBarFrame->h));
-	_strenghtBarFrame->free();
-	delete _strenghtBarFrame;
-	_strenghtBarFrame = bar;
+	//Graphics::ManagedSurface *bar = new Graphics::ManagedSurface();
+	//bar->create(_strenghtBarFrame->w, _strenghtBarFrame->h, _gfx->_texturePixelFormat);
+	//_strenghtBarFrame->copyRectToSurface(*bar, 2, 0, Common::Rect(2, 0, _strenghtBarFrame->w - 2, _strenghtBarFrame->h));
+	//_strenghtBarFrame->free();
+	//delete _strenghtBarFrame;
+	//_strenghtBarFrame = bar;
 
 	_strenghtWeightsFrames = loadFramesWithHeader(&file, _language == Common::ES_ESP ? 0xf92 : 0xf83, 4, yellow, black);
 
@@ -281,7 +282,9 @@ void CastleEngine::drawZXUI(Graphics::Surface *surface) {
 
 	surface->fillRect(Common::Rect(152, 156, 216, 164), green);
 	surface->copyRectToSurface((const Graphics::Surface)*_spiritsMeterIndicatorFrame, 140 + _spiritsMeterPosition, 156, Common::Rect(0, 0, 15, 8));
-	drawEnergyMeter(surface, Common::Point(63, 154));
+
+	surface->fillRect(Common::Rect(64, 155, 64 + 72, 155 + 15), _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
+	drawEnergyMeter(surface, Common::Point(64, 155));
 
 	int ticks = g_system->getMillis() / 20;
 	int flagFrameIndex = (ticks / 10) % 4;


Commit: 5f5849069e9e8eceb42734f52644b80a1642dfe4
    https://github.com/scummvm/scummvm/commit/5f5849069e9e8eceb42734f52644b80a1642dfe4
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-10-04T17:02:39-03:00

Commit Message:
FREESCAPE: restored ghost buzz in castle for zx

Changed paths:
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/castle.h


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 07ae2c8b987..07acd421919 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -1298,6 +1298,7 @@ void CastleEngine::checkSensors() {
 
 
 	if (!ghostInArea()) {
+		_mixer->stopHandle(_soundFxGhostHandle);
 		_gfx->_shakeOffset = Common::Point();
 		return;
 	}
@@ -1305,6 +1306,11 @@ void CastleEngine::checkSensors() {
 	if (_disableSensors)
 		return;
 
+	if (!_mixer->isSoundHandleActive(_soundFxGhostHandle)) {
+		_speaker->play(Audio::PCSpeaker::kWaveFormSquare, 25.0f, -1);
+		_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundFxGhostHandle, _speaker, -1, kFreescapeDefaultVolume / 2, 0, DisposeAfterUse::NO);
+	}
+
 	// This is the frequency to shake the screen
 	if (_ticks % 5 == 0) {
 		if (_underFireFrames <= 0)
diff --git a/engines/freescape/games/castle/castle.h b/engines/freescape/games/castle/castle.h
index 40f7320a43e..6e884e804c4 100644
--- a/engines/freescape/games/castle/castle.h
+++ b/engines/freescape/games/castle/castle.h
@@ -145,6 +145,8 @@ private:
 	void tryToCollectKey();
 	void addGhosts();
 	bool ghostInArea();
+
+	Audio::SoundHandle _soundFxGhostHandle;
 	Texture *_optionTexture;
 	Font _fontRiddle;
 };




More information about the Scummvm-git-logs mailing list