diff options
author | Max Horn | 2007-02-11 18:07:19 +0000 |
---|---|---|
committer | Max Horn | 2007-02-11 18:07:19 +0000 |
commit | 534bfddd0692d818eefacccb903bf721340a4e58 (patch) | |
tree | 9359cff537978a05f8b88fcef77865509507c2bf /engines/scumm/he/resource_he.h | |
parent | 986ff06af932335703dcc8e3a36cc6bff644cbdf (diff) | |
download | scummvm-rg350-534bfddd0692d818eefacccb903bf721340a4e58.tar.gz scummvm-rg350-534bfddd0692d818eefacccb903bf721340a4e58.tar.bz2 scummvm-rg350-534bfddd0692d818eefacccb903bf721340a4e58.zip |
Fix for bug #1506591: HE71-73: Fails to load mouse data (Endian issue?)
svn-id: r25492
Diffstat (limited to 'engines/scumm/he/resource_he.h')
-rw-r--r-- | engines/scumm/he/resource_he.h | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h index 768e7b1fff..01faae5c63 100644 --- a/engines/scumm/he/resource_he.h +++ b/engines/scumm/he/resource_he.h @@ -44,7 +44,7 @@ namespace Scumm { #define MZ_HEADER(x) ((DOSImageHeader *)(x)) #define NE_HEADER(x) ((OS2ImageHeader *)PE_HEADER(x)) #define NE_TYPEINFO_NEXT(x) ((Win16NETypeInfo *)((byte *)(x) + sizeof(Win16NETypeInfo) + \ - ((Win16NETypeInfo *)x)->count * sizeof(Win16NENameInfo))) + FROM_LE_16(((Win16NETypeInfo *)x)->count) * sizeof(Win16NENameInfo))) #define NE_RESOURCE_NAME_IS_NUMERIC (0x8000) #define STRIP_RES_ID_FORMAT(x) (x != NULL && (x[0] == '-' || x[0] == '+') ? ++x : x) @@ -264,39 +264,8 @@ class Win32ResExtractor : public ResExtractor { }; struct Win32ImageResourceDirectoryEntry { - union { - struct { - #ifdef SCUMM_BIGENDIAN - unsigned name_is_string:1; - unsigned name_offset:31; - #else - unsigned name_offset:31; - unsigned name_is_string:1; - #endif - } s1; - uint32 name; - struct { - #ifdef SCUMM_BIG_ENDIAN - uint16 __pad; - uint16 id; - #else - uint16 id; - uint16 __pad; - #endif - } s2; - } u1; - union { - uint32 offset_to_data; - struct { - #ifdef SCUMM_BIG_ENDIAN - unsigned data_is_directory:1; - unsigned offset_to_directory:31; - #else - unsigned offset_to_directory:31; - unsigned data_is_directory:1; - #endif - } s; - } u2; + uint32 name; + uint32 offset_to_data; }; struct Win16NETypeInfo { |