[Scummvm-git-logs] scummvm master -> 49979f1665c806d5a3a4ff262a049b62b84c7973
sev-
sev at scummvm.org
Tue Jul 21 22:06:40 UTC 2020
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:
49979f1665 GRAPHICS: Support 4-bit windows cursors
Commit: 49979f1665c806d5a3a4ff262a049b62b84c7973
https://github.com/scummvm/scummvm/commit/49979f1665c806d5a3a4ff262a049b62b84c7973
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-07-22T00:06:36+02:00
Commit Message:
GRAPHICS: Support 4-bit windows cursors
Changed paths:
graphics/wincursor.cpp
diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp
index 7abd1a33ad..8c3cf97ec6 100644
--- a/graphics/wincursor.cpp
+++ b/graphics/wincursor.cpp
@@ -127,9 +127,9 @@ bool WinCursor::readFromStream(Common::SeekableReadStream &stream) {
if (stream.readUint16LE() != 1)
return false;
- // Only 1bpp and 8bpp supported
+ // Only 1bpp, 4bpp and 8bpp supported
uint16 bitsPerPixel = stream.readUint16LE();
- if (bitsPerPixel != 1 && bitsPerPixel != 8)
+ if (bitsPerPixel != 1 && bitsPerPixel != 4 && bitsPerPixel != 8)
return false;
// Compression
@@ -180,6 +180,13 @@ bool WinCursor::readFromStream(Common::SeekableReadStream &stream) {
*rowDest = 0;
}
}
+ } else if (bitsPerPixel == 4) {
+ // 4bpp
+ for (uint16 j = 0; j < (_width / 2); j++) {
+ byte p = src[j];
+ *rowDest++ = p >> 4;
+ *rowDest++ = p & 0x0f;
+ }
} else {
// 8bpp
memcpy(rowDest, src, _width);
More information about the Scummvm-git-logs
mailing list