Files
source/Editor/Summary Info.h
T
00fb898600 Delete builddefines.h
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>
2026-08-22 01:07:26 -03:00

161 lines
4.2 KiB
C++

#ifdef JA2EDITOR
#ifndef __SUMMARY_INFO_H
#define __SUMMARY_INFO_H
#include "types.h"
//dnl ch28
#define GLOBAL_SUMMARY_VERSION 15
#define MINIMUMVERSION 7
typedef struct TEAMSUMMARY
{
UINT8 ubTotal;
UINT8 ubDetailed;
UINT8 ubProfile;
UINT8 ubExistance;
UINT8 ubNumAnimals;
UINT8 ubBadA, ubPoorA, ubAvgA, ubGoodA, ubGreatA; //attributes
UINT8 ubBadE, ubPoorE, ubAvgE, ubGoodE, ubGreatE; //equipment
}TEAMSUMMARY; //15 bytes
typedef struct
{
//start version 1
UINT8 ubSummaryVersion;
UINT8 ubSpecial;
UINT16 usNumItems;
UINT16 usNumLights;
_OLD_MAPCREATE_STRUCT MapInfo;
TEAMSUMMARY EnemyTeam;
TEAMSUMMARY CreatureTeam;
TEAMSUMMARY RebelTeam;
TEAMSUMMARY CivTeam;
UINT8 ubNumDoors;
UINT8 ubNumDoorsLocked;
UINT8 ubNumDoorsTrapped;
UINT8 ubNumDoorsLockedAndTrapped;
//start version 2
UINT8 ubTilesetID;
UINT8 ubNumRooms;
//start version 3
UINT8 ubNumElites;
UINT8 ubNumAdmins;
UINT8 ubNumTroops;
//start version 4
UINT8 ubEliteDetailed;
UINT8 ubAdminDetailed;
UINT8 ubTroopDetailed;
//start version 5
UINT8 ubEliteProfile;
UINT8 ubAdminProfile;
UINT8 ubTroopProfile;
//start version 6
UINT8 ubEliteExistance;
UINT8 ubAdminExistance;
UINT8 ubTroopExistance;
//start version 7
FLOAT dMajorMapVersion;
//start version 8
UINT8 ubCivSchedules;
//start version 9
UINT8 ubCivCows;
UINT8 ubCivBloodcats;
// //-----
// 190
//start version 10
_OLD_EXITGRID ExitGrid[4]; //5*4 // 20
UINT16 usExitGridSize[4]; //2*4 // 8
BOOLEAN fInvalidDest[4]; // 4
UINT8 ubNumExitGridDests; // 1
BOOLEAN fTooManyExitGridDests; // 1
// //-----
// // 224
//start version 11
UINT8 ubEnemiesReqWaypoints; // 1
// //-----
// 225
//start version 12
UINT16 usWarningRoomNums; // 2
// 227
//start version 13
UINT8 ubEnemiesHaveWaypoints; // 1
UINT32 uiNumItemsPosition; // 4
//-----
// 232
//start version 14
UINT32 uiEnemyPlacementPosition; // 4
//-----
// 236
UINT8 ubPadding[164]; // 164
// //-----
// 400 total bytes
}_OLD_SUMMARYFILE;//dnl ch28 240909
class SUMMARYFILE//dnl ch28 260909
{
public:
UINT8 ubSummaryVersion;//This byte in all versions must be first
UINT8 ubSpecial;
UINT16 ubNumRooms;
UINT32 usNumItems;
UINT32 usNumLights;
UINT16 ubNumDoors;
UINT16 ubNumDoorsLocked;
UINT16 ubNumDoorsTrapped;
UINT16 ubNumDoorsLockedAndTrapped;
UINT16 ubNumElites;
UINT16 ubNumAdmins;
UINT16 ubNumTroops;
UINT16 ubEliteDetailed;
UINT16 ubAdminDetailed;
UINT16 ubTroopDetailed;
UINT16 ubEliteProfile;
UINT16 ubAdminProfile;
UINT16 ubTroopProfile;
UINT16 ubEliteExistance;
UINT16 ubAdminExistance;
UINT16 ubTroopExistance;
UINT16 ubCivSchedules;
UINT16 ubCivCows;
UINT16 ubCivBloodcats;
UINT16 ubEnemiesReqWaypoints;
UINT16 usWarningRoomNums;
UINT16 ubEnemiesHaveWaypoints;
UINT32 ubTilesetID;
UINT32 uiNumItemsPosition;
UINT32 uiEnemyPlacementPosition;
FLOAT dMajorMapVersion;
TEAMSUMMARY EnemyTeam;
TEAMSUMMARY CreatureTeam;
TEAMSUMMARY RebelTeam;
TEAMSUMMARY CivTeam;
MAPCREATE_STRUCT MapInfo;
EXITGRID ExitGrid[4];
BOOLEAN fInvalidDest[4];
UINT16 usExitGridSize[4];
UINT16 ubNumExitGridDests;
BOOLEAN fTooManyExitGridDests;
public:
SUMMARYFILE& operator=(const _OLD_SUMMARYFILE& src);
BOOLEAN Load(STR sFileName);
BOOLEAN Save(STR sFileName);
};
extern BOOLEAN gfAutoLoadA9;
BOOLEAN EvaluateWorld(STR8 pSector, UINT8 ubLevel);//dnl ch42 260909
void WriteSectorSummaryUpdate(STR8 sFileName, UINT8 ubLevel, SUMMARYFILE* pSummaryFileInfo);//dnl ch28 260909
extern BOOLEAN gfMustForceUpdateAllMaps;
extern BOOLEAN gfMajorUpdate;
BOOLEAN ReEvaluateWorld( const STR8 puiFilename );
void ApologizeOverrideAndForceUpdateEverything();
void ClearSummaryInfo();
#endif
#endif