From 5b812f6afcc6b95e3c3db35d7cb13d3319a32c21 Mon Sep 17 00:00:00 2001 From: namreeb Date: Wed, 24 Jul 2024 07:38:53 -1000 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 59aef79..f45c22c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,7 @@ /utility/Debug/*.pdb /utility/Debug/*.obj /utility/Debug -/ipch/ANTTWEAKBAR-5f4de96b/*.ipch /*.sdf -/ipch/STORMLIB-4af47af8/*.ipch /utility/*.user /.vs/maps/v14/*.suo /MapViewer/x64/Debug/*.pdb @@ -40,7 +38,6 @@ /pathfind/x64/Debug /utility/x64/Debug /maps.VC.db -/ipch/STORMLIB_VS15-5647bf9b/*.ipch /MapBuilder/x64/Release /MapViewer/x64/Release /RecastDetourBuild/x64/Release @@ -50,12 +47,13 @@ /pathfind/*.user /gos.csv /.vs -/ipch/STORMLIB_VS15-933783c6/*.ipch +/.vscode /MapViewer/Include/pixelShader.hpp /MapViewer/Include/vertexShader.hpp /CMakeSettings.json /out /build /*.idea +/*.ipch /cmake-build-debug -/cmake-build-release +/cmake-build-release \ No newline at end of file From f311d6067cc52733aaee4db8b8f64b78dcc64f11 Mon Sep 17 00:00:00 2001 From: namreeb Date: Wed, 24 Jul 2024 08:01:07 -1000 Subject: [PATCH 2/3] Enable _DEBUG macro on Linux builds --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba24a2d..6d750b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,10 @@ endif() # This is just easier than copying over the DLLs if (MSVC) set(STORM_USE_BUNDLED_LIBRARIES ON CACHE BOOL "") +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-D_DEBUG) endif() + add_subdirectory(stormlib EXCLUDE_FROM_ALL) if (NAMIGATOR_BUILD_C_API) install(TARGETS storm ARCHIVE DESTINATION lib) From 7b547ba51dcb5ea16b16bdc159f8f0f23eddfb41 Mon Sep 17 00:00:00 2001 From: namreeb Date: Wed, 24 Jul 2024 08:01:36 -1000 Subject: [PATCH 3/3] Normalize MPQ paths when looking for alpha data files --- parser/MpqManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parser/MpqManager.cpp b/parser/MpqManager.cpp index d953b9a..9ea98ca 100644 --- a/parser/MpqManager.cpp +++ b/parser/MpqManager.cpp @@ -276,7 +276,12 @@ MpqManager::OpenFile(const std::string& file) for (auto const& i : MpqHandles) { - if (i.first != file_lower) + // if we are on Linux, the mpq filenames will use forward slashes + // instead of backslashes. this code could be cleaner. + std::string mpqPath = i.first; + std::replace(mpqPath.begin(), mpqPath.end(), '/', '\\'); + + if (mpqPath != file_lower) continue; // if we have found a match, there should be exactly two files in this