Files
TeslaRel410/CODE/RP/MUNGA/MODE.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

108 lines
3.2 KiB
C++

//===========================================================================//
// File: mode.hpp //
// Project: MUNGA Brick: Controls Module //
// Contents: Interface specification for Controls/Gauges modules //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- -----------------------------------------------------------//
// 2/13/96 CPB Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1996, Virtual World Entertainment, Inc. All rights reserved //
// PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(MODE_HPP)
# define MODE_HPP
# if !defined(STYLE_HPP)
# include <style.hpp>
# endif
//########################################################################
//############################ Basic typedefs ############################
//########################################################################
typedef unsigned long ModeMask;
//#########################################################################
//############################## ModeManager ##############################
//#########################################################################
class ModeManager SIGNATURED
{
public:
enum
{
nextModeBit=0
};
enum
{
ModeAlwaysActive = -1L // WARNING! Assumed to be 32 bits!!!
};
//-------------------------------------------------------------------
// Construction/destruction/verification
//-------------------------------------------------------------------
public:
ModeManager(ModeMask initial_mask);
~ModeManager();
Logical
TestInstance() const;
//-------------------------------------------------------------------
// Mode mask accessor
//-------------------------------------------------------------------
public:
void
AddModeMask(ModeMask mode_mask)
{
Check(this);
previousModeMask = modeMask;
modeMask |= mode_mask;
Check_Fpu();
}
void
RemoveModeMask(ModeMask mode_mask)
{
Check(this);
previousModeMask = modeMask;
modeMask &= ~mode_mask;
Check_Fpu();
}
void
ReplaceModeMask(ModeMask mode_mask)
{
Check(this);
previousModeMask = modeMask;
modeMask = mode_mask;
Check_Fpu();
}
ModeMask
GetModeMask()
{
Check(this);
Check_Fpu();
return modeMask;
}
ModeMask
GetPreviousModeMask()
{
Check(this);
Check_Fpu();
return previousModeMask;
}
//-------------------------------------------------------------------
// String-to-Mode lookup
//-------------------------------------------------------------------
public:
virtual Logical
ModeStringLookup(const char *name, ModeMask *returned_value);
protected:
ModeMask
modeMask, previousModeMask;
};
#endif