further work on soundlib support code

move some inline code into functions
replace some magic numbers

The mingw code is not tested yet.
This commit is contained in:
nhmall
2023-01-31 22:19:29 -05:00
parent 4ccee5a177
commit 8ee42f5644
7 changed files with 214 additions and 75 deletions

View File

@@ -2615,6 +2615,8 @@ extern void get_soundlib_name(char *dest, int maxlen);
#ifdef SND_SOUNDEFFECTS_AUTOMAP
extern char *get_sound_effect_filename(int32_t seidint,
char *buf, size_t bufsz, int32_t);
extern char *base_soundname_to_filename(char *basename, char *buf,
size_t bufsz, int32_t baseflag);
#endif
/* ### sp_lev.c ### */

View File

@@ -414,4 +414,16 @@ SoundAchievement(0, sa2_xpleveldown, level);
#define SOUNDLIBONLY UNUSED
#endif
enum findsound_approaches {
findsound_embedded,
findsound_soundfile
};
enum sound_file_flags {
sff_default, /* add dir prefix + '/' + sound + suffix */
sff_base_only, /* base sound name only, no dir, no suffix */
sff_havedir_append_rest, /* dir provided, append base sound name + suffix */
sff_baseknown_add_rest /* base is already known, add dir and suffix */
};
#endif /* SNDPROCS_H */

View File

@@ -92,6 +92,7 @@
#define INTERJECTION_TYPES (INTERJECT_PANIC + 1)
extern void interject_assistance(int, int, genericptr_t, genericptr_t);
extern void interject(int);
extern char *windows_exepath(void);
/*
*===============================================
@@ -119,7 +120,6 @@ extern errno_t tmpfile_s(FILE * restrict * restrict streamptr);
#define __USE_MINGW_ANSI_STDIO 1
#endif
/* extern int getlock(void); */
extern char *mingw_exepath(void);
#endif /* __MINGW32__ */
#ifdef _MSC_VER