[Scummvm-cvs-logs] SF.net SVN: scummvm: [27830] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Jul 1 20:18:43 CEST 2007
Revision: 27830
http://scummvm.svn.sourceforge.net/scummvm/?rev=27830&view=rev
Author: fingolfin
Date: 2007-07-01 11:18:43 -0700 (Sun, 01 Jul 2007)
Log Message:
-----------
Re-added __attribute__(packed)
Modified Paths:
--------------
scummvm/trunk/common/scummsys.h
scummvm/trunk/engines/agos/vga.h
scummvm/trunk/engines/gob/game.h
scummvm/trunk/engines/gob/goblin.h
scummvm/trunk/engines/gob/imd.h
scummvm/trunk/engines/gob/map.h
scummvm/trunk/engines/gob/mult.h
scummvm/trunk/engines/gob/scenery.h
scummvm/trunk/engines/gob/video.h
scummvm/trunk/engines/lure/res_struct.h
scummvm/trunk/engines/parallaction/graphics.h
scummvm/trunk/engines/saga/gfx.h
scummvm/trunk/engines/scumm/akos.cpp
scummvm/trunk/engines/scumm/base-costume.h
scummvm/trunk/engines/scumm/boxes.cpp
scummvm/trunk/engines/scumm/file.cpp
scummvm/trunk/engines/scumm/he/intern_he.h
scummvm/trunk/engines/scumm/he/resource_he.h
scummvm/trunk/engines/scumm/imuse/instrument.cpp
scummvm/trunk/engines/scumm/intern.h
scummvm/trunk/engines/scumm/object.h
scummvm/trunk/engines/scumm/player_v2.h
scummvm/trunk/engines/sky/sound.cpp
scummvm/trunk/engines/sky/struc.h
scummvm/trunk/engines/sword1/mouse.h
scummvm/trunk/engines/sword1/object.h
scummvm/trunk/engines/sword1/router.h
scummvm/trunk/engines/sword1/sworddefs.h
scummvm/trunk/sound/mods/module.h
scummvm/trunk/sound/voc.h
scummvm/trunk/test/common/pack.h
Modified: scummvm/trunk/common/scummsys.h
===================================================================
--- scummvm/trunk/common/scummsys.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/common/scummsys.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -313,8 +313,10 @@
//
#if defined(__GNUC__)
#define NORETURN __attribute__((__noreturn__))
+ #define PACKED_STRUCT __attribute__((packed))
#define GCC_PRINTF(x,y) __attribute__((format(printf, x, y)))
#else
+ #define PACKED_STRUCT
#define GCC_PRINTF(x,y)
#endif
Modified: scummvm/trunk/engines/agos/vga.h
===================================================================
--- scummvm/trunk/engines/agos/vga.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/agos/vga.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -40,20 +40,20 @@
uint16 x_4;
uint16 animationTable;
uint16 x_5;
-};
+} PACKED_STRUCT;
struct ImageHeader_Feeble {
uint16 id;
uint16 x_1;
uint16 scriptOffs;
uint16 x_2;
-};
+} PACKED_STRUCT;
struct AnimationHeader_Feeble {
uint16 scriptOffs;
uint16 x_2;
uint16 id;
-};
+} PACKED_STRUCT;
// Simon 1/2
struct ImageHeader_Simon {
@@ -61,13 +61,13 @@
uint16 color;
uint16 x_2;
uint16 scriptOffs;
-};
+} PACKED_STRUCT;
struct AnimationHeader_Simon {
uint16 id;
uint16 x_2;
uint16 scriptOffs;
-};
+} PACKED_STRUCT;
// Elvira 1/2 and Waxworks
@@ -76,14 +76,14 @@
uint16 color;
uint16 x_2;
uint16 scriptOffs;
-};
+} PACKED_STRUCT;
struct AnimationHeader_WW {
uint16 id;
uint16 x_1;
uint16 x_2;
uint16 scriptOffs;
-};
+} PACKED_STRUCT;
// Common
struct VgaFileHeader2_Common {
@@ -96,7 +96,7 @@
uint16 x_4;
uint16 animationTable;
uint16 x_5;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/game.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -48,7 +48,7 @@
uint16 funcEnter;
uint16 funcLeave;
uint16 funcSub;
- };
+ } PACKED_STRUCT;
#define szGame_TotResItem (4 + 2 + 2 + 2)
struct TotResItem {
@@ -57,7 +57,7 @@
int16 size;
int16 width;
int16 height;
- };
+ } PACKED_STRUCT;
#define szGame_TotResTable (2 + 1)
struct TotResTable {
@@ -65,7 +65,7 @@
byte unknown;
TotResItem *items;
byte *dataPtr;
- };
+ } PACKED_STRUCT;
#define szGame_ExtItem (4 + 2 + 2 + 2)
struct ExtItem {
@@ -73,34 +73,34 @@
uint16 size;
int16 width; // width & 0x7FFF: width, width & 0x8000: pack flag
int16 height; // not zero
- };
+ } PACKED_STRUCT;
#define szGame_ExtTable (2 + 1)
struct ExtTable {
int16 itemsCount;
byte unknown;
ExtItem* items;
- };
+ } PACKED_STRUCT;
#define szGame_TotTextItem (2 + 2)
struct TotTextItem {
int16 offset;
int16 size;
- };
+ } PACKED_STRUCT;
#define szGame_TotTextTable (2)
struct TotTextTable {
int16 itemsCount;
TotTextItem *items;
byte *dataPtr;
- };
+ } PACKED_STRUCT;
struct InputDesc {
int16 fontIndex;
int16 backColor;
int16 frontColor;
byte *ptr;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/goblin.h
===================================================================
--- scummvm/trunk/engines/gob/goblin.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/goblin.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -51,7 +51,7 @@
int16 freq; // high/low byte * 100 - frequency
int16 repCount; // high/low byte - repeat count
int16 sndFrame;
- };
+ } PACKED_STRUCT;
typedef Gob_State *Gob_PState;
@@ -90,12 +90,12 @@
char multObjIndex;
char unk14;
char visible;
- };
+ } PACKED_STRUCT;
struct Gob_Pos {
char x;
char y;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/imd.h
===================================================================
--- scummvm/trunk/engines/gob/imd.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/imd.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -41,7 +41,7 @@
int16 top;
int16 right;
int16 bottom;
- };
+ } PACKED_STRUCT;
struct Imd {
int16 handle;
@@ -65,7 +65,7 @@
int32 frameDataSize;
int32 vidBufferSize;
Video::Color *extraPalette;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/map.h
===================================================================
--- scummvm/trunk/engines/gob/map.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/map.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -51,7 +51,7 @@
int16 x;
int16 y;
int16 notWalkable;
- };
+ } PACKED_STRUCT;
#define szMap_ItemPos 3
@@ -59,7 +59,7 @@
int8 x;
int8 y;
int8 orient;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/mult.h
===================================================================
--- scummvm/trunk/engines/gob/mult.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/mult.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -63,7 +63,7 @@
int8 redrawAnimation;
int8 redrawLayer;
uint8 redrawFrame;
- };
+ } PACKED_STRUCT;
struct Mult_GobState {
int16 animation; // .
@@ -74,7 +74,7 @@
int16 freq; // |- [1+]
int8 repCount; // |
uint8 speaker; // '
- };
+ } PACKED_STRUCT;
struct Mult_Object {
int32 *pPosX;
@@ -104,12 +104,12 @@
int16 newTop;
int16 newRight;
int16 newBottom;
- };
+ } PACKED_STRUCT;
struct Mult_StaticKey {
int16 frame;
int16 layer;
- };
+ } PACKED_STRUCT;
struct Mult_AnimKey {
int16 frame;
@@ -117,14 +117,14 @@
int16 posX;
int16 posY;
int16 order;
- };
+ } PACKED_STRUCT;
struct Mult_TextKey {
int16 frame;
int16 cmd;
char unknown[18];
byte script[6];
- };
+ } PACKED_STRUCT;
struct Mult_PalKey {
int16 frame;
@@ -133,14 +133,14 @@
int16 unknown0;
int16 unknown1;
int8 subst[16][4];
- };
+ } PACKED_STRUCT;
struct Mult_PalFadeKey {
int16 frame;
int16 fade;
int16 palIndex;
int8 flag;
- };
+ } PACKED_STRUCT;
struct Mult_SndKey {
int16 frame;
@@ -150,7 +150,7 @@
int16 repCount;
int16 resId;
int16 soundIndex;
- };
+ } PACKED_STRUCT;
struct Mult_ImdKey {
int16 frame;
@@ -162,7 +162,7 @@
int16 lastFrame;
int8 palStart;
int8 palEnd;
- };
+ } PACKED_STRUCT;
struct Mult_Data {
int16 palFadeKeysCount;
@@ -212,7 +212,7 @@
char *imdFiles;
char *somepointer10; // ?
byte *execPtr;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/scenery.h
===================================================================
--- scummvm/trunk/engines/gob/scenery.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/scenery.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -38,7 +38,7 @@
int16 right; //These are stored in Little Endian format
int16 top; //And should be converted by client code when accessed
int16 bottom; //i.e. use FROM_LE_16()
- };
+ } PACKED_STRUCT;
struct StaticPlane {
int8 pictIndex;
@@ -47,13 +47,13 @@
int16 destX;
int16 destY;
int8 transp;
- };
+ } PACKED_STRUCT;
struct StaticLayer {
int16 backResId;
int16 planeCount;
StaticPlane *planes;
- };
+ } PACKED_STRUCT;
// Animations
@@ -63,7 +63,7 @@
int8 destX;
int8 destY;
int8 notFinal;
- };
+ } PACKED_STRUCT;
struct AnimLayer {
int16 unknown0;
@@ -74,7 +74,7 @@
int8 transp;
int16 framesCount;
AnimFramePiece *frames;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/gob/video.h
===================================================================
--- scummvm/trunk/engines/gob/video.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/gob/video.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -85,7 +85,7 @@
byte red;
byte green;
byte blue;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/lure/res_struct.h
===================================================================
--- scummvm/trunk/engines/lure/res_struct.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/lure/res_struct.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -47,7 +47,7 @@
uint16 id;
byte vMajor;
byte vMinor;
-};
+} PACKED_STRUCT;
struct FileEntry {
uint16 id;
@@ -55,7 +55,7 @@
byte sizeExtension;
uint16 size;
uint16 offset;
-};
+} PACKED_STRUCT;
struct HotspotResource {
uint16 hotspotId;
@@ -91,7 +91,7 @@
uint16 delayCtr;
byte flags2;
byte hdrFlags;
-};
+} PACKED_STRUCT;
struct HotspotAnimResource {
uint16 animRecordId;
@@ -105,18 +105,18 @@
uint8 downFrame;
uint8 leftFrame;
uint8 rightFrame;
-};
+} PACKED_STRUCT;
struct MovementResource {
uint16 frameNumber;
int16 xChange;
int16 yChange;
-};
+} PACKED_STRUCT;
struct RoomRect {
int16 xs, xe;
int16 ys, ye;
-};
+} PACKED_STRUCT;
struct RoomResource {
uint16 roomNumber;
@@ -133,7 +133,7 @@
uint8 areaFlag;
RoomRect walkBounds;
uint16 numExits;
-};
+} PACKED_STRUCT;
struct RoomExitResource {
int16 xs, xe, ys, ye;
@@ -141,12 +141,12 @@
uint8 newRoom;
uint8 direction;
int16 newRoomX, newRoomY;
-};
+} PACKED_STRUCT;
struct HotspotOverrideResource {
uint16 hotspotId;
int16 xs, xe, ys, ye;
-};
+} PACKED_STRUCT;
struct RoomExitHotspotResource {
uint16 hotspotId;
@@ -154,7 +154,7 @@
int16 ys, ye;
uint16 cursorNum;
uint16 destRoomNumber;
-};
+} PACKED_STRUCT;
struct RoomExitJoinResource {
uint16 hotspot1Id;
@@ -168,41 +168,41 @@
uint8 h2OpenSound;
uint8 h2CloseSound;
byte blocked;
-};
+} PACKED_STRUCT;
struct HotspotActionResource {
byte action;
uint16 sequenceOffset;
-};
+} PACKED_STRUCT;
struct TalkHeaderResource {
uint16 hotspotId;
uint16 offset;
-};
+} PACKED_STRUCT;
struct TalkDataHeaderResource {
uint16 recordId;
uint16 listOffset;
uint16 responsesOffset;
-};
+} PACKED_STRUCT;
struct TalkDataResource {
uint16 preSequenceId;
uint16 descId;
uint16 postSequenceId;
-};
+} PACKED_STRUCT;
struct TalkResponseResource {
uint16 sequenceId1;
uint16 sequenceId2;
uint16 sequenceId3;
-};
+} PACKED_STRUCT;
struct RoomExitCoordinateResource {
int16 x;
int16 y;
uint16 roomNumber;
-};
+} PACKED_STRUCT;
#define ROOM_EXIT_COORDINATES_NUM_ENTRIES 6
#define ROOM_EXIT_COORDINATES_NUM_ROOMS 52
@@ -210,20 +210,20 @@
struct RoomExitCoordinateEntryResource {
uint8 roomIndex[ROOM_EXIT_COORDINATES_NUM_ROOMS];
RoomExitCoordinateResource entries[ROOM_EXIT_COORDINATES_NUM_ENTRIES];
-};
+} PACKED_STRUCT;
#define MAX_SCHEDULE_ENTRY_PARAMS 5
struct CharacterScheduleResource {
uint16 action;
uint16 params[MAX_SCHEDULE_ENTRY_PARAMS];
-};
+} PACKED_STRUCT;
struct RoomExitIndexedHotspotResource {
uint8 roomNumber;
uint8 hotspotIndex;
uint16 hotspotId;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/parallaction/graphics.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -67,7 +67,7 @@
byte _first;
byte _last;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/saga/gfx.h
===================================================================
--- scummvm/trunk/engines/saga/gfx.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/saga/gfx.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -85,7 +85,7 @@
byte red;
byte green;
byte blue;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/akos.cpp
===================================================================
--- scummvm/trunk/engines/scumm/akos.cpp 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/akos.cpp 2007-07-01 18:18:43 UTC (rev 27830)
@@ -47,12 +47,12 @@
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
Modified: scummvm/trunk/engines/scumm/base-costume.h
===================================================================
--- scummvm/trunk/engines/scumm/base-costume.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/base-costume.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -37,7 +37,7 @@
uint16 width, height;
int16 rel_x, rel_y;
int16 move_x, move_y;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/boxes.cpp 2007-07-01 18:18:43 UTC (rev 27830)
@@ -80,7 +80,7 @@
uint32 unk3;
} v8;
};
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/file.cpp
===================================================================
--- scummvm/trunk/engines/scumm/file.cpp 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/file.cpp 2007-07-01 18:18:43 UTC (rev 27830)
@@ -1257,10 +1257,11 @@
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];
Modified: scummvm/trunk/engines/scumm/he/intern_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/intern_he.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/he/intern_he.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -250,7 +250,7 @@
int32 dim2start; //0C
int32 dim2end; //10
byte data[1]; //14
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/he/resource_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/resource_he.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/he/resource_he.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -172,7 +172,7 @@
byte *memory;
byte *first_resource;
int total_size;
- };
+ } PACKED_STRUCT;
struct WinResource {
char id[256];
@@ -183,7 +183,7 @@
bool is_directory;
char *get_resource_id_quoted();
- };
+ } PACKED_STRUCT;
struct Win32IconResDir {
@@ -191,12 +191,12 @@
byte height;
byte color_count;
byte reserved;
- };
+ } PACKED_STRUCT;
struct Win32CursorDir {
uint16 width;
uint16 height;
- };
+ } PACKED_STRUCT;
struct Win32CursorIconDirEntry {
union {
@@ -207,14 +207,14 @@
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 @@
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 @@
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 @@
uint16 oeminfo;
uint16 res2[10];
uint32 lfanew;
- };
+ } PACKED_STRUCT;
struct Win32ImageFileHeader {
uint16 machine;
@@ -296,12 +296,12 @@
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 @@
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 @@
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 @@
uint16 minor_version;
uint16 number_of_named_entries;
uint16 number_of_id_entries;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/imuse/instrument.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse/instrument.cpp 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/imuse/instrument.cpp 2007-07-01 18:18:43 UTC (rev 27830)
@@ -149,7 +149,7 @@
#include "common/pack-start.h" // START STRUCT PACKING
- struct {
+ struct AdlibInstrument {
byte flags_1;
byte oplvl_1;
byte atdec_1;
@@ -166,10 +166,12 @@
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 @@
byte tva_env_sustain_level;
} partial[4];
byte checksum;
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/intern.h
===================================================================
--- scummvm/trunk/engines/scumm/intern.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/intern.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -554,7 +554,7 @@
int16 type;
int16 dim2;
byte data[1];
- };
+ } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/object.h
===================================================================
--- scummvm/trunk/engines/scumm/object.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/object.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -91,7 +91,7 @@
uint32 transparency;
} v8;
};
-};
+} PACKED_STRUCT;
struct CodeHeader {
union {
@@ -123,7 +123,7 @@
} v7;
};
-};
+} PACKED_STRUCT;
struct ImageHeader { /* file format */
union {
@@ -172,7 +172,7 @@
} hotspot[15];
} v8;
};
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/scumm/player_v2.h
===================================================================
--- scummvm/trunk/engines/scumm/player_v2.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/scumm/player_v2.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -61,7 +61,7 @@
uint16 unknown[4]; // 38 - 44
uint16 music_timer; // 46
uint16 music_script_nr; // 48
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sky/sound.cpp
===================================================================
--- scummvm/trunk/engines/sky/sound.cpp 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sky/sound.cpp 2007-07-01 18:18:43 UTC (rev 27830)
@@ -46,13 +46,13 @@
uint8 room;
uint8 adlibVolume;
uint8 rolandVolume;
-};
+} PACKED_STRUCT;
struct Sfx {
uint8 soundNo;
uint8 flags;
RoomList roomList[10];
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sky/struc.h
===================================================================
--- scummvm/trunk/engines/sky/struc.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sky/struc.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -55,7 +55,7 @@
int16 s_offset_x;
int16 s_offset_y;
uint16 s_compressed_size;
-};
+} PACKED_STRUCT;
struct TurnTable {
uint16 turnTableUp[5];
@@ -63,7 +63,7 @@
uint16 turnTableLeft[5];
uint16 turnTableRight[5];
uint16 turnTableTalk[5];
-};
+} PACKED_STRUCT;
struct MegaSet {
uint16 gridWidth; // 0
@@ -82,7 +82,7 @@
uint16 standRightId; // 11
uint16 standTalkId; // 12
uint16 turnTableId; // 13
-};
+} PACKED_STRUCT;
struct Compact {
uint16 logic; // 0: Entry in logic table to run (byte as <256entries in logic table
@@ -165,7 +165,7 @@
MegaSet megaSet1; //
MegaSet megaSet2; //
MegaSet megaSet3; //
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sword1/mouse.h
===================================================================
--- scummvm/trunk/engines/sword1/mouse.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sword1/mouse.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -60,7 +60,7 @@
uint16 hotSpotX;
uint16 hotSpotY;
uint8 dummyData[0x30];
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sword1/object.h
===================================================================
--- scummvm/trunk/engines/sword1/object.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sword1/object.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -40,7 +40,7 @@
struct OEventSlot { //receiving event list in the compact -
int32 o_event; //array of these with O_TOTAL_EVENTS elements
int32 o_event_script;
-}; // size = 2*int32 = 8 bytes
+} PACKED_STRUCT; // size = 2*int32 = 8 bytes
#define TOTAL_script_levels 5
@@ -48,12 +48,12 @@
int32 o_script_level; //logic level
int32 o_script_id[TOTAL_script_levels]; //script id's (are unique to each level)
int32 o_script_pc[TOTAL_script_levels]; //pc of script for each (if script_manager)
-}; // size = 11*int32 = 44 bytes
+} PACKED_STRUCT; // size = 11*int32 = 44 bytes
struct TalkOffset {
int32 x;
int32 y;
-}; // size = 2*int32 = 8 bytes
+} PACKED_STRUCT; // size = 2*int32 = 8 bytes
struct WalkData {
int32 frame;
@@ -61,7 +61,7 @@
int32 y;
int32 step;
int32 dir;
-}; // size = 5*int32 = 20 bytes
+} PACKED_STRUCT; // size = 5*int32 = 20 bytes
struct Object {
int32 o_type; // 0 broad description of type - object, floor, etc.
@@ -119,7 +119,7 @@
WalkData o_route[O_WALKANIM_SIZE]; // 340 size = 600*20 bytes = 12000
// mega size = 12340 bytes (+ 8 byte offset table + 20 byte header = 12368)
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sword1/router.h
===================================================================
--- scummvm/trunk/engines/sword1/router.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sword1/router.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -44,7 +44,7 @@
int16 dx; // x2 - x1
int16 dy; // y2 - y1
int32 co; // co = (y1*dx) - (x1*dy) from an equation for a line y*dx = x*dy + co
-};
+} PACKED_STRUCT;
struct NodeData {
int16 x;
@@ -52,7 +52,7 @@
int16 level;
int16 prev;
int16 dist;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/engines/sword1/sworddefs.h
===================================================================
--- scummvm/trunk/engines/sword1/sworddefs.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/engines/sword1/sworddefs.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -100,7 +100,7 @@
uint32 comp_length;
char compression[4];
uint32 decomp_length;
-};
+} PACKED_STRUCT;
struct FrameHeader {
uint8 runTimeComp[4];
@@ -115,25 +115,25 @@
char type[16];
uint16 sizeX;
uint16 sizeY;
-};
+} PACKED_STRUCT;
struct AnimUnit {
uint32 animX;
uint32 animY;
uint32 animFrame;
-};
+} PACKED_STRUCT;
struct AnimSet {
uint32 cdt;
uint32 spr;
-};
+} PACKED_STRUCT;
struct WalkGridHeader {
int32 scaleA;
int32 scaleB;
int32 numBars;
int32 numNodes;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/sound/mods/module.h
===================================================================
--- scummvm/trunk/sound/mods/module.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/sound/mods/module.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -37,7 +37,7 @@
byte note;
uint16 period;
uint16 effect;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/sound/voc.h
===================================================================
--- scummvm/trunk/sound/voc.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/sound/voc.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -43,14 +43,14 @@
uint16 datablock_offset;
uint16 version;
uint16 id;
-};
+} PACKED_STRUCT;
struct VocBlockHeader {
uint8 blocktype;
uint8 size[3];
uint8 sr;
uint8 pack;
-};
+} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
Modified: scummvm/trunk/test/common/pack.h
===================================================================
--- scummvm/trunk/test/common/pack.h 2007-07-01 17:02:35 UTC (rev 27829)
+++ scummvm/trunk/test/common/pack.h 2007-07-01 18:18:43 UTC (rev 27830)
@@ -12,7 +12,7 @@
uint16 z;
uint32 a;
byte b;
-};
+} PACKED_STRUCT;
#include <common/pack-end.h> // END STRUCT PACKING
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list