From 568cb0c1abf07b04f4946b5baf83498b5af3265b Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 5 Aug 2025 15:15:38 -0500 Subject: [PATCH] move subsystems to sub dirs --- src/base/base.c | 3 ++- src/base/base.h | 3 ++- src/base/win32/base_win32.c | 4 ---- src/base/win32/base_win32.h | 9 --------- src/dxc/dxc.cpp | 2 +- src/dxc/{dxc_core_win32.cpp => win32/dxc_win32.cpp} | 0 src/gpu/{ => dx12}/gpu_dx12.c | 0 src/gpu/{ => dx12}/gpu_dx12.h | 0 src/gpu/gpu.c | 2 +- src/gpu/gpu.h | 2 +- src/mp3/{ => mmf}/mp3_mmf.c | 0 src/mp3/mp3.c | 2 +- src/playback/playback.c | 2 +- src/playback/playback.h | 2 +- src/playback/{ => win32}/playback_win32.c | 0 src/playback/{ => win32}/playback_win32.h | 0 src/ttf/{ => dwrite}/ttf_dwrite.cpp | 0 src/ttf/{ => dwrite}/ttf_dwrite.h | 0 src/ttf/ttf.cpp | 2 +- src/ttf/ttf.h | 2 +- 20 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 src/base/win32/base_win32.c delete mode 100644 src/base/win32/base_win32.h rename src/dxc/{dxc_core_win32.cpp => win32/dxc_win32.cpp} (100%) rename src/gpu/{ => dx12}/gpu_dx12.c (100%) rename src/gpu/{ => dx12}/gpu_dx12.h (100%) rename src/mp3/{ => mmf}/mp3_mmf.c (100%) rename src/playback/{ => win32}/playback_win32.c (100%) rename src/playback/{ => win32}/playback_win32.h (100%) rename src/ttf/{ => dwrite}/ttf_dwrite.cpp (100%) rename src/ttf/{ => dwrite}/ttf_dwrite.h (100%) diff --git a/src/base/base.c b/src/base/base.c index d61ea8b8..2f6fd43d 100644 --- a/src/base/base.c +++ b/src/base/base.c @@ -13,7 +13,8 @@ #include "base_snc.c" #if PlatformIsWindows -# include "win32/base_win32.c" +#include "win32/base_win32_job.c" +#include "win32/base_win32_entry.c" #else # error Base layer platform backend not implemented #endif diff --git a/src/base/base.h b/src/base/base.h index f72a0429..ad8c77a8 100644 --- a/src/base/base.h +++ b/src/base/base.h @@ -32,7 +32,8 @@ inline void StartupBaseDeps(void) # include "base_incbin.h" # include "base_entry.h" #if PlatformIsWindows -# include "win32/base_win32.h" +# include "win32/base_win32_job.h" +# include "win32/base_win32_entry.h" #endif void BaseMain(void); diff --git a/src/base/win32/base_win32.c b/src/base/win32/base_win32.c deleted file mode 100644 index 6fcb625e..00000000 --- a/src/base/win32/base_win32.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "base_win32.h" - -#include "base_win32_job.c" -#include "base_win32_entry.c" diff --git a/src/base/win32/base_win32.h b/src/base/win32/base_win32.h deleted file mode 100644 index 73a46c67..00000000 --- a/src/base/win32/base_win32.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef BASE_WIN32_H -#define BASE_WIN32_H - -#include "../base.h" - -#include "base_win32_job.h" -#include "base_win32_entry.h" - -#endif diff --git a/src/dxc/dxc.cpp b/src/dxc/dxc.cpp index 31c48348..c0e91bda 100644 --- a/src/dxc/dxc.cpp +++ b/src/dxc/dxc.cpp @@ -4,7 +4,7 @@ extern "C" } #if PlatformIsWindows -# include "dxc_core_win32.cpp" +# include "win32/dxc_win32.cpp" #else # error Dxc core not implemented for this platform #endif diff --git a/src/dxc/dxc_core_win32.cpp b/src/dxc/win32/dxc_win32.cpp similarity index 100% rename from src/dxc/dxc_core_win32.cpp rename to src/dxc/win32/dxc_win32.cpp diff --git a/src/gpu/gpu_dx12.c b/src/gpu/dx12/gpu_dx12.c similarity index 100% rename from src/gpu/gpu_dx12.c rename to src/gpu/dx12/gpu_dx12.c diff --git a/src/gpu/gpu_dx12.h b/src/gpu/dx12/gpu_dx12.h similarity index 100% rename from src/gpu/gpu_dx12.h rename to src/gpu/dx12/gpu_dx12.h diff --git a/src/gpu/gpu.c b/src/gpu/gpu.c index f5a905c0..0a7b593a 100644 --- a/src/gpu/gpu.c +++ b/src/gpu/gpu.c @@ -3,7 +3,7 @@ #include "../kernel/kernel.h" #if PlatformIsWindows -# include "gpu_dx12.c" +# include "dx12/gpu_dx12.c" #else # error Gpu layer not implemented for this platform #endif diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index 68e9e227..5785eb6f 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -29,7 +29,7 @@ inline void GPU_StartupDeps(void) #include "gpu_core.h" #if PlatformIsWindows -# include "gpu_dx12.h" +# include "dx12/gpu_dx12.h" #endif void GPU_Main(void); diff --git a/src/mp3/mp3_mmf.c b/src/mp3/mmf/mp3_mmf.c similarity index 100% rename from src/mp3/mp3_mmf.c rename to src/mp3/mmf/mp3_mmf.c diff --git a/src/mp3/mp3.c b/src/mp3/mp3.c index 71649eb2..2e8aaf9e 100644 --- a/src/mp3/mp3.c +++ b/src/mp3/mp3.c @@ -1,7 +1,7 @@ #include "mp3.h" #if PlatformIsWindows -# include "mp3_mmf.c" +# include "mmf/mp3_mmf.c" #else # error Mp3 core not implemented for this platform #endif diff --git a/src/playback/playback.c b/src/playback/playback.c index 70e0ffdc..85426918 100644 --- a/src/playback/playback.c +++ b/src/playback/playback.c @@ -1,7 +1,7 @@ #include "playback.h" #if PlatformIsWindows -# include "playback_win32.c" +# include "win32/playback_win32.c" #else # error Playback core not implemented for this platform #endif diff --git a/src/playback/playback.h b/src/playback/playback.h index 8976fc8c..2d9441b7 100644 --- a/src/playback/playback.h +++ b/src/playback/playback.h @@ -19,7 +19,7 @@ inline void PB_StartupDeps(void) #include "playback_core.h" #if PlatformIsWindows -# include "playback_win32.h" +# include "win32/playback_win32.h" #endif void PB_Main(void); diff --git a/src/playback/playback_win32.c b/src/playback/win32/playback_win32.c similarity index 100% rename from src/playback/playback_win32.c rename to src/playback/win32/playback_win32.c diff --git a/src/playback/playback_win32.h b/src/playback/win32/playback_win32.h similarity index 100% rename from src/playback/playback_win32.h rename to src/playback/win32/playback_win32.h diff --git a/src/ttf/ttf_dwrite.cpp b/src/ttf/dwrite/ttf_dwrite.cpp similarity index 100% rename from src/ttf/ttf_dwrite.cpp rename to src/ttf/dwrite/ttf_dwrite.cpp diff --git a/src/ttf/ttf_dwrite.h b/src/ttf/dwrite/ttf_dwrite.h similarity index 100% rename from src/ttf/ttf_dwrite.h rename to src/ttf/dwrite/ttf_dwrite.h diff --git a/src/ttf/ttf.cpp b/src/ttf/ttf.cpp index 034c448e..bcc33083 100644 --- a/src/ttf/ttf.cpp +++ b/src/ttf/ttf.cpp @@ -4,7 +4,7 @@ extern "C" } #if PlatformIsWindows -# include "ttf_dwrite.cpp" +# include "dwrite/ttf_dwrite.cpp" #else # error TTF not implemented for this platform #endif diff --git a/src/ttf/ttf.h b/src/ttf/ttf.h index 5d368f0a..27fe12ac 100644 --- a/src/ttf/ttf.h +++ b/src/ttf/ttf.h @@ -15,7 +15,7 @@ inline void TTF_StartupDeps(void) #include "ttf_core.h" #if PlatformIsWindows -# include "ttf_dwrite.h" +# include "dwrite/ttf_dwrite.h" #endif void TTF_Main(void);