mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
OGL Mirror Mode
Haven't tested a whole lot but it seems okay?
This commit is contained in:
parent
ffbf6e8752
commit
b6d86145a9
3 changed files with 24 additions and 1 deletions
|
@ -109,6 +109,7 @@ typedef struct
|
|||
FLOAT fovxangle, fovyangle;
|
||||
INT32 splitscreen;
|
||||
boolean flip; // screenflip
|
||||
boolean mirror; // SRB2Kart: Mirror Mode
|
||||
} FTransform;
|
||||
|
||||
// Transformed vector, as passed to HWR API
|
||||
|
|
|
@ -5591,6 +5591,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
atransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
atransform.mirror = true;
|
||||
else
|
||||
atransform.mirror = false;
|
||||
|
||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||
|
@ -5610,6 +5615,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
stransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
stransform.mirror = true;
|
||||
else
|
||||
stransform.mirror = false;
|
||||
|
||||
stransform.x = 0.0f;
|
||||
stransform.y = 0.0f;
|
||||
stransform.z = 0.0f;
|
||||
|
@ -5821,6 +5831,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
atransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
atransform.mirror = true;
|
||||
else
|
||||
atransform.mirror = false;
|
||||
|
||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||
|
@ -5840,6 +5855,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
stransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
stransform.mirror = true;
|
||||
else
|
||||
stransform.mirror = false;
|
||||
|
||||
stransform.x = 0.0f;
|
||||
stransform.y = 0.0f;
|
||||
stransform.z = 0.0f;
|
||||
|
|
|
@ -2013,7 +2013,9 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
// keep a trace of the transformation for md2
|
||||
memcpy(&md2_transform, stransform, sizeof (md2_transform));
|
||||
|
||||
if (stransform->flip)
|
||||
if (stransform->mirror)
|
||||
pglScalef(-stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||
else if (stransform->flip)
|
||||
pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez);
|
||||
else
|
||||
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||
|
|
Loading…
Reference in a new issue