mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-17 00:11:05 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
db8a7706d1
13 changed files with 56 additions and 28 deletions
|
@ -98,6 +98,20 @@ CVAR (Bool, am_showkeys, true, CVAR_ARCHIVE);
|
|||
CVAR (Int, am_showtriggerlines, 0, CVAR_ARCHIVE);
|
||||
CVAR (Int, am_showthingsprites, 0, CVAR_ARCHIVE);
|
||||
|
||||
CUSTOM_CVAR (Int, am_emptyspacemargin, 0, CVAR_ARCHIVE)
|
||||
{
|
||||
if (self < 0)
|
||||
{
|
||||
self = 0;
|
||||
}
|
||||
else if (self > 50)
|
||||
{
|
||||
self = 50;
|
||||
}
|
||||
|
||||
AM_NewResolution();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Automap colors
|
||||
|
@ -1063,8 +1077,9 @@ static void AM_findMinMaxBoundaries ()
|
|||
|
||||
static void AM_calcMinMaxMtoF()
|
||||
{
|
||||
double a = SCREENWIDTH / max_w;
|
||||
double b = StatusBar->GetTopOfStatusbar() / max_h;
|
||||
const double safe_frame = 1.0 - am_emptyspacemargin / 100.0;
|
||||
double a = safe_frame * (SCREENWIDTH / max_w);
|
||||
double b = safe_frame * (StatusBar->GetTopOfStatusbar() / max_h);
|
||||
|
||||
min_scale_mtof = a < b ? a : b;
|
||||
max_scale_mtof = SCREENHEIGHT / (2*PLAYERRADIUS);
|
||||
|
|
|
@ -2490,7 +2490,7 @@ bool D_LoadDehFile(const char *patchfile)
|
|||
{
|
||||
FileReader fr;
|
||||
|
||||
if (!fr.Open(patchfile))
|
||||
if (fr.Open(patchfile))
|
||||
{
|
||||
PatchSize = fr.GetLength();
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
#include "r_videoscale.h"
|
||||
|
||||
EXTERN_CVAR(Int, screenblocks)
|
||||
EXTERN_CVAR(Int, vid_scalemode)
|
||||
|
||||
CVAR(Bool, gl_scale_viewport, true, CVAR_ARCHIVE);
|
||||
|
||||
|
@ -312,7 +311,10 @@ void FGLRenderer::SetOutputViewport(GL_IRECT *bounds)
|
|||
mSceneViewport.height = height;
|
||||
|
||||
// Scale viewports to fit letterbox
|
||||
if ((gl_scale_viewport && !framebuffer->IsFullscreen() && vid_scalemode == 0) || !FGLRenderBuffers::IsEnabled())
|
||||
bool notScaled = ((mScreenViewport.width == ViewportScaledWidth(mScreenViewport.width, mScreenViewport.height)) &&
|
||||
(mScreenViewport.width == ViewportScaledHeight(mScreenViewport.width, mScreenViewport.height)) &&
|
||||
!ViewportIsScaled43());
|
||||
if ((gl_scale_viewport && !framebuffer->IsFullscreen() && notScaled) || !FGLRenderBuffers::IsEnabled())
|
||||
{
|
||||
mScreenViewport.width = mOutputLetterbox.width;
|
||||
mScreenViewport.height = mOutputLetterbox.height;
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
EXTERN_CVAR (Float, vid_brightness)
|
||||
EXTERN_CVAR (Float, vid_contrast)
|
||||
EXTERN_CVAR (Bool, vid_vsync)
|
||||
EXTERN_CVAR(Int, vid_scalemode)
|
||||
|
||||
CVAR(Bool, gl_aalines, false, CVAR_ARCHIVE)
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ uint64_t I_msTime()
|
|||
|
||||
uint64_t I_msTimeFS() // from "start"
|
||||
{
|
||||
return NSToMS(I_nsTime() - FirstFrameStartTime);
|
||||
return (FirstFrameStartTime == 0) ? 0 : NSToMS(I_nsTime() - FirstFrameStartTime);
|
||||
}
|
||||
|
||||
int I_GetTime()
|
||||
|
|
|
@ -3655,6 +3655,12 @@ void DLevelScript::Serialize(FSerializer &arc)
|
|||
if (arc.isReading())
|
||||
{
|
||||
activeBehavior = FBehavior::StaticGetModule(lib);
|
||||
|
||||
if (nullptr == activeBehavior)
|
||||
{
|
||||
I_Error("Could not find ACS module");
|
||||
}
|
||||
|
||||
pc = activeBehavior->Ofs2PC(pcofs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1137,7 +1137,8 @@ static void CreateCachedNodes(MapData *map)
|
|||
|
||||
if (fw != nullptr)
|
||||
{
|
||||
if (fw->Write(compressed, outlen+offset) != 1)
|
||||
const size_t length = outlen + offset;
|
||||
if (fw->Write(compressed, length) != length)
|
||||
{
|
||||
Printf("Error saving nodes to file %s\n", path.GetChars());
|
||||
}
|
||||
|
|
|
@ -343,6 +343,16 @@ void AActor::UnlinkFromWorld (FLinkContext *ctx)
|
|||
}
|
||||
BlockNode = NULL;
|
||||
}
|
||||
ClearRenderSectorList();
|
||||
ClearRenderLineList();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, UnlinkFromWorld)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_POINTER_DEF(ctx, FLinkContext);
|
||||
self->UnlinkFromWorld(ctx); // fixme
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -429,15 +439,6 @@ bool AActor::FixMapthingPos()
|
|||
return success;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, UnlinkFromWorld)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_POINTER_DEF(ctx, FLinkContext);
|
||||
self->UnlinkFromWorld(ctx); // fixme
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// P_SetThingPosition
|
||||
|
|
|
@ -3627,7 +3627,7 @@ void P_SetupLevel (const char *lumpname, int position)
|
|||
bool buildmap;
|
||||
const int *oldvertextable = NULL;
|
||||
|
||||
level.ShaderStartTime = I_msTime(); // indicate to the shader system that the level just started
|
||||
level.ShaderStartTime = I_msTimeFS(); // indicate to the shader system that the level just started
|
||||
|
||||
// This is motivated as follows:
|
||||
|
||||
|
|
|
@ -1778,7 +1778,7 @@ MOUSEMNU_LOOKSTRAFE = "Lookstrafe";
|
|||
|
||||
// Joystick Menu
|
||||
|
||||
JOYMNU_CONFIG = "CONFIGURE CONTROLLER";
|
||||
JOYMNU_TITLE = "CONFIGURE CONTROLLER";
|
||||
JOYMNU_OPTIONS = "CONTROLLER OPTIONS";
|
||||
JOYMNU_NOMENU = "Block controller input in menu";
|
||||
|
||||
|
@ -1942,6 +1942,7 @@ AUTOMAPMNU_SHOWKEYS = "Show keys (cheat)";
|
|||
AUTOMAPMNU_SHOWTRIGGERLINES = "Show trigger lines";
|
||||
AUTOMAPMNU_SHOWTHINGSPRITES = "Show things as sprites";
|
||||
AUTOMAPMNU_PTOVERLAY = "Overlay portals";
|
||||
AUTOMAPMNU_EMPTYSPACEMARGIN = "Empty space margin";
|
||||
|
||||
// Automap Controls
|
||||
MAPCNTRLMNU_TITLE = "CUSTOMIZE MAP CONTROLS";
|
||||
|
@ -2797,7 +2798,6 @@ OPTVAL_TRANSLUCENTFUZZ = "Translucent fuzz";
|
|||
OPTVAL_NOISE = "Noise";
|
||||
OPTVAL_SMOOTHNOISE = "Smooth Noise";
|
||||
OPTVAL_JAGGEDFUZZ = "Jagged fuzz";
|
||||
OPTVAL_NORMAL = "Normal";
|
||||
OPTVAL_GREENMAGENTA = "Green/Magenta";
|
||||
OPTVAL_REDCYAN = "Red/Cyan";
|
||||
OPTVAL_AMBERBLUE = "Amber/Blue";
|
||||
|
|
|
@ -608,7 +608,7 @@ OptionValue "Inversion"
|
|||
|
||||
OptionMenu "JoystickConfigMenu" protected
|
||||
{
|
||||
Title "$JOY_CONFIG"
|
||||
Title "$JOYMNU_TITLE"
|
||||
Class "JoystickConfigMenu"
|
||||
// Will be filled in by joystick code.
|
||||
}
|
||||
|
@ -1091,6 +1091,7 @@ OptionMenu AutomapOptions protected
|
|||
Option "$AUTOMAPMNU_TEXTURED", "am_textured", "OnOff"
|
||||
Option "$AUTOMAPMNU_FOLLOW", "am_followplayer", "OnOff"
|
||||
Option "$AUTOMAPMNU_PTOVERLAY", "am_portaloverlay", "OnOff"
|
||||
Slider "$AUTOMAPMNU_EMPTYSPACEMARGIN", "am_emptyspacemargin", 0, 50, 5, 0
|
||||
StaticText " "
|
||||
Option "$AUTOMAPMNU_SHOWITEMS", "am_showitems", "OnOff"
|
||||
Option "$AUTOMAPMNU_SHOWMONSTERS", "am_showmonsters", "OnOff"
|
||||
|
|
|
@ -458,7 +458,7 @@ class LeafSpawner : Actor
|
|||
|
||||
if (mo)
|
||||
{
|
||||
mo.Thrust(random[LeafSpawn]() / 128. + 3);
|
||||
mo.Thrust(random[LeafSpawn]() / 128. + 3, angle);
|
||||
mo.target = self;
|
||||
mo.special1 = 0;
|
||||
}
|
||||
|
|
|
@ -37,13 +37,16 @@ class SectorAction : Actor
|
|||
else
|
||||
{
|
||||
Actor probe = CurSector.SecActTarget;
|
||||
while (probe.tracer != self && probe.tracer != null)
|
||||
if (null != probe)
|
||||
{
|
||||
probe = probe.tracer;
|
||||
}
|
||||
if (probe.tracer == self)
|
||||
{
|
||||
probe.tracer = tracer;
|
||||
while (probe.tracer != self && probe.tracer != null)
|
||||
{
|
||||
probe = probe.tracer;
|
||||
}
|
||||
if (probe.tracer == self)
|
||||
{
|
||||
probe.tracer = tracer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue