From aaf62488702a7e9b0f2e32884f901cb26d49ff63 Mon Sep 17 00:00:00 2001 From: Joseph Aquino Date: Fri, 26 Dec 2025 14:59:46 -0500 Subject: [PATCH] build system update -sfml now downloads and builds from source automatically -sfml now statically links on linux --- .gitignore | 4 + Create-Solution.bat | 1 + build-ninja.sh | 4 +- build.sh | 2 +- premake5.lua | 121 +- vendor/SFML/include/SFML/Audio.hpp | 55 - .../SFML/include/SFML/Audio/AudioResource.hpp | 93 -- vendor/SFML/include/SFML/Audio/Export.hpp | 44 - .../include/SFML/Audio/InputSoundFile.hpp | 336 ------ vendor/SFML/include/SFML/Audio/Listener.hpp | 234 ---- vendor/SFML/include/SFML/Audio/Music.hpp | 377 ------ .../include/SFML/Audio/OutputSoundFile.hpp | 147 --- .../include/SFML/Audio/PlaybackDevice.hpp | 110 -- vendor/SFML/include/SFML/Audio/Sound.hpp | 284 ----- .../SFML/include/SFML/Audio/SoundBuffer.hpp | 451 -------- .../SFML/Audio/SoundBufferRecorder.hpp | 149 --- .../SFML/include/SFML/Audio/SoundChannel.hpp | 65 -- .../include/SFML/Audio/SoundFileFactory.hpp | 200 ---- .../include/SFML/Audio/SoundFileFactory.inl | 96 -- .../include/SFML/Audio/SoundFileReader.hpp | 167 --- .../include/SFML/Audio/SoundFileWriter.hpp | 130 --- .../SFML/include/SFML/Audio/SoundRecorder.hpp | 362 ------ .../SFML/include/SFML/Audio/SoundSource.hpp | 686 ----------- .../SFML/include/SFML/Audio/SoundStream.hpp | 385 ------- vendor/SFML/include/SFML/Config.hpp | 164 --- vendor/SFML/include/SFML/GpuPreference.hpp | 70 -- vendor/SFML/include/SFML/Graphics.hpp | 67 -- .../SFML/include/SFML/Graphics/BlendMode.hpp | 220 ---- .../include/SFML/Graphics/CircleShape.hpp | 165 --- vendor/SFML/include/SFML/Graphics/Color.hpp | 274 ----- vendor/SFML/include/SFML/Graphics/Color.inl | 156 --- .../include/SFML/Graphics/ConvexShape.hpp | 155 --- .../include/SFML/Graphics/CoordinateType.hpp | 43 - .../SFML/include/SFML/Graphics/Drawable.hpp | 120 -- vendor/SFML/include/SFML/Graphics/Export.hpp | 44 - vendor/SFML/include/SFML/Graphics/Font.hpp | 529 --------- vendor/SFML/include/SFML/Graphics/Glsl.hpp | 224 ---- vendor/SFML/include/SFML/Graphics/Glsl.inl | 177 --- vendor/SFML/include/SFML/Graphics/Glyph.hpp | 67 -- vendor/SFML/include/SFML/Graphics/Image.hpp | 417 ------- .../include/SFML/Graphics/PrimitiveType.hpp | 48 - vendor/SFML/include/SFML/Graphics/Rect.hpp | 203 ---- vendor/SFML/include/SFML/Graphics/Rect.inl | 130 --- .../include/SFML/Graphics/RectangleShape.hpp | 143 --- .../include/SFML/Graphics/RenderStates.hpp | 191 --- .../include/SFML/Graphics/RenderTarget.hpp | 606 ---------- .../include/SFML/Graphics/RenderTexture.hpp | 342 ------ .../include/SFML/Graphics/RenderWindow.hpp | 308 ----- vendor/SFML/include/SFML/Graphics/Shader.hpp | 1023 ----------------- vendor/SFML/include/SFML/Graphics/Shape.hpp | 357 ------ vendor/SFML/include/SFML/Graphics/Sprite.hpp | 278 ----- .../include/SFML/Graphics/StencilMode.hpp | 256 ----- vendor/SFML/include/SFML/Graphics/Text.hpp | 486 -------- vendor/SFML/include/SFML/Graphics/Texture.hpp | 874 -------------- .../SFML/include/SFML/Graphics/Transform.hpp | 393 ------- .../SFML/include/SFML/Graphics/Transform.inl | 236 ---- .../include/SFML/Graphics/Transformable.hpp | 340 ------ vendor/SFML/include/SFML/Graphics/Vertex.hpp | 122 -- .../include/SFML/Graphics/VertexArray.hpp | 221 ---- .../include/SFML/Graphics/VertexBuffer.hpp | 414 ------- vendor/SFML/include/SFML/Graphics/View.hpp | 357 ------ vendor/SFML/include/SFML/Main.hpp | 39 - vendor/SFML/include/SFML/Network.hpp | 51 - vendor/SFML/include/SFML/Network/Export.hpp | 44 - vendor/SFML/include/SFML/Network/Ftp.hpp | 629 ---------- vendor/SFML/include/SFML/Network/Http.hpp | 480 -------- .../SFML/include/SFML/Network/IpAddress.hpp | 297 ----- vendor/SFML/include/SFML/Network/Packet.hpp | 548 --------- vendor/SFML/include/SFML/Network/Socket.hpp | 229 ---- .../include/SFML/Network/SocketHandle.hpp | 52 - .../include/SFML/Network/SocketSelector.hpp | 273 ----- .../SFML/include/SFML/Network/TcpListener.hpp | 166 --- .../SFML/include/SFML/Network/TcpSocket.hpp | 317 ----- .../SFML/include/SFML/Network/UdpSocket.hpp | 293 ----- vendor/SFML/include/SFML/OpenGL.hpp | 78 -- vendor/SFML/include/SFML/System.hpp | 55 - vendor/SFML/include/SFML/System/Angle.hpp | 511 -------- vendor/SFML/include/SFML/System/Angle.inl | 274 ----- vendor/SFML/include/SFML/System/Clock.hpp | 196 ---- vendor/SFML/include/SFML/System/Err.hpp | 77 -- vendor/SFML/include/SFML/System/Exception.hpp | 46 - vendor/SFML/include/SFML/System/Export.hpp | 44 - .../include/SFML/System/FileInputStream.hpp | 212 ---- .../SFML/include/SFML/System/InputStream.hpp | 166 --- .../include/SFML/System/MemoryInputStream.hpp | 139 --- .../include/SFML/System/NativeActivity.hpp | 58 - vendor/SFML/include/SFML/System/Sleep.hpp | 57 - vendor/SFML/include/SFML/System/String.hpp | 700 ----------- vendor/SFML/include/SFML/System/String.inl | 64 -- .../include/SFML/System/SuspendAwareClock.hpp | 76 -- vendor/SFML/include/SFML/System/Time.hpp | 500 -------- vendor/SFML/include/SFML/System/Time.inl | 284 ----- vendor/SFML/include/SFML/System/Utf.hpp | 764 ------------ vendor/SFML/include/SFML/System/Utf.inl | 732 ------------ vendor/SFML/include/SFML/System/Vector2.hpp | 435 ------- vendor/SFML/include/SFML/System/Vector2.inl | 217 ---- vendor/SFML/include/SFML/System/Vector3.hpp | 356 ------ vendor/SFML/include/SFML/System/Vector3.inl | 214 ---- vendor/SFML/include/SFML/Window.hpp | 55 - vendor/SFML/include/SFML/Window/Clipboard.hpp | 114 -- vendor/SFML/include/SFML/Window/Context.hpp | 224 ---- .../include/SFML/Window/ContextSettings.hpp | 125 -- vendor/SFML/include/SFML/Window/Cursor.hpp | 303 ----- vendor/SFML/include/SFML/Window/Event.hpp | 442 ------- vendor/SFML/include/SFML/Window/Event.inl | 78 -- vendor/SFML/include/SFML/Window/Export.hpp | 44 - .../SFML/include/SFML/Window/GlResource.hpp | 122 -- vendor/SFML/include/SFML/Window/Joystick.hpp | 213 ---- vendor/SFML/include/SFML/Window/Keyboard.hpp | 475 -------- vendor/SFML/include/SFML/Window/Mouse.hpp | 183 --- vendor/SFML/include/SFML/Window/Sensor.hpp | 139 --- vendor/SFML/include/SFML/Window/Touch.hpp | 131 --- vendor/SFML/include/SFML/Window/VideoMode.hpp | 224 ---- vendor/SFML/include/SFML/Window/Vulkan.hpp | 112 -- vendor/SFML/include/SFML/Window/Window.hpp | 422 ------- .../SFML/include/SFML/Window/WindowBase.hpp | 653 ----------- .../SFML/include/SFML/Window/WindowBase.inl | 112 -- .../SFML/include/SFML/Window/WindowEnums.hpp | 60 - .../SFML/include/SFML/Window/WindowHandle.hpp | 98 -- vendor/SFML/lib/FLAC.lib | Bin 762682 -> 0 bytes vendor/SFML/lib/FLACd.lib | Bin 1919282 -> 0 bytes vendor/SFML/lib/freetype.lib | Bin 1903438 -> 0 bytes vendor/SFML/lib/freetyped.lib | Bin 3694878 -> 0 bytes vendor/SFML/lib/ogg.lib | Bin 49622 -> 0 bytes vendor/SFML/lib/oggd.lib | Bin 80034 -> 0 bytes vendor/SFML/lib/sfml-audio-s-d.lib | Bin 18611208 -> 0 bytes vendor/SFML/lib/sfml-audio-s.lib | Bin 4731018 -> 0 bytes vendor/SFML/lib/sfml-graphics-s-d.lib | Bin 16135900 -> 0 bytes vendor/SFML/lib/sfml-graphics-s.lib | Bin 3646598 -> 0 bytes vendor/SFML/lib/sfml-main-d.lib | Bin 16422 -> 0 bytes vendor/SFML/lib/sfml-main.lib | Bin 1392 -> 0 bytes vendor/SFML/lib/sfml-network-s-d.lib | Bin 7211876 -> 0 bytes vendor/SFML/lib/sfml-network-s.lib | Bin 1996380 -> 0 bytes vendor/SFML/lib/sfml-system-s-d.lib | Bin 2683384 -> 0 bytes vendor/SFML/lib/sfml-system-s.lib | Bin 606082 -> 0 bytes vendor/SFML/lib/sfml-window-s-d.lib | Bin 11547774 -> 0 bytes vendor/SFML/lib/sfml-window-s.lib | Bin 2268398 -> 0 bytes vendor/SFML/lib/vorbis.lib | Bin 1062762 -> 0 bytes vendor/SFML/lib/vorbisd.lib | Bin 1415258 -> 0 bytes vendor/SFML/lib/vorbisenc.lib | Bin 696406 -> 0 bytes vendor/SFML/lib/vorbisencd.lib | Bin 855172 -> 0 bytes vendor/SFML/lib/vorbisfile.lib | Bin 65076 -> 0 bytes vendor/SFML/lib/vorbisfiled.lib | Bin 93846 -> 0 bytes vendor/SFML/license.md | 9 - vendor/SFML/readme.md | 79 -- vendor/premake5/ninja/README.md | 3 +- vendor/premake5/ninja/_manifest.lua | 4 +- vendor/premake5/ninja/_preload.lua | 87 +- vendor/premake5/ninja/ninja.lua | 648 +++++------ 149 files changed, 413 insertions(+), 29142 deletions(-) delete mode 100644 vendor/SFML/include/SFML/Audio.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/AudioResource.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/Export.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/InputSoundFile.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/Listener.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/Music.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/OutputSoundFile.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/PlaybackDevice.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/Sound.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundBuffer.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundBufferRecorder.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundChannel.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundFileFactory.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundFileFactory.inl delete mode 100644 vendor/SFML/include/SFML/Audio/SoundFileReader.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundFileWriter.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundRecorder.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundSource.hpp delete mode 100644 vendor/SFML/include/SFML/Audio/SoundStream.hpp delete mode 100644 vendor/SFML/include/SFML/Config.hpp delete mode 100644 vendor/SFML/include/SFML/GpuPreference.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/BlendMode.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/CircleShape.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Color.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Color.inl delete mode 100644 vendor/SFML/include/SFML/Graphics/ConvexShape.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/CoordinateType.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Drawable.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Export.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Font.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Glsl.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Glsl.inl delete mode 100644 vendor/SFML/include/SFML/Graphics/Glyph.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Image.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/PrimitiveType.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Rect.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Rect.inl delete mode 100644 vendor/SFML/include/SFML/Graphics/RectangleShape.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/RenderStates.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/RenderTarget.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/RenderTexture.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/RenderWindow.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Shader.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Shape.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Sprite.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/StencilMode.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Text.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Texture.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Transform.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Transform.inl delete mode 100644 vendor/SFML/include/SFML/Graphics/Transformable.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/Vertex.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/VertexArray.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/VertexBuffer.hpp delete mode 100644 vendor/SFML/include/SFML/Graphics/View.hpp delete mode 100644 vendor/SFML/include/SFML/Main.hpp delete mode 100644 vendor/SFML/include/SFML/Network.hpp delete mode 100644 vendor/SFML/include/SFML/Network/Export.hpp delete mode 100644 vendor/SFML/include/SFML/Network/Ftp.hpp delete mode 100644 vendor/SFML/include/SFML/Network/Http.hpp delete mode 100644 vendor/SFML/include/SFML/Network/IpAddress.hpp delete mode 100644 vendor/SFML/include/SFML/Network/Packet.hpp delete mode 100644 vendor/SFML/include/SFML/Network/Socket.hpp delete mode 100644 vendor/SFML/include/SFML/Network/SocketHandle.hpp delete mode 100644 vendor/SFML/include/SFML/Network/SocketSelector.hpp delete mode 100644 vendor/SFML/include/SFML/Network/TcpListener.hpp delete mode 100644 vendor/SFML/include/SFML/Network/TcpSocket.hpp delete mode 100644 vendor/SFML/include/SFML/Network/UdpSocket.hpp delete mode 100644 vendor/SFML/include/SFML/OpenGL.hpp delete mode 100644 vendor/SFML/include/SFML/System.hpp delete mode 100644 vendor/SFML/include/SFML/System/Angle.hpp delete mode 100644 vendor/SFML/include/SFML/System/Angle.inl delete mode 100644 vendor/SFML/include/SFML/System/Clock.hpp delete mode 100644 vendor/SFML/include/SFML/System/Err.hpp delete mode 100644 vendor/SFML/include/SFML/System/Exception.hpp delete mode 100644 vendor/SFML/include/SFML/System/Export.hpp delete mode 100644 vendor/SFML/include/SFML/System/FileInputStream.hpp delete mode 100644 vendor/SFML/include/SFML/System/InputStream.hpp delete mode 100644 vendor/SFML/include/SFML/System/MemoryInputStream.hpp delete mode 100644 vendor/SFML/include/SFML/System/NativeActivity.hpp delete mode 100644 vendor/SFML/include/SFML/System/Sleep.hpp delete mode 100644 vendor/SFML/include/SFML/System/String.hpp delete mode 100644 vendor/SFML/include/SFML/System/String.inl delete mode 100644 vendor/SFML/include/SFML/System/SuspendAwareClock.hpp delete mode 100644 vendor/SFML/include/SFML/System/Time.hpp delete mode 100644 vendor/SFML/include/SFML/System/Time.inl delete mode 100644 vendor/SFML/include/SFML/System/Utf.hpp delete mode 100644 vendor/SFML/include/SFML/System/Utf.inl delete mode 100644 vendor/SFML/include/SFML/System/Vector2.hpp delete mode 100644 vendor/SFML/include/SFML/System/Vector2.inl delete mode 100644 vendor/SFML/include/SFML/System/Vector3.hpp delete mode 100644 vendor/SFML/include/SFML/System/Vector3.inl delete mode 100644 vendor/SFML/include/SFML/Window.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Clipboard.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Context.hpp delete mode 100644 vendor/SFML/include/SFML/Window/ContextSettings.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Cursor.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Event.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Event.inl delete mode 100644 vendor/SFML/include/SFML/Window/Export.hpp delete mode 100644 vendor/SFML/include/SFML/Window/GlResource.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Joystick.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Keyboard.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Mouse.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Sensor.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Touch.hpp delete mode 100644 vendor/SFML/include/SFML/Window/VideoMode.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Vulkan.hpp delete mode 100644 vendor/SFML/include/SFML/Window/Window.hpp delete mode 100644 vendor/SFML/include/SFML/Window/WindowBase.hpp delete mode 100644 vendor/SFML/include/SFML/Window/WindowBase.inl delete mode 100644 vendor/SFML/include/SFML/Window/WindowEnums.hpp delete mode 100644 vendor/SFML/include/SFML/Window/WindowHandle.hpp delete mode 100644 vendor/SFML/lib/FLAC.lib delete mode 100644 vendor/SFML/lib/FLACd.lib delete mode 100644 vendor/SFML/lib/freetype.lib delete mode 100644 vendor/SFML/lib/freetyped.lib delete mode 100644 vendor/SFML/lib/ogg.lib delete mode 100644 vendor/SFML/lib/oggd.lib delete mode 100644 vendor/SFML/lib/sfml-audio-s-d.lib delete mode 100644 vendor/SFML/lib/sfml-audio-s.lib delete mode 100644 vendor/SFML/lib/sfml-graphics-s-d.lib delete mode 100644 vendor/SFML/lib/sfml-graphics-s.lib delete mode 100644 vendor/SFML/lib/sfml-main-d.lib delete mode 100644 vendor/SFML/lib/sfml-main.lib delete mode 100644 vendor/SFML/lib/sfml-network-s-d.lib delete mode 100644 vendor/SFML/lib/sfml-network-s.lib delete mode 100644 vendor/SFML/lib/sfml-system-s-d.lib delete mode 100644 vendor/SFML/lib/sfml-system-s.lib delete mode 100644 vendor/SFML/lib/sfml-window-s-d.lib delete mode 100644 vendor/SFML/lib/sfml-window-s.lib delete mode 100644 vendor/SFML/lib/vorbis.lib delete mode 100644 vendor/SFML/lib/vorbisd.lib delete mode 100644 vendor/SFML/lib/vorbisenc.lib delete mode 100644 vendor/SFML/lib/vorbisencd.lib delete mode 100644 vendor/SFML/lib/vorbisfile.lib delete mode 100644 vendor/SFML/lib/vorbisfiled.lib delete mode 100644 vendor/SFML/license.md delete mode 100644 vendor/SFML/readme.md diff --git a/.gitignore b/.gitignore index 4ef6152..10e08ef 100644 --- a/.gitignore +++ b/.gitignore @@ -385,6 +385,10 @@ Makefile *.ninja* +vendor/SFML/ + +.run/ + .idea/ Engine-Core/lib diff --git a/Create-Solution.bat b/Create-Solution.bat index 2cd4d72..48b428c 100644 --- a/Create-Solution.bat +++ b/Create-Solution.bat @@ -1,2 +1,3 @@ +echo SFML will be downloaded and built from source, this may take a while depending on your system. .\vendor\premake5\premake5.exe vs2022 PAUSE \ No newline at end of file diff --git a/build-ninja.sh b/build-ninja.sh index c4a2877..142d489 100755 --- a/build-ninja.sh +++ b/build-ninja.sh @@ -1,4 +1,4 @@ #! /bin/bash - -./vendor/premake5/premake5 ninja +echo SFML will be downloaded and built from source, this may take a while depending on your system. +./vendor/premake5/premake5 premake-ninja ninja $1 diff --git a/build.sh b/build.sh index 8b3a4e6..4bfb75e 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #! /bin/bash - +echo SFML will be downloaded and built from source, this may take a while depending on your system. ./vendor/premake5/premake5 gmake make config=$1 diff --git a/premake5.lua b/premake5.lua index f497dbb..c39d918 100644 --- a/premake5.lua +++ b/premake5.lua @@ -4,31 +4,67 @@ require "ninja/ninja" workspace "snake" architecture "x64" - output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" - vs_intdir = "!$(SolutionDir)intermediate-files/" .. output_dir - intdir = "%{wks.location}/intermediate-files/" .. output_dir - vs_bindir = "$(SolutionDir)bin/" .. output_dir - bindir = "%{wks.location}/bin/" .. output_dir - vs_coreinclude_dir = "$(SolutionDir)include" - vs_sfmldir = "$(SolutionDir)vendor/SFML" - sfmldir = "%{wks.location}/vendor/SFML" - vs_imguidir = "$(SolutionDir)vendor/imgui" - imguidir = "%{wks.location}/vendor/imgui" - vs_include_dir = "$(SolutionDir)include" - include_dir = "%{wks.location}/include" - configurations { "Debug", "Release" } + prebuildcommands { + "git clone https://github.com/SFML/SFML.git vendor/SFML", + "cd vendor/SFML && git checkout 3.0.2", + } + + filter "action:vs*" + prebuildcommands + { + "cd vendor/SFML && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DSFML_BUILD_AUDIO=1 -DSFML_BUILD_GRAPHICS=1 -DSFML_BUILD_WINDOW=1 -DSFML_USE_STATIC_STD_LIBS=1 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=./lib" + } + project_dir = "$(SolutionDir)" + + filter "action:gmake" + prebuildcommands + { + "cd vendor/SFML && cmake -S . -B build -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DSFML_BUILD_AUDIO=1 -DSFML_BUILD_GRAPHICS=1 -DSFML_BUILD_WINDOW=1", + "cd vendor/SFML && cmake --build build" + } + project_dir = "%{wks.location}/" + + + filter "action:premake-ninja" + prebuildcommands + { + "cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DSFML_BUILD_AUDIO=1 -DSFML_BUILD_GRAPHICS=1 -DSFML_BUILD_WINDOW=1", + "cmake --build build" + } + project_dir = "%{wks.location}/" + filter"" + project "snake" + output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" + intdir = project_dir .. "intermediate-files/" .. output_dir + bindir = project_dir .. "bin/" .. output_dir + sfmldir = project_dir .. "vendor/SFML" + imguidir = project_dir .. "vendor/imgui" + include_dir = project_dir .. "include" + language "C++" cppdialect "C++20" systemversion "latest" kind "WindowedApp" targetname "snake" + targetdir (bindir) + objdir (intdir) + debugdir (project_dir) + includedirs + { + "src", + include_dir, + sfmldir .. "/include", + imguidir + } + + libdirs (sfmldir .. "/build/lib") files { @@ -41,36 +77,6 @@ workspace "snake" "vendor/imgui/imgui_widgets.cpp", "vendor/imgui/imgui-SFML.cpp" } - - --visual studio-- - filter {"action:vs*", "system:windows"} - targetdir (vs_bindir) - objdir (vs_intdir) - debugdir "$(SolutionDir)" - includedirs - { - "src", - vs_include_dir, - vs_sfmldir .. "/include", - vs_imguidir - } - - libdirs {vs_sfmldir .."/lib"} - - --not visual studio -- - filter {"not action:vs*", "system:windows"} - targetdir (bindir) - objdir (intdir) - debugdir "%{wks.location}" - includedirs - { - "src", - include_dir, - sfmldir .. "/include", - imguidir - } - - libdirs {sfmldir .."/lib"} --windows specific settings-- filter{"system:windows"} @@ -119,22 +125,25 @@ workspace "snake" --linux specific settings-- filter {"system:linux"} defines {"PLATFORM_LINUX"} - targetdir (bindir) - objdir (intdir) - debugdir "%{wks.location}" - includedirs - { - "src", - include_dir, - imguidir - } links { - "sfml-graphics", - "sfml-window", - "sfml-audio", - "sfml-system", + "sfml-graphics-s", + "sfml-window-s", + "sfml-audio-s", + "sfml-system-s", + "Xi", + "Xrandr", + "Xcursor", + "freetype", + "X11", + "udev", + "FLAC", + "ogg", + "vorbis", + "vorbisenc", + "vorbisfile", + "pthread", "OpenGL", } diff --git a/vendor/SFML/include/SFML/Audio.hpp b/vendor/SFML/include/SFML/Audio.hpp deleted file mode 100644 index 50668fd..0000000 --- a/vendor/SFML/include/SFML/Audio.hpp +++ /dev/null @@ -1,55 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -//////////////////////////////////////////////////////////// -/// \defgroup audio Audio module -/// -/// Sounds, streaming (musics or custom sources), recording, -/// spatialization. -/// -//////////////////////////////////////////////////////////// diff --git a/vendor/SFML/include/SFML/Audio/AudioResource.hpp b/vendor/SFML/include/SFML/Audio/AudioResource.hpp deleted file mode 100644 index b75840c..0000000 --- a/vendor/SFML/include/SFML/Audio/AudioResource.hpp +++ /dev/null @@ -1,93 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include - -#include - - -namespace sf -{ -//////////////////////////////////////////////////////////// -/// \brief Base class for classes that require an audio device -/// -//////////////////////////////////////////////////////////// -class SFML_AUDIO_API AudioResource -{ -public: - //////////////////////////////////////////////////////////// - /// \brief Copy constructor - /// - //////////////////////////////////////////////////////////// - AudioResource(const AudioResource&) = default; - - //////////////////////////////////////////////////////////// - /// \brief Copy assignment - /// - //////////////////////////////////////////////////////////// - AudioResource& operator=(const AudioResource&) = default; - - //////////////////////////////////////////////////////////// - /// \brief Move constructor - /// - //////////////////////////////////////////////////////////// - AudioResource(AudioResource&&) noexcept = default; - - //////////////////////////////////////////////////////////// - /// \brief Move assignment - /// - //////////////////////////////////////////////////////////// - AudioResource& operator=(AudioResource&&) noexcept = default; - -protected: - //////////////////////////////////////////////////////////// - /// \brief Default constructor - /// - //////////////////////////////////////////////////////////// - AudioResource(); - -private: - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// - std::shared_ptr m_device; //!< Sound device -}; - -} // namespace sf - - -//////////////////////////////////////////////////////////// -/// \class sf::AudioResource -/// \ingroup audio -/// -/// This class is for internal use only, it must be the base -/// of every class that requires a valid audio device in -/// order to work. -/// -//////////////////////////////////////////////////////////// diff --git a/vendor/SFML/include/SFML/Audio/Export.hpp b/vendor/SFML/include/SFML/Audio/Export.hpp deleted file mode 100644 index 4cf99c1..0000000 --- a/vendor/SFML/include/SFML/Audio/Export.hpp +++ /dev/null @@ -1,44 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include - - -//////////////////////////////////////////////////////////// -// Portable import / export macros -//////////////////////////////////////////////////////////// -#if defined(SFML_AUDIO_EXPORTS) - -#define SFML_AUDIO_API SFML_API_EXPORT - -#else - -#define SFML_AUDIO_API SFML_API_IMPORT - -#endif diff --git a/vendor/SFML/include/SFML/Audio/InputSoundFile.hpp b/vendor/SFML/include/SFML/Audio/InputSoundFile.hpp deleted file mode 100644 index 253ed63..0000000 --- a/vendor/SFML/include/SFML/Audio/InputSoundFile.hpp +++ /dev/null @@ -1,336 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include - -#include - -#include -#include -#include - -#include -#include - - -namespace sf -{ -class Time; -class InputStream; - -//////////////////////////////////////////////////////////// -/// \brief Provide read access to sound files -/// -//////////////////////////////////////////////////////////// -class SFML_AUDIO_API InputSoundFile -{ -public: - //////////////////////////////////////////////////////////// - /// \brief Default constructor - /// - /// Construct an input sound file that is not associated - /// with a file to read. - /// - //////////////////////////////////////////////////////////// - InputSoundFile() = default; - - //////////////////////////////////////////////////////////// - /// \brief Construct a sound file from the disk for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC, MP3. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// Because of minimp3_ex limitation, for MP3 files with big (>16kb) APEv2 tag, - /// it may not be properly removed, tag data will be treated as MP3 data - /// and there is a low chance of garbage decoded at the end of file. - /// See also: https://github.com/lieff/minimp3 - /// - /// \param filename Path of the sound file to load - /// - /// \throws sf::Exception if opening the file was unsuccessful - /// - //////////////////////////////////////////////////////////// - explicit InputSoundFile(const std::filesystem::path& filename); - - //////////////////////////////////////////////////////////// - /// \brief Construct a sound file in memory for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// \param data Pointer to the file data in memory - /// \param sizeInBytes Size of the data to load, in bytes - /// - /// \throws sf::Exception if opening the file was unsuccessful - /// - //////////////////////////////////////////////////////////// - InputSoundFile(const void* data, std::size_t sizeInBytes); - - //////////////////////////////////////////////////////////// - /// \brief Construct a sound file from a custom stream for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// \param stream Source stream to read from - /// - /// \throws sf::Exception if opening the file was unsuccessful - /// - //////////////////////////////////////////////////////////// - explicit InputSoundFile(InputStream& stream); - - //////////////////////////////////////////////////////////// - /// \brief Open a sound file from the disk for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC, MP3. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// Because of minimp3_ex limitation, for MP3 files with big (>16kb) APEv2 tag, - /// it may not be properly removed, tag data will be treated as MP3 data - /// and there is a low chance of garbage decoded at the end of file. - /// See also: https://github.com/lieff/minimp3 - /// - /// \param filename Path of the sound file to load - /// - /// \return `true` if the file was successfully opened - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] bool openFromFile(const std::filesystem::path& filename); - - //////////////////////////////////////////////////////////// - /// \brief Open a sound file in memory for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// \param data Pointer to the file data in memory - /// \param sizeInBytes Size of the data to load, in bytes - /// - /// \return `true` if the file was successfully opened - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] bool openFromMemory(const void* data, std::size_t sizeInBytes); - - //////////////////////////////////////////////////////////// - /// \brief Open a sound file from a custom stream for reading - /// - /// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC. - /// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit. - /// - /// \param stream Source stream to read from - /// - /// \return `true` if the file was successfully opened - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] bool openFromStream(InputStream& stream); - - //////////////////////////////////////////////////////////// - /// \brief Get the total number of audio samples in the file - /// - /// \return Number of samples - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] std::uint64_t getSampleCount() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the number of channels used by the sound - /// - /// \return Number of channels (1 = mono, 2 = stereo) - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] unsigned int getChannelCount() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the sample rate of the sound - /// - /// \return Sample rate, in samples per second - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] unsigned int getSampleRate() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the map of position in sample frame to sound channel - /// - /// This is used to map a sample in the sample stream to a - /// position during spatialization. - /// - /// \return Map of position in sample frame to sound channel - /// - /// \see `getSampleRate`, `getChannelCount`, `getDuration` - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] const std::vector& getChannelMap() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the total duration of the sound file - /// - /// This function is provided for convenience, the duration is - /// deduced from the other sound file attributes. - /// - /// \return Duration of the sound file - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] Time getDuration() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the read offset of the file in time - /// - /// \return Time position - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] Time getTimeOffset() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the read offset of the file in samples - /// - /// \return Sample position - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] std::uint64_t getSampleOffset() const; - - //////////////////////////////////////////////////////////// - /// \brief Change the current read position to the given sample offset - /// - /// This function takes a sample offset to provide maximum - /// precision. If you need to jump to a given time, use the - /// other overload. - /// - /// The sample offset takes the channels into account. - /// If you have a time offset instead, you can easily find - /// the corresponding sample offset with the following formula: - /// `timeInSeconds * sampleRate * channelCount` - /// If the given offset exceeds to total number of samples, - /// this function jumps to the end of the sound file. - /// - /// \param sampleOffset Index of the sample to jump to, relative to the beginning - /// - //////////////////////////////////////////////////////////// - void seek(std::uint64_t sampleOffset); - - //////////////////////////////////////////////////////////// - /// \brief Change the current read position to the given time offset - /// - /// Using a time offset is handy but imprecise. If you need an accurate - /// result, consider using the overload which takes a sample offset. - /// - /// If the given time exceeds to total duration, this function jumps - /// to the end of the sound file. - /// - /// \param timeOffset Time to jump to, relative to the beginning - /// - //////////////////////////////////////////////////////////// - void seek(Time timeOffset); - - //////////////////////////////////////////////////////////// - /// \brief Read audio samples from the open file - /// - /// \param samples Pointer to the sample array to fill - /// \param maxCount Maximum number of samples to read - /// - /// \return Number of samples actually read (may be less than \a maxCount) - /// - //////////////////////////////////////////////////////////// - [[nodiscard]] std::uint64_t read(std::int16_t* samples, std::uint64_t maxCount); - - //////////////////////////////////////////////////////////// - /// \brief Close the current file - /// - //////////////////////////////////////////////////////////// - void close(); - -private: - //////////////////////////////////////////////////////////// - /// \brief Deleter for input streams that only conditionally deletes - /// - //////////////////////////////////////////////////////////// - struct SFML_AUDIO_API StreamDeleter - { - StreamDeleter(bool theOwned); - - // To accept ownership transfer from usual std::unique_ptr - template - StreamDeleter(const std::default_delete&); - - void operator()(InputStream* ptr) const; - - bool owned{true}; - }; - - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// - std::unique_ptr m_reader; //!< Reader that handles I/O on the file's format - std::unique_ptr m_stream{nullptr, false}; //!< Input stream used to access the file's data - std::uint64_t m_sampleOffset{}; //!< Sample Read Position - std::uint64_t m_sampleCount{}; //!< Total number of samples in the file - unsigned int m_sampleRate{}; //!< Number of samples per second - std::vector m_channelMap; //!< The map of position in sample frame to sound channel -}; - -} // namespace sf - - -//////////////////////////////////////////////////////////// -/// \class sf::InputSoundFile -/// \ingroup audio -/// -/// This class decodes audio samples from a sound file. It is -/// used internally by higher-level classes such as `sf::SoundBuffer` -/// and `sf::Music`, but can also be useful if you want to process -/// or analyze audio files without playing them, or if you want to -/// implement your own version of `sf::Music` with more specific -/// features. -/// -/// Usage example: -/// \code -/// // Open a sound file -/// sf::InputSoundFile file("music.ogg"); -/// -/// // Print the sound attributes -/// std::cout << "duration: " << file.getDuration().asSeconds() << '\n' -/// << "channels: " << file.getChannelCount() << '\n' -/// << "sample rate: " << file.getSampleRate() << '\n' -/// << "sample count: " << file.getSampleCount() << std::endl; -/// -/// // Read and process batches of samples until the end of file is reached -/// std::array samples; -/// std::uint64_t count; -/// do -/// { -/// count = file.read(samples.data(), samples.size()); -/// -/// // process, analyze, play, convert, or whatever -/// // you want to do with the samples... -/// } -/// while (count > 0); -/// \endcode -/// -/// \see `sf::SoundFileReader`, `sf::OutputSoundFile` -/// -//////////////////////////////////////////////////////////// diff --git a/vendor/SFML/include/SFML/Audio/Listener.hpp b/vendor/SFML/include/SFML/Audio/Listener.hpp deleted file mode 100644 index 475b366..0000000 --- a/vendor/SFML/include/SFML/Audio/Listener.hpp +++ /dev/null @@ -1,234 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include - -#include -#include - - -//////////////////////////////////////////////////////////// -/// \brief The audio listener is the point in the scene -/// from where all the sounds are heard -/// -//////////////////////////////////////////////////////////// -namespace sf::Listener -{ -//////////////////////////////////////////////////////////// -/// \brief Structure defining the properties of a directional cone -/// -/// Sounds will play at gain 1 when they are positioned -/// within the inner angle of the cone. Sounds will play -/// at `outerGain` when they are positioned outside the -/// outer angle of the cone. The gain declines linearly -/// from 1 to `outerGain` as the sound moves from the inner -/// angle to the outer angle. -/// -//////////////////////////////////////////////////////////// -struct Cone -{ - Angle innerAngle; //!< Inner angle - Angle outerAngle; //!< Outer angle - float outerGain{}; //!< Outer gain -}; - -//////////////////////////////////////////////////////////// -/// \brief Change the global volume of all the sounds and musics -/// -/// `volume` is a number between 0 and 100; it is combined -/// with the individual volume of each sound / music. -/// The default value for the volume is 100 (maximum). -/// -/// \param volume New global volume, in the range [0, 100] -/// -/// \see `getGlobalVolume` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setGlobalVolume(float volume); - -//////////////////////////////////////////////////////////// -/// \brief Get the current value of the global volume -/// -/// \return Current global volume, in the range [0, 100] -/// -/// \see `setGlobalVolume` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API float getGlobalVolume(); - -//////////////////////////////////////////////////////////// -/// \brief Set the position of the listener in the scene -/// -/// The default listener's position is (0, 0, 0). -/// -/// \param position New listener's position -/// -/// \see `getPosition`, `setDirection` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setPosition(const Vector3f& position); - -//////////////////////////////////////////////////////////// -/// \brief Get the current position of the listener in the scene -/// -/// \return Listener's position -/// -/// \see `setPosition` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API Vector3f getPosition(); - -//////////////////////////////////////////////////////////// -/// \brief Set the forward vector of the listener in the scene -/// -/// The direction (also called "at vector") is the vector -/// pointing forward from the listener's perspective. Together -/// with the up vector, it defines the 3D orientation of the -/// listener in the scene. The direction vector doesn't -/// have to be normalized. -/// The default listener's direction is (0, 0, -1). -/// -/// \param direction New listener's direction -/// -/// \see `getDirection`, `setUpVector`, `setPosition` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setDirection(const Vector3f& direction); - -//////////////////////////////////////////////////////////// -/// \brief Get the current forward vector of the listener in the scene -/// -/// \return Listener's forward vector (not normalized) -/// -/// \see `setDirection` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API Vector3f getDirection(); - -//////////////////////////////////////////////////////////// -/// \brief Set the velocity of the listener in the scene -/// -/// The default listener's velocity is (0, 0, -1). -/// -/// \param velocity New listener's velocity -/// -/// \see `getVelocity`, `getDirection`, `setUpVector`, `setPosition` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setVelocity(const Vector3f& velocity); - -//////////////////////////////////////////////////////////// -/// \brief Get the current forward vector of the listener in the scene -/// -/// \return Listener's velocity -/// -/// \see `setVelocity` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API Vector3f getVelocity(); - -//////////////////////////////////////////////////////////// -/// \brief Set the cone properties of the listener in the audio scene -/// -/// The cone defines how directional attenuation is applied. -/// The default cone of a sound is (2 * PI, 2 * PI, 1). -/// -/// \param cone Cone properties of the listener in the scene -/// -/// \see `getCone` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setCone(const Listener::Cone& cone); - -//////////////////////////////////////////////////////////// -/// \brief Get the cone properties of the listener in the audio scene -/// -/// \return Cone properties of the listener -/// -/// \see `setCone` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API Listener::Cone getCone(); - -//////////////////////////////////////////////////////////// -/// \brief Set the upward vector of the listener in the scene -/// -/// The up vector is the vector that points upward from the -/// listener's perspective. Together with the direction, it -/// defines the 3D orientation of the listener in the scene. -/// The up vector doesn't have to be normalized. -/// The default listener's up vector is (0, 1, 0). It is usually -/// not necessary to change it, especially in 2D scenarios. -/// -/// \param upVector New listener's up vector -/// -/// \see `getUpVector`, `setDirection`, `setPosition` -/// -//////////////////////////////////////////////////////////// -SFML_AUDIO_API void setUpVector(const Vector3f& upVector); - -//////////////////////////////////////////////////////////// -/// \brief Get the current upward vector of the listener in the scene -/// -/// \return Listener's upward vector (not normalized) -/// -/// \see `setUpVector` -/// -//////////////////////////////////////////////////////////// -[[nodiscard]] SFML_AUDIO_API Vector3f getUpVector(); -} // namespace sf::Listener - - -//////////////////////////////////////////////////////////// -/// \namespace sf::Listener -/// \ingroup audio -/// -/// The audio listener defines the global properties of the -/// audio environment, it defines where and how sounds and musics -/// are heard. If `sf::View` is the eyes of the user, then -/// `sf::Listener` are their ears (by the way, they are often linked -/// together -- same position, orientation, etc.). -/// -/// `sf::Listener` is a simple interface, which allows to setup the -/// listener in the 3D audio environment (position, direction and -/// up vector), and to adjust the global volume. -/// -/// Usage example: -/// \code -/// // Move the listener to the position (1, 0, -5) -/// sf::Listener::setPosition({1, 0, -5}); -/// -/// // Make it face the right axis (1, 0, 0) -/// sf::Listener::setDirection({1, 0, 0}); -/// -/// // Reduce the global volume -/// sf::Listener::setGlobalVolume(50); -/// \endcode -/// -//////////////////////////////////////////////////////////// diff --git a/vendor/SFML/include/SFML/Audio/Music.hpp b/vendor/SFML/include/SFML/Audio/Music.hpp deleted file mode 100644 index c60acda..0000000 --- a/vendor/SFML/include/SFML/Audio/Music.hpp +++ /dev/null @@ -1,377 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#pragma once - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include - -#include - -#include -#include -#include - -#include -#include - - -namespace sf -{ -class Time; -class InputStream; -class InputSoundFile; - -//////////////////////////////////////////////////////////// -/// \brief Streamed music played from an audio file -/// -//////////////////////////////////////////////////////////// -class SFML_AUDIO_API Music : public SoundStream -{ -public: - //////////////////////////////////////////////////////////// - /// \brief Structure defining a time range using the template type - /// - //////////////////////////////////////////////////////////// - template - struct Span - { - T offset{}; //!< The beginning offset of the time range - T length{}; //!< The length of the time range - }; - - // Associated `Span` type - using TimeSpan = Span