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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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];
|
||||
}
|
@@ -819,7 +819,7 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
|
||||
suLastBaddie->unk10_7 = 0;
|
||||
suLastBaddie->unk10_6 = 0;
|
||||
suLastBaddie->unk54 = 0.0f;
|
||||
suLastBaddie->unk58_31 = 0;
|
||||
suLastBaddie->animctrl_asset_id = 0;
|
||||
suLastBaddie->unk5C = 0.0f;
|
||||
suLastBaddie->unkF4_31 = 0;
|
||||
suLastBaddie->unk138_30 = 0;
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80250530(s32, u16, f32);
|
||||
extern s32 func_80255D44(s32);
|
||||
extern void sfxsource_setSampleRate(u8, s32);
|
||||
extern bool func_80323240(struct56s *, f32, f32[3]);
|
||||
extern f32 func_803234FC(struct56s *, f32, f32);
|
||||
@@ -534,7 +533,7 @@ void func_80341A54(void) {
|
||||
|
||||
for(var_s0 = 0x40; var_s0 < 0x80; var_s0++){
|
||||
if (D_803858A0[var_s0] != 0) {
|
||||
func_8025A7DC(func_80255D30(D_803858A0[var_s0]));
|
||||
func_8025A7DC(lookup_getCoMusicId(D_803858A0[var_s0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -783,7 +782,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
|
||||
|
||||
case 2:
|
||||
D_803858A0[arg1->t0.unk10.common.bit7] = arg1->t0.unk4.common.bit31;
|
||||
func_8025A6EC(func_80255D30(arg1->t0.unk4.common.bit31), arg1->t0.unk4.common.bit15 * 8);
|
||||
func_8025A6EC(lookup_getCoMusicId(arg1->t0.unk4.common.bit31), arg1->t0.unk4.common.bit15 * 8);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@@ -791,12 +790,12 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
|
||||
sp7C = arg1->t0.unk8.bit31 / 8.388608e6f;
|
||||
sp74 = arg1->t0.unk4.common.bit15 * 8;
|
||||
sp70 = arg1->t0.unk10.common.bit7;
|
||||
if (func_8030ED70(func_80255D44(sp78))){
|
||||
if (func_8030ED70(lookup_getSfxId(sp78))){
|
||||
sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();
|
||||
if (sfxsourceIdx == 0){
|
||||
return sp84;
|
||||
}
|
||||
sfxsource_setSfxId(sfxsourceIdx, func_80255D44(sp78));
|
||||
sfxsource_setSfxId(sfxsourceIdx, lookup_getSfxId(sp78));
|
||||
sfxsource_playSfxAtVolume(sfxsourceIdx, sp7C);
|
||||
sfxsource_setSampleRate(sfxsourceIdx, sp74);
|
||||
func_8030E2C4(sfxsourceIdx);
|
||||
@@ -805,7 +804,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
|
||||
}
|
||||
D_803858A0[sp70] = sfxsourceIdx;
|
||||
} else {
|
||||
func_8030E6A4(func_80255D44(sp78), sp7C, sp74);
|
||||
func_8030E6A4(lookup_getSfxId(sp78), sp7C, sp74);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -829,7 +828,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
|
||||
|
||||
case 4:
|
||||
if (D_803858A0[arg1->t0.unk10.common.bit7] != 0){
|
||||
func_8025A7DC(func_80255D30(D_803858A0[arg1->t0.unk10.common.bit7]));
|
||||
func_8025A7DC(lookup_getCoMusicId(D_803858A0[arg1->t0.unk10.common.bit7]));
|
||||
D_803858A0[arg1->t0.unk10.common.bit7] = 0;
|
||||
}
|
||||
break;
|
||||
@@ -885,12 +884,12 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
|
||||
}
|
||||
if (arg1->t1.unk8.bit10){
|
||||
arg0->unk5C = ((f32) arg1->t1.unk8.bit21) / 4;
|
||||
arg0->unk58_31 = func_80255D58(arg1->t1.unk8.bit31);
|
||||
arg0->animctrl_asset_id = lookup_getAnimAssetId(arg1->t1.unk8.bit31);
|
||||
if (arg0->animctrl == 0) {
|
||||
arg0->animctrl = animctrl_new(0);
|
||||
animctrl_reset(arg0->animctrl);
|
||||
}
|
||||
animctrl_setIndex(arg0->animctrl, arg0->unk58_31);
|
||||
animctrl_setIndex(arg0->animctrl, arg0->animctrl_asset_id);
|
||||
animctrl_setDuration(arg0->animctrl, arg0->unk5C);
|
||||
animctrl_setDirection(arg0->animctrl, 1);
|
||||
if (arg0->animctrl != 0) {
|
||||
@@ -1266,10 +1265,10 @@ void func_80343DEC(Actor *this){
|
||||
void func_80343E20(s32 arg0, s32 arg1, f32 arg2, s32 arg3) {
|
||||
u8 temp_v0;
|
||||
|
||||
if (func_8030ED70(func_80255D44(arg0)) != 0) {
|
||||
if (func_8030ED70(lookup_getSfxId(arg0)) != 0) {
|
||||
temp_v0 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
if (temp_v0 != 0) {
|
||||
sfxsource_setSfxId(temp_v0, func_80255D44(arg0));
|
||||
sfxsource_setSfxId(temp_v0, lookup_getSfxId(arg0));
|
||||
sfxsource_playSfxAtVolume(temp_v0, arg2);
|
||||
sfxsource_setSampleRate(temp_v0, arg1);
|
||||
func_8030E2C4(temp_v0);
|
||||
@@ -1279,7 +1278,7 @@ void func_80343E20(s32 arg0, s32 arg1, f32 arg2, s32 arg3) {
|
||||
D_803858A0[arg3] = temp_v0;
|
||||
}
|
||||
} else {
|
||||
func_8030E6A4(func_80255D44(arg0), arg2, arg1);
|
||||
func_8030E6A4(lookup_getSfxId(arg0), arg2, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user