diff options
| author | Max Horn | 2006-07-22 17:28:48 +0000 | 
|---|---|---|
| committer | Max Horn | 2006-07-22 17:28:48 +0000 | 
| commit | 2859b647026af1a927d1a74100f125bbc0f77db3 (patch) | |
| tree | e842c9e2e67296f5bbc48645ba49b469edb7bd22 | |
| parent | 1ffd49604357ed6fd63e133369a89e3b57711ae2 (diff) | |
| download | scummvm-rg350-2859b647026af1a927d1a74100f125bbc0f77db3.tar.gz scummvm-rg350-2859b647026af1a927d1a74100f125bbc0f77db3.tar.bz2 scummvm-rg350-2859b647026af1a927d1a74100f125bbc0f77db3.zip  | |
Fix struct packing issues (macros are not resolve in #pragma params, at least for GCC)
svn-id: r23569
32 files changed, 116 insertions, 181 deletions
diff --git a/common/pack-end.h b/common/pack-end.h new file mode 100644 index 0000000000..28461e16a7 --- /dev/null +++ b/common/pack-end.h @@ -0,0 +1,24 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2002-2006 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#if defined(SCUMMVM_USE_PRAGMA_PACK) +  #pragma pack() +#endif diff --git a/common/pack-start.h b/common/pack-start.h new file mode 100644 index 0000000000..b39238d03b --- /dev/null +++ b/common/pack-start.h @@ -0,0 +1,24 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2002-2006 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#if defined(SCUMMVM_USE_PRAGMA_PACK) +  #pragma pack(1) +#endif diff --git a/common/scummsys.h b/common/scummsys.h index cb26901ddf..c1bfc50528 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -73,15 +73,15 @@  //  // By default we try to use pragma push/pop to ensure various structs we use  // are "packed". If your compiler doesn't support this pragma, you are in for  -// a problem. If you are lucky, an equivalent pragma is available, in which -// case you can redefine these two macros appropriately. Or maybe your port -// simply *always* packs everything, in which case you could #undefine them. +// a problem. If you are lucky, there is a compiler switch, or another pragma, +// doing the same thing -- in that case, try to modify common/pack-begin.h and +// common/pack-end.h accordingly. Or maybe your port simply *always* packs +// everything, in which case you could #undefine SCUMMVM_USE_PRAGMA_PACK.  //  // If neither is possible, tough luck. Try to contact the team, maybe we can  // come up with a solution, though I wouldn't hold my breath on it :-/.  // -#define START_PACK_STRUCTS pack(push, 1) -#define END_PACK_STRUCTS   pack(pop) +#define SCUMMVM_USE_PRAGMA_PACK  #if defined(_MSC_VER) && !defined(__SYMBIAN32__) && !defined(_WIN32_WCE) diff --git a/engines/gob/game.h b/engines/gob/game.h index 4cbc183f44..f6abc2ee67 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -31,9 +31,7 @@ namespace Gob {  class Game {  public: -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct Collision {  		int16 id; @@ -131,9 +129,7 @@ public:  		int32 vidBufferSize;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	TotResTable *_totResourceTable;  	Collision *_collisionAreas; diff --git a/engines/gob/goblin.h b/engines/gob/goblin.h index 3bc6d263c7..c6b7ae44ed 100644 --- a/engines/gob/goblin.h +++ b/engines/gob/goblin.h @@ -38,9 +38,7 @@ class Goblin {  public: -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct Gob_State {  		int16 animation;// +0h @@ -97,9 +95,7 @@ public:  		char y;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	Util::List *_objList;  	Gob_Object *_goblins[4]; diff --git a/engines/gob/map.h b/engines/gob/map.h index c4d4f5a452..ed92116f01 100644 --- a/engines/gob/map.h +++ b/engines/gob/map.h @@ -43,9 +43,7 @@ public:  		kDirSE = 0x5100  	}; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct Point {  		int16 x; @@ -61,9 +59,7 @@ public:  		int8 orient;		// ??  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	int16 _mapWidth;  	int16 _mapHeight; diff --git a/engines/gob/mult.h b/engines/gob/mult.h index 50f678e61a..dad57b7b1c 100644 --- a/engines/gob/mult.h +++ b/engines/gob/mult.h @@ -32,9 +32,7 @@ namespace Gob {  class Mult {  public: -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct Mult_AnimData {  		int8 animation; @@ -160,9 +158,7 @@ public:  		int16 field_E;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	// Globals @@ -295,7 +291,9 @@ protected:  class Mult_v2 : public Mult_v1 {  public: -#pragma START_PACK_STRUCTS + +#include <common/pack-start.h>	// START STRUCT PACKING +  	struct Mult_Data {  		int16 palFadeKeysCount;  		Mult_PalFadeKey *palFadeKeys; @@ -345,7 +343,8 @@ public:  		char *somepointer10; // ?  		char *execPtr;  	}; -#pragma END_PACK_STRUCTS + +#include <common/pack-end.h>	// END STRUCT PACKING  	Mult_Data *_multData2; // TODO: This'll be _multData once every function using it  	                       //       in GOB2 is done diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h index 925130e687..aad6a57dbf 100644 --- a/engines/gob/scenery.h +++ b/engines/gob/scenery.h @@ -28,9 +28,7 @@ namespace Gob {  class Scenery {  public: -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct PieceDesc {  		int16 left;		//NOTE: @@ -75,9 +73,7 @@ public:  		AnimFramePiece *frames;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	struct Static {  		int16 layersCount; diff --git a/engines/gob/video.h b/engines/gob/video.h index f9c48b0e0e..61e89b1d77 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -73,9 +73,7 @@ public:  #define DISABLE_SPR_ALLOC	0x20  #define SCUMMVM_CURSOR		0x100 -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct Color {  		byte red; @@ -83,9 +81,7 @@ public:  		byte blue;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	struct PalDesc {  		Color *vgaPal; diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h index 931ec15a34..65047afc59 100644 --- a/engines/lure/res_struct.h +++ b/engines/lure/res_struct.h @@ -37,9 +37,7 @@ extern const char *actionList[];  /*                                                                         */  /*-------------------------------------------------------------------------*/ -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct VersionStructure {  	uint16 id; @@ -215,9 +213,7 @@ struct RoomExitIndexedHotspotResource {  	uint16 hotspotId;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  // Class template for a derived list that destroys the contained  // object when the record containing it is destroyed. It's not diff --git a/engines/queen/queen.h b/engines/queen/queen.h index ca07efc1f1..9ca46be1c5 100644 --- a/engines/queen/queen.h +++ b/engines/queen/queen.h @@ -49,9 +49,7 @@ FORCEINLINE int16 READ_BE_INT16(const void *ptr) {  namespace Queen { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct GameStateHeader {  	uint32 version; @@ -60,9 +58,7 @@ struct GameStateHeader {  	char description[32];  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  class BamScene;  class BankManager; diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h index 1bffbd2834..f3a2f14068 100644 --- a/engines/saga/gfx.h +++ b/engines/saga/gfx.h @@ -78,9 +78,7 @@ struct ClipData {  	}  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct PalEntry {  	byte red; @@ -88,9 +86,7 @@ struct PalEntry {  	byte blue;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  struct Color {  	int red; diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index f0bbc0bcc8..139c18be37 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -36,9 +36,7 @@  namespace Scumm { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct AkosHeader {  	byte unk_1[2]; @@ -54,9 +52,7 @@ struct AkosOffset {  	uint16 akci;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  enum AkosOpcodes { diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h index 56b4f717db..b4e875a4a8 100644 --- a/engines/scumm/base-costume.h +++ b/engines/scumm/base-costume.h @@ -29,9 +29,7 @@  namespace Scumm { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct CostumeInfo {  	uint16 width, height; @@ -39,9 +37,7 @@ struct CostumeInfo {  	int16 move_x, move_y;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index 5a42a99212..a066b448de 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -31,9 +31,7 @@  namespace Scumm { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct Box {				/* Internal walkbox file format */  	union { @@ -81,9 +79,7 @@ struct Box {				/* Internal walkbox file format */  	};  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  #define BOX_MATRIX_SIZE 2000  #define BOX_DEBUG 0 diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp index a043710dea..b08ec0e41f 100644 --- a/engines/scumm/file.cpp +++ b/engines/scumm/file.cpp @@ -1241,9 +1241,7 @@ static ScummNESFile::LFL lfls[] = {  	{ -1, NULL }  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct _lfl_index {  	byte	room_lfl[55]; @@ -1256,9 +1254,7 @@ struct _lfl_index {  	uint16	sound_addr[100];  } lfl_index; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  bool ScummNESFile::generateResource(int res) { diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index 514e98afc9..250dbaad5a 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -226,9 +226,7 @@ protected:  		const char *desc;  	}; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct ArrayHeader {  		int32 type;      //0 @@ -239,9 +237,7 @@ protected:  		byte data[1];    //14  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	const OpcodeEntryV72he *_opcodesV72he; diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h index 5176f6bb41..468812a236 100644 --- a/engines/scumm/he/resource_he.h +++ b/engines/scumm/he/resource_he.h @@ -172,9 +172,7 @@ class Win32ResExtractor : public ResExtractor {   * Structures   */ -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct WinLibrary {  		Common::File *file; @@ -456,9 +454,7 @@ class Win32ResExtractor : public ResExtractor {  		uint16 number_of_id_entries;  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  /*   * Function Prototypes diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 36bc1c7306..2ccce37b36 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -519,9 +519,7 @@ protected:  		kDwordArray = 6  	}; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  	struct ArrayHeader {  		int16 dim1; @@ -530,9 +528,7 @@ protected:  		byte data[1];  	}; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  	const OpcodeEntryV6 *_opcodesV6; diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 6b07ed5dba..6ba1d60a60 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -36,9 +36,7 @@  namespace Scumm { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct BompHeader {			/* Bomp header */  	union { @@ -53,9 +51,7 @@ struct BompHeader {			/* Bomp header */  	};  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  bool ScummEngine::getClass(int obj, int cls) const { diff --git a/engines/scumm/object.h b/engines/scumm/object.h index c622ed026a..016aea1803 100644 --- a/engines/scumm/object.h +++ b/engines/scumm/object.h @@ -51,9 +51,7 @@ struct ObjectData {  	byte flags;  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct RoomHeader {  	union { @@ -159,9 +157,7 @@ struct ImageHeader { /* file format */  	};  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  struct FindObjectInRoom {  	const CodeHeader *cdhd; diff --git a/engines/scumm/player_v2.h b/engines/scumm/player_v2.h index 88562311fc..066da8acde 100644 --- a/engines/scumm/player_v2.h +++ b/engines/scumm/player_v2.h @@ -37,9 +37,7 @@ namespace Scumm {  class ScummEngine; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct channel_data {  	uint16 time_left;          // 00 @@ -66,9 +64,7 @@ struct channel_data {  	uint16 music_script_nr;    // 48  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  /** diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 7b5cb2c145..29d050d12c 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -53,9 +53,7 @@ struct SaveGameHeader {  	char name[32];  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct SaveInfoSection {  	uint32 type; @@ -71,9 +69,7 @@ struct SaveInfoSection {  #define SaveInfoSectionSize (4+4+4 + 4+4 + 4+2) -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  #define INFOSECTION_VERSION 2 diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp index 1458cec359..a76088949e 100644 --- a/engines/scumm/thumbnail.cpp +++ b/engines/scumm/thumbnail.cpp @@ -31,9 +31,7 @@ namespace Scumm {  #define THMB_VERSION 1 -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct ThumbnailHeader {  	uint32 type; @@ -45,9 +43,7 @@ struct ThumbnailHeader {  #define ThumbnailHeaderSize (4+4+1+2+2+1) -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  inline void colorToRGB(uint16 color, uint8 &r, uint8 &g, uint8 &b) { diff --git a/engines/simon/vga.h b/engines/simon/vga.h index 0d13e1d5e2..5b5dbaf63a 100644 --- a/engines/simon/vga.h +++ b/engines/simon/vga.h @@ -26,9 +26,7 @@  namespace Simon { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  // Feeble Files  struct VgaFileHeader_Feeble { @@ -94,9 +92,7 @@ struct AnimationHeader_Simon {  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  enum DrawFlags {  	kDFFlip           = 0x1, diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index a178fa082c..ea21253c5f 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -37,9 +37,7 @@ namespace Sky {  #define SFXF_START_DELAY 0x80  #define SFXF_SAVE 0x20 -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct RoomList {  	uint8 room; @@ -53,9 +51,7 @@ struct Sfx {  	RoomList roomList[10];  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  uint16 Sound::_speechConvertTable[8] = {  	0,									//;Text numbers to file numbers diff --git a/engines/sky/struc.h b/engines/sky/struc.h index 17040a8cea..5536991e05 100644 --- a/engines/sky/struc.h +++ b/engines/sky/struc.h @@ -36,9 +36,7 @@ struct displayText_t {  	uint32 textWidth;  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct dataFileHeader {  	uint16 flag; // bit 0: set for colour data, clear for not @@ -166,9 +164,7 @@ struct Compact {  	MegaSet megaSet3;	 //  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  } // End of namespace Sky diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h index 78833362df..c57cab8417 100644 --- a/engines/sword1/mouse.h +++ b/engines/sword1/mouse.h @@ -48,9 +48,7 @@ struct MouseObj {  	Object *compact;  }; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct MousePtr {  	uint16 numFrames; @@ -61,9 +59,7 @@ struct MousePtr {  	uint8  dummyData[0x30];  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  class Logic;  class Menu; diff --git a/engines/sword1/object.h b/engines/sword1/object.h index be1d6017ee..4ab4b735a3 100644 --- a/engines/sword1/object.h +++ b/engines/sword1/object.h @@ -32,9 +32,7 @@ namespace Sword1 {  #define	O_GRID_SIZE		200  #define	EXTRA_GRID_SIZE	20 -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct OEventSlot {			//receiving event list in the compact -  	int32	o_event;		//array of these with O_TOTAL_EVENTS elements @@ -120,9 +118,7 @@ struct Object {  				// mega size = 12340 bytes (+ 8 byte offset table + 20 byte header = 12368)  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  } // End of namespace Sword1 diff --git a/engines/sword1/router.h b/engines/sword1/router.h index 9847cee499..12b8714860 100644 --- a/engines/sword1/router.h +++ b/engines/sword1/router.h @@ -27,9 +27,7 @@  namespace Sword1 { -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct BarData {  	int16 x1; @@ -53,9 +51,7 @@ struct NodeData {  	int16 dist;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  struct FloorData {  	int32		nbars; diff --git a/engines/sword1/sworddefs.h b/engines/sword1/sworddefs.h index 600dfc668a..b060796655 100644 --- a/engines/sword1/sworddefs.h +++ b/engines/sword1/sworddefs.h @@ -89,9 +89,7 @@ namespace Sword1 {  #define	MAX_text_obs	2			//text compacts  #define	TEXT_sect		149			//text compacts exist in section 149, probably after all the megas -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct Header {  	char type[6]; @@ -134,9 +132,7 @@ struct WalkGridHeader {  	int32 numNodes;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  enum fileTypes {  	TYPE_CD1 = 0, diff --git a/sound/voc.h b/sound/voc.h index 19879389fc..f725e2b2d8 100644 --- a/sound/voc.h +++ b/sound/voc.h @@ -34,9 +34,7 @@ namespace Audio {  class AudioStream; -#if defined(START_PACK_STRUCTS) -#pragma START_PACK_STRUCTS -#endif +#include <common/pack-start.h>	// START STRUCT PACKING  struct VocFileHeader {  	uint8 desc[20]; @@ -52,9 +50,7 @@ struct VocBlockHeader {  	uint8 pack;  }; -#if defined(END_PACK_STRUCTS) -#pragma END_PACK_STRUCTS -#endif +#include <common/pack-end.h>	// END STRUCT PACKING  /**   * Take a sample rate parameter as it occurs in a VOC sound header, and  | 
