Clean, self-contained extraction of the BattleTech-specific work from the
reverse-engineering workspace -- engine + game + content + build, with nothing
from Red Planet or the raw archive dumps. Builds green (Win32) and runs the
single-player drive->animate->target->fire->damage->destroy loop out of the box.
Layout:
engine/ MUNGA + MUNGA_L4 shared 2007 engine, carrying our BT render/loader
work (bgfload/L4D3D/L4VIDEO: BSL bit-slice decode, LOD/ground/shadow
models) + image codec; the minimal rp/ headers the audio HAL needs
game/ reconstructed BT logic + surviving-original BT source + fwd shims
+ WinMain launcher
content/ full runtime tree (BTL4.RES, VIDEO/, GAUGE/, AUDIO/, eggs, BTDPL.INI)
docs/ format specs + reconstruction ledgers
reference/ raw Ghidra pseudocode (recon source-of-truth) + decomp exporter
tools/ MP console emulator + map/resource scanners
One top-level CMake builds munga_engine lib + bt410_l4 game lib + btl4.exe.
All paths relativized (186 fwd shims + ~437 CMake abs paths -> repo-relative);
DXSDK is the one external, overridable via -DDXSDK. Verified: builds to a
byte-identical 2.27MB exe and runs combat (TARGET DESTROYED, 0 crashes) against
the bundled content.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
// Recovered decompilation of functions attributed to bt_l4/btl4gaug.cpp
|
|
// (from BTL4OPT.EXE via embedded assert paths). Pseudocode — reconstruct against the header.
|
|
|
|
/* ---- @ 004c3f6c ---- */
|
|
|
|
int * __cdecl
|
|
FUN_004c3f6c(int *param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5,
|
|
int param_6,int param_7,undefined4 param_8,char *param_9,char *param_10,char *param_11,
|
|
undefined4 param_12)
|
|
|
|
{
|
|
int iVar1;
|
|
int iVar2;
|
|
undefined4 *puVar3;
|
|
|
|
FUN_004c37dc(param_1,param_2,param_3,param_4,param_5,param_6,param_8,param_9,param_10,param_12);
|
|
*param_1 = (int)&PTR_FUN_00518d00;
|
|
iVar1 = FUN_0041f98c(param_7,param_11);
|
|
if (iVar1 == 0) {
|
|
FUN_004dbb24(&DAT_00524e20,s_ColorMapperHeat_warning__subsyst_00518685,(char *)0x0);
|
|
FUN_004dbb24(&DAT_00524e20,param_11,(char *)0x0);
|
|
FUN_004dbb24(&DAT_00524e20,s___does_not_exist_005186aa,(char *)0x0);
|
|
}
|
|
else {
|
|
iVar2 = FUN_0041a1a4(**(int **)(iVar1 + 0xc),0x50e3ec);
|
|
if ((iVar2 == 0) && (iVar2 = FUN_0041a1a4(**(int **)(iVar1 + 0xc),0x50e604), iVar2 == 0)) {
|
|
FUN_0040385c(s_Bad_subsystem_type_005186bc,s_d__tesla_bt_bt_l4_BTL4GAUG_CPP_005186cf,0x68a);
|
|
}
|
|
}
|
|
puVar3 = (undefined4 *)FUN_00402298(0x1c);
|
|
if (puVar3 == (undefined4 *)0x0) {
|
|
puVar3 = (undefined4 *)0x0;
|
|
}
|
|
else {
|
|
puVar3 = FUN_004c3664(puVar3,0,param_1 + 0x15,iVar1);
|
|
}
|
|
(**(code **)(*param_1 + 0x34))(param_1,puVar3);
|
|
return param_1;
|
|
}
|
|
|
|
|
|
|