- removed the PSPTwoDSetter

This is no longer needed because all weapon drawing is using the proper interface now.
This commit is contained in:
Christoph Oelckers 2020-10-13 21:38:24 +02:00
parent 53481fb9a3
commit 99b4a64a67
7 changed files with 5 additions and 22 deletions

View file

@ -994,25 +994,5 @@ extern int32_t(*changespritestat_replace)(int16_t spritenum, int16_t newstatnum)
extern void(*PolymostProcessVoxels_Callback)(void);
#endif
class F2DDrawer;
extern F2DDrawer twodpsp;
extern F2DDrawer* twod;
// This is for safely substituting the 2D drawer for a block of code. Won't be needed anymore after proper refactoring.
class PspTwoDSetter
{
F2DDrawer* old;
public:
PspTwoDSetter()
{
old = twod;
twod = &twodpsp;
}
~PspTwoDSetter()
{
twod = old;
}
};
#endif // build_h_

View file

@ -43,6 +43,7 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
#include "quotemgr.h"
#include "v_video.h"
#include "gamestruct.h"
#include "v_draw.h"
CVAR(Bool, am_followplayer, true, CVAR_ARCHIVE)
CVAR(Bool, am_rotate, true, CVAR_ARCHIVE)

View file

@ -87,6 +87,7 @@
#include "statusbar.h"
#include "gamestruct.h"
#include "savegamehelp.h"
#include "v_draw.h"
CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, r_ticstability, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

View file

@ -44,6 +44,7 @@
#include "v_colortables.h"
#include "v_font.h"
#include "printf.h"
#include "v_draw.h"
#include "../../glbackend/glbackend.h"
LookupTableInfo lookups;

View file

@ -48,6 +48,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "d_protocol.h"
#include "texturemanager.h"
#include "razemenu.h"
#include "v_draw.h"
BEGIN_PS_NS

View file

@ -934,8 +934,6 @@ void DrawWeapons(double smooth)
if (nWeapon < -1) {
return;
}
PspTwoDSetter set; // this is the last one.
short var_34 = PlayerList[nLocalPlayer].field_3A;
short var_30 = SeqOffsets[WeaponInfo[nWeapon].nSeq];

View file

@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mapinfo.h"
#include "v_video.h"
#include "glbackend/glbackend.h"
#include "v_draw.h"
#include <string.h>
BEGIN_PS_NS