[Scummvm-git-logs] scummvm master -> 2f654d41bec7a67ce829b1c7a48784a12b3e8bca
bluegr
noreply at scummvm.org
Wed Aug 14 12:30:08 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:
2f654d41be SCI: (PC-98) - fix hilite control color
Commit: 2f654d41bec7a67ce829b1c7a48784a12b3e8bca
https://github.com/scummvm/scummvm/commit/2f654d41bec7a67ce829b1c7a48784a12b3e8bca
Author: athrxx (athrxx at scummvm.org)
Date: 2024-08-14T15:30:04+03:00
Commit Message:
SCI: (PC-98) - fix hilite control color
The PC-98 targets all use the xoring method, like SCI0early.
Also, this does not only apply to the button control, but
also to the text and icon controls.
Changed paths:
engines/sci/graphics/controls16.cpp
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index a57c3f2d98c..e2f8c05c99c 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -347,7 +347,9 @@ void GfxControls16::kernelDrawButton(Common::Rect rect, reg_t obj, const char *t
}
} else {
// SCI0early used xor to invert button rectangles resulting in pink/white buttons
- if (getSciVersion() == SCI_VERSION_0_EARLY)
+ // All PC-98 targets (both SCI_VERSION_01 and SCI_VERSION_1_LATE) also use the
+ // xor method, resulting in a grey color.
+ if (getSciVersion() == SCI_VERSION_0_EARLY || g_sci->getPlatform() == Common::kPlatformPC98)
_paint16->invertRectViaXOR(rect);
else
_paint16->invertRect(rect);
@@ -391,7 +393,13 @@ void GfxControls16::kernelDrawText(Common::Rect rect, reg_t obj, const char *tex
if (allowScreenUpdate && !getPicNotValid())
_paint16->bitsShow(rect);
} else {
- _paint16->invertRect(rect);
+ // SCI0early used xor to invert button rectangles resulting in pink/white buttons
+ // All PC-98 targets (both SCI_VERSION_01 and SCI_VERSION_1_LATE) also use the
+ // xor method, resulting in a grey color.
+ if (getSciVersion() == SCI_VERSION_0_EARLY || g_sci->getPlatform() == Common::kPlatformPC98)
+ _paint16->invertRectViaXOR(rect);
+ else
+ _paint16->invertRect(rect);
_paint16->bitsShow(rect);
}
}
@@ -426,7 +434,13 @@ void GfxControls16::kernelDrawIcon(Common::Rect rect, reg_t obj, GuiResourceId v
if (!getPicNotValid())
_paint16->bitsShow(rect);
} else {
- _paint16->invertRect(rect);
+ // SCI0early used xor to invert button rectangles resulting in pink/white buttons
+ // All PC-98 targets (both SCI_VERSION_01 and SCI_VERSION_1_LATE) also use the
+ // xor method, resulting in a grey color.
+ if (getSciVersion() == SCI_VERSION_0_EARLY || g_sci->getPlatform() == Common::kPlatformPC98)
+ _paint16->invertRectViaXOR(rect);
+ else
+ _paint16->invertRect(rect);
_paint16->bitsShow(rect);
}
}
More information about the Scummvm-git-logs
mailing list