1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-28 19:25:27 +00:00

En_Light OK (#332)

* fix colliderinit typo

* en_light OK

* format

* remove asm

* cleanup

* pr review

* no U

* few changes
This commit is contained in:
fig02 2020-08-19 22:57:31 -04:00 committed by GitHub
parent c25b87923e
commit 296b20e925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 189 additions and 985 deletions

View file

@ -1,14 +0,0 @@
glabel EnLight_Destroy
/* 001E0 80A9DD20 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 001E4 80A9DD24 AFA40018 */ sw $a0, 0x0018($sp)
/* 001E8 80A9DD28 8FAE0018 */ lw $t6, 0x0018($sp)
/* 001EC 80A9DD2C AFBF0014 */ sw $ra, 0x0014($sp)
/* 001F0 80A9DD30 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 001F4 80A9DD34 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8
/* 001F8 80A9DD38 0C01E9F1 */ jal Lights_Remove
/* 001FC 80A9DD3C 8DC60150 */ lw $a2, 0x0150($t6) ## 00000150
/* 00200 80A9DD40 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00204 80A9DD44 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00208 80A9DD48 03E00008 */ jr $ra
/* 0020C 80A9DD4C 00000000 */ nop

View file

@ -1,246 +0,0 @@
.rdata
glabel D_80A9E8C0
.asciz "../z_en_light.c"
.balign 4
glabel D_80A9E8D0
.asciz "../z_en_light.c"
.balign 4
glabel D_80A9E8E0
.asciz "../z_en_light.c"
.balign 4
.late_rodata
glabel D_80A9E910
.float 9.58738019108e-05
glabel D_80A9E914
.float 3.14159274101
.text
glabel EnLight_Draw
/* 0096C 80A9E4AC 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70
/* 00970 80A9E4B0 AFBF003C */ sw $ra, 0x003C($sp)
/* 00974 80A9E4B4 AFB00038 */ sw $s0, 0x0038($sp)
/* 00978 80A9E4B8 AFA40090 */ sw $a0, 0x0090($sp)
/* 0097C 80A9E4BC AFA50094 */ sw $a1, 0x0094($sp)
/* 00980 80A9E4C0 848F001C */ lh $t7, 0x001C($a0) ## 0000001C
/* 00984 80A9E4C4 3C0A80AA */ lui $t2, %hi(D_80A9E840) ## $t2 = 80AA0000
/* 00988 80A9E4C8 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 0098C 80A9E4CC 31F8000F */ andi $t8, $t7, 0x000F ## $t8 = 00000000
/* 00990 80A9E4D0 0018C8C0 */ sll $t9, $t8, 3
/* 00994 80A9E4D4 254AE840 */ addiu $t2, $t2, %lo(D_80A9E840) ## $t2 = 80A9E840
/* 00998 80A9E4D8 032A4021 */ addu $t0, $t9, $t2
/* 0099C 80A9E4DC 3C0680AA */ lui $a2, %hi(D_80A9E8C0) ## $a2 = 80AA0000
/* 009A0 80A9E4E0 24C6E8C0 */ addiu $a2, $a2, %lo(D_80A9E8C0) ## $a2 = 80A9E8C0
/* 009A4 80A9E4E4 AFA80084 */ sw $t0, 0x0084($sp)
/* 009A8 80A9E4E8 27A4006C */ addiu $a0, $sp, 0x006C ## $a0 = FFFFFFDC
/* 009AC 80A9E4EC 240701B9 */ addiu $a3, $zero, 0x01B9 ## $a3 = 000001B9
/* 009B0 80A9E4F0 0C031AB1 */ jal Graph_OpenDisps
/* 009B4 80A9E4F4 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 009B8 80A9E4F8 8FAC0094 */ lw $t4, 0x0094($sp)
/* 009BC 80A9E4FC 0C024F61 */ jal func_80093D84
/* 009C0 80A9E500 8D840000 */ lw $a0, 0x0000($t4) ## 00000000
/* 009C4 80A9E504 8FA90090 */ lw $t1, 0x0090($sp)
/* 009C8 80A9E508 3C18DB06 */ lui $t8, 0xDB06 ## $t8 = DB060000
/* 009CC 80A9E50C 8FA80084 */ lw $t0, 0x0084($sp)
/* 009D0 80A9E510 852D001C */ lh $t5, 0x001C($t1) ## 0000001C
/* 009D4 80A9E514 37180020 */ ori $t8, $t8, 0x0020 ## $t8 = DB060020
/* 009D8 80A9E518 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 009DC 80A9E51C 05A00047 */ bltz $t5, .L80A9E63C
/* 009E0 80A9E520 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 009E4 80A9E524 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 009E8 80A9E528 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000
/* 009EC 80A9E52C 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020
/* 009F0 80A9E530 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 009F4 80A9E534 AE0E02D0 */ sw $t6, 0x02D0($s0) ## 000002D0
/* 009F8 80A9E538 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 009FC 80A9E53C 8FB80094 */ lw $t8, 0x0094($sp)
/* 00A00 80A9E540 24190020 */ addiu $t9, $zero, 0x0020 ## $t9 = 00000020
/* 00A04 80A9E544 240A0040 */ addiu $t2, $zero, 0x0040 ## $t2 = 00000040
/* 00A08 80A9E548 8F040000 */ lw $a0, 0x0000($t8) ## DB060020
/* 00A0C 80A9E54C 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
/* 00A10 80A9E550 AFAB0018 */ sw $t3, 0x0018($sp)
/* 00A14 80A9E554 AFA0001C */ sw $zero, 0x001C($sp)
/* 00A18 80A9E558 AFAA0014 */ sw $t2, 0x0014($sp)
/* 00A1C 80A9E55C AFB90010 */ sw $t9, 0x0010($sp)
/* 00A20 80A9E560 912C014C */ lbu $t4, 0x014C($t1) ## 0000014C
/* 00A24 80A9E564 24180080 */ addiu $t8, $zero, 0x0080 ## $t8 = 00000080
/* 00A28 80A9E568 240F0020 */ addiu $t7, $zero, 0x0020 ## $t7 = 00000020
/* 00A2C 80A9E56C 000C0823 */ subu $at, $zero, $t4
/* 00A30 80A9E570 00016880 */ sll $t5, $at, 2
/* 00A34 80A9E574 01A16821 */ addu $t5, $t5, $at
/* 00A38 80A9E578 000D6880 */ sll $t5, $t5, 2
/* 00A3C 80A9E57C 31AE01FF */ andi $t6, $t5, 0x01FF ## $t6 = 00000000
/* 00A40 80A9E580 AFAE0020 */ sw $t6, 0x0020($sp)
/* 00A44 80A9E584 AFAF0024 */ sw $t7, 0x0024($sp)
/* 00A48 80A9E588 AFB80028 */ sw $t8, 0x0028($sp)
/* 00A4C 80A9E58C AFA80084 */ sw $t0, 0x0084($sp)
/* 00A50 80A9E590 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00A54 80A9E594 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 00A58 80A9E598 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 00A5C 80A9E59C 0C0253D0 */ jal Gfx_TwoTexScroll
/* 00A60 80A9E5A0 AFA20068 */ sw $v0, 0x0068($sp)
/* 00A64 80A9E5A4 8FA30068 */ lw $v1, 0x0068($sp)
/* 00A68 80A9E5A8 8FA80084 */ lw $t0, 0x0084($sp)
/* 00A6C 80A9E5AC 3C190405 */ lui $t9, 0x0405 ## $t9 = 04050000
/* 00A70 80A9E5B0 2739D4E0 */ addiu $t9, $t9, 0xD4E0 ## $t9 = 0404D4E0
/* 00A74 80A9E5B4 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00A78 80A9E5B8 AFB90080 */ sw $t9, 0x0080($sp)
/* 00A7C 80A9E5BC 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00A80 80A9E5C0 3C0BFA00 */ lui $t3, 0xFA00 ## $t3 = FA000000
/* 00A84 80A9E5C4 356B8080 */ ori $t3, $t3, 0x8080 ## $t3 = FA008080
/* 00A88 80A9E5C8 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008
/* 00A8C 80A9E5CC AE0A02D0 */ sw $t2, 0x02D0($s0) ## 000002D0
/* 00A90 80A9E5D0 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000
/* 00A94 80A9E5D4 91180001 */ lbu $t8, 0x0001($t0) ## 00000001
/* 00A98 80A9E5D8 910D0000 */ lbu $t5, 0x0000($t0) ## 00000000
/* 00A9C 80A9E5DC 910C0002 */ lbu $t4, 0x0002($t0) ## 00000002
/* 00AA0 80A9E5E0 0018CC00 */ sll $t9, $t8, 16
/* 00AA4 80A9E5E4 000D7600 */ sll $t6, $t5, 24
/* 00AA8 80A9E5E8 01D95025 */ or $t2, $t6, $t9 ## $t2 = 0404D4E0
/* 00AAC 80A9E5EC 910E0003 */ lbu $t6, 0x0003($t0) ## 00000003
/* 00AB0 80A9E5F0 000C6A00 */ sll $t5, $t4, 8
/* 00AB4 80A9E5F4 014D7825 */ or $t7, $t2, $t5 ## $t7 = 0404D4E0
/* 00AB8 80A9E5F8 01EEC825 */ or $t9, $t7, $t6 ## $t9 = 0404D4E0
/* 00ABC 80A9E5FC AC590004 */ sw $t9, 0x0004($v0) ## 00000004
/* 00AC0 80A9E600 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00AC4 80A9E604 3C0CFB00 */ lui $t4, 0xFB00 ## $t4 = FB000000
/* 00AC8 80A9E608 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 00ACC 80A9E60C AE0B02D0 */ sw $t3, 0x02D0($s0) ## 000002D0
/* 00AD0 80A9E610 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 00AD4 80A9E614 910D0004 */ lbu $t5, 0x0004($t0) ## 00000004
/* 00AD8 80A9E618 910E0005 */ lbu $t6, 0x0005($t0) ## 00000005
/* 00ADC 80A9E61C 910A0006 */ lbu $t2, 0x0006($t0) ## 00000006
/* 00AE0 80A9E620 000DC600 */ sll $t8, $t5, 24
/* 00AE4 80A9E624 000ECC00 */ sll $t9, $t6, 16
/* 00AE8 80A9E628 03195825 */ or $t3, $t8, $t9 ## $t3 = 0404D4E0
/* 00AEC 80A9E62C 000A6A00 */ sll $t5, $t2, 8
/* 00AF0 80A9E630 016D7825 */ or $t7, $t3, $t5 ## $t7 = 0404D4E0
/* 00AF4 80A9E634 10000032 */ beq $zero, $zero, .L80A9E700
/* 00AF8 80A9E638 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
.L80A9E63C:
/* 00AFC 80A9E63C 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00B00 80A9E640 240C0010 */ addiu $t4, $zero, 0x0010 ## $t4 = 00000010
/* 00B04 80A9E644 240A0020 */ addiu $t2, $zero, 0x0020 ## $t2 = 00000020
/* 00B08 80A9E648 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 00B0C 80A9E64C AE0E02D0 */ sw $t6, 0x02D0($s0) ## 000002D0
/* 00B10 80A9E650 AC580000 */ sw $t8, 0x0000($v0) ## 00000000
/* 00B14 80A9E654 8FB90094 */ lw $t9, 0x0094($sp)
/* 00B18 80A9E658 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
/* 00B1C 80A9E65C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 00B20 80A9E660 8F240000 */ lw $a0, 0x0000($t9) ## 0404D4E0
/* 00B24 80A9E664 AFAB0018 */ sw $t3, 0x0018($sp)
/* 00B28 80A9E668 AFAA0014 */ sw $t2, 0x0014($sp)
/* 00B2C 80A9E66C AFAC0010 */ sw $t4, 0x0010($sp)
/* 00B30 80A9E670 9123014C */ lbu $v1, 0x014C($t1) ## 0000014C
/* 00B34 80A9E674 240C0020 */ addiu $t4, $zero, 0x0020 ## $t4 = 00000020
/* 00B38 80A9E678 24190010 */ addiu $t9, $zero, 0x0010 ## $t9 = 00000010
/* 00B3C 80A9E67C 00030823 */ subu $at, $zero, $v1
/* 00B40 80A9E680 00017080 */ sll $t6, $at, 2
/* 00B44 80A9E684 01C17023 */ subu $t6, $t6, $at
/* 00B48 80A9E688 000E7040 */ sll $t6, $t6, 1
/* 00B4C 80A9E68C 00036840 */ sll $t5, $v1, 1
/* 00B50 80A9E690 31AF003F */ andi $t7, $t5, 0x003F ## $t7 = 00000000
/* 00B54 80A9E694 31D8007F */ andi $t8, $t6, 0x007F ## $t8 = 00000008
/* 00B58 80A9E698 AFB80020 */ sw $t8, 0x0020($sp)
/* 00B5C 80A9E69C AFAF001C */ sw $t7, 0x001C($sp)
/* 00B60 80A9E6A0 AFB90024 */ sw $t9, 0x0024($sp)
/* 00B64 80A9E6A4 AFAC0028 */ sw $t4, 0x0028($sp)
/* 00B68 80A9E6A8 0C0253D0 */ jal Gfx_TwoTexScroll
/* 00B6C 80A9E6AC AFA2005C */ sw $v0, 0x005C($sp)
/* 00B70 80A9E6B0 8FA8005C */ lw $t0, 0x005C($sp)
/* 00B74 80A9E6B4 3C0A0500 */ lui $t2, 0x0500 ## $t2 = 05000000
/* 00B78 80A9E6B8 254A0440 */ addiu $t2, $t2, 0x0440 ## $t2 = 05000440
/* 00B7C 80A9E6BC AD020004 */ sw $v0, 0x0004($t0) ## 00000004
/* 00B80 80A9E6C0 AFAA0080 */ sw $t2, 0x0080($sp)
/* 00B84 80A9E6C4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00B88 80A9E6C8 3C0DFA00 */ lui $t5, 0xFA00 ## $t5 = FA000000
/* 00B8C 80A9E6CC 35ADC0C0 */ ori $t5, $t5, 0xC0C0 ## $t5 = FA00C0C0
/* 00B90 80A9E6D0 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 00B94 80A9E6D4 AE0B02D0 */ sw $t3, 0x02D0($s0) ## 000002D0
/* 00B98 80A9E6D8 3C0FFFC8 */ lui $t7, 0xFFC8 ## $t7 = FFC80000
/* 00B9C 80A9E6DC AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 00BA0 80A9E6E0 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
/* 00BA4 80A9E6E4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00BA8 80A9E6E8 3C18FB00 */ lui $t8, 0xFB00 ## $t8 = FB000000
/* 00BAC 80A9E6EC 3C19FF00 */ lui $t9, 0xFF00 ## $t9 = FF000000
/* 00BB0 80A9E6F0 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 00BB4 80A9E6F4 AE0E02D0 */ sw $t6, 0x02D0($s0) ## 000002D0
/* 00BB8 80A9E6F8 AC590004 */ sw $t9, 0x0004($v0) ## 00000004
/* 00BBC 80A9E6FC AC580000 */ sw $t8, 0x0000($v0) ## 00000000
.L80A9E700:
/* 00BC0 80A9E700 8FA20094 */ lw $v0, 0x0094($sp)
/* 00BC4 80A9E704 844C07A0 */ lh $t4, 0x07A0($v0) ## 000007A0
/* 00BC8 80A9E708 000C5080 */ sll $t2, $t4, 2
/* 00BCC 80A9E70C 004A5821 */ addu $t3, $v0, $t2
/* 00BD0 80A9E710 0C016A7D */ jal func_8005A9F4
/* 00BD4 80A9E714 8D640790 */ lw $a0, 0x0790($t3) ## 00000798
/* 00BD8 80A9E718 8FAD0090 */ lw $t5, 0x0090($sp)
/* 00BDC 80A9E71C 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
/* 00BE0 80A9E720 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00BE4 80A9E724 85AF00B6 */ lh $t7, 0x00B6($t5) ## 000000B6
/* 00BE8 80A9E728 004F7023 */ subu $t6, $v0, $t7
/* 00BEC 80A9E72C 01C1C021 */ addu $t8, $t6, $at
/* 00BF0 80A9E730 0018CC00 */ sll $t9, $t8, 16
/* 00BF4 80A9E734 00196403 */ sra $t4, $t9, 16
/* 00BF8 80A9E738 448C2000 */ mtc1 $t4, $f4 ## $f4 = 0.00
/* 00BFC 80A9E73C 3C0180AA */ lui $at, %hi(D_80A9E910) ## $at = 80AA0000
/* 00C00 80A9E740 C428E910 */ lwc1 $f8, %lo(D_80A9E910)($at)
/* 00C04 80A9E744 468021A0 */ cvt.s.w $f6, $f4
/* 00C08 80A9E748 46083302 */ mul.s $f12, $f6, $f8
/* 00C0C 80A9E74C 0C034348 */ jal Matrix_RotateY
/* 00C10 80A9E750 00000000 */ nop
/* 00C14 80A9E754 8FAA0090 */ lw $t2, 0x0090($sp)
/* 00C18 80A9E758 3C0180AA */ lui $at, %hi(D_80A9E914) ## $at = 80AA0000
/* 00C1C 80A9E75C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00C20 80A9E760 854B001C */ lh $t3, 0x001C($t2) ## 0000001C
/* 00C24 80A9E764 316D0001 */ andi $t5, $t3, 0x0001 ## $t5 = 00000000
/* 00C28 80A9E768 51A00004 */ beql $t5, $zero, .L80A9E77C
/* 00C2C 80A9E76C 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00C30 80A9E770 0C034348 */ jal Matrix_RotateY
/* 00C34 80A9E774 C42CE914 */ lwc1 $f12, %lo(D_80A9E914)($at)
/* 00C38 80A9E778 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
.L80A9E77C:
/* 00C3C 80A9E77C 44816000 */ mtc1 $at, $f12 ## $f12 = 1.00
/* 00C40 80A9E780 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00C44 80A9E784 44066000 */ mfc1 $a2, $f12
/* 00C48 80A9E788 0C0342A3 */ jal Matrix_Scale
/* 00C4C 80A9E78C 46006386 */ mov.s $f14, $f12
/* 00C50 80A9E790 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00C54 80A9E794 3C0EDA38 */ lui $t6, 0xDA38 ## $t6 = DA380000
/* 00C58 80A9E798 35CE0003 */ ori $t6, $t6, 0x0003 ## $t6 = DA380003
/* 00C5C 80A9E79C 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008
/* 00C60 80A9E7A0 AE0F02D0 */ sw $t7, 0x02D0($s0) ## 000002D0
/* 00C64 80A9E7A4 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
/* 00C68 80A9E7A8 8FB80094 */ lw $t8, 0x0094($sp)
/* 00C6C 80A9E7AC 3C0580AA */ lui $a1, %hi(D_80A9E8D0) ## $a1 = 80AA0000
/* 00C70 80A9E7B0 24A5E8D0 */ addiu $a1, $a1, %lo(D_80A9E8D0) ## $a1 = 80A9E8D0
/* 00C74 80A9E7B4 8F040000 */ lw $a0, 0x0000($t8) ## 00000000
/* 00C78 80A9E7B8 240601E8 */ addiu $a2, $zero, 0x01E8 ## $a2 = 000001E8
/* 00C7C 80A9E7BC 0C0346A2 */ jal Matrix_NewMtx
/* 00C80 80A9E7C0 AFA20050 */ sw $v0, 0x0050($sp)
/* 00C84 80A9E7C4 8FA30050 */ lw $v1, 0x0050($sp)
/* 00C88 80A9E7C8 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000
/* 00C8C 80A9E7CC 3C0680AA */ lui $a2, %hi(D_80A9E8E0) ## $a2 = 80AA0000
/* 00C90 80A9E7D0 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00C94 80A9E7D4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00C98 80A9E7D8 24C6E8E0 */ addiu $a2, $a2, %lo(D_80A9E8E0) ## $a2 = 80A9E8E0
/* 00C9C 80A9E7DC 27A4006C */ addiu $a0, $sp, 0x006C ## $a0 = FFFFFFDC
/* 00CA0 80A9E7E0 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
/* 00CA4 80A9E7E4 AE1902D0 */ sw $t9, 0x02D0($s0) ## 000002D0
/* 00CA8 80A9E7E8 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 00CAC 80A9E7EC 8FAA0080 */ lw $t2, 0x0080($sp)
/* 00CB0 80A9E7F0 240701EB */ addiu $a3, $zero, 0x01EB ## $a3 = 000001EB
/* 00CB4 80A9E7F4 AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004
/* 00CB8 80A9E7F8 8FAB0094 */ lw $t3, 0x0094($sp)
/* 00CBC 80A9E7FC 0C031AD5 */ jal Graph_CloseDisps
/* 00CC0 80A9E800 8D650000 */ lw $a1, 0x0000($t3) ## 00000000
/* 00CC4 80A9E804 8FBF003C */ lw $ra, 0x003C($sp)
/* 00CC8 80A9E808 8FB00038 */ lw $s0, 0x0038($sp)
/* 00CCC 80A9E80C 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000
/* 00CD0 80A9E810 03E00008 */ jr $ra
/* 00CD4 80A9E814 00000000 */ nop
/* 00CD8 80A9E818 00000000 */ nop
/* 00CDC 80A9E81C 00000000 */ nop

View file

@ -1,139 +0,0 @@
.late_rodata
glabel D_80A9E8F0
.word 0x38D1B717, 0x00000000
.text
glabel EnLight_Init
/* 00000 80A9DB40 3C0E8016 */ lui $t6, %hi(gSaveContext+0x135c)
/* 00004 80A9DB44 8DCEF9BC */ lw $t6, %lo(gSaveContext+0x135c)($t6)
/* 00008 80A9DB48 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 0000C 80A9DB4C AFB00024 */ sw $s0, 0x0024($sp)
/* 00010 80A9DB50 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 00014 80A9DB54 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00018 80A9DB58 AFBF002C */ sw $ra, 0x002C($sp)
/* 0001C 80A9DB5C AFB10028 */ sw $s1, 0x0028($sp)
/* 00020 80A9DB60 15C10023 */ bne $t6, $at, .L80A9DBF0
/* 00024 80A9DB64 AFA50034 */ sw $a1, 0x0034($sp)
/* 00028 80A9DB68 848F001C */ lh $t7, 0x001C($a0) ## 0000001C
/* 0002C 80A9DB6C 26110154 */ addiu $s1, $s0, 0x0154 ## $s1 = 00000154
/* 00030 80A9DB70 02202025 */ or $a0, $s1, $zero ## $a0 = 00000154
/* 00034 80A9DB74 05E10003 */ bgez $t7, .L80A9DB84
/* 00038 80A9DB78 240C00FF */ addiu $t4, $zero, 0x00FF ## $t4 = 000000FF
/* 0003C 80A9DB7C 10000002 */ beq $zero, $zero, .L80A9DB88
/* 00040 80A9DB80 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L80A9DB84:
/* 00044 80A9DB84 24020028 */ addiu $v0, $zero, 0x0028 ## $v0 = 00000028
.L80A9DB88:
/* 00048 80A9DB88 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028
/* 0004C 80A9DB8C C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 00050 80A9DB90 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 00054 80A9DB94 4600428D */ trunc.w.s $f10, $f8
/* 00058 80A9DB98 240D00FF */ addiu $t5, $zero, 0x00FF ## $t5 = 000000FF
/* 0005C 80A9DB9C 240E00B4 */ addiu $t6, $zero, 0x00B4 ## $t6 = 000000B4
/* 00060 80A9DBA0 4600218D */ trunc.w.s $f6, $f4
/* 00064 80A9DBA4 440A5000 */ mfc1 $t2, $f10
/* 00068 80A9DBA8 240FFFFF */ addiu $t7, $zero, 0xFFFF ## $t7 = FFFFFFFF
/* 0006C 80A9DBAC 4600848D */ trunc.w.s $f18, $f16
/* 00070 80A9DBB0 44053000 */ mfc1 $a1, $f6
/* 00074 80A9DBB4 004A3021 */ addu $a2, $v0, $t2
/* 00078 80A9DBB8 00063400 */ sll $a2, $a2, 16
/* 0007C 80A9DBBC 44079000 */ mfc1 $a3, $f18
/* 00080 80A9DBC0 00052C00 */ sll $a1, $a1, 16
/* 00084 80A9DBC4 00052C03 */ sra $a1, $a1, 16
/* 00088 80A9DBC8 00073C00 */ sll $a3, $a3, 16
/* 0008C 80A9DBCC 00073C03 */ sra $a3, $a3, 16
/* 00090 80A9DBD0 00063403 */ sra $a2, $a2, 16
/* 00094 80A9DBD4 AFAF001C */ sw $t7, 0x001C($sp)
/* 00098 80A9DBD8 AFAE0018 */ sw $t6, 0x0018($sp)
/* 0009C 80A9DBDC AFAD0014 */ sw $t5, 0x0014($sp)
/* 000A0 80A9DBE0 0C01E763 */ jal Lights_InitType0PositionalLight
/* 000A4 80A9DBE4 AFAC0010 */ sw $t4, 0x0010($sp)
/* 000A8 80A9DBE8 10000022 */ beq $zero, $zero, .L80A9DC74
/* 000AC 80A9DBEC 8FA40034 */ lw $a0, 0x0034($sp)
.L80A9DBF0:
/* 000B0 80A9DBF0 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
/* 000B4 80A9DBF4 26110154 */ addiu $s1, $s0, 0x0154 ## $s1 = 00000154
/* 000B8 80A9DBF8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000154
/* 000BC 80A9DBFC 07010003 */ bgez $t8, .L80A9DC0C
/* 000C0 80A9DC00 240D00FF */ addiu $t5, $zero, 0x00FF ## $t5 = 000000FF
/* 000C4 80A9DC04 10000002 */ beq $zero, $zero, .L80A9DC10
/* 000C8 80A9DC08 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L80A9DC0C:
/* 000CC 80A9DC0C 24020028 */ addiu $v0, $zero, 0x0028 ## $v0 = 00000028
.L80A9DC10:
/* 000D0 80A9DC10 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028
/* 000D4 80A9DC14 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 000D8 80A9DC18 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 000DC 80A9DC1C 4600428D */ trunc.w.s $f10, $f8
/* 000E0 80A9DC20 240E00FF */ addiu $t6, $zero, 0x00FF ## $t6 = 000000FF
/* 000E4 80A9DC24 240F00B4 */ addiu $t7, $zero, 0x00B4 ## $t7 = 000000B4
/* 000E8 80A9DC28 4600218D */ trunc.w.s $f6, $f4
/* 000EC 80A9DC2C 440B5000 */ mfc1 $t3, $f10
/* 000F0 80A9DC30 2418FFFF */ addiu $t8, $zero, 0xFFFF ## $t8 = FFFFFFFF
/* 000F4 80A9DC34 4600848D */ trunc.w.s $f18, $f16
/* 000F8 80A9DC38 44053000 */ mfc1 $a1, $f6
/* 000FC 80A9DC3C 004B3021 */ addu $a2, $v0, $t3
/* 00100 80A9DC40 00063400 */ sll $a2, $a2, 16
/* 00104 80A9DC44 44079000 */ mfc1 $a3, $f18
/* 00108 80A9DC48 00052C00 */ sll $a1, $a1, 16
/* 0010C 80A9DC4C 00052C03 */ sra $a1, $a1, 16
/* 00110 80A9DC50 00073C00 */ sll $a3, $a3, 16
/* 00114 80A9DC54 00073C03 */ sra $a3, $a3, 16
/* 00118 80A9DC58 00063403 */ sra $a2, $a2, 16
/* 0011C 80A9DC5C AFB8001C */ sw $t8, 0x001C($sp)
/* 00120 80A9DC60 AFAF0018 */ sw $t7, 0x0018($sp)
/* 00124 80A9DC64 AFAE0014 */ sw $t6, 0x0014($sp)
/* 00128 80A9DC68 0C01E77C */ jal Lights_InitType2PositionalLight
/* 0012C 80A9DC6C AFAD0010 */ sw $t5, 0x0010($sp)
/* 00130 80A9DC70 8FA40034 */ lw $a0, 0x0034($sp)
.L80A9DC74:
/* 00134 80A9DC74 02203025 */ or $a2, $s1, $zero ## $a2 = 00000154
/* 00138 80A9DC78 0C01E9D9 */ jal Lights_Insert
/* 0013C 80A9DC7C 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8
/* 00140 80A9DC80 8608001C */ lh $t0, 0x001C($s0) ## 0000001C
/* 00144 80A9DC84 3C0B80AA */ lui $t3, %hi(D_80A9E847) ## $t3 = 80AA0000
/* 00148 80A9DC88 AE020150 */ sw $v0, 0x0150($s0) ## 00000150
/* 0014C 80A9DC8C 3109000F */ andi $t1, $t0, 0x000F ## $t1 = 00000000
/* 00150 80A9DC90 000950C0 */ sll $t2, $t1, 3
/* 00154 80A9DC94 016A5821 */ addu $t3, $t3, $t2
/* 00158 80A9DC98 916BE847 */ lbu $t3, %lo(D_80A9E847)($t3)
/* 0015C 80A9DC9C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00160 80A9DCA0 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00164 80A9DCA4 448B2000 */ mtc1 $t3, $f4 ## $f4 = -0.00
/* 00168 80A9DCA8 05610004 */ bgez $t3, .L80A9DCBC
/* 0016C 80A9DCAC 468021A0 */ cvt.s.w $f6, $f4
/* 00170 80A9DCB0 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00
/* 00174 80A9DCB4 00000000 */ nop
/* 00178 80A9DCB8 46083180 */ add.s $f6, $f6, $f8
.L80A9DCBC:
/* 0017C 80A9DCBC 3C0180AA */ lui $at, %hi(D_80A9E8F0) ## $at = 80AA0000
/* 00180 80A9DCC0 C42AE8F0 */ lwc1 $f10, %lo(D_80A9E8F0)($at)
/* 00184 80A9DCC4 460A3402 */ mul.s $f16, $f6, $f10
/* 00188 80A9DCC8 44058000 */ mfc1 $a1, $f16
/* 0018C 80A9DCCC 0C00B58B */ jal Actor_SetScale
/* 00190 80A9DCD0 00000000 */ nop
/* 00194 80A9DCD4 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00198 80A9DCD8 00000000 */ nop
/* 0019C 80A9DCDC 3C01437F */ lui $at, 0x437F ## $at = 437F0000
/* 001A0 80A9DCE0 44819000 */ mtc1 $at, $f18 ## $f18 = 255.00
/* 001A4 80A9DCE4 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 001A8 80A9DCE8 3C1880AA */ lui $t8, %hi(func_80A9E074) ## $t8 = 80AA0000
/* 001AC 80A9DCEC 46120102 */ mul.s $f4, $f0, $f18
/* 001B0 80A9DCF0 31CF0400 */ andi $t7, $t6, 0x0400 ## $t7 = 00000000
/* 001B4 80A9DCF4 2718E074 */ addiu $t8, $t8, %lo(func_80A9E074) ## $t8 = 80A9E074
/* 001B8 80A9DCF8 4600220D */ trunc.w.s $f8, $f4
/* 001BC 80A9DCFC 440D4000 */ mfc1 $t5, $f8
/* 001C0 80A9DD00 11E00002 */ beq $t7, $zero, .L80A9DD0C
/* 001C4 80A9DD04 A20D014C */ sb $t5, 0x014C($s0) ## 0000014C
/* 001C8 80A9DD08 AE180130 */ sw $t8, 0x0130($s0) ## 00000130
.L80A9DD0C:
/* 001CC 80A9DD0C 8FBF002C */ lw $ra, 0x002C($sp)
/* 001D0 80A9DD10 8FB00024 */ lw $s0, 0x0024($sp)
/* 001D4 80A9DD14 8FB10028 */ lw $s1, 0x0028($sp)
/* 001D8 80A9DD18 03E00008 */ jr $ra
/* 001DC 80A9DD1C 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000

View file

@ -1,187 +0,0 @@
glabel EnLight_Update
/* 00290 80A9DDD0 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 00294 80A9DDD4 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00298 80A9DDD8 AFB00020 */ sw $s0, 0x0020($sp)
/* 0029C 80A9DDDC AFA50034 */ sw $a1, 0x0034($sp)
/* 002A0 80A9DDE0 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 002A4 80A9DDE4 3C1980AA */ lui $t9, %hi(D_80A9E840) ## $t9 = 80AA0000
/* 002A8 80A9DDE8 2739E840 */ addiu $t9, $t9, %lo(D_80A9E840) ## $t9 = 80A9E840
/* 002AC 80A9DDEC 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 002B0 80A9DDF0 000FC0C0 */ sll $t8, $t7, 3
/* 002B4 80A9DDF4 03191021 */ addu $v0, $t8, $t9
/* 002B8 80A9DDF8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 002BC 80A9DDFC 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 002C0 80A9DE00 AFA20028 */ sw $v0, 0x0028($sp)
/* 002C4 80A9DE04 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 002C8 80A9DE08 44816000 */ mtc1 $at, $f12 ## $f12 = 0.50
/* 002CC 80A9DE0C 8608001C */ lh $t0, 0x001C($s0) ## 0000001C
/* 002D0 80A9DE10 8FA20028 */ lw $v0, 0x0028($sp)
/* 002D4 80A9DE14 460C0102 */ mul.s $f4, $f0, $f12
/* 002D8 80A9DE18 2403012C */ addiu $v1, $zero, 0x012C ## $v1 = 0000012C
/* 002DC 80A9DE1C 05010003 */ bgez $t0, .L80A9DE2C
/* 002E0 80A9DE20 460C2080 */ add.s $f2, $f4, $f12
/* 002E4 80A9DE24 10000001 */ beq $zero, $zero, .L80A9DE2C
/* 002E8 80A9DE28 24030064 */ addiu $v1, $zero, 0x0064 ## $v1 = 00000064
.L80A9DE2C:
/* 002EC 80A9DE2C 90490000 */ lbu $t1, 0x0000($v0) ## 00000000
/* 002F0 80A9DE30 26040154 */ addiu $a0, $s0, 0x0154 ## $a0 = 00000154
/* 002F4 80A9DE34 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 002F8 80A9DE38 44893000 */ mtc1 $t1, $f6 ## $f6 = 0.00
/* 002FC 80A9DE3C 05210004 */ bgez $t1, .L80A9DE50
/* 00300 80A9DE40 46803220 */ cvt.s.w $f8, $f6
/* 00304 80A9DE44 44815000 */ mtc1 $at, $f10 ## $f10 = 4294967296.00
/* 00308 80A9DE48 00000000 */ nop
/* 0030C 80A9DE4C 460A4200 */ add.s $f8, $f8, $f10
.L80A9DE50:
/* 00310 80A9DE50 46024402 */ mul.s $f16, $f8, $f2
/* 00314 80A9DE54 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00318 80A9DE58 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 0031C 80A9DE5C 444AF800 */ cfc1 $t2, $31
/* 00320 80A9DE60 44C5F800 */ ctc1 $a1, $31
/* 00324 80A9DE64 00000000 */ nop
/* 00328 80A9DE68 460084A4 */ cvt.w.s $f18, $f16
/* 0032C 80A9DE6C 4445F800 */ cfc1 $a1, $31
/* 00330 80A9DE70 00000000 */ nop
/* 00334 80A9DE74 30A50078 */ andi $a1, $a1, 0x0078 ## $a1 = 00000000
/* 00338 80A9DE78 50A00013 */ beql $a1, $zero, .L80A9DEC8
/* 0033C 80A9DE7C 44059000 */ mfc1 $a1, $f18
/* 00340 80A9DE80 44819000 */ mtc1 $at, $f18 ## $f18 = 2147483648.00
/* 00344 80A9DE84 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00348 80A9DE88 46128481 */ sub.s $f18, $f16, $f18
/* 0034C 80A9DE8C 44C5F800 */ ctc1 $a1, $31
/* 00350 80A9DE90 00000000 */ nop
/* 00354 80A9DE94 460094A4 */ cvt.w.s $f18, $f18
/* 00358 80A9DE98 4445F800 */ cfc1 $a1, $31
/* 0035C 80A9DE9C 00000000 */ nop
/* 00360 80A9DEA0 30A50078 */ andi $a1, $a1, 0x0078 ## $a1 = 00000000
/* 00364 80A9DEA4 14A00005 */ bne $a1, $zero, .L80A9DEBC
/* 00368 80A9DEA8 00000000 */ nop
/* 0036C 80A9DEAC 44059000 */ mfc1 $a1, $f18
/* 00370 80A9DEB0 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 00374 80A9DEB4 10000007 */ beq $zero, $zero, .L80A9DED4
/* 00378 80A9DEB8 00A12825 */ or $a1, $a1, $at ## $a1 = 80000000
.L80A9DEBC:
/* 0037C 80A9DEBC 10000005 */ beq $zero, $zero, .L80A9DED4
/* 00380 80A9DEC0 2405FFFF */ addiu $a1, $zero, 0xFFFF ## $a1 = FFFFFFFF
/* 00384 80A9DEC4 44059000 */ mfc1 $a1, $f18
.L80A9DEC8:
/* 00388 80A9DEC8 00000000 */ nop
/* 0038C 80A9DECC 04A0FFFB */ bltz $a1, .L80A9DEBC
/* 00390 80A9DED0 00000000 */ nop
.L80A9DED4:
/* 00394 80A9DED4 904B0001 */ lbu $t3, 0x0001($v0) ## 00000001
/* 00398 80A9DED8 44CAF800 */ ctc1 $t2, $31
/* 0039C 80A9DEDC 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 000000FF
/* 003A0 80A9DEE0 448B2000 */ mtc1 $t3, $f4 ## $f4 = 0.00
/* 003A4 80A9DEE4 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 003A8 80A9DEE8 05610004 */ bgez $t3, .L80A9DEFC
/* 003AC 80A9DEEC 468021A0 */ cvt.s.w $f6, $f4
/* 003B0 80A9DEF0 44815000 */ mtc1 $at, $f10 ## $f10 = 4294967296.00
/* 003B4 80A9DEF4 00000000 */ nop
/* 003B8 80A9DEF8 460A3180 */ add.s $f6, $f6, $f10
.L80A9DEFC:
/* 003BC 80A9DEFC 46023202 */ mul.s $f8, $f6, $f2
/* 003C0 80A9DF00 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 003C4 80A9DF04 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 003C8 80A9DF08 444CF800 */ cfc1 $t4, $31
/* 003CC 80A9DF0C 44C6F800 */ ctc1 $a2, $31
/* 003D0 80A9DF10 00000000 */ nop
/* 003D4 80A9DF14 46004424 */ cvt.w.s $f16, $f8
/* 003D8 80A9DF18 4446F800 */ cfc1 $a2, $31
/* 003DC 80A9DF1C 00000000 */ nop
/* 003E0 80A9DF20 30C60078 */ andi $a2, $a2, 0x0078 ## $a2 = 00000000
/* 003E4 80A9DF24 50C00013 */ beql $a2, $zero, .L80A9DF74
/* 003E8 80A9DF28 44068000 */ mfc1 $a2, $f16
/* 003EC 80A9DF2C 44818000 */ mtc1 $at, $f16 ## $f16 = 2147483648.00
/* 003F0 80A9DF30 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 003F4 80A9DF34 46104401 */ sub.s $f16, $f8, $f16
/* 003F8 80A9DF38 44C6F800 */ ctc1 $a2, $31
/* 003FC 80A9DF3C 00000000 */ nop
/* 00400 80A9DF40 46008424 */ cvt.w.s $f16, $f16
/* 00404 80A9DF44 4446F800 */ cfc1 $a2, $31
/* 00408 80A9DF48 00000000 */ nop
/* 0040C 80A9DF4C 30C60078 */ andi $a2, $a2, 0x0078 ## $a2 = 00000000
/* 00410 80A9DF50 14C00005 */ bne $a2, $zero, .L80A9DF68
/* 00414 80A9DF54 00000000 */ nop
/* 00418 80A9DF58 44068000 */ mfc1 $a2, $f16
/* 0041C 80A9DF5C 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 00420 80A9DF60 10000007 */ beq $zero, $zero, .L80A9DF80
/* 00424 80A9DF64 00C13025 */ or $a2, $a2, $at ## $a2 = 80000000
.L80A9DF68:
/* 00428 80A9DF68 10000005 */ beq $zero, $zero, .L80A9DF80
/* 0042C 80A9DF6C 2406FFFF */ addiu $a2, $zero, 0xFFFF ## $a2 = FFFFFFFF
/* 00430 80A9DF70 44068000 */ mfc1 $a2, $f16
.L80A9DF74:
/* 00434 80A9DF74 00000000 */ nop
/* 00438 80A9DF78 04C0FFFB */ bltz $a2, .L80A9DF68
/* 0043C 80A9DF7C 00000000 */ nop
.L80A9DF80:
/* 00440 80A9DF80 904D0002 */ lbu $t5, 0x0002($v0) ## 00000002
/* 00444 80A9DF84 44CCF800 */ ctc1 $t4, $31
/* 00448 80A9DF88 30C600FF */ andi $a2, $a2, 0x00FF ## $a2 = 000000FF
/* 0044C 80A9DF8C 448D9000 */ mtc1 $t5, $f18 ## $f18 = 0.00
/* 00450 80A9DF90 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00454 80A9DF94 05A10004 */ bgez $t5, .L80A9DFA8
/* 00458 80A9DF98 46809120 */ cvt.s.w $f4, $f18
/* 0045C 80A9DF9C 44815000 */ mtc1 $at, $f10 ## $f10 = 4294967296.00
/* 00460 80A9DFA0 00000000 */ nop
/* 00464 80A9DFA4 460A2100 */ add.s $f4, $f4, $f10
.L80A9DFA8:
/* 00468 80A9DFA8 46022182 */ mul.s $f6, $f4, $f2
/* 0046C 80A9DFAC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00470 80A9DFB0 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 00474 80A9DFB4 444EF800 */ cfc1 $t6, $31
/* 00478 80A9DFB8 44C7F800 */ ctc1 $a3, $31
/* 0047C 80A9DFBC 00000000 */ nop
/* 00480 80A9DFC0 46003224 */ cvt.w.s $f8, $f6
/* 00484 80A9DFC4 4447F800 */ cfc1 $a3, $31
/* 00488 80A9DFC8 00000000 */ nop
/* 0048C 80A9DFCC 30E70078 */ andi $a3, $a3, 0x0078 ## $a3 = 00000000
/* 00490 80A9DFD0 50E00013 */ beql $a3, $zero, .L80A9E020
/* 00494 80A9DFD4 44074000 */ mfc1 $a3, $f8
/* 00498 80A9DFD8 44814000 */ mtc1 $at, $f8 ## $f8 = 2147483648.00
/* 0049C 80A9DFDC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 004A0 80A9DFE0 46083201 */ sub.s $f8, $f6, $f8
/* 004A4 80A9DFE4 44C7F800 */ ctc1 $a3, $31
/* 004A8 80A9DFE8 00000000 */ nop
/* 004AC 80A9DFEC 46004224 */ cvt.w.s $f8, $f8
/* 004B0 80A9DFF0 4447F800 */ cfc1 $a3, $31
/* 004B4 80A9DFF4 00000000 */ nop
/* 004B8 80A9DFF8 30E70078 */ andi $a3, $a3, 0x0078 ## $a3 = 00000000
/* 004BC 80A9DFFC 14E00005 */ bne $a3, $zero, .L80A9E014
/* 004C0 80A9E000 00000000 */ nop
/* 004C4 80A9E004 44074000 */ mfc1 $a3, $f8
/* 004C8 80A9E008 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 004CC 80A9E00C 10000007 */ beq $zero, $zero, .L80A9E02C
/* 004D0 80A9E010 00E13825 */ or $a3, $a3, $at ## $a3 = 80000000
.L80A9E014:
/* 004D4 80A9E014 10000005 */ beq $zero, $zero, .L80A9E02C
/* 004D8 80A9E018 2407FFFF */ addiu $a3, $zero, 0xFFFF ## $a3 = FFFFFFFF
/* 004DC 80A9E01C 44074000 */ mfc1 $a3, $f8
.L80A9E020:
/* 004E0 80A9E020 00000000 */ nop
/* 004E4 80A9E024 04E0FFFB */ bltz $a3, .L80A9E014
/* 004E8 80A9E028 00000000 */ nop
.L80A9E02C:
/* 004EC 80A9E02C 44CEF800 */ ctc1 $t6, $31
/* 004F0 80A9E030 30E700FF */ andi $a3, $a3, 0x00FF ## $a3 = 000000FF
/* 004F4 80A9E034 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius
/* 004F8 80A9E038 AFA30010 */ sw $v1, 0x0010($sp)
/* 004FC 80A9E03C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00500 80A9E040 0C2A7754 */ jal func_80A9DD50
/* 00504 80A9E044 8FA50034 */ lw $a1, 0x0034($sp)
/* 00508 80A9E048 860F001C */ lh $t7, 0x001C($s0) ## 0000001C
/* 0050C 80A9E04C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00510 80A9E050 05E20004 */ bltzl $t7, .L80A9E064
/* 00514 80A9E054 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00518 80A9E058 0C00BE0A */ jal Audio_PlayActorSound2
/* 0051C 80A9E05C 24052031 */ addiu $a1, $zero, 0x2031 ## $a1 = 00002031
/* 00520 80A9E060 8FBF0024 */ lw $ra, 0x0024($sp)
.L80A9E064:
/* 00524 80A9E064 8FB00020 */ lw $s0, 0x0020($sp)
/* 00528 80A9E068 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 0052C 80A9E06C 03E00008 */ jr $ra
/* 00530 80A9E070 00000000 */ nop

View file

@ -1,35 +0,0 @@
glabel func_80A9DD50
/* 00210 80A9DD50 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00214 80A9DD54 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00218 80A9DD58 84AE07A0 */ lh $t6, 0x07A0($a1) ## 000007A0
/* 0021C 80A9DD5C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00220 80A9DD60 000E7880 */ sll $t7, $t6, 2
/* 00224 80A9DD64 00AFC021 */ addu $t8, $a1, $t7
/* 00228 80A9DD68 8F040790 */ lw $a0, 0x0790($t8) ## 00000790
/* 0022C 80A9DD6C 0C016A7D */ jal func_8005A9F4
/* 00230 80A9DD70 AFA60018 */ sw $a2, 0x0018($sp)
/* 00234 80A9DD74 8FA60018 */ lw $a2, 0x0018($sp)
/* 00238 80A9DD78 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
/* 0023C 80A9DD7C 0041C821 */ addu $t9, $v0, $at
/* 00240 80A9DD80 8CC30118 */ lw $v1, 0x0118($a2) ## 00000118
/* 00244 80A9DD84 A4D900B6 */ sh $t9, 0x00B6($a2) ## 000000B6
/* 00248 80A9DD88 24C40024 */ addiu $a0, $a2, 0x0024 ## $a0 = 00000024
/* 0024C 80A9DD8C 10600009 */ beq $v1, $zero, .L80A9DDB4
/* 00250 80A9DD90 24650024 */ addiu $a1, $v1, 0x0024 ## $a1 = 00000024
/* 00254 80A9DD94 0C01DF90 */ jal Math_Vec3f_Copy
## Vec3f_Copy
/* 00258 80A9DD98 AFA60018 */ sw $a2, 0x0018($sp)
/* 0025C 80A9DD9C 8FA60018 */ lw $a2, 0x0018($sp)
/* 00260 80A9DDA0 3C014188 */ lui $at, 0x4188 ## $at = 41880000
/* 00264 80A9DDA4 44813000 */ mtc1 $at, $f6 ## $f6 = 17.00
/* 00268 80A9DDA8 C4C40028 */ lwc1 $f4, 0x0028($a2) ## 00000028
/* 0026C 80A9DDAC 46062200 */ add.s $f8, $f4, $f6
/* 00270 80A9DDB0 E4C80028 */ swc1 $f8, 0x0028($a2) ## 00000028
.L80A9DDB4:
/* 00274 80A9DDB4 90C8014C */ lbu $t0, 0x014C($a2) ## 0000014C
/* 00278 80A9DDB8 25090001 */ addiu $t1, $t0, 0x0001 ## $t1 = 00000001
/* 0027C 80A9DDBC A0C9014C */ sb $t1, 0x014C($a2) ## 0000014C
/* 00280 80A9DDC0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00284 80A9DDC4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00288 80A9DDC8 03E00008 */ jr $ra
/* 0028C 80A9DDCC 00000000 */ nop

View file

@ -1,317 +0,0 @@
.late_rodata
glabel D_80A9E8F8
.word 0x3F1A36E2, 0xEB1C432D
glabel D_80A9E900
.float 0.1
glabel D_80A9E904
.float 0.1
glabel D_80A9E908
.word 0x3F1A36E2, 0xEB1C432D
.text
glabel func_80A9E074
/* 00534 80A9E074 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 00538 80A9E078 AFBF0024 */ sw $ra, 0x0024($sp)
/* 0053C 80A9E07C AFB00020 */ sw $s0, 0x0020($sp)
/* 00540 80A9E080 AFA50044 */ sw $a1, 0x0044($sp)
/* 00544 80A9E084 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 00548 80A9E088 3C1980AA */ lui $t9, %hi(D_80A9E840) ## $t9 = 80AA0000
/* 0054C 80A9E08C 2739E840 */ addiu $t9, $t9, %lo(D_80A9E840) ## $t9 = 80A9E840
/* 00550 80A9E090 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 00554 80A9E094 000FC0C0 */ sll $t8, $t7, 3
/* 00558 80A9E098 03194021 */ addu $t0, $t8, $t9
/* 0055C 80A9E09C AFA80038 */ sw $t0, 0x0038($sp)
/* 00560 80A9E0A0 91090007 */ lbu $t1, 0x0007($t0) ## 00000007
/* 00564 80A9E0A4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00568 80A9E0A8 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 0056C 80A9E0AC 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00
/* 00570 80A9E0B0 05210004 */ bgez $t1, .L80A9E0C4
/* 00574 80A9E0B4 468021A0 */ cvt.s.w $f6, $f4
/* 00578 80A9E0B8 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00
/* 0057C 80A9E0BC 00000000 */ nop
/* 00580 80A9E0C0 46083180 */ add.s $f6, $f6, $f8
.L80A9E0C4:
/* 00584 80A9E0C4 3C0180AA */ lui $at, %hi(D_80A9E8F8) ## $at = 80AA0000
/* 00588 80A9E0C8 D430E8F8 */ ldc1 $f16, %lo(D_80A9E8F8)($at)
/* 0058C 80A9E0CC 460032A1 */ cvt.d.s $f10, $f6
/* 00590 80A9E0D0 C6040050 */ lwc1 $f4, 0x0050($s0) ## 00000050
/* 00594 80A9E0D4 46305482 */ mul.d $f18, $f10, $f16
/* 00598 80A9E0D8 8FA40044 */ lw $a0, 0x0044($sp)
/* 0059C 80A9E0DC 46002221 */ cvt.d.s $f8, $f4
/* 005A0 80A9E0E0 46324183 */ div.d $f6, $f8, $f18
/* 005A4 80A9E0E4 462032A0 */ cvt.s.d $f10, $f6
/* 005A8 80A9E0E8 E7AA0030 */ swc1 $f10, 0x0030($sp)
/* 005AC 80A9E0EC 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 005B0 80A9E0F0 304A0800 */ andi $t2, $v0, 0x0800 ## $t2 = 00000000
/* 005B4 80A9E0F4 1140001F */ beq $t2, $zero, .L80A9E174
/* 005B8 80A9E0F8 304503F0 */ andi $a1, $v0, 0x03F0 ## $a1 = 00000000
/* 005BC 80A9E0FC 304503F0 */ andi $a1, $v0, 0x03F0 ## $a1 = 00000000
/* 005C0 80A9E100 00052903 */ sra $a1, $a1, 4
/* 005C4 80A9E104 0C00B2D0 */ jal Flags_GetSwitch
/* 005C8 80A9E108 8FA40044 */ lw $a0, 0x0044($sp)
/* 005CC 80A9E10C 10400008 */ beq $v0, $zero, .L80A9E130
/* 005D0 80A9E110 C7B00030 */ lwc1 $f16, 0x0030($sp)
/* 005D4 80A9E114 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
/* 005D8 80A9E118 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3D4CCCCD
/* 005DC 80A9E11C 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFF0
/* 005E0 80A9E120 0C01DE80 */ jal Math_ApproxF
/* 005E4 80A9E124 3C053F80 */ lui $a1, 0x3F80 ## $a1 = 3F800000
/* 005E8 80A9E128 1000002D */ beq $zero, $zero, .L80A9E1E0
/* 005EC 80A9E12C 8FAB0038 */ lw $t3, 0x0038($sp)
.L80A9E130:
/* 005F0 80A9E130 3C0180AA */ lui $at, %hi(D_80A9E900) ## $at = 80AA0000
/* 005F4 80A9E134 C424E900 */ lwc1 $f4, %lo(D_80A9E900)($at)
/* 005F8 80A9E138 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFF0
/* 005FC 80A9E13C 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00600 80A9E140 4604803C */ c.lt.s $f16, $f4
/* 00604 80A9E144 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
/* 00608 80A9E148 45000006 */ bc1f .L80A9E164
/* 0060C 80A9E14C 00000000 */ nop
/* 00610 80A9E150 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00614 80A9E154 0C00B58B */ jal Actor_SetScale
/* 00618 80A9E158 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 0061C 80A9E15C 100000CF */ beq $zero, $zero, .L80A9E49C
/* 00620 80A9E160 8FBF0024 */ lw $ra, 0x0024($sp)
.L80A9E164:
/* 00624 80A9E164 0C01DE80 */ jal Math_ApproxF
/* 00628 80A9E168 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 0000CCCD
/* 0062C 80A9E16C 1000001C */ beq $zero, $zero, .L80A9E1E0
/* 00630 80A9E170 8FAB0038 */ lw $t3, 0x0038($sp)
.L80A9E174:
/* 00634 80A9E174 0C00B2D0 */ jal Flags_GetSwitch
/* 00638 80A9E178 00052903 */ sra $a1, $a1, 4
/* 0063C 80A9E17C 10400013 */ beq $v0, $zero, .L80A9E1CC
/* 00640 80A9E180 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFF0
/* 00644 80A9E184 3C0180AA */ lui $at, %hi(D_80A9E904) ## $at = 80AA0000
/* 00648 80A9E188 C432E904 */ lwc1 $f18, %lo(D_80A9E904)($at)
/* 0064C 80A9E18C C7A80030 */ lwc1 $f8, 0x0030($sp)
/* 00650 80A9E190 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFF0
/* 00654 80A9E194 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00658 80A9E198 4612403C */ c.lt.s $f8, $f18
/* 0065C 80A9E19C 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
/* 00660 80A9E1A0 45000006 */ bc1f .L80A9E1BC
/* 00664 80A9E1A4 00000000 */ nop
/* 00668 80A9E1A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0066C 80A9E1AC 0C00B58B */ jal Actor_SetScale
/* 00670 80A9E1B0 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00674 80A9E1B4 100000B9 */ beq $zero, $zero, .L80A9E49C
/* 00678 80A9E1B8 8FBF0024 */ lw $ra, 0x0024($sp)
.L80A9E1BC:
/* 0067C 80A9E1BC 0C01DE80 */ jal Math_ApproxF
/* 00680 80A9E1C0 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 0000CCCD
/* 00684 80A9E1C4 10000006 */ beq $zero, $zero, .L80A9E1E0
/* 00688 80A9E1C8 8FAB0038 */ lw $t3, 0x0038($sp)
.L80A9E1CC:
/* 0068C 80A9E1CC 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
/* 00690 80A9E1D0 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3D4CCCCD
/* 00694 80A9E1D4 0C01DE80 */ jal Math_ApproxF
/* 00698 80A9E1D8 3C053F80 */ lui $a1, 0x3F80 ## $a1 = 3F800000
/* 0069C 80A9E1DC 8FAB0038 */ lw $t3, 0x0038($sp)
.L80A9E1E0:
/* 006A0 80A9E1E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 006A4 80A9E1E4 916C0007 */ lbu $t4, 0x0007($t3) ## 00000007
/* 006A8 80A9E1E8 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00
/* 006AC 80A9E1EC 05810005 */ bgez $t4, .L80A9E204
/* 006B0 80A9E1F0 468032A0 */ cvt.s.w $f10, $f6
/* 006B4 80A9E1F4 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 006B8 80A9E1F8 44818000 */ mtc1 $at, $f16 ## $f16 = 4294967296.00
/* 006BC 80A9E1FC 00000000 */ nop
/* 006C0 80A9E200 46105280 */ add.s $f10, $f10, $f16
.L80A9E204:
/* 006C4 80A9E204 3C0180AA */ lui $at, %hi(D_80A9E908) ## $at = 80AA0000
/* 006C8 80A9E208 D428E908 */ ldc1 $f8, %lo(D_80A9E908)($at)
/* 006CC 80A9E20C 46005121 */ cvt.d.s $f4, $f10
/* 006D0 80A9E210 C7A60030 */ lwc1 $f6, 0x0030($sp)
/* 006D4 80A9E214 46282482 */ mul.d $f18, $f4, $f8
/* 006D8 80A9E218 46003421 */ cvt.d.s $f16, $f6
/* 006DC 80A9E21C 46309282 */ mul.d $f10, $f18, $f16
/* 006E0 80A9E220 46205120 */ cvt.s.d $f4, $f10
/* 006E4 80A9E224 44052000 */ mfc1 $a1, $f4
/* 006E8 80A9E228 0C00B58B */ jal Actor_SetScale
/* 006EC 80A9E22C 00000000 */ nop
/* 006F0 80A9E230 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 006F4 80A9E234 00000000 */ nop
/* 006F8 80A9E238 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 006FC 80A9E23C 44816000 */ mtc1 $at, $f12 ## $f12 = 0.50
/* 00700 80A9E240 8FAD0038 */ lw $t5, 0x0038($sp)
/* 00704 80A9E244 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00708 80A9E248 460C0202 */ mul.s $f8, $f0, $f12
/* 0070C 80A9E24C 91AE0000 */ lbu $t6, 0x0000($t5) ## 00000000
/* 00710 80A9E250 26040154 */ addiu $a0, $s0, 0x0154 ## $a0 = 00000154
/* 00714 80A9E254 448E3000 */ mtc1 $t6, $f6 ## $f6 = 0.00
/* 00718 80A9E258 460C4080 */ add.s $f2, $f8, $f12
/* 0071C 80A9E25C 05C10004 */ bgez $t6, .L80A9E270
/* 00720 80A9E260 468034A0 */ cvt.s.w $f18, $f6
/* 00724 80A9E264 44818000 */ mtc1 $at, $f16 ## $f16 = 4294967296.00
/* 00728 80A9E268 00000000 */ nop
/* 0072C 80A9E26C 46109480 */ add.s $f18, $f18, $f16
.L80A9E270:
/* 00730 80A9E270 46029282 */ mul.s $f10, $f18, $f2
/* 00734 80A9E274 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00738 80A9E278 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 0073C 80A9E27C 444FF800 */ cfc1 $t7, $31
/* 00740 80A9E280 44C5F800 */ ctc1 $a1, $31
/* 00744 80A9E284 00000000 */ nop
/* 00748 80A9E288 46005124 */ cvt.w.s $f4, $f10
/* 0074C 80A9E28C 4445F800 */ cfc1 $a1, $31
/* 00750 80A9E290 00000000 */ nop
/* 00754 80A9E294 30A50078 */ andi $a1, $a1, 0x0078 ## $a1 = 00000000
/* 00758 80A9E298 50A00013 */ beql $a1, $zero, .L80A9E2E8
/* 0075C 80A9E29C 44052000 */ mfc1 $a1, $f4
/* 00760 80A9E2A0 44812000 */ mtc1 $at, $f4 ## $f4 = 2147483648.00
/* 00764 80A9E2A4 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00768 80A9E2A8 46045101 */ sub.s $f4, $f10, $f4
/* 0076C 80A9E2AC 44C5F800 */ ctc1 $a1, $31
/* 00770 80A9E2B0 00000000 */ nop
/* 00774 80A9E2B4 46002124 */ cvt.w.s $f4, $f4
/* 00778 80A9E2B8 4445F800 */ cfc1 $a1, $31
/* 0077C 80A9E2BC 00000000 */ nop
/* 00780 80A9E2C0 30A50078 */ andi $a1, $a1, 0x0078 ## $a1 = 00000000
/* 00784 80A9E2C4 14A00005 */ bne $a1, $zero, .L80A9E2DC
/* 00788 80A9E2C8 00000000 */ nop
/* 0078C 80A9E2CC 44052000 */ mfc1 $a1, $f4
/* 00790 80A9E2D0 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 00794 80A9E2D4 10000007 */ beq $zero, $zero, .L80A9E2F4
/* 00798 80A9E2D8 00A12825 */ or $a1, $a1, $at ## $a1 = 80000000
.L80A9E2DC:
/* 0079C 80A9E2DC 10000005 */ beq $zero, $zero, .L80A9E2F4
/* 007A0 80A9E2E0 2405FFFF */ addiu $a1, $zero, 0xFFFF ## $a1 = FFFFFFFF
/* 007A4 80A9E2E4 44052000 */ mfc1 $a1, $f4
.L80A9E2E8:
/* 007A8 80A9E2E8 00000000 */ nop
/* 007AC 80A9E2EC 04A0FFFB */ bltz $a1, .L80A9E2DC
/* 007B0 80A9E2F0 00000000 */ nop
.L80A9E2F4:
/* 007B4 80A9E2F4 91B80001 */ lbu $t8, 0x0001($t5) ## 00000001
/* 007B8 80A9E2F8 44CFF800 */ ctc1 $t7, $31
/* 007BC 80A9E2FC 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 000000FF
/* 007C0 80A9E300 44984000 */ mtc1 $t8, $f8 ## $f8 = 0.00
/* 007C4 80A9E304 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 007C8 80A9E308 07010004 */ bgez $t8, .L80A9E31C
/* 007CC 80A9E30C 468041A0 */ cvt.s.w $f6, $f8
/* 007D0 80A9E310 44818000 */ mtc1 $at, $f16 ## $f16 = 4294967296.00
/* 007D4 80A9E314 00000000 */ nop
/* 007D8 80A9E318 46103180 */ add.s $f6, $f6, $f16
.L80A9E31C:
/* 007DC 80A9E31C 46023482 */ mul.s $f18, $f6, $f2
/* 007E0 80A9E320 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 007E4 80A9E324 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 007E8 80A9E328 4459F800 */ cfc1 $t9, $31
/* 007EC 80A9E32C 44C6F800 */ ctc1 $a2, $31
/* 007F0 80A9E330 00000000 */ nop
/* 007F4 80A9E334 460092A4 */ cvt.w.s $f10, $f18
/* 007F8 80A9E338 4446F800 */ cfc1 $a2, $31
/* 007FC 80A9E33C 00000000 */ nop
/* 00800 80A9E340 30C60078 */ andi $a2, $a2, 0x0078 ## $a2 = 00000000
/* 00804 80A9E344 50C00013 */ beql $a2, $zero, .L80A9E394
/* 00808 80A9E348 44065000 */ mfc1 $a2, $f10
/* 0080C 80A9E34C 44815000 */ mtc1 $at, $f10 ## $f10 = 2147483648.00
/* 00810 80A9E350 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 00814 80A9E354 460A9281 */ sub.s $f10, $f18, $f10
/* 00818 80A9E358 44C6F800 */ ctc1 $a2, $31
/* 0081C 80A9E35C 00000000 */ nop
/* 00820 80A9E360 460052A4 */ cvt.w.s $f10, $f10
/* 00824 80A9E364 4446F800 */ cfc1 $a2, $31
/* 00828 80A9E368 00000000 */ nop
/* 0082C 80A9E36C 30C60078 */ andi $a2, $a2, 0x0078 ## $a2 = 00000000
/* 00830 80A9E370 14C00005 */ bne $a2, $zero, .L80A9E388
/* 00834 80A9E374 00000000 */ nop
/* 00838 80A9E378 44065000 */ mfc1 $a2, $f10
/* 0083C 80A9E37C 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 00840 80A9E380 10000007 */ beq $zero, $zero, .L80A9E3A0
/* 00844 80A9E384 00C13025 */ or $a2, $a2, $at ## $a2 = 80000000
.L80A9E388:
/* 00848 80A9E388 10000005 */ beq $zero, $zero, .L80A9E3A0
/* 0084C 80A9E38C 2406FFFF */ addiu $a2, $zero, 0xFFFF ## $a2 = FFFFFFFF
/* 00850 80A9E390 44065000 */ mfc1 $a2, $f10
.L80A9E394:
/* 00854 80A9E394 00000000 */ nop
/* 00858 80A9E398 04C0FFFB */ bltz $a2, .L80A9E388
/* 0085C 80A9E39C 00000000 */ nop
.L80A9E3A0:
/* 00860 80A9E3A0 91A80002 */ lbu $t0, 0x0002($t5) ## 00000002
/* 00864 80A9E3A4 44D9F800 */ ctc1 $t9, $31
/* 00868 80A9E3A8 30C600FF */ andi $a2, $a2, 0x00FF ## $a2 = 000000FF
/* 0086C 80A9E3AC 44882000 */ mtc1 $t0, $f4 ## $f4 = 0.00
/* 00870 80A9E3B0 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00874 80A9E3B4 05010004 */ bgez $t0, .L80A9E3C8
/* 00878 80A9E3B8 46802220 */ cvt.s.w $f8, $f4
/* 0087C 80A9E3BC 44818000 */ mtc1 $at, $f16 ## $f16 = 4294967296.00
/* 00880 80A9E3C0 00000000 */ nop
/* 00884 80A9E3C4 46104200 */ add.s $f8, $f8, $f16
.L80A9E3C8:
/* 00888 80A9E3C8 46024182 */ mul.s $f6, $f8, $f2
/* 0088C 80A9E3CC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00890 80A9E3D0 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000
/* 00894 80A9E3D4 4449F800 */ cfc1 $t1, $31
/* 00898 80A9E3D8 44C7F800 */ ctc1 $a3, $31
/* 0089C 80A9E3DC 00000000 */ nop
/* 008A0 80A9E3E0 460034A4 */ cvt.w.s $f18, $f6
/* 008A4 80A9E3E4 4447F800 */ cfc1 $a3, $31
/* 008A8 80A9E3E8 00000000 */ nop
/* 008AC 80A9E3EC 30E70078 */ andi $a3, $a3, 0x0078 ## $a3 = 00000000
/* 008B0 80A9E3F0 50E00013 */ beql $a3, $zero, .L80A9E440
/* 008B4 80A9E3F4 44079000 */ mfc1 $a3, $f18
/* 008B8 80A9E3F8 44819000 */ mtc1 $at, $f18 ## $f18 = 2147483648.00
/* 008BC 80A9E3FC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 008C0 80A9E400 46123481 */ sub.s $f18, $f6, $f18
/* 008C4 80A9E404 44C7F800 */ ctc1 $a3, $31
/* 008C8 80A9E408 00000000 */ nop
/* 008CC 80A9E40C 460094A4 */ cvt.w.s $f18, $f18
/* 008D0 80A9E410 4447F800 */ cfc1 $a3, $31
/* 008D4 80A9E414 00000000 */ nop
/* 008D8 80A9E418 30E70078 */ andi $a3, $a3, 0x0078 ## $a3 = 00000000
/* 008DC 80A9E41C 14E00005 */ bne $a3, $zero, .L80A9E434
/* 008E0 80A9E420 00000000 */ nop
/* 008E4 80A9E424 44079000 */ mfc1 $a3, $f18
/* 008E8 80A9E428 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 008EC 80A9E42C 10000007 */ beq $zero, $zero, .L80A9E44C
/* 008F0 80A9E430 00E13825 */ or $a3, $a3, $at ## $a3 = 80000000
.L80A9E434:
/* 008F4 80A9E434 10000005 */ beq $zero, $zero, .L80A9E44C
/* 008F8 80A9E438 2407FFFF */ addiu $a3, $zero, 0xFFFF ## $a3 = FFFFFFFF
/* 008FC 80A9E43C 44079000 */ mfc1 $a3, $f18
.L80A9E440:
/* 00900 80A9E440 00000000 */ nop
/* 00904 80A9E444 04E0FFFB */ bltz $a3, .L80A9E434
/* 00908 80A9E448 00000000 */ nop
.L80A9E44C:
/* 0090C 80A9E44C 3C014396 */ lui $at, 0x4396 ## $at = 43960000
/* 00910 80A9E450 44815000 */ mtc1 $at, $f10 ## $f10 = 300.00
/* 00914 80A9E454 44C9F800 */ ctc1 $t1, $31
/* 00918 80A9E458 C7A40030 */ lwc1 $f4, 0x0030($sp)
/* 0091C 80A9E45C 30E700FF */ andi $a3, $a3, 0x00FF ## $a3 = 000000FF
/* 00920 80A9E460 46045402 */ mul.s $f16, $f10, $f4
/* 00924 80A9E464 4600820D */ trunc.w.s $f8, $f16
/* 00928 80A9E468 440B4000 */ mfc1 $t3, $f8
/* 0092C 80A9E46C 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius
/* 00930 80A9E470 AFAB0010 */ sw $t3, 0x0010($sp)
/* 00934 80A9E474 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00938 80A9E478 0C2A7754 */ jal func_80A9DD50
/* 0093C 80A9E47C 8FA50044 */ lw $a1, 0x0044($sp)
/* 00940 80A9E480 860C001C */ lh $t4, 0x001C($s0) ## 0000001C
/* 00944 80A9E484 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00948 80A9E488 05820004 */ bltzl $t4, .L80A9E49C
/* 0094C 80A9E48C 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00950 80A9E490 0C00BE0A */ jal Audio_PlayActorSound2
/* 00954 80A9E494 24052031 */ addiu $a1, $zero, 0x2031 ## $a1 = 00002031
/* 00958 80A9E498 8FBF0024 */ lw $ra, 0x0024($sp)
.L80A9E49C:
/* 0095C 80A9E49C 8FB00020 */ lw $s0, 0x0020($sp)
/* 00960 80A9E4A0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 00964 80A9E4A4 03E00008 */ jr $ra
/* 00968 80A9E4A8 00000000 */ nop

View file

@ -1,22 +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 .data
.balign 16
glabel En_Light_InitVars
.word 0x00080700, 0x00000000, 0x00010000, 0x00000164
.word EnLight_Init
.word EnLight_Destroy
.word EnLight_Update
.word EnLight_Draw
glabel D_80A9E840
.byte 0xFF, 0xC8, 0x00, 0xFF, 0xFF, 0x00, 0x00
glabel D_80A9E847
.byte 0x4B, 0xFF, 0xC8, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x4B, 0x00, 0xAA, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x4B, 0xAA, 0xFF, 0x00, 0xFF, 0x00, 0x96, 0x00, 0x4B, 0xFF, 0xC8, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x28, 0xFF, 0xC8, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x4B, 0xAA, 0xFF, 0x00, 0xFF, 0x00, 0x96, 0x00, 0x4B, 0x00, 0xAA, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x4B, 0xFF, 0x00, 0xAA, 0xFF, 0xC8, 0x00, 0x00, 0x4B, 0xFF, 0xFF, 0xAA, 0xFF, 0xFF, 0x32, 0x00, 0x4B, 0xFF, 0xFF, 0xAA, 0xFF, 0xFF, 0xFF, 0x00, 0x4B, 0xFF, 0xFF, 0xAA, 0xFF, 0x64, 0xFF, 0x00, 0x4B, 0xFF, 0xAA, 0xFF, 0xFF, 0xFF, 0x00, 0x64, 0x4B, 0xFF, 0xAA, 0xFF, 0xFF, 0x64, 0x00, 0xFF, 0x4B, 0xAA, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x4B, 0xAA, 0xFF, 0xFF, 0xFF, 0x00, 0x96, 0xFF, 0x4B

View file

@ -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_80A9E920
.incbin "baserom/ovl_En_Light", 0xDE0, 0x000000B0

3
spec
View file

@ -2773,8 +2773,7 @@ endseg
beginseg
name "ovl_En_Light"
include "build/src/overlays/actors/ovl_En_Light/z_en_light.o"
include "build/data/overlays/actors/z_en_light.data.o"
include "build/data/overlays/actors/z_en_light.reloc.o"
include "build/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o"
endseg
beginseg

View file

@ -1,3 +1,9 @@
/*
* File: z_en_light.c
* Overlay: ovl_En_Light
* Description: Flame
*/
#include "z_en_light.h"
#define FLAGS 0x00000000
@ -8,8 +14,8 @@ void EnLight_Init(Actor* thisx, GlobalContext* globalCtx);
void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnLight_Update(Actor* thisx, GlobalContext* globalCtx);
void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx);
void EnLight_UpdateSwitch(Actor* thisx, GlobalContext* globalCtx);
/*
const ActorInit En_Light_InitVars = {
ACTOR_EN_LIGHT,
ACTORTYPE_ITEMACTION,
@ -21,15 +27,181 @@ const ActorInit En_Light_InitVars = {
(ActorFunc)EnLight_Update,
(ActorFunc)EnLight_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/EnLight_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/EnLight_Destroy.s")
typedef struct {
/* 0x00 */ Color_RGBA8_n primColor;
/* 0x04 */ Color_RGB8 envColor;
/* 0x07 */ u8 scale;
} FlameParams;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/func_80A9DD50.s")
FlameParams D_80A9E840[] = {
{ { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 },
{ { 0, 170, 255, 255 }, { 0, 0, 255 }, 75 }, { { 170, 255, 0, 255 }, { 0, 150, 0 }, 75 },
{ { 255, 200, 0, 255 }, { 255, 0, 0 }, 40 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 },
{ { 170, 255, 0, 255 }, { 0, 150, 0 }, 75 }, { { 0, 170, 255, 255 }, { 0, 0, 255 }, 75 },
{ { 255, 0, 170, 255 }, { 200, 0, 0 }, 75 }, { { 255, 255, 170, 255 }, { 255, 50, 0 }, 75 },
{ { 255, 255, 170, 255 }, { 255, 255, 0 }, 75 }, { { 255, 255, 170, 255 }, { 100, 255, 0 }, 75 },
{ { 255, 170, 255, 255 }, { 255, 0, 100 }, 75 }, { { 255, 170, 255, 255 }, { 100, 0, 255 }, 75 },
{ { 170, 255, 255, 255 }, { 0, 0, 255 }, 75 }, { { 170, 255, 255, 255 }, { 0, 150, 255 }, 75 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/EnLight_Update.s")
extern Gfx D_0404D4E0[];
extern Gfx D_05000440[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/func_80A9E074.s")
void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) {
EnLight* this = THIS;
s16 yOffset;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Light/EnLight_Draw.s")
if (gSaveContext.gameMode == 3) {
// special case for the credits
yOffset = (this->actor.params < 0) ? 1 : 40;
Lights_InitType0PositionalLight(&this->posLightInfo, this->actor.posRot.pos.x,
yOffset + (s16)this->actor.posRot.pos.y, this->actor.posRot.pos.z, 255, 255,
180, -1);
} else {
yOffset = (this->actor.params < 0) ? 1 : 40;
Lights_InitType2PositionalLight(&this->posLightInfo, this->actor.posRot.pos.x,
yOffset + (s16)this->actor.posRot.pos.y, this->actor.posRot.pos.z, 255, 255,
180, -1);
}
this->lightNode = Lights_Insert(globalCtx, &globalCtx->lightCtx, &this->posLightInfo);
Actor_SetScale(&this->actor, D_80A9E840[this->actor.params & 0xF].scale * 0.0001f);
this->timer = (s32)(Math_Rand_ZeroOne() * 255.0f);
if ((this->actor.params & 0x400) != 0) {
this->actor.update = EnLight_UpdateSwitch;
}
}
void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnLight* this = THIS;
Lights_Remove(globalCtx, &globalCtx->lightCtx, this->lightNode);
}
void EnLight_UpdatePosRot(EnLight* this, GlobalContext* globalCtx) {
// update yaw for billboard effect
this->actor.shape.rot.y = func_8005A9F4(ACTIVE_CAM) + 0x8000;
if (this->actor.attachedA != NULL) {
Math_Vec3f_Copy(&this->actor.posRot.pos, &(this->actor.attachedA)->posRot.pos);
this->actor.posRot.pos.y += 17.0f;
}
this->timer++;
}
void EnLight_Update(Actor* thisx, GlobalContext* globalCtx) {
f32 intensity;
FlameParams* flameParams;
s16 radius;
EnLight* this = THIS;
flameParams = &D_80A9E840[this->actor.params & 0xF];
intensity = (Math_Rand_ZeroOne() * 0.5f) + 0.5f;
radius = (this->actor.params < 0) ? 100 : 300;
Lights_SetPositionalLightColorAndRadius(&this->posLightInfo, (flameParams->primColor.r * intensity),
(flameParams->primColor.g * intensity),
(flameParams->primColor.b * intensity), radius);
EnLight_UpdatePosRot(this, globalCtx);
if (this->actor.params >= 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_TORCH - SFX_FLAG);
}
}
void EnLight_UpdateSwitch(Actor* thisx, GlobalContext* globalCtx) {
f32 intensity;
FlameParams* flameParams;
EnLight* this = THIS;
f32 scale;
flameParams = &D_80A9E840[this->actor.params & 0xF];
scale = this->actor.scale.x / ((f32)flameParams->scale * 0.0001);
if ((this->actor.params & 0x800) != 0) {
if (Flags_GetSwitch(globalCtx, (this->actor.params & 0x3F0) >> 4)) {
Math_ApproxF(&scale, 1.0f, 0.05f);
} else {
if (scale < 0.1f) {
Actor_SetScale(&this->actor, 0.0f);
return;
}
Math_ApproxF(&scale, 0.0f, 0.05f);
}
} else {
if (Flags_GetSwitch(globalCtx, (this->actor.params & 0x3F0) >> 4)) {
if (scale < 0.1f) {
Actor_SetScale(&this->actor, 0.0f);
return;
}
Math_ApproxF(&scale, 0.0f, 0.05f);
} else {
Math_ApproxF(&scale, 1.0f, 0.05f);
}
}
Actor_SetScale(&this->actor, ((f32)flameParams->scale * 0.0001) * scale);
intensity = (Math_Rand_ZeroOne() * 0.5f) + 0.5f;
Lights_SetPositionalLightColorAndRadius(&this->posLightInfo, (flameParams->primColor.r * intensity),
(flameParams->primColor.g * intensity),
(flameParams->primColor.b * intensity), 300.0f * scale);
EnLight_UpdatePosRot(this, globalCtx);
if (this->actor.params >= 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_TORCH - SFX_FLAG);
}
}
void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnLight* this = THIS;
s32 pad;
FlameParams* flameParams;
Gfx* dList;
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
if (1) {}
flameParams = &D_80A9E840[this->actor.params & 0xF];
gfxCtx = globalCtx->state.gfxCtx;
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_light.c", 441);
func_80093D84(globalCtx->state.gfxCtx);
if (this->actor.params >= 0) {
gSPSegment(
gfxCtx->polyXlu.p++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, 32, 128));
dList = D_0404D4E0;
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g,
flameParams->primColor.b, flameParams->primColor.a);
gDPSetEnvColor(gfxCtx->polyXlu.p++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b,
0);
} else {
gSPSegment(gfxCtx->polyXlu.p++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63),
(this->timer * -6) & 127 * 1, 16, 32));
dList = D_05000440;
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0xC0, 0xC0, 255, 200, 0, 0);
gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 0);
}
Matrix_RotateY((s16)((func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y) + 0x8000) * (M_PI / 32768.0f),
MTXMODE_APPLY);
if (this->actor.params & 1) {
Matrix_RotateY(M_PI, MTXMODE_APPLY);
}
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_light.c", 488),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyXlu.p++, dList);
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_light.c", 491);
}

View file

@ -8,7 +8,9 @@ struct EnLight;
typedef struct EnLight {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x18];
/* 0x014C */ u8 timer;
/* 0x0150 */ z_Light* lightNode;
/* 0x0154 */ LightInfoPositional posLightInfo;
} EnLight; // size = 0x0164
extern const ActorInit En_Light_InitVars;

@ -1 +1 @@
Subproject commit a781b7b098472076f99f52e4ad214823ea91be2d
Subproject commit 15fcb21d2c4e2ef2f720d28a0f7dec259ddd06f5

View file

@ -809,6 +809,10 @@ D_040341FC = 0x040341FC;
D_060030D0 = 0x060030D0;
D_060032D8 = 0x060032D8;
// z_en_light
D_0404D4E0 = 0x0404D4E0;
D_05000440 = 0x05000440;
// z_en_okarina_Tag
D_02003C80 = 0x02003C80;
D_02005020 = 0x02005020;