diff options
author | Joost Peters | 2009-02-07 12:55:39 +0000 |
---|---|---|
committer | Joost Peters | 2009-02-07 12:55:39 +0000 |
commit | 25b7a425477adfe3b51f3298996ef99880317776 (patch) | |
tree | 60096188a6b637f160b390f6daccbe7622f183f1 | |
parent | 12d203867d083615a7e6faf52b7c6af903bfd40e (diff) | |
download | scummvm-rg350-25b7a425477adfe3b51f3298996ef99880317776.tar.gz scummvm-rg350-25b7a425477adfe3b51f3298996ef99880317776.tar.bz2 scummvm-rg350-25b7a425477adfe3b51f3298996ef99880317776.zip |
Handle endianness difference in RestoreActorReels() -- fixes bug 2569407 - DW2: Big Endian crash on loading saved game
svn-id: r36245
-rw-r--r-- | engines/tinsel/play.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index 3872d94257..5e5c876abc 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -1149,15 +1149,15 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) { ppi.x = (short)x; ppi.y = (short)y; ppi.bRestore = true; - ppi.speed = (short)(ONE_SECOND/pFilm->frate); + ppi.speed = (short)(ONE_SECOND/FROM_LE_32(pFilm->frate)); ppi.bTop = false; ppi.myescEvent = 0; // Search backwards for now as later column will be the one - for (i = pFilm->numreels - 1; i >= 0; i--) { + for (i = (int)FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) { pFreel = &pFilm->reels[i]; - pmi = (PMULTI_INIT) LockMem(pFreel->mobj); - if (pmi->mulID == actor) { + pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFreel->mobj)); + if ((int32)FROM_LE_32(pmi->mulID) == actor) { ppi.column = (short)i; NewestFilm(hFilm, &pFilm->reels[i]); |