summaryrefslogtreecommitdiff
path: root/include/z64sound_source.h
blob: b841f8326c6be38d56c00aba7aaf07ece5a67392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef Z64SOUND_SOURCE_H
#define Z64SOUND_SOURCE_H

#include "ultra64.h"
#include "z64math.h"

struct PlayState;

typedef struct {
    /* 0x00 */ u8 countdown;
    /* 0x01 */ u8 playSfxEachFrame;
    /* 0x02 */ u16 sfxId;
    /* 0x04 */ Vec3f worldPos;
    /* 0x10 */ Vec3f projectedPos;
} SoundSource; // size = 0x1C

#define SOUND_SOURCE_COUNT 16

void SoundSource_InitAll(struct PlayState* play);
void SoundSource_UpdateAll(struct PlayState* play);
void SoundSource_PlaySfxAtFixedWorldPos(struct PlayState* play, Vec3f* worldPos, u32 duration, u16 sfxId);
void SoundSource_PlaySfxEachFrameAtFixedWorldPos(struct PlayState* play, Vec3f* worldPos, u32 duration, u16 sfxId);

#endif