17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 12:09:19 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
maj00r
61b3ec6f3f parse windows.h before any import reaches betterRenderer
Six module interfaces carry windows.h in their fragment, and a fragment's
include guard does not cross the boundary, so a unit that imported first
and included the SDK afterwards parsed it twice: clang reports it as
conflicting redeclarations of BroadcastSystemMessageEx and mismatched
uuids all through the SDK. Same shape as the basic_filebuf failure, one
level further out - the header arrives through d3d12.h, not directly.

Thirty units get a guarded windows.h ahead of everything; on Linux it is
a no-op. Vendored single-header libraries are left alone, and the block
goes after a BOM rather than before it.
2026-09-10 15:40:52 +02:00
maj00r
02c6e6895e cover the units that are not module units
The template-header propagation only walked files with a module
declaration, so EU07.cpp, windows.cpp, export_e3d_standalone.cpp and
every betterRenderer source were outside it - including the file with
main(). They reach cParser and friends through eu07.simcore and
instantiate their templates without the headers those bodies name.

Adds audit_modules.py, which checks the whole tree for the seven classes
this migration hit; all seven are clean now.
2026-09-10 02:04:06 +02:00
maj00r
26501b0fd7 hoist standard includes above everything else
Ordering them before the imports in the same file was not enough: a
project header on line 1 can import a module several levels down whose
global module fragment already pulled in the same standard header, and
that include guard does not cross the module boundary. Putting them
first means the guard is set before anything can import.

Skips vendored single-header libraries and anything inside an #if.
2026-09-10 01:02:17 +02:00
maj00r
1455583ab6 put every include before every import
A header first pulled in through an imported module's global module
fragment leaves no include guard in the importing unit - macros do not
cross a module boundary - so a later textual include parses it again and
MSVC rejects the redefinition. Redoes the betterRenderer sweep with
placement that stays out of #if blocks, which is where the previous one
dropped <fstream> and broke nvrenderer_d3d12.cpp.
2026-09-10 00:40:32 +02:00
maj00r
2695c8e525 include what you use in betterRenderer
Its sources reached the standard library through the project headers they
included; those are imports now. 178 headers across 56 files, plus 18 C
library headers elsewhere for memcpy/printf and friends. MSVC's STL does
not supply these transitively the way libstdc++ does.
2026-09-10 00:26:55 +02:00
maj00r
7667d8d4d3 build betterRenderer against the modules
Verified locally now that Vulkan and DXC are installed: all 31 targets
compile. glm has to come from eu07.glm only - having it both as a plain
include and as an import made every overload ambiguous. nvrenderer.h is
self-sufficient, since register.cpp includes nothing else. Fixes the
vcpkg triplet, which was pinned to x64-windows.
2026-09-09 23:45:53 +02:00
maj00r
06f6c6035b let betterRenderer import the modules
The module file set moves to its own eu07_modules library: a target can
only consume C++20 modules by linking the target that owns them, and
betterRenderer is a separate add_library. Its project includes become
imports.

CXX_EXTENSIONS must match across the two - a BMI built with -std=c++20
is refused by a unit compiled with -std=gnu++20.
2026-09-09 23:30:34 +02:00
0715437108 Fix include directives 2026-03-14 20:51:11 +01:00
Wls50
915e4c769e support rain shader in experimental 2025-11-22 18:53:38 +01:00
a39d972126 Some renaming 2025-04-15 01:32:56 +02:00