diff --git a/README.md b/README.md index be9587ee..a3363778 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# banjo (89.2171%) +# banjo (89.2214%) diff --git a/include/2.0L/PR/libaudio.h b/include/2.0L/PR/libaudio.h index c7f272d5..3b77a86c 100644 --- a/include/2.0L/PR/libaudio.h +++ b/include/2.0L/PR/libaudio.h @@ -682,7 +682,7 @@ typedef struct { ALPan pan; /* overall pan for this chan */ u8 priority; /* priority for this chan */ u8 vol; /* current volume for this chan */ - u8 unk9; + u8 unkA; u8 fxmix; /* current fx mix for this chan */ u8 sustain; /* current sustain pedal state */ f32 pitchBend; /* current pitch bend val in cents */ diff --git a/include/enums.h b/include/enums.h index 9acb8311..658afe85 100644 --- a/include/enums.h +++ b/include/enums.h @@ -216,9 +216,10 @@ enum bkprog_e{ // {index=0xCC, type="Prog", level=6, name="Cobweb to Green Cauldron Broken"}, BKPROG_CD_GRATE_TO_WATER_SWITCH_3_OPEN = 0xcd, BKPROG_CE_GRATE_TO_MMM_PUZZLE_OPEN, - - // {index=0xD1, type="Prog", level=12, name="Fight 1st Jinjo Statue Activated Cutscene"}, - // {index=0xD2, type="Prog", level=12, name="Fight 1st Jinjo Statue Rising Cutscene"}, + BKPROG_CF_HAS_ENTERED_FINAL_FIGHT, + + BKPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT = 0xD1, + BKPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT, // {index=0xD3, type="Prog", level=6, name="??FF PATTERN 2^0"}, // {index=0xD4, type="Prog", level=6, name="??FF PATTERN 2^1"}, // {index=0xD5, type="Prog", level=6, name="??FF PATTERN 2^2"}, @@ -676,16 +677,16 @@ enum comusic_e COMUISC_97_BBONUS_DROP_PIECE, COMUSIC_98_BBONUS_PIECES_SHUFFLE, // Looping MUSIC_MUMBO_BBQ, - SFX_JINJONATOR_HITS_GRUNTY_A, - SFX_JINJONATOR_HITS_GRUNTY_B, - SFX_JINJONATOR_HITS_GRUNTY_C, - SFX_JINJONATOR_HITS_GRUNTY_D, - SFX_JINJONATOR_HITS_GRUNTY_E, - SFX_JINJONATOR_HITS_GRUNTY_F, - SFX_JINJONATOR_HITS_GRUNTY_G = 0xA0, - SFX_JINJONATOR_HITS_GRUNTY_H, - SFX_JINJONATOR_HITS_GRUNTY_I, - SFX_JINJONATOR_HITS_GRUNTY_J, + COMUSIC_9A_JINJONATOR_HITS_GRUNTY_A, + COMUSIC_9B_JINJONATOR_HITS_GRUNTY_B, + COMUSIC_9C_JINJONATOR_HITS_GRUNTY_C, + COMUSIC_9D_JINJONATOR_HITS_GRUNTY_D, + COMUSIC_9E_JINJONATOR_HITS_GRUNTY_E, + COMUSIC_9F_JINJONATOR_HITS_GRUNTY_F, + COMUSIC_A0_JINJONATOR_HITS_GRUNTY_G = 0xA0, + COMUSIC_A1_JINJONATOR_HITS_GRUNTY_H, + COMUSIC_A2_JINJONATOR_HITS_GRUNTY_I, + COMUSIC_A3_JINJONATOR_HITS_GRUNTY_J, JINGLE_JINJONATOR_DRUMMING_A, JINGLE_JINJONATOR_DRUMMING_B, JINGLE_JINJONATOR_DRUMMING_C, @@ -1293,7 +1294,8 @@ enum sfx_e SFX_3FA_HONEYCOMB_TALKING, SFX_3FB_UNKNOWN, //conga - SFX_406_GOLD_BULLION_TALKING = 0x406, + SFX_405_UNKNOWN = 0x405, + SFX_406_GOLD_BULLION_TALKING, SFX_407_MUMBO_TALKING_1, SFX_408_MUMBO_TALKING_2, SFX_409_MUMBO_TALKING_3, @@ -1858,9 +1860,26 @@ enum actor_e ACTOR_386_PORTRAIT_OF_TREE_AND_MOON, ACTOR_387_PORTRAIT_OF_TEEHEE, ACTOR_388_PORTRAIT_OF_MINION, + ACTOR_389_GRUNTY_SPELL_FIREBALL, + + ACTOR_38B_GRUNTILDA_FINAL_BOSS = 0x38B, ACTOR_39F_FIGHT_FLIGHT_PAD = 0x39F, ACTOR_3A0_ICECUBE_B, + ACTOR_3A1_STONE_JINJO = 0x3A1, + ACTOR_3A2_JINJO_STATUE_BASE = 0x3A2, + + ACTOR_3A5_BOSS_JINJO_ORANGE = 0x3A5, + ACTOR_3A6_BOSS_JINJO_GREEN, + ACTOR_3A7_BOSS_JINJO_PINK, + ACTOR_3A8_BOSS_JINJO_YELLOW, + ACTOR_3A9_JINJONATOR_STATUE_BASE = 0x3A9, + + ACTOR_3AA_GRUNTY_SPELL_GREEN_ATTACK = 0x3AA, + ACTOR_3AB_GRUNTY_SPELL_BARRIER, + ACTOR_3AC_JINJONATOR, + + ACTOR_3AF_GRUNTY_SHADOW = 0x3AF, ACTOR_3BA_UNKOWN = 0x3ba, @@ -2639,14 +2658,14 @@ enum asset_e // Unused // Unused // Unused - // 3bb Yellow Jinjo - // 3bc Orange Jinjo + ASSET_3BB_MODEL_JINJO_YELLOW = 0x3BB, + ASSET_3BC_MODEL_JINJO_ORANGE, // 3bd TTC Lighthouse A // 3be TTC Lighthouse B ASSET_3BF_MODEL_PLAYER_SHADOW = 0x3BF, - // 3c0 Blue Jinjo - // 3c1 Pink Jinjo - // 3c2 Green Jinjo + ASSET_3C0_MODEL_JINJO_BLUE, + ASSET_3C1_MODEL_JINJO_PINK, + ASSET_3C2_MODEL_JINJO_GREEN, // Unused // Unused ASSET_3C5_MODEL_GRUBLIN = 0x3c5, @@ -3027,16 +3046,16 @@ enum asset_e ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE = 0x53A, ASSET_53B_MODEL_SHRAPNAL_PIECE_SPIKE, ASSET_53C_MODEL_SHRAPNAL_PIECE_PLATE, - // 53d Gruntilda On Broomstick + ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, // 53e Gnawty's Bed // 53f Gnawty's Shelves // 540 GL Shock Jump Pad Switch - // 541 (Fireball?) + ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK = 0x541, // 542 (Shadow?) - // 543 Final Battle Jinjo Stand - // 544 Final Battle Jinjonator Stand - // 545 Final Battle Stone Jinjo - // 546 Grunty's Barrier Spell + ASSET_543_MODEL_JINJO_STATUE_BASE = 0x543, + ASSET_544_MODEL_JINJONATOR_STATUE_BASE, + ASSET_545_MODEL_STONE_JINJO, + ASSET_546_MODEL_GRUNTY_SPELL_BARRIER = 0x546, // 547 GL Blue Egg Refill Pillow // 548 GL Red Feather Refill Pillow // 549 GL Gold Feather Refill Pillow @@ -3047,11 +3066,11 @@ enum asset_e // 54e Copyright Info (Title Screen) // 54f Cheato // 550 Large Door To Final Battle - // 551 Jinjonator - // 552 Broomstick Head (Upon Breaking) - // 553 Broomstick Shaft Short (Upon Breaking) - // 554 Broomstick Shaft Long (Upon Breaking) - // 555 Broomstick Eye (Upon Breaking) + ASSET_551_MODEL_JINJONATOR = 0x551, + ASSET_552_MODEL_BROOMSTICK_PIECE_HEAD, + ASSET_553_MODEL_BROOMSTICK_PIECE_SHORT, + ASSET_554_MODEL_BROOMSTICK_PIECE_LONG, + ASSET_555_MODEL_BROOMSTICK_PIECE_EYE, // 556 Blast When Yellow Jinjo Hits Gruntilda // 557 Blast When Orange Jinjo Hits Gruntilda // 558 Blast When Green Jinjo Hits Gruntilda @@ -3423,7 +3442,7 @@ enum asset_e ASSET_6C6_SPRITE_SMOKE_PINK, ASSET_6C7_SPRITE_SMOKE_GREEN_2, ASSET_6C8_SPRITE_SMOKE_BLUE, - ASSET_6C9_SPRITE_SMOKE_GREEN_BIG, + ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, ASSET_6D1_SPRITE_GOLDFEATHTER = 0x6d1, @@ -3949,9 +3968,26 @@ enum marker_e{ MARKER_259_PORTRAIT_OF_TREE_AND_MOON, MARKER_25A_PORTRAIT_OF_TEEHEE, MARKER_25B_PORTRAIT_OF_MINION, + MARKER_25C_GRUNTY_SPELL_FIREBALL, + MARKER_25E_GRUNTILDA_FINAL_BOSS = 0x25E, MARKER_25F_ICECUBE_B = 0x25F, + MARKER_276_STONE_JINJO = 0x276, + + MARKER_27A_JINJO_STATUE_BASE = 0x27A, + MARKER_27B_BOSS_JINJO_ORANGE, + MARKER_27C_BOSS_JINJO_GREEN, + MARKER_27D_BOSS_JINJO_PINK, + MARKER_27E_BOSS_JINJO_YELLOW, + MARKER_27F_JINJONATOR_STATUE_BASE, + + MARKER_280_GRUNTY_SPELL_GREEN_ATTACK = 0x280, + + MARKER_284_GRUNTY_SPELL_BARRIER = 0x284, + MARKER_285_JINJONATOR, + + MARKER_288_GRUNTY_SHADOW = 0x288, MARKER_295_GRUNTLING_BLUE = 0x295, MARKER_296_TEEHEE_PURPLE, diff --git a/include/functions.h b/include/functions.h index f1f86e23..77667837 100644 --- a/include/functions.h +++ b/include/functions.h @@ -582,7 +582,10 @@ f32 climbGetTopY(void); void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]); void func_8024E55C(s32, void *); -void func_802C3C88(GenMethod_1, s32); + +void __spawnqueue_add_1(GenMethod_1, s32); +#define SPAWNQUEUE_ADD_1(method, arg0) __spawnqueue_add_1((GenMethod_1) (method), reinterpret_cast(s32, (arg0))) + void func_802FAD64(enum item_e); void nodeprop_getPosition(NodeProp *, f32[3]); bool func_80311480(s32 text_id, s32 arg1, f32 *pos, ActorMarker *marker, void(*callback)(ActorMarker *, enum asset_e, s32), void(*arg5)(ActorMarker *, enum asset_e, s32)); diff --git a/include/prop.h b/include/prop.h index 4fc08cce..7788157d 100644 --- a/include/prop.h +++ b/include/prop.h @@ -180,7 +180,7 @@ typedef struct actor_s{ u32 unk58_0: 1; f32 unk5C; f32 unk60; //0x60 - f32 yaw_moving; //0x64 + f32 yaw_ideal; //0x64 f32 pitch;//0x68 f32 unk6C; f32 unk70; diff --git a/include/structs.h b/include/structs.h index 038ebf52..e6ad797b 100644 --- a/include/structs.h +++ b/include/structs.h @@ -491,7 +491,8 @@ typedef struct{ }struct4Cs; typedef struct struct_4D_s{ - u8 unk0[0x18]; + f32 unk0[3]; + f32 unkC[3]; }struct4Ds; typedef struct{ diff --git a/progress/progress_core1.svg b/progress/progress_core1.svg index df6aa487..6f0b5513 100644 --- a/progress/progress_core1.svg +++ b/progress/progress_core1.svg @@ -17,7 +17,7 @@ core1 - 73.1238% - 73.1238% + 73.1536% + 73.1536% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 63ac72c3..fc4dd50c 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 89.2171% - 89.2171% + 89.2214% + 89.2214% \ No newline at end of file diff --git a/src/BGS/ch/croctus.c b/src/BGS/ch/croctus.c index a7228ef9..1b94995f 100644 --- a/src/BGS/ch/croctus.c +++ b/src/BGS/ch/croctus.c @@ -152,16 +152,16 @@ void func_80387FD4(Actor *this){ func_80324D2C(4.5f, COMUSIC_43_ENTER_LEVEL_GLITTER); func_80328B8C(this, 5, 0.79f, 1); if (this->unkF4_8 == 5) { - timedFunc_set_1(0.9f, (TFQM1) func_80387E40, (s32) this->marker); + timedFunc_set_1(0.9f, (GenMethod_1) func_80387E40, (s32) this->marker); } else { func_80326310(this); } if (this->unkF4_8 < 5) { bgs_D_803907B8[this->unkF4_8]->propPtr->unk8_4 = TRUE; - timedFunc_set_1(1.1f, (TFQM1)func_80387E00, bgs_D_803907B8[this->unkF4_8]); + timedFunc_set_1(1.1f, (GenMethod_1)func_80387E00, bgs_D_803907B8[this->unkF4_8]); func_802BAFE4(D_803907B0[this->unkF4_8-1]); } else { - timedFunc_set_1(0.8f, (TFQM1)func_80387D90, (s32) this->marker); + timedFunc_set_1(0.8f, (GenMethod_1)func_80387D90, (s32) this->marker); } func_802C3D3C(&func_80387D18, this->marker, 0x46); } diff --git a/src/BGS/code_3420.c b/src/BGS/code_3420.c index 68101a60..31b711b7 100644 --- a/src/BGS/code_3420.c +++ b/src/BGS/code_3420.c @@ -374,9 +374,9 @@ void chvilegame_player_consume_piece(Actor *this) { item_inc(ITEM_16_LIFE); func_8025A6EC(COMUSIC_15_EXTRA_LIFE_COLLECTED, 0x7FF8); } - timedFunc_set_1(0.0f, (TFQM1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); - timedFunc_set_1(0.5f, (TFQM1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); - timedFunc_set_1(1.0f, (TFQM1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(0.0f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(0.5f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(1.0f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); } func_8028F6B8(BS_INTR_17, (i_ptr->type != YUMBLIE) ? ASSET_3F7_MODEL_GRUMBLIE : ASSET_3F6_MODEL_YUMBLIE); if (!is_correct_type) { @@ -406,9 +406,9 @@ bool chvilegame_cpu_consume_piece(ActorMarker *marker, f32 position[3]) { for(i_ptr = begin; i_ptr < end; i_ptr++){ if ((ml_vec3f_distance(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) { local->vile_score++; - timedFunc_set_1(0.0f, (TFQM1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); - timedFunc_set_1(0.5f, (TFQM1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); - timedFunc_set_1(1.0f, (TFQM1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(0.0f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(0.5f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(1.0f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); return TRUE; } } diff --git a/src/BGS/done/ch/mudhut.c b/src/BGS/done/ch/mudhut.c index 7e4250d7..b595a193 100644 --- a/src/BGS/done/ch/mudhut.c +++ b/src/BGS/done/ch/mudhut.c @@ -100,7 +100,7 @@ void func_8038EB8C(Actor *this){ if(tmp == 5){ func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); } - func_802C3C88(func_8038EB4C, this->marker); + __spawnqueue_add_1(func_8038EB4C, this->marker); if(tmp < 5){ func_802C3F04(func_802C4218,D_80390B50[tmp], ((u32 *)diffPos)[0], ((u32 *)diffPos)[1], ((u32 *)diffPos)[2]); } else { diff --git a/src/CCW/code_160.c b/src/CCW/code_160.c index 584036bf..b67c5cef 100644 --- a/src/CCW/code_160.c +++ b/src/CCW/code_160.c @@ -69,7 +69,7 @@ void func_803865F4(Actor *this, s32 next_state) { func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); func_80324E38(0.0f, 3); timed_setCameraToNode(2.0f, 4); - timedFunc_set_1(2.0f, (TFQM1)func_80386550, (s32) this->marker); + timedFunc_set_1(2.0f, (GenMethod_1)func_80386550, (s32) this->marker); func_80324E88(4.0f); func_80324E38(4.0f, 0); } diff --git a/src/FP/code_11F0.c b/src/FP/code_11F0.c index 9862d114..d87fc8b4 100644 --- a/src/FP/code_11F0.c +++ b/src/FP/code_11F0.c @@ -124,7 +124,7 @@ void func_8038794C(Actor *this){ if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){ if(!jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3) && !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)){ - func_802C3C88(func_80387760, this->marker); + __spawnqueue_add_1(func_80387760, this->marker); } this->unk38_31 = 0; actor_collisionOff(this); @@ -150,7 +150,7 @@ void func_8038794C(Actor *this){ if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){ if(func_80311480(0xbff, 0x2a, this->position, NULL, NULL, NULL)){ for(i = 0; i <5; i++ ){ - timedFunc_set_1(D_80391BEC[i], (TFQM1)func_8038787C, (s32)this->marker); + timedFunc_set_1(D_80391BEC[i], (GenMethod_1)func_8038787C, (s32)this->marker); } this->unk138_24 = TRUE; } @@ -194,7 +194,7 @@ void func_8038794C(Actor *this){ case 5://L80387D90 if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){ this->unk38_31 = 0; - func_802C3C88(func_80387760, this->marker); + __spawnqueue_add_1(func_80387760, this->marker); } break; } diff --git a/src/FP/code_2350.c b/src/FP/code_2350.c index 2a400b9c..dc8ea9e5 100644 --- a/src/FP/code_2350.c +++ b/src/FP/code_2350.c @@ -584,7 +584,7 @@ void func_803896FC(Actor *this){ case 1: //L80389F78 if(this->unk38_31 == 2){ if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){ - func_802C3C88(func_80388F54, this->marker); + __spawnqueue_add_1(func_80388F54, this->marker); func_8038B9BC(); marker_despawn(this->marker); } diff --git a/src/FP/code_3E00.c b/src/FP/code_3E00.c index ecdc291b..c5ab107f 100644 --- a/src/FP/code_3E00.c +++ b/src/FP/code_3E00.c @@ -120,7 +120,7 @@ void func_8038A384(Actor *this){ : (sp34 == 2) ? 0xC18 : 0xC19; - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 2.0f); func_8028E668(this->position, 100.0f, -10.0f, 100.0f); diff --git a/src/FP/code_4770.c b/src/FP/code_4770.c index 5ae534e7..7562b48f 100644 --- a/src/FP/code_4770.c +++ b/src/FP/code_4770.c @@ -159,7 +159,7 @@ void func_8038AEE0(s32 indx){ } void func_8038B00C(s32 indx){ - func_802C3C88(func_8038AEE0, indx); + __spawnqueue_add_1(func_8038AEE0, indx); } void func_8038B034(void){ @@ -211,7 +211,7 @@ void func_8038B1D0(enum jiggy_e jiggy_id){ timed_setCameraToNode(0.0f, 3); timedFunc_set_0(0.0f, func_8038AEA0); timedFunc_set_0(0.0f, func_8038B0B8); - timedFunc_set_1(0.1f, (TFQM1) func_8038B130, jiggy_id); + timedFunc_set_1(0.1f, (GenMethod_1) func_8038B130, jiggy_id); timedFunc_set_0(5.0f, func_8038B190); timedFunc_set_0(5.0f, func_8038B1C4); func_80324E88(5.0f); diff --git a/src/FP/code_5CC0.c b/src/FP/code_5CC0.c index 4568367c..d18df67e 100644 --- a/src/FP/code_5CC0.c +++ b/src/FP/code_5CC0.c @@ -266,7 +266,7 @@ void func_8038C94C(ActorMarker *caller, enum asset_e text_id, s32 arg2){ Actor *this = marker_getActor(caller); if(!func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE)){ func_80328A84(this, 6); - func_802C3C88(func_8038C8F0, this->marker); + __spawnqueue_add_1(func_8038C8F0, this->marker); } } @@ -370,7 +370,7 @@ void func_8038C9A0(Actor *this){ break; case 5:// 8038CE14 - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 8.0f); if(!func_8038C718(this, this->unk1C[1])){ this->velocity[1] = randf2(14.0f, 20.0f); diff --git a/src/FP/code_6AE0.c b/src/FP/code_6AE0.c index c8ac893f..6ad35a89 100644 --- a/src/FP/code_6AE0.c +++ b/src/FP/code_6AE0.c @@ -261,7 +261,7 @@ void func_8038D51C(ActorMarker *marker){ this->unk1C[1] = 1.0f; func_80324E88(1.7f); func_80324E38(1.7f, 0); - timedFunc_set_1(2.3f, (TFQM1)func_8038D294, (s32)this->marker); + timedFunc_set_1(2.3f, (GenMethod_1)func_8038D294, (s32)this->marker); this->velocity[1] = 1.0f; } @@ -368,7 +368,7 @@ void func_8038D6C8(Actor *this){ func_8038D324(this); if(actor_animationIsAt(this, 0.999f)) - func_802C3C88((GenMethod_1)func_8038D474, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_8038D474, (s32)this->marker); if(this->velocity[0] != 0.0f) break; @@ -381,7 +381,7 @@ void func_8038D6C8(Actor *this){ item_set(ITEM_6_HOURGLASS, TRUE); this->unk38_31 = 0xA; item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31); - func_802C3C88((GenMethod_1)func_8038D41C, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_8038D41C, (s32)this->marker); this->unk60 = 0.0f; func_80347A14(0); func_802FAD64(ITEM_14_HEALTH); @@ -398,7 +398,7 @@ void func_8038D6C8(Actor *this){ func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); func_8038D3D8(); func_80324E38(0.0f, 3); - timedFunc_set_1(1.3f, (TFQM1)func_8038D51C, (s32)this->marker); + timedFunc_set_1(1.3f, (GenMethod_1)func_8038D51C, (s32)this->marker); timed_setCameraToNode(0.9f, 0xC); item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31); func_80347A14(1); @@ -421,7 +421,7 @@ void func_8038D6C8(Actor *this){ if(0.96 < animctrl_getAnimTimer(this->animctrl)){ if(this->unk60 <= 0.0){ - func_802C3C88((GenMethod_1)func_8038D474, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_8038D474, (s32)this->marker); this->unk60 = 2.9f; } else{ diff --git a/src/FP/code_7980.c b/src/FP/code_7980.c index a39b76db..8b681c1a 100644 --- a/src/FP/code_7980.c +++ b/src/FP/code_7980.c @@ -222,7 +222,7 @@ void func_8038E094(Actor *this){ case 6: //L8038E698 this->marker->propPtr->unk8_3 = FALSE; - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 12.0f); break; diff --git a/src/FP/code_8E20.c b/src/FP/code_8E20.c index cada44a6..f7bd12f1 100644 --- a/src/FP/code_8E20.c +++ b/src/FP/code_8E20.c @@ -93,7 +93,7 @@ void func_8038F454(Actor *this){ actor_loopAnimation(this); timed_setCameraToNode(0.0f, 0x2e); func_80324DBC(0.0f, 0xc1b, 0x2a, this->position, this->marker, func_8038F330, NULL); - timedFunc_set_1(2.5f, (TFQM1)func_8038F3F4, (s32)this->marker); + timedFunc_set_1(2.5f, (GenMethod_1)func_8038F3F4, (s32)this->marker); } else{ func_8038F2B8(this); @@ -111,7 +111,7 @@ void func_8038F560(Actor *this){ } void func_8038F598(Actor *this, f32 arg1){ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, arg1); } @@ -119,7 +119,7 @@ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){ f32 sp24; sp24 = animctrl_getAnimTimer(this->animctrl); - this->yaw_moving = (f32) func_803297C8(this, arg1); + this->yaw_ideal = (f32) func_803297C8(this, arg1); func_80328FB0(this, arg3); if(actor_animationIsAt(this, 0.9f)){ FUNC_8030E8B4(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000); @@ -137,7 +137,7 @@ bool func_8038F6C4(Actor *this, f32 arg1[3], f32 arg2){ func_80328C64(this, func_803297C8(this, arg1)); func_80328FB0(this, arg2); - dTheta = this->yaw - this->yaw_moving; + dTheta = this->yaw - this->yaw_ideal; if(-arg2 <= dTheta && dTheta <= arg2){ return TRUE; } @@ -190,7 +190,7 @@ void func_8038F7AC(Actor *this){ this->position[0] = local->unkC[0];\ this->position[1] = local->unkC[1];\ this->position[2] = local->unkC[2]; - func_802C3C88(func_8038F758, this->marker); + __spawnqueue_add_1(func_8038F758, this->marker); local->unk30 = FALSE; } }//L8038F910 diff --git a/src/FP/code_A240.c b/src/FP/code_A240.c index dddbe56c..37a2ac58 100644 --- a/src/FP/code_A240.c +++ b/src/FP/code_A240.c @@ -46,7 +46,7 @@ void func_80390630(Actor *this){ func_8028E668(this->position, 200.0f, -40.0f, 160.0f); if(this->state == 1){ - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 1.0f); if(!func_803114B0()){ diff --git a/src/FP/code_A40.c b/src/FP/code_A40.c index 5ea76857..2d8b81ab 100644 --- a/src/FP/code_A40.c +++ b/src/FP/code_A40.c @@ -99,7 +99,7 @@ void chXmasTree_update(Actor *this){ sfxsource_setSampleRate(this->unk44_31, 28000); } func_802C3BF8(func_80386FB4); - func_802C3C88(func_80386FE0, this->marker); + __spawnqueue_add_1(func_80386FE0, this->marker); if(func_8031FF1C(0x13)){ func_80386F84(this); mapSpecificFlags_set(2, FALSE); diff --git a/src/FP/code_A500.c b/src/FP/code_A500.c index 2825fd7e..5b8dbfaf 100644 --- a/src/FP/code_A500.c +++ b/src/FP/code_A500.c @@ -72,7 +72,7 @@ void func_80390B2C(ActorMarker *marker){ void func_80390B70(Actor *this){ func_80324E38(0.0f, 3); timed_setCameraToNode(0.0f, 0); - timedFunc_set_1(0.6f, (TFQM1)func_80390ABC, this->marker); + timedFunc_set_1(0.6f, (GenMethod_1)func_80390ABC, this->marker); timedFunc_set_1(2.5f, func_80390B2C, this->marker); } diff --git a/src/GV/code_1570.c b/src/GV/code_1570.c index 9e78b2f2..53cbb769 100644 --- a/src/GV/code_1570.c +++ b/src/GV/code_1570.c @@ -50,14 +50,14 @@ void func_80387A00(ActorMarker *this_marker){ void func_80387A2C(ActorMarker *caller, enum asset_e text_id, s32 arg2){ timed_setCameraToNode(0.0f, 0xC); - timedFunc_set_1(0.5f, (TFQM1) func_80387984, reinterpret_cast(s32, caller)); + timedFunc_set_1(0.5f, (GenMethod_1) func_80387984, reinterpret_cast(s32, caller)); timed_playSfx(0.5f, SFX_2C_PULLING_NOISE, 0.9f, 32000); timed_playSfx(1.8f, SFX_2C_PULLING_NOISE, 1.0f, 32000); timed_playSfx(2.5f, SFX_2C_PULLING_NOISE, 1.1f, 32000); timed_setCameraToNode(3.0f, 0xd); timedFunc_set_0(3.5f, __chgobi2_spawnJIggy); func_80324E88(6.0f); - timedFunc_set_1(6.0f, (TFQM1) func_80387A00, reinterpret_cast(s32, caller)); + timedFunc_set_1(6.0f, (GenMethod_1) func_80387A00, reinterpret_cast(s32, caller)); func_80324E38(6.0f, 0); } @@ -79,7 +79,7 @@ void chgobi2_setState(Actor *this, s32 next_state){ timedFunc_set_0(0.05f, func_80387960); timed_playSfx(0.05f, SFX_84_GOBI_CRYING, 1.1f, 32000); func_80324E38(0.051f, 1); - timedFunc_set_1(0.06f, (TFQM1)func_803879D4, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(0.06f, (GenMethod_1)func_803879D4, reinterpret_cast(s32, this->marker)); timed_setCameraToNode(0.86f, 0xb); timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000); diff --git a/src/GV/code_1E80.c b/src/GV/code_1E80.c index e23e2640..03ec4275 100644 --- a/src/GV/code_1E80.c +++ b/src/GV/code_1E80.c @@ -63,10 +63,10 @@ void chgobi3_setState(Actor *this, s32 next_state){ if(next_state == 3){ func_80324E38(0.0f, 3); - timedFunc_set_1(0.02f, (TFQM1)func_80388270, (s32)this); + timedFunc_set_1(0.02f, (GenMethod_1)func_80388270, (s32)this); timed_setCameraToNode(0.1f, 0x12); timed_playSfx(0.2f, SFX_4C_LIP_SMACK, 1.0f, 32000); - timedFunc_set_1(0.2f, (TFQM1)func_80388298, (s32)this); + timedFunc_set_1(0.2f, (GenMethod_1)func_80388298, (s32)this); func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 1.0f); } diff --git a/src/GV/code_3D90.c b/src/GV/code_3D90.c index 0dd7c77d..931deb3a 100644 --- a/src/GV/code_3D90.c +++ b/src/GV/code_3D90.c @@ -70,7 +70,7 @@ void func_8038A31C(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; actor_collisionOff(this); - func_802C3C88((GenMethod_1)func_8038A2C0, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_8038A2C0, reinterpret_cast(s32, this->marker)); this->velocity[0] = 0.0f; } diff --git a/src/GV/code_43B0.c b/src/GV/code_43B0.c index ef94b0f5..347e03a3 100644 --- a/src/GV/code_43B0.c +++ b/src/GV/code_43B0.c @@ -68,7 +68,7 @@ void func_8038A948(Actor *this){ this->initialized = TRUE; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - func_802C3C88((GenMethod_1)func_8038A8CC, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_8038A8CC, (s32)this->marker); this->velocity_y = 0.0f; } } @@ -84,7 +84,7 @@ void func_8038A9C0(Actor *this){ this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - func_802C3C88((GenMethod_1)func_8038A8CC, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_8038A8CC, (s32)this->marker); sp24 = subaddie_getLinkedActor(this); this->unk1C[1] = this->unk48; this->pitch = 0.0f; diff --git a/src/GV/code_4740.c b/src/GV/code_4740.c index 8b4923e3..249b3be6 100644 --- a/src/GV/code_4740.c +++ b/src/GV/code_4740.c @@ -112,7 +112,7 @@ void func_8038AF10(Actor *this){ int func_8038AF78(Actor *this, f32 arg1, f32 arg2){ this->unk28 = arg2; - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, arg1); if(!func_80329030(this, 0) && func_80329480(this)) return 0; @@ -198,7 +198,7 @@ void func_8038B124(Actor *this){ func_8038ABD8(this->position, 8); } else{//L8038B3E0 - this->yaw_moving = func_80257204(this->position_x, this->position_z, this->velocity_x, this->velocity_z); + this->yaw_ideal = func_80257204(this->position_x, this->position_z, this->velocity_x, this->velocity_z); func_80328FB0(this, 18.0f); this->unk28 = 18.0f; func_80329030(this, 0); @@ -213,7 +213,7 @@ void func_8038B124(Actor *this){ func_8038AF10(this); } else{ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 8.0f); } break; @@ -246,7 +246,7 @@ void func_8038B124(Actor *this){ break; case 4: //L8038B5F0 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 8.0f); if(this->unk38_31 >= 20){ func_80328B8C(this, 5, 0.00001f, 1); diff --git a/src/GV/code_7060.c b/src/GV/code_7060.c index bbca0005..410b0fa2 100644 --- a/src/GV/code_7060.c +++ b/src/GV/code_7060.c @@ -65,7 +65,7 @@ void func_8038D47C(Actor *this){ mapSpecificFlags_set(0x10, 0); this->unk16C_4 = TRUE; if(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) && gcparade_8031B4F4() == -3){ - timedFunc_set_1(1.5f, (TFQM1)func_8038D450, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(1.5f, (GenMethod_1)func_8038D450, reinterpret_cast(s32, this->marker)); } }//L8038D5EC diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index eb95d30a..25590b05 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -228,7 +228,7 @@ void func_803876D0(Actor *this){ if(0.0f != this->velocity_x){ this->velocity_x -= 1.0f; if(0.0f == this->velocity_x){ - func_802C3C88((GenMethod_1)func_80387100, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_80387100, (s32)this->marker); } } marker_setCollisionScripts(this->marker, NULL, NULL, func_80387168); @@ -369,6 +369,6 @@ void func_803876D0(Actor *this){ || (this->state == 7 && actor_animationIsAt(this, 0.468f)) ){ func_8034A1B4(this->marker->unk44, 5, &this->local); - func_802C3C88((GenMethod_1)func_803873C8, (s32)this->marker); //spawn orange + __spawnqueue_add_1((GenMethod_1)func_803873C8, (s32)this->marker); //spawn orange } } diff --git a/src/MM/ch/hut.c b/src/MM/ch/hut.c index 3c02a056..818a9ba2 100644 --- a/src/MM/ch/hut.c +++ b/src/MM/ch/hut.c @@ -92,7 +92,7 @@ void chhut_update(Actor *this){ func_8030E484(SFX_5B_HEAVY_STUFF_FALLING); func_80328A84(this, 1); actor_playAnimationOnce(this); - func_802C3C88((GenMethod_1)func_803869EC, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_803869EC, (s32)this->marker); func_802C8F70(this->yaw); if(D_8037DCB0 < 5){ func_802C3F04(func_802C4218, D_803898D8[D_8037DCB0], *(s32*)(&sp3C[0]),*(s32*)(&sp3C[1]),*(s32*)(&sp3C[2])); diff --git a/src/MMM/code_16B0.c b/src/MMM/code_16B0.c index 6f5115f1..a7b73137 100644 --- a/src/MMM/code_16B0.c +++ b/src/MMM/code_16B0.c @@ -177,7 +177,7 @@ void func_80388028(Actor *this){ this->unk16C_4 = TRUE; this->unk16C_0 = TRUE; marker_setCollisionScripts(this->marker, NULL, func_80387CF4, func_80387D1C); - func_802C3C88(func_80387D48, this->marker); + __spawnqueue_add_1(func_80387D48, this->marker); func_80387B14(this, (this->state < 5) ? 1 : 6); }//L803880B4 diff --git a/src/RBB/code_0.c b/src/RBB/code_0.c index cf70bedc..07346459 100644 --- a/src/RBB/code_0.c +++ b/src/RBB/code_0.c @@ -114,7 +114,7 @@ void func_803866F4(Actor *this, s32 arg1){ func_8025A6EC(COMUSIC_2B_DING_B, 28000); func_80324E38(0.0f, 3); timedFunc_set_2(0.5f, (TFQM2) func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); - timedFunc_set_1(1.0f, (TFQM1) func_803865D0, this->marker); + timedFunc_set_1(1.0f, (GenMethod_1) func_803865D0, this->marker); }//L803867D4 if(arg1 == 4){ if(local->unk8 == 1 && D_80390074[local->unk4].unk2 > 0){ diff --git a/src/RBB/code_1570.c b/src/RBB/code_1570.c index 7283eb4a..9cc5e991 100644 --- a/src/RBB/code_1570.c +++ b/src/RBB/code_1570.c @@ -197,7 +197,7 @@ void func_80388154(ActorMarker *marker){ timed_playSfx(0.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 0x7fc6); timedFunc_set_2(1.2f, (TFQM2) func_80387B8C, 0x19f, 0); timed_setCameraToNode(1.2f, 8); - timedFunc_set_1(1.5f, (TFQM1) func_80387F88, (s32) actor->marker); + timedFunc_set_1(1.5f, (GenMethod_1) func_80387F88, (s32) actor->marker); } void func_803881E8(Actor *this, s32 arg1){ @@ -208,7 +208,7 @@ void func_803881E8(Actor *this, s32 arg1){ timedFunc_set_2(0.1f, (TFQM2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); func_80324E38(0.2f, 3); timed_setCameraToNode(1.1f, 7); - timedFunc_set_1(1.6f, (TFQM1)func_80388154, (s32)this->marker); + timedFunc_set_1(1.6f, (GenMethod_1)func_80388154, (s32)this->marker); levelSpecificFlags_set(0x2D, 1); } } diff --git a/src/RBB/code_3CB0.c b/src/RBB/code_3CB0.c index 94ebf95c..bce66c0e 100644 --- a/src/RBB/code_3CB0.c +++ b/src/RBB/code_3CB0.c @@ -49,7 +49,7 @@ void func_8038A0A0(Actor *this, s32 arg1){ if(this->state == 1){ levelSpecificFlags_set(local->unk0->unk8, 1); func_803228D8(); - timedFunc_set_1(1.1f, (TFQM1)func_8028F9DC, 2); + timedFunc_set_1(1.1f, (GenMethod_1)func_8028F9DC, 2); timedFunc_set_3(1.1f, (TFQM3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0); }else{ levelSpecificFlags_set(local->unk0->unkA, 1); diff --git a/src/RBB/code_9670.c b/src/RBB/code_9670.c index ad487d2b..c288de44 100644 --- a/src/RBB/code_9670.c +++ b/src/RBB/code_9670.c @@ -28,7 +28,7 @@ void func_8038FA9C(Actor *this, s32 arg1){ func_80324E38(0.0f, 3); timedFunc_set_2(1.0f, (TFQM2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); timed_setCameraToNode(1.8f, 1); - timedFunc_set_1(2.0f, (TFQM1) func_8038FA60, (s32)this->marker); + timedFunc_set_1(2.0f, (GenMethod_1) func_8038FA60, (s32)this->marker); func_80324E88(5.0f); func_80324E38(5.0f, 0); } diff --git a/src/RBB/code_99F0.c b/src/RBB/code_99F0.c index 42dd9272..692ff98c 100644 --- a/src/RBB/code_99F0.c +++ b/src/RBB/code_99F0.c @@ -23,7 +23,7 @@ void func_8038FDE0(s32 arg0){ levelSpecificFlags_set(0x28, FALSE); item_set(ITEM_9_PROPELLOR,0); if(arg0 == 3 && !jiggyscore_isCollected(0x57)){ - timedFunc_set_1(0.5f, (TFQM1)func_802FAD64, 3); + timedFunc_set_1(0.5f, (GenMethod_1)func_802FAD64, 3); func_80324DBC(1.0f, 0xb9d, 4, NULL, NULL, NULL, NULL); } else{ diff --git a/src/RBB/code_CA0.c b/src/RBB/code_CA0.c index 1ce858d0..f8d00b42 100644 --- a/src/RBB/code_CA0.c +++ b/src/RBB/code_CA0.c @@ -102,13 +102,13 @@ void func_80387488(ActorMarker *marker){ if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){ sp1C[1] = 0; if(ml_vec3f_distance(&sp1C, &D_80390264) < 500.0f){ - timedFunc_set_1(1.0f, (TFQM1) func_80387488, (s32)actor->marker); + timedFunc_set_1(1.0f, (GenMethod_1) func_80387488, (s32)actor->marker); return; } } func_80324E38(0.0f, 3); timed_setCameraToNode(0.0f, 6); - timedFunc_set_1(0.5f, (TFQM1) func_80387308, (s32) actor->marker); + timedFunc_set_1(0.5f, (GenMethod_1) func_80387308, (s32) actor->marker); } void func_8038756C(Actor *this, s32 arg1){ diff --git a/src/SM/ch/vegetables.c b/src/SM/ch/vegetables.c index aa16c382..571732c5 100644 --- a/src/SM/ch/vegetables.c +++ b/src/SM/ch/vegetables.c @@ -378,7 +378,7 @@ void func_80388080(Actor *this){ this->unk38_0 = 1; }//L803885A0 if(func_803292E0(this)){ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); } else{//L803885CC if(randf() < 0.02){ @@ -387,7 +387,7 @@ void func_80388080(Actor *this){ }//L80388B68 } else{//L80388618 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); } } else if(local->unkC == 2){//L80388634 @@ -397,7 +397,7 @@ void func_80388080(Actor *this){ this->unk38_0 = 1; }//L80388698 if(mapSpecificFlags_get(0xC) || (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(this))){ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); }else{//L803886E4 if(randf() < 0.02){//D_8038B1D0){ func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A); @@ -454,7 +454,7 @@ void func_80388080(Actor *this){ this->unk1C_z = local->unk0_z + this->unk1C_z; }//L80388AD8 if(func_803292E0(this)){ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); }else{//L80388B04 if(randf() < 0.01){ func_80328CEC(this, (s32)this->yaw, 0x1e, 0x5A); @@ -462,7 +462,7 @@ void func_80388080(Actor *this){ } }else{ //L80388B50 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); } } diff --git a/src/SM/code_2990.c b/src/SM/code_2990.c index c6f687df..5f61e7dc 100644 --- a/src/SM/code_2990.c +++ b/src/SM/code_2990.c @@ -407,7 +407,7 @@ void func_803899B0(Actor * this){ }//L80389B20 if(!this->unk16C_4){ - func_802C3C88((GenMethod_1)func_80389948, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_80389948, reinterpret_cast(s32, this->marker)); this->unk16C_4 = 1; }//L80389B4C @@ -420,7 +420,7 @@ void func_803899B0(Actor * this){ switch (this->state) { case 1://L80389BAC - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 4.0f); if( (this->unkF4_8 == 1 && !mapSpecificFlags_get(1)) || (this->unkF4_8 == 8 && !mapSpecificFlags_get(2)) @@ -467,7 +467,7 @@ void func_803899B0(Actor * this){ } break; case 2://L80389E2C - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if( (f64) 0.0 < animctrl_getAnimTimer(this->animctrl) && animctrl_getAnimTimer(this->animctrl) < 0.16 @@ -494,7 +494,7 @@ void func_803899B0(Actor * this){ } break; case 3://L80389FAC - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if( ( actor_animationIsAt(this, 0.37f) || actor_animationIsAt(this, 0.66f) diff --git a/src/SM/code_44D0.c b/src/SM/code_44D0.c index 87de1336..4356ef8e 100644 --- a/src/SM/code_44D0.c +++ b/src/SM/code_44D0.c @@ -48,8 +48,8 @@ void func_8038A8F8(Actor *this){ if( !mapSpecificFlags_get(2) || (mapSpecificFlags_get(3) && !mapSpecificFlags_get(0xf)) ){ //L8038AA54 - this->yaw_moving = ml_vec3f_distance(this->velocity, this->unk1C) / 150.0; - func_8028F3D8(this->unk1C, this->yaw_moving, func_8038A8C0, this->marker); + this->yaw_ideal = ml_vec3f_distance(this->velocity, this->unk1C) / 150.0; + func_8028F3D8(this->unk1C, this->yaw_ideal, func_8038A8C0, this->marker); mapSpecificFlags_set(0x10, 1); } } diff --git a/src/TTC/code_0.c b/src/TTC/code_0.c index 521e9fba..8f123ce4 100644 --- a/src/TTC/code_0.c +++ b/src/TTC/code_0.c @@ -84,7 +84,7 @@ bool func_803864B0(Actor *this, f32 arg1) { } this->unk28 = phi_f2 / arg1; - this->yaw_moving = func_80257204(this->position[0], this->position[2], sp3C[0], sp3C[2]); + this->yaw_ideal = func_80257204(this->position[0], this->position[2], sp3C[0], sp3C[2]); if ((func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11) < this->unk28) { this->unk28 = (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) != 0) ? 0.0f : 17.0f; } else if (sp38 == 0) { @@ -109,13 +109,13 @@ bool func_80386760(Actor *this, s32 arg1) { if (this->unk1C[0] != 0.0f) { arg1 *= 2; this->unk28 = (f32) randi2(0, 0.5*(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11)); - this->yaw_moving += (f32) randi2(-arg1, arg1); + this->yaw_ideal += (f32) randi2(-arg1, arg1); } else if ((f64) randf() < 0.4) { this->unk28 = 0.0f; - this->yaw_moving += (f32) randi2(-arg1, arg1); + this->yaw_ideal += (f32) randi2(-arg1, arg1); } else { this->unk28 = (f32) randi2(0.33 * (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11), func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11); - this->yaw_moving = this->yaw; + this->yaw_ideal = this->yaw; } this->unk1C[0] = 0.0f; } @@ -126,12 +126,12 @@ bool func_80386760(Actor *this, s32 arg1) { } temp_f0_2 = this->unk28 * sp2C; this->velocity[1] = ((f32)(0.3*temp_f0_2) / sp2C) - (f32) ((s32) (sp2C * -5) / 2); - if (func_80329078(this, this->yaw_moving, temp_f0_2)) { + if (func_80329078(this, this->yaw_ideal, temp_f0_2)) { return TRUE; } this->unk1C[0] = 1.0f; this->unk28 = 0.0f; - this->yaw_moving = this->yaw; + this->yaw_ideal = this->yaw; return FALSE; } diff --git a/src/TTC/code_10A0.c b/src/TTC/code_10A0.c index 1e151e90..1021e222 100644 --- a/src/TTC/code_10A0.c +++ b/src/TTC/code_10A0.c @@ -92,11 +92,11 @@ void func_80387678(Actor *this){ if( !mapSpecificFlags_get(1) ) return; if( mapSpecificFlags_get(3) ) return; - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); mapSpecificFlags_set(3, TRUE); func_8028F918(2); timed_setCameraToNode(0.0f, 4); - timedFunc_set_1(1.0f, (TFQM1)func_803875D4, (s32)this->marker); + timedFunc_set_1(1.0f, (GenMethod_1)func_803875D4, (s32)this->marker); func_80328B8C(this, 1, 0.0f, 1); } @@ -104,7 +104,7 @@ void func_8038771C(Actor *this){ if( !func_80329030(this, 0) && func_80329480(this) ){ - func_80328CEC(this, (s32)this->yaw_moving, 120, 180); + func_80328CEC(this, (s32)this->yaw_ideal, 120, 180); } } diff --git a/src/TTC/code_26D0.c b/src/TTC/code_26D0.c index c98359f5..0c93ffb9 100644 --- a/src/TTC/code_26D0.c +++ b/src/TTC/code_26D0.c @@ -135,7 +135,7 @@ void func_80388D04(s32 arg0){ void func_80388D34(Actor *this){ func_80388C78(this); if(!this->unk16C_4){ - func_802C3C88((GenMethod_1)func_80388D04, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_80388D04, (s32)this->marker); this->unk16C_4 = TRUE; } } diff --git a/src/TTC/code_2B80.c b/src/TTC/code_2B80.c index 09ba576e..a4967d5b 100644 --- a/src/TTC/code_2B80.c +++ b/src/TTC/code_2B80.c @@ -41,7 +41,7 @@ void func_80388FBC(Actor *this) { this->marker->propPtr->unk8_3 = FALSE; if (levelSpecificFlags_get(5) != 0) { levelSpecificFlags_set(5, 0); - timedFunc_set_1(0.5f, (TFQM1)func_8025A70C, COMUSIC_2D_PUZZLE_SOLVED_FANFARE); + timedFunc_set_1(0.5f, (GenMethod_1)func_8025A70C, COMUSIC_2D_PUZZLE_SOLVED_FANFARE); } if (levelSpecificFlags_get(2) != 0) { temp_v0_2 = func_8034C5AC(300); diff --git a/src/TTC/code_35D0.c b/src/TTC/code_35D0.c index b1d8e754..6dcaf261 100644 --- a/src/TTC/code_35D0.c +++ b/src/TTC/code_35D0.c @@ -169,7 +169,7 @@ void func_80389CC4(s16 arg0[3], s32 arg1){ D_8038D708[2] += 300.0f; gcpausemenu_80314AC8(0); timedFunc_set_2(0.1f, (TFQM2) func_8028F45C, 9, (s32)&D_8038D708); - timedFunc_set_1(0.1f, (TFQM1) gcpausemenu_80314AC8, 1); + timedFunc_set_1(0.1f, (GenMethod_1) gcpausemenu_80314AC8, 1); func_80311480(ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL); D_8037DCB4++; }//L80389E70 diff --git a/src/core1/code_1BE90.c b/src/core1/code_1BE90.c index f187acba..724fb5ef 100644 --- a/src/core1/code_1BE90.c +++ b/src/core1/code_1BE90.c @@ -423,8 +423,8 @@ void func_8025A70C(enum comusic_e track_id){ } void func_8025A788(enum comusic_e comusic_id, f32 delay1, f32 delay2){ - timedFunc_set_1(delay1, (TFQM1) func_8025A70C, comusic_id); - timedFunc_set_1(delay1 + delay2, (TFQM1) func_8025A7DC, comusic_id); + timedFunc_set_1(delay1, (GenMethod_1) func_8025A70C, comusic_id); + timedFunc_set_1(delay1 + delay2, (GenMethod_1) func_8025A7DC, comusic_id); } void func_8025A7DC(enum comusic_e track_id){ diff --git a/src/core1/code_22E40.c b/src/core1/code_22E40.c index 4bb21c69..88a722aa 100644 --- a/src/core1/code_22E40.c +++ b/src/core1/code_22E40.c @@ -1,6 +1,8 @@ #include -#include "functions.h" -#include "variables.h" +#include "n_libaudio.h" +#include "n_synth.h" +// #include "functions.h" +// #include "variables.h" #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80260860.s") @@ -10,6 +12,9 @@ #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/n_alEnvmixerPull.s") +#ifdef NONMATCHING +#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__postNextSeqEvent.s") +#else void __postNextSeqEvent(ALSeqPlayer *seqp) { ALEvent evt; @@ -42,8 +47,8 @@ void __postNextSeqEvent(ALSeqPlayer *seqp) evt.type = AL_SEQ_REF_EVT; //alEvtqPostEvent(&seqp->evtq, &evt, deltaTicks * seqp->uspt); alEvtqPostEvent(&seqp->evtq, &evt, deltaTicks * seqp->uspt); - } +#endif #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__setInstChanState.s") diff --git a/src/core1/code_25E20.c b/src/core1/code_25E20.c index 0d12a1f9..d5466a5c 100644 --- a/src/core1/code_25E20.c +++ b/src/core1/code_25E20.c @@ -2,6 +2,24 @@ #include "functions.h" #include "variables.h" +typedef struct struct_core2_25E20_0{ + s32 unk0; + s32 unk4; + s32 unk8; + s16 unkC; + u8 padE[2]; + u8 pad10[0xA]; + s16 unk1A; +}; + +typedef struct struct_core2_25E20_1{ + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + u8 pad10[0xA]; + s16 unk1A; +}; void func_80263840(void){} @@ -9,7 +27,72 @@ void func_80263848(void){} #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_25E20/func_80263850.s") -#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_25E20/func_802639FC.s") +void func_802639FC(struct struct_core2_25E20_1 *arg0, struct struct_core2_25E20_0 *arg1, u32 arg2) { + u32 var_v0; + s32 var_s4; + u32 var_s6; + s16 var_s5; + s16 sp50; + s32 sp4C; + s32 sp48; + u32 sp44; + s32 sp40; + s16 sp3E; + + if(arg2 == 0){ + arg1->unk0 = (s32) arg0->unk4; + arg1->unkC = 0; + arg1->unk4 = 0U; + arg1->unk8 = 0U; + return; + } + + sp4C = arg0->unk8; + sp3E = arg0->unk1A; + sp44 = arg0->unkC; + arg0->unk1A = 0; + arg0->unkC = 0; + arg0->unk8 = arg0->unk4; + + // var_v0 = 0; + do{ + var_s4 = arg0->unk8; + var_s5 = arg0->unk1A; + var_s6 = arg0->unkC; + func_80263850(arg0, &sp50); + if(sp50 == 4){ + var_s4 = arg0->unk8; + var_s5 = arg0->unk1A; + var_s6 = arg0->unkC; + break; + } + // var_v0 = arg0->unkC; + }while(arg0->unkC < arg2); + + arg1->unk0 = var_s4; + arg1->unkC = var_s5; + arg1->unk4 = var_s6; + arg1->unk8 = arg0->unkC; + + arg0->unk8 = sp4C; + arg0->unk1A = sp3E; + arg0->unkC = sp44; + +// var_v0 = 0; +// loop_3: + + +// if (sp50 == 4) { + +// } else { +// var_v0 = arg0->unkC; +// if (var_v0 < arg2) { +// goto loop_3; +// } +// } + +} + void func_80263B1C(void){} diff --git a/src/core1/done/audio/code_21A80.c b/src/core1/done/audio/code_21A80.c index 9bb69a19..2c8cb0ee 100644 --- a/src/core1/done/audio/code_21A80.c +++ b/src/core1/done/audio/code_21A80.c @@ -5,5 +5,5 @@ u8 func_8025F4A0(N_ALCSPlayer *seqp, u8 chan) { - return seqp->chanState[chan].unk9; + return seqp->chanState[chan].unkA; } diff --git a/src/core1/done/audio/n_csplayer.c b/src/core1/done/audio/n_csplayer.c index 06940386..26495a88 100644 --- a/src/core1/done/audio/n_csplayer.c +++ b/src/core1/done/audio/n_csplayer.c @@ -636,7 +636,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event) } break; case (0x7D): - seqp->chanState[chan].unk9 = byte2; + seqp->chanState[chan].unkA = byte2; for (vs = seqp->vAllocHead; vs != 0; vs = vs->next) { if ((vs->channel == chan) && (vs->envPhase != AL_PHASE_RELEASE)) diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 61347514..5cd6761a 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -66,7 +66,7 @@ void func_802C5F44(Actor *this){ void func_802C5F94(Actor *this){ func_80328A84(this, 2); func_802C5E80(this); - func_80328CEC(this, (s32)this->yaw_moving, 135, 175); + func_80328CEC(this, (s32)this->yaw_ideal, 135, 175); this->unk38_31 = 150; } @@ -162,13 +162,13 @@ void func_802C6240(Actor *this){ func_80328CEC(this, (s32)this->yaw, 90, 150); }//L802C64EC if(!(func_8023DB5C() & 0xf)) - func_80328CEC(this, (s32)this->yaw_moving, 10, 20); + func_80328CEC(this, (s32)this->yaw_ideal, 10, 20); if(!(func_8023DB5C() & 0x7)) func_80328BD4(this, 1, 0.16f, 1, 0.02f); if( !(func_8023DB5C() & 0xf) - && func_80329078(this, (s32)this->yaw_moving, 150) + && func_80329078(this, (s32)this->yaw_ideal, 150) && func_80328B38(this, 3, 0.13f) ){ this->unk28 = randf2(7.1f, 8.4f); @@ -178,7 +178,7 @@ void func_802C6240(Actor *this){ case 0x8: //L802C65D0 func_802C5F44(this); - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if(func_80329480(this)) func_80328A84(this, 6); @@ -198,7 +198,7 @@ void func_802C6240(Actor *this){ case 0x6: //L802C66D0 animctrl_setDuration(this->animctrl, D_80366010[6].duration - (3 - this->unk10_12)*0.1085); - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); if(!func_803294B4(this, 0x21)){ func_80328A84(this, 8); } @@ -224,13 +224,13 @@ void func_802C6240(Actor *this){ if(30.0f < this->unk28) this->unk28 = 30.0f; - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 9.0f); if(!func_80329030(this, 0)) func_802C5F94(this); if(func_80329530(this, 320)){ - if(func_80329078(this, (s32)this->yaw_moving,200)){ + if(func_80329078(this, (s32)this->yaw_ideal,200)){ animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); func_80328A84(this, 4); this->unk28 += 5.7; @@ -252,7 +252,7 @@ void func_802C6240(Actor *this){ case 0x4: //L802C6A14 if(animctrl_getAnimTimer(this->animctrl) < 0.99){ - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 1.0f); } func_80329030(this, 0); diff --git a/src/core2/ch/code_5AB30.c b/src/core2/ch/code_5AB30.c index 200f9bf2..0b7e8b34 100644 --- a/src/core2/ch/code_5AB30.c +++ b/src/core2/ch/code_5AB30.c @@ -141,13 +141,13 @@ void func_802E1DE8(Actor *this){ } void func_802E1E20(Actor *this, f32 arg1){ - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 6.0f); } int func_802E1E5C(Actor *this, s32 arg1){ f32 f0; - f0 = this->yaw - this->yaw_moving; + f0 = this->yaw - this->yaw_ideal; if((f0 < arg1) && (-arg1 < f0)){ return 1; } @@ -183,7 +183,7 @@ void func_802E1FD0(ActorMarker *marker, ActorMarker *other_marker){ FUNC_8030E8B4(SFX_3EA_UNKNOWN, 1.0f, 30000, actor->position, 1500, 4500); FUNC_8030E8B4(SFX_2F_ORANGE_SPLAT, 1.0f, 30000, actor->position, 1500, 4500); - func_802C3C88((GenMethod_1)func_802E1BD0, (s32)actor->marker); + __spawnqueue_add_1((GenMethod_1)func_802E1BD0, (s32)actor->marker); if(map_get() == MAP_27_FP_FREEZEEZY_PEAK) func_8038A978(); func_802E1CB8(actor->position, 0xC); @@ -309,7 +309,7 @@ void func_802E20E8(Actor *this){ && local->unkB ){ func_8030E878(SFX_8F_SNOWBALL_FLYING, randf2(0.95f, 1.05f), 30000, this->position, 800.0f, 3050.0f); - func_802C3C88((GenMethod_1)func_802E1B24, (s32)this->marker); + __spawnqueue_add_1((GenMethod_1)func_802E1B24, (s32)this->marker); local->unk9 = FALSE; } diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index 8d90d65c..117c114e 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -298,7 +298,7 @@ void func_802C4C14(Actor *this){ return; if(!this->initialized){ - func_802C3C88(func_802C4BB4, this->marker); + __spawnqueue_add_1(func_802C4BB4, this->marker); func_802C7318(this); this->unk130 = func_802C71F0; if(sp84 == 0){ diff --git a/src/core2/ch/ghost.c b/src/core2/ch/ghost.c index efc8868f..1fc1dd63 100644 --- a/src/core2/ch/ghost.c +++ b/src/core2/ch/ghost.c @@ -183,7 +183,7 @@ void func_8035B824(Actor *this){ func_80328B8C(this, 4, 0.01f, 1); actor_loopAnimation(this); - func_80328CEC(this, (s32)this->yaw_moving, 0xA, 0x1E); + func_80328CEC(this, (s32)this->yaw_ideal, 0xA, 0x1E); this->unk28 = 4.0f; local->unk4 = randf2(2.0f, 4.5f); @@ -193,7 +193,7 @@ void func_8035B824(Actor *this){ void func_8035B8A8(Actor *this){ func_80328B8C(this, 5, 0.01f, 1); actor_loopAnimation(this); - func_80328CEC(this, (s32)this->yaw_moving, 0xE1, 0x87); + func_80328CEC(this, (s32)this->yaw_ideal, 0xE1, 0x87); } void func_8035B900(Actor *this){ @@ -232,7 +232,7 @@ void func_8035B900(Actor *this){ } break; case 2: //L8035BA98 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_8035B444(this, 4.0f); if(actor_animationIsAt(this, 0.99f)){ func_8035B75C(this); @@ -243,7 +243,7 @@ void func_8035B900(Actor *this){ if((sp30 & 0x3F) == 7 && randf() < 0.7){ func_8030E878(0x3F4, randf2(1.0f, 1.2f), 32000, this->position, this->scale*400.0f, this->scale*1800.0f); }//L8035BB6C - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); if(!func_8035B3E4(this) || !func_8035B444(this, 5.0f)){ func_8035B674(this); } diff --git a/src/core2/ch/icecube.c b/src/core2/ch/icecube.c index 3dfa020b..fc4de1bf 100644 --- a/src/core2/ch/icecube.c +++ b/src/core2/ch/icecube.c @@ -224,7 +224,7 @@ void __chicecube_die(ActorMarker *marker, ActorMarker *other_marker){ func_8035A04C(actor->position, 12, ASSET_505_MODEL_ICECUBE_CHUNK, actor->scale); func_8035A228(actor->position, 6, ASSET_700_SPRITE_DUST, actor->scale); if(actor->unkF4_8 != 1){ - func_802C3C88(__chicecube_spawnHalfCubes, actor->marker); + __spawnqueue_add_1(__chicecube_spawnHalfCubes, actor->marker); } marker_despawn(actor->marker); } diff --git a/src/core2/ch/jiggy.c b/src/core2/ch/jiggy.c index 7b1c9403..b581ecb0 100644 --- a/src/core2/ch/jiggy.c +++ b/src/core2/ch/jiggy.c @@ -83,7 +83,7 @@ void func_802C7B8C(Actor *this, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5 timedFunc_set_4(0.6f, (TFQM4)func_802C7AF8, (s32)this->position[0], (s32)this->position[1], (s32)this->position[2], arg4); timedFunc_set_2(0.6f, (TFQM2)func_802C7AB0, (s32)this->marker, arg5); timedFunc_set_0(1.0f, (TFQM0)func_802BE720); - timedFunc_set_1(3.9f, (TFQM1)func_802C7B6C, arg4); + timedFunc_set_1(3.9f, (GenMethod_1)func_802C7B6C, arg4); mapSpecificFlags_set(arg1, 1); } } @@ -95,7 +95,7 @@ void func_802C7CA4(Actor *this){ if(360.0f <= this->yaw){ this->yaw -= 360.0f; } - this->yaw_moving = this->yaw; + this->yaw_ideal = this->yaw; } //chjiggy_draw diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index da2b89d1..fbd27653 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -324,7 +324,7 @@ void func_802D9D60(Actor *this){ this->unk38_0 = TRUE; nodeprop_getPosition(other, this->unk1C); } - func_802C3C88(func_802D9C54, this->marker); + __spawnqueue_add_1(func_802D9C54, this->marker); this->marker->propPtr->unk8_3 = FALSE; this->marker->collidable = FALSE; this->initialized = TRUE; @@ -345,7 +345,7 @@ void func_802D9D60(Actor *this){ func_8024E55C(0, sp50);//get face buttons press counters switch(this->state){ case 1://L802D9F70 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if(func_8028F20C() && func_8028F0D4() && !func_8028EC04()){ if( this->unkF4_8 == 0x12 @@ -370,7 +370,7 @@ void func_802D9D60(Actor *this){ break; case 2://L802DA0A0 this->marker->propPtr->unk8_3 = TRUE; - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if( 0.0 < animctrl_getAnimTimer(this->animctrl) && animctrl_getAnimTimer(this->animctrl) < 0.16 @@ -396,7 +396,7 @@ void func_802D9D60(Actor *this){ } break; case 3://L802DA210 - this->yaw_moving = func_80329784(this); + this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); if( ( actor_animationIsAt(this, 0.37f) || actor_animationIsAt(this, 0.66f) diff --git a/src/core2/code_3BB80.c b/src/core2/code_3BB80.c index a86d1790..3a7ff47e 100644 --- a/src/core2/code_3BB80.c +++ b/src/core2/code_3BB80.c @@ -475,7 +475,7 @@ void func_802C3BF8(void (* arg0)(void)){ } } -void func_802C3C88(GenMethod_1 arg0, s32 arg1){ +void __spawnqueue_add_1(GenMethod_1 arg0, s32 arg1){ u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != D_80365DC4){ D_80365DC8[D_80365DC4].func0 = (void (*)(void))arg0; diff --git a/src/core2/code_43A40.c b/src/core2/code_43A40.c index 3e7c705c..202f80dd 100644 --- a/src/core2/code_43A40.c +++ b/src/core2/code_43A40.c @@ -75,7 +75,7 @@ void func_802CAA44(Actor *this){ if(map_get() == MAP_12_GV_GOBIS_VALLEY){ this->unk6C = 352.0f; this->pitch = 352.0f; - this->yaw_moving = 90.0f; + this->yaw_ideal = 90.0f; this->yaw = 90.0f; } } diff --git a/src/core2/code_440B0.c b/src/core2/code_440B0.c index c058e4e6..70d2cab1 100644 --- a/src/core2/code_440B0.c +++ b/src/core2/code_440B0.c @@ -61,7 +61,7 @@ void func_802CB078(Actor *this) { void func_802CB140(Actor *this) { func_80328A84(this, 2U); func_802CB040(this); - func_80328CEC(this, (s32) this->yaw_moving, 135, 175); + func_80328CEC(this, (s32) this->yaw_ideal, 135, 175); this->unk38_31 = 150; } @@ -254,7 +254,7 @@ void func_802CBAAC(Actor *this) { marker_despawn(this->marker); return; } - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, 4.0f); return; } @@ -319,7 +319,7 @@ void func_802CBAAC(Actor *this) { break; case 3: //L802CBF44 - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, 4.0f); if (func_80329480(this)) { func_80328A84(this, 4); @@ -328,7 +328,7 @@ void func_802CBAAC(Actor *this) { break; case 8: //L802CBF9C - this->yaw_moving = func_80329784(this) + 90.0; + this->yaw_ideal = func_80329784(this) + 90.0; func_80328FB0(this, 4.0f); if (func_80329480(this)) { func_80328A84(this, 9); @@ -340,7 +340,7 @@ void func_802CBAAC(Actor *this) { case 4: //L802CC024 if ((func_8023DB5C() & 0xF) == 9) { - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); } func_80328FB0(this, 7.0f); if (func_8032CA80(this, (this->modelCacheIndex == 0xF2)? 0xD : 0)) { diff --git a/src/core2/code_47C0.c b/src/core2/code_47C0.c index 14ebb601..0ba18ae4 100644 --- a/src/core2/code_47C0.c +++ b/src/core2/code_47C0.c @@ -166,7 +166,7 @@ void func_8028B9A8(s32 arg0){ } void func_8028BA00(s32 arg0){ - func_802C3C88(func_8028B9A8, arg0); + __spawnqueue_add_1(func_8028B9A8, arg0); if(arg0); } diff --git a/src/core2/code_49A70.c b/src/core2/code_49A70.c index 2c268df8..57681655 100644 --- a/src/core2/code_49A70.c +++ b/src/core2/code_49A70.c @@ -53,7 +53,7 @@ void func_802D0A38(Actor *this){ void func_802D0AB8(Actor *this) { func_80328B8C(this, 1, 0.0f, 0); func_802D0A00(this); - func_80328CEC(this, (s32) this->yaw_moving, 0x87, 0xAF); + func_80328CEC(this, (s32) this->yaw_ideal, 0x87, 0xAF); this->unk38_31 = 0x1E; } @@ -121,7 +121,7 @@ void func_802D0F30(ActorMarker *marker, ActorMarker *other_marker) { this = marker_getActor(marker); FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32736, this->position, 1250, 2500); - func_802C3C88((GenMethod_1)func_802D0B24, reinterpret_cast(s32, this)); + __spawnqueue_add_1((GenMethod_1)func_802D0B24, reinterpret_cast(s32, this)); func_802D0B54(this); func_802D0CB4(this); func_802D0DDC(this, ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE, 2); @@ -172,7 +172,7 @@ void chshrapnel_update(Actor *this) { break; case 2: - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, 4.0f); if (func_80329480(this)) { if (250.0 > ABS(player_position[1] - this->unk1C[1])) { @@ -185,7 +185,7 @@ void chshrapnel_update(Actor *this) { break; case 3: - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, this->unk28 / 2); this->unk28 = MIN( 50.0, (this->unk28 + tick)); if ((250.0 <= ABS(player_position[1] - this->unk1C[1])) || !func_80329054(this, 0)) { diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index 88275495..0bfd8491 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -1141,7 +1141,7 @@ void func_802D6264(f32 arg0, enum map_e arg1, s32 arg2, s32 arg3, s32 arg4, enum D_803676A0 = 0; if(arg1 != D_80367694){ - timedFunc_set_1(arg0, (TFQM1) func_802D61FC, arg1); + timedFunc_set_1(arg0, (GenMethod_1) func_802D61FC, arg1); } else{ timedFunc_set_0(arg0, func_802D63D4); diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index 3c5b3074..1d5491f4 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -144,7 +144,7 @@ void func_802D7C24(ActorMarker *marker, ActorMarker *other_marker) { break; } if (var_a3 != 0) { - timedFunc_set_1(0.5f, (TFQM1)func_802D7BE8, var_a3); + timedFunc_set_1(0.5f, (GenMethod_1)func_802D7BE8, var_a3); } func_8028F030(this->modelCacheIndex); marker_despawn(marker); diff --git a/src/core2/code_51950.c b/src/core2/code_51950.c index ec08e281..45ef4a89 100644 --- a/src/core2/code_51950.c +++ b/src/core2/code_51950.c @@ -89,5 +89,5 @@ void func_802D8B20(enum actor_e actor_id){ } void func_802D8BE4(bool gold_feather){ - func_802C3C88(func_802D8B20, (!gold_feather) ? 0x1FF : 0x200); + __spawnqueue_add_1(func_802D8B20, (!gold_feather) ? 0x1FF : 0x200); } \ No newline at end of file diff --git a/src/core2/code_51C90.c b/src/core2/code_51C90.c index 55f2f392..840f91f3 100644 --- a/src/core2/code_51C90.c +++ b/src/core2/code_51C90.c @@ -79,7 +79,7 @@ void func_802D8C98(Actor *this, s32 arg1) { //collectItem bool func_802D8D48(Actor* actor, u32 arg1, enum asset_e dialogId, enum comusic_e sfxId, enum item_e itemId, f32 arg5){ func_8025A6EC(sfxId,32000); - timedFunc_set_1(0.75f, (TFQM1)func_8035644C, arg1); + timedFunc_set_1(0.75f, (GenMethod_1)func_8035644C, arg1); if(!func_802FADD4(0x1b)){ item_inc(itemId); } else { diff --git a/src/core2/code_53C10.c b/src/core2/code_53C10.c index 82cd69ac..91fd1393 100644 --- a/src/core2/code_53C10.c +++ b/src/core2/code_53C10.c @@ -87,7 +87,7 @@ void func_802DAE40(Actor *this) { func_80328A84(this, 2); func_802DAE10(this); - func_80328CEC(this, (s32) this->yaw_moving, (s32) (this->yaw + 160.0f) % 360, (s32) (this->yaw + 200.0f) % 360); + func_80328CEC(this, (s32) this->yaw_ideal, (s32) (this->yaw + 160.0f) % 360, (s32) (this->yaw + 200.0f) % 360); this->unk38_31 = 0x5A; } @@ -127,7 +127,7 @@ bool func_802DAFBC(Actor *this) { if (temp_v0 & 4) { func_8032C9E0(sp38); sp34 = func_80257248(sp38, this->position); - if (((func_8023DB5C() - local->unk38) == 0x1E) && ((sp34 - this->yaw_moving < 15.0f) && (sp34 - this->yaw_moving > -15.0f))) { + if (((func_8023DB5C() - local->unk38) == 0x1E) && ((sp34 - this->yaw_ideal < 15.0f) && (sp34 - this->yaw_ideal > -15.0f))) { func_802DAF2C(this->position, this->yaw, this->unk28); } else { func_80328CEC(this, (s32) sp34, 0, 0xF); @@ -139,13 +139,13 @@ bool func_802DAFBC(Actor *this) { func_802DAE10(this); this->unk38_31 = 0x5A; func_80328B8C(this, 2, sp44, 1); - func_80328CEC(this, (s32) this->yaw_moving, 0xB3, 0xB4); + func_80328CEC(this, (s32) this->yaw_ideal, 0xB3, 0xB4); this->unk38_0 = TRUE; } else { func_802DAE10(this); this->unk38_31 = 0x5A; func_80328B8C(this, 8, sp44, 1); - func_80328CEC(this, (s32) this->yaw_moving, 120, 180); + func_80328CEC(this, (s32) this->yaw_ideal, 120, 180); } return TRUE; } @@ -271,7 +271,7 @@ void func_802DB5A0(Actor *this) { phi_f14 -= 1.0; } func_80328B8C(this, 2, phi_f14, 1); - this->yaw_moving = this->yaw; + this->yaw_ideal = this->yaw; func_802DAE10(this); } break; @@ -281,13 +281,13 @@ void func_802DB5A0(Actor *this) { func_802DB3B0(this); if (this->unk38_31 == 0) { if (!(func_8023DB5C() & 0xF)) { - func_80328CEC(this, this->yaw_moving, 0xA, 0x14); + func_80328CEC(this, this->yaw_ideal, 0xA, 0x14); } if (!(func_8023DB5C() & 7)) { func_80328B38(this, 1, 0.02f); } if( !(func_8023DB5C() & 0xF) - && func_80329078(this, (s32) this->yaw_moving, 0x96) + && func_80329078(this, (s32) this->yaw_ideal, 0x96) ) { if (func_80328B38(this, 3, 0.13f) != 0) { this->unk28 = randf2((f32)local->unk8, (f32)local->unk9); @@ -300,7 +300,7 @@ void func_802DB5A0(Actor *this) { case 6://L802DB8C0 func_802DB264(this); - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, 4.0f); if (func_80329480(this)) { this->unk10_12 = local->unkC_31; @@ -323,7 +323,7 @@ void func_802DB5A0(Actor *this) { if (this->unk10_12 < local->unkC_31) { animctrl_setDuration(this->animctrl, this->unk18[4].duration - ((local->unkC_31 - this->unk10_12) * 0.1)); } - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); if (!func_803294B4(this, 0x21)) { func_80328A84(this, 6); } @@ -348,7 +348,7 @@ void func_802DB5A0(Actor *this) { case 7://L802DBB4C if (this->unk38_31 == 0) { if ((func_8023DB5C() & 0xF) == 9) { - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); } } func_80328FB0(this, (f32)local->unkB); diff --git a/src/core2/code_59D40.c b/src/core2/code_59D40.c index fc1daff3..a7e496ee 100644 --- a/src/core2/code_59D40.c +++ b/src/core2/code_59D40.c @@ -209,7 +209,7 @@ void func_802E1168(Actor *this) { case 3: //802E13AC func_803297FC(this, &sp44, &sp40); - this->yaw_moving = sp40; + this->yaw_ideal = sp40; this->unk6C = func_802E10F0(sp44); func_80328FB0(this, 4.0f); func_80328FF0(this, 3.0f); @@ -221,7 +221,7 @@ void func_802E1168(Actor *this) { case 4: //802E1424 func_803297FC(this, &sp44, &sp40); - this->yaw_moving = sp40; + this->yaw_ideal = sp40; this->unk6C = func_802E10F0(sp44); func_80328FB0(this, this->unk28 / 2); func_80328FF0(this, this->unk28 / 2); @@ -235,7 +235,7 @@ void func_802E1168(Actor *this) { } if (actor_animationIsAt(this, 0.99f)) { func_802E0CD0(this); - func_80328CEC(this, (s32) this->yaw_moving, 0x87, 0xAF); + func_80328CEC(this, (s32) this->yaw_ideal, 0x87, 0xAF); this->unk38_31 = 0x78; func_80328B8C(this, 2, 0.0f, 1); actor_loopAnimation(this); diff --git a/src/core2/code_5B6A0.c b/src/core2/code_5B6A0.c index 0740ad52..96ccdf78 100644 --- a/src/core2/code_5B6A0.c +++ b/src/core2/code_5B6A0.c @@ -114,6 +114,7 @@ void func_802E28D0(Actor *this) { marker_setCollisionScripts(this->marker, NULL, NULL, func_802E28A4); if(local->unk0 == 0){ player_getPosition(this->unk1C); + local->unk0 = 1; return; } this->initialized = TRUE; @@ -170,12 +171,12 @@ void func_802E28D0(Actor *this) { break; case 2: this->marker->unk40_22 = NOT(func_8028F170()); - this->velocity[0] += 0.7; - this->velocity[1] += 0.7; - this->velocity[2] += 0.7; - this->position[0] += this->velocity[0]; - this->position[1] += this->velocity[1]; - this->position[2] += this->velocity[2]; + this->velocity[0] *= 0.7;\ + this->velocity[1] *= 0.7;\ + this->velocity[2] *= 0.7; + this->position[0] = this->position[0] + this->velocity[0]; + this->position[1] = this->position[1] + this->velocity[1]; + this->position[2] = this->position[2] + this->velocity[2]; break; } } diff --git a/src/core2/code_6B30.c b/src/core2/code_6B30.c index 82292769..2f70410d 100644 --- a/src/core2/code_6B30.c +++ b/src/core2/code_6B30.c @@ -133,7 +133,7 @@ void func_8028DE6C(enum actor_e actor_id){ func_802948F8(marker); } else{ - func_802C3C88(func_8028DE0C, carriedObject_getActorID()); + __spawnqueue_add_1(func_8028DE0C, carriedObject_getActorID()); } } diff --git a/src/core2/code_72060.c b/src/core2/code_72060.c index 2deb1d7d..08e4fa21 100644 --- a/src/core2/code_72060.c +++ b/src/core2/code_72060.c @@ -7,6 +7,8 @@ typedef struct { f32 unkC[3]; }Struct_core2_72060_0; +extern f32 func_8024C788(); +extern int func_8024DD34(f32, f32, f32); extern void func_80251B5C(f32, f32, f32); extern void func_80251F8C(f32); extern void func_8025208C(f32); @@ -75,7 +77,89 @@ void func_802F9134(s32 gfx){ } } +#ifndef NONMATCHING #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_72060/func_802F919C.s") +#else +void func_802F919C(void) { + f32 temp_f20; + s32 sp68; + s32 var_v1; + s32 sp60; + struct4Ds *sp5C; + f32 sp58; + f32 sp4C[3]; + f32 var_f20; + s32 sp44; + struct4Ds *sp40; + + + if (D_80369280 != NULL) { + if (func_802BEF64() != 0) { + D_80369284 = 0; + return; + } + temp_f20 = time_getDelta(); + sp60 = (func_8023DB5C() & 1) * 2; + player_getPosition(D_80381040); + + D_80369280->unkC[0] = D_80381040[0] - D_80369280->unk0[0]; + D_80369280->unkC[1] = D_80381040[1] - D_80369280->unk0[1]; + D_80369280->unkC[2] = D_80381040[2] - D_80369280->unk0[2]; + D_80369280->unk0[0] = D_80381040[0]; + D_80369280->unk0[1] = D_80381040[1]; + D_80369280->unk0[2] = D_80381040[2]; + D_8038104C = D_80381040[1] - 300.0f; + + for(sp68 = 0; sp68 < D_80369284; sp68++){ + sp5C = D_80369280->unk1C + sp68; + for(var_v1 = 0; var_v1 < 3; var_v1++){ + sp5C->unk0[var_v1] += sp5C->unkC[var_v1] * temp_f20; + } + sp5C->unkC[sp60] += ((randf() * 30.0) - 15.0); + } + + D_8036928C++; + if (D_8036928C < D_80369284) { + if (ml_vec3f_distance(D_80369280[0].unk1C[D_8036928C].unk0, D_80381040) > 1300.0f) { + func_802F9134(D_8036928C); + } + } else { + D_8036928C = 0; + } + if (D_80369280->unk18 == 1) { + if (D_80369284 < 100) { + sp40 = D_80369280->unk1C + D_80369284; + D_80369284++; + sp58 = randf2(100.0f, 1300.0f); + sp4C[0] = 0.0f; + sp4C[1] = randf() * 200.0f + 200.0f; + sp4C[2] = -sp58; + if ((D_80369280->unkC[0]*D_80369280->unkC[0] + D_80369280->unkC[1]*D_80369280->unkC[1] + D_80369280->unkC[2]*D_80369280->unkC[2]) < 25.0f) { + var_f20 = 100.0f; + } else { + var_f20 = 70.0f; + } + ml_vec3f_yaw_rotate_copy(sp4C, sp4C, func_8024C788() + randf2(-var_f20, var_f20)); + sp4C[0] += D_80381040[0]; + sp4C[1] += D_80381040[1]; + sp4C[2] += D_80381040[2]; + if (sp58 < 650.0) { + for(sp44 = 0; sp44 < 5 && func_8024DD34(sp4C[0], sp4C[1] - 10.0f, sp4C[2]) ; sp44++){ + sp4C[1] += 200.0f; + } + } + sp40->unk0[0] = sp4C[0]; + sp40->unk0[1] = sp4C[1]; + sp40->unk0[2] = sp4C[2]; + sp40->unkC[0] = 0.0f; + sp40->unkC[1] = randf2(-150.0f, -50.0f); + sp40->unkC[2] = 0.0f; + } + } + } +} +#endif + #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_72060/func_802F962C.s") // void func_802F962C(Gfx **gfx, Mtx **mtx, Vtx **vtx) { diff --git a/src/core2/code_76D90.c b/src/core2/code_76D90.c index d4667164..8eb01d4d 100644 --- a/src/core2/code_76D90.c +++ b/src/core2/code_76D90.c @@ -243,10 +243,10 @@ void func_802FE844(s32 arg0, struct8s *arg1){ func_803463D4(ITEM_13_EMPTY_HONEYCOMB, -6); timedFunc_set_2(0.25f, (TFQM2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); func_803463D4(ITEM_14_HEALTH, 0); - timedFunc_set_1(1.25f, (TFQM1)item_inc, ITEM_15_HEALTH_TOTAL); - timedFunc_set_1(1.25f, (TFQM1)func_8030E484, SFX_3EA_UNKNOWN); + timedFunc_set_1(1.25f, (GenMethod_1)item_inc, ITEM_15_HEALTH_TOTAL); + timedFunc_set_1(1.25f, (GenMethod_1)func_8030E484, SFX_3EA_UNKNOWN); timedFunc_set_2(1.25f, (TFQM2)item_set, ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL)+1); - timedFunc_set_1(1.5f, (TFQM1)gcpausemenu_80314AC8, 1); + timedFunc_set_1(1.5f, (GenMethod_1)gcpausemenu_80314AC8, 1); } break; case 2://L802FECD4 diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 2dc2897d..778563d3 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -787,7 +787,7 @@ Actor *actor_new(s32 (* position)[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ D_80383390->position_z = (f32)(*position)[2]; D_80383390->unkF4_8 = 0; D_80383390->yaw = (f32) yaw; - D_80383390->yaw_moving = (f32) yaw; + D_80383390->yaw_ideal = (f32) yaw; D_80383390->pitch = 0.0f; D_80383390->roll = 0.0f; D_80383390->unk6C = 0.0f; @@ -1335,7 +1335,7 @@ void func_80328C64(Actor * this, int arg1){ int retVal = arg1; while(retVal < 0) retVal += 0x168; while(retVal >= 0x168) retVal -= 0x168; - this->yaw_moving = retVal; + this->yaw_ideal = retVal; } void func_80328CA8(Actor *arg0, s32 angle) { @@ -1395,7 +1395,7 @@ f32 func_80328DCC(Actor *this, f32 angle, f32 angle_ideal, s32 arg3) { } void func_80328FB0(Actor *this, f32 arg1){ - this->yaw = func_80328DCC(this, this->yaw, this->yaw_moving, (s32)arg1); + this->yaw = func_80328DCC(this, this->yaw, this->yaw_ideal, (s32)arg1); } void func_80328FF0(Actor *arg0, f32 arg1) { @@ -1502,14 +1502,14 @@ bool func_8032944C(Actor *this){ bool func_80329480(Actor *this){ s32 v1; - v1 = this->yaw - this->yaw_moving; + v1 = this->yaw - this->yaw_ideal; return ((-3 <= v1) && (v1 <= 3)); } bool func_803294B4(Actor *this, s32 arg1){ s32 v1; - v1 = this->yaw - this->yaw_moving; + v1 = this->yaw - this->yaw_ideal; return ((-arg1 <= v1) && (v1 <= arg1)); } @@ -1938,7 +1938,7 @@ void func_8032A88C(Actor *arg0) { Actorlocal_Core2_9E370 *sp20; sp20 = &arg0->local; - arg0->yaw_moving = (f32) func_803297C8(arg0, sp20->unk0); + arg0->yaw_ideal = (f32) func_803297C8(arg0, sp20->unk0); func_80328FB0(arg0, 6.0f); func_80329030(arg0, 0); if ((((arg0->position[0] - sp20->unk0[0]) * (arg0->position[0] - sp20->unk0[0])) + ((arg0->position[2] - sp20->unk0[2]) * (arg0->position[2] - sp20->unk0[2]))) <= 144.0f) { diff --git a/src/core2/code_B9770.c b/src/core2/code_B9770.c index 5c38d0c7..f4d19e90 100644 --- a/src/core2/code_B9770.c +++ b/src/core2/code_B9770.c @@ -773,7 +773,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, glspline_list *arg2) { if (arg0->marker->unk14_20 == 0x12) { arg0->yaw = (f32) func_80342244((s32) arg0->yaw); } - arg0->yaw_moving = arg0->yaw; + arg0->yaw_ideal = arg0->yaw; } if (sp4C != -9999.0f) { arg0->pitch = sp4C; @@ -932,7 +932,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, glspline_list *arg2) { arg0->unk38_13 = func_80342244(arg0->unk38_13); arg0->unk38_21 = func_80342244(arg0->unk38_21); } - arg0->yaw = arg0->yaw_moving = (f32) arg0->unk38_13; + arg0->yaw = arg0->yaw_ideal = (f32) arg0->unk38_13; arg0->pitch = arg0->unk6C = (f32) arg0->unk78_31; } if (arg1->t1.unk4.bit17 & 2) { @@ -942,9 +942,9 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, glspline_list *arg2) { } if (!arg0->unk10_4) { if (arg0->unk10_8) { - arg0->yaw_moving = (f32)arg1->t1.unkC.bit31; + arg0->yaw_ideal = (f32)arg1->t1.unkC.bit31; if (arg0->marker->unk14_20 == 0x12) { - arg0->yaw_moving = (f32) func_80342244((s32) arg0->yaw_moving); + arg0->yaw_ideal = (f32) func_80342244((s32) arg0->yaw_ideal); } } if (arg0->unk10_7) { @@ -960,7 +960,7 @@ void func_803430B4(Actor *arg0) { f32 d_yaw; if ((arg0->marker->unk14_20 == 0x12) && (arg0->unk138_30 == 1)) { - d_yaw = arg0->yaw_moving - arg0->yaw; + d_yaw = arg0->yaw_ideal - arg0->yaw; while (d_yaw >= 360.0f) { d_yaw -= 360.0f; } while (d_yaw < 0.0f) { d_yaw += 360.0f; } @@ -986,7 +986,7 @@ void func_803431D0(Actor *arg0, s32 arg1, s32 arg2, s32 arg3) { func_8032417C(func_80342038(arg0->unk44_14), arg0->unk48, sp64, sp58); if (arg1 & 1) { if (arg1 & 0x100) { - arg0->yaw_moving = sp58[1]; + arg0->yaw_ideal = sp58[1]; } if (arg1 & 0x200) { arg0->unk6C = sp58[0]; @@ -994,9 +994,9 @@ void func_803431D0(Actor *arg0, s32 arg1, s32 arg2, s32 arg3) { } else { if (arg1 & 0x100) { if (sp58[1] >= 180.0f) { - arg0->yaw_moving = sp58[1] - 180.0f; + arg0->yaw_ideal = sp58[1] - 180.0f; } else { - arg0->yaw_moving = sp58[1] + 180.0f; + arg0->yaw_ideal = sp58[1] + 180.0f; } } if (arg1 & 0x200) { @@ -1014,7 +1014,7 @@ void func_803431D0(Actor *arg0, s32 arg1, s32 arg2, s32 arg3) { } sp40[0] = 360.0f - sp40[0]; } - arg0->yaw_moving = sp40[1]; + arg0->yaw_ideal = sp40[1]; arg0->unk6C = sp40[0]; } else { if ((arg0->unk70 <= arg0->unk48) && (arg0->unk48 < arg0->unk74)) { @@ -1024,7 +1024,7 @@ void func_803431D0(Actor *arg0, s32 arg1, s32 arg2, s32 arg3) { var_f2 = mlDiffDegF(arg0->unk38_21, arg0->unk38_13) * sp3C + arg0->unk38_13; while (var_f2 >= 360.0f) { var_f2 -= 360.0f; } while (var_f2 < 0.0f) { var_f2 += 360.0f; } - arg0->yaw_moving = var_f2; + arg0->yaw_ideal = var_f2; } if (arg1 & 0x1000) { var_f2 = mlDiffDegF(arg0->unk78_22, arg0->unk78_31) * sp3C + arg0->unk78_31; @@ -1133,7 +1133,7 @@ s32 func_803438E0(Actor *actor, s32 arg1, s32 arg2, s32 arg3) { sp48 = func_803421A4(actor->unk44_14, actor->unk48); if (!actor->unk44_1) { actor->unk44_1 = TRUE; - actor->yaw = actor->yaw_moving; + actor->yaw = actor->yaw_ideal; actor->pitch = actor->unk6C; } if ((sp4C == sp48) && (sp44 == 0)) { diff --git a/src/core2/code_C0B80.c b/src/core2/code_C0B80.c index 0af74125..4cf03db1 100644 --- a/src/core2/code_C0B80.c +++ b/src/core2/code_C0B80.c @@ -12,7 +12,7 @@ void func_80347B10(Struct81s *arg0){ } void func_80347B54(Struct81s *arg0){ - func_802C3C88((GenMethod_1)func_80347B10, reinterpret_cast(s32, arg0)); + __spawnqueue_add_1((GenMethod_1)func_80347B10, reinterpret_cast(s32, arg0)); } void func_80347B80(Struct81s *arg0) { diff --git a/src/core2/code_C0CF0.c b/src/core2/code_C0CF0.c index 26ef4624..f787887c 100644 --- a/src/core2/code_C0CF0.c +++ b/src/core2/code_C0CF0.c @@ -14,7 +14,7 @@ void func_80347C80(Struct81s *arg0){ } void func_80347CC8(Struct81s *arg0){ - func_802C3C88((GenMethod_1)func_80347C80, reinterpret_cast(s32, arg0)); + __spawnqueue_add_1((GenMethod_1)func_80347C80, reinterpret_cast(s32, arg0)); } void func_80347CF4(Struct81s *arg0) { diff --git a/src/core2/code_C0E60.c b/src/core2/code_C0E60.c index 2d04b1d4..80544ccd 100644 --- a/src/core2/code_C0E60.c +++ b/src/core2/code_C0E60.c @@ -79,7 +79,7 @@ void func_80347DF0(Struct81s *arg0){ } void func_80347E34(Struct81s *arg0){ - func_802C3C88((GenMethod_1) func_80347DF0, reinterpret_cast(s32, arg0)); + __spawnqueue_add_1((GenMethod_1) func_80347DF0, reinterpret_cast(s32, arg0)); } void func_80347E60(Struct81s *arg0) { diff --git a/src/core2/code_D7040.c b/src/core2/code_D7040.c index 846e344d..bbd0a182 100644 --- a/src/core2/code_D7040.c +++ b/src/core2/code_D7040.c @@ -212,7 +212,7 @@ void func_8035E84C(Actor *this) { func_8035E0D0(this); } if (func_8034A6FC(0.73f, 0.76f) && func_80329078(this, (s32) this->yaw, 750) ) { - this->yaw_moving = this->yaw; + this->yaw_ideal = this->yaw; this->velocity[0] = 35.0f; this->unk28 = 19.4444447f; this->unk38_31 = 0x3A; diff --git a/src/core2/code_D7D10.c b/src/core2/code_D7D10.c index 260999e5..a045eb43 100644 --- a/src/core2/code_D7D10.c +++ b/src/core2/code_D7D10.c @@ -100,7 +100,7 @@ void func_8035EEC0(Actor *this){ } void func_8035EF00(Actor *this, f32 arg1){ - this->yaw_moving = (f32)func_80329784(this); + this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, arg1); } @@ -248,7 +248,7 @@ void func_8035F138(Actor *this) { break; } - this->yaw_moving = (f32)(s32)func_80257204(this->position[0], this->position[2], this->unk1C[0], this->unk1C[2]); + this->yaw_ideal = (f32)(s32)func_80257204(this->position[0], this->position[2], this->unk1C[0], this->unk1C[2]); func_80328FB0(this, 7.0f); func_80329030(this, 2); break; @@ -270,7 +270,7 @@ void func_8035F138(Actor *this) { func_8035EE48(this); break; } - this->yaw_moving = this->velocity[0]; + this->yaw_ideal = this->velocity[0]; func_80328FB0(this, 7.5f); func_80329030(this, 2); break; diff --git a/src/core2/code_D89E0.c b/src/core2/code_D89E0.c index c3f4337f..67a8b90d 100644 --- a/src/core2/code_D89E0.c +++ b/src/core2/code_D89E0.c @@ -50,7 +50,7 @@ void func_8035FA48(Actor *this){ void func_8035FA74(Actor *this){ ActorLocal_Core2_D89E0 *local = (ActorLocal_Core2_D89E0 *)&this->local; - this->yaw_moving = local->unk4; + this->yaw_ideal = local->unk4; func_80328A84(this, 5); actor_loopAnimation(this); } @@ -197,7 +197,7 @@ void func_8035FFAC(Actor *this, f32 arg1){ void func_80360044(Actor *this) { f32 var_f0; - var_f0 = this->yaw_moving - this->yaw; + var_f0 = this->yaw_ideal - this->yaw; if (var_f0 >= 180.0f) { var_f0 -= 360.0f; } @@ -308,7 +308,7 @@ f32 func_803603AC(Actor *this, s32 arg1, u8 arg2){ int func_803604E8(Actor *this){ f32 tmp_f0; - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); tmp_f0 = func_803603AC(this, 170, 1); func_8035FFAC(this, tmp_f0); if(!func_80360198(this)){ @@ -323,7 +323,7 @@ bool func_8036054C(Actor *this) { s32 phi_s2; if (this->unk60 == 0.0f) { - this->yaw_moving = func_80257204(this->position[0], this->position[2], this->unk1C[0], this->unk1C[2]); + this->yaw_ideal = func_80257204(this->position[0], this->position[2], this->unk1C[0], this->unk1C[2]); func_8035FFAC(this, func_803603AC(this, -110, 2)); } else{ @@ -341,16 +341,16 @@ bool func_8036054C(Actor *this) { phi_s1 = 0; do{ if (this->unk38_0) { - phi_v0 = func_80329140(this, (s32) this->yaw_moving, 0xC8); + phi_v0 = func_80329140(this, (s32) this->yaw_ideal, 0xC8); } else { - phi_v0 = func_80329078(this, (s32) this->yaw_moving, 0xC8); + phi_v0 = func_80329078(this, (s32) this->yaw_ideal, 0xC8); } if(phi_v0 == 0){ phi_s1++; - this->yaw_moving += 30.0f; - if (this->yaw_moving >= 360.0f) { - this->yaw_moving -= 360.0f; + this->yaw_ideal += 30.0f; + if (this->yaw_ideal >= 360.0f) { + this->yaw_ideal -= 360.0f; } } } while ( phi_v0 == 0 && phi_s1 < 0xC); diff --git a/src/core2/gc/parade.c b/src/core2/gc/parade.c index e07fcad5..7fa76d8d 100644 --- a/src/core2/gc/parade.c +++ b/src/core2/gc/parade.c @@ -232,13 +232,13 @@ void gcparade_setState(enum parade_state_e next_state) { break; case PARADE_STATE_5_WAIT_ON_NAME: if ((D_803830F0.parade_id == 1) && (D_803830F0.parade_element->exit >= 0)) { - timedFunc_set_1(2.0f, (TFQM1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition + timedFunc_set_1(2.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition } break; case PARADE_STATE_7_GOTO_NEXT: D_803830F0.indx++; D_803830F0.parade_element++; - timedFunc_set_1(0.25f, (TFQM1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP); + timedFunc_set_1(0.25f, (GenMethod_1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP); break; case PARADE_STATE_8_END: func_803204E4(0x1F, 0); @@ -294,13 +294,13 @@ void gcparade_update(void) { sp34 = 0xA0; if (D_803830F0.parade_element->exit >= 0) sp34 = 0xA8; - timedFunc_set_1(1.0f, (TFQM1)func_80311714, 0); + timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 0); func_80324DBC(1.0f, D_803830F0.indx + 0x11AF, sp34, NULL, NULL, gcparade_textCallback, NULL); - timedFunc_set_1(1.0f, (TFQM1)func_80311714, 1); + timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 1); } else if (D_803830F0.parade_element->exit >= 0) { func_8028F918(2); } - timedFunc_set_1(1.0f, (TFQM1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR); + timedFunc_set_1(1.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR); D_803830F0.unk5 = 1; } } diff --git a/src/core2/timedfuncqueue.c b/src/core2/timedfuncqueue.c index dc2c9bc4..b911f87c 100644 --- a/src/core2/timedfuncqueue.c +++ b/src/core2/timedfuncqueue.c @@ -13,7 +13,7 @@ typedef struct timed_function_queue_s{ u8 pad5[3]; union { TFQM0 func0; - TFQM1 func1; + GenMethod_1 func1; TFQM2 func2; TFQM3 func3; TFQM4 func4; @@ -174,7 +174,7 @@ void func_80324CFC(f32 time, s32 id, s32 volume){ } void func_80324D2C(f32 time, enum comusic_e arg0){ - timedFunc_set_1(time, (TFQM1) func_80324A48, arg0); + timedFunc_set_1(time, (GenMethod_1) func_80324A48, arg0); } void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position[3], f32 arg5, f32 arg6){ @@ -212,11 +212,11 @@ void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], Ac void func_80324E38(f32 time, s32 arg0){ - timedFunc_set_1(time, (TFQM1) func_80324BA0, arg0); + timedFunc_set_1(time, (GenMethod_1) func_80324BA0, arg0); } void timed_setCameraToNode(f32 time, s32 arg0){ - timedFunc_set_1(time, (TFQM1) set_camera_to_node, arg0); + timedFunc_set_1(time, (GenMethod_1) set_camera_to_node, arg0); } void func_80324E88(f32 time){ @@ -227,7 +227,7 @@ void timedFunc_set_0(f32 time, TFQM0 funcPtr){ __timedFuncQueue_insert(time, 0, (void *) funcPtr, 0, 0, 0, 0, 0); } -void timedFunc_set_1(f32 time, TFQM1 funcPtr, s32 arg0){ +void timedFunc_set_1(f32 time, GenMethod_1 funcPtr, s32 arg0){ __timedFuncQueue_insert(time, 1, (void *) funcPtr, arg0, 0, 0, 0, 0); } diff --git a/src/fight/code_5ED0.c b/src/fight/chbossjinjo.c similarity index 85% rename from src/fight/code_5ED0.c rename to src/fight/chbossjinjo.c index 065085f4..c0d3596c 100644 --- a/src/fight/code_5ED0.c +++ b/src/fight/chbossjinjo.c @@ -24,25 +24,29 @@ ActorAnimationInfo D_80391810[] = { }; ActorInfo D_80391840 = { - 0x27B, 0x3A5, 0x3BC, 0x1, D_80391810, + MARKER_27B_BOSS_JINJO_ORANGE, ACTOR_3A5_BOSS_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, + 0x1, D_80391810, func_8038C840, func_8038D014, func_80325888, 0, 0, 1.0f, 0 }; ActorInfo D_80391864 = { - 0x27C, 0x3A6, 0x3C2, 0x1, D_80391810, + MARKER_27C_BOSS_JINJO_GREEN, ACTOR_3A6_BOSS_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, + 0x1, D_80391810, func_8038C840, func_8038D014, func_80325888, 0, 0, 1.0f, 0 }; ActorInfo D_80391888 = { - 0x27D, 0x3A7, 0x3C1, 0x1, D_80391810, + MARKER_27D_BOSS_JINJO_PINK, ACTOR_3A7_BOSS_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, + 0x1, D_80391810, func_8038C840, func_8038D014, func_80325888, 0, 0, 1.0f, 0 }; ActorInfo D_803918AC = { - 0x27E, 0x3A8, 0x3BB, 0x1, D_80391810, + MARKER_27E_BOSS_JINJO_YELLOW, ACTOR_3A8_BOSS_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, + 0x1, D_80391810, func_8038C840, func_8038D014, func_80325888, 0, 0, 1.0f, 0 }; @@ -114,7 +118,7 @@ void func_8038C5BC(void){ func_80386654(1.0f, &D_80391948, &D_80391958); } -void func_8038C5F0(Actor *this, enum asset_e arg1, enum asset_e arg2, f32 arg3){ +void chbossjinjo_spawnParticles(Actor *this, enum asset_e arg1, enum asset_e arg2, f32 arg3){ f32 sp1C[3]; func_8038C0DC(&sp1C); func_8038C2C0(this->position, 0x20, arg1, arg3); @@ -123,32 +127,32 @@ void func_8038C5F0(Actor *this, enum asset_e arg1, enum asset_e arg2, f32 arg3){ timedFunc_set_0(0.3f, func_8038C5BC); } -void func_8038C674(Actor *this){ - s32 a1; - s32 a2; +void chbossjinjo_spawnAttackParticles(Actor *this){ + s32 sparkle_sprite_id; + s32 smoke_sprite_id; switch(this->marker->unk14_20){ default: - a1 = ASSET_718_SPRITE_SPARKLE_WHITE_2; - a2 = ASSET_6C2_SPRITE_SMOKE_WHITE; + sparkle_sprite_id = ASSET_718_SPRITE_SPARKLE_WHITE_2; + smoke_sprite_id = ASSET_6C2_SPRITE_SMOKE_WHITE; break; - case 0x27b: - a1 = ASSET_71B_SPRITE_SPARKLE_ORANGE_2; - a2 = ASSET_6C5_SPRITE_SMOKE_ORANGE; + case MARKER_27B_BOSS_JINJO_ORANGE: + sparkle_sprite_id = ASSET_71B_SPRITE_SPARKLE_ORANGE_2; + smoke_sprite_id = ASSET_6C5_SPRITE_SMOKE_ORANGE; break; - case 0x27c: - a1 = ASSET_719_SPRITE_SPARKLE_GREEN_2; - a2 = ASSET_6C3_SPRITE_SMOKE_GREEN; + case MARKER_27C_BOSS_JINJO_GREEN: + sparkle_sprite_id = ASSET_719_SPRITE_SPARKLE_GREEN_2; + smoke_sprite_id = ASSET_6C3_SPRITE_SMOKE_GREEN; break; - case 0x27d: - a1 = ASSET_71A_SPRITE_SPARKLE_PINK_2; - a2 = ASSET_6C6_SPRITE_SMOKE_PINK; + case MARKER_27D_BOSS_JINJO_PINK: + sparkle_sprite_id = ASSET_71A_SPRITE_SPARKLE_PINK_2; + smoke_sprite_id = ASSET_6C6_SPRITE_SMOKE_PINK; break; - case 0x27e: - a1 = ASSET_717_SPRITE_SPARKLE_YELLOW_2; - a2 = ASSET_6C4_SPRITE_SMOKE_YELLOW; + case MARKER_27E_BOSS_JINJO_YELLOW: + sparkle_sprite_id = ASSET_717_SPRITE_SPARKLE_YELLOW_2; + smoke_sprite_id = ASSET_6C4_SPRITE_SMOKE_YELLOW; break; } - func_8038C5F0(this, a1, a2, 1.0f); + chbossjinjo_spawnParticles(this, sparkle_sprite_id, smoke_sprite_id, 1.0f); } @@ -313,7 +317,7 @@ void func_8038C840(Actor *this){ }//L8038CEC8 } -void func_8038CED8(f32 arg0[3], s32 arg1, f32 arg2, f32 arg3){ +void func_8038CED8(f32 arg0[3], enum asset_e model_id, f32 arg2, f32 arg3){ ParticleEmitter *s0 = partEmitList_pushNew(1); f32 sp40[3]; f32 sp34[3]; @@ -325,7 +329,7 @@ void func_8038CED8(f32 arg0[3], s32 arg1, f32 arg2, f32 arg3){ sp34[2] = sp40[2] - arg0[2]; ml_vec3f_set_length(sp34, 20.0f); - particleEmitter_setModel(s0, arg1); + particleEmitter_setModel(s0, model_id); particleEmitter_setPosition(s0, arg0); particleEmitter_setParticleVelocityRange(s0, sp34[0], sp34[1], sp34[2], sp34[0], sp34[1], sp34[2]); D_80391968.unk20 = arg3; @@ -369,16 +373,16 @@ void func_8038D014(Actor *this){ marker_despawn(this->marker); switch (this->marker->unk14_20) { - case 0x27b: + case MARKER_27B_BOSS_JINJO_ORANGE: temp_a1 = 0x557; break; - case 0x27c: + case MARKER_27C_BOSS_JINJO_GREEN: temp_a1 = 0x558; break; - case 0x27d: + case MARKER_27D_BOSS_JINJO_PINK: temp_a1 = 0x559; break; - case 0x27e: + case MARKER_27E_BOSS_JINJO_YELLOW: temp_a1 = 0x556; break; default: @@ -393,13 +397,13 @@ void func_8038D014(Actor *this){ } -void func_8038D214(ActorMarker *marker){ +void chbossjinjo_attack(ActorMarker *marker){ Actor *actor = marker_getActor(marker); - func_8038C674(actor); + chbossjinjo_spawnAttackParticles(actor); FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor->position, 1000, 6500); marker_despawn(actor->marker); } -f32 func_8038D268(void){ +f32 chbossjinjo_8038D268(void){ return 2.26f; } diff --git a/src/fight/code_6E90.c b/src/fight/chbossjinjobase.c similarity index 89% rename from src/fight/code_6E90.c rename to src/fight/chbossjinjobase.c index 8a7be719..20062401 100644 --- a/src/fight/code_6E90.c +++ b/src/fight/chbossjinjobase.c @@ -10,7 +10,8 @@ void func_8038D568(Actor *this); /* .data */ ActorInfo D_80391990 = { - 0x27A, 0x3A2, 0x543, 0x1, NULL, + MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE, + 0x1, NULL, func_8038D568, func_80326224, func_80325888, 0, 0x800, 0.0f, 0 }; @@ -26,9 +27,9 @@ struct31s D_803919C0 = { }; /* .code */ -void func_8038D280(ActorMarker *arg0) { +void chbossjinjobase_spawnStoneJinjo(ActorMarker *arg0) { Actor *sp1C = marker_getActor(arg0); - Actor *temp_v0 = spawn_child_actor(0x3A1, &sp1C); + Actor *temp_v0 = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &sp1C); temp_v0->unkF4_8 = sp1C->unkF4_8; temp_v0->position_y = temp_v0->position_y + 172.0f; @@ -66,7 +67,7 @@ void func_8038D428(ActorMarker *arg0, ActorMarker *arg1) { temp_v0->unk38_31++; if (temp_v0->unk38_31 >= 3) { func_80328A84(temp_v0, 3); - func_8038DE98(temp_v0->unk100); + chstonejinjo_breakOpen(temp_v0->unk100); func_8038D3DC(temp_v0, 0x19A, -100.0f, 0.0f, 1.2f); func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, temp_v0->position, 1000.0f, 2000.0f); } @@ -106,13 +107,13 @@ void func_8038D568(Actor *this){ actor_collisionOn(this); this->unk38_31 = 0; this->unk44_31 = func_8030D90C(); - sfxsource_setSfxId(this->unk44_31, 0x3f9); + sfxsource_setSfxId(this->unk44_31, SFX_3F9_UNKNOWN); func_8030DD14(this->unk44_31, 2); func_8030DBB4(this->unk44_31, 1.4f); sfxsource_setSampleRate(this->unk44_31, 32000); local->unk0 = func_8030D90C(); - sfxsource_setSfxId(local->unk0, 0x405); + sfxsource_setSfxId(local->unk0, SFX_405_UNKNOWN); func_8030DD14(local->unk0, 2); func_8030DBB4(local->unk0, 0.7f); sfxsource_setSampleRate(local->unk0, 12000); @@ -128,14 +129,14 @@ void func_8038D568(Actor *this){ func_802BB3DC(0, 8.0f, 0.92f); func_802C3F04((GenMethod_4)func_802C4140, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]); func_8038D2EC(this->unk1C, 0x10); - func_802C3C88((GenMethod_1)func_8038D280, reinterpret_cast(s32, this->marker)); + SPAWNQUEUE_ADD_1(chbossjinjobase_spawnStoneJinjo, this->marker); } else{//L8038D774 if(this->state == 1){ other = marker_getActor(this->unk100); sp3C = this->velocity_y * sp48; if(this->position_y + sp3C < this->unk1C[1]){ - if(!func_8031FF1C(0xd2) || this->unkF4_8 == 1){ + if( !func_8031FF1C(BKPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) || this->unkF4_8 == 1){ func_8030E2C4(this->unk44_31); func_8030E2C4(local->unk0); } diff --git a/src/fight/chbossshadow.c b/src/fight/chbossshadow.c new file mode 100644 index 00000000..4f8924cc --- /dev/null +++ b/src/fight/chbossshadow.c @@ -0,0 +1,30 @@ +#include +#include "functions.h" +#include "variables.h" + +Actor *chbossshadow_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); +void chbossshadow_update(Actor *this); + +/* .data */ +ActorInfo D_80392090 = { + MARKER_288_GRUNTY_SHADOW, ACTOR_3AF_GRUNTY_SHADOW, ASSET_3BF_MODEL_PLAYER_SHADOW, 0x1, NULL, + chbossshadow_update, func_80326224, chbossshadow_draw, + 0, 0, 0.0f, 0 +}; + +/* .code */ +Actor *chbossshadow_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ + f32 sp34[3]; + f32 sp30; + Actor *this; + this = func_80325300(marker, sp34); + sp30 = this->scale * ml_map_f(this->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f); + set_model_render_mode(2); + func_803391A4(gdl, mptr, this->position, sp34, sp30, NULL, func_80330B1C(marker)); + return this; +} + + +void chbossshadow_update(Actor *this){ + actor_collisionOff(this); +} diff --git a/src/fight/code_180.c b/src/fight/chfinalboss.c similarity index 74% rename from src/fight/code_180.c rename to src/fight/chfinalboss.c index 055d4334..821b4cfe 100644 --- a/src/fight/code_180.c +++ b/src/fight/chfinalboss.c @@ -1,16 +1,16 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" extern f32 func_8025715C(f32, f32); extern void func_8025727C(f32, f32, f32, f32, f32, f32, f32*, f32*); extern void func_8028F4B8(f32[3], f32, f32); extern void func_80320ED8(ActorMarker *, f32, s32); -Actor *func_80386570(ActorMarker *arg0, Gfx **arg1, Mtx **arg2, Vtx **arg3); void func_80387110(ActorMarker *, f32[3], f32, s32); void func_8038856C(Actor *actor, f32 *arg1); -void func_8038BCF0(Actor *this); +void chfinalboss_update(Actor *this); void func_802C8F70(f32); s32 func_803297C8(Actor*, f32*); Actor *func_8032813C(); @@ -27,24 +27,24 @@ extern void func_8028F85C(f32[3]); extern void func_8028FAEC(f32[3]); extern f32 func_8033229C(ActorMarker *); +Actor *chfinalboss_draw(ActorMarker *arg0, Gfx **arg1, Mtx **arg2, Vtx **arg3); -void func_80388184(Actor *arg0, s32 arg1); -ActorMarker *func_8038A4E8(Actor *, f32); -void func_8038AC88(Actor *, s32); +void chfinalboss_phase1_setState(Actor *arg0, s32 arg1); +void chfinalboss_phase5_setState(Actor *, s32); void func_8038B780(); -void func_8038C5F0(Actor *, s32, s32, f32); -void func_80391070(ActorMarker *, s32 arg1, s32 arg2); -void func_803911F8(ActorMarker *); +void chbossjinjo_spawnParticles(Actor *, s32, s32, f32); +void chjinjonator_attack(ActorMarker *, s32 arg1, s32 arg2); +void chjinjonator_finalAttack(ActorMarker *); typedef struct ch_fight_180_s{ - u8 unk0; - u8 unk1; + u8 phase; + u8 hits; u8 unk2; u8 unk3; u8 unk4; u8 unk5; u8 unk6; - u8 unk7; + u8 mirror_phase5; u8 unk8; u8 unk9; u8 unkA; @@ -114,9 +114,9 @@ ActorAnimationInfo D_803913A0[] = { }; ActorInfo D_80391500 = { - 0x25E, 0x38B, 0x53D, + MARKER_25E_GRUNTILDA_FINAL_BOSS, ACTOR_38B_GRUNTILDA_FINAL_BOSS, ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, 1, D_803913A0, - func_8038BCF0, func_80326224, func_80386570, + chfinalboss_update, func_80326224, chfinalboss_draw, 0, 0, 0.0f, 0 }; f32 D_80391524[3] = {0.0f, -8.0f, 400.0f}; @@ -184,20 +184,13 @@ f32 D_8039171C[3] = {0.0f, 0.0f, -600.0f}; f32 D_80391728[4] = {0.1f, 0.2f, 3.9f, 4.9f}; s32 D_80391738[4] = {0xCE4, 0x10C2, 0x14A0, 0x187E}; f32 D_80391748[4] = {1.4f, 1.1f, 0.8f, 0.5f}; -f32 D_80391758[4] = {1000.0f, 1100.0f, 1200.0f, 1300.0f}; -f32 D_80391768[3] = {-1290.0f, 0.0f, 1290.0f}; +f32 D_80391758[4] = {1000.0f, 1100.0f, 1200.0f, 1300.0f}; //phase2 velocities +f32 D_80391768[3] = {-1290.0f, 0.0f, 1290.0f}; //orange jinjo spawn position f32 D_80391774[3] = {-1290.0f, 0.0f, -1290.0f}; f32 D_80391780[3] = {1290.0f, 0.0f, -1290.0f}; f32 D_8039178C[3] = {1290.0f, 0.0f, 1290.0f}; f32 D_80391798[3] = {0.0f, 0.0f, 0.0f}; -f32 D_803917A4[4] = {500.0f, 650.0f, 800.0f, 950.0f}; -f32 D_803917B4[4] = {3.75f, 3.0f, 2.25f, 1.5f}; -s32 D_803917C4[3] = {230, 230, 230}; -f32 D_803917D0[4] = {2.4f, 2.1f, 1.8f, 1.5f}; -f32 D_803917E0[3] = {0.0f, 186.0f, 0.0f}; -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}; + /* .bss */ f32 D_80392758[3]; @@ -205,13 +198,13 @@ 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]; +ActorMarker *__chFinalBossShadowMarker; +ActorMarker *__chFinalBossFlightPadMarker; +ActorMarker *__chFinalBossJinjoStatueMarker[4]; f32 D_803927C0; u8 D_803927C4; -u8 D_803927C5; -u8 D_803927C6; +u8 __chFinalBossSpellBarrierActive; +u8 __chFinalBossJinjonatorHits; u8 D_803927C7; u8 D_803927C8; u8 D_803927C9; @@ -281,20 +274,19 @@ u8 D_8039283B; /* .code */ -Actor *func_80386570(ActorMarker *arg0, Gfx **arg1, Mtx **arg2, Vtx **arg3) { +Actor *chfinalboss_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { + Actor *this; + ActorLocal_fight_180 *local; - Actor *temp_v0; - ActorLocal_fight_180 *localActor; - - temp_v0 = marker_getActor(arg0); - localActor = (ActorLocal_fight_180 *)&temp_v0->local; - func_8033A45C(3, localActor->unkD); - func_8033A45C(4, localActor->unkE); - func_8033A45C(5, localActor->unkC); - if (localActor->unk0 == 1) { + this = marker_getActor(marker); + local = (ActorLocal_fight_180 *)&this->local; + func_8033A45C(3, local->unkD); + func_8033A45C(4, local->unkE); + func_8033A45C(5, local->unkC); + if (local->phase == 1) { func_8033A25C(0); } - return func_80325888(arg0, arg1, arg2, arg3); + return func_80325888(marker, gfx, mtx, vtx); } void func_80386600(ActorMarker *arg0, s32 arg1) { @@ -337,7 +329,7 @@ void func_80386698(f32 arg0) { } } -void func_803866E4(f32 position[3], enum asset_e model_id, s32 n) { +void chfinalboss_spawnBroomstickParticles(f32 position[3], enum asset_e model_id, s32 n) { ParticleEmitter *temp_s0; temp_s0 = partEmitList_pushNew(n); @@ -352,11 +344,9 @@ void func_803866E4(f32 position[3], enum asset_e model_id, s32 n) { void func_8038679C(f32 arg0[3], s32 arg1, f32 arg2[4]) { ParticleEmitter *temp_s0; - ParticleEmitter *temp_v0; - temp_v0 = partEmitList_pushNew(arg1); - temp_s0 = temp_v0; - particleEmitter_setSprite(temp_v0, ASSET_70E_SPRITE_SMOKE_2); + temp_s0 = partEmitList_pushNew(arg1); + particleEmitter_setSprite(temp_s0, ASSET_70E_SPRITE_SMOKE_2); func_802EFFA8(temp_s0, D_803915AC); particleEmitter_setStartingFrameRange(temp_s0, 0, 7); particleEmitter_setPosition(temp_s0, arg0); @@ -448,9 +438,9 @@ void func_80386B54(f32 *arg0, f32 arg1) { } bool func_80386BEC(Actor *this, f32 arg1) { - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, arg1); - if ((this->yaw_moving < (this->yaw + arg1)) && ((this->yaw - arg1) < this->yaw_moving)) { + if ((this->yaw_ideal < (this->yaw + arg1)) && ((this->yaw - arg1) < this->yaw_ideal)) { return TRUE; } return FALSE; @@ -459,11 +449,11 @@ bool func_80386BEC(Actor *this, f32 arg1) { bool func_80386C68(Actor *this, f32 arg1) { f32 sp2C[3]; - func_8039129C(&sp2C); - this->yaw_moving = (f32) func_803297C8(this, sp2C); + chjinjonator_8039129C(&sp2C); + this->yaw_ideal = (f32) func_803297C8(this, sp2C); func_80328FB0(this, arg1); - if ((this->yaw_moving < ( this->yaw + arg1)) && (( this->yaw - arg1) < this->yaw_moving)) { + if ((this->yaw_ideal < ( this->yaw + arg1)) && (( this->yaw - arg1) < this->yaw_ideal)) { return TRUE; } return FALSE; @@ -492,7 +482,7 @@ void func_80386CF8(Actor *actor) { func_802BAE6C(sp4C, sp40); } -void func_80386DE4(ActorMarker *arg0) { +void __chfinalboss_dropHealth(ActorMarker *arg0) { Actor *actor; actor = marker_getActor(arg0); @@ -500,19 +490,19 @@ void func_80386DE4(ActorMarker *arg0) { func_802C937C(0x14, actor->position); } -void func_80386E34(void) { - marker_despawn(D_803927A8); - D_803927A8 = NULL; +void chfinalboss_despawnFlightPad(void) { + marker_despawn(__chFinalBossFlightPadMarker); + __chFinalBossFlightPadMarker = NULL; } -void func_80386E5C(s32 arg0) { +void chfinalboss_spawnFlightPad(s32 arg0) { s16 *temp_v1; - Actor *temp_v0; + Actor *flight_pad; - temp_v0 = func_8032813C(0x39F, D_80391700, D_8039170C); - temp_v0->alpha_124_19 = 0; - temp_v0->unk38_31 = 6; - D_803927A8 = temp_v0->marker; + flight_pad = func_8032813C(ACTOR_39F_FIGHT_FLIGHT_PAD, D_80391700, D_8039170C); + flight_pad->alpha_124_19 = 0; + flight_pad->unk38_31 = 6; + __chFinalBossFlightPadMarker = flight_pad->marker; } void func_80386EC0(s32 arg0) { @@ -530,14 +520,14 @@ void func_80386F5C(ActorMarker * arg0, f32 arg1[3], f32 arg2, f32 arg3) { D_80392758[2] = (f32) arg1[2]; D_80392768[1] = arg2; D_80392768[2] = arg3; - func_802C3C88(func_80386EC0, reinterpret_cast(s32, arg0)); + SPAWNQUEUE_ADD_1(func_80386EC0, arg0); } void func_80386FD8(s32 arg0) { ActorMarker *marker; marker = func_8032813C(0x389, D_80392758, 0)->marker; - func_8030E878(SFX_146_GRUNTY_SPELL_ATTACK_1, randf2(0.95f, 1.05f), 0x7D00, D_80392758, 5000.0f, 12000.0f); + func_8030E878(SFX_146_GRUNTY_SPELL_ATTACK_1, randf2(0.95f, 1.05f), 32000, D_80392758, 5000.0f, 12000.0f); func_8038FB84(marker, D_80392758, D_80392768, D_80392778); } @@ -564,7 +554,7 @@ void func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 arg3) { if (arg3 == 0) { func_80386B54(sp2C, arg2); - } else if (local->unk7 == 0) { + } else if (local->mirror_phase5 == 0) { sp2C[0] = D_80391710[0]; sp2C[1] = D_80391710[1]; sp2C[2] = D_80391710[2]; @@ -582,10 +572,10 @@ void func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 arg3) { D_80392768[i] = (sp2C[i] - arg1[i]) / arg2 - (D_80392778[i] * arg2 / 2); } if (arg3 == 0) { - func_802C3C88((GenMethod_1)func_80386FD8, reinterpret_cast(s32, marker)); + SPAWNQUEUE_ADD_1(func_80386FD8, marker); } else{ - func_802C3C88((GenMethod_1)func_80387074, reinterpret_cast(s32, marker)); + SPAWNQUEUE_ADD_1(func_80387074, marker); } } @@ -630,63 +620,58 @@ void func_803873DC(Actor *actor, f32 arg1, f32 arg2) { } } -s32 func_80387470(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { +bool func_80387470(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { f32 dt; - TUPLE(f32, vec) diff; + f32 diff[3]; TUPLE(f32, pos) temp; - TUPLE(f32, pos) next; + f32 next[3]; dt = time_getDelta(); - diff.vec_x = arg1[0] - this->position_x; - diff.vec_y = arg1[1] - this->position_y; - diff.vec_z = arg1[2] - this->position_z; + diff[0] = arg1[0] - this->position[0]; + diff[1] = arg1[1] - this->position[1]; + diff[2] = arg1[2] - this->position[2]; if (arg5 != 0.00f) { if (ml_vec3f_distance(this->position, arg1) < arg5) { - ml_vec3f_set_length(diff.vec, arg3 * 4.00f); + ml_vec3f_set_length(diff, arg3 * 4.00f); } else { - ml_vec3f_set_length(diff.vec, arg3 * 1.00f); + ml_vec3f_set_length(diff, arg3 * 1.00f); } } else { - ml_vec3f_set_length(diff.vec, arg3); + ml_vec3f_set_length(diff, arg3); } - this->position_x += (this->velocity_x * dt) + (diff.vec_x * dt * dt); - this->position_y += (this->velocity_y * dt) + (diff.vec_y * dt * dt); - this->position_z += (this->velocity_z * dt) + (diff.vec_z * dt * dt); + this->position[0] += (this->velocity[0] * dt) + (diff[0] * dt * dt); + this->position[1] += (this->velocity[1] * dt) + (diff[1] * dt * dt); + this->position[2] += (this->velocity[2] * dt) + (diff[2] * dt * dt); - this->velocity_x += (diff.vec_x * dt); - this->velocity_y += (diff.vec_y * dt); - this->velocity_z += (diff.vec_z * dt); + this->velocity[0] += (diff[0] * dt); + this->velocity[1] += (diff[1] * dt); + this->velocity[2] += (diff[2] * dt); - // has to be z^2 + (x^2 + y^2) for whacky compiler reasons ? Is there a Macro for this ? - if (v_max < gu_sqrtf( - (this->velocity_z * this->velocity_z) + - ((this->velocity_x * this->velocity_x) + - (this->velocity_y * this->velocity_y)) )) { - + if (v_max < gu_sqrtf(LENGTH_SQ_VEC3F(this->velocity))) { ml_vec3f_set_length(this->velocity, v_max); } - next.pos_x = this->velocity_x + this->position_x; - next.pos_y = this->velocity_y + this->position_y; - next.pos_z = this->velocity_z + this->position_z; + next[0] = this->position[0] + this->velocity[0]; + next[1] = this->position[1] + this->velocity[1]; + next[2] = this->position[2] + this->velocity[2]; - func_80258A4C(this->position, this->yaw - 90.0f, &next.pos_x, &temp.pos_z, &temp.pos_y, &temp.pos_x); + func_80258A4C(this->position, this->yaw - 90.0f, next, &temp.pos_z, &temp.pos_y, &temp.pos_x); this->yaw += (arg4 * temp.pos_x * dt); if (ml_vec3f_distance(this->position, arg1) < arg6) { - return 1; + return TRUE; } - return 0; + return FALSE; } void func_8038770C(Actor *actor) { ActorLocal_fight_180 *local; local = (ActorLocal_fight_180 *)&actor->local; - local->unk1 = 0; + local->hits = 0; local->unk2 = 0; local->unk3 = 0; local->unk4 = 0; @@ -694,24 +679,24 @@ void func_8038770C(Actor *actor) { local->unkA = 0; } -void func_80387728(ActorMarker *this, u32 arg1) +void chfinalboss_setPhase(ActorMarker *this, u32 phase_id) { Actor *actor = marker_getActor(this); ActorLocal_fight_180 *local = (ActorLocal_fight_180 *) &actor->local; - local->unk0 = arg1; + local->phase = phase_id; func_8038770C(actor); func_80386600(actor->marker, 0); func_80386628(actor->marker, 1); - switch(arg1) + switch(phase_id) { case 0: func_80328B8C(actor, 1, 0.0001f, 1); timed_setCameraToNode(0.0f, 0); func_80324E88(2.0f); timed_setCameraToNode(2.0f, 1); - timedFunc_set_1(2.0f, (TFQM1)func_8038B780, reinterpret_cast(s32, actor->marker)); + timedFunc_set_1(2.0f, (GenMethod_1)func_8038B780, reinterpret_cast(s32, actor->marker)); return; case 1: @@ -728,7 +713,7 @@ void func_80387728(ActorMarker *this, u32 arg1) sfxsource_setSfxId(actor->unk44_31, SFX_152_MOTOR_BREAKDOWN_01); func_8030DD14(actor->unk44_31, 3); func_8030DBB4(actor->unk44_31, 1.0f); - sfxsource_setSampleRate(actor->unk44_31, 0x7D00); + sfxsource_setSampleRate(actor->unk44_31, 32000); } return; @@ -761,7 +746,7 @@ void func_80387728(ActorMarker *this, u32 arg1) case 5: func_80386628(actor->marker, 0); - func_8038AC88(actor, 0x24); + chfinalboss_phase5_setState(actor, 0x24); actor_loopAnimation(actor); } } @@ -795,7 +780,7 @@ void func_80387B00(Actor *this) { ); ml_vec3f_normalize(this->velocity); - this->yaw_moving = func_8025715C(this->velocity_x, this->velocity_z) + 180.0f; + this->yaw_ideal = func_8025715C(this->velocity_x, this->velocity_z) + 180.0f; local->unk18 = this->position_y; local->unk1C = (f64) sp28[1]; @@ -898,7 +883,7 @@ void func_803880A0(Actor *actor, f32 arg1) { } void func_803880E0(ActorMarker *marker, enum asset_e text_id, s32 arg2) { - func_80388184(marker_getActor(marker), 0xC); + chfinalboss_phase1_setState(marker_getActor(marker), 0xC); } void func_80388110(ActorMarker *marker, enum asset_e text_id, s32 arg2) { @@ -912,7 +897,7 @@ void func_80388110(ActorMarker *marker, enum asset_e text_id, s32 arg2) { actorLocal->unk9 = (u8)1; } -void func_80388184(Actor *this, s32 next_state) { +void chfinalboss_phase1_setState(Actor *this, s32 next_state) { ActorLocal_fight_180 *local; s32 sp40; f32 sp3C; @@ -921,7 +906,7 @@ void func_80388184(Actor *this, s32 next_state) { local = (ActorLocal_fight_180 *)&this->local; sp40 = func_8023DB5C(); sp3C = animctrl_getAnimTimer(this->animctrl); - local->unk0 = 1; + local->phase = 1; func_80328B8C(this, next_state, 0.0001f, 1); actor_loopAnimation(this); func_80386600(this->marker, 0); @@ -978,8 +963,8 @@ void func_80388184(Actor *this, s32 next_state) { break; case 13: func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - if ((s32) local->unk1 >= 4) { - func_802C3C88((GenMethod_1)func_80386DE4, reinterpret_cast(s32, this->marker)); + if ((s32) local->hits >= 4) { + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); func_80388110(this->marker, 0, 0); } break; @@ -1034,7 +1019,7 @@ s32 func_8038871C(Actor *arg0, f32 arg1, f32 arg2) { } } -void func_80388758(ActorMarker *marker) { +void chfinalboss_phase1_update(ActorMarker *marker) { Actor *this; ActorLocal_fight_180 *local; f32 sp54; @@ -1052,7 +1037,7 @@ void func_80388758(ActorMarker *marker) { func_80387ACC(this, 60.0f * sp54); func_80387F70(this, this->unk1C, 950.0f); if (func_80387470(this, this->unk1C, 1000.0f, 1800.0f, 200.0f, 1000.0f, 600.0f)) { - func_80388184(this, 3); + chfinalboss_phase1_setState(this, 3); this->unk1C[0] = D_803927D0[local->unk5][0]; this->unk1C[1] = D_803927D0[local->unk5][1]; this->unk1C[2] = D_803927D0[local->unk5][2]; @@ -1064,7 +1049,7 @@ void func_80388758(ActorMarker *marker) { sp50 = ml_map_f(ml_vec3f_distance(this->position, this->unk1C), 300.0f, 1000.0f, 100.0f, 1000.0f); func_80387ACC(this, 60.0f * sp54); if (func_80387470(this, this->unk1C, sp50, 1800.0f, 200.0f, 500.0f, 300.0f)) { - func_80388184(this, 4); + chfinalboss_phase1_setState(this, 4); } break; case 4: @@ -1072,7 +1057,7 @@ void func_80388758(ActorMarker *marker) { func_803869BC(this); func_80387ACC(this, 60.0f * sp54); if (func_80386BEC(this, 240.0f * sp54)) { - func_80388184(this, 5); + chfinalboss_phase1_setState(this, 5); func_80386654(1.0f, D_80391380, D_80391390); } break; @@ -1088,15 +1073,15 @@ void func_80388758(ActorMarker *marker) { func_80387BFC(this, 45.0f * sp54); func_80328FB0(this, 30.0f * sp54); if (this->unk60 > 1.0) { - func_80388184(this, 6); + chfinalboss_phase1_setState(this, 6); } break; case 6: func_803869BC(this); - if (local->unk4 >= (local->unk1 + 1)) { - this->unk28 += (D_80391738[local->unk1] * sp54) * 0.66; + if (local->unk4 >= (local->hits + 1)) { + this->unk28 += (D_80391738[local->hits] * sp54) * 0.66; } else { - this->unk28 += D_80391738[local->unk1] * sp54; + this->unk28 += D_80391738[local->hits] * sp54; } local->unk20 -= this->unk28 * sp54; func_80387BFC(this, 180.0f * sp54); @@ -1116,16 +1101,16 @@ void func_80388758(ActorMarker *marker) { this->velocity[2] = this->position[2] - sp40[2]; this->velocity[1] = 0.0f; ml_vec3f_normalize(this->velocity); - this->yaw_moving = func_8025715C(this->velocity[0], this->velocity[2]) + 180.0f; + this->yaw_ideal = func_8025715C(this->velocity[0], this->velocity[2]) + 180.0f; } if (local->unk20 < 0.0) { - var_a0 = (local->unk1 == 0) ? 1 : 0; - if (local->unk4 >= (var_a0 + local->unk1)) { - func_80388184(this, 8); + var_a0 = (local->hits == 0) ? 1 : 0; + if (local->unk4 >= (var_a0 + local->hits)) { + chfinalboss_phase1_setState(this, 8); local->unk4 = 0; } else{ - func_80388184(this, 7); + chfinalboss_phase1_setState(this, 7); local->unk4++; } } @@ -1137,7 +1122,7 @@ void func_80388758(ActorMarker *marker) { func_80387BFC(this, 180.0f * sp54); func_80328FB0(this, 30.0f * sp54); if (this->unk28 < 0) { - func_80388184(this, 4); + chfinalboss_phase1_setState(this, 4); func_80386654(1.5f, D_80391390, D_80391380); } break; @@ -1150,7 +1135,7 @@ void func_80388758(ActorMarker *marker) { func_80387D4C(this); func_80328FB0(this, 30.0f * sp54); if (this->unk28 < 0) { - func_80388184(this, 9); + chfinalboss_phase1_setState(this, 9); func_80386654(2.0f, D_80391390, D_80391380); this->unk60 = 4.0f; } @@ -1162,7 +1147,7 @@ void func_80388758(ActorMarker *marker) { } else{ if (actor_animationIsAt(this, 0.9999f)) { - func_80388184(this, 2); + chfinalboss_phase1_setState(this, 2); func_803880A0(this, 2000.0f); } } @@ -1173,7 +1158,7 @@ void func_80388758(ActorMarker *marker) { func_8038871C(this, 460.0f, 400.0f * sp54); func_80387340(this, 1.0f); if (actor_animationIsAt(this, 0.9999f)) { - func_80388184(this, 2); + chfinalboss_phase1_setState(this, 2); func_803880A0(this, 2000.0f); } break; @@ -1192,36 +1177,36 @@ void func_80388758(ActorMarker *marker) { if (actor_animationIsAt(this, 0.9999f)) { func_8030DA44(this->unk44_31); this->unk44_31 = 0U; - func_80387728(this->marker, 2); + chfinalboss_setPhase(this->marker, 2); } break; case 13: func_80387ACC(this, 60.0f * sp54); func_80386BEC(this, 30.0f); if (actor_animationIsAt(this, 0.9999f)) { - if (local->unk1 >= 4) { - func_80388184(this, 0xB); + if (local->hits >= 4) { + chfinalboss_phase1_setState(this, 0xB); } else{ - func_80388184(this, 0xA); + chfinalboss_phase1_setState(this, 0xA); } } break; } } -void func_803891E4(Actor *this, s32 arg1){ +void chfinalboss_phase2_setState(Actor *this, s32 arg1){ ActorLocal_fight_180 *local; s32 sp28; local = (ActorLocal_fight_180 *)&this->local; sp28 = func_8023DB5C(); - local->unk0 = 2; + local->phase = 2; func_80328B8C(this, arg1, 0.0001f, 1); actor_loopAnimation(this); switch (arg1) { case 14: - local->unk5 = local->unk1 + 8; + local->unk5 = local->hits + 8; this->unk1C[0] = D_803927D0[local->unk5][0]; this->unk1C[1] = D_803927D0[local->unk5][1]; this->unk1C[2] = D_803927D0[local->unk5][2]; @@ -1245,11 +1230,11 @@ void func_803891E4(Actor *this, s32 arg1){ } } -void func_80389358(ActorMarker *marker, enum asset_e text_id, s32 arg2) { - func_802C3C88((GenMethod_1)func_80386E5C, reinterpret_cast(s32, marker)); +void chfinalboss_phase2_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { + SPAWNQUEUE_ADD_1(chfinalboss_spawnFlightPad, marker); } -void func_8038938C(ActorMarker *marker) { +void chfinalboss_phase2_update(ActorMarker *marker) { Actor *this; ActorLocal_fight_180 *local; f32 sp4C; @@ -1258,27 +1243,27 @@ void func_8038938C(ActorMarker *marker) { this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; sp4C = time_getDelta(); - sp48 = local->unk1; + sp48 = local->hits; switch (this->state) { case 14: func_803869BC(this); func_80387ACC(this, 30.0f * sp4C); if (func_80387470(this, this->unk1C, ml_map_f(ml_vec3f_distance(this->position, this->unk1C), 70.0f, 1000.0f, 100.0f, D_80391758[sp48]), D_80391758[sp48] * 2, 160.0f, 500.0f, 70.0f)) { local->unkA = 1; - func_803891E4(this, 0xF); + chfinalboss_phase2_setState(this, 0xF); } break; case 15: if (func_80386BEC(this, 9.0f)) { - func_803891E4(this, 0x10); + chfinalboss_phase2_setState(this, 0x10); } break; case 16: func_80386BEC(this, 3.0f); func_80387340(this, 1.3f); if (actor_animationIsAt(this, 0.9999f)) { - func_803891E4(this, 0x12); + chfinalboss_phase2_setState(this, 0x12); local->unk3++; if (local->unk3 >= 4) { local->unk3 = 0U; @@ -1293,7 +1278,7 @@ void func_8038938C(ActorMarker *marker) { func_80386BEC(this, 3.0f); func_803873DC(this, 1200.0f, 2400.0f); if (actor_animationIsAt(this, 0.9999f)) { - func_80387728(this->marker, 3); + chfinalboss_setPhase(this->marker, 3); } break; case 18: @@ -1303,23 +1288,23 @@ void func_8038938C(ActorMarker *marker) { break; } if (func_80386BEC(this, 3.0f)) { - func_803891E4(this, 0x10); + chfinalboss_phase2_setState(this, 0x10); } break; case 19: if (actor_animationIsAt(this, 0.9999f)) { - func_803891E4(this, 0xE); + chfinalboss_phase2_setState(this, 0xE); } break; case 20: if (actor_animationIsAt(this, 0.9999f)) { - if (local->unk1 >= 4) { + if (local->hits >= 4) { func_80311480(randi2(0, 5) + 0x1115, 0x20, NULL, NULL, NULL, NULL); - func_80311480(randi2(0, 3) + 0x111A, 4, NULL, this->marker, NULL, func_80389358); - func_803891E4(this, 0x11); + func_80311480(randi2(0, 3) + 0x111A, 4, NULL, this->marker, NULL, chfinalboss_phase2_endTextCallback); + chfinalboss_phase2_setState(this, 0x11); } else{ - func_803891E4(this, 0xE); + chfinalboss_phase2_setState(this, 0xE); func_803880A0(this, 2000.0f); } } @@ -1327,83 +1312,77 @@ void func_8038938C(ActorMarker *marker) { } } -void func_80389720(s32 arg0) { - //wrap to D_80392750; +void __chfinalboss_spawnStatue(enum bossjinjo_e statue_id) { static f32 D_80392750; s32 pad24_A; s32 pad20_A; Actor *sp1C; ActorLocal_fight_180 *local; - // f32 tmp_a2; - local = (ActorLocal_fight_180 *)&func_80326EEC(0x38B)->local; + local = (ActorLocal_fight_180 *)&func_80326EEC(ACTOR_38B_GRUNTILDA_FINAL_BOSS)->local; - switch (arg0) { - case 1: - sp1C = func_8032813C(0x3A2, D_80391768, 0x87); - D_803927B0[0] = sp1C->marker; + switch (statue_id) { + case BOSSJINJO_ORANGE: + sp1C = func_8032813C(ACTOR_3A2_JINJO_STATUE_BASE, D_80391768, 135); + __chFinalBossJinjoStatueMarker[0] = sp1C->marker; break; - case 2: - sp1C = func_8032813C(0x3A2, D_80391774, 0x2D); - D_803927B0[1] = sp1C->marker; + + case BOSSJINJO_GREEN: + sp1C = func_8032813C(ACTOR_3A2_JINJO_STATUE_BASE, D_80391774, 45); + __chFinalBossJinjoStatueMarker[1] = sp1C->marker; break; - case 3: - sp1C = func_8032813C(0x3A2, D_80391780, 0x13B); - D_803927B0[2] = sp1C->marker; + + case BOSSJINJO_PINK: + sp1C = func_8032813C(ACTOR_3A2_JINJO_STATUE_BASE, D_80391780, 315); + __chFinalBossJinjoStatueMarker[2] = sp1C->marker; break; - case 4: - sp1C = func_8032813C(0x3A2, D_8039178C, 0xE1); - D_803927B0[3] = sp1C->marker; + + case BOSSJINJO_YELLOW: + sp1C = func_8032813C(ACTOR_3A2_JINJO_STATUE_BASE, D_8039178C, 225); + __chFinalBossJinjoStatueMarker[3] = sp1C->marker; break; - case 5: - //closest non-static match - // {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); + + case BOSSJINJO_JINJONATOR: + D_80392750 = ((local->mirror_phase5) ? 0.0f : 180.0f); + sp1C = func_8032813C(ACTOR_3A9_JINJONATOR_STATUE_BASE, D_80391798, (s32)D_80392750); break; } - sp1C->unk60 = (arg0 == 5) ? 5.25f : 1.54f; - sp1C->unkF4_8 = arg0; + sp1C->unk60 = (statue_id == BOSSJINJO_JINJONATOR) ? 5.25f : 1.54f; + sp1C->unkF4_8 = statue_id; } -void func_803898A4(s32 arg0) { - s32 *arg0ptr = &arg0; // Does not match without the pointer - func_802C3C88(&func_80389720, *arg0ptr); +void chfinalboss_spawnStatue(s32 statue_id) { + SPAWNQUEUE_ADD_1(__chfinalboss_spawnStatue, statue_id); } -void func_803898D0(ActorMarker *marker) { +void __chfinalboss_spawnSpellBarrier(ActorMarker *marker) { Actor *actor; actor = marker_getActor(marker); - actor->unk100 = spawn_child_actor(0x3AB, &actor)->marker; - D_803927C5 = (u8)1; + actor->unk100 = spawn_child_actor(ACTOR_3AB_GRUNTY_SPELL_BARRIER, &actor)->marker; + __chFinalBossSpellBarrierActive = TRUE; } -void func_80389918(ActorMarker *arg0) { - func_802C3C88((GenMethod_1)func_803898D0, reinterpret_cast(s32, arg0)); +void chfinalboss_spawnSpellBarrier(ActorMarker *arg0) { + SPAWNQUEUE_ADD_1(__chfinalboss_spawnSpellBarrier, arg0); } -void func_80389944(ActorMarker *marker, enum asset_e text_id, s32 arg2) { +void chfinalboss_phase3_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { Actor *actor; actor = marker_getActor(marker); func_802BAE4C(); func_80324E38(0, 0); - func_80387728(actor->marker, 4); + chfinalboss_setPhase(actor->marker, 4); } -void func_8038998C(Actor *this, s32 arg1) { +void chfinalboss_phase3_setState(Actor *this, s32 arg1) { ActorLocal_fight_180 *local; s32 i; local = (ActorLocal_fight_180 *)&this->local; - local->unk0 = 3; + local->phase = 3; func_80328B8C(this, arg1, 0.0001f, 1); switch (arg1) { case 21: @@ -1428,13 +1407,13 @@ void func_8038998C(Actor *this, s32 arg1) { case 26: func_80386CF8(this); func_80324E38(0.0f, 1); - func_80311480(randi2(0, 5) + 0x112C, 0xA8, NULL, this->marker, func_80389944, NULL); + func_80311480(randi2(0, 5) + 0x112C, 0xA8, NULL, this->marker, chfinalboss_phase3_endTextCallback, NULL); break; } } -void func_80389B44(ActorMarker *marker) { - func_802C3C88((GenMethod_1)func_80386DE4, reinterpret_cast(s32, marker)); +void chfinalboss_dropHealth(ActorMarker *marker) { + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, marker); } //exploded for .bss matching @@ -1490,7 +1469,10 @@ u8 D_8039286C[0x4C]; f32 D_803928B8[2]; -void func_80389B70(ActorMarker *marker) { +void chfinalboss_phase3_update(ActorMarker *marker) { + static f32 D_803917A4[4] = {500.0f, 650.0f, 800.0f, 950.0f}; + static f32 D_803917B4[4] = {3.75f, 3.0f, 2.25f, 1.5f}; + static s32 D_803917C4[3] = {230, 230, 230}; Actor *this; ActorLocal_fight_180 *local; f32 sp3C; @@ -1502,12 +1484,10 @@ void func_80389B70(ActorMarker *marker) { u32 temp_t0; u8 temp_v0_2; - - this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; sp3C = time_getDelta(); - sp38 = local->unk1; + sp38 = local->hits; sp34 = animctrl_getAnimTimer(this->animctrl); switch (this->state) { case 21: @@ -1515,32 +1495,32 @@ void func_80389B70(ActorMarker *marker) { this->unk60 -= sp3C; if (this->unk60 < 0.0) { if (local->unkA) { - func_8038998C(this, 0x17); + chfinalboss_phase3_setState(this, 0x17); } else { - func_8038998C(this, 0x16); - this->unk60 = D_803917B4[local->unk1]; + chfinalboss_phase3_setState(this, 0x16); + this->unk60 = D_803917B4[local->hits]; } local->unkA = NOT(local->unkA); break; } if (func_80387470(this, this->unk1C, D_803917A4[sp38], D_803917A4[sp38], 120.0f, 520.0f, 350.0f)) { - func_8038998C(this, 0x15); + chfinalboss_phase3_setState(this, 0x15); if (local->unkB == 0) { local->unkB = 1; - timedFunc_set_1(1.2f, (TFQM1)func_80389B44, (s32) this->marker); + timedFunc_set_1(1.2f, (GenMethod_1)chfinalboss_dropHealth, (s32) this->marker); } } break; case 22: this->unk60 -= sp3C; if (this->unk60 < 0.0) { - func_8038998C(this, 0x15); + chfinalboss_phase3_setState(this, 0x15); this->unk60 = 5.0f; } break; case 23: if (func_80386BEC(this, 9.0f) && (func_80297C6C() != 3)) { - func_8038998C(this, 0x18); + chfinalboss_phase3_setState(this, 0x18); } break; case 24: @@ -1549,20 +1529,20 @@ void func_80389B70(ActorMarker *marker) { local->unk3++; } if (actor_animationIsAt(this, 0.9999f)) { - if (local->unk3 >= local->unk1) { - if (local->unk1 >= 4) { - func_8038998C(this, 0x1A); + if (local->unk3 >= local->hits) { + if (local->hits >= 4) { + chfinalboss_phase3_setState(this, 0x1A); } else{ this->unk60 = 5.0f; - func_8038998C(this, 0x15); + chfinalboss_phase3_setState(this, 0x15); } } } break; case 25: if (actor_animationIsAt(this, 0.9999f)) { - func_8038998C(this, 0x17); + chfinalboss_phase3_setState(this, 0x17); } break; case 26: @@ -1576,12 +1556,12 @@ void func_80389B70(ActorMarker *marker) { func_80386934(D_803928B8, 0x716); } if (actor_animationIsAt(this, 0.38f) ) { - func_80389918(this->marker); + chfinalboss_spawnSpellBarrier(this->marker); } if (actor_animationIsAt(this, 0.9999f)) { func_80324D2C(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER); - func_80386E34(); - func_8038998C(this, 0x1B); + chfinalboss_despawnFlightPad(); + chfinalboss_phase3_setState(this, 0x1B); } break; case 27: @@ -1591,23 +1571,20 @@ void func_80389B70(ActorMarker *marker) { void func_80389F54(void) { - func_80320004(0xD2, 1); + func_80320004(BKPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT, TRUE); D_803927C4 = (u8)0; } -void func_80389F7C(Actor *this, s32 arg1) { +void chfinalboss_phase4_setState(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; sp48 = animctrl_getAnimTimer(this->animctrl); - local->unk0 = 4; + local->phase = 4; func_80328B8C(this, arg1, 0.0001f, 1); switch (arg1) { case 28: @@ -1621,20 +1598,20 @@ void func_80389F7C(Actor *this, s32 arg1) { if ((local->unk3 == 2) && (local->unkA == 0)) { D_803927C8 = 1; func_80311480(randi2(0, 5) + 0x1136, 4, NULL, NULL, NULL, NULL); - if (func_8031FF1C(0xD2) == 0) { + if ( !func_8031FF1C(BKPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) ) { local->unkA = 1U; D_803927C4 = 1; func_80324E38(0.0f, 1); - timedFunc_set_1(0.0f, func_803898A4, 1); + timedFunc_set_1(0.0f, chfinalboss_spawnStatue, BOSSJINJO_ORANGE); timed_setCameraToNode(0.0f, 4); func_80324E88(2.2f); - timedFunc_set_1(2.2f, func_803898A4, 2); + timedFunc_set_1(2.2f, chfinalboss_spawnStatue, BOSSJINJO_GREEN); timed_setCameraToNode(2.2f, 5); func_80324E88(4.4f); - timedFunc_set_1(4.4f, func_803898A4, 3); + timedFunc_set_1(4.4f, chfinalboss_spawnStatue, BOSSJINJO_PINK); timed_setCameraToNode(4.4f, 6); func_80324E88(6.6f); - timedFunc_set_1(6.6f, func_803898A4, 4); + timedFunc_set_1(6.6f, chfinalboss_spawnStatue, BOSSJINJO_YELLOW); timed_setCameraToNode(6.6f, 7); func_80324E88(8.8f); timedFunc_set_0(8.8f, func_80389F54); @@ -1642,7 +1619,7 @@ void func_80389F7C(Actor *this, s32 arg1) { break; } for(D_803928C4 = 1; D_803928C4 < 5; D_803928C4++){ - func_803898A4(D_803928C4); + chfinalboss_spawnStatue(D_803928C4); } } break; @@ -1654,21 +1631,21 @@ void func_80389F7C(Actor *this, s32 arg1) { case 33: FUNC_8030E624(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000); timed_playSfx(0.6f, SFX_61_CARTOONY_FALL, 1.0f, 32000); - func_802C3C88(func_80386DE4, this->marker); + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); FUNC_8030E624(SFX_D9_WOODEN_CRATE_BREAKING_1, 1.0f, 32000); func_80386628(this->marker, 0); - func_803866E4(this->position, 0x552, 1); - func_803866E4(this->position, 0x553, 0xC); - func_803866E4(this->position, 0x554, 0x14); - func_803866E4(this->position, 0x555, 2); - sp3C[0] = D_803927D0[local->unk7 + 0x11][0] - this->position[0]; - sp3C[1] = D_803927D0[local->unk7 + 0x11][1] - this->position[1]; - sp3C[2] = D_803927D0[local->unk7 + 0x11][2] - this->position[2]; + chfinalboss_spawnBroomstickParticles(this->position, ASSET_552_MODEL_BROOMSTICK_PIECE_HEAD, 1); + chfinalboss_spawnBroomstickParticles(this->position, ASSET_553_MODEL_BROOMSTICK_PIECE_SHORT, 12); + chfinalboss_spawnBroomstickParticles(this->position, ASSET_554_MODEL_BROOMSTICK_PIECE_LONG, 20); + chfinalboss_spawnBroomstickParticles(this->position, ASSET_555_MODEL_BROOMSTICK_PIECE_EYE, 2); + sp3C[0] = D_803927D0[local->mirror_phase5 + 0x11][0] - this->position[0]; + sp3C[1] = D_803927D0[local->mirror_phase5 + 0x11][1] - this->position[1]; + sp3C[2] = D_803927D0[local->mirror_phase5 + 0x11][2] - this->position[2]; this->velocity[0] = sp3C[0] / 1.7; this->velocity[1] = sp3C[1] / 1.7 - -1190.0; this->velocity[2] = sp3C[2] / 1.7; func_8028F94C(2, this->position, local); - if (local->unk7 == 0) { + if (local->mirror_phase5 == 0) { timed_setCameraToNode(0.0f, 0xA); func_80324E88(1.7f); timed_setCameraToNode(1.7f, 0xB); @@ -1691,9 +1668,9 @@ void func_80389F7C(Actor *this, s32 arg1) { func_8030DBB4(this->unk44_31, D_803927C0); sfxsource_setSampleRate(this->unk44_31, 26000); for(i = 0; i < 4; i++){ - if(D_803927B0[i] != NULL){ - marker_despawn(D_803927B0[i]); - D_803927B0[i] = NULL; + if(__chFinalBossJinjoStatueMarker[i] != NULL){ + marker_despawn(__chFinalBossJinjoStatueMarker[i]); + __chFinalBossJinjoStatueMarker[i] = NULL; } } break; @@ -1702,20 +1679,26 @@ void func_80389F7C(Actor *this, s32 arg1) { f32 D_803928C8[3]; -ActorMarker *func_8038A4E8(Actor *this, f32 arg1) { - Actor *actor; +ActorMarker *chfinalboss_findCollidingJinjo(Actor *this, f32 arg1) { + Actor *jinjo; Prop *prop; - u32 temp_t0; + enum marker_e jinjo_marker_id; func_80320ED8(this->marker, arg1, 1); prop = func_8032F528(); while(prop !=NULL){ if (prop->markerFlag){ - actor = marker_getActor(prop->actorProp.marker); - temp_t0 = actor->marker->unk14_20; - if((temp_t0 == 0x27B) || (temp_t0 == 0x27C) || (temp_t0 == 0x27D) || (temp_t0 == 0x27E) || (temp_t0 == 0x285)) { + jinjo = marker_getActor(prop->actorProp.marker); + jinjo_marker_id = jinjo->marker->unk14_20; + if( + (jinjo_marker_id == MARKER_27B_BOSS_JINJO_ORANGE) + || (jinjo_marker_id == MARKER_27C_BOSS_JINJO_GREEN) + || (jinjo_marker_id == MARKER_27D_BOSS_JINJO_PINK) + || (jinjo_marker_id == MARKER_27E_BOSS_JINJO_YELLOW) + || (jinjo_marker_id == MARKER_285_JINJONATOR) + ) { while (func_8032F528() != NULL) {} - return actor->marker; + return jinjo->marker; } } prop = func_8032F528(); @@ -1723,7 +1706,7 @@ ActorMarker *func_8038A4E8(Actor *this, f32 arg1) { return NULL; } -void func_8038A5F4(ActorMarker *marker) { +void chfinalboss_phase4_update(ActorMarker *marker) { Actor *this; ActorLocal_fight_180 *local; f32 sp74; @@ -1739,44 +1722,45 @@ void func_8038A5F4(ActorMarker *marker) { this = marker_getActor(marker); local = (ActorLocal_fight_180 *) &this->local; sp74 = time_getDelta(); - sp70 = local->unk1; - sp6C = func_8038A4E8(this, func_8033229C(this->marker)); + sp70 = local->hits; + sp6C = chfinalboss_findCollidingJinjo(this, func_8033229C(this->marker)); if (sp6C != NULL) { - func_8038D214(sp6C); - if (!func_8031FF1C(0xD1)) { - func_80320004(0xD1, 1); + chbossjinjo_attack(sp6C); + if (!func_8031FF1C(BKPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT)) { + func_80320004(BKPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT, TRUE); D_803927C4 = 0; func_80324E88(1.0f); func_80324E38(1.0f, 0); } - if (local->unk1 == 0) { + if (local->hits == 0) { func_80311480(randi2(0, 5) + 0x1140, 0x20, NULL, NULL, NULL, NULL); } - if ((local->unk1 + 1) < 4) { - local->unk1++; - func_80389F7C(this, 0x20); - return; + if ((local->hits + 1) < 4) { + local->hits++; + chfinalboss_phase4_setState(this, 0x20); } - temp_t6 = marker_getActor(sp6C)->marker->unk14_20; - if ((temp_t6 == 0x27B) || (temp_t6 == 0x27E)) { - local->unk7 = FALSE; - } else { - local->unk7 = TRUE; + else{ + temp_t6 = marker_getActor(sp6C)->marker->unk14_20; + if ((temp_t6 == MARKER_27B_BOSS_JINJO_ORANGE) || (temp_t6 == MARKER_27E_BOSS_JINJO_YELLOW)) { + local->mirror_phase5 = FALSE; + } else { + local->mirror_phase5 = TRUE; + } + chfinalboss_phase4_setState(this, 0x21); } - func_80389F7C(this, 0x21); return; } switch (this->state) { case 28: func_803869BC(this); if (func_80387470(this, this->unk1C, 500.0f, 1000.0f, 140.0f, 500.0f, 120.0f)) { - func_80389F7C(this, 0x1D); + chfinalboss_phase4_setState(this, 0x1D); } break; case 29: if ((func_80386BEC(this, 9.0f)) && (func_80297C6C() != 3) && (D_803927C4 == 0)) { - func_80389F7C(this, 0x1E); + chfinalboss_phase4_setState(this, 0x1E); } break; @@ -1785,12 +1769,14 @@ void func_8038A5F4(ActorMarker *marker) { if (D_803927C4 == 0) { func_80387340(this, 1.0f); if (actor_animationIsAt(this, 0.9999f)) { + static f32 D_803917D0[4] = {2.4f, 2.1f, 1.8f, 1.5f}; + local->unk3++; - func_80389F7C(this, 0x1F); + chfinalboss_phase4_setState(this, 0x1F); this->unk60 = D_803917D0[sp70]; } } else { - func_80389F7C(this, 0x1D); + chfinalboss_phase4_setState(this, 0x1D); } break; @@ -1801,13 +1787,13 @@ void func_8038A5F4(ActorMarker *marker) { break; } if (func_80386BEC(this, 3.0f)) { - func_80389F7C(this, 0x1E); + chfinalboss_phase4_setState(this, 0x1E); } break; case 32: if (actor_animationIsAt(this, 0.9999f)) { - func_80389F7C(this, 0x1C); + chfinalboss_phase4_setState(this, 0x1C); } break; @@ -1816,15 +1802,15 @@ void func_8038A5F4(ActorMarker *marker) { sp5C[0] = this->position[0] + (this->velocity[0] * sp74); sp5C[1] = this->position[1] + (this->velocity[1] * sp74); sp5C[2] = this->position[2] + (this->velocity[2] * sp74); - temp_f2 = func_80309724(&sp5C); + temp_f2 = func_80309724(sp5C); if (sp5C[1] < temp_f2) { this->position[0] = sp5C[0]; this->position[1] = sp5C[1]; this->position[2] = sp5C[2]; this->position[1] = temp_f2; - func_80389F7C(this, 0x22); - func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 0x7D00); - func_8030E6A4(SFX_132_GRUNTY_YOW, randf2(0.95f, 1.05f), 0x7D00); + chfinalboss_phase4_setState(this, 0x22); + func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); + func_8030E6A4(SFX_132_GRUNTY_YOW, randf2(0.95f, 1.05f), 32000); } else{ this->position[0] = sp5C[0]; @@ -1837,24 +1823,24 @@ void func_8038A5F4(ActorMarker *marker) { case 34: sp58 = animctrl_getAnimTimer(this->animctrl); if (actor_animationIsAt(this, 0.17f) != 0) { - func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 0x7D00); - func_8030E6A4(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 0x7D00); + func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); + func_8030E6A4(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 32000); } if (actor_animationIsAt(this, 0.1f) != 0) { - func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 0x7D00); - func_8030E6A4(SFX_12A_GRUNTY_AH, randf2(0.95f, 1.05f), 0x7D00); + func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); + func_8030E6A4(SFX_12A_GRUNTY_AH, randf2(0.95f, 1.05f), 32000); } if ((sp58 >= 0.4) && (sp58 <= 0.65)) { func_8030DBB4(this->unk44_31, ((D_803927C0 += 0.005) > 1.99) ? 1.99 : (D_803927C0 += 0.005)); func_8030E2C4(this->unk44_31); } if (actor_animationIsAt(this, 0.56f)) { - func_8030E6A4(SFX_C5_TWINKLY_POP, randf2(0.95f, 1.05f), 0x7D00); + func_8030E6A4(SFX_C5_TWINKLY_POP, randf2(0.95f, 1.05f), 32000); } else if (actor_animationIsAt(this, 0.9999f)) { func_80324E88(0.0f); func_80324E38(0.0f, 0); - func_80387728(this->marker, 5); + chfinalboss_setPhase(this->marker, 5); func_8030DA44(this->unk44_31); this->unk44_31 = 0U; } @@ -1868,7 +1854,7 @@ void func_8038AC50(ActorMarker *arg0) { func_80328B8C(marker_getActor(arg0), 0x24, 0.0001f, 1); } -void func_8038AC88(Actor *this, s32 arg1) { +void chfinalboss_phase5_setState(Actor *this, s32 next_state) { ActorLocal_fight_180 *local; s32 sp28; u8 temp_v0; @@ -1877,24 +1863,24 @@ void func_8038AC88(Actor *this, s32 arg1) { local = (ActorLocal_fight_180 *)&this->local; sp28 = 0x12; - local->unk0 = 5; - func_80328B8C(this, arg1, 0.0001f, 1); - switch (arg1) { + local->phase = 5; + func_80328B8C(this, next_state, 0.0001f, 1); + switch (next_state) { case 35: func_80311480(randi2(0, 5) + 0x114F, 4, NULL, NULL, NULL, NULL); - if (local->unk7) { + if (local->mirror_phase5) { sp28 = 0x13; } func_8028F94C(2, this->position); - timedFunc_set_1(0.0f, func_803898A4, 5); + timedFunc_set_1(0.0f, chfinalboss_spawnStatue, 5); timed_setCameraToNode(0.0f, sp28); func_80324E88(7.5f); - timedFunc_set_1(7.5f, func_8038AC50, (s32) this->marker); + timedFunc_set_1(7.5f, (GenMethod_1)func_8038AC50, (s32) this->marker); func_80324E38(7.5f, 0); break; case 36: - func_8038AC50((s32) this->marker); + func_8038AC50(this->marker); break; case 37: @@ -1945,56 +1931,59 @@ void func_8038AC88(Actor *this, s32 arg1) { } void func_8038AF84(ActorMarker *arg0) { - func_8038AC88(marker_getActor(arg0), 0x29); + chfinalboss_phase5_setState(marker_getActor(arg0), 0x29); } void func_8038AFB0(void) { func_802E4078(MAP_87_CS_SPIRAL_MOUNTAIN_5, 0, 1); } -void func_8038AFD8(ActorMarker *marker) { +void chfinalboss_phase5_update(ActorMarker *marker) { + Actor *this; ActorLocal_fight_180 *local; - f32 sp3C; + f32 dt; s32 sp38; f32 sp34; - ActorMarker *other_marker; + ActorMarker *jinjonator_marker; s32 sp2C; s32 tmp_v0; this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; - sp3C = time_getDelta(); + dt = time_getDelta(); sp38 = 0x14; sp34 = animctrl_getAnimTimer(this->animctrl); - other_marker = func_8038A4E8(this, func_8033229C(this->marker) / 3.0f); - if ((other_marker != NULL) && (other_marker->unk14_20 == 0x285)) { - if (func_8039125C(other_marker)) { - D_803927C6++; - if (local->unk7) { + jinjonator_marker = chfinalboss_findCollidingJinjo(this, func_8033229C(this->marker) / 3.0f); + if ((jinjonator_marker != NULL) && (jinjonator_marker->unk14_20 == MARKER_285_JINJONATOR)) { + if (chjinjonator_8039125C(jinjonator_marker)) { + __chFinalBossJinjonatorHits++; + if (local->mirror_phase5) { sp38 = 0x23; } - if (0xA > D_803927C6) { + if (0xA > __chFinalBossJinjonatorHits) { func_802BB3DC(0, 18.0f, 0.9f); func_80324E88(0.6f); - timed_setCameraToNode(0.6f, sp38 + 3 + D_803927C6); - func_80391070(other_marker, D_803927C6, local->unk7); - func_8038AC88(this, 0x2A); - if (D_803927C6 == 9) { + timed_setCameraToNode(0.6f, sp38 + 3 + __chFinalBossJinjonatorHits); + chjinjonator_attack(jinjonator_marker, __chFinalBossJinjonatorHits, local->mirror_phase5); + chfinalboss_phase5_setState(this, 0x2A); + if (__chFinalBossJinjonatorHits == 9) { sp2C = 0x16; - if(local->unk7) sp2C = 0x25; - timedFunc_set_1(2.4f, func_8038AF84, (s32) this->marker); + if(local->mirror_phase5) sp2C = 0x25; + timedFunc_set_1(2.4f, (GenMethod_1)func_8038AF84, (s32) this->marker); timed_setCameraToNode(2.4f, sp2C); func_80324E88(4.4f); - timed_setCameraToNode(4.4f, sp38 + 3 + D_803927C6); + timed_setCameraToNode(4.4f, sp38 + 3 + __chFinalBossJinjonatorHits); } } else { + static f32 D_803917E0[3] = {0.0f, 186.0f, 0.0f}; + func_802BB3DC(0, 63.0f, 0.9f); - func_803911F8(other_marker); + chjinjonator_finalAttack(jinjonator_marker); func_8030E6D4(SFX_HEAVY_THUNDERSTORM_01); - func_8025A6EC(SFX_JINJONATOR_HITS_GRUNTY_J, 0x4E20); - func_8038AC88(this, 0x2B); + func_8025A6EC(COMUSIC_A3_JINJONATOR_HITS_GRUNTY_J, 20000); + chfinalboss_phase5_setState(this, 0x2B); func_80324E88(0.0f); timed_setCameraToNode(0.0f, sp38 + 0xD); func_8028F85C(D_803917E0); @@ -2003,7 +1992,7 @@ void func_8038AFD8(ActorMarker *marker) { D_803928C8[2] = 0.0f; func_8028FAEC(D_803928C8); } - if (D_803927C6 == 3) { + if (__chFinalBossJinjonatorHits == 3) { func_80311480(randi2(0, 5) + 0x1159, 0x20, NULL, NULL, NULL, NULL); } } @@ -2015,21 +2004,21 @@ void func_8038AFD8(ActorMarker *marker) { case 36: if (func_80386BEC(this, 9.0f) && (func_80297C6C() != 3)) { - func_8038AC88(this, 0x25); + chfinalboss_phase5_setState(this, 0x25); } break; case 37: func_80386BEC(this, 3.0f); if (func_80297C6C() == 3) { - func_8038AC88(this, 0x24); + chfinalboss_phase5_setState(this, 0x24); break; } if (func_80387340(this, 1.0f)) { local->unk3++; } if ((actor_animationIsAt(this, 0.9999f)) && (local->unk3 >= 5)) { - func_8038AC88(this, 0x26); + chfinalboss_phase5_setState(this, 0x26); } break; @@ -2037,7 +2026,7 @@ void func_8038AFD8(ActorMarker *marker) { func_80386BEC(this, 3.0f); func_803873DC(this, 700.0f, 2400.0f); if (actor_animationIsAt(this, 0.9999f)) { - func_8038AC88(this, 0x27); + chfinalboss_phase5_setState(this, 0x27); this->unk60 = 4.0f; } break; @@ -2049,16 +2038,16 @@ void func_8038AFD8(ActorMarker *marker) { func_80386BEC(this, 3.0f); } if (this->unk60 > 0.0) { - this->unk60 -= sp3C; + this->unk60 -= dt; break; } if (local->unk8 == 0) { if (!D_803927C9) { D_803927C9 = TRUE; - func_8038AC88(this, 0x23); + chfinalboss_phase5_setState(this, 0x23); } else{ - func_8038AC88(this, 0x25); + chfinalboss_phase5_setState(this, 0x25); } } break; @@ -2071,7 +2060,7 @@ void func_8038AFD8(ActorMarker *marker) { func_8030E2C4(this->unk44_31); } if (actor_animationIsAt(this, 0.9999f)) { - func_8038AC88(this, 0x27); + chfinalboss_phase5_setState(this, 0x27); func_8030DA44(this->unk44_31); this->unk44_31 = 0; } @@ -2095,26 +2084,24 @@ void func_8038AFD8(ActorMarker *marker) { case 42: if (actor_animationIsAt(this, 0.9999f)) { - func_8038AC88(this, 0x27); + chfinalboss_phase5_setState(this, 0x27); } break; case 43: if ((actor_animationIsAt(this, 0.1f)) || (actor_animationIsAt(this, 0.24f))) { - func_8038C5F0(this, 0x718, 0x6C2, 2.0f); + chbossjinjo_spawnParticles(this, 0x718, 0x6C2, 2.0f); } if (actor_animationIsAt(this, 0.3f)) { FUNC_8030E624(SFX_164_EH, 1.0f, 25000); } if (actor_animationIsAt(this, 0.4f)) { - // func_8030E624(0x89786964U); FUNC_8030E624(SFX_164_EH, 1.075f, 25000); } if (actor_animationIsAt(this, 0.6f)) { FUNC_8030E624(SFX_164_EH, 1.1f, 25000); } if (actor_animationIsAt(this, 0.7f)) { - // func_8030E624(0x93186964U); FUNC_8030E624(SFX_164_EH, 1.15f, 25000); } if (actor_animationIsAt(this, 0.81f)) { @@ -2125,10 +2112,12 @@ void func_8038AFD8(ActorMarker *marker) { } if (actor_animationIsAt(this, 0.9f)) { func_802BAE4C(); - if (local->unk7 == 0) { - func_802BAEB4(&D_803917EC, this->position); + if (local->mirror_phase5 == 0) { + static f32 D_803917EC[3] = {-827.0f, 793.0f, 1700.0f}; + func_802BAEB4(D_803917EC, this->position); } else { - func_802BAEB4(&D_803917F8, this->position); + static f32 D_803917F8[3] = {827.0f, 793.0f, -1700.0f}; + func_802BAEB4(D_803917F8, this->position); } func_8038FC2C(1); timedFunc_set_0(4.8, func_8038AFB0); @@ -2140,31 +2129,30 @@ void func_8038AFD8(ActorMarker *marker) { } } -void func_8038B730(ActorMarker *marker, enum asset_e text_id, s32 arg2) { +void chfinalboss_phase0_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { Actor *sp1C; sp1C = marker_getActor(marker); func_802BE720(); func_80324E88(0); func_8028F784(0); - func_80387728(sp1C->marker, 1); + chfinalboss_setPhase(sp1C->marker, 1); } void func_8038B780(ActorMarker *marker) { Actor *sp24; sp24 = marker_getActor(marker); - if (!func_8031FF1C(0xCF)) { - sp24 = sp24; - func_80320004(0xCF, 1); - func_80311480(0x10E7, 0x2A, sp24->position, sp24->marker, func_8038B730, NULL); - return; + if (!func_8031FF1C(BKPROG_CF_HAS_ENTERED_FINAL_FIGHT)) { + func_80320004(BKPROG_CF_HAS_ENTERED_FINAL_FIGHT, TRUE); + func_80311480(0x10E7, 0x2A, sp24->position, sp24->marker, chfinalboss_phase0_endTextCallback, NULL); + } + else{ + func_80311480(randi2(0, 5) + 0x10E8, 0x2B, sp24->position, sp24->marker, chfinalboss_phase0_endTextCallback, NULL); } - sp24 = sp24; - func_80311480(randi2(0, 5) + 0x10E8, 0x2B, sp24->position, sp24->marker, func_8038B730, NULL); } -void func_8038B82C(ActorMarker *marker) { return; } +void chfinalboss_phase0_update(ActorMarker *marker) { return; } bool func_8038B834(ActorMarker *marker, ActorMarker * arg1) { Actor *this; @@ -2172,7 +2160,7 @@ bool func_8038B834(ActorMarker *marker, ActorMarker * arg1) { this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; - switch (local->unk0) { + switch (local->phase) { case 1: if ((this->state == 6) || (this->state == 7)) { marker->unk14_20 = 0x260; @@ -2209,14 +2197,14 @@ void func_8038B9AC(ActorMarker *marker, ActorMarker *other_marker) { this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; - switch (local->unk0) { + switch (local->phase) { case 1: - if (local->unk1 == 0) { + if (local->hits == 0) { func_80311480(randi2(0, 5) + 0x10F7, 0x20, NULL, NULL, NULL, NULL); } - if ((local->unk1 + 1) < 5) { - local->unk1++; - func_80388184(this, 0xD); + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase1_setState(this, 0xD); local->unk4 = 0; } break; @@ -2225,28 +2213,28 @@ void func_8038B9AC(ActorMarker *marker, ActorMarker *other_marker) { if (this->state != 0x14) { if ((local->unk2 + 1) >= 3) { local->unk2 = 0; - if (local->unk1 == 0) { + if (local->hits == 0) { func_80311480(randi2(0, 5) + 0x1110, 0x20, NULL, NULL, NULL, NULL); } - if ((local->unk1 + 1) < 5) { - local->unk1++; - func_803891E4(this, 0x14); + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase2_setState(this, 0x14); } } else { local->unk2++; - func_803891E4(this, 0x13); + chfinalboss_phase2_setState(this, 0x13); } } break; case 3: - if (local->unk1 == 0) { + if (local->hits == 0) { func_80311480(randi2(0, 5) + 0x1127, 0x20, NULL, NULL, NULL, NULL); } - if ((local->unk1 + 1) < 5) { - local->unk1++; - func_8038998C(this, 0x19); - if (local->unk1 == 4) { - func_802C3C88((GenMethod_1)func_80386DE4, reinterpret_cast(s32, this->marker)); + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase3_setState(this, 0x19); + if (local->hits == 4) { + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); } } break; @@ -2260,7 +2248,7 @@ void func_8038BB8C(ActorMarker *marker, ActorMarker *other_marker) { this = marker_getActor(marker); local = (ActorLocal_fight_180 *)&this->local; - if (local->unk0 == 1) { + if (local->phase == 1) { func_8030E878(SFX_EA_GRUNTY_LAUGH_1, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); if (local->unk10 == 0) { if (func_80311480(randi2(0, 5) + 0x10ED, 0, NULL, NULL, NULL, NULL)) { @@ -2268,7 +2256,7 @@ void func_8038BB8C(ActorMarker *marker, ActorMarker *other_marker) { } } } - if (local->unk0 == 3) { + if (local->phase == 3) { temp_v0_2 = local->unk6; if ((local->unk6 == 0) && (this->state != 0x1A)) { local->unk6++; @@ -2277,18 +2265,21 @@ void func_8038BB8C(ActorMarker *marker, ActorMarker *other_marker) { } } -void func_8038BCB8(ActorMarker *marker) { +void chfinalboss_spawnShadow(ActorMarker *marker) { Actor *sp1C; sp1C = marker_getActor(marker); - D_803927A4 = spawn_child_actor(0x3AF, &sp1C)->marker; + __chFinalBossShadowMarker = spawn_child_actor(ACTOR_3AF_GRUNTY_SHADOW, &sp1C)->marker; } -void func_8038BCF0(Actor *this){ +void chfinalboss_update(Actor *this){ + static f32 D_80391804[3] = {0.0f, 0.0f, 1350.0f}; + + ActorLocal_fight_180 *local = (ActorLocal_fight_180 *) &this->local; s32 i; s32 tmp_s0; - Actor *other; + Actor *shadow; f32 sp4C[3]; f32 sp40[3]; f32 sp34[3]; @@ -2302,11 +2293,11 @@ void func_8038BCF0(Actor *this){ for(i = 0x38C; i < 0x39F; i++){ func_80304E24(i, D_803927D0[i - 0x38C]); } - D_803927A8 = NULL; - D_803927A4 = NULL; + __chFinalBossFlightPadMarker = NULL; + __chFinalBossShadowMarker = NULL; D_803927C4 = 0; - D_803927C5 = 0; - D_803927C6 = 0; + __chFinalBossSpellBarrierActive = FALSE; + __chFinalBossJinjonatorHits = 0; D_803927C7 = 0; D_803927C8 = 0; D_803927C9 = 0; @@ -2316,19 +2307,19 @@ void func_8038BCF0(Actor *this){ local->unkB = 0; for(i = 0; i < 4; i++){ - D_803927B0[i] = NULL; + __chFinalBossJinjoStatueMarker[i] = NULL; } - func_802C3C88((GenMethod_1) func_8038BCB8, (s32) this->marker); - func_80387728(this->marker, 0); - local->unk1 = 0; + __spawnqueue_add_1((GenMethod_1) chfinalboss_spawnShadow, (s32) this->marker); + chfinalboss_setPhase(this->marker, 0); + local->hits = 0; func_80386600(this->marker, 0); func_80386628(this->marker, 1); func_8038FC00(); func_80386654(1.0f, D_80391380, D_80391390); func_8028F784(1); - func_8028F4B8(&D_80391804, 2000.0f, -2800.0f); + func_8028F4B8(D_80391804, 2000.0f, -2800.0f); func_8028FA14(0x93, 2); func_8034C9B0(0); func_80386698(2.0f); @@ -2338,37 +2329,37 @@ void func_8038BCF0(Actor *this){ func_802FA060(tmp_s0, 25000, 25000, 0); timed_playSfx(2.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 32000); }//L8038BF0C - switch(local->unk0){ + switch(local->phase){ case 0: - func_8038B82C(this->marker); + chfinalboss_phase0_update(this->marker); break; case 1: - func_80388758(this->marker); + chfinalboss_phase1_update(this->marker); break; case 2: - func_8038938C(this->marker); + chfinalboss_phase2_update(this->marker); break; case 3: - func_80389B70(this->marker); + chfinalboss_phase3_update(this->marker); break; case 4: - func_8038A5F4(this->marker); + chfinalboss_phase4_update(this->marker); break; case 5: - func_8038AFD8(this->marker); + chfinalboss_phase5_update(this->marker); break; } - func_80320524(0x23, local->unk0, 3); + func_80320524(0x23, local->phase, 3); player_getPosition(D_80392788); D_80392798[0] = this->position[0]; D_80392798[1] = this->position[1]; D_80392798[2] = this->position[2]; - if(this->unk100 && D_803927C5){ + if(this->unk100 != NULL && __chFinalBossSpellBarrierActive){ func_8038EB90(this->unk100, this->position); } - if(D_803927A4){ - other = marker_getActor(D_803927A4); + if(__chFinalBossShadowMarker != NULL){ + shadow = marker_getActor(__chFinalBossShadowMarker); sp4C[0] = this->position[0];\ sp4C[1] = this->position[1];\ sp4C[2] = this->position[2]; @@ -2380,15 +2371,15 @@ void func_8038BCF0(Actor *this){ sp34[1] = -50.0f; if(func_80309B48(sp4C, sp34, sp40, 0)){ sp34[1] += 6.0f; - other->position[0] = sp34[0];\ - other->position[1] = sp34[1];\ - other->position[2] = sp34[2]; - other->unk1C[0] = this->position_y - sp34[1]; - other->scale = this->scale; - other->unk58_0 = 1; + shadow->position[0] = sp34[0];\ + shadow->position[1] = sp34[1];\ + shadow->position[2] = sp34[2]; + shadow->unk1C[0] = this->position_y - sp34[1]; + shadow->scale = this->scale; + shadow->unk58_0 = 1; } else{//L8038C0B8 - other->unk58_0 = 0; + shadow->unk58_0 = 0; } }//L8038C0C8 } @@ -2399,22 +2390,22 @@ void func_8038C0DC(f32 (*arg0)[3]) { (*arg0)[2] = D_80392798[2]; } -void func_8038C100() { - D_803927C5 = 0; +void chfinalboss_spellBarrierInactive() { + __chFinalBossSpellBarrierActive = FALSE; } void func_8038C10C(s32 arg0) { - func_8038AC88(marker_getActor((ActorMarker*)arg0), 0x28); + chfinalboss_phase5_setState(marker_getActor((ActorMarker*)arg0), 0x28); } void func_8038C138() { D_803927C7 = 1; } -f32 func_80391234(); +f32 chjinjonator_80391234(); f32 func_8038DFA0(); void func_80324E88(f32); -f32 func_80391240(); +f32 chjinjonator_80391240(); void func_8038C148(void) { Actor *sp4C; @@ -2422,33 +2413,33 @@ void func_8038C148(void) { f32 temp_f20; f32 sp40; f32 temp_f12; - s32 phi_s0; + s32 camera_node; f32 sp34; - sp4C = func_80326EEC(0x38B); + sp4C = func_80326EEC(ACTOR_38B_GRUNTILDA_FINAL_BOSS); sp48 = (ActorLocal_fight_180 *)&sp4C->local; sp34 = func_8038DFA0(); - temp_f20 = sp34 + func_80391234(); - sp40 = func_80391240(); - phi_s0 = 0x14; - func_80320004(0xFC, 1); - if (sp48->unk7 != 0) { - phi_s0 = 0x23; + temp_f20 = sp34 + chjinjonator_80391234(); + sp40 = chjinjonator_80391240(); + camera_node = 0x14; + func_80320004(BKPROG_FC_DEFEAT_GRUNTY, TRUE); + if (sp48->mirror_phase5 != 0) { + camera_node = 0x23; } - func_8038AC88(sp4C, 0x27); + chfinalboss_phase5_setState(sp4C, 0x27); sp48->unk8 = (u8)1; func_80324E38(0, 1); - timed_setCameraToNode(0, phi_s0); + timed_setCameraToNode(0, camera_node); func_80324E88(temp_f20); timedFunc_set_0(temp_f20 * 0.08, &func_8038C138); - timed_setCameraToNode(temp_f20, phi_s0 + 1); + timed_setCameraToNode(temp_f20, camera_node + 1); func_80324E88(temp_f20 + sp40); timedFunc_set_1(temp_f20 + sp40, func_8038C10C, (s32)sp4C->marker); - timed_setCameraToNode(temp_f20 + sp40, phi_s0 + 2); + timed_setCameraToNode(temp_f20 + sp40, camera_node + 2); func_80324E88(temp_f20 + sp40 + 2.88f); - timed_setCameraToNode(temp_f20 + sp40 + 2.88f, phi_s0 + 3); + timed_setCameraToNode(temp_f20 + sp40 + 2.88f, camera_node + 3); } void func_8038C27C(s32 arg0) { diff --git a/src/fight/code_9D40.c b/src/fight/chjinjonator.c similarity index 78% rename from src/fight/code_9D40.c rename to src/fight/chjinjonator.c index 5b96fc22..95cdfc0c 100644 --- a/src/fight/code_9D40.c +++ b/src/fight/chjinjonator.c @@ -9,7 +9,7 @@ extern void func_802F9E44(s32, f32, f32, f32, f32); extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32); extern void func_8038C0DC(f32[3]); -extern void func_8038C5F0(Actor *, enum asset_e, enum asset_e, f32); +extern void chbossjinjo_spawnParticles(Actor *, enum asset_e, enum asset_e, f32); typedef struct{ f32 unk0; @@ -23,7 +23,7 @@ typedef struct{ s32 unk28; }ActorLocal_fight_9850; -void func_8039049C(Actor *this); +void chjinjonator_update(Actor *this); /* .data */ @@ -45,13 +45,24 @@ ActorAnimationInfo D_80391FB0[] = { }; ActorInfo D_80392018 = { - 0x285, 0x3AC, 0x551, 0x1, D_80391FB0, - func_8039049C, func_80326224, func_80325888, + MARKER_285_JINJONATOR, ACTOR_3AC_JINJONATOR, ASSET_551_MODEL_JINJONATOR, + 0x1, D_80391FB0, + chjinjonator_update, func_80326224, func_80325888, 0, 0, 1.0f, 0 }; s32 D_8039203C[] = {0xDC, 0x96, 0x82, 0xB4, 0xD2, 0xAA, 0xC8, 0x96, 0xB4}; -s32 D_80392060[] = {0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2}; +s32 D_80392060[] = { + COMUSIC_9A_JINJONATOR_HITS_GRUNTY_A, + COMUSIC_9B_JINJONATOR_HITS_GRUNTY_B, + COMUSIC_9C_JINJONATOR_HITS_GRUNTY_C, + COMUSIC_9D_JINJONATOR_HITS_GRUNTY_D, + COMUSIC_9E_JINJONATOR_HITS_GRUNTY_E, + COMUSIC_9F_JINJONATOR_HITS_GRUNTY_F, + COMUSIC_A0_JINJONATOR_HITS_GRUNTY_G, + COMUSIC_A1_JINJONATOR_HITS_GRUNTY_H, + COMUSIC_A2_JINJONATOR_HITS_GRUNTY_I +}; /* .bss */ f32 D_80392720; @@ -59,7 +70,7 @@ f32 D_80392724; f32 D_80392920[3]; /* .code */ -void func_80390130(f32 position[3], int count, enum asset_e sprite_id){ +void chjinjonator_80390130(f32 position[3], int count, enum asset_e sprite_id){ ParticleEmitter *s0 = partEmitList_pushNew(count); particleEmitter_setSprite(s0, sprite_id); particleEmitter_setStartingFrameRange(s0, 1, 6); @@ -76,18 +87,18 @@ void func_80390130(f32 position[3], int count, enum asset_e sprite_id){ particleEmitter_emitN(s0, count); } -void func_80390278(Actor *this){ +void chjinjonator_80390278(Actor *this){ f32 sp34[3]; int i; for(i = 0; i < 4; i++){ if(randf() < 0.3){ func_8034A174(this->marker->unk44, i + 5, sp34); - func_80390130(sp34, 1, ASSET_718_SPRITE_SPARKLE_WHITE_2); + chjinjonator_80390130(sp34, 1, ASSET_718_SPRITE_SPARKLE_WHITE_2); } } } -void func_80390318(Actor *this, s32 arg1){ +void chjinjonator_spawnAttackParticles(Actor *this, s32 arg1){ s32 sp1C; s32 sp18; @@ -118,16 +129,16 @@ void func_80390318(Actor *this, s32 arg1){ sp18 = ASSET_6C2_SPRITE_SMOKE_WHITE; break; } - func_8038C5F0(this, sp1C, sp18, 2.0f); + chbossjinjo_spawnParticles(this, sp1C, sp18, 2.0f); } -void func_803903C4(Actor *this){ +void chjinjonator_803903C4(Actor *this){ animctrl_setSmoothTransition(this->animctrl, FALSE); func_80328B8C(this, 7, 0.001f, 1); actor_loopAnimation(this); } -void func_8039040C(Actor *this){ +void chjinjonator_8039040C(Actor *this){ ActorLocal_fight_9850 *local = (ActorLocal_fight_9850 *)&this->local; f32 tick = time_getDelta(); @@ -137,7 +148,7 @@ void func_8039040C(Actor *this){ func_8030E2C4(this->unk44_31); } -void func_8039049C(Actor *this){ +void chjinjonator_update(Actor *this){ ActorLocal_fight_9850 *local = (ActorLocal_fight_9850 *)&this->local; f32 sp58; f32 sp54; @@ -170,7 +181,7 @@ void func_8039049C(Actor *this){ switch(this->state){ case 1: //803905D4 - func_8039040C(this); + chjinjonator_8039040C(this); animctrl_setAnimTimer(this->animctrl, 0.0f); this->unk60 -= sp58; if(this->unk60 < 0.0){ @@ -180,7 +191,7 @@ void func_8039049C(Actor *this){ break; case 2: //80390648 - func_8039040C(this); + chjinjonator_8039040C(this); if(actor_animationIsAt(this, 0.27f)) FUNC_8030E624(SFX_D0_GRIMLET_SQUEAK, 0.7f, 29000); @@ -196,12 +207,12 @@ void func_8039049C(Actor *this){ func_8030DA44(this->unk44_31); this->unk44_31 = 0; local->unk0 = (320.0f - this->position_y) * 0.5; - func_80324CFC(0.0f, 0x8c, 0x7d00); + func_80324CFC(0.0f, COMUSIC_8C_JINJONATOR_POWERUP, 32000); } break; case 3: //8039073C - func_80390278(this); + chjinjonator_80390278(this); if(this->position_y < 320.0f){ this->position_y = MIN(320.0f, this->position_y + local->unk0*sp58); }//L803907A0 @@ -214,13 +225,13 @@ void func_8039049C(Actor *this){ break; case 4: //803907D4 - func_80390278(this); + chjinjonator_80390278(this); func_80328B8C(this, 5, 0.001f, 1); actor_playAnimationOnce(this); break; case 5: //80390804 - func_80390278(this); + chjinjonator_80390278(this); if(actor_animationIsAt(this, 0.998f)){ animctrl_setSmoothTransition(this->animctrl, FALSE); func_80328B8C(this, 6, 0.0001f, 1); @@ -240,27 +251,27 @@ void func_8039049C(Actor *this){ case 6: //803908BC this->position[1] = MIN(1e+8f, this->position[1] + 80.0f*sp58); animctrl_setDuration(this->animctrl, MAX(0.4, sp54 - (0.5*sp58))); - func_80390278(this); + chjinjonator_80390278(this); if(actor_animationIsAt(this, 0.25f) || actor_animationIsAt(this, 0.75f)){ FUNC_8030E624(SFX_2_CLAW_SWIPE, local->unk1C, 26000); local->unk1C += 0.04; }//L80390A4C - func_8039040C(this); + chjinjonator_8039040C(this); if(actor_animationIsAt(this, 0.5f)){ if(--local->unk28 <= 0){ - func_803903C4(this); - FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000); - func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); - if((u8)this->unk44_31){ - func_8030E394(this->unk44_31); - func_8030DA44(this->unk44_31); - this->unk44_31 = 0; - } - func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP); - func_8034A174(this->marker->unk44, 0x1f, this->position); - this->velocity[0] = (this->position[0] - this->unk1C[0]) / sp58; - this->velocity[1] = (this->position[1] - this->unk1C[1]) / sp58; - this->velocity[2] = (this->position[2] - this->unk1C[2]) / sp58; + chjinjonator_803903C4(this); + FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000); + func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); + if((u8)this->unk44_31){ + func_8030E394(this->unk44_31); + func_8030DA44(this->unk44_31); + this->unk44_31 = 0; + } + func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP); + func_8034A174(this->marker->unk44, 0x1f, this->position); + this->velocity[0] = (this->position[0] - this->unk1C[0]) / sp58; + this->velocity[1] = (this->position[1] - this->unk1C[1]) / sp58; + this->velocity[2] = (this->position[2] - this->unk1C[2]) / sp58; } }//L80390B60 @@ -270,7 +281,7 @@ void func_8039049C(Actor *this){ break; case 7: //80390B78 sp50 = local->unk24*0.11 + 1.0; - func_80390278(this); + chjinjonator_80390278(this); func_8038C0DC(local->unk8); local->unk8[1] += 100.0f; func_80387470(this, local->unk8, sp50*2400.0f, sp50*2400.0f*4.2, 170.0f, sp50*2500.0f, 0.0f); @@ -281,7 +292,7 @@ void func_8039049C(Actor *this){ if(actor_animationIsAt(this, 0.999f)){ func_8034A174(this->marker->unk44, 0x1f, this->position); - func_803903C4(this); + chjinjonator_803903C4(this); FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000); func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); this->velocity[2] = 0.0f; @@ -346,7 +357,7 @@ void func_8039049C(Actor *this){ break; case 12: //80390F7C sp48 = local->unk24*0.11 + 1.0; - func_80390278(this); + chjinjonator_80390278(this); func_8038C0DC(local->unk8); local->unk8[1] += 100.0f; func_80387470(this, local->unk8, sp48*2400.0f, sp48*2400.0f*4.2, 170.0f, sp48*2500.0f, 0.0f); @@ -355,7 +366,7 @@ void func_8039049C(Actor *this){ func_8034A174(this->marker->unk44, 0x1f, D_80392920); } -void func_80391070(ActorMarker *marker, s32 arg1, s32 arg2) { +void chjinjonator_attack(ActorMarker *marker, s32 hit_count, bool mirrored) { Actor *temp_s0; ActorLocal_fight_9850 *local; s32 pad; @@ -363,23 +374,23 @@ void func_80391070(ActorMarker *marker, s32 arg1, s32 arg2) { temp_s0 = marker_getActor(marker); local = (ActorLocal_fight_9850 *)&temp_s0->local; - func_8025A6EC(D_80392060[arg1-1], 20000); + func_8025A6EC(D_80392060[hit_count-1], 20000); - func_80390318(temp_s0, arg1); + chjinjonator_spawnAttackParticles(temp_s0, hit_count); FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, temp_s0->position, 1000, 6500); temp_s0->velocity[2] = 0.0f; temp_s0->velocity[1] = 0.0f; temp_s0->velocity[0] = 0.0f; - temp_s0->yaw = (f32)D_8039203C[arg1-1]; - if (arg2 != 0) { + temp_s0->yaw = (f32)D_8039203C[hit_count-1]; + if (mirrored) { temp_s0->yaw = (f32) (temp_s0->yaw + 180.0f); } - local->unk24 = arg1; + local->unk24 = hit_count; animctrl_setSmoothTransition(temp_s0->animctrl, 1); actor_playAnimationOnce(temp_s0); - if (&D_8039203C[arg1] >= D_80392060) { + if (&D_8039203C[hit_count] >= D_80392060) { func_80328B8C(temp_s0, 9, 0.001f, 1); return; } @@ -387,33 +398,33 @@ void func_80391070(ActorMarker *marker, s32 arg1, s32 arg2) { animctrl_setDuration(temp_s0->animctrl, (f32) (1.75 - 0.11 * local->unk24)); } -void func_803911F8(ActorMarker *marker){ +void chjinjonator_finalAttack(ActorMarker *marker){ Actor *actor = marker_getActor(marker); - func_80390318(actor, 0xa); + chjinjonator_spawnAttackParticles(actor, 0xa); marker_despawn(actor->marker); } -f32 func_80391234(void){ +f32 chjinjonator_80391234(void){ return 3.3f; } -f32 func_80391240(void){ +f32 chjinjonator_80391240(void){ return 2.0; } -f32 func_80391250(void){ +f32 chjinjonator_80391250(void){ return 4.62f; } -s32 func_8039125C(ActorMarker *marker){ +bool chjinjonator_8039125C(ActorMarker *marker){ u32 state = (u32) (marker_getActor(marker))->state; if (state == 0x7 || state == 0xC) { - return 1; + return TRUE; } - return 0; + return FALSE; } -void func_8039129C(f32 arg0[3]) { +void chjinjonator_8039129C(f32 arg0[3]) { arg0[0] = D_80392920[0]; arg0[1] = D_80392920[1]; arg0[2] = D_80392920[2]; diff --git a/src/fight/code_7BE0.c b/src/fight/chjinjonatorbase.c similarity index 81% rename from src/fight/code_7BE0.c rename to src/fight/chjinjonatorbase.c index f819e97a..0b711f7b 100644 --- a/src/fight/code_7BE0.c +++ b/src/fight/chjinjonatorbase.c @@ -6,12 +6,13 @@ typedef struct { u8 unk0[4]; }ActorLocal_fight_7BE0; -void func_8038E2FC(Actor *); +void chjinjonatorbase_update(Actor *); /* .data */ ActorInfo D_80391A40 = { - 0x27F, 0x3A9, 0x544, 0x1, NULL, - func_8038E2FC, func_80326224, func_80325888, + MARKER_27F_JINJONATOR_STATUE_BASE, ACTOR_3A9_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE, + 0x1, NULL, + chjinjonatorbase_update, func_80326224, func_80325888, 0, 0x800, 0.0f, 0 }; @@ -33,15 +34,15 @@ struct42s D_80391A98 = { }; /* .code */ -void func_8038DFD0(ActorMarker *arg0) { - Actor *sp1C; - Actor *temp_v0; +void chjinjonatorbase_spawnStoneJinjo(ActorMarker *marker) { + Actor *this; + Actor *stone_jinjo; - sp1C = marker_getActor(arg0); - temp_v0 = spawn_child_actor(0x3A1, &sp1C); - temp_v0->unkF4_8 = sp1C->unkF4_8; - temp_v0->position_y = temp_v0->position_y + 155.0f; - sp1C->unk100 = temp_v0->marker; + this = marker_getActor(marker); + stone_jinjo = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &this); + stone_jinjo->unkF4_8 = this->unkF4_8; + stone_jinjo->position_y = stone_jinjo->position_y + 155.0f; + this->unk100 = stone_jinjo->marker; } void func_8038E03C(f32 arg0[3], u32 arg1) { @@ -86,7 +87,7 @@ void func_8038E120(ActorMarker * marker, ActorMarker *arg1){ if( remaining <= 0){ func_8038C148(); func_80328A84(actor, 3); - func_8038DE98(actor->unk100); + chstonejinjo_breakOpen(actor->unk100); } }//L8038E24C } @@ -104,7 +105,7 @@ void func_8038E2CC(ActorMarker *arg0) { func_8032BB88(marker_getActor(arg0), -1, 0x7FFF); } -void func_8038E2FC(Actor *this){ +void chjinjonatorbase_update(Actor *this){ ActorLocal_fight_7BE0 *local = (ActorLocal_fight_7BE0 *)&this->local; f32 sp58 = time_getDelta(); s32 temp_s1 = func_8023DB5C() & 0xf; @@ -138,7 +139,7 @@ void func_8038E2FC(Actor *this){ func_802FA060(temp_s0, 17000, 17000, 0.0f); func_8025A6EC(JINGLE_MENACING_GRUNTILDA_A, 15000); func_8032BB88(this, 0, 0x7fff); - timedFunc_set_1(8.0f, (TFQM1)func_8038E2CC, (s32)this->marker); + timedFunc_set_1(8.0f, (GenMethod_1)func_8038E2CC, reinterpret_cast(s32,this->marker)); this->unk1C[0] = this->position_x; this->unk1C[1] = this->position_y; this->unk1C[2] = this->position_z; @@ -149,11 +150,12 @@ void func_8038E2FC(Actor *this){ }else{ this->velocity_y = 100.0f; } - timedFunc_set_1(this->unk60* 0.05, (TFQM1)func_8038E260, (s32)this->marker); - timedFunc_set_1(this->unk60* 0.28, (TFQM1) func_8038E260, (s32)this->marker); - timedFunc_set_1(this->unk60* 0.46, (TFQM1) func_8038E260, (s32)this->marker); - timedFunc_set_1(this->unk60* 0.58, (TFQM1) func_8038E260, (s32)this->marker); - func_802C3C88((GenMethod_1)func_8038DFD0, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.05, (GenMethod_1)func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.28, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.46, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.58, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); + SPAWNQUEUE_ADD_1(chjinjonatorbase_spawnStoneJinjo, this->marker); + } else{//L8038E5CC if(this->state == 1){ diff --git a/src/fight/code_8390.c b/src/fight/chspellbarrier.c similarity index 81% rename from src/fight/code_8390.c rename to src/fight/chspellbarrier.c index 34ce45e6..2cc9dd3b 100644 --- a/src/fight/code_8390.c +++ b/src/fight/chspellbarrier.c @@ -3,7 +3,7 @@ #include "variables.h" -extern ActorMarker *func_8038A4E8(Actor*, f32); +extern ActorMarker *chfinalboss_findCollidingJinjo(Actor*, f32); void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]); typedef struct { @@ -23,12 +23,13 @@ typedef struct { u8 unk10; } ActorLocal_fight_8390; -void func_8038E844(Actor *this); +void chspellbarrier_update(Actor *this); /* .data */ ActorInfo D_80391AD0 = { - 0x284, 0x3AB, 0x546, 0x1, NULL, - func_8038E844, func_80326224, func_80325888, + MARKER_284_GRUNTY_SPELL_BARRIER, ACTOR_3AB_GRUNTY_SPELL_BARRIER, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER, + 0x1, NULL, + chspellbarrier_update, func_80326224, func_80325888, 0, 0, 0.0f, 0 }; @@ -50,22 +51,22 @@ void func_8038E780(ActorMarker *arg0, ActorMarker *arg1) { } void func_8038E7EC(Actor *arg0) { - ActorLocal_fight_8390 *temp_v0 = (ActorLocal_fight_8390 *)&arg0->local; + ActorLocal_fight_8390 *local = (ActorLocal_fight_8390 *)&arg0->local; if ((u8)arg0->unk44_31) { func_8030DA44(arg0->unk44_31); arg0->unk44_31 = 0; } - if (temp_v0->unk10 != 0) { - func_8030DA44(temp_v0->unk10); - temp_v0->unk10 = (u8)0; + if (local->unk10 != 0) { + func_8030DA44(local->unk10); + local->unk10 = (u8)0; } } -void func_8038E844(Actor *this){ +void chspellbarrier_update(Actor *this){ ActorLocal_fight_8390 *local = (ActorLocal_fight_8390 *)&this->local; f32 sp38 = time_getDelta(); - ActorMarker *temp_v0; + ActorMarker *jinjo_marker; if(!this->unk16C_4){ this->unk16C_4 = 1; @@ -85,11 +86,11 @@ void func_8038E844(Actor *this){ func_8030DBB4(local->unk10, 1.0f); FUNC_8030E8B4(SFX_416, 0.8f, 32000, this->position, 10000, 25000); }//L8038E97C - temp_v0 = func_8038A4E8(this, 600.0f); - if(temp_v0){ - if(temp_v0->unk14_20 == 0x285){ + jinjo_marker = chfinalboss_findCollidingJinjo(this, 600.0f); + if(jinjo_marker){ + if(jinjo_marker->unk14_20 == MARKER_285_JINJONATOR){ marker_despawn(this->marker); - func_8038C100(); + chfinalboss_spellBarrierInactive(); return; } else{ diff --git a/src/fight/code_87A0.c b/src/fight/chspellfireball.c similarity index 92% rename from src/fight/code_87A0.c rename to src/fight/chspellfireball.c index 034ebd39..a69c4e4c 100644 --- a/src/fight/code_87A0.c +++ b/src/fight/chspellfireball.c @@ -9,7 +9,7 @@ extern Actor *func_80325CAC(ActorMarker*, Gfx**, Mtx**, Vtx **); bool func_80320C94(f32 [3], f32[3], f32, f32[3], s32, u32); f32 func_8033229C(ActorMarker *); void func_8038CED8(f32 [3], s32, f32, f32); -void func_8038C5F0(Actor *, s32, s32, f32); +void chbossjinjo_spawnParticles(Actor *, s32, s32, f32); typedef struct { f32 unk0; @@ -19,13 +19,15 @@ void func_8038F620(Actor *this); /* .data */ ActorInfo D_80391B00 = { - 0x25C, 0x389, 0x541, 0x1, NULL, + MARKER_25C_GRUNTY_SPELL_FIREBALL, ACTOR_389_GRUNTY_SPELL_FIREBALL, ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK, + 0x1, NULL, func_8038F620, func_80326224, func_80325888, 0, 0, 1.0f, 0 }; ActorInfo D_80391B24 = { - 0x280, 0x3AA, 0x6C9, 0x1, NULL, + MARKER_280_GRUNTY_SPELL_GREEN_ATTACK, ACTOR_3AA_GRUNTY_SPELL_GREEN_ATTACK, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, + 0x1, NULL, func_8038F620, func_80326224, func_80325CAC, 0, 0, 1.0f, 0 }; @@ -83,10 +85,6 @@ u8 D_803928E2; u8 D_803928E3; u8 D_803928E4; u8 D_803928E5; -f32 D_803928E8[3]; -f32 D_803928F8[3]; -f32 D_80392908[3]; -extern f32 D_80392914; /* .code */ void func_8038EB90(ActorMarker *arg0, f32 *arg1) { @@ -168,6 +166,7 @@ void func_8038F050(void) { } void func_8038F084(ActorMarker *marker){ + static f32 D_803928E8[3]; Actor *actor = marker_getActor(marker); ActorLocal_fight_87A0 *local = (ActorLocal_fight_87A0 *)&actor->local; @@ -183,7 +182,7 @@ void func_8038F084(ActorMarker *marker){ timedFunc_set_0(0.3f, func_8038F050); actor->unk58_0 = 0; actor->scale *= 1.6; - if(actor->marker->unk14_20 != 0x280){ + if(actor->marker->unk14_20 != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ func_8038EBE0(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74 @@ -211,7 +210,7 @@ void func_8038F084(ActorMarker *marker){ func_8038EEFC(actor->position, 3, D_80391BFC); func_8038CED8(actor->position, 0x558, 0.15f, 0.5f); actor->position_y += 260.0f; - func_8038C5F0(actor, 0x712, ASSET_6C3_SPRITE_SMOKE_GREEN, 1.6f); + chbossjinjo_spawnParticles(actor, 0x712, ASSET_6C3_SPRITE_SMOKE_GREEN, 1.6f); } local->unk0 = 0.66f; func_80328A84(actor, 2); @@ -268,9 +267,12 @@ void func_8038F5F8(Actor *arg0) { } void func_8038F620(Actor *this){ + static f32 D_803928F8[3]; + static f32 D_80392908[3]; + static f32 D_80392914; + ActorLocal_fight_87A0 * local = (ActorLocal_fight_87A0 *)&this->local; f32 sp40 = time_getDelta(); - static f32 D_80392914; if(!this->unk16C_4){ this->unk16C_4 = 1; @@ -279,7 +281,7 @@ void func_8038F620(Actor *this){ actor_collisionOn(this); this->unk60 = 8.0f; this->scale = 0.1f; - if( this->marker->unk14_20 == 0x280){ + if( this->marker->unk14_20 == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ actor_collisionOff(this); func_803300D8(this->marker, func_8038F5F8); func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 32000); @@ -299,29 +301,24 @@ void func_8038F620(Actor *this){ ); } }//L8038F79C - if(D_803928E5 && this->marker->unk14_20 == 0x280){ + if(D_803928E5 && this->marker->unk14_20 == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ func_802BAD08(this->position); }//L8038F7D4 switch(this->state){ case 1://L8038F7F8 - { // TODO: get rid of f0, maybe D_80392914 is static? - // f32 temp_f0; - - D_80392914 = sp40*1.4; - // temp_f0 = this->scale + D_80392914; - this->scale = (this->scale + D_80392914 < 1.0) ? this->scale + D_80392914 : 1.0f; - } + D_80392914 = sp40*1.4; + this->scale = (this->scale + D_80392914 < 1.0) ? this->scale + D_80392914 : 1.0f; switch(this->marker->unk14_20){ - case 0x25C://L8038F8AC + case MARKER_25C_GRUNTY_SPELL_FIREBALL://L8038F8AC func_8038ED9C(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391CEC, D_80391D34, D_80391CF4, D_80391D04, D_80391D14 ); break; - case 0x280://L8038F8C8 - func_8038ED9C(this->position, ASSET_6C9_SPRITE_SMOKE_GREEN_BIG, 1, + case MARKER_280_GRUNTY_SPELL_GREEN_ATTACK://L8038F8C8 + func_8038ED9C(this->position, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1, D_80391CEC, D_80391D34, D_80391CF4, D_80391D1C, D_80391D2C ); @@ -360,7 +357,7 @@ void func_8038F620(Actor *this){ } } // L8038FABC - if( this->marker->unk14_20 != 0x280 + if( this->marker->unk14_20 != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK && func_8028F25C() ){ func_8038F084(this->marker); diff --git a/src/fight/code_7580.c b/src/fight/chstonejinjo.c similarity index 74% rename from src/fight/code_7580.c rename to src/fight/chstonejinjo.c index f191a7f2..48da47a8 100644 --- a/src/fight/code_7580.c +++ b/src/fight/chstonejinjo.c @@ -1,12 +1,13 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" extern Actor *func_80326EEC(); extern void func_80328B8C(Actor*, s32, f32, s32); -extern f32 func_8038D268(void); +extern f32 chbossjinjo_8038D268(void); -void func_8038DA04(Actor *); +void chstonejinjo_update(Actor *); /* .data */ ActorAnimationInfo D_803919F0[] ={ @@ -15,31 +16,35 @@ ActorAnimationInfo D_803919F0[] ={ {0x265, 1e+8f}, {0x265, 1e+8f}, }; -ActorInfo D_80391A10 = { 0x276, 0x3A1, 0x545, 0x1, D_803919F0, func_8038DA04, func_80326224, func_80325888, 0, 0x800, 1.0f, 0}; - +ActorInfo D_80391A10 = { + MARKER_276_STONE_JINJO, ACTOR_3A1_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO, + 0x1, D_803919F0, + chstonejinjo_update, func_80326224, func_80325888, + 0, 0x800, 1.0f, 0 +}; /* .code */ -void func_8038D970(ActorMarker *arg0) { - Actor *temp_v0; - Actor *phi_v0; +void chstonejinjo_spawnJinjo(ActorMarker *marker) { + Actor *this; + Actor *jinjo; - temp_v0 = marker_getActor(arg0); - if (temp_v0->unkF4_8 == 5) { - phi_v0 = spawn_child_actor(0x3AC, &temp_v0); + this = marker_getActor(marker); + if (this->unkF4_8 == BOSSJINJO_JINJONATOR) { + jinjo = spawn_child_actor(ACTOR_3AC_JINJONATOR, &this); } else { - phi_v0 = spawn_child_actor((temp_v0->unkF4_8) + 0x3A4, &temp_v0); + jinjo = spawn_child_actor((this->unkF4_8) + 0x3A4, &this); } - phi_v0->unkF4_8 = temp_v0->unkF4_8; - phi_v0->unk60 = temp_v0->unk1C[0]; - phi_v0->scale = temp_v0->scale; + jinjo->unkF4_8 = this->unkF4_8; + jinjo->unk60 = this->unk1C[0]; + jinjo->scale = this->scale; } -void func_8038DA04(Actor *this) { +void chstonejinjo_update(Actor *this) { if (!this->unk16C_4) { this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - if (this->unkF4_8 == 5) { + if (this->unkF4_8 == BOSSJINJO_JINJONATOR) { this->marker->unk40_23 = TRUE; this->marker->unk40_20 = TRUE; this->unk1C[0] = 6.0f; @@ -54,7 +59,7 @@ void func_8038DA04(Actor *this) { animctrl_setAnimTimer(this->animctrl, 0.0f); break; case 2: - if (this->unkF4_8 != 5) { + if (this->unkF4_8 != BOSSJINJO_JINJONATOR) { if (actor_animationIsAt(this, 0.001f)) { FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.2f, 25000, this->position, 1000, 5000); func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.6f, 0.8f), 20000, this->position, 1000.0f, 5000.0f); @@ -91,10 +96,10 @@ void func_8038DA04(Actor *this) { || actor_animationIsAt(this, 0.9f) || actor_animationIsAt(this, 0.98f) ) { - func_8030E6A4(SFX_3_DULL_CANNON_SHOT, randf2(1.2f, 1.4f), 0x4E20); + func_8030E6A4(SFX_3_DULL_CANNON_SHOT, randf2(1.2f, 1.4f), 20000); } } - if (actor_animationIsAt(this, 0.999f) != 0) { + if (actor_animationIsAt(this, 0.999f)) { func_80328B8C(this, 3, 0.99999f, 1); actor_playAnimationOnce(this); func_80326310(this); @@ -103,7 +108,7 @@ void func_8038DA04(Actor *this) { } } -void func_8038DE98(ActorMarker *marker){ +void chstonejinjo_breakOpen(ActorMarker *marker){ Actor *actor = marker_getActor(marker); s32 sp38; f32 sp34; @@ -114,10 +119,10 @@ void func_8038DE98(ActorMarker *marker){ func_80328B8C(actor, 2, 0.0f, 1); actor_playAnimationOnce(actor); animctrl_setDuration(actor->animctrl, actor->unk1C[0]); - func_802C3C88((GenMethod_1)func_8038D970, reinterpret_cast(s32, actor->marker)); - if(!func_8031FF1C(0xD1) && actor->unkF4_8 != 5){ + SPAWNQUEUE_ADD_1(chstonejinjo_spawnJinjo, actor->marker); + if(!func_8031FF1C(BKPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT) && actor->unkF4_8 != BOSSJINJO_JINJONATOR){ sp38 = 0x30 + actor->unkF4_8*2; - sp34 = func_8038D268(); + sp34 = chbossjinjo_8038D268(); sp30 = actor->unk1C[0] + sp34; func_8038C0DC(&sp24); func_8028F94C(2, &sp24); @@ -130,5 +135,5 @@ void func_8038DE98(ActorMarker *marker){ } f32 func_8038DFA0(void) { - return func_80326EEC(0x3A1)->unk1C_x; + return func_80326EEC(ACTOR_3A1_STONE_JINJO)->unk1C_x; } diff --git a/src/fight/code_9850.c b/src/fight/code_9850.c index 88199fda..8cad93b8 100644 --- a/src/fight/code_9850.c +++ b/src/fight/code_9850.c @@ -11,7 +11,8 @@ Actor *func_8038FC40(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); /* .data */ ActorInfo D_80391DC0 = { - 0x25D, 0x38A, 0x6C7, 0x1, NULL, + 0x25D, 0x38A, ASSET_6C7_SPRITE_SMOKE_GREEN_2, + 0x1, NULL, func_8038FE94, func_80326224, func_8038FC40, 0, 0, 1.0f, 0 }; diff --git a/src/fight/code_AED0.c b/src/fight/code_AED0.c deleted file mode 100644 index 9ebd5654..00000000 --- a/src/fight/code_AED0.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include "functions.h" -#include "variables.h" - -Actor *func_803912C0(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); -void func_80391360(Actor *this); - -/* .data */ -ActorInfo D_80392090 = { - 0x288, 0x3AF, 0x3BF, 0x1, NULL, - func_80391360, func_80326224, func_803912C0, - 0, 0, 0.0f, 0 -}; - -/* .code */ -Actor *func_803912C0(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ - f32 sp34[3]; - f32 sp30; - Actor *sp2C; - sp2C = func_80325300(marker, sp34); - sp30 = sp2C->scale * ml_map_f(sp2C->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f); - set_model_render_mode(2); - func_803391A4(gdl, mptr, sp2C->position, sp34, sp30, NULL, func_80330B1C(marker)); - return sp2C; -} - - -void func_80391360(Actor *this){ - actor_collisionOff(this); -} diff --git a/src/fight/fight.h b/src/fight/fight.h new file mode 100644 index 00000000..153299c3 --- /dev/null +++ b/src/fight/fight.h @@ -0,0 +1,12 @@ +#ifndef _FIGHT_INTERNAL_H_ +#define _FIGHT_INTERNAL_H_ + +enum bossjinjo_e{ + BOSSJINJO_ORANGE = 1, + BOSSJINJO_GREEN, + BOSSJINJO_PINK, + BOSSJINJO_YELLOW, + BOSSJINJO_JINJONATOR +}; + +#endif \ No newline at end of file diff --git a/src/lair/code_0.c b/src/lair/code_0.c index 481b602e..201092b9 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -415,13 +415,13 @@ void func_80386D78(Actor *this) { } else { this->scale = (this->scale < 1.0) ? this->scale + 0.04 : 1.0; if (this->scale < 1.0) { - this->yaw_moving += 8.0; - if (this->yaw_moving >= 360.0f) { - phi_f2 = this->yaw_moving - 360.0f; + this->yaw_ideal += 8.0; + if (this->yaw_ideal >= 360.0f) { + phi_f2 = this->yaw_ideal - 360.0f; } else { - phi_f2 = this->yaw_moving; + phi_f2 = this->yaw_ideal; } - this->yaw_moving = phi_f2; + this->yaw_ideal = phi_f2; this->yaw = phi_f2; } } @@ -804,7 +804,7 @@ void func_803880BC(Actor *this) this->position_y -= 51.f; this->unk1C[0] = 0; - func_802C3C88((GenMethod_1)func_80387E94, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_80387E94, reinterpret_cast(s32, this->marker)); if (func_803203FC(0xBC) && !func_8031FF1C(0x9A)) FUNC_8030E624(SFX_3F6_UNKNOWN, 0.75f, 30000); @@ -1496,7 +1496,7 @@ void func_8038982C(Actor *this) this->initialized = TRUE; if (!func_8031FF1C(BKPROG_9E_CRYPT_COFFIN_LID_OPEN)) - func_802C3C88((GenMethod_1)func_803897D4, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_803897D4, reinterpret_cast(s32, this->marker)); } } diff --git a/src/lair/code_42A0.c b/src/lair/code_42A0.c index 1cd4bec6..96b276cc 100644 --- a/src/lair/code_42A0.c +++ b/src/lair/code_42A0.c @@ -378,7 +378,7 @@ void func_8038AE2C(Actor *this) { if( func_8038ADF0(sp38, (s32) this->velocity[0]) || func_8038ADF0((s32) this->velocity[0], sp38) ) { - this->yaw_moving = (f32) sp38; + this->yaw_ideal = (f32) sp38; } func_80328FB0(this, 3.0f); if( actor_animationIsAt(this, 0.114f) diff --git a/src/lair/code_5640.c b/src/lair/code_5640.c index 19540a4a..f105238a 100644 --- a/src/lair/code_5640.c +++ b/src/lair/code_5640.c @@ -115,7 +115,7 @@ void func_8038BCF0(Actor *this) { } func_8028E668(this->position, 280.0f, -40.0f, 160.0f); - this->yaw_moving = (f32) func_80329784(this); + this->yaw_ideal = (f32) func_80329784(this); func_80328FB0(this, 3.0f); func_8024E55C(0, sp78); player_getPosition(sp64); diff --git a/src/lair/code_5ED0.c b/src/lair/code_5ED0.c index 56fce935..a84bbbeb 100644 --- a/src/lair/code_5ED0.c +++ b/src/lair/code_5ED0.c @@ -511,7 +511,7 @@ void func_8038D1E4(void) } if (cleanupDelay > 0.0) // f64 - timedFunc_set_1(cleanupDelay, (TFQM1)func_8038D670, FFA_4_UNK); + timedFunc_set_1(cleanupDelay, (GenMethod_1)func_8038D670, FFA_4_UNK); } void func_8038D394(void) diff --git a/src/lair/code_86F0.c b/src/lair/code_86F0.c index 214c4264..d5024df2 100644 --- a/src/lair/code_86F0.c +++ b/src/lair/code_86F0.c @@ -365,7 +365,7 @@ void func_8038F350(Actor *this, s32 next_state){ } else if (this->unkF4_8 == 0xA) { func_80324DBC(1.0f, 0xFAC, 4, NULL, this->marker, func_8038F0C0, NULL); } - timedFunc_set_1(2.0f, (TFQM1) func_8038EBEC, (s32) this->marker); + timedFunc_set_1(2.0f, (GenMethod_1) func_8038EBEC, (s32) this->marker); this->unk60 = 3.0f; break; } diff --git a/src/lair/code_A810.c b/src/lair/code_A810.c index e566e7ca..22e9272e 100644 --- a/src/lair/code_A810.c +++ b/src/lair/code_A810.c @@ -78,7 +78,7 @@ void func_80390D3C(Actor *this, s32 val) this->unk1C[2] = this->position_z; } - func_802C3C88((GenMethod_1)func_80390C00, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_80390C00, reinterpret_cast(s32, this->marker)); break; } @@ -88,7 +88,7 @@ void func_80390D3C(Actor *this, s32 val) this->unk1C[1] = this->position_y; this->unk1C[2] = this->position_z; - func_802C3C88((GenMethod_1)func_80390CB4, reinterpret_cast(s32, this->marker)); + __spawnqueue_add_1((GenMethod_1)func_80390CB4, reinterpret_cast(s32, this->marker)); break; } diff --git a/src/lair/code_AD70.c b/src/lair/code_AD70.c index 16429884..b9eb12b6 100644 --- a/src/lair/code_AD70.c +++ b/src/lair/code_AD70.c @@ -254,7 +254,7 @@ void func_80391B04(Actor *this) { this->position[1] += this->velocity[1] * sp44; this->position[2] += this->velocity[2] * sp44; this->velocity[1] += -1000.0f * sp44; - this->yaw += this->yaw_moving * sp44; + this->yaw += this->yaw_ideal * sp44; this->pitch += this->unk6C * sp44; if ((this->velocity[1] < 0.0) && (this->position[1] < this->unk1C[1])) { func_80391810(this, 3); @@ -304,7 +304,7 @@ void func_80391EA8(ActorMarker *marker, ActorMarker *a1, f32 a2[3], f32 f1, f32 actor->unk28 = f1; - actor->yaw_moving = randf2( 240, 480); + actor->yaw_ideal = randf2( 240, 480); actor->unk6C = randf2(-240, -480); actor->scale = scale; diff --git a/src/lair/code_C1C0.c b/src/lair/code_C1C0.c index d5068a1b..12dac95a 100644 --- a/src/lair/code_C1C0.c +++ b/src/lair/code_C1C0.c @@ -47,7 +47,7 @@ void func_80392690(ActorMarker *marker, enum asset_e text_id, s32 arg2){ func_8030E6D4(SFX_EA_GRUNTY_LAUGH_1); func_80328B8C(this, 5, 0.0f, 1); actor_loopAnimation(this); - this->yaw_moving = 79.0f; + this->yaw_ideal = 79.0f; animctrl_setTransitionDuration(this->animctrl, 0.4f); } diff --git a/subyaml/core1.us.v10.yaml b/subyaml/core1.us.v10.yaml index 12f38871..0161feef 100644 --- a/subyaml/core1.us.v10.yaml +++ b/subyaml/core1.us.v10.yaml @@ -97,7 +97,7 @@ segments: - [0x227F0, c, done/audio/n_drvrNew] #DONE - [0x22D50, c, done/audio/n_save] #DONE - [0x22DA0, c, done/audio/n_envresample] #DONE - - [0x22E40, c, code_22E40] + - [0x22E40, c, code_22E40] #n_seqplayer.c - [0x25360, c, done/audio/n_synstartvoiceparam] #DONE - [0x25440, c, done/audio/n_mainbus] #DONE - [0x254C0, c, done/audio/n_load] #DONE @@ -285,6 +285,7 @@ segments: - [0x3AD30, bin, data_3AD30] - [0x3AD60, .rodata, done/audio/n_drvrNew] - [0x3AD80, bin, data_3AD80] + - [0x3ADD0, bin, data_3ADD0] # .rodata, code_22E40] - [0x3B180, .rodata, done/audio/n_resample] - [0x3B190, .rodata, done/gu/sinf] - [0x3B1E0, .rodata, done/audio/cents2ratio] diff --git a/subyaml/fight.us.v10.yaml b/subyaml/fight.us.v10.yaml index 4173bf34..cd97f120 100644 --- a/subyaml/fight.us.v10.yaml +++ b/subyaml/fight.us.v10.yaml @@ -30,38 +30,38 @@ segments: vram: 0x803863F0 subsegments: - [0x0, c, code_0] #DONE - - [0x180, c, code_180] - - [0x5ED0, c, code_5ED0] #DONE - - [0x6E90, c, code_6E90] #DONE - - [0x7580, c, code_7580] #DONE - - [0x7BE0, c, code_7BE0] #DONE - - [0x8390, c, code_8390] #DONE - - [0x87A0, c, code_87A0] #DONE + - [0x180, c, chfinalboss] + - [0x5ED0, c, chbossjinjo] #DONE + - [0x6E90, c, chbossjinjobase] #DONE + - [0x7580, c, chstonejinjo] #DONE + - [0x7BE0, c, chjinjonatorbase] #DONE + - [0x8390, c, chspellbarrier] #DONE + - [0x87A0, c, chspellfireball] #DONE - [0x9850, c, code_9850] #DONE - - [0x9D40, c, code_9D40] #DONE - - [0xAED0, c, code_AED0] #DONE - - [0xAF90, .data, code_180] - - [0xB420, .data, code_5ED0] - - [0xB5A0, .data, code_6E90] - - [0xB600, .data, code_7580] - - [0xB650, .data, code_7BE0] - - [0xB6E0, .data, code_8390] - - [0xB710, .data, code_87A0] + - [0x9D40, c, chjinjonator] #DONE + - [0xAED0, c, chbossshadow] #DONE + - [0xAF90, .data, chfinalboss] + - [0xB420, .data, chbossjinjo] + - [0xB5A0, .data, chbossjinjobase] + - [0xB600, .data, chstonejinjo] + - [0xB650, .data, chjinjonatorbase] + - [0xB6E0, .data, chspellbarrier] + - [0xB710, .data, chspellfireball] - [0xB9D0, .data, code_9850] - - [0xBBC0, .data, code_9D40] - - [0xBCA0, .data, code_AED0] - - [0xBCD0, .rodata, code_180] - - [0xC090, .rodata, code_5ED0] - - [0xC140, .rodata, code_6E90] - - [0xC150, .rodata, code_7580] - - [0xC190, .rodata, code_7BE0] - - [0xC1C0, .rodata, code_8390] - - [0xC1D0, .rodata, code_87A0] + - [0xBBC0, .data, chjinjonator] + - [0xBCA0, .data, chbossshadow] + - [0xBCD0, .rodata, chfinalboss] + - [0xC090, .rodata, chbossjinjo] + - [0xC140, .rodata, chbossjinjobase] + - [0xC150, .rodata, chstonejinjo] + - [0xC190, .rodata, chjinjonatorbase] + - [0xC1C0, .rodata, chspellbarrier] + - [0xC1D0, .rodata, chspellfireball] - [0xC220, .rodata, code_9850] - - [0xC230, .rodata, code_9D40] - - [0xC340, .rodata, code_AED0] + - [0xC230, .rodata, chjinjonator] + - [0xC340, .rodata, chbossshadow] - [0x0000C350, .bss, code_0] - - [0x0000C350, .bss, code_180] - - [0x0000C350, .bss, code_87A0] - - [0x0000C350, .bss, code_9D40] + - [0x0000C350, .bss, chfinalboss] + - [0x0000C350, .bss, chspellfireball] + - [0x0000C350, .bss, chjinjonator] - [0x0000C350] \ No newline at end of file diff --git a/symbol_addrs.core2.us.v10.txt b/symbol_addrs.core2.us.v10.txt index 04370e1d..d1ea419b 100644 --- a/symbol_addrs.core2.us.v10.txt +++ b/symbol_addrs.core2.us.v10.txt @@ -167,6 +167,7 @@ bsstand_update = 0x802B4D20; bsstand_end = 0x802B5248; bstwirl_hitboxActive = 0x802B6A40; set_camera_to_node = 0x802BAE20; +__spawnqueue_add_1 = 0x802C3C88; func_802C4140 = 0x802C4140; func_802C418C = 0x802C418C; func_802C4218 = 0x802C4218;