core2/code_679A0.c progress

This commit is contained in:
Banjo Kazooie
2022-10-20 16:53:55 -05:00
parent e04ccad8dd
commit 70a006e0a2
11 changed files with 121 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
# banjo (91.4234%) # banjo (91.4598%)
<img src="./progress/progress_total.svg"> <img src="./progress/progress_total.svg">

View File

@@ -495,7 +495,7 @@ Struct80s *func_803358B4(void);
void func_80335924(Struct80s *, enum asset_e anim_id, f32, f32); void func_80335924(Struct80s *, enum asset_e anim_id, f32, f32);
void func_80335A74(Struct80s *self, f32 arg1); void func_80335A74(Struct80s *self, f32 arg1);
void func_80335A94(Struct80s *, f32, s32); void func_80335A94(Struct80s *, f32, s32);
void func_803391A4(Gfx**, Mtx**, f32 [3], f32[3], f32, f32*, BKModelBin*); int func_803391A4(Gfx**, Mtx**, f32 [3], f32[3], f32, f32*, BKModelBin*);
void func_8033A280(f32); void func_8033A280(f32);
void func_80346C10(enum bs_e *retVal, enum bs_e fail_state, enum bs_e success_state, enum item_e item_id, int use_item); void func_80346C10(enum bs_e *retVal, enum bs_e fail_state, enum bs_e success_state, enum item_e item_id, int use_item);

View File

@@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text> <text x="22.0" y="14">core2</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.2827%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.3461%</text>
<text x="77.5" y="14">89.2827%</text> <text x="77.5" y="14">89.3461%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text> <text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.4234%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.4598%</text>
<text x="183.5" y="14">91.4234%</text> <text x="183.5" y="14">91.4598%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -171,12 +171,12 @@ void func_802E28D0(Actor *this) {
break; break;
case 2: case 2:
this->marker->unk40_22 = NOT(func_8028F170()); this->marker->unk40_22 = NOT(func_8028F170());
this->velocity[0] *= 0.7;\ this->velocity[0] *= 0.7;
this->velocity[1] *= 0.7;\ this->velocity[1] *= 0.7;
this->velocity[2] *= 0.7; this->velocity[2] *= 0.7;
this->position[0] = this->position[0] + this->velocity[0]; this->position[0] += this->velocity[0];
this->position[1] = this->position[1] + this->velocity[1]; this->position[1] += this->velocity[1];
this->position[2] = this->position[2] + this->velocity[2]; this->position[2] += this->velocity[2];
break; break;
} }
} }

View File

@@ -5,7 +5,7 @@
extern void func_80252C08(f32[3], f32[3], f32, f32[3]); extern void func_80252C08(f32[3], f32[3], f32, f32[3]);
extern void func_80252CC4(f32[3], f32[3], f32, s32); extern void func_80252CC4(f32[3], f32[3], f32, s32);
extern void func_802524F0(f32[3], f32, f32, f32); extern void func_802524F0(f32[3], f32, f32, f32);
extern s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]);
/* .bss */ /* .bss */
Mtx D_80380880; Mtx D_80380880;
@@ -315,8 +315,9 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
s32 func_802EB8A0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7); s32 func_802EB8A0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EB8A0.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EB8A0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBA98.s") bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], s32 arg2, f32 arg3, s32 arg4, f32 arg5[3], f32 arg6, f32 arg7[3]){
return func_802EBAE0(arg0, arg1, arg2, arg3, arg4, NULL, arg5, arg6, arg7);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBAE0.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBAE0.s")
// s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]) { // s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]) {
@@ -415,7 +416,7 @@ s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
#endif #endif
#ifndef NONMATCHING #ifndef NONMATCHING
s32 func_802EC000(BKModelUnk14List *arg0, s32 arg1, s32 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6); s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC000.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC000.s")
#else #else
s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6){ s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6){
@@ -454,9 +455,40 @@ s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
} }
#endif #endif
#ifndef NONMATCHING
s32 func_802EC238(BKModelUnk14List *arg0, s32 arg1, s32 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6); s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s32 arg5, s32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC238.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC238.s")
#else
s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s32 arg5, s32 arg6){
BKModelUnk14_0 *t0_ptr;
BKModelUnk14_1 *t1_ptr;
f32 sp54[3];
BKModelUnk14_2 *var_s0;
BKModelUnk14_2 *temp_s4;
f32 sp40[3];
t0_ptr = (BKModelUnk14_0 *)(arg0 + 1);
t1_ptr = (BKModelUnk14_1 *)(t0_ptr + arg0->cnt0);
var_s0 = (BKModelUnk14_2 *)(t1_ptr + arg0->cnt2);
temp_s4 = var_s0 + arg0->unk4;
mlMtxIdent();
func_80252CC4(arg1, arg2, arg3, arg4);
func_8025235C(sp54, arg5);
for(var_s0 = var_s0; var_s0 < temp_s4; var_s0++) {
if ((var_s0->unk8 != 0) && ((arg6 == 0) || (arg6 == var_s0->unk8))) {
sp40[0] = var_s0->unk2[0];
sp40[1] = var_s0->unk2[1];
sp40[2] = var_s0->unk2[2];
arg3 = var_s0->unk0;
if (ml_vec3f_distance(sp40, sp54) < arg3) {
return var_s0->unk8;
}
}
}
return 0U;
}
#endif
s32 func_802EC394(BKModelUnk14List *arg0, s32 arg1, s32 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6) { s32 func_802EC394(BKModelUnk14List *arg0, s32 arg1, s32 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6) {
s32 phi_v0; s32 phi_v0;

View File

@@ -257,20 +257,17 @@ void func_802EF3F4(ParticleEmitter *this, f32 position_min[3], f32 position_max[
} }
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_679A0/func_802EF4AC.s")
#else
void func_802EF4AC(ParticleEmitter *this, f32 arg1[3], f32 arg2[3], s32 arg3) { void func_802EF4AC(ParticleEmitter *this, f32 arg1[3], f32 arg2[3], s32 arg3) {
f32 sp3C[3]; f32 sp3C[3];
f32 temp_f0; f32 temp_f0;
s32 temp_s4; s32 temp_s4;
s32 i; s32 i;
temp_s4 = arg3 - 1; arg3 -= 1;
sp3C[0] = arg2[0] - arg1[0]; sp3C[0] = arg2[0] - arg1[0];\
sp3C[1] = arg2[1] - arg1[1]; sp3C[1] = arg2[1] - arg1[1];\
sp3C[2] = arg2[2] - arg1[2]; sp3C[2] = arg2[2] - arg1[2];
for(i = 0; i < (arg3 - 1); i++){ for(i = 0; i <= arg3; i++){
if (this->pList_end_128 < this->pList_capacity_12C) { if (this->pList_end_128 < this->pList_capacity_12C) {
__particleEmitter_initParticle(this, this->pList_end_128); __particleEmitter_initParticle(this, this->pList_end_128);
this->pList_end_128->position_18[0] = arg1[0] + sp3C[0]*((f32)i / arg3); this->pList_end_128->position_18[0] = arg1[0] + sp3C[0]*((f32)i / arg3);
@@ -280,7 +277,6 @@ void func_802EF4AC(ParticleEmitter *this, f32 arg1[3], f32 arg2[3], s32 arg3) {
} }
} }
} }
#endif
//particleEmitter_emitN //particleEmitter_emitN
void particleEmitter_emitN(ParticleEmitter *this, int n){ void particleEmitter_emitN(ParticleEmitter *this, int n){

View File

@@ -22,6 +22,8 @@ BKModelBin *func_8030A428(s32 arg0);
/* .data */ /* .data */
s32 D_8036B800; s32 D_8036B800;
s32 D_8036B804;
s32 D_8036B808;
/* .bss */ /* .bss */
struct_7AF80_0 *D_80382390; //prop models ??? struct_7AF80_0 *D_80382390; //prop models ???
@@ -39,7 +41,24 @@ void func_8030A2D0(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], f32 arg4[3], f3
func_803391A4(gfx, mtx, arg3, arg4, arg5, NULL, sp2C); func_803391A4(gfx, mtx, arg3, arg4, arg5, NULL, sp2C);
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_83340/func_8030A350.s") void func_8030A350(Gfx **gfx, Mtx **mtx, Vtx **Vtx, f32 arg3[3], f32 arg4, s32 arg5, Cube *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, s32 argB) {
f32 sp2C[3];
BKSpriteDisplayData *sp28;
sp28 = func_8030A4D4(arg5);
sp2C[0] = arg4;
sp2C[1] = arg4;
sp2C[2] = arg4;
func_80338338(0xFF - (arg7 * 0x10), 0xFF - (arg8 * 0x10), 0xFF - (arg9 * 0x10));
if (func_80344C20(sp28) & 0xB00) {
func_803382E4(0xB);
} else {
func_803382E4(0xE);
}
func_80335D30(gfx);
func_80344138(sp28, argB, argA, arg3, sp2C, gfx, mtx);
func_8033687C(gfx);
}
BKModelBin *func_8030A428(s32 arg0){ BKModelBin *func_8030A428(s32 arg0){
if(D_80382390[arg0].unk0 == NULL){ if(D_80382390[arg0].unk0 == NULL){
@@ -131,7 +150,51 @@ void func_8030A78C(void){//init
} }
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_83340/func_8030A850.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_83340/func_8030A850.s")
#else
void func_8030A850(s32 arg0) {
struct_7AF80_0 *sp3C;
struct_7AF80_1 *temp_a0_2;
s32 sp34;
s32 sp30;
s32 temp_a0;
s32 temp_s3;
s32 var_s0;
s32 var_s0_2;
s32 var_v1;
s32 var_v1_2;
s32 var_v1_3;
s32 var_v1_4;
void *temp_v1;
sp34 = func_8023DB5C();
sp30 = func_80255B08(arg0);
temp_s3 = sp34 - sp30;
for(var_s0 = 0; (D_80382390 != 0) && (var_s0 < ((arg0 == 1) ? 0x28 : 0x2A1)); var_s0++){
sp3C = &D_80382390[D_8036B804];
if ((sp3C->unk0 != 0) && ((sp3C->unk4 < temp_s3) || (arg0 == 3))){
assetcache_release(sp3C->unk0);
sp3C->unk0 = 0;
if( (arg0 != 1) && (func_80254BC4(1))){
return;
}
D_8036B804++;
D_8036B804 %= 0x2A1;
}
}
for(var_s0 = 0; (D_80382394 != 0) && (var_s0 < ((arg0 == 1) ? 0x28 : 0x167)); var_s0++){
temp_a0_2 = &D_80382394[D_8036B808];
if ((temp_a0_2->unk0 != 0) && ((temp_a0_2->unk8 < temp_s3) || (arg0 == 3))){
func_8033B338(&temp_a0_2->unk0, &temp_a0_2->unk4);
if( (arg0 != 1) && (func_80254BC4(1))){
return;
}
}
}
}
#endif
void func_8030AA6C(void) { void func_8030AA6C(void) {
BKModelBin *temp_a0; BKModelBin *temp_a0;

View File

@@ -28,7 +28,7 @@ s16 *D_80383CDC; //assetCache_indexs
vector(struct21s) *D_80383CE0[2]; vector(struct21s) *D_80383CE0[2];
/* .public */ /* .public */
s32 assetcache_release(void * arg0); extern s32 assetcache_release(void * arg0);
f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1); f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1);
f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2); f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2);
@@ -205,7 +205,7 @@ bool func_8033B338(void **sprite_ptr, BKSpriteDisplayData **arg1) {
if (*sprite_ptr == NULL) { if (*sprite_ptr == NULL) {
return FALSE; return FALSE;
} }
assetcache_release(*sprite_ptr); (assetcache_release)(*sprite_ptr);
*sprite_ptr = NULL; *sprite_ptr = NULL;
*arg1 = NULL; *arg1 = NULL;

View File

@@ -166,7 +166,7 @@ Struct_core2_83D70_1 D_8036BCE8[] = {
}; };
/* .bss */ /* .bss */
char D_803823A0[0x70]; char D_803823A0[0x60];
/* .data */ /* .data */
MapInfo * func_8030AD00(enum map_e map_id){ MapInfo * func_8030AD00(enum map_e map_id){

View File

@@ -15,7 +15,7 @@ extern u8 D_8002D500;
extern u8 D_8023DA20; extern u8 D_8023DA20;
extern u32 D_803FFE00[4]; extern u32 D_803FFE00[4];
void func_80000594(u8 *, u8 *); void func_80000594(u8 **, u8 **);
void func_8023DA20(s32); void func_8023DA20(s32);
void func_80000450(s32 arg0){ void func_80000450(s32 arg0){