mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- route all 2D drawing through the 2D drawer unconditionally.
This is needed so that the postprocessor receives a clean 3D view to process without messing up the 2D parts.
This commit is contained in:
parent
9227c254d1
commit
f6dee38d28
6 changed files with 6 additions and 26 deletions
|
@ -6854,7 +6854,8 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
|
|||
#ifdef USE_OPENGL
|
||||
if (videoGetRenderMode() >= REND_POLYMOST && in3dmode())
|
||||
{
|
||||
polymost_dorotatesprite(sx,sy,z,a,picnum,dashade,dapalnum,dastat,daalpha,dablend,cx1,cy1,cx2,cy2,uniqid);
|
||||
// We must store all calls in the 2D drawer so that the backend can operate on a clean 3D view.
|
||||
twod.rotatesprite(sx, sy, z, a, picnum, dashade, dapalnum, dastat, daalpha, dablend, cx1, cy1, cx2, cy2);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
@ -9978,7 +9979,6 @@ void videoNextPage(void)
|
|||
|
||||
if (in3dmode())
|
||||
{
|
||||
// software rendering only
|
||||
videoBeginDrawing(); //{{{
|
||||
for (bssize_t i=permtail; i!=permhead; i=((i+1)&(MAXPERMS-1)))
|
||||
{
|
||||
|
@ -11270,8 +11270,6 @@ void renderFlushPerms(void)
|
|||
}
|
||||
|
||||
|
||||
bool rotatesprite_2doverride; // gross hack alert. Thanks to the insufficient abstraction the only chance to redirect rotatesprite calls
|
||||
// to the 2D drawer is to use a global flag and check in rotatesprite_.
|
||||
#include "v_2ddrawer.h"
|
||||
//
|
||||
// rotatesprite
|
||||
|
@ -11290,12 +11288,6 @@ void rotatesprite_(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
|
|||
tileUpdatePicnum(&picnum, (int16_t)0xc000);
|
||||
if ((tilesiz[picnum].x <= 0) || (tilesiz[picnum].y <= 0)) return;
|
||||
|
||||
if (rotatesprite_2doverride)
|
||||
{
|
||||
twod.rotatesprite(sx, sy, z, a, picnum, dashade, dapalnum, dastat, daalpha, dablend, cx1, cy1, cx2, cy2);
|
||||
return;
|
||||
}
|
||||
|
||||
// Experimental / development bits. ONLY FOR INTERNAL USE!
|
||||
// bit RS_CENTERORIGIN: see dorotspr_handle_bit2
|
||||
////////////////////
|
||||
|
|
|
@ -578,7 +578,7 @@ void F2DDrawer::rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
|
|||
|
||||
// This is mainly a hack because the rotatesprite code is far too messed up to integrate into the 2D drawer.
|
||||
// This merely stores the parameters and later just calls polymost_rotatesprite do do the work.
|
||||
// Cleanup can be done once everything is working - but for the menu's transition the original calls should be preserved.
|
||||
// Cleanup can be done once everything is working.
|
||||
RenderCommand dg;
|
||||
|
||||
dg.mType = DrawTypeRotateSprite;
|
||||
|
|
|
@ -64,7 +64,6 @@ void RegisterLoadsaveMenus();
|
|||
void RegisterOptionMenus();
|
||||
void RegisterJoystickMenus();
|
||||
void UpdateJoystickMenu(IJoystickConfig* joy);
|
||||
extern bool rotatesprite_2doverride;
|
||||
bool help_disabled, credits_disabled;
|
||||
int g_currentMenu; // accessible by CON scripts - contains the current menu's script ID if defined or INT_MAX if none given.
|
||||
int DrawBackground;
|
||||
|
@ -876,7 +875,6 @@ void M_Ticker (void)
|
|||
|
||||
void M_Drawer (void)
|
||||
{
|
||||
rotatesprite_2doverride = true;
|
||||
PalEntry fade = 0x70000000;
|
||||
|
||||
if (DMenu::CurrentMenu != NULL && menuactive != MENU_Off)
|
||||
|
@ -902,7 +900,6 @@ void M_Drawer (void)
|
|||
DMenu::CurrentMenu->Drawer();
|
||||
}
|
||||
}
|
||||
rotatesprite_2doverride = false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -53,9 +53,9 @@ const char *GetVersionString();
|
|||
#define VER_REVISION 1
|
||||
|
||||
// More stuff that needs to be different for derivatives.
|
||||
#define GAMENAME "Demolition"
|
||||
#define WGAMENAME L"Demolition"
|
||||
#define GAMENAMELOWERCASE "demolition"
|
||||
#define GAMENAME "Raze"
|
||||
#define WGAMENAME L"Raze"
|
||||
#define GAMENAMELOWERCASE "raze"
|
||||
#define FORUM_URL "http://forum.zdoom.org/"
|
||||
#define BUGS_FORUM_URL "http://forum.zdoom.org/viewforum.php?f=2" // fixme before release!!!
|
||||
#define ENGINERES_FILE GAMENAMELOWERCASE ".pk3"
|
||||
|
|
|
@ -44,7 +44,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "version.h"
|
||||
|
||||
#include "debugbreak.h"
|
||||
extern bool rotatesprite_2doverride;
|
||||
|
||||
FString C_CON_GetBoundKeyForLastInput(int gameFunc);
|
||||
const char* C_CON_GetButtonFunc(int num);
|
||||
|
@ -1241,9 +1240,6 @@ void Screen_Play(void)
|
|||
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// This needs to be disabled during the loop.
|
||||
auto r2dover = rotatesprite_2doverride;
|
||||
rotatesprite_2doverride = false;
|
||||
do
|
||||
{
|
||||
gameHandleEvents();
|
||||
|
@ -1261,7 +1257,6 @@ void Screen_Play(void)
|
|||
videoNextPage();
|
||||
inputState.ClearAllInput();
|
||||
} while (running);
|
||||
rotatesprite_2doverride = r2dover;
|
||||
}
|
||||
|
||||
#if !defined LUNATIC
|
||||
|
|
|
@ -36,7 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "version.h"
|
||||
|
||||
#include "debugbreak.h"
|
||||
extern bool rotatesprite_2doverride;
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
@ -1122,8 +1121,6 @@ void Screen_Play(void)
|
|||
|
||||
inputState.ClearAllInput();
|
||||
|
||||
auto r2dover = rotatesprite_2doverride;
|
||||
rotatesprite_2doverride = false;
|
||||
do
|
||||
{
|
||||
G_HandleAsync();
|
||||
|
@ -1140,7 +1137,6 @@ void Screen_Play(void)
|
|||
videoNextPage();
|
||||
inputState.ClearAllInput();
|
||||
} while (running);
|
||||
rotatesprite_2doverride = r2dover;
|
||||
}
|
||||
|
||||
GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
||||
|
|
Loading…
Reference in a new issue