From e21a547667b6b84d353fc5d3d446826b169f72b1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 11 Dec 2012 03:04:59 +0200 Subject: TINSEL: Fix what seems to be two bugs in the endianess handling code This will need to be tested in a BE system for correctness. Fixes the Mac version of DW1 --- engines/tinsel/faders.cpp | 2 +- engines/tinsel/palette.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp index a03dc4f369..e9517103a9 100644 --- a/engines/tinsel/faders.cpp +++ b/engines/tinsel/faders.cpp @@ -106,7 +106,7 @@ static void FadeProcess(CORO_PARAM, const void *param) { FadingPalette(pFade->pPalQ, true); // get pointer to palette - reduce pointer indirection a bit - _ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal); + _ctx->pPalette = (PALETTE *)LockMem(FROM_32(pFade->pPalQ->hPal)); for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) { // go through all multipliers in table - until a negative entry diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index 9155386bbc..c7c8cd0b63 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -298,7 +298,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { PALETTE *pNewPal; // get pointer to new palette - pNewPal = (PALETTE *)LockMem(hNewPal); + pNewPal = (PALETTE *)LockMem(FROM_32(hNewPal)); // search all structs in palette allocator - see if palette already allocated for (p = g_palAllocData; p < g_palAllocData + NUM_PALETTES; p++) { -- cgit v1.2.3