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>
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#if !defined(ALARM_HPP)
|
|
# define ALARM_HPP
|
|
|
|
# if !defined(STATE_HPP)
|
|
# include <state.hpp>
|
|
# endif
|
|
|
|
//##########################################################################
|
|
//######################## AlarmIndicator ############################
|
|
//##########################################################################
|
|
//
|
|
// A multi-level status indicator. The Mech carries four (master, heat,
|
|
// stability, status); each maps a discrete alarm LEVEL onto a StateIndicator
|
|
// state, so a level change fires the same audio / video / gauge watchers as
|
|
// StateIndicator::SetState.
|
|
//
|
|
// Reconstructed: the shipped ctor (@0041b9ec) is byte-for-byte the
|
|
// StateIndicator(unsigned) ctor (stateCount = oldState = currentState =
|
|
// level_count; the three watcher sockets initialised NULL) with a distinct
|
|
// vtable, i.e. a StateIndicator subclass. See ALARM.NOTES.md.
|
|
//
|
|
class AlarmIndicator:
|
|
public StateIndicator
|
|
{
|
|
public:
|
|
AlarmIndicator(unsigned level_count = 0):
|
|
StateIndicator(level_count)
|
|
{
|
|
}
|
|
|
|
void
|
|
Initialize(unsigned level_count)
|
|
{Check(this); stateCount = level_count; SetState(0);}
|
|
void
|
|
SetLevel(unsigned level)
|
|
{Check(this); SetState(level);}
|
|
unsigned
|
|
GetLevel()
|
|
{Check(this); return GetState();}
|
|
unsigned
|
|
GetLevelCount()
|
|
{Check(this); return stateCount;}
|
|
};
|
|
|
|
#endif
|