mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
Overlord: Music tweak struct. (#509)
This commit is contained in:
parent
0c751dd13e
commit
62877ed4f3
|
@ -354,10 +354,10 @@ void LoadMusicTweaks(u8* buffer) {
|
|||
MakeISOName(iso_name, "TWEAKVAL.MUS");
|
||||
FileRecord* fr = FS_FindIN(iso_name);
|
||||
if (!fr || !ReadSectorsNow(fr->location, 1, buffer)) {
|
||||
*(s32*)gMusicTweakInfo = 0;
|
||||
gMusicTweakInfo.TweakCount = 0;
|
||||
lg::warn("[OVERLORD ISO CD] Failed to load music tweaks!");
|
||||
} else {
|
||||
memcpy(gMusicTweakInfo, buffer, MUSIC_TWEAK_SIZE);
|
||||
memcpy((void*)&gMusicTweakInfo, buffer, sizeof(MusicTweaks));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <cstring>
|
||||
#include "srpc.h"
|
||||
|
||||
u8 gMusicTweakInfo[0x204];
|
||||
MusicTweaks gMusicTweakInfo;
|
||||
|
||||
void srpc_init_globals() {
|
||||
memset(gMusicTweakInfo, 0, sizeof(gMusicTweakInfo));
|
||||
}
|
||||
memset((void*)&gMusicTweakInfo, 0, sizeof(gMusicTweakInfo));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,17 @@
|
|||
|
||||
void srpc_init_globals();
|
||||
|
||||
constexpr int MUSIC_TWEAK_SIZE = 0x204;
|
||||
extern u8 gMusicTweakInfo[MUSIC_TWEAK_SIZE];
|
||||
constexpr int MUSIC_TWEAK_COUNT = 32;
|
||||
|
||||
struct MusicTweaks {
|
||||
u32 TweakCount;
|
||||
|
||||
struct {
|
||||
char MusicName[12];
|
||||
u32 VolumeAdjust;
|
||||
} MusicTweak[MUSIC_TWEAK_COUNT];
|
||||
};
|
||||
|
||||
extern MusicTweaks gMusicTweakInfo;
|
||||
|
||||
#endif // JAK_V2_SRPC_H
|
||||
|
|
Loading…
Reference in a new issue