src/core1: renamed and documented file

neue Datei:     include/core1/lookup.h
        umbenannt:      src/core1/code_18310.c -> src/core1/lookup.c
This commit is contained in:
mariob92
2024-10-13 21:01:13 +02:00
parent 0cee3c6697
commit e125d3c1be
9 changed files with 38 additions and 32 deletions

View File

@@ -46,11 +46,11 @@ void func_80244B3C(void){
void func_80244BB0(s32 arg0, s32 arg1, s32 arg2, f32 arg3){
s32 i;
u8 indx;
if(func_8030ED70(func_80255D44(arg1))){
if(func_8030ED70(lookup_getSfxId(arg1))){
i = sfxsource_createSfxsourceAndReturnIndex();
indx = i;
if(i){
sfxsource_setSfxId(indx, func_80255D44(arg1));
sfxsource_setSfxId(indx, lookup_getSfxId(arg1));
sfxsource_playSfxAtVolume(indx, arg3);
sfxsource_setSampleRate(indx, arg2);
func_8030E2C4(indx);
@@ -59,7 +59,7 @@ void func_80244BB0(s32 arg0, s32 arg1, s32 arg2, f32 arg3){
}
}
else{
func_8030E6A4(func_80255D44(arg1), arg3, arg2);
func_8030E6A4(lookup_getSfxId(arg1), arg3, arg2);
}
}

View File

@@ -1,9 +1,7 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
s16 D_802765C0[] ={
static s16 sAnimAssetIds[] = {
0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008,
0x0009, 0x000A, 0x029E, 0x000C, 0x000D, 0x000E, 0x029F, 0x0010,
0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018,
@@ -69,7 +67,7 @@ s16 D_802765C0[] ={
0x012B, 0x012C, 0x012D, 0x012E, 0x012F, 0xFFFF
};
s16 D_802769AC[] = {
static s16 sSfxIds[] = {
0x0000, 0x0001,
0x0002, 0x0003, 0x018F, 0x0005, 0x008C, 0x0007, 0x0008, 0xFFFE,
0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0063,
@@ -104,7 +102,7 @@ s16 D_802769AC[] = {
0x00A8, 0x00A9, 0xFFFF, 0x0000
};
s16 D_80276B98[] = {
static s16 sCoMusicIds[] = {
0x002F, 0x0030, 0x0099, 0x005F,
0x0002, 0x0003, 0xFFFE, 0x0005, 0x0006, 0xFFFE, 0x0008, 0x0009,
0x000A, 0x000B, 0x000C, 0x000D, 0xFFFE, 0x000F, 0x0010, 0xFFFE,
@@ -125,14 +123,14 @@ s16 D_80276B98[] = {
0xFFFE, 0xFFFE, 0xFFFE, 0x0044, 0xFFFF, 0x0000, 0x0000, 0x0000,
};
s32 func_80255D30(s32 arg0){
return D_80276B98[arg0];
enum comusic_e lookup_getCoMusicId(s32 idx) {
return sCoMusicIds[idx];
}
s32 func_80255D44(s32 arg0){
return D_802769AC[arg0];
enum sfx_e lookup_getSfxId(s32 idx) {
return sSfxIds[idx];
}
s32 func_80255D58(s32 arg0){
return D_802765C0[arg0];
enum asset_e lookup_getAnimAssetId(s32 idx) {
return sAnimAssetIds[idx];
}