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

neuromancer noreply at scummvm.org
Tue Aug 8 18:36:14 UTC 2023


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:
3d092789a7 FREESCAPE: add support for another atari driller demo
7305e9f7de FREESCAPE: add support for another amiga driller demo
7354d58151 FREESCAPE: parse game timeout in dark
15f1a4a0b7 FREESCAPE: load border from amiga release of dark
e5d23a4dd2 FREESCAPE: implemented binary clock in dark


Commit: 3d092789a707ab3073b416bd0353801f65c9e67a
    https://github.com/scummvm/scummvm/commit/3d092789a707ab3073b416bd0353801f65c9e67a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-08T20:19:06+02:00

Commit Message:
FREESCAPE: add support for another atari driller demo

Changed paths:
    engines/freescape/detection.cpp
    engines/freescape/freescape.h
    engines/freescape/games/driller/atari.cpp
    engines/freescape/games/driller/driller.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index ef2a618e66f..83d06a150b8 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -259,7 +259,7 @@ static const ADGameDescription gameDescriptions[] = {
 		},
 		Common::EN_ANY,
 		Common::kPlatformAtariST,
-		ADGF_DEMO,
+		ADGF_DEMO | GF_ATARI_MAGAZINE_DEMO,
 		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
 	},
 	{
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index fca316a621a..d515801672a 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -437,6 +437,8 @@ enum DrillerReleaseFlags {
 		GF_CPC_VIRTUALWORLDS = (1 << 8),
 		GF_ATARI_RETAIL = (1 << 9),
 		GF_ATARI_BUDGET = (1 << 10),
+		GF_AMIGA_MAGAZINE_DEMO = (1 << 11),
+		GF_ATARI_MAGAZINE_DEMO = (1 << 12),
 };
 
 class DrillerEngine : public FreescapeEngine {
diff --git a/engines/freescape/games/driller/atari.cpp b/engines/freescape/games/driller/atari.cpp
index 5cf36467991..1e4d2f5c3ff 100644
--- a/engines/freescape/games/driller/atari.cpp
+++ b/engines/freescape/games/driller/atari.cpp
@@ -148,13 +148,26 @@ void DrillerEngine::loadAssetsAtariDemo() {
 	loadPalettes(&file, 0x0);
 
 	file.close();
-	file.open("x.prg");
-	if (!file.isOpen())
-		error("Failed to open 'x.prg' file");
+	if (_variant & GF_ATARI_MAGAZINE_DEMO) {
+		file.open("auto_x.prg");
+		if (!file.isOpen())
+			error("Failed to open 'auto_x.prg' file");
+		_demoMode = false;
+	} else {
+		file.open("x.prg");
+		if (!file.isOpen())
+			error("Failed to open 'x.prg' file");
+	}
 
-	loadFonts(&file, 0x7bc);
-	loadMessagesFixedSize(&file, 0x3b90, 14, 20);
-	loadGlobalObjects(&file, 0x3946, 8);
+	if (_variant & GF_ATARI_MAGAZINE_DEMO) {
+		loadFonts(&file, 0x7ee);
+		loadMessagesFixedSize(&file, 0x40d2, 14, 20);
+		loadGlobalObjects(&file, 0x3e88, 8);
+	} else {
+		loadFonts(&file, 0x7bc);
+		loadMessagesFixedSize(&file, 0x3b90, 14, 20);
+		loadGlobalObjects(&file, 0x3946, 8);
+	}
 
 	file.close();
 	file.open("soundfx");
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 36d8adefa9c..32911b26f7c 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -83,7 +83,7 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 	assert(!_drillBase->isDestroyed() && !_drillBase->isInvisible());
 
 	if (isDemo()) {
-		_demoMode = !_disableDemoMode; // All the driller demos are non-interactive
+		_demoMode = !_disableDemoMode; // Most of the driller demos are non-interactive
 		_angleRotationIndex = 0;
 	}
 }


Commit: 7305e9f7de881809b77f2d7971e1e5e397135c4d
    https://github.com/scummvm/scummvm/commit/7305e9f7de881809b77f2d7971e1e5e397135c4d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-08T20:19:06+02:00

Commit Message:
FREESCAPE: add support for another amiga driller demo

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


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 83d06a150b8..5fc3d2bf8ae 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -248,6 +248,20 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_DEMO,
 		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
 	},
+	{
+		"driller",
+		"Demo",
+		{
+			{"driller", 0, "ff9b84a6526de87a301f7aba5c2d87d9", 164736},
+			{"data", 0, "6add87a10042d0a9fd32c62ed56b7690", 24220},
+			{"demo.cmd", 0, "247601bec1bfa858955749364c876609", 4096},
+			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformAmiga,
+		ADGF_DEMO | GF_AMIGA_MAGAZINE_DEMO,
+		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
+	},
 	{
 		"driller",
 		"Demo",
diff --git a/engines/freescape/games/driller/amiga.cpp b/engines/freescape/games/driller/amiga.cpp
index 7d52c17d6fe..273a7ce1ef3 100644
--- a/engines/freescape/games/driller/amiga.cpp
+++ b/engines/freescape/games/driller/amiga.cpp
@@ -118,9 +118,16 @@ void DrillerEngine::loadAssetsAmigaDemo() {
 	if (!file.isOpen())
 		error("Failed to open 'driller' file");
 
-	loadFonts(&file, 0xa30);
-	loadMessagesFixedSize(&file, 0x3960, 14, 20);
-	loadGlobalObjects(&file, 0x3716, 8);
+	if (_variant | GF_AMIGA_MAGAZINE_DEMO) {
+		loadFonts(&file, 0xa62);
+		loadMessagesFixedSize(&file, 0x3df0, 14, 20);
+		loadGlobalObjects(&file, 0x3ba6, 8);
+		_demoMode = false;
+	} else {
+		loadFonts(&file, 0xa30);
+		loadMessagesFixedSize(&file, 0x3960, 14, 20);
+		loadGlobalObjects(&file, 0x3716, 8);
+	}
 
 	file.close();
 	file.open("soundfx");
@@ -145,7 +152,8 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
 	int score = _gameStateVars[k8bitVariableScore];
 	Common::String coords;
 
-	if (!isDemo()) { // It seems demos will not include the complete font?
+	// It seems that some demos will not include the complete font
+	if (!isDemo() || (_variant | GF_AMIGA_MAGAZINE_DEMO) || (_variant | GF_ATARI_MAGAZINE_DEMO)) {
 		drawStringInSurface("x", 37, 18, white, transparent, surface, 82);
 		coords = Common::String::format("%04d", 2 * int(_position.x()));
 		for (int i = 0; i < 4; i++)


Commit: 7354d5815186987623296f2a7da47ebd5f1f7663
    https://github.com/scummvm/scummvm/commit/7354d5815186987623296f2a7da47ebd5f1f7663
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-08T20:19:06+02:00

Commit Message:
FREESCAPE: parse game timeout in dark

Changed paths:
    engines/freescape/loaders/8bitBinaryLoader.cpp


diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index fd6af7d4eaf..b76e0b81ed4 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -693,21 +693,27 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
 		}
 	}
 
-	if (isDriller()) {
+	if (isDriller() || isDark()) {
+		debugC(1, kFreescapeDebugParser, "Time to finish the game:");
 		if (isAmiga() || isAtariST())
 			file->seek(offset + 0x168);
 		else
 			file->seek(offset + 0xb4);
 		Common::String n;
+
+		if (isDriller()) {
+			n += char(readField(file, 8));
+			n += char(readField(file, 8));
+			debugC(1, kFreescapeDebugParser, "'%s' hours", n.c_str());
+			_initialCountdown =_initialCountdown + 3600 * atoi(n.c_str());
+			n.clear();
+			n += char(readField(file, 8));
+			assert(n == ":");
+			n.clear();
+		}
 		n += char(readField(file, 8));
 		n += char(readField(file, 8));
-		_initialCountdown =_initialCountdown + 3600 * atoi(n.c_str());
-		n.clear();
-		n += char(readField(file, 8));
-		assert(n == ":");
-		n.clear();
-		n += char(readField(file, 8));
-		n += char(readField(file, 8));
+		debugC(1, kFreescapeDebugParser, "'%s' minutes", n.c_str());
 		_initialCountdown = _initialCountdown + 60 * atoi(n.c_str());
 		n.clear();
 		n += char(readField(file, 8));
@@ -715,13 +721,11 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
 		n.clear();
 		n += char(readField(file, 8));
 		n += char(readField(file, 8));
+		debugC(1, kFreescapeDebugParser, "'%s' seconds", n.c_str());
 		_initialCountdown = _initialCountdown + atoi(n.c_str());
-
 		if (_useExtendedTimer)
 			_initialCountdown = 359999; // 99:59:59
-	} else if (isDark())
-		_initialCountdown = 2 * 3600; // 02:00:00
-	else if (isCastle())
+	} else if (isCastle())
 		_initialCountdown = 1000000000;
 
 	if (isAmiga() || isAtariST())


Commit: 15f1a4a0b7b08bc09428acdb86cdd141256f66d4
    https://github.com/scummvm/scummvm/commit/15f1a4a0b7b08bc09428acdb86cdd141256f66d4
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-08T20:19:06+02:00

Commit Message:
FREESCAPE: load border from amiga release of dark

Changed paths:
    engines/freescape/freescape.h
    engines/freescape/games/dark/amiga.cpp
    engines/freescape/games/dark/dark.cpp


diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index d515801672a..e93174bcbbc 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -547,6 +547,7 @@ public:
 	void executePrint(FCLInstruction &instruction) override;
 
 	void initDOS();
+	void initAmigaAtari();
 	void initZX();
 
 	void loadAssetsDOSFullGame() override;
@@ -562,6 +563,8 @@ public:
 	void drawSensorShoot(Sensor *sensor) override;
 	void drawDOSUI(Graphics::Surface *surface) override;
 	void drawZXUI(Graphics::Surface *surface) override;
+	void drawAmigaAtariSTUI(Graphics::Surface *surface) override;
+
 
 	void drawInfoMenu() override;
 	void drawFullscreenMessageAndWait(Common::String message);
diff --git a/engines/freescape/games/dark/amiga.cpp b/engines/freescape/games/dark/amiga.cpp
index a032595036c..6647b6239f8 100644
--- a/engines/freescape/games/dark/amiga.cpp
+++ b/engines/freescape/games/dark/amiga.cpp
@@ -72,8 +72,16 @@ Common::SeekableReadStream *DarkEngine::decryptFile(const Common::String filenam
 
 void DarkEngine::loadAssetsAmigaFullGame() {
 	Common::SeekableReadStream *stream = decryptFile("1.drk");
+	_border = loadAndConvertNeoImage(stream, 0x1b762);
 	load8bitBinary(stream, 0x2e96a, 16);
 	loadPalettes(stream, 0x2e638);
 }
 
+void DarkEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
+}
+
+void DarkEngine::initAmigaAtari() {
+	_viewArea = Common::Rect(32, 33, 287, 130);
+}
+
 } // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index aca8431ecd1..11d11cb343e 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -34,6 +34,8 @@ DarkEngine::DarkEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEn
 		initDOS();
 	else if (isSpectrum())
 		initZX();
+	else if (isAmiga() || isAtariST())
+		initAmigaAtari();
 
 	_playerHeightNumber = 1;
 	_playerHeights.push_back(16);


Commit: e5d23a4dd215203a07cb2ea2bc957852295d8c1c
    https://github.com/scummvm/scummvm/commit/e5d23a4dd215203a07cb2ea2bc957852295d8c1c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-08T20:19:06+02:00

Commit Message:
FREESCAPE: implemented binary clock in dark

Changed paths:
    engines/freescape/freescape.h
    engines/freescape/games/dark/dark.cpp
    engines/freescape/games/dark/dos.cpp
    engines/freescape/games/dark/zx.cpp


diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index e93174bcbbc..3ac4d4baf3a 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -560,6 +560,7 @@ public:
 	int _lastSecond;
 	void updateTimeVariables() override;
 
+	void drawBinaryClock(Graphics::Surface *surface, int xPosition, int yPosition, uint32 front, uint32 back);
 	void drawSensorShoot(Sensor *sensor) override;
 	void drawDOSUI(Graphics::Surface *surface) override;
 	void drawZXUI(Graphics::Surface *surface) override;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 11d11cb343e..13fa4950073 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -652,6 +652,17 @@ void DarkEngine::drawFullscreenMessageAndWait(Common::String message) {
 	delete surface;
 }
 
+void DarkEngine::drawBinaryClock(Graphics::Surface *surface, int xPosition, int yPosition, uint32 front, uint32 back) {
+	int number = _ticks / 2;
+	int bits = 0;
+	while (bits <= 15) {
+		int y = yPosition - (7 * bits);
+		surface->drawLine(xPosition, y, xPosition + 3, y, number & 1 ? front : back);
+		number = number >> 1;
+		bits++;
+	}
+}
+
 void DarkEngine::drawSensorShoot(Sensor *sensor) {
 	Math::Vector3d target;
 	target = _position;
diff --git a/engines/freescape/games/dark/dos.cpp b/engines/freescape/games/dark/dos.cpp
index 3e74feba46f..6a2cbb95528 100644
--- a/engines/freescape/games/dark/dos.cpp
+++ b/engines/freescape/games/dark/dos.cpp
@@ -178,6 +178,8 @@ void DarkEngine::drawDOSUI(Graphics::Surface *surface) {
 		energyBar = Common::Rect(72, 148, 151 - (_maxEnergy - energy), 153);
 		surface->fillRect(energyBar, blue);
 	}
+	uint32 clockColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0xFF);
+	drawBinaryClock(surface, 300, 124, clockColor, back);
 }
 
 } // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/dark/zx.cpp b/engines/freescape/games/dark/zx.cpp
index b097204b39d..51d6ae87000 100644
--- a/engines/freescape/games/dark/zx.cpp
+++ b/engines/freescape/games/dark/zx.cpp
@@ -127,6 +127,8 @@ void DarkEngine::drawZXUI(Graphics::Surface *surface) {
 		energyBar = Common::Rect(80, 148, 143 - (_maxEnergy - energy), 154);
 		surface->fillRect(energyBar, front);
 	}
+	uint32 clockColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x00, 0x00);
+	drawBinaryClock(surface, 273, 128, clockColor, back);
 }
 
 } // End of namespace Freescape
\ No newline at end of file




More information about the Scummvm-git-logs mailing list