generated address header refresh (tech-effects, M1 recon)

This commit is contained in:
alex 2026-09-07 22:05:51 -04:00
parent 4f0a9dbd82
commit 044e1afd7a

View file

@ -1,5 +1,5 @@
// GENERATED — do not edit. Facts about Sword of the Stars.exe (GOG 1.8.1). // GENERATED — do not edit. Facts about Sword of the Stars.exe (GOG 1.8.1).
// Source: sots-re ghidra/addresses.json @ f1c7f55, generated 2026-09-07 by tools/gen_addresses.py // Source: sots-re ghidra/addresses.json @ b24f13c, generated 2026-09-07 by tools/gen_addresses.py
// Runtime address = (uintptr_t)GetModuleHandle(NULL) + RVA (the exe is ASLR-relocated). // Runtime address = (uintptr_t)GetModuleHandle(NULL) + RVA (the exe is ASLR-relocated).
#pragma once #pragma once
#include <cstdint> #include <cstdint>
@ -23,9 +23,9 @@ constexpr uint32_t StrategyClient_EndTurn = 0x00383be0;
constexpr uint32_t StrategyServer_BeginProcessTurn = 0x003d98e0; constexpr uint32_t StrategyServer_BeginProcessTurn = 0x003d98e0;
// thiscall void (StrategyServer* this) [unverified] // thiscall void (StrategyServer* this) [unverified]
constexpr uint32_t StrategyServer_ProcessTurn = 0x003dc6c0; constexpr uint32_t StrategyServer_ProcessTurn = 0x003dc6c0;
// thiscall void (ServerPlayer* this, int* budget25) [unverified] // thiscall void (ServerPlayer* this, int out[25], bool projected) [verified]
constexpr uint32_t ServerPlayer_ComputeBudget = 0x00463030; constexpr uint32_t ServerPlayer_ComputeBudget = 0x00463030;
// thiscall void (TechTree* this, ...) [unverified] // thiscall void (TechTree* this, ?, vector<{node,int}>* alloc, int* overbudget) /* decay loop hits current target */ [verified]
constexpr uint32_t TechTree_ProcessResearch = 0x001876c0; constexpr uint32_t TechTree_ProcessResearch = 0x001876c0;
// thiscall void (ServerSystem* this /*+8 IStreamable*/, Stream* s) [verified-by-save] // thiscall void (ServerSystem* this /*+8 IStreamable*/, Stream* s) [verified-by-save]
constexpr uint32_t ServerSystem_Read = 0x0035d4b0; constexpr uint32_t ServerSystem_Read = 0x0035d4b0;
@ -61,7 +61,7 @@ constexpr uint32_t RNG_NextInt = 0x000271c0;
constexpr uint32_t Mars_Application_MountModules = 0x004a0a20; constexpr uint32_t Mars_Application_MountModules = 0x004a0a20;
// cdecl void (int* count, const char*** table) /* count 3 @0x00b2d514, table @0x00a35e98 */ [verified] // cdecl void (int* count, const char*** table) /* count 3 @0x00b2d514, table @0x00a35e98 */ [verified]
constexpr uint32_t Game_GetDefaultMounts = 0x004991c0; constexpr uint32_t Game_GetDefaultMounts = 0x004991c0;
// thiscall GlobalConst* (GlobalConst* this, void* storage, const char* key, GlobalConstParseFn parser, const char* file) /* RET 0x10; static-init stub call */ [verified] // thiscall GlobalConst* (GlobalConst* this, void* storage, const char* key, GlobalConstParseFn parser, const char* file) /* RET 0x10; static-init stub call. GlobalConst 0x10 bytes: {+0 void* storage (int/float/float[4]), +4 const char* key, +8 parser, +c const char* file} */ [verified]
constexpr uint32_t GlobalConst_ctor = 0x004b76a0; constexpr uint32_t GlobalConst_ctor = 0x004b76a0;
// cdecl void (GlobalConst* g) [verified] // cdecl void (GlobalConst* g) [verified]
constexpr uint32_t GlobalConst_Register = 0x004b7610; constexpr uint32_t GlobalConst_Register = 0x004b7610;
@ -69,18 +69,26 @@ constexpr uint32_t GlobalConst_Register = 0x004b7610;
constexpr uint32_t GlobalConst_ParseInt = 0x004b7000; constexpr uint32_t GlobalConst_ParseInt = 0x004b7000;
// cdecl void (float* storage, const char* text) [verified] // cdecl void (float* storage, const char* text) [verified]
constexpr uint32_t GlobalConst_ParseFloat = 0x004b7020; constexpr uint32_t GlobalConst_ParseFloat = 0x004b7020;
// cdecl void (float* storage, const char* text) /* *storage = sscanf(%f) * *(float*)0x00af5210 */ [verified] // cdecl void (float* storage, const char* text) /* sscanf(%f) into *storage, then *storage = (float)((double)*storage * *(double*)0x00af5210) */ [verified]
constexpr uint32_t GlobalConst_ParseFloatScaled = 0x004b70e0; constexpr uint32_t GlobalConst_ParseFloatScaled = 0x004b70e0;
// cdecl void (float rgba[4], const char* text) /* '%d %d %d %d', defaults 255, /255, clamp 0..1 */ [verified] // cdecl void (float rgba[4], const char* text) /* '%d %d %d %d', defaults 255, /255, clamp 0..1 */ [verified]
constexpr uint32_t GlobalConst_ParseColour = 0x004b7110; constexpr uint32_t GlobalConst_ParseColour = 0x004b7110;
// cdecl void (int rect[4], const char* text) /* '%d %d %d %d' (x y w h); 2 keys (COMBATSETUP_CARD_*_RECT); layout inferred from the M1 trace, int vs float unconfirmed */ [verified-by-trace]
constexpr uint32_t GlobalConst_ParseRect = 0x004b7040;
// cdecl void (float xyz[3], const char* text) /* '%f %f %f'; 5 keys (HIVER_SPAWN_*_GATE_HEIGHT / _SHIP_OFFSET ...); inferred from the M1 trace */ [verified-by-trace]
constexpr uint32_t GlobalConst_ParseVec3 = 0x004b7080;
// cdecl void (std::string* storage, const char* text) /* *storage = text; MSVC2010 std::string 0x18 bytes {+0 char buf[16] | char* ptr when capacity > 15, +0x10 size, +0x14 capacity}; 146 keys (*_NAME, *_SOUND, *_TEXTURENAME, DERELICT_SECTION_nn ...); seen in the M1 trace */ [verified-by-trace]
constexpr uint32_t GlobalConst_ParseString = 0x004b7670;
// cdecl void (void) /* called once from Application::Initialize; sets g_GlobalConstsLoaded */ [verified] // cdecl void (void) /* called once from Application::Initialize; sets g_GlobalConstsLoaded */ [verified]
constexpr uint32_t GlobalConsts_LoadAll = 0x004b76d0; constexpr uint32_t GlobalConsts_LoadAll = 0x004b76d0;
// cdecl void (const char* file, GlobalConstMap* consts) /* consts = std::map<const char*,GlobalConst*,stricmp> of the keys registered for this file; hook this for the file-level read */ [verified] // cdecl void (const char* file, GlobalConstMap* consts) /* consts = std::map<const char*,GlobalConst*,stricmp> of the keys registered for this file; MSVC2010 layout: map {+4 head node, +8 size}; node {+0 left, +4 parent, +8 right, +0xc const char* key, +0x10 GlobalConst*, +0x14 color, +0x15 isnil}; head: isnil=1, parent=root. Consumed keys are erased from the map. Hook this for the file-level read */ [verified]
constexpr uint32_t GlobalConsts_LoadFile = 0x004b73c0; constexpr uint32_t GlobalConsts_LoadFile = 0x004b73c0;
// data bool [verified] // data bool [verified]
constexpr uint32_t g_GlobalConstsLoaded = 0x0072d740; constexpr uint32_t g_GlobalConstsLoaded = 0x0072d740;
// data std::map<const char*,GlobalConst*,stricmp_less> /* +4 (0x00b2d748) = header node pointer */ [verified] // data std::map<const char*,GlobalConst*,stricmp_less> /* +4 (0x00b2d748) = header node pointer */ [verified]
constexpr uint32_t g_GlobalConstRegistry = 0x0072d744; constexpr uint32_t g_GlobalConstRegistry = 0x0072d744;
// data double /* pi/180 as a DOUBLE (0x3f91df46a2529d39); GlobalConst_ParseFloatScaled does float word *= this in x87 and stores float */ [verified]
constexpr uint32_t g_GlobalConstFloatScale = 0x006f5210;
// thiscall Script* (Script* this) /* sizeof(Script) = 0x28 */ [verified] // thiscall Script* (Script* this) /* sizeof(Script) = 0x28 */ [verified]
constexpr uint32_t Script_ctor = 0x004cd700; constexpr uint32_t Script_ctor = 0x004cd700;
// thiscall void (Script* this) [verified] // thiscall void (Script* this) [verified]
@ -211,5 +219,67 @@ constexpr uint32_t Stream_ReadInt = 0x004b9d20;
constexpr uint32_t Stream_ReadBool = 0x004b9c00; constexpr uint32_t Stream_ReadBool = 0x004b9c00;
// cdecl void (Stream* s, const char* label, float* out, int flag) /* wrapper over vft[3] */ [verified] // cdecl void (Stream* s, const char* label, float* out, int flag) /* wrapper over vft[3] */ [verified]
constexpr uint32_t Stream_ReadFloat = 0x004b9bc0; constexpr uint32_t Stream_ReadFloat = 0x004b9bc0;
// thiscall void (ServerPlayer* this, TechDef* def, bool silent) /* vft slot 4 of 0x00a327a4; hard-coded tech effects */ [verified]
constexpr uint32_t ServerPlayer_OnTechResearched = 0x00491790;
// thiscall bool (MasterTechTree* this, TechDef* def, int techId) /* techId = 10000+index into g_TechIdNames; 0xc5 = none */ [verified]
constexpr uint32_t MasterTechTree_IsTech = 0x0017d5d0;
// thiscall TechDef* (MasterTechTree* this, int techId) [verified]
constexpr uint32_t MasterTechTree_GetTechDef = 0x0017d610;
// thiscall bool (TechTree* this, int techId) [verified]
constexpr uint32_t TechTree_HasResearched = 0x0017d810;
// thiscall void (MasterTechTree* this) /* fills TechDef*[196] at this+0 from g_TechIdNames */ [verified]
constexpr uint32_t MasterTechTree_ResolveTechIds = 0x00181c10;
// cdecl int (std::string* name) /* membership in g_CombatTechNames (116) */ [verified]
constexpr uint32_t IsCombatTechName = 0x002965c0;
// fastcall void (ServerPlayer* this) /* flags[7] at +0x348 from SpeciesDef xnc tech ids */ [verified]
constexpr uint32_t ServerPlayer_RebuildSpeciesTechFlags = 0x0042bf10;
// thiscall void (ServerPlayer* this, TechDef* def) [verified]
constexpr uint32_t ServerPlayer_ApplyAITechBonus = 0x0040e330;
// thiscall void (ServerPlayer* this, bool on) [verified]
constexpr uint32_t ServerPlayer_SetAIBenefit = 0x004186b0;
// cdecl bool (TechDef* def, uint* maskOut) [verified]
constexpr uint32_t TechDef_GetPlagueCureMask = 0x00137240;
// cdecl uint* (uint out[2], TechTree* tree) /* EBX-passed tree in caller; tables 0x00adf378 / 0x00adf478 */ [unverified]
constexpr uint32_t ComputeTechBitmasks = 0x000d7960;
// cdecl SpeciesDef* (uint species) /* 0x00b10a00 + i*0x184 */ [verified]
constexpr uint32_t SpeciesDef_Get = 0x00145cc0;
// cdecl void (void) [verified]
constexpr uint32_t SpeciesDef_InitTable = 0x001453a0;
// fastcall void (ServerPlayer* this) [verified]
constexpr uint32_t ServerPlayer_UpdateBankruptcyLimits = 0x00418600;
// thiscall void (ServerPlayer* this, int level) [verified]
constexpr uint32_t ServerPlayer_SetBankruptcyState = 0x0040e260;
// fastcall int (ServerPlayer* this) [verified]
constexpr uint32_t ServerPlayer_BankruptcyLevel = 0x0040db10;
// cdecl double (double suit, double ideal, double tol) /* clamp01(1-|suit-ideal|/(tol+0.1)) */ [verified]
constexpr uint32_t ServerSystem_HazardMod = 0x00347ae0;
// thiscall double (ServerSystem* this, double tradePoints) /* RET 8 */ [verified]
constexpr uint32_t ServerSystem_TradePointsToMoney = 0x003505b0;
// thiscall double (ServerSystem* this, int species) [verified]
constexpr uint32_t ServerSystem_CalcSuitMod = 0x003484d0;
// fastcall void (ServerSystem* this) [verified]
constexpr uint32_t ServerSystem_AccrueSystemBonus = 0x0034d4f0;
// thiscall int (ServerSystem* this, float frac) [verified]
constexpr uint32_t ServerSystem_SystemBonusPopTarget = 0x0034b5a0;
// cdecl void (Vector3* posOut, bool* arrivedOut, float nodespeed, float dt, void* lines, Vector3* from, Vector3* to) [unverified]
constexpr uint32_t NodeLine_Step = 0x00305510;
// cdecl void (vector* segsOut, vector* systems, Vector3* from, Vector3* to) [unverified]
constexpr uint32_t NodeLine_BuildStutterSegments = 0x00305280;
// data struct { const char* name; int x; }[196] /* TechId = 10000+i */ [verified]
constexpr uint32_t g_TechIdNames = 0x005ff9e4;
// data const char*[116] [verified]
constexpr uint32_t g_CombatTechNames = 0x00619718;
// data SpeciesDef[7] (0x184 B each, .bss, filled by SpeciesDef_InitTable) [verified]
constexpr uint32_t g_SpeciesDefTable = 0x00710a00;
// data struct { int techId; uint bit; }[32] [verified]
constexpr uint32_t g_TechBitmaskTableA = 0x006df378;
// data struct { int techId; uint bit; }[29] [verified]
constexpr uint32_t g_TechBitmaskTableB = 0x006df478;
// data struct { int techId; int a; float value; }[6] /* values not dumped */ [unverified]
constexpr uint32_t g_AITechValueTable = 0x00617888;
// data int (config storage; PTR slot 0x00aedfe0) [verified]
constexpr uint32_t g_PERGATETRAFFIC_DRV_TpGate = 0x00723e2c;
// data int (config storage; PTR slot 0x00aedfe4) [verified]
constexpr uint32_t g_PERGATETRAFFIC_DRV_GatAmp = 0x00723e30;
} // namespace sots::addr } // namespace sots::addr