diff --git a/game/reconstructed/btl4gau2.cpp b/game/reconstructed/btl4gau2.cpp index cc9bddb..ca926f2 100644 --- a/game/reconstructed/btl4gau2.cpp +++ b/game/reconstructed/btl4gau2.cpp @@ -2054,6 +2054,26 @@ void BallisticWeaponCluster::Execute() WeaponCluster::Execute(); } +// +// @004c9b50 -- DrawWarningLamp override: draw the fire-ready "dot" (the base +// blits the cluster image in on-colour 0xff / off-colour 0), THEN swap the +// base-page ammo count's colours so the digits stay legible against it: +// dot ABSENT (on==0) -> SetColors(bg=0, fg=0xff) == GREEN digits on black +// dot PRESENT (on!=0) -> SetColors(bg=0xff, fg=0) == BLACK digits cut out of +// the solid green dot (the stencil look) +// The SetColors call ForceUpdate()s the numeric so it repaints over the freshly +// drawn dot on the next child-execute pass. (Verified vs binary FUN_004c9b50 + +// the base DrawWarningLamp FUN_004c932c; the port had only the base, so the +// ammo count stayed green-on-black and clashed with the green dot.) +// +void BallisticWeaponCluster::DrawWarningLamp(int on) +{ + WeaponCluster::DrawWarningLamp(on); // FUN_004c932c: draw the dot + if (ammoCountA) + ((NumericDisplayInteger *)ammoCountA)->SetColors(on ? 0xff : 0, + on ? 0 : 0xff); +} + // // @004c9adc -- TestInstance: True unless the ammo bin is present and the eject // wipe is mid-cycle. diff --git a/game/reconstructed/btl4gau2.hpp b/game/reconstructed/btl4gau2.hpp index 53d4f90..a464378 100644 --- a/game/reconstructed/btl4gau2.hpp +++ b/game/reconstructed/btl4gau2.hpp @@ -493,7 +493,7 @@ ~WeaponCluster(); // @004c91d4 void BecameActive(); // @004c9258 void Execute(); // @004c9290 - void DrawWarningLamp(int color); // @004c932c + virtual void DrawWarningLamp(int on); // @004c932c (virtual: BallisticWeaponCluster overrides) protected: char *clusterImage; // @0xCC this[0x33] GraphicGauge *rechargeArc; // @0xD0 this[0x34] SegmentArc270 @@ -535,6 +535,7 @@ ~BallisticWeaponCluster(); // @004c9940 void BecameActive(); // @004c99cc void Execute(); // @004c9a38 + void DrawWarningLamp(int on); // @004c9b50 (override: dot + ammo colour swap) Logical TestInstance() const; // @004c9adc protected: Logical jammed; // @0xE8 this[0x3A]