mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-23 12:31:09 +00:00
- moved a few files from 'rendering' to 'common'.
This commit is contained in:
parent
59360f2d77
commit
b9e3c9681b
9 changed files with 23 additions and 19 deletions
|
@ -876,7 +876,6 @@ set (PCH_SOURCES
|
||||||
playsim/p_user.cpp
|
playsim/p_user.cpp
|
||||||
rendering/r_utility.cpp
|
rendering/r_utility.cpp
|
||||||
rendering/r_sky.cpp
|
rendering/r_sky.cpp
|
||||||
rendering/r_videoscale.cpp
|
|
||||||
sound/s_advsound.cpp
|
sound/s_advsound.cpp
|
||||||
sound/s_reverbedit.cpp
|
sound/s_reverbedit.cpp
|
||||||
sound/s_sndseq.cpp
|
sound/s_sndseq.cpp
|
||||||
|
@ -1147,6 +1146,7 @@ set (PCH_SOURCES
|
||||||
common/objects/dobject.cpp
|
common/objects/dobject.cpp
|
||||||
common/objects/dobjgc.cpp
|
common/objects/dobjgc.cpp
|
||||||
common/objects/dobjtype.cpp
|
common/objects/dobjtype.cpp
|
||||||
|
common/rendering/r_videoscale.cpp
|
||||||
common/rendering/gl_load/gl_interface.cpp
|
common/rendering/gl_load/gl_interface.cpp
|
||||||
common/scripting/core/dictionary.cpp
|
common/scripting/core/dictionary.cpp
|
||||||
common/scripting/core/dynarrays.cpp
|
common/scripting/core/dynarrays.cpp
|
||||||
|
|
|
@ -11,7 +11,7 @@ struct SystemCallbacks
|
||||||
bool (*CaptureModeInGame)();
|
bool (*CaptureModeInGame)();
|
||||||
void (*CrashInfo)(char* buffer, size_t bufflen, const char* lfstr);
|
void (*CrashInfo)(char* buffer, size_t bufflen, const char* lfstr);
|
||||||
void (*PlayStartupSound)(const char* name);
|
void (*PlayStartupSound)(const char* name);
|
||||||
|
bool (*IsSpecialUI)();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern SystemCallbacks *sysCallbacks;
|
extern SystemCallbacks *sysCallbacks;
|
||||||
|
|
|
@ -36,19 +36,15 @@
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "r_videoscale.h"
|
#include "r_videoscale.h"
|
||||||
|
#include "cmdlib.h"
|
||||||
#include "c_console.h"
|
#include "v_draw.h"
|
||||||
#include "menu/menu.h"
|
#include "i_interface.h"
|
||||||
|
|
||||||
#define NUMSCALEMODES countof(vScaleTable)
|
#define NUMSCALEMODES countof(vScaleTable)
|
||||||
|
extern bool setsizeneeded;
|
||||||
extern bool setsizeneeded, multiplayer, generic_ui;
|
|
||||||
|
|
||||||
EXTERN_CVAR(Int, vid_aspect)
|
EXTERN_CVAR(Int, vid_aspect)
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, log_vgafont)
|
|
||||||
EXTERN_CVAR(Bool, dlg_vgafont)
|
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, vid_scale_customwidth, VID_MIN_WIDTH, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Int, vid_scale_customwidth, VID_MIN_WIDTH, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
if (self < VID_MIN_WIDTH)
|
if (self < VID_MIN_WIDTH)
|
||||||
|
@ -69,6 +65,9 @@ CUSTOM_CVAR(Float, vid_scale_custompixelaspect, 1.0, CVAR_ARCHIVE | CVAR_GLOBALC
|
||||||
self = 1.0;
|
self = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const int VID_MIN_UI_WIDTH = 640;
|
||||||
|
static const int VID_MIN_UI_HEIGHT = 400;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
uint32_t min_width = VID_MIN_WIDTH;
|
uint32_t min_width = VID_MIN_WIDTH;
|
||||||
|
@ -108,8 +107,7 @@ namespace
|
||||||
static bool lastspecialUI = false;
|
static bool lastspecialUI = false;
|
||||||
bool isInActualMenu = false;
|
bool isInActualMenu = false;
|
||||||
|
|
||||||
bool specialUI = (generic_ui || !!log_vgafont || !!dlg_vgafont || ConsoleState != c_up || multiplayer ||
|
bool specialUI = sysCallbacks && (!sysCallbacks->IsSpecialUI || sysCallbacks->IsSpecialUI());
|
||||||
(menuactive == MENU_On && CurrentMenu && !CurrentMenu->IsKindOf("ConversationMenu")));
|
|
||||||
|
|
||||||
if (specialUI == lastspecialUI)
|
if (specialUI == lastspecialUI)
|
||||||
return;
|
return;
|
|
@ -122,6 +122,9 @@
|
||||||
EXTERN_CVAR(Bool, hud_althud)
|
EXTERN_CVAR(Bool, hud_althud)
|
||||||
EXTERN_CVAR(Int, vr_mode)
|
EXTERN_CVAR(Int, vr_mode)
|
||||||
EXTERN_CVAR(Bool, cl_customizeinvulmap)
|
EXTERN_CVAR(Bool, cl_customizeinvulmap)
|
||||||
|
EXTERN_CVAR(Bool, log_vgafont)
|
||||||
|
EXTERN_CVAR(Bool, dlg_vgafont)
|
||||||
|
|
||||||
void DrawHUD();
|
void DrawHUD();
|
||||||
void D_DoAnonStats();
|
void D_DoAnonStats();
|
||||||
void I_DetectOS();
|
void I_DetectOS();
|
||||||
|
@ -2645,6 +2648,13 @@ static void System_PlayStartupSound(const char* sndname)
|
||||||
S_Sound(CHAN_BODY, 0, sndname, 1, ATTN_NONE);
|
S_Sound(CHAN_BODY, 0, sndname, 1, ATTN_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool System_IsSpecialUI()
|
||||||
|
{
|
||||||
|
return (generic_ui || !!log_vgafont || !!dlg_vgafont || ConsoleState != c_up || multiplayer ||
|
||||||
|
(menuactive == MENU_On && CurrentMenu && !CurrentMenu->IsKindOf("ConversationMenu")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// DoomSpecificInfo
|
// DoomSpecificInfo
|
||||||
|
@ -2848,6 +2858,8 @@ static int D_DoomMain_Internal (void)
|
||||||
System_WantNativeMouse,
|
System_WantNativeMouse,
|
||||||
System_CaptureModeInGame,
|
System_CaptureModeInGame,
|
||||||
System_CrashInfo,
|
System_CrashInfo,
|
||||||
|
System_PlayStartupSound,
|
||||||
|
System_IsSpecialUI,
|
||||||
};
|
};
|
||||||
sysCallbacks = &syscb;
|
sysCallbacks = &syscb;
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gl_system.h"
|
#include "gl_system.h"
|
||||||
#include "gi.h"
|
|
||||||
#include "m_png.h"
|
#include "m_png.h"
|
||||||
#include "r_utility.h"
|
#include "r_utility.h"
|
||||||
#include "d_player.h"
|
|
||||||
#include "gl/system/gl_buffers.h"
|
#include "gl/system/gl_buffers.h"
|
||||||
#include "gl/system/gl_framebuffer.h"
|
#include "gl/system/gl_framebuffer.h"
|
||||||
#include "hwrenderer/utility/hw_cvars.h"
|
#include "hwrenderer/utility/hw_cvars.h"
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
#include "i_time.h"
|
#include "i_time.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
|
#include "i_video.h"
|
||||||
#include "rendering/i_video.h"
|
|
||||||
|
|
||||||
#include "hwrenderer/utility/hw_clock.h"
|
#include "hwrenderer/utility/hw_clock.h"
|
||||||
#include "hwrenderer/utility/hw_vrmodes.h"
|
#include "hwrenderer/utility/hw_vrmodes.h"
|
||||||
|
|
|
@ -51,9 +51,6 @@
|
||||||
static const int VID_MIN_WIDTH = 320;
|
static const int VID_MIN_WIDTH = 320;
|
||||||
static const int VID_MIN_HEIGHT = 200;
|
static const int VID_MIN_HEIGHT = 200;
|
||||||
|
|
||||||
static const int VID_MIN_UI_WIDTH = 640;
|
|
||||||
static const int VID_MIN_UI_HEIGHT = 400;
|
|
||||||
|
|
||||||
class player_t;
|
class player_t;
|
||||||
struct sector_t;
|
struct sector_t;
|
||||||
struct FPortalSceneState;
|
struct FPortalSceneState;
|
||||||
|
|
Loading…
Reference in a new issue