From b1914666d5de139a532df499f55762583ff7bbad Mon Sep 17 00:00:00 2001 From: Canberk Pitirli Date: Sun, 1 Nov 2026 13:22:03 +0300 Subject: [PATCH 1/4] fix: make vector subscript constexpr for msvc --- include/public/Math/Vector.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/public/Math/Vector.hpp b/include/public/Math/Vector.hpp index ad3ae8a8..d3c500b5 100644 --- a/include/public/Math/Vector.hpp +++ b/include/public/Math/Vector.hpp @@ -43,13 +43,13 @@ namespace Sleak } // Access elements (read/write) - [[nodiscard]] T& operator[](size_t index) { + [[nodiscard]] constexpr T& operator[](size_t index) { assert(index < N && "Vector index out of range"); return data[index]; } // Read-only access - [[nodiscard]] const T& operator[](size_t index) const { + [[nodiscard]] constexpr const T& operator[](size_t index) const { assert(index < N && "Vector index out of range"); return data[index]; } From dd6dd6a929a9a7401b219e1d8ec78ded04933295 Mon Sep 17 00:00:00 2001 From: Canberk Pitirli Date: Sun, 1 Nov 2026 13:22:03 +0300 Subject: [PATCH 2/4] fix: fall back when the d3d11 debug layer is missing --- src/Graphics/DirectX11/DirectX11Renderer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Graphics/DirectX11/DirectX11Renderer.cpp b/src/Graphics/DirectX11/DirectX11Renderer.cpp index e9b1a4bc..cdffe40f 100644 --- a/src/Graphics/DirectX11/DirectX11Renderer.cpp +++ b/src/Graphics/DirectX11/DirectX11Renderer.cpp @@ -115,7 +115,19 @@ bool DirectX11Renderer::Initialize() { &deviceContext // Device context ); +#ifdef _DEBUG + if (hr == DXGI_ERROR_SDK_COMPONENT_MISSING) { + SLEAK_WARN("D3D11 debug layer is not installed, creating device without it"); + createDeviceFlags &= ~D3D11_CREATE_DEVICE_DEBUG; + hr = D3D11CreateDeviceAndSwapChain( + nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, + featureLevels, 1, D3D11_SDK_VERSION, &swapChainDesc, &swapChain, + &device, nullptr, &deviceContext); + } +#endif + if (FAILED(hr)) { + SLEAK_ERROR("Failed to create device and swap chain! HRESULT: 0x{:X}", (unsigned)hr); return false; } From 2f1b2d175064789539b19fb21e080bcc2d8a8733 Mon Sep 17 00:00:00 2001 From: Canberk Pitirli Date: Sun, 1 Nov 2026 13:26:55 +0300 Subject: [PATCH 3/4] style: format changed lines --- include/public/Math/Vector.hpp | 2 +- src/Graphics/DirectX11/DirectX11Renderer.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/public/Math/Vector.hpp b/include/public/Math/Vector.hpp index d3c500b5..bf256e56 100644 --- a/include/public/Math/Vector.hpp +++ b/include/public/Math/Vector.hpp @@ -53,7 +53,7 @@ namespace Sleak assert(index < N && "Vector index out of range"); return data[index]; } - + // Basic operations Vector operator+(const Vector& other) const { Vector result; diff --git a/src/Graphics/DirectX11/DirectX11Renderer.cpp b/src/Graphics/DirectX11/DirectX11Renderer.cpp index cdffe40f..3d96421b 100644 --- a/src/Graphics/DirectX11/DirectX11Renderer.cpp +++ b/src/Graphics/DirectX11/DirectX11Renderer.cpp @@ -117,7 +117,8 @@ bool DirectX11Renderer::Initialize() { #ifdef _DEBUG if (hr == DXGI_ERROR_SDK_COMPONENT_MISSING) { - SLEAK_WARN("D3D11 debug layer is not installed, creating device without it"); + SLEAK_WARN( + "D3D11 debug layer is not installed, creating device without it"); createDeviceFlags &= ~D3D11_CREATE_DEVICE_DEBUG; hr = D3D11CreateDeviceAndSwapChain( nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, @@ -127,7 +128,8 @@ bool DirectX11Renderer::Initialize() { #endif if (FAILED(hr)) { - SLEAK_ERROR("Failed to create device and swap chain! HRESULT: 0x{:X}", (unsigned)hr); + SLEAK_ERROR("Failed to create device and swap chain! HRESULT: 0x{:X}", + (unsigned)hr); return false; } From f59f179ff08c010f38da0c056b0d0ddcf8f7bf75 Mon Sep 17 00:00:00 2001 From: Canberk Pitirli Date: Sun, 1 Nov 2026 13:26:56 +0300 Subject: [PATCH 4/4] ci: build the downstream game against this engine checkout --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed91db7d..e4545f31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -253,6 +253,11 @@ jobs: ref: ${{ github.base_ref }} path: SleakCraft + - name: Point the game at this engine revision + run: | + rm -rf SleakCraft/Engine + ln -s ../SleakEngine SleakCraft/Engine + - name: Install dependencies run: | sudo apt-get update