//===========================================================================// // File: hud.cpp // // Project: BattleTech Brick: Mech subsystems // // Contents: HUD -- head-up display / targeting reticle // //---------------------------------------------------------------------------// // Copyright (C) 1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #pragma hdrstop #if !defined(HUD_HPP) # include #endif #if !defined(MECH_HPP) # include #endif static const Point3D HudZeroVector(0.0f, 0.0f, 0.0f); Derivation HUD::ClassDerivations( PowerWatcher::ClassDerivations, "HUD" ); HUD::SharedData HUD::DefaultData( HUD::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount ); HUD::HUD( Mech *owner, int subsystem_ID, SubsystemResource *subsystem_resource, SharedData &shared_data ): PowerWatcher(owner, subsystem_ID, subsystem_resource, shared_data) { Check(owner); Check_Pointer(subsystem_resource); flickerRate = 0.0f; rotationOfTorsoHorizontal = 0.0f; torsoLimitRight = 0.0f; torsoLimitLeft = 0.0f; torsoSpeed = 0.0f; rangeToTarget = 0.0f; scratch1F0 = 0; visible = True; lockFlag = False; hotBoxVector = HudZeroVector; threatVector = HudZeroVector; compassHeading = 0.0f; blinkTimer = 0.0f; flickerTimer = 0.0f; blinkState = True; transitionFlag = False; previousHorizontal = 0.0f; statusAlarm.Initialize(2); freeAimSlew = 0.0f; scratch290 = 0.0f; horizontalTorsoOffset = 0.0f; flickerRate = subsystem_resource->flickerRate; horizontalMovementPerSecond = subsystem_resource->horizontalMovementPerSecond; horizontalLimit = subsystem_resource->horizontalLimit; // // The torso-orientation source is a Mech link not yet live at // construction time; HudSimulation refreshes these per-frame. // linkedEntity = 0; flickerActive = 0; Check_Fpu(); } HUD::~HUD() { } Logical HUD::TestClass(Mech &) { return True; } Logical HUD::TestInstance() const { return IsDerivedFrom(ClassDerivations); } // // Per-frame reticle / compass / lock-ring update. Not yet reconstructed. // void HUD::HudSimulation(Scalar) { Fail("HUD::HudSimulation -- hud.cpp not yet reconstructed"); }