clean up stuff a little
This commit is contained in:
1 parent
89ae721421
commit
562cb8cebd
6 files changed
+21
-16
No files matched your search
+5
-12
@@ -68,15 +68,10 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include "../v_video.h"
|
||||
#include "hw_main.h"
|
||||
#include "hw_clip.h"
|
||||
#include "hw_glob.h"
|
||||
#include "../r_state.h"
|
||||
#include "../tables.h"
|
||||
#include "r_opengl/r_opengl.h"
|
||||
#include "../r_main.h" // for cv_fov
|
||||
|
||||
// clipping code moved to r_opengl.c, let me qoute the below comment "only r_opengl.c can use the base gl funcs as it turns out.."
|
||||
|
||||
|
||||
#ifdef HAVE_SPHEREFRUSTRUM
|
||||
static GLdouble viewMatrix[16];
|
||||
@@ -84,15 +79,13 @@ static GLdouble projMatrix[16];
|
||||
float frustum[6][4];
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// SRB2CB I don't think used any of this stuff, let's disable for now since SRB2 probably doesn't want it either
|
||||
// compiler complains about (p)glGetFloatv anyway, in case anyone wants this
|
||||
// only r_opengl.c can use the base gl funcs as it turns out, that's a problem for whoever wants sphere frustum checks
|
||||
// btw to renable define HAVE_SPHEREFRUSTRUM in hw_clip.h
|
||||
#ifdef HAVE_SPHEREFRUSTRUM
|
||||
//
|
||||
// gld_FrustrumSetup
|
||||
// gld_FrustumSetup
|
||||
//
|
||||
|
||||
#define CALCMATRIX(a, b, c, d, e, f, g, h)\
|
||||
@@ -111,7 +104,7 @@ frustum[i][1] /= t; \
|
||||
frustum[i][2] /= t; \
|
||||
frustum[i][3] /= t
|
||||
|
||||
void gld_FrustrumSetup(void)
|
||||
void gld_FrustumSetup(void)
|
||||
{
|
||||
float t;
|
||||
float clip[16];
|
||||
|
||||
@@ -19,6 +19,6 @@ void gld_clipper_SafeAddClipRange(angle_t startangle, angle_t endangle);
|
||||
void gld_clipper_Clear(void);
|
||||
angle_t gld_FrustumAngle(angle_t tiltangle);
|
||||
#ifdef HAVE_SPHEREFRUSTRUM
|
||||
void gld_FrustrumSetup(void);
|
||||
void gld_FrustumSetup(void);
|
||||
boolean gld_SphereInFrustum(float x, float y, float z, float radius);
|
||||
#endif
|
||||
@@ -5547,7 +5547,7 @@ void HWR_ClearClipper(void)
|
||||
gld_clipper_Clear();
|
||||
gld_clipper_SafeAddClipRange(viewangle + a1, viewangle - a1);
|
||||
#ifdef HAVE_SPHEREFRUSTRUM
|
||||
gld_FrustrumSetup();
|
||||
gld_FrustumSetup();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3525,6 +3525,16 @@ EXPORT void HWRAPI(SetScreenPalette)(RGBA_t *palette)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* hw_clip
|
||||
* SRB2CB
|
||||
*
|
||||
* PrBoom's OpenGL clipping
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct clipnode_s
|
||||
{
|
||||
struct clipnode_s *prev, *next;
|
||||
|
||||
+3
-1
@@ -4423,7 +4423,9 @@ void M_Init(void)
|
||||
OP_ExpOptionsMenu[op_exp_fofcut].status = IT_DISABLED;
|
||||
}
|
||||
|
||||
if (rendermode == render_opengl){
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
OP_ExpOptionsMenu[op_exp_angleshit].status = IT_DISABLED;
|
||||
OP_ExpOptionsMenu[op_exp_ffclip].status = IT_DISABLED;
|
||||
OP_ExpOptionsMenu[op_exp_sprclip].status = IT_DISABLED;
|
||||
OP_ExpOptionsMenu[op_exp_sclqal].status = IT_DISABLED;
|
||||
|
||||
+1
-1
@@ -469,7 +469,7 @@ angle_t R_PointToAngle2(fixed_t pviewx, fixed_t pviewy, fixed_t x, fixed_t y)
|
||||
// the precision issues associated with that function.
|
||||
//
|
||||
|
||||
FUNCINLINE ATTRINLINE angle_t R_PointToPseudoAngle (fixed_t x, fixed_t y)
|
||||
angle_t R_PointToPseudoAngle (fixed_t x, fixed_t y)
|
||||
{
|
||||
// Note: float won't work here as it's less precise than the BAM values being passed as parameters
|
||||
double vecx = (double)x - viewx;
|
||||
|
||||
Reference in new issue
Block a user