Conflicts:
	.gitignore
	src/CMakeLists.txt
This commit is contained in:
Christoph Oelckers 2014-02-16 21:08:44 +01:00
commit 3e318e4555
19 changed files with 1323 additions and 42 deletions

12
.gitignore vendored
View File

@ -15,6 +15,7 @@
/release_gcc /release_gcc
/dumb/vc6/dumb_static/release /dumb/vc6/dumb_static/release
/dumb/vc6/dumb_static/debug /dumb/vc6/dumb_static/debug
/dumb/vc6/dumb_static/x64
/DOOMSTATS.TXT /DOOMSTATS.TXT
/src/gitinfo.h /src/gitinfo.h
/src/sc_man_scanner.h /src/sc_man_scanner.h
@ -26,5 +27,14 @@
/tools/*/*.exe /tools/*/*.exe
/tools/lemon/build /tools/lemon/build
/tools/re2c/build /tools/re2c/build
/wadsrc*/*.pk3 /tools/updaterevision/x64/
/tools/zipdir/x64
/wadsrc/*.pk3
/build_vc2013 /build_vc2013
/bzip2/x64/
/disasm.txt
/game-music-emu/x64/
/gdtoa/x64/
/jpeg-6b/x64/
/lzma/x64/
/zlib/x64/

View File

@ -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, extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
int mode, int ndigits, int *decpt, char **rve)); int mode, int ndigits, int *decpt, char **rve));
extern void freedtoa ANSI((char*)); extern void freedtoa ANSI((char*));
extern float strtof ANSI((CONST char *, char **)); //extern float strtof ANSI((CONST char *, char **));
extern double strtod ANSI((CONST char *, char **)); //extern double strtod ANSI((CONST char *, char **));
extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
extern char* g_ddfmt ANSI((char*, double*, int, size_t)); extern char* g_ddfmt ANSI((char*, double*, int, size_t));

File diff suppressed because it is too large Load Diff

View File

@ -630,7 +630,7 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t));
extern Bigint *set_ones ANSI((Bigint*, int)); extern Bigint *set_ones ANSI((Bigint*, int));
extern char *strcp ANSI((char*, const char*)); extern char *strcp ANSI((char*, const char*));
extern int strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*)); extern int strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
extern double strtod ANSI((const char *s00, char **se)); // extern double strtod ANSI((const char *s00, char **se));
extern Bigint *sum ANSI((Bigint*, Bigint*)); extern Bigint *sum ANSI((Bigint*, Bigint*));
extern int trailz ANSI((Bigint*)); extern int trailz ANSI((Bigint*));
extern double ulp ANSI((U*)); extern double ulp ANSI((U*));

View File

@ -41,6 +41,7 @@
#include "version.h" #include "version.h"
#include "g_game.h" #include "g_game.h"
#include "c_bind.h"
#include "c_console.h" #include "c_console.h"
#include "c_cvars.h" #include "c_cvars.h"
#include "c_dispatch.h" #include "c_dispatch.h"
@ -1696,6 +1697,12 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
break; break;
case '`': 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: case GK_ESCAPE:
// Close console and clear command line. But if we're in the // Close console and clear command line. But if we're in the
// fullscreen console mode, there's nothing to fall back on // fullscreen console mode, there's nothing to fall back on

View File

@ -1807,19 +1807,23 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
// Try looking for the wad in the same directory as the .wad // Try looking for the wad in the same directory as the .wad
// before looking for it in the current directory. // before looking for it in the current directory.
FString checkpath;
if (lastSlash != NULL) if (lastSlash != NULL)
{ {
FString checkpath(fn, (lastSlash - fn) + 1); checkpath = FString(fn, (lastSlash - fn) + 1);
checkpath += sc.String; checkpath += sc.String;
}
if (!FileExists (checkpath)) else
{ {
pos += D_AddFile(pwads, sc.String, true, pos); checkpath = sc.String;
} }
else if (!FileExists(checkpath))
{ {
pos += D_AddFile(pwads, checkpath, true, pos); pos += D_AddFile(pwads, sc.String, true, pos);
} }
else
{
pos += D_AddFile(pwads, checkpath, true, pos);
} }
} }
while (sc.CheckToken(',')); while (sc.CheckToken(','));

View File

@ -861,7 +861,7 @@ void D_ReadUserInfoStrings (int pnum, BYTE **stream, bool update)
val.String = CleanseString(value.LockBuffer()); val.String = CleanseString(value.LockBuffer());
(*cvar_ptr)->SetGenericRep(val, CVAR_String); (*cvar_ptr)->SetGenericRep(val, CVAR_String);
value.UnlockBuffer(); 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()); Printf("%s is now known as %s\n", oldname.GetChars(), value.GetChars());
} }

View File

@ -130,6 +130,7 @@ enum ESkillLevels
#define KEY_F10 0x44 // DIK_F10 #define KEY_F10 0x44 // DIK_F10
#define KEY_F11 0x57 // DIK_F11 #define KEY_F11 0x57 // DIK_F11
#define KEY_F12 0x58 // DIK_F12 #define KEY_F12 0x58 // DIK_F12
#define KEY_GRAVE 0x29 // DIK_GRAVE
#define KEY_BACKSPACE 0x0e // DIK_BACK #define KEY_BACKSPACE 0x0e // DIK_BACK

View File

@ -91,7 +91,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_EntityDeath)
fixed_t SpawnX = spot->x; fixed_t SpawnX = spot->x;
fixed_t SpawnY = spot->y; 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; an = self->angle >> ANGLETOFINESHIFT;
second = Spawn("EntitySecond", SpawnX + FixedMul (secondRadius, finecosine[an]), second = Spawn("EntitySecond", SpawnX + FixedMul (secondRadius, finecosine[an]),

View File

@ -996,7 +996,10 @@ bool DPlayerMenu::MenuEvent (int mkey, bool fromcontroller)
// item specific handling comes here // item specific handling comes here
case NAME_Playerbox: case NAME_Playerbox:
PlayerNameChanged(li); if (mkey == MKEY_Input)
{
PlayerNameChanged(li);
}
break; break;
case NAME_Team: case NAME_Team:

View File

@ -4251,6 +4251,8 @@ enum EACSFunctions
ACSF_CheckFont, ACSF_CheckFont,
ACSF_DropItem, ACSF_DropItem,
ACSF_CheckFlag, ACSF_CheckFlag,
ACSF_SetLineActivation,
ACSF_GetLineActivation,
// ZDaemon // ZDaemon
ACSF_GetTeamScore = 19620, // (int team) ACSF_GetTeamScore = 19620, // (int team)
@ -5296,6 +5298,26 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
break; 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: default:
break; break;
} }

View File

@ -655,7 +655,14 @@ static void TakeStrifeItem (player_t *player, const PClass *itemtype, int amount
item->Amount -= amount; item->Amount -= amount;
if (item->Amount <= 0) if (item->Amount <= 0)
{ {
item->Destroy (); if (item->ItemFlags & IF_KEEPDEPLETED)
{
item->Amount = 0;
}
else
{
item->Destroy ();
}
} }
} }
} }

View File

@ -4676,6 +4676,12 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
if (defaults->SpawnState == NULL || if (defaults->SpawnState == NULL ||
sprites[defaults->SpawnState->sprite].numframes == 0) 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", Printf ("%s at (%i, %i) has no frames\n",
i->TypeName.GetChars(), mthing->x>>FRACBITS, mthing->y>>FRACBITS); i->TypeName.GetChars(), mthing->x>>FRACBITS, mthing->y>>FRACBITS);
i = PClass::FindClass("Unknown"); 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); planez = rover->bottom.plane->ZatPoint(x, y);
if (planez < z) return false; if (planez < z && !(planez < thing->floorz)) return false;
} }
#endif #endif
hsec = sec->GetHeightSec(); hsec = sec->GetHeightSec();

View File

@ -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. // same visplane, then only the floor sky will be drawn.
plane.c = height.c; plane.c = height.c;
plane.ic = height.ic; plane.ic = height.ic;
isskybox = skybox != NULL && !skybox->bInSkybox && isskybox = skybox != NULL && !skybox->bInSkybox;
(skybox->bAlways || picnum == skyflatnum);
} }
else if (skybox != NULL && skybox->bAlways && !skybox->bInSkybox) else if (skybox != NULL && skybox->bAlways && !skybox->bInSkybox)
{ {

View File

@ -1,8 +1,12 @@
#include <SDL_joystick.h> #include <SDL_joystick.h>
#include "doomdef.h" #include "doomdef.h"
#include "templates.h"
#include "m_joy.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 class SDLInputJoystick: public IJoystickConfig
{ {
public: public:
@ -65,7 +69,7 @@ public:
void SetAxisDeadZone(int axis, float zone) 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) void SetAxisMap(int axis, EJoyAxis gameaxis)
{ {
@ -83,7 +87,7 @@ public:
} }
bool IsAxisDeadZoneDefault(int axis) bool IsAxisDeadZoneDefault(int axis)
{ {
return Axes[axis].DeadZone == 0.0f; return Axes[axis].DeadZone <= MIN_DEADZONE;
} }
bool IsAxisMapDefault(int axis) bool IsAxisMapDefault(int axis)
{ {
@ -105,7 +109,7 @@ public:
info.Name.Format("Axis %d", i+1); info.Name.Format("Axis %d", i+1);
else else
info.Name.Format("Hat %d (%c)", (i-NumAxes)/2 + 1, (i-NumAxes)%2 == 0 ? 'x' : 'y'); 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.Multiplier = 1.0f;
info.Value = 0.0; info.Value = 0.0;
info.ButtonValue = 0; info.ButtonValue = 0;
@ -141,7 +145,7 @@ public:
{ {
buttonstate = 0; 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); Axes[i].Value = Joy_RemoveDeadZone(Axes[i].Value, Axes[i].DeadZone, &buttonstate);
// Map button to axis // Map button to axis

View File

@ -63,7 +63,7 @@ extern HWND Window;
#include "cmdlib.h" #include "cmdlib.h"
#include "s_sound.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. #error You are trying to compile with an unsupported version of FMOD.
#endif #endif
@ -858,7 +858,7 @@ bool FMODSoundRenderer::Init()
result = Sys->setDriver(driver); result = Sys->setDriver(driver);
} }
result = Sys->getDriver(&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 // We were built with an FMOD that only returns the control panel frequency
result = Sys->getDriverCaps(driver, &Driver_Caps, &Driver_MinFrequency, &speakermode); result = Sys->getDriverCaps(driver, &Driver_Caps, &Driver_MinFrequency, &speakermode);
Driver_MaxFrequency = Driver_MinFrequency; Driver_MaxFrequency = Driver_MinFrequency;
@ -1043,7 +1043,7 @@ bool FMODSoundRenderer::Init()
} }
// Create DSP units for underwater effect // Create DSP units for underwater effect
#if FMOD_VERSION < 0x43701 #if FMOD_VERSION < 0x43600
result = Sys->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &WaterLP); result = Sys->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &WaterLP);
if (result != FMOD_OK) if (result != FMOD_OK)
{ {
@ -1106,7 +1106,7 @@ bool FMODSoundRenderer::Init()
WaterLP->setActive(false); WaterLP->setActive(false);
WaterLP->setParameter(FMOD_DSP_LOWPASS_CUTOFF, snd_waterlp); WaterLP->setParameter(FMOD_DSP_LOWPASS_CUTOFF, snd_waterlp);
WaterLP->setParameter(FMOD_DSP_LOWPASS_RESONANCE, 2); WaterLP->setParameter(FMOD_DSP_LOWPASS_RESONANCE, 2);
#if FMOD_VERSION < 0x43701 #if FMOD_VERSION < 0x43600
if (WaterReverb != NULL) if (WaterReverb != NULL)
{ {
FMOD::DSPConnection *dry; FMOD::DSPConnection *dry;

View File

@ -2205,7 +2205,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Log)
ACTION_PARAM_STRING(text, 0); ACTION_PARAM_STRING(text, 0);
if (text[0] == '$') text = GStrings(text+1); 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! ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
} }

View File

@ -4,5 +4,6 @@ gameinfo
{ {
finalepage = "ORDER" finalepage = "ORDER"
infopage = "ORDER", "HELP1", "HELP2", "CREDIT" infopage = "ORDER", "HELP1", "HELP2", "CREDIT"
borderflat = "FLOOR04"
} }

View File

@ -56,7 +56,7 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="false" 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;&quot;jpeg-6b&quot;;&quot;game-music-emu\gme&quot;;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;&quot;jpeg-6b&quot;;&quot;game-music-emu&quot;;gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY,BACKPATCH,HAVE_FLUIDSYNTH,DYN_FLUIDSYNTH" PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY,BACKPATCH,HAVE_FLUIDSYNTH,DYN_FLUIDSYNTH"
StringPooling="true" StringPooling="true"
ExceptionHandling="1" ExceptionHandling="1"
@ -178,7 +178,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" 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;&quot;jpeg-6b&quot;;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;&quot;jpeg-6b&quot;;game-music-emu;gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY" PreprocessorDefinitions="NDEBUG,WIN32,_WIN32,_WINDOWS,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
@ -287,7 +287,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
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;&quot;jpeg-6b&quot;;&quot;game-music-emu\gme&quot;;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;&quot;jpeg-6b&quot;;&quot;game-music-emu&quot;;gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY,BACKPATCH,HAVE_FLUIDSYNTH,DYN_FLUIDSYNTH" PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY,BACKPATCH,HAVE_FLUIDSYNTH,DYN_FLUIDSYNTH"
MinimalRebuild="true" MinimalRebuild="true"
RuntimeLibrary="1" RuntimeLibrary="1"
@ -394,7 +394,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
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;&quot;jpeg-6b&quot;;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;&quot;jpeg-6b&quot;;game-music-emu;gdtoa;bzip2;lzma\C"
PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY" PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH;NO_VA_COPY"
MinimalRebuild="true" MinimalRebuild="true"
RuntimeLibrary="1" RuntimeLibrary="1"
@ -474,6 +474,10 @@
Name="!Source Files" Name="!Source Files"
Filter="c;cpp" Filter="c;cpp"
> >
<File
RelativePath=".\src\__autostart.cpp"
>
</File>
<File <File
RelativePath=".\src\actorptrselect.cpp" RelativePath=".\src\actorptrselect.cpp"
> >
@ -482,14 +486,6 @@
RelativePath=".\src\am_map.cpp" RelativePath=".\src\am_map.cpp"
> >
</File> </File>
<File
RelativePath=".\src\autostart.cpp"
>
</File>
<File
RelativePath=".\src\autozend.cpp"
>
</File>
<File <File
RelativePath=".\src\b_bot.cpp" RelativePath=".\src\b_bot.cpp"
> >
@ -1094,6 +1090,10 @@
RelativePath=".\src\zstring.cpp" RelativePath=".\src\zstring.cpp"
> >
</File> </File>
<File
RelativePath=".\src\zzautozend.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="!Header Files" Name="!Header Files"