diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 6c449f852..0aedc48b2 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -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) diff --git a/src/g_statusbar/sbarinfo_commands.cpp b/src/g_statusbar/sbarinfo_commands.cpp index b5a265c65..d96ca66ec 100644 --- a/src/g_statusbar/sbarinfo_commands.cpp +++ b/src/g_statusbar/sbarinfo_commands.cpp @@ -1461,7 +1461,7 @@ class CommandDrawNumber : public CommandDrawString if(statusBar->CPlayer->mo->waterlevel < 3) num = primaryLevel->airsupply/TICRATE; else - num = clamp((statusBar->CPlayer->air_finished - primaryLevel->time + (TICRATE-1))/TICRATE, 0, INT_MAX); + num = clamp((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(statusBar->CPlayer->air_finished - primaryLevel->time, 0, INT_MAX); + value = clamp(statusBar->CPlayer->air_finished - primaryLevel->maptime, 0, INT_MAX); max = primaryLevel->airsupply; break; case POWERUPTIME: diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index ee52313ce..20da4c699 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -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); + } + } } } } diff --git a/src/p_acs.cpp b/src/p_acs.cpp index f230f57cb..e19a4c78c 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -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; } } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index d2c00d2a5..fbcb30806 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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); diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index b7584bb1d..31378f27b 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -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()) diff --git a/src/posix/cocoa/gl_sysfb.h b/src/posix/cocoa/gl_sysfb.h index e3a2fb3c4..5ff2d250f 100644 --- a/src/posix/cocoa/gl_sysfb.h +++ b/src/posix/cocoa/gl_sysfb.h @@ -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 diff --git a/src/r_videoscale.cpp b/src/r_videoscale.cpp index d6254c992..fbd7393c5 100644 --- a/src/r_videoscale.cpp +++ b/src/r_videoscale.cpp @@ -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 }; diff --git a/src/rendering/hwrenderer/utility/hw_cvars.cpp b/src/rendering/hwrenderer/utility/hw_cvars.cpp index b4d40a407..6b9b699e4 100644 --- a/src/rendering/hwrenderer/utility/hw_cvars.cpp +++ b/src/rendering/hwrenderer/utility/hw_cvars.cpp @@ -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 diff --git a/src/rendering/polyrenderer/poly_renderer.cpp b/src/rendering/polyrenderer/poly_renderer.cpp index b928979c5..491f1b8ee 100644 --- a/src/rendering/polyrenderer/poly_renderer.cpp +++ b/src/rendering/polyrenderer/poly_renderer.cpp @@ -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() diff --git a/src/rendering/swrenderer/line/r_renderdrawsegment.cpp b/src/rendering/swrenderer/line/r_renderdrawsegment.cpp index 5758b08ee..e5ba7f769 100644 --- a/src/rendering/swrenderer/line/r_renderdrawsegment.cpp +++ b/src/rendering/swrenderer/line/r_renderdrawsegment.cpp @@ -70,9 +70,6 @@ namespace swrenderer curline = ds->curline; m3DFloor = clip3DFloor; - if (Thread->MainThread) - NetUpdate(); - frontsector = curline->frontsector; backsector = curline->backsector; diff --git a/src/rendering/swrenderer/line/r_walldraw.cpp b/src/rendering/swrenderer/line/r_walldraw.cpp index ecc143906..7ca3b6ac4 100644 --- a/src/rendering/swrenderer/line/r_walldraw.cpp +++ b/src/rendering/swrenderer/line/r_walldraw.cpp @@ -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()) diff --git a/src/rendering/swrenderer/plane/r_visibleplane.cpp b/src/rendering/swrenderer/plane/r_visibleplane.cpp index 2d5cf854d..828f15bab 100644 --- a/src/rendering/swrenderer/plane/r_visibleplane.cpp +++ b/src/rendering/swrenderer/plane/r_visibleplane.cpp @@ -143,7 +143,5 @@ namespace swrenderer renderer.Render(this, xscale, yscale, alpha, additive, masked, colormap, tex); } } - if (thread->MainThread) - NetUpdate(); } } diff --git a/src/rendering/swrenderer/scene/r_portal.cpp b/src/rendering/swrenderer/scene/r_portal.cpp index eb7763bf4..c7fd72c9d 100644 --- a/src/rendering/swrenderer/scene/r_portal.cpp +++ b/src/rendering/swrenderer/scene/r_portal.cpp @@ -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; diff --git a/src/rendering/swrenderer/scene/r_scene.cpp b/src/rendering/swrenderer/scene/r_scene.cpp index 562156112..b598f49b0 100644 --- a/src/rendering/swrenderer/scene/r_scene.cpp +++ b/src/rendering/swrenderer/scene/r_scene.cpp @@ -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); diff --git a/src/rendering/swrenderer/things/r_playersprite.cpp b/src/rendering/swrenderer/things/r_playersprite.cpp index 94e127ad1..0aefb48a2 100644 --- a/src/rendering/swrenderer/things/r_playersprite.cpp +++ b/src/rendering/swrenderer/things/r_playersprite.cpp @@ -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(); } } diff --git a/src/rendering/swrenderer/things/r_sprite.cpp b/src/rendering/swrenderer/things/r_sprite.cpp index 5c00ed9fd..1ae8119c2 100644 --- a/src/rendering/swrenderer/things/r_sprite.cpp +++ b/src/rendering/swrenderer/things/r_sprite.cpp @@ -369,8 +369,5 @@ namespace swrenderer } } } - - if (thread->MainThread) - NetUpdate(); } } diff --git a/src/v_framebuffer.cpp b/src/v_framebuffer.cpp index 93545b2e9..4f9efb368 100644 --- a/src/v_framebuffer.cpp +++ b/src/v_framebuffer.cpp @@ -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); diff --git a/src/version.h b/src/version.h index 56b397468..832737a7f 100644 --- a/src/version.h +++ b/src/version.h @@ -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. diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 676484a30..b8f5ba777 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -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; } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 39296d350..f74956fe4 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -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" } diff --git a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs index c4b65a46d..2ef9e3d6d 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs @@ -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) diff --git a/wadsrc/static/zscript/ui/statusbar/statusbar.zs b/wadsrc/static/zscript/ui/statusbar/statusbar.zs index 170e26a8d..bce0a763b 100644 --- a/wadsrc/static/zscript/ui/statusbar/statusbar.zs +++ b/wadsrc/static/zscript/ui/statusbar/statusbar.zs @@ -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() diff --git a/wadsrc_lights/static/filter/hexen/gldefs.txt b/wadsrc_lights/static/filter/hexen/gldefs.txt index fb6cb49c3..b9f73bec1 100644 --- a/wadsrc_lights/static/filter/hexen/gldefs.txt +++ b/wadsrc_lights/static/filter/hexen/gldefs.txt @@ -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