jak-project/game/overlord/sbank.h
Ziemas 766b328c97
Overlord sound player (#1239)
* Accept player RPC commands in overlord

* Remove the .projectile file

I use emacs for everything so I don't want it to only look at the goal code.

* Fill out most of the unique player structs

* Decompile most of ssound.c

* Silence some spam

* Comment out WaitSema instance

* Add a file with definitions for snd_ functions

Makes it compile without commenting them out.

Maybe it'd be nice to maintain the original API usage in overlord for
similarity and shim them to whatever API the player uses.

* Make SoundBank statically sized again.

Didn't realise this was used in an array. MSVC should be happy again.

Not sure what the actual size of these should be.

* Fix logic issue

* Finish RPC Loader

* More RPC_Player

* Play RPC command

* All the RPC commands added

* Call Music/Bank loaders

* audio: add almost all `.MUS` and `.SBK` files to build process

* Include TWEAKVAL in build output

* Load banks and music tweaks

* Comment out spam

* Sound struct unk -> is music

* Also test if empty1.sbk was found

For the sake of tests.

* Get rid of PC_DEBUG_SOUND_ENABLE

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2022-03-22 18:53:36 -04:00

29 lines
506 B
C

#pragma once
#include "common/common_types.h"
struct SoundRecord {
char name[16];
u32 fallof_params;
};
struct SoundBank {
char name[16];
u32 bank_handle;
u32 sound_count;
union {
SoundRecord sound[1];
// Needs to fit the biggest bank (common.sbk)
u8 buffer[10 * 2048];
};
};
void sbank_init_globals();
void InitBanks();
void ReloadBankInfo();
SoundBank* AllocateBank();
s32 LookupSoundIndex(const char* name, SoundBank** bank_out);
SoundBank* LookupBank(const char* name);