Merge branch 'master' of https://github.com/coelckers/gzdoom into vulkan2

# Conflicts:
#	src/posix/sdl/gl_sysfb.h
This commit is contained in:
Rachael Alexanderson 2019-03-31 03:49:08 -04:00
commit ead3695844
24 changed files with 52 additions and 79 deletions

View file

@ -137,14 +137,13 @@ FString D_UnescapeUserInfo (const char *str, size_t len)
int D_GenderToInt (const char *gender)
{
if (gender[0] == 'f')
return GENDER_FEMALE;
else if (gender[0] == 'n')
return GENDER_NEUTER;
else if (gender[0] == 'o')
return GENDER_OBJECT;
else
return GENDER_MALE;
if (!stricmp(gender, "female")) return GENDER_FEMALE;
if (!stricmp(gender, "neutral")) return GENDER_NEUTER;
if (!stricmp(gender, "neuter")) return GENDER_NEUTER;
if (!stricmp(gender, "other")) return GENDER_OBJECT;
if (!stricmp(gender, "object")) return GENDER_OBJECT;
if (!stricmp(gender, "cyborg")) return GENDER_OBJECT;
return GENDER_MALE;
}
int D_PlayerClassToInt (const char *classname)

View file

@ -1461,7 +1461,7 @@ class CommandDrawNumber : public CommandDrawString
if(statusBar->CPlayer->mo->waterlevel < 3)
num = primaryLevel->airsupply/TICRATE;
else
num = clamp<int>((statusBar->CPlayer->air_finished - primaryLevel->time + (TICRATE-1))/TICRATE, 0, INT_MAX);
num = clamp<int>((statusBar->CPlayer->air_finished - primaryLevel->maptime + (TICRATE-1))/TICRATE, 0, INT_MAX);
break;
}
case SELECTEDINVENTORY:
@ -2751,7 +2751,7 @@ class CommandDrawBar : public SBarInfoCommand
break;
}
case AIRTIME:
value = clamp<int>(statusBar->CPlayer->air_finished - primaryLevel->time, 0, INT_MAX);
value = clamp<int>(statusBar->CPlayer->air_finished - primaryLevel->maptime, 0, INT_MAX);
max = primaryLevel->airsupply;
break;
case POWERUPTIME:

View file

@ -487,6 +487,17 @@ void FGameConfigFile::DoGlobalSetup ()
}
}
}
if (last < 217)
{
auto var = FindCVar("vid_scalemode", NULL);
UCVarValue newvalue;
newvalue.Int = 2;
if (var != NULL)
{
UCVarValue v = var->GetGenericRep(CVAR_Int);
if (v.Int == 3) var->SetGenericRep(newvalue, CVAR_Int);
}
}
}
}
}

View file

@ -5419,7 +5419,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
return Level->Players[args[0]]->air_finished - Level->time;
return Level->Players[args[0]]->air_finished - Level->maptime;
}
}
@ -5431,7 +5431,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
Level->Players[args[0]]->air_finished = args[1] + Level->time;
Level->Players[args[0]]->air_finished = args[1] + Level->maptime;
return 1;
}
}

View file

@ -4330,7 +4330,7 @@ bool AActor::UpdateWaterLevel(bool dosplash)
else if (oldlevel == 3 && waterlevel < 3)
{
// Our head just came up.
if (player->air_finished > Level->time)
if (player->air_finished > Level->maptime)
{
// We hadn't run out of air yet.
S_Sound(this, CHAN_VOICE, "*surface", 1, ATTN_NORM);

View file

@ -960,8 +960,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
("scrolls", Scrolls)
("automap", automap)
("interpolator", interpolator)
("frozenstate", frozenstate)
("sndseqlisthead", SequenceListHead);
("frozenstate", frozenstate);
// Hub transitions must keep the current total time
@ -1003,6 +1002,8 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
canvasTextureInfo.Serialize(arc);
SerializePlayers(arc, hubload);
SerializeSounds(arc);
arc("sndseqlisthead", SequenceListHead);
// Regenerate some data that wasn't saved
if (arc.isReading())

View file

@ -80,8 +80,8 @@ protected:
int GetTitleBarHeight() const;
static const int MINIMUM_WIDTH = 320;
static const int MINIMUM_HEIGHT = 200;
static const int MINIMUM_WIDTH = 640;
static const int MINIMUM_HEIGHT = 400;
};
class SystemGLFrameBuffer : public SystemBaseFrameBuffer

View file

@ -32,16 +32,16 @@
extern bool setsizeneeded;
EXTERN_CVAR(Int, vid_aspect)
CUSTOM_CVAR(Int, vid_scale_customwidth, 320, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Int, vid_scale_customwidth, 640, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
if (self < 320)
self = 320;
if (self < 640)
self = 640;
setsizeneeded = true;
}
CUSTOM_CVAR(Int, vid_scale_customheight, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Int, vid_scale_customheight, 400, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
if (self < 200)
self = 200;
if (self < 400)
self = 400;
setsizeneeded = true;
}
CVAR(Bool, vid_scale_customlinear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
@ -66,8 +66,8 @@ namespace
// isValid, isLinear, GetScaledWidth(), GetScaledHeight(), isScaled43, isCustom
{ true, false, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 0 - Native
{ true, true, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 1 - Native (Linear)
{ true, false, [](uint32_t Width)->uint32_t { return 320; }, [](uint32_t Height)->uint32_t { return 200; }, true, false }, // 2 - 320x200
{ true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 3 - 640x400
{ true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 2 - 640x400 (formerly 320x200)
{ true, true, [](uint32_t Width)->uint32_t { return 960; }, [](uint32_t Height)->uint32_t { return 600; }, true, false }, // 3 - 960x600 (formerly 640x400)
{ true, true, [](uint32_t Width)->uint32_t { return 1280; }, [](uint32_t Height)->uint32_t { return 800; }, true, false }, // 4 - 1280x800
{ true, true, [](uint32_t Width)->uint32_t { return vid_scale_customwidth; }, [](uint32_t Height)->uint32_t { return vid_scale_customheight; }, true, true }, // 5 - Custom
};

View file

@ -87,9 +87,6 @@ CUSTOM_CVAR(Bool, gl_texture_usehires, true, CVAR_ARCHIVE|CVAR_NOINITCALL)
CVAR(Bool, gl_precache, false, CVAR_ARCHIVE)
CVAR(Bool, gl_trimsprites, true, CVAR_ARCHIVE);
//==========================================================================
//
// Sprite CVARs

View file

@ -129,8 +129,6 @@ void PolyRenderer::RenderActorView(AActor *actor, bool drawpsprites, bool dontma
PolyMaskedCycles.Reset();
PolyDrawerWaitCycles.Reset();
NetUpdate();
DontMapLines = dontmaplines;
R_SetupFrame(Viewpoint, Viewwindow, actor);
@ -188,8 +186,6 @@ void PolyRenderer::RenderActorView(AActor *actor, bool drawpsprites, bool dontma
if (Viewpoint.camera)
Viewpoint.camera->renderflags = savedflags;
NetUpdate();
}
void PolyRenderer::RenderRemainingPlayerSprites()

View file

@ -70,9 +70,6 @@ namespace swrenderer
curline = ds->curline;
m3DFloor = clip3DFloor;
if (Thread->MainThread)
NetUpdate();
frontsector = curline->frontsector;
backsector = curline->backsector;

View file

@ -546,9 +546,6 @@ namespace swrenderer
this->additive = additive;
this->alpha = alpha;
if (Thread->MainThread)
NetUpdate();
Thread->PrepareTexture(pic, DefaultRenderStyle()); // Get correct render style? Shaded won't get here.
if (rw_pic->GetHeight() != 1 << rw_pic->GetHeightBits())

View file

@ -143,7 +143,5 @@ namespace swrenderer
renderer.Render(this, xscale, yscale, alpha, additive, masked, colormap, tex);
}
}
if (thread->MainThread)
NetUpdate();
}
}

View file

@ -458,14 +458,8 @@ namespace swrenderer
int prevuniq2 = CurrentPortalUniq;
CurrentPortalUniq = prevuniq;
if (Thread->MainThread)
NetUpdate();
Thread->TranslucentPass->Render(); // this is required since with portals there often will be cases when more than 80% of the view is inside a portal.
if (Thread->MainThread)
NetUpdate();
Thread->Clip3D->LeaveSkybox(); // pop 3D floor height map
CurrentPortalUniq = prevuniq2;

View file

@ -155,8 +155,6 @@ namespace swrenderer
CameraLight::Instance()->SetCamera(MainThread()->Viewport->viewpoint, MainThread()->Viewport->RenderTarget, actor);
MainThread()->Viewport->SetupFreelook();
NetUpdate();
this->dontmaplines = dontmaplines;
R_UpdateFuzzPosFrameStart();
@ -289,9 +287,6 @@ namespace swrenderer
thread->OpaquePass->RenderScene(thread->Viewport->Level());
thread->Clip3D->ResetClip(); // reset clips (floor/ceiling)
if (thread->MainThread)
NetUpdate();
if (viewactive)
{
thread->PlaneList->Render();
@ -299,13 +294,7 @@ namespace swrenderer
thread->Portal->RenderPlanePortals();
thread->Portal->RenderLinePortals();
if (thread->MainThread)
NetUpdate();
thread->TranslucentPass->Render();
if (thread->MainThread)
NetUpdate();
}
DrawerThreads::Execute(thread->DrawQueue);

View file

@ -530,8 +530,5 @@ namespace swrenderer
drawerargs.DrawMaskedColumn(thread, x, iscale, pic, frac + xiscale / 2, spryscale, sprtopscreen, sprflipvert, mfloorclip, mceilingclip, RenderStyle, false);
frac += xiscale;
}
if (thread->MainThread)
NetUpdate();
}
}

View file

@ -369,8 +369,5 @@ namespace swrenderer
}
}
}
if (thread->MainThread)
NetUpdate();
}
}

View file

@ -216,8 +216,8 @@ void DFrameBuffer::Update()
int initialHeight = GetClientHeight();
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
if (clientWidth < 320) clientWidth = 320;
if (clientHeight < 200) clientHeight = 200;
if (clientWidth < 640) clientWidth = 640;
if (clientHeight < 400) clientHeight = 400;
if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight))
{
SetVirtualSize(clientWidth, clientHeight);

View file

@ -65,7 +65,7 @@ const char *GetVersionString();
// Version stored in the ini's [LastRun] section.
// Bump it if you made some configuration change that you want to
// be able to migrate in FGameConfigFile::DoGlobalSetup().
#define LASTRUNVERSION "216"
#define LASTRUNVERSION "217"
// Protocol version used in demos.
// Bump it if you change existing DEM_ commands or add new ones.

View file

@ -525,8 +525,8 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
else
{
mmi->ptMinTrackSize.x = 320;
mmi->ptMinTrackSize.y = 200;
mmi->ptMinTrackSize.x = 640;
mmi->ptMinTrackSize.y = 400;
}
return 0;
}

View file

@ -807,7 +807,7 @@ OptionValue Contrast
{
0.0, "$OPTVAL_OFF"
1.0, "$OPTVAL_ON"
2.0, "$OPTVAL_SMOOTH"
2.0, "$OPTVAL_SMOOTH_1"
}
OptionValue Fuzziness
@ -2133,8 +2133,8 @@ OptionValue ScaleModes
{
0, "$OPTVAL_SCALENEAREST"
1, "$OPTVAL_SCALELINEAR"
2, "320x200"
3, "640x400"
2, "640x400"
3, "960x600"
4, "1280x800"
5, "$OPTVAL_CUSTOM"
}
@ -2376,7 +2376,7 @@ OptionValue "Particles"
{
0, "$OPTVAL_SQUARE"
1, "$OPTVAL_ROUND"
2, "$OPTVAL_SMOOTH"
2, "$OPTVAL_SMOOTH_2"
}
OptionValue "HqResizeModes"
@ -2486,7 +2486,6 @@ OptionMenu "GLTextureGLOptions" protected
Option "$GLTEXMNU_RESIZESPR", gl_texture_hqresize_sprites, "OnOff"
Option "$GLTEXMNU_RESIZEFNT", gl_texture_hqresize_fonts, "OnOff"
Option "$GLTEXMNU_PRECACHETEX", gl_precache, "YesNo"
Option "$GLTEXMNU_TRIMSPREDGE", gl_trimsprites, "OnOff"
Option "$GLTEXMNU_SORTDRAWLIST", gl_sort_textures, "YesNo"
Class "GLTextureGLOptions"
}

View file

@ -80,6 +80,7 @@ class OptionMenuItem : MenuItemBase
override int GetIndent()
{
if (mCentered) return 0;
if (screen.GetWidth() < 640) return screen.GetWidth() / 2;
return Menu.OptionWidth(Stringtable.Localize(mLabel));
}
@ -179,7 +180,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
override bool Activate()
{
// This needs to perform a few checks to prevent abuse by malicious modders.
// This needs to perform a few checks to prevent abuse by malicious modders.
if (GetClass() != "OptionMenuItemSafeCommand")
{
let m = OptionMenu(Menu.GetCurrentMenu());
@ -188,6 +189,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
// don't execute if this item cannot be found in the current menu.
if (m.GetItem(mAction) != self) return false;
}
else mUnsafe = false;
Menu.MenuSound("menu/choose");
DoCommand(ccmd, mUnsafe);
if (mCloseOnSelect)

View file

@ -599,7 +599,7 @@ class BaseStatusBar native ui
if(CPlayer.mo.waterlevel < 3)
return Level.airsupply;
else
return max(CPlayer.air_finished - Level.time, 0);
return max(CPlayer.air_finished - Level.maptime, 0);
}
int GetSelectedInventoryAmount()

View file

@ -337,7 +337,6 @@ object CFlameFloor
// Wraithverge
flickerlight GHOST
{
attenuate 1
color 1.0 1.0 1.0
size 84
secondarysize 78
@ -347,13 +346,13 @@ flickerlight GHOST
object HolyMissile
{
frame SPIRP { light GHOST }
//frame SPIRP { light GHOST }
}
object HolySpirit
{
frame SPIRA { light GHOST }
frame SPIRB { light GHOST }
//frame SPIRA { light GHOST }
//frame SPIRB { light GHOST }
}
// Mage wand