aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-13 20:20:44 +0100
committerJohannes Schickel2011-02-14 17:08:33 +0100
commit39861271d6c67b493e20d16ff88f37a807b2a65d (patch)
tree8c286b797f275de6591b91672c5f606ba9c45927
parentbb9e82c3b3f56ac9fd985c8f8d22f6d1dc0cc5e7 (diff)
downloadscummvm-rg350-39861271d6c67b493e20d16ff88f37a807b2a65d.tar.gz
scummvm-rg350-39861271d6c67b493e20d16ff88f37a807b2a65d.tar.bz2
scummvm-rg350-39861271d6c67b493e20d16ff88f37a807b2a65d.zip
COMMON: Make MacResManager::convertCrsrCursor to return a RGB palette.
-rw-r--r--common/macresman.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp
index 9a50549a9d..4fd4e72ee3 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -638,23 +638,21 @@ void MacResManager::convertCrsrCursor(byte *data, int datasize, byte **cursor, i
dis.readUint16BE(); // ctFlag
ctSize = dis.readUint16BE() + 1;
- *palette = (byte *)malloc(ctSize * 4);
+ *palette = (byte *)malloc(ctSize * 3);
// Read just high byte of 16-bit color
for (int c = 0; c < ctSize; c++) {
// We just use indices 0..ctSize, so ignore color ID
dis.readUint16BE(); // colorID[c]
- palette[0][c * 4 + 0] = dis.readByte();
+ palette[0][c * 3 + 0] = dis.readByte();
dis.readByte();
- palette[0][c * 4 + 1] = dis.readByte();
+ palette[0][c * 3 + 1] = dis.readByte();
dis.readByte();
- palette[0][c * 4 + 2] = dis.readByte();
+ palette[0][c * 3 + 2] = dis.readByte();
dis.readByte();
-
- palette[0][c * 4 + 3] = 0;
}
*palSize = ctSize;