GRAPHICS: Corrected semantics for MacOS cursors

This commit is contained in:
elasota 2023-02-18 18:31:10 -05:00 committed by Eugene Sandulenko
parent 866e459992
commit 76d84718e2
2 changed files with 11 additions and 11 deletions

View File

@ -134,9 +134,8 @@ enum CursorMaskValue {
* Backend must support kFeatureCursorMaskInvert for this mode. */
kCursorMaskInvert = 2,
/** Inverts the overlapped pixel based on the cursor's color value.
* Backend must support kFeatureCursorMaskInvertUsingColor for this mode. */
kCursorMaskInvertUsingColor = 3,
/** kFeatureCursorMaskInvertUsingColor for this mode. */
kCursorMaskPaletteXorColorXnor = 3,
};
/**
@ -418,10 +417,11 @@ public:
kFeatureCursorMaskInvert,
/**
* Backends supporting this feature allow cursor masks to use mode kCursorMaskInvertUsingColor in the mask values,
* which inverts the destination pixel based on the color value of the cursor.
* Backends supporting this feature allow cursor masks to use mode kCursorMaskPaletteXorColorXnor in the mask values,
* which uses (Color XOR Destination) for CLUT8 blending and (Color XNOR Destination) for RGB blending. This is
* equivalent to Classic MacOS behavior for pixel colors other than black and white.
*/
kFeatureCursorMaskInvertUsingColor,
kFeatureCursorMaskPaletteXorColorXnor,
/**
* A backend has this feature if its overlay pixel format has an alpha

View File

@ -798,7 +798,7 @@ TestExitStatus GFXtests::maskedCursors() {
}
bool haveInverted = g_system->hasFeature(OSystem::kFeatureCursorMaskInvert);
bool haveInvertedColor = g_system->hasFeature(OSystem::kFeatureCursorMaskInvertUsingColor);
bool haveColorXorBlend = g_system->hasFeature(OSystem::kFeatureCursorMaskPaletteXorColorXnor);
// Fill middle column
for (int y = 0; y < 16; y++) {
@ -812,7 +812,7 @@ TestExitStatus GFXtests::maskedCursors() {
maskData[(y + 0) * 16 + x + 11] = kCursorMaskTransparent;
maskData[(y + 4) * 16 + x + 11] = kCursorMaskOpaque;
maskData[(y + 8) * 16 + x + 11] = kCursorMaskInvert;
maskData[(y + 12) * 16 + x + 11] = kCursorMaskInvertUsingColor;
maskData[(y + 12) * 16 + x + 11] = kCursorMaskPaletteXorColorXnor;
}
}
@ -823,7 +823,7 @@ TestExitStatus GFXtests::maskedCursors() {
maskData[y * 16 + x] = kCursorMaskTransparent;
}
if (!haveInvertedColor) {
if (!haveColorXorBlend) {
for (int y = 12; y < 16; y++)
for (int x = 0; x < 16; x++)
maskData[y * 16 + x] = kCursorMaskTransparent;
@ -868,7 +868,7 @@ TestExitStatus GFXtests::maskedCursors() {
}
}
if (!haveInvertedColor) {
if (!haveColorXorBlend) {
if (!Testsuite::handleInteractiveInput("Was the part of the cursor to the right of the 'C' inverted according to the color to the left of it?", "Yes", "No", kOptionLeft)) {
return kTestFailed;
}
@ -921,7 +921,7 @@ TestExitStatus GFXtests::maskedCursors() {
}
}
if (!haveInvertedColor) {
if (!haveColorXorBlend) {
if (!Testsuite::handleInteractiveInput("Was the part of the cursor to the right of the 'C' inverted according to the color to the left of it?", "Yes", "No", kOptionLeft)) {
return kTestFailed;
}