diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/anim.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/bg.cpp | 6 | ||||
-rw-r--r-- | engines/tinsel/cursor.cpp | 8 | ||||
-rw-r--r-- | engines/tinsel/font.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/multiobj.cpp | 24 | ||||
-rw-r--r-- | engines/tinsel/palette.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/play.cpp | 20 | ||||
-rw-r--r-- | engines/tinsel/scn.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/tinsel.cpp | 8 |
9 files changed, 39 insertions, 39 deletions
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp index cfc2612a5c..034296ccc7 100644 --- a/engines/tinsel/anim.cpp +++ b/engines/tinsel/anim.cpp @@ -189,7 +189,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) { default: // must be an actual animation frame handle // set objects new animation frame - pAnim->pObject->hShape = FROM_32(pAni[pAnim->scriptIndex].hFrame); + pAnim->pObject->hShape = FROM_LE_32(pAni[pAnim->scriptIndex].hFrame); // re-shape the object MultiReshape(pAnim->pObject); diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index 0c0db12c32..a3e21a8227 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -124,7 +124,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) { pReel = (const FREEL *)param; // Get the MULTI_INIT structure - pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj)); + pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj)); // Initialize and insert the object, and initialize its script. g_pBG[0] = MultiInitObject(pmi); @@ -249,10 +249,10 @@ void StartupBackground(CORO_PARAM, SCNHANDLE hFilm) { pim = GetImageFromFilm(hFilm, 0, NULL, NULL, &pfilm); - SetBackPal(FROM_32(pim->hImgPal)); + SetBackPal(FROM_LE_32(pim->hImgPal)); // Extract the film speed - g_BGspeed = ONE_SECOND / FROM_32(pfilm->frate); + g_BGspeed = ONE_SECOND / FROM_LE_32(pfilm->frate); // Start display process for each reel in the film CoroScheduler.createProcess(PID_REEL, BGmainProcess, &pfilm->reels[0], sizeof(FREEL)); diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp index 5b365fc3b1..bf901c03b6 100644 --- a/engines/tinsel/cursor.cpp +++ b/engines/tinsel/cursor.cpp @@ -324,14 +324,14 @@ IMAGE *GetImageFromReel(const FREEL *pfr, const MULTI_INIT **ppmi) { const MULTI_INIT *pmi; const FRAME *pFrame; - pmi = (const MULTI_INIT *)LockMem(FROM_32(pfr->mobj)); + pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj)); if (ppmi) *ppmi = pmi; - pFrame = (const FRAME *)LockMem(FROM_32(pmi->hMulFrame)); + pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame)); // get pointer to image - return (IMAGE *)LockMem(READ_32(pFrame)); + return (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); } /** @@ -620,7 +620,7 @@ void DwInitCursor(SCNHANDLE bfilm) { g_hCursorFilm = bfilm; pfilm = (const FILM *)LockMem(g_hCursorFilm); - g_numTrails = FROM_32(pfilm->numreels) - 1; + g_numTrails = FROM_LE_32(pfilm->numreels) - 1; assert(g_numTrails <= MAX_TRAILERS); } diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp index 6f7c3919c9..54aa7cc15f 100644 --- a/engines/tinsel/font.cpp +++ b/engines/tinsel/font.cpp @@ -102,14 +102,14 @@ void FettleFontPal(SCNHANDLE fontPal) { assert(g_hTalkFont); // Talk font not declared pFont = (const FONT *)LockMem(g_hTagFont); - pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0 + pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 if (!TinselV2) pImg->hImgPal = TO_LE_32(fontPal); else pImg->hImgPal = 0; pFont = (const FONT *)LockMem(g_hTalkFont); - pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0 + pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 if (!TinselV2) pImg->hImgPal = TO_LE_32(fontPal); else diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp index 37769a7819..c48fefdd22 100644 --- a/engines/tinsel/multiobj.cpp +++ b/engines/tinsel/multiobj.cpp @@ -40,22 +40,22 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) { OBJECT *pFirst, *pObj; // object pointers FRAME *pFrame; // list of images for the multi-part object - if (FROM_32(pInitTbl->hMulFrame)) { + if (FROM_LE_32(pInitTbl->hMulFrame)) { // we have a frame handle - pFrame = (FRAME *)LockMem(FROM_32(pInitTbl->hMulFrame)); + pFrame = (FRAME *)LockMem(FROM_LE_32(pInitTbl->hMulFrame)); - obj_init.hObjImg = READ_32(pFrame); // first objects shape + obj_init.hObjImg = READ_LE_UINT32(pFrame); // first objects shape } else { // this must be a animation list for a NULL object pFrame = NULL; obj_init.hObjImg = 0; // first objects shape } // init the object init table - obj_init.objFlags = (int)FROM_32(pInitTbl->mulFlags); // all objects have same flags - obj_init.objID = (int)FROM_32(pInitTbl->mulID); // all objects have same ID - obj_init.objX = (int)FROM_32(pInitTbl->mulX); // all objects have same X ani pos - obj_init.objY = (int)FROM_32(pInitTbl->mulY); // all objects have same Y ani pos - obj_init.objZ = (int)FROM_32(pInitTbl->mulZ); // all objects have same Z pos + obj_init.objFlags = (int)FROM_LE_32(pInitTbl->mulFlags); // all objects have same flags + obj_init.objID = (int)FROM_LE_32(pInitTbl->mulID); // all objects have same ID + obj_init.objX = (int)FROM_LE_32(pInitTbl->mulX); // all objects have same X ani pos + obj_init.objY = (int)FROM_LE_32(pInitTbl->mulY); // all objects have same Y ani pos + obj_init.objZ = (int)FROM_LE_32(pInitTbl->mulZ); // all objects have same Z pos // create and init the first object pObj = pFirst = InitObject(&obj_init); @@ -65,9 +65,9 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) { pFrame++; - while (READ_32(pFrame) != 0) { + while (READ_LE_UINT32(pFrame) != 0) { // set next objects shape - obj_init.hObjImg = READ_32(pFrame); + obj_init.hObjImg = READ_LE_UINT32(pFrame); // create next object and link to previous pObj = pObj->pSlave = InitObject(&obj_init); @@ -378,9 +378,9 @@ void MultiReshape(OBJECT *pMultiObj) { // update previous pMultiObj->hMirror = hFrame; - while (READ_32(pFrame) != 0 && pMultiObj != NULL) { + while (READ_LE_UINT32(pFrame) != 0 && pMultiObj != NULL) { // a normal image - update the current object with this image - AnimateObject(pMultiObj, READ_32(pFrame)); + AnimateObject(pMultiObj, READ_LE_UINT32(pFrame)); // move to next image for this frame pFrame++; diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index 544dc03893..e6c9467fab 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -546,7 +546,7 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) { // leave background color alone g_transPalette[0] = 0; - for (uint i = 0; i < FROM_32(pPal->numColors); i++) { + for (uint i = 0; i < FROM_LE_32(pPal->numColors); i++) { // get the RGB color model values uint8 red = TINSEL_GetRValue(pPal->palRGB[i]); uint8 green = TINSEL_GetGValue(pPal->palRGB[i]); diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index 718ee7f0e3..9e0baa749e 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -81,7 +81,7 @@ static void PokeInPalette(SCNHANDLE hMulFrame) { pFrame = (const FRAME *)LockMem(hMulFrame); // get pointer to image - pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image + pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image pim->hImgPal = TO_LE_32(BgPal()); } @@ -451,10 +451,10 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) { _ctx->pfreel = &pfilm->reels[ppi->column]; // Get the MULTI_INIT structure - pmi = (const MULTI_INIT *)LockMem(FROM_32(_ctx->pfreel->mobj)); + pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pfreel->mobj)); // Save actor's ID - _ctx->reelActor = (int32)FROM_32(pmi->mulID); + _ctx->reelActor = (int32)FROM_LE_32(pmi->mulID); /**** New (experimental? bit 5/1/95 ****/ if (!TinselV0 && !actorAlive(_ctx->reelActor)) @@ -488,7 +488,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) { return; // Poke in the background palette - PokeInPalette(FROM_32(pmi->hMulFrame)); + PokeInPalette(FROM_LE_32(pmi->hMulFrame)); // Set up and insert the multi-object _ctx->pPlayObj = MultiInitObject(pmi); @@ -534,7 +534,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) { if (ppi->actorid == 0 && !actorAlive(_ctx->reelActor)) _ctx->lifeNoMatter = true; - InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_32(_ctx->pfreel->script), ppi->speed); + InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pfreel->script), ppi->speed); // If first column, set Z position as per // Otherwise, column 0's + column number @@ -952,10 +952,10 @@ void NewestFilm(SCNHANDLE film, const FREEL *reel) { const MULTI_INIT *pmi; // MULTI_INIT structure // Get the MULTI_INIT structure - pmi = (const MULTI_INIT *)LockMem(FROM_32(reel->mobj)); + pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(reel->mobj)); - if (!TinselV2 || ((int32)FROM_32(pmi->mulID) != -2)) - SetActorLatestFilm((int32)FROM_32(pmi->mulID), film); + if (!TinselV2 || ((int32)FROM_LE_32(pmi->mulID) != -2)) + SetActorLatestFilm((int32)FROM_LE_32(pmi->mulID), film); } // ******************************************************* @@ -988,7 +988,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay ppi.y = y; ppi.z = 0; ppi.bRestore = false; - ppi.speed = (ONE_SECOND / FROM_32(pFilm->frate)); + ppi.speed = (ONE_SECOND / FROM_LE_32(pFilm->frate)); ppi.actorid = actorid; ppi.splay = splay; ppi.bTop = bTop; @@ -997,7 +997,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay ppi.myescEvent = myescEvent; // Start display process for each reel in the film - for (int i = FROM_32(pFilm->numreels) - 1; i >= 0; i--) { + for (int i = FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) { NewestFilm(hFilm, &pFilm->reels[i]); ppi.column = i; diff --git a/engines/tinsel/scn.cpp b/engines/tinsel/scn.cpp index 70093447ff..168dcf464f 100644 --- a/engines/tinsel/scn.cpp +++ b/engines/tinsel/scn.cpp @@ -54,11 +54,11 @@ byte *FindChunk(SCNHANDLE handle, uint32 chunk) { chunk -= 0x2L; while (1) { - if (READ_32(lptr) == chunk) + if (READ_LE_UINT32(lptr) == chunk) return (byte *)(lptr + 2); ++lptr; - add = READ_32(lptr); + add = READ_LE_UINT32(lptr); if (!add) // End of file reached diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index a60eb2b23c..83812caf96 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -718,15 +718,15 @@ void LoadBasicChunks() { // CHUNK_TOTAL_ACTORS seems to be missing in the released version, hard coding a value // TODO: Would be nice to just change 511 to MAX_SAVED_ALIVES cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_ACTORS); - RegisterActors((cptr != NULL) ? READ_32(cptr) : 511); + RegisterActors((cptr != NULL) ? READ_LE_UINT32(cptr) : 511); // CHUNK_TOTAL_GLOBALS seems to be missing in some versions. // So if it is missing, set a reasonably high value for the number of globals. cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_GLOBALS); - RegisterGlobals((cptr != NULL) ? READ_32(cptr) : 512); + RegisterGlobals((cptr != NULL) ? READ_LE_UINT32(cptr) : 512); cptr = FindChunk(INV_OBJ_SCNHANDLE, CHUNK_TOTAL_OBJECTS); - numObjects = (cptr != NULL) ? READ_32(cptr) : 0; + numObjects = (cptr != NULL) ? READ_LE_UINT32(cptr) : 0; cptr = FindChunk(INV_OBJ_SCNHANDLE, CHUNK_OBJECTS); @@ -759,7 +759,7 @@ void LoadBasicChunks() { // CdPlay() stuff cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_CDPLAY_HANDLE); assert(cptr); - uint32 playHandle = READ_32(cptr); + uint32 playHandle = READ_LE_UINT32(cptr); assert(playHandle < 512); SetCdPlayHandle(playHandle); } |