soundlib terminology update - sound_triggers
Switch to using the term "sound triggers" for things that result in a call to one of the soundlib routines. SNDCAP_* renamed to SOUND_TRIGGER_* sndcap field in the sound_procs struct changed to sound_triggers
This commit is contained in:
@@ -30,13 +30,13 @@ static int affiliate(int32_t seid, const char *soundname);
|
||||
|
||||
/*
|
||||
* Sound capabilities that can be enabled:
|
||||
* SNDCAP_USERSOUNDS | SNDCAP_HEROMUSIC
|
||||
* | SNDCAP_ACHIEVEMENTS |SNDCAP_SOUNDEFFECTS,
|
||||
* SOUND_TRIGGER_USERSOUNDS | SOUND_TRIGGER_HEROMUSIC
|
||||
* | SOUND_TRIGGER_ACHIEVEMENTS | SOUND_TRIGGER_SOUNDEFFECTS,
|
||||
*/
|
||||
|
||||
struct sound_procs macsound_procs = {
|
||||
SOUNDID(macsound),
|
||||
SNDCAP_HEROMUSIC | SNDCAP_SOUNDEFFECTS,
|
||||
SOUND_TRIGGER_HEROMUSIC | SOUND_TRIGGER_SOUNDEFFECTS,
|
||||
macsound_init_nhsound,
|
||||
macsound_exit_nhsound,
|
||||
macsound_achievement,
|
||||
@@ -45,56 +45,6 @@ struct sound_procs macsound_procs = {
|
||||
macsound_play_usersound,
|
||||
};
|
||||
|
||||
/*
|
||||
*
|
||||
* Types of potential sound supports (all are optionally implemented):
|
||||
*
|
||||
* SNDCAP_USERSOUNDS User-specified sounds that play based on config
|
||||
* file entries that identify a regular expression
|
||||
* to match against message window text, and identify
|
||||
* an external sound file to load in response.
|
||||
* The sound interface function pointer used to invoke
|
||||
* it:
|
||||
*
|
||||
* void (*sound_play_usersound)(char *filename,
|
||||
* int32_t volume, int32_t idx);
|
||||
*
|
||||
* SNDCAP_HEROMUSIC Invoked by the core when the in-game hero is
|
||||
* playing a tune on an instrument. The sound
|
||||
* interface function pointer used to invoke it:
|
||||
*
|
||||
* void (*sound_hero_playnotes)(int32_t instrument,
|
||||
* char *str, int32_t volume);
|
||||
*
|
||||
* SNDCAP_ACHIEVEMENTS Invoked by the core when an in-game achievement
|
||||
* is reached. The soundlib routines could play
|
||||
* appropriate theme or mood music in response.
|
||||
* There would need to be a way to map the
|
||||
* achievements to external user-specified sounds.
|
||||
* The sound interface function pointer used to
|
||||
* invoke it:
|
||||
*
|
||||
* void (*sound_achievement)(schar, schar,
|
||||
* int32_t);
|
||||
*
|
||||
* SNDCAP_SOUNDEFFECTS Invoked by the core when something
|
||||
* sound-producing happens in the game. The soundlib
|
||||
* routines could play an appropriate sound effect
|
||||
* in response. They can be public-domain or
|
||||
* suitably-licensed stock sounds included with the
|
||||
* game source and made available during the build
|
||||
* process, or (not-yet-implemented) a way to
|
||||
* tie particular sound effects to a user-specified
|
||||
* sound macsounds in a config file. The sound
|
||||
* interface function pointer used to invoke it:
|
||||
*
|
||||
* void (*sound_soundeffect)(char *desc, int32_t,
|
||||
* int32_t volume);
|
||||
*
|
||||
* The routines below would call into your sound library.
|
||||
* to fulfill the functionality.
|
||||
*/
|
||||
|
||||
static void
|
||||
macsound_init_nhsound(void)
|
||||
{
|
||||
@@ -108,7 +58,7 @@ macsound_exit_nhsound(const char *reason UNUSED)
|
||||
|
||||
}
|
||||
|
||||
/* fulfill SNDCAP_ACHIEVEMENTS */
|
||||
/* fulfill SOUND_TRIGGER_ACHIEVEMENTS */
|
||||
static void
|
||||
macsound_achievement(schar ach1 UNUSED, schar ach2 UNUSED, int32_t repeat UNUSED)
|
||||
{
|
||||
@@ -123,7 +73,7 @@ static int32_t affiliation[number_of_se_entries + EXTRA_SOUNDS] = { 0 };
|
||||
static NSString *soundstring[number_of_se_entries + EXTRA_SOUNDS];
|
||||
static NSSound *seSound[number_of_se_entries + EXTRA_SOUNDS];
|
||||
|
||||
/* fulfill SNDCAP_SOUNDEFFECTS */
|
||||
/* fulfill SOUND_TRIGGER_SOUNDEFFECTS */
|
||||
static void
|
||||
macsound_soundeffect(char *desc UNUSED, int32_t seid, int volume UNUSED)
|
||||
{
|
||||
@@ -158,7 +108,7 @@ macsound_soundeffect(char *desc UNUSED, int32_t seid, int volume UNUSED)
|
||||
|
||||
#define WAVEMUSIC_SOUNDS
|
||||
|
||||
/* fulfill SNDCAP_HEROMUSIC */
|
||||
/* fulfill SOUND_TRIGGER_HEROMUSIC */
|
||||
static void macsound_hero_playnotes(int32_t instrument,
|
||||
const char *str, int32_t vol UNUSED)
|
||||
{
|
||||
@@ -260,7 +210,7 @@ static void macsound_hero_playnotes(int32_t instrument,
|
||||
#endif
|
||||
}
|
||||
|
||||
/* fulfill SNDCAP_USERSOUNDS */
|
||||
/* fulfill SOUND_TRIGGER_USERSOUNDS */
|
||||
static void
|
||||
macsound_play_usersound(char *filename UNUSED, int volume UNUSED, int idx UNUSED)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,8 @@ static void windsound_play_usersound(char *, int32_t, int32_t);
|
||||
|
||||
struct sound_procs windsound_procs = {
|
||||
SOUNDID(windsound),
|
||||
SNDCAP_USERSOUNDS | SNDCAP_SOUNDEFFECTS | SNDCAP_HEROMUSIC,
|
||||
SOUND_TRIGGER_USERSOUNDS | SOUND_TRIGGER_SOUNDEFFECTS
|
||||
| SOUND_TRIGGER_HEROMUSIC,
|
||||
windsound_init_nhsound,
|
||||
windsound_exit_nhsound,
|
||||
windsound_achievement,
|
||||
|
||||
Reference in New Issue
Block a user