mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- cleaned out the remaining parts of baselayer.h
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend. The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
This commit is contained in:
parent
536e7455f2
commit
847fa48724
41 changed files with 27 additions and 105 deletions
|
@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "build.h"
|
||||
#include "mmulti.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
#include "g_input.h"
|
||||
|
|
|
@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "misc.h"
|
||||
#include "db.h"
|
||||
#include "mapinfo.h"
|
||||
#include "gamestruct.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#pragma once
|
||||
#include "baselayer.h"
|
||||
#include "build.h"
|
||||
|
||||
#include "common.h"
|
||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "mmulti.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "common_game.h"
|
||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
#include "compat.h"
|
||||
#include "mmulti.h"
|
||||
#include "common_game.h"
|
||||
|
|
|
@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "common_game.h"
|
||||
#include "levels.h"
|
||||
#include "sound.h"
|
||||
#include "baselayer.h"
|
||||
#include "raze_music.h"
|
||||
#include "raze_sound.h"
|
||||
#include "gamecontrol.h"
|
||||
|
|
|
@ -690,11 +690,7 @@ void viewDrawScreen(bool sceneonly)
|
|||
|
||||
int yxAspect = yxaspect;
|
||||
int viewingRange = viewingrange;
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 1;
|
||||
videoSetCorrectedAspect();
|
||||
}
|
||||
videoSetCorrectedAspect();
|
||||
|
||||
int v1 = Blrintf(double(viewingrange) * tan(r_fov * (PI / 360.)));
|
||||
|
||||
|
@ -1004,8 +1000,6 @@ void viewDrawScreen(bool sceneonly)
|
|||
|
||||
bDeliriumOld = bDelirium && gDeliriumBlur;
|
||||
|
||||
if (r_usenewaspect)
|
||||
newaspect_enable = 0;
|
||||
renderSetAspect(viewingRange, yxAspect);
|
||||
int nClipDist = gView->pSprite->clipdist << 2;
|
||||
int ve8, vec, vf0, vf4;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
// Base services interface declaration
|
||||
// for the Build Engine
|
||||
// by Jonathon Fowler (jf@jonof.id.au)
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef baselayer_h_
|
||||
#define baselayer_h_
|
||||
|
||||
#include "compat.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "c_cvars.h"
|
||||
#include "inputstate.h"
|
||||
#include "printf.h"
|
||||
#include "zstring.h"
|
||||
#include "vectors.h"
|
||||
|
||||
EXTERN_CVAR(Bool, r_usenewaspect)
|
||||
|
||||
// video
|
||||
extern int32_t newaspect_enable;
|
||||
|
||||
void videoShowFrame(int32_t);
|
||||
|
||||
#include "gamestruct.h"
|
||||
#endif // baselayer_h_
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
# define polymost_h_
|
||||
|
||||
|
||||
#include "baselayer.h" // glinfo
|
||||
#include "mdsprite.h"
|
||||
|
||||
void Polymost_CacheHitList(uint8_t* hash);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "compat.h"
|
||||
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "build.h"
|
||||
|
||||
#include "matrix.h"
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
// by the EDuke32 team (development@voidpoint.com)
|
||||
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
#include "clip.h"
|
||||
#include "engine_priv.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
||||
static int16_t clipnum;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "build.h"
|
||||
#include "compat.h"
|
||||
#include "engine_priv.h"
|
||||
#include "baselayer.h"
|
||||
#include "scriptfile.h"
|
||||
|
||||
#include "common.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#define engine_c_
|
||||
|
||||
#include "gl_load.h"
|
||||
#include "baselayer.h"
|
||||
#include "build.h"
|
||||
|
||||
#include "imagehelpers.h"
|
||||
|
@ -28,6 +27,8 @@
|
|||
#include "version.h"
|
||||
#include "earcut.hpp"
|
||||
#include "gamestate.h"
|
||||
#include "inputstate.h"
|
||||
#include "printf.h"
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
# include "mdsprite.h"
|
||||
|
@ -79,10 +80,6 @@ static int32_t beforedrawrooms = 1;
|
|||
|
||||
static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1;
|
||||
|
||||
// r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code
|
||||
CVAR(Bool, r_usenewaspect, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
int32_t newaspect_enable=0;
|
||||
|
||||
int32_t globalflags;
|
||||
|
||||
static int8_t tempbuf[MAXWALLS];
|
||||
|
@ -2141,10 +2138,8 @@ void renderDrawMapView(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
|||
}
|
||||
}
|
||||
|
||||
if (r_usenewaspect)
|
||||
|
||||
renderSetAspect(oviewingrange, oyxaspect);
|
||||
else
|
||||
renderSetAspect(65536, divscale16(ydim*320, xdim*200));
|
||||
}
|
||||
|
||||
//////////////////// LOADING AND SAVING ROUTINES ////////////////////
|
||||
|
@ -3695,8 +3690,6 @@ void rotatepoint(vec2_t const pivot, vec2_t p, int16_t const daang, vec2_t * con
|
|||
|
||||
void videoSetCorrectedAspect()
|
||||
{
|
||||
if (/*r_usenewaspect &&*/ newaspect_enable && videoGetRenderMode() != REND_POLYMER)
|
||||
{
|
||||
// In DOS the game world is displayed with an aspect of 1.28 instead 1.333,
|
||||
// meaning we have to stretch it by a factor of 1.25 instead of 1.2
|
||||
// to get perfect squares
|
||||
|
@ -3709,9 +3702,6 @@ void videoSetCorrectedAspect()
|
|||
vr = divscale16(x*3, y*4);
|
||||
|
||||
renderSetAspect(vr, yx);
|
||||
}
|
||||
else
|
||||
renderSetAspect(65536, divscale16(ydim*320, xdim*200));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "pragmas.h"
|
||||
#include "baselayer.h"
|
||||
#include "engine_priv.h"
|
||||
#include "polymost.h"
|
||||
#include "mdsprite.h"
|
||||
|
@ -18,6 +17,7 @@
|
|||
#include "flatvertices.h"
|
||||
#include "texturemanager.h"
|
||||
#include "hw_renderstate.h"
|
||||
#include "printf.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
static int32_t curextra=MAXTILES;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
#include "scriptfile.h"
|
||||
#include "printf.h"
|
||||
|
||||
usermaphack_t g_loadedMapHack; // used only for the MD4 part
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
|||
#include "palettecontainer.h"
|
||||
#include "texturemanager.h"
|
||||
#include "hw_renderstate.h"
|
||||
#include "printf.h"
|
||||
|
||||
CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
#include "compat.h"
|
||||
#include "scriptfile.h"
|
||||
#include "baselayer.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "filesystem.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "pragmas.h"
|
||||
#include "baselayer.h"
|
||||
#include "engine_priv.h"
|
||||
#include "polymost.h"
|
||||
#include "mdsprite.h"
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "gamecvars.h"
|
||||
#include "v_video.h"
|
||||
#include "statusbar.h"
|
||||
#include "gamestruct.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "d_event.h"
|
||||
#include "menu.h"
|
||||
#include "v_draw.h"
|
||||
#include "baselayer.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "build.h"
|
||||
#include "zstring.h"
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "build.h"
|
||||
#include "serializer.h"
|
||||
#include "findfile.h"
|
||||
#include "inputstate.h"
|
||||
|
||||
|
||||
FSavegameManager savegameManager;
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "m_swap.h"
|
||||
#include "v_colortables.h"
|
||||
#include "v_font.h"
|
||||
#include "printf.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
LookupTableInfo lookups;
|
||||
|
|
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h"
|
||||
#include "build.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "engine.h"
|
||||
#include "sound.h"
|
||||
#include "exhumed.h"
|
||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "common.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define __exhumed_h__
|
||||
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "v_text.h"
|
||||
#include "printf.h"
|
||||
#include "gamecvars.h"
|
||||
|
@ -290,7 +289,7 @@ struct GameInterface : ::GameInterface
|
|||
bool CanSave() override;
|
||||
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
|
||||
void clearlocalinputstate() override;
|
||||
void QuitToTitle();
|
||||
void QuitToTitle() override;
|
||||
|
||||
FString statFPS() override;
|
||||
::GameStats getStats() override;
|
||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "common.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "names.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "baselayer.h"
|
||||
#include "c_bind.h"
|
||||
#include "sound.h"
|
||||
#include "v_2ddrawer.h"
|
||||
|
|
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h"
|
||||
#include "mmulti.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "build.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
|
|
|
@ -358,14 +358,9 @@ void DrawView(double smoothRatio, bool sceneonly)
|
|||
int const viewingRange = viewingrange;
|
||||
int const vr = Blrintf(65536.f * tanf(r_fov * (fPI / 360.f)));
|
||||
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 1;
|
||||
videoSetCorrectedAspect();
|
||||
renderSetAspect(mulscale16(vr, viewingrange), yxaspect);
|
||||
}
|
||||
else
|
||||
renderSetAspect(vr, yxaspect);
|
||||
|
||||
videoSetCorrectedAspect();
|
||||
renderSetAspect(mulscale16(vr, viewingrange), yxaspect);
|
||||
|
||||
if (HavePLURemap())
|
||||
{
|
||||
|
@ -400,11 +395,8 @@ void DrawView(double smoothRatio, bool sceneonly)
|
|||
}
|
||||
}
|
||||
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 0;
|
||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||
}
|
||||
|
||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||
|
||||
if (nFreeze)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef duke3d_h_
|
||||
#define duke3d_h_
|
||||
|
||||
// JBF
|
||||
#include "baselayer.h"
|
||||
#include "build.h"
|
||||
|
||||
#include "compat.h"
|
||||
|
|
|
@ -31,7 +31,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "duke3d.h"
|
||||
#include "baselayer.h"
|
||||
#include "m_argv.h"
|
||||
#include "mapinfo.h"
|
||||
#include "texturemanager.h"
|
||||
|
|
|
@ -32,7 +32,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "duke3d.h"
|
||||
#include "baselayer.h"
|
||||
#include "m_argv.h"
|
||||
#include "mapinfo.h"
|
||||
#include "texturemanager.h"
|
||||
|
|
|
@ -31,10 +31,10 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
|||
#include "gamestate.h"
|
||||
#include "duke3d.h"
|
||||
#include "sbar.h"
|
||||
#include "baselayer.h"
|
||||
#include "m_argv.h"
|
||||
#include "mapinfo.h"
|
||||
#include "texturemanager.h"
|
||||
#include "glbackend/glbackend.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
|||
|
||||
#include "duke3d.h"
|
||||
#include "sbar.h"
|
||||
#include "baselayer.h"
|
||||
#include "m_argv.h"
|
||||
#include "mapinfo.h"
|
||||
#include "texturemanager.h"
|
||||
|
|
|
@ -483,7 +483,6 @@ void displayrooms(int snum, double smoothratio)
|
|||
|
||||
g_visibility = p->visibility;
|
||||
|
||||
newaspect_enable = 1;
|
||||
videoSetCorrectedAspect();
|
||||
|
||||
sect = p->cursectnum;
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "hw_viewpointbuffer.h"
|
||||
#include "hw_renderstate.h"
|
||||
#include "hw_cvars.h"
|
||||
#include "gamestruct.h"
|
||||
|
||||
CVAR(Bool, gl_texture, true, 0)
|
||||
|
||||
|
|
|
@ -362,5 +362,5 @@ void renderSetVisibility(float v);
|
|||
void renderBeginScene();
|
||||
void renderFinishScene();
|
||||
void DrawRateStuff();
|
||||
|
||||
void videoShowFrame(int32_t);
|
||||
void hud_drawsprite(double sx, double sy, int z, double a, int picnum, int dashade, int dapalnum, int dastat, double alpha = 1);
|
||||
|
|
|
@ -1796,11 +1796,8 @@ drawscreen(PLAYERp pp, double smoothratio)
|
|||
JS_DrawCameras(pp, tx, ty, tz);
|
||||
}
|
||||
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 1;
|
||||
videoSetCorrectedAspect();
|
||||
}
|
||||
|
||||
videoSetCorrectedAspect();
|
||||
renderSetAspect(Blrintf(float(viewingrange)* tanf(r_fov* (fPI / 360.f))), yxaspect);
|
||||
OverlapDraw = TRUE;
|
||||
DrawOverlapRoom(tx, ty, tz, tq16ang, tq16horiz, tsectnum);
|
||||
|
@ -1822,11 +1819,8 @@ drawscreen(PLAYERp pp, double smoothratio)
|
|||
post_analyzesprites();
|
||||
renderDrawMasks();
|
||||
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 0;
|
||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||
}
|
||||
|
||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||
UpdatePanel(smoothratio);
|
||||
|
||||
#define SLIME 2305
|
||||
|
|
|
@ -29,10 +29,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#define MAIN
|
||||
#define QUIET
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
|
||||
#include "baselayer.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "panel.h"
|
||||
#include "game.h"
|
||||
|
|
|
@ -38,7 +38,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
|
||||
#include "build.h"
|
||||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "mmulti.h"
|
||||
|
||||
#include "mytypes.h"
|
||||
|
@ -49,6 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "c_cvars.h"
|
||||
#include "mapinfo.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "gamestruct.h"
|
||||
#include "packet.h"
|
||||
|
||||
EXTERN_CVAR(Bool, sw_ninjahack)
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
#include "mmulti.h"
|
||||
|
||||
#include "gamecontrol.h"
|
||||
|
|
Loading…
Reference in a new issue