aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJoost Peters2009-02-02 14:54:08 +0000
committerJoost Peters2009-02-02 14:54:08 +0000
commit427e1471e7f1588408f0a41daa1aeff9457f2275 (patch)
treedfe5377629c82d2810b118bc59cc9d47853ea457 /engines
parent1bd7520e12b3ffefaf2f426d91d03c8e7346216a (diff)
downloadscummvm-rg350-427e1471e7f1588408f0a41daa1aeff9457f2275.tar.gz
scummvm-rg350-427e1471e7f1588408f0a41daa1aeff9457f2275.tar.bz2
scummvm-rg350-427e1471e7f1588408f0a41daa1aeff9457f2275.zip
t2PlayReel() endian fixes
svn-id: r36198
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/play.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index 15e5c95f3d..86b58b8114 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -709,16 +709,16 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Get the reel and MULTI_INIT structure
_ctx->pFreel = GetReel(hFilm, column);
- _ctx->pmi = (MULTI_INIT *)LockMem(_ctx->pFreel->mobj);
+ _ctx->pmi = (MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pFreel->mobj));
- if (_ctx->pmi->mulID == -2) {
+ if ((int32)FROM_LE_32(_ctx->pmi->mulID) == -2) {
CORO_INVOKE_ARGS(SoundReel, (CORO_SUBCTX, hFilm, column, speed, myescEvent,
_ctx->pmi->otherFlags & OTH_RELATEDACTOR));
return;
}
// Save actor's ID
- _ctx->reelActor = _ctx->pmi->mulID;
+ _ctx->reelActor = FROM_LE_32(_ctx->pmi->mulID);
UpdateActorEsc(_ctx->reelActor, myescEvent);
@@ -762,8 +762,8 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Set ghost bit if wanted
if (ActorIsGhost(_ctx->reelActor)) {
- assert(_ctx->pmi->mulFlags == DMA_WNZ || _ctx->pmi->mulFlags == (DMA_WNZ | DMA_GHOST));
- _ctx->pmi->mulFlags |= DMA_GHOST;
+ assert(FROM_LE_32(_ctx->pmi->mulFlags) == DMA_WNZ || FROM_LE_32(_ctx->pmi->mulFlags) == (DMA_WNZ | DMA_GHOST));
+ _ctx->pmi->mulFlags = TO_LE_32(FROM_LE_32(_ctx->pmi->mulFlags) | DMA_GHOST);
}
// Set up and insert the multi-object
@@ -796,10 +796,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
/*
* Sort out x and y
*/
- assert( ((_ctx->pmi->otherFlags & OTH_RELATIVE) && !(_ctx->pmi->otherFlags & OTH_ABSOLUTE))
- || ((_ctx->pmi->otherFlags & OTH_ABSOLUTE) && !(_ctx->pmi->otherFlags & OTH_RELATIVE)) );
+ assert( ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE))
+ || ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE)) );
- _ctx->bRelative = _ctx->pmi->otherFlags & OTH_RELATIVE;
+ _ctx->bRelative = FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE;
if (_ctx->bRelative) {
// Use actor's position. If (x, y) specified, move the actor.
@@ -811,7 +811,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
x = y = 0; // Use (0,0) if no specified
// Add embedded co-ords
- MultiSetAniXY(_ctx->pPlayObj, x + _ctx->pmi->mulX, y + _ctx->pmi->mulY);
+ MultiSetAniXY(_ctx->pPlayObj, x + FROM_LE_32(_ctx->pmi->mulX), y + FROM_LE_32(_ctx->pmi->mulY));
/*
* Sort out z
@@ -826,10 +826,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// N.B. It HAS been ensured that the first column gets here first
- if (_ctx->pmi->mulZ != -1) {
+ if ((int32)FROM_LE_32(_ctx->pmi->mulZ) != -1) {
// Z override in script
- baseZfact = _ctx->pmi->mulZ;
+ baseZfact = FROM_LE_32(_ctx->pmi->mulZ);
baseZposn = (baseZfact << ZSHIFT) + MultiLowest(_ctx->pPlayObj);
if (bTop)
baseZposn += Z_TOPPLAY;
@@ -852,7 +852,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
* another reel starts up for this actor,
* or the actor gets killed.
*/
- InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, _ctx->pFreel->script, speed);
+ InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pFreel->script), speed);
if (bRestore || (ActorEsc(_ctx->reelActor) == true &&
ActorEev(_ctx->reelActor) != GetEscEvents())) {