Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Rubberduckycooly
GitHub Repository: Rubberduckycooly/RSDKv5-Decompilation
Path: blob/master/RSDKv5/RSDK/Audio/Legacy/AudioLegacy.hpp
1182 views
1
2
namespace Legacy
3
{
4
#define LEGACY_TRACK_COUNT (0x10)
5
6
struct TrackInfo {
7
char fileName[0x40];
8
bool32 trackLoop;
9
uint32 loopPoint;
10
};
11
12
extern int32 globalSFXCount;
13
extern int32 stageSFXCount;
14
15
extern int32 musicVolume;
16
extern int32 sfxVolume;
17
extern int32 bgmVolume;
18
extern int32 musicCurrentTrack;
19
extern int32 musicChannel;
20
21
extern TrackInfo musicTracks[LEGACY_TRACK_COUNT];
22
23
void SetMusicTrack(const char *filePath, uint8 trackID, bool32 loop, uint32 loopPoint);
24
int32 PlayMusic(int32 trackID);
25
inline void StopMusic() { StopChannel(musicChannel); }
26
void SetMusicVolume(int32 volume);
27
28
// helper func to ensure compatibility with how v3/v4 expects it (no plays var and slot is set manually)
29
void LoadSfx(char *filename, uint8 slot, uint8 scope);
30
inline int32 PlaySfx(int32 sfxID, bool32 loop) { return RSDK::PlaySfx(sfxID, loop, 0xFF); }
31
inline void StopSfx(int32 sfxID) { RSDK::StopSfx(sfxID); }
32
33
namespace v3
34
{
35
extern char globalSfxNames[SFX_COUNT][0x40];
36
extern char stageSfxNames[SFX_COUNT][0x40];
37
38
void SetSfxName(const char *sfxName, int32 sfxID, bool32 global);
39
void SetSfxAttributes(int32 channelID, int32 loop, int8 pan);
40
} // namespace v3
41
42
namespace v4
43
{
44
extern float musicRatio;
45
extern char sfxNames[SFX_COUNT][0x40];
46
47
void SwapMusicTrack(const char *filePath, uint8 trackID, uint32 loopPoint, uint32 ratio);
48
void SetSfxAttributes(int32 sfxID, int32 loop, int8 pan);
49
50
void SetSfxName(const char *sfxName, int32 sfxID);
51
} // namespace v4
52
53
} // namespace Legacy
54