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>
166 lines
3.7 KiB
C++
166 lines
3.7 KiB
C++
//===========================================================================//
|
|
// File: gaugmap.hpp //
|
|
// Project: MUNGA Brick: Gauge Renderer //
|
|
// Contents: //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 05/17/95 CPB Initial coding. //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1995, Virtual World Entertainment, Inc. All rights reserved //
|
|
// PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined(GAUGMAP_HPP)
|
|
# define GAUGMAP_HPP
|
|
|
|
# if !defined(RESOURCE_HPP)
|
|
# include <resource.hpp>
|
|
# endif
|
|
|
|
# if !defined(NODE_HPP)
|
|
# include <node.hpp>
|
|
# endif
|
|
|
|
# if !defined(SCALAR_HPP)
|
|
# include <scalar.hpp>
|
|
# endif
|
|
|
|
# if !defined(CHAIN_HPP)
|
|
# include <chain.hpp>
|
|
# endif
|
|
|
|
class Entity;
|
|
class GaugeEntityList;
|
|
class GaugeEntityArray;
|
|
class Derivation;
|
|
class Point3D;
|
|
|
|
//#######################################################################
|
|
// GaugeEntityList
|
|
//#######################################################################
|
|
class GaugeEntityList :
|
|
public Node
|
|
{
|
|
public:
|
|
GaugeEntityList();
|
|
~GaugeEntityList();
|
|
Logical
|
|
TestInstance() const;
|
|
void
|
|
Add(Entity *entity);
|
|
void
|
|
Remove(Entity *entity);
|
|
void
|
|
Clear();
|
|
int
|
|
NumberOfItems();
|
|
int
|
|
CopyEntities(
|
|
GaugeEntityList *destination,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
int
|
|
CopyEntitiesWithinBounds(
|
|
GaugeEntityList *destination,
|
|
Scalar min_x,
|
|
Scalar min_y,
|
|
Scalar min_z,
|
|
Scalar max_x,
|
|
Scalar max_y,
|
|
Scalar max_z,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
int
|
|
CopyEntitiesWithinBounds(
|
|
GaugeEntityList *destination,
|
|
Point3D *center,
|
|
Scalar radius,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
|
|
ChainOf<Entity*> * const
|
|
GetInstanceList()
|
|
{
|
|
return &instanceList;
|
|
}
|
|
protected:
|
|
ChainOf<Entity*>
|
|
instanceList;
|
|
};
|
|
|
|
//#######################################################################
|
|
// GaugeEntityArray
|
|
//#######################################################################
|
|
class GaugeEntityArray SIGNATURED
|
|
{
|
|
public:
|
|
GaugeEntityArray();
|
|
~GaugeEntityArray();
|
|
Logical
|
|
TestInstance() const;
|
|
void
|
|
Add(Entity *entity);
|
|
void
|
|
Remove(Entity *entity);
|
|
void
|
|
Clear();
|
|
void
|
|
PrintStatistics();
|
|
int
|
|
CopyEntities(
|
|
GaugeEntityList *destination,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
int
|
|
CopyEntitiesWithinBounds(
|
|
GaugeEntityList *destination,
|
|
Scalar min_x,
|
|
Scalar min_y,
|
|
Scalar min_z,
|
|
Scalar max_x,
|
|
Scalar max_y,
|
|
Scalar max_z,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
int
|
|
CopyEntitiesWithinBounds(
|
|
GaugeEntityList *destination,
|
|
Point3D *center,
|
|
Scalar radius,
|
|
Derivation *derivation_type = NULL
|
|
);
|
|
void
|
|
GetBounds(
|
|
Scalar *min_x,
|
|
Scalar *min_y,
|
|
Scalar *min_z,
|
|
Scalar *max_x,
|
|
Scalar *max_y,
|
|
Scalar *max_z
|
|
);
|
|
|
|
protected:
|
|
enum
|
|
{
|
|
gaugeMapArraySize=64
|
|
};
|
|
|
|
int
|
|
ArrayOffset(Scalar n);
|
|
|
|
Scalar
|
|
minimumX,
|
|
minimumY,
|
|
minimumZ,
|
|
maximumX,
|
|
maximumY,
|
|
maximumZ;
|
|
|
|
GaugeEntityList
|
|
grid[gaugeMapArraySize][gaugeMapArraySize];
|
|
};
|
|
|
|
#endif
|
|
|