Files
RP412/MUNGA_L4/L4LAMP.h
T
CydandClaude Opus 4.8 4abbf8879f Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet',
built on the MUNGA engine and its L4 (Win32/DirectX) platform layer:

- MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend
- RP / RP_L4: Red Planet game logic and Win32 application
- DivLoader, Setup1: asset loader and installer project
- lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies

Removed stale Subversion metadata and added .gitignore/.gitattributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:59:51 -05:00

148 lines
3.9 KiB
C++

#pragma once
class L4LampManager;
class L4Lamp;
class L4GraphicLamp;
#include "..\munga\lamp.h"
#include "l4ctrl.h"
//#########################################################################
//############################# 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;
};