mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 07:22:03 +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;
|
FLOAT fovxangle, fovyangle;
|
||||||
INT32 splitscreen;
|
INT32 splitscreen;
|
||||||
boolean flip; // screenflip
|
boolean flip; // screenflip
|
||||||
|
boolean mirror; // SRB2Kart: Mirror Mode
|
||||||
} FTransform;
|
} FTransform;
|
||||||
|
|
||||||
// Transformed vector, as passed to HWR API
|
// Transformed vector, as passed to HWR API
|
||||||
|
|
|
@ -5591,6 +5591,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
else
|
else
|
||||||
atransform.flip = false;
|
atransform.flip = false;
|
||||||
|
|
||||||
|
if (*type == postimg_mirror)
|
||||||
|
atransform.mirror = true;
|
||||||
|
else
|
||||||
|
atransform.mirror = false;
|
||||||
|
|
||||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||||
|
@ -5610,6 +5615,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
else
|
else
|
||||||
stransform.flip = false;
|
stransform.flip = false;
|
||||||
|
|
||||||
|
if (*type == postimg_mirror)
|
||||||
|
stransform.mirror = true;
|
||||||
|
else
|
||||||
|
stransform.mirror = false;
|
||||||
|
|
||||||
stransform.x = 0.0f;
|
stransform.x = 0.0f;
|
||||||
stransform.y = 0.0f;
|
stransform.y = 0.0f;
|
||||||
stransform.z = 0.0f;
|
stransform.z = 0.0f;
|
||||||
|
@ -5821,6 +5831,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
else
|
else
|
||||||
atransform.flip = false;
|
atransform.flip = false;
|
||||||
|
|
||||||
|
if (*type == postimg_mirror)
|
||||||
|
atransform.mirror = true;
|
||||||
|
else
|
||||||
|
atransform.mirror = false;
|
||||||
|
|
||||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||||
|
@ -5840,6 +5855,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
else
|
else
|
||||||
stransform.flip = false;
|
stransform.flip = false;
|
||||||
|
|
||||||
|
if (*type == postimg_mirror)
|
||||||
|
stransform.mirror = true;
|
||||||
|
else
|
||||||
|
stransform.mirror = false;
|
||||||
|
|
||||||
stransform.x = 0.0f;
|
stransform.x = 0.0f;
|
||||||
stransform.y = 0.0f;
|
stransform.y = 0.0f;
|
||||||
stransform.z = 0.0f;
|
stransform.z = 0.0f;
|
||||||
|
|
|
@ -2013,7 +2013,9 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||||
// keep a trace of the transformation for md2
|
// keep a trace of the transformation for md2
|
||||||
memcpy(&md2_transform, stransform, sizeof (md2_transform));
|
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);
|
pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez);
|
||||||
else
|
else
|
||||||
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
|
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||||
|
|
Loading…
Reference in a new issue