From 8e53489487b7d1d82ad722136e011e0741370c6f Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 22 Apr 2021 18:53:14 +1000 Subject: [PATCH 1/4] - Remove some leftover stuff from `gamecontrol.h`. --- source/core/gamecontrol.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 1316ed8d4..fa2cab18a 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -28,27 +28,6 @@ extern int g_nextskill; extern FMemArena dump; // this is for memory blocks than cannot be deallocated without some huge effort. Put them in here so that they do not register on shutdown. -int CONFIG_Init(); - -// I am not sure if anything below will survive for long... - -#define MAXMOUSEAXES 2 -#define MAXMOUSEDIGITAL (MAXMOUSEAXES*2) - -// default mouse scale -#define DEFAULTMOUSEANALOGUESCALE 65536 - -// default joystick settings - -#define DEFAULTJOYSTICKANALOGUESCALE 65536 -#define DEFAULTJOYSTICKANALOGUEDEAD 1000 -#define DEFAULTJOYSTICKANALOGUESATURATE 9500 - - -void CONFIG_SetupJoystick(void); - -void CONFIG_SetGameControllerDefaultsClear(); - extern FStringCVar* const CombatMacros[]; void CONFIG_ReadCombatMacros(); From bf23d6c3b012f3a5ab9147c76342447200433bf4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 23 Apr 2021 14:46:25 +0200 Subject: [PATCH 2/4] - corrected level number for RR's summary screen. --- source/games/duke/src/2d_r.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/2d_r.cpp b/source/games/duke/src/2d_r.cpp index 25d52ac8a..c59c28bb6 100644 --- a/source/games/duke/src/2d_r.cpp +++ b/source/games/duke/src/2d_r.cpp @@ -385,9 +385,9 @@ public: if (currentLevel->flags & MI_USERMAP) gfx_offset = BONUSPIC01; else if (!isRRRA()) - gfx_offset = BONUSPIC01 + clamp((currentLevel->levelNumber / 100) * 7 + (currentLevel->levelNumber % 100), 0, 13); + gfx_offset = BONUSPIC01 + clamp((currentLevel->levelNumber / 1000) * 7 + (currentLevel->levelNumber % 1000), 0, 13); else - gfx_offset = LEVELMAP01 + clamp((currentLevel->levelNumber / 100) * 7 + (currentLevel->levelNumber % 100), 0, 13); + gfx_offset = LEVELMAP01 + clamp((currentLevel->levelNumber / 1000) * 7 + (currentLevel->levelNumber % 1000), 0, 13); lastmapname = currentLevel->DisplayName(); From 3ad4a869c108fdbeb3db40cd2cdb11860b76f3b1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 23 Apr 2021 20:11:46 +0200 Subject: [PATCH 3/4] - handle the case that a deleted sprite has inserted its bogus sector reference into the clip list. We got one report of Blood crashing on this. --- source/build/src/clip.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index bedbf0eab..ece2c7b9d 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -1088,6 +1088,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum, for (bssize_t i=0; i= 0) { From dca964444b8bd6d6e80dfc4fdb152336c7904e91 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 25 Apr 2021 11:28:34 +0200 Subject: [PATCH 4/4] - backend fixes from GZDoom. --- source/common/console/c_bind.cpp | 5 +++++ source/common/filesystem/filesystem.cpp | 1 - source/common/rendering/vulkan/textures/vk_hwtexture.cpp | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/common/console/c_bind.cpp b/source/common/console/c_bind.cpp index fa94d1e72..b390dc122 100644 --- a/source/common/console/c_bind.cpp +++ b/source/common/console/c_bind.cpp @@ -460,6 +460,11 @@ int FKeyBindings::GetKeysForCommand (const char *cmd, int *first, int *second) *first = *second = c = i = 0; + if (cmd[0] == '\0') + { + return 0; + } + while (i < NUM_KEYS && c < 2) { if (stricmp (cmd, Binds[i]) == 0) diff --git a/source/common/filesystem/filesystem.cpp b/source/common/filesystem/filesystem.cpp index 563ace705..d700679f0 100644 --- a/source/common/filesystem/filesystem.cpp +++ b/source/common/filesystem/filesystem.cpp @@ -1534,7 +1534,6 @@ bool FileSystem::CreatePathlessCopy(const char *name, int id, int /*flags*/) auto oldlump = FileInfo[lump]; int slash = oldlump.longName.LastIndexOf('/'); - // Note: already pathless entries must be duplica if (slash == -1) { diff --git a/source/common/rendering/vulkan/textures/vk_hwtexture.cpp b/source/common/rendering/vulkan/textures/vk_hwtexture.cpp index 6178549ab..4360fc06e 100644 --- a/source/common/rendering/vulkan/textures/vk_hwtexture.cpp +++ b/source/common/rendering/vulkan/textures/vk_hwtexture.cpp @@ -270,7 +270,9 @@ uint8_t *VkHardwareTexture::MapBuffer() unsigned int VkHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name) { - CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap); + // CreateTexture is used by the software renderer to create a screen output but without any screen data. + if (buffer) + CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap); return 0; }