diff --git a/include/enums.h b/include/enums.h index 40e43f2c..f1d9ccad 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1529,8 +1529,8 @@ enum actor_e ACTOR_50_HONEYCOMB = 0x50, ACTOR_51_MUSIC_NOTE, - - ACTOR_53_RED_ARROW = 0x53, + ACTOR_52_BLUE_EGG, + ACTOR_53_RED_ARROW, ACTOR_54_RED_QUESTION_MARK, ACTOR_55_RED_X, @@ -1540,6 +1540,8 @@ enum actor_e ACTOR_5A_JIGGY_IN_HAND, ACTOR_5B_PINK_EGG_LARGEST, + ACTOR_62_JINJO_GREEN = 0x62, + ACTOR_65_WADING_BOOTS = 0x65, ACTOR_67_SNIPPET = 0x67, @@ -1593,6 +1595,8 @@ enum actor_e ACTOR_125_SNOWBALL, ACTOR_126_SIR_SLUSH_HAT, + ACTOR_129_RED_FEATHER = 0x129, + ACTOR_12B_TUTORIAL_BOTTLES = 0x12B, ACTOR_12C_MOLEHILL, @@ -3780,9 +3784,9 @@ enum marker_e{ MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER = 0x185, - ACTOR_191_ENGINE_ROOM_PROPELLOR_1 = 0x191, - ACTOR_192_ENGINE_ROOM_PROPELLOR_2, - ACTOR_193_ENGINE_ROOM_PROPELLOR_3, + MARKER_191_ENGINE_ROOM_PROPELLOR_1 = 0x191, + MARKER_192_ENGINE_ROOM_PROPELLOR_2, + MARKER_193_ENGINE_ROOM_PROPELLOR_3, MARKER_1A1_BOSS_BOOM_BOX_LARGEST = 0x1A1, MARKER_1A2_BOSS_BOOM_BOX_LARGE, diff --git a/progress/progress_core2.svg b/progress/progress_core2.svg index a4d2686e..7e0bc70e 100644 --- a/progress/progress_core2.svg +++ b/progress/progress_core2.svg @@ -9,7 +9,7 @@ - + @@ -17,7 +17,7 @@ core2 - 83.3026% - 83.3026% + 83.4994% + 83.4994% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 2bfc32ab..fad5c8eb 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 85.4077% - 85.4077% + 85.5902% + 85.5902% \ No newline at end of file diff --git a/src/RBB/code_2E90.c b/src/RBB/code_2E90.c index c7892678..2ec51eb9 100644 --- a/src/RBB/code_2E90.c +++ b/src/RBB/code_2E90.c @@ -57,19 +57,19 @@ Struct_RBB_2E90_0 D_80390530[] = { }; ActorInfo D_80390640 = { - ACTOR_191_ENGINE_ROOM_PROPELLOR_1, ACTOR_1BB_ENGINE_ROOM_PROPELLOR_1, ASSET_40F_MODEL_ENGINE_ROOM_PROPELLER_1, 0x0, NULL, + MARKER_191_ENGINE_ROOM_PROPELLOR_1, ACTOR_1BB_ENGINE_ROOM_PROPELLOR_1, ASSET_40F_MODEL_ENGINE_ROOM_PROPELLER_1, 0x0, NULL, func_8038944C, NULL, func_80325888, 0, 0, 0.0f, 0 }; ActorInfo D_80390664 = { - ACTOR_192_ENGINE_ROOM_PROPELLOR_2, ACTOR_1BC_ENGINE_ROOM_PROPELLOR_2, ASSET_410_MODEL_ENGINE_ROOM_PROPELLER_2, 0x0, NULL, + MARKER_192_ENGINE_ROOM_PROPELLOR_2, ACTOR_1BC_ENGINE_ROOM_PROPELLOR_2, ASSET_410_MODEL_ENGINE_ROOM_PROPELLER_2, 0x0, NULL, func_8038944C, NULL, func_80325888, 0, 0, 0.0f, 0 }; ActorInfo D_80390688 = { - ACTOR_193_ENGINE_ROOM_PROPELLOR_3, ACTOR_1BD_ENGINE_ROOM_PROPELLOR_3, ASSET_411_MODEL_ENGINE_ROOM_PROPELLER_3, 0x0, NULL, + MARKER_193_ENGINE_ROOM_PROPELLOR_3, ACTOR_1BD_ENGINE_ROOM_PROPELLOR_3, ASSET_411_MODEL_ENGINE_ROOM_PROPELLER_3, 0x0, NULL, func_8038944C, NULL, func_80325888, 0, 0, 0.0f, 0 }; diff --git a/src/core2/code_41FB0.c b/src/core2/code_41FB0.c index 74e1b0f8..d6bbaf26 100644 --- a/src/core2/code_41FB0.c +++ b/src/core2/code_41FB0.c @@ -5,17 +5,19 @@ extern bool func_80309DBC(f32[3], f32[3], f32, f32 sp54[3], s32, s32); extern bool func_80320C94(f32[3], f32[3], f32, f32 sp54[3], s32, s32); extern f32 func_8033229C(ActorMarker *); +extern bool func_80309D58(f32[3], s32); + extern void ml_vec3f_normalize(f32 [3]); typedef struct { s16 unk0; - u8 pad2[0x2]; - s32 unk4; - s32 unk8; + // u8 pad2[0x2]; + s32 actor_id; + s32 count; s16 unkC; s16 unkE; s16 unk10; - u8 pad12[0x2]; + // u8 pad12[0x2]; f32 unk14; f32 unk18; f32 unk1C; @@ -42,15 +44,50 @@ typedef struct { } struct41FB0s_1; /* .data */ -extern struct41FB0s D_80366460[]; -extern f32 D_80366C4C; - -/* .rodata */ -extern f64 D_80376410; -extern f64 D_80376418; +struct41FB0s D_80366460[] = { + {0x0021, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_52_BLUE_EGG, 5, SFX_21_EGG_BOUNCE_1, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_6_GRUBLIN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 0.0f, 0.0f, 550.0f, 250.0f, 200.0f, 0.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_62_JINJO_GREEN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 16000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_49_EXTRA_LIFE, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.6f, 0.0f}, + {0x0049, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 300.0f, 0.0f, 0.5f, 0.0f}, + {0x002D, ACTOR_B_SHOCKSPRING_PAD, 1, 0, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.2f, 315.0f}, + {0x0005, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 75.0f, 0.0f, 725.0f, 0.0f, 75.0f, 0.0f, 0.6f, 0.0f}, + {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, + {0x0009, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 300.0f, 0.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_52_BLUE_EGG, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_129_RED_FEATHER, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, + {0x0005, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.75f, 0.0f}, + {0x0005, 0x06A, 1, 0, 0, 0, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0009, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 650.0f, 0.0f, 950.0f, 0.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_51_MUSIC_NOTE, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x0065, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.7f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 250.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 2, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0129, 0x352, 1, SFX_3F2_UNKNOWN, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f}, + {0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} +}; /* .bss */ -UNK_TYPE(s32) D_8037DDB0; +s32 D_8037DDB0; f32 D_8037DDB4; f32 D_8037DDB8; @@ -83,11 +120,8 @@ Actor *func_802C8F88(s32 arg0, s32 arg1[3]){ return func_802C937C(arg0, sp1C); } -#ifndef NONMATCHING //matches but requires .data and .rodata defined -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_41FB0/func_802C8FE4.s") -#else Actor *func_802C8FE4(s32 arg0, f32 position[3], Actor *arg2){ - static f32 D_80366C4C = 0.0f; + static f32 D_80366C4C = 400.0f; struct41FB0s * sp74; //s2 Actor *actor; //s3 s32 i; @@ -95,11 +129,11 @@ Actor *func_802C8FE4(s32 arg0, f32 position[3], Actor *arg2){ sp74 = D_80366460 + arg0; actor = NULL; - for(i = 0; i < sp74->unk8; i++){//L802C90B0 - D_8037DDB4 += 360.0/sp74->unk8; + for(i = 0; i < sp74->count; i++){//L802C90B0 + D_8037DDB4 += 360.0/sp74->count; while(360.0 <= D_8037DDB4){ D_8037DDB4 -= 360.0;} //L802C9114 - actor =(i == 0 && arg2) ? arg2 : func_8032813C(sp74->unk4, position, 0); + actor =(i == 0 && arg2) ? arg2 : func_8032813C(sp74->actor_id, position, 0); actor->unk10_0 = 1; s0 = (struct41FB0s_1 *) &actor->unkBC; s0->unk0 = arg0; @@ -121,7 +155,7 @@ Actor *func_802C8FE4(s32 arg0, f32 position[3], Actor *arg2){ }//L802C9210 ml_vec3f_yaw_rotate_copy(s0->unk14, s0->unk14, D_8037DDB4); s0->unk24 = D_80366C4C *= -1; - actor->unk5C = s0->unk20 = (sp74->unk0 & 0x20) ? sp74->unk30 : randf2(0.0f, 360.0f); + actor->yaw = s0->unk20 = (sp74->unk0 & 0x20) ? sp74->unk30 : randf2(0.0f, 360.0f); s0->unk28 = 0.0f; s0->unk2C = 0; s0->unk2D = 1; @@ -133,7 +167,6 @@ Actor *func_802C8FE4(s32 arg0, f32 position[3], Actor *arg2){ }//L802C92E8 return actor; } -#endif Actor *func_802C9334(s32 arg0, Actor * arg1){ D_80366460[arg0].unk30 = arg1->yaw; @@ -144,9 +177,6 @@ Actor *func_802C937C(s32 arg0, f32 position[3]){ return func_802C8FE4(arg0, position, 0); } -#ifndef NONMATCHING -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_41FB0/func_802C939C.s") -#else bool func_802C939C(Actor *actor, f32 arg1[3], f32 arg2[3], f32 arg3[3], bool arg4) { struct41FB0s_1 *sp64 = (struct41FB0s_1 *)&actor->unkBC; f32 sp60; @@ -178,7 +208,7 @@ bool func_802C939C(Actor *actor, f32 arg1[3], f32 arg2[3], f32 arg3[3], bool arg } } - sp60 = func_8033229C(actor->marker) * D_80376418; + sp60 = func_8033229C(actor->marker) * 0.66666666; ml_vec3f_copy(sp50, arg2); arg1[1] += sp60; arg2[1] += sp60; @@ -224,7 +254,6 @@ bool func_802C939C(Actor *actor, f32 arg1[3], f32 arg2[3], f32 arg3[3], bool arg arg2[1] -= sp60; return var_v1; } -#endif void func_802C96E4(Actor *actor) { f32 sp6C; @@ -273,7 +302,7 @@ void func_802C96E4(Actor *actor) { if (sp64->unkC != 0) { func_8030E878(sp64->unkC, (f32)sp64->unkE, sp64->unk10, sp68->unk8, 300.0f, 3000.0f); } - D_8037DDB0 = sp64->unk8 * 8; + D_8037DDB0 = sp64->count * 8; } ml_vec3f_scale(sp68->unk14, sp64->unk2C); var_f0 = gu_sqrtf((sp68->unk14[0]*sp68->unk14[0]) + (sp68->unk14[1]*sp68->unk14[1]) + (sp68->unk14[2]*sp68->unk14[2])); diff --git a/src/core2/code_B62B0.c b/src/core2/code_B62B0.c index 6c1a4d60..d9bd936c 100644 --- a/src/core2/code_B62B0.c +++ b/src/core2/code_B62B0.c @@ -81,9 +81,9 @@ Struct_core2_B62B0_0 D_80370AC0[0xBB] = { {MARKER_1A3_BOSS_BOOM_BOX_MEDIUM, 0x0000, {0x9020, 0x9984, 0x9020, 0x9984, 0x9984, 0x9984, 0x0804, 0x0A04, 0x0984, 0x0000, 0x3020}}, {MARKER_1A4_BOSS_BOOM_BOX_SMALL, 0x0000, {0x9020, 0x9A04, 0x9020, 0x9A04, 0x9A04, 0x9A04, 0x0804, 0x0A84, 0x0A04, 0x0000, 0x3020}}, {MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, 0x5060, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5060}}, - {ACTOR_191_ENGINE_ROOM_PROPELLOR_1, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, - {ACTOR_192_ENGINE_ROOM_PROPELLOR_2, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, - {ACTOR_193_ENGINE_ROOM_PROPELLOR_3, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_191_ENGINE_ROOM_PROPELLOR_1, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_192_ENGINE_ROOM_PROPELLOR_2, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_193_ENGINE_ROOM_PROPELLOR_3, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, {MARKER_1E2_GRUBLIN_HOOD, 0x0001, {0x0A08, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, {MARKER_1C5_WHIPCRACK, 0x0001, {0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x080C, 0x0804, 0x0000, 0x3020}}, {MARKER_1F9_SNARE_BEAR, 0x0000, {0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x0000, 0x0000, 0x0000, 0x2040}}, diff --git a/subyaml/core2.us.v10.yaml b/subyaml/core2.us.v10.yaml index 1674cb82..a3bccc18 100644 --- a/subyaml/core2.us.v10.yaml +++ b/subyaml/core2.us.v10.yaml @@ -178,7 +178,7 @@ segments: - [0x41130, c, ch/jigsawdance] #DONE - [0x41460, c, code_41460] #DONE - [0x41F30, c, code_41F30] #DONE - - [0x41FB0, c, code_41FB0] + - [0x41FB0, c, code_41FB0] #DONE - [0x42CA0, c, ch/musicnote] #DONE - [0x42CB0, c, code_42CB0] #DONE - [0x43250, c, code_43250] #DONE @@ -474,7 +474,7 @@ segments: - [0xDF340, .data, ch/jigsawdance] - [0xDF3A0, .data, code_41460] - [0xDF4A0, .data, code_41F30] - - [0xDF4D0, bin, data_DF4D0] + - [0xDF4D0, .data, code_41FB0] - [0xDFCC0, .data, ch/musicnote] - [0xDFCF0, .data, code_42CB0] - [0xDFD40, bin, data_DFD40] @@ -706,8 +706,7 @@ segments: - [0xEF360, .rodata, ch/jiggy] - [0xEF3E0, .rodata, ch/jigsawdance] - [0xEF450, .rodata, code_41460] - - [0xEF480, bin, data_EF480] #.rodata, code_41FB0] - - [0xEF490, .rodata, code_41FB0] + - [0xEF480, .rodata, code_41FB0] - [0xEF4C0, .rodata, ch/musicnote] - [0xEF4D0, .rodata, code_42CB0] - [0xEF4E0, .rodata, ch/trainers]