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>
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
#include "munga.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "vdata.h"
|
||||
#include "objstrm.h"
|
||||
|
||||
//#############################################################################
|
||||
//####################### RegisteredClass ###############################
|
||||
//#############################################################################
|
||||
|
||||
RegisteredClass::RegisteredClass(ClassID class_id)
|
||||
{
|
||||
classID = class_id;
|
||||
}
|
||||
|
||||
RegisteredClass::~RegisteredClass()
|
||||
{
|
||||
}
|
||||
|
||||
RegisteredClass::RegisteredClass(ObjectStream *stream)
|
||||
{
|
||||
ObjectID object_ID;
|
||||
|
||||
MemoryStream_Read(stream, &classID);
|
||||
Verify(classID != NullClassID);
|
||||
MemoryStream_Read(stream, &object_ID);
|
||||
}
|
||||
|
||||
void RegisteredClass::BuildFromPage(ObjectStream *stream, NameList*, ClassID class_ID, ObjectID object_ID)
|
||||
{
|
||||
*stream << class_ID << object_ID;
|
||||
}
|
||||
|
||||
Logical RegisteredClass::TestInstance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// GetClassID
|
||||
//#############################################################################
|
||||
//
|
||||
RegisteredClass::ClassID RegisteredClass::GetClassID(const CString &class_name_string)
|
||||
{
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// HACK - Class name lookup could be perfromed via registration, for now,
|
||||
// use if statements
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
#define COMPARE_AND_RETURN(class_name) if (!strcmp(class_name_string, #class_name)) return class_name##ClassID;
|
||||
|
||||
COMPARE_AND_RETURN(AudioStateTrigger);
|
||||
COMPARE_AND_RETURN(AudioMotionScale);
|
||||
COMPARE_AND_RETURN(AudioRenderer);
|
||||
COMPARE_AND_RETURN(AudioLocation);
|
||||
COMPARE_AND_RETURN(AudioMotionTrigger);
|
||||
COMPARE_AND_RETURN(AudioControlMixer);
|
||||
COMPARE_AND_RETURN(AudioHingeScale);
|
||||
COMPARE_AND_RETURN(AudioControlSmoother);
|
||||
COMPARE_AND_RETURN(AudioResourceSelector);
|
||||
COMPARE_AND_RETURN(L4AudioCollisionTrigger);
|
||||
COMPARE_AND_RETURN(AudioResourceIndex);
|
||||
COMPARE_AND_RETURN(AudioScalarScale);
|
||||
COMPARE_AND_RETURN(AudioControlSend);
|
||||
COMPARE_AND_RETURN(L4AudioLocation);
|
||||
COMPARE_AND_RETURN(DirectPatchSource);
|
||||
COMPARE_AND_RETURN(Dynamic3DPatchSource);
|
||||
COMPARE_AND_RETURN(PatchResource);
|
||||
COMPARE_AND_RETURN(Static3DPatchSource);
|
||||
COMPARE_AND_RETURN(AudioControlMultiplier);
|
||||
COMPARE_AND_RETURN(AudioSampleAndHold);
|
||||
COMPARE_AND_RETURN(AudioScalarTrigger);
|
||||
COMPARE_AND_RETURN(AudioEnumerationTrigger);
|
||||
COMPARE_AND_RETURN(AudioIntegerTrigger);
|
||||
COMPARE_AND_RETURN(AudioLogicalTrigger);
|
||||
COMPARE_AND_RETURN(AudioControlsButtonTrigger);
|
||||
COMPARE_AND_RETURN(ExplosionResourceTable);
|
||||
COMPARE_AND_RETURN(AudioIdleWatcher);
|
||||
COMPARE_AND_RETURN(AudioControlEvent);
|
||||
COMPARE_AND_RETURN(AudioControlSequence);
|
||||
COMPARE_AND_RETURN(AudioControlSplitter);
|
||||
COMPARE_AND_RETURN(AudioLFO);
|
||||
COMPARE_AND_RETURN(AudioEnumerationDeltaTrigger);
|
||||
COMPARE_AND_RETURN(AudioScalarDeltaTrigger);
|
||||
COMPARE_AND_RETURN(AudioLevelOfDetail);
|
||||
COMPARE_AND_RETURN(PatchLevelOfDetail);
|
||||
COMPARE_AND_RETURN(AudioMessageWatcher);
|
||||
COMPARE_AND_RETURN(AudioControlsButtonMessageWatcher);
|
||||
|
||||
//
|
||||
// Etc...
|
||||
//
|
||||
|
||||
return NullClassID;
|
||||
}
|
||||
Reference in New Issue
Block a user