Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func_80110038(void *arg0, u8 arg2)
- {
- void *sp74;
- s16 sp72;
- s16 sp70;
- void *sp28;
- void *sp1C;
- s16 temp_a3_8;
- s16 temp_t3;
- s16 temp_t3_2;
- s32 temp_a3;
- s32 temp_a3_10;
- s32 temp_a3_11;
- s32 temp_a3_2;
- s32 temp_a3_3;
- s32 temp_a3_4;
- s32 temp_a3_5;
- s32 temp_a3_6;
- s32 temp_a3_7;
- s32 temp_a3_9;
- u8 temp_a1_11;
- u8 temp_t1;
- u8 temp_t6;
- u8 temp_t8;
- u8 temp_t9;
- u8 temp_v0;
- u8 temp_v0_10;
- u8 temp_v0_11;
- u8 temp_v0_12;
- u8 temp_v0_13;
- u8 temp_v0_14;
- u8 temp_v0_15;
- u8 temp_v0_16;
- u8 temp_v0_17;
- u8 temp_v0_18;
- u8 temp_v0_19;
- u8 temp_v0_20;
- u8 temp_v0_21;
- u8 temp_v0_22;
- u8 temp_v0_23;
- u8 temp_v0_24;
- u8 temp_v0_25;
- u8 temp_v0_26;
- u8 temp_v0_27;
- u8 temp_v0_28;
- u8 temp_v0_29;
- u8 temp_v0_30;
- u8 temp_v0_31;
- u8 temp_v0_32;
- u8 temp_v0_3;
- u8 temp_v0_4;
- u8 temp_v0_5;
- u8 temp_v0_6;
- u8 temp_v0_7;
- u8 temp_v0_8;
- u8 temp_v0_9;
- void *temp_a1;
- void *temp_a1_10;
- void *temp_a1_12;
- void *temp_a1_13;
- void *temp_a1_14;
- void *temp_a1_15;
- void *temp_a1_16;
- void *temp_a1_17;
- void *temp_a1_18;
- void *temp_a1_19;
- void *temp_a1_20;
- void *temp_a1_21;
- void *temp_a1_22;
- void *temp_a1_23;
- void *temp_a1_24;
- void *temp_a1_2;
- void *temp_a1_3;
- void *temp_a1_4;
- void *temp_a1_5;
- void *temp_a1_6;
- void *temp_a1_7;
- void *temp_a1_8;
- void *temp_a1_9;
- void *temp_v0_2;
- void *temp_v0_33;
- s32 phi_a3;
- u8 phi_a2;
- void *phi_a1;
- s32 phi_a3_2;
- s32 phi_a3_3;
- s32 phi_a3_4;
- u8 phi_a2_2;
- u8 phi_a0;
- u8 phi_v0;
- void *phi_a1_2;
- s32 phi_a3_5;
- u8 phi_a2_3;
- u8 phi_a0_2;
- void *phi_a1_3;
- s32 phi_a3_6;
- u8 phi_a2_4;
- s32 phi_a3_7;
- s16 phi_t3;
- u8 phi_a2_5;
- u8 phi_a2_6;
- s16 phi_t3_2;
- u8 phi_a2_7;
- u8 phi_v1;
- u8 phi_a2_8;
- u8 phi_a2_9;
- u8 phi_a2_10;
- s16 phi_a3_8;
- s32 phi_t2;
- void *phi_t0;
- u8 phi_a2_11;
- void *phi_a1_4;
- s16 phi_t3_3;
- u8 phi_a2_12;
- u8 phi_a0_3;
- s32 phi_t4;
- s16 phi_t3_4;
- void *phi_t0_2;
- s32 phi_a3_9;
- u8 phi_a2_13;
- void *phi_a1_5;
- u8 phi_a2_14;
- u8 phi_v1_2;
- u8 phi_a0_4;
- u8 phi_a2_15;
- u8 phi_a2_16;
- u8 phi_a1_6;
- u8 phi_a2_17;
- u8 phi_a2_18;
- u8 phi_a2_19;
- u8 phi_v1_3;
- u8 phi_a0_5;
- u8 phi_a2_20;
- u8 phi_a2_21;
- void *phi_t0_3;
- u8 phi_t7;
- void *phi_t0_4;
- s32 phi_a3_10;
- s32 phi_t2_2;
- u8 phi_a2_22;
- s32 phi_t4_2;
- u8 phi_a2_23;
- u8 phi_a2_24;
- u8 phi_a2_25;
- u8 phi_a2_26;
- u8 phi_a0_6;
- u8 phi_v0_2;
- u8 phi_v0_3;
- u8 phi_v0_4;
- u8 phi_a2_27;
- u8 phi_a0_7;
- u8 phi_v0_5;
- u8 phi_v0_6;
- u8 phi_v0_7;
- u8 phi_a2_28;
- u8 phi_a0_8;
- u8 phi_a2_29;
- u8 phi_a0_9;
- u8 phi_a2_30;
- u8 phi_a2_31;
- u8 phi_a2_32;
- u8 phi_a0_10;
- u8 phi_v0_8;
- u8 phi_v0_9;
- u8 phi_v0_10;
- u8 phi_v0_11;
- u8 phi_v0_12;
- u8 phi_v0_13;
- u8 phi_a2_33;
- u8 phi_a0_11;
- u8 phi_v0_14;
- u8 phi_v0_15;
- u8 phi_v0_16;
- u8 phi_v0_17;
- u8 phi_v0_18;
- u8 phi_v0_19;
- s16 phi_t3_5;
- void *phi_t0_5;
- u8 phi_v1_4;
- u8 phi_v1_5;
- u8 phi_v1_6;
- u8 phi_v1_7;
- u8 phi_v1_8;
- u8 phi_v1_9;
- s16 phi_t3_6;
- u8 phi_v1_10;
- u8 phi_v1_11;
- u8 phi_v1_12;
- u8 phi_v1_13;
- void *phi_t1;
- u8 phi_v1_14;
- u8 phi_v1_15;
- u8 phi_v1_16;
- u8 phi_v1_17;
- u8 phi_v1_18;
- u8 phi_v1_19;
- u8 phi_v1_20;
- u8 phi_v1_21;
- u8 phi_v1_22;
- u8 phi_v1_23;
- u8 phi_v1_24;
- u8 phi_v1_25;
- u8 phi_v1_26;
- u8 phi_v1_27;
- u8 phi_v1_28;
- u8 phi_v1_29;
- u8 phi_v1_30;
- u8 phi_v1_31;
- u8 phi_v1_32;
- u8 phi_v1_33;
- u8 phi_v1_34;
- u8 phi_v1_35;
- u8 phi_v1_36;
- u8 phi_v1_37;
- u8 phi_v1_38;
- u8 phi_v1_39;
- u8 phi_v1_40;
- u8 phi_v1_41;
- u8 phi_v1_42;
- u8 phi_v1_43;
- u8 phi_v1_44;
- u8 phi_v1_45;
- u8 phi_v1_46;
- u8 phi_v1_47;
- u8 phi_v1_48;
- u8 phi_v1_49;
- s16 phi_t3_7;
- s16 phi_t3_8;
- s16 phi_t3_9;
- s16 phi_t3_10;
- s16 phi_t3_11;
- s16 phi_t3_12;
- s32 phi_t2_3;
- s16 phi_t3_13;
- s16 phi_t3_14;
- s16 phi_t3_15;
- s16 phi_t3_16;
- s16 phi_t3_17;
- s16 phi_t3_18;
- s16 phi_t3_19;
- s16 phi_t3_20;
- s16 phi_t3_21;
- s16 phi_t3_22;
- if ((D_801EF670.unk1010 & 2) != 0) // in boat ride
- {
- phi_a3 = 1;
- phi_t3_22 = (u16)0;
- loop_2:
- if (phi_a3 == 0)
- {
- if (4 == D_801EF670.unk20) // current transformation (4=link, 0=FD)
- {
- phi_v1_4 = (u8)0U;
- }
- else
- {
- phi_v1_4 = D_801EF670.unk20; // current transformation
- }
- phi_a2 = ((&D_801EF670 + (phi_v1_4 * 4)) + phi_a3)->unk4C; // B button per transformation
- phi_a1 = &D_801EF670 + phi_a3;
- }
- else
- {
- temp_a1 = &D_801EF670 + phi_a3;
- phi_a2 = temp_a1->unk4C;
- phi_a1 = temp_a1;
- }
- if (0xd == (phi_a2 & 0xff))
- {
- if ((arg0 + 0x10000)->unk682A != 0)
- {
- block_10:
- phi_t3_16 = phi_t3_22;
- if (phi_a1->unk3F18 == 0)
- {
- phi_t3_16 = (u16)1;
- }
- phi_a1->unk3F18 = (u8)0xffU;
- }
- else
- {
- phi_t3_16 = phi_t3_22;
- if (0xff == phi_a1->unk3F18)
- {
- phi_t3_16 = (u16)1;
- }
- phi_a1->unk3F18 = (u8)0U;
- }
- }
- else
- {
- goto block_10;
- }
- temp_a3 = (s32) ((phi_a3 + 1) << 0x10) >> 0x10;
- phi_a3 = temp_a3;
- phi_t3_22 = phi_t3_16;
- if (temp_a3 < 4)
- {
- goto loop_2;
- }
- if (D_801BF884 == 0)
- {
- phi_t3_5 = phi_t3_16;
- if (0xff != D_801EF670.unk3F18)
- {
- phi_t3_5 = (u16)1;
- }
- D_801EF670.unk3F18 = (u8)0xffU;
- phi_t0_5 = &D_801EF670;
- }
- else
- {
- phi_t3_5 = phi_t3_16;
- if (0xff == D_801EF670.unk3F18)
- {
- phi_t3_5 = (u16)1;
- }
- D_801EF670.unk3F18 = (u8)0U;
- phi_t0_5 = &D_801EF670;
- }
- }
- else // not in boat ride
- {
- if ((D_801EF670.unkF52 & 0x20) != 0) // Fisherman's Jumping Game that hides all except B
- {
- phi_a3_2 = 1;
- loop_26:
- temp_a1_2 = &D_801EF670 + phi_a3_2;
- if (temp_a1_2->unk3F18 == 0)
- {
- temp_a1_2->unk3F18 = (u8)0xffU;
- }
- temp_a3_2 = (s32) ((phi_a3_2 + 1) << 0x10) >> 0x10;
- phi_a3_2 = temp_a3_2;
- if (temp_a3_2 < 4)
- {
- goto loop_26;
- }
- sp70 = (u16)0;
- func_8010EF68(8, temp_a1_2, temp_a3_2);
- phi_t3_5 = (u16)0;
- phi_t0_5 = &D_801EF670;
- }
- else // not Fisherman's Jumping Game
- {
- if ((D_801EF670.unkF4A & 8) != 0) // Swordsman hides C
- {
- phi_a3_3 = 1;
- loop_32:
- temp_a1_3 = &D_801EF670 + phi_a3_3;
- if (temp_a1_3->unk3F18 == 0)
- {
- temp_a1_3->unk3F18 = (u8)0xffU;
- }
- temp_a3_3 = (s32) ((phi_a3_3 + 1) << 0x10) >> 0x10;
- phi_a3_3 = temp_a3_3;
- if (temp_a3_3 < 4)
- {
- goto loop_32;
- }
- sp70 = (u16)0;
- func_8010EF68(0x16, temp_a1_3, temp_a3_3);
- phi_t3_5 = (u16)0;
- phi_t0_5 = &D_801EF670;
- }
- else // not Swordsman
- {
- if ((D_801EF670.unkF4C & 0x20) != 0) // moon children enable all except transformation masks
- {
- if (arg0->unk1CCC->unk153 == 0x15)
- {
- phi_a3_4 = 1;
- phi_t3_15 = (u16)0;
- loop_39:
- if (phi_a3_4 == 0)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_5 = (u8)0U;
- }
- else
- {
- phi_v1_5 = D_801EF670.unk20;
- }
- phi_a2_2 = ((&D_801EF670 + (phi_v1_5 * 4)) + phi_a3_4)->unk4C;
- phi_a1_2 = &D_801EF670 + phi_a3_4;
- }
- else
- {
- temp_a1_4 = &D_801EF670 + phi_a3_4;
- phi_a2_2 = temp_a1_4->unk4C;
- phi_a1_2 = temp_a1_4;
- }
- if (0x35 != (phi_a2_2 & 0xff))
- {
- if (phi_a3_4 == 0)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_6 = (u8)0U;
- }
- else
- {
- phi_v1_6 = D_801EF670.unk20;
- }
- phi_a0 = ((&D_801EF670 + (phi_v1_6 * 4)) + phi_a3_4)->unk4C;
- }
- else
- {
- phi_a0 = phi_a1_2->unk4C;
- }
- if ((phi_a0 & 0xff) >= 0x12)
- {
- if (phi_a3_4 == 0)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_7 = (u8)0U;
- }
- else
- {
- phi_v1_7 = D_801EF670.unk20;
- }
- phi_v0 = ((&D_801EF670 + (phi_v1_7 * 4)) + phi_a3_4)->unk4C;
- }
- else
- {
- phi_v0 = phi_a1_2->unk4C;
- }
- if ((phi_v0 & 0xff) < 0x28)
- {
- block_60:
- phi_t3_12 = phi_t3_15;
- if (0xff == phi_a1_2->unk3F18)
- {
- phi_a1_2->unk3F18 = (u8)0U;
- phi_t3_12 = (u16)1;
- }
- }
- else
- {
- block_62:
- phi_t3_12 = phi_t3_15;
- if (0xff != phi_a1_2->unk3F18)
- {
- phi_a1_2->unk3F18 = (u8)0xffU;
- phi_t3_12 = (u16)1;
- }
- }
- }
- else
- {
- goto block_62;
- }
- }
- else
- {
- goto block_60;
- }
- temp_a3_4 = (s32) ((phi_a3_4 + 1) << 0x10) >> 0x10;
- phi_a3_4 = temp_a3_4;
- phi_t3_15 = phi_t3_12;
- if (temp_a3_4 < 4)
- {
- goto loop_39;
- }
- phi_t3_5 = phi_t3_12;
- phi_t0_5 = &D_801EF670;
- }
- else
- {
- phi_a3_5 = 1;
- phi_t3_20 = (u16)0;
- loop_67:
- if (phi_a3_5 == 0)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_8 = (u8)0U;
- }
- else
- {
- phi_v1_8 = D_801EF670.unk20;
- }
- phi_a2_3 = ((&D_801EF670 + (phi_v1_8 * 4)) + phi_a3_5)->unk4C;
- phi_a1_3 = &D_801EF670 + phi_a3_5;
- }
- else
- {
- temp_a1_5 = &D_801EF670 + phi_a3_5;
- phi_a2_3 = temp_a1_5->unk4C;
- phi_a1_3 = temp_a1_5;
- }
- if ((phi_a2_3 & 0xff) >= 0x32)
- {
- if (phi_a3_5 == 0)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_9 = (u8)0U;
- }
- else
- {
- phi_v1_9 = D_801EF670.unk20;
- }
- phi_a0_2 = ((&D_801EF670 + (phi_v1_9 * 4)) + phi_a3_5)->unk4C;
- }
- else
- {
- phi_a0_2 = phi_a1_3->unk4C;
- }
- if ((phi_a0_2 & 0xff) < 0x35)
- {
- phi_t3_11 = phi_t3_20;
- if (0xff != phi_a1_3->unk3F18)
- {
- phi_t3_11 = (u16)1;
- }
- phi_a1_3->unk3F18 = (u8)0xffU;
- }
- else
- {
- block_84:
- phi_t3_11 = phi_t3_20;
- if (0xff == phi_a1_3->unk3F18)
- {
- phi_t3_11 = (u16)1;
- }
- phi_a1_3->unk3F18 = (u8)0U;
- }
- }
- else
- {
- goto block_84;
- }
- temp_a3_5 = (s32) ((phi_a3_5 + 1) << 0x10) >> 0x10;
- phi_a3_5 = temp_a3_5;
- phi_t3_20 = phi_t3_11;
- if (temp_a3_5 < 4)
- {
- goto loop_67;
- }
- phi_t3_5 = phi_t3_11;
- phi_t0_5 = &D_801EF670;
- }
- }
- else // not moon children
- {
- if (arg0->unkA4 == 8) // in cutscene scene
- {
- if (D_801EF670.unk3CAC == 6) // cutscene entrance mod = 6
- {
- phi_a3_6 = 1;
- phi_t3_10 = (u16)0;
- loop_92:
- temp_a1_6 = &D_801EF670 + phi_a3_6;
- if (temp_a1_6->unk3F18 == 0)
- {
- phi_t3_10 = (u16)1;
- }
- temp_a3_6 = (s32) ((phi_a3_6 + 1) << 0x10) >> 0x10;
- temp_a1_6->unk3F18 = (u8)0xffU; // disable C buttons
- phi_a3_6 = temp_a3_6;
- phi_t3_10 = phi_t3_10;
- if (temp_a3_6 < 4)
- {
- goto loop_92;
- }
- phi_t3_5 = phi_t3_10;
- phi_t0_5 = &D_801EF670;
- }
- else // not in cutscene with entrance mod 6
- {
- block_96:
- if ((D_801EF670.unk100F & 0x10) != 0) // Deku Scrub Playground - B and A only
- {
- if ((arg0->unk1CCC->unkA74 << 7) < 0) // |= 01000000 -- deku flying
- {
- if (9 == D_801EF670.unk79) // nuts in inventory
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_4 = (u8)0U;
- }
- else
- {
- phi_a2_4 = D_801EF670.unk20;
- }
- (&D_801EF670 + (phi_a2_4 * 4))->unk4C = (u8)9; // put nuts on B
- sp70 = (u16)0;
- func_80112B40(arg0, 0, phi_a2_4, 1);
- phi_t3 = (u16)0;
- }
- else
- {
- D_801EF670.unk3F18 = (u8)0xffU; // disable B
- phi_t3 = (u16)1;
- }
- }
- else // not deku flying
- {
- phi_t3_6 = (u16)0;
- if (0xff == D_801EF670.unk3F18)
- {
- D_801EF670.unk3F18 = (u8)0U; // enable B
- phi_t3_6 = (u16)1;
- }
- phi_a3_7 = 1;
- loop_107:
- temp_a1_7 = &D_801EF670 + phi_a3_7;
- if (temp_a1_7->unk3F18 == 0)
- {
- phi_t3_6 = (u16)1;
- }
- temp_a3_7 = (s32) ((phi_a3_7 + 1) << 0x10) >> 0x10;
- temp_a1_7->unk3F18 = (u8)0xffU; // disable all C
- phi_a3_7 = temp_a3_7;
- phi_t3 = phi_t3_6;
- phi_t3_6 = phi_t3_6;
- if (temp_a3_7 < 4)
- {
- goto loop_107;
- }
- }
- if (phi_t3 == 0)
- {
- phi_t3_5 = phi_t3;
- phi_t0_5 = &D_801EF670;
- if (&D_801EF670->unk3F22 != 0xc)
- {
- block_112:
- &D_801EF670->unk3F22 = (u16)0U;
- sp70 = (u16)0;
- func_8010EF68(0xc);
- phi_t3_5 = sp70;
- phi_t0_5 = &D_801EF670;
- }
- }
- else
- {
- goto block_112;
- }
- }
- else // not Deku Scrub Playground
- {
- if ((arg0->unk1CCC->unkA74 << 7) < 0) // |= 01000000 -- deku flying
- {
- if (9 == D_801EF670.unk79) // deku nuts in inventory
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_5 = (u8)0U;
- }
- else
- {
- phi_a2_5 = D_801EF670.unk20;
- }
- phi_t3_2 = (u16)0;
- if (9 != (&D_801EF670 + (phi_a2_5 * 4))->unk4C) // deku nuts/shoot are not on B
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_6 = (u8)0U;
- }
- else
- {
- phi_a2_6 = D_801EF670.unk20;
- }
- (&D_801EF670 + (phi_a2_6 * 4))->unk4C = (u8)9; // add deku nuts/shoot to B
- func_80112B40(arg0, 0, phi_a2_6, 1);
- D_801EF670.unk3F18 = (u8)0; // enable B
- phi_t3_2 = (u16)1;
- }
- }
- else // deku nuts not in inventory
- {
- phi_t3_2 = (u16)0;
- if (D_801EF670.unk3F18 == 0) // if B is enabled
- {
- D_801EF670.unk3F18 = (u8)0xffU; // disable B
- phi_t3_2 = (u16)1;
- }
- }
- phi_t3_5 = phi_t3_2;
- phi_t0_5 = &D_801EF670;
- if (phi_t3_2 != 0) // disabled/enabled B this frame
- {
- &D_801EF670->unk3F19 = (u8)0xff; // disable C
- &D_801EF670->unk3F1A = (u8)0xff;
- &D_801EF670->unk3F1B = (u8)0xff;
- phi_t3_5 = phi_t3_2;
- phi_t0_5 = &D_801EF670;
- }
- }
- else // not deku flying
- {
- phi_a2_9 = arg2;
- if (D_801EF670.unk40 == 0) // don't have magic
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_7 = (u8)0U;
- }
- else
- {
- phi_a2_7 = D_801EF670.unk20;
- }
- phi_a2_9 = phi_a2_7;
- if (phi_a2_7 == 3) // is deku
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1 = (u8)0U;
- }
- else
- {
- phi_v1 = D_801EF670.unk20;
- }
- phi_a2_9 = phi_a2_7;
- if (9 == (&D_801EF670 + (phi_v1 * 4))->unk4C) // deku B is nuts/shoot
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_8 = (u8)0U;
- }
- else
- {
- phi_a2_8 = D_801EF670.unk20;
- }
- (&D_801EF670 + (phi_a2_8 * 4))->unk4C = (u8)0xfd; // make deku B blank
- D_801EF670.unk3F18 = (u8)0xffU; //disable B, although this only takes effect for one frame
- phi_t3_5 = (u16)0;
- phi_t0_5 = &D_801EF670;
- }
- else // not blanking out deku B this frame
- {
- block_140:
- sp74 = (void *) arg0->unk1CCC;
- sp70 = (u16)0;
- if (func_801242DC(arg0, arg0->unk1CCC, phi_a2_9, 1) >= 2) // if in water
- {
- sp70 = (u16)0;
- if (func_801242DC(arg0) < 5) // if in water
- {
- if (4 == D_801EF670.unk20)
- {
- phi_a2_10 = (u8)0U;
- }
- else
- {
- phi_a2_10 = D_801EF670.unk20;
- }
- if (phi_a2_10 != 2) // not zora
- {
- if (0x12 == sp74->unk153) // wearing blast mask
- {
- if (sp74->unkB60 == 0) // blast mask timer done
- {
- phi_t3_3 = (u16)0;
- if (0xff == D_801EF670.unk1015)
- {
- phi_t3_3 = (u16)1;
- }
- D_801EF670.unk1015 = (u8)0U; // enable B from 1F0685
- block_162:
- phi_a3_8 = (u16)1;
- phi_t2 = 4;
- phi_t0 = &D_801EF670;
- }
- else // blast mask not worn or timer done
- {
- block_151:
- if ((0x10000 + arg0)->unk6C06 == 0x18) // blast mask action on B
- {
- if (0x12 == sp74->unk153) // wearing blast mask
- {
- phi_t3_3 = (u16)0;
- if (0xff != D_801EF670.unk1015) // if B not disabled from 1F0685
- {
- D_801EF670.unk1015 = (u8)0xffU; // disable B from 1F0685
- phi_t3_3 = (u16)1;
- }
- phi_a3_8 = (u16)1;
- phi_t2 = 4;
- phi_t0 = &D_801EF670;
- phi_t4 = 0xff;
- }
- else // not wearing blast mask
- {
- block_156:
- phi_t3_3 = (u16)0;
- if (0xff != D_801EF670.unk3F18)
- {
- phi_t3_3 = (u16)1;
- }
- D_801EF670.unk3F18 = (u8)0xffU; // disable B
- goto block_162;
- }
- }
- else // blast mask action not on B
- {
- goto block_156;
- }
- }
- }
- else // not wearing blast mask
- {
- goto block_151;
- }
- }
- else // zora
- {
- phi_t3_3 = (u16)0;
- if (0xff == D_801EF670.unk3F18) // if B disabled
- {
- phi_t3_3 = (u16)1;
- }
- D_801EF670.unk3F18 = (u8)0U; // enable B
- goto block_162;
- }
- loop_163:
- if (phi_a3_8 == 0) // currently iterating over B button (never)
- {
- temp_v0 = phi_t0->unk20;
- if (phi_t2 == temp_v0)
- {
- phi_v1_10 = (u8)0U;
- }
- else
- {
- phi_v1_10 = temp_v0;
- }
- phi_a2_11 = ((phi_t0 + (phi_v1_10 * 4)) + phi_a3_8)->unk4C;
- phi_a1_4 = phi_t0 + phi_a3_8;
- }
- else // normal
- {
- temp_a1_8 = phi_t0 + phi_a3_8;
- phi_a2_11 = temp_a1_8->unk4C;
- phi_a1_4 = temp_a1_8;
- }
- if ((phi_a2_11 & 0xff) != 0x34) // item isn't zora mask
- {
- sp1C = (void *) phi_a1_4;
- sp72 = (s16) phi_a3_8;
- sp70 = (s16) phi_t3_3;
- temp_a1_9 = phi_a1_4;
- temp_a3_8 = phi_a3_8;
- temp_t3 = phi_t3_3;
- if (func_801242DC(arg0, phi_a1_4, phi_a2_11, phi_a3_8) == 2) // standing on bottom
- {
- if (temp_a3_8 == 0) // currently iterating over B button (never)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_11 = (u8)0U;
- }
- else
- {
- phi_v1_11 = D_801EF670.unk20;
- }
- phi_a2_12 = ((&D_801EF670 + (phi_v1_11 * 4)) + temp_a3_8)->unk4C;
- }
- else // normal
- {
- phi_a2_12 = temp_a1_9->unk4C;
- }
- if ((phi_a2_12 & 0xff) >= 0x12) // item is bottle
- {
- if (temp_a3_8 == 0) // currently iterating over B button (never)
- {
- if (4 == D_801EF670.unk20)
- {
- phi_v1_12 = (u8)0U;
- }
- else
- {
- phi_v1_12 = D_801EF670.unk20;
- }
- phi_a0_3 = ((&D_801EF670 + (phi_v1_12 * 4)) + temp_a3_8)->unk4C;
- }
- else // normal
- {
- phi_a0_3 = temp_a1_9->unk4C;
- }
- if ((phi_a0_3 & 0xff) >= 0x28) // item isn't bottle
- {
- block_185:
- phi_t3_4 = temp_t3;
- if (temp_a1_9->unk3F18 == 0)
- {
- phi_t3_4 = (u16)1;
- }
- temp_a1_9->unk3F18 = (u8)0xffU; // disable item
- phi_t0_2 = &D_801EF670;
- phi_t2 = 4;
- phi_t4 = 0xff;
- }
- else // item is bottle
- {
- phi_t3_4 = temp_t3;
- if (0xff == temp_a1_9->unk3F18)
- {
- phi_t3_4 = (u16)1;
- }
- temp_a1_9->unk3F18 = (u8)0U; // enable item
- phi_t0_2 = &D_801EF670;
- phi_t2 = 4;
- phi_t4 = 0xff;
- }
- }
- else // item isn't bottle
- {
- goto block_185;
- }
- }
- else
- {
- phi_t3_4 = temp_t3;
- if (temp_a1_9->unk3F18 == 0)
- {
- phi_t3_4 = (u16)1;
- }
- temp_a1_9->unk3F18 = (u8)0xffU; // disable C button
- phi_t0_2 = &D_801EF670;
- phi_t2 = 4;
- phi_t4 = 0xff;
- }
- }
- else // item is zora mask
- {
- phi_t3_4 = phi_t3_3;
- phi_t0_2 = phi_t0;
- phi_t2 = phi_t2;
- phi_t4 = phi_t4;
- if (phi_t4 == phi_a1_4->unk3F18) // if C button disabled
- {
- phi_a1_4->unk3F18 = (u8)0U; // enable it
- phi_t3_4 = (u16)1;
- phi_t0_2 = phi_t0;
- phi_t2 = phi_t2;
- phi_t4 = phi_t4;
- }
- }
- temp_a3_9 = (s32) ((phi_a3_8 + 1) << 0x10) >> 0x10;
- phi_a3_8 = temp_a3_9;
- phi_t0 = phi_t0_2;
- phi_t3_3 = phi_t3_4;
- if (temp_a3_9 < 4)
- {
- goto loop_163;
- }
- if (phi_t3_4 != 0)
- {
- phi_t0_2->unk3F22 = (u16)0;
- }
- temp_v0_2 = arg0 + 0x18000;
- phi_t3_5 = phi_t3_4;
- phi_t0_5 = phi_t0_2;
- if (temp_v0_2->unk875 == 0)
- {
- phi_t3_5 = phi_t3_4;
- phi_t0_5 = phi_t0_2;
- if (temp_v0_2->unkB4A == 0)
- {
- sp70 = (s16) phi_t3_4;
- temp_t3_2 = phi_t3_4;
- phi_t3_5 = temp_t3_2;
- phi_t0_5 = &D_801EF670;
- if (func_800F207C(phi_a1_4, temp_a3_9) == -1)
- {
- sp70 = temp_t3_2;
- func_8010EF68(0x32);
- phi_t3_5 = temp_t3_2;
- phi_t0_5 = &D_801EF670;
- }
- }
- }
- }
- else // not in water
- {
- block_203:
- if ((sp74->unkA6C << 0xa) < 0) // 00200000 = ladder down A
- {
- phi_a3_9 = 1;
- phi_t3_19 = (u16)0;
- loop_205:
- if (phi_a3_9 == 0) // B (won't happen)
- {
- temp_v0_3 = &D_801EF670->unk20;
- if (4 == temp_v0_3)
- {
- phi_v1_13 = (u8)0U;
- }
- else
- {
- phi_v1_13 = temp_v0_3;
- }
- phi_a2_13 = ((&D_801EF670 + (phi_v1_13 * 4)) + phi_a3_9)->unk4C;
- phi_a1_5 = &D_801EF670 + phi_a3_9;
- }
- else // C (normal)
- {
- temp_a1_10 = &D_801EF670 + phi_a3_9;
- phi_a2_13 = temp_a1_10->unk4C;
- phi_a1_5 = temp_a1_10;
- }
- if (0xe != (phi_a2_13 & 0xff)) // item isn't lens
- {
- phi_t3_9 = phi_t3_19;
- if (phi_a1_5->unk3F18 == 0)
- {
- phi_t3_9 = (u16)1;
- }
- phi_a1_5->unk3F18 = (u8)0xffU; // disable C
- }
- else // item is lens
- {
- phi_t3_9 = phi_t3_19;
- if (0xff == phi_a1_5->unk3F18)
- {
- phi_t3_9 = (u16)1;
- }
- phi_a1_5->unk3F18 = (u8)0U; // enable C
- }
- temp_a3_10 = (s32) ((phi_a3_9 + 1) << 0x10) >> 0x10;
- phi_a3_9 = temp_a3_10;
- phi_t3_19 = phi_t3_9;
- if (temp_a3_10 < 4)
- {
- goto loop_205;
- }
- phi_t3_5 = phi_t3_9;
- phi_t0_5 = &D_801EF670;
- if (0xff != &D_801EF670->unk3F18)
- {
- &D_801EF670->unk3F18 = (u8)0xffU; // disable B
- phi_t3_5 = (u16)1;
- phi_t0_5 = &D_801EF670;
- }
- }
- else // not ladder down A
- {
- if ((sp74->unkA6C & 0x2000) != 0) // 00002000 = ledge down A
- {
- phi_t3_5 = (u16)0;
- phi_t0_5 = &D_801EF670;
- if (0xff != &D_801EF670->unk3F18) // if B enabled
- {
- &D_801EF670->unk3F18 = (u8)0xffU; // disable B and C
- &D_801EF670->unk3F19 = (u8)0xffU;
- &D_801EF670->unk3F1A = (u8)0xffU;
- &D_801EF670->unk3F1B = (u8)0xffU;
- sp70 = (u16)1;
- func_8010EF68(0x32, 1);
- phi_t3_5 = (u16)1;
- phi_t0_5 = &D_801EF670;
- }
- }
- else // not ledge down A
- {
- sp28 = (void *) (arg0 + 0x169e8);
- if ((0x10000 + arg0)->unk6C06 == 0x18) // blast mask action on B
- {
- if (0x12 == sp74->unk153) // mask equipped == blast mask
- {
- if (sp74->unkB60 != 0) // blast mask timer counting down
- {
- phi_t3_8 = (u16)0;
- if (0xff != &D_801EF670->unk1015) // if B not disabled from 1F0685
- {
- &D_801EF670->unk1015 = (u8)0xffU; // make B disabled from 1F0685
- phi_t3_8 = (u16)1;
- }
- phi_t7 = sp74->unk14B;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- }
- else // blast mask timer not counting down
- {
- block_230:
- phi_t3_18 = (u16)0;
- if (0xff == &D_801EF670->unk1015) // if B disabled from 1F0685
- {
- &D_801EF670->unk1015 = (u8)0U; // make B not disabled from 1F0685
- phi_t3_18 = (u16)1;
- }
- if (sp28->unk30F == 0) // not dim B
- {
- temp_v0_4 = &D_801EF670->unk20;
- if (4 == temp_v0_4)
- {
- phi_a2_14 = (u8)0U;
- }
- else
- {
- phi_a2_14 = temp_v0_4;
- }
- if ((&D_801EF670 + (phi_a2_14 * 4))->unk4C != 1) // current form's B is not bow
- {
- if (4 == temp_v0_4)
- {
- phi_v1_2 = (u8)0U;
- }
- else
- {
- phi_v1_2 = temp_v0_4;
- }
- if ((&D_801EF670 + (phi_v1_2 * 4))->unk4C != 6) // current form's B is not bow/bombs
- {
- if (4 == temp_v0_4)
- {
- phi_a0_4 = (u8)0U;
- }
- else
- {
- phi_a0_4 = temp_v0_4;
- }
- if ((&D_801EF670 + (phi_a0_4 * 4))->unk4C == 7) // current form's B is bow/bombs/bombchus
- {
- block_245:
- if (((s32) (&D_801EF670->unk6C & D_801C1DB0) >> D_801C1E00) == 0)
- {
- &D_801EF670->unk3F18 = (u8)0xffU;
- }
- temp_a1_11 = &D_801EF670->unk3F18;
- phi_a1_6 = temp_a1_11;
- if (temp_a1_11 == 0)
- {
- temp_t9 = ((s32) (&D_801EF670->unk6C & D_801C1DB0) >> D_801C1E00) + 0x4c;
- &D_801EF670->unk3F18 = temp_t9;
- phi_a1_6 = temp_t9 & 0xff;
- }
- temp_v0_5 = &D_801EF670->unk20;
- if (4 == temp_v0_5)
- {
- phi_a2_17 = (u8)0U;
- }
- else
- {
- phi_a2_17 = temp_v0_5;
- }
- (&D_801EF670 + (phi_a2_17 * 4))->unk4C = (u8) phi_a1_6;
- temp_v0_6 = &D_801EF670->unk20;
- if (4 == temp_v0_6)
- {
- phi_a2_18 = (u8)0U;
- }
- else
- {
- phi_a2_18 = temp_v0_6;
- }
- phi_t3_8 = (u16)1;
- if (0xff != (&D_801EF670 + (phi_a2_18 * 4))->unk4C)
- {
- sp70 = (u16)1;
- func_80112B40(arg0, 0, phi_a2_18, 1);
- phi_t1 = sp74;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- phi_t3_8 = (u16)1;
- block_302:
- phi_t7 = phi_t1->unk14B;
- }
- else
- {
- block_276:
- phi_t7 = sp74->unk14B;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- }
- }
- else // current form's B is not bow/bombs/bombchus
- {
- if (4 == temp_v0_4)
- {
- phi_a2_15 = (u8)0U;
- }
- else
- {
- phi_a2_15 = temp_v0_4;
- }
- if (0xff == (&D_801EF670 + (phi_a2_15 * 4))->unk4C) // current form's B is nothing
- {
- if (sp28->unk21E != 0)
- {
- phi_t3_8 = phi_t3_18;
- if (0xff == &D_801EF670->unk3F18)
- {
- &D_801EF670->unk3F18 = (u8)0U;
- phi_t1 = sp74;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- phi_t3_8 = (u16)1;
- goto block_302;
- }
- else
- {
- block_266:
- phi_t7 = sp74->unk14B;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- }
- }
- else
- {
- phi_t3_8 = phi_t3_18;
- if (0xff != &D_801EF670->unk3F18)
- {
- &D_801EF670->unk3F18 = (u8)0xffU;
- phi_t3_8 = (u16)1;
- }
- goto block_266;
- }
- }
- else // current form's B is not nothing
- {
- if (4 == temp_v0_4)
- {
- phi_a2_16 = (u8)0U;
- }
- else
- {
- phi_a2_16 = temp_v0_4;
- }
- if (0xff == (&D_801EF670 + (phi_a2_16 * 4))->unk4C) // current form's B is nothing (unreachable code?)
- {
- phi_t3_8 = phi_t3_18;
- if (0xff != &D_801EF670->unk3F18) // if B is not disabled
- {
- &D_801EF670->unk3F18 = (u8)0xffU; // make B disabled
- phi_t3_8 = (u16)1;
- }
- phi_t7 = sp74->unk14B;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- }
- else
- {
- phi_t3_8 = phi_t3_18;
- if (0xff == &D_801EF670->unk3F18) // if B is disabled
- {
- &D_801EF670->unk3F18 = (u8)0U; // make B not disabled
- phi_t3_8 = (u16)1;
- }
- goto block_276;
- }
- }
- }
- }
- else // current form's B is bombs
- {
- goto block_245;
- }
- }
- else // current form's B is bow
- {
- goto block_245;
- }
- }
- else // dim B
- {
- phi_t1 = sp74;
- phi_t0_4 = &D_801EF670;
- phi_t2_2 = 4;
- phi_t4_2 = 0xff;
- phi_t3_8 = phi_t3_18;
- if (sp28->unk30F != 0) // dim B (we already checked this?)
- {
- temp_v0_7 = &D_801EF670->unk20;
- if (4 == temp_v0_7)
- {
- phi_a2_19 = (u8)0U;
- }
- else
- {
- phi_a2_19 = temp_v0_7;
- }
- if ((&D_801EF670 + (phi_a2_19 * 4))->unk4C != 1) // current form's B is not bow
- {
- if (4 == temp_v0_7)
- {
- phi_v1_3 = (u8)0U;
- }
- else
- {
- phi_v1_3 = temp_v0_7;
- }
- if ((&D_801EF670 + (phi_v1_3 * 4))->unk4C != 6) // current form's B is not bow/bombs
- {
- if (4 == temp_v0_7)
- {
- phi_a0_5 = (u8)0U;
- }
- else
- {
- phi_a0_5 = temp_v0_7;
- }
- phi_t0_3 = &D_801EF670;
- phi_t2_3 = 4;
- phi_t3_8 = phi_t3_18;
- if ((&D_801EF670 + (phi_a0_5 * 4))->unk4C == 7) // current form's B is bow/bombs/bombchus
- {
- block_290:
- if (((s32) (&D_801EF670->unk6C & D_801C1DB0) >> D_801C1E00) == 0)
- {
- &D_801EF670->unk3F18 = (u8)0xffU;
- }
- if (4 == &D_801EF670->unk20)
- {
- phi_a2_20 = (u8)0U;
- }
- else
- {
- phi_a2_20 = &D_801EF670->unk20;
- }
- (&D_801EF670 + (phi_a2_20 * 4))->unk4C = (u8) &D_801EF670->unk3F18;
- temp_v0_8 = &D_801EF670->unk20;
- if (4 == temp_v0_8)
- {
- phi_a2_21 = (u8)0U;
- }
- else
- {
- phi_a2_21 = temp_v0_8;
- }
- phi_t0_3 = &D_801EF670;
- phi_t2_3 = 4;
- phi_t3_8 = (u16)1;
- if (0xff != (&D_801EF670 + (phi_a2_21 * 4))->unk4C)
- {
- sp70 = (u16)1;
- func_80112B40(arg0, 0, phi_a2_21, 1);
- phi_t0_3 = &D_801EF670;
- phi_t2_3 = 4;
- phi_t3_8 = (u16)1;
- }
- }
- }
- else // current form's B is bombs
- {
- goto block_290;
- }
- }
- else // current form's B is bow
- {
- goto block_290;
- }
- phi_t1 = sp74;
- phi_t0_4 = phi_t0_3;
- phi_t2_2 = phi_t2_3;
- phi_t4_2 = 0xff;
- if (0xff != phi_t0_3->unk3F18) // if B not disabled
- {
- phi_t0_3->unk3F18 = (u8)0xffU; // disable B
- phi_t1 = sp74;
- phi_t0_4 = phi_t0_3;
- phi_t2_2 = phi_t2_3;
- phi_t4_2 = 0xff;
- phi_t3_8 = (u16)1;
- }
- }
- goto block_302;
- }
- }
- }
- else
- {
- goto block_230;
- }
- }
- else
- {
- goto block_230;
- }
- phi_t3_5 = phi_t3_8;
- phi_t0_5 = phi_t0_4;
- if (phi_t7 == phi_t0_4->unk20) // link actor agrees with save file on what link's current form is?
- {
- phi_a3_10 = 1;
- phi_t3_14 = phi_t3_8;
- loop_305:
- temp_t1 = phi_t0_4->unk20;
- if (phi_a3_10 == 0) //uhhhh should be impossible??
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_14 = (u8)0U;
- }
- else
- {
- phi_v1_14 = temp_t1;
- }
- phi_a2_22 = ((phi_t0_4 + (phi_v1_14 * 4)) + phi_a3_10)->unk4C;
- }
- else // normal
- {
- phi_a2_22 = (phi_t0_4 + phi_a3_10)->unk4C; // item equipped to C button 1/2/3
- }
- temp_a1_12 = phi_t0_4 + phi_a3_10;
- if (*(&D_801C2410 + ((temp_t1 * 0x72) + (phi_a2_22 & 0xff))) == 0) // equippableness per form table says no
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 != temp_a1_12->unk3F18) // if C not disabled
- {
- temp_a1_12->unk3F18 = (u8)0xffU; // disable C
- phi_t3_7 = (u16)1;
- }
- }
- else // equippableness per form table sayss yes
- {
- temp_a1_13 = phi_t0_4 + phi_a3_10;
- if (sp74->unk0 != 0) // if link is not player_actor ?? wtf ????
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 != temp_a1_13->unk3F18) // if C is not disabled
- {
- temp_a1_13->unk3F18 = (u8)0xffU; // disable C
- phi_t3_7 = (u16)1;
- }
- }
- else
- {
- if (sp74->unk153 == 0x14) // giant's mask worn
- {
- temp_a1_14 = phi_t0_4 + phi_a3_10;
- if (phi_a3_10 == 0) // still should be impossible
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_15 = (u8)0U;
- }
- else
- {
- phi_v1_15 = temp_t1;
- }
- phi_a2_23 = ((phi_t0_4 + (phi_v1_15 * 4)) + phi_a3_10)->unk4C;
- }
- else // normal
- {
- phi_a2_23 = temp_a1_14->unk4C; // item equipped to C button 1/2/3
- }
- if ((phi_a2_23 & 0xff) != 0x49) // if item isn't giant's mask
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 != temp_a1_14->unk3F18) // if C button enabled
- {
- temp_a1_14->unk3F18 = (u8)0xffU; // disable c button
- phi_t3_7 = (u16)1;
- }
- }
- else // if item is giant's mask
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 == temp_a1_14->unk3F18) // if C button disabled
- {
- temp_a1_14->unk3F18 = (u8)0U; // enable C button
- phi_t3_7 = (u16)1;
- }
- }
- }
- else // giant's mask not worn
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_16 = (u8)0U;
- }
- else
- {
- phi_v1_16 = temp_t1;
- }
- phi_a2_24 = ((phi_t0_4 + (phi_v1_16 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_24 = (phi_t0_4 + phi_a3_10)->unk4C; // item equipped to C button 1/2/3
- }
- if ((phi_a2_24 & 0xff) == 0x49) // if item is giant's mask
- {
- temp_a1_15 = phi_t0_4 + phi_a3_10;
- if (arg0->unkA4 != 0x36) // if not in twinmold's lair
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 != temp_a1_15->unk3F18) // if C button enabled
- {
- temp_a1_15->unk3F18 = (u8)0xffU; // disable C button
- phi_t3_7 = (u16)1;
- }
- }
- else // in twinmold's lair
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 == temp_a1_15->unk3F18) // if C button disabled
- {
- temp_a1_15->unk3F18 = (u8)0U; // enable button
- phi_t3_7 = (u16)1;
- }
- }
- }
- else // item isn't giant's mask
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_17 = (u8)0U;
- }
- else
- {
- phi_v1_17 = temp_t1;
- }
- phi_a2_25 = ((phi_t0_4 + (phi_v1_17 * 4)) + phi_a3_10)->unk4C; // item equipped to C button 1/2/3
- }
- else
- {
- phi_a2_25 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a2_25 & 0xff) == 0x35) // if item is fierce deity's mask
- {
- temp_a1_16 = phi_t0_4 + phi_a3_10;
- if (arg0->unkA4 != 0x1f)
- {
- if (arg0->unkA4 != 0x44)
- {
- if (arg0->unkA4 != 0x5f)
- {
- if (arg0->unkA4 != 0x36)
- {
- if (arg0->unkA4 != 0xb) // room is not boss room, disable FD mask
- {
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 != temp_a1_16->unk3F18)
- {
- temp_a1_16->unk3F18 = (u8)0xffU;
- phi_t3_7 = (u16)1;
- }
- }
- else // room is boss room, enable FD mask
- {
- block_355:
- phi_t3_7 = phi_t3_14;
- if (phi_t4_2 == temp_a1_16->unk3F18)
- {
- temp_a1_16->unk3F18 = (u8)0U;
- phi_t3_7 = (u16)1;
- }
- }
- }
- else
- {
- goto block_355;
- }
- }
- else
- {
- goto block_355;
- }
- }
- else
- {
- goto block_355;
- }
- }
- else
- {
- goto block_355;
- }
- }
- else // item isn't fierce deity's mask
- {
- if (sp28->unk311 != 0) // dim items
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_18 = (u8)0U;
- }
- else
- {
- phi_v1_18 = temp_t1;
- }
- phi_a2_26 = ((phi_t0_4 + (phi_v1_18 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_26 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a2_26 & 0xff) >= 0x28)
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_19 = (u8)0U;
- }
- else
- {
- phi_v1_19 = temp_t1;
- }
- phi_a0_6 = ((phi_t0_4 + (phi_v1_19 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_6 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a0_6 & 0xff) >= 0x31)
- {
- block_372:
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_20 = (u8)0U;
- }
- else
- {
- phi_v1_20 = temp_t1;
- }
- phi_v0_2 = ((phi_t0_4 + (phi_v1_20 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_2 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_2 & 0xff) >= 0x12)
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_21 = (u8)0U;
- }
- else
- {
- phi_v1_21 = temp_t1;
- }
- phi_v0_3 = ((phi_t0_4 + (phi_v1_21 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_3 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_3 & 0xff) >= 0x28)
- {
- block_386:
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_22 = (u8)0U;
- }
- else
- {
- phi_v1_22 = temp_t1;
- }
- phi_v0_4 = ((phi_t0_4 + (phi_v1_22 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_4 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_21 = phi_t3_14;
- if ((phi_v0_4 & 0xff) == 0)
- {
- block_393:
- temp_a1_17 = phi_t0_4 + phi_a3_10;
- phi_t3_21 = phi_t3_14;
- if (temp_a1_17->unk3F18 == 0)
- {
- phi_t3_21 = (u16)1;
- }
- temp_a1_17->unk3F18 = (u8)0xffU;
- }
- }
- else
- {
- goto block_393;
- }
- }
- else
- {
- goto block_386;
- }
- }
- else
- {
- goto block_393;
- }
- }
- else
- {
- goto block_372;
- }
- }
- else
- {
- phi_t3_21 = phi_t3_14;
- if (sp28->unk311 == 0)
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_23 = (u8)0U;
- }
- else
- {
- phi_v1_23 = temp_t1;
- }
- phi_a2_27 = ((phi_t0_4 + (phi_v1_23 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_27 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a2_27 & 0xff) >= 0x28)
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_24 = (u8)0U;
- }
- else
- {
- phi_v1_24 = temp_t1;
- }
- phi_a0_7 = ((phi_t0_4 + (phi_v1_24 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_7 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a0_7 & 0xff) >= 0x31)
- {
- block_411:
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_25 = (u8)0U;
- }
- else
- {
- phi_v1_25 = temp_t1;
- }
- phi_v0_5 = ((phi_t0_4 + (phi_v1_25 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_5 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_5 & 0xff) >= 0x12)
- {
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_26 = (u8)0U;
- }
- else
- {
- phi_v1_26 = temp_t1;
- }
- phi_v0_6 = ((phi_t0_4 + (phi_v1_26 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_6 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_6 & 0xff) >= 0x28)
- {
- block_425:
- if (phi_a3_10 == 0)
- {
- if (phi_t2_2 == temp_t1)
- {
- phi_v1_27 = (u8)0U;
- }
- else
- {
- phi_v1_27 = temp_t1;
- }
- phi_v0_7 = ((phi_t0_4 + (phi_v1_27 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_7 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_21 = phi_t3_14;
- if ((phi_v0_7 & 0xff) == 0)
- {
- block_432:
- temp_a1_18 = phi_t0_4 + phi_a3_10;
- phi_t3_21 = phi_t3_14;
- if (phi_t4_2 == temp_a1_18->unk3F18)
- {
- phi_t3_21 = (u16)1;
- }
- temp_a1_18->unk3F18 = (u8)0U;
- }
- }
- else
- {
- goto block_432;
- }
- }
- else
- {
- goto block_425;
- }
- }
- else
- {
- goto block_432;
- }
- }
- else
- {
- goto block_411;
- }
- }
- }
- if (sp28->unk317 != 0) // dim masks
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_9 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_9)
- {
- phi_v1_28 = (u8)0U;
- }
- else
- {
- phi_v1_28 = temp_v0_9;
- }
- phi_a2_28 = ((phi_t0_4 + (phi_v1_28 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_28 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_17 = phi_t3_21;
- if ((phi_a2_28 & 0xff) >= 0x32)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_10 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_10)
- {
- phi_v1_29 = (u8)0U;
- }
- else
- {
- phi_v1_29 = temp_v0_10;
- }
- phi_a0_8 = ((phi_t0_4 + (phi_v1_29 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_8 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_19 = phi_t0_4 + phi_a3_10;
- phi_t3_17 = phi_t3_21;
- if ((phi_a0_8 & 0xff) < 0x4a)
- {
- temp_v0_11 = temp_a1_19->unk3F18;
- temp_a1_19->unk3F18 = (u8)0xffU;
- phi_t3_17 = phi_t3_21;
- if (temp_v0_11 == 0)
- {
- phi_t3_17 = (u16)1;
- }
- }
- }
- }
- else
- {
- phi_t3_17 = phi_t3_21;
- if (sp28->unk317 == 0)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_12 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_12)
- {
- phi_v1_30 = (u8)0U;
- }
- else
- {
- phi_v1_30 = temp_v0_12;
- }
- phi_a2_29 = ((phi_t0_4 + (phi_v1_30 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_29 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_17 = phi_t3_21;
- if ((phi_a2_29 & 0xff) >= 0x32)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_13 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_13)
- {
- phi_v1_31 = (u8)0U;
- }
- else
- {
- phi_v1_31 = temp_v0_13;
- }
- phi_a0_9 = ((phi_t0_4 + (phi_v1_31 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_9 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_20 = phi_t0_4 + phi_a3_10;
- phi_t3_17 = phi_t3_21;
- if ((phi_a0_9 & 0xff) < 0x4a)
- {
- temp_t6 = temp_a1_20->unk3F18;
- temp_a1_20->unk3F18 = (u8)0U;
- phi_t3_17 = phi_t3_21;
- if ((u32) (phi_t4_2 ^ temp_t6) < 1U)
- {
- phi_t3_17 = (u16)1;
- }
- }
- }
- }
- }
- if (sp28->unk318 != 0) // dim pictograph and sticks??
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_14 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_14)
- {
- phi_v1_32 = (u8)0U;
- }
- else
- {
- phi_v1_32 = temp_v0_14;
- }
- phi_a2_30 = ((phi_t0_4 + (phi_v1_32 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_30 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_21 = phi_t0_4 + phi_a3_10;
- phi_t3_13 = phi_t3_17;
- if (0xd == (phi_a2_30 & 0xff))
- {
- temp_v0_15 = temp_a1_21->unk3F18;
- temp_a1_21->unk3F18 = (u8)0xffU;
- phi_t3_13 = phi_t3_17;
- if (temp_v0_15 == 0)
- {
- phi_t3_13 = (u16)1;
- }
- }
- }
- else
- {
- phi_t3_13 = phi_t3_17;
- if (sp28->unk318 == 0)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_16 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_16)
- {
- phi_v1_33 = (u8)0U;
- }
- else
- {
- phi_v1_33 = temp_v0_16;
- }
- phi_a2_31 = ((phi_t0_4 + (phi_v1_33 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_31 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_22 = phi_t0_4 + phi_a3_10;
- phi_t3_13 = phi_t3_17;
- if (0xd == (phi_a2_31 & 0xff))
- {
- temp_t8 = temp_a1_22->unk3F18;
- temp_a1_22->unk3F18 = (u8)0U;
- phi_t3_13 = phi_t3_17;
- if ((u32) (phi_t4_2 ^ temp_t8) < 1U)
- {
- phi_t3_13 = (u16)1;
- }
- }
- }
- }
- if (sp28->unk319 != 0) // dim weapons
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_17 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_17)
- {
- phi_v1_34 = (u8)0U;
- }
- else
- {
- phi_v1_34 = temp_v0_17;
- }
- phi_a2_32 = ((phi_t0_4 + (phi_v1_34 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_32 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a2_32 & 0xff) >= 0x28)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_18 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_18)
- {
- phi_v1_35 = (u8)0U;
- }
- else
- {
- phi_v1_35 = temp_v0_18;
- }
- phi_a0_10 = ((phi_t0_4 + (phi_v1_35 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_10 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_a0_10 & 0xff) >= 0x31)
- {
- block_504:
- if (phi_a3_10 == 0)
- {
- temp_v0_19 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_19)
- {
- phi_v1_36 = (u8)0U;
- }
- else
- {
- phi_v1_36 = temp_v0_19;
- }
- phi_v0_8 = ((phi_t0_4 + (phi_v1_36 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_8 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_8 & 0xff) >= 0x12)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_20 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_20)
- {
- phi_v1_37 = (u8)0U;
- }
- else
- {
- phi_v1_37 = temp_v0_20;
- }
- phi_v0_9 = ((phi_t0_4 + (phi_v1_37 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_9 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_9 & 0xff) >= 0x28)
- {
- block_518:
- if (phi_a3_10 == 0)
- {
- temp_v0_21 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_21)
- {
- phi_v1_38 = (u8)0U;
- }
- else
- {
- phi_v1_38 = temp_v0_21;
- }
- phi_v0_10 = ((phi_t0_4 + (phi_v1_38 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_10 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_10 & 0xff) != 0)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_22 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_22)
- {
- phi_v1_39 = (u8)0U;
- }
- else
- {
- phi_v1_39 = temp_v0_22;
- }
- phi_v0_11 = ((phi_t0_4 + (phi_v1_39 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_11 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_11 & 0xff) >= 0x32)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_23 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_23)
- {
- phi_v1_40 = (u8)0U;
- }
- else
- {
- phi_v1_40 = temp_v0_23;
- }
- phi_v0_12 = ((phi_t0_4 + (phi_v1_40 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_12 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_12 & 0xff) >= 0x4a)
- {
- block_539:
- if (phi_a3_10 == 0)
- {
- temp_v0_24 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_24)
- {
- phi_v1_41 = (u8)0U;
- }
- else
- {
- phi_v1_41 = temp_v0_24;
- }
- phi_v0_13 = ((phi_t0_4 + (phi_v1_41 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_13 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_23 = phi_t0_4 + phi_a3_10;
- phi_t3_7 = phi_t3_13;
- if (0xd != (phi_v0_13 & 0xff))
- {
- phi_t3_7 = phi_t3_13;
- if (temp_a1_23->unk3F18 == 0)
- {
- temp_a1_23->unk3F18 = (u8)0xffU;
- phi_t3_7 = (u16)1;
- }
- }
- }
- }
- else
- {
- goto block_539;
- }
- }
- }
- }
- else
- {
- goto block_518;
- }
- }
- }
- else
- {
- goto block_504;
- }
- }
- else
- {
- phi_t3_7 = phi_t3_13;
- if (sp28->unk319 == 0)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_25 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_25)
- {
- phi_v1_42 = (u8)0U;
- }
- else
- {
- phi_v1_42 = temp_v0_25;
- }
- phi_a2_33 = ((phi_t0_4 + (phi_v1_42 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a2_33 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_a2_33 & 0xff) >= 0x28)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_26 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_26)
- {
- phi_v1_43 = (u8)0U;
- }
- else
- {
- phi_v1_43 = temp_v0_26;
- }
- phi_a0_11 = ((phi_t0_4 + (phi_v1_43 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_a0_11 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_a0_11 & 0xff) >= 0x31)
- {
- block_563:
- if (phi_a3_10 == 0)
- {
- temp_v0_27 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_27)
- {
- phi_v1_44 = (u8)0U;
- }
- else
- {
- phi_v1_44 = temp_v0_27;
- }
- phi_v0_14 = ((phi_t0_4 + (phi_v1_44 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_14 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_14 & 0xff) >= 0x12)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_28 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_28)
- {
- phi_v1_45 = (u8)0U;
- }
- else
- {
- phi_v1_45 = temp_v0_28;
- }
- phi_v0_15 = ((phi_t0_4 + (phi_v1_45 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_15 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_15 & 0xff) >= 0x28)
- {
- block_577:
- if (phi_a3_10 == 0)
- {
- temp_v0_29 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_29)
- {
- phi_v1_46 = (u8)0U;
- }
- else
- {
- phi_v1_46 = temp_v0_29;
- }
- phi_v0_16 = ((phi_t0_4 + (phi_v1_46 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_16 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_16 & 0xff) != 0)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_30 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_30)
- {
- phi_v1_47 = (u8)0U;
- }
- else
- {
- phi_v1_47 = temp_v0_30;
- }
- phi_v0_17 = ((phi_t0_4 + (phi_v1_47 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_17 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- if ((phi_v0_17 & 0xff) >= 0x32)
- {
- if (phi_a3_10 == 0)
- {
- temp_v0_31 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_31)
- {
- phi_v1_48 = (u8)0U;
- }
- else
- {
- phi_v1_48 = temp_v0_31;
- }
- phi_v0_18 = ((phi_t0_4 + (phi_v1_48 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_18 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- phi_t3_7 = phi_t3_13;
- if ((phi_v0_18 & 0xff) >= 0x4a)
- {
- block_598:
- if (phi_a3_10 == 0)
- {
- temp_v0_32 = phi_t0_4->unk20;
- if (phi_t2_2 == temp_v0_32)
- {
- phi_v1_49 = (u8)0U;
- }
- else
- {
- phi_v1_49 = temp_v0_32;
- }
- phi_v0_19 = ((phi_t0_4 + (phi_v1_49 * 4)) + phi_a3_10)->unk4C;
- }
- else
- {
- phi_v0_19 = (phi_t0_4 + phi_a3_10)->unk4C;
- }
- temp_a1_24 = phi_t0_4 + phi_a3_10;
- phi_t3_7 = phi_t3_13;
- if (0xd != (phi_v0_19 & 0xff))
- {
- phi_t3_7 = phi_t3_13;
- if (phi_t4_2 == temp_a1_24->unk3F18)
- {
- temp_a1_24->unk3F18 = (u8)0U;
- phi_t3_7 = (u16)1;
- }
- }
- }
- }
- else
- {
- goto block_598;
- }
- }
- }
- }
- else
- {
- goto block_577;
- }
- }
- }
- else
- {
- goto block_563;
- }
- }
- }
- }
- }
- }
- }
- }
- temp_a3_11 = (s32) ((phi_a3_10 + 1) << 0x10) >> 0x10;
- phi_a3_10 = temp_a3_11;
- phi_t3_5 = phi_t3_7;
- phi_t0_5 = phi_t0_4;
- phi_t3_14 = phi_t3_7;
- if (temp_a3_11 < 4)
- {
- goto loop_305;
- }
- }
- }
- }
- }
- }
- else // not in water
- {
- goto block_203;
- }
- }
- }
- else // not deku
- {
- goto block_140;
- }
- }
- else // have magic
- {
- goto block_140;
- }
- }
- }
- }
- }
- else // not in cutscene scene
- {
- goto block_96;
- }
- }
- }
- }
- }
- if (phi_t3_5 != 0)
- {
- if (arg0->unk810 == 0)
- {
- temp_v0_33 = arg0 + 0x18000;
- if (temp_v0_33->unk875 == 0)
- {
- if (temp_v0_33->unkB4A == 0)
- {
- phi_t0_5->unk3F22 = (u16)0;
- func_8010EF68(0x32);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement