diff options
Diffstat (limited to 'engines/tinsel/dialogs.cpp')
-rw-r--r-- | engines/tinsel/dialogs.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index 0a02924f12..73cad7a68f 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -5551,6 +5551,21 @@ extern void RegisterIcons(void *cptr, int num) { memmove(destP, srcP, 12); destP->attribute = 0; } + } else if (TinselV1Mac) { + // Macintosh version has BE encoded resources, so the values need to be byte swapped + MEM_NODE *node = MemoryAllocFixed(numObjects * sizeof(INV_OBJECT)); + assert(node); + invObjects = (INV_OBJECT *)MemoryDeref(node); + assert(invObjects); + INV_OBJECT *srcP = (INV_OBJECT *)cptr; + INV_OBJECT *destP = (INV_OBJECT *)invObjects; + + for (int i = 0; i < num; ++i, ++destP, ++srcP) { + destP->id = FROM_BE_32(srcP->id); + destP->hIconFilm = FROM_BE_32(srcP->hIconFilm); + destP->hScript = FROM_BE_32(srcP->hScript); + destP->attribute = FROM_BE_32(srcP->attribute); + } } else if (TinselV2) { if (invFilms == NULL) { // First time - allocate memory |