diff --git a/src/hardware/hw_clip.c b/src/hardware/hw_clip.c index 9e161b2ea..d8f42e624 100644 --- a/src/hardware/hw_clip.c +++ b/src/hardware/hw_clip.c @@ -68,15 +68,10 @@ ** */ -#include -#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]; diff --git a/src/hardware/hw_clip.h b/src/hardware/hw_clip.h index 27a2ed1ef..dfaa87f81 100644 --- a/src/hardware/hw_clip.h +++ b/src/hardware/hw_clip.h @@ -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 diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 6783ff2f1..1faac579d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -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 } diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index f149b2e41..b5dbdea3a 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -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; diff --git a/src/m_menu.c b/src/m_menu.c index 5e6458248..ebef44070 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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; diff --git a/src/r_main.c b/src/r_main.c index 6add90cb4..175cff60d 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -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;