Files
BT412/game/reconstructed/gnrator.hpp
T
arcattackandClaude Opus 4.8 7b7d465e5e Initial commit: bt411 -- standalone Windows BattleTech (Tesla 4.10 port)
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>
2026-07-05 21:03:40 -05:00

48 lines
2.6 KiB
C++

//===========================================================================//
// File: gnrator.hpp //
// Project: BattleTech Brick: Entity Manager //
// Contents: Generator subsystem -- ALIAS / RECONCILIATION NOTE //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
// PROPRIETARY AND CONFIDENTIAL //
//===========================================================================//
//
// RECONCILIATION VERDICT: gnrator.cpp's class IS powersub.cpp's Generator.
// ------------------------------------------------------------------------
// The surviving source fragment GNRATOR.TCP (CODE/BT/BT/GNRATOR.TCP) defines
// methods of the *same* Generator class that powersub.cpp already reconstructed
// (the HeatSink-derived voltage generator, classID 0xBC1, vtable 0x50fd74,
// ctor @0x4b225c). This module therefore does NOT declare a new class -- it
// only documents the original file split and folds in the one method the
// surviving .TCP reveals that the powersub.cpp reconstruction omitted.
//
// Evidence that GNRATOR.TCP == powersub.cpp's Generator:
// * GNRATOR.TCP `Generator::TestClass(Mech&) { return True; }`
// == powersub.cpp Generator::TestClass @0x4b... (line 844) -- identical.
// * GNRATOR.TCP `Generator::ResetToInitialState()` chains
// `HeatableSubsystem::ResetToInitialState()` and sets `outputVoltage = 0`.
// Generator owns an `outputVoltage` member (powersub.cpp +0x1f8) and is a
// HeatSink : HeatableSubsystem -- so the chain and the field both resolve
// against powersub.cpp's Generator. No second generator class exists in
// the binary (the only "Generator" Derivation name string is @0x50fc60 /
// @0x50dc90, single ClassID 0xBC1).
//
// ==> See powersub.hpp / powersub.cpp for the authoritative declaration and
// definitions. In the original tree the Generator class evidently lived
// in gnrator.cpp; the binary's only linker tag for the
// @0x4b02f0..@0x4b2678 cluster was bt/powersub.cpp, so the reconstruction
// captured Generator there. This is purely a source-file-organisation
// difference, not a distinct type.
//
#if !defined(GNRATOR_HPP)
# define GNRATOR_HPP
#if !defined(POWERSUB_HPP)
# include <powersub.hpp> // Generator is declared here
#endif
// (no new declarations -- intentionally empty; see powersub.hpp::Generator)
#endif