diff options
author | Johannes Schickel | 2011-02-13 19:29:08 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-14 17:08:32 +0100 |
commit | 3f8e860a2316d1a0e002324371ddc2aac76c1091 (patch) | |
tree | 8baf53a395f2762ca6a681025114ce3bd9ad4525 /engines/mohawk | |
parent | 81111e2d59ecb8aa2cc7a281c058f3e2b675d2a4 (diff) | |
download | scummvm-rg350-3f8e860a2316d1a0e002324371ddc2aac76c1091.tar.gz scummvm-rg350-3f8e860a2316d1a0e002324371ddc2aac76c1091.tar.bz2 scummvm-rg350-3f8e860a2316d1a0e002324371ddc2aac76c1091.zip |
MOHAWK: Adapt to setPalette RGBA->RGB change.
Currently in some places the RGBA palettes are converted to RGB before they are
set up. There might be a better way, but this should work fine for now.
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/cursors.cpp | 62 | ||||
-rw-r--r-- | engines/mohawk/graphics.cpp | 20 | ||||
-rw-r--r-- | engines/mohawk/riven_cursors.h | 244 | ||||
-rw-r--r-- | engines/mohawk/view.cpp | 10 |
4 files changed, 177 insertions, 159 deletions
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp index 45f3329f13..08f863544a 100644 --- a/engines/mohawk/cursors.cpp +++ b/engines/mohawk/cursors.cpp @@ -38,8 +38,8 @@ namespace Mohawk { static const byte s_bwPalette[] = { - 0x00, 0x00, 0x00, 0x00, // Black - 0xFF, 0xFF, 0xFF, 0x00 // White + 0x00, 0x00, 0x00, // Black + 0xFF, 0xFF, 0xFF // White }; void CursorManager::showCursor() { @@ -153,7 +153,16 @@ void MystCursorManager::setCursor(uint16 id) { // Myst ME stores some cursors as 24bpp images instead of 8bpp if (surface->bytesPerPixel == 1) { CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, 0); - CursorMan.replaceCursorPalette(mhkSurface->getPalette(), 0, 256); + + const byte *srcPal = mhkSurface->getPalette(); + byte pal[3*256]; + for (uint i = 0; i < 256; ++i) { + pal[i * 3 + 0] = srcPal[i * 4 + 0]; + pal[i * 3 + 1] = srcPal[i * 4 + 1]; + pal[i * 3 + 2] = srcPal[i * 4 + 2]; + } + + CursorMan.replaceCursorPalette(pal, 0, 256); } else { Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), 1, &pixelFormat); @@ -174,92 +183,92 @@ void RivenCursorManager::setCursor(uint16 id) { case 1002: // Zip Mode CursorMan.replaceCursor(s_zipModeCursor, 16, 16, 8, 8, 0); - CursorMan.replaceCursorPalette(s_zipModeCursorPalette, 1, ARRAYSIZE(s_zipModeCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_zipModeCursorPalette, 1, ARRAYSIZE(s_zipModeCursorPalette) / 3); break; case 2003: // Hand Over Object CursorMan.replaceCursor(s_objectHandCursor, 16, 16, 8, 8, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 2004: // Grabbing/Using Object CursorMan.replaceCursor(s_grabbingHandCursor, 13, 13, 6, 6, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3000: // Standard Hand CursorMan.replaceCursor(s_standardHandCursor, 15, 16, 6, 0, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3001: // Pointing Left CursorMan.replaceCursor(s_pointingLeftCursor, 15, 13, 0, 3, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3002: // Pointing Right CursorMan.replaceCursor(s_pointingRightCursor, 15, 13, 14, 3, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3003: // Pointing Down (Palm Up) CursorMan.replaceCursor(s_pointingDownCursorPalmUp, 13, 16, 3, 15, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3004: // Pointing Up (Palm Up) CursorMan.replaceCursor(s_pointingUpCursorPalmUp, 13, 16, 3, 0, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3005: // Pointing Left (Curved) CursorMan.replaceCursor(s_pointingLeftCursorBent, 15, 13, 0, 5, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3006: // Pointing Right (Curved) CursorMan.replaceCursor(s_pointingRightCursorBent, 15, 13, 14, 5, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 3007: // Pointing Down (Palm Down) CursorMan.replaceCursor(s_pointingDownCursorPalmDown, 15, 16, 7, 15, 0); - CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_handCursorPalette, 1, ARRAYSIZE(s_handCursorPalette) / 3); break; case 4001: // Red Marble CursorMan.replaceCursor(s_redMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_redMarbleCursorPalette, 1, ARRAYSIZE(s_redMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_redMarbleCursorPalette, 1, ARRAYSIZE(s_redMarbleCursorPalette) / 3); break; case 4002: // Orange Marble CursorMan.replaceCursor(s_orangeMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_orangeMarbleCursorPalette, 1, ARRAYSIZE(s_orangeMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_orangeMarbleCursorPalette, 1, ARRAYSIZE(s_orangeMarbleCursorPalette) / 3); break; case 4003: // Yellow Marble CursorMan.replaceCursor(s_yellowMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_yellowMarbleCursorPalette, 1, ARRAYSIZE(s_yellowMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_yellowMarbleCursorPalette, 1, ARRAYSIZE(s_yellowMarbleCursorPalette) / 3); break; case 4004: // Green Marble CursorMan.replaceCursor(s_greenMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_greenMarbleCursorPalette, 1, ARRAYSIZE(s_greenMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_greenMarbleCursorPalette, 1, ARRAYSIZE(s_greenMarbleCursorPalette) / 3); break; case 4005: // Blue Marble CursorMan.replaceCursor(s_blueMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_blueMarbleCursorPalette, 1, ARRAYSIZE(s_blueMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_blueMarbleCursorPalette, 1, ARRAYSIZE(s_blueMarbleCursorPalette) / 3); break; case 4006: // Violet Marble CursorMan.replaceCursor(s_violetMarbleCursor, 12, 12, 5, 5, 0); - CursorMan.replaceCursorPalette(s_violetMarbleCursorPalette, 1, ARRAYSIZE(s_violetMarbleCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_violetMarbleCursorPalette, 1, ARRAYSIZE(s_violetMarbleCursorPalette) / 3); break; case 5000: // Pellet CursorMan.replaceCursor(s_pelletCursor, 8, 8, 4, 4, 0); - CursorMan.replaceCursorPalette(s_pelletCursorPalette, 1, ARRAYSIZE(s_pelletCursorPalette) / 4); + CursorMan.replaceCursorPalette(s_pelletCursorPalette, 1, ARRAYSIZE(s_pelletCursorPalette) / 3); break; case 9000: // Hide Cursor @@ -302,7 +311,16 @@ void NECursorManager::setCursor(uint16 id) { if (cursors[i].id == id) { Common::NECursor *cursor = cursors[i].cursors[0]; CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), 0); - CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256); + + const byte *srcPal = cursor->getPalette(); + byte pal[3 * 256]; + for (uint j = 0; j < 256; ++j) { + pal[j * 3 + 0] = srcPal[j * 4 + 0]; + pal[j * 3 + 1] = srcPal[j * 4 + 1]; + pal[j * 3 + 2] = srcPal[j * 4 + 2]; + } + + CursorMan.replaceCursorPalette(pal, 0, 256); return; } } diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp index be2fe01c4d..78916be85c 100644 --- a/engines/mohawk/graphics.cpp +++ b/engines/mohawk/graphics.cpp @@ -136,13 +136,13 @@ void GraphicsManager::setPalette(uint16 id) { uint16 colorStart = tpalStream->readUint16BE(); uint16 colorCount = tpalStream->readUint16BE(); - byte *palette = new byte[colorCount * 4]; + byte *palette = new byte[colorCount * 3]; for (uint16 i = 0; i < colorCount; i++) { - palette[i * 4] = tpalStream->readByte(); - palette[i * 4 + 1] = tpalStream->readByte(); - palette[i * 4 + 2] = tpalStream->readByte(); - palette[i * 4 + 3] = tpalStream->readByte(); + palette[i * 3 + 0] = tpalStream->readByte(); + palette[i * 3 + 1] = tpalStream->readByte(); + palette[i * 3 + 2] = tpalStream->readByte(); + tpalStream->readByte(); } delete tpalStream; @@ -1005,13 +1005,13 @@ void LBGraphics::setPalette(uint16 id) { if (_vm->isPreMohawk()) { Common::SeekableSubReadStreamEndian *ctblStream = _vm->wrapStreamEndian(ID_CTBL, id); uint16 colorCount = ctblStream->readUint16(); - byte *palette = new byte[colorCount * 4]; + byte *palette = new byte[colorCount * 3]; for (uint16 i = 0; i < colorCount; i++) { - palette[i * 4] = ctblStream->readByte(); - palette[i * 4 + 1] = ctblStream->readByte(); - palette[i * 4 + 2] = ctblStream->readByte(); - palette[i * 4 + 3] = ctblStream->readByte(); + palette[i * 3 + 0] = ctblStream->readByte(); + palette[i * 3 + 1] = ctblStream->readByte(); + palette[i * 3 + 2] = ctblStream->readByte(); + ctblStream->readByte(); } delete ctblStream; diff --git a/engines/mohawk/riven_cursors.h b/engines/mohawk/riven_cursors.h index 71cb8fd804..dadfdf0549 100644 --- a/engines/mohawk/riven_cursors.h +++ b/engines/mohawk/riven_cursors.h @@ -62,8 +62,8 @@ static const byte s_zipModeCursor[] = { // Palette For The Zip Mode Cursor //////////////////////////////////////// static const byte s_zipModeCursorPalette[] = { - 0x00, 0x00, 0x00, 0x00, // Black - 0xDC, 0xFF, 0x00, 0x00, // Yellow + 0x00, 0x00, 0x00, // Black + 0xDC, 0xFF, 0x00 // Yellow }; @@ -356,10 +356,10 @@ static const byte s_pointingDownCursorPalmDown[] = { // Palette For All Hand Cursors //////////////////////////////////////// static const byte s_handCursorPalette[] = { - 0x00, 0x00, 0x00, 0x00, // Black - 0xED, 0xCD, 0x96, 0x00, // Light Peach - 0x8A, 0x67, 0x2F, 0x00, // Brown - 0xE8, 0x9A, 0x62, 0x00 // Dark Peach + 0x00, 0x00, 0x00, // Black + 0xED, 0xCD, 0x96, // Light Peach + 0x8A, 0x67, 0x2F, // Brown + 0xE8, 0x9A, 0x62 // Dark Peach }; @@ -392,13 +392,13 @@ static const byte s_pelletCursor[] = { // Palette For The Pellet Cursor //////////////////////////////////////// static const byte s_pelletCursorPalette[] = { - 0x5D, 0x67, 0x30, 0x00, - 0x5E, 0x33, 0x33, 0x00, - 0x55, 0x55, 0x55, 0x00, - 0x44, 0x44, 0x44, 0x00, - 0x33, 0x33, 0x33, 0x00, - 0x2D, 0x33, 0x00, 0x00, - 0x22, 0x22, 0x22, 0x00 + 0x5D, 0x67, 0x30, + 0x5E, 0x33, 0x33, + 0x55, 0x55, 0x55, + 0x44, 0x44, 0x44, + 0x33, 0x33, 0x33, + 0x2D, 0x33, 0x00, + 0x22, 0x22, 0x22 }; //////////////////////////////////////// @@ -426,29 +426,29 @@ static const byte s_redMarbleCursor[] = { // Palette For The Red Marble Cursor //////////////////////////////////////// static const byte s_redMarbleCursorPalette[] = { - 0xb8, 0x33, 0x32, 0x00, - 0xe5, 0x33, 0x31, 0x00, - 0x98, 0x06, 0x00, 0x00, - 0xb8, 0x00, 0x34, 0x00, - 0xe6, 0x00, 0x34, 0x00, - 0x7a, 0x04, 0x00, 0x00, - 0xe8, 0x9a, 0x62, 0x00, - 0xea, 0x31, 0x67, 0x00, - 0x6a, 0x03, 0x00, 0x00, - 0x8c, 0x00, 0x35, 0x00, - 0xb6, 0x36, 0x00, 0x00, - 0xed, 0xcd, 0x96, 0x00, - 0xe9, 0x66, 0x65, 0x00, - 0x5b, 0x35, 0x00, 0x00, - 0x5b, 0x02, 0x00, 0x00, - 0x5f, 0x00, 0x35, 0x00, - 0x4c, 0x01, 0x00, 0x00, - 0x5e, 0x33, 0x33, 0x00, - 0x89, 0x05, 0x00, 0x00, - 0xb6, 0x08, 0x00, 0x00, - 0xa7, 0x07, 0x00, 0x00, - 0x88, 0x36, 0x00, 0x00, - 0x8b, 0x33, 0x33, 0x00 + 0xb8, 0x33, 0x32, + 0xe5, 0x33, 0x31, + 0x98, 0x06, 0x00, + 0xb8, 0x00, 0x34, + 0xe6, 0x00, 0x34, + 0x7a, 0x04, 0x00, + 0xe8, 0x9a, 0x62, + 0xea, 0x31, 0x67, + 0x6a, 0x03, 0x00, + 0x8c, 0x00, 0x35, + 0xb6, 0x36, 0x00, + 0xed, 0xcd, 0x96, + 0xe9, 0x66, 0x65, + 0x5b, 0x35, 0x00, + 0x5b, 0x02, 0x00, + 0x5f, 0x00, 0x35, + 0x4c, 0x01, 0x00, + 0x5e, 0x33, 0x33, + 0x89, 0x05, 0x00, + 0xb6, 0x08, 0x00, + 0xa7, 0x07, 0x00, + 0x88, 0x36, 0x00, + 0x8b, 0x33, 0x33 }; //////////////////////////////////////// @@ -475,26 +475,26 @@ static const byte s_orangeMarbleCursor[] = { // Palette For The Orange Marble Cursor //////////////////////////////////////// static const byte s_orangeMarbleCursorPalette[] = { - 0xe1, 0x9e, 0x00, 0x00, - 0xe3, 0x9b, 0x28, 0x00, - 0xe2, 0xcf, 0x20, 0x00, - 0xb5, 0x6a, 0x00, 0x00, - 0xb6, 0x9b, 0x29, 0x00, - 0x87, 0x69, 0x00, 0x00, - 0xb7, 0x67, 0x2f, 0x00, - 0xe9, 0xff, 0x93, 0x00, - 0xe1, 0xff, 0x5a, 0x00, - 0xe0, 0xd0, 0x00, 0x00, - 0x5e, 0x33, 0x33, 0x00, - 0x88, 0x36, 0x00, 0x00, - 0xf3, 0xff, 0xc9, 0x00, - 0x5b, 0x35, 0x00, 0x00, - 0x8b, 0x33, 0x33, 0x00, - 0xe6, 0xce, 0x5f, 0x00, - 0x8a, 0x67, 0x2f, 0x00, - 0x5d, 0x67, 0x30, 0x00, - 0xe2, 0x6a, 0x00, 0x00, - 0xb3, 0x9d, 0x00, 0x00 + 0xe1, 0x9e, 0x00, + 0xe3, 0x9b, 0x28, + 0xe2, 0xcf, 0x20, + 0xb5, 0x6a, 0x00, + 0xb6, 0x9b, 0x29, + 0x87, 0x69, 0x00, + 0xb7, 0x67, 0x2f, + 0xe9, 0xff, 0x93, + 0xe1, 0xff, 0x5a, + 0xe0, 0xd0, 0x00, + 0x5e, 0x33, 0x33, + 0x88, 0x36, 0x00, + 0xf3, 0xff, 0xc9, + 0x5b, 0x35, 0x00, + 0x8b, 0x33, 0x33, + 0xe6, 0xce, 0x5f, + 0x8a, 0x67, 0x2f, + 0x5d, 0x67, 0x30, + 0xe2, 0x6a, 0x00, + 0xb3, 0x9d, 0x00 }; //////////////////////////////////////// @@ -521,20 +521,20 @@ static const byte s_yellowMarbleCursor[] = { // Palette For The Yellow Marble Cursor //////////////////////////////////////// static const byte s_yellowMarbleCursorPalette[] = { - 0xb3, 0xd0, 0x00, 0x00, - 0xb0, 0xff, 0x00, 0x00, - 0x86, 0x9c, 0x00, 0x00, - 0x87, 0xd0, 0x00, 0x00, - 0xe0, 0xd0, 0x00, 0x00, - 0xdc, 0xff, 0x00, 0x00, - 0xb3, 0x9d, 0x00, 0x00, - 0xdc, 0xff, 0x11, 0x00, - 0x5a, 0x68, 0x00, 0x00, - 0xe1, 0xff, 0x5a, 0x00, - 0x5d, 0x67, 0x30, 0x00, - 0x87, 0x69, 0x00, 0x00, - 0x88, 0x9b, 0x2a, 0x00, - 0x5a, 0x9c, 0x00, 0x00 + 0xb3, 0xd0, 0x00, + 0xb0, 0xff, 0x00, + 0x86, 0x9c, 0x00, + 0x87, 0xd0, 0x00, + 0xe0, 0xd0, 0x00, + 0xdc, 0xff, 0x00, + 0xb3, 0x9d, 0x00, + 0xdc, 0xff, 0x11, + 0x5a, 0x68, 0x00, + 0xe1, 0xff, 0x5a, + 0x5d, 0x67, 0x30, + 0x87, 0x69, 0x00, + 0x88, 0x9b, 0x2a, + 0x5a, 0x9c, 0x00 }; //////////////////////////////////////// @@ -561,25 +561,25 @@ static const byte s_greenMarbleCursor[] = { // Palette For The Green Marble Cursor //////////////////////////////////////// static const byte s_greenMarbleCursorPalette[] = { - 0x0e, 0xd0, 0x00, 0x00, - 0x0f, 0xe1, 0x00, 0x00, - 0x10, 0xf2, 0x00, 0x00, - 0x0b, 0x9c, 0x00, 0x00, - 0x0c, 0xad, 0x00, 0x00, - 0x11, 0xff, 0x00, 0x00, - 0x09, 0x8a, 0x00, 0x00, - 0x0d, 0xbe, 0x00, 0x00, - 0x30, 0xff, 0x5a, 0x00, - 0x0d, 0x67, 0x30, 0x00, - 0x6b, 0xff, 0x92, 0x00, - 0x00, 0xff, 0x28, 0x00, - 0x08, 0x79, 0x00, 0x00, - 0x05, 0x57, 0x00, 0x00, - 0x30, 0x67, 0x30, 0x00, - 0x06, 0x68, 0x00, 0x00, - 0x00, 0x9b, 0x2c, 0x00, - 0x2e, 0x9c, 0x00, 0x00, - 0x2e, 0x68, 0x00, 0x00 + 0x0e, 0xd0, 0x00, + 0x0f, 0xe1, 0x00, + 0x10, 0xf2, 0x00, + 0x0b, 0x9c, 0x00, + 0x0c, 0xad, 0x00, + 0x11, 0xff, 0x00, + 0x09, 0x8a, 0x00, + 0x0d, 0xbe, 0x00, + 0x30, 0xff, 0x5a, + 0x0d, 0x67, 0x30, + 0x6b, 0xff, 0x92, + 0x00, 0xff, 0x28, + 0x08, 0x79, 0x00, + 0x05, 0x57, 0x00, + 0x30, 0x67, 0x30, + 0x06, 0x68, 0x00, + 0x00, 0x9b, 0x2c, + 0x2e, 0x9c, 0x00, + 0x2e, 0x68, 0x00 }; //////////////////////////////////////// @@ -606,28 +606,28 @@ static const byte s_blueMarbleCursor[] = { // Palette For The Blue Marble Cursor //////////////////////////////////////// static const byte s_blueMarbleCursorPalette[] = { - 0x6b, 0x00, 0xd2, 0x00, - 0x66, 0x00, 0xe3, 0x00, - 0x72, 0x00, 0xff, 0x00, - 0x53, 0x2d, 0x9d, 0x00, - 0x4e, 0x00, 0xaf, 0x00, - 0x6d, 0x00, 0xf5, 0x00, - 0x7d, 0x00, 0xff, 0x00, - 0x44, 0x00, 0x69, 0x00, - 0x56, 0x00, 0x9d, 0x00, - 0x56, 0x00, 0xc0, 0x00, - 0x5e, 0x00, 0xd2, 0x00, - 0x2b, 0x31, 0x68, 0x00, - 0x3f, 0x00, 0x8c, 0x00, - 0x91, 0x22, 0xff, 0x00, - 0x41, 0x31, 0x68, 0x00, - 0xd7, 0x95, 0xff, 0x00, - 0x77, 0x22, 0xff, 0x00, - 0x2f, 0x00, 0x69, 0x00, - 0x37, 0x00, 0x7a, 0x00, - 0x27, 0x00, 0x58, 0x00, - 0x46, 0x00, 0x9d, 0x00, - 0x33, 0x33, 0x33, 0x00 + 0x6b, 0x00, 0xd2, + 0x66, 0x00, 0xe3, + 0x72, 0x00, 0xff, + 0x53, 0x2d, 0x9d, + 0x4e, 0x00, 0xaf, + 0x6d, 0x00, 0xf5, + 0x7d, 0x00, 0xff, + 0x44, 0x00, 0x69, + 0x56, 0x00, 0x9d, + 0x56, 0x00, 0xc0, + 0x5e, 0x00, 0xd2, + 0x2b, 0x31, 0x68, + 0x3f, 0x00, 0x8c, + 0x91, 0x22, 0xff, + 0x41, 0x31, 0x68, + 0xd7, 0x95, 0xff, + 0x77, 0x22, 0xff, + 0x2f, 0x00, 0x69, + 0x37, 0x00, 0x7a, + 0x27, 0x00, 0x58, + 0x46, 0x00, 0x9d, + 0x33, 0x33, 0x33 }; //////////////////////////////////////// @@ -654,17 +654,17 @@ static const byte s_violetMarbleCursor[] = { // Palette For The Violet Marble Cursor //////////////////////////////////////// static const byte s_violetMarbleCursorPalette[] = { - 0xaa, 0x00, 0xd1, 0x00, - 0xd8, 0x00, 0xff, 0x00, - 0x76, 0x00, 0x9d, 0x00, - 0xb5, 0x00, 0xff, 0x00, - 0x87, 0x00, 0xd2, 0x00, - 0xd7, 0x22, 0xff, 0x00, - 0x68, 0x00, 0x69, 0x00, - 0x44, 0x00, 0x69, 0x00, - 0xd7, 0x5e, 0xff, 0x00, - 0x9c, 0x00, 0x9d, 0x00, - 0x56, 0x00, 0x9d, 0x00 + 0xaa, 0x00, 0xd1, + 0xd8, 0x00, 0xff, + 0x76, 0x00, 0x9d, + 0xb5, 0x00, 0xff, + 0x87, 0x00, 0xd2, + 0xd7, 0x22, 0xff, + 0x68, 0x00, 0x69, + 0x44, 0x00, 0x69, + 0xd7, 0x5e, 0xff, + 0x9c, 0x00, 0x9d, + 0x56, 0x00, 0x9d }; } // End of namespace Mohawk diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp index 241b2c3663..837d386b58 100644 --- a/engines/mohawk/view.cpp +++ b/engines/mohawk/view.cpp @@ -421,13 +421,13 @@ void View::installBG(uint16 id) { void View::setColors(Common::SeekableReadStream *tpalStream) { uint16 colorStart = tpalStream->readUint16BE(); uint16 colorCount = tpalStream->readUint16BE(); - byte *palette = new byte[colorCount * 4]; + byte *palette = new byte[colorCount * 3]; for (uint16 i = 0; i < colorCount; i++) { - palette[i * 4] = tpalStream->readByte(); - palette[i * 4 + 1] = tpalStream->readByte(); - palette[i * 4 + 2] = tpalStream->readByte(); - palette[i * 4 + 3] = tpalStream->readByte(); + palette[i * 3 + 0] = tpalStream->readByte(); + palette[i * 3 + 1] = tpalStream->readByte(); + palette[i * 3 + 2] = tpalStream->readByte(); + tpalStream->readByte(); } // TODO: copy into temporary buffer |