From 39861271d6c67b493e20d16ff88f37a807b2a65d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 13 Feb 2011 20:20:44 +0100 Subject: COMMON: Make MacResManager::convertCrsrCursor to return a RGB palette. --- common/macresman.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'common') 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; -- cgit v1.2.3