[Scummvm-git-logs] scummvm master -> 1fefea04b7b53b96420d5fa9e507f72612331711

athrxx noreply at scummvm.org
Fri Oct 11 12:44:15 UTC 2024


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:
1fefea04b7 SCI: (QFG/PC-98) - fix Japanese text color (regression)


Commit: 1fefea04b7b53b96420d5fa9e507f72612331711
    https://github.com/scummvm/scummvm/commit/1fefea04b7b53b96420d5fa9e507f72612331711
Author: athrxx (athrxx at scummvm.org)
Date: 2024-10-11T14:43:57+02:00

Commit Message:
SCI: (QFG/PC-98) - fix Japanese text color (regression)

I noticed that in the Meeps scene there was green
sjis text color. It is always supposed to be black. The
original interpreter can't do anything else. Same
for SCI1, although for different reasons. I think I broke
that when I fixed the PQ2 colors.

Changed paths:
    engines/sci/graphics/gfxdrivers.cpp
    engines/sci/graphics/gfxdrivers.h


diff --git a/engines/sci/graphics/gfxdrivers.cpp b/engines/sci/graphics/gfxdrivers.cpp
index 003c18e5aed..039203f3d70 100644
--- a/engines/sci/graphics/gfxdrivers.cpp
+++ b/engines/sci/graphics/gfxdrivers.cpp
@@ -1950,8 +1950,11 @@ void PC98Gfx16ColorsDriver::replaceCursor(const void *cursor, uint w, uint h, in
 }
 
 byte PC98Gfx16ColorsDriver::remapTextColor(byte color) const {
+	// Always black for QFG and SCI1. For QFG, this is on purpose. The code just copies the inverted glyph data
+	// into all 4 vmem planes. For SCI1 the driver opcode actually has a pen color argument, but it isn't put
+	// to any use. Not sure if it is intended.
 	if (_fontStyle != kFontStyleTextMode)
-		return color;
+		return 0;
 
 	color &= 7;
 	// This seems to be a bug in the original PQ2 interpreter, which I replicate, so that we get the same colors.
@@ -2066,8 +2069,9 @@ void SCI0_PC98Gfx8ColorsDriver::replaceCursor(const void *cursor, uint w, uint h
 }
 
 byte SCI0_PC98Gfx8ColorsDriver::remapTextColor(byte color) const {
+	// Always black. For QFG, this is on purpose. The code just copies the inverted glyph data into all 4 vmem planes.
 	if (!_useTextMode)
-		return color;
+		return 0;
 
 	color &= 7;
 	// This seems to be a bug in the original PQ2 interpreter, which I replicate, so that we get the same colors.
@@ -2250,6 +2254,10 @@ void SCI1_PC98Gfx8ColorsDriver::replaceCursor(const void *cursor, uint w, uint h
 	CursorMan.replaceCursor(_compositeBuffer, w << 1, h << 1, hotspotX << 1, hotspotY << 1, newKeyColor);
 }
 
+byte SCI1_PC98Gfx8ColorsDriver::remapTextColor(byte) const {
+	// Always black. The driver opcode actually has a pen color argument, but it isn't put to any use. Not sure if it is intended.
+	return 0;
+}
 const char *SCI1_PC98Gfx8ColorsDriver::_driverFile = "9801V8.DRV";
 
 #undef GFXDRV_ASSERT_READY
diff --git a/engines/sci/graphics/gfxdrivers.h b/engines/sci/graphics/gfxdrivers.h
index 0d52491bc52..01eceba76a9 100644
--- a/engines/sci/graphics/gfxdrivers.h
+++ b/engines/sci/graphics/gfxdrivers.h
@@ -373,6 +373,7 @@ public:
 	void setPalette(const byte*, uint, uint, bool, const PaletteMod*, const byte*) override {}
 	void copyRectToScreen(const byte *src, int srcX, int srcY, int pitch, int destX, int destY, int w, int h, const PaletteMod *palMods, const byte *palModMapping) override;
 	void replaceCursor(const void *cursor, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor) override;
+	byte remapTextColor(byte) const override;
 	static bool validateMode(Common::Platform p) { return (p == Common::kPlatformPC98) && checkDriver(&_driverFile, 1); }
 private:
 	const byte *_ditheringTable;




More information about the Scummvm-git-logs mailing list