diff options
author | Joost Peters | 2009-01-25 11:02:34 +0000 |
---|---|---|
committer | Joost Peters | 2009-01-25 11:02:34 +0000 |
commit | a0824205afaac86bd69c6bf14e4e3d5238cbc48d (patch) | |
tree | fa984ae0b8da5494471ba0d9ace4da52d4fec5b0 /engines | |
parent | 79709646fb8902cecea1d7433ec95991805b5dd9 (diff) | |
download | scummvm-rg350-a0824205afaac86bd69c6bf14e4e3d5238cbc48d.tar.gz scummvm-rg350-a0824205afaac86bd69c6bf14e4e3d5238cbc48d.tar.bz2 scummvm-rg350-a0824205afaac86bd69c6bf14e4e3d5238cbc48d.zip |
some DW2 endian fixes
svn-id: r36058
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/bg.cpp | 8 | ||||
-rw-r--r-- | engines/tinsel/cursor.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/multiobj.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/palette.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/play.cpp | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index 0f83760987..24884f3935 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -135,18 +135,18 @@ static void BGmainProcess(CORO_PARAM, const void *param) { } else { /*** At start of scene ***/ pFilm = (const FILM *)LockMem(hBackground); - bgReels = pFilm->numreels; + bgReels = FROM_LE_32(pFilm->numreels); int i; for (i = 0; i < bgReels; i++) { // Get the MULTI_INIT structure - pmi = (PMULTI_INIT) LockMem(pFilm->reels[i].mobj); + pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFilm->reels[i].mobj)); // Initialise and insert the object, and initialise its script. pBG[i] = MultiInitObject(pmi); MultiInsertObject(GetPlayfieldList(FIELD_WORLD), pBG[i]); MultiSetZPosition(pBG[i], 0); - InitStepAnimScript(&thisAnim[i], pBG[i], pFilm->reels[i].script, BGspeed); + InitStepAnimScript(&thisAnim[i], pBG[i], FROM_LE_32(pFilm->reels[i].script), BGspeed); if (i > 0) pBG[i-1]->pSlave = pBG[i]; @@ -175,7 +175,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) { StepAnimScript(&thisAnim[0]); } else { pFilm = (const FILM *)LockMem(hBackground); - assert(bgReels == pFilm->numreels); + assert(bgReels == FROM_LE_32(pFilm->numreels)); // Just re-initialise the scripts. for (int i = 0; i < bgReels; i++) { diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp index c58a15849d..53ad6094da 100644 --- a/engines/tinsel/cursor.cpp +++ b/engines/tinsel/cursor.cpp @@ -482,7 +482,7 @@ static void InitCurObj(void) { if (TinselV2) { pFilm = (const FILM *)LockMem(hCursorFilm); pfr = (const FREEL *)&pFilm->reels[0]; - pmi = (MULTI_INIT *)LockMem(pfr->mobj); + pmi = (MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj)); PokeInPalette(pmi); } else { diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp index 34f7d3ec00..b375f8bad5 100644 --- a/engines/tinsel/multiobj.cpp +++ b/engines/tinsel/multiobj.cpp @@ -46,7 +46,7 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) { OBJECT *pFirst, *pObj; // object pointers FRAME *pFrame; // list of images for the multi-part object - if (pInitTbl->hMulFrame) { + if (FROM_LE_32(pInitTbl->hMulFrame)) { // we have a frame handle pFrame = (FRAME *)LockMem(FROM_LE_32(pInitTbl->hMulFrame)); diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index cd628439ad..7099411473 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, pNewPal->numColours * sizeof(COLORREF)); + memcpy(p->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->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, pNewPal->numColours, p->palRGB); + UpdateDACqueue(p->posInDAC, FROM_LE_32(pNewPal->numColours), p->palRGB); else UpdateDACqueueHandle(p->posInDAC, p->numColours, p->hPal); diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index 55616863ee..15e5c95f3d 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -97,12 +97,12 @@ void PokeInPalette(const MULTI_INIT *pmi) { // Could be an empty column if (pmi->hMulFrame) { - pFrame = (FRAME *)LockMem(pmi->hMulFrame); + pFrame = (FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame)); // get pointer to image - pim = (IMAGE *)LockMem(*pFrame); // handle to image + pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image - pim->hImgPal = BgPal(); + pim->hImgPal = TO_LE_32(BgPal()); } } |