mirror of
https://github.com/open-goal/jak-project
synced 2026-05-27 08:09:29 -04:00
5e987cc0e2
Fixes #2545 Fixes #2546 Fixes #2547 Fixes #2548 Fixes #2549 Fixes #2550 Fixes #2551 Fixes #2552 Fixes #2553 Fixes #2554 Fixes #2555 Fixes #2556 Fixes #2557 Fixes #2558 Fixes #2559 Fixes #2560 Fixes #2561 Fixes #2562 Fixes #2563 Fixes #2564 Fixes #2565 Fixes #2567 Fixes #2566 Fixes #2568 Fixes #2569 Fixes #2570 Fixes #2522 Fixes #2571 --------- Co-authored-by: water <awaterford111445@gmail.com> Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com> Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#include "soundcommon.h"
|
|
|
|
#include <algorithm>
|
|
#include <cstdio>
|
|
#include <string.h>
|
|
#include <string>
|
|
|
|
#include "common/util/Assert.h"
|
|
|
|
// TODO strcpy_toupper
|
|
// TODO atoi
|
|
// TODO ReadBankSoundNames
|
|
|
|
void ReadBankSoundInfo(SoundBank* bank, SoundBank* unk, s32 unk2) {
|
|
(void)bank;
|
|
(void)unk;
|
|
(void)unk2;
|
|
ASSERT(false);
|
|
}
|
|
|
|
// I'm not bored enough to reimplement their strcpy
|
|
// Only for use with 16 character sound names!
|
|
void strcpy_toupper(char* dest, const char* source) {
|
|
// clear the dest string
|
|
memset(dest, 0, 16);
|
|
std::string string(source);
|
|
std::transform(string.begin(), string.end(), string.begin(), ::toupper);
|
|
std::replace(string.begin(), string.end(), '-', '_');
|
|
string.copy(dest, 16);
|
|
}
|
|
|
|
void PrintBankInfo(SoundBank* bank) {
|
|
// we dont need this and it spams the console too much
|
|
return;
|
|
|
|
printf("Bank %s\n\n", bank->name);
|
|
for (u32 i = 0; i < bank->sound_count; i++) {
|
|
// Some characters use the full 16 characters (bonelurker-grunt) and dont have a null terminator
|
|
std::string name = std::string(bank->sound[i].name, 16);
|
|
printf("%d : %16s : min %d max %d curve %d\n", i, name.c_str(),
|
|
bank->sound[i].fallof_params & 0x3fff, (bank->sound[i].fallof_params >> 14) & 0x3fff,
|
|
bank->sound[i].fallof_params >> 28);
|
|
}
|
|
}
|