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

neuromancer noreply at scummvm.org
Sun Dec 4 20:22:30 UTC 2022


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

Summary:
0febf99aef FREESCAPE: avoid rendering coordinates using an invalid font in driller demos
ea0b490355 FREESCAPE: make sure driller demos finishes before the end of the data


Commit: 0febf99aef07a52b765df3bb2f46fc7f706e0b24
    https://github.com/scummvm/scummvm/commit/0febf99aef07a52b765df3bb2f46fc7f706e0b24
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-04T21:22:14+01:00

Commit Message:
FREESCAPE: avoid rendering coordinates using an invalid font in driller demos

Changed paths:
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index ec12a225e32..f57cb3c3b94 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -484,20 +484,22 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
 	int score = _gameStateVars[k8bitVariableScore];
 	Common::String coords;
 
-	drawStringInSurface("x", 37, 18, white, transparent, surface, 82);
-	coords = Common::String::format("%04d", 2 * int(_position.x()));
-	for (int i = 0; i < 4; i++)
-		drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 18, white, transparent, surface, 112);
-
-	drawStringInSurface("y", 37, 26, white, transparent, surface, 82);
-	coords = Common::String::format("%04d", 2 * int(_position.z())); // Coords y and z are swapped!
-	for (int i = 0; i < 4; i++)
-		drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 26, white, transparent, surface, 112);
-
-	drawStringInSurface("z", 37, 34, white, transparent, surface, 82);
-	coords = Common::String::format("%04d", 2 * int(_position.y())); // Coords y and z are swapped!
-	for (int i = 0; i < 4; i++)
-		drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 34, white, transparent, surface, 112);
+	if (!isDemo()) { // It seems demos will not include the complete font?
+		drawStringInSurface("x", 37, 18, white, transparent, surface, 82);
+		coords = Common::String::format("%04d", 2 * int(_position.x()));
+		for (int i = 0; i < 4; i++)
+			drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 18, white, transparent, surface, 112);
+
+		drawStringInSurface("y", 37, 26, white, transparent, surface, 82);
+		coords = Common::String::format("%04d", 2 * int(_position.z())); // Coords y and z are swapped!
+		for (int i = 0; i < 4; i++)
+			drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 26, white, transparent, surface, 112);
+
+		drawStringInSurface("z", 37, 34, white, transparent, surface, 82);
+		coords = Common::String::format("%04d", 2 * int(_position.y())); // Coords y and z are swapped!
+		for (int i = 0; i < 4; i++)
+			drawStringInSurface(Common::String(coords[i]), 47 + 6*i, 34, white, transparent, surface, 112);
+	}
 
 	drawStringInSurface(_currentArea->_name, 188, 185, yellow, black, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 240, 129, yellow, black, surface);


Commit: ea0b49035564394eacad7c783340bd904e8702b2
    https://github.com/scummvm/scummvm/commit/ea0b49035564394eacad7c783340bd904e8702b2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-04T21:22:14+01:00

Commit Message:
FREESCAPE: make sure driller demos finishes before the end of the data

Changed paths:
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index f57cb3c3b94..a34bf31b192 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -871,9 +871,15 @@ void DrillerEngine::initGameState() {
 	_playerHeight = _playerHeights[_playerHeightNumber];
 	removeTimers();
 	startCountdown(_initialCountdown);
+
+	_demoIndex = 0;
+	_demoEvents.clear();
 }
 
 bool DrillerEngine::checkIfGameEnded() {
+	if (isDemo())
+		return (_demoData[_demoIndex + 1] == 0x5f);
+
 	if (_countdown <= 0) {
 		insertTemporaryMessage(_messagesList[14], _countdown - 2);
 		drawFrame();




More information about the Scummvm-git-logs mailing list