Files
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

138 lines
2.3 KiB
C++

#pragma once
#include "resource.h"
#include "node.h"
#include "scalar.h"
#include "chain.h"
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];
};