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,47 @@
|
||||
#include "L4AUDLVL.h"
|
||||
|
||||
bool PRESET_isImplemented(int bank, int presetn)
|
||||
{
|
||||
PRESETINFO preset = allPresets[bank-1][presetn];
|
||||
|
||||
if (preset.sampleNum <= 0 || preset.sampleNum >= 5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i=0; i < preset.sampleNum; i++)
|
||||
{
|
||||
if (preset.samples[i].implemented)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int PRESET_getNumSamples(int bank, int preset)
|
||||
{
|
||||
return allPresets[bank-1][preset].sampleNum;
|
||||
}
|
||||
|
||||
SAMPLEINFO PRESET_getSampleInfo(int bank, int preset, int sampleInd)
|
||||
{
|
||||
SAMPLEINFO default;
|
||||
default.chan = SampleChannel::CHANNEL_CENTER;
|
||||
default.file = "";
|
||||
default.implemented = false;
|
||||
default.loop = SampleLoop::LoopAtWill;
|
||||
|
||||
if (sampleInd < 0 || sampleInd >= allPresets[bank-1][preset].sampleNum)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
return allPresets[bank-1][preset].samples[sampleInd];
|
||||
}
|
||||
|
||||
void PRESET_setBufferIndex(int bank, int preset, int sampleInd, int index)
|
||||
{
|
||||
allPresets[bank-1][preset].samples[sampleInd].bufferIndex = index;
|
||||
}
|
||||
Reference in New Issue
Block a user