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

neuromancer noreply at scummvm.org
Tue Nov 29 12:28:35 UTC 2022


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

Summary:
ee3d1386be FREESCAPE: implemented spfx instruction for amiga/atari driller releases


Commit: ee3d1386bee83906a7ff9f36dec0206831e27ac8
    https://github.com/scummvm/scummvm/commit/ee3d1386bee83906a7ff9f36dec0206831e27ac8
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-29T13:29:16+01:00

Commit Message:
FREESCAPE: implemented spfx instruction for amiga/atari driller releases

Changed paths:
    engines/freescape/language/instruction.cpp


diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index 0132c5caf2b..5cd2ee8de27 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -183,7 +183,7 @@ void FreescapeEngine::executeRedraw(FCLInstruction &instruction) {
 	drawFrame();
 	_gfx->flipBuffer();
 	g_system->updateScreen();
-	g_system->delayMillis(10);
+	g_system->delayMillis(20);
 }
 
 void FreescapeEngine::executeSound(FCLInstruction &instruction) {
@@ -207,11 +207,37 @@ void FreescapeEngine::executePrint(FCLInstruction &instruction) {
 }
 
 void FreescapeEngine::executeSPFX(FCLInstruction &instruction) {
-	uint16 index = instruction._source;
-	uint16 color = instruction._destination;
+	uint16 src = instruction._source;
+	uint16 dst = instruction._destination;
+	if (isAmiga() || isAtariST()) {
+		int color;
+		if (src == 0 && dst >= 2 && dst <= 5) {
+			_currentArea->remapColor(dst, 1);
+			return;
+		} if (src == 0) {
+			color = dst;
+		} else if (src > 0) {
 
-	debugC(1, kFreescapeDebugCode, "Switching palette from position %d to %d", index, color);
-	_currentArea->remapColor(index, color);
+			switch (src) {
+			case 1:
+				color = 15;
+			break;
+			case 2:
+				color = 14;
+			break;
+			default:
+				color = 0;
+			}
+		}
+
+		debugC(1, kFreescapeDebugCode, "Switching complete palette to color %d", dst);
+		for (int i = 1; i < 16; i++)
+			_currentArea->remapColor(i, color);
+	} else if (isDOS()) {
+		debugC(1, kFreescapeDebugCode, "Switching palette from position %d to %d", src, dst);
+		_currentArea->remapColor(src, dst);
+	}
+	executeRedraw(instruction);
 }
 
 




More information about the Scummvm-git-logs mailing list