1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

En_Dy_Extra OK and matching (#351)

* Almost done with en_dy_extra

* All matching other than draw function, which just has some stack issues + possibly a localGfxCtx issue.

* OK, one non-matching.

* z_en_dy_extra OK and matching

* Deleted asm and updated spec

* Changed colors to decimal and got rid of padding in the u8 array

* Ran format script again to clean up after last commit

* All requested fixes

* Made further requested changes
This commit is contained in:
fullgrowngaming 2020-08-27 23:30:09 -07:00 committed by GitHub
parent 88ad705457
commit 04a0d7c132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 118 additions and 441 deletions

View file

@ -1,4 +0,0 @@
glabel EnDyExtra_Destroy
/* 00000 809FF6F0 AFA40000 */ sw $a0, 0x0000($sp)
/* 00004 809FF6F4 03E00008 */ jr $ra
/* 00008 809FF6F8 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,192 +0,0 @@
.rdata
glabel D_809FFCA4
.asciz "../z_en_dy_extra.c"
.balign 4
glabel D_809FFCB8
.asciz "../z_en_dy_extra.c"
.balign 4
glabel D_809FFCCC
.asciz "../z_en_dy_extra.c"
.balign 4
.text
glabel EnDyExtra_Draw
/* 00274 809FF964 3C070602 */ lui $a3, 0x0602 ## $a3 = 06020000
/* 00278 809FF968 24E7BFB0 */ addiu $a3, $a3, 0xBFB0 ## $a3 = 0601BFB0
/* 0027C 809FF96C 00077900 */ sll $t7, $a3, 4
/* 00280 809FF970 000FC702 */ srl $t8, $t7, 28
/* 00284 809FF974 0018C880 */ sll $t9, $t8, 2
/* 00288 809FF978 3C0A8016 */ lui $t2, %hi(gSegments)
/* 0028C 809FF97C 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70
/* 00290 809FF980 01595021 */ addu $t2, $t2, $t9
/* 00294 809FF984 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000
/* 00298 809FF988 8D4A6FA8 */ lw $t2, %lo(gSegments)($t2)
/* 0029C 809FF98C 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF
/* 002A0 809FF990 00E15824 */ and $t3, $a3, $at
/* 002A4 809FF994 AFBF003C */ sw $ra, 0x003C($sp)
/* 002A8 809FF998 AFB00038 */ sw $s0, 0x0038($sp)
/* 002AC 809FF99C AFA40090 */ sw $a0, 0x0090($sp)
/* 002B0 809FF9A0 AFA50094 */ sw $a1, 0x0094($sp)
/* 002B4 809FF9A4 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 002B8 809FF9A8 014B3021 */ addu $a2, $t2, $t3
/* 002BC 809FF9AC 8CB00000 */ lw $s0, 0x0000($a1) ## 00000000
/* 002C0 809FF9B0 00C13021 */ addu $a2, $a2, $at
/* 002C4 809FF9B4 A3A00078 */ sb $zero, 0x0078($sp)
/* 002C8 809FF9B8 3C014370 */ lui $at, 0x4370 ## $at = 43700000
/* 002CC 809FF9BC 44813000 */ mtc1 $at, $f6 ## $f6 = 240.00
/* 002D0 809FF9C0 C4840158 */ lwc1 $f4, 0x0158($a0) ## 00000158
/* 002D4 809FF9C4 3C01437F */ lui $at, 0x437F ## $at = 437F0000
/* 002D8 809FF9C8 44819000 */ mtc1 $at, $f18 ## $f18 = 255.00
/* 002DC 809FF9CC 46062202 */ mul.s $f8, $f4, $f6
/* 002E0 809FF9D0 3C0380A0 */ lui $v1, %hi(D_809FFC50) ## $v1 = 80A00000
/* 002E4 809FF9D4 2463FC50 */ addiu $v1, $v1, %lo(D_809FFC50) ## $v1 = 809FFC50
/* 002E8 809FF9D8 27A50078 */ addiu $a1, $sp, 0x0078 ## $a1 = FFFFFFE8
/* 002EC 809FF9DC 2407001B */ addiu $a3, $zero, 0x001B ## $a3 = 0000001B
/* 002F0 809FF9E0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 002F4 809FF9E4 4600428D */ trunc.w.s $f10, $f8
/* 002F8 809FF9E8 440E5000 */ mfc1 $t6, $f10
/* 002FC 809FF9EC 00000000 */ nop
/* 00300 809FF9F0 A3AE0079 */ sb $t6, 0x0079($sp)
/* 00304 809FF9F4 C4900158 */ lwc1 $f16, 0x0158($a0) ## 00000158
/* 00308 809FF9F8 46128102 */ mul.s $f4, $f16, $f18
/* 0030C 809FF9FC 4600218D */ trunc.w.s $f6, $f4
/* 00310 809FFA00 44183000 */ mfc1 $t8, $f6
/* 00314 809FFA04 00000000 */ nop
/* 00318 809FFA08 A3B8007A */ sb $t8, 0x007A($sp)
.L809FFA0C:
/* 0031C 809FFA0C 90640000 */ lbu $a0, 0x0000($v1) ## 809FFC50
/* 00320 809FFA10 10800005 */ beq $a0, $zero, .L809FFA28
/* 00324 809FFA14 00A4C821 */ addu $t9, $a1, $a0
/* 00328 809FFA18 932A0000 */ lbu $t2, 0x0000($t9) ## 00000000
/* 0032C 809FFA1C 00025900 */ sll $t3, $v0, 4
/* 00330 809FFA20 00CB6821 */ addu $t5, $a2, $t3
/* 00334 809FFA24 A1AA000F */ sb $t2, 0x000F($t5) ## 0000000F
.L809FFA28:
/* 00338 809FFA28 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001
/* 0033C 809FFA2C 1447FFF7 */ bne $v0, $a3, .L809FFA0C
/* 00340 809FFA30 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 809FFC51
/* 00344 809FFA34 3C0680A0 */ lui $a2, %hi(D_809FFCA4) ## $a2 = 80A00000
/* 00348 809FFA38 24C6FCA4 */ addiu $a2, $a2, %lo(D_809FFCA4) ## $a2 = 809FFCA4
/* 0034C 809FFA3C 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFD4
/* 00350 809FFA40 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00354 809FFA44 0C031AB1 */ jal Graph_OpenDisps
/* 00358 809FFA48 24070126 */ addiu $a3, $zero, 0x0126 ## $a3 = 00000126
/* 0035C 809FFA4C 8FAE0094 */ lw $t6, 0x0094($sp)
/* 00360 809FFA50 0C024F61 */ jal func_80093D84
/* 00364 809FFA54 8DC40000 */ lw $a0, 0x0000($t6) ## 00000000
/* 00368 809FFA58 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 0036C 809FFA5C 8FA90094 */ lw $t1, 0x0094($sp)
/* 00370 809FFA60 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000
/* 00374 809FFA64 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
/* 00378 809FFA68 AE0C02D0 */ sw $t4, 0x02D0($s0) ## 000002D0
/* 0037C 809FFA6C 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020
/* 00380 809FFA70 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 00384 809FFA74 8D23009C */ lw $v1, 0x009C($t1) ## 0000009C
/* 00388 809FFA78 8D240000 */ lw $a0, 0x0000($t1) ## 00000000
/* 0038C 809FFA7C 24180020 */ addiu $t8, $zero, 0x0020 ## $t8 = 00000020
/* 00390 809FFA80 00030823 */ subu $at, $zero, $v1
/* 00394 809FFA84 000150C0 */ sll $t2, $at, 3
/* 00398 809FFA88 24190040 */ addiu $t9, $zero, 0x0040 ## $t9 = 00000040
/* 0039C 809FFA8C 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
/* 003A0 809FFA90 240D0010 */ addiu $t5, $zero, 0x0010 ## $t5 = 00000010
/* 003A4 809FFA94 240E0010 */ addiu $t6, $zero, 0x0010 ## $t6 = 00000010
/* 003A8 809FFA98 AFAE0028 */ sw $t6, 0x0028($sp)
/* 003AC 809FFA9C AFAD0024 */ sw $t5, 0x0024($sp)
/* 003B0 809FFAA0 AFAB0018 */ sw $t3, 0x0018($sp)
/* 003B4 809FFAA4 AFB90014 */ sw $t9, 0x0014($sp)
/* 003B8 809FFAA8 AFAA0020 */ sw $t2, 0x0020($sp)
/* 003BC 809FFAAC AFB80010 */ sw $t8, 0x0010($sp)
/* 003C0 809FFAB0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 003C4 809FFAB4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 003C8 809FFAB8 AFA20060 */ sw $v0, 0x0060($sp)
/* 003CC 809FFABC AFA3001C */ sw $v1, 0x001C($sp)
/* 003D0 809FFAC0 0C0253D0 */ jal Gfx_TwoTexScroll
/* 003D4 809FFAC4 00033040 */ sll $a2, $v1, 1
/* 003D8 809FFAC8 8FA80060 */ lw $t0, 0x0060($sp)
/* 003DC 809FFACC 3C0FE700 */ lui $t7, 0xE700 ## $t7 = E7000000
/* 003E0 809FFAD0 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000
/* 003E4 809FFAD4 AD020004 */ sw $v0, 0x0004($t0) ## 00000004
/* 003E8 809FFAD8 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 003EC 809FFADC 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003
/* 003F0 809FFAE0 3C0580A0 */ lui $a1, %hi(D_809FFCB8) ## $a1 = 80A00000
/* 003F4 809FFAE4 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
/* 003F8 809FFAE8 AE0C02D0 */ sw $t4, 0x02D0($s0) ## 000002D0
/* 003FC 809FFAEC AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 00400 809FFAF0 AC400004 */ sw $zero, 0x0004($v0) ## 00000004
/* 00404 809FFAF4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00408 809FFAF8 24A5FCB8 */ addiu $a1, $a1, %lo(D_809FFCB8) ## $a1 = 809FFCB8
/* 0040C 809FFAFC 24060133 */ addiu $a2, $zero, 0x0133 ## $a2 = 00000133
/* 00410 809FFB00 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 00414 809FFB04 AE1802D0 */ sw $t8, 0x02D0($s0) ## 000002D0
/* 00418 809FFB08 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 0041C 809FFB0C 8FAB0094 */ lw $t3, 0x0094($sp)
/* 00420 809FFB10 8D640000 */ lw $a0, 0x0000($t3) ## 00000000
/* 00424 809FFB14 0C0346A2 */ jal Matrix_NewMtx
/* 00428 809FFB18 AFA20058 */ sw $v0, 0x0058($sp)
/* 0042C 809FFB1C 8FA30058 */ lw $v1, 0x0058($sp)
/* 00430 809FFB20 3C0DFA00 */ lui $t5, 0xFA00 ## $t5 = FA000000
/* 00434 809FFB24 35AD0080 */ ori $t5, $t5, 0x0080 ## $t5 = FA000080
/* 00438 809FFB28 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 0043C 809FFB2C 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00440 809FFB30 8FA50090 */ lw $a1, 0x0090($sp)
/* 00444 809FFB34 3C0F80A0 */ lui $t7, %hi(D_809FFC40) ## $t7 = 80A00000
/* 00448 809FFB38 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008
/* 0044C 809FFB3C AE0A02D0 */ sw $t2, 0x02D0($s0) ## 000002D0
/* 00450 809FFB40 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
/* 00454 809FFB44 84AE0150 */ lh $t6, 0x0150($a1) ## 00000150
/* 00458 809FFB48 25EFFC40 */ addiu $t7, $t7, %lo(D_809FFC40) ## $t7 = 809FFC40
/* 0045C 809FFB4C 3C0680A0 */ lui $a2, %hi(D_809FFCCC) ## $a2 = 80A00000
/* 00460 809FFB50 000E6080 */ sll $t4, $t6, 2
/* 00464 809FFB54 018F1821 */ addu $v1, $t4, $t7
/* 00468 809FFB58 90790002 */ lbu $t9, 0x0002($v1) ## 00000002
/* 0046C 809FFB5C 906D0000 */ lbu $t5, 0x0000($v1) ## 00000000
/* 00470 809FFB60 90780001 */ lbu $t8, 0x0001($v1) ## 00000001
/* 00474 809FFB64 00195A00 */ sll $t3, $t9, 8
/* 00478 809FFB68 000D7600 */ sll $t6, $t5, 24
/* 0047C 809FFB6C 016E6025 */ or $t4, $t3, $t6 ## $t4 = 00000000
/* 00480 809FFB70 0018CC00 */ sll $t9, $t8, 16
/* 00484 809FFB74 01995025 */ or $t2, $t4, $t9 ## $t2 = 00000000
/* 00488 809FFB78 354D00FF */ ori $t5, $t2, 0x00FF ## $t5 = 000000FF
/* 0048C 809FFB7C AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004
/* 00490 809FFB80 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 00494 809FFB84 3C0EFB00 */ lui $t6, 0xFB00 ## $t6 = FB000000
/* 00498 809FFB88 3C0C80A0 */ lui $t4, %hi(D_809FFC48) ## $t4 = 80A00000
/* 0049C 809FFB8C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 004A0 809FFB90 AE0B02D0 */ sw $t3, 0x02D0($s0) ## 000002D0
/* 004A4 809FFB94 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
/* 004A8 809FFB98 84AF0150 */ lh $t7, 0x0150($a1) ## 00000150
/* 004AC 809FFB9C 258CFC48 */ addiu $t4, $t4, %lo(D_809FFC48) ## $t4 = 809FFC48
/* 004B0 809FFBA0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 004B4 809FFBA4 000FC080 */ sll $t8, $t7, 2
/* 004B8 809FFBA8 030C1821 */ addu $v1, $t8, $t4
/* 004BC 809FFBAC 906A0002 */ lbu $t2, 0x0002($v1) ## 00000002
/* 004C0 809FFBB0 906E0000 */ lbu $t6, 0x0000($v1) ## 00000000
/* 004C4 809FFBB4 90790001 */ lbu $t9, 0x0001($v1) ## 00000001
/* 004C8 809FFBB8 000A6A00 */ sll $t5, $t2, 8
/* 004CC 809FFBBC 000E7E00 */ sll $t7, $t6, 24
/* 004D0 809FFBC0 01AFC025 */ or $t8, $t5, $t7 ## $t8 = 809FFCFF
/* 004D4 809FFBC4 00195400 */ sll $t2, $t9, 16
/* 004D8 809FFBC8 030A5825 */ or $t3, $t8, $t2 ## $t3 = 809FFCFF
/* 004DC 809FFBCC 356E0080 */ ori $t6, $t3, 0x0080 ## $t6 = 809FFCFF
/* 004E0 809FFBD0 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004
/* 004E4 809FFBD4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
/* 004E8 809FFBD8 3C0C0602 */ lui $t4, 0x0602 ## $t4 = 06020000
/* 004EC 809FFBDC 258CC160 */ addiu $t4, $t4, 0xC160 ## $t4 = 0601C160
/* 004F0 809FFBE0 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008
/* 004F4 809FFBE4 AE0D02D0 */ sw $t5, 0x02D0($s0) ## 000002D0
/* 004F8 809FFBE8 3C0FDE00 */ lui $t7, 0xDE00 ## $t7 = DE000000
/* 004FC 809FFBEC 24C6FCCC */ addiu $a2, $a2, %lo(D_809FFCCC) ## $a2 = 809FFCCC
/* 00500 809FFBF0 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFD4
/* 00504 809FFBF4 24070145 */ addiu $a3, $zero, 0x0145 ## $a3 = 00000145
/* 00508 809FFBF8 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 0050C 809FFBFC 0C031AD5 */ jal Graph_CloseDisps
/* 00510 809FFC00 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004
/* 00514 809FFC04 8FBF003C */ lw $ra, 0x003C($sp)
/* 00518 809FFC08 8FB00038 */ lw $s0, 0x0038($sp)
/* 0051C 809FFC0C 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000
/* 00520 809FFC10 03E00008 */ jr $ra
/* 00524 809FFC14 00000000 */ nop
/* 00528 809FFC18 00000000 */ nop
/* 0052C 809FFC1C 00000000 */ nop

View file

@ -1,66 +0,0 @@
.rdata
glabel D_809FFC70
.asciz "\n\n"
.balign 4
glabel D_809FFC74
.asciz "\x1b[33m %d\n\x1b[m"
.balign 4
.late_rodata
glabel D_809FFCE0
.float 0.025
glabel D_809FFCE4
.word 0x3D1FBE77
glabel D_809FFCE8
.word 0xBE4CCCCD
.text
glabel EnDyExtra_Init
/* 0000C 809FF6FC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00010 809FF700 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00014 809FF704 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00018 809FF708 3C0480A0 */ lui $a0, %hi(D_809FFC70) ## $a0 = 80A00000
/* 0001C 809FF70C AFA5001C */ sw $a1, 0x001C($sp)
/* 00020 809FF710 2484FC70 */ addiu $a0, $a0, %lo(D_809FFC70) ## $a0 = 809FFC70
/* 00024 809FF714 0C00084C */ jal osSyncPrintf
/* 00028 809FF718 AFA60018 */ sw $a2, 0x0018($sp)
/* 0002C 809FF71C 8FA60018 */ lw $a2, 0x0018($sp)
/* 00030 809FF720 3C0480A0 */ lui $a0, %hi(D_809FFC74) ## $a0 = 80A00000
/* 00034 809FF724 2484FC74 */ addiu $a0, $a0, %lo(D_809FFC74) ## $a0 = 809FFC74
/* 00038 809FF728 0C00084C */ jal osSyncPrintf
/* 0003C 809FF72C 84C5001C */ lh $a1, 0x001C($a2) ## 0000001C
/* 00040 809FF730 8FA60018 */ lw $a2, 0x0018($sp)
/* 00044 809FF734 3C0180A0 */ lui $at, %hi(D_809FFCE0) ## $at = 80A00000
/* 00048 809FF738 C420FCE0 */ lwc1 $f0, %lo(D_809FFCE0)($at)
/* 0004C 809FF73C 84CE001C */ lh $t6, 0x001C($a2) ## 0000001C
/* 00050 809FF740 8CD80024 */ lw $t8, 0x0024($a2) ## 00000024
/* 00054 809FF744 3C0180A0 */ lui $at, %hi(D_809FFCE4) ## $at = 80A00000
/* 00058 809FF748 E4C0015C */ swc1 $f0, 0x015C($a2) ## 0000015C
/* 0005C 809FF74C A4CE0150 */ sh $t6, 0x0150($a2) ## 00000150
/* 00060 809FF750 C424FCE4 */ lwc1 $f4, %lo(D_809FFCE4)($at)
/* 00064 809FF754 ACD80168 */ sw $t8, 0x0168($a2) ## 00000168
/* 00068 809FF758 8CD8002C */ lw $t8, 0x002C($a2) ## 0000002C
/* 0006C 809FF75C 8CCF0028 */ lw $t7, 0x0028($a2) ## 00000028
/* 00070 809FF760 3C0180A0 */ lui $at, %hi(D_809FFCE8) ## $at = 80A00000
/* 00074 809FF764 E4C00164 */ swc1 $f0, 0x0164($a2) ## 00000164
/* 00078 809FF768 E4C40160 */ swc1 $f4, 0x0160($a2) ## 00000160
/* 0007C 809FF76C ACD80170 */ sw $t8, 0x0170($a2) ## 00000170
/* 00080 809FF770 ACCF016C */ sw $t7, 0x016C($a2) ## 0000016C
/* 00084 809FF774 C426FCE8 */ lwc1 $f6, %lo(D_809FFCE8)($at)
/* 00088 809FF778 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 0008C 809FF77C 44814000 */ mtc1 $at, $f8 ## $f8 = 1.00
/* 00090 809FF780 3C0880A0 */ lui $t0, %hi(func_809FF7AC) ## $t0 = 80A00000
/* 00094 809FF784 2419003C */ addiu $t9, $zero, 0x003C ## $t9 = 0000003C
/* 00098 809FF788 2508F7AC */ addiu $t0, $t0, %lo(func_809FF7AC) ## $t0 = 809FF7AC
/* 0009C 809FF78C A4D90154 */ sh $t9, 0x0154($a2) ## 00000154
/* 000A0 809FF790 ACC8014C */ sw $t0, 0x014C($a2) ## 0000014C
/* 000A4 809FF794 E4C6006C */ swc1 $f6, 0x006C($a2) ## 0000006C
/* 000A8 809FF798 E4C80158 */ swc1 $f8, 0x0158($a2) ## 00000158
/* 000AC 809FF79C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 000B0 809FF7A0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 000B4 809FF7A4 03E00008 */ jr $ra
/* 000B8 809FF7A8 00000000 */ nop

View file

@ -1,31 +0,0 @@
glabel EnDyExtra_Update
/* 00208 809FF8F8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0020C 809FF8FC AFBF0014 */ sw $ra, 0x0014($sp)
/* 00210 809FF900 AFA5001C */ sw $a1, 0x001C($sp)
/* 00214 809FF904 84820154 */ lh $v0, 0x0154($a0) ## 00000154
/* 00218 809FF908 240500C4 */ addiu $a1, $zero, 0x00C4 ## $a1 = 000000C4
/* 0021C 809FF90C 10400002 */ beq $v0, $zero, .L809FF918
/* 00220 809FF910 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00224 809FF914 A48E0154 */ sh $t6, 0x0154($a0) ## 00000154
.L809FF918:
/* 00228 809FF918 C484015C */ lwc1 $f4, 0x015C($a0) ## 0000015C
/* 0022C 809FF91C C4860160 */ lwc1 $f6, 0x0160($a0) ## 00000160
/* 00230 809FF920 C4880164 */ lwc1 $f8, 0x0164($a0) ## 00000164
/* 00234 809FF924 E4840050 */ swc1 $f4, 0x0050($a0) ## 00000050
/* 00238 809FF928 E4860054 */ swc1 $f6, 0x0054($a0) ## 00000054
/* 0023C 809FF92C E4880058 */ swc1 $f8, 0x0058($a0) ## 00000058
/* 00240 809FF930 0C00BE0A */ jal Audio_PlayActorSound2
/* 00244 809FF934 AFA40018 */ sw $a0, 0x0018($sp)
/* 00248 809FF938 8FA40018 */ lw $a0, 0x0018($sp)
/* 0024C 809FF93C 8FA5001C */ lw $a1, 0x001C($sp)
/* 00250 809FF940 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C
/* 00254 809FF944 0320F809 */ jalr $ra, $t9
/* 00258 809FF948 00000000 */ nop
/* 0025C 809FF94C 0C00B638 */ jal Actor_MoveForward
/* 00260 809FF950 8FA40018 */ lw $a0, 0x0018($sp)
/* 00264 809FF954 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00268 809FF958 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0026C 809FF95C 03E00008 */ jr $ra
/* 00270 809FF960 00000000 */ nop

View file

@ -1,42 +0,0 @@
glabel func_809FF7AC
/* 000BC 809FF7AC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 000C0 809FF7B0 AFB00018 */ sw $s0, 0x0018($sp)
/* 000C4 809FF7B4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 000C8 809FF7B8 AFBF001C */ sw $ra, 0x001C($sp)
/* 000CC 809FF7BC AFA50024 */ sw $a1, 0x0024($sp)
/* 000D0 809FF7C0 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000
/* 000D4 809FF7C4 3C073BA3 */ lui $a3, 0x3BA3 ## $a3 = 3BA30000
/* 000D8 809FF7C8 34E7D70A */ ori $a3, $a3, 0xD70A ## $a3 = 3BA3D70A
/* 000DC 809FF7CC 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD
/* 000E0 809FF7D0 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 000E4 809FF7D4 0C01E107 */ jal Math_SmoothScaleMaxF
/* 000E8 809FF7D8 2484006C */ addiu $a0, $a0, 0x006C ## $a0 = 0000006C
/* 000EC 809FF7DC 3C01C25C */ lui $at, 0xC25C ## $at = C25C0000
/* 000F0 809FF7E0 44813000 */ mtc1 $at, $f6 ## $f6 = -55.00
/* 000F4 809FF7E4 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
/* 000F8 809FF7E8 4606203C */ c.lt.s $f4, $f6
/* 000FC 809FF7EC 00000000 */ nop
/* 00100 809FF7F0 45020005 */ bc1fl .L809FF808
/* 00104 809FF7F4 860E0154 */ lh $t6, 0x0154($s0) ## 00000154
/* 00108 809FF7F8 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 0010C 809FF7FC 00000000 */ nop
/* 00110 809FF800 E6080060 */ swc1 $f8, 0x0060($s0) ## 00000060
/* 00114 809FF804 860E0154 */ lh $t6, 0x0154($s0) ## 00000154
.L809FF808:
/* 00118 809FF808 55C00009 */ bnel $t6, $zero, .L809FF830
/* 0011C 809FF80C 8FBF001C */ lw $ra, 0x001C($sp)
/* 00120 809FF810 860F0152 */ lh $t7, 0x0152($s0) ## 00000152
/* 00124 809FF814 3C1980A0 */ lui $t9, %hi(func_809FF840) ## $t9 = 80A00000
/* 00128 809FF818 241800C8 */ addiu $t8, $zero, 0x00C8 ## $t8 = 000000C8
/* 0012C 809FF81C 11E00003 */ beq $t7, $zero, .L809FF82C
/* 00130 809FF820 2739F840 */ addiu $t9, $t9, %lo(func_809FF840) ## $t9 = 809FF840
/* 00134 809FF824 A6180154 */ sh $t8, 0x0154($s0) ## 00000154
/* 00138 809FF828 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
.L809FF82C:
/* 0013C 809FF82C 8FBF001C */ lw $ra, 0x001C($sp)
.L809FF830:
/* 00140 809FF830 8FB00018 */ lw $s0, 0x0018($sp)
/* 00144 809FF834 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00148 809FF838 03E00008 */ jr $ra
/* 0014C 809FF83C 00000000 */ nop

View file

@ -1,58 +0,0 @@
.late_rodata
glabel D_809FFCEC
.float 0.02
.text
glabel func_809FF840
/* 00150 809FF840 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00154 809FF844 AFB00018 */ sw $s0, 0x0018($sp)
/* 00158 809FF848 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0015C 809FF84C AFBF001C */ sw $ra, 0x001C($sp)
/* 00160 809FF850 AFA50024 */ sw $a1, 0x0024($sp)
/* 00164 809FF854 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000
/* 00168 809FF858 3C073BA3 */ lui $a3, 0x3BA3 ## $a3 = 3BA30000
/* 0016C 809FF85C 34E7D70A */ ori $a3, $a3, 0xD70A ## $a3 = 3BA3D70A
/* 00170 809FF860 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD
/* 00174 809FF864 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00178 809FF868 0C01E107 */ jal Math_SmoothScaleMaxF
/* 0017C 809FF86C 2484006C */ addiu $a0, $a0, 0x006C ## $a0 = 0000006C
/* 00180 809FF870 860E0154 */ lh $t6, 0x0154($s0) ## 00000154
/* 00184 809FF874 3C0180A0 */ lui $at, %hi(D_809FFCEC) ## $at = 80A00000
/* 00188 809FF878 11C0000A */ beq $t6, $zero, .L809FF8A4
/* 0018C 809FF87C 00000000 */ nop
/* 00190 809FF880 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
/* 00194 809FF884 C426FCEC */ lwc1 $f6, %lo(D_809FFCEC)($at)
/* 00198 809FF888 3C053CF5 */ lui $a1, 0x3CF5 ## $a1 = 3CF50000
/* 0019C 809FF88C 34A5C28F */ ori $a1, $a1, 0xC28F ## $a1 = 3CF5C28F
/* 001A0 809FF890 4606203C */ c.lt.s $f4, $f6
/* 001A4 809FF894 26040158 */ addiu $a0, $s0, 0x0158 ## $a0 = 00000158
/* 001A8 809FF898 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000
/* 001AC 809FF89C 45000005 */ bc1f .L809FF8B4
/* 001B0 809FF8A0 00000000 */ nop
.L809FF8A4:
/* 001B4 809FF8A4 0C00B55C */ jal Actor_Kill
/* 001B8 809FF8A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 001BC 809FF8AC 1000000E */ beq $zero, $zero, .L809FF8E8
/* 001C0 809FF8B0 8FBF001C */ lw $ra, 0x001C($sp)
.L809FF8B4:
/* 001C4 809FF8B4 0C01E123 */ jal Math_SmoothDownscaleMaxF
/* 001C8 809FF8B8 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 0000CCCD
/* 001CC 809FF8BC 3C01C25C */ lui $at, 0xC25C ## $at = C25C0000
/* 001D0 809FF8C0 44815000 */ mtc1 $at, $f10 ## $f10 = -55.00
/* 001D4 809FF8C4 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028
/* 001D8 809FF8C8 460A403C */ c.lt.s $f8, $f10
/* 001DC 809FF8CC 00000000 */ nop
/* 001E0 809FF8D0 45020005 */ bc1fl .L809FF8E8
/* 001E4 809FF8D4 8FBF001C */ lw $ra, 0x001C($sp)
/* 001E8 809FF8D8 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 001EC 809FF8DC 00000000 */ nop
/* 001F0 809FF8E0 E6100060 */ swc1 $f16, 0x0060($s0) ## 00000060
/* 001F4 809FF8E4 8FBF001C */ lw $ra, 0x001C($sp)
.L809FF8E8:
/* 001F8 809FF8E8 8FB00018 */ lw $s0, 0x0018($sp)
/* 001FC 809FF8EC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00200 809FF8F0 03E00008 */ jr $ra
/* 00204 809FF8F4 00000000 */ nop

View file

@ -1,24 +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_Dy_Extra_InitVars
.word 0x01840600, 0x00000030, 0x000A0000, 0x00000174
.word EnDyExtra_Init
.word EnDyExtra_Destroy
.word EnDyExtra_Update
.word EnDyExtra_Draw
glabel D_809FFC40
.word 0xFFFFAAFF, 0xFFFFAAFF
glabel D_809FFC48
.word 0xFF64FFFF, 0x64FFFFFF
glabel D_809FFC50
.word 0x02010102, 0x00000201, 0x00020100, 0x02010002, 0x01000201, 0x00020100, 0x01020000, 0x00000000

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_809FFCF0
.incbin "baserom/ovl_En_Dy_Extra", 0x600, 0x000000A0

3
spec
View file

@ -2289,8 +2289,7 @@ endseg
beginseg
name "ovl_En_Dy_Extra"
include "build/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o"
include "build/data/overlays/actors/z_en_dy_extra.data.o"
include "build/data/overlays/actors/z_en_dy_extra.reloc.o"
include "build/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o"
endseg
beginseg

View file

@ -1,4 +1,11 @@
/*
* File: z_en_dy_extra.c
* Overlay: ovl_En_Dy_Extra
* Description: Spiral Beams (Great Fairy Fountains)
*/
#include "z_en_dy_extra.h"
#include "vt.h"
#define FLAGS 0x00000030
@ -9,7 +16,9 @@ void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx);
void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
void func_809FF7AC(EnDyExtra* this, GlobalContext* globalCtx);
void func_809FF840(EnDyExtra* this, GlobalContext* globalCtx);
const ActorInit En_Dy_Extra_InitVars = {
ACTOR_EN_DY_EXTRA,
ACTORTYPE_PROP,
@ -21,15 +30,102 @@ const ActorInit En_Dy_Extra_InitVars = {
(ActorFunc)EnDyExtra_Update,
(ActorFunc)EnDyExtra_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Init.s")
extern Vtx D_0601BFB0[];
extern Gfx D_0601C160[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF7AC.s")
void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF840.s")
void EnDyExtra_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDyExtra* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Update.s")
osSyncPrintf("\n\n");
// "Big fairy effect"
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 大妖精効果 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
this->type = this->actor.params;
this->unk_15C.x = 0.025f;
this->unk_15C.y = 0.039f;
this->unk_15C.z = 0.025f;
this->unk_168 = this->actor.posRot.pos;
this->actor.gravity = -0.2f;
this->unk_158 = 1.0f;
this->unk_154 = 0x3C;
this->actionFunc = func_809FF7AC;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Draw.s")
void func_809FF7AC(EnDyExtra* this, GlobalContext* globalCtx) {
Math_SmoothScaleMaxF(&this->actor.gravity, 0.0f, 0.1f, 0.005f);
if (this->actor.posRot.pos.y < -55.0f) {
this->actor.velocity.y = 0.0f;
}
if (this->unk_154 == 0 && this->unk_152 != 0) {
this->unk_154 = 0xC8;
this->actionFunc = func_809FF840;
}
}
void func_809FF840(EnDyExtra* this, GlobalContext* globalCtx) {
Math_SmoothScaleMaxF(&this->actor.gravity, 0.0f, 0.1f, 0.005f);
if (this->unk_154 == 0 || this->unk_158 < 0.02f) {
Actor_Kill(&this->actor);
return;
}
Math_SmoothDownscaleMaxF(&this->unk_158, 0.03f, 0.05f);
if (this->actor.posRot.pos.y < -55.0f) {
this->actor.velocity.y = 0.0f;
}
}
void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx) {
EnDyExtra* this = THIS;
DECR(this->unk_154);
this->actor.scale.x = this->unk_15C.x;
this->actor.scale.y = this->unk_15C.y;
this->actor.scale.z = this->unk_15C.z;
Audio_PlayActorSound2(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG);
this->actionFunc(this, globalCtx);
Actor_MoveForward(&this->actor);
}
void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) {
static Color_RGBA8_n primColors[] = { { 255, 255, 170, 255 }, { 255, 255, 170, 255 } };
static Color_RGBA8_n envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } };
static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02,
0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02 };
EnDyExtra* this = THIS;
s32 pad;
GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx;
Vtx* vertices = SEGMENTED_TO_VIRTUAL(D_0601BFB0);
s32 i;
u8 unk[3];
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
unk[0] = 0.0f;
unk[1] = (s8)(this->unk_158 * 240.0f);
unk[2] = (s8)(this->unk_158 * 255.0f);
for (i = 0; i < 27; i++) {
if (D_809FFC50[i]) {
vertices[i].v.cn[3] = unk[D_809FFC50[i]];
}
}
gfxCtx = localGfxCtx;
Graph_OpenDisps(dispRefs, localGfxCtx, "../z_en_dy_extra.c", 294);
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(gfxCtx->polyXlu.p++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->state.frames * 2, 0, 0x20, 0x40, 1,
globalCtx->state.frames, globalCtx->state.frames * -8, 0x10, 0x10));
gDPPipeSync(gfxCtx->polyXlu.p++);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_dy_extra.c", 307),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0x80, primColors[this->type].r, primColors[this->type].g,
primColors[this->type].b, 255);
gDPSetEnvColor(gfxCtx->polyXlu.p++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b, 128);
gSPDisplayList(gfxCtx->polyXlu.p++, D_0601C160);
Graph_CloseDisps(dispRefs, localGfxCtx, "../z_en_dy_extra.c", 325);
}

View file

@ -6,9 +6,17 @@
struct EnDyExtra;
typedef void (*EnDyExtraActionFunc)(struct EnDyExtra*, GlobalContext*);
typedef struct EnDyExtra {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x28];
/* 0x014C */ EnDyExtraActionFunc actionFunc;
/* 0x0150 */ s16 type;
/* 0x0152 */ s16 unk_152;
/* 0x0154 */ s16 unk_154;
/* 0x0158 */ f32 unk_158;
/* 0x015C */ Vec3f unk_15C;
/* 0x0168 */ Vec3f unk_168;
} EnDyExtra; // size = 0x0174
extern const ActorInit En_Dy_Extra_InitVars;

View file

@ -884,3 +884,7 @@ D_060006B0 = 0x060006B0;
D_0600045C = 0x0600045C;
D_06005EA0 = 0x06005EA0;
D_0600018C = 0x0600018C;
// z_en_dy_extra
D_0601BFB0 = 0x0601BFB0;
D_0601C160 = 0x0601C160;