[Scummvm-git-logs] scummvm master -> d682fc3aaa7c42bfd03597ffd9676de5cc202f52

neuromancer noreply at scummvm.org
Wed Apr 23 07:56:18 UTC 2025


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

Summary:
a7e4a6fe49 FREESCAPE: re-enable commented tinygl code
06ff863286 FREESCAPE: reset pitch and yaw after a fall
dcd092571d FREESCAPE: avoid processing mouse movements if the game already ended
2153178c52 FREESCAPE: correctly draw screen flashes inside waitInLoop
addb83c420 FREESCAPE: improved ui implementation for the c64 release of dark
f7997c35c5 FREESCAPE: basic support for the c64 release of eclipse
d62da74e56 FREESCAPE: added title screens for dark and eclipse c64 releases
d682fc3aaa FREESCAPE: fixed shield and energy bar for c64 release of dark


Commit: a7e4a6fe498c1e89a2d51829bd65d9d6bbeef37d
    https://github.com/scummvm/scummvm/commit/a7e4a6fe498c1e89a2d51829bd65d9d6bbeef37d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: re-enable commented tinygl code

Changed paths:
    engines/freescape/gfx_tinygl.cpp


diff --git a/engines/freescape/gfx_tinygl.cpp b/engines/freescape/gfx_tinygl.cpp
index 0533aadeea8..a6042e95711 100644
--- a/engines/freescape/gfx_tinygl.cpp
+++ b/engines/freescape/gfx_tinygl.cpp
@@ -187,7 +187,7 @@ void TinyGLRenderer::renderSensorShoot(byte color, const Math::Vector3d sensor,
 }
 
 void TinyGLRenderer::renderPlayerShootBall(byte color, const Common::Point &position, int frame, const Common::Rect &viewArea) {
-	/*uint8 r, g, b;
+	uint8 r, g, b;
 
 	tglMatrixMode(TGL_PROJECTION);
 	tglLoadIdentity();
@@ -229,7 +229,7 @@ void TinyGLRenderer::renderPlayerShootBall(byte color, const Common::Point &posi
 
 	tglDisable(TGL_BLEND);
 	tglEnable(TGL_DEPTH_TEST);
-	tglDepthMask(TGL_TRUE);*/
+	tglDepthMask(TGL_TRUE);
 }
 
 
@@ -450,10 +450,10 @@ void TinyGLRenderer::drawCelestialBody(Math::Vector3d position, float radius, by
 
 	// Quick billboard effect inspired from this code:
 	// http://www.lighthouse3d.com/opengl/billboarding/index.php?billCheat
-	/*glMatrixMode(GL_MODELVIEW);
-	glPushMatrix();
-	GLfloat m[16];
-	glGetFloatv(GL_MODELVIEW_MATRIX, m);
+	tglMatrixMode(TGL_MODELVIEW);
+	tglPushMatrix();
+	TGLfloat m[16];
+	tglGetFloatv(TGL_MODELVIEW_MATRIX, m);
 	for(int i = 1; i < 4; i++)
 		for(int j = 0; j < 4; j++ ) {
 			if (i == 2)
@@ -464,7 +464,7 @@ void TinyGLRenderer::drawCelestialBody(Math::Vector3d position, float radius, by
 				m[i*4 + j] = 0.0;
 		}
 
-	glLoadMatrixf(m);*/
+	tglLoadMatrixf(m);
 	tglDisable(TGL_DEPTH_TEST);
 	tglDepthMask(TGL_FALSE);
 
@@ -509,7 +509,7 @@ void TinyGLRenderer::drawCelestialBody(Math::Vector3d position, float radius, by
 
 	tglEnable(TGL_DEPTH_TEST);
 	tglDepthMask(TGL_TRUE);
-	//tglPopMatrix();
+	tglPopMatrix();
 }
 
 void TinyGLRenderer::depthTesting(bool enabled) {


Commit: 06ff863286115df9f1c7761bcecef5cfb2169574
    https://github.com/scummvm/scummvm/commit/06ff863286115df9f1c7761bcecef5cfb2169574
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: reset pitch and yaw after a fall

Changed paths:
    engines/freescape/movement.cpp


diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 559ef97b8df..c6d04196fdc 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -447,6 +447,7 @@ void FreescapeEngine::resolveCollisions(Math::Vector3d const position) {
 		_hasFallen = !_disableFalling;
 		_roll = -90;
 		_pitch = 0;
+		_yaw = 0;
 		changePlayerHeight(0);
 		_avoidRenderingFrames = 60 * 3;
 		_endGameDelayTicks = 60 * 5;


Commit: dcd092571d935a014e48d663f551f92641b101ea
    https://github.com/scummvm/scummvm/commit/dcd092571d935a014e48d663f551f92641b101ea
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: avoid processing mouse movements if the game already ended

Changed paths:
    engines/freescape/ui.cpp


diff --git a/engines/freescape/ui.cpp b/engines/freescape/ui.cpp
index 5ca93d3b371..ac4e5c7a0e6 100644
--- a/engines/freescape/ui.cpp
+++ b/engines/freescape/ui.cpp
@@ -35,7 +35,7 @@ void FreescapeEngine::waitInLoop(int maxWait) {
 				return;
 
 			case Common::EVENT_MOUSEMOVE:
-				if (_hasFallen)
+				if (_hasFallen || _playerWasCrushed || _gameStateControl != kFreescapeGameStatePlaying)
 					break;
 				mousePos = event.mouse;
 


Commit: 2153178c5223c4534c5b8942069468f2ea96e947
    https://github.com/scummvm/scummvm/commit/2153178c5223c4534c5b8942069468f2ea96e947
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: correctly draw screen flashes inside waitInLoop

Changed paths:
    engines/freescape/ui.cpp


diff --git a/engines/freescape/ui.cpp b/engines/freescape/ui.cpp
index ac4e5c7a0e6..b02defe0843 100644
--- a/engines/freescape/ui.cpp
+++ b/engines/freescape/ui.cpp
@@ -69,8 +69,22 @@ void FreescapeEngine::waitInLoop(int maxWait) {
 				break;
 			}
 		}
+		// This is a simplified version of the draw frame code
+		// that we used only for this loop in order to only allow the player to look around
 		_gfx->clear(0, 0, 0, true);
-		drawFrame();
+		int farClipPlane = _farClipPlane;
+		if (_currentArea->isOutside())
+			farClipPlane *= 100;
+
+		float aspectRatio = isCastle() ? 1.6 : 2.18;
+		_gfx->updateProjectionMatrix(75.0, aspectRatio, _nearClipPlane, farClipPlane);
+		_gfx->positionCamera(_position, _position + _cameraFront, _roll);
+
+		drawBackground();
+		_currentArea->draw(_gfx, _ticks / 10, _position, _cameraFront);
+		drawBorder();
+		drawUI();
+
 		_gfx->flipBuffer();
 		g_system->updateScreen();
 		g_system->delayMillis(15); // try to target ~60 FPS


Commit: addb83c420d7953e3ba07d9f1b4aa88dad35cba0
    https://github.com/scummvm/scummvm/commit/addb83c420d7953e3ba07d9f1b4aa88dad35cba0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: improved ui implementation for the c64 release of dark

Changed paths:
    engines/freescape/games/dark/c64.cpp


diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index 3af20185a4d..b8c063e9937 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -35,8 +35,7 @@ void DarkEngine::loadAssetsC64FullGame() {
 	Common::File file;
     file.open("darkside.c64.data");
     loadMessagesFixedSize(&file, 0x1edf, 16, 27);
-    //loadFonts(&file, 0xae54);
-    //loadFonts(&file, 0x4ee);
+    loadFonts(&file, 0xc3e);
     loadGlobalObjects(&file, 0x20bd, 23);
     load8bitBinary(&file, 0x9b3e, 16);
 
@@ -50,13 +49,10 @@ void DarkEngine::loadAssetsC64FullGame() {
 
 
 void DarkEngine::drawC64UI(Graphics::Surface *surface) {
-    return;
 	uint8 r, g, b;
 	uint32 front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xAA, 0xAA, 0xAA);
 
-	Common::Rect cover;
-
-	uint32 color = 0;
+	uint32 color = _currentArea->_usualBackgroundColor;
 	if (_gfx->_colorRemaps && _gfx->_colorRemaps->contains(color)) {
 		color = (*_gfx->_colorRemaps)[color];
 	}
@@ -65,63 +61,53 @@ void DarkEngine::drawC64UI(Graphics::Surface *surface) {
 	uint32 back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
 	int score = _gameStateVars[k8bitVariableScore];
-	drawStringInSurface(_currentArea->_name, 200, 184, front, back, surface);
-	cover = Common::Rect(150, 143, 183, 167);
-
-	surface->fillRect(cover, back);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 150, 148 - 4, front, back, surface);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 150, 156 - 4, front, back, surface);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 150, 164 - 4, front, back, surface);
-	if (_playerHeightNumber >= 0)
-		drawStringInSurface(Common::String::format("%d", _playerHeightNumber), 54 + 6, 164 - 3, front, back, surface);
-	else
-		drawStringInSurface(Common::String::format("%s", "J"), 54 + 6, 164 - 3, front, back, surface);
-
-	drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 46, 148 - 3, front, back, surface);
-	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 46, 156 - 3, front, back, surface);
-	drawStringInSurface(Common::String::format("%07d", score), 239, 128, front, back, surface);
+	int ecds = _gameStateVars[kVariableActiveECDs];
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 206, 137 + 8, front, back, surface);
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 206, 145 + 8, front, back, surface);
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 206, 153 + 8, front, back, surface);
+
+	drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 68 + 5 + 5, 168 + 9, front, back, surface);
+	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 70, 177 + 8, front, back, surface);
+	drawStringInSurface(Common::String::format("%07d", score), 86, 8, front, back, surface);
+	drawStringInSurface(Common::String::format("%3d%%", ecds), 198, 8, front, back, surface);
 
 	int seconds, minutes, hours;
 	getTimeFromCountdown(seconds, minutes, hours);
-	drawStringInSurface(Common::String::format("%02d", hours), 207, 8, front, back, surface);
-	drawStringInSurface(Common::String::format("%02d", minutes), 230, 8, front, back, surface);
-	drawStringInSurface(Common::String::format("%02d", seconds), 254, 8, front, back, surface);
 
 	Common::String message;
 	int deadline;
 	getLatestMessages(message, deadline);
 	if (deadline <= _countdown) {
-		drawStringInSurface(message, 191, 176, back, front, surface);
+		drawStringInSurface(message, 120, 185, back, front, surface);
 		_temporaryMessages.push_back(message);
 		_temporaryMessageDeadlines.push_back(deadline);
-	} else {
-		/*if (_currentArea->_gasPocketRadius == 0)
-			message = _messagesList[2];
-		else if (_drillStatusByArea[_currentArea->getAreaID()])
-			message = _messagesList[0];
-		else*/
-        message = _messagesList[1];
-		drawStringInSurface(message, 191, 176, front, back, surface);
-	}
+	} else
+		drawStringInSurface(_currentArea->_name, 120, 185, front, back, surface);
 
-	uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x68, 0xa9, 0x41);
-	int energy = _gameStateVars[k8bitVariableEnergy];
+	int energy = _gameStateVars[k8bitVariableEnergy]; // called fuel in this game
 	int shield = _gameStateVars[k8bitVariableShield];
 
-	if (energy >= 0) {
-		Common::Rect backBar(21, 183, 85 - energy, 190);
-		surface->fillRect(backBar, back);
-		Common::Rect energyBar(84 - energy, 184, 84, 190);
-		surface->fillRect(energyBar, green);
-	}
+	_gfx->readFromPalette(_gfx->_inkColor, r, g, b);
+	uint32 inkColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
 	if (shield >= 0) {
-		Common::Rect backBar(25 - 4, 180 - 4, 89 - shield - 4, 186 - 4);
-		surface->fillRect(backBar, back);
+		Common::Rect shieldBar;
+		shieldBar = Common::Rect(72, 141 - 1, 143 - (_maxShield - shield), 146);
+		surface->fillRect(shieldBar, inkColor);
+
+		shieldBar = Common::Rect(72, 143 - 1, 143 - (_maxShield - shield), 144);
+		surface->fillRect(shieldBar, front);
+	}
+
+	if (energy >= 0) {
+		Common::Rect energyBar;
+		energyBar = Common::Rect(72, 147 + 1, 143 - (_maxEnergy - energy), 155 - 1);
+		surface->fillRect(energyBar, inkColor);
 
-		Common::Rect shieldBar(88 - 4  - shield, 180 - 4, 88 - 4, 186 - 4);
-		surface->fillRect(shieldBar, green);
+		energyBar = Common::Rect(72, 148 + 2, 143 - (_maxEnergy - energy), 154 - 2);
+		surface->fillRect(energyBar, front);
 	}
+	drawBinaryClock(surface, 304, 124, front, back);
 }
 
 } // End of namespace Freescape
\ No newline at end of file


Commit: f7997c35c53abbe6e435c6d98c7ffb5a41205b74
    https://github.com/scummvm/scummvm/commit/f7997c35c53abbe6e435c6d98c7ffb5a41205b74
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: basic support for the c64 release of eclipse

Changed paths:
  A devtools/create_freescape/eclipse_border_Commodore 64.bmp
  A engines/freescape/games/eclipse/c64.cpp
    dists/engine-data/freescape.dat
    engines/freescape/detection.cpp
    engines/freescape/games/dark/c64.cpp
    engines/freescape/games/eclipse/eclipse.cpp
    engines/freescape/games/eclipse/eclipse.h
    engines/freescape/module.mk


diff --git a/devtools/create_freescape/eclipse_border_Commodore 64.bmp b/devtools/create_freescape/eclipse_border_Commodore 64.bmp
new file mode 100644
index 00000000000..d71c676a7af
Binary files /dev/null and b/devtools/create_freescape/eclipse_border_Commodore 64.bmp differ
diff --git a/dists/engine-data/freescape.dat b/dists/engine-data/freescape.dat
index d43efd48fb4..616d4642e78 100644
Binary files a/dists/engine-data/freescape.dat and b/dists/engine-data/freescape.dat differ
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index e5f38afc52c..a350158326d 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -662,6 +662,15 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_NO_FLAGS,
 		GUIO3(GUIO_NOMIDI, GUIO_RENDEREGA, GUIO_RENDERCGA)
 	},
+	{
+		"totaleclipse", // Tape relese
+		"",
+		AD_ENTRY1s("TOTALECLIPSE.C64.DATA", "70bbb8b122a27a476f908de697098947", 64317),
+		Common::EN_ANY,
+		Common::kPlatformC64,
+		ADGF_UNSTABLE,
+		GUIO1(GUIO_NOMIDI)
+	},
 	{
 		"totaleclipse",
 		"",
diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index b8c063e9937..91d10a8d7f6 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -33,16 +33,16 @@ void DarkEngine::initC64() {
 
 void DarkEngine::loadAssetsC64FullGame() {
 	Common::File file;
-    file.open("darkside.c64.data");
-    loadMessagesFixedSize(&file, 0x1edf, 16, 27);
-    loadFonts(&file, 0xc3e);
-    loadGlobalObjects(&file, 0x20bd, 23);
-    load8bitBinary(&file, 0x9b3e, 16);
-
-    Graphics::Surface *surf = loadBundledImage("dark_border");
-    surf->convertToInPlace(_gfx->_texturePixelFormat);
-    _border = new Graphics::ManagedSurface();
-    _border->copyFrom(*surf);
+	file.open("darkside.c64.data");
+	loadMessagesFixedSize(&file, 0x1edf, 16, 27);
+	loadFonts(&file, 0xc3e);
+	loadGlobalObjects(&file, 0x20bd, 23);
+	load8bitBinary(&file, 0x9b3e, 16);
+
+	Graphics::Surface *surf = loadBundledImage("dark_border");
+	surf->convertToInPlace(_gfx->_texturePixelFormat);
+	_border = new Graphics::ManagedSurface();
+	_border->copyFrom(*surf);
 	surf->free();
 	delete surf;
 }
@@ -90,7 +90,7 @@ void DarkEngine::drawC64UI(Graphics::Surface *surface) {
 	_gfx->readFromPalette(_gfx->_inkColor, r, g, b);
 	uint32 inkColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
-	if (shield >= 0) {
+	/*if (shield >= 0) {
 		Common::Rect shieldBar;
 		shieldBar = Common::Rect(72, 141 - 1, 143 - (_maxShield - shield), 146);
 		surface->fillRect(shieldBar, inkColor);
@@ -106,7 +106,7 @@ void DarkEngine::drawC64UI(Graphics::Surface *surface) {
 
 		energyBar = Common::Rect(72, 148 + 2, 143 - (_maxEnergy - energy), 154 - 2);
 		surface->fillRect(energyBar, front);
-	}
+	}*/
 	drawBinaryClock(surface, 304, 124, front, back);
 }
 
diff --git a/engines/freescape/games/eclipse/c64.cpp b/engines/freescape/games/eclipse/c64.cpp
new file mode 100644
index 00000000000..2e3b1d26864
--- /dev/null
+++ b/engines/freescape/games/eclipse/c64.cpp
@@ -0,0 +1,139 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/file.h"
+
+#include "freescape/freescape.h"
+#include "freescape/games/eclipse/eclipse.h"
+#include "freescape/language/8bitDetokeniser.h"
+
+namespace Freescape {
+
+void EclipseEngine::initC64() {
+	_viewArea = Common::Rect(32, 32, 288, 136);
+}
+
+void EclipseEngine::loadAssetsC64FullGame() {
+	Common::File file;
+	file.open("totaleclipse.c64.data");
+	loadMessagesFixedSize(&file, 0x1d82, 16, 30);
+	loadFonts(&file, 0xc3e);
+	load8bitBinary(&file, 0x9a3e, 16);
+
+	for (auto &it : _areaMap) {
+		it._value->addStructure(_areaMap[255]);
+
+		for (int16 id = 183; id < 207; id++)
+			it._value->addObjectFromArea(id, _areaMap[255]);
+	}
+
+	Graphics::Surface *surf = loadBundledImage("eclipse_border");
+	surf->convertToInPlace(_gfx->_texturePixelFormat);
+	_border = new Graphics::ManagedSurface();
+	_border->copyFrom(*surf);
+	surf->free();
+	delete surf;
+}
+
+
+void EclipseEngine::drawC64UI(Graphics::Surface *surface) {
+	uint32 color = _currentArea->_underFireBackgroundColor;
+	uint8 r, g, b;
+
+	_gfx->readFromPalette(color, r, g, b);
+	uint32 front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	color = _currentArea->_usualBackgroundColor;
+	if (_gfx->_colorRemaps && _gfx->_colorRemaps->contains(color)) {
+		color = (*_gfx->_colorRemaps)[color];
+	}
+
+	_gfx->readFromPalette(color, r, g, b);
+	uint32 back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	_gfx->readFromPalette(7, r, g, b);
+	uint32 gray = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	_gfx->readFromPalette(5, r, g, b);
+	uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	_gfx->readFromPalette(2, r, g, b);
+	uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+
+	int score = _gameStateVars[k8bitVariableScore];
+	int shield = _gameStateVars[k8bitVariableShield] * 100 / _maxShield;
+	int energy = _gameStateVars[k8bitVariableEnergy];
+	shield = shield < 0 ? 0 : shield;
+
+	uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0);
+
+	Common::String message;
+	int deadline;
+	getLatestMessages(message, deadline);
+	if (deadline <= _countdown) {
+		drawStringInSurface(message, 102, 141, back, yellow, surface);
+		_temporaryMessages.push_back(message);
+		_temporaryMessageDeadlines.push_back(deadline);
+	} else if (!_currentAreaMessages.empty())
+		drawStringInSurface(_currentArea->_name, 102, 141, back, yellow, surface);
+
+	Common::String scoreStr = Common::String::format("%07d", score);
+	Common::String encodedScoreStr = shiftStr(scoreStr, 'Z' - '0' + 1);
+	drawStringInSurface(encodedScoreStr, 133, 11, back, gray, surface, 'Z' - '0' + 1);
+
+	Common::String shieldStr = Common::String::format("%d", shield);
+
+	int x = 171;
+	if (shield < 10)
+		x = 179;
+	else if (shield < 100)
+		x = 175;
+
+	if (energy < 0)
+		energy = 0;
+
+	drawStringInSurface(shieldStr, x, 161, back, red, surface);
+
+	Common::Rect jarBackground(120, 162, 144, 192 - 4);
+	surface->fillRect(jarBackground, back);
+
+	Common::Rect jarWater(120, 192 - energy - 4, 144, 192 - 4);
+	surface->fillRect(jarWater, blue);
+
+	drawStringInSurface(shiftStr("0", 'Z' - '$' + 1 - _angleRotationIndex), 79, 141, back, yellow, surface);
+	drawStringInSurface(shiftStr("3", 'Z' - '$' + 1 - _playerStepIndex), 63, 141, back, yellow, surface);
+	drawStringInSurface(shiftStr("7", 'Z' - '$' + 1 - _playerHeightNumber), 240, 141, back, yellow, surface);
+
+	if (_shootingFrames > 0) {
+		drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 141, back, yellow, surface);
+		drawStringInSurface(shiftStr("<", 'Z' - '$' + 1) , 240, 141, back, yellow, surface);
+	}
+	drawAnalogClock(surface, 89, 172, back, back, gray);
+
+	surface->fillRect(Common::Rect(227, 168, 235, 187), gray);
+	drawCompass(surface, 231, 177, _yaw, 10, back);
+
+	//drawIndicator(surface, 65, 7, 8);
+	drawEclipseIndicator(surface, 215, 3, front, gray);
+}
+
+} // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index c47be2c9d92..ebb02609164 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -57,6 +57,8 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 		initDOS();
 	else if (isCPC())
 		initCPC();
+	else if (isC64())
+		initC64();
 	else if (isSpectrum())
 		initZX();
 	else if (isAmiga() || isAtariST())
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index 31605e38085..eb177c5fd13 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -66,10 +66,12 @@ public:
 	void initDOS();
 	void initCPC();
 	void initZX();
+	void initC64();
 	void initAmigaAtari();
 
 	void loadAssetsZXFullGame() override;
 	void loadAssetsCPCFullGame() override;
+	void loadAssetsC64FullGame() override;
 	void loadAssetsAtariFullGame() override;
 	void loadAssetsCPCDemo() override;
 	void loadAssetsZXDemo() override;
@@ -81,6 +83,7 @@ public:
 	void drawBackground() override;
 	void drawDOSUI(Graphics::Surface *surface) override;
 	void drawCPCUI(Graphics::Surface *surface) override;
+	void drawC64UI(Graphics::Surface *surface) override;
 	void drawZXUI(Graphics::Surface *surface) override;
 	void drawAnalogClock(Graphics::Surface *surface, int x, int y, uint32 colorHand1, uint32 colorHand2, uint32 colorBack);
 	void drawAnalogClockHand(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
diff --git a/engines/freescape/module.mk b/engines/freescape/module.mk
index bdeafb8e8d0..12c60dce2af 100644
--- a/engines/freescape/module.mk
+++ b/engines/freescape/module.mk
@@ -29,6 +29,7 @@ MODULE_OBJS := \
 	games/driller/driller.o \
 	games/driller/zx.o \
 	games/eclipse/atari.o \
+	games/eclipse/c64.o \
 	games/eclipse/dos.o \
 	games/eclipse/eclipse.o \
 	games/eclipse/cpc.o \


Commit: d62da74e5680c05b91dae9ed5e1b531db8b1caf5
    https://github.com/scummvm/scummvm/commit/d62da74e5680c05b91dae9ed5e1b531db8b1caf5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: added title screens for dark and eclipse c64 releases

Changed paths:
    engines/freescape/doodle.cpp
    engines/freescape/games/dark/c64.cpp
    engines/freescape/games/driller/c64.cpp
    engines/freescape/games/eclipse/c64.cpp
    engines/freescape/games/palettes.cpp


diff --git a/engines/freescape/doodle.cpp b/engines/freescape/doodle.cpp
index 96b22249fc6..c7174f8c858 100644
--- a/engines/freescape/doodle.cpp
+++ b/engines/freescape/doodle.cpp
@@ -34,12 +34,12 @@ bool DoodleDecoder::loadStreams(Common::SeekableReadStream &highresStream,
 	destroy();
 
 	// Check stream sizes
-	if (highresStream.size() != 8192) {
+	if (highresStream.size() < 8187) {
 		error("DoodleDecoder: Invalid high-resolution data size");
 		return false;
 	}
 
-	if (colorStream1.size() != 1026 || colorStream2.size() != 1026) {
+	if (colorStream1.size() < 1003 || colorStream2.size() < 1003) {
 		error("DoodleDecoder: Invalid color data size");
 		return false;
 	}
diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index 91d10a8d7f6..2807148f700 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -31,6 +31,8 @@ void DarkEngine::initC64() {
 	_viewArea = Common::Rect(32, 24, 288, 127);
 }
 
+extern byte kC64Palette[16][3];
+
 void DarkEngine::loadAssetsC64FullGame() {
 	Common::File file;
 	file.open("darkside.c64.data");
@@ -45,6 +47,16 @@ void DarkEngine::loadAssetsC64FullGame() {
 	_border->copyFrom(*surf);
 	surf->free();
 	delete surf;
+
+	file.close();
+	file.open("darkside.c64.title.bitmap");
+
+	Common::File colorFile1;
+	colorFile1.open("darkside.c64.title.colors1");
+	Common::File colorFile2;
+	colorFile2.open("darkside.c64.title.colors2");
+
+	_title = loadAndConvertDoodleImage(&file, &colorFile1, &colorFile2, (byte *)&kC64Palette);
 }
 
 
diff --git a/engines/freescape/games/driller/c64.cpp b/engines/freescape/games/driller/c64.cpp
index aef3b6eed91..cf10eacb67e 100644
--- a/engines/freescape/games/driller/c64.cpp
+++ b/engines/freescape/games/driller/c64.cpp
@@ -27,7 +27,7 @@
 
 namespace Freescape {
 
-extern byte kDrillerC64Palette[16][3];
+extern byte kC64Palette[16][3];
 
 void DrillerEngine::initC64() {
 	_viewArea = Common::Rect(32, 16, 288, 120);
@@ -148,7 +148,7 @@ void DrillerEngine::loadAssetsC64FullGame() {
 		surf->free();
 		delete surf;
 
-		/*file.close();
+		file.close();
 		file.open("driller.c64.title.bitmap");
 
 		Common::File colorFile1;
@@ -156,7 +156,7 @@ void DrillerEngine::loadAssetsC64FullGame() {
 		Common::File colorFile2;
 		colorFile2.open("driller.c64.title.colors2");
 
-		_title = loadAndConvertDoodleImage(&file, &colorFile1, &colorFile2, (byte *)&kDrillerC64Palette);*/
+		_title = loadAndConvertDoodleImage(&file, &colorFile1, &colorFile2, (byte *)&kC64Palette);
 	} else
 		error("Unknown C64 release");
 
diff --git a/engines/freescape/games/eclipse/c64.cpp b/engines/freescape/games/eclipse/c64.cpp
index 2e3b1d26864..8a0b9a45717 100644
--- a/engines/freescape/games/eclipse/c64.cpp
+++ b/engines/freescape/games/eclipse/c64.cpp
@@ -31,6 +31,8 @@ void EclipseEngine::initC64() {
 	_viewArea = Common::Rect(32, 32, 288, 136);
 }
 
+extern byte kC64Palette[16][3];
+
 void EclipseEngine::loadAssetsC64FullGame() {
 	Common::File file;
 	file.open("totaleclipse.c64.data");
@@ -51,6 +53,16 @@ void EclipseEngine::loadAssetsC64FullGame() {
 	_border->copyFrom(*surf);
 	surf->free();
 	delete surf;
+
+	file.close();
+	file.open("totaleclipse.c64.title.bitmap");
+
+	Common::File colorFile1;
+	colorFile1.open("totaleclipse.c64.title.colors1");
+	Common::File colorFile2;
+	colorFile2.open("totaleclipse.c64.title.colors2");
+
+	_title = loadAndConvertDoodleImage(&file, &colorFile1, &colorFile2, (byte *)&kC64Palette);
 }
 
 
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 2e3889097f4..c666fc09d3a 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -61,7 +61,7 @@ byte kHerculesPaletteGreen[2][3] = {
 	{0x00, 0xff, 0x00},
 };
 
-byte kDrillerC64Palette[16][3] = {
+byte kC64Palette[16][3] = {
 	{0x00, 0x00, 0x00},
 	{0xFF, 0xFF, 0xFF},
 	{0x68, 0x37, 0x2B},
@@ -131,7 +131,7 @@ void FreescapeEngine::loadColorPalette() {
 	if (_renderMode == Common::kRenderEGA) {
 		_gfx->_palette = (byte *)&kEGADefaultPalette;
 	} else if (_renderMode == Common::kRenderC64) {
-		_gfx->_palette = (byte *)&kDrillerC64Palette;
+		_gfx->_palette = (byte *)&kC64Palette;
 	} else if (_renderMode == Common::kRenderZX) {
 		_gfx->_palette = (byte *)kDrillerZXPalette;
 	} else if (_renderMode == Common::kRenderCPC) {


Commit: d682fc3aaa7c42bfd03597ffd9676de5cc202f52
    https://github.com/scummvm/scummvm/commit/d682fc3aaa7c42bfd03597ffd9676de5cc202f52
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-23T09:56:30+02:00

Commit Message:
FREESCAPE: fixed shield and energy bar for c64 release of dark

Changed paths:
    engines/freescape/games/dark/c64.cpp


diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index 2807148f700..4912396151e 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -99,26 +99,44 @@ void DarkEngine::drawC64UI(Graphics::Surface *surface) {
 	int energy = _gameStateVars[k8bitVariableEnergy]; // called fuel in this game
 	int shield = _gameStateVars[k8bitVariableShield];
 
-	_gfx->readFromPalette(_gfx->_inkColor, r, g, b);
-	uint32 inkColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+	_gfx->readFromPalette(6, r, g, b); // Violet Blue
+	uint32 outBarColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
-	/*if (shield >= 0) {
+	_gfx->readFromPalette(14, r, g, b); // Violet
+	uint32 inBarColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	_gfx->readFromPalette(3, r, g, b); // Light Blue
+	uint32 lineColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+	Common::Rect coverBar;
+	coverBar = Common::Rect(64, 144, 135, 151);
+	surface->fillRect(coverBar, back);
+
+	if (shield >= 0) {
 		Common::Rect shieldBar;
-		shieldBar = Common::Rect(72, 141 - 1, 143 - (_maxShield - shield), 146);
-		surface->fillRect(shieldBar, inkColor);
 
-		shieldBar = Common::Rect(72, 143 - 1, 143 - (_maxShield - shield), 144);
-		surface->fillRect(shieldBar, front);
+		shieldBar = Common::Rect(64, 144, 127 - (_maxShield - shield), 151);
+		surface->fillRect(shieldBar, outBarColor);
+
+		shieldBar = Common::Rect(64, 146, 127 - (_maxShield - shield), 149);
+		surface->fillRect(shieldBar, inBarColor);
+		if (shield >= 1)
+			surface->drawLine(64, 147, 127 - (_maxShield - shield) - 1, 147, lineColor);
 	}
 
+	coverBar = Common::Rect(64, 144 + 8, 127, 159);
+	surface->fillRect(coverBar, back);
+
 	if (energy >= 0) {
 		Common::Rect energyBar;
-		energyBar = Common::Rect(72, 147 + 1, 143 - (_maxEnergy - energy), 155 - 1);
-		surface->fillRect(energyBar, inkColor);
+		energyBar = Common::Rect(64, 144 + 8, 127 - (_maxEnergy - energy), 159);
+		surface->fillRect(energyBar, outBarColor);
 
-		energyBar = Common::Rect(72, 148 + 2, 143 - (_maxEnergy - energy), 154 - 2);
-		surface->fillRect(energyBar, front);
-	}*/
+		energyBar = Common::Rect(64, 146 + 8, 127 - (_maxEnergy - energy), 157);
+		surface->fillRect(energyBar, inBarColor);
+		if (energy >= 1)
+			surface->drawLine(64, 147 + 8, 127 - (_maxEnergy - energy) - 1, 155, lineColor);
+	}
 	drawBinaryClock(surface, 304, 124, front, back);
 }
 




More information about the Scummvm-git-logs mailing list