mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
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>
64 lines
2.1 KiB
C
64 lines
2.1 KiB
C
|
|
#ifdef JA2EDITOR
|
|
|
|
#ifndef __ROAD_SMOOTHING_H
|
|
#define __ROAD_SMOOTHING_H
|
|
|
|
//There are the 32 macro definitions that make up all of the road pieces. These enumerations
|
|
//match up exactly to the previous road system order of graphics (FIRSTROAD1 - FIRSTROAD32)
|
|
enum
|
|
{
|
|
L1, //left 1 -- this is a left straight-away edge
|
|
R1, //right 1
|
|
B1, //bottom 1
|
|
T1, //top 1
|
|
TTR, //top top-right corner piece (the top part of the top-right corner)
|
|
BTR, //bottom top-right corner piece (the bottom part of the top-right corner)
|
|
LBL, //left bottom-left corner piece
|
|
RBL, //right bottom-left corner piece
|
|
LTL, //left top-left corner piece
|
|
RTL, //right top-left corner piece
|
|
RBR, //right bottom-right corner piece
|
|
LBR, //left bottom-right corner piece
|
|
L2, //left 2 (variation of the left 1)
|
|
R2, //right 2
|
|
L3, //left 3
|
|
R3, //right 3
|
|
B2, //bottom 2
|
|
T2, //top 2
|
|
B3, //bottom 3
|
|
T3, //top 3
|
|
BI, //bottom intersection (piece connecting bottom to right)
|
|
LI, //left intersection (piece connecting left to bottom )
|
|
TI, //top intersection (piece connecting top to left)
|
|
RI, //right intersection (piece connection right to top)
|
|
L4, //left 4
|
|
R4, //right 4
|
|
B4, //bottom 4
|
|
T4, //top 4
|
|
RE, //right edge (end of road)
|
|
LE, //left edge
|
|
BE, //bottom edge
|
|
TE, //top edge
|
|
NUM_ROAD_MACROS
|
|
};
|
|
|
|
//The old road system used multi-tiled roads as a single image. The new road system has taken these large
|
|
//pieces and chopped them up into single tiled images (to mitigate lighting problems). Some of the larger
|
|
//road pieces turned into 18 smaller pieces. So this function will go analyse the world, and replaces any
|
|
//locations containing the original road tile information, delete it, and replace it by inserting it's
|
|
//equivalent macro.
|
|
void ReplaceObsoleteRoads();
|
|
|
|
//Road macros vary in size from 3 gridnos to 18 gridnos. Using the anchor gridno based off of the original
|
|
//road system, this function will place the new macro (consisting of multiple road pieces in multiple
|
|
//gridnos).
|
|
void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID );
|
|
|
|
void InitializeRoadMacros();
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|