Files
RP412/MUNGA/INTORGN.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

177 lines
4.1 KiB
C++

#pragma once
#include "network.h"
#include "lattice.h"
class Entity;
class InterestOrigin:
public Node
{
friend class InterestManager;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Destructor, and Testing
//
public:
~InterestOrigin();
Logical
TestInstance() const;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Update
//
public:
//
//-----------------------------------------------------------------------
// Update
//
// Updates the interest origins internal data structures for the
// interest zone ID. This method is most likely called by the
// renderer manager.
//-----------------------------------------------------------------------
//
virtual void
Update(InterestZoneID interest_zone_ID);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Accessors
//
private:
InterestZoneID
GetInterestZoneID();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructor
//
protected:
InterestOrigin(
InterestZoneID interest_zone_ID,
InterestType interest_type,
InterestDepth depth_calibration
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Interest Manager support
//
private:
virtual void
AddInterestingEntity(Entity *interesting_entity);
virtual void
RemoveUninterestingEntity(Entity *uninteresting_entity);
virtual void
RemoveUninterestingEntities();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Private data
//
private:
InterestZoneID
interestZoneID;
InterestType
interestType;
InterestDepth
depthCalibration;
SlotOf<InterestArena*>
interestArenaSocket;
};
//~~~~~~~~~~~~~~~~~~~~~~~ InterestOrigin inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~
inline InterestZoneID
InterestOrigin::GetInterestZoneID()
{
Check(this);
return interestZoneID;
}
#if 0
//##########################################################################
//####################### InterestOrigin #############################
//##########################################################################
class InterestOrigin:
public Node
{
friend class InterestManager;
friend class InterestOrigin__InterestingEntityIterator;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Public types
//
public:
typedef InterestOrigin__InterestingEntityIterator
InterestingEntityIterator;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructor, Destructor, and Testing
//
public:
InterestOrigin(
const EntityID &entity_ID,
InterestType interest_type,
InterestDepth depth_calibration
);
~InterestOrigin();
Logical
TestInstance() const;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Renderer support
//
public:
//
//--------------------------------------------------------------------
// UpdateInterestOrigin
//
// Updates the interest managers internal data structures for the
// interest origin entity. This method is most likely called by the
// renderer manager. It prepares the data that will be accessed by
// InterestingEntityIterator.
//--------------------------------------------------------------------
//
virtual void
Update();
InterestArena*
GetInterestArena();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Interest Manager support
//
protected:
virtual void
AddInterestingEntity(Entity *interesting_entity);
virtual void
RemoveUninterestingEntity(Entity *uninteresting_entity);
virtual void
RemoveUninterestingEntities();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Private data
//
private:
EntityID
entityID;
InterestType
interestType;
InterestDepth
depthCalibration;
SlotOf<InterestArena*>
interestArenaSocket;
SChainOf<Entity*>
interestingEntitySocket;
};
//~~~~~~~~~~~~~~~~~~~~~~~~ InterestOrigin inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~
inline InterestArena*
InterestOrigin::GetInterestArena()
{
Check(this);
return interestArenaSocket.GetCurrent();
}
#endif