NETWORKED, BOUNDS_CHECKER and UBMODSHADYJOB are not defined in any source file,
in CMakeLists.txt, or on any command line, so all 26 guarded sites were dead.
NETWORKED is the most thoroughly dead of the three: its blocks include
Networking.h, NetworkEvent.h, Communication.h and Application Msg.h, none of
which exist in this repository, so that code could not have compiled since long
before the CMake build. Multiplayer went through Multiplayer/ and RakNet
instead. UBMODSHADYJOB was referenced by a stale comment pointing at
builddefines.h, which is how it turned up.
Removed with unifdef, so the surviving branch of each conditional is kept: the
#ifndef BOUNDS_CHECKER bodies stay, and so does the #else of UBMODSHADYJOB.
The compiler never saw any of this, so nothing shrinks: no object file's
section sizes change, and the only difference in the executables is 24 to 64
assert line numbers shifting by the number of lines removed above them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing was left in it but the include of profiler.h, and 132 translation units
were including it for that alone. Fifteen files were leaning on profiler.h to
drag in <set>, <vector> and <ostream> for them; those now include what they use.
This is the commit that moves line numbers. Removing an include line shifts
__LINE__ by one for everything below it, and __LINE__ is an immediate operand in
every Assert() and DebugMsg() call, so the four game executables differ from
their predecessors by roughly a thousand 32-bit constants each. Every one of
those is accounted for: each is a single immediate that moved by -1 where the
builddefines.h include went away, or +1 where a <set>/<vector> include was
added. Nothing else in .text, .rdata or .data moves, no object file's section
sizes change, and symbolize_crash and Ja2Export stay bit-identical.
The one non-immediate difference is that the 24 Editor translation units of the
non-editor apps stop emitting __Avx2WmemEnabledWeakValue, a 4-byte weak COMDAT
they only ever instantiated through profiler.h's <vector>. It is a UCRT weak
default that other translation units still provide.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gfEnteringMapScreenToEnterPreBattleInterface, gfAutomaticallyStartAutoResolve
and gfDelayAutoResolveStart are now file-static in PreBattle Interface.cpp
(the latter's definition moved here from Strategic Movement.cpp). External
access goes through accessors declared in the header; PBI.cpp touches the
statics directly.
Accessors exist only where an external caller needs one:
AutomaticallyStartAutoResolve() getter (read in Town Militia,
gamescreen, Player Command); SetAutomaticallyStartAutoResolve (set in
Creature Spreading, strategicmap); SetDelayAutoResolveStart (set in
Strategic Movement);
SetEnteringMapScreenToEnterPreBattleInterface (set in strategicmap).
gfEnteringMapScreen stays a raw cross-read into mapscreen state, not
PBI-owned. No behavior change: getter returns BOOLEAN.
Verify: grep the three flag names across the tree hits only PreBattle
Interface.cpp (three static defs, four accessor bodies, and in-file
Handle/reader access). No header externs, no external raw refs. Build: JA2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gfPreBattleInterfaceActive and gfUsePersistantPBI are now file-static in
PreBattle Interface.cpp, reached only through Is/Set accessors declared in
the header. No behavior change: getters return BOOLEAN so ==TRUE/==FALSE
sites are untouched semantically.
Verify: grep 'gfPreBattleInterfaceActive\|gfUsePersistantPBI' across the tree
hits only the two static definitions, the four accessor bodies (all in
PreBattle Interface.cpp), and two commented-out Asserts in Strategic
Movement.cpp. Every other former site now calls an accessor. Build: JA2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* User center insertion point for merc arrival
instead of initial arrival gridno that is meant only for the very first helidrop arrival at the start of a game.
* Prevent possible nullptr dereference
* Move main executable files to their own directory
* Adapt the build to the new file structure
... and fix some weird #include's that were relying on the project root
being an include directory.