diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 344117052..109d34380 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -1072,6 +1072,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum, for (bssize_t i=0; i= 0) { 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; } diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 0872d7868..b22410ad9 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(); diff --git a/source/games/duke/src/2d_r.cpp b/source/games/duke/src/2d_r.cpp index 817d03a4d..d718db4f0 100644 --- a/source/games/duke/src/2d_r.cpp +++ b/source/games/duke/src/2d_r.cpp @@ -386,9 +386,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();