diff --git a/src/BGS/crc.c b/src/BGS/crc.c new file mode 100644 index 00000000..68a18be4 --- /dev/null +++ b/src/BGS/crc.c @@ -0,0 +1,5 @@ +#include + +u32 D_80390B20 = 0x00282B61; //BGS.code CRC1 +u32 D_80390B24 = 0xccdaeea0; //BGS.code CRC2 +u32 D_80390B28 = 0x0002DE6B; //BGS.data CRC1 (with this value = 0) \ No newline at end of file diff --git a/src/CC/code_19B0.c b/src/CC/code_19B0.c index 6f45c521..b33a26d9 100644 --- a/src/CC/code_19B0.c +++ b/src/CC/code_19B0.c @@ -24,7 +24,7 @@ extern ActorInfo D_80389E44; extern ActorInfo D_80389E68; extern ActorInfo D_80389E8C; - +/* .code */ void func_80387DA0(void) { spawnableActorList_add(&D_80389AA0, actor_new, 0X4080); diff --git a/src/CC/crc.c b/src/CC/crc.c new file mode 100644 index 00000000..a7a4998d --- /dev/null +++ b/src/CC/crc.c @@ -0,0 +1,7 @@ +#include + +/* .data */ +//TODO Implement CRC calculation in Makefile(?) +u32 D_80389BE0 = 0x000D46A1; //CC.code CRC1 +u32 D_80389BE4 = 0x871BA43E; //CC.code CRC2 +u32 D_80389BE8 = 0x0000DF9F; //CC.data CRC1 (with this value = 0) diff --git a/src/CCW/code_0.c b/src/CCW/code_0.c index 8025906d..0bbb51d2 100644 --- a/src/CCW/code_0.c +++ b/src/CCW/code_0.c @@ -4,8 +4,8 @@ void func_803864B8(Actor *this); -extern ActorInfo D_8038EB50 = { 0x1AC, 0x298, 0x444, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038EB74 = { 0x1AC, 0x29A, 0x445, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038EB50 = { 0x1AC, 0x298, 0x444, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038EB74 = { 0x1AC, 0x29A, 0x445, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; /* .code */ void func_803863F0(Actor *this, s32 next_state){ diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index 4f3a783c..ee8708f0 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -24,8 +24,13 @@ typedef struct { void func_80387A40(Actor *this); /* .data */ -extern Struct_CCW_14B0_0 D_8038EC00[]; -extern ActorInfo D_8038EC14 = { 0x1AF, 0x29C, 0x446, 0x0, NULL, func_80387A40, NULL, func_80325888, 0, 0, 1.0f, 0}; +Struct_CCW_14B0_0 D_8038EC00[] = { + {MAP_5B_CCW_SPRING_ZUBBA_HIVE, 0x7, 0x4C, 0xCE1}, + {MAP_5C_CCW_AUTUMN_ZUBBA_HIVE, 0x8, 0x00, 0xCE5}, + 0 +}; + +ActorInfo D_8038EC14 = { 0x1AF, 0x29C, 0x446, 0x0, NULL, func_80387A40, NULL, func_80325888, 0, 0, 1.0f, 0}; /* .code */ void func_803878A0(Actor *this, s32 next_state) { diff --git a/src/CCW/code_160.c b/src/CCW/code_160.c index 8a6f2376..584036bf 100644 --- a/src/CCW/code_160.c +++ b/src/CCW/code_160.c @@ -13,7 +13,7 @@ void func_803865F4(Actor *this, s32 next_state); void func_8038687C(Actor *this); /* .data */ -extern ActorInfo D_8038EBA0 = { 0x1AD, 0x299, 0x443, 0x0, NULL, func_8038687C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038EBA0 = { 0x1AD, 0x299, 0x443, 0x0, NULL, func_8038687C, NULL, func_80325888, 0, 0, 0.0f, 0}; /* .code */ void func_80386550(ActorMarker *marker){ diff --git a/src/CCW/code_1B20.c b/src/CCW/code_1B20.c index ac5af406..20004f83 100644 --- a/src/CCW/code_1B20.c +++ b/src/CCW/code_1B20.c @@ -21,9 +21,15 @@ Actor *func_803882F4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_80388478(Actor *this); /* .data */ -extern Struct_CCW_1B20_0 D_8038EC40[4]; -extern ActorInfo D_8038EC70 = { 0x1B0, 0x29D, 0x447, 0x0, NULL, func_80388478, NULL, func_803882F4, 0, 0, 1.0f, 0}; -extern f32 D_8038EC94[3]; +Struct_CCW_1B20_0 D_8038EC40[4] ={ + {0x173, 4, 0, 0x173, 0x181, 0xE3, 0}, + {0x181, 1, 1, 0x174, 0x182, 0xE4, 0}, + {0x182, 1, 1, 0x175, 0x183, 0xE5, 1}, + {0x183, 1, 1, 0x000, 0x000, 0x00, 0} +}; + +ActorInfo D_8038EC70 = { 0x1B0, 0x29D, 0x447, 0x0, NULL, func_80388478, NULL, func_803882F4, 0, 0, 1.0f, 0}; +f32 D_8038EC94[3] = {200.0f, 2120.0f, -5570.0f}; /* .code */ void func_80387F10() { @@ -80,8 +86,6 @@ void func_80387F64(Actor *this, s32 next_state){ this->state = next_state; } - - bool func_80388260(ActorMarker *marker, s32 arg1){ return marker->unk40_31 != 1; } diff --git a/src/CCW/code_21A0.c b/src/CCW/code_21A0.c index 295a1bba..90f30e77 100644 --- a/src/CCW/code_21A0.c +++ b/src/CCW/code_21A0.c @@ -5,7 +5,7 @@ void func_803885F8(Actor *this); /* .data */ -extern ActorInfo D_8038ECA0 = { +ActorInfo D_8038ECA0 = { 0x1C2, 0x30B, 0x4E3, 0x0, NULL, func_803885F8, NULL, func_80325888, diff --git a/src/CCW/code_2270.c b/src/CCW/code_2270.c index 78927edc..f8fbbaaf 100644 --- a/src/CCW/code_2270.c +++ b/src/CCW/code_2270.c @@ -20,8 +20,18 @@ Actor *func_803889AC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_80388AA0(Actor *this); /* .data */ -extern Struct_CCW_2270_0 D_8038ECD0[]; -extern ActorInfo D_8038ECE8 = { 0x1B1, 0x29E, ASSET_3E0_MODEL_GOBI, 0x0, NULL, func_80388AA0, func_80388AA0, func_803889AC, 0, 0, 1.0f, 0}; +Struct_CCW_2270_0 D_8038ECD0[] = { + {MAP_44_CCW_SUMMER, 0xCDE, 0xCDF, 0x000}, + {MAP_45_CCW_AUTUMN, 0x000, 0x000, 0xCE0}, + 0 +}; + +ActorInfo D_8038ECE8 = { + 0x1B1, 0x29E, ASSET_3E0_MODEL_GOBI, + 0x0, NULL, + func_80388AA0, func_80388AA0, func_803889AC, + 0, 0, 1.0f, 0 +}; /* .code */ void func_80388660(ActorMarker* marker, s32 arg1) { diff --git a/src/CCW/code_3050.c b/src/CCW/code_3050.c index 6078defe..06a33938 100644 --- a/src/CCW/code_3050.c +++ b/src/CCW/code_3050.c @@ -6,7 +6,7 @@ Actor *func_8038954C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_803895F4(Actor *this); /* .data */ -extern ActorInfo D_8038EE70 = { 0x1B3, 0x2A0, 0x483, 0x0, NULL, func_803895F4, NULL, func_8038954C, 0, 0, 0.0f, 0}; +ActorInfo D_8038EE70 = { 0x1B3, 0x2A0, 0x483, 0x0, NULL, func_803895F4, NULL, func_8038954C, 0, 0, 0.0f, 0}; /* .code */ void func_80389440(Actor *this, s32 next_state) { diff --git a/src/CCW/code_3310.c b/src/CCW/code_3310.c index 26b84407..f978f6f7 100644 --- a/src/CCW/code_3310.c +++ b/src/CCW/code_3310.c @@ -44,12 +44,63 @@ Actor *func_80389B24(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_80389BFC(Actor *this); /* .data */ -extern Struct_CCW_3310_1 D_8038F060[]; -extern Struct_CCW_3310_0 D_8038F080[]; -extern ActorInfo D_8038F130 = { MARKER_1B4_EEYRIE_BABY, ACTOR_2A1_EEYRIE_BABY, ASSET_484_MODEL_EAGLE_BABY, 0x0, NULL, func_80389BFC, NULL, func_80389B24, 0, 0, 0.0f, 0}; +Struct_CCW_3310_1 D_8038EEA0[] = { + {0.11f, SFX_4A_CLUCKER_AHH, 1.1f, 25000}, + {0.22f, SFX_4A_CLUCKER_AHH, 1.1f, 25000}, + {0.34f, SFX_4A_CLUCKER_AHH, 1.1f, 25000}, + {0.55f, SFX_2_CLAW_SWIPE, 1.1f, 25000}, + {0.65f, SFX_2_CLAW_SWIPE, 1.0f, 26000}, + {0.77f, SFX_2_CLAW_SWIPE, 1.1f, 25000}, + {0.87f, SFX_2_CLAW_SWIPE, 1.0f, 24000}, + 0 +}; + +Struct_CCW_3310_1 D_8038EF20[] = { + {0.1f, SFX_80_YUMYUM_CLACK, 0.9f, 15000}, + {0.25f, SFX_4C_LIP_SMACK, 1.0f, 15000}, + {0.31f, SFX_4C_LIP_SMACK, 0.9f, 15000}, + {0.38f, SFX_4C_LIP_SMACK, 1.0f, 15000}, + {0.48f, SFX_4C_LIP_SMACK, 0.9f, 15000}, + {0.55f, SFX_97_BLUBBER_BURPS, 0.9f, 32700}, + {0.6f , SFX_2C_PULLING_NOISE, 0.7f, 25000}, + {0.73f, SFX_2C_PULLING_NOISE, 0.8f, 27000}, + {0.85f, SFX_2C_PULLING_NOISE, 0.9f, 29000}, + 0 +}; + +Struct_CCW_3310_1 D_8038EFC0[] = { + {0.2f , SFX_105_EYRIE_YAWN, 1.1f, 25000}, + {0.27f, SFX_105_EYRIE_YAWN, 1.0f, 25000}, + {0.35f, SFX_105_EYRIE_YAWN, 0.9f, 25000}, + {0.6f , SFX_106_EYRIE_LIPSMACK, 1.0f, 25000}, + {0.66f, SFX_106_EYRIE_LIPSMACK, 0.9f, 23000}, + {0.83f, SFX_1D_HITTING_AN_ENEMY_1, 0.7f, 27000}, + 0 +}; + +Struct_CCW_3310_1 D_8038F030[] = { + {0.2f , SFX_5D_BANJO_RAAOWW, 1.0f, 25000}, + {0.72f, SFX_5E_BANJO_PHEWWW, 1.0f, 25000}, + 0 +}; + +Struct_CCW_3310_1 D_8038F060[] = { + {0.95f, SFX_106_EYRIE_LIPSMACK, 1.0f, 25000}, + 0 +}; + +Struct_CCW_3310_0 D_8038F080[] = { + {MAP_43_CCW_SPRING, 0, 0xE6, 0, NULL, 3, 0, NULL, 0x18F, D_8038EFC0, 0x190, D_8038F030, 0, 0, 0, 0}, + {MAP_44_CCW_SUMMER, 0xE6, 0xE7, 0x191, D_8038EEA0, 2, 0x192, D_8038EF20, 0x193, D_8038EFC0, 0x194, D_8038F030, 2, 5, 0x21A, 0xCD7}, + {MAP_45_CCW_AUTUMN, 0xE7, 0xE8, 0x195, D_8038EEA0, 2, 0x196, D_8038EF20, 0x197, D_8038EFC0, 0x198, D_8038F030, 4, 0xA, 0x21B, 0xCDA}, + 0 +}; + +ActorInfo D_8038F130 = { MARKER_1B4_EEYRIE_BABY, ACTOR_2A1_EEYRIE_BABY, ASSET_484_MODEL_EAGLE_BABY, 0x0, NULL, func_80389BFC, NULL, func_80389B24, 0, 0, 0.0f, 0}; /* .bss */ -extern f32 D_8038FDE0[3]; +u8 pad_8038FDD0[0x10]; +f32 D_8038FDE0[3]; /* .code */ void func_80389700(ActorMarker *marker, enum asset_e text_id, s32 arg2) { diff --git a/src/CCW/code_4530.c b/src/CCW/code_4530.c index 2a18c328..e6cbd3d7 100644 --- a/src/CCW/code_4530.c +++ b/src/CCW/code_4530.c @@ -14,13 +14,25 @@ Actor *func_8038AA38(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_8038AA8C(Actor *this); /* .data */ -extern ActorInfo D_8038F190 = { +ActorInfo D_8038F190 = { 0x1B6, 0x2A3, 0x487, 0x0, NULL, func_8038AA8C, NULL, func_8038AA38, 0, 0, 0.0f, 0 }; -extern Struct_CCW_4530_0 D_8038F1B4[]; + +Struct_CCW_4530_0 D_8038F1B4[] = { + {0.15f, 0.9f, SFX_A5_EYRIE_CRY, 25000}, + {0.3f, 1.0f, SFX_A5_EYRIE_CRY, 32000}, + {0.6f, 0.8f, SFX_2_CLAW_SWIPE, 20000}, + {0.68f, 0.85f, SFX_2_CLAW_SWIPE, 23000}, + {0.75f, 0.9f, SFX_2_CLAW_SWIPE, 28000}, + {0.8f, 0.95f, SFX_2_CLAW_SWIPE, 30000}, + {0.81f, 1.0f, SFX_A5_EYRIE_CRY, 32000}, + {0.86f, 1.0f, SFX_2_CLAW_SWIPE, 31000}, + {0.93f, 1.0f, SFX_2_CLAW_SWIPE, 32000}, +0 +}; /* .code */ void func_8038A920(ActorMarker* marker, enum asset_e text_id, s32 arg2) { diff --git a/src/CCW/code_4960.c b/src/CCW/code_4960.c index f68c9f48..65e12705 100644 --- a/src/CCW/code_4960.c +++ b/src/CCW/code_4960.c @@ -13,13 +13,17 @@ Actor *func_8038AE64(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_8038AEBC(Actor *this); /* .data */ -extern ActorInfo D_8038F230 = { +ActorInfo D_8038F230 = { 0x1C4, 0x30E, 0x487, 0x0, NULL, func_8038AEBC, func_8038AEBC, func_8038AE64, 0, 0, 0.0f, 0 }; -extern Struct_CCW_4960_0 D_8038F254[]; + +Struct_CCW_4960_0 D_8038F254[] = { + {0.5f, 0.8f, SFX_2_CLAW_SWIPE, 20000}, + 0 +}; /* .code */ void func_8038AD50(Actor *this, s32 next_state) { diff --git a/src/CCW/code_4D00.c b/src/CCW/code_4D00.c index 31d8aa2c..847072c0 100644 --- a/src/CCW/code_4D00.c +++ b/src/CCW/code_4D00.c @@ -18,8 +18,23 @@ typedef struct { void func_8038B19C(Actor *this); /* .data */ -extern ActorInfo D_8038F270 = { 0x1B9, 0x2A6, 0x502, 0x0, NULL, func_8038B19C, NULL, func_80325888, 0, 0, 0.0f, 0}; -extern Struct_CCW_4D00_0 D_8038F294[]; +ActorInfo D_8038F270 = { + 0x1B9, 0x2A6, 0x502, + 0x0, NULL, + func_8038B19C, NULL, func_80325888, + 0, 0, 0.0f, 0 +}; + +Struct_CCW_4D00_0 D_8038F294[] = { + {0.12f, 1.6f, SFX_A7_WOODEN_SWOSH, 8000}, + {0.21f, 1.7f, SFX_A7_WOODEN_SWOSH, 8500}, + {0.3f , 1.6f, SFX_A7_WOODEN_SWOSH, 8000}, + {0.51f, 1.0f, SFX_4C_LIP_SMACK, 22000}, + {0.65f, 1.05f, SFX_4C_LIP_SMACK, 23000}, + {0.76f, 1.0f, SFX_4C_LIP_SMACK, 22000}, + {0.88f, 1.0f, SFX_4C_LIP_SMACK, 23000}, + 0 +}; /* .code */ void func_8038B0F0(Actor *this, s32 next_state) { diff --git a/src/CCW/code_5540.c b/src/CCW/code_5540.c index fdac9959..2d140441 100644 --- a/src/CCW/code_5540.c +++ b/src/CCW/code_5540.c @@ -20,8 +20,8 @@ enum nabnut_state_e{ }; /* .data */ -extern f32 D_8038F350[3]; -extern ActorInfo D_8038F35C = { +f32 D_8038F350[3] = {0.0f, 0.0f, 0.0f}; +ActorInfo D_8038F35C = { MARKER_1BB_NABNUT, ACTOR_2A8_NABNUT, ASSET_502_MODEL_NABNUT, 0x0, NULL, chnabnut_update, chnabnut_update, chnabnut_draw, diff --git a/src/CCW/code_5BF0.c b/src/CCW/code_5BF0.c index 14b8be19..e6941bd7 100644 --- a/src/CCW/code_5BF0.c +++ b/src/CCW/code_5BF0.c @@ -8,12 +8,12 @@ Actor *func_8038C380(ActorMarker* marker, Gfx** gfx, Mtx** mtx, Vtx** vtx); void func_8038C41C(Actor *this); /* .data */ -extern ActorInfo D_8038F380 = { 0x1C6, 0x310, 0x501, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F3A4 = { 0x1C7, 0x311, 0x462, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F3C8 = { 0x1C8, 0x312, 0x463, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F3EC = { 0x1C9, 0x313, 0x464, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F410 = { 0x1CA, 0x314, 0x502, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 2.0f, 0}; -extern ActorInfo D_8038F434 = { 0x1CB, 0x315, 0x48D, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; +ActorInfo D_8038F380 = { 0x1C6, 0x310, 0x501, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F3A4 = { 0x1C7, 0x311, 0x462, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; +ActorInfo D_8038F3C8 = { 0x1C8, 0x312, 0x463, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F3EC = { 0x1C9, 0x313, 0x464, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F410 = { 0x1CA, 0x314, 0x502, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 2.0f, 0}; +ActorInfo D_8038F434 = { 0x1CB, 0x315, 0x48D, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; /* .code */ void func_8038BFE0(ActorMarker* marker) { diff --git a/src/CCW/code_61E0.c b/src/CCW/code_61E0.c index 1ae28f42..6f3ea795 100644 --- a/src/CCW/code_61E0.c +++ b/src/CCW/code_61E0.c @@ -13,7 +13,7 @@ typedef struct { void func_8038C7A8(Actor *this); /* .data */ -extern ActorInfo D_8038F460 = { 0x1BC, 0x2A9, 0x48E, 0x0, NULL, func_8038C7A8, NULL, func_80325888, 0, 0, 0.8f, 0}; +ActorInfo D_8038F460 = { 0x1BC, 0x2A9, 0x48E, 0x0, NULL, func_8038C7A8, NULL, func_80325888, 0, 0, 0.8f, 0}; /* .code */ void func_8038C5D0(ActorMarker* marker) { diff --git a/src/CCW/code_6620.c b/src/CCW/code_6620.c index fdb709ad..16fc476b 100644 --- a/src/CCW/code_6620.c +++ b/src/CCW/code_6620.c @@ -19,8 +19,19 @@ Actor *func_8038CBF0(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_8038CC4C(Actor *this); /* .data */ -extern Struct_CCW_6620_0 D_8038F490[]; -extern ActorInfo D_8038F4A8 = { 0x1BD, 0x2AA, 0x48F, 0x0, NULL, func_8038CC4C, NULL, func_8038CBF0, 0, 0, 2.2f, 0}; +Struct_CCW_6620_0 D_8038F490[] ={ + {0x43, 0, 0xCCE}, + {0x45, 1, 0xCD1}, + {0x46, 1, 0xCD3}, + 0 +}; + +ActorInfo D_8038F4A8 = { + 0x1BD, 0x2AA, 0x48F, + 0x0, NULL, + func_8038CC4C, NULL, func_8038CBF0, + 0, 0, 2.2f, 0 +}; /* .code */ void func_8038CA10(ActorMarker *marker) { diff --git a/src/CCW/code_6AC0.c b/src/CCW/code_6AC0.c index 4b3ab244..5bc876f6 100644 --- a/src/CCW/code_6AC0.c +++ b/src/CCW/code_6AC0.c @@ -12,16 +12,43 @@ typedef struct{ void func_8038CFB4(Actor *this); /* .data */ -extern ActorInfo D_8038F4D0 = { +ActorInfo D_8038F4D0 = { 0x1BE, 0x2AB, 0x48F, 0x0, NULL, func_8038CFB4, func_8038CFB4, func_80325888, 0, 0, 2.2f, 0 }; -extern Struct_CCW_6AC0_0 D_8038F4F4[]; -extern Struct_CCW_6AC0_0 D_8038F53C[]; -extern Struct_CCW_6AC0_0 D_8038F5D8[]; +Struct_CCW_6AC0_0 D_8038F4F4[] = { + {0.11f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.23f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.34f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.58f, 1.0f, SFX_4D_WET_WIGGLING, 9000}, + {0.8f, 1.0f, SFX_4D_WET_WIGGLING, 9000}, + 0 +}; + +Struct_CCW_6AC0_0 D_8038F53C[] = { + {0.07f, 1.6f, SFX_56_BANJO_HUI, 32000}, + {0.17f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.22f, 1.6f, SFX_55_BANJO_HOO_2, 32000}, + {0.31f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.33f, 1.6f, SFX_54_BANJO_HOO_1, 32000}, + {0.45f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.49f, 1.7f, SFX_55_BANJO_HOO_2, 32600}, + {0.6f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.63f, 1.7f, SFX_56_BANJO_HUI, 32600}, + {0.74f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.79f, 1.6f, SFX_54_BANJO_HOO_1, 32000}, + {0.9f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + 0 +}; + +Struct_CCW_6AC0_0 D_8038F5D8[] = { + {0.01f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + {0.5f, 1.0f, SFX_10_BANJO_LANDING_07, 9000}, + 0 +}; /* .code */ void func_8038CEB0(Actor *this, s32 next_state) { @@ -67,11 +94,11 @@ void func_8038CFB4(Actor *this) { } if (this->state == 1) { - phi_s0 = &D_8038F4F4; + phi_s0 = D_8038F4F4; } else if (this->state == 2) { - phi_s0 = &D_8038F53C; + phi_s0 = D_8038F53C; } else if (this->state == 3) { - phi_s0 = &D_8038F5D8; + phi_s0 = D_8038F5D8; } else{ phi_s0 = NULL; } @@ -88,8 +115,8 @@ void func_8038CFB4(Actor *this) { if (this->state == 1) { if (!this->unk138_24) { - player_getPosition(&sp60); - if (ml_vec3f_distance(this->position, &sp60) < 900.0f) { + player_getPosition(sp60); + if (ml_vec3f_distance(this->position, sp60) < 900.0f) { func_80311480(0xCCF, 4, NULL, NULL, NULL, NULL); this->unk138_24 = TRUE; } diff --git a/src/CCW/code_6EC0.c b/src/CCW/code_6EC0.c index ab2facc6..9a2a6396 100644 --- a/src/CCW/code_6EC0.c +++ b/src/CCW/code_6EC0.c @@ -16,9 +16,13 @@ void func_8038D368(Actor *this); Actor *func_8038D30C(ActorMarker* marker, Gfx** gfx, Mtx** mtx, Vtx** vtx); /* .data */ -extern Struct_CCW_6EC0_0 D_8038F600[]; +Struct_CCW_6EC0_0 D_8038F600[] = { + {MAP_45_CCW_AUTUMN, 0xCD2, 0}, + {MAP_46_CCW_WINTER, 0xCD4, 0xCD5}, + 0 +}; -extern ActorInfo D_8038F614 = { +ActorInfo D_8038F614 = { 0x1CE, 0x31A, 0x48F, 0x0, NULL, func_8038D368, NULL, func_8038D30C, diff --git a/src/CCW/code_7120.c b/src/CCW/code_7120.c index d7aded4c..9a140294 100644 --- a/src/CCW/code_7120.c +++ b/src/CCW/code_7120.c @@ -9,17 +9,20 @@ typedef struct { void func_8038D85C(Actor *this); /* .data */ -extern ActorInfo D_8038F640 = { +ActorInfo D_8038F640 = { 0x1BF, 0x2AC, 0x490, 0x0, NULL, func_8038D85C, NULL, func_80325888, 0, 0, 2.2f, 0 }; -extern s32 D_8038F664[3]; -extern struct42s D_8038F670; -extern struct43s D_8038F6A0; +/* .code */ void func_8038D510(Actor *this) { + static s32 D_8038F664[3] = {0xDE, 0xA7, 0x71}; + static struct42s D_8038F670 = { + {{ 0.0f, 50.0f, 0.0f}, { 70.0f, 100.0f, 70.0f}}, + {{100.0f, 100.0f, 100.0f}, {150.0f, 400.0f, 200.0f}} + }; ParticleEmitter *pCtrl; pCtrl = partEmitList_pushNew(6); @@ -36,6 +39,12 @@ void func_8038D510(Actor *this) { } void func_8038D5DC(Actor *this) { + static struct43s D_8038F6A0 ={ + {{-100.0f, -50.0f, -100.0f}, {100.0f, 50.0f, 100.0f}}, + {{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}}, + {{-100.0f, 0.0f, -200.0f}, {100.0f, 400.0f, 200.0f}} + }; + ParticleEmitter *pCtrl; pCtrl = partEmitList_pushNew(30); diff --git a/src/CCW/code_7570.c b/src/CCW/code_7570.c index 57d4d9ae..804388a4 100644 --- a/src/CCW/code_7570.c +++ b/src/CCW/code_7570.c @@ -5,7 +5,7 @@ void func_8038D9E0(Actor *this); /* .data */ -extern ActorInfo D_8038F6F0 = { 0x1C3, 0x30C, 0x4E4, 0x0, NULL, func_8038D9E0, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F6F0 = { 0x1C3, 0x30C, 0x4E4, 0x0, NULL, func_8038D9E0, NULL, func_80325888, 0, 0, 0.0f, 0}; /* .code */ void func_8038D960(Actor *this, s32 next_state) { diff --git a/src/CCW/code_76C0.c b/src/CCW/code_76C0.c index 91f09d99..0f2e80a9 100644 --- a/src/CCW/code_76C0.c +++ b/src/CCW/code_76C0.c @@ -65,17 +65,17 @@ void func_8038DB0C(Actor *this); void func_8038DAB0(Actor *this); /* .data */ -extern ActorInfo D_8038F720 = { 0x239, 0x25F, 0x4FC, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F744 = { 0x236, 0x260, 0x4F9, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F768 = { 0x237, 0x261, 0x4FA, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F78C = { 0x238, 0x262, 0x4FB, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F7B0 = { 0x243, 0x2E6, 0x533, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F7D4 = { 0x263, 0x2E7, 0x518, 0x1, NULL, func_8038DAB0, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F7F8 = { 0x21E, 0x233, 0x3B3, 0x1, NULL, func_802D3D74, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F81C = { 0x26B, 0x2DE, 0x531, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F840 = { 0x26C, 0x2DD, 0x53E, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F864 = { 0x26D, 0x2DC, 0x53F, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -extern ActorInfo D_8038F888 = { 0x1CC, 0x318, 0x0, 0x0, NULL, func_80325F84, NULL, func_80325340, 0, 0, 0.0f, 0}; +ActorInfo D_8038F720 = { 0x239, 0x25F, 0x4FC, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F744 = { 0x236, 0x260, 0x4F9, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F768 = { 0x237, 0x261, 0x4FA, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F78C = { 0x238, 0x262, 0x4FB, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7B0 = { 0x243, 0x2E6, 0x533, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7D4 = { 0x263, 0x2E7, 0x518, 0x1, NULL, func_8038DAB0, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7F8 = { 0x21E, 0x233, 0x3B3, 0x1, NULL, func_802D3D74, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F81C = { 0x26B, 0x2DE, 0x531, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F840 = { 0x26C, 0x2DD, 0x53E, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F864 = { 0x26D, 0x2DC, 0x53F, 0x1, NULL, func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F888 = { 0x1CC, 0x318, 0x0, 0x0, NULL, func_80325F84, NULL, func_80325340, 0, 0, 0.0f, 0}; /* .code */ diff --git a/src/CCW/code_7BC0.c b/src/CCW/code_7BC0.c index f74077a0..189bc2b3 100644 --- a/src/CCW/code_7BC0.c +++ b/src/CCW/code_7BC0.c @@ -5,9 +5,12 @@ void func_8038DFB0(Actor *this); -extern ActorAnimationInfo D_8038F8B0[]; +ActorAnimationInfo D_8038F8B0[] = { + {0x000, 0.0f}, + {0x234, 2.0f} +}; -extern ActorInfo D_8038F8C0 = { 0x251, 0x37E, 0x506, +ActorInfo D_8038F8C0 = { 0x251, 0x37E, 0x506, 0x1, D_8038F8B0, func_8038DFB0, func_80326224, func_80325888, 0, 0, 0.0f, 0 diff --git a/src/CCW/code_7BF0.c b/src/CCW/code_7BF0.c index cecec37e..b23ec383 100644 --- a/src/CCW/code_7BF0.c +++ b/src/CCW/code_7BF0.c @@ -6,9 +6,13 @@ void func_8038E0C8(Actor *this); /* .data */ -extern ActorAnimationInfo D_8038F8F0[]; +ActorAnimationInfo D_8038F8F0[] = { + {0x000, 0.0f}, + {0x16C, 2.0f}, + {0x16B, 1.2f} +}; -extern ActorInfo D_8038F908 = { +ActorInfo D_8038F908 = { MARKER_1F9_SNARE_BEAR, ACTOR_1E9_SNARE_BEAR, ASSET_440_MODEL_SNAREBEAR, 0x1, D_8038F8F0, func_8038E0C8, func_80326224, func_80325888, diff --git a/src/CCW/code_8050.c b/src/CCW/code_8050.c index 42e25629..319fc827 100644 --- a/src/CCW/code_8050.c +++ b/src/CCW/code_8050.c @@ -40,17 +40,35 @@ void func_8038E964(Actor *this); Actor *func_8038E56C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); /* .data */ -extern ActorAnimationInfo D_8038F930[]; -extern ActorInfo D_8038F988 = { +ActorAnimationInfo D_8038F930[] = { + {0x000, 0.0f}, + {0x243, 4.0f}, + {0x243, 0.7f}, + {0x245, 0.7f}, + {0x244, 0.9f}, + {0x246, 1.6f}, + {0x243, 1.5f}, + {0x245, 0.5f}, + {0x243, 1.5f}, + {0x243, 1e+06f}, + {0x243, 1e+06f} +}; + +ActorInfo D_8038F988 = { MARKER_1E2_GRUBLIN_HOOD, ACTOR_375_GRUBLIN_HOOD, ASSET_52C_MODEL_GRUBLIN_HOOD, 0x1, D_8038F930, func_8038E964, func_80326224, func_8038E56C, 2500, 0, 1.0f, 0 }; -extern struct43s D_8038F9AC; /* .code */ void func_8038E440(ParticleEmitter *pCtrl, Actor *actor, enum asset_e model_id){ + static struct43s D_8038F9AC = { + {{-200.0f, 200.0f, -200.0f}, {200.0f, 400.0f, 200.0f}}, + {{ 0.0f, -1800.0f, 0.0f}, { 0.0f, -1800.0f, 0.0f}}, + {{ -50.0f, 200.0f, -50.0f}, { 50.0f, 400.0f, 50.0f}} + }; + func_802DABA0(pCtrl, actor->position, actor->scale, model_id); func_802EFE24(pCtrl, -600.0f, -600.0f, -600.0f, diff --git a/src/CCW/code_8670.c b/src/CCW/code_8670.c index 7b741a25..97c89cba 100644 --- a/src/CCW/code_8670.c +++ b/src/CCW/code_8670.c @@ -5,7 +5,7 @@ void func_8038EAD4(Actor *this); /* .data */ -extern ActorInfo D_8038FA00 = { 0x1E3, 0x374, 0x0, 0x0, NULL, func_8038EAD4, func_80326224, func_80325340, 0, 0, 0.0f, 0}; +ActorInfo D_8038FA00 = { 0x1E3, 0x374, 0x0, 0x0, NULL, func_8038EAD4, func_80326224, func_80325340, 0, 0, 0.0f, 0}; /* .code */ bool func_8038EA60(s32 arg0, s32 arg1, s32 arg2) { diff --git a/src/CCW/code_950.c b/src/CCW/code_950.c index a494a0ff..30c2b89d 100644 --- a/src/CCW/code_950.c +++ b/src/CCW/code_950.c @@ -16,7 +16,7 @@ typedef struct{ void chwasp_update(Actor *this); /* .data */ -extern ActorInfo D_8038EBD0 = { MARKER_1AE_ZUBBA, ACTOR_29B_ZUBBA, ASSET_446_MODEL_ZUBBA, 0x0, NULL, chwasp_update, NULL, func_80325888, 0, 0, 1.0f, 0}; +ActorInfo D_8038EBD0 = { MARKER_1AE_ZUBBA, ACTOR_29B_ZUBBA, ASSET_446_MODEL_ZUBBA, 0x0, NULL, chwasp_update, NULL, func_80325888, 0, 0, 1.0f, 0}; /* .code */ void chwasp_setState(Actor *this, s32 next_state) { diff --git a/src/MM/ch/orangepad.c b/src/MM/ch/orangepad.c index 50f4675d..9d2125af 100644 --- a/src/MM/ch/orangepad.c +++ b/src/MM/ch/orangepad.c @@ -11,8 +11,6 @@ extern void func_802EFA20(ParticleEmitter *, f32, f32); /* public functions */ void func_80386768(Actor *); - - /* .data */ ActorInfo chorangepadInfo = { MARKER_66_ORANGE_PAD, ACTOR_57_ORANGE_PAD, ASSET_2EB_MODEL_ORANGE_PAD, 0, NULL, @@ -20,9 +18,6 @@ ActorInfo chorangepadInfo = { MARKER_66_ORANGE_PAD, ACTOR_57_ORANGE_PAD, ASSET_2 0, 0, 0.0f, 0 }; -extern f32 D_80389B40; -extern f64 D_80389B48; - /*.code */ void func_803863F0(s32 x, s32 y, s32 z){ f32 pos[3]; diff --git a/src/MM/code_1AD0.c b/src/MM/crc.c similarity index 78% rename from src/MM/code_1AD0.c rename to src/MM/crc.c index 8fd4a676..24c1abb8 100644 --- a/src/MM/code_1AD0.c +++ b/src/MM/crc.c @@ -3,7 +3,11 @@ #include "functions.h" #include "variables.h" -u8 D_803899C0[] = {0x00, 0x0C, 0x74, 0x0C, 0xCD, 0x24, 0x9C, 0xB3, 0x00, 0x00, 0xD4, 0x4F}; +/* .data */ +//TODO Implement CRC calculation in Makefile(?) +u32 D_803899C0 = 0x000C740C; //MM.code CRC1 +u32 D_803899C4 = 0xCD249CB3; //MM.code CRC2 +u32 D_803899C8 = 0x0000D44F; //MM.data CRC1 (with this value = 0) void func_802D1724(void); diff --git a/subyaml/BGS.us.v10.yaml b/subyaml/BGS.us.v10.yaml index 0891c422..a58959fa 100644 --- a/subyaml/BGS.us.v10.yaml +++ b/subyaml/BGS.us.v10.yaml @@ -56,7 +56,7 @@ segments: - [0x0000A680, .data, ch/mrvile] - [0x0000A6C0, .data, done/ch/code_6730] - [0x0000A6F0, .data, ch/yellowflibbit] - - [0x0000A730, bin, data_A730] + - [0x0000A730, .data, crc] - [0x0000A740, .data, done/ch/mudhut] - [0x0000A7A0, .data, done/ch/code_8A60] - [0x0000A830, .data, ch/tanktup] diff --git a/subyaml/CC.us.v10.yaml b/subyaml/CC.us.v10.yaml index af566890..37db38cf 100644 --- a/subyaml/CC.us.v10.yaml +++ b/subyaml/CC.us.v10.yaml @@ -42,10 +42,10 @@ segments: - [0x000036E0, .data, code_530] - [0x00003710, .data, code_BF0] - [0x00003760, .data, ch/tooth] - - [0x000037F0, bin, data_37F0] + - [0x000037F0, .data, crc] - [0x00003800, .data, code_1B90] - [0x00003810, .data, code_1F70] - - [0x00003840, bin, ch/sawblade] + - [0x00003840, .data, ch/sawblade] - [0x00003A50, .data, code_3400] - [0x00003AC0, .rodata, code_0] - [0x00003B10, .rodata, code_530] diff --git a/subyaml/CCW.us.v10.yaml b/subyaml/CCW.us.v10.yaml index 4a71ce16..929f1c36 100644 --- a/subyaml/CCW.us.v10.yaml +++ b/subyaml/CCW.us.v10.yaml @@ -56,31 +56,52 @@ segments: - [0x7BF0, c, code_7BF0] #DONE - [0x8050, c, code_8050] #DONE - [0x8670, c, code_8670] #DONE - - [0x00008760, bin, data_8760] - - [0x00008920, .data, code_2B00] - - [0x00008A80, bin, data_8A80] - - [0x00008D70, .data, code_3DA0] - - [0x00008DA0, bin, data_8DA0] - - [0x00008E80, bin, data_8E80] #.data, code_4D00] - - [0x00008F10, .data, code_50D0] - - [0x00008F60, bin, data_8F60] - - [0x00009640, .rodata, code_160] - - [0x00009660, .rodata, code_950] - - [0x000096C0, .rodata, code_1B20] - - [0x000096F0, .rodata, code_2270] - - [0x00009720, .rodata, code_2B00] - - [0x00009750, .rodata, code_3310] - - [0x00009770, .rodata, code_3DA0] - - [0x000097B0, .rodata, code_4530] - - [0x000097F0, .rodata, code_4960] - - [0x00009800, .rodata, code_4D00] - - [0x00009830, .rodata, code_50D0] - - [0x00009870, .rodata, code_5540] - - [0x00009890, .rodata, code_5BF0] - - [0x000098D0, .rodata, code_61E0] - - [0x000098F0, .rodata, code_6620] - - [0x00009900, .rodata, code_6AC0] - - [0x00009920, .rodata, code_76C0] - - [0x00009930, .rodata, code_7BF0] - - [0x00009940, .rodata, code_8050] + - [0x8760, .data, code_0] + - [0x87B0, .data, code_160] + - [0x87E0, .data, code_950] + - [0x8810, .data, code_14B0] + - [0x8850, .data, code_1B20] + - [0x88B0, .data, code_21A0] + - [0x88E0, .data, code_2270] + - [0x8920, .data, code_2B00] + - [0x8A80, .data, code_3050] + - [0x8AB0, .data, code_3310] + - [0x8D70, .data, code_3DA0] + - [0x8DA0, .data, code_4530] + - [0x8E40, .data, code_4960] + - [0x8E80, .data, code_4D00] + - [0x8F10, .data, code_50D0] + - [0x8F60, .data, code_5540] + - [0x8F90, .data, code_5BF0] + - [0x9070, .data, code_61E0] + - [0x90A0, .data, code_6620] + - [0x90E0, .data, code_6AC0] + - [0x9210, .data, code_6EC0] + - [0x9250, .data, code_7120] + - [0x9300, .data, code_7570] + - [0x9330, .data, code_76C0] + - [0x94C0, .data, code_7BC0] + - [0x9500, .data, code_7BF0] + - [0x9540, .data, code_8050] + - [0x9610, .data, code_8670] + - [0x9640, .rodata, code_160] + - [0x9660, .rodata, code_950] + - [0x96C0, .rodata, code_1B20] + - [0x96F0, .rodata, code_2270] + - [0x9720, .rodata, code_2B00] + - [0x9750, .rodata, code_3310] + - [0x9770, .rodata, code_3DA0] + - [0x97B0, .rodata, code_4530] + - [0x97F0, .rodata, code_4960] + - [0x9800, .rodata, code_4D00] + - [0x9830, .rodata, code_50D0] + - [0x9870, .rodata, code_5540] + - [0x9890, .rodata, code_5BF0] + - [0x98D0, .rodata, code_61E0] + - [0x98F0, .rodata, code_6620] + - [0x9900, .rodata, code_6AC0] + - [0x9920, .rodata, code_76C0] + - [0x9930, .rodata, code_7BF0] + - [0x9940, .rodata, code_8050] + - [0x99E0, .bss, code_3310] - [0x000099E0] \ No newline at end of file diff --git a/subyaml/MM.us.v10.yaml b/subyaml/MM.us.v10.yaml index 36009a0a..5d5387c5 100644 --- a/subyaml/MM.us.v10.yaml +++ b/subyaml/MM.us.v10.yaml @@ -32,7 +32,7 @@ segments: - [0x570, c, ch/hut] - [0x8B0, c, ch/chimpystump] - [0xAE0, c, ch/conga] - - [0x1AD0, c, code_1AD0] + - [0x1AD0, c, crc] - [0x1BA0, c, ch/orange] - [0x1F10, c, ch/lmonkey] #chimpy - [0x24C0, c, code_24C0] @@ -43,7 +43,7 @@ segments: - [0x34D0, .data, ch/hut] - [0x3530, .data, ch/chimpystump] - [0x3560, .data, ch/conga] - - [0x35D0, .data, code_1AD0] + - [0x35D0, .data, crc] - [0x35E0, .data, ch/orange] - [0x3620, .data, ch/lmonkey] - [0x3670, .data, ch/grublin] diff --git a/symbol_addrs.core2.us.v10.txt b/symbol_addrs.core2.us.v10.txt index d634a366..04370e1d 100644 --- a/symbol_addrs.core2.us.v10.txt +++ b/symbol_addrs.core2.us.v10.txt @@ -342,6 +342,7 @@ timedFuncQueue_update = 0x803251D4; func_80325340 = 0x80325340; func_80325E78 = 0x80325E78; func_80325F2C = 0x80325F2C; +func_80325F84 = 0x80325F84; func_80326224 = 0x80326224; actor_setOpacity = 0x8032628C; actor_new = 0x803272F8; diff --git a/tools/n64splat b/tools/n64splat index 2b7cbe56..a26134e3 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 2b7cbe565f9205f2a5eaf6eadd33a21f13417108 +Subproject commit a26134e36f68fb122eeac6a70f8613776daaa121