From 1240d21ef87ef4d3fae0be63d604901569e81f65 Mon Sep 17 00:00:00 2001 From: Mrna Date: Tue, 23 Sep 2025 14:52:22 +0200 Subject: [PATCH 1/7] Added SDL submodule --- .gitmodules | 3 +++ vs/SDL | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 vs/SDL diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d82c77b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vs/SDL"] + path = vs/SDL + url = https://github.com/libsdl-org/SDL.git diff --git a/vs/SDL b/vs/SDL new file mode 160000 index 0000000..3e9e22f --- /dev/null +++ b/vs/SDL @@ -0,0 +1 @@ +Subproject commit 3e9e22f17dcc234cf77e73af47982905bd9b6912 From 118c6260b49adbbe4c98ac7313ae34040dafb0a7 Mon Sep 17 00:00:00 2001 From: Mrna Date: Tue, 23 Sep 2025 14:54:58 +0200 Subject: [PATCH 2/7] Added glew submodule --- .gitmodules | 3 +++ vs/glew | 1 + 2 files changed, 4 insertions(+) create mode 160000 vs/glew diff --git a/.gitmodules b/.gitmodules index d82c77b..698e718 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vs/SDL"] path = vs/SDL url = https://github.com/libsdl-org/SDL.git +[submodule "vs/glew"] + path = vs/glew + url = gitea@gitea.veleslabs.org:jan.mrna/glew.git diff --git a/vs/glew b/vs/glew new file mode 160000 index 0000000..02505d6 --- /dev/null +++ b/vs/glew @@ -0,0 +1 @@ +Subproject commit 02505d6cc1397c7420b46cf58685a68db4ca46d8 From 8008f55cb98cdde2fd14ff52414c0f59581f1d1e Mon Sep 17 00:00:00 2001 From: Mrna Date: Tue, 23 Sep 2025 15:30:31 +0200 Subject: [PATCH 3/7] Added SDL image submodule --- .gitmodules | 3 +++ vs/SDL_image | 1 + 2 files changed, 4 insertions(+) create mode 160000 vs/SDL_image diff --git a/.gitmodules b/.gitmodules index 698e718..3049412 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "vs/glew"] path = vs/glew url = gitea@gitea.veleslabs.org:jan.mrna/glew.git +[submodule "vs/SDL_image"] + path = vs/SDL_image + url = https://github.com/libsdl-org/SDL_image.git diff --git a/vs/SDL_image b/vs/SDL_image new file mode 160000 index 0000000..eeae8a6 --- /dev/null +++ b/vs/SDL_image @@ -0,0 +1 @@ +Subproject commit eeae8a64dfc065918fc259a7afe271bce8bcaadc From 7ef37e180a3960306b0f3c8d4b4ea3b61d3ec4f1 Mon Sep 17 00:00:00 2001 From: Mrna Date: Tue, 23 Sep 2025 15:31:39 +0200 Subject: [PATCH 4/7] Provide MSVC alternative for __PRETTY_FUNCTION__ --- cpp/src/log.hpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/cpp/src/log.hpp b/cpp/src/log.hpp index e8bcffe..2f1cb6d 100644 --- a/cpp/src/log.hpp +++ b/cpp/src/log.hpp @@ -2,13 +2,21 @@ #include -#define LOG_CRITICAL(...) Log::critical(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) -#define LOG_ERROR(...) Log::error(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) -#define LOG_WARNING(...) Log::warning(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) -#define LOG_INFO(...) Log::info(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) -#define LOG_DEBUG(...) Log::debug(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) +#if defined(__GNUC__) || defined(__clang__) +# define PRETTY_FUNC __PRETTY_FUNCTION__ +#elif defined(_MSC_VER) +# define PRETTY_FUNC __FUNCTION__ +#else +# define PRETTY_FUNC __func__ +#endif + +#define LOG_CRITICAL(...) Log::critical(PRETTY_FUNC, ": ", __VA_ARGS__) +#define LOG_ERROR(...) Log::error(PRETTY_FUNC, ": ", __VA_ARGS__) +#define LOG_WARNING(...) Log::warning(PRETTY_FUNC, ": ", __VA_ARGS__) +#define LOG_INFO(...) Log::info(PRETTY_FUNC, ": ", __VA_ARGS__) +#define LOG_DEBUG(...) Log::debug(PRETTY_FUNC, ": ", __VA_ARGS__) #define LOG_PROFILING_DEBUG(...) \ - Log::profiling_debug(__PRETTY_FUNCTION__, ": ", __VA_ARGS__) + Log::profiling_debug(PRETTY_FUNC, ": ", __VA_ARGS__) namespace Log { enum class LevelTypes { From f57d52c67067e29dc3b762126a5a5e8c31d2424e Mon Sep 17 00:00:00 2001 From: Mrna Date: Wed, 24 Sep 2025 09:36:34 +0200 Subject: [PATCH 5/7] M_PI fix for windows --- cpp/src/math.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/src/math.hpp b/cpp/src/math.hpp index 2756185..058d50a 100644 --- a/cpp/src/math.hpp +++ b/cpp/src/math.hpp @@ -5,6 +5,11 @@ #include #include +#ifdef _WIN32 +#include +#define M_PI std::numbers::pi +#endif + template struct Vec2D { public: Vec2D() = default; From 3180fc026ded39cd9efca8838532cbb6ca942c37 Mon Sep 17 00:00:00 2001 From: Mrna Date: Wed, 24 Sep 2025 09:40:08 +0200 Subject: [PATCH 6/7] Added windows VS solution --- vs/pathfinding_demo/pathfinding_demo.sln | 61 +++++++ vs/pathfinding_demo/pathfinding_demo.vcxproj | 167 ++++++++++++++++++ .../pathfinding_demo.vcxproj.filters | 33 ++++ .../pathfinding_demo.vcxproj.user | 4 + 4 files changed, 265 insertions(+) create mode 100644 vs/pathfinding_demo/pathfinding_demo.sln create mode 100644 vs/pathfinding_demo/pathfinding_demo.vcxproj create mode 100644 vs/pathfinding_demo/pathfinding_demo.vcxproj.filters create mode 100644 vs/pathfinding_demo/pathfinding_demo.vcxproj.user diff --git a/vs/pathfinding_demo/pathfinding_demo.sln b/vs/pathfinding_demo/pathfinding_demo.sln new file mode 100644 index 0000000..9e471cb --- /dev/null +++ b/vs/pathfinding_demo/pathfinding_demo.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34622.214 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pathfinding_demo", "pathfinding_demo.vcxproj", "{E14D159C-08E1-46E4-BD63-6157EDBC70DC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "..\SDL\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew_static", "..\glew\build\vc15\glew_static.vcxproj", "{664E6F0D-6784-4760-9565-D54F8EB1EDF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_image", "..\SDL_image\VisualC\SDL_image.vcxproj", "{2BD5534E-00E2-4BEA-AC96-D9A92EA24696}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x64.ActiveCfg = Debug|x64 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x64.Build.0 = Debug|x64 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x86.ActiveCfg = Debug|Win32 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Debug|x86.Build.0 = Debug|Win32 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x64.ActiveCfg = Release|x64 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x64.Build.0 = Release|x64 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x86.ActiveCfg = Release|Win32 + {E14D159C-08E1-46E4-BD63-6157EDBC70DC}.Release|x86.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.Build.0 = Release|Win32 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.ActiveCfg = Debug|x64 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x64.Build.0 = Debug|x64 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x86.ActiveCfg = Debug|Win32 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Debug|x86.Build.0 = Debug|Win32 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.ActiveCfg = Release|x64 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x64.Build.0 = Release|x64 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x86.ActiveCfg = Release|Win32 + {664E6F0D-6784-4760-9565-D54F8EB1EDF4}.Release|x86.Build.0 = Release|Win32 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x64.ActiveCfg = Debug|x64 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x64.Build.0 = Debug|x64 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x86.ActiveCfg = Debug|Win32 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Debug|x86.Build.0 = Debug|Win32 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x64.ActiveCfg = Release|x64 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x64.Build.0 = Release|x64 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x86.ActiveCfg = Release|Win32 + {2BD5534E-00E2-4BEA-AC96-D9A92EA24696}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7CCA451E-D4BA-48B4-AAD0-8AC02333FD9D} + EndGlobalSection +EndGlobal diff --git a/vs/pathfinding_demo/pathfinding_demo.vcxproj b/vs/pathfinding_demo/pathfinding_demo.vcxproj new file mode 100644 index 0000000..c7828c9 --- /dev/null +++ b/vs/pathfinding_demo/pathfinding_demo.vcxproj @@ -0,0 +1,167 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + {664e6f0d-6784-4760-9565-d54f8eb1edf4} + + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} + + + {2bd5534e-00e2-4bea-ac96-d9a92ea24696} + + + + 17.0 + Win32Proj + {e14d159c-08e1-46e4-bd63-6157edbc70dc} + pathfindingdemo + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + GLEW_STATIC + true + stdcpplatest + ..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories) + + + Console + true + ..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories) + opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + GLEW_STATIC + true + stdcpplatest + ..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories) + opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies) + + + + + Level3 + true + GLEW_STATIC + true + stdcpplatest + ..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories) + + + Console + true + ..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories) + opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + GLEW_STATIC + true + stdcpplatest + ..\glew\include;..\SDL\include;..\SDL_image\include;..\;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ..\glew\lib\Debug\x64;%(AdditionalLibraryDirectories) + opengl32.lib;glu32.lib;glew32sd.lib;%(AdditionalDependencies) + + + + + + \ No newline at end of file diff --git a/vs/pathfinding_demo/pathfinding_demo.vcxproj.filters b/vs/pathfinding_demo/pathfinding_demo.vcxproj.filters new file mode 100644 index 0000000..fca6151 --- /dev/null +++ b/vs/pathfinding_demo/pathfinding_demo.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/vs/pathfinding_demo/pathfinding_demo.vcxproj.user b/vs/pathfinding_demo/pathfinding_demo.vcxproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/vs/pathfinding_demo/pathfinding_demo.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From aa52ff9f8ec37430b9bf1f58725738550e3bc231 Mon Sep 17 00:00:00 2001 From: Mrna Date: Tue, 7 Oct 2025 10:12:47 +0200 Subject: [PATCH 7/7] Fixed working dir for windows binary --- .../pathfinding_demo.vcxproj.user | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/vs/pathfinding_demo/pathfinding_demo.vcxproj.user b/vs/pathfinding_demo/pathfinding_demo.vcxproj.user index 0f14913..fcaf9b4 100644 --- a/vs/pathfinding_demo/pathfinding_demo.vcxproj.user +++ b/vs/pathfinding_demo/pathfinding_demo.vcxproj.user @@ -1,4 +1,19 @@  - + + $(ProjectDir)\..\..\cpp + WindowsLocalDebugger + + + $(ProjectDir)\..\..\cpp + WindowsLocalDebugger + + + $(ProjectDir)\..\..\cpp + WindowsLocalDebugger + + + $(ProjectDir)\..\..\cpp + WindowsLocalDebugger + \ No newline at end of file