From 7656b519bfd80f433011355749037960f5f9c049 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 8 Jan 2025 18:23:25 +0100 Subject: [PATCH] fix postimg data types mismatch also remove the "postimgflag_t" typedef since its useless and use smoler type for everything we dont need much space lol --- src/doomtype.h | 9 --------- src/p_local.h | 12 +++++++++++- src/p_mobj.c | 2 +- src/p_user.c | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/doomtype.h b/src/doomtype.h index 1ebf0c27c..f74f340fe 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -340,15 +340,6 @@ union FColorRGBA } ATTRPACK; typedef union FColorRGBA RGBA_t; -typedef enum -{ - POSTIMG_WATER = 1, // Underwater screen effect. - POSTIMG_MOTION = 1<<1, // Unused motion blur effect. - POSTIMG_FLIP = 1<<2, // Flipcam screen effect. - POSTIMG_HEAT = 1<<3, // Heatwave screen effect. - POSTIMG_MIRROR = 1<<4, // encore screen effect. -} postimgflag_t; - typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num) #define LUMPERROR UINT32_MAX diff --git a/src/p_local.h b/src/p_local.h index 0f985b571..06d08f25a 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -133,7 +133,7 @@ struct camera_t angle_t old_angle, old_aiming; // postproccess effects - UINT16 postimgflags; + UINT8 postimgflags; }; // demo freecam or something before i commit die @@ -145,6 +145,16 @@ struct demofreecam_s { extern struct demofreecam_s democam; +// post process types +enum +{ + POSTIMG_WATER = 1, // Underwater screen effect. + POSTIMG_MOTION = 1<<1, // Unused motion blur effect. + POSTIMG_FLIP = 1<<2, // Flipcam screen effect. + POSTIMG_HEAT = 1<<3, // Heatwave screen effect. + POSTIMG_MIRROR = 1<<4, // encore screen effect. +}; + extern camera_t camera[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS], cv_cam_still[MAXSPLITSCREENPLAYERS], cv_cam_height[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS], cv_cam_rotate[MAXSPLITSCREENPLAYERS]; diff --git a/src/p_mobj.c b/src/p_mobj.c index 6c2615f29..c50f2fb1b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3547,7 +3547,7 @@ void P_DestroyRobots(void) void P_CalcChasePostImg(player_t *player, camera_t *thiscam) { const boolean flipcam = (player->pflags & PF_FLIPCAM && player->mo->eflags & MFE_VERTICALFLIP); - UINT16 postimgtype = 0; + UINT8 postimgtype = 0; // This can happen when joining if (thiscam->subsector == NULL || thiscam->subsector->sector == NULL) diff --git a/src/p_user.c b/src/p_user.c index 152dee043..882059149 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3424,7 +3424,7 @@ static boolean P_CameraCheckWaterFirstperson(player_t *player, sector_t *sector, static void P_CalcPostImg(player_t *player, camera_t *thiscam) { sector_t *sector = NULL; - INT16 postimgtype = 0; + UINT8 postimgtype = 0; //INT32 *param; fixed_t pviewheight = 0;