mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
774a7773a4
10 changed files with 56 additions and 44 deletions
|
@ -2388,7 +2388,9 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio
|
|||
level.info->Snapshot.Clean();
|
||||
|
||||
insave = false;
|
||||
I_FreezeTime(false);
|
||||
|
||||
if (cl_waitforsave)
|
||||
I_FreezeTime(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1431,7 +1431,7 @@ MapFlagHandlers[] =
|
|||
{ "activateowndeathspecials", MITYPE_SETFLAG, LEVEL_ACTOWNSPECIAL, 0 },
|
||||
{ "killeractivatesdeathspecials", MITYPE_CLRFLAG, LEVEL_ACTOWNSPECIAL, 0 },
|
||||
{ "missilesactivateimpactlines", MITYPE_SETFLAG2, LEVEL2_MISSILESACTIVATEIMPACT, 0 },
|
||||
{ "missileshootersactivetimpactlines",MITYPE_CLRFLAG2, LEVEL2_MISSILESACTIVATEIMPACT, 0 },
|
||||
{ "missileshootersactivateimpactlines",MITYPE_CLRFLAG2, LEVEL2_MISSILESACTIVATEIMPACT, 0 },
|
||||
{ "noinventorybar", MITYPE_SETFLAG, LEVEL_NOINVENTORYBAR, 0 },
|
||||
{ "deathslideshow", MITYPE_IGNORE, 0, 0 },
|
||||
{ "strictmonsteractivation", MITYPE_CLRFLAG2, LEVEL2_LAXMONSTERACTIVATION, LEVEL2_LAXACTIVATIONMAPINFO },
|
||||
|
|
|
@ -73,6 +73,38 @@ FGameConfigFile::FGameConfigFile ()
|
|||
{
|
||||
#ifdef __APPLE__
|
||||
FString user_docs, user_app_support, local_app_support;
|
||||
{
|
||||
char cpath[PATH_MAX];
|
||||
FSRef folder;
|
||||
|
||||
if (noErr == FSFindFolder(kUserDomain, kDocumentsFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
user_docs << cpath << "/" GAME_DIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
user_docs = "~/" GAME_DIR;
|
||||
}
|
||||
if (noErr == FSFindFolder(kUserDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
user_app_support << cpath << "/" GAME_DIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
user_app_support = "~/Library/Application Support/" GAME_DIR;
|
||||
}
|
||||
if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
local_app_support << cpath << "/" GAME_DIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
local_app_support = "Library/Application Support/" GAME_DIR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
FString pathname;
|
||||
|
||||
|
@ -95,32 +127,10 @@ FGameConfigFile::FGameConfigFile ()
|
|||
SetValueForKey ("Path", ".", true);
|
||||
SetValueForKey ("Path", "$DOOMWADDIR", true);
|
||||
#ifdef __APPLE__
|
||||
char cpath[PATH_MAX];
|
||||
FSRef folder;
|
||||
|
||||
if (noErr == FSFindFolder(kUserDomain, kDocumentsFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
user_docs << cpath << "/" GAME_DIR;
|
||||
SetValueForKey("Path", user_docs, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetValueForKey("Path", "~/" GAME_DIR, true);
|
||||
}
|
||||
if (noErr == FSFindFolder(kUserDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
user_app_support << cpath << "/" GAME_DIR;
|
||||
SetValueForKey("Path", user_app_support, true);
|
||||
}
|
||||
SetValueForKey ("Path", user_docs, true);
|
||||
SetValueForKey ("Path", user_app_support, true);
|
||||
SetValueForKey ("Path", "$PROGDIR", true);
|
||||
if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
local_app_support << cpath << "/" GAME_DIR;
|
||||
SetValueForKey("Path", local_app_support, true);
|
||||
}
|
||||
SetValueForKey ("Path", local_app_support, true);
|
||||
#elif !defined(__unix__)
|
||||
SetValueForKey ("Path", "$HOME", true);
|
||||
SetValueForKey ("Path", "$PROGDIR", true);
|
||||
|
|
|
@ -187,10 +187,12 @@ void I_FreezeTime(bool frozen)
|
|||
{
|
||||
if (frozen)
|
||||
{
|
||||
assert(FreezeTime == 0);
|
||||
FreezeTime = GetClockTimeNS();
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(FreezeTime != 0);
|
||||
FirstFrameStartTime += GetClockTimeNS() - FreezeTime;
|
||||
FreezeTime = 0;
|
||||
I_SetFrameTime();
|
||||
|
|
|
@ -714,7 +714,7 @@ bool M_Responder (event_t *ev)
|
|||
return false;
|
||||
}
|
||||
else if (ev->type == EV_GUI_Event && ev->subtype == EV_GUI_LButtonDown &&
|
||||
ConsoleState != c_down && m_use_mouse)
|
||||
ConsoleState != c_down && gamestate != GS_LEVEL && m_use_mouse)
|
||||
{
|
||||
M_StartControlPanel(true);
|
||||
M_SetMenu(NAME_Mainmenu, -1);
|
||||
|
|
|
@ -297,7 +297,6 @@ protected:
|
|||
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, double)> fluid_settings_setnum;
|
||||
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, const char *)> fluid_settings_setstr;
|
||||
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, int)> fluid_settings_setint;
|
||||
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, char **)> fluid_settings_getstr;
|
||||
static TReqProc<FluidSynthModule, int (*)(fluid_settings_t *, const char *, int *)> fluid_settings_getint;
|
||||
static TReqProc<FluidSynthModule, void (*)(fluid_synth_t *, int)> fluid_synth_set_reverb_on;
|
||||
static TReqProc<FluidSynthModule, void (*)(fluid_synth_t *, int)> fluid_synth_set_chorus_on;
|
||||
|
|
|
@ -107,7 +107,7 @@ int FSoundFontReader::pathcmp(const char *p1, const char *p2)
|
|||
|
||||
FSF2Reader::FSF2Reader(const char *fn)
|
||||
{
|
||||
mMainConfigForSF2.Format("soundfont %s\n", fn);
|
||||
mMainConfigForSF2.Format("soundfont \"%s\"\n", fn);
|
||||
mFilename = fn;
|
||||
}
|
||||
|
||||
|
@ -372,6 +372,11 @@ void FSoundFontManager::CollectSoundfonts()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (soundfonts.Size() == 0)
|
||||
{
|
||||
ProcessOneFile(NicePath("$PROGDIR/soundfonts/gzdoom.sf2"));
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -324,10 +324,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice(const char *args)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (LoadPatchSets(nullptr))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// The following will only be used if no soundfont at all is provided, i.e. even the standard one coming with GZDoom is missing.
|
||||
#ifdef __unix__
|
||||
// This is the standard location on Ubuntu.
|
||||
|
@ -659,10 +656,9 @@ FString FluidSynthMIDIDevice::GetStats()
|
|||
int polyphony = fluid_synth_get_polyphony(FluidSynth);
|
||||
int voices = fluid_synth_get_active_voice_count(FluidSynth);
|
||||
double load = fluid_synth_get_cpu_load(FluidSynth);
|
||||
char *chorus, *reverb;
|
||||
int maxpoly;
|
||||
fluid_settings_getstr(FluidSettings, "synth.chorus.active", &chorus);
|
||||
fluid_settings_getstr(FluidSettings, "synth.reverb.active", &reverb);
|
||||
int chorus, reverb, maxpoly;
|
||||
fluid_settings_getint(FluidSettings, "synth.chorus.active", &chorus);
|
||||
fluid_settings_getint(FluidSettings, "synth.reverb.active", &reverb);
|
||||
fluid_settings_getint(FluidSettings, "synth.polyphony", &maxpoly);
|
||||
CritSec.Leave();
|
||||
|
||||
|
@ -670,7 +666,7 @@ FString FluidSynthMIDIDevice::GetStats()
|
|||
TEXTCOLOR_YELLOW "%6.2f" TEXTCOLOR_NORMAL "%% CPU "
|
||||
"Reverb: " TEXTCOLOR_YELLOW "%3s" TEXTCOLOR_NORMAL
|
||||
" Chorus: " TEXTCOLOR_YELLOW "%3s",
|
||||
voices, polyphony, maxpoly, load, reverb, chorus);
|
||||
voices, polyphony, maxpoly, load, reverb ? "yes" : "no", chorus ? "yes" : "no");
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -694,7 +690,6 @@ DYN_FLUID_SYM(delete_fluid_settings);
|
|||
DYN_FLUID_SYM(fluid_settings_setnum);
|
||||
DYN_FLUID_SYM(fluid_settings_setstr);
|
||||
DYN_FLUID_SYM(fluid_settings_setint);
|
||||
DYN_FLUID_SYM(fluid_settings_getstr);
|
||||
DYN_FLUID_SYM(fluid_settings_getint);
|
||||
DYN_FLUID_SYM(fluid_synth_set_reverb_on);
|
||||
DYN_FLUID_SYM(fluid_synth_set_chorus_on);
|
||||
|
|
|
@ -97,7 +97,6 @@ const char *GetVersionString();
|
|||
#define GAMESIG "GZDOOM"
|
||||
#define BASEWAD "gzdoom.pk3"
|
||||
#define OPTIONALWAD "zd_extra.pk3"
|
||||
#define BASESF "gzdoom.sf2"
|
||||
|
||||
// More stuff that needs to be different for derivatives.
|
||||
#define GAMENAME "GZDoom"
|
||||
|
|
|
@ -80,8 +80,8 @@ struct Side native play
|
|||
//native DInterpolation *SetInterpolation(int position);
|
||||
//native void StopInterpolation(int position);
|
||||
|
||||
native Vertex V1();
|
||||
native Vertex V2();
|
||||
native clearscope Vertex V1();
|
||||
native clearscope Vertex V2();
|
||||
|
||||
native int Index();
|
||||
|
||||
|
@ -179,7 +179,7 @@ struct SecPlane native play
|
|||
|
||||
native bool isSlope() const;
|
||||
native int PointOnSide(Vector3 pos) const;
|
||||
native double ZatPoint (Vector2 v) const;
|
||||
native clearscope double ZatPoint (Vector2 v) const;
|
||||
native double ZatPointDist(Vector2 v, double dist) const;
|
||||
native bool isEqual(Secplane other) const;
|
||||
native void ChangeHeight(double hdiff);
|
||||
|
|
Loading…
Reference in a new issue