mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-30 05:41:15 +00:00
Match Jsjutan and Tr and improve match of Yabusame_mark and holl (#769)
* some cleanup * .s * more matches * .s and yabu * holl try * format * Update src/overlays/actors/ovl_En_Holl/z_en_holl.c Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
This commit is contained in:
parent
ab05eb9776
commit
ed78d18a25
@ -1,772 +0,0 @@
|
||||
.late_rodata
|
||||
glabel D_80A8E484
|
||||
.word 0x45ABE000
|
||||
glabel D_80A8E488
|
||||
.float 3000.0
|
||||
|
||||
glabel D_80A8E48C
|
||||
.word 0x453B8000, 0x453B8000
|
||||
glabel D_80A8E494
|
||||
.float 2500.0
|
||||
|
||||
glabel D_80A8E498
|
||||
.float 1500.0
|
||||
|
||||
glabel D_80A8E49C
|
||||
.float 0.01
|
||||
|
||||
glabel D_80A8E4A0
|
||||
.float 3000.0
|
||||
|
||||
glabel D_80A8E4A4
|
||||
.float 1500.0
|
||||
|
||||
glabel D_80A8E4A8
|
||||
.float 0.01
|
||||
|
||||
glabel D_80A8E4AC
|
||||
.word 0x3B343958
|
||||
|
||||
.text
|
||||
glabel func_80A89A6C
|
||||
/* 002CC 80A89A6C 27BDFED8 */ addiu $sp, $sp, 0xFED8 ## $sp = FFFFFED8
|
||||
/* 002D0 80A89A70 AFBF005C */ sw $ra, 0x005C($sp)
|
||||
/* 002D4 80A89A74 AFB40058 */ sw $s4, 0x0058($sp)
|
||||
/* 002D8 80A89A78 AFB30054 */ sw $s3, 0x0054($sp)
|
||||
/* 002DC 80A89A7C AFB20050 */ sw $s2, 0x0050($sp)
|
||||
/* 002E0 80A89A80 AFB1004C */ sw $s1, 0x004C($sp)
|
||||
/* 002E4 80A89A84 AFB00048 */ sw $s0, 0x0048($sp)
|
||||
/* 002E8 80A89A88 F7BE0040 */ sdc1 $f30, 0x0040($sp)
|
||||
/* 002EC 80A89A8C F7BC0038 */ sdc1 $f28, 0x0038($sp)
|
||||
/* 002F0 80A89A90 F7BA0030 */ sdc1 $f26, 0x0030($sp)
|
||||
/* 002F4 80A89A94 F7B80028 */ sdc1 $f24, 0x0028($sp)
|
||||
/* 002F8 80A89A98 F7B60020 */ sdc1 $f22, 0x0020($sp)
|
||||
/* 002FC 80A89A9C F7B40018 */ sdc1 $f20, 0x0018($sp)
|
||||
/* 00300 80A89AA0 A3A00127 */ sb $zero, 0x0127($sp)
|
||||
/* 00304 80A89AA4 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 00308 80A89AA8 8CA71C44 */ lw $a3, 0x1C44($a1) ## 00001C44
|
||||
/* 0030C 80A89AAC 8C880118 */ lw $t0, 0x0118($a0) ## 00000118
|
||||
/* 00310 80A89AB0 8CA61C4C */ lw $a2, 0x1C4C($a1) ## 00001C4C
|
||||
/* 00314 80A89AB4 00A17021 */ addu $t6, $a1, $at
|
||||
/* 00318 80A89AB8 AFAE0074 */ sw $t6, 0x0074($sp)
|
||||
/* 0031C 80A89ABC 8DD81DE4 */ lw $t8, 0x1DE4($t6) ## 00001DE4
|
||||
/* 00320 80A89AC0 4480C000 */ mtc1 $zero, $f24 ## $f24 = 0.00
|
||||
/* 00324 80A89AC4 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
|
||||
/* 00328 80A89AC8 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000
|
||||
/* 0032C 80A89ACC 1320001B */ beq $t9, $zero, .L80A89B3C
|
||||
/* 00330 80A89AD0 00005825 */ or $t3, $zero, $zero ## $t3 = 00000000
|
||||
/* 00334 80A89AD4 3C0280A9 */ lui $v0, %hi(gJsjutanCarpetOddVtx) ## $v0 = 80A90000
|
||||
/* 00338 80A89AD8 2442CC98 */ addiu $v0, $v0, %lo(gJsjutanCarpetOddVtx) ## $v0 = 80A8CC98
|
||||
/* 0033C 80A89ADC 00027100 */ sll $t6, $v0, 4
|
||||
/* 00340 80A89AE0 3C048016 */ lui $a0, %hi(gSegments)
|
||||
/* 00344 80A89AE4 000E7F02 */ srl $t7, $t6, 28
|
||||
/* 00348 80A89AE8 24846FA8 */ addiu $a0, %lo(gSegments)
|
||||
/* 0034C 80A89AEC 000FC080 */ sll $t8, $t7, 2
|
||||
/* 00350 80A89AF0 0098C821 */ addu $t9, $a0, $t8
|
||||
/* 00354 80A89AF4 8F2E0000 */ lw $t6, 0x0000($t9) ## 00000000
|
||||
/* 00358 80A89AF8 3C0900FF */ lui $t1, 0x00FF ## $t1 = 00FF0000
|
||||
/* 0035C 80A89AFC 3529FFFF */ ori $t1, $t1, 0xFFFF ## $t1 = 00FFFFFF
|
||||
/* 00360 80A89B00 00497824 */ and $t7, $v0, $t1
|
||||
/* 00364 80A89B04 3C0380A9 */ lui $v1, %hi(gJsjutanShadowOddVtx) ## $v1 = 80A90000
|
||||
/* 00368 80A89B08 2463BA98 */ addiu $v1, $v1, %lo(gJsjutanShadowOddVtx) ## $v1 = 80A8BA98
|
||||
/* 0036C 80A89B0C 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 00370 80A89B10 0003C900 */ sll $t9, $v1, 4
|
||||
/* 00374 80A89B14 3C0A8000 */ lui $t2, 0x8000 ## $t2 = 80000000
|
||||
/* 00378 80A89B18 00197702 */ srl $t6, $t9, 28
|
||||
/* 0037C 80A89B1C 030A8021 */ addu $s0, $t8, $t2
|
||||
/* 00380 80A89B20 000E7880 */ sll $t7, $t6, 2
|
||||
/* 00384 80A89B24 008FC021 */ addu $t8, $a0, $t7
|
||||
/* 00388 80A89B28 8F190000 */ lw $t9, 0x0000($t8) ## 00000000
|
||||
/* 0038C 80A89B2C 00697024 */ and $t6, $v1, $t1
|
||||
/* 00390 80A89B30 032E7821 */ addu $t7, $t9, $t6
|
||||
/* 00394 80A89B34 1000001A */ beq $zero, $zero, .L80A89BA0
|
||||
/* 00398 80A89B38 01EA9821 */ addu $s3, $t7, $t2
|
||||
.L80A89B3C:
|
||||
/* 0039C 80A89B3C 3C0280A9 */ lui $v0, %hi(gJsjutanCarpetEvenVtx) ## $v0 = 80A90000
|
||||
/* 003A0 80A89B40 2442DAB8 */ addiu $v0, $v0, %lo(gJsjutanCarpetEvenVtx) ## $v0 = 80A8DAB8
|
||||
/* 003A4 80A89B44 0002C100 */ sll $t8, $v0, 4
|
||||
/* 003A8 80A89B48 3C048016 */ lui $a0, %hi(gSegments)
|
||||
/* 003AC 80A89B4C 0018CF02 */ srl $t9, $t8, 28
|
||||
/* 003B0 80A89B50 24846FA8 */ addiu $a0, %lo(gSegments)
|
||||
/* 003B4 80A89B54 00197080 */ sll $t6, $t9, 2
|
||||
/* 003B8 80A89B58 008E7821 */ addu $t7, $a0, $t6
|
||||
/* 003BC 80A89B5C 8DF80000 */ lw $t8, 0x0000($t7) ## 00000000
|
||||
/* 003C0 80A89B60 3C0900FF */ lui $t1, 0x00FF ## $t1 = 00FF0000
|
||||
/* 003C4 80A89B64 3529FFFF */ ori $t1, $t1, 0xFFFF ## $t1 = 00FFFFFF
|
||||
/* 003C8 80A89B68 0049C824 */ and $t9, $v0, $t1
|
||||
/* 003CC 80A89B6C 3C0380A9 */ lui $v1, %hi(gJsjutanShadowEvenVtx) ## $v1 = 80A90000
|
||||
/* 003D0 80A89B70 2463C398 */ addiu $v1, $v1, %lo(gJsjutanShadowEvenVtx) ## $v1 = 80A8C398
|
||||
/* 003D4 80A89B74 03197021 */ addu $t6, $t8, $t9
|
||||
/* 003D8 80A89B78 00037900 */ sll $t7, $v1, 4
|
||||
/* 003DC 80A89B7C 3C0A8000 */ lui $t2, 0x8000 ## $t2 = 80000000
|
||||
/* 003E0 80A89B80 000FC702 */ srl $t8, $t7, 28
|
||||
/* 003E4 80A89B84 01CA8021 */ addu $s0, $t6, $t2
|
||||
/* 003E8 80A89B88 0018C880 */ sll $t9, $t8, 2
|
||||
/* 003EC 80A89B8C 00997021 */ addu $t6, $a0, $t9
|
||||
/* 003F0 80A89B90 8DCF0000 */ lw $t7, 0x0000($t6) ## 00000000
|
||||
/* 003F4 80A89B94 0069C024 */ and $t8, $v1, $t1
|
||||
/* 003F8 80A89B98 01F8C821 */ addu $t9, $t7, $t8
|
||||
/* 003FC 80A89B9C 032A9821 */ addu $s3, $t9, $t2
|
||||
.L80A89BA0:
|
||||
/* 00400 80A89BA0 C64E0024 */ lwc1 $f14, 0x0024($s2) ## 00000024
|
||||
/* 00404 80A89BA4 C4E40024 */ lwc1 $f4, 0x0024($a3) ## 00000024
|
||||
/* 00408 80A89BA8 3C014248 */ lui $at, 0x4248 ## $at = 42480000
|
||||
/* 0040C 80A89BAC 44811000 */ mtc1 $at, $f2 ## $f2 = 50.00
|
||||
/* 00410 80A89BB0 460E2181 */ sub.s $f6, $f4, $f14
|
||||
/* 00414 80A89BB4 C4E80028 */ lwc1 $f8, 0x0028($a3) ## 00000028
|
||||
/* 00418 80A89BB8 C64A0168 */ lwc1 $f10, 0x0168($s2) ## 00000168
|
||||
/* 0041C 80A89BBC 3C0180A9 */ lui $at, %hi(D_80A8E484) ## $at = 80A90000
|
||||
/* 00420 80A89BC0 46023482 */ mul.s $f18, $f6, $f2
|
||||
/* 00424 80A89BC4 460A4101 */ sub.s $f4, $f8, $f10
|
||||
/* 00428 80A89BC8 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
|
||||
/* 0042C 80A89BCC C4E6002C */ lwc1 $f6, 0x002C($a3) ## 0000002C
|
||||
/* 00430 80A89BD0 C42CE484 */ lwc1 $f12, %lo(D_80A8E484)($at)
|
||||
/* 00434 80A89BD4 46022502 */ mul.s $f20, $f4, $f2
|
||||
/* 00438 80A89BD8 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 0043C 80A89BDC 0200A025 */ or $s4, $s0, $zero ## $s4 = 00000000
|
||||
/* 00440 80A89BE0 3C0180A9 */ lui $at, %hi(D_80A8E488) ## $at = 80A90000
|
||||
/* 00444 80A89BE4 46009005 */ abs.s $f0, $f18
|
||||
/* 00448 80A89BE8 46025582 */ mul.s $f22, $f10, $f2
|
||||
/* 0044C 80A89BEC 460C003C */ c.lt.s $f0, $f12
|
||||
/* 00450 80A89BF0 3C198016 */ lui $t9, %hi(gSaveContext)
|
||||
/* 00454 80A89BF4 4502000F */ bc1fl .L80A89C34
|
||||
/* 00458 80A89BF8 C5040024 */ lwc1 $f4, 0x0024($t0) ## 00000024
|
||||
/* 0045C 80A89BFC C430E488 */ lwc1 $f16, %lo(D_80A8E488)($at)
|
||||
/* 00460 80A89C00 4600A005 */ abs.s $f0, $f20
|
||||
/* 00464 80A89C04 4610003C */ c.lt.s $f0, $f16
|
||||
/* 00468 80A89C08 00000000 */ nop
|
||||
/* 0046C 80A89C0C 45020009 */ bc1fl .L80A89C34
|
||||
/* 00470 80A89C10 C5040024 */ lwc1 $f4, 0x0024($t0) ## 00000024
|
||||
/* 00474 80A89C14 4600B005 */ abs.s $f0, $f22
|
||||
/* 00478 80A89C18 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001
|
||||
/* 0047C 80A89C1C 460C003C */ c.lt.s $f0, $f12
|
||||
/* 00480 80A89C20 00000000 */ nop
|
||||
/* 00484 80A89C24 45020003 */ bc1fl .L80A89C34
|
||||
/* 00488 80A89C28 C5040024 */ lwc1 $f4, 0x0024($t0) ## 00000024
|
||||
/* 0048C 80A89C2C A3AE0127 */ sb $t6, 0x0127($sp)
|
||||
/* 00490 80A89C30 C5040024 */ lwc1 $f4, 0x0024($t0) ## 00000024
|
||||
.L80A89C34:
|
||||
/* 00494 80A89C34 3C0180A9 */ lui $at, %hi(D_80A8E48C) ## $at = 80A90000
|
||||
/* 00498 80A89C38 C430E48C */ lwc1 $f16, %lo(D_80A8E48C)($at)
|
||||
/* 0049C 80A89C3C 460E2181 */ sub.s $f6, $f4, $f14
|
||||
/* 004A0 80A89C40 3C014100 */ lui $at, 0x4100 ## $at = 41000000
|
||||
/* 004A4 80A89C44 44812000 */ mtc1 $at, $f4 ## $f4 = 8.00
|
||||
/* 004A8 80A89C48 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001
|
||||
/* 004AC 80A89C4C 46023202 */ mul.s $f8, $f6, $f2
|
||||
/* 004B0 80A89C50 24110001 */ addiu $s1, $zero, 0x0001 ## $s1 = 00000001
|
||||
/* 004B4 80A89C54 27AA00E0 */ addiu $t2, $sp, 0x00E0 ## $t2 = FFFFFFB8
|
||||
/* 004B8 80A89C58 3C0E8016 */ lui $t6, %hi(gSaveContext+0x1360)
|
||||
/* 004BC 80A89C5C E7A800D4 */ swc1 $f8, 0x00D4($sp)
|
||||
/* 004C0 80A89C60 C50A0028 */ lwc1 $f10, 0x0028($t0) ## 00000028
|
||||
/* 004C4 80A89C64 C6480168 */ lwc1 $f8, 0x0168($s2) ## 00000168
|
||||
/* 004C8 80A89C68 46045181 */ sub.s $f6, $f10, $f4
|
||||
/* 004CC 80A89C6C 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 004D0 80A89C70 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 004D4 80A89C74 E7A400C8 */ swc1 $f4, 0x00C8($sp)
|
||||
/* 004D8 80A89C78 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
|
||||
/* 004DC 80A89C7C C506002C */ lwc1 $f6, 0x002C($t0) ## 0000002C
|
||||
/* 004E0 80A89C80 A3AF00E0 */ sb $t7, 0x00E0($sp)
|
||||
/* 004E4 80A89C84 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 004E8 80A89C88 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 004EC 80A89C8C E7A400BC */ swc1 $f4, 0x00BC($sp)
|
||||
.L80A89C90:
|
||||
/* 004F0 80A89C90 0151C021 */ addu $t8, $t2, $s1
|
||||
/* 004F4 80A89C94 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002
|
||||
/* 004F8 80A89C98 00118C00 */ sll $s1, $s1, 16
|
||||
/* 004FC 80A89C9C 00118C03 */ sra $s1, $s1, 16
|
||||
/* 00500 80A89CA0 2A210003 */ slti $at, $s1, 0x0003
|
||||
/* 00504 80A89CA4 1420FFFA */ bne $at, $zero, .L80A89C90
|
||||
/* 00508 80A89CA8 A3000000 */ sb $zero, 0x0000($t8) ## 00000000
|
||||
/* 0050C 80A89CAC 8F39E660 */ lw $t9, %lo(gSaveContext)($t9)
|
||||
/* 00510 80A89CB0 24010157 */ addiu $at, $zero, 0x0157 ## $at = 00000157
|
||||
/* 00514 80A89CB4 24110001 */ addiu $s1, $zero, 0x0001 ## $s1 = 00000001
|
||||
/* 00518 80A89CB8 1721003C */ bne $t9, $at, .L80A89DAC
|
||||
/* 0051C 80A89CBC 00000000 */ nop
|
||||
/* 00520 80A89CC0 8DCEF9C0 */ lw $t6, %lo(gSaveContext+0x1360)($t6)
|
||||
/* 00524 80A89CC4 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008
|
||||
/* 00528 80A89CC8 15C10038 */ bne $t6, $at, .L80A89DAC
|
||||
/* 0052C 80A89CCC 00000000 */ nop
|
||||
/* 00530 80A89CD0 8CA41C54 */ lw $a0, 0x1C54($a1) ## 00001C54
|
||||
/* 00534 80A89CD4 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
|
||||
/* 00538 80A89CD8 2402014A */ addiu $v0, $zero, 0x014A ## $v0 = 0000014A
|
||||
/* 0053C 80A89CDC 10800007 */ beq $a0, $zero, .L80A89CFC
|
||||
/* 00540 80A89CE0 00801825 */ or $v1, $a0, $zero ## $v1 = 80166FA8
|
||||
/* 00544 80A89CE4 846F0000 */ lh $t7, 0x0000($v1) ## 80166FA8
|
||||
.L80A89CE8:
|
||||
/* 00548 80A89CE8 104F0004 */ beq $v0, $t7, .L80A89CFC
|
||||
/* 0054C 80A89CEC 00000000 */ nop
|
||||
/* 00550 80A89CF0 8C630124 */ lw $v1, 0x0124($v1) ## 801670CC
|
||||
/* 00554 80A89CF4 5460FFFC */ bnel $v1, $zero, .L80A89CE8
|
||||
/* 00558 80A89CF8 846F0000 */ lh $t7, 0x0000($v1) ## 80166FA8
|
||||
.L80A89CFC:
|
||||
/* 0055C 80A89CFC 10800008 */ beq $a0, $zero, .L80A89D20
|
||||
/* 00560 80A89D00 00801025 */ or $v0, $a0, $zero ## $v0 = 80166FA8
|
||||
/* 00564 80A89D04 2404013E */ addiu $a0, $zero, 0x013E ## $a0 = 0000013E
|
||||
/* 00568 80A89D08 84580000 */ lh $t8, 0x0000($v0) ## 80166FA8
|
||||
.L80A89D0C:
|
||||
/* 0056C 80A89D0C 50980005 */ beql $a0, $t8, .L80A89D24
|
||||
/* 00570 80A89D10 C4660024 */ lwc1 $f6, 0x0024($v1) ## 80166FCC
|
||||
/* 00574 80A89D14 8C420124 */ lw $v0, 0x0124($v0) ## 801670CC
|
||||
/* 00578 80A89D18 5440FFFC */ bnel $v0, $zero, .L80A89D0C
|
||||
/* 0057C 80A89D1C 84580000 */ lh $t8, 0x0000($v0) ## 80166FA8
|
||||
.L80A89D20:
|
||||
/* 00580 80A89D20 C4660024 */ lwc1 $f6, 0x0024($v1) ## 80166FCC
|
||||
.L80A89D24:
|
||||
/* 00584 80A89D24 C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024
|
||||
/* 00588 80A89D28 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001
|
||||
/* 0058C 80A89D2C 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001
|
||||
/* 00590 80A89D30 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 00594 80A89D34 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 00598 80A89D38 E7A400D8 */ swc1 $f4, 0x00D8($sp)
|
||||
/* 0059C 80A89D3C C6480168 */ lwc1 $f8, 0x0168($s2) ## 00000168
|
||||
/* 005A0 80A89D40 C4660028 */ lwc1 $f6, 0x0028($v1) ## 80166FD0
|
||||
/* 005A4 80A89D44 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 005A8 80A89D48 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 005AC 80A89D4C E7A400CC */ swc1 $f4, 0x00CC($sp)
|
||||
/* 005B0 80A89D50 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
|
||||
/* 005B4 80A89D54 C466002C */ lwc1 $f6, 0x002C($v1) ## 80166FD4
|
||||
/* 005B8 80A89D58 A3B900E1 */ sb $t9, 0x00E1($sp)
|
||||
/* 005BC 80A89D5C 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 005C0 80A89D60 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 005C4 80A89D64 E7A400C0 */ swc1 $f4, 0x00C0($sp)
|
||||
/* 005C8 80A89D68 C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024
|
||||
/* 005CC 80A89D6C C4460024 */ lwc1 $f6, 0x0024($v0) ## 80166FCC
|
||||
/* 005D0 80A89D70 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 005D4 80A89D74 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 005D8 80A89D78 E7A400DC */ swc1 $f4, 0x00DC($sp)
|
||||
/* 005DC 80A89D7C C6480168 */ lwc1 $f8, 0x0168($s2) ## 00000168
|
||||
/* 005E0 80A89D80 C4460028 */ lwc1 $f6, 0x0028($v0) ## 80166FD0
|
||||
/* 005E4 80A89D84 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 005E8 80A89D88 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 005EC 80A89D8C E7A400D0 */ swc1 $f4, 0x00D0($sp)
|
||||
/* 005F0 80A89D90 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
|
||||
/* 005F4 80A89D94 C446002C */ lwc1 $f6, 0x002C($v0) ## 80166FD4
|
||||
/* 005F8 80A89D98 A3AE00E2 */ sb $t6, 0x00E2($sp)
|
||||
/* 005FC 80A89D9C 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 00600 80A89DA0 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 00604 80A89DA4 1000003C */ beq $zero, $zero, .L80A89E98
|
||||
/* 00608 80A89DA8 E7A400C4 */ swc1 $f4, 0x00C4($sp)
|
||||
.L80A89DAC:
|
||||
/* 0060C 80A89DAC 10C0003A */ beq $a2, $zero, .L80A89E98
|
||||
/* 00610 80A89DB0 241F0001 */ addiu $ra, $zero, 0x0001 ## $ra = 00000001
|
||||
/* 00614 80A89DB4 240D0023 */ addiu $t5, $zero, 0x0023 ## $t5 = 00000023
|
||||
/* 00618 80A89DB8 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001
|
||||
/* 0061C 80A89DBC 27A900C8 */ addiu $t1, $sp, 0x00C8 ## $t1 = FFFFFFA0
|
||||
/* 00620 80A89DC0 27A800BC */ addiu $t0, $sp, 0x00BC ## $t0 = FFFFFF94
|
||||
/* 00624 80A89DC4 27A700D4 */ addiu $a3, $sp, 0x00D4 ## $a3 = FFFFFFAC
|
||||
/* 00628 80A89DC8 2A210003 */ slti $at, $s1, 0x0003
|
||||
.L80A89DCC:
|
||||
/* 0062C 80A89DCC 50200030 */ beql $at, $zero, .L80A89E90
|
||||
/* 00630 80A89DD0 8CC60124 */ lw $a2, 0x0124($a2) ## 00000124
|
||||
/* 00634 80A89DD4 C4C60024 */ lwc1 $f6, 0x0024($a2) ## 00000024
|
||||
/* 00638 80A89DD8 C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024
|
||||
/* 0063C 80A89DDC 00111080 */ sll $v0, $s1, 2
|
||||
/* 00640 80A89DE0 00E21821 */ addu $v1, $a3, $v0
|
||||
/* 00644 80A89DE4 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 00648 80A89DE8 01222021 */ addu $a0, $t1, $v0
|
||||
/* 0064C 80A89DEC 01022821 */ addu $a1, $t0, $v0
|
||||
/* 00650 80A89DF0 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 00654 80A89DF4 E4640000 */ swc1 $f4, 0x0000($v1) ## 80166FA8
|
||||
/* 00658 80A89DF8 C6480168 */ lwc1 $f8, 0x0168($s2) ## 00000168
|
||||
/* 0065C 80A89DFC C4C60028 */ lwc1 $f6, 0x0028($a2) ## 00000028
|
||||
/* 00660 80A89E00 C4600000 */ lwc1 $f0, 0x0000($v1) ## 80166FA8
|
||||
/* 00664 80A89E04 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 00668 80A89E08 46000005 */ abs.s $f0, $f0
|
||||
/* 0066C 80A89E0C 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 00670 80A89E10 460C003C */ c.lt.s $f0, $f12
|
||||
/* 00674 80A89E14 E4840000 */ swc1 $f4, 0x0000($a0) ## 0000013E
|
||||
/* 00678 80A89E18 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
|
||||
/* 0067C 80A89E1C C4C6002C */ lwc1 $f6, 0x002C($a2) ## 0000002C
|
||||
/* 00680 80A89E20 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 00684 80A89E24 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 00688 80A89E28 45000015 */ bc1f .L80A89E80
|
||||
/* 0068C 80A89E2C E4A40000 */ swc1 $f4, 0x0000($a1) ## 00000000
|
||||
/* 00690 80A89E30 C4800000 */ lwc1 $f0, 0x0000($a0) ## 0000013E
|
||||
/* 00694 80A89E34 46000005 */ abs.s $f0, $f0
|
||||
/* 00698 80A89E38 4610003C */ c.lt.s $f0, $f16
|
||||
/* 0069C 80A89E3C 00000000 */ nop
|
||||
/* 006A0 80A89E40 45020010 */ bc1fl .L80A89E84
|
||||
/* 006A4 80A89E44 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002
|
||||
/* 006A8 80A89E48 C4A00000 */ lwc1 $f0, 0x0000($a1) ## 00000000
|
||||
/* 006AC 80A89E4C 46000005 */ abs.s $f0, $f0
|
||||
/* 006B0 80A89E50 460C003C */ c.lt.s $f0, $f12
|
||||
/* 006B4 80A89E54 00000000 */ nop
|
||||
/* 006B8 80A89E58 4502000A */ bc1fl .L80A89E84
|
||||
/* 006BC 80A89E5C 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000003
|
||||
/* 006C0 80A89E60 84CF001C */ lh $t7, 0x001C($a2) ## 0000001C
|
||||
/* 006C4 80A89E64 0151C021 */ addu $t8, $t2, $s1
|
||||
/* 006C8 80A89E68 0151C821 */ addu $t9, $t2, $s1
|
||||
/* 006CC 80A89E6C 558F0004 */ bnel $t4, $t7, .L80A89E80
|
||||
/* 006D0 80A89E70 A33F0000 */ sb $ra, 0x0000($t9) ## 00000001
|
||||
/* 006D4 80A89E74 10000002 */ beq $zero, $zero, .L80A89E80
|
||||
/* 006D8 80A89E78 A30D0000 */ sb $t5, 0x0000($t8) ## 00000000
|
||||
/* 006DC 80A89E7C A33F0000 */ sb $ra, 0x0000($t9) ## 00000001
|
||||
.L80A89E80:
|
||||
/* 006E0 80A89E80 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000004
|
||||
.L80A89E84:
|
||||
/* 006E4 80A89E84 00118C00 */ sll $s1, $s1, 16
|
||||
/* 006E8 80A89E88 00118C03 */ sra $s1, $s1, 16
|
||||
/* 006EC 80A89E8C 8CC60124 */ lw $a2, 0x0124($a2) ## 00000124
|
||||
.L80A89E90:
|
||||
/* 006F0 80A89E90 54C0FFCE */ bnel $a2, $zero, .L80A89DCC
|
||||
/* 006F4 80A89E94 2A210003 */ slti $at, $s1, 0x0003
|
||||
.L80A89E98:
|
||||
/* 006F8 80A89E98 3C0144FA */ lui $at, 0x44FA ## $at = 44FA0000
|
||||
/* 006FC 80A89E9C 4481F000 */ mtc1 $at, $f30 ## $f30 = 2000.00
|
||||
/* 00700 80A89EA0 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000
|
||||
/* 00704 80A89EA4 4481D000 */ mtc1 $at, $f26 ## $f26 = 100.00
|
||||
/* 00708 80A89EA8 27A700D4 */ addiu $a3, $sp, 0x00D4 ## $a3 = FFFFFFAC
|
||||
/* 0070C 80A89EAC 27A800BC */ addiu $t0, $sp, 0x00BC ## $t0 = FFFFFF94
|
||||
/* 00710 80A89EB0 27A900C8 */ addiu $t1, $sp, 0x00C8 ## $t1 = FFFFFFA0
|
||||
/* 00714 80A89EB4 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000
|
||||
/* 00718 80A89EB8 E7B200B8 */ swc1 $f18, 0x00B8($sp)
|
||||
/* 0071C 80A89EBC E7B400B4 */ swc1 $f20, 0x00B4($sp)
|
||||
/* 00720 80A89EC0 E7B600B0 */ swc1 $f22, 0x00B0($sp)
|
||||
.L80A89EC4:
|
||||
/* 00724 80A89EC4 93AE0127 */ lbu $t6, 0x0127($sp)
|
||||
/* 00728 80A89EC8 C7A600B8 */ lwc1 $f6, 0x00B8($sp)
|
||||
/* 0072C 80A89ECC C7A800B0 */ lwc1 $f8, 0x00B0($sp)
|
||||
/* 00730 80A89ED0 11C00030 */ beq $t6, $zero, .L80A89F94
|
||||
/* 00734 80A89ED4 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
|
||||
/* 00738 80A89ED8 860F0000 */ lh $t7, 0x0000($s0) ## 00000000
|
||||
/* 0073C 80A89EDC 86180004 */ lh $t8, 0x0004($s0) ## 00000004
|
||||
/* 00740 80A89EE0 3C0180A9 */ lui $at, %hi(D_80A8E494) ## $at = 80A90000
|
||||
/* 00744 80A89EE4 448F5000 */ mtc1 $t7, $f10 ## $f10 = 0.00
|
||||
/* 00748 80A89EE8 C430E494 */ lwc1 $f16, %lo(D_80A8E494)($at)
|
||||
/* 0074C 80A89EEC 46805120 */ cvt.s.w $f4, $f10
|
||||
/* 00750 80A89EF0 44985000 */ mtc1 $t8, $f10 ## $f10 = 0.00
|
||||
/* 00754 80A89EF4 46062501 */ sub.s $f20, $f4, $f6
|
||||
/* 00758 80A89EF8 46805120 */ cvt.s.w $f4, $f10
|
||||
/* 0075C 80A89EFC 4614A182 */ mul.s $f6, $f20, $f20
|
||||
/* 00760 80A89F00 46082581 */ sub.s $f22, $f4, $f8
|
||||
/* 00764 80A89F04 4616B282 */ mul.s $f10, $f22, $f22
|
||||
/* 00768 80A89F08 460A3000 */ add.s $f0, $f6, $f10
|
||||
/* 0076C 80A89F0C 46000004 */ sqrt.s $f0, $f0
|
||||
/* 00770 80A89F10 46008101 */ sub.s $f4, $f16, $f0
|
||||
/* 00774 80A89F14 46102083 */ div.s $f2, $f4, $f16
|
||||
/* 00778 80A89F18 4618103C */ c.lt.s $f2, $f24
|
||||
/* 0077C 80A89F1C 00000000 */ nop
|
||||
/* 00780 80A89F20 45020003 */ bc1fl .L80A89F30
|
||||
/* 00784 80A89F24 C6500170 */ lwc1 $f16, 0x0170($s2) ## 00000170
|
||||
/* 00788 80A89F28 4600C086 */ mov.s $f2, $f24
|
||||
/* 0078C 80A89F2C C6500170 */ lwc1 $f16, 0x0170($s2) ## 00000170
|
||||
.L80A89F30:
|
||||
/* 00790 80A89F30 3C014348 */ lui $at, 0x4348 ## $at = 43480000
|
||||
/* 00794 80A89F34 44815000 */ mtc1 $at, $f10 ## $f10 = 200.00
|
||||
/* 00798 80A89F38 46028202 */ mul.s $f8, $f16, $f2 # $f8 = (phi_f16 * phi_f2_4)
|
||||
/* 0079C 80A89F3C 3C0180A9 */ lui $at, %hi(D_80A8E498) ## $at = 80A90000
|
||||
/* 007A0 80A89F40 46088181 */ sub.s $f6, $f16, $f8 # $f6 = phi_f16 - (phi_f16 * phi_f2_4)
|
||||
/* 007A4 80A89F44 C7A800B4 */ lwc1 $f8, 0x00B4($sp)
|
||||
/* 007A8 80A89F48 460A3101 */ sub.s $f4, $f6, $f10 # $f4 = (phi_f16 - (phi_f16 * phi_f2_4)) - $f10
|
||||
/* 007AC 80A89F4C C42AE498 */ lwc1 $f10, %lo(D_80A8E498)($at)
|
||||
/* 007B0 80A89F50 46024182 */ mul.s $f6, $f8, $f2 # $f6 = spB4 * phi_f2_4
|
||||
/* 007B4 80A89F54 460A0301 */ sub.s $f12, $f0, $f10 # distance = distance - 1500.0f;
|
||||
/* 007B8 80A89F58 4618603C */ c.lt.s $f12, $f24 # distance < 0.0f
|
||||
/* 007BC 80A89F5C 46043700 */ add.s $f28, $f6, $f4
|
||||
/* 007C0 80A89F60 45000002 */ bc1f .L80A89F6C
|
||||
/* 007C4 80A89F64 00000000 */ nop
|
||||
/* 007C8 80A89F68 4600C306 */ mov.s $f12, $f24
|
||||
.L80A89F6C:
|
||||
/* 007CC 80A89F6C 460CD202 */ mul.s $f8, $f26, $f12
|
||||
/* 007D0 80A89F70 3C0180A9 */ lui $at, %hi(D_80A8E49C) ## $at = 80A90000
|
||||
/* 007D4 80A89F74 C426E49C */ lwc1 $f6, %lo(D_80A8E49C)($at)
|
||||
/* 007D8 80A89F78 46064482 */ mul.s $f18, $f8, $f6
|
||||
/* 007DC 80A89F7C 4612D03C */ c.lt.s $f26, $f18
|
||||
/* 007E0 80A89F80 00000000 */ nop
|
||||
/* 007E4 80A89F84 45000008 */ bc1f .L80A89FA8
|
||||
/* 007E8 80A89F88 00000000 */ nop
|
||||
/* 007EC 80A89F8C 10000006 */ beq $zero, $zero, .L80A89FA8
|
||||
/* 007F0 80A89F90 4600D486 */ mov.s $f18, $f26
|
||||
.L80A89F94:
|
||||
/* 007F4 80A89F94 3C014348 */ lui $at, 0x4348 ## $at = 43480000
|
||||
/* 007F8 80A89F98 44812000 */ mtc1 $at, $f4 ## $f4 = 200.00
|
||||
/* 007FC 80A89F9C C6500170 */ lwc1 $f16, 0x0170($s2) ## 00000170
|
||||
/* 00800 80A89FA0 4600D486 */ mov.s $f18, $f26
|
||||
/* 00804 80A89FA4 46048701 */ sub.s $f28, $f16, $f4
|
||||
.L80A89FA8:
|
||||
/* 00808 80A89FA8 0143C821 */ addu $t9, $t2, $v1
|
||||
.L80A89FAC:
|
||||
/* 0080C 80A89FAC 932E0000 */ lbu $t6, 0x0000($t9) ## 00000001
|
||||
/* 00810 80A89FB0 51C00046 */ beql $t6, $zero, .L80A8A0CC
|
||||
/* 00814 80A89FB4 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000001
|
||||
/* 00818 80A89FB8 860F0000 */ lh $t7, 0x0000($s0) ## 00000000
|
||||
/* 0081C 80A89FBC 86190004 */ lh $t9, 0x0004($s0) ## 00000004
|
||||
/* 00820 80A89FC0 00031080 */ sll $v0, $v1, 2
|
||||
/* 00824 80A89FC4 448F5000 */ mtc1 $t7, $f10 ## $f10 = 0.00
|
||||
/* 00828 80A89FC8 44992000 */ mtc1 $t9, $f4 ## $f4 = 0.00
|
||||
/* 0082C 80A89FCC 00E2C021 */ addu $t8, $a3, $v0
|
||||
/* 00830 80A89FD0 46805220 */ cvt.s.w $f8, $f10
|
||||
/* 00834 80A89FD4 C7060000 */ lwc1 $f6, 0x0000($t8) ## 00000000
|
||||
/* 00838 80A89FD8 01027021 */ addu $t6, $t0, $v0
|
||||
/* 0083C 80A89FDC 3C0180A9 */ lui $at, %hi(D_80A8E4A0) ## $at = 80A90000
|
||||
/* 00840 80A89FE0 01227821 */ addu $t7, $t1, $v0
|
||||
/* 00844 80A89FE4 468022A0 */ cvt.s.w $f10, $f4
|
||||
/* 00848 80A89FE8 46064501 */ sub.s $f20, $f8, $f6
|
||||
/* 0084C 80A89FEC C5C80000 */ lwc1 $f8, 0x0000($t6) ## 00000001
|
||||
/* 00850 80A89FF0 46085581 */ sub.s $f22, $f10, $f8
|
||||
/* 00854 80A89FF4 4614A182 */ mul.s $f6, $f20, $f20
|
||||
/* 00858 80A89FF8 00000000 */ nop
|
||||
/* 0085C 80A89FFC 4616B102 */ mul.s $f4, $f22, $f22
|
||||
/* 00860 80A8A000 46043000 */ add.s $f0, $f6, $f4
|
||||
/* 00864 80A8A004 10600003 */ beq $v1, $zero, .L80A8A014
|
||||
/* 00868 80A8A008 46000004 */ sqrt.s $f0, $f0
|
||||
/* 0086C 80A8A00C 51600006 */ beql $t3, $zero, .L80A8A028
|
||||
/* 00870 80A8A010 4600F201 */ sub.s $f8, $f30, $f0
|
||||
.L80A8A014:
|
||||
/* 00874 80A8A014 C42CE4A0 */ lwc1 $f12, %lo(D_80A8E4A0)($at)
|
||||
/* 00878 80A8A018 46006281 */ sub.s $f10, $f12, $f0
|
||||
/* 0087C 80A8A01C 10000003 */ beq $zero, $zero, .L80A8A02C
|
||||
/* 00880 80A8A020 460C5083 */ div.s $f2, $f10, $f12
|
||||
/* 00884 80A8A024 4600F201 */ sub.s $f8, $f30, $f0
|
||||
.L80A8A028:
|
||||
/* 00888 80A8A028 461E4083 */ div.s $f2, $f8, $f30
|
||||
.L80A8A02C:
|
||||
/* 0088C 80A8A02C 4618103C */ c.lt.s $f2, $f24
|
||||
/* 00890 80A8A030 00000000 */ nop
|
||||
/* 00894 80A8A034 45020003 */ bc1fl .L80A8A044
|
||||
/* 00898 80A8A038 C5E60000 */ lwc1 $f6, 0x0000($t7) ## 00000001
|
||||
/* 0089C 80A8A03C 4600C086 */ mov.s $f2, $f24
|
||||
/* 008A0 80A8A040 C5E60000 */ lwc1 $f6, 0x0000($t7) ## 00000001
|
||||
.L80A8A044:
|
||||
/* 008A4 80A8A044 3C014348 */ lui $at, 0x4348 ## $at = 43480000
|
||||
/* 008A8 80A8A048 44814000 */ mtc1 $at, $f8 ## $f8 = 200.00
|
||||
/* 008AC 80A8A04C 46023382 */ mul.s $f14, $f6, $f2
|
||||
/* 008B0 80A8A050 3C0180A9 */ lui $at, %hi(D_80A8E4A4) ## $at = 80A90000
|
||||
/* 008B4 80A8A054 46028102 */ mul.s $f4, $f16, $f2
|
||||
/* 008B8 80A8A058 46048281 */ sub.s $f10, $f16, $f4
|
||||
/* 008BC 80A8A05C C424E4A4 */ lwc1 $f4, %lo(D_80A8E4A4)($at)
|
||||
/* 008C0 80A8A060 46040301 */ sub.s $f12, $f0, $f4
|
||||
/* 008C4 80A8A064 46085181 */ sub.s $f6, $f10, $f8
|
||||
/* 008C8 80A8A068 4618603C */ c.lt.s $f12, $f24
|
||||
/* 008CC 80A8A06C 46067380 */ add.s $f14, $f14, $f6
|
||||
/* 008D0 80A8A070 45000002 */ bc1f .L80A8A07C
|
||||
/* 008D4 80A8A074 00000000 */ nop
|
||||
/* 008D8 80A8A078 4600C306 */ mov.s $f12, $f24
|
||||
.L80A8A07C:
|
||||
/* 008DC 80A8A07C 460CD282 */ mul.s $f10, $f26, $f12
|
||||
/* 008E0 80A8A080 3C0180A9 */ lui $at, %hi(D_80A8E4A8) ## $at = 80A90000
|
||||
/* 008E4 80A8A084 C428E4A8 */ lwc1 $f8, %lo(D_80A8E4A8)($at)
|
||||
/* 008E8 80A8A088 46085082 */ mul.s $f2, $f10, $f8
|
||||
/* 008EC 80A8A08C 4602D03C */ c.lt.s $f26, $f2
|
||||
/* 008F0 80A8A090 00000000 */ nop
|
||||
/* 008F4 80A8A094 45020003 */ bc1fl .L80A8A0A4
|
||||
/* 008F8 80A8A098 461C703C */ c.lt.s $f14, $f28
|
||||
/* 008FC 80A8A09C 4600D086 */ mov.s $f2, $f26
|
||||
/* 00900 80A8A0A0 461C703C */ c.lt.s $f14, $f28
|
||||
.L80A8A0A4:
|
||||
/* 00904 80A8A0A4 00000000 */ nop
|
||||
/* 00908 80A8A0A8 45020003 */ bc1fl .L80A8A0B8
|
||||
/* 0090C 80A8A0AC 4612103C */ c.lt.s $f2, $f18
|
||||
/* 00910 80A8A0B0 46007706 */ mov.s $f28, $f14
|
||||
/* 00914 80A8A0B4 4612103C */ c.lt.s $f2, $f18
|
||||
.L80A8A0B8:
|
||||
/* 00918 80A8A0B8 00000000 */ nop
|
||||
/* 0091C 80A8A0BC 45020003 */ bc1fl .L80A8A0CC
|
||||
/* 00920 80A8A0C0 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000002
|
||||
/* 00924 80A8A0C4 46001486 */ mov.s $f18, $f2
|
||||
/* 00928 80A8A0C8 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000003
|
||||
.L80A8A0CC:
|
||||
/* 0092C 80A8A0CC 00031C00 */ sll $v1, $v1, 16
|
||||
/* 00930 80A8A0D0 00031C03 */ sra $v1, $v1, 16
|
||||
/* 00934 80A8A0D4 28610003 */ slti $at, $v1, 0x0003
|
||||
/* 00938 80A8A0D8 5420FFB4 */ bnel $at, $zero, .L80A89FAC
|
||||
/* 0093C 80A8A0DC 0143C821 */ addu $t9, $t2, $v1
|
||||
/* 00940 80A8A0E0 8FB80074 */ lw $t8, 0x0074($sp)
|
||||
/* 00944 80A8A0E4 00117880 */ sll $t7, $s1, 2
|
||||
/* 00948 80A8A0E8 01F17821 */ addu $t7, $t7, $s1
|
||||
/* 0094C 80A8A0EC 8F191DE4 */ lw $t9, 0x1DE4($t8) ## 00001DE4
|
||||
/* 00950 80A8A0F0 000F78C0 */ sll $t7, $t7, 3
|
||||
/* 00954 80A8A0F4 01F17823 */ subu $t7, $t7, $s1
|
||||
/* 00958 80A8A0F8 00197140 */ sll $t6, $t9, 5
|
||||
/* 0095C 80A8A0FC 01D97023 */ subu $t6, $t6, $t9
|
||||
/* 00960 80A8A100 000E7080 */ sll $t6, $t6, 2
|
||||
/* 00964 80A8A104 000F7900 */ sll $t7, $t7, 4
|
||||
/* 00968 80A8A108 01F17821 */ addu $t7, $t7, $s1
|
||||
/* 0096C 80A8A10C 01D97021 */ addu $t6, $t6, $t9
|
||||
/* 00970 80A8A110 000E7140 */ sll $t6, $t6, 5
|
||||
/* 00974 80A8A114 000F7900 */ sll $t7, $t7, 4
|
||||
/* 00978 80A8A118 01CF2021 */ addu $a0, $t6, $t7
|
||||
/* 0097C 80A8A11C 00042400 */ sll $a0, $a0, 16
|
||||
/* 00980 80A8A120 00042403 */ sra $a0, $a0, 16
|
||||
/* 00984 80A8A124 E7B200A8 */ swc1 $f18, 0x00A8($sp)
|
||||
/* 00988 80A8A128 0C01DE1C */ jal Math_SinS
|
||||
## sins?
|
||||
/* 0098C 80A8A12C A3AB008B */ sb $t3, 0x008B($sp)
|
||||
/* 00990 80A8A130 92580174 */ lbu $t8, 0x0174($s2) ## 00000174
|
||||
/* 00994 80A8A134 27A700D4 */ addiu $a3, $sp, 0x00D4 ## $a3 = FFFFFFAC
|
||||
/* 00998 80A8A138 27A800BC */ addiu $t0, $sp, 0x00BC ## $t0 = FFFFFF94
|
||||
/* 0099C 80A8A13C 27A900C8 */ addiu $t1, $sp, 0x00C8 ## $t1 = FFFFFFA0
|
||||
/* 009A0 80A8A140 27AA00E0 */ addiu $t2, $sp, 0x00E0 ## $t2 = FFFFFFB8
|
||||
/* 009A4 80A8A144 93AB008B */ lbu $t3, 0x008B($sp)
|
||||
/* 009A8 80A8A148 1300001D */ beq $t8, $zero, .L80A8A1C0
|
||||
/* 009AC 80A8A14C C7B200A8 */ lwc1 $f18, 0x00A8($sp)
|
||||
/* 009B0 80A8A150 46120182 */ mul.s $f6, $f0, $f18
|
||||
/* 009B4 80A8A154 866E0002 */ lh $t6, 0x0002($s3) ## 00000002
|
||||
/* 009B8 80A8A158 3C014248 */ lui $at, 0x4248 ## $at = 42480000
|
||||
/* 009BC 80A8A15C 448E4000 */ mtc1 $t6, $f8 ## $f8 = 0.00
|
||||
/* 009C0 80A8A160 4606E100 */ add.s $f4, $f28, $f6
|
||||
/* 009C4 80A8A164 468041A0 */ cvt.s.w $f6, $f8
|
||||
/* 009C8 80A8A168 44814000 */ mtc1 $at, $f8 ## $f8 = 50.00
|
||||
/* 009CC 80A8A16C 4600228D */ trunc.w.s $f10, $f4
|
||||
/* 009D0 80A8A170 C6440168 */ lwc1 $f4, 0x0168($s2) ## 00000168
|
||||
/* 009D4 80A8A174 44025000 */ mfc1 $v0, $f10
|
||||
/* 009D8 80A8A178 46043281 */ sub.s $f10, $f6, $f4
|
||||
/* 009DC 80A8A17C 0002C400 */ sll $t8, $v0, 16
|
||||
/* 009E0 80A8A180 0018CC03 */ sra $t9, $t8, 16
|
||||
/* 009E4 80A8A184 46085182 */ mul.s $f6, $f10, $f8
|
||||
/* 009E8 80A8A188 00021C00 */ sll $v1, $v0, 16
|
||||
/* 009EC 80A8A18C 00031C03 */ sra $v1, $v1, 16
|
||||
/* 009F0 80A8A190 4600310D */ trunc.w.s $f4, $f6
|
||||
/* 009F4 80A8A194 44042000 */ mfc1 $a0, $f4
|
||||
/* 009F8 80A8A198 00000000 */ nop
|
||||
/* 009FC 80A8A19C 00042400 */ sll $a0, $a0, 16
|
||||
/* 00A00 80A8A1A0 00042403 */ sra $a0, $a0, 16
|
||||
/* 00A04 80A8A1A4 0324082A */ slt $at, $t9, $a0
|
||||
/* 00A08 80A8A1A8 10200003 */ beq $at, $zero, .L80A8A1B8
|
||||
/* 00A0C 80A8A1AC 00000000 */ nop
|
||||
/* 00A10 80A8A1B0 00041C00 */ sll $v1, $a0, 16
|
||||
/* 00A14 80A8A1B4 00031C03 */ sra $v1, $v1, 16
|
||||
.L80A8A1B8:
|
||||
/* 00A18 80A8A1B8 10000023 */ beq $zero, $zero, .L80A8A248
|
||||
/* 00A1C 80A8A1BC A6030002 */ sh $v1, 0x0002($s0) ## 00000002
|
||||
.L80A8A1C0:
|
||||
/* 00A20 80A8A1C0 46120082 */ mul.s $f2, $f0, $f18
|
||||
/* 00A24 80A8A1C4 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
|
||||
/* 00A28 80A8A1C8 44813000 */ mtc1 $at, $f6 ## $f6 = 0.50
|
||||
/* 00A2C 80A8A1CC 0011C080 */ sll $t8, $s1, 2
|
||||
/* 00A30 80A8A1D0 0311C023 */ subu $t8, $t8, $s1
|
||||
/* 00A34 80A8A1D4 3C1980A9 */ lui $t9, %hi(D_80A8EE10) ## $t9 = 80A90000
|
||||
/* 00A38 80A8A1D8 2739EE10 */ addiu $t9, $t9, %lo(D_80A8EE10) ## $t9 = 80A8EE10
|
||||
/* 00A3C 80A8A1DC 46061102 */ mul.s $f4, $f2, $f6
|
||||
/* 00A40 80A8A1E0 4602E280 */ add.s $f10, $f28, $f2
|
||||
/* 00A44 80A8A1E4 0018C040 */ sll $t8, $t8, 1
|
||||
/* 00A48 80A8A1E8 03191021 */ addu $v0, $t8, $t9
|
||||
/* 00A4C 80A8A1EC 4600520D */ trunc.w.s $f8, $f10
|
||||
/* 00A50 80A8A1F0 4600228D */ trunc.w.s $f10, $f4
|
||||
/* 00A54 80A8A1F4 440F4000 */ mfc1 $t7, $f8
|
||||
/* 00A58 80A8A1F8 4600120D */ trunc.w.s $f8, $f2
|
||||
/* 00A5C 80A8A1FC 44035000 */ mfc1 $v1, $f10
|
||||
/* 00A60 80A8A200 A60F0002 */ sh $t7, 0x0002($s0) ## 00000002
|
||||
/* 00A64 80A8A204 844F0000 */ lh $t7, 0x0000($v0) ## 00000000
|
||||
/* 00A68 80A8A208 00031C00 */ sll $v1, $v1, 16
|
||||
/* 00A6C 80A8A20C 00031C03 */ sra $v1, $v1, 16
|
||||
/* 00A70 80A8A210 01E3C021 */ addu $t8, $t7, $v1
|
||||
/* 00A74 80A8A214 A6180000 */ sh $t8, 0x0000($s0) ## 00000000
|
||||
/* 00A78 80A8A218 84590004 */ lh $t9, 0x0004($v0) ## 00000004
|
||||
/* 00A7C 80A8A21C 44044000 */ mfc1 $a0, $f8
|
||||
/* 00A80 80A8A220 03237021 */ addu $t6, $t9, $v1
|
||||
/* 00A84 80A8A224 A60E0004 */ sh $t6, 0x0004($s0) ## 00000004
|
||||
/* 00A88 80A8A228 84580000 */ lh $t8, 0x0000($v0) ## 00000000
|
||||
/* 00A8C 80A8A22C 00042400 */ sll $a0, $a0, 16
|
||||
/* 00A90 80A8A230 00042403 */ sra $a0, $a0, 16
|
||||
/* 00A94 80A8A234 0304C821 */ addu $t9, $t8, $a0
|
||||
/* 00A98 80A8A238 A6790000 */ sh $t9, 0x0000($s3) ## 00000000
|
||||
/* 00A9C 80A8A23C 844E0004 */ lh $t6, 0x0004($v0) ## 00000004
|
||||
/* 00AA0 80A8A240 01C47821 */ addu $t7, $t6, $a0
|
||||
/* 00AA4 80A8A244 A66F0004 */ sh $t7, 0x0004($s3) ## 00000004
|
||||
.L80A8A248:
|
||||
/* 00AA8 80A8A248 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001
|
||||
/* 00AAC 80A8A24C 00118C00 */ sll $s1, $s1, 16
|
||||
/* 00AB0 80A8A250 00118C03 */ sra $s1, $s1, 16
|
||||
/* 00AB4 80A8A254 2A210090 */ slti $at, $s1, 0x0090
|
||||
/* 00AB8 80A8A258 26100010 */ addiu $s0, $s0, 0x0010 ## $s0 = 00000010
|
||||
/* 00ABC 80A8A25C 1420FF19 */ bne $at, $zero, .L80A89EC4
|
||||
/* 00AC0 80A8A260 26730010 */ addiu $s3, $s3, 0x0010 ## $s3 = 00000010
|
||||
/* 00AC4 80A8A264 92580174 */ lbu $t8, 0x0174($s2) ## 00000174
|
||||
/* 00AC8 80A8A268 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
|
||||
/* 00ACC 80A8A26C 57000021 */ bnel $t8, $zero, .L80A8A2F4
|
||||
/* 00AD0 80A8A270 4481A000 */ mtc1 $at, $f20 ## $f20 = 1.00
|
||||
/* 00AD4 80A8A274 C6460168 */ lwc1 $f6, 0x0168($s2) ## 00000168
|
||||
/* 00AD8 80A8A278 E6580060 */ swc1 $f24, 0x0060($s2) ## 00000060
|
||||
/* 00ADC 80A8A27C 3C028016 */ lui $v0, %hi(gSaveContext+0xc)
|
||||
/* 00AE0 80A8A280 E6460028 */ swc1 $f6, 0x0028($s2) ## 00000028
|
||||
/* 00AE4 80A8A284 9442E66C */ lhu $v0, %lo(gSaveContext+0xc)($v0)
|
||||
/* 00AE8 80A8A288 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
|
||||
/* 00AEC 80A8A28C 3419FFFF */ ori $t9, $zero, 0xFFFF ## $t9 = 0000FFFF
|
||||
/* 00AF0 80A8A290 0041082A */ slt $at, $v0, $at
|
||||
/* 00AF4 80A8A294 14200003 */ bne $at, $zero, .L80A8A2A4
|
||||
/* 00AF8 80A8A298 00401825 */ or $v1, $v0, $zero ## $v1 = 80160000
|
||||
/* 00AFC 80A8A29C 03231023 */ subu $v0, $t9, $v1
|
||||
/* 00B00 80A8A2A0 3042FFFF */ andi $v0, $v0, 0xFFFF ## $v0 = 00000000
|
||||
.L80A8A2A4:
|
||||
/* 00B04 80A8A2A4 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
|
||||
/* 00B08 80A8A2A8 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
|
||||
/* 00B0C 80A8A2AC 04410004 */ bgez $v0, .L80A8A2C0
|
||||
/* 00B10 80A8A2B0 468022A0 */ cvt.s.w $f10, $f4
|
||||
/* 00B14 80A8A2B4 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00
|
||||
/* 00B18 80A8A2B8 00000000 */ nop
|
||||
/* 00B1C 80A8A2BC 46085280 */ add.s $f10, $f10, $f8
|
||||
.L80A8A2C0:
|
||||
/* 00B20 80A8A2C0 3C0180A9 */ lui $at, %hi(D_80A8E4AC) ## $at = 80A90000
|
||||
/* 00B24 80A8A2C4 C426E4AC */ lwc1 $f6, %lo(D_80A8E4AC)($at)
|
||||
/* 00B28 80A8A2C8 3C014120 */ lui $at, 0x4120 ## $at = 41200000
|
||||
/* 00B2C 80A8A2CC 44814000 */ mtc1 $at, $f8 ## $f8 = 10.00
|
||||
/* 00B30 80A8A2D0 46065102 */ mul.s $f4, $f10, $f6
|
||||
/* 00B34 80A8A2D4 3C01447A */ lui $at, 0x447A ## $at = 447A0000
|
||||
/* 00B38 80A8A2D8 44813000 */ mtc1 $at, $f6 ## $f6 = 1000.00
|
||||
/* 00B3C 80A8A2DC 00000000 */ nop
|
||||
/* 00B40 80A8A2E0 E6460170 */ swc1 $f6, 0x0170($s2) ## 00000170
|
||||
/* 00B44 80A8A2E4 46082280 */ add.s $f10, $f4, $f8
|
||||
/* 00B48 80A8A2E8 1000001C */ beq $zero, $zero, .L80A8A35C
|
||||
/* 00B4C 80A8A2EC E64A016C */ swc1 $f10, 0x016C($s2) ## 0000016C
|
||||
/* 00B50 80A8A2F0 4481A000 */ mtc1 $at, $f20 ## $f20 = 1000.00
|
||||
.L80A8A2F4:
|
||||
/* 00B54 80A8A2F4 3C01447A */ lui $at, 0x447A ## $at = 447A0000
|
||||
/* 00B58 80A8A2F8 44814000 */ mtc1 $at, $f8 ## $f8 = 1000.00
|
||||
/* 00B5C 80A8A2FC C6440168 */ lwc1 $f4, 0x0168($s2) ## 00000168
|
||||
/* 00B60 80A8A300 4406A000 */ mfc1 $a2, $f20
|
||||
/* 00B64 80A8A304 26440028 */ addiu $a0, $s2, 0x0028 ## $a0 = 00000028
|
||||
/* 00B68 80A8A308 46082281 */ sub.s $f10, $f4, $f8
|
||||
/* 00B6C 80A8A30C 8E470060 */ lw $a3, 0x0060($s2) ## 00000060
|
||||
/* 00B70 80A8A310 44055000 */ mfc1 $a1, $f10
|
||||
/* 00B74 80A8A314 0C01E107 */ jal Math_ApproachF
|
||||
|
||||
/* 00B78 80A8A318 00000000 */ nop
|
||||
/* 00B7C 80A8A31C 4406A000 */ mfc1 $a2, $f20
|
||||
/* 00B80 80A8A320 26440060 */ addiu $a0, $s2, 0x0060 ## $a0 = 00000060
|
||||
/* 00B84 80A8A324 3C0540A0 */ lui $a1, 0x40A0 ## $a1 = 40A00000
|
||||
/* 00B88 80A8A328 0C01E107 */ jal Math_ApproachF
|
||||
|
||||
/* 00B8C 80A8A32C 3C073F00 */ lui $a3, 0x3F00 ## $a3 = 3F000000
|
||||
/* 00B90 80A8A330 4405C000 */ mfc1 $a1, $f24
|
||||
/* 00B94 80A8A334 4406A000 */ mfc1 $a2, $f20
|
||||
/* 00B98 80A8A338 2644016C */ addiu $a0, $s2, 0x016C ## $a0 = 0000016C
|
||||
/* 00B9C 80A8A33C 0C01E107 */ jal Math_ApproachF
|
||||
|
||||
/* 00BA0 80A8A340 3C074040 */ lui $a3, 0x4040 ## $a3 = 40400000
|
||||
/* 00BA4 80A8A344 3C05C59C */ lui $a1, 0xC59C ## $a1 = C59C0000
|
||||
/* 00BA8 80A8A348 4406A000 */ mfc1 $a2, $f20
|
||||
/* 00BAC 80A8A34C 4407D000 */ mfc1 $a3, $f26
|
||||
/* 00BB0 80A8A350 34A54000 */ ori $a1, $a1, 0x4000 ## $a1 = C59C4000
|
||||
/* 00BB4 80A8A354 0C01E107 */ jal Math_ApproachF
|
||||
|
||||
/* 00BB8 80A8A358 26440170 */ addiu $a0, $s2, 0x0170 ## $a0 = 00000170
|
||||
.L80A8A35C:
|
||||
/* 00BBC 80A8A35C 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000
|
||||
/* 00BC0 80A8A360 44813000 */ mtc1 $at, $f6 ## $f6 = 120.00
|
||||
/* 00BC4 80A8A364 02808025 */ or $s0, $s4, $zero ## $s0 = 00000000
|
||||
/* 00BC8 80A8A368 E7B80108 */ swc1 $f24, 0x0108($sp)
|
||||
/* 00BCC 80A8A36C E7B8010C */ swc1 $f24, 0x010C($sp)
|
||||
/* 00BD0 80A8A370 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000
|
||||
/* 00BD4 80A8A374 2413000B */ addiu $s3, $zero, 0x000B ## $s3 = 0000000B
|
||||
/* 00BD8 80A8A378 E7A60110 */ swc1 $f6, 0x0110($sp)
|
||||
.L80A8A37C:
|
||||
/* 00BDC 80A8A37C 2401000C */ addiu $at, $zero, 0x000C ## $at = 0000000C
|
||||
/* 00BE0 80A8A380 0221001A */ div $zero, $s1, $at
|
||||
/* 00BE4 80A8A384 00007010 */ mfhi $t6
|
||||
/* 00BE8 80A8A388 26320001 */ addiu $s2, $s1, 0x0001 ## $s2 = 00000001
|
||||
/* 00BEC 80A8A38C 166E000F */ bne $s3, $t6, .L80A8A3CC
|
||||
/* 00BF0 80A8A390 0012C400 */ sll $t8, $s2, 16
|
||||
/* 00BF4 80A8A394 2622FFFF */ addiu $v0, $s1, 0xFFFF ## $v0 = FFFFFFFF
|
||||
/* 00BF8 80A8A398 0002C400 */ sll $t8, $v0, 16
|
||||
/* 00BFC 80A8A39C 0018CC03 */ sra $t9, $t8, 16
|
||||
/* 00C00 80A8A3A0 00197100 */ sll $t6, $t9, 4
|
||||
/* 00C04 80A8A3A4 028EC021 */ addu $t8, $s4, $t6
|
||||
/* 00C08 80A8A3A8 87190004 */ lh $t9, 0x0004($t8) ## 00000004
|
||||
/* 00C0C 80A8A3AC 860F0004 */ lh $t7, 0x0004($s0) ## 00000004
|
||||
/* 00C10 80A8A3B0 00021C00 */ sll $v1, $v0, 16
|
||||
/* 00C14 80A8A3B4 00031C03 */ sra $v1, $v1, 16
|
||||
/* 00C18 80A8A3B8 01F97023 */ subu $t6, $t7, $t9
|
||||
/* 00C1C 80A8A3BC 448E2000 */ mtc1 $t6, $f4 ## $f4 = 0.00
|
||||
/* 00C20 80A8A3C0 26320001 */ addiu $s2, $s1, 0x0001 ## $s2 = 00000001
|
||||
/* 00C24 80A8A3C4 1000000C */ beq $zero, $zero, .L80A8A3F8
|
||||
/* 00C28 80A8A3C8 468025A0 */ cvt.s.w $f22, $f4
|
||||
.L80A8A3CC:
|
||||
/* 00C2C 80A8A3CC 00187C03 */ sra $t7, $t8, 16
|
||||
/* 00C30 80A8A3D0 000FC900 */ sll $t9, $t7, 4
|
||||
/* 00C34 80A8A3D4 02997021 */ addu $t6, $s4, $t9
|
||||
/* 00C38 80A8A3D8 85D80004 */ lh $t8, 0x0004($t6) ## 00000004
|
||||
/* 00C3C 80A8A3DC 860F0004 */ lh $t7, 0x0004($s0) ## 00000004
|
||||
/* 00C40 80A8A3E0 00121C00 */ sll $v1, $s2, 16
|
||||
/* 00C44 80A8A3E4 00031C03 */ sra $v1, $v1, 16
|
||||
/* 00C48 80A8A3E8 030FC823 */ subu $t9, $t8, $t7
|
||||
/* 00C4C 80A8A3EC 44994000 */ mtc1 $t9, $f8 ## $f8 = 0.00
|
||||
/* 00C50 80A8A3F0 00000000 */ nop
|
||||
/* 00C54 80A8A3F4 468045A0 */ cvt.s.w $f22, $f8
|
||||
.L80A8A3F8:
|
||||
/* 00C58 80A8A3F8 00037100 */ sll $t6, $v1, 4
|
||||
/* 00C5C 80A8A3FC 028EC021 */ addu $t8, $s4, $t6
|
||||
/* 00C60 80A8A400 870F0002 */ lh $t7, 0x0002($t8) ## 00000002
|
||||
/* 00C64 80A8A404 86190002 */ lh $t9, 0x0002($s0) ## 00000002
|
||||
/* 00C68 80A8A408 4600B306 */ mov.s $f12, $f22
|
||||
/* 00C6C 80A8A40C 01F97023 */ subu $t6, $t7, $t9
|
||||
/* 00C70 80A8A410 448E5000 */ mtc1 $t6, $f10 ## $f10 = 0.00
|
||||
/* 00C74 80A8A414 00000000 */ nop
|
||||
/* 00C78 80A8A418 46805620 */ cvt.s.w $f24, $f10
|
||||
/* 00C7C 80A8A41C 0C0341F5 */ jal Math_Atan2F
|
||||
|
||||
/* 00C80 80A8A420 4600C386 */ mov.s $f14, $f24
|
||||
/* 00C84 80A8A424 2A210084 */ slti $at, $s1, 0x0084
|
||||
/* 00C88 80A8A428 1420000C */ bne $at, $zero, .L80A8A45C
|
||||
/* 00C8C 80A8A42C 46000586 */ mov.s $f22, $f0
|
||||
/* 00C90 80A8A430 262FFFF4 */ addiu $t7, $s1, 0xFFF4 ## $t7 = FFFFFFF4
|
||||
/* 00C94 80A8A434 000FCC00 */ sll $t9, $t7, 16
|
||||
/* 00C98 80A8A438 00197403 */ sra $t6, $t9, 16
|
||||
/* 00C9C 80A8A43C 000E7900 */ sll $t7, $t6, 4
|
||||
/* 00CA0 80A8A440 028FC821 */ addu $t9, $s4, $t7
|
||||
/* 00CA4 80A8A444 872E0000 */ lh $t6, 0x0000($t9) ## 00000000
|
||||
/* 00CA8 80A8A448 86180000 */ lh $t8, 0x0000($s0) ## 00000000
|
||||
/* 00CAC 80A8A44C 030E7823 */ subu $t7, $t8, $t6
|
||||
/* 00CB0 80A8A450 448F3000 */ mtc1 $t7, $f6 ## $f6 = NaN
|
||||
/* 00CB4 80A8A454 1000000C */ beq $zero, $zero, .L80A8A488
|
||||
/* 00CB8 80A8A458 46803520 */ cvt.s.w $f20, $f6
|
||||
.L80A8A45C:
|
||||
/* 00CBC 80A8A45C 2639000C */ addiu $t9, $s1, 0x000C ## $t9 = 0000000C
|
||||
/* 00CC0 80A8A460 0019C400 */ sll $t8, $t9, 16
|
||||
/* 00CC4 80A8A464 00187403 */ sra $t6, $t8, 16
|
||||
/* 00CC8 80A8A468 000E7900 */ sll $t7, $t6, 4
|
||||
/* 00CCC 80A8A46C 028FC821 */ addu $t9, $s4, $t7
|
||||
/* 00CD0 80A8A470 87380000 */ lh $t8, 0x0000($t9) ## 0000000C
|
||||
/* 00CD4 80A8A474 860E0000 */ lh $t6, 0x0000($s0) ## 00000000
|
||||
/* 00CD8 80A8A478 030E7823 */ subu $t7, $t8, $t6
|
||||
/* 00CDC 80A8A47C 448F2000 */ mtc1 $t7, $f4 ## $f4 = NaN
|
||||
/* 00CE0 80A8A480 00000000 */ nop
|
||||
/* 00CE4 80A8A484 46802520 */ cvt.s.w $f20, $f4
|
||||
.L80A8A488:
|
||||
/* 00CE8 80A8A488 4600A306 */ mov.s $f12, $f20
|
||||
/* 00CEC 80A8A48C 0C0341F5 */ jal Math_Atan2F
|
||||
|
||||
/* 00CF0 80A8A490 4600C386 */ mov.s $f14, $f24
|
||||
/* 00CF4 80A8A494 46000506 */ mov.s $f20, $f0
|
||||
/* 00CF8 80A8A498 4600B306 */ mov.s $f12, $f22
|
||||
/* 00CFC 80A8A49C 0C0342DC */ jal Matrix_RotateX
|
||||
/* 00D00 80A8A4A0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
|
||||
/* 00D04 80A8A4A4 4600A306 */ mov.s $f12, $f20
|
||||
/* 00D08 80A8A4A8 0C0343B5 */ jal Matrix_RotateZ
|
||||
/* 00D0C 80A8A4AC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
|
||||
/* 00D10 80A8A4B0 27A40108 */ addiu $a0, $sp, 0x0108 ## $a0 = FFFFFFE0
|
||||
/* 00D14 80A8A4B4 0C0346BD */ jal Matrix_MultVec3f
|
||||
/* 00D18 80A8A4B8 27A500FC */ addiu $a1, $sp, 0x00FC ## $a1 = FFFFFFD4
|
||||
/* 00D1C 80A8A4BC C7A800FC */ lwc1 $f8, 0x00FC($sp)
|
||||
/* 00D20 80A8A4C0 00128C00 */ sll $s1, $s2, 16
|
||||
/* 00D24 80A8A4C4 00118C03 */ sra $s1, $s1, 16
|
||||
/* 00D28 80A8A4C8 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 00D2C 80A8A4CC 2A210090 */ slti $at, $s1, 0x0090
|
||||
/* 00D30 80A8A4D0 26100010 */ addiu $s0, $s0, 0x0010 ## $s0 = 00000010
|
||||
/* 00D34 80A8A4D4 44185000 */ mfc1 $t8, $f10
|
||||
/* 00D38 80A8A4D8 00000000 */ nop
|
||||
/* 00D3C 80A8A4DC A218FFFC */ sb $t8, -0x0004($s0) ## 0000000C
|
||||
/* 00D40 80A8A4E0 C7A60100 */ lwc1 $f6, 0x0100($sp)
|
||||
/* 00D44 80A8A4E4 4600310D */ trunc.w.s $f4, $f6
|
||||
/* 00D48 80A8A4E8 440F2000 */ mfc1 $t7, $f4
|
||||
/* 00D4C 80A8A4EC 00000000 */ nop
|
||||
/* 00D50 80A8A4F0 A20FFFFD */ sb $t7, -0x0003($s0) ## 0000000D
|
||||
/* 00D54 80A8A4F4 C7A80104 */ lwc1 $f8, 0x0104($sp)
|
||||
/* 00D58 80A8A4F8 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 00D5C 80A8A4FC 44185000 */ mfc1 $t8, $f10
|
||||
/* 00D60 80A8A500 1420FF9E */ bne $at, $zero, .L80A8A37C
|
||||
/* 00D64 80A8A504 A218FFFE */ sb $t8, -0x0002($s0) ## 0000000E
|
||||
/* 00D68 80A8A508 8FBF005C */ lw $ra, 0x005C($sp)
|
||||
/* 00D6C 80A8A50C D7B40018 */ ldc1 $f20, 0x0018($sp)
|
||||
/* 00D70 80A8A510 D7B60020 */ ldc1 $f22, 0x0020($sp)
|
||||
/* 00D74 80A8A514 D7B80028 */ ldc1 $f24, 0x0028($sp)
|
||||
/* 00D78 80A8A518 D7BA0030 */ ldc1 $f26, 0x0030($sp)
|
||||
/* 00D7C 80A8A51C D7BC0038 */ ldc1 $f28, 0x0038($sp)
|
||||
/* 00D80 80A8A520 D7BE0040 */ ldc1 $f30, 0x0040($sp)
|
||||
/* 00D84 80A8A524 8FB00048 */ lw $s0, 0x0048($sp)
|
||||
/* 00D88 80A8A528 8FB1004C */ lw $s1, 0x004C($sp)
|
||||
/* 00D8C 80A8A52C 8FB20050 */ lw $s2, 0x0050($sp)
|
||||
/* 00D90 80A8A530 8FB30054 */ lw $s3, 0x0054($sp)
|
||||
/* 00D94 80A8A534 8FB40058 */ lw $s4, 0x0058($sp)
|
||||
/* 00D98 80A8A538 03E00008 */ jr $ra
|
||||
/* 00D9C 80A8A53C 27BD0128 */ addiu $sp, $sp, 0x0128 ## $sp = 00000000
|
@ -1,145 +0,0 @@
|
||||
.late_rodata
|
||||
glabel D_80B2444C
|
||||
.float 0.1
|
||||
|
||||
glabel D_80B24450
|
||||
.float 0.1
|
||||
|
||||
glabel D_80B24454
|
||||
.float 0.1
|
||||
|
||||
.text
|
||||
glabel func_80B24038
|
||||
/* 01348 80B24038 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 0134C 80B2403C 00067080 */ sll $t6, $a2, 2
|
||||
/* 01350 80B24040 AFBF0024 */ sw $ra, 0x0024($sp)
|
||||
/* 01354 80B24044 AFB00020 */ sw $s0, 0x0020($sp)
|
||||
/* 01358 80B24048 F7B40018 */ sdc1 $f20, 0x0018($sp)
|
||||
/* 0135C 80B2404C 00AE7821 */ addu $t7, $a1, $t6
|
||||
/* 01360 80B24050 8DE21D8C */ lw $v0, 0x1D8C($t7) ## 00001D8C
|
||||
/* 01364 80B24054 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 01368 80B24058 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 0136C 80B2405C 8C58000C */ lw $t8, 0x000C($v0) ## 0000000C
|
||||
/* 01370 80B24060 8C590010 */ lw $t9, 0x0010($v0) ## 00000010
|
||||
/* 01374 80B24064 8C480014 */ lw $t0, 0x0014($v0) ## 00000014
|
||||
/* 01378 80B24068 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00
|
||||
/* 0137C 80B2406C 8C490018 */ lw $t1, 0x0018($v0) ## 00000018
|
||||
/* 01380 80B24070 8C4A001C */ lw $t2, 0x001C($v0) ## 0000001C
|
||||
/* 01384 80B24074 468020A0 */ cvt.s.w $f2, $f4
|
||||
/* 01388 80B24078 44993000 */ mtc1 $t9, $f6 ## $f6 = 0.00
|
||||
/* 0138C 80B2407C 44884000 */ mtc1 $t0, $f8 ## $f8 = 0.00
|
||||
/* 01390 80B24080 44895000 */ mtc1 $t1, $f10 ## $f10 = 0.00
|
||||
/* 01394 80B24084 448A2000 */ mtc1 $t2, $f4 ## $f4 = 0.00
|
||||
/* 01398 80B24088 46803320 */ cvt.s.w $f12, $f6
|
||||
/* 0139C 80B2408C 8C4B0020 */ lw $t3, 0x0020($v0) ## 00000020
|
||||
/* 013A0 80B24090 E7A20034 */ swc1 $f2, 0x0034($sp)
|
||||
/* 013A4 80B24094 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000
|
||||
/* 013A8 80B24098 448B3000 */ mtc1 $t3, $f6 ## $f6 = 0.00
|
||||
/* 013AC 80B2409C 468043A0 */ cvt.s.w $f14, $f8
|
||||
/* 013B0 80B240A0 E7AC0038 */ swc1 $f12, 0x0038($sp)
|
||||
/* 013B4 80B240A4 46805420 */ cvt.s.w $f16, $f10
|
||||
/* 013B8 80B240A8 E7AE003C */ swc1 $f14, 0x003C($sp)
|
||||
/* 013BC 80B240AC 468024A0 */ cvt.s.w $f18, $f4
|
||||
/* 013C0 80B240B0 E7B00028 */ swc1 $f16, 0x0028($sp)
|
||||
/* 013C4 80B240B4 46803520 */ cvt.s.w $f20, $f6
|
||||
/* 013C8 80B240B8 0C2C8FF7 */ jal func_80B23FDC
|
||||
/* 013CC 80B240BC E7B2002C */ swc1 $f18, 0x002C($sp)
|
||||
/* 013D0 80B240C0 C7A20034 */ lwc1 $f2, 0x0034($sp)
|
||||
/* 013D4 80B240C4 C7B00028 */ lwc1 $f16, 0x0028($sp)
|
||||
/* 013D8 80B240C8 C7AC0038 */ lwc1 $f12, 0x0038($sp)
|
||||
/* 013DC 80B240CC C7B2002C */ lwc1 $f18, 0x002C($sp)
|
||||
/* 013E0 80B240D0 46028201 */ sub.s $f8, $f16, $f2
|
||||
/* 013E4 80B240D4 C7AE003C */ lwc1 $f14, 0x003C($sp)
|
||||
/* 013E8 80B240D8 3C0180B2 */ lui $at, %hi(D_80B2444C) ## $at = 80B20000
|
||||
/* 013EC 80B240DC 460C9101 */ sub.s $f4, $f18, $f12
|
||||
/* 013F0 80B240E0 46004282 */ mul.s $f10, $f8, $f0
|
||||
/* 013F4 80B240E4 2604005C */ addiu $a0, $s0, 0x005C ## $a0 = 0000005C
|
||||
/* 013F8 80B240E8 460EA201 */ sub.s $f8, $f20, $f14
|
||||
/* 013FC 80B240EC 46002182 */ mul.s $f6, $f4, $f0
|
||||
/* 01400 80B240F0 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
|
||||
/* 01404 80B240F4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 01408 80B240F8 46025080 */ add.s $f2, $f10, $f2
|
||||
/* 0140C 80B240FC 46004282 */ mul.s $f10, $f8, $f0
|
||||
/* 01410 80B24100 C428444C */ lwc1 $f8, %lo(D_80B2444C)($at)
|
||||
/* 01414 80B24104 460C3300 */ add.s $f12, $f6, $f12
|
||||
/* 01418 80B24108 3C0180B2 */ lui $at, %hi(D_80B24450) ## $at = 80B20000
|
||||
/* 0141C 80B2410C 46041181 */ sub.s $f6, $f2, $f4
|
||||
/* 01420 80B24110 460E5380 */ add.s $f14, $f10, $f14
|
||||
/* 01424 80B24114 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
|
||||
/* 01428 80B24118 46083402 */ mul.s $f16, $f6, $f8
|
||||
/* 0142C 80B2411C C4264450 */ lwc1 $f6, %lo(D_80B24450)($at)
|
||||
/* 01430 80B24120 460A6101 */ sub.s $f4, $f12, $f10
|
||||
/* 01434 80B24124 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C
|
||||
/* 01438 80B24128 3C0180B2 */ lui $at, %hi(D_80B24454) ## $at = 80B20000
|
||||
/* 0143C 80B2412C 46062482 */ mul.s $f18, $f4, $f6
|
||||
/* 01440 80B24130 46087281 */ sub.s $f10, $f14, $f8
|
||||
/* 01444 80B24134 C4244454 */ lwc1 $f4, %lo(D_80B24454)($at)
|
||||
/* 01448 80B24138 44807000 */ mtc1 $zero, $f14 ## $f14 = 0.00
|
||||
/* 0144C 80B2413C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
|
||||
/* 01450 80B24140 46045502 */ mul.s $f20, $f10, $f4
|
||||
/* 01454 80B24144 00000000 */ nop
|
||||
/* 01458 80B24148 46108182 */ mul.s $f6, $f16, $f16
|
||||
/* 0145C 80B2414C 00000000 */ nop
|
||||
/* 01460 80B24150 46129202 */ mul.s $f8, $f18, $f18
|
||||
/* 01464 80B24154 46083280 */ add.s $f10, $f6, $f8
|
||||
/* 01468 80B24158 4614A102 */ mul.s $f4, $f20, $f20
|
||||
/* 0146C 80B2415C 46045000 */ add.s $f0, $f10, $f4
|
||||
/* 01470 80B24160 46000004 */ sqrt.s $f0, $f0
|
||||
/* 01474 80B24164 460E003C */ c.lt.s $f0, $f14
|
||||
/* 01478 80B24168 00000000 */ nop
|
||||
/* 0147C 80B2416C 45000003 */ bc1f .L80B2417C
|
||||
/* 01480 80B24170 00000000 */ nop
|
||||
/* 01484 80B24174 1000000B */ beq $zero, $zero, .L80B241A4
|
||||
/* 01488 80B24178 46007306 */ mov.s $f12, $f14
|
||||
.L80B2417C:
|
||||
/* 0148C 80B2417C 44816000 */ mtc1 $at, $f12 ## $f12 = 20.00
|
||||
/* 01490 80B24180 00000000 */ nop
|
||||
/* 01494 80B24184 4600603C */ c.lt.s $f12, $f0
|
||||
/* 01498 80B24188 00000000 */ nop
|
||||
/* 0149C 80B2418C 45020004 */ bc1fl .L80B241A0
|
||||
/* 014A0 80B24190 46000086 */ mov.s $f2, $f0
|
||||
/* 014A4 80B24194 10000002 */ beq $zero, $zero, .L80B241A0
|
||||
/* 014A8 80B24198 46006086 */ mov.s $f2, $f12
|
||||
/* 014AC 80B2419C 46000086 */ mov.s $f2, $f0
|
||||
.L80B241A0:
|
||||
/* 014B0 80B241A0 46001306 */ mov.s $f12, $f2
|
||||
.L80B241A4:
|
||||
/* 014B4 80B241A4 460C0032 */ c.eq.s $f0, $f12
|
||||
/* 014B8 80B241A8 00000000 */ nop
|
||||
/* 014BC 80B241AC 4503000D */ bc1tl .L80B241E4
|
||||
/* 014C0 80B241B0 44058000 */ mfc1 $a1, $f16
|
||||
/* 014C4 80B241B4 460E0032 */ c.eq.s $f0, $f14
|
||||
/* 014C8 80B241B8 00000000 */ nop
|
||||
/* 014CC 80B241BC 45030009 */ bc1tl .L80B241E4
|
||||
/* 014D0 80B241C0 44058000 */ mfc1 $a1, $f16
|
||||
/* 014D4 80B241C4 46006083 */ div.s $f2, $f12, $f0
|
||||
/* 014D8 80B241C8 46028402 */ mul.s $f16, $f16, $f2
|
||||
/* 014DC 80B241CC 00000000 */ nop
|
||||
/* 014E0 80B241D0 46029482 */ mul.s $f18, $f18, $f2
|
||||
/* 014E4 80B241D4 00000000 */ nop
|
||||
/* 014E8 80B241D8 4602A502 */ mul.s $f20, $f20, $f2
|
||||
/* 014EC 80B241DC 00000000 */ nop
|
||||
/* 014F0 80B241E0 44058000 */ mfc1 $a1, $f16
|
||||
.L80B241E4:
|
||||
/* 014F4 80B241E4 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 014F8 80B241E8 E7B2002C */ swc1 $f18, 0x002C($sp)
|
||||
/* 014FC 80B241EC C7B2002C */ lwc1 $f18, 0x002C($sp)
|
||||
/* 01500 80B241F0 26040060 */ addiu $a0, $s0, 0x0060 ## $a0 = 00000060
|
||||
/* 01504 80B241F4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 01508 80B241F8 44059000 */ mfc1 $a1, $f18
|
||||
/* 0150C 80B241FC 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 01510 80B24200 00000000 */ nop
|
||||
/* 01514 80B24204 4405A000 */ mfc1 $a1, $f20
|
||||
/* 01518 80B24208 26040064 */ addiu $a0, $s0, 0x0064 ## $a0 = 00000064
|
||||
/* 0151C 80B2420C 0C01DE80 */ jal Math_StepToF
|
||||
|
||||
/* 01520 80B24210 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 01524 80B24214 0C00B5FB */ jal func_8002D7EC
|
||||
/* 01528 80B24218 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 0152C 80B2421C 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
/* 01530 80B24220 D7B40018 */ ldc1 $f20, 0x0018($sp)
|
||||
/* 01534 80B24224 8FB00020 */ lw $s0, 0x0020($sp)
|
||||
/* 01538 80B24228 03E00008 */ jr $ra
|
||||
/* 0153C 80B2422C 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
@ -1,13 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .rodata
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_80A8E4B0
|
||||
.incbin "baserom/ovl_En_Jsjutan", 0x4D10, 0x00000160
|
@ -1,13 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .rodata
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_80B24460
|
||||
.incbin "baserom/ovl_En_Tr", 0x1770, 0x00000200
|
8
spec
8
spec
@ -2509,11 +2509,7 @@ endseg
|
||||
beginseg
|
||||
name "ovl_En_Jsjutan"
|
||||
include "build/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Jsjutan/ovl_En_Jsjutan_reloc.o"
|
||||
#else
|
||||
include "build/data/overlays/actors/z_en_jsjutan.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@ -3014,11 +3010,7 @@ endseg
|
||||
beginseg
|
||||
name "ovl_En_Tr"
|
||||
include "build/src/overlays/actors/ovl_En_Tr/z_en_tr.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Tr/ovl_En_Tr_reloc.o"
|
||||
#else
|
||||
include "build/data/overlays/actors/z_en_tr.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -171,7 +171,7 @@ void func_80A58DD4(EnHoll* this, GlobalContext* globalCtx) {
|
||||
|
||||
// Horizontal Planes
|
||||
#ifdef NON_MATCHING
|
||||
// Small regalloc near the end
|
||||
// a/v regalloc near the end. Also ugly float thing in the conditional that seems needed to match.
|
||||
void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s32 pad1;
|
||||
@ -184,15 +184,18 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
|
||||
s32 transitionActorIdx;
|
||||
f32 absZ;
|
||||
s32 side;
|
||||
s8 test;
|
||||
|
||||
func_8002DBD0(&this->actor, &vec, (useViewEye) ? &globalCtx->view.eye : &player->actor.world.pos);
|
||||
planeHalfWidth = (((this->actor.params >> 6) & 7) == 6) ? PLANE_HALFWIDTH : PLANE_HALFWIDTH_2;
|
||||
if (EnHoll_IsKokiriSetup8() || (vec.y > PLANE_Y_MIN && vec.y < PLANE_Y_MAX && fabsf(vec.x) < planeHalfWidth &&
|
||||
fabsf(vec.z) < 100.0f && fabsf(vec.z) > 50.0f)) {
|
||||
|
||||
if (EnHoll_IsKokiriSetup8() || (PLANE_Y_MIN < vec.y && vec.y < PLANE_Y_MAX && fabsf(vec.x) < planeHalfWidth &&
|
||||
(absZ = fabsf(vec.z), 100.0f > absZ && absZ > 50.0f))) {
|
||||
transitionActorIdx = (u16)this->actor.params >> 0xA;
|
||||
side = (vec.z < 0.0f) ? 0 : 1;
|
||||
transitionEntry = &globalCtx->transitionActorList[transitionActorIdx];
|
||||
this->actor.room = transitionEntry->sides[side].room;
|
||||
test = transitionEntry->sides[side].room;
|
||||
this->actor.room = test;
|
||||
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
|
||||
func_8009728C(globalCtx, &globalCtx->roomCtx, (u32)this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_NextAction);
|
||||
|
@ -47,7 +47,7 @@ void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
CollisionHeader_GetVirtual(&gJsjutanCol, &header);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, header);
|
||||
Actor_SetScale(thisx, 0.02f);
|
||||
this->unk_164 = 1;
|
||||
this->unk_164 = true;
|
||||
this->shadowAlpha = 100.0f;
|
||||
}
|
||||
|
||||
@ -58,11 +58,10 @@ void EnJsjutan_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80A89860(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s16 i;
|
||||
Vtx* phi_s0;
|
||||
Vtx* phi_s2;
|
||||
Vec3f actorPos = this->dyna.actor.world.pos;
|
||||
s16 i;
|
||||
|
||||
phi_s0 = SEGMENTED_TO_VIRTUAL(gJsjutanShadowOddVtx);
|
||||
phi_s2 = SEGMENTED_TO_VIRTUAL(gJsjutanShadowEvenVtx);
|
||||
@ -82,10 +81,8 @@ void func_80A89860(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc differences
|
||||
void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
u8 isPlayerOnTop;
|
||||
u8 isPlayerOnTop = false; // sp127
|
||||
s16 i;
|
||||
s16 j;
|
||||
Vtx* phi_s0;
|
||||
@ -93,12 +90,12 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
Vtx* phi_s0_2;
|
||||
Vec3f sp108;
|
||||
Vec3f spFC;
|
||||
Vtx* phi_s0_3;
|
||||
f32 temp_f0_3;
|
||||
Player* player;
|
||||
Actor* parent;
|
||||
Actor* actorExplosive;
|
||||
f32 phi_f28;
|
||||
Actor* actorProfessor;
|
||||
Actor* actorBeanGuy;
|
||||
f32 dxVtx;
|
||||
f32 dyVtx;
|
||||
f32 dzVtx;
|
||||
f32 distVtx;
|
||||
// 0 if no actor in that index of diffToTracked
|
||||
u8 spE0[3];
|
||||
// Tracks distance to other actors.
|
||||
@ -110,28 +107,16 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
f32 spB8; // diffToPlayer X
|
||||
f32 spB4; // diffToPlayer Y
|
||||
f32 spB0; // diffToPlayer Z
|
||||
f32 phi_f2_4;
|
||||
f32 weight;
|
||||
f32 spA8; // wave amplitude (?)
|
||||
Actor* actorProfessor;
|
||||
Actor* actorBeanGuy;
|
||||
f32 distance_1;
|
||||
f32 temp_f14_2;
|
||||
f32 distance_2;
|
||||
f32 phi_f2_2;
|
||||
f32 phi_f2_3;
|
||||
u8 isInCreditsScene;
|
||||
s16 index; // phi_v1_5
|
||||
f32 phi_f22;
|
||||
f32 aux_f20;
|
||||
s16 phi_v1_4;
|
||||
s16 temp_a0_3;
|
||||
u16 dayTime;
|
||||
|
||||
isPlayerOnTop = 0;
|
||||
player = PLAYER;
|
||||
parent = this->dyna.actor.parent;
|
||||
actorExplosive = globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
|
||||
isInCreditsScene = 0;
|
||||
f32 offset;
|
||||
f32 maxOffset;
|
||||
f32 maxAmp;
|
||||
f32 waveform;
|
||||
Player* player = PLAYER;
|
||||
Actor* parent = this->dyna.actor.parent;
|
||||
Actor* actorExplosive = globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
|
||||
u8 isInCreditsScene = false; // sp8B
|
||||
|
||||
if (globalCtx->gameplayFrames % 2 != 0) {
|
||||
phi_s0 = SEGMENTED_TO_VIRTUAL(gJsjutanCarpetOddVtx);
|
||||
@ -148,7 +133,7 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
phi_s0_2 = phi_s0;
|
||||
|
||||
if ((fabsf(spB8) < 5500.0f) && (fabsf(spB4) < 3000.0f) && (fabsf(spB0) < 5500.0f)) {
|
||||
isPlayerOnTop = 1;
|
||||
isPlayerOnTop = true;
|
||||
}
|
||||
|
||||
// Distance of Magic Carpet Salesman to carpet.
|
||||
@ -165,7 +150,7 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
|
||||
// Credits scene. The magic carpet man is friends with the bean guy and the lakeside professor.
|
||||
if ((gSaveContext.entranceIndex == 0x157) && (gSaveContext.sceneSetupIndex == 8)) {
|
||||
isInCreditsScene = 1;
|
||||
isInCreditsScene = true;
|
||||
|
||||
actorProfessor = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].head;
|
||||
while (actorProfessor != NULL) {
|
||||
@ -199,9 +184,9 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
// Player can place bombs in carpet and it will react to it.
|
||||
while (actorExplosive != NULL) {
|
||||
if (i < 3) {
|
||||
spD4[i] = 50.0f * (actorExplosive->world.pos.x - this->dyna.actor.world.pos.x);
|
||||
spC8[i] = 50.0f * (actorExplosive->world.pos.y - this->unk_168);
|
||||
spBC[i] = 50.0f * (actorExplosive->world.pos.z - this->dyna.actor.world.pos.z);
|
||||
spD4[i] = (actorExplosive->world.pos.x - this->dyna.actor.world.pos.x) * 50.0f;
|
||||
spC8[i] = (actorExplosive->world.pos.y - this->unk_168) * 50.0f;
|
||||
spBC[i] = (actorExplosive->world.pos.z - this->dyna.actor.world.pos.z) * 50.0f;
|
||||
|
||||
if ((fabsf(spD4[i]) < 5500.0f) && (fabsf(spC8[i]) < 3000.0f) && (fabsf(spBC[i]) < 5500.0f)) {
|
||||
if (actorExplosive->params == BOMB_EXPLOSION) {
|
||||
@ -217,74 +202,66 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
|
||||
// Fancy math to make a woobly and reactive carpet.
|
||||
for (j = 0; j < ARRAY_COUNT(D_80A8EE10); j++, phi_s0++, phi_s3++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80A8EE10); i++, phi_s0++, phi_s3++) {
|
||||
if (isPlayerOnTop) {
|
||||
// Linear distance from j-th wave to player, in XZ plane.
|
||||
distance_1 = sqrtf(SQ(phi_s0->n.ob[2] - spB0) + SQ(phi_s0->n.ob[0] - spB8));
|
||||
dxVtx = phi_s0->n.ob[0] - spB8;
|
||||
dzVtx = phi_s0->n.ob[2] - spB0;
|
||||
distVtx = sqrtf(SQ(dxVtx) + SQ(dzVtx));
|
||||
|
||||
// Distance percentage. 0.0f to 1.0f. 2500.0f is the max distance to an actor that this wave will consider.
|
||||
phi_f2_4 = (2500.0f - distance_1) / 2500.0f;
|
||||
if (phi_f2_4 < 0.0f) {
|
||||
phi_f2_4 = 0.0f;
|
||||
weight = (2500.0f - distVtx) / 2500.0f;
|
||||
if (weight < 0.0f) {
|
||||
weight = 0.0f;
|
||||
}
|
||||
offset = (spB4 * weight) + ((this->unk_170 - (this->unk_170 * weight)) - 200.0f);
|
||||
|
||||
distVtx -= 1500.0f;
|
||||
if (distVtx < 0.0f) {
|
||||
distVtx = 0.0f;
|
||||
}
|
||||
|
||||
// phi_f28 = (spB4 * phi_f2_4) + ((this->unk_170 - (this->unk_170 * phi_f2_4)) - 200.0f);
|
||||
spA8 = (spB4 * phi_f2_4) + ((this->unk_170 - (this->unk_170 * phi_f2_4)) - 200.0f);
|
||||
phi_f28 = spA8;
|
||||
spA8 = 100.0f * distVtx * 0.01f;
|
||||
spA8 = CLAMP_MAX(spA8, 100.0f);
|
||||
|
||||
distance_1 -= 1500.0f;
|
||||
if (distance_1 < 0.0f) {
|
||||
distance_1 = 0.0f;
|
||||
}
|
||||
|
||||
spA8 = 100.0f * distance_1 * 0.01f;
|
||||
if (spA8 > 100.0f) {
|
||||
spA8 = 100.0f;
|
||||
}
|
||||
} else {
|
||||
phi_f28 = this->unk_170 - 200.f;
|
||||
offset = this->unk_170 - 200.f;
|
||||
spA8 = 100.0f;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (spE0[i] != 0) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
if (spE0[j] != 0) {
|
||||
dxVtx = phi_s0->n.ob[0] - spD4[j];
|
||||
dzVtx = phi_s0->n.ob[2] - spBC[j];
|
||||
// Linear distance from j-th wave to whatever actor is there, in XZ plane.
|
||||
distance_2 = sqrtf(SQ(phi_s0->n.ob[2] - spBC[i]) + SQ(phi_s0->n.ob[0] - spD4[i]));
|
||||
distVtx = sqrtf(SQ(dxVtx) + SQ(dzVtx));
|
||||
|
||||
if ((i == 0) || isInCreditsScene) {
|
||||
phi_f2_2 = (3000.0f - distance_2) / 3000.0f;
|
||||
if ((j == 0) || isInCreditsScene) {
|
||||
weight = (3000.0f - distVtx) / 3000.0f;
|
||||
} else {
|
||||
phi_f2_2 = (2000.0f - distance_2) / 2000.0f;
|
||||
weight = (2000.0f - distVtx) / 2000.0f;
|
||||
}
|
||||
if (weight < 0.0f) {
|
||||
weight = 0.0f;
|
||||
}
|
||||
|
||||
if (phi_f2_2 < 0.0f) {
|
||||
phi_f2_2 = 0.0f;
|
||||
// should be the following, but doesn't match that way.
|
||||
// maxoffset = (spC8[i] * weight) + ((this->unk_170 - (this->unk_170 * weight)) - 200.0f);
|
||||
maxOffset = (spC8[j] * weight);
|
||||
maxOffset += ((this->unk_170 - (this->unk_170 * weight)) - 200.0f);
|
||||
|
||||
distVtx -= 1500.0f;
|
||||
if (distVtx < 0.0f) {
|
||||
distVtx = 0.0f;
|
||||
}
|
||||
|
||||
// temp_f14_2 = (spC8[i] * phi_f2_2) + ((this->unk_170 - (this->unk_170 * phi_f2_2)) - 200.0f);
|
||||
temp_f14_2 = (spC8[i] * phi_f2_2);
|
||||
temp_f14_2 += ((this->unk_170 - (this->unk_170 * phi_f2_2)) - 200.0f);
|
||||
maxAmp = 100.0f * distVtx * 0.01f;
|
||||
maxAmp = CLAMP_MAX(maxAmp, 100.0f);
|
||||
|
||||
distance_2 = distance_2 - 1500.0f;
|
||||
if (distance_2 < 0.0f) {
|
||||
distance_2 = 0.0f;
|
||||
}
|
||||
offset = CLAMP_MAX(offset, maxOffset);
|
||||
|
||||
phi_f2_3 = 100.0f * distance_2 * 0.01f;
|
||||
if (phi_f2_3 > 100.0f) {
|
||||
phi_f2_3 = 100.0f;
|
||||
}
|
||||
|
||||
if (temp_f14_2 < phi_f28) {
|
||||
phi_f28 = temp_f14_2;
|
||||
}
|
||||
|
||||
if (phi_f2_3 < spA8) {
|
||||
spA8 = phi_f2_3;
|
||||
}
|
||||
spA8 = CLAMP_MAX(spA8, maxAmp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,13 +274,11 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
* A: spA8
|
||||
* D: phi_f28
|
||||
*/
|
||||
temp_f0_3 = Math_SinS(globalCtx->gameplayFrames * 4000 + j * 10000);
|
||||
waveform = spA8 * Math_SinS(globalCtx->gameplayFrames * 4000 + i * 10000);
|
||||
|
||||
if (this->unk_174) {
|
||||
temp_f14_2 = temp_f0_3 * spA8;
|
||||
|
||||
phi_v1_4 = phi_f28 + (temp_f14_2);
|
||||
temp_a0_3 = (phi_s3->n.ob[1] - this->unk_168) * 50.0f;
|
||||
s16 phi_v1_4 = offset + waveform;
|
||||
s16 temp_a0_3 = (phi_s3->n.ob[1] - this->unk_168) * 50.0f;
|
||||
|
||||
if (phi_v1_4 < temp_a0_3) {
|
||||
phi_v1_4 = temp_a0_3;
|
||||
@ -311,22 +286,19 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
|
||||
phi_s0->n.ob[1] = phi_v1_4;
|
||||
} else {
|
||||
temp_f14_2 = temp_f0_3 * spA8;
|
||||
phi_s0->n.ob[1] = offset + waveform;
|
||||
|
||||
phi_s0->n.ob[1] = phi_f28 + (temp_f14_2);
|
||||
phi_s0->n.ob[0] = D_80A8EE10[i].x + (s16)(waveform * 0.5f);
|
||||
phi_s0->n.ob[2] = D_80A8EE10[i].z + (s16)(waveform * 0.5f);
|
||||
|
||||
phi_v1_4 = temp_f14_2 * 0.5f;
|
||||
phi_s0->n.ob[0] = D_80A8EE10[j].x + phi_v1_4;
|
||||
phi_s0->n.ob[2] = D_80A8EE10[j].z + phi_v1_4;
|
||||
|
||||
phi_v1_4 = temp_f14_2;
|
||||
phi_s3->n.ob[0] = D_80A8EE10[j].x + phi_v1_4;
|
||||
phi_s3->n.ob[2] = D_80A8EE10[j].z + phi_v1_4;
|
||||
phi_s3->n.ob[0] = D_80A8EE10[i].x + (s16)waveform;
|
||||
phi_s3->n.ob[2] = D_80A8EE10[i].z + (s16)waveform;
|
||||
}
|
||||
}
|
||||
|
||||
// address: ac4 ~ bb8
|
||||
if (!this->unk_174) {
|
||||
u16 dayTime;
|
||||
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->dyna.actor.world.pos.y = this->unk_168;
|
||||
|
||||
@ -339,69 +311,54 @@ void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx) {
|
||||
this->unk_170 = 1000.0f;
|
||||
} else {
|
||||
Math_ApproachF(&this->dyna.actor.world.pos.y, this->unk_168 - 1000.0f, 1.0f, this->dyna.actor.velocity.y);
|
||||
//! Note to whoever tries to match this function:
|
||||
//! daytime commonly needs the (void)0 trick.
|
||||
//! could help with the temp above and some of these other memes.
|
||||
//! -fig02 (https://github.com/zeldaret/oot/pull/713#discussion_r593921251)
|
||||
if (!gSaveContext.dayTime) {
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
}
|
||||
Math_ApproachF(&this->dyna.actor.velocity.y, 5.0f, 1.0f, 0.5f);
|
||||
Math_ApproachF(&this->shadowAlpha, 0.0f, 1.0f, 3.0f);
|
||||
Math_ApproachF(&this->unk_170, -5000.0f, 1.0f, 100.0f);
|
||||
}
|
||||
|
||||
// address: bbc
|
||||
phi_s0_3 = phi_s0_2;
|
||||
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
phi_s0 = phi_s0_2;
|
||||
|
||||
sp108.x = 0.0f;
|
||||
sp108.y = 0.0f;
|
||||
sp108.z = 120.0f;
|
||||
|
||||
// Fancy math to smooth each part of the wave considering its neighborhood.
|
||||
for (j = 0; j < ARRAY_COUNT(gJsjutanCarpetOddVtx); j++, phi_s0_3++) {
|
||||
for (i = 0; i < ARRAY_COUNT(gJsjutanCarpetOddVtx); i++, phi_s0++) {
|
||||
f32 rotX;
|
||||
f32 rotZ;
|
||||
s32 pad;
|
||||
// Carpet size is 12x12.
|
||||
if ((j % 12) == 11) { // Last column.
|
||||
index = j - 1;
|
||||
phi_f22 = phi_s0_3->n.ob[2] - phi_s0_2[index].n.ob[2];
|
||||
if ((i % 12) == 11) { // Last column.
|
||||
j = i - 1;
|
||||
dzVtx = phi_s0->n.ob[2] - phi_s0_2[j].n.ob[2];
|
||||
} else {
|
||||
index = j + 1;
|
||||
phi_f22 = phi_s0_2[index].n.ob[2] - phi_s0_3->n.ob[2];
|
||||
j = i + 1;
|
||||
dzVtx = phi_s0_2[j].n.ob[2] - phi_s0->n.ob[2];
|
||||
}
|
||||
|
||||
temp_f0_3 = phi_s0_2[index].n.ob[1] - phi_s0_3->n.ob[1];
|
||||
dyVtx = phi_s0_2[j].n.ob[1] - phi_s0->n.ob[1];
|
||||
|
||||
phi_f22 = Math_Atan2F(phi_f22, temp_f0_3);
|
||||
rotX = Math_Atan2F(dzVtx, dyVtx);
|
||||
|
||||
if (j >= 132) { // Last row.
|
||||
index = j - 12;
|
||||
aux_f20 = phi_s0_3->n.ob[0] - phi_s0_2[index].n.ob[0];
|
||||
if (i >= 132) { // Last row.
|
||||
j = i - 12;
|
||||
dxVtx = phi_s0->n.ob[0] - phi_s0_2[j].n.ob[0];
|
||||
} else {
|
||||
index = j + 12;
|
||||
aux_f20 = phi_s0_2[index].n.ob[0] - phi_s0_3->n.ob[0];
|
||||
j = i + 12;
|
||||
dxVtx = phi_s0_2[j].n.ob[0] - phi_s0->n.ob[0];
|
||||
}
|
||||
|
||||
aux_f20 = Math_Atan2F(aux_f20, temp_f0_3);
|
||||
rotZ = Math_Atan2F(dxVtx, dyVtx);
|
||||
|
||||
Matrix_RotateX(phi_f22, MTXMODE_NEW);
|
||||
Matrix_RotateZ(aux_f20, MTXMODE_APPLY);
|
||||
Matrix_RotateX(rotX, MTXMODE_NEW);
|
||||
Matrix_RotateZ(rotZ, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp108, &spFC);
|
||||
|
||||
phi_s0_3->n.n[0] = spFC.x;
|
||||
phi_s0_3->n.n[1] = spFC.y;
|
||||
phi_s0_3->n.n[2] = spFC.z;
|
||||
phi_s0->n.n[0] = spFC.x;
|
||||
phi_s0->n.n[1] = spFC.y;
|
||||
phi_s0->n.n[2] = spFC.z;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void func_80A89A6C(EnJsjutan* this, GlobalContext* globalCtx);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Jsjutan/func_80A89A6C.s")
|
||||
#endif
|
||||
|
||||
void EnJsjutan_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
@ -423,12 +380,12 @@ void EnJsjutan_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
thisx->world.pos.y = parent->world.pos.y;
|
||||
thisx->world.pos.z = parent->world.pos.z;
|
||||
this->unk_168 = thisx->world.pos.y;
|
||||
if (this->unk_175 == 0) {
|
||||
this->unk_175 = 1;
|
||||
if (!this->unk_175) {
|
||||
this->unk_175 = true;
|
||||
func_80A89860(this, globalCtx);
|
||||
}
|
||||
} else if (this->unk_175 == 0) {
|
||||
this->unk_175 = 1;
|
||||
} else if (!this->unk_175) {
|
||||
this->unk_175 = true;
|
||||
thisx->world.pos.x = Math_SinS(parent->shape.rot.y) * 60.0f + parent->world.pos.x;
|
||||
thisx->world.pos.y = (parent->world.pos.y + 5.0f) - 10.0f;
|
||||
thisx->world.pos.z = Math_CosS(parent->shape.rot.y) * 60.0f + parent->world.pos.z;
|
||||
@ -437,8 +394,8 @@ void EnJsjutan_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
|
||||
func_80A89A6C(this, globalCtx);
|
||||
if (this->unk_164 != 0) {
|
||||
this->unk_164 = 0;
|
||||
if (this->unk_164) {
|
||||
this->unk_164 = false;
|
||||
for (i = 0; i < ARRAY_COUNT(gJsjutanShadowTex); i++) {
|
||||
if (((u16*)gJsjutanCarpetTex)[i] != 0) { // Hack to bypass ZAPD exporting textures as u64.
|
||||
gJsjutanShadowTex[i] = 0xFF;
|
||||
|
@ -185,21 +185,17 @@ void EnTr_ChooseAction2(EnTr* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnTr_FlyKidnapCutscene(EnTr* this, GlobalContext* globalCtx) {
|
||||
Vec3f originalPos;
|
||||
s16 actionIndex;
|
||||
Vec3f originalPos = this->actor.world.pos;
|
||||
|
||||
originalPos = this->actor.world.pos;
|
||||
if (globalCtx->csCtx.state != CS_STATE_IDLE) {
|
||||
actionIndex = this->actionIndex;
|
||||
|
||||
if (globalCtx->csCtx.npcActions[actionIndex] != NULL) {
|
||||
if (globalCtx->csCtx.npcActions[actionIndex]->action == 8) {
|
||||
func_80B24038(this, globalCtx, actionIndex);
|
||||
if (globalCtx->csCtx.npcActions[this->actionIndex] != NULL) {
|
||||
if (globalCtx->csCtx.npcActions[this->actionIndex]->action == 8) {
|
||||
func_80B24038(this, globalCtx, this->actionIndex);
|
||||
this->actor.world.rot.y = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 10, 0x400, 0x100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
} else {
|
||||
EnTr_SetStartPosRot(this, globalCtx, actionIndex);
|
||||
EnTr_SetStartPosRot(this, globalCtx, this->actionIndex);
|
||||
this->actor.world.pos.x += Math_SinS(this->timer) * 150.0f;
|
||||
this->actor.world.pos.y += -100.0f;
|
||||
this->actor.world.pos.z += Math_CosS(this->timer) * 150.0f;
|
||||
@ -226,16 +222,12 @@ void func_80B23254(EnTr* this, GlobalContext* globalCtx, s32 arg2, f32 arg3, f32
|
||||
Vec3f sp58;
|
||||
Color_RGBA8* primColor;
|
||||
Color_RGBA8* envColor;
|
||||
Vec3f cameraEye;
|
||||
s16 yaw;
|
||||
s16 reversePitch;
|
||||
Vec3f cameraEye = ACTIVE_CAM->eye;
|
||||
s16 yaw = Math_Vec3f_Yaw(&cameraEye, &this->actor.world.pos);
|
||||
s16 reversePitch = -Math_Vec3f_Pitch(&cameraEye, &this->actor.world.pos);
|
||||
f32 sp3C;
|
||||
|
||||
cameraEye = ACTIVE_CAM->eye;
|
||||
yaw = Math_Vec3f_Yaw(&cameraEye, &this->actor.world.pos);
|
||||
reversePitch = -Math_Vec3f_Pitch(&cameraEye, &this->actor.world.pos);
|
||||
accel.z = 0.0f;
|
||||
accel.x = 0.0f;
|
||||
accel.x = accel.z = 0.0f;
|
||||
sp3C = Math_SinS(yaw);
|
||||
velocity.x = Math_CosS(reversePitch) * (arg3 * sp3C);
|
||||
velocity.y = Math_SinS(reversePitch) * arg3;
|
||||
@ -258,8 +250,6 @@ void func_80B23254(EnTr* this, GlobalContext* globalCtx, s32 arg2, f32 arg3, f32
|
||||
}
|
||||
|
||||
void EnTr_ShrinkVanish(EnTr* this, GlobalContext* globalCtx) {
|
||||
s32 temp_hi;
|
||||
|
||||
if (this->timer >= 17) {
|
||||
this->actor.shape.rot.y = (this->actor.shape.rot.y - (this->timer * 0x28F)) + 0x3D68;
|
||||
} else {
|
||||
@ -267,7 +257,8 @@ void EnTr_ShrinkVanish(EnTr* this, GlobalContext* globalCtx) {
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x * 0.9f);
|
||||
this->actor.shape.rot.y = (this->actor.shape.rot.y - (this->timer * 0x28F)) + 0x3D68;
|
||||
} else if (this->timer > 0) {
|
||||
temp_hi = (this->timer * 2) % 7;
|
||||
s32 temp_hi = (this->timer * 2) % 7;
|
||||
|
||||
func_80B23254(this, globalCtx, temp_hi, 5.0f, 0.2f);
|
||||
func_80B23254(this, globalCtx, (temp_hi + 1) % 7, 5.0f, 0.2f);
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x * 0.9f);
|
||||
@ -288,10 +279,8 @@ void EnTr_ShrinkVanish(EnTr* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnTr_Reappear(EnTr* this, GlobalContext* globalCtx) {
|
||||
s32 temp_hi;
|
||||
|
||||
if (this->timer >= 31) {
|
||||
temp_hi = (this->timer * 2) % 7;
|
||||
s32 temp_hi = (this->timer * 2) % 7;
|
||||
|
||||
func_80B23254(this, globalCtx, temp_hi, 5.0f, 1.0f);
|
||||
func_80B23254(this, globalCtx, (temp_hi + 1) % 7, 5.0f, 1.0f);
|
||||
@ -383,7 +372,8 @@ void EnTr_ChooseAction1(EnTr* this, GlobalContext* globalCtx) {
|
||||
EnTr_SetupAction(this, EnTr_FlyKidnapCutscene);
|
||||
Animation_PlayLoop(&this->skelAnime, &D_060049C8);
|
||||
this->animation = NULL;
|
||||
this->timer = ((this->actor.params != TR_KOUME) ? ((u8)frames << 10) + 0x8000 : (u8)frames << 10);
|
||||
this->timer =
|
||||
((this->actor.params != TR_KOUME) ? ((u8)frames * 0x400) + 0x8000 : (u8)frames * 0x400);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -452,37 +442,31 @@ void EnTr_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if ((globalCtx->csCtx.state == CS_STATE_IDLE) || (globalCtx->csCtx.npcActions[this->actionIndex] == 0)) {
|
||||
this->actor.shape.shadowDraw = NULL;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
|
||||
|
||||
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tr.c", 840);
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
|
||||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnTr_OverrideLimbDraw, NULL, this);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tr.c", 854);
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tr.c", 840);
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
|
||||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnTr_OverrideLimbDraw, NULL, this);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tr.c", 854);
|
||||
}
|
||||
}
|
||||
|
||||
f32 func_80B23FDC(GlobalContext* globalCtx, s32 actionIndex) {
|
||||
f32 phi_f2;
|
||||
|
||||
phi_f2 = func_8006F93C(globalCtx->csCtx.npcActions[actionIndex]->endFrame,
|
||||
globalCtx->csCtx.npcActions[actionIndex]->startFrame, globalCtx->csCtx.frames);
|
||||
f32 phi_f2 = func_8006F93C(globalCtx->csCtx.npcActions[actionIndex]->endFrame,
|
||||
globalCtx->csCtx.npcActions[actionIndex]->startFrame, globalCtx->csCtx.frames);
|
||||
phi_f2 = CLAMP_MAX(phi_f2, 1.0f);
|
||||
return phi_f2;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Major ordering issues, not making the three 0.1fs separate rodata, etc.
|
||||
void func_80B24038(EnTr* this, GlobalContext* globalCtx, s32 actionIndex) {
|
||||
Vec3f startPos;
|
||||
Vec3f endPos;
|
||||
Vec3f goalVel;
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f2_2;
|
||||
f32 phi_f12;
|
||||
|
||||
startPos.x = globalCtx->csCtx.npcActions[actionIndex]->startPos.x;
|
||||
@ -495,47 +479,43 @@ void func_80B24038(EnTr* this, GlobalContext* globalCtx, s32 actionIndex) {
|
||||
|
||||
temp_f0 = func_80B23FDC(globalCtx, actionIndex);
|
||||
|
||||
goalVel.x = ((((endPos.x - startPos.x) * temp_f0) + startPos.x) - this->actor.world.pos.x) * 0.1f;
|
||||
goalVel.y = ((((endPos.y - startPos.y) * temp_f0) + startPos.y) - this->actor.world.pos.y) * 0.1f;
|
||||
goalVel.z = ((((endPos.z - startPos.z) * temp_f0) + startPos.z) - this->actor.world.pos.z) * 0.1f;
|
||||
startPos.x = ((endPos.x - startPos.x) * temp_f0) + startPos.x;
|
||||
startPos.y = ((endPos.y - startPos.y) * temp_f0) + startPos.y;
|
||||
startPos.z = ((endPos.z - startPos.z) * temp_f0) + startPos.z;
|
||||
|
||||
temp_f0_2 = sqrtf(SQ(goalVel.x) + SQ(goalVel.y) + SQ(goalVel.z));
|
||||
endPos.x = (startPos.x - this->actor.world.pos.x) * 0.1f;
|
||||
endPos.y = (startPos.y - this->actor.world.pos.y) * 0.1f;
|
||||
endPos.z = (startPos.z - this->actor.world.pos.z) * 0.1f;
|
||||
|
||||
temp_f0_2 = sqrtf(SQ(endPos.x) + SQ(endPos.y) + SQ(endPos.z));
|
||||
phi_f12 = CLAMP(temp_f0_2, 0.0f, 20.0f);
|
||||
|
||||
if ((temp_f0_2 != phi_f12) && (temp_f0_2 != 0.0f)) {
|
||||
temp_f2_2 = phi_f12 / temp_f0_2;
|
||||
|
||||
goalVel.x *= temp_f2_2;
|
||||
goalVel.y *= temp_f2_2;
|
||||
goalVel.z *= temp_f2_2;
|
||||
endPos.x *= phi_f12 / temp_f0_2;
|
||||
endPos.y *= phi_f12 / temp_f0_2;
|
||||
endPos.z *= phi_f12 / temp_f0_2;
|
||||
}
|
||||
|
||||
Math_StepToF(&this->actor.velocity.x, goalVel.x, 1.0f);
|
||||
Math_StepToF(&this->actor.velocity.y, goalVel.y, 1.0f);
|
||||
Math_StepToF(&this->actor.velocity.z, goalVel.z, 1.0f);
|
||||
Math_StepToF(&this->actor.velocity.x, endPos.x, 1.0f);
|
||||
Math_StepToF(&this->actor.velocity.y, endPos.y, 1.0f);
|
||||
Math_StepToF(&this->actor.velocity.z, endPos.z, 1.0f);
|
||||
func_8002D7EC(&this->actor);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tr/func_80B24038.s")
|
||||
#endif
|
||||
|
||||
void EnTr_UpdateRotation(EnTr* this, GlobalContext* globalCtx, s32 actionIndex) {
|
||||
s16 rotY;
|
||||
s32 rotDiff;
|
||||
s16 rotY = globalCtx->csCtx.npcActions[actionIndex]->rot.y;
|
||||
s32 rotDiff = this->actor.world.rot.y - rotY;
|
||||
s32 rotSign;
|
||||
|
||||
rotY = globalCtx->csCtx.npcActions[actionIndex]->rot.y;
|
||||
rotDiff = this->actor.world.rot.y - rotY;
|
||||
|
||||
if (rotDiff < 0) {
|
||||
rotDiff = 0 - rotDiff;
|
||||
rotDiff = -rotDiff;
|
||||
rotSign = 1;
|
||||
} else {
|
||||
rotSign = -1;
|
||||
}
|
||||
|
||||
if (rotDiff >= 0x8000) {
|
||||
rotSign = 0 - rotSign;
|
||||
rotSign = -rotSign;
|
||||
rotDiff = 0x10000 - rotDiff;
|
||||
}
|
||||
|
||||
@ -551,6 +531,7 @@ void EnTr_SetStartPosRot(EnTr* this, GlobalContext* globalCtx, s32 actionIndex)
|
||||
startPos.x = globalCtx->csCtx.npcActions[actionIndex]->startPos.x;
|
||||
startPos.y = globalCtx->csCtx.npcActions[actionIndex]->startPos.y;
|
||||
startPos.z = globalCtx->csCtx.npcActions[actionIndex]->startPos.z;
|
||||
|
||||
this->actor.world.pos = startPos;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = globalCtx->csCtx.npcActions[actionIndex]->rot.y;
|
||||
}
|
||||
|
@ -75,9 +75,6 @@ unknownStruct D_80B4362C[] = {
|
||||
{ 40.0f, 120.0f, 160.0f, 777.0f },
|
||||
};
|
||||
|
||||
Vec3f D_80B4365C = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f D_80B43668 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnYabusameMark* this = THIS;
|
||||
|
||||
@ -126,20 +123,18 @@ void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc
|
||||
void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
|
||||
Vec3f effectAccel;
|
||||
Vec3f effectVelocity;
|
||||
Vec3f effectAccel = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f effectVelocity = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f arrowHitPos;
|
||||
Vec3f distanceFromCenter;
|
||||
s32 pad;
|
||||
s32 scoreIndex;
|
||||
f32 scoreDistance100;
|
||||
f32 scoreDistance60;
|
||||
f32 scoreDistance30;
|
||||
s32 scoreIndex;
|
||||
|
||||
effectAccel = D_80B4365C;
|
||||
effectVelocity = D_80B43668;
|
||||
|
||||
if (this->collider.base.acFlags & 2) {
|
||||
this->collider.base.acFlags &= ~2;
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
arrowHitPos.x = this->collider.info.bumper.hitPos.x;
|
||||
arrowHitPos.y = this->collider.info.bumper.hitPos.y;
|
||||
@ -151,13 +146,13 @@ void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
|
||||
|
||||
scoreIndex = 2;
|
||||
|
||||
distanceFromCenter.x = fabsf(D_80B435F0[this->subTypeIndex].x - arrowHitPos.x);
|
||||
distanceFromCenter.y = fabsf(D_80B435F0[this->subTypeIndex].y - arrowHitPos.y);
|
||||
distanceFromCenter.z = fabsf(D_80B435F0[this->subTypeIndex].z - arrowHitPos.z);
|
||||
|
||||
scoreDistance100 = D_80B4362C[this->typeIndex].unk_0;
|
||||
scoreDistance60 = D_80B4362C[this->typeIndex].unk_4;
|
||||
scoreDistance30 = D_80B4362C[this->typeIndex].unk_8;
|
||||
// Needs to skip a t register somewhere around here.
|
||||
distanceFromCenter.x = fabsf(D_80B435F0[this->subTypeIndex].x - arrowHitPos.x);
|
||||
distanceFromCenter.y = fabsf(D_80B435F0[this->subTypeIndex].y - arrowHitPos.y);
|
||||
distanceFromCenter.z = fabsf(D_80B435F0[this->subTypeIndex].z - arrowHitPos.z);
|
||||
|
||||
if (distanceFromCenter.x > scoreDistance100 || distanceFromCenter.y > scoreDistance100 ||
|
||||
distanceFromCenter.z > scoreDistance100) {
|
||||
@ -198,6 +193,8 @@ void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
#else
|
||||
static Vec3f D_80B4365C = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f D_80B43668 = { 0.0f, 0.0f, 0.0f };
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s")
|
||||
#endif
|
||||
|
||||
|
@ -264,16 +264,15 @@ void MirRay_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp4C;
|
||||
f32 sp4C[3];
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f2_2;
|
||||
MtxF* shieldMtx;
|
||||
s32 pad;
|
||||
Player* player = PLAYER;
|
||||
f32* new_var;
|
||||
MtxF* shieldMtx = &player->shieldMf;
|
||||
|
||||
this->reflectIntensity = 0.0f;
|
||||
shieldMtx = &player->shieldMf;
|
||||
|
||||
if (MirRay_CheckInFrustum(&this->sourcePt, &this->poolPt, shieldMtx->wx, shieldMtx->wy, shieldMtx->wz,
|
||||
this->sourceEndRad, this->poolEndRad)) {
|
||||
@ -290,16 +289,14 @@ void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
||||
if (sMirRayData[this->actor.params].params & 1) {
|
||||
this->reflectIntensity = 1.0f;
|
||||
} else {
|
||||
new_var = &sp4C.z; // permuter suggested this, does not match without
|
||||
sp4C[0] = this->poolPt.x - this->sourcePt.x;
|
||||
sp4C[1] = this->poolPt.y - this->sourcePt.y;
|
||||
sp4C[2] = this->poolPt.z - this->sourcePt.z;
|
||||
|
||||
sp4C.x = this->poolPt.x - this->sourcePt.x;
|
||||
sp4C.y = this->poolPt.y - this->sourcePt.y;
|
||||
sp4C.z = this->poolPt.z - this->sourcePt.z;
|
||||
|
||||
temp_f2_2 = ((-shieldMtx->zx * sp4C.x) - (shieldMtx->zy * sp4C.y)) - (shieldMtx->zz * (*new_var));
|
||||
temp_f2_2 = -shieldMtx->zx * sp4C[0] - shieldMtx->zy * sp4C[1] - shieldMtx->zz * sp4C[2];
|
||||
|
||||
if (temp_f2_2 < 0.0f) {
|
||||
temp_f0_2 = sqrtf(SQ(sp4C.x) + SQ(sp4C.y) + SQ(*new_var));
|
||||
temp_f0_2 = sqrtf(SQ(sp4C[0]) + SQ(sp4C[1]) + SQ(sp4C[2]));
|
||||
if ((temp_f0 != 0.0f) && (temp_f0_2 != 0.0f)) {
|
||||
this->reflectIntensity = -temp_f2_2 / (temp_f0 * temp_f0_2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user