mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-11 11:33:48 +00:00
three more matches in BgJyaCobra (#758)
* two matches * cleanup and formatting * Update assets/xml/overlays/ovl_Bg_Jya_Cobra.xml Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * no more extract * format * owl exterminators * new match * new match * small thing * whoops Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
parent
99fbbd8390
commit
ab05eb9776
10 changed files with 320 additions and 894 deletions
|
@ -1,194 +0,0 @@
|
|||
glabel BgJyaCobra_UpdateShadowFromTop
|
||||
/* 00C28 80896518 27BDFEA8 */ addiu $sp, $sp, 0xFEA8 ## $sp = FFFFFEA8
|
||||
/* 00C2C 8089651C 3C0141FC */ lui $at, 0x41FC ## $at = 41FC0000
|
||||
/* 00C30 80896520 44811000 */ mtc1 $at, $f2 ## $f2 = 31.50
|
||||
/* 00C34 80896524 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00C38 80896528 AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 00C3C 8089652C AFA40158 */ sw $a0, 0x0158($sp)
|
||||
/* 00C40 80896530 27A90058 */ addiu $t1, $sp, 0x0058 ## $t1 = FFFFFF00
|
||||
/* 00C44 80896534 00004025 */ or $t0, $zero, $zero ## $t0 = 00000000
|
||||
.L80896538:
|
||||
/* 00C48 80896538 44882000 */ mtc1 $t0, $f4 ## $f4 = 0.00
|
||||
/* 00C4C 8089653C 25080001 */ addiu $t0, $t0, 0x0001 ## $t0 = 00000001
|
||||
/* 00C50 80896540 29010040 */ slti $at, $t0, 0x0040
|
||||
/* 00C54 80896544 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 00C58 80896548 25290004 */ addiu $t1, $t1, 0x0004 ## $t1 = FFFFFF04
|
||||
/* 00C5C 8089654C 46023001 */ sub.s $f0, $f6, $f2
|
||||
/* 00C60 80896550 46000202 */ mul.s $f8, $f0, $f0
|
||||
/* 00C64 80896554 1420FFF8 */ bne $at, $zero, .L80896538
|
||||
/* 00C68 80896558 E528FFFC */ swc1 $f8, -0x0004($t1) ## FFFFFF00
|
||||
/* 00C6C 8089655C 8FB00158 */ lw $s0, 0x0158($sp)
|
||||
/* 00C70 80896560 2401FFF0 */ addiu $at, $zero, 0xFFF0 ## $at = FFFFFFF0
|
||||
/* 00C74 80896564 24051000 */ addiu $a1, $zero, 0x1000 ## $a1 = 00001000
|
||||
/* 00C78 80896568 261001A3 */ addiu $s0, $s0, 0x01A3 ## $s0 = 000001A3
|
||||
/* 00C7C 8089656C 02018024 */ and $s0, $s0, $at
|
||||
/* 00C80 80896570 02002025 */ or $a0, $s0, $zero ## $a0 = 000001A3
|
||||
/* 00C84 80896574 AFB00040 */ sw $s0, 0x0040($sp)
|
||||
/* 00C88 80896578 0C01DDF8 */ jal Lib_MemSet
|
||||
|
||||
/* 00C8C 8089657C 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
|
||||
/* 00C90 80896580 3C014396 */ lui $at, 0x4396 ## $at = 43960000
|
||||
/* 00C94 80896584 44818000 */ mtc1 $at, $f16 ## $f16 = 300.00
|
||||
/* 00C98 80896588 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
|
||||
/* 00C9C 8089658C 27A80158 */ addiu $t0, $sp, 0x0158 ## $t0 = 00000000
|
||||
/* 00CA0 80896590 44817000 */ mtc1 $at, $f14 ## $f14 = 0.50
|
||||
/* 00CA4 80896594 8FA70040 */ lw $a3, 0x0040($sp)
|
||||
/* 00CA8 80896598 01005025 */ or $t2, $t0, $zero ## $t2 = 00000000
|
||||
/* 00CAC 8089659C 27A90058 */ addiu $t1, $sp, 0x0058 ## $t1 = FFFFFF00
|
||||
/* 00CB0 808965A0 24060280 */ addiu $a2, $zero, 0x0280 ## $a2 = 00000280
|
||||
/* 00CB4 808965A4 C52C0000 */ lwc1 $f12, 0x0000($t1) ## FFFFFF00
|
||||
.L808965A8:
|
||||
/* 00CB8 808965A8 27A40058 */ addiu $a0, $sp, 0x0058 ## $a0 = FFFFFF00
|
||||
.L808965AC:
|
||||
/* 00CBC 808965AC C48A0000 */ lwc1 $f10, 0x0000($a0) ## FFFFFF00
|
||||
/* 00CC0 808965B0 460E5482 */ mul.s $f18, $f10, $f14
|
||||
/* 00CC4 808965B4 460C9080 */ add.s $f2, $f18, $f12
|
||||
/* 00CC8 808965B8 4610103C */ c.lt.s $f2, $f16
|
||||
/* 00CCC 808965BC 00000000 */ nop
|
||||
/* 00CD0 808965C0 4502000F */ bc1fl .L80896600
|
||||
/* 00CD4 808965C4 C4880004 */ lwc1 $f8, 0x0004($a0) ## FFFFFF04
|
||||
/* 00CD8 808965C8 46021100 */ add.s $f4, $f2, $f2
|
||||
/* 00CDC 808965CC 4600218D */ trunc.w.s $f6, $f4
|
||||
/* 00CE0 808965D0 44183000 */ mfc1 $t8, $f6
|
||||
/* 00CE4 808965D4 00000000 */ nop
|
||||
/* 00CE8 808965D8 00D81023 */ subu $v0, $a2, $t8
|
||||
/* 00CEC 808965DC 284100A7 */ slti $at, $v0, 0x00A7
|
||||
/* 00CF0 808965E0 14200003 */ bne $at, $zero, .L808965F0
|
||||
/* 00CF4 808965E4 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
|
||||
/* 00CF8 808965E8 10000001 */ beq $zero, $zero, .L808965F0
|
||||
/* 00CFC 808965EC 240300A6 */ addiu $v1, $zero, 0x00A6 ## $v1 = 000000A6
|
||||
.L808965F0:
|
||||
/* 00D00 808965F0 90F90000 */ lbu $t9, 0x0000($a3) ## 00000000
|
||||
/* 00D04 808965F4 03236025 */ or $t4, $t9, $v1 ## $t4 = 000000A6
|
||||
/* 00D08 808965F8 A0EC0000 */ sb $t4, 0x0000($a3) ## 00000000
|
||||
/* 00D0C 808965FC C4880004 */ lwc1 $f8, 0x0004($a0) ## FFFFFF04
|
||||
.L80896600:
|
||||
/* 00D10 80896600 24E70001 */ addiu $a3, $a3, 0x0001 ## $a3 = 00000001
|
||||
/* 00D14 80896604 460E4282 */ mul.s $f10, $f8, $f14
|
||||
/* 00D18 80896608 460C5000 */ add.s $f0, $f10, $f12
|
||||
/* 00D1C 8089660C 4610003C */ c.lt.s $f0, $f16
|
||||
/* 00D20 80896610 00000000 */ nop
|
||||
/* 00D24 80896614 4502000F */ bc1fl .L80896654
|
||||
/* 00D28 80896618 C4860008 */ lwc1 $f6, 0x0008($a0) ## FFFFFF08
|
||||
/* 00D2C 8089661C 46000480 */ add.s $f18, $f0, $f0
|
||||
/* 00D30 80896620 4600910D */ trunc.w.s $f4, $f18
|
||||
/* 00D34 80896624 440E2000 */ mfc1 $t6, $f4
|
||||
/* 00D38 80896628 00000000 */ nop
|
||||
/* 00D3C 8089662C 00CE1023 */ subu $v0, $a2, $t6
|
||||
/* 00D40 80896630 284100A7 */ slti $at, $v0, 0x00A7
|
||||
/* 00D44 80896634 14200003 */ bne $at, $zero, .L80896644
|
||||
/* 00D48 80896638 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
|
||||
/* 00D4C 8089663C 10000001 */ beq $zero, $zero, .L80896644
|
||||
/* 00D50 80896640 240300A6 */ addiu $v1, $zero, 0x00A6 ## $v1 = 000000A6
|
||||
.L80896644:
|
||||
/* 00D54 80896644 90EF0000 */ lbu $t7, 0x0000($a3) ## 00000001
|
||||
/* 00D58 80896648 01E3C025 */ or $t8, $t7, $v1 ## $t8 = 000000A6
|
||||
/* 00D5C 8089664C A0F80000 */ sb $t8, 0x0000($a3) ## 00000001
|
||||
/* 00D60 80896650 C4860008 */ lwc1 $f6, 0x0008($a0) ## FFFFFF08
|
||||
.L80896654:
|
||||
/* 00D64 80896654 24E70001 */ addiu $a3, $a3, 0x0001 ## $a3 = 00000002
|
||||
/* 00D68 80896658 460E3202 */ mul.s $f8, $f6, $f14
|
||||
/* 00D6C 8089665C 460C4000 */ add.s $f0, $f8, $f12
|
||||
/* 00D70 80896660 4610003C */ c.lt.s $f0, $f16
|
||||
/* 00D74 80896664 00000000 */ nop
|
||||
/* 00D78 80896668 4502000F */ bc1fl .L808966A8
|
||||
/* 00D7C 8089666C C484000C */ lwc1 $f4, 0x000C($a0) ## FFFFFF0C
|
||||
/* 00D80 80896670 46000280 */ add.s $f10, $f0, $f0
|
||||
/* 00D84 80896674 4600548D */ trunc.w.s $f18, $f10
|
||||
/* 00D88 80896678 440C9000 */ mfc1 $t4, $f18
|
||||
/* 00D8C 8089667C 00000000 */ nop
|
||||
/* 00D90 80896680 00CC1023 */ subu $v0, $a2, $t4
|
||||
/* 00D94 80896684 284100A7 */ slti $at, $v0, 0x00A7
|
||||
/* 00D98 80896688 14200003 */ bne $at, $zero, .L80896698
|
||||
/* 00D9C 8089668C 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
|
||||
/* 00DA0 80896690 10000001 */ beq $zero, $zero, .L80896698
|
||||
/* 00DA4 80896694 240300A6 */ addiu $v1, $zero, 0x00A6 ## $v1 = 000000A6
|
||||
.L80896698:
|
||||
/* 00DA8 80896698 90ED0000 */ lbu $t5, 0x0000($a3) ## 00000002
|
||||
/* 00DAC 8089669C 01A37025 */ or $t6, $t5, $v1 ## $t6 = 000000A6
|
||||
/* 00DB0 808966A0 A0EE0000 */ sb $t6, 0x0000($a3) ## 00000002
|
||||
/* 00DB4 808966A4 C484000C */ lwc1 $f4, 0x000C($a0) ## FFFFFF0C
|
||||
.L808966A8:
|
||||
/* 00DB8 808966A8 24E70001 */ addiu $a3, $a3, 0x0001 ## $a3 = 00000003
|
||||
/* 00DBC 808966AC 24840010 */ addiu $a0, $a0, 0x0010 ## $a0 = FFFFFF10
|
||||
/* 00DC0 808966B0 460E2182 */ mul.s $f6, $f4, $f14
|
||||
/* 00DC4 808966B4 460C3000 */ add.s $f0, $f6, $f12
|
||||
/* 00DC8 808966B8 4610003C */ c.lt.s $f0, $f16
|
||||
/* 00DCC 808966BC 00000000 */ nop
|
||||
/* 00DD0 808966C0 4500000E */ bc1f .L808966FC
|
||||
/* 00DD4 808966C4 00000000 */ nop
|
||||
/* 00DD8 808966C8 46000200 */ add.s $f8, $f0, $f0
|
||||
/* 00DDC 808966CC 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 00DE0 808966D0 44185000 */ mfc1 $t8, $f10
|
||||
/* 00DE4 808966D4 00000000 */ nop
|
||||
/* 00DE8 808966D8 00D81023 */ subu $v0, $a2, $t8
|
||||
/* 00DEC 808966DC 284100A7 */ slti $at, $v0, 0x00A7
|
||||
/* 00DF0 808966E0 14200003 */ bne $at, $zero, .L808966F0
|
||||
/* 00DF4 808966E4 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
|
||||
/* 00DF8 808966E8 10000001 */ beq $zero, $zero, .L808966F0
|
||||
/* 00DFC 808966EC 240300A6 */ addiu $v1, $zero, 0x00A6 ## $v1 = 000000A6
|
||||
.L808966F0:
|
||||
/* 00E00 808966F0 90F90000 */ lbu $t9, 0x0000($a3) ## 00000003
|
||||
/* 00E04 808966F4 03236025 */ or $t4, $t9, $v1 ## $t4 = 000000A6
|
||||
/* 00E08 808966F8 A0EC0000 */ sb $t4, 0x0000($a3) ## 00000003
|
||||
.L808966FC:
|
||||
/* 00E0C 808966FC 1488FFAB */ bne $a0, $t0, .L808965AC
|
||||
/* 00E10 80896700 24E70001 */ addiu $a3, $a3, 0x0001 ## $a3 = 00000004
|
||||
/* 00E14 80896704 25290004 */ addiu $t1, $t1, 0x0004 ## $t1 = FFFFFF04
|
||||
/* 00E18 80896708 552AFFA7 */ bnel $t1, $t2, .L808965A8
|
||||
/* 00E1C 8089670C C52C0000 */ lwc1 $f12, 0x0000($t1) ## FFFFFF04
|
||||
/* 00E20 80896710 3C048089 */ lui $a0, %hi(D_80897518) ## $a0 = 80890000
|
||||
/* 00E24 80896714 3C0B8089 */ lui $t3, %hi(D_80897528) ## $t3 = 80890000
|
||||
/* 00E28 80896718 256B7528 */ addiu $t3, $t3, %lo(D_80897528) ## $t3 = 80897528
|
||||
/* 00E2C 8089671C 24847518 */ addiu $a0, $a0, %lo(D_80897518) ## $a0 = 80897518
|
||||
/* 00E30 80896720 24090780 */ addiu $t1, $zero, 0x0780 ## $t1 = 00000780
|
||||
/* 00E34 80896724 240A0020 */ addiu $t2, $zero, 0x0020 ## $t2 = 00000020
|
||||
/* 00E38 80896728 2407003C */ addiu $a3, $zero, 0x003C ## $a3 = 0000003C
|
||||
.L8089672C:
|
||||
/* 00E3C 8089672C 01204025 */ or $t0, $t1, $zero ## $t0 = 00000780
|
||||
/* 00E40 80896730 24050004 */ addiu $a1, $zero, 0x0004 ## $a1 = 00000004
|
||||
/* 00E44 80896734 02093021 */ addu $a2, $s0, $t1
|
||||
/* 00E48 80896738 00C51821 */ addu $v1, $a2, $a1
|
||||
.L8089673C:
|
||||
/* 00E4C 8089673C 906D0000 */ lbu $t5, 0x0000($v1) ## 000000A6
|
||||
/* 00E50 80896740 8C820000 */ lw $v0, 0x0000($a0) ## 80897518
|
||||
/* 00E54 80896744 24A50004 */ addiu $a1, $a1, 0x0004 ## $a1 = 00000008
|
||||
/* 00E58 80896748 01A2082A */ slt $at, $t5, $v0
|
||||
/* 00E5C 8089674C 50200004 */ beql $at, $zero, .L80896760
|
||||
/* 00E60 80896750 906E0001 */ lbu $t6, 0x0001($v1) ## 000000A7
|
||||
/* 00E64 80896754 A0620000 */ sb $v0, 0x0000($v1) ## 000000A6
|
||||
/* 00E68 80896758 8C820000 */ lw $v0, 0x0000($a0) ## 80897518
|
||||
/* 00E6C 8089675C 906E0001 */ lbu $t6, 0x0001($v1) ## 000000A7
|
||||
.L80896760:
|
||||
/* 00E70 80896760 01C2082A */ slt $at, $t6, $v0
|
||||
/* 00E74 80896764 50200004 */ beql $at, $zero, .L80896778
|
||||
/* 00E78 80896768 906F0002 */ lbu $t7, 0x0002($v1) ## 000000A8
|
||||
/* 00E7C 8089676C A0620001 */ sb $v0, 0x0001($v1) ## 000000A7
|
||||
/* 00E80 80896770 8C820000 */ lw $v0, 0x0000($a0) ## 80897518
|
||||
/* 00E84 80896774 906F0002 */ lbu $t7, 0x0002($v1) ## 000000A8
|
||||
.L80896778:
|
||||
/* 00E88 80896778 01E2082A */ slt $at, $t7, $v0
|
||||
/* 00E8C 8089677C 50200004 */ beql $at, $zero, .L80896790
|
||||
/* 00E90 80896780 90780003 */ lbu $t8, 0x0003($v1) ## 000000A9
|
||||
/* 00E94 80896784 A0620002 */ sb $v0, 0x0002($v1) ## 000000A8
|
||||
/* 00E98 80896788 8C820000 */ lw $v0, 0x0000($a0) ## 80897518
|
||||
/* 00E9C 8089678C 90780003 */ lbu $t8, 0x0003($v1) ## 000000A9
|
||||
.L80896790:
|
||||
/* 00EA0 80896790 0302082A */ slt $at, $t8, $v0
|
||||
/* 00EA4 80896794 10200002 */ beq $at, $zero, .L808967A0
|
||||
/* 00EA8 80896798 00000000 */ nop
|
||||
/* 00EAC 8089679C A0620003 */ sb $v0, 0x0003($v1) ## 000000A9
|
||||
.L808967A0:
|
||||
/* 00EB0 808967A0 54A7FFE6 */ bnel $a1, $a3, .L8089673C
|
||||
/* 00EB4 808967A4 00C51821 */ addu $v1, $a2, $a1
|
||||
/* 00EB8 808967A8 24840004 */ addiu $a0, $a0, 0x0004 ## $a0 = 8089751C
|
||||
/* 00EBC 808967AC 02081021 */ addu $v0, $s0, $t0
|
||||
/* 00EC0 808967B0 25290040 */ addiu $t1, $t1, 0x0040 ## $t1 = 000007C0
|
||||
/* 00EC4 808967B4 A04A003C */ sb $t2, 0x003C($v0) ## 0000003C
|
||||
/* 00EC8 808967B8 148BFFDC */ bne $a0, $t3, .L8089672C
|
||||
/* 00ECC 808967BC A04A0003 */ sb $t2, 0x0003($v0) ## 00000003
|
||||
/* 00ED0 808967C0 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 00ED4 808967C4 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 00ED8 808967C8 27BD0158 */ addiu $sp, $sp, 0x0158 ## $sp = 00000000
|
||||
/* 00EDC 808967CC 03E00008 */ jr $ra
|
||||
/* 00EE0 808967D0 00000000 */ nop
|
|
@ -1,114 +0,0 @@
|
|||
.late_rodata
|
||||
glabel D_808976FC
|
||||
.float 9.58738019108e-05
|
||||
|
||||
glabel D_80897700
|
||||
.float 9.58738019108e-05
|
||||
|
||||
.text
|
||||
glabel func_80895A70
|
||||
/* 00180 80895A70 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 00184 80895A74 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 00188 80895A78 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 0018C 80895A7C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
|
||||
/* 00190 80895A80 8C830118 */ lw $v1, 0x0118($a0) ## 00000118
|
||||
/* 00194 80895A84 30420003 */ andi $v0, $v0, 0x0003 ## $v0 = 00000000
|
||||
/* 00198 80895A88 10400007 */ beq $v0, $zero, .L80895AA8
|
||||
/* 0019C 80895A8C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
|
||||
/* 001A0 80895A90 1041000D */ beq $v0, $at, .L80895AC8
|
||||
/* 001A4 80895A94 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
|
||||
/* 001A8 80895A98 50410011 */ beql $v0, $at, .L80895AE0
|
||||
/* 001AC 80895A9C 8C620168 */ lw $v0, 0x0168($v1) ## 00000168
|
||||
/* 001B0 80895AA0 10000011 */ beq $zero, $zero, .L80895AE8
|
||||
/* 001B4 80895AA4 8FA20034 */ lw $v0, 0x0034($sp)
|
||||
.L80895AA8:
|
||||
/* 001B8 80895AA8 8CC3011C */ lw $v1, 0x011C($a2) ## 0000011C
|
||||
/* 001BC 80895AAC 1060004B */ beq $v1, $zero, .L80895BDC
|
||||
/* 001C0 80895AB0 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000
|
||||
/* 001C4 80895AB4 8C6E0130 */ lw $t6, 0x0130($v1) ## 00000130
|
||||
/* 001C8 80895AB8 55C0000C */ bnel $t6, $zero, .L80895AEC
|
||||
/* 001CC 80895ABC 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
|
||||
/* 001D0 80895AC0 10000046 */ beq $zero, $zero, .L80895BDC
|
||||
/* 001D4 80895AC4 ACC0011C */ sw $zero, 0x011C($a2) ## 0000011C
|
||||
.L80895AC8:
|
||||
/* 001D8 80895AC8 8C620164 */ lw $v0, 0x0164($v1) ## 00000164
|
||||
/* 001DC 80895ACC 54400007 */ bnel $v0, $zero, .L80895AEC
|
||||
/* 001E0 80895AD0 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
|
||||
/* 001E4 80895AD4 10000042 */ beq $zero, $zero, .L80895BE0
|
||||
/* 001E8 80895AD8 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 001EC 80895ADC 8C620168 */ lw $v0, 0x0168($v1) ## 00000168
|
||||
.L80895AE0:
|
||||
/* 001F0 80895AE0 5040003F */ beql $v0, $zero, .L80895BE0
|
||||
/* 001F4 80895AE4 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
.L80895AE8:
|
||||
/* 001F8 80895AE8 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
|
||||
.L80895AEC:
|
||||
/* 001FC 80895AEC C4C6018C */ lwc1 $f6, 0x018C($a2) ## 0000018C
|
||||
/* 00200 80895AF0 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001
|
||||
/* 00204 80895AF4 2444027C */ addiu $a0, $v0, 0x027C ## $a0 = 0000027C
|
||||
/* 00208 80895AF8 4604303E */ c.le.s $f6, $f4
|
||||
/* 0020C 80895AFC 24C50180 */ addiu $a1, $a2, 0x0180 ## $a1 = 00000180
|
||||
/* 00210 80895B00 45020004 */ bc1fl .L80895B14
|
||||
/* 00214 80895B04 A04002AE */ sb $zero, 0x02AE($v0) ## 000002AE
|
||||
/* 00218 80895B08 10000034 */ beq $zero, $zero, .L80895BDC
|
||||
/* 0021C 80895B0C A04F02AE */ sb $t7, 0x02AE($v0) ## 000002AE
|
||||
/* 00220 80895B10 A04002AE */ sb $zero, 0x02AE($v0) ## 000002AE
|
||||
.L80895B14:
|
||||
/* 00224 80895B14 AFA60040 */ sw $a2, 0x0040($sp)
|
||||
/* 00228 80895B18 AFA40020 */ sw $a0, 0x0020($sp)
|
||||
/* 0022C 80895B1C 0C01DF90 */ jal Math_Vec3f_Copy
|
||||
## Vec3f_Copy
|
||||
/* 00230 80895B20 AFA20034 */ sw $v0, 0x0034($sp)
|
||||
/* 00234 80895B24 8FA60040 */ lw $a2, 0x0040($sp)
|
||||
/* 00238 80895B28 3C018089 */ lui $at, %hi(D_808976FC) ## $at = 80890000
|
||||
/* 0023C 80895B2C C43076FC */ lwc1 $f16, %lo(D_808976FC)($at)
|
||||
/* 00240 80895B30 84D800B6 */ lh $t8, 0x00B6($a2) ## 000000B6
|
||||
/* 00244 80895B34 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
|
||||
/* 00248 80895B38 44984000 */ mtc1 $t8, $f8 ## $f8 = 0.00
|
||||
/* 0024C 80895B3C 00000000 */ nop
|
||||
/* 00250 80895B40 468042A0 */ cvt.s.w $f10, $f8
|
||||
/* 00254 80895B44 46105302 */ mul.s $f12, $f10, $f16
|
||||
/* 00258 80895B48 0C034348 */ jal Matrix_RotateY
|
||||
/* 0025C 80895B4C 00000000 */ nop
|
||||
/* 00260 80895B50 8FA60040 */ lw $a2, 0x0040($sp)
|
||||
/* 00264 80895B54 3C0A8089 */ lui $t2, %hi(D_80897308) ## $t2 = 80890000
|
||||
/* 00268 80895B58 3C018089 */ lui $at, %hi(D_80897700) ## $at = 80890000
|
||||
/* 0026C 80895B5C 84D9001C */ lh $t9, 0x001C($a2) ## 0000001C
|
||||
/* 00270 80895B60 C4267700 */ lwc1 $f6, %lo(D_80897700)($at)
|
||||
/* 00274 80895B64 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
|
||||
/* 00278 80895B68 33280003 */ andi $t0, $t9, 0x0003 ## $t0 = 00000000
|
||||
/* 0027C 80895B6C 00084840 */ sll $t1, $t0, 1
|
||||
/* 00280 80895B70 01495021 */ addu $t2, $t2, $t1
|
||||
/* 00284 80895B74 854A7308 */ lh $t2, %lo(D_80897308)($t2)
|
||||
/* 00288 80895B78 448A9000 */ mtc1 $t2, $f18 ## $f18 = -0.00
|
||||
/* 0028C 80895B7C 00000000 */ nop
|
||||
/* 00290 80895B80 46809120 */ cvt.s.w $f4, $f18
|
||||
/* 00294 80895B84 46062302 */ mul.s $f12, $f4, $f6
|
||||
/* 00298 80895B88 0C0342DC */ jal Matrix_RotateX
|
||||
/* 0029C 80895B8C 00000000 */ nop
|
||||
/* 002A0 80895B90 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
|
||||
/* 002A4 80895B94 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00
|
||||
/* 002A8 80895B98 8FA60040 */ lw $a2, 0x0040($sp)
|
||||
/* 002AC 80895B9C 3C01452F */ lui $at, 0x452F ## $at = 452F0000
|
||||
/* 002B0 80895BA0 E7A80028 */ swc1 $f8, 0x0028($sp)
|
||||
/* 002B4 80895BA4 E7AA002C */ swc1 $f10, 0x002C($sp)
|
||||
/* 002B8 80895BA8 44819000 */ mtc1 $at, $f18 ## $f18 = 2800.00
|
||||
/* 002BC 80895BAC C4D00190 */ lwc1 $f16, 0x0190($a2) ## 00000190
|
||||
/* 002C0 80895BB0 8FA20034 */ lw $v0, 0x0034($sp)
|
||||
/* 002C4 80895BB4 27A40028 */ addiu $a0, $sp, 0x0028 ## $a0 = FFFFFFE8
|
||||
/* 002C8 80895BB8 46128102 */ mul.s $f4, $f16, $f18
|
||||
/* 002CC 80895BBC 24450288 */ addiu $a1, $v0, 0x0288 ## $a1 = 00000288
|
||||
/* 002D0 80895BC0 AFA5001C */ sw $a1, 0x001C($sp)
|
||||
/* 002D4 80895BC4 0C0346BD */ jal Matrix_MultVec3f
|
||||
/* 002D8 80895BC8 E7A40030 */ swc1 $f4, 0x0030($sp)
|
||||
/* 002DC 80895BCC 8FA5001C */ lw $a1, 0x001C($sp)
|
||||
/* 002E0 80895BD0 8FA40020 */ lw $a0, 0x0020($sp)
|
||||
/* 002E4 80895BD4 0C01DFA7 */ jal Math_Vec3f_Sum
|
||||
## Vec3f_Add
|
||||
/* 002E8 80895BD8 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000
|
||||
.L80895BDC:
|
||||
/* 002EC 80895BDC 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
.L80895BE0:
|
||||
/* 002F0 80895BE0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
||||
/* 002F4 80895BE4 03E00008 */ jr $ra
|
||||
/* 002F8 80895BE8 00000000 */ nop
|
|
@ -1,198 +0,0 @@
|
|||
.late_rodata
|
||||
glabel D_80897704
|
||||
.float 0.1
|
||||
|
||||
glabel D_80897708
|
||||
.float 0.1
|
||||
|
||||
glabel D_8089770C
|
||||
.word 0x3EAE147B
|
||||
glabel D_80897710
|
||||
.word 0x3EAE147B
|
||||
glabel D_80897714
|
||||
.float 0.1
|
||||
|
||||
glabel D_80897718
|
||||
.word 0x3EAE147B
|
||||
glabel D_8089771C
|
||||
.word 0x3EAE147B
|
||||
|
||||
.text
|
||||
glabel func_80895C74
|
||||
/* 00384 80895C74 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
|
||||
/* 00388 80895C78 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 0038C 80895C7C AFA5002C */ sw $a1, 0x002C($sp)
|
||||
/* 00390 80895C80 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 00394 80895C84 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
|
||||
/* 00398 80895C88 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
|
||||
/* 0039C 80895C8C 30430003 */ andi $v1, $v0, 0x0003 ## $v1 = 00000000
|
||||
/* 003A0 80895C90 14610016 */ bne $v1, $at, .L80895CEC
|
||||
/* 003A4 80895C94 8C880118 */ lw $t0, 0x0118($a0) ## 00000118
|
||||
/* 003A8 80895C98 51000015 */ beql $t0, $zero, .L80895CF0
|
||||
/* 003AC 80895C9C 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
|
||||
/* 003B0 80895CA0 9102015C */ lbu $v0, 0x015C($t0) ## 0000015C
|
||||
/* 003B4 80895CA4 24E4018C */ addiu $a0, $a3, 0x018C ## $a0 = 0000018C
|
||||
/* 003B8 80895CA8 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
|
||||
/* 003BC 80895CAC 304E0004 */ andi $t6, $v0, 0x0004 ## $t6 = 00000000
|
||||
/* 003C0 80895CB0 11C00003 */ beq $t6, $zero, .L80895CC0
|
||||
/* 003C4 80895CB4 304F0001 */ andi $t7, $v0, 0x0001 ## $t7 = 00000000
|
||||
/* 003C8 80895CB8 55E0000D */ bnel $t7, $zero, .L80895CF0
|
||||
/* 003CC 80895CBC 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
|
||||
.L80895CC0:
|
||||
/* 003D0 80895CC0 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
|
||||
/* 003D4 80895CC4 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3D4CCCCD
|
||||
/* 003D8 80895CC8 AFA30018 */ sw $v1, 0x0018($sp)
|
||||
/* 003DC 80895CCC 44050000 */ mfc1 $a1, $f0
|
||||
/* 003E0 80895CD0 AFA70028 */ sw $a3, 0x0028($sp)
|
||||
/* 003E4 80895CD4 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 003E8 80895CD8 AFA80020 */ sw $t0, 0x0020($sp)
|
||||
/* 003EC 80895CDC 8FA30018 */ lw $v1, 0x0018($sp)
|
||||
/* 003F0 80895CE0 8FA70028 */ lw $a3, 0x0028($sp)
|
||||
/* 003F4 80895CE4 10000029 */ beq $zero, $zero, .L80895D8C
|
||||
/* 003F8 80895CE8 8FA80020 */ lw $t0, 0x0020($sp)
|
||||
.L80895CEC:
|
||||
/* 003FC 80895CEC 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
|
||||
.L80895CF0:
|
||||
/* 00400 80895CF0 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00
|
||||
/* 00404 80895CF4 3C188089 */ lui $t8, %hi(D_80897310) ## $t8 = 80890000
|
||||
/* 00408 80895CF8 0303C021 */ addu $t8, $t8, $v1
|
||||
/* 0040C 80895CFC E4E4018C */ swc1 $f4, 0x018C($a3) ## 0000018C
|
||||
/* 00410 80895D00 93187310 */ lbu $t8, %lo(D_80897310)($t8)
|
||||
/* 00414 80895D04 00034840 */ sll $t1, $v1, 1
|
||||
/* 00418 80895D08 3C0A8089 */ lui $t2, %hi(D_80897314) ## $t2 = 80890000
|
||||
/* 0041C 80895D0C 1300001F */ beq $t8, $zero, .L80895D8C
|
||||
/* 00420 80895D10 01495021 */ addu $t2, $t2, $t1
|
||||
/* 00424 80895D14 84F900B6 */ lh $t9, 0x00B6($a3) ## 000000B6
|
||||
/* 00428 80895D18 854A7314 */ lh $t2, %lo(D_80897314)($t2)
|
||||
/* 0042C 80895D1C 032A1023 */ subu $v0, $t9, $t2
|
||||
/* 00430 80895D20 00021400 */ sll $v0, $v0, 16
|
||||
/* 00434 80895D24 00021403 */ sra $v0, $v0, 16
|
||||
/* 00438 80895D28 04430005 */ bgezl $v0, .L80895D40
|
||||
/* 0043C 80895D2C 28412000 */ slti $at, $v0, 0x2000
|
||||
/* 00440 80895D30 00021023 */ subu $v0, $zero, $v0
|
||||
/* 00444 80895D34 00021400 */ sll $v0, $v0, 16
|
||||
/* 00448 80895D38 00021403 */ sra $v0, $v0, 16
|
||||
/* 0044C 80895D3C 28412000 */ slti $at, $v0, 0x2000
|
||||
.L80895D40:
|
||||
/* 00450 80895D40 10200012 */ beq $at, $zero, .L80895D8C
|
||||
/* 00454 80895D44 24018000 */ addiu $at, $zero, 0x8000 ## $at = FFFF8000
|
||||
/* 00458 80895D48 10410010 */ beq $v0, $at, .L80895D8C
|
||||
/* 0045C 80895D4C 244BE000 */ addiu $t3, $v0, 0xE000 ## $t3 = FFFFE000
|
||||
/* 00460 80895D50 448B3000 */ mtc1 $t3, $f6 ## $f6 = NaN
|
||||
/* 00464 80895D54 3C013940 */ lui $at, 0x3940 ## $at = 39400000
|
||||
/* 00468 80895D58 44815000 */ mtc1 $at, $f10 ## $f10 = 0.00
|
||||
/* 0046C 80895D5C 46803220 */ cvt.s.w $f8, $f6
|
||||
/* 00470 80895D60 C4F2018C */ lwc1 $f18, 0x018C($a3) ## 0000018C
|
||||
/* 00474 80895D64 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
|
||||
/* 00478 80895D68 460A4402 */ mul.s $f16, $f8, $f10
|
||||
/* 0047C 80895D6C 46109100 */ add.s $f4, $f18, $f16
|
||||
/* 00480 80895D70 E4E4018C */ swc1 $f4, 0x018C($a3) ## 0000018C
|
||||
/* 00484 80895D74 C4E6018C */ lwc1 $f6, 0x018C($a3) ## 0000018C
|
||||
/* 00488 80895D78 4600303C */ c.lt.s $f6, $f0
|
||||
/* 0048C 80895D7C 00000000 */ nop
|
||||
/* 00490 80895D80 45020003 */ bc1fl .L80895D90
|
||||
/* 00494 80895D84 3C014264 */ lui $at, 0x4264 ## $at = 42640000
|
||||
/* 00498 80895D88 E4E0018C */ swc1 $f0, 0x018C($a3) ## 0000018C
|
||||
.L80895D8C:
|
||||
/* 0049C 80895D8C 3C014264 */ lui $at, 0x4264 ## $at = 42640000
|
||||
.L80895D90:
|
||||
/* 004A0 80895D90 44819000 */ mtc1 $at, $f18 ## $f18 = 57.00
|
||||
/* 004A4 80895D94 C4EA0028 */ lwc1 $f10, 0x0028($a3) ## 00000028
|
||||
/* 004A8 80895D98 C4E80024 */ lwc1 $f8, 0x0024($a3) ## 00000024
|
||||
/* 004AC 80895D9C C4E4002C */ lwc1 $f4, 0x002C($a3) ## 0000002C
|
||||
/* 004B0 80895DA0 46125400 */ add.s $f16, $f10, $f18
|
||||
/* 004B4 80895DA4 E4E80180 */ swc1 $f8, 0x0180($a3) ## 00000180
|
||||
/* 004B8 80895DA8 E4E40188 */ swc1 $f4, 0x0188($a3) ## 00000188
|
||||
/* 004BC 80895DAC 14600005 */ bne $v1, $zero, .L80895DC4
|
||||
/* 004C0 80895DB0 E4F00184 */ swc1 $f16, 0x0184($a3) ## 00000184
|
||||
/* 004C4 80895DB4 3C018089 */ lui $at, %hi(D_80897704) ## $at = 80890000
|
||||
/* 004C8 80895DB8 C4267704 */ lwc1 $f6, %lo(D_80897704)($at)
|
||||
/* 004CC 80895DBC 10000048 */ beq $zero, $zero, .L80895EE0
|
||||
/* 004D0 80895DC0 E4E60190 */ swc1 $f6, 0x0190($a3) ## 00000190
|
||||
.L80895DC4:
|
||||
/* 004D4 80895DC4 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
|
||||
/* 004D8 80895DC8 14610025 */ bne $v1, $at, .L80895E60
|
||||
/* 004DC 80895DCC 24E40190 */ addiu $a0, $a3, 0x0190 ## $a0 = 00000190
|
||||
/* 004E0 80895DD0 84E300B6 */ lh $v1, 0x00B6($a3) ## 000000B6
|
||||
/* 004E4 80895DD4 3C018089 */ lui $at, %hi(D_80897708) ## $at = 80890000
|
||||
/* 004E8 80895DD8 C4207708 */ lwc1 $f0, %lo(D_80897708)($at)
|
||||
/* 004EC 80895DDC 24018000 */ addiu $at, $zero, 0x8000 ## $at = FFFF8000
|
||||
/* 004F0 80895DE0 00611021 */ addu $v0, $v1, $at
|
||||
/* 004F4 80895DE4 00021400 */ sll $v0, $v0, 16
|
||||
/* 004F8 80895DE8 00021403 */ sra $v0, $v0, 16
|
||||
/* 004FC 80895DEC 28410500 */ slti $at, $v0, 0x0500
|
||||
/* 00500 80895DF0 10200006 */ beq $at, $zero, .L80895E0C
|
||||
/* 00504 80895DF4 3C063D23 */ lui $a2, 0x3D23 ## $a2 = 3D230000
|
||||
/* 00508 80895DF8 2841FB01 */ slti $at, $v0, 0xFB01
|
||||
/* 0050C 80895DFC 14200003 */ bne $at, $zero, .L80895E0C
|
||||
/* 00510 80895E00 3C018089 */ lui $at, %hi(D_8089770C) ## $at = 80890000
|
||||
/* 00514 80895E04 10000011 */ beq $zero, $zero, .L80895E4C
|
||||
/* 00518 80895E08 C420770C */ lwc1 $f0, %lo(D_8089770C)($at)
|
||||
.L80895E0C:
|
||||
/* 0051C 80895E0C 2462C000 */ addiu $v0, $v1, 0xC000 ## $v0 = FFFFC000
|
||||
/* 00520 80895E10 00021400 */ sll $v0, $v0, 16
|
||||
/* 00524 80895E14 00021403 */ sra $v0, $v0, 16
|
||||
/* 00528 80895E18 28410500 */ slti $at, $v0, 0x0500
|
||||
/* 0052C 80895E1C 1020000B */ beq $at, $zero, .L80895E4C
|
||||
/* 00530 80895E20 2841FB01 */ slti $at, $v0, 0xFB01
|
||||
/* 00534 80895E24 5420000A */ bnel $at, $zero, .L80895E50
|
||||
/* 00538 80895E28 44050000 */ mfc1 $a1, $f0
|
||||
/* 0053C 80895E2C 51000008 */ beql $t0, $zero, .L80895E50
|
||||
/* 00540 80895E30 44050000 */ mfc1 $a1, $f0
|
||||
/* 00544 80895E34 910C015C */ lbu $t4, 0x015C($t0) ## 0000015C
|
||||
/* 00548 80895E38 3C018089 */ lui $at, %hi(D_80897710) ## $at = 80890000
|
||||
/* 0054C 80895E3C 318D0004 */ andi $t5, $t4, 0x0004 ## $t5 = 00000000
|
||||
/* 00550 80895E40 51A00003 */ beql $t5, $zero, .L80895E50
|
||||
/* 00554 80895E44 44050000 */ mfc1 $a1, $f0
|
||||
/* 00558 80895E48 C4207710 */ lwc1 $f0, %lo(D_80897710)($at)
|
||||
.L80895E4C:
|
||||
/* 0055C 80895E4C 44050000 */ mfc1 $a1, $f0
|
||||
.L80895E50:
|
||||
/* 00560 80895E50 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 00564 80895E54 34C6D70A */ ori $a2, $a2, 0xD70A ## $a2 = 3D23D70A
|
||||
/* 00568 80895E58 10000022 */ beq $zero, $zero, .L80895EE4
|
||||
/* 0056C 80895E5C 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
.L80895E60:
|
||||
/* 00570 80895E60 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
|
||||
/* 00574 80895E64 1461001E */ bne $v1, $at, .L80895EE0
|
||||
/* 00578 80895E68 24E40190 */ addiu $a0, $a3, 0x0190 ## $a0 = 00000190
|
||||
/* 0057C 80895E6C 84E300B6 */ lh $v1, 0x00B6($a3) ## 000000B6
|
||||
/* 00580 80895E70 3C018089 */ lui $at, %hi(D_80897714) ## $at = 80890000
|
||||
/* 00584 80895E74 C4207714 */ lwc1 $f0, %lo(D_80897714)($at)
|
||||
/* 00588 80895E78 24018000 */ addiu $at, $zero, 0x8000 ## $at = FFFF8000
|
||||
/* 0058C 80895E7C 00611021 */ addu $v0, $v1, $at
|
||||
/* 00590 80895E80 00021400 */ sll $v0, $v0, 16
|
||||
/* 00594 80895E84 00021403 */ sra $v0, $v0, 16
|
||||
/* 00598 80895E88 28410500 */ slti $at, $v0, 0x0500
|
||||
/* 0059C 80895E8C 10200006 */ beq $at, $zero, .L80895EA8
|
||||
/* 005A0 80895E90 3C063D23 */ lui $a2, 0x3D23 ## $a2 = 3D230000
|
||||
/* 005A4 80895E94 2841FB01 */ slti $at, $v0, 0xFB01
|
||||
/* 005A8 80895E98 14200003 */ bne $at, $zero, .L80895EA8
|
||||
/* 005AC 80895E9C 3C018089 */ lui $at, %hi(D_80897718) ## $at = 80890000
|
||||
/* 005B0 80895EA0 1000000C */ beq $zero, $zero, .L80895ED4
|
||||
/* 005B4 80895EA4 C4207718 */ lwc1 $f0, %lo(D_80897718)($at)
|
||||
.L80895EA8:
|
||||
/* 005B8 80895EA8 3C01FFFF */ lui $at, 0xFFFF ## $at = FFFF0000
|
||||
/* 005BC 80895EAC 34214000 */ ori $at, $at, 0x4000 ## $at = FFFF4000
|
||||
/* 005C0 80895EB0 00611021 */ addu $v0, $v1, $at
|
||||
/* 005C4 80895EB4 00021400 */ sll $v0, $v0, 16
|
||||
/* 005C8 80895EB8 00021403 */ sra $v0, $v0, 16
|
||||
/* 005CC 80895EBC 28410500 */ slti $at, $v0, 0x0500
|
||||
/* 005D0 80895EC0 10200004 */ beq $at, $zero, .L80895ED4
|
||||
/* 005D4 80895EC4 2841FB01 */ slti $at, $v0, 0xFB01
|
||||
/* 005D8 80895EC8 14200002 */ bne $at, $zero, .L80895ED4
|
||||
/* 005DC 80895ECC 3C018089 */ lui $at, %hi(D_8089771C) ## $at = 80890000
|
||||
/* 005E0 80895ED0 C420771C */ lwc1 $f0, %lo(D_8089771C)($at)
|
||||
.L80895ED4:
|
||||
/* 005E4 80895ED4 44050000 */ mfc1 $a1, $f0
|
||||
/* 005E8 80895ED8 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 005EC 80895EDC 34C6D70A */ ori $a2, $a2, 0xD70A ## $a2 = 3D23D70A
|
||||
.L80895EE0:
|
||||
/* 005F0 80895EE0 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
.L80895EE4:
|
||||
/* 005F4 80895EE4 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
|
||||
/* 005F8 80895EE8 03E00008 */ jr $ra
|
||||
/* 005FC 80895EEC 00000000 */ nop
|
|
@ -667,8 +667,8 @@ void func_8002CDE4(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
|||
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensity = titleCtx->alpha = 0;
|
||||
}
|
||||
|
||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x,
|
||||
s16 y, u8 width, u8 height) {
|
||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
|
||||
u8 height) {
|
||||
titleCtx->texture = texture;
|
||||
titleCtx->x = x;
|
||||
titleCtx->y = y;
|
||||
|
@ -678,8 +678,8 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx
|
|||
titleCtx->delayTimer = 0;
|
||||
}
|
||||
|
||||
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x,
|
||||
s32 y, s32 width, s32 height, s32 delay) {
|
||||
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
|
||||
s32 width, s32 height, s32 delay) {
|
||||
Scene* loadedScene = globalCtx->loadedScene;
|
||||
u32 size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart;
|
||||
|
||||
|
@ -764,10 +764,10 @@ s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
|||
if ((globalCtx->actorCtx.titleCtx.delayTimer != 0) || (globalCtx->actorCtx.titleCtx.alpha != 0)) {
|
||||
titleCtx->durationTimer = 0;
|
||||
titleCtx->delayTimer = 0;
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Actor_Kill(Actor* actor) {
|
||||
|
@ -849,6 +849,7 @@ void Actor_Destroy(Actor* actor, GlobalContext* globalCtx) {
|
|||
|
||||
void func_8002D7EC(Actor* actor) {
|
||||
f32 speedRate = R_UPDATE_RATE * 0.5f;
|
||||
|
||||
actor->world.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
|
||||
actor->world.pos.y += (actor->velocity.y * speedRate) + actor->colChkInfo.displacement.y;
|
||||
actor->world.pos.z += (actor->velocity.z * speedRate) + actor->colChkInfo.displacement.z;
|
||||
|
@ -871,6 +872,7 @@ void Actor_MoveForward(Actor* actor) {
|
|||
|
||||
void func_8002D908(Actor* actor) {
|
||||
f32 sp24 = Math_CosS(actor->world.rot.x) * actor->speedXZ;
|
||||
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * sp24;
|
||||
actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * sp24;
|
||||
|
@ -888,6 +890,7 @@ void func_8002D9A4(Actor* actor, f32 arg1) {
|
|||
|
||||
void func_8002D9F8(Actor* actor, SkelAnime* skelAnime) {
|
||||
Vec3f sp1C;
|
||||
|
||||
SkelAnime_UpdateTranslation(skelAnime, &sp1C, actor->shape.rot.y);
|
||||
actor->world.pos.x += sp1C.x * actor->scale.x;
|
||||
actor->world.pos.y += sp1C.y * actor->scale.y;
|
||||
|
@ -1001,9 +1004,8 @@ s32 func_8002DDF4(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
|
||||
ArmsHook* hookshot;
|
||||
ArmsHook* hookshot = (ArmsHook*)Actor_Find(&globalCtx->actorCtx, ACTOR_ARMS_HOOK, ACTORCAT_ITEMACTION);
|
||||
|
||||
hookshot = (ArmsHook*)Actor_Find(&globalCtx->actorCtx, ACTOR_ARMS_HOOK, ACTORCAT_ITEMACTION);
|
||||
hookshot->grabbed = actorB;
|
||||
hookshot->grabbedDistDiff.x = 0.0f;
|
||||
hookshot->grabbedDistDiff.y = 0.0f;
|
||||
|
@ -1014,7 +1016,7 @@ void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
|
|||
|
||||
void func_8002DE74(GlobalContext* globalCtx, Player* player) {
|
||||
if ((globalCtx->roomCtx.curRoom.unk_03 != 4) && func_800C0CB8(globalCtx)) {
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_HORSE0);
|
||||
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, MAIN_CAM), CAM_SET_HORSE0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1039,7 +1041,7 @@ s32 func_8002DF38(GlobalContext* globalCtx, Actor* actor, u8 csMode) {
|
|||
player->unk_448 = actor;
|
||||
player->unk_46A = 0;
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_8002DF54(GlobalContext* globalCtx, Actor* actor, u8 csMode) {
|
||||
|
@ -1048,7 +1050,7 @@ s32 func_8002DF54(GlobalContext* globalCtx, Actor* actor, u8 csMode) {
|
|||
func_8002DF38(globalCtx, actor, csMode);
|
||||
player->unk_46A = 1;
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void func_8002DF90(DynaPolyActor* dynaActor) {
|
||||
|
@ -1066,40 +1068,40 @@ s32 func_8002DFC8(Actor* actor, s16 arg1, GlobalContext* globalCtx) {
|
|||
s16 var = (s16)(actor->yawTowardsPlayer + 0x8000) - player->actor.shape.rot.y;
|
||||
|
||||
if (ABS(var) < arg1) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E020(Actor* actorA, Actor* actorB, s16 arg2) {
|
||||
s16 var = (s16)(Actor_WorldYawTowardActor(actorA, actorB) + 0x8000) - actorB->shape.rot.y;
|
||||
|
||||
if (ABS(var) < arg2) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E084(Actor* actor, s16 arg1) {
|
||||
s16 var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
|
||||
if (ABS(var) < arg1) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E0D0(Actor* actorA, Actor* actorB, s16 arg2) {
|
||||
s16 var = Actor_WorldYawTowardActor(actorA, actorB) - actorA->shape.rot.y;
|
||||
|
||||
if (ABS(var) < arg2) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E12C(Actor* actor, f32 arg1, s16 arg2) {
|
||||
|
@ -1109,11 +1111,11 @@ s32 func_8002E12C(Actor* actor, f32 arg1, s16 arg2) {
|
|||
f32 xyzDistanceFromLink = sqrtf(SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer));
|
||||
|
||||
if (xyzDistanceFromLink < arg1) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E1A8(Actor* actorA, Actor* actorB, f32 arg2, s16 arg3) {
|
||||
|
@ -1121,11 +1123,11 @@ s32 func_8002E1A8(Actor* actorA, Actor* actorB, f32 arg2, s16 arg3) {
|
|||
s16 var = Actor_WorldYawTowardActor(actorA, actorB) - actorA->shape.rot.y;
|
||||
|
||||
if (ABS(var) < arg3) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2) {
|
||||
|
@ -1137,10 +1139,10 @@ s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2) {
|
|||
actor->velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
CollisionPoly* sCurCeilingPoly;
|
||||
|
@ -1199,7 +1201,7 @@ s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3)
|
|||
return func_8002E234(actor, floorHeightDiff, arg3);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
||||
|
@ -1410,19 +1412,15 @@ PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor) {
|
|||
}
|
||||
|
||||
f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
|
||||
s16 yawTemp;
|
||||
s16 yawTempAbs;
|
||||
f32 ret;
|
||||
|
||||
yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - arg2;
|
||||
yawTempAbs = ABS(yawTemp);
|
||||
s16 yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - arg2;
|
||||
s16 yawTempAbs = ABS(yawTemp);
|
||||
|
||||
if (player->unk_664 != NULL) {
|
||||
if ((yawTempAbs > 0x4000) || (actor->flags & 0x8000000)) {
|
||||
return FLT_MAX;
|
||||
} else {
|
||||
ret = actor->xyzDistToPlayerSq -
|
||||
actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * 3.0517578125e-05f);
|
||||
f32 ret =
|
||||
actor->xyzDistToPlayerSq - actor->xyzDistToPlayerSq * 0.8f * ((0x4000 - yawTempAbs) * (1.0f / 0x8000));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -1453,17 +1451,14 @@ u32 func_8002F090(Actor* actor, f32 arg1) {
|
|||
}
|
||||
|
||||
s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
||||
s16 var;
|
||||
s16 abs_var;
|
||||
f32 dist;
|
||||
|
||||
if ((actor->update == NULL) || !(actor->flags & 1)) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
var = (s16)(actor->yawTowardsPlayer - 0x8000) - player->actor.shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
s16 var = (s16)(actor->yawTowardsPlayer - 0x8000) - player->actor.shape.rot.y;
|
||||
s16 abs_var = ABS(var);
|
||||
f32 dist;
|
||||
|
||||
if ((player->unk_664 == NULL) && (abs_var > 0x2AAA)) {
|
||||
dist = FLT_MAX;
|
||||
|
@ -1474,16 +1469,16 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
|||
return !func_8002F090(actor, D_80115FF8[actor->targetMode].leashScale * dist);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 func_8002F194(Actor* actor, GlobalContext* globalCtx) {
|
||||
if (actor->flags & 0x100) {
|
||||
actor->flags &= ~0x100;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u32 exchangeItemId) {
|
||||
|
@ -1494,14 +1489,14 @@ s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u3
|
|||
(!actor->isTargeted &&
|
||||
((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) ||
|
||||
(arg2 < actor->xzDistToPlayer)))) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
player->targetActor = actor;
|
||||
player->targetActorDistance = actor->xzDistToPlayer;
|
||||
player->exchangeItemId = exchangeItemId;
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_8002F298(Actor* actor, GlobalContext* globalCtx, f32 arg2, u32 exchangeItemId) {
|
||||
|
@ -1514,14 +1509,15 @@ s32 func_8002F2CC(Actor* actor, GlobalContext* globalCtx, f32 arg2) {
|
|||
|
||||
s32 func_8002F2F4(Actor* actor, GlobalContext* globalCtx) {
|
||||
f32 var1 = 50.0f + actor->colChkInfo.cylRadius;
|
||||
|
||||
return func_8002F2CC(actor, globalCtx, var1);
|
||||
}
|
||||
|
||||
u32 func_8002F334(Actor* actor, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1550,27 +1546,26 @@ u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = PLAYER;
|
||||
s16 yawDiff;
|
||||
s32 absYawDiff;
|
||||
|
||||
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->targetActor)) && (getItemId > GI_NONE) &&
|
||||
(getItemId < GI_MAX)) ||
|
||||
(!(player->stateFlags1 & 0x20000800))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
absYawDiff = ABS(yawDiff);
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
|
||||
if ((getItemId != GI_NONE) || (player->getItemDirection < absYawDiff)) {
|
||||
player->getItemId = getItemId;
|
||||
player->interactRangeActor = actor;
|
||||
player->getItemDirection = absYawDiff;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_8002F554(Actor* actor, GlobalContext* globalCtx, s32 getItemId) {
|
||||
|
@ -1594,6 +1589,7 @@ void func_8002F5C4(Actor* actorA, Actor* actorB, GlobalContext* globalCtx) {
|
|||
|
||||
if (parent->id == ACTOR_PLAYER) {
|
||||
Player* player = (Player*)parent;
|
||||
|
||||
player->heldActor = actorB;
|
||||
player->interactRangeActor = actorB;
|
||||
}
|
||||
|
@ -1625,10 +1621,10 @@ u32 func_8002F63C(GlobalContext* globalCtx, Actor* horse, s32 arg2) {
|
|||
if (!(player->stateFlags1 & 0x003C7880)) {
|
||||
player->rideActor = horse;
|
||||
player->unk_43C = arg2;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 Actor_HasNoChild(GlobalContext* globalCtx, Actor* actor) {
|
||||
|
@ -2343,11 +2339,11 @@ s32 func_800314D4(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, f32 arg3)
|
|||
if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 1.0f) &&
|
||||
(((arg2->y + actor->uncullZoneDownward) * var) > -1.0f) &&
|
||||
(((arg2->y - actor->uncullZoneScale) * var) < 1.0f)) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
||||
|
@ -3114,7 +3110,7 @@ s32 func_8003305C(Actor* actor, struct_80032E24* arg1, GlobalContext* globalCtx,
|
|||
s16 objBankIndex;
|
||||
|
||||
if (arg1->unk_10 != -1) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
while (arg1->unk_08 > 0) {
|
||||
|
@ -3147,7 +3143,7 @@ s32 func_8003305C(Actor* actor, struct_80032E24* arg1, GlobalContext* globalCtx,
|
|||
ZeldaArena_FreeDebug(arg1->unk_0C, "../z_actor.c", 7679);
|
||||
ZeldaArena_FreeDebug(arg1->unk_04, "../z_actor.c", 7680);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void func_80033260(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, f32 arg3, s32 arg4, f32 arg5, s16 scale,
|
||||
|
@ -3394,9 +3390,9 @@ s32 func_80033A84(GlobalContext* globalCtx, Actor* actor) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && actor->isTargeted) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3404,9 +3400,9 @@ s32 func_80033AB8(GlobalContext* globalCtx, Actor* actor) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
if ((player->stateFlags1 & 0x10) && !actor->isTargeted) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3602,27 +3598,27 @@ s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, c
|
|||
|
||||
if (func_8002F194(actor, globalCtx)) {
|
||||
*arg2 = 1;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*arg2 != 0) {
|
||||
*arg2 = unkFunc2(globalCtx, actor);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
func_8002F374(globalCtx, actor, &sp26, &sp24);
|
||||
|
||||
if ((sp26 < 0) || (sp26 > SCREEN_WIDTH) || (sp24 < 0) || (sp24 > SCREEN_HEIGHT)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!func_8002F2CC(actor, globalCtx, arg3)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
actor->textId = unkFunc1(globalCtx, actor);
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
@ -3957,9 +3953,9 @@ s32 func_800354B4(GlobalContext* globalCtx, Actor* actor, f32 range, s16 arg3, s
|
|||
var2 = actor->yawTowardsPlayer - arg5;
|
||||
|
||||
if ((actor->xzDistToPlayer <= range) && (player->swordState != 0) && (arg4 >= ABS(var1)) && (arg3 >= ABS(var2))) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3997,9 +3993,9 @@ u8 func_800355E4(GlobalContext* globalCtx, Collider* collider) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
if ((collider->acFlags & AC_TYPE_PLAYER) && (player->swordState != 0) && (player->swordAnimation == 0x16)) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5367,7 +5363,7 @@ u16 func_80037C30(GlobalContext* globalCtx, s16 arg1) {
|
|||
|
||||
s32 func_80037C5C(GlobalContext* globalCtx, s16 arg1, u16 textId) {
|
||||
func_80036E50(textId, arg1);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80037C94(GlobalContext* globalCtx, Actor* actor, s32 arg2) {
|
||||
|
@ -5376,19 +5372,19 @@ s32 func_80037C94(GlobalContext* globalCtx, Actor* actor, s32 arg2) {
|
|||
|
||||
s32 func_80037CB8(GlobalContext* globalCtx, Actor* actor, s16 arg2) {
|
||||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
s32 ret = 0;
|
||||
s32 ret = false;
|
||||
|
||||
switch (func_8010BDBC(msgCtx)) {
|
||||
case 2:
|
||||
func_80037C5C(globalCtx, arg2, actor->textId);
|
||||
ret = 1;
|
||||
ret = true;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx) && func_80037C94(globalCtx, actor, arg2)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
msgCtx->msgMode = 0x36;
|
||||
ret = 1;
|
||||
ret = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -5404,14 +5400,14 @@ s32 func_80037D98(GlobalContext* globalCtx, Actor* actor, s16 arg2, s32* arg3) {
|
|||
|
||||
if (func_8002F194(actor, globalCtx)) {
|
||||
*arg3 = 1;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*arg3 == 1) {
|
||||
if (func_80037CB8(globalCtx, actor, arg2)) {
|
||||
*arg3 = 0;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
func_8002F374(globalCtx, actor, &sp2C, &sp2A);
|
||||
|
@ -5419,21 +5415,21 @@ s32 func_80037D98(GlobalContext* globalCtx, Actor* actor, s16 arg2, s32* arg3) {
|
|||
if (0) {} // Necessary to match
|
||||
|
||||
if ((sp2C < 0) || (sp2C > SCREEN_WIDTH) || (sp2A < 0) || (sp2A > SCREEN_HEIGHT)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
|
||||
if (abs_var >= 0x4300) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((actor->xyzDistToPlayerSq > 25600.0f) && !actor->isTargeted) {
|
||||
return 0;
|
||||
if ((actor->xyzDistToPlayerSq > SQ(160.0f)) && !actor->isTargeted) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (actor->xyzDistToPlayerSq <= 6400.0f) {
|
||||
if (actor->xyzDistToPlayerSq <= SQ(80.0f)) {
|
||||
if (func_8002F2CC(actor, globalCtx, 80.0f)) {
|
||||
actor->textId = func_80037C30(globalCtx, arg2);
|
||||
}
|
||||
|
@ -5443,7 +5439,7 @@ s32 func_80037D98(GlobalContext* globalCtx, Actor* actor, s16 arg2, s32* arg3) {
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80037F30(Vec3s* arg0, Vec3s* arg1) {
|
||||
|
@ -5451,7 +5447,7 @@ s32 func_80037F30(Vec3s* arg0, Vec3s* arg1) {
|
|||
Math_SmoothStepToS(&arg0->x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg1->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg1->x, 0, 6, 6200, 100);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80037FC8(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
||||
|
@ -5469,13 +5465,13 @@ s32 func_80037FC8(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
|||
arg2->y = (arg2->y < -8000) ? -8000 : ((arg2->y > 8000) ? 8000 : arg2->y);
|
||||
|
||||
if (var && (ABS(arg2->y) < 8000)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&arg3->y, sp34 - arg2->y, 4, 2000, 1);
|
||||
arg3->y = (arg3->y < -12000) ? -12000 : ((arg3->y > 12000) ? 12000 : arg3->y);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 arg4) {
|
||||
|
@ -5493,7 +5489,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
|||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5505,7 +5501,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
|||
|
||||
func_80037FC8(actor, &sp2C, arg2, arg3);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4) {
|
||||
|
@ -5522,7 +5518,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
|||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5534,5 +5530,5 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
|
|||
|
||||
func_80037FC8(actor, &sp24, arg2, arg3);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,21 +22,19 @@ extern Gfx D_06010C20[];
|
|||
extern UNK_TYPE D_0601167C;
|
||||
extern Gfx D_060117D0[];
|
||||
|
||||
Vtx D_80897270[] = {
|
||||
VTX(-800, 0, -800, 0, 2048, 0xFF, 0xFF, 0xFF, 0xFF),
|
||||
VTX(800, 0, -800, 2048, 2048, 0xFF, 0xFF, 0xFF, 0xFF),
|
||||
VTX(800, 0, 800, 2048, 0, 0xFF, 0xFF, 0xFF, 0xFF),
|
||||
VTX(-800, 0, 800, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF),
|
||||
static Vtx sShadowVtx[4] = {
|
||||
VTX(-800, 0, -800, 0, 2048, 255, 255, 255, 255),
|
||||
VTX(800, 0, -800, 2048, 2048, 255, 255, 255, 255),
|
||||
VTX(800, 0, 800, 2048, 0, 255, 255, 255, 255),
|
||||
VTX(-800, 0, 800, 0, 0, 255, 255, 255, 255),
|
||||
};
|
||||
|
||||
Gfx D_808972B0[] = {
|
||||
static Gfx sShadowDL[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetRenderMode(AA_EN | Z_CMP | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_DEC | FORCE_BL |
|
||||
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1),
|
||||
G_RM_AA_ZB_XLU_DECAL2),
|
||||
gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2),
|
||||
gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR),
|
||||
gsSPVertex(D_80897270, 4, 0),
|
||||
gsSPVertex(sShadowVtx, 4, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
@ -53,13 +51,13 @@ const ActorInit Bg_Jya_Cobra_InitVars = {
|
|||
(ActorFunc)BgJyaCobra_Draw,
|
||||
};
|
||||
|
||||
s16 D_80897308[] = { 0, 0, 0, 0 };
|
||||
static s16 D_80897308[] = { 0, 0, 0, 0 };
|
||||
|
||||
u8 D_80897310[] = { 1, 0, 1, 0 };
|
||||
static u8 D_80897310[] = { true, false, true, false };
|
||||
|
||||
s16 D_80897314[] = { -0x4000, 0000, 0x4000, 0000 };
|
||||
static s16 D_80897314[] = { -0x4000, 0000, 0x4000, 0000 };
|
||||
|
||||
u8 D_8089731C[11][11] = {
|
||||
static u8 D_8089731C[11][11] = {
|
||||
{ 0x00, 0x00, 0x20, 0x80, 0x80, 0x80, 0x80, 0x80, 0x20, 0x00, 0x00 },
|
||||
{ 0x00, 0x20, 0x80, 0xA0, 0xA3, 0xA3, 0xA3, 0xA0, 0x80, 0x20, 0x00 },
|
||||
{ 0x20, 0x80, 0xA0, 0xA5, 0xA6, 0xA6, 0xA6, 0xA5, 0xA0, 0x80, 0x20 },
|
||||
|
@ -73,13 +71,13 @@ u8 D_8089731C[11][11] = {
|
|||
{ 0x00, 0x00, 0x20, 0x80, 0x80, 0x80, 0x80, 0x80, 0x20, 0x00, 0x00 },
|
||||
};
|
||||
|
||||
u8 D_80897398[3][3] = {
|
||||
static u8 D_80897398[3][3] = {
|
||||
{ 0x20, 0x80, 0x20 },
|
||||
{ 0x80, 0xA0, 0x80 },
|
||||
{ 0x20, 0x80, 0x20 },
|
||||
};
|
||||
|
||||
Vec3f D_808973A4[] = {
|
||||
static Vec3f D_808973A4[] = {
|
||||
{ -6.0f, 100.0f, 7.6f },
|
||||
{ -12.6f, 69.200005f, -10.0f },
|
||||
{ -9.0f, 43.0f, -1.0f },
|
||||
|
@ -108,25 +106,25 @@ Vec3f D_808973A4[] = {
|
|||
{ 0.0f, 101.4f, 5.0f },
|
||||
};
|
||||
|
||||
Vec3f D_808974DC[] = {
|
||||
static Vec3f D_808974DC[] = {
|
||||
{ 12.0f, 21.300001f, -2.5f }, { 30.0f, 21.300001f, -2.5f }, { -15.0f, 21.300001f, -2.5f },
|
||||
{ -30.0f, 21.300001f, -2.5f }, { 12.0f, 21.300001f, -2.5f },
|
||||
};
|
||||
|
||||
s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
|
||||
static s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
|
||||
|
||||
InitChainEntry D_80897528[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
Vec3s D_80897538 = { 0, -0x4000, 0 };
|
||||
static Vec3s D_80897538 = { 0, -0x4000, 0 };
|
||||
|
||||
Vec3s D_80897540 = { 0, 0x4000, 0 };
|
||||
static Vec3s D_80897540 = { 0, 0x4000, 0 };
|
||||
|
||||
Vec3f D_80897548[] = {
|
||||
static Vec3f D_80897548[] = {
|
||||
{ 0.1f, 0.1f, 0.1f },
|
||||
{ 0.072f, 0.072f, 0.072f },
|
||||
{ 0.1f, 0.1f, 0.132f },
|
||||
|
@ -164,62 +162,52 @@ void BgJyaCobra_SpawnRay(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor register and stack diffs
|
||||
void func_80895A70(BgJyaCobra* this) {
|
||||
s32 pad;
|
||||
BgJyaBigmirror* temp_v1;
|
||||
MirRay* phi_v0;
|
||||
Vec3f sp28;
|
||||
MirRay* temp;
|
||||
|
||||
temp_v1 = (BgJyaBigmirror*)this->dyna.actor.parent;
|
||||
BgJyaBigmirror* mirror = (BgJyaBigmirror*)this->dyna.actor.parent;
|
||||
MirRay* mirRay;
|
||||
|
||||
switch (this->dyna.actor.params & 3) {
|
||||
case 0:
|
||||
temp = (MirRay*)this->dyna.actor.child;
|
||||
if (this->dyna.actor.child != NULL) {
|
||||
phi_v0 = temp;
|
||||
if (phi_v0->actor.update == NULL) {
|
||||
this->dyna.actor.child = NULL;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
mirRay = (MirRay*)this->dyna.actor.child;
|
||||
if (mirRay == NULL) {
|
||||
return;
|
||||
}
|
||||
if (this->dyna.actor.child->update == NULL) {
|
||||
this->dyna.actor.child = NULL;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
phi_v0 = (MirRay*)temp_v1->lightBeams[1];
|
||||
if (phi_v0 == NULL) {
|
||||
mirRay = (MirRay*)mirror->lightBeams[1];
|
||||
if (mirRay == NULL) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
phi_v0 = (MirRay*)temp_v1->lightBeams[2];
|
||||
if (phi_v0 == NULL) {
|
||||
mirRay = (MirRay*)mirror->lightBeams[2];
|
||||
if (mirRay == NULL) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->unk_18C <= 0.0f) {
|
||||
phi_v0->unLit = 1;
|
||||
return;
|
||||
}
|
||||
mirRay->unLit = 1;
|
||||
} else {
|
||||
Vec3f sp28;
|
||||
|
||||
phi_v0->unLit = 0;
|
||||
Math_Vec3f_Copy(&phi_v0->sourcePt, &this->unk_180);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateX(D_80897308[this->dyna.actor.params & 3] * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
sp28.x = 0.0f;
|
||||
sp28.y = 0.0;
|
||||
sp28.z = this->unk_190 * 2800.0f;
|
||||
Matrix_MultVec3f(&sp28, &phi_v0->poolPt);
|
||||
Math_Vec3f_Sum(&phi_v0->sourcePt, &phi_v0->poolPt, &phi_v0->poolPt);
|
||||
mirRay->unLit = 0;
|
||||
Math_Vec3f_Copy(&mirRay->sourcePt, &this->unk_180);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateX(D_80897308[this->dyna.actor.params & 3] * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
sp28.x = 0.0f;
|
||||
sp28.y = 0.0;
|
||||
sp28.z = this->unk_190 * 2800.0f;
|
||||
Matrix_MultVec3f(&sp28, &mirRay->poolPt);
|
||||
Math_Vec3f_Sum(&mirRay->sourcePt, &mirRay->poolPt, &mirRay->poolPt);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895A70.s")
|
||||
#endif
|
||||
|
||||
void func_80895BEC(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
@ -232,22 +220,20 @@ void func_80895BEC(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos.z = this->dyna.actor.world.pos.z + sp2C.z;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Small stack diffs
|
||||
void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
s16 phi_v0;
|
||||
s32 params = this->dyna.actor.params;
|
||||
BgJyaBigmirror* parent = (BgJyaBigmirror*)this->dyna.actor.parent;
|
||||
s16 params = this->dyna.actor.params;
|
||||
BgJyaBigmirror* mirror = (BgJyaBigmirror*)this->dyna.actor.parent;
|
||||
f32 phi_f0;
|
||||
|
||||
if ((params & 3) == 2 && parent != NULL &&
|
||||
(!(parent->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED) ||
|
||||
!(parent->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED))) {
|
||||
if ((params & 3) == 2 && mirror != NULL &&
|
||||
(!(mirror->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED) ||
|
||||
!(mirror->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED))) {
|
||||
Math_StepToF(&this->unk_18C, 0.0f, 0.05f);
|
||||
} else {
|
||||
this->unk_18C = 1.0f;
|
||||
if (D_80897310[(params & 3)] != 0) {
|
||||
phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[(params & 3)];
|
||||
if (D_80897310[params & 3]) {
|
||||
phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[params & 3];
|
||||
phi_v0 = ABS(phi_v0);
|
||||
if (phi_v0 < 0x2000 && phi_v0 != -0x8000) {
|
||||
this->unk_18C += (phi_v0 - 0x2000) * (3.0f / 0x4000);
|
||||
|
@ -262,7 +248,7 @@ void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
this->unk_180.y = this->dyna.actor.world.pos.y + 57.0f;
|
||||
this->unk_180.z = this->dyna.actor.world.pos.z;
|
||||
|
||||
if (!(params & 3)) {
|
||||
if ((params & 3) == 0) {
|
||||
this->unk_190 = 0.1f;
|
||||
} else if ((params & 3) == 1) {
|
||||
phi_f0 = 0.1f;
|
||||
|
@ -271,8 +257,8 @@ void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
phi_f0 = 0.34f;
|
||||
} else {
|
||||
phi_v0 = this->dyna.actor.shape.rot.y - 0x4000;
|
||||
if (phi_v0 < 0x500 && phi_v0 > -0x500 && parent != NULL &&
|
||||
(parent->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED)) {
|
||||
if (phi_v0 < 0x500 && phi_v0 > -0x500 && mirror != NULL &&
|
||||
(mirror->puzzleFlags & BIGMIR_PUZZLE_BOMBIWA_DESTROYED)) {
|
||||
phi_f0 = 0.34f;
|
||||
}
|
||||
}
|
||||
|
@ -291,9 +277,6 @@ void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
Math_StepToF(&this->unk_190, phi_f0, 0.04f);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_80895C74.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Repeatedly calculates temp_z * 0x40 for temp_s2[temp_z] rather than calculating it once when temp_z is assigned.
|
||||
|
@ -315,22 +298,22 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
s32 j;
|
||||
s32 k;
|
||||
s32 l;
|
||||
s16 rotY;
|
||||
|
||||
temp_s2 = (u8(*)[0x40])ALIGN16((s32)(&this->shadowTexture));
|
||||
Lib_MemSet((u8*)temp_s2, 0x1000, 0);
|
||||
|
||||
Matrix_RotateX((M_PI / 4), MTXMODE_NEW);
|
||||
Matrix_RotateY((!(this->dyna.actor.params & 3) ? (s16)(this->dyna.actor.shape.rot.y + 0x4000)
|
||||
: (s16)(this->dyna.actor.shape.rot.y - 0x4000)) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
rotY = !(this->dyna.actor.params & 3) ? (this->dyna.actor.shape.rot.y + 0x4000)
|
||||
: (this->dyna.actor.shape.rot.y - 0x4000);
|
||||
Matrix_RotateY(rotY * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.9f, 0.9f, 0.9f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < 25; i++) {
|
||||
Math_Vec3f_Diff(&D_808973A4[i + 1], &D_808973A4[i], &spD4);
|
||||
spD4.x *= 0.5f;
|
||||
spD4.y *= 0.5f;
|
||||
spD4.z *= 0.5f;
|
||||
spD4.x *= 1 / 2.0f;
|
||||
spD4.y *= 1 / 2.0f;
|
||||
spD4.z *= 1 / 2.0f;
|
||||
for (j = 0; j < 2; j++) {
|
||||
spC8.x = D_808973A4[i].x + (spD4.x * j);
|
||||
spC8.y = D_808973A4[i].y + (spD4.y * j);
|
||||
|
@ -354,9 +337,9 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
Math_Vec3f_Diff(&D_808974DC[i + 1], &D_808974DC[i], &spD4);
|
||||
spD4.x = spD4.x * 0.2f;
|
||||
spD4.y = spD4.y * 0.2f;
|
||||
spD4.z = spD4.z * 0.2f;
|
||||
spD4.x *= 1 / 5.0f;
|
||||
spD4.y *= 1 / 5.0f;
|
||||
spD4.z *= 1 / 5.0f;
|
||||
for (j = 0; j < 5; j++) {
|
||||
spC8.x = D_808974DC[i].x + (spD4.x * j);
|
||||
spC8.y = D_808974DC[i].y + (spD4.y * j);
|
||||
|
@ -392,61 +375,54 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_UpdateShadowFromSide.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor register and stack diffs
|
||||
/*
|
||||
* Updates the shadow with light coming from above the mirror
|
||||
*/
|
||||
void BgJyaCobra_UpdateShadowFromTop(BgJyaCobra* this) {
|
||||
f32 sp58[0x40];
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
u8* temp_s0;
|
||||
s32 i_copy;
|
||||
u8* phi_a3;
|
||||
s32 counter;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 i_copy;
|
||||
s32 counter;
|
||||
u8* temp_s0;
|
||||
u8* sp40;
|
||||
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
sp58[i] = SQ(i - 31.5f);
|
||||
}
|
||||
|
||||
temp_s0 = (u8*)ALIGN16((s32)(&this->shadowTexture));
|
||||
phi_a3 = temp_s0;
|
||||
sp40 = temp_s0 = (u8*)ALIGN16((u32)(&this->shadowTexture));
|
||||
Lib_MemSet(temp_s0, 0x1000, 0);
|
||||
|
||||
for (i = 0; i != 0x40; i++) {
|
||||
temp_f12 = sp58[i];
|
||||
for (j = 0; j < 0x40; j++) {
|
||||
temp_f2 = (sp58[j] * 0.5f) + temp_f12;
|
||||
f32 temp_f12 = sp58[i];
|
||||
|
||||
for (j = 0; j < 0x40; j++, sp40++) {
|
||||
f32 temp_f2 = (sp58[j] * 0.5f) + temp_f12;
|
||||
|
||||
if (temp_f2 < 300.0f) {
|
||||
*phi_a3 |= CLAMP_MAX(640 - (s32)(temp_f2 * 2.0f), 166);
|
||||
*sp40 |= CLAMP_MAX(640 - (s32)(temp_f2 * 2.0f), 166);
|
||||
}
|
||||
phi_a3++;
|
||||
}
|
||||
}
|
||||
|
||||
for (counter = 0, i = 0x780; counter < 4; counter++, i += 0x40) {
|
||||
i_copy = i;
|
||||
for (i_copy = 0x780, counter = 0; counter < 4; counter++, i_copy += 0x40) {
|
||||
i = i_copy;
|
||||
for (j = 4; j < 0x3C; j++) {
|
||||
if (temp_s0[i + j] < D_80897518[counter]) {
|
||||
temp_s0[i + j] = D_80897518[counter];
|
||||
if (temp_s0[i_copy + j] < D_80897518[counter]) {
|
||||
temp_s0[i_copy + j] = D_80897518[counter];
|
||||
}
|
||||
}
|
||||
temp_s0[i_copy + 0x3C] = 0x20;
|
||||
temp_s0[i_copy + 0x3] = 0x20;
|
||||
temp_s0[i + 0x3C] = 0x20;
|
||||
temp_s0[i + 0x3] = 0x20;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/BgJyaCobra_UpdateShadowFromTop.s")
|
||||
#endif
|
||||
|
||||
void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaCobra* this = THIS;
|
||||
|
||||
BgJyaCobra_InitDynapoly(this, globalCtx, &D_0601167C, DPM_UNK);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, D_80897528);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
if (!(this->dyna.actor.params & 3) && Flags_GetSwitch(globalCtx, ((s32)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.home.rot.y = this->dyna.actor.shape.rot.y = 0;
|
||||
}
|
||||
|
@ -477,10 +453,10 @@ void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80896918(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = &func_80896950;
|
||||
this->actionFunc = func_80896950;
|
||||
this->unk_168 = 0;
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y =
|
||||
(s16)((this->unk_16C << 0xD) + this->dyna.actor.home.rot.y);
|
||||
(this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y;
|
||||
}
|
||||
|
||||
void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
|
@ -502,84 +478,72 @@ void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808969F8(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
Player* player;
|
||||
Player* player = PLAYER;
|
||||
s32 phi_a3;
|
||||
s16 temp2;
|
||||
|
||||
player = PLAYER;
|
||||
this->actionFunc = func_80896ABC;
|
||||
|
||||
temp2 = this->dyna.actor.yawTowardsPlayer - this->dyna.actor.shape.rot.y;
|
||||
phi_a3 = (s16)(this->dyna.actor.shape.rot.y - this->dyna.unk_158);
|
||||
phi_a3 = ABS(phi_a3);
|
||||
|
||||
if (temp2 > 0) {
|
||||
if (phi_a3 > 0x4000) {
|
||||
this->unk_16A = 1;
|
||||
} else {
|
||||
this->unk_16A = -1;
|
||||
}
|
||||
this->unk_16A = (phi_a3 > 0x4000) ? 1 : -1;
|
||||
} else {
|
||||
if (phi_a3 > 0x4000) {
|
||||
this->unk_16A = -1;
|
||||
} else {
|
||||
this->unk_16A = 1;
|
||||
}
|
||||
this->unk_16A = (phi_a3 > 0x4000) ? -1 : 1;
|
||||
}
|
||||
|
||||
this->unk_174.x = player->actor.world.pos.x - this->dyna.actor.world.pos.x;
|
||||
this->unk_174.y = player->actor.world.pos.y - this->dyna.actor.world.pos.y;
|
||||
this->unk_174.z = player->actor.world.pos.z - this->dyna.actor.world.pos.z;
|
||||
this->unk_170 = this->unk_16E = 0;
|
||||
this->unk_172 = 1;
|
||||
this->unk_172 = true;
|
||||
}
|
||||
|
||||
void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
s16 temp_v0;
|
||||
Player* player;
|
||||
Player* player = PLAYER;
|
||||
|
||||
player = PLAYER;
|
||||
|
||||
temp_v0 = (s16)((this->unk_16C << 0xD) + this->dyna.actor.home.rot.y) - this->dyna.actor.world.rot.y;
|
||||
temp_v0 = (s16)((this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y) - this->dyna.actor.world.rot.y;
|
||||
if (ABS(temp_v0) < 7424) {
|
||||
Math_StepToS(&this->unk_16E, 106, 4);
|
||||
} else {
|
||||
Math_StepToS(&this->unk_16E, 21, 10);
|
||||
}
|
||||
|
||||
if (Math_ScaledStepToS(&this->unk_170, (s16)(this->unk_16A << 0xd), this->unk_16E) != 0) {
|
||||
if (Math_ScaledStepToS(&this->unk_170, this->unk_16A * 0x2000, this->unk_16E)) {
|
||||
this->unk_16C = (this->unk_16C + this->unk_16A) & 7;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
func_80896918(this, globalCtx);
|
||||
} else {
|
||||
temp_v0 = (this->unk_16C << 0xD) + this->dyna.actor.home.rot.y + this->unk_170;
|
||||
this->dyna.actor.world.rot.y = temp_v0;
|
||||
this->dyna.actor.shape.rot.y = temp_v0;
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y =
|
||||
(this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y + this->unk_170;
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & 0x10) {
|
||||
if (this->unk_172 != 0) {
|
||||
if (this->unk_172) {
|
||||
func_80895BEC(this, globalCtx);
|
||||
}
|
||||
} else if (fabsf(this->dyna.unk_150) < 0.001f) {
|
||||
this->unk_172 = 0;
|
||||
this->unk_172 = false;
|
||||
}
|
||||
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
func_8002F974(&this->dyna.actor, 0x200A);
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
}
|
||||
|
||||
void BgJyaCobra_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgJyaCobra* this = THIS;
|
||||
s32 params;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
func_80895C74(this, globalCtx);
|
||||
func_80895A70(this);
|
||||
|
||||
params = this->dyna.actor.params & 3;
|
||||
if (params == 0 || params == 2) {
|
||||
if ((this->dyna.actor.params & 3) == 0 || (this->dyna.actor.params & 3) == 2) {
|
||||
BgJyaCobra_UpdateShadowFromSide(this);
|
||||
}
|
||||
}
|
||||
|
@ -617,15 +581,13 @@ void func_80896D78(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
u32 pad;
|
||||
s16 params;
|
||||
s32 pad;
|
||||
s16 params = this->dyna.actor.params & 3;
|
||||
Vec3f sp64;
|
||||
Vec3s* phi_a3;
|
||||
|
||||
if (1) {}
|
||||
|
||||
params = this->dyna.actor.params & 3;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 966);
|
||||
|
||||
func_80094044(globalCtx->state.gfxCtx);
|
||||
|
@ -635,18 +597,16 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
sp64.y = this->dyna.actor.world.pos.y;
|
||||
sp64.z = this->dyna.actor.world.pos.z;
|
||||
phi_a3 = &D_80897538;
|
||||
} else {
|
||||
} else if (params == 2) {
|
||||
sp64.x = this->dyna.actor.world.pos.x + 70.0f;
|
||||
sp64.y = this->dyna.actor.world.pos.y;
|
||||
sp64.z = this->dyna.actor.world.pos.z;
|
||||
phi_a3 = &D_80897540;
|
||||
} else { // params == 1
|
||||
phi_a3 = &this->dyna.actor.shape.rot;
|
||||
if (params == 2) {
|
||||
sp64.x = this->dyna.actor.world.pos.x + 70.0f;
|
||||
sp64.y = this->dyna.actor.world.pos.y;
|
||||
sp64.z = this->dyna.actor.world.pos.z;
|
||||
phi_a3 = &D_80897540;
|
||||
// params == 1
|
||||
} else {
|
||||
Math_Vec3f_Copy(&sp64, &this->dyna.actor.world.pos);
|
||||
}
|
||||
Math_Vec3f_Copy(&sp64, &this->dyna.actor.world.pos);
|
||||
}
|
||||
|
||||
func_800D1694(sp64.x, sp64.y, sp64.z, phi_a3);
|
||||
|
||||
Matrix_Scale(D_80897548[params].x, D_80897548[params].y, D_80897548[params].z, MTXMODE_APPLY);
|
||||
|
@ -660,7 +620,7 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
|
|||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOLOD);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_808972B0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sShadowDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 1006);
|
||||
}
|
||||
|
|
|
@ -42,8 +42,7 @@ void BgSstFloor_Init(BgSstFloor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(&gBongoDrumCol, &colHeader);
|
||||
this->dyna.bgId =
|
||||
DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgSstFloor_Destroy(BgSstFloor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -112,10 +111,9 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx) {
|
|||
this->drumHeight = sinf(this->drumPhase * (M_PI / 2)) * (-this->drumAmp);
|
||||
Math_StepToS(&this->drumAmp, 0, 5);
|
||||
|
||||
colHeader->vtxList[1].y = colHeader->vtxList[0].y = colHeader->vtxList[2].y =
|
||||
colHeader->vtxList[3].y = colHeader->vtxList[4].y = colHeader->vtxList[7].y =
|
||||
colHeader->vtxList[9].y = colHeader->vtxList[11].y = colHeader->vtxList[13].y =
|
||||
this->dyna.actor.home.pos.y + this->drumHeight;
|
||||
colHeader->vtxList[1].y = colHeader->vtxList[0].y = colHeader->vtxList[2].y = colHeader->vtxList[3].y =
|
||||
colHeader->vtxList[4].y = colHeader->vtxList[7].y = colHeader->vtxList[9].y = colHeader->vtxList[11].y =
|
||||
colHeader->vtxList[13].y = this->dyna.actor.home.pos.y + this->drumHeight;
|
||||
|
||||
if (this->drumPhase != 0) {
|
||||
this->drumPhase--;
|
||||
|
|
|
@ -1799,7 +1799,8 @@ void BossSst_HandGrab(BossSst* this, GlobalContext* globalCtx) {
|
|||
this->timer--;
|
||||
}
|
||||
|
||||
this->actor.world.rot.y = ((1.0f - sinf(this->timer * (M_PI / 60.0f))) * (this->vParity * 0x2000)) + this->targetYaw;
|
||||
this->actor.world.rot.y =
|
||||
((1.0f - sinf(this->timer * (M_PI / 60.0f))) * (this->vParity * 0x2000)) + this->targetYaw;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y - (this->vParity * 0x4000);
|
||||
if (this->timer < 5) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.5f, 25.0f, 5.0f);
|
||||
|
|
|
@ -317,36 +317,36 @@ static ColliderCylinderInit sCylinderInitHand = {
|
|||
static CollisionCheckInfoInit sColChkInfoInit = { 36, 100, 100, 200 };
|
||||
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku nut */ DMG_ENTRY(0 , 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(2 , 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(1 , 0x0),
|
||||
/* Explosive */ DMG_ENTRY(2 , 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0 , 0x0),
|
||||
/* Normal arrow */ DMG_ENTRY(2 , 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(2 , 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(2 , 0x0),
|
||||
/* Kokiri sword */ DMG_ENTRY(1 , 0x0),
|
||||
/* Master sword */ DMG_ENTRY(2 , 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(4 , 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(2 , 0x0),
|
||||
/* Ice arrow */ DMG_ENTRY(4 , 0x3),
|
||||
/* Light arrow */ DMG_ENTRY(2 , 0x0),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(4 , 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(2 , 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(2 , 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0 , 0x0),
|
||||
/* Ice magic */ DMG_ENTRY(4 , 0x3),
|
||||
/* Light magic */ DMG_ENTRY(4 , 0x4),
|
||||
/* Shield */ DMG_ENTRY(0 , 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0 , 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(1 , 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(4 , 0x0),
|
||||
/* Master spin */ DMG_ENTRY(2 , 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(2 , 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(8 , 0x0),
|
||||
/* Master jump */ DMG_ENTRY(4 , 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0 , 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0 , 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(4 , 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0 , 0x0),
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(2, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(1, 0x0),
|
||||
/* Explosive */ DMG_ENTRY(2, 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0x0),
|
||||
/* Normal arrow */ DMG_ENTRY(2, 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(2, 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(2, 0x0),
|
||||
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
|
||||
/* Master sword */ DMG_ENTRY(2, 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(2, 0x0),
|
||||
/* Ice arrow */ DMG_ENTRY(4, 0x3),
|
||||
/* Light arrow */ DMG_ENTRY(2, 0x0),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(4, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(2, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(2, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice magic */ DMG_ENTRY(4, 0x3),
|
||||
/* Light magic */ DMG_ENTRY(4, 0x4),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(4, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(2, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(8, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(4, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(4, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
|
|
@ -106,7 +106,7 @@ static ColliderCylinderInit sOwlCylinderInit = {
|
|||
{ 30, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
InitChainEntry sOwlInitChain[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 25, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 2000, ICHAIN_CONTINUE),
|
||||
|
@ -119,7 +119,7 @@ void EnOwl_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 owlType;
|
||||
s32 switchFlag;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sOwlInitChain);
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 36.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600C0E8, &D_060015CC, this->jointTable, this->morphTable, 21);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime2, &D_060100B0, &D_0600C8A0, this->jointTable2, this->morphTable2,
|
||||
|
@ -251,12 +251,10 @@ void EnOwl_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
* Rotates this to the player instance
|
||||
*/
|
||||
void EnOwl_LookAtLink(EnOwl* this, GlobalContext* globalCtx) {
|
||||
s16 yaw;
|
||||
Player* player = PLAYER;
|
||||
|
||||
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &player->actor.world.pos);
|
||||
this->actor.world.rot.y = yaw;
|
||||
this->actor.shape.rot.y = yaw;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y =
|
||||
Math_Vec3f_Yaw(&this->actor.world.pos, &player->actor.world.pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -268,7 +266,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t
|
|||
s32 timer;
|
||||
f32 distCheck;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (this->actor.params == 0xFFF) {
|
||||
this->actionFlags |= 0x40;
|
||||
timer = -100;
|
||||
|
@ -290,7 +288,6 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t
|
|||
this->actor.flags |= 0x10000;
|
||||
func_8002F1C4(&this->actor, globalCtx, targetDist, distCheck, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -303,7 +300,6 @@ s32 func_80ACA558(EnOwl* this, GlobalContext* globalCtx, u16 textId) {
|
|||
if (this->actor.xzDistToPlayer < 120.0f) {
|
||||
func_8002F1C4(&this->actor, globalCtx, 350.0f, 1000.0f, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -315,9 +311,8 @@ void func_80ACA5C8(EnOwl* this) {
|
|||
}
|
||||
|
||||
void func_80ACA62C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
s32 switchFlag;
|
||||
s32 switchFlag = this->actor.params & 0x3F;
|
||||
|
||||
switchFlag = this->actor.params & 0x3F;
|
||||
if (switchFlag < 0x20) {
|
||||
Flags_SetSwitch(globalCtx, switchFlag);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " Actor_Environment_sw = %d\n" VT_RST, Flags_GetSwitch(globalCtx, switchFlag));
|
||||
|
@ -353,7 +348,7 @@ void func_80ACA71C(EnOwl* this) {
|
|||
void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
@ -363,7 +358,7 @@ void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
if ((this->unk_3EE & 0x3F) == 0) {
|
||||
func_80ACA62C(this, globalCtx);
|
||||
|
@ -377,7 +372,7 @@ void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOwl_ConfirmKokiriMessage(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2065);
|
||||
|
@ -393,7 +388,7 @@ void EnOwl_ConfirmKokiriMessage(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitOutsideKokiri(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2064, 360.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2064, 360.0f, 0)) {
|
||||
// Sets BGM
|
||||
func_800F5C64(0x5A);
|
||||
|
||||
|
@ -404,7 +399,7 @@ void EnOwl_WaitOutsideKokiri(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACA998(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2069);
|
||||
|
@ -421,7 +416,7 @@ void func_80ACA998(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAA54(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACA998;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -430,7 +425,7 @@ void func_80ACAA54(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAAC0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x2069);
|
||||
this->actionFunc = func_80ACAA54;
|
||||
this->actionFlags &= ~2;
|
||||
|
@ -441,14 +436,14 @@ void func_80ACAAC0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitHyruleCastle(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2068, 540.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2068, 540.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACAAC0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAB88(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
// obtained zelda's letter
|
||||
|
@ -471,7 +466,7 @@ void func_80ACAB88(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAC6C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAB88;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -482,14 +477,14 @@ void func_80ACAC6C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitKakariko(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206C, 480.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206C, 480.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACAC6C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAD34(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x206F);
|
||||
|
@ -507,7 +502,7 @@ void func_80ACAD34(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACADF0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAD34;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -518,14 +513,14 @@ void func_80ACADF0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitGerudo(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206F, 360.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x206F, 360.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACADF0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAEB8(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x2071);
|
||||
|
@ -543,7 +538,7 @@ void func_80ACAEB8(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACAF74(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x206A);
|
||||
this->actionFunc = func_80ACAEB8;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -554,7 +549,7 @@ void func_80ACAF74(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitLakeHylia(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2071, 360.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x2071, 360.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACAF74;
|
||||
}
|
||||
|
@ -563,7 +558,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void func_80ACB03C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
|
@ -585,14 +580,14 @@ void EnOwl_WaitZoraRiver(EnOwl* this, GlobalContext* globalCtx) {
|
|||
textId = 0x4002;
|
||||
}
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, textId, 360.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, textId, 360.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB03C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB148(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
|
@ -601,16 +596,10 @@ void func_80ACB148(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOwl_WaitHyliaShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
||||
u16 textId;
|
||||
u16 textId = (gSaveContext.infTable[25] & 0x20) ? 0x4004 : 0x4003;
|
||||
// Spoke to Owl in Lake Hylia
|
||||
if (gSaveContext.infTable[25] & 0x20) {
|
||||
textId = 0x4004;
|
||||
} else {
|
||||
textId = 0x4003;
|
||||
}
|
||||
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
if (func_80ACA558(this, globalCtx, textId) != 0) {
|
||||
if (func_80ACA558(this, globalCtx, textId)) {
|
||||
gSaveContext.infTable[25] |= 0x20;
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB148;
|
||||
|
@ -618,7 +607,7 @@ void EnOwl_WaitHyliaShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
|
@ -626,7 +615,7 @@ void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB274(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8002F334(&this->actor, globalCtx) != 0) {
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
Audio_SetBGM(0x110000FF);
|
||||
this->actionFunc = EnOwl_WaitDeathMountainShortcut;
|
||||
}
|
||||
|
@ -636,13 +625,13 @@ void EnOwl_WaitDeathMountainShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (!gSaveContext.magicAcquired) {
|
||||
if (func_80ACA558(this, globalCtx, 0x3062) != 0) {
|
||||
if (func_80ACA558(this, globalCtx, 0x3062)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB274;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (func_80ACA558(this, globalCtx, 0x3063) != 0) {
|
||||
if (func_80ACA558(this, globalCtx, 0x3063)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB22C;
|
||||
}
|
||||
|
@ -650,7 +639,7 @@ void EnOwl_WaitDeathMountainShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB344(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x607A);
|
||||
|
@ -666,14 +655,14 @@ void func_80ACB344(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void func_80ACB3E0(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x6079, 360.0f, 2) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x6079, 360.0f, 2)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB344;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB440(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x10C1);
|
||||
|
@ -690,7 +679,7 @@ void func_80ACB440(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB4FC(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x10C2);
|
||||
this->actionFunc = func_80ACB440;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -701,14 +690,14 @@ void func_80ACB4FC(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitLWPreSaria(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C0, 190.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C0, 190.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB4FC;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACB5C4(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 4 && func_80106BC8(globalCtx)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case OWL_REPEAT:
|
||||
func_8010B720(globalCtx, 0x10C5);
|
||||
|
@ -726,7 +715,7 @@ void func_80ACB5C4(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80ACB680(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx) != 0) {
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5 && func_80106BC8(globalCtx)) {
|
||||
func_8010B720(globalCtx, 0x10C6);
|
||||
this->actionFunc = func_80ACB5C4;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -737,7 +726,7 @@ void func_80ACB680(EnOwl* this, GlobalContext* globalCtx) {
|
|||
void EnOwl_WaitLWPostSaria(EnOwl* this, GlobalContext* globalCtx) {
|
||||
EnOwl_LookAtLink(this, globalCtx);
|
||||
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C4, 360.0f, 0) != 0) {
|
||||
if (EnOwl_CheckInitTalk(this, globalCtx, 0x10C4, 360.0f, 0)) {
|
||||
func_800F5C64(0x5A);
|
||||
this->actionFunc = func_80ACB680;
|
||||
}
|
||||
|
@ -745,43 +734,40 @@ void EnOwl_WaitLWPostSaria(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ACB748(EnOwl* this, GlobalContext* globalCtx) {
|
||||
static Vec3f D_80ACD62C = { 0.0f, 0.0f, 0.0f };
|
||||
f32 unkf2;
|
||||
f32 xyzDist;
|
||||
u32 owlType;
|
||||
f32 dist;
|
||||
f32 weight;
|
||||
s32 owlType = (this->actor.params & 0xFC0) >> 6;
|
||||
|
||||
owlType = (this->actor.params & 0xFC0) >> 6;
|
||||
xyzDist = Math3D_Vec3f_DistXYZ(&this->eye, &globalCtx->view.eye) / 45.0f;
|
||||
dist = Math3D_Vec3f_DistXYZ(&this->eye, &globalCtx->view.eye) / 45.0f;
|
||||
this->eye.x = globalCtx->view.eye.x;
|
||||
this->eye.y = globalCtx->view.eye.y;
|
||||
this->eye.z = globalCtx->view.eye.z;
|
||||
xyzDist = xyzDist;
|
||||
|
||||
if (xyzDist > 1.0f) {
|
||||
xyzDist = 1.0f;
|
||||
weight = dist;
|
||||
if (weight > 1.0f) {
|
||||
weight = 1.0f;
|
||||
}
|
||||
|
||||
switch (owlType) {
|
||||
case 7:
|
||||
unkf2 = xyzDist * 2.f;
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_FLYING_AIR - SFX_FLAG, unkf2);
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_FLYING_AIR - SFX_FLAG, weight * 2.0f);
|
||||
if ((globalCtx->csCtx.frames > 324) ||
|
||||
((globalCtx->csCtx.frames >= 142 && (globalCtx->csCtx.frames <= 266)))) {
|
||||
func_800F4414(&D_80ACD62C, NA_SE_EN_OWL_FLUTTER, unkf2);
|
||||
func_800F4414(&D_80ACD62C, NA_SE_EN_OWL_FLUTTER, weight * 2.0f);
|
||||
}
|
||||
if (globalCtx->csCtx.frames == 85) {
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_PASS_AIR, unkf2);
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_PASS_AIR, weight * 2.0f);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
unkf2 = xyzDist * 2.f;
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_FLYING_AIR - SFX_FLAG, unkf2);
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_FLYING_AIR - SFX_FLAG, weight * 2.0f);
|
||||
if ((globalCtx->csCtx.frames >= 420) ||
|
||||
((0xC1 < globalCtx->csCtx.frames && (globalCtx->csCtx.frames <= 280)))) {
|
||||
func_800F4414(&D_80ACD62C, NA_SE_EN_OWL_FLUTTER, unkf2);
|
||||
func_800F4414(&D_80ACD62C, NA_SE_EN_OWL_FLUTTER, weight * 2.0f);
|
||||
}
|
||||
if (globalCtx->csCtx.frames == 217) {
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_PASS_AIR, unkf2);
|
||||
func_800F436C(&D_80ACD62C, NA_SE_EV_PASS_AIR, weight * 2.0f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -816,8 +802,6 @@ void func_80ACB994(EnOwl* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOwl_WaitDefault(EnOwl* this, GlobalContext* globalCtx) {
|
||||
u16 angle;
|
||||
|
||||
if (globalCtx->csCtx.state != CS_STATE_IDLE && (globalCtx->csCtx.npcActions[7] != NULL)) {
|
||||
if (this->unk_40A != globalCtx->csCtx.npcActions[7]->action) {
|
||||
this->actionFlags |= 4;
|
||||
|
@ -1035,30 +1019,32 @@ void func_80ACC390(EnOwl* this) {
|
|||
this->unk_3FE--;
|
||||
this->actor.shape.rot.z = Math_SinS(this->unk_3FE * 0x333) * 1000.0f;
|
||||
} else {
|
||||
this->unk_410 = &func_80ACC460;
|
||||
this->unk_410 = func_80ACC460;
|
||||
this->unk_3FE = 6;
|
||||
Animation_Change(this->curSkelAnime, &D_060015CC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060015CC), 2, 5.0f);
|
||||
Animation_Change(this->curSkelAnime, &D_060015CC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060015CC),
|
||||
ANIMMODE_ONCE, 5.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACC460(EnOwl* this) {
|
||||
if (SkelAnime_Update(this->curSkelAnime) != 0) {
|
||||
if (SkelAnime_Update(this->curSkelAnime)) {
|
||||
if (this->unk_3FE > 0) {
|
||||
this->unk_3FE--;
|
||||
Animation_Change(this->curSkelAnime, this->curSkelAnime->animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(this->curSkelAnime->animation), 2, 0.0f);
|
||||
Animation_GetLastFrame(this->curSkelAnime->animation), ANIMMODE_ONCE, 0.0f);
|
||||
} else {
|
||||
this->unk_3FE = 0xA0;
|
||||
this->unk_410 = func_80ACC390;
|
||||
Animation_Change(this->curSkelAnime, &D_0600C1C4, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C1C4), 0, 5.0f);
|
||||
Animation_Change(this->curSkelAnime, &D_0600C1C4, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C1C4),
|
||||
ANIMMODE_LOOP, 5.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACC540(EnOwl* this) {
|
||||
if (SkelAnime_Update(this->curSkelAnime) != 0) {
|
||||
if (SkelAnime_Update(this->curSkelAnime)) {
|
||||
Animation_Change(this->curSkelAnime, this->curSkelAnime->animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(this->curSkelAnime->animation), 2, 0.0f);
|
||||
Animation_GetLastFrame(this->curSkelAnime->animation), ANIMMODE_ONCE, 0.0f);
|
||||
this->actionFlags |= 1;
|
||||
} else {
|
||||
this->actionFlags &= ~1;
|
||||
|
@ -1066,10 +1052,7 @@ void func_80ACC540(EnOwl* this) {
|
|||
}
|
||||
|
||||
s32 func_80ACC5CC(EnOwl* this) {
|
||||
s32 phi_v1;
|
||||
s32 ret;
|
||||
|
||||
phi_v1 = (this->actionFlags & 2) ? 0x20 : 0;
|
||||
s32 phi_v1 = (this->actionFlags & 2) ? 0x20 : 0;
|
||||
|
||||
if (phi_v1 == (this->unk_3EE & 0x3F)) {
|
||||
return true;
|
||||
|
@ -1316,7 +1299,7 @@ s32 EnOwl_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, V
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnOwl_PostLimbUpdate(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, Vec3s* rot, void* thisx) {
|
||||
|
@ -1352,9 +1335,10 @@ void EnOwl_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnOwl_ChangeMode(EnOwl* this, EnOwlActionFunc actionFunc, OwlFunc arg2, SkelAnime* skelAnime,
|
||||
AnimationHeader* animation, f32 transitionRate) {
|
||||
AnimationHeader* animation, f32 morphFrames) {
|
||||
this->curSkelAnime = skelAnime;
|
||||
Animation_Change(this->curSkelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, transitionRate);
|
||||
Animation_Change(this->curSkelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
|
||||
morphFrames);
|
||||
this->actionFunc = actionFunc;
|
||||
this->unk_410 = arg2;
|
||||
}
|
||||
|
@ -1371,13 +1355,10 @@ void func_80ACD130(EnOwl* this, GlobalContext* globalCtx, s32 idx) {
|
|||
}
|
||||
|
||||
f32 func_80ACD1C4(GlobalContext* globalCtx, s32 idx) {
|
||||
f32 ret;
|
||||
f32 ret = func_8006F93C(globalCtx->csCtx.npcActions[idx]->endFrame, globalCtx->csCtx.npcActions[idx]->startFrame,
|
||||
globalCtx->csCtx.frames);
|
||||
|
||||
ret = func_8006F93C(globalCtx->csCtx.npcActions[idx]->endFrame, globalCtx->csCtx.npcActions[idx]->startFrame,
|
||||
globalCtx->csCtx.frames);
|
||||
if (ret > 1.0f) {
|
||||
ret = 1.0f;
|
||||
}
|
||||
ret = CLAMP_MAX(ret, 1.0f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1397,10 +1378,8 @@ void func_80ACD220(EnOwl* this, Vec3f* arg1, f32 arg2) {
|
|||
void func_80ACD2CC(EnOwl* this, GlobalContext* globalCtx) {
|
||||
Vec3f pos;
|
||||
s32 angle;
|
||||
f32 t;
|
||||
f32 phi_f2;
|
||||
f32 t = func_80ACD1C4(globalCtx, 7);
|
||||
|
||||
t = func_80ACD1C4(globalCtx, 7);
|
||||
pos.x = globalCtx->csCtx.npcActions[7]->startPos.x;
|
||||
pos.y = globalCtx->csCtx.npcActions[7]->startPos.y;
|
||||
pos.z = globalCtx->csCtx.npcActions[7]->startPos.z;
|
||||
|
@ -1411,7 +1390,8 @@ void func_80ACD2CC(EnOwl* this, GlobalContext* globalCtx) {
|
|||
angle = (s16)((t * angle) + this->actor.world.rot.z);
|
||||
angle = (u16)angle;
|
||||
if (this->actionFlags & 4) {
|
||||
phi_f2 = globalCtx->csCtx.npcActions[7]->urot.x;
|
||||
f32 phi_f2 = globalCtx->csCtx.npcActions[7]->urot.x;
|
||||
|
||||
phi_f2 *= 10.0f * (360.0f / 0x10000);
|
||||
if (phi_f2 < 0.0f) {
|
||||
phi_f2 += 360.0f;
|
||||
|
@ -1423,27 +1403,24 @@ void func_80ACD2CC(EnOwl* this, GlobalContext* globalCtx) {
|
|||
this->actor.draw = &EnOwl_Draw;
|
||||
this->actionFlags &= ~4;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
return;
|
||||
} else {
|
||||
pos.x -= Math_SinS(angle) * this->unk_3F8;
|
||||
pos.z += Math_CosS(angle) * this->unk_3F8;
|
||||
func_80ACD220(this, &pos, 1.0f);
|
||||
}
|
||||
pos.x -= Math_SinS(angle) * this->unk_3F8;
|
||||
pos.z += Math_CosS(angle) * this->unk_3F8;
|
||||
func_80ACD220(this, &pos, 1.0f);
|
||||
}
|
||||
|
||||
void func_80ACD4D4(EnOwl* this, GlobalContext* globalCtx) {
|
||||
Vec3f pos;
|
||||
Vec3f endPosf;
|
||||
f32 temp_ret;
|
||||
CsCmdActorAction* actorCmd;
|
||||
f32 temp_ret = func_80ACD1C4(globalCtx, 7);
|
||||
|
||||
temp_ret = func_80ACD1C4(globalCtx, 7);
|
||||
pos.x = globalCtx->csCtx.npcActions[7]->startPos.x;
|
||||
pos.y = globalCtx->csCtx.npcActions[7]->startPos.y;
|
||||
pos.z = globalCtx->csCtx.npcActions[7]->startPos.z;
|
||||
actorCmd = globalCtx->csCtx.npcActions[7];
|
||||
endPosf.x = actorCmd->endPos.x;
|
||||
endPosf.y = actorCmd->endPos.y;
|
||||
endPosf.z = actorCmd->endPos.z;
|
||||
endPosf.x = globalCtx->csCtx.npcActions[7]->endPos.x;
|
||||
endPosf.y = globalCtx->csCtx.npcActions[7]->endPos.y;
|
||||
endPosf.z = globalCtx->csCtx.npcActions[7]->endPos.z;
|
||||
pos.x = (endPosf.x - pos.x) * temp_ret + pos.x;
|
||||
pos.y = (endPosf.y - pos.y) * temp_ret + pos.y;
|
||||
pos.z = (endPosf.z - pos.z) * temp_ret + pos.z;
|
||||
|
|
|
@ -9052,8 +9052,8 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
0x4000) &&
|
||||
((globalCtx->sceneNum != SCENE_DDAN) || (gSaveContext.eventChkInf[11] & 1)) &&
|
||||
((globalCtx->sceneNum != SCENE_NIGHT_SHOP) || (gSaveContext.eventChkInf[2] & 0x20))) {
|
||||
TitleCard_InitPlaceName(globalCtx, &globalCtx->actorCtx.titleCtx, this->giObjectSegment, 160, 120,
|
||||
144, 24, 20);
|
||||
TitleCard_InitPlaceName(globalCtx, &globalCtx->actorCtx.titleCtx, this->giObjectSegment, 160, 120, 144,
|
||||
24, 20);
|
||||
}
|
||||
}
|
||||
gSaveContext.showTitleCard = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue