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

164 lines
4.1 KiB
C++

#pragma once
#include "..\munga\objstrm.h"
#include "..\munga\entity.h"
#include "..\munga\audio.h"
#include "openal/al.h"
ALuint AL_getBuffer(int index);
extern ALuint *g_buffers;
extern int g_numBuffers;
//class AudioHardware;
//##########################################################################
//###################### AudioObjectStream ###########################
//##########################################################################
class AudioObjectStream:
public PlugStream
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction, Destruction and testing
//
public:
AudioObjectStream();
AudioObjectStream(
ResourceDescription *resource_description,
Entity *entity
);
~AudioObjectStream();
Logical
TestInstance() const;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Implementations
//
private:
RegisteredClass*
MakeObjectImplementation(Enumeration class_ID);
void
CreatedObjectImplementation(
RegisteredClass *object,
ObjectID object_ID
);
void
BuildFromPageImplementation(
NameList *entry_list,
Enumeration class_ID,
ObjectID object_ID
);
void
BuiltFromPageImplementation(
Enumeration class_ID,
ObjectID object_ID,
const CString &object_name_string
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Private data
//
private:
Entity *entity;
};
//##########################################################################
//#################### L4AudioResourceManager ########################
//##########################################################################
class L4AudioResourceManager:
public Node
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction, Destruction, Testing
//
public:
L4AudioResourceManager();
~L4AudioResourceManager();
Logical
TestInstance() const;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Static audio object methods
//
public:
//
//--------------------------------------------------------------------
// PreloadResources
//--------------------------------------------------------------------
//
void
PreloadResources(
NotationFile *notation_file
);
//
//--------------------------------------------------------------------
// UnloadResources
//--------------------------------------------------------------------
//
void
UnloadResources(
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Static audio object methods - tool support
//
public:
//
//--------------------------------------------------------------------
// CreateStaticAudioStreamResource
//--------------------------------------------------------------------
//
static ResourceDescription::ResourceID
CreateStaticAudioStreamResource(
ResourceFile *resource_file
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Dynamic audio object methods
//
public:
//
//--------------------------------------------------------------------
// CreateEntityAudioObjects
//--------------------------------------------------------------------
//
void
CreateEntityAudioObjects(
Entity *entity,
AudioRepresentation audio_representation
);
//
//--------------------------------------------------------------------
// DestroyEntityAudioObjects
//--------------------------------------------------------------------
//
void
DestroyEntityAudioObjects(Entity *entity);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Dynamic audio object methods - tool support
//
public:
//
//--------------------------------------------------------------------
// CreateModelAudioStreamResource
//--------------------------------------------------------------------
//
static ResourceDescription::ResourceID
CreateModelAudioStreamResource(
ResourceFile *resource_file,
const char *model_name,
NotationFile *model_file,
const ResourceDirectories *directories
);
};