From 97e7aa75a399f62f45ac9e6554059e0a1fd13cda Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 00:34:24 -0500 Subject: [PATCH 01/19] `ColorText.cpp`: remove unneeded headers --- library/ColorText.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/library/ColorText.cpp b/library/ColorText.cpp index bdd3e98f44..a101d795a9 100644 --- a/library/ColorText.cpp +++ b/library/ColorText.cpp @@ -35,24 +35,12 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#include -#include -#include -#include -#include -#include #include +#include +#include #include "ColorText.h" -#include "MiscUtils.h" - -#include -#include -#include -#include -using namespace std; using namespace DFHack; bool color_ostream::log_errors_to_stderr = false; @@ -81,7 +69,7 @@ void color_ostream::end_batch() flush_proxy(); } -color_ostream::color_ostream() : ostream(new buffer(this)), cur_color(COLOR_RESET) +color_ostream::color_ostream() : std::ostream(new buffer(this)), cur_color(COLOR_RESET) { // } From d5b1fcb4d6a0e673c8e8aaa4fdbb0fb437d136a1 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:21:29 -0500 Subject: [PATCH 02/19] dedup/sort/clean `Core.cpp` includes --- library/Core.cpp | 84 ++++++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/library/Core.cpp b/library/Core.cpp index 2deba390ff..d7824165c2 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -26,40 +26,43 @@ distribution. #include "Internal.h" -#include "Error.h" -#include "MemAccess.h" +#include "ColorText.h" +#include "Commands.h" +#include "Console.h" +#include "CoreDefs.h" #include "DataDefs.h" #include "Debug.h" -#include "Console.h" +#include "DFHackVersion.h" +#include "Error.h" +#include "Format.h" +#include "LuaTools.h" +#include "MemAccess.h" #include "MemoryPatcher.h" #include "MiscUtils.h" +#include "MiscUtils.h" #include "Module.h" -#include "VersionInfoFactory.h" -#include "VersionInfo.h" -#include "PluginManager.h" #include "ModuleFactory.h" +#include "PluginManager.h" #include "RemoteServer.h" #include "RemoteTools.h" -#include "LuaTools.h" -#include "DFHackVersion.h" -#include "md5wrapper.h" -#include "Format.h" - -#include "Commands.h" +#include "VersionInfo.h" +#include "VersionInfoFactory.h" #include "modules/DFSDL.h" #include "modules/DFSteam.h" #include "modules/EventManager.h" #include "modules/Filesystem.h" +#include "modules/Graphic.h" #include "modules/Gui.h" #include "modules/Hotkey.h" +#include "modules/Persistence.h" #include "modules/Textures.h" #include "modules/World.h" -#include "modules/Persistence.h" -#include "df/init.h" #include "df/gamest.h" +#include "df/global_objects.h" #include "df/graphic.h" +#include "df/init.h" #include "df/interfacest.h" #include "df/plotinfost.h" #include "df/viewscreen_dwarfmodest.h" @@ -68,35 +71,51 @@ distribution. #include "df/viewscreen_loadgamest.h" #include "df/viewscreen_new_regionst.h" #include "df/viewscreen_savegamest.h" -#include "df/world.h" #include "df/world_data.h" +#include "df/world.h" -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include +#include #include -#include -#include #include -#include -#include +#include #include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include + +#include "md5wrapper.h" + +#include + #include +#include +#include +#include -#ifdef _WIN32 -#define NOMINMAX -#include +#ifdef WIN32 +#include #endif #ifdef LINUX_BUILD @@ -105,6 +124,7 @@ distribution. using namespace DFHack; using namespace df::enums; + using df::global::init; using df::global::world; using std::string; From 3d80246bc94cf2929766dbd73560144c1c9d7907 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:25:03 -0500 Subject: [PATCH 03/19] update includes in `DataIdentity.cpp` --- library/DataIdentity.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/library/DataIdentity.cpp b/library/DataIdentity.cpp index 346565c62f..0a797c2069 100644 --- a/library/DataIdentity.cpp +++ b/library/DataIdentity.cpp @@ -1,14 +1,21 @@ -#include +#include "DataIdentity.h" + +#include "BitArray.h" +#include "DataDefs.h" #include +#include +#include #include +#include +#include +#include #include +#include #include -#include #include +#include -#include "DataFuncs.h" -#include "DataIdentity.h" // the space after the uses of "type" in OPAQUE_IDENTITY_TRAITS_NAME is _required_ // without it the macro generates a syntax error when type is a template specification From 7278c55a47c9b567316c42d162909d45161d5a01 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:37:39 -0500 Subject: [PATCH 04/19] update includes in `MiscUtils.cpp` --- library/MiscUtils.cpp | 64 +++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/library/MiscUtils.cpp b/library/MiscUtils.cpp index dc1d4950ac..44f93524ee 100644 --- a/library/MiscUtils.cpp +++ b/library/MiscUtils.cpp @@ -22,39 +22,49 @@ must not be misrepresented as being the original software. distribution. */ -#include "Internal.h" #include "Export.h" #include "MiscUtils.h" #include "ColorText.h" -#include "modules/DFSDL.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#ifndef LINUX_BUILD -// We don't want min and max macros +#ifdef WIN32 +// Suppress warning which occurs in header on some WinSDK versions +// See dfhack/dfhack#5147 for more information #define NOMINMAX - #include - // Suppress warning which occurs in header on some WinSDK versions - // See dfhack/dfhack#5147 for more information - #pragma warning(push) - #pragma warning(disable:4091) - #include - #pragma warning(pop) -#else - #include - #include - #include +#define WIN32_LEAN_AND_MEAN +#include +#include +#pragma warning(push) +#pragma warning(disable:4091) +#include +#pragma warning(pop) #endif -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#ifdef LINUX_BUILD +#include +#include +#include +#endif NumberFormatType preferred_number_format_type = NumberFormatType::DEFAULT; @@ -499,8 +509,8 @@ uint64_t GetTimeMs64() /* Character decoding */ // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. -#define UTF8_ACCEPT 0 -#define UTF8_REJECT 12 +constexpr auto UTF8_ACCEPT = 0; +constexpr auto UTF8_REJECT = 12; static const uint8_t utf8d[] = { // The first part of the table maps bytes to character classes that From fcb02402c711c1edf442fe2be9f0cbb5aa2a6022 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:50:03 -0500 Subject: [PATCH 05/19] correction on `Core.cpp` --- library/Core.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Core.cpp b/library/Core.cpp index d7824165c2..793824ac8e 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -115,6 +115,9 @@ distribution. #include #ifdef WIN32 +#define NOMINMAX +#define WIN32_LEAN_AND_MEAN +#include #include #endif From 208d550ab7385a085df291c91bb4e26985a210b7 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:50:32 -0500 Subject: [PATCH 06/19] add missing include in LuaWrapper.h --- library/include/LuaWrapper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/include/LuaWrapper.h b/library/include/LuaWrapper.h index 7576be7a11..70f36d3f95 100644 --- a/library/include/LuaWrapper.h +++ b/library/include/LuaWrapper.h @@ -25,7 +25,8 @@ distribution. #pragma once #include -#include + +#include "DataDefs.h" /** * Internal header file of the lua wrapper. From 5be4f9549252db21cb936a6ae0da7ca472c53060 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:50:53 -0500 Subject: [PATCH 07/19] remove C include from `Graphic.h` --- library/include/modules/Graphic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/include/modules/Graphic.h b/library/include/modules/Graphic.h index 9fa498a7cf..5e30d89805 100644 --- a/library/include/modules/Graphic.h +++ b/library/include/modules/Graphic.h @@ -30,9 +30,9 @@ distribution. #ifndef CL_MOD_GRAPHIC #define CL_MOD_GRAPHIC -#include #include "Export.h" #include "Module.h" + #include namespace DFHack From 371be6a8addd444b893a4813158ecda225d26dd8 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:51:55 -0500 Subject: [PATCH 08/19] update includes in `PluginManager.cpp` --- library/PluginManager.cpp | 50 ++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index b7e0b2c3c4..05486e885d 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -22,36 +22,48 @@ must not be misrepresented as being the original software. distribution. */ -#include "modules/EventManager.h" -#include "modules/Filesystem.h" -#include "modules/Screen.h" -#include "modules/World.h" -#include "Internal.h" +#include "PluginManager.h" + +#include "ColorText.h" #include "Core.h" +#include "CoreDefs.h" +#include "LuaWrapper.h" +#include "LuaTools.h" #include "MemAccess.h" -#include "PluginManager.h" +#include "MiscUtils.h" #include "RemoteServer.h" -#include "Console.h" #include "Types.h" #include "VersionInfo.h" -#include "DataDefs.h" -#include "MiscUtils.h" -#include "DFHackVersion.h" - -#include "LuaWrapper.h" -#include "LuaTools.h" - -using namespace DFHack; +#include "modules/EventManager.h" +#include "modules/Filesystem.h" +#include "modules/Screen.h" +#include "modules/World.h" +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -using std::string; +#include +#include + +#include "df/viewscreen.h" -#include +#include +#include + +using namespace DFHack; +using std::string; #if defined(_LINUX) static const string plugin_suffix = ".plug.so"; @@ -871,7 +883,7 @@ void PluginManager::init() loadAll(); bool any_loaded = false; - for (auto p : all_plugins) + for (auto& p : all_plugins) { if (p.second->getState() == Plugin::PS_LOADED) { From 21d865acb19b3f2b2dd2bed168ac118788455530 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 01:53:47 -0500 Subject: [PATCH 09/19] clean headers in `PlugLoad.cpp` --- library/PlugLoad.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/library/PlugLoad.cpp b/library/PlugLoad.cpp index fa58d39514..6b4dc9d451 100644 --- a/library/PlugLoad.cpp +++ b/library/PlugLoad.cpp @@ -1,19 +1,15 @@ -#include "Core.h" #include "Debug.h" -#include "Export.h" #include "PluginManager.h" -#include "Hooks.h" #include #include #include #include -#include -#include #ifdef WIN32 #define NOMINMAX +#define WIN32_LEAN_AND_MEAN #include #include #define global_search_handle() GetModuleHandle(nullptr) From e363b443701886b1e89a6c0af9ddfc23d1a8a520 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:05:31 -0500 Subject: [PATCH 10/19] adjust includes in `PlugLoad.cpp` --- library/PlugLoad.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/library/PlugLoad.cpp b/library/PlugLoad.cpp index 6b4dc9d451..d3b7560773 100644 --- a/library/PlugLoad.cpp +++ b/library/PlugLoad.cpp @@ -2,10 +2,7 @@ #include "PluginManager.h" #include -#include #include -#include - #ifdef WIN32 #define NOMINMAX From b14b82dc0e0824e175b7fc16167fd0b7f52b0bfc Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:06:22 -0500 Subject: [PATCH 11/19] includes in `Process.cpp` --- library/Process.cpp | 56 ++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/library/Process.cpp b/library/Process.cpp index c45e5aea45..1ff63622f0 100644 --- a/library/Process.cpp +++ b/library/Process.cpp @@ -22,22 +22,30 @@ must not be misrepresented as being the original software. distribution. */ -#ifndef WIN32 -#ifndef _DARWIN -#include -#endif /* ! _DARWIN */ -#endif /* ! WIN32 */ +#include "Format.h" +#include "MemAccess.h" +#include "Memory.h" +#include "MemoryPatcher.h" +#include "MiscUtils.h" +#include "VersionInfo.h" +#include "VersionInfoFactory.h" + +#include "modules/Filesystem.h" + +#include +#include +#include #include -#include +#include +#include +#include #include -#include +#include +#include #include #include -#include - -#include "Format.h" -#ifndef WIN32 +#ifdef LINUX_BUILD #include #include #include @@ -53,28 +61,24 @@ distribution. #include #include #endif /* _DARWIN */ -#endif /* ! WIN32 */ -#include "Error.h" -#include "Internal.h" -#include "MemAccess.h" -#include "Memory.h" -#include "MemoryPatcher.h" -#include "MiscUtils.h" -#include "VersionInfo.h" -#include "VersionInfoFactory.h" -#include "modules/Filesystem.h" - -#ifndef WIN32 #include "md5wrapper.h" -#else /* WIN32 */ +#endif /* LINUX_BUILD */ + +#ifdef WIN32 #define _WIN32_WINNT 0x0600 #define WINVER 0x0600 + +#define NOMINMAX #define WIN32_LEAN_AND_MEAN #include #include +#include +#include +#include + +#include -#include #endif /* WIN32 */ using namespace DFHack; @@ -151,7 +155,7 @@ Process::Process(const VersionInfoFactory& known_versions) : identified(false) uint32_t pe_offset = readDWord(d->base + 0x3C); read(d->base + pe_offset, sizeof(d->pe_header), (uint8_t*)&(d->pe_header)); const size_t sectionsSize = sizeof(IMAGE_SECTION_HEADER) * d->pe_header.FileHeader.NumberOfSections; - d->sections = (IMAGE_SECTION_HEADER*)malloc(sectionsSize); + d->sections = (IMAGE_SECTION_HEADER*)std::malloc(sectionsSize); read(d->base + pe_offset + sizeof(d->pe_header), sectionsSize, (uint8_t*)(d->sections)); } catch (std::exception&) From e3605d6834c8e001c3db7976a6505c10cdaa7112 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:11:21 -0500 Subject: [PATCH 12/19] headers in `RemoteClient.cpp` --- library/RemoteClient.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/library/RemoteClient.cpp b/library/RemoteClient.cpp index b159843761..c917a3232a 100644 --- a/library/RemoteClient.cpp +++ b/library/RemoteClient.cpp @@ -36,24 +36,25 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -#include #include -#include +#include +#include "ColorText.h" +#include "CoreDefs.h" #include "RemoteClient.h" -#include -#include "MiscUtils.h" -#include -#include -#include +#include "ActiveSocket.h" +#include "Host.h" +#include "SimpleSocket.h" -#include #include "json/json.h" From 6a641dbef43b3181bec0681e795c6dd85d41f662 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:17:24 -0500 Subject: [PATCH 13/19] includes in `RemoteServer.cpp` --- library/RemoteServer.cpp | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/library/RemoteServer.cpp b/library/RemoteServer.cpp index 9557a15862..0e6129b926 100644 --- a/library/RemoteServer.cpp +++ b/library/RemoteServer.cpp @@ -34,28 +34,33 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - - -#include -#include -#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include #include -#include +#include +#include + +#include "ColorText.h" +#include "Core.h" +#include "CoreDefs.h" +#include "Debug.h" +#include "MiscUtils.h" +#include "PluginManager.h" +#include "ActiveSocket.h" +#include "Host.h" +#include "RemoteClient.h" #include "RemoteServer.h" #include "RemoteTools.h" - #include "PassiveSocket.h" -#include "PluginManager.h" -#include "MiscUtils.h" -#include "Debug.h" - -#include -#include -#include +#include "SimpleSocket.h" #include #include From 9b15e57e6dfe0c0211e6c7d7bdd8eb501a72ffec Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:19:14 -0500 Subject: [PATCH 14/19] includes in `Types.cpp` --- library/Types.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/library/Types.cpp b/library/Types.cpp index 1dab657c1c..21437723f1 100644 --- a/library/Types.cpp +++ b/library/Types.cpp @@ -22,24 +22,20 @@ must not be misrepresented as being the original software. distribution. */ -#include "Internal.h" -#include "Export.h" #include "MiscUtils.h" -#include "Error.h" #include "Types.h" #include "modules/Filesystem.h" #include "df/general_ref.h" +#include "df/general_ref_type.h" +#include "df/global_objects.h" #include "df/specific_ref.h" +#include "df/specific_ref_type.h" -#include -#include - -#include -#include -#include #include +#include +#include int DFHack::getdir(std::filesystem::path dir, std::vector &files) From d223a385486ed7b7c4b91612110e58cb03d2637a Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:25:33 -0500 Subject: [PATCH 15/19] Includes in `RemoteTools.cpp` --- library/RemoteTools.cpp | 63 +++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/library/RemoteTools.cpp b/library/RemoteTools.cpp index dbef7a9906..5dab76e8cb 100644 --- a/library/RemoteTools.cpp +++ b/library/RemoteTools.cpp @@ -35,57 +35,58 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#include -#include -#include -#include -#include -#include -#include -#include - #include "RemoteTools.h" -#include "PluginManager.h" + +#include "ColorText.h" +#include "Core.h" +#include "CoreDefs.h" +#include "DataDefs.h" +#include "DFHackVersion.h" +#include "LuaTools.h" #include "MiscUtils.h" +#include "PluginManager.h" #include "VersionInfo.h" -#include "DFHackVersion.h" #include "modules/Materials.h" #include "modules/Translation.h" #include "modules/Units.h" #include "modules/World.h" -#include "LuaTools.h" - -#include "DataDefs.h" -#include "df/plotinfost.h" #include "df/adventurest.h" -#include "df/world.h" -#include "df/world_data.h" -#include "df/unit.h" -#include "df/unit_misc_trait.h" -#include "df/unit_soul.h" -#include "df/unit_skill.h" +#include "df/creature_raw.h" +#include "df/global_objects.h" +#include "df/historical_entity.h" +#include "df/historical_figure.h" +#include "df/incident.h" +#include "df/inorganic_raw.h" +#include "df/language_name.h" #include "df/material.h" #include "df/matter_state.h" -#include "df/inorganic_raw.h" -#include "df/creature_raw.h" -#include "df/plant_raw.h" #include "df/nemesis_record.h" -#include "df/historical_figure.h" -#include "df/historical_entity.h" -#include "df/squad.h" +#include "df/plant_raw.h" +#include "df/plotinfost.h" +#include "df/profession.h" #include "df/squad_position.h" -#include "df/incident.h" +#include "df/squad.h" +#include "df/unit_misc_trait.h" +#include "df/unit_skill.h" +#include "df/unit_soul.h" +#include "df/unit.h" +#include "df/world_data.h" +#include "df/world.h" #include "BasicApi.pb.h" +#include #include #include -#include - +#include +#include +#include #include +#include +#include +#include using namespace DFHack; using namespace df::enums; From 7c6a6c114465809ab31199d922669d16b7abb67f Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:36:00 -0500 Subject: [PATCH 16/19] constrain winsock leakage --- library/RemoteServer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/RemoteServer.cpp b/library/RemoteServer.cpp index 0e6129b926..aa3deb201d 100644 --- a/library/RemoteServer.cpp +++ b/library/RemoteServer.cpp @@ -34,6 +34,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifdef WIN32 +#define NOMINMAX +#endif #include #include #include From a1a4ab5b6af94585c4f8266b506b7456c4ad8831 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:36:18 -0500 Subject: [PATCH 17/19] BitArray.h includes --- library/include/BitArray.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/include/BitArray.h b/library/include/BitArray.h index 360281c6b1..7658e33102 100644 --- a/library/include/BitArray.h +++ b/library/include/BitArray.h @@ -24,14 +24,14 @@ distribution. #pragma once #include "Error.h" -#include -#include -#include #include +#include #include -#include #include +#include +#include +#include namespace DFHack { From 01b36494cb9f5e140175a1ef7ae7cc3c1ba169ab Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:37:16 -0500 Subject: [PATCH 18/19] includes in `DFSDL.h` --- library/include/modules/DFSDL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/include/modules/DFSDL.h b/library/include/modules/DFSDL.h index 393877e095..953686deed 100644 --- a/library/include/modules/DFSDL.h +++ b/library/include/modules/DFSDL.h @@ -1,12 +1,12 @@ #pragma once -#include "Export.h" #include "ColorText.h" +#include "Export.h" #include #include +#include #include -#include struct SDL_Surface; struct SDL_Rect; From ec58ce6a8bc4e51ed8d8549c3fd1092308783952 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 16 Apr 2026 02:37:28 -0500 Subject: [PATCH 19/19] includes in `DFSteam.cpp` --- library/modules/DFSteam.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/library/modules/DFSteam.cpp b/library/modules/DFSteam.cpp index 61e50a61b8..31cacfea63 100644 --- a/library/modules/DFSteam.cpp +++ b/library/modules/DFSteam.cpp @@ -1,11 +1,30 @@ -#include "Internal.h" - #include "modules/DFSteam.h" #include "Debug.h" #include "PluginManager.h" +#include "ColorText.h" +#include "Core.h" + +#include +#include +#include +#include +#include + #include "df/gamest.h" +#include + +#ifdef WIN32 +#define NOMINMAX +#define WIN32_LEAN_AND_MEAN +#include +#include +#include +#include +#include +#include +#endif namespace DFHack { @@ -100,9 +119,6 @@ void DFSteam::cleanup(color_ostream& out) { #ifdef WIN32 -#include -#include -#include static bool is_running_on_wine() { typedef const char* (CDECL wine_get_version)(void);