diff --git a/src/d_main.cpp b/src/d_main.cpp index f73049397..365b54938 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2635,6 +2635,7 @@ void D_DoomMain (void) V_Init2(); UpdateJoystickMenu(NULL); + UpdateVRModes(); v = Args->CheckValue ("-loadgame"); if (v) diff --git a/src/g_cvars.cpp b/src/g_cvars.cpp index 7aac035d0..560effae7 100644 --- a/src/g_cvars.cpp +++ b/src/g_cvars.cpp @@ -129,7 +129,7 @@ CUSTOM_CVAR(Float, teamdamage, 0.f, CVAR_SERVERINFO | CVAR_NOINITCALL) } } -CUSTOM_CVAR(String, language, "auto", CVAR_ARCHIVE | CVAR_NOINITCALL) +CUSTOM_CVAR(String, language, "auto", CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) { SetLanguageIDs(); GStrings.UpdateLanguage(); diff --git a/src/g_game.cpp b/src/g_game.cpp index 861b506a8..32563b9c9 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -108,6 +108,7 @@ CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Bool, longsavemessages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (String, save_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR (Bool, cl_waitforsave, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); +CVAR (Bool, enablescriptscreenshot, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); EXTERN_CVAR (Float, con_midtime); //========================================================================== @@ -1715,7 +1716,7 @@ void G_DoPlayerPop(int playernum) players[playernum].DestroyPSprites(); } -void G_ScreenShot (char *filename) +void G_ScreenShot (const char *filename) { shotfile = filename; gameaction = ga_screenshot; @@ -2876,6 +2877,26 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, StartSlideshow) return 0; } +DEFINE_ACTION_FUNCTION(FLevelLocals, MakeScreenShot) +{ + if (enablescriptscreenshot) + { + G_ScreenShot(""); + } + return 0; +} + +void G_MakeAutoSave() +{ + gameaction = ga_autosave; +} + +DEFINE_ACTION_FUNCTION(FLevelLocals, MakeAutoSave) +{ + G_MakeAutoSave(); + return 0; +} + DEFINE_GLOBAL(players) DEFINE_GLOBAL(playeringame) DEFINE_GLOBAL(PlayerClasses) diff --git a/src/g_game.h b/src/g_game.h index a21c80cc6..baedc0627 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -95,7 +95,7 @@ bool G_CheckDemoStatus (void); void G_Ticker (void); bool G_Responder (event_t* ev); -void G_ScreenShot (char *filename); +void G_ScreenShot (const char* filename); void G_StartSlideshow(FLevelLocals *Level, FName whichone); FString G_BuildSaveName (const char *prefix, int slot); diff --git a/src/gamedata/fonts/font.cpp b/src/gamedata/fonts/font.cpp index 92ebb03ed..195195316 100644 --- a/src/gamedata/fonts/font.cpp +++ b/src/gamedata/fonts/font.cpp @@ -751,12 +751,24 @@ int FFont::GetCharCode(int code, bool needpic) const } } + code = originalcode; if (myislower(code)) { int upper = upperforlower[code]; // Stripping accents did not help - now try uppercase for lowercase if (upper != code) return GetCharCode(upper, needpic); } + + // Same for the uppercase character. Since we restart at the accented version this must go through the entire thing again. + while ((newcode = stripaccent(code)) != code) + { + code = newcode; + if (code >= FirstChar && code <= LastChar && (!needpic || Chars[code - FirstChar].TranslatedPic != nullptr)) + { + return code; + } + } + } return -1; diff --git a/src/gamedata/fonts/v_font.cpp b/src/gamedata/fonts/v_font.cpp index 9218c5d19..bd88bf48f 100644 --- a/src/gamedata/fonts/v_font.cpp +++ b/src/gamedata/fonts/v_font.cpp @@ -838,8 +838,17 @@ int stripaccent(int code) } else if (code >= 0x100 && code < 0x180) { - static const char accentless[] = "AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIiJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOoRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZz "; - return accentless[code -0x100]; + // For the double-accented Hungarian letters it makes more sense to first map them to the very similar looking Umlauts. + // (And screw the crappy specs here that do not allow UTF-8 multibyte characters here.) + if (code == 0x150) code = 0xd6; + else if (code == 0x151) code = 0xf6; + else if (code == 0x170) code = 0xdc; + else if (code == 0x171) code = 0xfc; + else + { + static const char accentless[] = "AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIiJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOoRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZz "; + return accentless[code - 0x100]; + } } else if (code >= 0x200 && code < 0x21c) { diff --git a/src/gamedata/resourcefiles/file_wad.cpp b/src/gamedata/resourcefiles/file_wad.cpp index f34138e62..d3aab7d5e 100644 --- a/src/gamedata/resourcefiles/file_wad.cpp +++ b/src/gamedata/resourcefiles/file_wad.cpp @@ -33,6 +33,7 @@ ** */ +#include #include "resourcefile.h" #include "v_text.h" #include "w_wad.h" diff --git a/src/gamedata/stringtable.cpp b/src/gamedata/stringtable.cpp index a892992e1..8d3344a0e 100644 --- a/src/gamedata/stringtable.cpp +++ b/src/gamedata/stringtable.cpp @@ -354,7 +354,7 @@ void FStringTable::InsertString(int langid, FName label, const FString &string) Printf("Bad macro in %s : %s\n", strlangid, label.GetChars()); break; } - FString macroname(string.GetChars() + index + 2, endindex - index - 2); + FString macroname(te.strings[0].GetChars() + index + 2, endindex - index - 2); FStringf lookupstr("%s/%s", strlangid, macroname.GetChars()); FStringf replacee("@[%s]", macroname.GetChars()); FName lookupname(lookupstr, true); diff --git a/src/intermission/intermission_parse.cpp b/src/intermission/intermission_parse.cpp index bc1ccb7ba..5c4e0cedc 100644 --- a/src/intermission/intermission_parse.cpp +++ b/src/intermission/intermission_parse.cpp @@ -34,6 +34,7 @@ */ +#include #include "intermission/intermission.h" #include "g_level.h" #include "w_wad.h" diff --git a/src/menu/menu.h b/src/menu/menu.h index 43a96f812..c2c54862a 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -363,4 +363,6 @@ DMenuItemBase * CreateListMenuItemPatch(double x, double y, int height, int hotk DMenuItemBase * CreateListMenuItemText(double x, double y, int height, int hotkey, const char *text, FFont *font, PalEntry color1, PalEntry color2, FName command, int param); DMenuItemBase * CreateOptionMenuItemCommand(const char *label, FName cmd, bool centered = false); +void UpdateVRModes(bool considerQuadBuffered=true); + #endif diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index e3df4fbf0..a0113de27 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -1724,3 +1724,31 @@ fail: } } } + + +#ifdef _WIN32 +EXTERN_CVAR(Bool, vr_enable_quadbuffered) +#endif + +void UpdateVRModes(bool considerQuadBuffered) +{ + FOptionValues ** pVRModes = OptionValues.CheckKey("VRMode"); + if (pVRModes == nullptr) return; + + TArray & vals = (*pVRModes)->mValues; + TArray filteredValues; + int cnt = vals.Size(); + for (int i = 0; i < cnt; ++i) { + auto const & mode = vals[i]; + if (mode.Value == 7) { // Quad-buffered stereo +#ifdef _WIN32 + if (!vr_enable_quadbuffered) continue; +#else + continue; // Remove quad-buffered option on Mac and Linux +#endif + if (!considerQuadBuffered) continue; // Probably no compatible screen mode was found + } + filteredValues.Push(mode); + } + vals = filteredValues; +} diff --git a/src/posix/cocoa/i_system.mm b/src/posix/cocoa/i_system.mm index e40202fc3..8ef18d985 100644 --- a/src/posix/cocoa/i_system.mm +++ b/src/posix/cocoa/i_system.mm @@ -180,7 +180,7 @@ void I_Error (const char *error, ...) va_start(argptr, error); - vsprintf (errortext, error, argptr); + myvsnprintf (errortext, MAX_ERRORTEXT, error, argptr); va_end (argptr); throw CRecoverableError(errortext); } diff --git a/src/posix/sdl/i_system.cpp b/src/posix/sdl/i_system.cpp index 9303fc6eb..a9c94ba1f 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -229,7 +229,7 @@ void I_Error (const char *error, ...) va_start(argptr, error); - vsprintf (errortext, error, argptr); + myvsnprintf (errortext, MAX_ERRORTEXT, error, argptr); va_end (argptr); throw CRecoverableError(errortext); } diff --git a/src/r_data/voxels.cpp b/src/r_data/voxels.cpp index a9eb9eb68..8017f2c4d 100644 --- a/src/r_data/voxels.cpp +++ b/src/r_data/voxels.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include "m_swap.h" #include "m_argv.h" diff --git a/src/rendering/gl/renderer/gl_postprocess.cpp b/src/rendering/gl/renderer/gl_postprocess.cpp index 6b8c5c2e6..aa7d7cb19 100644 --- a/src/rendering/gl/renderer/gl_postprocess.cpp +++ b/src/rendering/gl/renderer/gl_postprocess.cpp @@ -121,20 +121,11 @@ void FGLRenderer::BlurScene(float gameinfobluramount) mBuffers->UpdateEffectTextures(); auto vrmode = VRMode::GetVRMode(true); - if (vrmode->mEyeCount == 1) + int eyeCount = vrmode->mEyeCount; + for (int i = 0; i < eyeCount; ++i) { mBuffers->RenderEffect("BlurScene"); - } - else - { - for (int eye_ix = 0; eye_ix < vrmode->mEyeCount; ++eye_ix) - { - FGLDebug::PushGroup("EyeBlur"); - mBuffers->BlitFromEyeTexture(eye_ix); - mBuffers->RenderEffect("BlurScene"); - mBuffers->BlitToEyeTexture(eye_ix); - FGLDebug::PopGroup(); - } + if (eyeCount - i > 1) mBuffers->NextEye(eyeCount); } } @@ -159,13 +150,12 @@ void FGLRenderer::Flush() else { // Render 2D to eye textures - for (int eye_ix = 0; eye_ix < vrmode->mEyeCount; ++eye_ix) + int eyeCount = vrmode->mEyeCount; + for (int eye_ix = 0; eye_ix < eyeCount; ++eye_ix) { - FGLDebug::PushGroup("Eye2D"); - mBuffers->BlitFromEyeTexture(eye_ix); screen->Draw2D(); - mBuffers->BlitToEyeTexture(eye_ix); - FGLDebug::PopGroup(); + if (eyeCount - eye_ix > 1) + mBuffers->NextEye(eyeCount); } screen->Clear2D(); diff --git a/src/rendering/gl/renderer/gl_renderbuffers.cpp b/src/rendering/gl/renderer/gl_renderbuffers.cpp index 4dd9f95be..73c33e961 100644 --- a/src/rendering/gl/renderer/gl_renderbuffers.cpp +++ b/src/rendering/gl/renderer/gl_renderbuffers.cpp @@ -532,7 +532,7 @@ void FGLRenderBuffers::BlitSceneToTexture() // //========================================================================== -void FGLRenderBuffers::BlitToEyeTexture(int eye) +void FGLRenderBuffers::BlitToEyeTexture(int eye, bool allowInvalidate) { CreateEyeBuffers(eye); @@ -540,7 +540,7 @@ void FGLRenderBuffers::BlitToEyeTexture(int eye) glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mEyeFBs[eye].handle); glBlitFramebuffer(0, 0, mWidth, mHeight, 0, 0, mWidth, mHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST); - if ((gl.flags & RFL_INVALIDATE_BUFFER) != 0) + if ((gl.flags & RFL_INVALIDATE_BUFFER) != 0 && allowInvalidate) { GLenum attachments[2] = { GL_COLOR_ATTACHMENT0, GL_DEPTH_STENCIL_ATTACHMENT }; glInvalidateFramebuffer(GL_READ_FRAMEBUFFER, 2, attachments); @@ -552,7 +552,7 @@ void FGLRenderBuffers::BlitToEyeTexture(int eye) void FGLRenderBuffers::BlitFromEyeTexture(int eye) { - CreateEyeBuffers(eye); + if (mEyeFBs.Size() <= unsigned(eye)) return; glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mPipelineFB[mCurrentPipelineTexture].handle); glBindFramebuffer(GL_READ_FRAMEBUFFER, mEyeFBs[eye].handle); @@ -1002,4 +1002,17 @@ void FGLRenderBuffers::RenderEffect(const FString &name) FGLDebug::PopGroup(); } -} \ No newline at end of file + +// Store the current stereo 3D eye buffer, and Load the next one + +int FGLRenderBuffers::NextEye(int eyeCount) +{ + int nextEye = (mCurrentEye + 1) % eyeCount; + if (nextEye == mCurrentEye) return mCurrentEye; + BlitToEyeTexture(mCurrentEye); + mCurrentEye = nextEye; + BlitFromEyeTexture(mCurrentEye); + return mCurrentEye; +} + +} // namespace OpenGLRenderer \ No newline at end of file diff --git a/src/rendering/gl/renderer/gl_renderbuffers.h b/src/rendering/gl/renderer/gl_renderbuffers.h index b4b018516..4b66e7569 100644 --- a/src/rendering/gl/renderer/gl_renderbuffers.h +++ b/src/rendering/gl/renderer/gl_renderbuffers.h @@ -87,9 +87,11 @@ public: void BindOutputFB(); - void BlitToEyeTexture(int eye); + void BlitToEyeTexture(int eye, bool allowInvalidate=true); void BlitFromEyeTexture(int eye); void BindEyeTexture(int eye, int texunit); + int NextEye(int eyeCount); + int & CurrentEye() { return mCurrentEye; } void BindDitherTexture(int texunit); @@ -156,6 +158,7 @@ private: // Eye buffers TArray mEyeTextures; TArray mEyeFBs; + int mCurrentEye = 0; // Shadow map texture PPGLTexture mShadowMapTexture; diff --git a/src/rendering/gl/renderer/gl_scene.cpp b/src/rendering/gl/renderer/gl_scene.cpp index c62203be9..764355d00 100644 --- a/src/rendering/gl/renderer/gl_scene.cpp +++ b/src/rendering/gl/renderer/gl_scene.cpp @@ -163,9 +163,11 @@ sector_t * FGLRenderer::RenderViewpoint (FRenderViewpoint &mainvp, AActor * came // Render (potentially) multiple views for stereo 3d // Fixme. The view offsetting should be done with a static table and not require setup of the entire render state for the mode. auto vrmode = VRMode::GetVRMode(mainview && toscreen); - for (int eye_ix = 0; eye_ix < vrmode->mEyeCount; ++eye_ix) + const int eyeCount = vrmode->mEyeCount; + mBuffers->CurrentEye() = 0; // always begin at zero, in case eye count changed + for (int eye_ix = 0; eye_ix < eyeCount; ++eye_ix) { - const auto &eye = vrmode->mEyes[eye_ix]; + const auto &eye = vrmode->mEyes[mBuffers->CurrentEye()]; screen->SetViewportRects(bounds); if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao @@ -218,8 +220,8 @@ sector_t * FGLRenderer::RenderViewpoint (FRenderViewpoint &mainvp, AActor * came PostProcess.Unclock(); } di->EndDrawInfo(); - if (vrmode->mEyeCount > 1) - mBuffers->BlitToEyeTexture(eye_ix); + if (eyeCount - eye_ix > 1) + mBuffers->NextEye(eyeCount); } return mainvp.sector; diff --git a/src/rendering/gl/renderer/gl_stereo3d.cpp b/src/rendering/gl/renderer/gl_stereo3d.cpp index 6baaa801f..08cb4fbef 100644 --- a/src/rendering/gl/renderer/gl_stereo3d.cpp +++ b/src/rendering/gl/renderer/gl_stereo3d.cpp @@ -34,6 +34,7 @@ #include "gl/system/gl_framebuffer.h" #include "hwrenderer/postprocessing/hw_presentshader.h" #include "hwrenderer/postprocessing/hw_present3dRowshader.h" +#include "menu/menu.h" EXTERN_CVAR(Int, vr_mode) EXTERN_CVAR(Float, vid_saturation) @@ -283,6 +284,8 @@ bool FGLRenderer::QuadStereoCheckInitialRenderContextState() // Now check whether this context supports hardware stereo glGetBooleanv(GL_STEREO, &supportsStereo); bQuadStereoSupported = supportsStereo && supportsBuffered; + if (! bQuadStereoSupported) + UpdateVRModes(false); } } return bQuadStereoSupported; @@ -324,6 +327,12 @@ void FGLRenderer::PresentQuadStereo() void FGLRenderer::PresentStereo() { + auto vrmode = VRMode::GetVRMode(true); + const int eyeCount = vrmode->mEyeCount; + // Don't invalidate the bound framebuffer (..., false) + if (eyeCount > 1) + mBuffers->BlitToEyeTexture(mBuffers->CurrentEye(), false); + switch (vr_mode) { default: diff --git a/src/sound/timidity/timidity.cpp b/src/sound/timidity/timidity.cpp index b100a1e5d..22ec94d97 100644 --- a/src/sound/timidity/timidity.cpp +++ b/src/sound/timidity/timidity.cpp @@ -828,7 +828,7 @@ void cmsg(int type, int verbosity_level, const char *fmt, ...) char buf[1024]; va_list args; va_start(args, fmt); - vsprintf(buf, fmt, args); + myvsnprintf(buf, sizeof buf, fmt, args); va_end(args); I_DebugPrint(buf); #endif diff --git a/src/v_video.h b/src/v_video.h index b4ecdeb9c..b56c4e727 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -361,7 +361,6 @@ public: float glslversion = 0; // This is here so that the differences between old OpenGL and new OpenGL/Vulkan can be handled by platform independent code. int instack[2] = { 0,0 }; // this is globally maintained state for portal recursion avoidance. int stencilValue = 0; // Global stencil test value - bool enable_quadbuffered = false; // Quad-buffered stereo available? unsigned int uniformblockalignment = 256; // Hardware dependent uniform buffer alignment. unsigned int maxuniformblock = 65536; const char *gl_vendorstring; // On OpenGL (not Vulkan) we have to account for some issues with Intel. diff --git a/src/win32/gl_sysfb.cpp b/src/win32/gl_sysfb.cpp index bc704bd69..3ac1d7cf7 100644 --- a/src/win32/gl_sysfb.cpp +++ b/src/win32/gl_sysfb.cpp @@ -56,14 +56,6 @@ extern HWND Window; PFNWGLSWAPINTERVALEXTPROC myWglSwapIntervalExtProc; -// For broadest GL compatibility, require user to explicitly enable quad-buffered stereo mode. -// Setting vr_enable_quadbuffered_stereo does not automatically invoke quad-buffered stereo, -// but makes it possible for subsequent "vr_mode 7" to invoke quad-buffered stereo -CUSTOM_CVAR(Bool, vr_enable_quadbuffered, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) -{ - Printf("You must restart " GAMENAME " to switch quad stereo mode\n"); -} - //========================================================================== // // Windows framebuffer @@ -111,7 +103,6 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void *hMonitor, bool fullscreen) : Syst } } ReleaseDC(Window, hDC); - enable_quadbuffered = vr_enable_quadbuffered; } //========================================================================== diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index 4918910ce..689e8a2b3 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -433,7 +433,7 @@ void Writef (HANDLE file, const char *format, ...) DWORD len; va_start (args, format); - len = vsprintf (buffer, format, args); + len = myvsnprintf (buffer, sizeof buffer, format, args); va_end (args); WriteFile (file, buffer, len, &len, NULL); } diff --git a/src/win32/win32basevideo.cpp b/src/win32/win32basevideo.cpp index 090b0bb1d..2d8ee7a2f 100644 --- a/src/win32/win32basevideo.cpp +++ b/src/win32/win32basevideo.cpp @@ -55,8 +55,6 @@ CVAR(Int, vid_adapter, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) -EXTERN_CVAR(Bool, vr_enable_quadbuffered) - //========================================================================== // // diff --git a/src/win32/win32glvideo.cpp b/src/win32/win32glvideo.cpp index 9104e546b..e283c700c 100644 --- a/src/win32/win32glvideo.cpp +++ b/src/win32/win32glvideo.cpp @@ -54,7 +54,6 @@ #include "gl/system/gl_framebuffer.h" EXTERN_CVAR(Int, vid_adapter) -EXTERN_CVAR(Bool, vr_enable_quadbuffered) EXTERN_CVAR(Bool, vid_hdr) CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) @@ -62,6 +61,14 @@ CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI Printf("This won't take effect until " GAMENAME " is restarted.\n"); } +// For broadest GL compatibility, require user to explicitly enable quad-buffered stereo mode. +// Setting vr_enable_quadbuffered_stereo does not automatically invoke quad-buffered stereo, +// but makes it possible for subsequent "vr_mode 7" to invoke quad-buffered stereo +CUSTOM_CVAR(Bool, vr_enable_quadbuffered, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) +{ + Printf("You must restart " GAMENAME " to switch quad stereo mode\n"); +} + extern bool vid_hdr_active; // these get used before GLEW is initialized so we have to use separate pointers with different names diff --git a/wadsrc/static/fonts/consolefont/0400.png b/wadsrc/static/fonts/consolefont/0400.png index d3f3786ee..a1f00c3d7 100644 Binary files a/wadsrc/static/fonts/consolefont/0400.png and b/wadsrc/static/fonts/consolefont/0400.png differ diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 0c76ada36..c9e7da9f1 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1986,6 +1986,7 @@ MISCMNU_ALLCHEATS = "Enable cheats from all games"; MISCMNU_ENABLEAUTOSAVES = "Enable autosaves"; MISCMNU_AUTOSAVECOUNT = "Number of autosaves"; MISCMNU_SAVELOADCONFIRMATION = "Save/Load confirmation"; +MISCMNU_ENABLESCRIPTSCREENSHOTS = "Enable making screenshots by scripts"; MISCMNU_DEHLOAD = "Load *.deh/*.bex lumps"; MISCMNU_CACHENODES = "Cache nodes"; MISCMNU_CACHETIME = "Time threshold for node caching"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 7463f9d0f..403123db7 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1131,6 +1131,7 @@ OptionMenu "MiscOptions" protected Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff" Slider "$MISCMNU_AUTOSAVECOUNT", "autosavecount", 1, 20, 1, 0 Option "$MISCMNU_DEHLOAD", "dehload", "dehopt" + Option "$MISCMNU_ENABLESCRIPTSCREENSHOTS", "enablescriptscreenshot", "OnOff" Option "$MISCMNU_INTERSCROLL", "nointerscrollabort", "OffOn" StaticText " " Option "$MISCMNU_CACHENODES", "gl_cachenodes", "OnOff" @@ -1755,7 +1756,7 @@ OptionString SpeakerModes OptionString Resamplers { "NoInterp", "$OPTSTR_NOINTERPOLATION" - "Linear", "$OPTVAL_LINEAR" + "Linear", "$OPTVAL_LINEAR_1" "Cubic", "$OPTVAL_CUBIC" "Spline", "$OPTSTR_SPLINE" } @@ -1893,7 +1894,7 @@ OptionValue ModReplayers OptionValue ModQuality { 0.0, "$OPTVAL_ALIASING" - 1.0, "$OPTVAL_LINEAR" + 1.0, "$OPTVAL_LINEAR_1" 2.0, "$OPTVAL_CUBIC" 3.0, "$OPTVAL_BLEP" // Band-limited step 4.0, "$OPTVAL_LINEARSLOW" @@ -2224,7 +2225,7 @@ OptionValue "FilterModes" 1, "$OPTVAL_NONENEARESTMIPMAP" 5, "$OPTVAL_NONELINEARMIPMAP" 6, "$OPTVAL_NONETRILINEAR" - 2, "$OPTVAL_LINEAR" + 2, "$OPTVAL_LINEAR_2" 3, "$OPTVAL_BILINEAR" 4, "$OPTVAL_TRILINEAR" } @@ -2235,7 +2236,7 @@ OptionValue "TonemapModes" 1, "$OPTVAL_UNCHARTED2" 2, "$OPTVAL_HEJLDAWSON" 3, "$OPTVAL_REINHARD" - 4, "$OPTVAL_LINEAR" + 4, "$OPTVAL_LINEAR_3" 5, "$OPTVAL_PALETTE" } diff --git a/wadsrc/static/zscript/actors/actor.zs b/wadsrc/static/zscript/actors/actor.zs index 7e10aaf23..4fd3d46e3 100644 --- a/wadsrc/static/zscript/actors/actor.zs +++ b/wadsrc/static/zscript/actors/actor.zs @@ -460,6 +460,15 @@ class Actor : Thinker native native void Substitute(Actor replacement); native ui void DisplayNameTag(); + // Called by inventory items to see if this actor is capable of touching them. + // If true, the item will attempt to be picked up. Useful for things like + // allowing morphs to pick up limited items such as keys while preventing + // them from picking other items up. + virtual bool CanTouchItem(Inventory item) + { + return true; + } + // Called by PIT_CheckThing to check if two actors actually can collide. virtual bool CanCollideWith(Actor other, bool passive) { diff --git a/wadsrc/static/zscript/actors/inventory/inventory.zs b/wadsrc/static/zscript/actors/inventory/inventory.zs index b6dcea9a6..e8b984d02 100644 --- a/wadsrc/static/zscript/actors/inventory/inventory.zs +++ b/wadsrc/static/zscript/actors/inventory/inventory.zs @@ -768,6 +768,9 @@ class Inventory : Actor bool localview = toucher.CheckLocalView(); + if (!toucher.CanTouchItem(self)) + return; + bool res; [res, toucher] = CallTryPickup(toucher); if (!res) return; diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index e5619b0d7..f7b36ab03 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -711,6 +711,8 @@ struct LevelLocals native native play int ExecuteSpecial(int special, Actor activator, line linedef, bool lineside, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0, int arg5 = 0); native void GiveSecret(Actor activator, bool printmsg = true, bool playsound = true); native void StartSlideshow(Name whichone = 'none'); + native static void MakeScreenShot(); + native static void MakeAutoSave(); native void WorldDone(); deprecated("3.8") static void RemoveAllBots(bool fromlist) { /* intentionally left as no-op. */ } native ui Vector2 GetAutomapPosition(); diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0150.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0150.lmp new file mode 100644 index 000000000..171243b99 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0170.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0170.lmp new file mode 100644 index 000000000..caeb814ac Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigfont/040D.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/040D.lmp new file mode 100644 index 000000000..7a1953dcc Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigfont/040D.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0150.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0150.lmp new file mode 100644 index 000000000..d0b7ca0b5 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0151.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0151.lmp new file mode 100644 index 000000000..46ae32842 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0151.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0170.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0170.lmp new file mode 100644 index 000000000..eae50e3a2 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0171.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0171.lmp new file mode 100644 index 000000000..f16473edf Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/0171.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/040D.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/040D.lmp new file mode 100644 index 000000000..877ef468a Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/040D.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/bigupper/045D.lmp b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/045D.lmp new file mode 100644 index 000000000..d3091f1e4 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/bigupper/045D.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0150.lmp b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0150.lmp new file mode 100644 index 000000000..ef9d7a9c9 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0170.lmp b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0170.lmp new file mode 100644 index 000000000..286bb67ca Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/040D.lmp b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/040D.lmp new file mode 100644 index 000000000..291a02ac2 Binary files /dev/null and b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/040D.lmp differ diff --git a/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0419.lmp b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0419.lmp index b22264c4a..dc99c3e31 100644 Binary files a/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0419.lmp and b/wadsrc_extra/static/filter/game-doom/fonts/defsmallfont/0419.lmp differ diff --git a/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0150.lmp b/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0150.lmp new file mode 100644 index 000000000..f6cd1266b Binary files /dev/null and b/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0170.lmp b/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0170.lmp new file mode 100644 index 000000000..514bda061 Binary files /dev/null and b/wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0150.lmp b/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0150.lmp new file mode 100644 index 000000000..939a1cbf0 Binary files /dev/null and b/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0170.lmp b/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0170.lmp new file mode 100644 index 000000000..bba7182b0 Binary files /dev/null and b/wadsrc_extra/static/filter/game-heretic/fonts/defsmallfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0150.lmp b/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0150.lmp new file mode 100644 index 000000000..56403ea01 Binary files /dev/null and b/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0170.lmp b/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0170.lmp new file mode 100644 index 000000000..c37ddea98 Binary files /dev/null and b/wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0150.lmp b/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0150.lmp new file mode 100644 index 000000000..f50c6baed Binary files /dev/null and b/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0170.lmp b/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0170.lmp new file mode 100644 index 000000000..2645b6c75 Binary files /dev/null and b/wadsrc_extra/static/filter/game-hexen/fonts/defsmallfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0150.lmp b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0150.lmp new file mode 100644 index 000000000..e077f255b Binary files /dev/null and b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0170.lmp b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0170.lmp new file mode 100644 index 000000000..1bcdb1e73 Binary files /dev/null and b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/bigfont/font.inf b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/font.inf new file mode 100644 index 000000000..2f71f387c --- /dev/null +++ b/wadsrc_extra/static/filter/game-strife/fonts/bigfont/font.inf @@ -0,0 +1 @@ +Kerning -1 diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp new file mode 100644 index 000000000..3d2e0b7da Binary files /dev/null and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp new file mode 100644 index 000000000..826cb05ae Binary files /dev/null and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp differ