mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
GameVersion.cpp becomes a configure_file template, so the version strings are a
build input rather than something a CI step seds into the working tree mid-run.
That is what lets a crash report be matched to its exact build's PDB for offline
symbolization.
The two strings get distinct jobs. czVersionString is the machine-readable build
identity: the bare short commit SHA and nothing else. A `git describe` string
cannot serve here -- czVersionString is 16 bytes because it is stored in the
savegame header as SAVED_GAME_HEADER::zGameVersionNumber and strcmp'd on load,
and describe puts the SHA last, so truncation ate exactly the discriminating part
and could make two different commits compare equal. CI passes 9 hex; anything
that would not fit is now a configure error rather than a silent clip.
zBuildInformation is the display string, untruncated, and it is no longer printed
beside czVersionString: that drops the duplication in the version line ("JA2 1.13
V4-555-G6A941C0 2026-07-25 V4-555-G6A941C06") and stops showing a token that is
now machine-only. CI's copy leads with GAME_VERSION, because the version line is
now the only place a player reads which release they are running.
Finish what the sed step's TODO asked for: the workflow pins GAME_BUILD_INFORMATION
and GIT_SHA once, next to the gamedir SHAs it already pins, and hands them to CMake
with -D. Every parallel build job therefore stamps one agreed identity, and the
compile checkout needs no git history at all.
A build nobody identifies is a local build and says so -- czVersionString reads
"local" -- rather than deriving a SHA from HEAD. A derived SHA could not stay
true: nothing re-runs configure once HEAD moves, so an incremental build would
keep whatever it was configured with, and keeping it honest would mean
reconfiguring on every commit. It would also buy nothing, because only packaged
builds are archived with their PDBs; a local build's crash reports are symbolized
against the PDB sitting next to the exe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
125 lines
9.3 KiB
C
125 lines
9.3 KiB
C
#ifndef _GAME_VERSION_H_
|
|
#define _GAME_VERSION_H_
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
//
|
|
// Keeps track of the game version
|
|
//
|
|
|
|
// name of the product, Unfinished Business, Map Editor etc..
|
|
extern CHAR16 zProductLabel[64];
|
|
// this build's identity, stamped in by CMake from -DGIT_SHA. A packaged build sets
|
|
// it to the bare short commit SHA and nothing else, so it names that build exactly;
|
|
// a build nobody identified reads "local". Used for save game comparison, and
|
|
// stamped into crash reports so a packaged build's report can be matched to the PDB
|
|
// archived beside it for offline symbolization.
|
|
extern CHAR8 czVersionString[16];
|
|
// human-readable build description, stamped in from -DGAME_BUILD_INFORMATION: the
|
|
// release name, its date and where it was built, or "local build <date>". For
|
|
// display only — never compared against, so it is free to change shape.
|
|
extern CHAR16 zBuildInformation[256];
|
|
|
|
//ADB: I needed these here so I moved them, and why put them in *.cpp anyways?
|
|
//
|
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
|
// you will invalidate the saved game file
|
|
|
|
#define INCREASED_TEAMSIZES 186 // Asdow: SOLDIERTYPE ubID changed from UINT8 -> UINT16
|
|
#define MERC_PROFILE_INSERTION_DATA 185 // Bigmap support for AddProfileToMap function
|
|
#define GROWTH_MODIFIERS 184
|
|
#define REBELCOMMAND 183
|
|
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
|
#define DISABILITYFLAGMASK 181 // Flugente: disabilities get a flagmask
|
|
#define PROFILETYPE_STORED 180 // Flugente: the type of each profile is stored in the savegame
|
|
#define CORPSE_DISPOSAL 179 // Flugente: corpses can be removed by assignment
|
|
#define RAID_EVENTS 178 // Flugente: added bloodcat/zombie/bandit raids
|
|
#define INDIVIDUAL_MILITIA_EXP_FLOAT 177 // Flugente: changed the way we store individual militia experience
|
|
#define CHAT_TO_DISTRACT 176 // Flugente: internal variable allows us to distract enemies by engrossing them in conversation
|
|
#define INDIVIDUAL_MILITIA_RANKFIX 175 // Flugente: internal individual militia change requires variable change
|
|
#define DRAGPERSONS 174 // Flugente: we can drag people and corpses now
|
|
#define SEPARATE_VOICESETS 173 // Flugente: voice sets are now separate from profile slots, and we can have many more of them
|
|
#define HACKABLE_SAMS 172 // Flugente: SAM sites now have a status for hacking
|
|
#define LUA_MODDERDATA 171 // Flugente: modders can set and use data in an exclusive array
|
|
#define WORKERS 170 // Flugente: train workers for facilities
|
|
#define WEATHER_CHANGE 169 // Flugente: sector-specific weather & more weather types
|
|
#define ASD_INIT_FIX 168 // Flugente: fix for ASD feature introduced with ENEMY_HELICOPTERS
|
|
#define NONPROFILE_MERCHANTS 167 // Flugente: merchants can be created from non-profile NPCs
|
|
#define INDIVIDUAL_MILITIA 166 // Flugente: individual militia
|
|
#define ENEMY_JEEPS 165 // Flugente: enemy jeeps
|
|
#define ENEMY_HELICOPTERS 164 // Flugente: enemy helicopters
|
|
#define DRUG_SYSTEM_REDONE 163 // Flugente: reworked the drug system
|
|
#define MILITIA_PATH_PLOTTING 162 // Flugente: the player can plot militia paths in strategic, similar to player or helicopter travel
|
|
#define STRATEGIC_TEAM_GROUPS 161 // Flugente: a change to the GROUP-structure allows any team to have strategic movement groups
|
|
#define PMC_WEBSITE 160 // Flugente: a new PMC allows us to hire trained militia
|
|
#define DISEASE_SYSTEM 159 // Flugente: mercs can get diseases
|
|
#define PRISONER_EXPANSION 158 // Flugente: more types of prisoners
|
|
#define DYNAMIC_DIALOGUE 157 // Flugente: mercs have dynamic dialogue depending on newly formed opinions, an the player can interact with them
|
|
#define DYNAMIC_OPINIONS 156 // Flugente: mercs can form opinions on other people depending on their behaviour
|
|
#define INCREASED_REFUEL_SITES 155 // Flugente: increased the number of helicopter refuel sites
|
|
#define ENEMY_VIPS 154 // Flugente: enemy generals are placed randomly in the map
|
|
#define MORE_LOCKS_AND_KEYS 153 // anv: externalized locks and keys to xml
|
|
#define MILITIA_MOVEMENT 152 // Flugente: allow control of strategic militia movement
|
|
#define SNITCH_TRAIT_EXTENDED 151 // anv: more soldier flags, remembering exposition of snitch
|
|
#define CAMPAIGNSTATS 150 // Flugente: store campaign statistics
|
|
#define WALDO_CAN_REPAIR_HELICOPTER 149 // anv: have to refresh Waldo records
|
|
#define ENCYCLOPEDIA_ITEM_VISIBILITY 148 // Moa: Items discovered during compain have to be saved.
|
|
#define TRAIT_RADIO_OPERATOR 147 // Flugente: new trait radio operator
|
|
#define BACKGROUNDS_FIX_UINT8 146 // Flugente: had to change usBackground-vars from UINT8 to UINT16
|
|
#define BACKGROUNDS 145 // Flugente: background feature
|
|
#define NO_VEHICLE_SAVE 144 // Flugente: vehicle data isn't saved anymore, as it has long been externalised
|
|
#define SOLDIER_PROFILES 143 // Flugente: profiles for enemy and militia (possibly any non-NPC/RPC character)
|
|
#define DYNAMIC_FLASHLIGHTS 142 // Flugente: had to add variables to LIGHTEFFECT-struct
|
|
#define ENLARGED_OPINIONS 141 // Flugente: increased number of merc opinions to 255, thus need to change savegame reading
|
|
#define MODULARIZED_AI 140 // Flugente: new savegame version due to modularized AI
|
|
#define MILITIA_EQUIPMENT 139 // Flugente: militia can equip from sector inventory
|
|
#define MULTITURN_ACTIONS 138 // Flugente: multiturn actions
|
|
#define EXTERNALISED_MERCHANTS 137 // Flugente: increased the number of merchants and externalised their data
|
|
#define PRISON_SYSTEM 136 // Flugente: added var to the sector structure. Shouldn't break compatibility, but let's be safe
|
|
#define DUAL_BURST_ADDED 135
|
|
#define MORE_ROOMS 134 // changed room numbers from 8 to 16 bit by DBrot
|
|
#define FOOD_CHANGES 133 // changes for food system
|
|
#define ZOMBIE_CHANGES 132 // Included some changes for Zombies
|
|
#define JA25_UB_INTEGRATION 131 // Before this, the JA25 Unfinished Business code was not integrated (see "Builddefines.h" JA2UB)
|
|
#define IMPROVED_INTERRUPT_SYSTEM 130
|
|
#define ENCYCLOPEDIA_SAVEGAME_CHANGE 129 // Added encyclopedia
|
|
#define HIDDENTOWN_DATATYPE_CHANGE 128
|
|
#define NEW_EMAIL_SAVE_GAME 127
|
|
#define NEW_SAVE_GAME_GENERAL_SAVE_INFO_DATA 126
|
|
#define QUESTS_DATATYPE_CHANGE 125 // Before this, we had a maximum number of 30 quests (JA2 default) (by Jazz)
|
|
#define VEHICLES_DATATYPE_CHANGE 124 // Before this, vehicles were not externalized (by Jazz)
|
|
#define FIXED_MERC_NOT_AVAILABLE_ON_MERC_WEBSITE 123 // Before this, only Bubba was available on MERC website
|
|
#define FIXED_CREPITUS_IN_REALISTIC_GAME_MODE 122 // Before this, there was an initializing problem in GameInit.lua on startup, in which we could meet crepitus in Tixa underground map
|
|
#define FIXED_NPC_QUOTE_BUG 121 // Before this, we need to reload all npc quote information because it was not being saved and loaded correctly.
|
|
#define MOVED_GENERAL_INFO 120 // Before this, general game information was saved much later in the save game process.
|
|
#define NCTH_AUTOFIRE_UPDATE 119 // Before this, we didn't track the original autofire offsets
|
|
#define BR_EMAIL_DATA_CHANGE 118 // Before this, BR emails caused CTD
|
|
#define NCTH_DATATYPE_CHANGE 117 // Before this, we did not have HAM 4.0 NCTH
|
|
#define NEW_GENERAL_SAVE_INFO_DATA 116 // Before this, we did not have HAM 4.0 general info
|
|
#define IMP_TRAIT_EXPERT_ITEMS_CHANGE 115 // Before this, we did not have additional expert items defined in IMPItemChoices.xml
|
|
#define LUA_SAVEGAME_CHANGE 114 // Before this, we did not have additional lua script files (e.g: Intro.lua, ...)
|
|
#define STOMP12_SAVEGAME_DATATYPE_CHANGE2 113 // Before this, STOMP did not allow to have up to 30 traits
|
|
#define NAS_SAVEGAME_DATATYPE_CHANGE 112 // Before this, NAS settings (ON/OFF) was not saved to the savegame
|
|
#define STOMP12_SAVEGAME_DATATYPE_CHANGE 111 // Before this, STOMP v1.2 was not included in the source
|
|
#define BUGFIX_NPC_DATA_FOR_BIG_MAPS 110 // Before this, we had a bug in the NPC Data for Big Maps (this fix was introduced in the Closed Beta)
|
|
#define STRATEGIC_MINES_DATATYPE_CHANGE 109 // Before this, we did not have strategic mines initialization via lua script
|
|
#define HIDE_NPC_NAMES_FOR_UNKNOWN_PERSONS 108 // Before this, we did not have hiding of npc names for unknown persons included (by jazz)
|
|
#define BIG_MAPS_PROJECT_SAVEGAME_DATATYPE_CHANGE 107 // Before this, we did not have big maps project
|
|
#define AIRPORT_SAVEGAME_DATATYPE_CHANGE 106 // Before this, we did not have airport externalized
|
|
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
|
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
|
|
|
#define SAVE_GAME_VERSION INCREASED_TEAMSIZES
|
|
|
|
//#define RUSSIANGOLD
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|