mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Force FOV to 90 during Podium and Title Screen
This commit is contained in:
parent
98becc03ae
commit
01135e1940
6 changed files with 20 additions and 6 deletions
|
|
@ -1646,6 +1646,8 @@ void F_StartTitleScreen(void)
|
||||||
camera[0].height = 0;
|
camera[0].height = 0;
|
||||||
|
|
||||||
wipegamestate = prevwipegamestate;
|
wipegamestate = prevwipegamestate;
|
||||||
|
|
||||||
|
R_ExecuteSetViewSize(); // update FOV
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
#include "../r_state.h"
|
#include "../r_state.h"
|
||||||
#include "../tables.h"
|
#include "../tables.h"
|
||||||
#include "r_opengl/r_opengl.h"
|
#include "r_opengl/r_opengl.h"
|
||||||
#include "../r_main.h" // for cv_fov
|
#include "../r_main.h" // for R_FOV
|
||||||
|
|
||||||
#ifdef HAVE_SPHEREFRUSTRUM
|
#ifdef HAVE_SPHEREFRUSTRUM
|
||||||
static GLdouble viewMatrix[16];
|
static GLdouble viewMatrix[16];
|
||||||
|
|
@ -331,7 +331,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle)
|
||||||
|
|
||||||
// NEWCLIP TODO: SRB2CBTODO: make a global render_fov for this function
|
// NEWCLIP TODO: SRB2CBTODO: make a global render_fov for this function
|
||||||
|
|
||||||
float render_fov = FIXED_TO_FLOAT(cv_fov[viewssnum].value);
|
float render_fov = FIXED_TO_FLOAT(R_FOV(viewssnum));
|
||||||
float render_fovratio = (float)BASEVIDWIDTH / (float)BASEVIDHEIGHT; // SRB2CBTODO: NEWCLIPTODO: Is this right?
|
float render_fovratio = (float)BASEVIDWIDTH / (float)BASEVIDHEIGHT; // SRB2CBTODO: NEWCLIPTODO: Is this right?
|
||||||
float render_multiplier = 64.0f / render_fovratio / RMUL;
|
float render_multiplier = 64.0f / render_fovratio / RMUL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5450,7 +5450,7 @@ static void HWR_DrawSkyBackground(player_t *player)
|
||||||
if (cv_glskydome.value)
|
if (cv_glskydome.value)
|
||||||
{
|
{
|
||||||
FTransform dometransform;
|
FTransform dometransform;
|
||||||
const float fpov = FIXED_TO_FLOAT(cv_fov[viewssnum].value+player->fovadd);
|
const float fpov = FIXED_TO_FLOAT(R_FOV(viewssnum)+player->fovadd);
|
||||||
postimg_t *type = &postimgtype[R_GetViewNumber()];
|
postimg_t *type = &postimgtype[R_GetViewNumber()];
|
||||||
|
|
||||||
memset(&dometransform, 0x00, sizeof(FTransform));
|
memset(&dometransform, 0x00, sizeof(FTransform));
|
||||||
|
|
@ -5700,7 +5700,7 @@ static void HWR_SetShaderState(void)
|
||||||
|
|
||||||
static void HWR_RenderViewpoint(player_t *player, boolean drawSkyTexture, boolean timing)
|
static void HWR_RenderViewpoint(player_t *player, boolean drawSkyTexture, boolean timing)
|
||||||
{
|
{
|
||||||
const float fpov = FIXED_TO_FLOAT(cv_fov[viewssnum].value+player->fovadd);
|
const float fpov = FIXED_TO_FLOAT(R_FOV(viewssnum)+player->fovadd);
|
||||||
postimg_t *type = &postimgtype[viewssnum];
|
postimg_t *type = &postimgtype[viewssnum];
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1134,7 +1134,7 @@ void K_ObjectTracking(trackingResult_t *result, const vector3_t *point, boolean
|
||||||
screenHalfH = (screenHeight >> 1) << FRACBITS;
|
screenHalfH = (screenHeight >> 1) << FRACBITS;
|
||||||
|
|
||||||
// Calculate FOV adjustments.
|
// Calculate FOV adjustments.
|
||||||
fovDiff = cv_fov[cameraNum].value - baseFov;
|
fovDiff = R_FOV(cameraNum) - baseFov;
|
||||||
fov = ((baseFov - fovDiff) / 2) - (stplyr->fovadd / 2);
|
fov = ((baseFov - fovDiff) / 2) - (stplyr->fovadd / 2);
|
||||||
fovTangent = NEWTAN(FixedAngle(fov));
|
fovTangent = NEWTAN(FixedAngle(fov));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -997,7 +997,7 @@ void R_ExecuteSetViewSize(void)
|
||||||
|
|
||||||
for (s = 0; s <= r_splitscreen; ++s)
|
for (s = 0; s <= r_splitscreen; ++s)
|
||||||
{
|
{
|
||||||
fov = FixedAngle(cv_fov[s].value/2) + ANGLE_90;
|
fov = FixedAngle(R_FOV(s)/2) + ANGLE_90;
|
||||||
fovtan[s] = FixedMul(FINETANGENT(fov >> ANGLETOFINESHIFT), viewmorph[s].zoomneeded);
|
fovtan[s] = FixedMul(FINETANGENT(fov >> ANGLETOFINESHIFT), viewmorph[s].zoomneeded);
|
||||||
if (r_splitscreen == 1) // Splitscreen FOV should be adjusted to maintain expected vertical view
|
if (r_splitscreen == 1) // Splitscreen FOV should be adjusted to maintain expected vertical view
|
||||||
fovtan[s] = 17*fovtan[s]/10;
|
fovtan[s] = 17*fovtan[s]/10;
|
||||||
|
|
@ -1071,6 +1071,16 @@ void R_ExecuteSetViewSize(void)
|
||||||
am_recalc = true;
|
am_recalc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fixed_t R_FOV(int split)
|
||||||
|
{
|
||||||
|
if (gamestate == GS_TITLESCREEN || gamestate == GS_CEREMONY)
|
||||||
|
{
|
||||||
|
return 90*FRACUNIT; // standard setting
|
||||||
|
}
|
||||||
|
|
||||||
|
return cv_fov[split].value;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_Init
|
// R_Init
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,8 @@ void R_SetViewSize(void);
|
||||||
// do it (sometimes explicitly called)
|
// do it (sometimes explicitly called)
|
||||||
void R_ExecuteSetViewSize(void);
|
void R_ExecuteSetViewSize(void);
|
||||||
|
|
||||||
|
fixed_t R_FOV(int split);
|
||||||
|
|
||||||
void R_SetupFrame(int split);
|
void R_SetupFrame(int split);
|
||||||
void R_SkyboxFrame(int split);
|
void R_SkyboxFrame(int split);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue