From 6f7885210ba804d6f2ad6f5e8c03467ad983fc82 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 26 Nov 2013 17:58:55 -0500 Subject: [PATCH 01/15] - 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 02/15] - 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 03/15] - 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 04/15] - 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 05/15] - 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 06/15] - 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 07/15] - 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 From 0442c51d54d351ef0f497191be91c7410cc96e2c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 21 Jan 2014 19:41:29 -0600 Subject: [PATCH 08/15] Fix building with old VC++ 2005 projects. - Also needed to comment out strtod declarations in gdtoaimp.h and gdtoa.h --- gdtoa/gdtoa.h | 4 +- gdtoa/gdtoa.vcproj | 1216 ++++++++++++++++++++++++++++++++++++++++++++ gdtoa/gdtoaimp.h | 2 +- zdoom.vcproj | 24 +- 4 files changed, 1231 insertions(+), 15 deletions(-) diff --git a/gdtoa/gdtoa.h b/gdtoa/gdtoa.h index 49c637beb..8b7390a28 100644 --- a/gdtoa/gdtoa.h +++ b/gdtoa/gdtoa.h @@ -142,8 +142,8 @@ extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt, extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)); extern void freedtoa ANSI((char*)); -extern float strtof ANSI((CONST char *, char **)); -extern double strtod ANSI((CONST char *, char **)); +//extern float strtof ANSI((CONST char *, char **)); +//extern double strtod ANSI((CONST char *, char **)); extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); extern char* g_ddfmt ANSI((char*, double*, int, size_t)); diff --git a/gdtoa/gdtoa.vcproj b/gdtoa/gdtoa.vcproj index 7195c1457..3ac6ce39d 100644 --- a/gdtoa/gdtoa.vcproj +++ b/gdtoa/gdtoa.vcproj @@ -293,50 +293,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -482,14 +486,6 @@ RelativePath=".\src\am_map.cpp" > - - - - @@ -1094,6 +1090,10 @@ RelativePath=".\src\zstring.cpp" > + + Date: Tue, 21 Jan 2014 19:48:46 -0600 Subject: [PATCH 09/15] Add more stuff to .gitignore --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index e27cd5a59..cfa4882e6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ /release_gcc /dumb/vc6/dumb_static/release /dumb/vc6/dumb_static/debug +/dumb/vc6/dumb_static/x64 /DOOMSTATS.TXT /src/gitinfo.h /src/sc_man_scanner.h @@ -25,5 +26,14 @@ /tools/*/*.exe /tools/lemon/build /tools/re2c/build +/tools/updaterevision/x64/ +/tools/zipdir/x64 /wadsrc/*.pk3 /build_vc2013 +/bzip2/x64/ +/disasm.txt +/game-music-emu/x64/ +/gdtoa/x64/ +/jpeg-6b/x64/ +/lzma/x64/ +/zlib/x64/ From 4e53df8bca5e0dad98c6bdac9b1b5d9acf479d1d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 26 Jan 2014 14:32:44 +0100 Subject: [PATCH 10/15] - fixed: The 'load' command in GAMEINFO only worked if the filename contained a slash. --- src/d_main.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 5dd186cd0..6c938ef53 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1807,19 +1807,23 @@ static FString ParseGameInfo(TArray &pwads, const char *fn, const char // Try looking for the wad in the same directory as the .wad // before looking for it in the current directory. + FString checkpath; if (lastSlash != NULL) { - FString checkpath(fn, (lastSlash - fn) + 1); + checkpath = FString(fn, (lastSlash - fn) + 1); checkpath += sc.String; - - if (!FileExists (checkpath)) - { - pos += D_AddFile(pwads, sc.String, true, pos); - } - else - { - pos += D_AddFile(pwads, checkpath, true, pos); - } + } + else + { + checkpath = sc.String; + } + if (!FileExists(checkpath)) + { + pos += D_AddFile(pwads, sc.String, true, pos); + } + else + { + pos += D_AddFile(pwads, checkpath, true, pos); } } while (sc.CheckToken(',')); From 8b02bb55aa3561eeb06bf4cc6320b609f7af26b4 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 30 Jan 2014 20:30:40 -0600 Subject: [PATCH 11/15] Fix compiling with FMOD 4.36 - That stuff I thought that went poof in FMOD Ex 4.37 was apparently already gone in 4.36. --- src/sound/fmodsound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 4bdc43081..18f4cbb8f 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -63,7 +63,7 @@ extern HWND Window; #include "cmdlib.h" #include "s_sound.h" -#if FMOD_VERSION > 0x42899 && FMOD_VERSION < 0x43800 +#if FMOD_VERSION > 0x42899 && FMOD_VERSION < 0x43600 #error You are trying to compile with an unsupported version of FMOD. #endif @@ -858,7 +858,7 @@ bool FMODSoundRenderer::Init() result = Sys->setDriver(driver); } result = Sys->getDriver(&driver); -#if FMOD_VERSION >= 0x43700 +#if FMOD_VERSION >= 0x43600 // We were built with an FMOD that only returns the control panel frequency result = Sys->getDriverCaps(driver, &Driver_Caps, &Driver_MinFrequency, &speakermode); Driver_MaxFrequency = Driver_MinFrequency; @@ -1043,7 +1043,7 @@ bool FMODSoundRenderer::Init() } // Create DSP units for underwater effect -#if FMOD_VERSION < 0x43701 +#if FMOD_VERSION < 0x43600 result = Sys->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &WaterLP); if (result != FMOD_OK) { @@ -1106,7 +1106,7 @@ bool FMODSoundRenderer::Init() WaterLP->setActive(false); WaterLP->setParameter(FMOD_DSP_LOWPASS_CUTOFF, snd_waterlp); WaterLP->setParameter(FMOD_DSP_LOWPASS_RESONANCE, 2); -#if FMOD_VERSION < 0x43701 +#if FMOD_VERSION < 0x43600 if (WaterReverb != NULL) { FMOD::DSPConnection *dry; From 3cff307e7756aae6e0f8c255f5a8a6eaf28270ec Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 4 Feb 2014 19:36:29 -0600 Subject: [PATCH 12/15] Add Get/SetLineActivation ACS functions --- src/p_acs.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 26b62be70..1ed89f783 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4251,6 +4251,8 @@ enum EACSFunctions ACSF_CheckFont, ACSF_DropItem, ACSF_CheckFlag, + ACSF_SetLineActivation, + ACSF_GetLineActivation, // ZDaemon ACSF_GetTeamScore = 19620, // (int team) @@ -5296,6 +5298,26 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) break; } + case ACSF_SetLineActivation: + if (argCount >= 2) + { + int line = -1; + + while ((line = P_FindLineFromID(args[0], line)) >= 0) + { + lines[line].activation = args[1]; + } + } + break; + + case ACSF_GetLineActivation: + if (argCount > 0) + { + int line = P_FindLineFromID(args[0], -1); + return line >= 0 ? lines[line].activation : 0; + } + break; + default: break; } From 0db82f02cfb7bdd555a2a45d605bb7af600163a0 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Wed, 12 Feb 2014 20:30:37 +1300 Subject: [PATCH 13/15] P_HitWater ignore extra floors below real floor P_HitWater incorrectly assumed extra floors were always above the real floor. --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index d97a091ea..7dc8a3f46 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5169,7 +5169,7 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z } } planez = rover->bottom.plane->ZatPoint(x, y); - if (planez < z) return false; + if (planez < z && !(planez < thing->floorz)) return false; } #endif hsec = sec->GetHeightSec(); From dd5f2731282a27f811f1c8a5989028dd7922d52b Mon Sep 17 00:00:00 2001 From: Alex Qyoun-ae Date: Fri, 14 Feb 2014 05:10:48 +0400 Subject: [PATCH 14/15] Added possibly missing brackets --- src/g_strife/a_entityboss.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_strife/a_entityboss.cpp b/src/g_strife/a_entityboss.cpp index 58a88121e..fafb3b862 100644 --- a/src/g_strife/a_entityboss.cpp +++ b/src/g_strife/a_entityboss.cpp @@ -91,7 +91,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_EntityDeath) fixed_t SpawnX = spot->x; fixed_t SpawnY = spot->y; - fixed_t SpawnZ = spot->z + self->tracer? 70*FRACUNIT : 0; + fixed_t SpawnZ = spot->z + (self->tracer? 70*FRACUNIT : 0); an = self->angle >> ANGLETOFINESHIFT; second = Spawn("EntitySecond", SpawnX + FixedMul (secondRadius, finecosine[an]), From 02cd6eebf443579bd9ade2e1396400ab49bd398d Mon Sep 17 00:00:00 2001 From: Gaerzi Date: Sun, 16 Feb 2014 18:29:01 +0100 Subject: [PATCH 15/15] A_Log formatted text Make DECORATE version of Log consistent with ACS version. --- src/thingdef/thingdef_codeptr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index d48b18a2a..f2c738fb9 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2205,7 +2205,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Log) ACTION_PARAM_STRING(text, 0); if (text[0] == '$') text = GStrings(text+1); - Printf("%s\n", text); + FString formatted = strbin1(text); + Printf("%s\n", formatted.GetChars()); ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains! }