diff --git a/.gitignore b/.gitignore
index c1ac71afd..cafd55d46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,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
@@ -26,5 +27,14 @@
/tools/*/*.exe
/tools/lemon/build
/tools/re2c/build
-/wadsrc*/*.pk3
+/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/
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 b179daaf0..12a3e40b3 100644
--- a/gdtoa/gdtoa.vcproj
+++ b/gdtoa/gdtoa.vcproj
@@ -294,50 +294,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
&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(','));
diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp
index c2fb88aaf..812f41b03 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/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
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]),
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:
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;
}
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 ();
+ }
}
}
}
diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp
index 771d723a1..7dc8a3f46 100644
--- a/src/p_mobj.cpp
+++ b/src/p_mobj.cpp
@@ -4676,6 +4676,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");
@@ -5163,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();
diff --git a/src/r_plane.cpp b/src/r_plane.cpp
index 07bbbbe6a..143b302e9 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)
{
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
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;
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!
}
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"
}
diff --git a/zdoom.vcproj b/zdoom.vcproj
index b6ebdeb90..71ce817e9 100644
--- a/zdoom.vcproj
+++ b/zdoom.vcproj
@@ -56,7 +56,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;"jpeg-6b";"game-music-emu\gme";gdtoa;bzip2;lzma\C"
+ AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;"jpeg-6b";"game-music-emu";gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY,BACKPATCH,HAVE_FLUIDSYNTH,DYN_FLUIDSYNTH"
StringPooling="true"
ExceptionHandling="1"
@@ -178,7 +178,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
- AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;"jpeg-6b";game-music-emu\gme;gdtoa;bzip2;lzma\C"
+ AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;"jpeg-6b";game-music-emu;gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY"
StringPooling="true"
RuntimeLibrary="0"
@@ -287,7 +287,7 @@
+
+
@@ -482,14 +486,6 @@
RelativePath=".\src\am_map.cpp"
>
-
-
-
-
@@ -1094,6 +1090,10 @@
RelativePath=".\src\zstring.cpp"
>
+
+