From 2859b647026af1a927d1a74100f125bbc0f77db3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 22 Jul 2006 17:28:48 +0000 Subject: Fix struct packing issues (macros are not resolve in #pragma params, at least for GCC) svn-id: r23569 --- engines/gob/game.h | 8 ++------ engines/gob/goblin.h | 8 ++------ engines/gob/map.h | 8 ++------ engines/gob/mult.h | 15 +++++++-------- engines/gob/scenery.h | 8 ++------ engines/gob/video.h | 8 ++------ 6 files changed, 17 insertions(+), 38 deletions(-) (limited to 'engines/gob') 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // END STRUCT PACKING // Globals @@ -295,7 +291,9 @@ protected: class Mult_v2 : public Mult_v1 { public: -#pragma START_PACK_STRUCTS + +#include // 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 // 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 // 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 // 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 // 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 // END STRUCT PACKING struct PalDesc { Color *vgaPal; -- cgit v1.2.3