Merge struct audiohandle and struct sndstate

This commit is contained in:
Ryan Dwyer
2021-11-10 22:28:22 +10:00
parent ecc4493e8c
commit 80de3d4209
21 changed files with 185 additions and 207 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ extern struct criteria_multiroomentered *g_MultiroomEnteredCriterias;
extern struct criteria_holograph *g_HolographCriterias;
extern u32 var8009d0d0[2];
extern s32 var8009d0d8;
extern struct audiohandle *g_BgunAudioHandles[4];
extern struct sndstate *g_BgunAudioHandles[4];
extern struct fireslot g_Fireslots[];
extern struct casing g_Casings[20];
extern struct var8009da60 var8009da60[8];
+5
View File
@@ -3412,6 +3412,11 @@
#define SMOKETYPE_DEBRIS 21 // Crash site cockpit, Skedar Ruins outro
#define SMOKETYPE_UFO 22 // AF1 outro
#define SNDSTATEFLAG_01 0x01
#define SNDSTATEFLAG_02 0x02
#define SNDSTATEFLAG_04 0x04
#define SNDSTATEFLAG_10 0x10
#define SOLOSTAGEINDEX_DEFECTION 0x00
#define SOLOSTAGEINDEX_INVESTIGATION 0x01
#define SOLOSTAGEINDEX_EXTRACTION 0x02
+2 -2
View File
@@ -199,14 +199,14 @@ extern s16 var80067ff0[];
extern f32 var80069880;
extern u32 g_TintedGlassEnabled;
extern s32 g_AlarmTimer;
extern struct audiohandle *g_AlarmAudioHandle;
extern struct sndstate *g_AlarmAudioHandle;
extern f32 g_AlarmSpeakerWeight;
extern f32 g_GasReleaseTimer240;
extern bool g_GasReleasing;
extern struct coord g_GasPos;
extern s32 g_GasLastCough60;
extern f32 g_GasSoundTimer240;
extern struct audiohandle *g_GasAudioHandle;
extern struct sndstate *g_GasAudioHandle;
extern u32 g_CountdownTimerOff;
extern bool g_CountdownTimerRunning;
extern f32 g_CountdownTimerValue60;
+1 -1
View File
@@ -136,7 +136,7 @@ void bgunTickMaulerCharge(void);
void bgun0f0a6c30(void);
s32 bgunAllocateFireslot(void);
void bgun0f0a7138(Gfx **gdl);
struct audiohandle **bgunAllocateAudioHandle(void);
struct sndstate **bgunAllocateAudioHandle(void);
void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum);
void bgun0f0a8404(struct coord *pos, s16 *rooms, s32 arg2);
void bgunPlayBgHitSound(struct gset *gset, struct coord *arg1, s32 texturenum, s16 *arg3);
+1 -1
View File
@@ -26,7 +26,7 @@ u32 func0f094940(void);
u32 func0f094b1c(void);
u32 func0f094d78(void);
void func0f094ef4(struct coord *pos, s16 *rooms, s32 soundnum, s32 *arg3, s32 *arg4);
void func0f09505c(struct audiohandle *handle, struct coord *pos, f32 arg2, f32 arg3, f32 arg4, s16 *rooms, s16 soundnum, u16 arg7, u32 arg8);
void func0f09505c(struct sndstate *handle, struct coord *pos, f32 arg2, f32 arg3, f32 arg4, s16 *rooms, s16 soundnum, u16 arg7, u32 arg8);
u32 func0f095200(void);
s32 func0f095278(s32 channelnum);
+7 -7
View File
@@ -4,21 +4,21 @@
#include "data.h"
#include "types.h"
void func00033090(struct audiohandle *handle);
void func00033090(struct sndstate *handle);
u32 func00033100(void);
u16 sndpCountStates(s16 *numfreeptr, s16 *numallocedptr);
void func00033378(void *fn);
u32 func00033390(void);
void func00033634(void *fn);
bool audioIsPlaying(struct audiohandle *handle);
struct audiohandle *func00033820(s32 arg0, s16 soundnum, s32 arg2, s32 arg3, f32 arg4, s32 arg5, s32 arg6, struct audiohandle **handle);
void audioStop(struct audiohandle *handle);
void func00033bc0(struct audiohandle *handle);
bool audioIsPlaying(struct sndstate *handle);
struct sndstate *func00033820(s32 arg0, s16 soundnum, s32 arg2, s32 arg3, f32 arg4, s32 arg5, s32 arg6, struct sndstate **handle);
void audioStop(struct sndstate *handle);
void func00033bc0(struct sndstate *handle);
void func00033db0(void);
void func00033dd8(void);
void audioPostEvent(struct audiohandle *handle, s16 type, s32 data);
void audioPostEvent(struct sndstate *handle, s16 type, s32 data);
u16 func00033ec4(u8 index);
struct audiohandle *func00033f08(void);
struct sndstate *func00033f08(void);
ALMicroTime sndpGetCurTime(void);
void func00033f44(u8 index, u16 volume);
+3 -3
View File
@@ -32,9 +32,9 @@ void snd0000fe50(void);
void sndTick(void);
bool sndIsDisabled(void);
void snd0001036c(u8 arg0);
void sndAdjust(struct audiohandle **handle, s32 arg1, s32 arg2, s32 speakerweight, s16 soundnum, f32 arg5, s32 arg6, s32 arg7, s32 arg8);
struct audiohandle *snd00010718(struct audiohandle **handle, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8);
struct audiohandle *sndStart(s32 arg0, s16 sound, struct audiohandle **handle, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7);
void sndAdjust(struct sndstate **handle, s32 arg1, s32 arg2, s32 speakerweight, s16 soundnum, f32 arg5, s32 arg6, s32 arg7, s32 arg8);
struct sndstate *snd00010718(struct sndstate **handle, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8);
struct sndstate *sndStart(s32 arg0, s16 sound, struct sndstate **handle, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7);
void snd00010ae4(s32 soundnum, s32 arg1, s32 arg2, s32 arg3);
void sndPlayNosedive(s32 seconds);
void sndStopNosedive(void);
+20 -40
View File
@@ -2123,29 +2123,32 @@ struct eyespy {
/*0x7c*/ f32 pitch;
};
struct var8005f120_08_04 {
struct sndstate_08_04 {
u16 unk00;
u8 unk02;
};
struct audiohandle_08 {
struct sndstate_08 {
u32 unk00;
struct var8005f120_08_04 *unk04;
struct sndstate_08_04 *unk04;
};
struct audiohandle {
struct sndstate {
/*0x00*/ ALLink node;
/*0x08*/ struct audiohandle_08 *unk08;
/*0x08*/ struct sndstate_08 *unk08;
/*0x0c*/ N_ALVoice voice;
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ struct audiohandle **unk30;
/*0x30*/ struct sndstate **unk30;
/*0x34*/ u32 unk34;
/*0x38*/ u32 unk38;
/*0x3c*/ u32 unk3c;
/*0x40*/ u32 unk40;
/*0x44*/ u8 unk44;
/*0x44*/ u8 flags;
/*0x45*/ u8 playing;
#if VERSION >= VERSION_NTSC_1_0
/*0x48*/ u32 unk48;
#endif
};
/**
@@ -2276,8 +2279,8 @@ struct hand {
/*0x07e8*/ struct coord adjustpos;
/*0x07f4*/ f32 xshift;
/*0x07f8*/ struct coord aimpos;
/*0x0804*/ struct audiohandle *audiohandle2;
/*0x0808*/ struct audiohandle *audiohandle3;
/*0x0804*/ struct sndstate *audiohandle2;
/*0x0808*/ struct sndstate *audiohandle3;
/*0x080c*/ s32 allowshootframe;
/*0x0810*/ s32 lastshootframe60;
/*0x0814*/ struct beam beam;
@@ -2434,7 +2437,7 @@ struct hand {
/*0x0d74*/ u16 gunroundsspent[4]; // actually a countdown timer
/*0x0d7c*/ u32 ispare1;
/*0x0d80*/ struct guncmd *unk0d80;
/*0x0d84*/ struct audiohandle *audiohandle;
/*0x0d84*/ struct sndstate *audiohandle;
/*0x0d88*/ u32 ispare4;
/*0x0d8c*/ u32 ispare5;
/*0x0d90*/ u32 ispare6;
@@ -2556,7 +2559,7 @@ struct player {
/*0x00d4*/ struct model *model00d4;
/*0x00d8*/ bool isdead;
/*0x00dc*/ f32 bondhealth; // frac (range 0-1)
/*0x00e0*/ struct audiohandle *chokehandle;
/*0x00e0*/ struct sndstate *chokehandle;
/*0x00e4*/ f32 oldhealth;
/*0x00e8*/ f32 oldarmour;
/*0x00ec*/ f32 apparenthealth;
@@ -3765,8 +3768,8 @@ struct fireslotthing {
struct fireslot {
/*0x00*/ s32 endlvframe;
#if VERSION < VERSION_NTSC_1_0
struct audiohandle *unk04nb;
struct audiohandle *unk08nb;
struct sndstate *unk04nb;
struct sndstate *unk08nb;
#endif
/*0x04*/ struct beam beam;
};
@@ -5783,7 +5786,7 @@ struct weatherdata {
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u32 unk30;
/*0x34*/ struct audiohandle *audiohandles[4];
/*0x34*/ struct sndstate *audiohandles[4];
/*0x44*/ s32 unk44;
/*0x48*/ s32 unk48;
/*0x4c*/ s32 unk4c;
@@ -6693,7 +6696,7 @@ struct shard {
};
struct audiochannel {
/*0x00*/ struct audiohandle *audiohandle;
/*0x00*/ struct sndstate *audiohandle;
/*0x04*/ s16 soundnum04;
/*0x06*/ s16 unk06;
/*0x08*/ s16 unk08;
@@ -6827,8 +6830,8 @@ struct nbomb {
s16 unk14;
f32 unk18;
struct prop *prop;
struct audiohandle *audiohandle20;
struct audiohandle *audiohandle24;
struct sndstate *audiohandle20;
struct sndstate *audiohandle24;
};
struct roomacousticdata {
@@ -7346,29 +7349,6 @@ struct var8007f8dc {
/*0x100*/ u32 unk100;
};
struct sndstate {
ALLink node;
u32 unk08;
u32 unk0c;
u32 unk10;
u32 unk14;
u32 unk18;
u32 unk1c;
u32 unk20;
u32 unk24;
u32 unk28;
u32 unk2c;
u32 unk30;
u32 unk34;
u32 unk38;
u32 unk3c;
u32 unk40;
u32 unk44;
#if VERSION >= VERSION_NTSC_1_0
u32 unk48;
#endif
};
struct asistream {
s32 unk00;
s32 (*unk04)(s32 arg0, void *arg1, s32 arg2, s32 arg3);