diff --git a/CMakeLists.txt b/CMakeLists.txt index d567ecdd7..e61f2fce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,8 +175,6 @@ find_package( ZLIB ) include( TargetArch ) -target_architecture(DEMOLITION_TARGET_ARCH) - # Things for later. Currently we have no VM and no Vulkan #if( ${DEMOLITION_TARGET_ARCH} MATCHES "x86_64" ) # set( HAVE_VM_JIT ON ) @@ -193,7 +191,7 @@ target_architecture(DEMOLITION_TARGET_ARCH) if( MSVC ) # Eliminate unreferenced functions and data # Perform identical COMDAT folding - set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /LARGEADDRESSAWARE" ) + set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /LARGEADDRESSAWARE /SAFESEH:NO" ) # String pooling # Function-level linking diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 4766ac268..13ef32a7a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -36,10 +36,13 @@ if( APPLE ) option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON ) endif() +target_architecture(DEMOLITION_TARGET_ARCH) +message(STATUS "Architecture is ${DEMOLITION_TARGET_ARCH}") + # Right now only 64 bit is supported. -#if( ${DEMOLITION_TARGET_ARCH} MATCHES "x86_64" ) - set( X64 64 ) -#endif() +if( ${DEMOLITION_TARGET_ARCH} MATCHES "x86_64" ) + set( X64 64 ) +endif() if( X64 OR ${DEMOLITION_TARGET_ARCH} MATCHES "i386" ) add_definitions( -DARCH_IA32 ) diff --git a/source/common/gamecontrol.cpp b/source/common/gamecontrol.cpp index e44395379..4d3f8cac4 100644 --- a/source/common/gamecontrol.cpp +++ b/source/common/gamecontrol.cpp @@ -295,14 +295,13 @@ int CONFIG_Init() // if (userConfig.gamegrp) { - std::filesystem::path gpath = std::filesystem::u8path(userConfig.gamegrp.GetChars()); + FString gamegrplower = userConfig.gamegrp.MakeLower(); int g = 0; for (auto& grp : groups) { - std::filesystem::path fpath = std::filesystem::u8path(grp.FileName.GetChars()); - std::error_code err; - if (std::filesystem::equivalent(gpath, fpath, err)) + auto grplower = grp.FileName.MakeLower(); + if (grplower.LastIndexOf(gamegrplower) == grplower.Len() - gamegrplower.Len()) { groupno = g; break; diff --git a/source/sw/src/actor.cpp b/source/sw/src/actor.cpp index 5f4994a0d..703467495 100644 --- a/source/sw/src/actor.cpp +++ b/source/sw/src/actor.cpp @@ -46,6 +46,7 @@ BEGIN_SW_NS extern int jump_grav; +int SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, int hit_z); extern STATE s_DebrisNinja[]; extern STATE s_DebrisRat[]; extern STATE s_DebrisCrab[]; diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index feb5f58f6..f6c430054 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -1164,23 +1164,19 @@ InitLevel(void) { static int DemoNumber = 0; - MONO_PRINT("InitLevel"); Terminate3DSounds(); // A few IMPORTANT GLOBAL RESETS InitLevelGlobals(); - MONO_PRINT("InitLevelGlobals"); if (!DemoMode) StopSong(); if (LoadGameOutsideMoveLoop) { - MONO_PRINT("Returning from InitLevel"); return; } InitLevelGlobals2(); - MONO_PRINT("InitLevelGlobals2"); if (DemoMode) { Level = 0; @@ -1489,10 +1485,6 @@ TerminateLevel(void) void NewLevel(void) { - - DSPRINTF(ds,"NewLevel"); - MONO_PRINT(ds); - if (DemoPlaying) { FX_SetVolume(0); // Shut the hell up while game is loading! @@ -1518,16 +1510,8 @@ void NewLevel(void) } else { - DSPRINTF(ds,"Calling FX_SetVolume"); - MONO_PRINT(ds); FX_SetVolume(0); // Shut the hell up while game is loading! - - DSPRINTF(ds,"Calling InitLevel"); - MONO_PRINT(ds); InitLevel(); - - DSPRINTF(ds,"Calling RunLevel"); - MONO_PRINT(ds); RunLevel(); if (!QuitFlag) diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index 527984919..2b62da57e 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -792,7 +792,7 @@ DoSpringBoardDown(void) { int destz; - destz = sector[nextsectorneighborz(sbp->Sector, sector[sbp->Sector].floorz, SEARCH_FLOOR, SEARCH_DOWN)].floorz; + destz = sector[nextsectorneighborz(sbp->Sector, sector[sbp->Sector].floorz, 1, 1)].floorz; AnimSet(§or[sbp->Sector].floorz, destz, 256); diff --git a/source/sw/src/swcvar.cpp b/source/sw/src/swcvar.cpp index d8a4ab056..61dd2961d 100644 --- a/source/sw/src/swcvar.cpp +++ b/source/sw/src/swcvar.cpp @@ -1,3 +1,3 @@ -#include "swcvars.h" +#include "swcvar.h" CVAR(Bool, sw_ninjahack, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);