[Scummvm-git-logs] scummvm master -> 75f871921d5c0de1db9cfcf9c98185d806348a7c

bluegr noreply at scummvm.org
Fri Mar 20 01:50:27 UTC 2026


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

Summary:
acbaf7c810 AGOS: Personal Nightmare - wait command fixes
75f871921d AGOS: PN - ST/Amiga - Use 16 colours instead of 256


Commit: acbaf7c810ca7a157a3fec4a2e0a5782524ed7cf
    https://github.com/scummvm/scummvm/commit/acbaf7c810ca7a157a3fec4a2e0a5782524ed7cf
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-03-20T03:50:21+02:00

Commit Message:
AGOS: Personal Nightmare - wait command fixes

Changed paths:
    engines/agos/agos.cpp
    engines/agos/agos.h
    engines/agos/script_pn.cpp
    engines/agos/vga.cpp


diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 2e9154ff5db..aee5ff9410a 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -533,6 +533,8 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
 	_musicVolume = 192;
 	_effectsVolume = 192;
 	_useDigitalSfx = true;
+	_pendingWaitCommandDelay = false;
+	_pendingPNWaitScreenDelay = false;
 
 	_saveLoadType = 0;
 	_saveLoadSlot = 0;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index bf50d781ae6..8c57fc30e7b 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -641,6 +641,8 @@ protected:
 	// and/or ambient sounds are currently muted.
 	uint16 _effectsVolume;
 	bool _useDigitalSfx;
+	bool _pendingWaitCommandDelay;
+	bool _pendingPNWaitScreenDelay;
 
 	uint8 _saveGameNameLen;
 	uint16 _saveLoadRowCurPos;
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index 1e63709dd7e..3cb698b8330 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -24,6 +24,7 @@
 #include "agos/vga.h"
 
 #include "common/endian.h"
+#include "common/str.h"
 #include "common/textconsole.h"
 
 namespace AGOS {
@@ -500,6 +501,10 @@ void AGOSEngine_PN::opn_opcode37() {
 	_inputReady = true;
 	interact(_inputline, 49);
 
+	Common::String typed(_inputline);
+	typed.trim();
+	_pendingWaitCommandDelay = typed.equalsIgnoreCase("wait");
+
 	if ((_inpp = strchr(_inputline,'\n')) != nullptr)
 		*_inpp = '\0';
 	_inpp = _inputline;
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 15eb01c4b91..ce68676d1d8 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -32,6 +32,7 @@
 #include "common/system.h"
 #include "common/textconsole.h"
 
+#include "graphics/paletteman.h"
 #include "graphics/surface.h"
 
 namespace AGOS {
@@ -613,6 +614,19 @@ void AGOSEngine::vc10_draw() {
 	}
 
 	drawImage_init(image, palette, x, y, flags);
+
+	if (getGameType() == GType_PN && image == 172 &&
+		(_pendingPNWaitScreenDelay || (getPlatform() == Common::kPlatformDOS && _pendingWaitCommandDelay))) {
+
+		if (_displayFlag) {
+			displayScreen();
+			_displayFlag = 0;
+		}
+
+		_pendingPNWaitScreenDelay = false;
+		_pendingWaitCommandDelay = false;
+		delay(2000);
+	}
 }
 
 void AGOSEngine::drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags) {
@@ -924,8 +938,7 @@ static const uint8 iconPalette[64] = {
 void AGOSEngine::vc22_setPalette() {
 	byte *offs, *palptr, *src;
 	uint16 b, num;
-
-	b = vcReadNextWord();
+	const uint16 origB = b = vcReadNextWord();
 
 	// PC EGA version of Personal Nightmare uses standard EGA palette
 	if (getGameType() == GType_PN && (getFeatures() & GF_EGA))
@@ -992,6 +1005,23 @@ void AGOSEngine::vc22_setPalette() {
 		src += 2;
 	} while (--num);
 
+	if (getGameType() == GType_PN && origB == 9 &&
+			(getPlatform() == Common::kPlatformAtariST || getPlatform() == Common::kPlatformAmiga)) {
+		// Workaround for Atari ST and Amiga 'time passes' screen palette.
+		for (int i = 12; i <= 13; ++i) {
+			byte *entry = _displayPalette + i * 3;
+			const uint grey = (entry[0] * 30 + entry[1] * 59 + entry[2] * 11) / 100;
+			entry[0] = grey;
+			entry[1] = grey;
+			entry[2] = grey;
+		}
+
+		memcpy(_currentPalette, _displayPalette, sizeof(_displayPalette));
+		_system->getPaletteManager()->setPalette(_displayPalette, 0, 256);
+		_paletteFlag = 0;
+		_pendingPNWaitScreenDelay = true;
+	}
+
 	_paletteFlag = 2;
 	_vgaSpriteChanged++;
 }


Commit: 75f871921d5c0de1db9cfcf9c98185d806348a7c
    https://github.com/scummvm/scummvm/commit/75f871921d5c0de1db9cfcf9c98185d806348a7c
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-03-20T03:50:21+02:00

Commit Message:
AGOS: PN - ST/Amiga - Use 16 colours instead of 256

Changed paths:
    engines/agos/vga.cpp


diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index ce68676d1d8..852a50216d9 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -1016,8 +1016,8 @@ void AGOSEngine::vc22_setPalette() {
 			entry[2] = grey;
 		}
 
-		memcpy(_currentPalette, _displayPalette, sizeof(_displayPalette));
-		_system->getPaletteManager()->setPalette(_displayPalette, 0, 256);
+		memcpy(_currentPalette, _displayPalette, 16 * 3);
+		_system->getPaletteManager()->setPalette(_displayPalette, 0, 16);
 		_paletteFlag = 0;
 		_pendingPNWaitScreenDelay = true;
 	}




More information about the Scummvm-git-logs mailing list