From: DeaDDooMER Date: Fri, 3 Apr 2020 15:05:43 +0000 (+0400) Subject: portability: remove pragma pack X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=90e960736c16dc6d5031f55a7d8b0cccc6453a37;p=flatwaifu.git portability: remove pragma pack --- diff --git a/src/dots.h b/src/dots.h index 5a8b752..c3a930a 100644 --- a/src/dots.h +++ b/src/dots.h @@ -28,12 +28,10 @@ #define MAXDOT 400 -#pragma pack(1) typedef struct { obj_t o; byte c, t; } dot_t; -#pragma pack() extern dot_t dot[MAXDOT]; diff --git a/src/fx.h b/src/fx.h index 5d2e4a7..2ec7ff4 100644 --- a/src/fx.h +++ b/src/fx.h @@ -26,12 +26,10 @@ #define MAXFX 300 -#pragma pack(1) typedef struct { int x, y, xv, yv; char t, s; } fx_t; -#pragma pack() extern fx_t fx[MAXFX]; diff --git a/src/items.h b/src/items.h index bf3bb8a..c2be467 100644 --- a/src/items.h +++ b/src/items.h @@ -34,13 +34,11 @@ enum { I_RTORCH, I_GTORCH, I_BTORCH, I_GOR1, I_FCAN, I_GUN2 }; -#pragma pack(1) typedef struct { obj_t o; int t; int s; } item_t; -#pragma pack() extern item_t it[MAXITEM]; extern int itm_rtime; diff --git a/src/map.h b/src/map.h index e0afb71..e630ff0 100644 --- a/src/map.h +++ b/src/map.h @@ -38,8 +38,6 @@ #ifndef MAP_H_INCLUDED #define MAP_H_INCLUDED -#pragma pack(1) - /* Старый формат - версия 1.04 alpha (и раньше) названия текстур (old_wall_t) @@ -174,6 +172,4 @@ typedef struct{ #define LAST_MAP_VER 2 // Самая последняя версия карты -#pragma pack() - #endif /* MAP_H_INCLUDED */ diff --git a/src/monster.h b/src/monster.h index 98534b3..022962f 100644 --- a/src/monster.h +++ b/src/monster.h @@ -38,7 +38,6 @@ enum { #define MN_TN (MN__LAST-MN_DEMON) -#pragma pack(1) typedef struct { obj_t o; byte t, d, st, ftime; @@ -48,7 +47,6 @@ typedef struct { int aim, life, pain, ac, tx, ty, ammo; short atm; } mn_t; -#pragma pack(0) extern byte nomon; extern int hit_xv, hit_yv; diff --git a/src/player.c b/src/player.c index ecb8b9e..2d781a3 100644 --- a/src/player.c +++ b/src/player.c @@ -68,13 +68,6 @@ byte plr_goanim[]="BDACDA"; byte plr_dieanim[]="HHHHIIIIJJJJKKKKLLLLMMMM"; byte plr_slopanim[]="OOPPQQRRSSTTUUVVWW"; - -#pragma pack(1) -struct { - int ku,kd,kl,kr,kf,kj,kwl,kwr,kp; -} _keys; -#pragma pack() - static void PL_save_player (player_t *p, FILE *h) { myfwrite32(p->o.x, h); myfwrite32(p->o.y, h); diff --git a/src/player.h b/src/player.h index db4f992..48c49ab 100644 --- a/src/player.h +++ b/src/player.h @@ -54,7 +54,6 @@ #define PL_AIR 360 #define PL_POWERUP_TIME 546 -#pragma pack(1) typedef struct { obj_t o; int looky; @@ -76,7 +75,6 @@ typedef struct { char lives; int ku, kd, kl, kr, kf, kj, kwl, kwr, kp; } player_t; -#pragma pack() extern byte p_immortal; extern byte p_fly; diff --git a/src/smoke.h b/src/smoke.h index 8ba0a0f..f68ae94 100644 --- a/src/smoke.h +++ b/src/smoke.h @@ -30,13 +30,11 @@ #define SMSN 10 #define FLSN 8 -#pragma pack(1) typedef struct { int x, y, xv, yv; byte t, s; short o; } smoke_t; -#pragma pack() extern smoke_t sm[MAXSMOK]; diff --git a/src/switch.c b/src/switch.c index b04c303..5eebc2d 100644 --- a/src/switch.c +++ b/src/switch.c @@ -35,14 +35,12 @@ #define MAXSW 100 -#pragma pack(1) typedef struct { byte x, y; byte t, tm; byte a, b, c, d; byte f; } sw_t; -#pragma pack() int sw_secrets; diff --git a/src/view.h b/src/view.h index 33eacd2..6b70fdd 100644 --- a/src/view.h +++ b/src/view.h @@ -42,7 +42,6 @@ enum { GS_BVIDEO, GS_EVIDEO, GS_END3ANIM }; -#pragma pack(1) typedef struct { int x, y; // coordinates int xv, yv; // velocity @@ -59,7 +58,6 @@ typedef struct { char n[8]; char t; } wall_t; -#pragma pack() extern byte w_horiz; extern int sky_type; diff --git a/src/weapons.h b/src/weapons.h index 0939b31..fc4f7a3 100644 --- a/src/weapons.h +++ b/src/weapons.h @@ -26,14 +26,12 @@ #define MAXWPN 300 -#pragma pack(1) typedef struct { obj_t o; byte t, s; int own; short target; } weapon_t; -#pragma pack() extern weapon_t wp[MAXWPN];