Earthsiege Research archive

Arming and service-bay artwork

The shell uses pre-rendered bitmaps for the arming HERC, independently of the simulator's 3D model. Eight CFG profiles describe 45 equipment mounts. Each choice is six signed shorts: image index, weapon ID, normal-image X/Y and selection-outline X/Y. HOTSPOT.DAT supplies separate inclusive mouse rectangles. The sprite origins are initialized by GO 0x25090; mount painter order is at 0x803d8. Colossus has an additional cover drawn after mount 3 when either central mount is occupied.

The compatible list (0x371ad) includes NONE, then the profile's choices whose technology is available or whose inventory stack is nonempty. The current weapon remains selectable even without a spare. With no selected mount, the general catalogue has no NONE entry. Technology availability does not create inventory.

Equipment exchange (0x29abc) removes the head of the new weapon's condition stack and returns the old weapon to its stack head. Selecting the current weapon or an unavailable spare changes nothing. A zero-condition spare becomes an empty mount. Missile arrays retain their missile selection, converting the non-missile value 5 to 0; other equipment uses 5. The missile selector presents SARH, ARH, ARM and EO. The raw setter 0x24a1e does not itself restrict its signed-short input.

Single-mission HERC cycling chooses an unassigned, existing, non-construction slot and assigns it to the current pilot. Campaign cycling includes assigned and unassigned HERCs and changes the crew cursor to the matching pilot, or -1. Single missions obtain their spare inventory from S_ARMORY.DAT.

Original comparisons and limitations

tools/capture_armament_fixtures.py executes 1,650 original equipment exchanges, 360 compatible menus, 270 missile selections and 128 HERC cycles. Its portable fixture also retains every mount choice, hotspot, base origin and painter order. C++ compares all of these. Screen copy/restore and condition-overlay binding are explicit presentation sinks: this is not a whole-screen raster comparison. Resident TTM animation is integrated in the service bay and during mechanic dialogue; see SHELL.md. The later overlay comparison below covers body damage painting.

HERC.DAT (Samson) refers to healthy grenade-launcher image indices 48, 49 and 50, but HERCWEP1.DBA contains only 48 images, numbered 0–47. Original 0x22d78 performs an unchecked lookup, causing an invalid access in the isolated original harness. The outlines do exist in HERCOUTL.DBA. This establishes a resource/index mismatch; it does not establish how every DOSBox heap layout manifests the original bug. C++ retains the equipment and safely omits unavailable sprite frames.

The paired POINTS and HERCS controls share a 56-pixel CORNERS sprite and text anchor. Original constructor 0x1d47d selects images 48–51 and shifts the right half's origin by 27 pixels. Treating each half as a standalone text button causes duplicated labels. The arrow-key HERC controls use separate images 44–47.

Crew assignment

The 1610 event handler (0x2d19e) performs preview swaps. Cycling to a HERC already owned by another pilot gives that pilot the selected pilot's starting HERC. Cycling onward restores the previously displaced pilot before trying another HERC. Selecting a different pilot commits the current swap as the next preview's starting point. NONE is disabled for the player. Accept keeps assignments; Cancel restores all four saved assignments. The original Cancel restores the crew cursor before restoring assignments, leaving the selected-HERC transient value dependent on that order.

tools/capture_crew_fixtures.py records 96 event sequences / 3,360 transitions. State updates execute unchanged; owner initialization, inert presentation controls and save/animation sinks are explicitly described in the script. The C++ event states all agree. Its separate UI tests cover actual input.

Crew portraits require REGN1610.DPL, loaded directly by the 1610 dispatcher even though its scene region remains 4000. PILOTS.DBA is indexed by pilot name ID; the name variant changes text, not that portrait. INSIGNIA.DBA supplies the player image, MECHS.DBA the small HERC diagrams, and MESH.DBA the inactive overlay. Text and diagram callbacks are 0x17a19, 0x17b4a and 0x17d9f.

Repair allocation, construction and salvage are documented in HANGAR_SERVICE.md, including the original repair-band quirks and the unassigned-pilot memory write.

Body damage layers

GO 0x24366 draws the chassis DMG1 sprites after the base chassis and before mounted equipment. Six grouped-armour percentages select the normal condition bands; only bands 1..3 have overlays. At exactly zero percent, band 4 draws no overlay. Each CFG/*DMG1.DAT record is a signed 16-bit sprite index followed by signed 32-bit X and Y (10 bytes), not five independent shorts. The catalogue now retains those coordinate types. Outlaw uses GUNNDMG1 and Colossus uses COLODMG1, differing from their ordinary weapon-art stems.

capture_hangar_damage_art.py executes the original resource reader, grouping, selection and rasterizers for 384 conditions. Both VGA pages match C++ pixels for all eight chassis, including threshold boundaries and mixed armour values. The live C++ bay, arming and repair views include these layers.