diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 85c77fd17..974d2a411 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -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" diff --git a/source/blood/src/blood.h b/source/blood/src/blood.h index b447e4692..f610508be 100644 --- a/source/blood/src/blood.h +++ b/source/blood/src/blood.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 diff --git a/source/blood/src/common_game.h b/source/blood/src/common_game.h index 0a5c2cce2..13829966f 100644 --- a/source/blood/src/common_game.h +++ b/source/blood/src/common_game.h @@ -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" diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index 384c515ef..96d1a2da8 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -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" diff --git a/source/blood/src/osdcmd.cpp b/source/blood/src/osdcmd.cpp index 4f33ef771..41754ce10 100644 --- a/source/blood/src/osdcmd.cpp +++ b/source/blood/src/osdcmd.cpp @@ -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" diff --git a/source/blood/src/sound.cpp b/source/blood/src/sound.cpp index 34cc797a8..e7fdb1037 100644 --- a/source/blood/src/sound.cpp +++ b/source/blood/src/sound.cpp @@ -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" diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index fdd9012cb..6160c986d 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -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; diff --git a/source/build/include/baselayer.h b/source/build/include/baselayer.h deleted file mode 100644 index ec8ff74ee..000000000 --- a/source/build/include/baselayer.h +++ /dev/null @@ -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_ - diff --git a/source/build/include/polymost.h b/source/build/include/polymost.h index 2e10d3c8b..b981c149a 100644 --- a/source/build/include/polymost.h +++ b/source/build/include/polymost.h @@ -2,7 +2,6 @@ # define polymost_h_ -#include "baselayer.h" // glinfo #include "mdsprite.h" void Polymost_CacheHitList(uint8_t* hash); diff --git a/source/build/src/animvpx.cpp b/source/build/src/animvpx.cpp index 7d675a448..6bb8ea98d 100644 --- a/source/build/src/animvpx.cpp +++ b/source/build/src/animvpx.cpp @@ -5,7 +5,6 @@ #include "compat.h" #include "compat.h" -#include "baselayer.h" #include "build.h" #include "matrix.h" diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 64d89e213..d54587e64 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -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; diff --git a/source/build/src/defs.cpp b/source/build/src/defs.cpp index 06a25e50b..5c68b5f50 100644 --- a/source/build/src/defs.cpp +++ b/source/build/src/defs.cpp @@ -8,7 +8,6 @@ #include "build.h" #include "compat.h" #include "engine_priv.h" -#include "baselayer.h" #include "scriptfile.h" #include "common.h" diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index a6b24995b..082bfb570 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -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)); } // diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index 6e4cbb921..9e48ce9c8 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -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; diff --git a/source/build/src/mhk.cpp b/source/build/src/mhk.cpp index d90f74919..4f54b9cff 100644 --- a/source/build/src/mhk.cpp +++ b/source/build/src/mhk.cpp @@ -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 diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 1647bbe8c..7fc99d42c 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -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) diff --git a/source/build/src/scriptfile.cpp b/source/build/src/scriptfile.cpp index c6e485269..48af3576b 100644 --- a/source/build/src/scriptfile.cpp +++ b/source/build/src/scriptfile.cpp @@ -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')) diff --git a/source/build/src/voxmodel.cpp b/source/build/src/voxmodel.cpp index 625cfff4b..bf63aa450 100644 --- a/source/build/src/voxmodel.cpp +++ b/source/build/src/voxmodel.cpp @@ -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" diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index c4b7c71f8..da0121b96 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -38,6 +38,7 @@ #include "gamecvars.h" #include "v_video.h" #include "statusbar.h" +#include "gamestruct.h" //========================================================================== // diff --git a/source/core/menu/imagescroller.cpp b/source/core/menu/imagescroller.cpp index b7c0158db..882dbc7bf 100644 --- a/source/core/menu/imagescroller.cpp +++ b/source/core/menu/imagescroller.cpp @@ -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" diff --git a/source/core/menu/savegamemanager.cpp b/source/core/menu/savegamemanager.cpp index 66b20c4c4..c554b59db 100644 --- a/source/core/menu/savegamemanager.cpp +++ b/source/core/menu/savegamemanager.cpp @@ -52,6 +52,7 @@ #include "build.h" #include "serializer.h" #include "findfile.h" +#include "inputstate.h" FSavegameManager savegameManager; diff --git a/source/core/palette.cpp b/source/core/palette.cpp index 561731caa..c303734e8 100644 --- a/source/core/palette.cpp +++ b/source/core/palette.cpp @@ -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; diff --git a/source/exhumed/src/cd.cpp b/source/exhumed/src/cd.cpp index bef5d2dd6..8c6b677ed 100644 --- a/source/exhumed/src/cd.cpp +++ b/source/exhumed/src/cd.cpp @@ -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" diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 9881842b1..0b7958f24 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -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" diff --git a/source/exhumed/src/exhumed.h b/source/exhumed/src/exhumed.h index 47bfa58db..765d2ab66 100644 --- a/source/exhumed/src/exhumed.h +++ b/source/exhumed/src/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; diff --git a/source/exhumed/src/gameloop.cpp b/source/exhumed/src/gameloop.cpp index 1668218d0..7491d2af4 100644 --- a/source/exhumed/src/gameloop.cpp +++ b/source/exhumed/src/gameloop.cpp @@ -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" diff --git a/source/exhumed/src/movie.cpp b/source/exhumed/src/movie.cpp index ecc5d1fc7..bb18ea182 100644 --- a/source/exhumed/src/movie.cpp +++ b/source/exhumed/src/movie.cpp @@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "names.h" #include #include -#include "baselayer.h" #include "c_bind.h" #include "sound.h" #include "v_2ddrawer.h" diff --git a/source/exhumed/src/sound.cpp b/source/exhumed/src/sound.cpp index 5325b296c..96bf57e53 100644 --- a/source/exhumed/src/sound.cpp +++ b/source/exhumed/src/sound.cpp @@ -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" diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 91b45676e..29c7e05dc 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -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) { diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index 4a1f7db1e..4ebde4370 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -1,8 +1,6 @@ #ifndef duke3d_h_ #define duke3d_h_ -// JBF -#include "baselayer.h" #include "build.h" #include "compat.h" diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index 7fc48316f..be647e44e 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -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" diff --git a/source/games/duke/src/game_misc.cpp b/source/games/duke/src/game_misc.cpp index 9a1a30e89..8c5b57b4d 100644 --- a/source/games/duke/src/game_misc.cpp +++ b/source/games/duke/src/game_misc.cpp @@ -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" diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 18a79650e..0b1b096a9 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -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 diff --git a/source/games/duke/src/prediction.cpp b/source/games/duke/src/prediction.cpp index da408e7f0..9a4f0e70e 100644 --- a/source/games/duke/src/prediction.cpp +++ b/source/games/duke/src/prediction.cpp @@ -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" diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index 7b636886c..6e99a2249 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -483,7 +483,6 @@ void displayrooms(int snum, double smoothratio) g_visibility = p->visibility; - newaspect_enable = 1; videoSetCorrectedAspect(); sect = p->cursectnum; diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 16bb3937a..3e3d62218 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -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) diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index 5ed5e2b38..66b7f3dc0 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -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); diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 64a629406..a282b4d45 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -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 diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index edf851112..eb7bc6f29 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -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" diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 33e268378..21a158999 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/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) diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index 673c7cb0c..0e5475d69 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -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"