Files
TeslaRel410/restoration/source410/BT/HUD.HPP
T
CydandClaude Fable 5 a36e775c7c Mech phase 2: reconstruct HUD (: PowerWatcher) -- Mech hudSubsystem
Head-up display / targeting reticle subsystem, full named member set (reticle/
compass/lock/flicker/torso-readout state). Ctor chains PowerWatcher + inits per
the binary (visible/blinkState True, vectors zeroed, resource flicker/horizontal
copied); statusAlarm.Initialize(2). Added AlarmIndicator::Initialize(levels).
statics/dtor/test real; HudSimulation staged. BT: 29 ok.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 00:05:00 -05:00

100 lines
2.8 KiB
C++

//===========================================================================//
// File: hud.hpp //
// Project: BattleTech Brick: Mech subsystems //
// Contents: HUD -- the head-up display / targeting reticle subsystem //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(HUD_HPP)
# define HUD_HPP
# if !defined(POWERSUB_HPP)
# include <powersub.hpp>
# endif
//##################### Forward Class Declarations #######################
class Mech;
//###########################################################################
//###################### HUD Model Resource ############################
//###########################################################################
struct HUD__SubsystemResource:
public PowerWatcher::SubsystemResource
{
Scalar flickerRate;
int segmentPageIndex;
Scalar horizontalMovementPerSecond;
Scalar horizontalLimit;
};
//###########################################################################
//################################ HUD #################################
//###########################################################################
class HUD:
public PowerWatcher
{
public:
static Derivation ClassDerivations;
static SharedData DefaultData;
typedef void
(HUD::*Performance)(Scalar time_slice);
void
SetPerformance(Performance performance)
{
Check(this);
activePerformance = (Simulation::Performance)performance;
}
static Logical
TestClass(Mech &);
Logical
TestInstance() const;
void
HudSimulation(Scalar time_slice);
public:
typedef HUD__SubsystemResource SubsystemResource;
HUD(
Mech *owner,
int subsystem_ID,
SubsystemResource *subsystem_resource,
SharedData &shared_data = DefaultData
);
~HUD();
protected:
Scalar flickerRate;
Scalar rotationOfTorsoHorizontal;
Scalar torsoLimitRight;
Scalar torsoLimitLeft;
Scalar torsoSpeed;
Scalar rangeToTarget;
int scratch1F0;
int visible;
int lockFlag;
Point3D hotBoxVector;
Point3D threatVector;
Scalar compassHeading;
Scalar blinkTimer;
Scalar flickerTimer;
int blinkState;
int transitionFlag;
Scalar previousHorizontal;
int linkedEntity;
Scalar freeAimSlew;
Scalar scratch290;
Scalar horizontalTorsoOffset;
Scalar horizontalMovementPerSecond;
Scalar horizontalLimit;
int flickerActive;
};
#endif