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

132 lines
3.7 KiB
C++

//===========================================================================//
// File: envirnmt.hh //
// Project: MUNGA Brick: Model Manager //
// Contents: Interface specification for environment variables //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 02/13/95 JMA Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(ENVIRNMT_HPP)
# define ENVIRNMT_HPP
# if !defined(STYLE_HPP)
# include <style.hpp>
# endif
# if !defined(VECTOR3D_HPP)
# include <vector3d.hpp>
# endif
//##########################################################################
//######################## Environment ###############################
//##########################################################################
class Environment
{
#if defined(USE_SIGNATURE)
friend int
Is_Signature_Bad(const Environment *p);
#endif
public:
Scalar
gravityConstant,
airDensity,
audioReverbTime,
audioAverageSurfaceReflectivity,
audioAirAbsorption;
Vector3D
windVelocity;
Scalar
ambientTemperature; // Kelvin
const Vector3D&
GetWindVelocity()
{return windVelocity;}
Environment()
{}
Environment(
Scalar gravity,
Scalar air_density,
Scalar reverb_time,
Scalar surface_reflectivity,
Scalar air_absorption,
const Vector3D &wind_velocity,
Scalar ambient_temperature
):
gravityConstant(gravity),
airDensity(air_density),
audioReverbTime(reverb_time),
audioAverageSurfaceReflectivity(surface_reflectivity),
audioAirAbsorption(air_absorption),
windVelocity(wind_velocity),
ambientTemperature(ambient_temperature)
{}
Logical
TestInstance() const;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~ Environment functions ~~~~~~~~~~~~~~~~~~~~~~~~~~
void
Convert_From_Ascii(
const char *str,
Environment *environment
);
inline MemoryStream&
MemoryStream_Read(
MemoryStream* stream,
Environment *output
)
{return stream->ReadBytes(output, sizeof(*output));}
inline MemoryStream&
MemoryStream_Write(
MemoryStream* stream,
const Environment *input
)
{return stream->WriteBytes(input, sizeof(*input));}
//##########################################################################
//###################### EnvironmentList #############################
//##########################################################################
class EnvironmentList SIGNATURED
{
protected:
int
environmentCount;
Environment
*environmentArray;
public:
EnvironmentList(int environments);
virtual ~EnvironmentList();
int
GetEnvironmentCount()
{Check(this); return environmentCount;}
virtual Environment&
GetEnvironment(int index)
{
Check (this); Verify((unsigned)index < environmentCount);
return environmentArray[index];
}
Logical
TestInstance() const;
};
extern EnvironmentList *Environments;
#endif