diff --git a/README.md b/README.md
index 5ac26ce0..6d37a5da 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# banjo (86.9975%)
+# banjo (87.4645%)
diff --git a/progress/progress_fight.svg b/progress/progress_fight.svg
index 6fd3aa1f..3dc55a9f 100644
--- a/progress/progress_fight.svg
+++ b/progress/progress_fight.svg
@@ -1,23 +1,23 @@
-
\ No newline at end of file
diff --git a/src/fight/code_0.c b/src/fight/code_0.c
index 5349133b..3425b5ac 100644
--- a/src/fight/code_0.c
+++ b/src/fight/code_0.c
@@ -20,6 +20,9 @@ extern ActorInfo D_80391DC0;
extern ActorInfo D_80392018;
extern ActorInfo D_80392090;
+/* .bss */
+u8 pad_80392750[0x10];
+
void func_803863F0(void)
{
spawnableActorList_add(&D_80391B00, actor_new, 0X108444);
diff --git a/src/fight/code_180.c b/src/fight/code_180.c
index db3d9dd0..055d4334 100644
--- a/src/fight/code_180.c
+++ b/src/fight/code_180.c
@@ -199,53 +199,90 @@ f32 D_803917EC[3] = {-827.0f, 793.0f, 1700.0f};
f32 D_803917F8[3] = {827.0f, 793.0f, -1700.0f};
f32 D_80391804[3] = {0.0f, 0.0f, 1350.0f};
-
-/* .rodata */
-// jtbl_80392280
-// jtbl_80392310
-// jtbl_80392388
-// jtbl_803923F4
-// jtbl_8039242C
-// jtbl_803924B8
-
-extern f32 D_80392440;
-extern f32 D_80392444;
-extern f32 D_80392448;
-extern f32 D_8039244C;
-extern f32 D_80392450;
-// jtbl_80392454
-
-extern f64 D_80392470;
-extern f32 D_80392478;
-
-
-
/* .bss */
-// u8 pad_80392740[0x10];
-// f32 D_80392750;
-extern f32 D_80392758[3];
-extern f32 D_80392768[3];
-extern f32 D_80392778[3];
-extern f32 D_80392788[3];
-extern f32 D_80392798[3];
-extern ActorMarker *D_803927A4;
-extern ActorMarker *D_803927A8;
-extern ActorMarker *D_803927B0[4];
-extern u8 D_803927C4;
-extern u8 D_803927C5;
-extern u8 D_803927C6;
-extern u8 D_803927C7;
-extern u8 D_803927C8;
-extern u8 D_803927C9;
-extern f32 D_803927D0[3][3];
-extern f32 D_803928B8[3];
-extern f32 D_803927C0;
-extern s32 D_803928C4;
-extern f32 D_803928C8[3];
+f32 D_80392758[3];
+f32 D_80392768[3];
+f32 D_80392778[3];
+f32 D_80392788[3];
+f32 D_80392798[3];
+ActorMarker *D_803927A4;
+ActorMarker *D_803927A8;
+ActorMarker *D_803927B0[4];
+f32 D_803927C0;
+u8 D_803927C4;
+u8 D_803927C5;
+u8 D_803927C6;
+u8 D_803927C7;
+u8 D_803927C8;
+u8 D_803927C9;
+f32 D_803927D0[4][3]; //actually f32 [0x13][3], but exploded to match .bss wrapping
+//Exploded for .bss matching
+u8 D_80392800;
+u8 D_80392801;
+u8 D_80392802;
+u8 D_80392803;
+u8 D_80392804;
+u8 D_80392805;
+u8 D_80392806;
+u8 D_80392807;
+u8 D_80392808;
+u8 D_80392809;
+u8 D_8039280A;
+u8 D_8039280B;
+u8 D_8039280C;
+u8 D_8039280D;
+u8 D_8039280E;
+u8 D_8039280F;
+u8 D_80392810;
+u8 D_80392811;
+u8 D_80392812;
+u8 D_80392813;
+u8 D_80392814;
+u8 D_80392815;
+u8 D_80392816;
+u8 D_80392817;
+u8 D_80392818;
+u8 D_80392819;
+u8 D_8039281A;
+u8 D_8039281B;
+u8 D_8039281C;
+u8 D_8039281D;
+u8 D_8039281E;
+u8 D_8039281F;
+u8 D_80392820;
+u8 D_80392821;
+u8 D_80392822;
+u8 D_80392823;
+u8 D_80392824;
+u8 D_80392825;
+u8 D_80392826;
+u8 D_80392827;
+u8 D_80392828;
+u8 D_80392829;
+u8 D_8039282A;
+u8 D_8039282B;
+u8 D_8039282C;
+u8 D_8039282D;
+u8 D_8039282E;
+u8 D_8039282F;
+u8 D_80392830;
+u8 D_80392831;
+u8 D_80392832;
+u8 D_80392833;
+u8 D_80392834;
+u8 D_80392835;
+u8 D_80392836;
+u8 D_80392837;
+u8 D_80392838;
+u8 D_80392839;
+u8 D_8039283A;
+u8 D_8039283B;
+
/* .code */
Actor *func_80386570(ActorMarker *arg0, Gfx **arg1, Mtx **arg2, Vtx **arg3) {
+
Actor *temp_v0;
ActorLocal_fight_180 *localActor;
@@ -1291,10 +1328,11 @@ void func_8038938C(ActorMarker *marker) {
}
void func_80389720(s32 arg0) {
- static u8 pad[0x10];
+ //wrap to D_80392750;
static f32 D_80392750;
- s32 pad24;
- s32 pad20;
+
+ s32 pad24_A;
+ s32 pad20_A;
Actor *sp1C;
ActorLocal_fight_180 *local;
// f32 tmp_a2;
@@ -1320,8 +1358,12 @@ void func_80389720(s32 arg0) {
break;
case 5:
//closest non-static match
- // D_80392750 = tmp_a2 = ((local->unk7) ? 0.0f : 180.0f);
- // sp1C = func_8032813C(0x3A9, D_80391798, (s32)tmp_a2);
+ // {f32 tmp_a2;\
+ // static f32 D_80391798[3];
+ // D_80392750 = tmp_a2 = ((local->unk7) ? 0.0f : 180.0f);
+ // sp1C = func_8032813C(0x3A9, D_80391798, (s32)tmp_a2);
+ // if(D_80392750);
+ // }
D_80392750 = ((local->unk7) ? 0.0f : 180.0f);
sp1C = func_8032813C(0x3A9, D_80391798, (s32)D_80392750);
break;
@@ -1395,6 +1437,59 @@ void func_80389B44(ActorMarker *marker) {
func_802C3C88((GenMethod_1)func_80386DE4, reinterpret_cast(s32, marker));
}
+//exploded for .bss matching
+u8 D_8039283C;
+u8 D_8039283D;
+u8 D_8039283E;
+u8 D_8039283F;
+u8 D_80392840;
+u8 D_80392841;
+u8 D_80392842;
+u8 D_80392843;
+u8 D_80392844;
+u8 D_80392845;
+u8 D_80392846;
+u8 D_80392847;
+u8 D_80392848;
+u8 D_80392849;
+u8 D_8039284A;
+u8 D_8039284B;
+u8 D_8039284C;
+u8 D_8039284D;
+u8 D_8039284E;
+u8 D_8039284F;
+u8 D_80392850;
+u8 D_80392851;
+u8 D_80392852;
+u8 D_80392853;
+u8 D_80392854;
+u8 D_80392855;
+u8 D_80392856;
+u8 D_80392857;
+u8 D_80392858;
+u8 D_80392859;
+u8 D_8039285A;
+u8 D_8039285B;
+u8 D_8039285C;
+u8 D_8039285D;
+u8 D_8039285E;
+u8 D_8039285F;
+u8 D_80392860;
+u8 D_80392861;
+u8 D_80392862;
+u8 D_80392863;
+u8 D_80392864;
+u8 D_80392865;
+u8 D_80392866;
+u8 D_80392867;
+u8 D_80392868;
+u8 D_80392869;
+u8 D_8039286A;
+u8 D_8039286B;
+u8 D_8039286C[0x4C];
+
+f32 D_803928B8[2];
+
void func_80389B70(ActorMarker *marker) {
Actor *this;
ActorLocal_fight_180 *local;
@@ -1406,6 +1501,8 @@ void func_80389B70(ActorMarker *marker) {
f64 temp_f0_2;
u32 temp_t0;
u8 temp_v0_2;
+
+
this = marker_getActor(marker);
local = (ActorLocal_fight_180 *)&this->local;
@@ -1498,16 +1595,14 @@ void func_80389F54(void) {
D_803927C4 = (u8)0;
}
-#ifndef NONMATCHING //matches if .bss defined
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_80389F7C.s")
-#else
-
void func_80389F7C(Actor *this, s32 arg1) {
ActorLocal_fight_180 *local;
f32 sp48;
f32 sp3C[3];
s32 i;
static s32 D_803928C4;
+
+
// static u8 pad[0x180];
local = (ActorLocal_fight_180 *)&this->local;
@@ -1604,7 +1699,8 @@ void func_80389F7C(Actor *this, s32 arg1) {
break;
}
}
-#endif
+
+f32 D_803928C8[3];
ActorMarker *func_8038A4E8(Actor *this, f32 arg1) {
Actor *actor;
@@ -1627,10 +1723,6 @@ ActorMarker *func_8038A4E8(Actor *this, f32 arg1) {
return NULL;
}
-#ifndef NONMATCHING //matches if .rodata defined
-void func_8038A5F4(ActorMarker *marker);
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038A5F4.s")
-#else
void func_8038A5F4(ActorMarker *marker) {
Actor *this;
ActorLocal_fight_180 *local;
@@ -1706,6 +1798,7 @@ void func_8038A5F4(ActorMarker *marker) {
func_80386BEC(this, 3.0f);
if (this->unk60 > 0.0) {
this->unk60 -= sp74;
+ break;
}
if (func_80386BEC(this, 3.0f)) {
func_80389F7C(this, 0x1E);
@@ -1768,7 +1861,6 @@ void func_8038A5F4(ActorMarker *marker) {
break;
}
}
-#endif
void func_80328B8C(Actor *, s32, f32, s32);
@@ -1776,10 +1868,6 @@ void func_8038AC50(ActorMarker *arg0) {
func_80328B8C(marker_getActor(arg0), 0x24, 0.0001f, 1);
}
-#ifndef NONMATCHING //matches but requires .rodata
-void func_8038AC88(Actor *this, s32 arg1);
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038AC88.s")
-#else
void func_8038AC88(Actor *this, s32 arg1) {
ActorLocal_fight_180 *local;
s32 sp28;
@@ -1855,7 +1943,6 @@ void func_8038AC88(Actor *this, s32 arg1) {
break;
}
}
-#endif
void func_8038AF84(ActorMarker *arg0) {
func_8038AC88(marker_getActor(arg0), 0x29);
@@ -1865,10 +1952,6 @@ void func_8038AFB0(void) {
func_802E4078(MAP_87_CS_SPIRAL_MOUNTAIN_5, 0, 1);
}
-#ifndef NONMATCHING //matches but requires .rodata
-void func_8038AFD8(ActorMarker *marker);
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038AFD8.s")
-#else
void func_8038AFD8(ActorMarker *marker) {
Actor *this;
ActorLocal_fight_180 *local;
@@ -1879,6 +1962,7 @@ void func_8038AFD8(ActorMarker *marker) {
s32 sp2C;
s32 tmp_v0;
+
this = marker_getActor(marker);
local = (ActorLocal_fight_180 *)&this->local;
sp3C = time_getDelta();
@@ -1917,7 +2001,7 @@ void func_8038AFD8(ActorMarker *marker) {
D_803928C8[0] = 0.0f;
D_803928C8[1] = func_80257204(D_803917E0[0], D_803917E0[2], this->position[0], this->position[2]);
D_803928C8[2] = 0.0f;
- func_8028FAEC(&D_803928C8);
+ func_8028FAEC(D_803928C8);
}
if (D_803927C6 == 3) {
func_80311480(randi2(0, 5) + 0x1159, 0x20, NULL, NULL, NULL, NULL);
@@ -2031,7 +2115,7 @@ void func_8038AFD8(ActorMarker *marker) {
}
if (actor_animationIsAt(this, 0.7f)) {
// func_8030E624(0x93186964U);
- FUNC_8030E624(SFX_164_EH, 1.5f, 25000);
+ FUNC_8030E624(SFX_164_EH, 1.15f, 25000);
}
if (actor_animationIsAt(this, 0.81f)) {
FUNC_8030E624(SFX_130_GRUNTY_ECHOING_CRY, 1.0f, 32000);
@@ -2055,7 +2139,6 @@ void func_8038AFD8(ActorMarker *marker) {
break;
}
}
-#endif
void func_8038B730(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
Actor *sp1C;
@@ -2083,10 +2166,6 @@ void func_8038B780(ActorMarker *marker) {
void func_8038B82C(ActorMarker *marker) { return; }
-#ifndef NONMATCHING //matches but requires .rodata
-void func_8038B834(ActorMarker *, ActorMarker *);
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038B834.s")
-#else
bool func_8038B834(ActorMarker *marker, ActorMarker * arg1) {
Actor *this;
ActorLocal_fight_180 *local;
@@ -2123,7 +2202,6 @@ bool func_8038B834(ActorMarker *marker, ActorMarker * arg1) {
}
return TRUE;
}
-#endif
void func_8038B9AC(ActorMarker *marker, ActorMarker *other_marker) {
Actor *this;
@@ -2206,11 +2284,8 @@ void func_8038BCB8(ActorMarker *marker) {
D_803927A4 = spawn_child_actor(0x3AF, &sp1C)->marker;
}
-#ifndef NONMATHCING
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038BCF0.s")
-#else
void func_8038BCF0(Actor *this){
- ActorLocal_fight_180 *local;
+ ActorLocal_fight_180 *local = (ActorLocal_fight_180 *) &this->local;
s32 i;
s32 tmp_s0;
Actor *other;
@@ -2218,7 +2293,6 @@ void func_8038BCF0(Actor *this){
f32 sp40[3];
f32 sp34[3];
- local = (ActorLocal_fight_180 *) &this->local;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
func_803300C0(this->marker, func_8038B834);
@@ -2241,13 +2315,11 @@ void func_8038BCF0(Actor *this){
local->unk9 = 0;
local->unkB = 0;
- for(i = 0; i < 4; i++){ D_803927B0[i] = NULL;}
- // D_803927B0[1] = NULL;
- // D_803927B0[0] = NULL;
- // D_803927B0[2] = NULL;
- // D_803927B0[3] = NULL;
+ for(i = 0; i < 4; i++){
+ D_803927B0[i] = NULL;
+ }
- func_802C3C88(func_8038BCB8, this->marker);
+ func_802C3C88((GenMethod_1) func_8038BCB8, (s32) this->marker);
func_80387728(this->marker, 0);
local->unk1 = 0;
func_80386600(this->marker, 0);
@@ -2261,7 +2333,7 @@ void func_8038BCF0(Actor *this){
func_8034C9B0(0);
func_80386698(2.0f);
tmp_s0 = func_802F9AA8(SFX_9A_MECHANICAL_CLOSING);
- func_802F9DB8(tmp_s0, D_80392450, D_80392450, 0.0f);
+ func_802F9DB8(tmp_s0, 0.6f, 0.6f, 0.0f);
func_802F9FD0(tmp_s0, 0.0f, 2.0f, 0.0f);
func_802FA060(tmp_s0, 25000, 25000, 0);
timed_playSfx(2.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 32000);
@@ -2320,7 +2392,6 @@ void func_8038BCF0(Actor *this){
}
}//L8038C0C8
}
-#endif
void func_8038C0DC(f32 (*arg0)[3]) {
(*arg0)[0] = D_80392798[0];
@@ -2345,11 +2416,6 @@ f32 func_8038DFA0();
void func_80324E88(f32);
f32 func_80391240();
-
-// Very minor stack diff
-#ifndef NONMATCHING
-#pragma GLOBAL_ASM("asm/nonmatchings/fight/code_180/func_8038C148.s")
-#else
void func_8038C148(void) {
Actor *sp4C;
ActorLocal_fight_180 *sp48;
@@ -2358,7 +2424,6 @@ void func_8038C148(void) {
f32 temp_f12;
s32 phi_s0;
f32 sp34;
- f32 temp_f12_2;
sp4C = func_80326EEC(0x38B);
sp48 = (ActorLocal_fight_180 *)&sp4C->local;
@@ -2375,17 +2440,16 @@ void func_8038C148(void) {
func_80324E38(0, 1);
timed_setCameraToNode(0, phi_s0);
func_80324E88(temp_f20);
- timedFunc_set_0(temp_f20 * D_80392470, &func_8038C138);
+ timedFunc_set_0(temp_f20 * 0.08, &func_8038C138);
timed_setCameraToNode(temp_f20, phi_s0 + 1);
- temp_f12 = temp_f20 + sp40;
- func_80324E88(temp_f12);
- timedFunc_set_1(temp_f12, func_8038C10C, (s32)sp4C->marker);
- timed_setCameraToNode(temp_f12, phi_s0 + 2);
- temp_f12_2 = temp_f12 + D_80392478;
- func_80324E88(temp_f12_2);
- timed_setCameraToNode(temp_f12_2, phi_s0 + 3);
+
+ func_80324E88(temp_f20 + sp40);
+ timedFunc_set_1(temp_f20 + sp40, func_8038C10C, (s32)sp4C->marker);
+ timed_setCameraToNode(temp_f20 + sp40, phi_s0 + 2);
+
+ func_80324E88(temp_f20 + sp40 + 2.88f);
+ timed_setCameraToNode(temp_f20 + sp40 + 2.88f, phi_s0 + 3);
}
-#endif
void func_8038C27C(s32 arg0) {
D_803927C4 = arg0;
diff --git a/src/fight/code_87A0.c b/src/fight/code_87A0.c
index be9804dd..034ebd39 100644
--- a/src/fight/code_87A0.c
+++ b/src/fight/code_87A0.c
@@ -76,7 +76,7 @@ f32 D_80391DA4[4] = {0.0f, 0.01f, 0.7f, 0.8f};
f32 D_80391DB4[2] = {0.0f, 0.65f};
/* .bss */
-u8 pad[0x180]; //TODO!!!! define other file .bss sections
+// u8 pad[0x180]; //TODO!!!! define other file .bss sections
u8 D_803928E0;
u8 D_803928E1;
u8 D_803928E2;
diff --git a/subyaml/fight.us.v10.yaml b/subyaml/fight.us.v10.yaml
index d9eef9fb..9573cd4e 100644
--- a/subyaml/fight.us.v10.yaml
+++ b/subyaml/fight.us.v10.yaml
@@ -60,6 +60,7 @@ segments:
- [0xC220, .rodata, code_9850]
- [0xC230, .rodata, code_9D40]
- [0xC340, .rodata, code_AED0]
+ - [0x0000C350, .bss, code_0]
- [0x0000C350, .bss, code_180]
- [0x0000C350, .bss, code_87A0]
- [0x0000C350, .bss, code_9D40]