Files
TeslaRel410/CODE/RP/MUNGA_L4/L4LAMP.HPP
T
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

170 lines
5.2 KiB
C++

//===========================================================================//
// File: l4lamp.hpp //
// Project: MUNGA Brick: Gauge Module //
// Contents: Interface specification for L4 Lamps //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- -----------------------------------------------------------//
// 02/16/96 CPB Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1996, Virtual World Entertainment, Inc. All rights reserved //
// PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(L4LAMP_HPP)
# define L4LAMP_HPP
class L4LampManager;
class L4Lamp;
class L4GraphicLamp;
# if !defined(LAMP_HPP)
# include "lamp.hpp"
# endif
# if !defined(L4CTRL_HPP)
# include "l4ctrl.hpp"
# endif
//#########################################################################
//############################# L4LampManager #############################
//#########################################################################
class L4LampManager:
public LampManager
{
friend class L4Lamp;
//----------------------------------------------------------------------
// Public methods
//----------------------------------------------------------------------
public:
L4LampManager(LBE4ControlsManager *controls_manager);
~L4LampManager();
Logical
TestInstance() const;
virtual void
Update(ModeMask current_mode_mask);
//----------------------------------------------------------------------
// Protected methods
//----------------------------------------------------------------------
protected:
void
AssertNewLampValue(int lamp_number, int lamp_value);
//----------------------------------------------------------------------
// Protected data
//----------------------------------------------------------------------
protected:
LBE4ControlsManager
*controlsManager;
int
*previousLampState;
Logical
*lampActiveFlag;
};
//#########################################################################
//################################ L4Lamp #################################
//#########################################################################
class L4Lamp :
public Lamp
{
//----------------------------------------------------------------------
// Public methods
//----------------------------------------------------------------------
public:
enum
{
LampStateDim = Lamp::NextLampState,
NextLampState
};
L4Lamp(
LampID lamp_number,
ModeMask mode_mask,
L4LampManager *lamp_manager
);
~L4Lamp();
Logical
TestInstance() const;
void
SetAutomaticOperation(Logical automatic_flag = True);
protected:
//----------------------------------------------------------------------
// Protected methods
//----------------------------------------------------------------------
void
Update(Logical force_notify_of_state_change = False);
void
NotifyOfStateChange();
//----------------------------------------------------------------------
// Public data
//----------------------------------------------------------------------
public:
ControlsButton
automaticValue; // controls lampState if 'automatic' is true
//----------------------------------------------------------------------
// Protected data
//----------------------------------------------------------------------
protected:
ControlsButton
previousAutomaticValue;
Logical
automatic;
int
alertValue;
};
//#########################################################################
//############################# L4GraphicLamp #############################
//#########################################################################
class L4GraphicLamp :
public GraphicLamp
{
//----------------------------------------------------------------------
// Public methods
//----------------------------------------------------------------------
public:
L4GraphicLamp(
LampID lamp_number,
ModeMask mode_mask,
GaugeRenderer *renderer,
int graphics_port_number,
int left, int bottom,
const char *bitmap_name,
int bg_color, int fg_color,
Logical opaque_flag = True
);
~L4GraphicLamp();
Logical
TestInstance() const;
protected:
//----------------------------------------------------------------------
// Protected methods
//----------------------------------------------------------------------
void
NotifyOfStateChange();
//----------------------------------------------------------------------
// Protected data
//----------------------------------------------------------------------
protected:
Logical
opaque;
char
*mapName;
int
bgColor,
fgColor;
};
#endif