From 6f7885210ba804d6f2ad6f5e8c03467ad983fc82 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 26 Nov 2013 17:58:55 -0500 Subject: [PATCH 1/7] - Fixed: Some setups require the dynamic linking library to be linked explicitly, so specify it when using DYN_FLUIDSYNTH --- src/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 54a72aeae..4ced0062f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -506,12 +506,14 @@ message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" ) set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${FMOD_LIBRARY}" ) include_directories( "${ZLIB_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" ) -if( FLUIDSYNTH_FOUND ) - if( NOT DYN_FLUIDSYNTH) - set( ZDOOM_LIBS ${ZDOOM_LIBS} "${FLUIDSYNTH_LIBRARIES}" ) - include_directories( "${FLUIDSYNTH_INCLUDE_DIR}" ) - endif( NOT DYN_FLUIDSYNTH ) -endif( FLUIDSYNTH_FOUND ) +if( NOT DYN_FLUIDSYNTH) + if( FLUIDSYNTH_FOUND ) + set( ZDOOM_LIBS ${ZDOOM_LIBS} "${FLUIDSYNTH_LIBRARIES}" ) + include_directories( "${FLUIDSYNTH_INCLUDE_DIR}" ) + endif( FLUIDSYNTH_FOUND ) +else( NOT DYN_FLUIDSYNTH ) + set( ZDOOM_LIBS ${ZDOOM_LIBS} ${CMAKE_DL_LIBS} ) +endif( NOT DYN_FLUIDSYNTH ) # Start defining source files for ZDoom From e5d7077d743073c5780087ee1d0b3082674f5f5d Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 15:09:12 -0500 Subject: [PATCH 2/7] - Fixed: Shareware games couldn't bother with the actor has no frames errors since we don't load mods. - Fixed: Heretic shareware used a different border for the statusbar. --- src/p_mobj.cpp | 6 ++++++ wadsrc/static/mapinfo/hereticsw.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 03bbb4d8d..37110e388 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4639,6 +4639,12 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position) if (defaults->SpawnState == NULL || sprites[defaults->SpawnState->sprite].numframes == 0) { + // We don't load mods for shareware games so we'll just ignore + // missing actors. Heretic needs this since the shareware includes + // the retail weapons in Deathmatch. + if (gameinfo.flags & GI_SHAREWARE) + return NULL; + Printf ("%s at (%i, %i) has no frames\n", i->TypeName.GetChars(), mthing->x>>FRACBITS, mthing->y>>FRACBITS); i = PClass::FindClass("Unknown"); diff --git a/wadsrc/static/mapinfo/hereticsw.txt b/wadsrc/static/mapinfo/hereticsw.txt index 89b6c0762..5a37ccbef 100644 --- a/wadsrc/static/mapinfo/hereticsw.txt +++ b/wadsrc/static/mapinfo/hereticsw.txt @@ -4,5 +4,6 @@ gameinfo { finalepage = "ORDER" infopage = "ORDER", "HELP1", "HELP2", "CREDIT" + borderflat = "FLOOR04" } From 7af8b78b9fa5ec066cc6ed7a01d041850e36b07f Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 15:18:35 -0500 Subject: [PATCH 3/7] - Applied Chilly's patch to fix excessive name change notifications. --- src/d_netinfo.cpp | 2 +- src/menu/playermenu.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 12fb187ae..d2dbc862d 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -861,7 +861,7 @@ void D_ReadUserInfoStrings (int pnum, BYTE **stream, bool update) val.String = CleanseString(value.LockBuffer()); (*cvar_ptr)->SetGenericRep(val, CVAR_String); value.UnlockBuffer(); - if (keyname == NAME_Name && update && oldname != value) + if (keyname == NAME_Name && update && oldname.Compare (value)) { Printf("%s is now known as %s\n", oldname.GetChars(), value.GetChars()); } diff --git a/src/menu/playermenu.cpp b/src/menu/playermenu.cpp index 641b0699f..58b08fc38 100644 --- a/src/menu/playermenu.cpp +++ b/src/menu/playermenu.cpp @@ -996,7 +996,10 @@ bool DPlayerMenu::MenuEvent (int mkey, bool fromcontroller) // item specific handling comes here case NAME_Playerbox: - PlayerNameChanged(li); + if (mkey == MKEY_Input) + { + PlayerNameChanged(li); + } break; case NAME_Team: From ebcd0e9c49fc7eb4b284e623244fffb5417c638b Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 15:40:48 -0500 Subject: [PATCH 4/7] - Removed redundant expression in R_FindPlane. --- src/r_plane.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 986d99203..be650bf91 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -607,8 +607,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl // same visplane, then only the floor sky will be drawn. plane.c = height.c; plane.ic = height.ic; - isskybox = skybox != NULL && !skybox->bInSkybox && - (skybox->bAlways || picnum == skyflatnum); + isskybox = skybox != NULL && !skybox->bInSkybox; } else if (skybox != NULL && skybox->bAlways && !skybox->bInSkybox) { From 919b9283005a7431cc8c78aabaa1fe0181f6f275 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 15:45:11 -0500 Subject: [PATCH 5/7] - Fixed: Taking an item in a Strife dialog didn't account for items that have the keep depleted flag set. --- src/p_conversation.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 6493bca36..09f2d49d6 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -655,7 +655,14 @@ static void TakeStrifeItem (player_t *player, const PClass *itemtype, int amount item->Amount -= amount; if (item->Amount <= 0) { - item->Destroy (); + if (item->ItemFlags & IF_KEEPDEPLETED) + { + item->Amount = 0; + } + else + { + item->Destroy (); + } } } } From 75fd674d31c53aa68a2e84ad74c0b2310069d084 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 16:20:52 -0500 Subject: [PATCH 6/7] - If the player doesn't have ` bound to open the console, don't close it with that key. --- src/c_console.cpp | 7 +++++++ src/doomdef.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/c_console.cpp b/src/c_console.cpp index e5d3d97ab..e20229605 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -41,6 +41,7 @@ #include "version.h" #include "g_game.h" +#include "c_bind.h" #include "c_console.h" #include "c_cvars.h" #include "c_dispatch.h" @@ -1698,6 +1699,12 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len) break; case '`': + // Check to see if we have ` bound to the console before accepting + // it as a way to close the console. + if (Bindings.GetBinding(KEY_GRAVE).CompareNoCase("toggleconsole")) + { + break; + } case GK_ESCAPE: // Close console and clear command line. But if we're in the // fullscreen console mode, there's nothing to fall back on diff --git a/src/doomdef.h b/src/doomdef.h index 675923b4a..e08c3044d 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -130,6 +130,7 @@ enum ESkillLevels #define KEY_F10 0x44 // DIK_F10 #define KEY_F11 0x57 // DIK_F11 #define KEY_F12 0x58 // DIK_F12 +#define KEY_GRAVE 0x29 // DIK_GRAVE #define KEY_BACKSPACE 0x0e // DIK_BACK From 811a75ebf659fc81969126b8bd1ece82a3e23371 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 18 Jan 2014 17:54:46 -0500 Subject: [PATCH 7/7] - Minor adjustments to SDL joystick code so that all axes have at least a small deadzone so that button mapping works properly. --- src/sdl/i_joystick.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sdl/i_joystick.cpp b/src/sdl/i_joystick.cpp index 48ae0e385..7a529861f 100644 --- a/src/sdl/i_joystick.cpp +++ b/src/sdl/i_joystick.cpp @@ -1,8 +1,12 @@ #include #include "doomdef.h" +#include "templates.h" #include "m_joy.h" +// Very small deadzone so that floating point magic doesn't happen +#define MIN_DEADZONE 0.000001f + class SDLInputJoystick: public IJoystickConfig { public: @@ -65,7 +69,7 @@ public: void SetAxisDeadZone(int axis, float zone) { - Axes[axis].DeadZone = zone; + Axes[axis].DeadZone = clamp(zone, MIN_DEADZONE, 1.f); } void SetAxisMap(int axis, EJoyAxis gameaxis) { @@ -83,7 +87,7 @@ public: } bool IsAxisDeadZoneDefault(int axis) { - return Axes[axis].DeadZone == 0.0f; + return Axes[axis].DeadZone <= MIN_DEADZONE; } bool IsAxisMapDefault(int axis) { @@ -105,7 +109,7 @@ public: info.Name.Format("Axis %d", i+1); else info.Name.Format("Hat %d (%c)", (i-NumAxes)/2 + 1, (i-NumAxes)%2 == 0 ? 'x' : 'y'); - info.DeadZone = 0.0f; + info.DeadZone = MIN_DEADZONE; info.Multiplier = 1.0f; info.Value = 0.0; info.ButtonValue = 0; @@ -141,7 +145,7 @@ public: { buttonstate = 0; - Axes[i].Value = SDL_JoystickGetAxis(Device, i)/32768.0; + Axes[i].Value = SDL_JoystickGetAxis(Device, i)/32767.0; Axes[i].Value = Joy_RemoveDeadZone(Axes[i].Value, Axes[i].DeadZone, &buttonstate); // Map button to axis