diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/bmv.cpp | 20 | ||||
-rw-r--r-- | engines/tinsel/palette.cpp | 10 | ||||
-rw-r--r-- | engines/tinsel/play.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/rince.cpp | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index ef23ce06be..59f524f710 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -125,9 +125,9 @@ typedef struct { typedef struct { - short x; - short y; - short stringId; + int16 x; + int16 y; + int16 stringId; unsigned char duration; unsigned char fontId; @@ -596,10 +596,10 @@ static int MovieCommand(char cmd, int commandOffset) { PPRINT_CMD pCmd; pCmd = (PPRINT_CMD)(bigBuffer + commandOffset); - - MovieText(nullContext, pCmd->stringId, - pCmd->x, - pCmd->y, + + MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), + (int16)READ_LE_UINT16(&pCmd->x), + (int16)READ_LE_UINT16(&pCmd->y), pCmd->fontId, NULL, pCmd->duration); @@ -612,9 +612,9 @@ static int MovieCommand(char cmd, int commandOffset) { pCmd = (PTALK_CMD)(bigBuffer + commandOffset); talkColour = RGB(pCmd->r, pCmd->g, pCmd->b); - MovieText(nullContext, pCmd->stringId, - pCmd->x, - pCmd->y, + MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), + (int16)READ_LE_UINT16(&pCmd->x), + (int16)READ_LE_UINT16(&pCmd->y), 0, &talkColour, pCmd->duration); diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index 7099411473..ede39341f3 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -257,7 +257,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { if (TinselV2) // Copy all the colours - memcpy(p->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColours) * sizeof(COLORREF)); + memcpy(p->palRGB, pNewPal->palRGB, p->numColours * sizeof(COLORREF)); #ifdef DEBUG // one more palette in use @@ -267,7 +267,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) { // Q the change to the video DAC if (TinselV2) - UpdateDACqueue(p->posInDAC, FROM_LE_32(pNewPal->numColours), p->palRGB); + UpdateDACqueue(p->posInDAC, p->numColours, p->palRGB); else UpdateDACqueueHandle(p->posInDAC, p->numColours, p->hPal); @@ -372,10 +372,10 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) { pPalQ->hPal = hNewPal; if (TinselV2) { - pPalQ->numColours = pNewPal->numColours; + pPalQ->numColours = FROM_LE_32(pNewPal->numColours); // Copy all the colours - memcpy(pPalQ->palRGB, pNewPal->palRGB, pNewPal->numColours * sizeof(COLORREF)); + memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColours) * sizeof(COLORREF)); if (!pPalQ->bFading) // Q the change to the video DAC @@ -512,7 +512,7 @@ void CreateGhostPalette(SCNHANDLE hPalette) { // leave background colour alone ghostPalette[0] = 0; - for (i = 0; i < pPal->numColours; i++) { + for (i = 0; i < (int)FROM_LE_32(pPal->numColours); i++) { // get the RGB colour model values uint8 red = GetRValue(pPal->palRGB[i]); uint8 green = GetGValue(pPal->palRGB[i]); diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index c4f165d9e7..3872d94257 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -295,7 +295,7 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed, case ANI_JUMP: _ctx->frameNumber++; - assert(pAni[_ctx->frameNumber].op < 0); + assert((int32)FROM_LE_32(pAni[_ctx->frameNumber].op) < 0); _ctx->frameNumber += FROM_LE_32(pAni[_ctx->frameNumber].op); diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp index 30eee3bc8b..33273ad372 100644 --- a/engines/tinsel/rince.cpp +++ b/engines/tinsel/rince.cpp @@ -804,7 +804,7 @@ void T2MoverProcess(CORO_PARAM, const void *param) { InitialPathChecks(pMover, rpos->X, rpos->Y); pFilm = (FILM *)LockMem(pMover->walkReels[i][FORWARD]); // Any old reel - pmi = (PMULTI_INIT)LockMem(pFilm->reels[0].mobj); + pmi = (PMULTI_INIT)LockMem(FROM_LE_32(pFilm->reels[0].mobj)); // Poke in the background palette PokeInPalette(pmi); |