From d029107e7558c81f23d3a3f9669016a271b51648 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 22 Oct 2024 01:17:57 +0200 Subject: [PATCH 1/3] refactor postimg stuff so it can be combined with each other better thx much indev! <3 everything now works with encore! software now also supports screen effects in splitscreen! --- src/d_main.c | 10 +-- src/d_player.h | 2 + src/doomstat.h | 1 - src/doomtype.h | 14 ++--- src/hardware/hw_main.c | 33 ++-------- src/p_mobj.c | 48 ++++++++------- src/p_setup.c | 3 - src/p_tick.c | 6 -- src/p_user.c | 6 +- src/v_video.c | 137 +++++++++++++++++++++-------------------- src/v_video.h | 4 +- 11 files changed, 117 insertions(+), 147 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 1dfe3eafa..1540768f4 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -116,7 +116,6 @@ boolean devparm = false; // started game with -devparm boolean singletics = false; // timedemo boolean lastdraw = false; -postimg_t postimgtype[MAXSPLITSCREENPLAYERS]; INT32 postimgparam[MAXSPLITSCREENPLAYERS]; // These variables are only true if @@ -513,15 +512,12 @@ static boolean D_Display(void) if (rendermode == render_soft) { - if (!splitscreen) - R_ApplyViewMorph(); + if (!splitscreen) + R_ApplyViewMorph(); for (i = 0; i <= splitscreen; i++) { - if (!postimgtype[i]) - continue; - - V_DoPostProcessor(i, postimgtype[i], postimgparam[i]); + V_DoPostProcessor(i, &players[displayplayers[i]], postimgparam[i]); } } diff --git a/src/d_player.h b/src/d_player.h index c2a5d32ce..09400fa9b 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -413,6 +413,8 @@ typedef struct player_s // See pflags_t, above. pflags_t pflags; + UINT16 postimgflags; + // playing animation. panim_t panim; diff --git a/src/doomstat.h b/src/doomstat.h index 01d98fd4e..f70f97059 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -112,7 +112,6 @@ extern UINT8 window_notinfocus; // are we in focus? (backend independant -- hand extern boolean nodrawers; extern boolean noblit; extern boolean lastdraw; -extern postimg_t postimgtype[MAXSPLITSCREENPLAYERS]; extern INT32 postimgparam[MAXSPLITSCREENPLAYERS]; extern INT32 viewwindowx, viewwindowy; diff --git a/src/doomtype.h b/src/doomtype.h index 1dcf47ea7..d7ad320c8 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -344,14 +344,12 @@ typedef union FColorRGBA RGBA_t; typedef enum { - postimg_none, - postimg_water, - postimg_motion, - postimg_flip, - postimg_heat, - postimg_mirror, - postimg_mirrorflip -} postimg_t; + 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/hardware/hw_main.c b/src/hardware/hw_main.c index 99821ca6c..f09d65777 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5205,9 +5205,6 @@ static void HWR_SetTransformAiming(FTransform *trans) void HWR_SetTransform(float fpov, player_t *player) { - postimg_t *postprocessor = &postimgtype[0]; - INT32 i; - gr_viewx = FIXED_TO_FLOAT(viewx); gr_viewy = FIXED_TO_FLOAT(viewy); gr_viewz = FIXED_TO_FLOAT(viewz); @@ -5236,24 +5233,16 @@ void HWR_SetTransform(float fpov, player_t *player) HWR_RollTransform(&atransform, viewroll); atransform.splitscreen = splitscreen; - for (i = 0; i <= splitscreen; i++) - { - if (player != &players[displayplayers[i]]) - continue; - - postprocessor = &postimgtype[i]; - } - atransform.flip = false; - if (*postprocessor == postimg_flip) + if ((player->postimgflags & POSTIMG_FLIP) && !(player->postimgflags & POSTIMG_MIRROR)) atransform.flip = true; atransform.mirror = false; - if (*postprocessor == postimg_mirror) + if ((player->postimgflags & POSTIMG_MIRROR) && !(player->postimgflags & POSTIMG_FLIP)) atransform.mirror = true; atransform.mirrorflip = false; - if (*postprocessor == postimg_mirrorflip) + if ((player->postimgflags & POSTIMG_FLIP) && (player->postimgflags & POSTIMG_MIRROR)) atransform.mirrorflip = true; // Set transform. @@ -5816,20 +5805,8 @@ INT32 HWR_GetTextureUsed(void) void HWR_DoPostProcessor(player_t *player) { - postimg_t *type = &postimgtype[0]; - UINT8 i; - HWD.pfnUnSetShader(); - for (i = splitscreen; i > 0; i--) - { - if (player != &players[displayplayers[i]]) - continue; - - type = &postimgtype[i]; - break; - } - // Armageddon Blast Flash! // Could this even be considered postprocessor? if (!HWR_PalRenderFlashpal() && player->flashcount) @@ -5866,7 +5843,7 @@ void HWR_DoPostProcessor(player_t *player) return; // Drunken vision! WooOOooo~ - if (*type == postimg_water || *type == postimg_heat) + if (player->postimgflags & POSTIMG_WATER || player->postimgflags & POSTIMG_HEAT) { // 10 by 10 grid. 2 coordinates (xy) float v[SCREENVERTS][SCREENVERTS][2]; @@ -5878,7 +5855,7 @@ void HWR_DoPostProcessor(player_t *player) INT32 FREQUENCY; // Modifies the wave. - if (*type == postimg_water) + if (player->postimgflags & POSTIMG_WATER) { WAVELENGTH = 5; AMPLITUDE = 20; diff --git a/src/p_mobj.c b/src/p_mobj.c index 6d97a0f57..558e45329 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3249,7 +3249,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled { boolean itsatwodlevel = false; boolean flipcam = (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP); - postimg_t postimg = postimg_none; + UINT16 postimgflags = 0; UINT8 i; // This can happen when joining @@ -3271,64 +3271,66 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled } } - if (encoremode && !flipcam) - postimg = postimg_mirror; - else if (!encoremode && flipcam) - postimg = postimg_flip; - else if (encoremode && flipcam) - postimg = postimg_mirrorflip; - else if (player->awayviewtics && player->awayviewmobj && !P_MobjWasRemoved(player->awayviewmobj)) // Camera must obviously exist + if (encoremode) + postimgflags |= POSTIMG_MIRROR; + if (flipcam) + postimgflags |= POSTIMG_FLIP; + + if (player->awayviewtics && player->awayviewmobj && !P_MobjWasRemoved(player->awayviewmobj)) // Camera must obviously exist { camera_t dummycam; + dummycam.subsector = player->awayviewmobj->subsector; dummycam.x = player->awayviewmobj->x; dummycam.y = player->awayviewmobj->y; dummycam.z = player->awayviewmobj->z; //dummycam.height = 40*FRACUNIT; // alt view height is 20*FRACUNIT dummycam.height = 0; // Why? Remote viewpoint cameras have no height. + // Are we in water? if (P_CameraCheckWater(&dummycam)) - postimg = postimg_water; - else if (P_CameraCheckHeat(&dummycam)) - postimg = postimg_heat; + postimgflags |= POSTIMG_WATER; + if (P_CameraCheckHeat(&dummycam)) + postimgflags |= POSTIMG_HEAT; } else { // Are we in water? if (P_CameraCheckWater(thiscam)) - postimg = postimg_water; - else if (P_CameraCheckHeat(thiscam)) - postimg = postimg_heat; + postimgflags |= POSTIMG_WATER; + if (P_CameraCheckHeat(thiscam)) + postimgflags |= POSTIMG_HEAT; } - if (postimg != postimg_none) + for (i = 0; i <= splitscreen; i++) { - for (i = 0; i <= splitscreen; i++) - { - if (player != &players[displayplayers[i]]) - continue; + if (player != &players[displayplayers[i]]) + continue; - postimgtype[i] = postimg; - } + players[displayplayers[i]].postimgflags = postimgflags; } if (thiscam->momx || thiscam->momy) { - if (!P_TryCameraMove(thiscam->x + thiscam->momx, thiscam->y + thiscam->momy, thiscam)) - { // Never fails for 2D mode. + if (!P_TryCameraMove(thiscam->x + thiscam->momx, thiscam->y + thiscam->momy, thiscam)) // Never fails for 2D mode. + { mobj_t dummy; + dummy.thinker.function.acp1 = (actionf_p1)P_MobjThinker; dummy.subsector = thiscam->subsector; dummy.x = thiscam->x; dummy.y = thiscam->y; dummy.z = thiscam->z; dummy.height = thiscam->height; + if (player->pflags & PF_TIMEOVER) player->kartstuff[k_timeovercam] = (2*TICRATE)+1; + if (!resetcalled && !(player->pflags & PF_NOCLIP || leveltime < introtime) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. P_ResetCamera(player, thiscam); else P_SlideCameraMove(thiscam); + if (resetcalled) // Okay this means the camera is fully reset. return true; } diff --git a/src/p_setup.c b/src/p_setup.c index 672b1b347..4d9424202 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2587,9 +2587,6 @@ boolean P_SetupLevel(boolean skipprecip, boolean reloadinggamestate) P_LevelInitStuff(reloadinggamestate); - for (i = 0; i <= splitscreen; i++) - postimgtype[i] = postimg_none; - if (mapheaderinfo[gamemap-1]->forcecharacter[0] != '\0' && atoi(mapheaderinfo[gamemap-1]->forcecharacter) != 255) P_ForceCharacter(mapheaderinfo[gamemap-1]->forcecharacter); diff --git a/src/p_tick.c b/src/p_tick.c index 7405792d0..989d27108 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -469,9 +469,6 @@ void P_Ticker(boolean run) return; } - for (i = 0; i <= splitscreen; i++) - postimgtype[i] = postimg_none; - P_MapStart(); if (run) @@ -708,9 +705,6 @@ void P_PreTicker(INT32 frames) INT32 i; ticcmd_t temptic; - for (i = 0; i <= splitscreen; i++) - postimgtype[i] = postimg_none; - hook_defrosting = frames; while (hook_defrosting) diff --git a/src/p_user.c b/src/p_user.c index 7c57fb107..d359ce6be 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4103,7 +4103,7 @@ boolean P_SpectatorJoinGame(player_t *player) return false; } -static void P_CalcPostImg(player_t *player) +/*static void P_CalcPostImg(player_t *player) { sector_t *sector = player->mo->subsector->sector; postimg_t *type = NULL; @@ -4206,7 +4206,7 @@ static void P_CalcPostImg(player_t *player) *param = 5; } #endif -} +}*/ void P_DoTimeOver(player_t *player) { @@ -4992,7 +4992,7 @@ void P_PlayerAfterThink(player_t *player) if (!thiscam->chase) // bob view only if looking through the player's eyes { P_CalcHeight(player); - P_CalcPostImg(player); + //P_CalcPostImg(player); } else { diff --git a/src/v_video.c b/src/v_video.c index fb5fb7a90..af82ad691 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -3189,7 +3189,7 @@ INT32 heatindex[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0}; // Perform a particular image postprocessing function. // -void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param) +void V_DoPostProcessor(INT32 view, player_t *player, INT32 param) { #if NUMSCREENS < 5 // do not enable image post processing for ARM, SH and MIPS CPUs @@ -3197,6 +3197,7 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param) (void)type; (void)param; #else + (void)param; // unused motion blur stuff INT32 yoffset, xoffset; #ifdef HWRENDER @@ -3217,10 +3218,14 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param) else xoffset = 0; - if (type == postimg_water) + UINT8 *tmpscr = screens[4]; + UINT8 *srcscr = screens[0]; + + if (!player->postimgflags) + return; + + if (player->postimgflags & POSTIMG_WATER) { - UINT8 *tmpscr = screens[4]; - UINT8 *srcscr = screens[0]; INT32 y; // Set disStart to a range from 0 to FINEANGLE, incrementing by 128 per tic angle_t disStart = (((leveltime-1)*128) + (rendertimefrac / (FRACUNIT/128))) & FINEMASK; @@ -3257,61 +3262,46 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param) } /* - Unoptimized version - for (x = 0; x < vid.width*vid.bpp; x++) - { - newpix = (x + sine); - - if (newpix < 0) - newpix = 0; - else if (newpix >= vid.width) - newpix = vid.width-1; - - tmpscr[y*vid.width + x] = srcscr[y*vid.width+newpix]; // *(transme + (srcscr[y*vid.width+x]<<8) + srcscr[y*vid.width+newpix]); - }*/ + * Unoptimized version + * for (x = 0; x < vid.width*vid.bpp; x++) + * { + * newpix = (x + sine); + * + * if (newpix < 0) + * newpix = 0; + * else if (newpix >= vid.width) + * newpix = vid.width-1; + * + * tmpscrwater[y*vid.width + x] = srcscr[y*vid.width+newpix]; // *(transme + (srcscr[y*vid.width+x]<<8) + srcscr[y*vid.width+newpix]); + }*/ disStart += 22;//the offset into the displacement map, increment each game loop disStart &= FINEMASK; //clip it to FINEMASK } - VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset, - viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width); + UINT8 *tmp = tmpscr; + tmpscr = srcscr; + srcscr = tmp; } - else if (type == postimg_motion) // Motion Blur! + + /*if (player->postimgflags & POSTIMG_MOTION) // Motion Blur! + * { + * INT32 x, y; + * + * // TODO: Add a postimg_param so that we can pick the translucency level... + * UINT8 *transme = transtables + ((param-1)<postimgflags & POSTIMG_HEAT) // Heat wave { - UINT8 *tmpscr = screens[4]; - UINT8 *srcscr = screens[0]; - INT32 x, y; - - // TODO: Add a postimg_param so that we can pick the translucency level... - UINT8 *transme = transtables + ((param-1)<postimgflags & POSTIMG_FLIP) && !(player->postimgflags & POSTIMG_MIRROR)) // Flip the screen upside-down + { + INT32 y, y2; + + for (y = yoffset, y2 = yoffset+viewheight - 1; y < yoffset+viewheight; y++, y2--) + M_Memcpy(&tmpscr[(y2*vid.width)+xoffset], &srcscr[(y*vid.width)+xoffset], viewwidth); + + UINT8 *tmp = tmpscr; + tmpscr = srcscr; + srcscr = tmp; + } + else if ((player->postimgflags & POSTIMG_MIRROR) && !(player->postimgflags & POSTIMG_FLIP)) // Flip the screen on the x axis { - UINT8 *tmpscr = screens[4]; - UINT8 *srcscr = screens[0]; INT32 y, x, x2; for (y = yoffset; y < yoffset+viewheight; y++) - { for (x = xoffset, x2 = xoffset+((viewwidth*vid.bpp)-1); x < xoffset+(viewwidth*vid.bpp); x++, x2--) tmpscr[y*vid.width + x2] = srcscr[y*vid.width + x]; - } - VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset, - viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width); + UINT8 *tmp = tmpscr; + tmpscr = srcscr; + srcscr = tmp; } - else if (type == postimg_mirrorflip) // Flip the screen upside-down and on the x axis + else if ((player->postimgflags & POSTIMG_MIRROR) && (player->postimgflags & POSTIMG_FLIP)) // Flip the screen upside-down and on the x axis { - UINT8 *tmpscr = screens[4]; - UINT8 *srcscr = screens[0]; INT32 y, x; for (y = yoffset; y < yoffset + viewheight; y++) for (x = xoffset; x < xoffset + viewwidth; x++) tmpscr[((yoffset + viewheight - 1 - y) * vid.width) + xoffset + viewwidth - (x - xoffset) - 1] = srcscr[(y * vid.width) + x]; - VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset, - viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width); + UINT8 *tmp = tmpscr; + tmpscr = srcscr; + srcscr = tmp; } + + VID_BlitLinearScreen(srcscr+vid.width*vid.bpp*yoffset+xoffset, tmpscr+vid.width*vid.bpp*yoffset+xoffset, + viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width); #endif } + // Taken from my videos-in-SRB2 project // Generates a color look-up table // which has up to 64 colors at each channel diff --git a/src/v_video.h b/src/v_video.h index bc1e8c546..a06760215 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -251,7 +251,9 @@ INT32 V_SubStringLengthToFit(const char *string, INT32 width, INT32 option); char V_GetSkincolorChar(INT32 color); -void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param); +typedef struct player_s player_t; + +void V_DoPostProcessor(INT32 view, player_t *player, INT32 param); void V_DrawPatchFill(patch_t *pat); From 19b1683e619a269fa983bb3d56daa8d9b253c5e7 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 22 Oct 2024 01:18:13 +0200 Subject: [PATCH 2/3] make those not look terrible thx --- src/v_video.c | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index af82ad691..4f6931486 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1112,7 +1112,7 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) if (x >= vid.width || y >= vid.height) return; // off the screen - + if (x < 0) { w += x; @@ -1126,7 +1126,7 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) if (w <= 0 || h <= 0) return; // zero width/height wouldn't draw anything - + if (x + w > vid.width) w = vid.width-x; if (y + h > vid.height) @@ -1149,7 +1149,7 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) } c &= 255; - + if (alphalevel) { const UINT8 *fadetable = ((UINT8 *)transtables + ((alphalevel-1)<= vid.width) - * newpix = vid.width-1; - * - * tmpscrwater[y*vid.width + x] = srcscr[y*vid.width+newpix]; // *(transme + (srcscr[y*vid.width+x]<<8) + srcscr[y*vid.width+newpix]); - }*/ + Unoptimized version + for (x = 0; x < vid.width*vid.bpp; x++) + { + newpix = (x + sine); + + if (newpix < 0) + newpix = 0; + else if (newpix >= vid.width) + newpix = vid.width-1; + + tmpscr[y*vid.width + x] = srcscr[y*vid.width+newpix]; // *(transme + (srcscr[y*vid.width+x]<<8) + srcscr[y*vid.width+newpix]); + }*/ + disStart += 22;//the offset into the displacement map, increment each game loop disStart &= FINEMASK; //clip it to FINEMASK } @@ -3284,21 +3285,18 @@ void V_DoPostProcessor(INT32 view, player_t *player, INT32 param) } /*if (player->postimgflags & POSTIMG_MOTION) // Motion Blur! - * { - * INT32 x, y; - * - * // TODO: Add a postimg_param so that we can pick the translucency level... - * UINT8 *transme = transtables + ((param-1)<postimgflags & POSTIMG_HEAT) // Heat wave { From f275ae98f56a80a026d20c8e5a1be4c16036b73a Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 25 Oct 2024 20:12:06 +0200 Subject: [PATCH 3/3] this is needed for postimg stuff in first person MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lol also adds break in splitscreen lööp --- src/p_mobj.c | 1 + src/p_user.c | 56 +++++++++++++++++++++++++--------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 9592d0a47..793680cae 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3308,6 +3308,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled continue; players[displayplayers[i]].postimgflags = postimgflags; + break; } if (thiscam->momx || thiscam->momy) diff --git a/src/p_user.c b/src/p_user.c index d359ce6be..1a29f4a56 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4103,11 +4103,11 @@ boolean P_SpectatorJoinGame(player_t *player) return false; } -/*static void P_CalcPostImg(player_t *player) +static void P_CalcPostImg(player_t *player) { sector_t *sector = player->mo->subsector->sector; - postimg_t *type = NULL; - INT32 *param; + INT16 typeflag = 0; + //INT32 *param; fixed_t pviewheight; UINT8 i; @@ -4122,20 +4122,19 @@ boolean P_SpectatorJoinGame(player_t *player) pviewheight = player->awayviewmobj->z + 20*FRACUNIT; } - for (i = 0; i <= splitscreen; i++) + /*for (i = 0; i <= splitscreen; i++) { if (player == &players[displayplayers[i]]) { - type = &postimgtype[i]; param = &postimgparam[i]; break; } - } + }*/ // see if we are in heat (no, not THAT kind of heat...) if (P_FindSpecialLineFromTag(13, sector->tag, -1) != -1) - *type = postimg_heat; + typeflag |= POSTIMG_HEAT; else if (sector->ffloors) { ffloor_t *rover; @@ -4154,7 +4153,7 @@ boolean P_SpectatorJoinGame(player_t *player) continue; if (P_FindSpecialLineFromTag(13, rover->master->frontsector->tag, -1) != -1) - *type = postimg_heat; + typeflag |= POSTIMG_HEAT; } } @@ -4176,37 +4175,36 @@ boolean P_SpectatorJoinGame(player_t *player) if (pviewheight >= topheight || pviewheight <= bottomheight) continue; - *type = postimg_water; + typeflag |= POSTIMG_WATER; } } - if (!encoremode) // srb2kart - { - if (player->mo->eflags & MFE_VERTICALFLIP) - *type = postimg_flip; - } - else - { - if (player->mo->eflags & MFE_VERTICALFLIP) - *type = postimg_mirrorflip; - else - *type = postimg_mirror; - } + if (encoremode) // srb2kart + typeflag |= POSTIMG_MIRROR; + + if (player->mo->eflags & MFE_VERTICALFLIP) + typeflag |= POSTIMG_FLIP; -#if 1 - (void)param; -#else // Motion blur - if (player->speed > (35<speed > (35<speed - 32)/4; if (*param > 5) *param = 5; + }*/ + + for (i = 0; i <= splitscreen; i++) + { + if (player != &players[displayplayers[i]]) + continue; + + players[displayplayers[i]].postimgflags = typeflag; + break; } -#endif -}*/ +} void P_DoTimeOver(player_t *player) { @@ -4992,7 +4990,7 @@ void P_PlayerAfterThink(player_t *player) if (!thiscam->chase) // bob view only if looking through the player's eyes { P_CalcHeight(player); - //P_CalcPostImg(player); + P_CalcPostImg(player); } else {