Remove polymost stuff

- Maybe it will be back someday, but it's been essentially dead for nearly
  10 years, so don't hold your breath.
This commit is contained in:
Randy Heit 2014-07-31 19:43:36 -05:00
parent 4cf468452c
commit bbc3b69a7c
7 changed files with 3 additions and 1716 deletions

View file

@ -896,7 +896,6 @@ add_executable( zdoom WIN32
r_drawt.cpp
r_main.cpp
r_plane.cpp
r_polymost.cpp
r_segs.cpp
r_sky.cpp
r_things.cpp

View file

@ -108,10 +108,6 @@
#include "r_renderer.h"
#include "p_local.h"
#ifdef USE_POLYMOST
#include "r_polymost.h"
#endif
EXTERN_CVAR(Bool, hud_althud)
void DrawHUD();
@ -186,9 +182,6 @@ CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
}
}
#ifdef USE_POLYMOST
CVAR(Bool, testpolymost, false, 0)
#endif
CVAR (Float, timelimit, 0.f, CVAR_SERVERINFO);
CVAR (Int, wipetype, 1, CVAR_ARCHIVE);
CVAR (Int, snd_drawoutput, 0, 0);
@ -282,10 +275,6 @@ void D_ProcessEvents (void)
continue; // console ate the event
if (M_Responder (ev))
continue; // menu ate the event
#ifdef USE_POLYMOST
if (testpolymost)
Polymost_Responder (ev);
#endif
G_Responder (ev);
}
}
@ -307,9 +296,6 @@ void D_PostEvent (const event_t *ev)
}
events[eventhead] = *ev;
if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling
#ifdef USE_POLYMOST
&& !testpolymost
#endif
)
{
if (Button_Mlook.bDown || freelook)
@ -743,15 +729,7 @@ void D_Display ()
hw2d = false;
#ifdef USE_POLYMOST
if (testpolymost)
{
drawpolymosttest();
C_DrawConsole(hw2d);
M_Drawer();
}
else
#endif
{
unsigned int nowtime = I_FPSTime();
TexMan.UpdateAnimations(nowtime);

View file

@ -72,8 +72,6 @@
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
void R_SpanInitData ();
void RP_RenderBSPNode (void *node);
bool RP_SetupFrame (bool backside);
void R_DeinitSprites();
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
@ -94,14 +92,12 @@ extern "C" int fuzzviewheight;
static float CurrentVisibility = 8.f;
static fixed_t MaxVisForWall;
static fixed_t MaxVisForFloor;
static bool polyclipped;
extern bool r_showviewer;
bool r_dontmaplines;
// PUBLIC DATA DEFINITIONS -------------------------------------------------
CVAR (String, r_viewsize, "", CVAR_NOSET)
CVAR (Int, r_polymost, 0, 0)
CVAR (Bool, r_shadercolormaps, true, CVAR_ARCHIVE)
fixed_t r_BaseVisibility;
@ -612,14 +608,6 @@ void R_SetupFreelook()
}
}
void R_SetupPolymost()
{
if (r_polymost)
{
polyclipped = RP_SetupFrame (false);
}
}
//==========================================================================
//
// R_EnterMirror
@ -812,11 +800,8 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
}
// Link the polyobjects right before drawing the scene to reduce the amounts of calls to this function
PO_LinkToSubsectors();
if (r_polymost < 2)
{
R_RenderBSPNode (nodes + numnodes - 1); // The head node is the last node output.
R_3D_ResetClip(); // reset clips (floor/ceiling)
}
R_RenderBSPNode (nodes + numnodes - 1); // The head node is the last node output.
R_3D_ResetClip(); // reset clips (floor/ceiling)
camera->renderflags = savedflags;
WallCycles.Unclock();
@ -843,16 +828,6 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
MaskedCycles.Unclock();
NetUpdate ();
if (r_polymost)
{
RP_RenderBSPNode (nodes + numnodes - 1);
if (polyclipped)
{
RP_SetupFrame (true);
RP_RenderBSPNode (nodes + numnodes - 1);
}
}
}
WallMirrors.Clear ();
interpolator.RestoreInterpolations ();

File diff suppressed because it is too large Load diff

View file

@ -1,55 +0,0 @@
/**************************************************************************************************
"POLYMOST" code written by Ken Silverman
**************************************************************************************************/
#include "c_cvars.h"
typedef void (*pmostcallbacktype)(double *dpx, double *dpy, int n, void *userdata);
class PolyClipper
{
public:
PolyClipper();
~PolyClipper();
void InitMosts (double *px, double *py, int n);
bool TestVisibleMost (float x0, float x1);
int DoMost (float x0, float y0, float x1, float y1, pmostcallbacktype callback, void *callbackdata);
private:
struct vsptype
{
float X, Cy[2], Fy[2];
int Tag, CTag, FTag;
vsptype *Next, *Prev;
};
enum { GROUP_SIZE = 128 };
struct vspgroup
{
vspgroup (vsptype *sentinel);
vspgroup *NextGroup;
vsptype vsp[GROUP_SIZE];
};
vsptype EmptyList;
vsptype UsedList;
vspgroup vsps;
vsptype Solid;
int GTag;
vsptype *vsinsaft (vsptype *vsp);
void EmptyAll ();
void AddGroup ();
vsptype *GetVsp ();
void FreeVsp (vsptype *vsp);
friend void drawpolymosttest();
};
extern void drawpolymosttest();
struct event_t; void Polymost_Responder (event_t *ev);

View file

@ -40,7 +40,6 @@
#include "r_bsp.h"
#include "r_swrenderer.h"
#include "r_3dfloors.h"
#include "r_polymost.h"
#include "textures/textures.h"
#include "r_data/voxels.h"
@ -49,7 +48,6 @@ class FArchive;
void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight, int trueratio);
void R_SetupColormap(player_t *);
void R_SetupFreelook();
void R_SetupPolymost();
void R_InitRenderer();
extern float LastFOV;
@ -245,7 +243,6 @@ void FSoftwareRenderer::SetupFrame(player_t *player)
{
R_SetupColormap(player);
R_SetupFreelook();
R_SetupPolymost();
}
//==========================================================================

View file

@ -2309,10 +2309,6 @@
RelativePath=".\src\r_plane.cpp"
>
</File>
<File
RelativePath=".\src\r_polymost.cpp"
>
</File>
<File
RelativePath=".\src\r_segs.cpp"
>
@ -2353,10 +2349,6 @@
RelativePath=".\src\r_plane.h"
>
</File>
<File
RelativePath=".\src\r_polymost.h"
>
</File>
<File
RelativePath=".\src\r_segs.h"
>