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/scene.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/scene.cpp')
-rw-r--r-- | engines/tinsel/scene.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index 2fda5176fb..986d54f59f 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -130,14 +130,14 @@ const SCENE_STRUC *GetSceneStruc(const byte *pStruc) { const byte *p = pStruc; memset(&g_tempStruc, 0, sizeof(SCENE_STRUC)); - g_tempStruc.numEntrance = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.numPoly = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.numTaggedActor = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.defRefer = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.hSceneScript = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.hEntrance = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.hPoly = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); - g_tempStruc.hTaggedActor = FROM_LE_32(READ_LE_UINT32(p)); p += sizeof(uint32); + g_tempStruc.numEntrance = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.numPoly = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.numTaggedActor = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.defRefer = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.hSceneScript = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.hEntrance = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.hPoly = FROM_LE_32(READ_32(p)); p += sizeof(uint32); + g_tempStruc.hTaggedActor = FROM_LE_32(READ_32(p)); p += sizeof(uint32); return &g_tempStruc; } @@ -223,7 +223,7 @@ static void LoadScene(SCNHANDLE scene, int entry) { // CdPlay() stuff byte *cptr = FindChunk(scene, CHUNK_CDPLAY_FILENUM); assert(cptr); - i = READ_LE_UINT32(cptr); + i = READ_32(cptr); assert(i < 512); cptr = FindChunk(scene, CHUNK_CDPLAY_FILENAME); assert(cptr); @@ -266,10 +266,10 @@ static void LoadScene(SCNHANDLE scene, int entry) { // Run the appropriate entrance code (if any) es = (const ENTRANCE_STRUC *)LockMem(ss->hEntrance); for (i = 0; i < ss->numEntrance; i++) { - if (FROM_LE_32(es->eNumber) == (uint)entry) { + if (FROM_32(es->eNumber) == (uint)entry) { if (es->hScript) { init.event = STARTUP; - init.hTinselCode = FROM_LE_32(es->hScript); + init.hTinselCode = FROM_32(es->hScript); CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } |