diff options
author | Max Horn | 2007-07-01 18:18:43 +0000 |
---|---|---|
committer | Max Horn | 2007-07-01 18:18:43 +0000 |
commit | e1bcd70436656ed48933aadca38636f70348c842 (patch) | |
tree | fe324a6c31f5c368277c3b9e9fd42e0440f8dc7f /engines/scumm | |
parent | f7041f94ce0a28ed21b918d1fb05ba66f131ea6d (diff) | |
download | scummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.tar.gz scummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.tar.bz2 scummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.zip |
Re-added __attribute__(packed)
svn-id: r27830
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/akos.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/base-costume.h | 2 | ||||
-rw-r--r-- | engines/scumm/boxes.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/file.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/he/intern_he.h | 2 | ||||
-rw-r--r-- | engines/scumm/he/resource_he.h | 40 | ||||
-rw-r--r-- | engines/scumm/imuse/instrument.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/intern.h | 2 | ||||
-rw-r--r-- | engines/scumm/object.h | 6 | ||||
-rw-r--r-- | engines/scumm/player_v2.h | 2 |
10 files changed, 37 insertions, 34 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index 2a51464341..c8667d7ab2 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -47,12 +47,12 @@ struct AkosHeader { uint16 num_anims; uint16 unk_3; uint16 codec; -}; +} PACKED_STRUCT; struct AkosOffset { uint32 akcd; // offset into the akcd data uint16 akci; // offset into the akci data -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h index e6ef618a3e..155bbff97f 100644 --- a/engines/scumm/base-costume.h +++ b/engines/scumm/base-costume.h @@ -37,7 +37,7 @@ struct CostumeInfo { uint16 width, height; int16 rel_x, rel_y; int16 move_x, move_y; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index 424e5d891e..e79cea4359 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -80,7 +80,7 @@ struct Box { /* Internal walkbox file format */ uint32 unk3; } v8; }; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp index 3ab3e1a2e0..2c7f9ead5b 100644 --- a/engines/scumm/file.cpp +++ b/engines/scumm/file.cpp @@ -1257,10 +1257,11 @@ struct _lfl_index { uint16 script_addr[200]; byte sound_lfl[100]; uint16 sound_addr[100]; -} lfl_index; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING +_lfl_index lfl_index; bool ScummNESFile::generateResource(int res) { const LFL *lfl = &lfls[res - 1]; diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index 54eb470c26..84ad8adb3b 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -250,7 +250,7 @@ protected: int32 dim2start; //0C int32 dim2end; //10 byte data[1]; //14 - }; + } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h index 757cf13b7c..d7f4d99754 100644 --- a/engines/scumm/he/resource_he.h +++ b/engines/scumm/he/resource_he.h @@ -172,7 +172,7 @@ class Win32ResExtractor : public ResExtractor { byte *memory; byte *first_resource; int total_size; - }; + } PACKED_STRUCT; struct WinResource { char id[256]; @@ -183,7 +183,7 @@ class Win32ResExtractor : public ResExtractor { bool is_directory; char *get_resource_id_quoted(); - }; + } PACKED_STRUCT; struct Win32IconResDir { @@ -191,12 +191,12 @@ class Win32ResExtractor : public ResExtractor { byte height; byte color_count; byte reserved; - }; + } PACKED_STRUCT; struct Win32CursorDir { uint16 width; uint16 height; - }; + } PACKED_STRUCT; struct Win32CursorIconDirEntry { union { @@ -207,14 +207,14 @@ class Win32ResExtractor : public ResExtractor { uint16 bit_count; uint32 bytes_in_res; uint16 res_id; - }; + } PACKED_STRUCT; struct Win32CursorIconDir { uint16 reserved; uint16 type; uint16 count; Win32CursorIconDirEntry entries[1]; - }; + } PACKED_STRUCT; struct Win32CursorIconFileDirEntry { byte width; @@ -225,14 +225,14 @@ class Win32ResExtractor : public ResExtractor { uint16 hotspot_y; uint32 dib_size; uint32 dib_offset; - }; + } PACKED_STRUCT; struct Win32CursorIconFileDir { uint16 reserved; uint16 type; uint16 count; Win32CursorIconFileDirEntry entries[1]; - }; + } PACKED_STRUCT; struct Win32BitmapInfoHeader { uint32 size; @@ -246,25 +246,25 @@ class Win32ResExtractor : public ResExtractor { int32 y_pels_per_meter; uint32 clr_used; uint32 clr_important; - }; + } PACKED_STRUCT; struct Win32RGBQuad { byte blue; byte green; byte red; byte reserved; - }; + } PACKED_STRUCT; struct Win32ImageResourceDirectoryEntry { uint32 name; uint32 offset_to_data; - }; + } PACKED_STRUCT; struct Win16NETypeInfo { uint16 type_id; uint16 count; uint32 resloader; // FARPROC16 - smaller? uint16? - }; + } PACKED_STRUCT; struct DOSImageHeader { uint16 magic; @@ -286,7 +286,7 @@ class Win32ResExtractor : public ResExtractor { uint16 oeminfo; uint16 res2[10]; uint32 lfanew; - }; + } PACKED_STRUCT; struct Win32ImageFileHeader { uint16 machine; @@ -296,12 +296,12 @@ class Win32ResExtractor : public ResExtractor { uint32 number_of_symbols; uint16 size_of_optional_header; uint16 characteristics; - }; + } PACKED_STRUCT; struct Win32ImageDataDirectory { uint32 virtual_address; uint32 size; - }; + } PACKED_STRUCT; struct Win32ImageOptionalHeader { uint16 magic; @@ -335,13 +335,13 @@ class Win32ResExtractor : public ResExtractor { uint32 loader_flags; uint32 number_of_rva_and_sizes; Win32ImageDataDirectory data_directory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; - }; + } PACKED_STRUCT; struct Win32ImageNTHeaders { uint32 signature; Win32ImageFileHeader file_header; Win32ImageOptionalHeader optional_header; - }; + } PACKED_STRUCT; struct Win32ImageSectionHeader { byte name[IMAGE_SIZEOF_SHORT_NAME]; @@ -357,14 +357,14 @@ class Win32ResExtractor : public ResExtractor { uint16 number_of_relocations; uint16 number_of_linenumbers; uint32 characteristics; - }; + } PACKED_STRUCT; struct Win32ImageResourceDataEntry { uint32 offset_to_data; uint32 size; uint32 code_page; uint32 resource_handle; - }; + } PACKED_STRUCT; struct Win32ImageResourceDirectory { uint32 characteristics; @@ -373,7 +373,7 @@ class Win32ResExtractor : public ResExtractor { uint16 minor_version; uint16 number_of_named_entries; uint16 number_of_id_entries; - }; + } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp index 23b325c20b..b6ed064bc9 100644 --- a/engines/scumm/imuse/instrument.cpp +++ b/engines/scumm/imuse/instrument.cpp @@ -149,7 +149,7 @@ private: #include "common/pack-start.h" // START STRUCT PACKING - struct { + struct AdlibInstrument { byte flags_1; byte oplvl_1; byte atdec_1; @@ -166,10 +166,12 @@ private: byte flags_b; struct { byte a,b,c,d,e,f,g,h; } extra_b; byte duration; - } _instrument; + } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING + AdlibInstrument _instrument; + public: Instrument_Adlib(const byte *data); Instrument_Adlib(Serializer *s); @@ -241,7 +243,7 @@ private: byte tva_env_sustain_level; } partial[4]; byte checksum; - }; + } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 85025919d6..6723081dfe 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -554,7 +554,7 @@ protected: int16 type; int16 dim2; byte data[1]; - }; + } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/object.h b/engines/scumm/object.h index bf38d42289..f27e6a501e 100644 --- a/engines/scumm/object.h +++ b/engines/scumm/object.h @@ -91,7 +91,7 @@ struct RoomHeader { uint32 transparency; } v8; }; -}; +} PACKED_STRUCT; struct CodeHeader { union { @@ -123,7 +123,7 @@ struct CodeHeader { } v7; }; -}; +} PACKED_STRUCT; struct ImageHeader { /* file format */ union { @@ -172,7 +172,7 @@ struct ImageHeader { /* file format */ } hotspot[15]; } v8; }; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/scumm/player_v2.h b/engines/scumm/player_v2.h index 43771d295f..cd88d57602 100644 --- a/engines/scumm/player_v2.h +++ b/engines/scumm/player_v2.h @@ -61,7 +61,7 @@ struct channel_data { uint16 unknown[4]; // 38 - 44 uint16 music_timer; // 46 uint16 music_script_nr; // 48 -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING |