diff options
author | Filippos Karapetis | 2012-12-11 02:56:48 +0200 |
---|---|---|
committer | Filippos Karapetis | 2012-12-11 02:56:48 +0200 |
commit | b05fa7f20414d6a7571a9ba52f542e527f598c62 (patch) | |
tree | a93459a6cf40000040167e3c6565b2fe1e1b39d8 /engines/tinsel/tinsel.cpp | |
parent | ce87175bede46c1bb938b73484e1db05212defbd (diff) | |
download | scummvm-rg350-b05fa7f20414d6a7571a9ba52f542e527f598c62.tar.gz scummvm-rg350-b05fa7f20414d6a7571a9ba52f542e527f598c62.tar.bz2 scummvm-rg350-b05fa7f20414d6a7571a9ba52f542e527f598c62.zip |
TINSEL: Add resource handling of the BE resources in DW1 Mac
This is the second attempt. All the BE resources of DW1 Mac are
handled correctly now. Added READ_16, READ_32, FROM_16, FROM_32 and
TO_32 to handle all of the different cases where endianess is
already handled. Note that the game scripts are LE, so these
haven't been changed
Diffstat (limited to 'engines/tinsel/tinsel.cpp')
-rw-r--r-- | engines/tinsel/tinsel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 83812caf96..721e76dbac 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_LE_UINT32(cptr) : 511); + RegisterActors((cptr != NULL) ? READ_32(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_LE_UINT32(cptr) : 512); + RegisterGlobals((cptr != NULL) ? READ_32(cptr) : 512); cptr = FindChunk(INV_OBJ_SCNHANDLE, CHUNK_TOTAL_OBJECTS); - numObjects = (cptr != NULL) ? READ_LE_UINT32(cptr) : 0; + numObjects = (cptr != NULL) ? READ_32(cptr) : 0; cptr = FindChunk(INV_OBJ_SCNHANDLE, CHUNK_OBJECTS); @@ -734,10 +734,10 @@ void LoadBasicChunks() { //convert to native endianness INV_OBJECT *io = (INV_OBJECT *)cptr; for (int i = 0; i < numObjects; i++, io++) { - io->id = FROM_LE_32(io->id); - io->hIconFilm = FROM_LE_32(io->hIconFilm); - io->hScript = FROM_LE_32(io->hScript); - io->attribute = FROM_LE_32(io->attribute); + io->id = FROM_32(io->id); + io->hIconFilm = FROM_32(io->hIconFilm); + io->hScript = FROM_32(io->hScript); + io->attribute = FROM_32(io->attribute); } #endif @@ -759,7 +759,7 @@ void LoadBasicChunks() { // CdPlay() stuff cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_CDPLAY_HANDLE); assert(cptr); - uint32 playHandle = READ_LE_UINT32(cptr); + uint32 playHandle = READ_32(cptr); assert(playHandle < 512); SetCdPlayHandle(playHandle); } |