Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff
This commit is contained in:
commit
0c9dc33ff0
7 files changed
+40
-8
No files matched your search
+2
-1
@@ -349,7 +349,8 @@ typedef enum
|
||||
postimg_motion,
|
||||
postimg_flip,
|
||||
postimg_heat,
|
||||
postimg_mirror
|
||||
postimg_mirror,
|
||||
postimg_mirrorflip
|
||||
} postimg_t;
|
||||
|
||||
typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num)
|
||||
|
||||
@@ -153,6 +153,7 @@ typedef struct
|
||||
FLOAT centerx, centery;
|
||||
#ifdef USE_FTRANSFORM_MIRROR
|
||||
boolean mirror; // SRB2Kart: Encore Mode
|
||||
boolean mirrorflip; // Encore Mode with Flipcam
|
||||
#endif
|
||||
boolean shearing; // 14042019
|
||||
angle_t viewaiming; // 17052019
|
||||
|
||||
@@ -5436,6 +5436,7 @@ void HWR_DrawSkyBackground(float fpov)
|
||||
|
||||
dometransform.flip = atransform.flip;
|
||||
dometransform.mirror = atransform.mirror;
|
||||
dometransform.mirrorflip = atransform.mirrorflip;
|
||||
dometransform.shearing = atransform.shearing;
|
||||
dometransform.viewaiming = atransform.viewaiming;
|
||||
|
||||
@@ -5562,6 +5563,10 @@ void HWR_SetTransform(float fpov, player_t *player)
|
||||
if (*postprocessor == postimg_mirror)
|
||||
atransform.mirror = true;
|
||||
|
||||
atransform.mirrorflip = false;
|
||||
if (*postprocessor == postimg_mirrorflip)
|
||||
atransform.mirrorflip = true;
|
||||
|
||||
// Set transform.
|
||||
HWD.pfnSetTransform(&atransform);
|
||||
}
|
||||
|
||||
@@ -2928,6 +2928,8 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||
// mirroring from Kart
|
||||
if (stransform->mirror)
|
||||
pglScalef(-stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||
else if (stransform->mirrorflip)
|
||||
pglScalef(-stransform->scalex, -stransform->scaley, -stransform->scalez);
|
||||
else
|
||||
#endif
|
||||
if (stransform->flip)
|
||||
|
||||
+5
-2
@@ -3234,6 +3234,7 @@ void P_DestroyRobots(void)
|
||||
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;
|
||||
UINT8 i;
|
||||
|
||||
@@ -3256,10 +3257,12 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
||||
}
|
||||
}
|
||||
|
||||
if (encoremode)
|
||||
if (encoremode && !flipcam)
|
||||
postimg = postimg_mirror;
|
||||
else if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
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
|
||||
{
|
||||
camera_t dummycam;
|
||||
|
||||
+12
-5
@@ -4146,8 +4146,18 @@ static void P_CalcPostImg(player_t *player)
|
||||
}
|
||||
}
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
*type = postimg_flip;
|
||||
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 1
|
||||
(void)param;
|
||||
@@ -4162,9 +4172,6 @@ static void P_CalcPostImg(player_t *player)
|
||||
*param = 5;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (encoremode) // srb2kart
|
||||
*type = postimg_mirror;
|
||||
}
|
||||
|
||||
void P_DoTimeOver(player_t *player)
|
||||
|
||||
@@ -3314,6 +3314,19 @@ Unoptimized version
|
||||
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);
|
||||
}
|
||||
else if (type == postimg_mirrorflip) // 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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user