[Scummvm-git-logs] scummvm master -> 4952d1c760eec45add83cee0540f10b4799e91d7
sev-
sev at scummvm.org
Sun Nov 10 00:27:34 CET 2019
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:
4952d1c760 GUI: Fix colors in About. Now it works on Amiga
Commit: 4952d1c760eec45add83cee0540f10b4799e91d7
https://github.com/scummvm/scummvm/commit/4952d1c760eec45add83cee0540f10b4799e91d7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-11-10T00:27:25+01:00
Commit Message:
GUI: Fix colors in About. Now it works on Amiga
Changed paths:
gui/about.cpp
diff --git a/gui/about.cpp b/gui/about.cpp
index d6571c7..eaafadb 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -1380,7 +1380,10 @@ void EE::genSprites() {
pixels >>= 1;
- *((uint16 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = (uint16)palette[color + 8];
+ if (_back.format.bytesPerPixel == 2)
+ *((uint16 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = (uint16)palette[color + 8];
+ else if (_back.format.bytesPerPixel == 4)
+ *((uint32 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = palette[color + 8];
}
}
}
@@ -1403,7 +1406,10 @@ void EE::genSprites() {
if (x == 15)
pixels = *ptr;
- *((uint16 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = (uint16)palette[color + 4 * (s / 3)];
+ if (_back.format.bytesPerPixel == 2)
+ *((uint16 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = (uint16)palette[color + 4 * (s / 3)];
+ else if (_back.format.bytesPerPixel == 4)
+ *((uint32 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = palette[color + 4 * (s / 3)];
}
}
}
More information about the Scummvm-git-logs
mailing list