diff --git a/src/g_game.cpp b/src/g_game.cpp index d0cf74be7..2ca349631 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -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); } diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 951b6a346..325f6c2d2 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -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 }, diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 80e08b3e7..c2655c359 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -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); diff --git a/src/i_time.cpp b/src/i_time.cpp index 29119ddb4..8fd058723 100644 --- a/src/i_time.cpp +++ b/src/i_time.cpp @@ -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(); diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index f03c37eb7..bf8999ded 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -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); diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index 2f04a39c1..b4269aaba 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -297,7 +297,6 @@ protected: static TReqProc fluid_settings_setnum; static TReqProc fluid_settings_setstr; static TReqProc fluid_settings_setint; - static TReqProc fluid_settings_getstr; static TReqProc fluid_settings_getint; static TReqProc fluid_synth_set_reverb_on; static TReqProc fluid_synth_set_chorus_on; diff --git a/src/sound/i_soundfont.cpp b/src/sound/i_soundfont.cpp index ab7e31907..4a073bc5e 100644 --- a/src/sound/i_soundfont.cpp +++ b/src/sound/i_soundfont.cpp @@ -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")); + } } //========================================================================== diff --git a/src/sound/mididevices/music_fluidsynth_mididevice.cpp b/src/sound/mididevices/music_fluidsynth_mididevice.cpp index 3f87c8107..05ed27532 100644 --- a/src/sound/mididevices/music_fluidsynth_mididevice.cpp +++ b/src/sound/mididevices/music_fluidsynth_mididevice.cpp @@ -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); diff --git a/src/version.h b/src/version.h index a4328141d..afda99a21 100644 --- a/src/version.h +++ b/src/version.h @@ -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" diff --git a/wadsrc/static/zscript/mapdata.txt b/wadsrc/static/zscript/mapdata.txt index 12d4a8037..011400f86 100644 --- a/wadsrc/static/zscript/mapdata.txt +++ b/wadsrc/static/zscript/mapdata.txt @@ -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);