mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Initial OpenAL code.
This commit is contained in:
@@ -409,136 +409,6 @@ void Display_Briefing_Text_GlyphX()
|
||||
DLLExportClass::On_Display_Briefing_Text();
|
||||
}
|
||||
|
||||
|
||||
void On_Sound_Effect(int sound_index, int variation, COORDINATE coord, int house)
|
||||
{
|
||||
// MBL 06.17.2019
|
||||
int voc = sound_index;
|
||||
if (voc == VOC_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// MBL 06.17.2019 - Borrowed from RedAlert\AUDIO.CPP Sound_Effect()
|
||||
//
|
||||
#if 1
|
||||
/*
|
||||
** Fetch a pointer to the sound effect data. Modify the sound as appropriate and desired.
|
||||
*/
|
||||
char const * ext = ""; // ".AUD";
|
||||
if (SoundEffectName[voc].Where == IN_VAR) {
|
||||
|
||||
/*
|
||||
** If there is no forced house, then use the current player
|
||||
** act like house.
|
||||
*/
|
||||
if (house == HOUSE_NONE) {
|
||||
house = PlayerPtr->ActLike;
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the extension based on the variation and house accent requested.
|
||||
*/
|
||||
if (((1 << house) & HOUSEF_ALLIES) != 0) {
|
||||
|
||||
/*
|
||||
** For infantry, use a variation on the response. For vehicles, always
|
||||
** use the vehicle response table.
|
||||
*/
|
||||
if (variation < 0) {
|
||||
if (ABS(variation) % 2) {
|
||||
ext = ".V00";
|
||||
} else {
|
||||
ext = ".V02";
|
||||
}
|
||||
} else {
|
||||
if (variation % 2) {
|
||||
ext = ".V01";
|
||||
} else {
|
||||
ext = ".V03";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (variation < 0) {
|
||||
if (ABS(variation) % 2) {
|
||||
ext = ".R00";
|
||||
} else {
|
||||
ext = ".R02";
|
||||
}
|
||||
} else {
|
||||
if (variation % 2) {
|
||||
ext = ".R01";
|
||||
} else {
|
||||
ext = ".R03";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// END MBL
|
||||
|
||||
DLLExportClass::On_Sound_Effect(PlayerPtr, sound_index, ext, variation, coord);
|
||||
|
||||
|
||||
#if 0
|
||||
// MBL 02.26.2019
|
||||
int voc = sound_index;
|
||||
if (voc == VOC_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// MBL 02.26.2019 - Borrowed from AUDIO.CPP Sound_Effect()
|
||||
//
|
||||
char const * ext = ""; // ".AUD";
|
||||
#ifdef TIBERIAN_DAWN
|
||||
if (Special.IsJuvenile && SoundEffectName[voc].Where == IN_JUV) {
|
||||
ext = ".JUV";
|
||||
} else {
|
||||
#endif
|
||||
if (SoundEffectName[voc].Where == IN_VAR) {
|
||||
/*
|
||||
** For infantry, use a variation on the response. For vehicles, always
|
||||
** use the vehicle response table.
|
||||
*/
|
||||
if (variation < 0) {
|
||||
if (ABS(variation) % 2) {
|
||||
ext = ".V00";
|
||||
} else {
|
||||
ext = ".V02";
|
||||
}
|
||||
} else {
|
||||
if (variation % 2) {
|
||||
ext = ".V01";
|
||||
} else {
|
||||
ext = ".V03";
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef TIBERIAN_DAWN
|
||||
}
|
||||
#endif
|
||||
// END MBL
|
||||
|
||||
DLLExportClass::On_Sound_Effect(PlayerPtr, sound_index, ext, variation, coord);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// void On_Speech(int speech_index) // MBL 02.06.2020
|
||||
void On_Speech(int speech_index, HouseClass *house)
|
||||
{
|
||||
// DLLExportClass::On_Speech(PlayerPtr, speech_index); // MBL 02.06.2020
|
||||
if (house == NULL) {
|
||||
DLLExportClass::On_Speech(PlayerPtr, speech_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
DLLExportClass::On_Speech(house, speech_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void On_Message(const char* message, float timeout_seconds, int64 id)
|
||||
{
|
||||
DLLExportClass::On_Message(PlayerPtr, message, timeout_seconds, MESSAGE_TYPE_DIRECT, id);
|
||||
|
||||
Reference in New Issue
Block a user