mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
BgMizuWater OK (#359)
* BgMizuWater OK * Renaming * Fix formatting * Cleanup, use new gfx functions * Fix stack issue * PR fixes * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * PR fixes * More PR fixes * Fix formatting Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
c864ce0de2
commit
0dca636f4a
14 changed files with 334 additions and 1019 deletions
|
@ -1,4 +0,0 @@
|
|||
glabel BgMizuWater_Destroy
|
||||
/* 0043C 8089FCEC AFA40000 */ sw $a0, 0x0000($sp)
|
||||
/* 00440 8089FCF0 03E00008 */ jr $ra
|
||||
/* 00444 8089FCF4 AFA50004 */ sw $a1, 0x0004($sp)
|
|
@ -1,109 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A05A8
|
||||
.asciz "../z_bg_mizu_water.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A05C0
|
||||
.asciz "../z_bg_mizu_water.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A05D8
|
||||
.asciz "../z_bg_mizu_water.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel BgMizuWater_Draw
|
||||
/* 00AE8 808A0398 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88
|
||||
/* 00AEC 808A039C AFB10038 */ sw $s1, 0x0038($sp)
|
||||
/* 00AF0 808A03A0 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
|
||||
/* 00AF4 808A03A4 AFBF003C */ sw $ra, 0x003C($sp)
|
||||
/* 00AF8 808A03A8 AFB00034 */ sw $s0, 0x0034($sp)
|
||||
/* 00AFC 808A03AC AFA40078 */ sw $a0, 0x0078($sp)
|
||||
/* 00B00 808A03B0 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
|
||||
/* 00B04 808A03B4 3C06808A */ lui $a2, %hi(D_808A05A8) ## $a2 = 808A0000
|
||||
/* 00B08 808A03B8 24C605A8 */ addiu $a2, $a2, %lo(D_808A05A8) ## $a2 = 808A05A8
|
||||
/* 00B0C 808A03BC 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFE4
|
||||
/* 00B10 808A03C0 240702E2 */ addiu $a3, $zero, 0x02E2 ## $a3 = 000002E2
|
||||
/* 00B14 808A03C4 0C031AB1 */ jal Graph_OpenDisps
|
||||
/* 00B18 808A03C8 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
|
||||
/* 00B1C 808A03CC 3C030001 */ lui $v1, 0x0001 ## $v1 = 00010000
|
||||
/* 00B20 808A03D0 00711821 */ addu $v1, $v1, $s1
|
||||
/* 00B24 808A03D4 8C631DE4 */ lw $v1, 0x1DE4($v1) ## 00011DE4
|
||||
/* 00B28 808A03D8 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00B2C 808A03DC 0C024F61 */ jal func_80093D84
|
||||
/* 00B30 808A03E0 AFA30070 */ sw $v1, 0x0070($sp)
|
||||
/* 00B34 808A03E4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00B38 808A03E8 8FA70070 */ lw $a3, 0x0070($sp)
|
||||
/* 00B3C 808A03EC 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000
|
||||
/* 00B40 808A03F0 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
|
||||
/* 00B44 808A03F4 AE0E02D0 */ sw $t6, 0x02D0($s0) ## 000002D0
|
||||
/* 00B48 808A03F8 35EF0030 */ ori $t7, $t7, 0x0030 ## $t7 = DB060030
|
||||
/* 00B4C 808A03FC AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
|
||||
/* 00B50 808A0400 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00B54 808A0404 24180020 */ addiu $t8, $zero, 0x0020 ## $t8 = 00000020
|
||||
/* 00B58 808A0408 24190020 */ addiu $t9, $zero, 0x0020 ## $t9 = 00000020
|
||||
/* 00B5C 808A040C 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001
|
||||
/* 00B60 808A0410 240A0020 */ addiu $t2, $zero, 0x0020 ## $t2 = 00000020
|
||||
/* 00B64 808A0414 240B0020 */ addiu $t3, $zero, 0x0020 ## $t3 = 00000020
|
||||
/* 00B68 808A0418 00073023 */ subu $a2, $zero, $a3
|
||||
/* 00B6C 808A041C AFA60020 */ sw $a2, 0x0020($sp)
|
||||
/* 00B70 808A0420 AFAB0028 */ sw $t3, 0x0028($sp)
|
||||
/* 00B74 808A0424 AFAA0024 */ sw $t2, 0x0024($sp)
|
||||
/* 00B78 808A0428 AFA90018 */ sw $t1, 0x0018($sp)
|
||||
/* 00B7C 808A042C AFB90014 */ sw $t9, 0x0014($sp)
|
||||
/* 00B80 808A0430 AFB80010 */ sw $t8, 0x0010($sp)
|
||||
/* 00B84 808A0434 AFA0001C */ sw $zero, 0x001C($sp)
|
||||
/* 00B88 808A0438 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
|
||||
/* 00B8C 808A043C 0C0253D0 */ jal Gfx_TwoTexScroll
|
||||
/* 00B90 808A0440 AFA20058 */ sw $v0, 0x0058($sp)
|
||||
/* 00B94 808A0444 8FA80058 */ lw $t0, 0x0058($sp)
|
||||
/* 00B98 808A0448 3C0DDA38 */ lui $t5, 0xDA38 ## $t5 = DA380000
|
||||
/* 00B9C 808A044C 35AD0003 */ ori $t5, $t5, 0x0003 ## $t5 = DA380003
|
||||
/* 00BA0 808A0450 AD020004 */ sw $v0, 0x0004($t0) ## 00000004
|
||||
/* 00BA4 808A0454 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00BA8 808A0458 3C05808A */ lui $a1, %hi(D_808A05C0) ## $a1 = 808A0000
|
||||
/* 00BAC 808A045C 24A505C0 */ addiu $a1, $a1, %lo(D_808A05C0) ## $a1 = 808A05C0
|
||||
/* 00BB0 808A0460 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
|
||||
/* 00BB4 808A0464 AE0C02D0 */ sw $t4, 0x02D0($s0) ## 000002D0
|
||||
/* 00BB8 808A0468 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
|
||||
/* 00BBC 808A046C 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00BC0 808A0470 240602ED */ addiu $a2, $zero, 0x02ED ## $a2 = 000002ED
|
||||
/* 00BC4 808A0474 0C0346A2 */ jal Matrix_NewMtx
|
||||
/* 00BC8 808A0478 AFA20054 */ sw $v0, 0x0054($sp)
|
||||
/* 00BCC 808A047C 8FA30054 */ lw $v1, 0x0054($sp)
|
||||
/* 00BD0 808A0480 3C0FFB00 */ lui $t7, 0xFB00 ## $t7 = FB000000
|
||||
/* 00BD4 808A0484 2418FF80 */ addiu $t8, $zero, 0xFF80 ## $t8 = FFFFFF80
|
||||
/* 00BD8 808A0488 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
|
||||
/* 00BDC 808A048C 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00BE0 808A0490 3C09FA00 */ lui $t1, 0xFA00 ## $t1 = FA000000
|
||||
/* 00BE4 808A0494 240AFF66 */ addiu $t2, $zero, 0xFF66 ## $t2 = FFFFFF66
|
||||
/* 00BE8 808A0498 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
|
||||
/* 00BEC 808A049C AE0E02D0 */ sw $t6, 0x02D0($s0) ## 000002D0
|
||||
/* 00BF0 808A04A0 AC580004 */ sw $t8, 0x0004($v0) ## 00000004
|
||||
/* 00BF4 808A04A4 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
|
||||
/* 00BF8 808A04A8 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00BFC 808A04AC 3C0D0600 */ lui $t5, 0x0600 ## $t5 = 06000000
|
||||
/* 00C00 808A04B0 25AD4B20 */ addiu $t5, $t5, 0x4B20 ## $t5 = 06004B20
|
||||
/* 00C04 808A04B4 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
|
||||
/* 00C08 808A04B8 AE1902D0 */ sw $t9, 0x02D0($s0) ## 000002D0
|
||||
/* 00C0C 808A04BC AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004
|
||||
/* 00C10 808A04C0 AC490000 */ sw $t1, 0x0000($v0) ## 00000000
|
||||
/* 00C14 808A04C4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00C18 808A04C8 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000
|
||||
/* 00C1C 808A04CC 3C06808A */ lui $a2, %hi(D_808A05D8) ## $a2 = 808A0000
|
||||
/* 00C20 808A04D0 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
|
||||
/* 00C24 808A04D4 AE0B02D0 */ sw $t3, 0x02D0($s0) ## 000002D0
|
||||
/* 00C28 808A04D8 AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004
|
||||
/* 00C2C 808A04DC AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
|
||||
/* 00C30 808A04E0 8E250000 */ lw $a1, 0x0000($s1) ## 00000000
|
||||
/* 00C34 808A04E4 24C605D8 */ addiu $a2, $a2, %lo(D_808A05D8) ## $a2 = 808A05D8
|
||||
/* 00C38 808A04E8 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFE4
|
||||
/* 00C3C 808A04EC 0C031AD5 */ jal Graph_CloseDisps
|
||||
/* 00C40 808A04F0 240702F4 */ addiu $a3, $zero, 0x02F4 ## $a3 = 000002F4
|
||||
/* 00C44 808A04F4 8FBF003C */ lw $ra, 0x003C($sp)
|
||||
/* 00C48 808A04F8 8FB00034 */ lw $s0, 0x0034($sp)
|
||||
/* 00C4C 808A04FC 8FB10038 */ lw $s1, 0x0038($sp)
|
||||
/* 00C50 808A0500 03E00008 */ jr $ra
|
||||
/* 00C54 808A0504 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000
|
||||
/* 00C58 808A0508 00000000 */ nop
|
||||
/* 00C5C 808A050C 00000000 */ nop
|
|
@ -1,214 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A0580
|
||||
.asciz "<コンストラクト>%x %x %x\n"
|
||||
.balign 4
|
||||
|
||||
.late_rodata
|
||||
glabel jtbl_808A05F0
|
||||
.word L8089FAB4
|
||||
.word L8089FCCC
|
||||
.word L8089FBFC
|
||||
.word L8089FC3C
|
||||
.word L8089FC84
|
||||
|
||||
.text
|
||||
glabel BgMizuWater_Init
|
||||
/* 0018C 8089FA3C 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 00190 8089FA40 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00194 8089FA44 AFB10018 */ sw $s1, 0x0018($sp)
|
||||
/* 00198 8089FA48 AFB00014 */ sw $s0, 0x0014($sp)
|
||||
/* 0019C 8089FA4C 8CAE07C0 */ lw $t6, 0x07C0($a1) ## 000007C0
|
||||
/* 001A0 8089FA50 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
|
||||
/* 001A4 8089FA54 3C05808A */ lui $a1, %hi(D_808A0578) ## $a1 = 808A0000
|
||||
/* 001A8 8089FA58 8DCF0028 */ lw $t7, 0x0028($t6) ## 00000028
|
||||
/* 001AC 8089FA5C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 001B0 8089FA60 24A50578 */ addiu $a1, $a1, %lo(D_808A0578) ## $a1 = 808A0578
|
||||
/* 001B4 8089FA64 AFAF0034 */ sw $t7, 0x0034($sp)
|
||||
/* 001B8 8089FA68 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 001BC 8089FA6C 0002CA03 */ sra $t9, $v0, 8
|
||||
/* 001C0 8089FA70 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000
|
||||
/* 001C4 8089FA74 305800FF */ andi $t8, $v0, 0x00FF ## $t8 = 00000000
|
||||
/* 001C8 8089FA78 AC980150 */ sw $t8, 0x0150($a0) ## 00000150
|
||||
/* 001CC 8089FA7C 0C01E037 */ jal Actor_ProcessInitChain
|
||||
|
||||
/* 001D0 8089FA80 AC88015C */ sw $t0, 0x015C($a0) ## 0000015C
|
||||
/* 001D4 8089FA84 8E090150 */ lw $t1, 0x0150($s0) ## 00000150
|
||||
/* 001D8 8089FA88 C6000028 */ lwc1 $f0, 0x0028($s0) ## 00000028
|
||||
/* 001DC 8089FA8C 2D210005 */ sltiu $at, $t1, 0x0005
|
||||
/* 001E0 8089FA90 E6000158 */ swc1 $f0, 0x0158($s0) ## 00000158
|
||||
/* 001E4 8089FA94 1020008D */ beq $at, $zero, .L8089FCCC
|
||||
/* 001E8 8089FA98 E6000154 */ swc1 $f0, 0x0154($s0) ## 00000154
|
||||
/* 001EC 8089FA9C 00094880 */ sll $t1, $t1, 2
|
||||
/* 001F0 8089FAA0 3C01808A */ lui $at, %hi(jtbl_808A05F0) ## $at = 808A0000
|
||||
/* 001F4 8089FAA4 00290821 */ addu $at, $at, $t1
|
||||
/* 001F8 8089FAA8 8C2905F0 */ lw $t1, %lo(jtbl_808A05F0)($at)
|
||||
/* 001FC 8089FAAC 01200008 */ jr $t1
|
||||
/* 00200 8089FAB0 00000000 */ nop
|
||||
glabel L8089FAB4
|
||||
/* 00204 8089FAB4 3C0A8016 */ lui $t2, %hi(gGameInfo)
|
||||
/* 00208 8089FAB8 8D4AFA90 */ lw $t2, %lo(gGameInfo)($t2)
|
||||
/* 0020C 8089FABC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 00210 8089FAC0 854B1532 */ lh $t3, 0x1532($t2) ## 80161532
|
||||
/* 00214 8089FAC4 55600012 */ bnel $t3, $zero, .L8089FB10
|
||||
/* 00218 8089FAC8 2404FFFF */ addiu $a0, $zero, 0xFFFF ## $a0 = FFFFFFFF
|
||||
/* 0021C 8089FACC 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00220 8089FAD0 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 00224 8089FAD4 AFA20024 */ sw $v0, 0x0024($sp)
|
||||
/* 00228 8089FAD8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 0022C 8089FADC 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00230 8089FAE0 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 00234 8089FAE4 AFA20028 */ sw $v0, 0x0028($sp)
|
||||
/* 00238 8089FAE8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 0023C 8089FAEC 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00240 8089FAF0 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 00244 8089FAF4 3C04808A */ lui $a0, %hi(D_808A0580) ## $a0 = 808A0000
|
||||
/* 00248 8089FAF8 24840580 */ addiu $a0, $a0, %lo(D_808A0580) ## $a0 = 808A0580
|
||||
/* 0024C 8089FAFC 8FA50024 */ lw $a1, 0x0024($sp)
|
||||
/* 00250 8089FB00 8FA60028 */ lw $a2, 0x0028($sp)
|
||||
/* 00254 8089FB04 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 00258 8089FB08 00403825 */ or $a3, $v0, $zero ## $a3 = 00000000
|
||||
/* 0025C 8089FB0C 2404FFFF */ addiu $a0, $zero, 0xFFFF ## $a0 = FFFFFFFF
|
||||
.L8089FB10:
|
||||
/* 00260 8089FB10 0C227E2C */ jal func_8089F8B0
|
||||
/* 00264 8089FB14 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
|
||||
/* 00268 8089FB18 000260C0 */ sll $t4, $v0, 3
|
||||
/* 0026C 8089FB1C 3C0D808A */ lui $t5, %hi(D_808A0514) ## $t5 = 808A0000
|
||||
/* 00270 8089FB20 01AC6821 */ addu $t5, $t5, $t4
|
||||
/* 00274 8089FB24 8DAD0514 */ lw $t5, %lo(D_808A0514)($t5)
|
||||
/* 00278 8089FB28 AFA20030 */ sw $v0, 0x0030($sp)
|
||||
/* 0027C 8089FB2C C6080158 */ lwc1 $f8, 0x0158($s0) ## 00000158
|
||||
/* 00280 8089FB30 448D2000 */ mtc1 $t5, $f4 ## $f4 = -0.00
|
||||
/* 00284 8089FB34 00000000 */ nop
|
||||
/* 00288 8089FB38 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 0028C 8089FB3C 46083280 */ add.s $f10, $f6, $f8
|
||||
/* 00290 8089FB40 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028
|
||||
/* 00294 8089FB44 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00298 8089FB48 8FA40034 */ lw $a0, 0x0034($sp)
|
||||
/* 0029C 8089FB4C 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 002A0 8089FB50 44059000 */ mfc1 $a1, $f18
|
||||
/* 002A4 8089FB54 00000000 */ nop
|
||||
/* 002A8 8089FB58 00052C00 */ sll $a1, $a1, 16
|
||||
/* 002AC 8089FB5C 0C227E74 */ jal func_8089F9D0
|
||||
/* 002B0 8089FB60 00052C03 */ sra $a1, $a1, 16
|
||||
/* 002B4 8089FB64 8FAF0030 */ lw $t7, 0x0030($sp)
|
||||
/* 002B8 8089FB68 3C19808A */ lui $t9, %hi(D_808A0510) ## $t9 = 808A0000
|
||||
/* 002BC 8089FB6C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 002C0 8089FB70 000FC0C0 */ sll $t8, $t7, 3
|
||||
/* 002C4 8089FB74 0338C821 */ addu $t9, $t9, $t8
|
||||
/* 002C8 8089FB78 8F390510 */ lw $t9, %lo(D_808A0510)($t9)
|
||||
/* 002CC 8089FB7C 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 002D0 8089FB80 0C00B2ED */ jal Flags_UnsetSwitch
|
||||
|
||||
/* 002D4 8089FB84 A619001C */ sh $t9, 0x001C($s0) ## 0000001C
|
||||
/* 002D8 8089FB88 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 002DC 8089FB8C 0C00B2ED */ jal Flags_UnsetSwitch
|
||||
|
||||
/* 002E0 8089FB90 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 002E4 8089FB94 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 002E8 8089FB98 0C00B2ED */ jal Flags_UnsetSwitch
|
||||
|
||||
/* 002EC 8089FB9C 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 002F0 8089FBA0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
|
||||
/* 002F4 8089FBA4 2401001C */ addiu $at, $zero, 0x001C ## $at = 0000001C
|
||||
/* 002F8 8089FBA8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 002FC 8089FBAC 1041000E */ beq $v0, $at, .L8089FBE8
|
||||
/* 00300 8089FBB0 2401001D */ addiu $at, $zero, 0x001D ## $at = 0000001D
|
||||
/* 00304 8089FBB4 10410008 */ beq $v0, $at, .L8089FBD8
|
||||
/* 00308 8089FBB8 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 0030C 8089FBBC 2401001E */ addiu $at, $zero, 0x001E ## $at = 0000001E
|
||||
/* 00310 8089FBC0 14410009 */ bne $v0, $at, .L8089FBE8
|
||||
/* 00314 8089FBC4 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 00318 8089FBC8 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 0031C 8089FBCC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 00320 8089FBD0 10000008 */ beq $zero, $zero, .L8089FBF4
|
||||
/* 00324 8089FBD4 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
|
||||
.L8089FBD8:
|
||||
/* 00328 8089FBD8 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 0032C 8089FBDC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 00330 8089FBE0 10000004 */ beq $zero, $zero, .L8089FBF4
|
||||
/* 00334 8089FBE4 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
|
||||
.L8089FBE8:
|
||||
/* 00338 8089FBE8 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 0033C 8089FBEC 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 00340 8089FBF0 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
|
||||
.L8089FBF4:
|
||||
/* 00344 8089FBF4 10000035 */ beq $zero, $zero, .L8089FCCC
|
||||
/* 00348 8089FBF8 E6040154 */ swc1 $f4, 0x0154($s0) ## 00000154
|
||||
glabel L8089FBFC
|
||||
/* 0034C 8089FBFC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 00350 8089FC00 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00354 8089FC04 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 00358 8089FC08 10400006 */ beq $v0, $zero, .L8089FC24
|
||||
/* 0035C 8089FC0C 3C0142AA */ lui $at, 0x42AA ## $at = 42AA0000
|
||||
/* 00360 8089FC10 C6060158 */ lwc1 $f6, 0x0158($s0) ## 00000158
|
||||
/* 00364 8089FC14 44814000 */ mtc1 $at, $f8 ## $f8 = 85.00
|
||||
/* 00368 8089FC18 00000000 */ nop
|
||||
/* 0036C 8089FC1C 46083280 */ add.s $f10, $f6, $f8
|
||||
/* 00370 8089FC20 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028
|
||||
.L8089FC24:
|
||||
/* 00374 8089FC24 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00378 8089FC28 8FAA0034 */ lw $t2, 0x0034($sp)
|
||||
/* 0037C 8089FC2C 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 00380 8089FC30 44099000 */ mfc1 $t1, $f18
|
||||
/* 00384 8089FC34 10000025 */ beq $zero, $zero, .L8089FCCC
|
||||
/* 00388 8089FC38 A5490062 */ sh $t1, 0x0062($t2) ## 00000062
|
||||
glabel L8089FC3C
|
||||
/* 0038C 8089FC3C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 00390 8089FC40 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00394 8089FC44 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 00398 8089FC48 10400008 */ beq $v0, $zero, .L8089FC6C
|
||||
/* 0039C 8089FC4C 3C0142DC */ lui $at, 0x42DC ## $at = 42DC0000
|
||||
/* 003A0 8089FC50 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 003A4 8089FC54 44813000 */ mtc1 $at, $f6 ## $f6 = 110.00
|
||||
/* 003A8 8089FC58 00000000 */ nop
|
||||
/* 003AC 8089FC5C 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 003B0 8089FC60 E6080028 */ swc1 $f8, 0x0028($s0) ## 00000028
|
||||
/* 003B4 8089FC64 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
|
||||
/* 003B8 8089FC68 E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L8089FC6C:
|
||||
/* 003BC 8089FC6C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 003C0 8089FC70 8FAD0034 */ lw $t5, 0x0034($sp)
|
||||
/* 003C4 8089FC74 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 003C8 8089FC78 440C9000 */ mfc1 $t4, $f18
|
||||
/* 003CC 8089FC7C 10000013 */ beq $zero, $zero, .L8089FCCC
|
||||
/* 003D0 8089FC80 A5AC0082 */ sh $t4, 0x0082($t5) ## 00000082
|
||||
glabel L8089FC84
|
||||
/* 003D4 8089FC84 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
|
||||
/* 003D8 8089FC88 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 003DC 8089FC8C 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 003E0 8089FC90 10400008 */ beq $v0, $zero, .L8089FCB4
|
||||
/* 003E4 8089FC94 3C014320 */ lui $at, 0x4320 ## $at = 43200000
|
||||
/* 003E8 8089FC98 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 003EC 8089FC9C 44813000 */ mtc1 $at, $f6 ## $f6 = 160.00
|
||||
/* 003F0 8089FCA0 00000000 */ nop
|
||||
/* 003F4 8089FCA4 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 003F8 8089FCA8 E6080028 */ swc1 $f8, 0x0028($s0) ## 00000028
|
||||
/* 003FC 8089FCAC C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
|
||||
/* 00400 8089FCB0 E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L8089FCB4:
|
||||
/* 00404 8089FCB4 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00408 8089FCB8 8FB80034 */ lw $t8, 0x0034($sp)
|
||||
/* 0040C 8089FCBC 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 00410 8089FCC0 440F9000 */ mfc1 $t7, $f18
|
||||
/* 00414 8089FCC4 00000000 */ nop
|
||||
/* 00418 8089FCC8 A70F0102 */ sh $t7, 0x0102($t8) ## 00000102
|
||||
glabel L8089FCCC
|
||||
.L8089FCCC:
|
||||
/* 0041C 8089FCCC 3C19808A */ lui $t9, %hi(func_8089FCF8) ## $t9 = 808A0000
|
||||
/* 00420 8089FCD0 2739FCF8 */ addiu $t9, $t9, %lo(func_8089FCF8) ## $t9 = 8089FCF8
|
||||
/* 00424 8089FCD4 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
|
||||
/* 00428 8089FCD8 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 0042C 8089FCDC 8FB10018 */ lw $s1, 0x0018($sp)
|
||||
/* 00430 8089FCE0 8FB00014 */ lw $s0, 0x0014($sp)
|
||||
/* 00434 8089FCE4 03E00008 */ jr $ra
|
||||
/* 00438 8089FCE8 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
|
@ -1,138 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A059C
|
||||
.asciz "%x %x %x\n"
|
||||
.balign 4
|
||||
|
||||
.late_rodata
|
||||
glabel D_808A062C
|
||||
.word 0xC450C000
|
||||
glabel D_808A0630
|
||||
.word 0x43DE8000
|
||||
glabel D_808A0634
|
||||
.word 0x443F4000, 0x00000000, 0x00000000
|
||||
|
||||
.text
|
||||
glabel BgMizuWater_Update
|
||||
/* 00924 808A01D4 3C0E8016 */ lui $t6, %hi(gGameInfo)
|
||||
/* 00928 808A01D8 8DCEFA90 */ lw $t6, %lo(gGameInfo)($t6)
|
||||
/* 0092C 808A01DC 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 00930 808A01E0 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00934 808A01E4 AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 00938 808A01E8 85CF1532 */ lh $t7, 0x1532($t6) ## 80161532
|
||||
/* 0093C 808A01EC 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
|
||||
/* 00940 808A01F0 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
|
||||
/* 00944 808A01F4 15E00013 */ bne $t7, $zero, .L808A0244
|
||||
/* 00948 808A01F8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 0094C 808A01FC 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 00950 808A0200 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00954 808A0204 AFA60040 */ sw $a2, 0x0040($sp)
|
||||
/* 00958 808A0208 AFA20020 */ sw $v0, 0x0020($sp)
|
||||
/* 0095C 808A020C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00960 808A0210 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00964 808A0214 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 00968 808A0218 AFA20024 */ sw $v0, 0x0024($sp)
|
||||
/* 0096C 808A021C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00970 808A0220 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00974 808A0224 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 00978 808A0228 3C04808A */ lui $a0, %hi(D_808A059C) ## $a0 = 808A0000
|
||||
/* 0097C 808A022C 2484059C */ addiu $a0, $a0, %lo(D_808A059C) ## $a0 = 808A059C
|
||||
/* 00980 808A0230 8FA50020 */ lw $a1, 0x0020($sp)
|
||||
/* 00984 808A0234 8FA60024 */ lw $a2, 0x0024($sp)
|
||||
/* 00988 808A0238 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 0098C 808A023C 00403825 */ or $a3, $v0, $zero ## $a3 = 00000000
|
||||
/* 00990 808A0240 8FA60040 */ lw $a2, 0x0040($sp)
|
||||
.L808A0244:
|
||||
/* 00994 808A0244 8CD80150 */ lw $t8, 0x0150($a2) ## 00000150
|
||||
/* 00998 808A0248 5700004A */ bnel $t8, $zero, .L808A0374
|
||||
/* 0099C 808A024C 8CD9014C */ lw $t9, 0x014C($a2) ## 0000014C
|
||||
/* 009A0 808A0250 C4C40028 */ lwc1 $f4, 0x0028($a2) ## 00000028
|
||||
/* 009A4 808A0254 3C01C170 */ lui $at, 0xC170 ## $at = C1700000
|
||||
/* 009A8 808A0258 44811000 */ mtc1 $at, $f2 ## $f2 = -15.00
|
||||
/* 009AC 808A025C 4600218D */ trunc.w.s $f6, $f4
|
||||
/* 009B0 808A0260 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000
|
||||
/* 009B4 808A0264 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
|
||||
/* 009B8 808A0268 3C01808A */ lui $at, %hi(D_808A0630) ## $at = 808A0000
|
||||
/* 009BC 808A026C 44023000 */ mfc1 $v0, $f6
|
||||
/* 009C0 808A0270 00000000 */ nop
|
||||
/* 009C4 808A0274 44824000 */ mtc1 $v0, $f8 ## $f8 = 0.00
|
||||
/* 009C8 808A0278 00000000 */ nop
|
||||
/* 009CC 808A027C 46804020 */ cvt.s.w $f0, $f8
|
||||
/* 009D0 808A0280 4602003C */ c.lt.s $f0, $f2
|
||||
/* 009D4 808A0284 00000000 */ nop
|
||||
/* 009D8 808A0288 4500000E */ bc1f .L808A02C4
|
||||
/* 009DC 808A028C 00000000 */ nop
|
||||
/* 009E0 808A0290 3C01808A */ lui $at, %hi(D_808A062C) ## $at = 808A0000
|
||||
/* 009E4 808A0294 C42A062C */ lwc1 $f10, %lo(D_808A062C)($at)
|
||||
/* 009E8 808A0298 3C01444D */ lui $at, 0x444D ## $at = 444D0000
|
||||
/* 009EC 808A029C 44819000 */ mtc1 $at, $f18 ## $f18 = 820.00
|
||||
/* 009F0 808A02A0 460A0401 */ sub.s $f16, $f0, $f10
|
||||
/* 009F4 808A02A4 3C014348 */ lui $at, 0x4348 ## $at = 43480000
|
||||
/* 009F8 808A02A8 44813000 */ mtc1 $at, $f6 ## $f6 = 200.00
|
||||
/* 009FC 808A02AC 46128103 */ div.s $f4, $f16, $f18
|
||||
/* 00A00 808A02B0 46062202 */ mul.s $f8, $f4, $f6
|
||||
/* 00A04 808A02B4 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 00A08 808A02B8 44035000 */ mfc1 $v1, $f10
|
||||
/* 00A0C 808A02BC 10000027 */ beq $zero, $zero, .L808A035C
|
||||
/* 00A10 808A02C0 0004C200 */ sll $t8, $a0, 8
|
||||
.L808A02C4:
|
||||
/* 00A14 808A02C4 C42C0630 */ lwc1 $f12, %lo(D_808A0630)($at)
|
||||
/* 00A18 808A02C8 3C01808A */ lui $at, %hi(D_808A0634) ## $at = 808A0000
|
||||
/* 00A1C 808A02CC 460C003C */ c.lt.s $f0, $f12
|
||||
/* 00A20 808A02D0 00000000 */ nop
|
||||
/* 00A24 808A02D4 4500000E */ bc1f .L808A0310
|
||||
/* 00A28 808A02D8 00000000 */ nop
|
||||
/* 00A2C 808A02DC 46020401 */ sub.s $f16, $f0, $f2
|
||||
/* 00A30 808A02E0 3C0143E6 */ lui $at, 0x43E6 ## $at = 43E60000
|
||||
/* 00A34 808A02E4 44819000 */ mtc1 $at, $f18 ## $f18 = 460.00
|
||||
/* 00A38 808A02E8 3C0142BE */ lui $at, 0x42BE ## $at = 42BE0000
|
||||
/* 00A3C 808A02EC 44813000 */ mtc1 $at, $f6 ## $f6 = 95.00
|
||||
/* 00A40 808A02F0 46128103 */ div.s $f4, $f16, $f18
|
||||
/* 00A44 808A02F4 240B00FF */ addiu $t3, $zero, 0x00FF ## $t3 = 000000FF
|
||||
/* 00A48 808A02F8 24040001 */ addiu $a0, $zero, 0x0001 ## $a0 = 00000001
|
||||
/* 00A4C 808A02FC 46062202 */ mul.s $f8, $f4, $f6
|
||||
/* 00A50 808A0300 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 00A54 808A0304 440A5000 */ mfc1 $t2, $f10
|
||||
/* 00A58 808A0308 10000013 */ beq $zero, $zero, .L808A0358
|
||||
/* 00A5C 808A030C 016A1823 */ subu $v1, $t3, $t2
|
||||
.L808A0310:
|
||||
/* 00A60 808A0310 C4300634 */ lwc1 $f16, %lo(D_808A0634)($at)
|
||||
/* 00A64 808A0314 3C0143A0 */ lui $at, 0x43A0 ## $at = 43A00000
|
||||
/* 00A68 808A0318 4610003E */ c.le.s $f0, $f16
|
||||
/* 00A6C 808A031C 00000000 */ nop
|
||||
/* 00A70 808A0320 4502000E */ bc1fl .L808A035C
|
||||
/* 00A74 808A0324 0004C200 */ sll $t8, $a0, 8
|
||||
/* 00A78 808A0328 460C0481 */ sub.s $f18, $f0, $f12
|
||||
/* 00A7C 808A032C 44812000 */ mtc1 $at, $f4 ## $f4 = 320.00
|
||||
/* 00A80 808A0330 3C0142BE */ lui $at, 0x42BE ## $at = 42BE0000
|
||||
/* 00A84 808A0334 44814000 */ mtc1 $at, $f8 ## $f8 = 95.00
|
||||
/* 00A88 808A0338 46049183 */ div.s $f6, $f18, $f4
|
||||
/* 00A8C 808A033C 240E00FF */ addiu $t6, $zero, 0x00FF ## $t6 = 000000FF
|
||||
/* 00A90 808A0340 24040002 */ addiu $a0, $zero, 0x0002 ## $a0 = 00000002
|
||||
/* 00A94 808A0344 46083282 */ mul.s $f10, $f6, $f8
|
||||
/* 00A98 808A0348 4600540D */ trunc.w.s $f16, $f10
|
||||
/* 00A9C 808A034C 440D8000 */ mfc1 $t5, $f16
|
||||
/* 00AA0 808A0350 00000000 */ nop
|
||||
/* 00AA4 808A0354 01CD1823 */ subu $v1, $t6, $t5
|
||||
.L808A0358:
|
||||
/* 00AA8 808A0358 0004C200 */ sll $t8, $a0, 8
|
||||
.L808A035C:
|
||||
/* 00AAC 808A035C 307900FF */ andi $t9, $v1, 0x00FF ## $t9 = 00000000
|
||||
/* 00AB0 808A0360 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 00AB4 808A0364 00300821 */ addu $at, $at, $s0
|
||||
/* 00AB8 808A0368 03194025 */ or $t0, $t8, $t9 ## $t0 = 00000000
|
||||
/* 00ABC 808A036C A4281D32 */ sh $t0, 0x1D32($at) ## 00011D32
|
||||
/* 00AC0 808A0370 8CD9014C */ lw $t9, 0x014C($a2) ## 0000014C
|
||||
.L808A0374:
|
||||
/* 00AC4 808A0374 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
|
||||
/* 00AC8 808A0378 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
|
||||
/* 00ACC 808A037C 0320F809 */ jalr $ra, $t9
|
||||
/* 00AD0 808A0380 00000000 */ nop
|
||||
/* 00AD4 808A0384 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 00AD8 808A0388 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 00ADC 808A038C 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
||||
/* 00AE0 808A0390 03E00008 */ jr $ra
|
||||
/* 00AE4 808A0394 00000000 */ nop
|
|
@ -1,91 +0,0 @@
|
|||
glabel func_8089F8B0
|
||||
/* 00000 8089F8B0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 00004 8089F8B4 3C028016 */ lui $v0, %hi(gGameInfo)
|
||||
/* 00008 8089F8B8 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
|
||||
/* 0000C 8089F8BC AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 00010 8089F8C0 AFA40018 */ sw $a0, 0x0018($sp)
|
||||
/* 00014 8089F8C4 AFA5001C */ sw $a1, 0x001C($sp)
|
||||
/* 00018 8089F8C8 844E1514 */ lh $t6, 0x1514($v0) ## 80161514
|
||||
/* 0001C 8089F8CC 51C0001D */ beql $t6, $zero, .L8089F944
|
||||
/* 00020 8089F8D0 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 00024 8089F8D4 84431516 */ lh $v1, 0x1516($v0) ## 80161516
|
||||
/* 00028 8089F8D8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
|
||||
/* 0002C 8089F8DC 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 00030 8089F8E0 10600008 */ beq $v1, $zero, .L8089F904
|
||||
/* 00034 8089F8E4 00000000 */ nop
|
||||
/* 00038 8089F8E8 1061000B */ beq $v1, $at, .L8089F918
|
||||
/* 0003C 8089F8EC 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 00040 8089F8F0 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
|
||||
/* 00044 8089F8F4 1061000D */ beq $v1, $at, .L8089F92C
|
||||
/* 00048 8089F8F8 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 0004C 8089F8FC 10000010 */ beq $zero, $zero, .L8089F940
|
||||
/* 00050 8089F900 A4401514 */ sh $zero, 0x1514($v0) ## 80161514
|
||||
.L8089F904:
|
||||
/* 00054 8089F904 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 00058 8089F908 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 0005C 8089F90C 3C028016 */ lui $v0, %hi(gGameInfo)
|
||||
/* 00060 8089F910 1000000A */ beq $zero, $zero, .L8089F93C
|
||||
/* 00064 8089F914 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
|
||||
.L8089F918:
|
||||
/* 00068 8089F918 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 0006C 8089F91C 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 00070 8089F920 3C028016 */ lui $v0, %hi(gGameInfo)
|
||||
/* 00074 8089F924 10000005 */ beq $zero, $zero, .L8089F93C
|
||||
/* 00078 8089F928 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
|
||||
.L8089F92C:
|
||||
/* 0007C 8089F92C 0C00B2DD */ jal Flags_SetSwitch
|
||||
|
||||
/* 00080 8089F930 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 00084 8089F934 3C028016 */ lui $v0, %hi(gGameInfo)
|
||||
/* 00088 8089F938 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
|
||||
.L8089F93C:
|
||||
/* 0008C 8089F93C A4401514 */ sh $zero, 0x1514($v0) ## 80161514
|
||||
.L8089F940:
|
||||
/* 00090 8089F940 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
.L8089F944:
|
||||
/* 00094 8089F944 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00098 8089F948 2405001C */ addiu $a1, $zero, 0x001C ## $a1 = 0000001C
|
||||
/* 0009C 8089F94C 10400006 */ beq $v0, $zero, .L8089F968
|
||||
/* 000A0 8089F950 87AF001A */ lh $t7, 0x001A($sp)
|
||||
/* 000A4 8089F954 2401001C */ addiu $at, $zero, 0x001C ## $at = 0000001C
|
||||
/* 000A8 8089F958 51E10004 */ beql $t7, $at, .L8089F96C
|
||||
/* 000AC 8089F95C 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 000B0 8089F960 10000016 */ beq $zero, $zero, .L8089F9BC
|
||||
/* 000B4 8089F964 24030003 */ addiu $v1, $zero, 0x0003 ## $v1 = 00000003
|
||||
.L8089F968:
|
||||
/* 000B8 8089F968 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
.L8089F96C:
|
||||
/* 000BC 8089F96C 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 000C0 8089F970 2405001D */ addiu $a1, $zero, 0x001D ## $a1 = 0000001D
|
||||
/* 000C4 8089F974 10400006 */ beq $v0, $zero, .L8089F990
|
||||
/* 000C8 8089F978 87B8001A */ lh $t8, 0x001A($sp)
|
||||
/* 000CC 8089F97C 2401001D */ addiu $at, $zero, 0x001D ## $at = 0000001D
|
||||
/* 000D0 8089F980 53010004 */ beql $t8, $at, .L8089F994
|
||||
/* 000D4 8089F984 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
/* 000D8 8089F988 1000000C */ beq $zero, $zero, .L8089F9BC
|
||||
/* 000DC 8089F98C 24030002 */ addiu $v1, $zero, 0x0002 ## $v1 = 00000002
|
||||
.L8089F990:
|
||||
/* 000E0 8089F990 8FA4001C */ lw $a0, 0x001C($sp)
|
||||
.L8089F994:
|
||||
/* 000E4 8089F994 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 000E8 8089F998 2405001E */ addiu $a1, $zero, 0x001E ## $a1 = 0000001E
|
||||
/* 000EC 8089F99C 10400006 */ beq $v0, $zero, .L8089F9B8
|
||||
/* 000F0 8089F9A0 87B9001A */ lh $t9, 0x001A($sp)
|
||||
/* 000F4 8089F9A4 2401001E */ addiu $at, $zero, 0x001E ## $at = 0000001E
|
||||
/* 000F8 8089F9A8 53210004 */ beql $t9, $at, .L8089F9BC
|
||||
/* 000FC 8089F9AC 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
|
||||
/* 00100 8089F9B0 10000002 */ beq $zero, $zero, .L8089F9BC
|
||||
/* 00104 8089F9B4 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001
|
||||
.L8089F9B8:
|
||||
/* 00108 8089F9B8 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
|
||||
.L8089F9BC:
|
||||
/* 0010C 8089F9BC 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 00110 8089F9C0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 00114 8089F9C4 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000
|
||||
/* 00118 8089F9C8 03E00008 */ jr $ra
|
||||
/* 0011C 8089F9CC 00000000 */ nop
|
|
@ -1,29 +0,0 @@
|
|||
glabel func_8089F9D0
|
||||
/* 00120 8089F9D0 AFA50004 */ sw $a1, 0x0004($sp)
|
||||
/* 00124 8089F9D4 00052C00 */ sll $a1, $a1, 16
|
||||
/* 00128 8089F9D8 3C03808A */ lui $v1, %hi(D_808A0558) ## $v1 = 808A0000
|
||||
/* 0012C 8089F9DC 3C02808A */ lui $v0, %hi(D_808A0578) ## $v0 = 808A0000
|
||||
/* 00130 8089F9E0 00052C03 */ sra $a1, $a1, 16
|
||||
/* 00134 8089F9E4 24420578 */ addiu $v0, $v0, %lo(D_808A0578) ## $v0 = 808A0578
|
||||
/* 00138 8089F9E8 24630558 */ addiu $v1, $v1, %lo(D_808A0558) ## $v1 = 808A0558
|
||||
.L8089F9EC:
|
||||
/* 0013C 8089F9EC 8C6E0000 */ lw $t6, 0x0000($v1) ## 808A0558
|
||||
/* 00140 8089F9F0 24630010 */ addiu $v1, $v1, 0x0010 ## $v1 = 808A0568
|
||||
/* 00144 8089F9F4 000E7900 */ sll $t7, $t6, 4
|
||||
/* 00148 8089F9F8 008FC021 */ addu $t8, $a0, $t7
|
||||
/* 0014C 8089F9FC A7050002 */ sh $a1, 0x0002($t8) ## 00000002
|
||||
/* 00150 8089FA00 8C79FFF4 */ lw $t9, -0x000C($v1) ## 808A055C
|
||||
/* 00154 8089FA04 00194100 */ sll $t0, $t9, 4
|
||||
/* 00158 8089FA08 00884821 */ addu $t1, $a0, $t0
|
||||
/* 0015C 8089FA0C A5250002 */ sh $a1, 0x0002($t1) ## 00000002
|
||||
/* 00160 8089FA10 8C6AFFF8 */ lw $t2, -0x0008($v1) ## 808A0560
|
||||
/* 00164 8089FA14 000A5900 */ sll $t3, $t2, 4
|
||||
/* 00168 8089FA18 008B6021 */ addu $t4, $a0, $t3
|
||||
/* 0016C 8089FA1C A5850002 */ sh $a1, 0x0002($t4) ## 00000002
|
||||
/* 00170 8089FA20 8C6DFFFC */ lw $t5, -0x0004($v1) ## 808A0564
|
||||
/* 00174 8089FA24 000D7100 */ sll $t6, $t5, 4
|
||||
/* 00178 8089FA28 008E7821 */ addu $t7, $a0, $t6
|
||||
/* 0017C 8089FA2C 1462FFEF */ bne $v1, $v0, .L8089F9EC
|
||||
/* 00180 8089FA30 A5E50002 */ sh $a1, 0x0002($t7) ## 00000002
|
||||
/* 00184 8089FA34 03E00008 */ jr $ra
|
||||
/* 00188 8089FA38 00000000 */ nop
|
|
@ -1,141 +0,0 @@
|
|||
.late_rodata
|
||||
glabel jtbl_808A0604
|
||||
.word L8089FD30
|
||||
.word L8089FE8C
|
||||
.word L8089FDE8
|
||||
.word L8089FE20
|
||||
.word L8089FE58
|
||||
|
||||
.text
|
||||
glabel func_8089FCF8
|
||||
/* 00448 8089FCF8 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
|
||||
/* 0044C 8089FCFC AFBF0024 */ sw $ra, 0x0024($sp)
|
||||
/* 00450 8089FD00 AFB00020 */ sw $s0, 0x0020($sp)
|
||||
/* 00454 8089FD04 8C8E0150 */ lw $t6, 0x0150($a0) ## 00000150
|
||||
/* 00458 8089FD08 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 0045C 8089FD0C 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000
|
||||
/* 00460 8089FD10 2DC10005 */ sltiu $at, $t6, 0x0005
|
||||
/* 00464 8089FD14 1020005D */ beq $at, $zero, .L8089FE8C
|
||||
/* 00468 8089FD18 000E7080 */ sll $t6, $t6, 2
|
||||
/* 0046C 8089FD1C 3C01808A */ lui $at, %hi(jtbl_808A0604) ## $at = 808A0000
|
||||
/* 00470 8089FD20 002E0821 */ addu $at, $at, $t6
|
||||
/* 00474 8089FD24 8C2E0604 */ lw $t6, %lo(jtbl_808A0604)($at)
|
||||
/* 00478 8089FD28 01C00008 */ jr $t6
|
||||
/* 0047C 8089FD2C 00000000 */ nop
|
||||
glabel L8089FD30
|
||||
/* 00480 8089FD30 8604001C */ lh $a0, 0x001C($s0) ## 0000001C
|
||||
/* 00484 8089FD34 AFA6003C */ sw $a2, 0x003C($sp)
|
||||
/* 00488 8089FD38 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000
|
||||
/* 0048C 8089FD3C 0C227E2C */ jal func_8089F8B0
|
||||
/* 00490 8089FD40 A7A4002E */ sh $a0, 0x002E($sp)
|
||||
/* 00494 8089FD44 1040001E */ beq $v0, $zero, .L8089FDC0
|
||||
/* 00498 8089FD48 87AF002E */ lh $t7, 0x002E($sp)
|
||||
/* 0049C 8089FD4C 0002C0C0 */ sll $t8, $v0, 3
|
||||
/* 004A0 8089FD50 3C19808A */ lui $t9, %hi(D_808A0510) ## $t9 = 808A0000
|
||||
/* 004A4 8089FD54 0338C821 */ addu $t9, $t9, $t8
|
||||
/* 004A8 8089FD58 8F390510 */ lw $t9, %lo(D_808A0510)($t9)
|
||||
/* 004AC 8089FD5C 8FA4003C */ lw $a0, 0x003C($sp)
|
||||
/* 004B0 8089FD60 24050C30 */ addiu $a1, $zero, 0x0C30 ## $a1 = 00000C30
|
||||
/* 004B4 8089FD64 11F90016 */ beq $t7, $t9, .L8089FDC0
|
||||
/* 004B8 8089FD68 2409FF9C */ addiu $t1, $zero, 0xFF9C ## $t1 = FFFFFF9C
|
||||
/* 004BC 8089FD6C 01223023 */ subu $a2, $t1, $v0
|
||||
/* 004C0 8089FD70 00063400 */ sll $a2, $a2, 16
|
||||
/* 004C4 8089FD74 00063403 */ sra $a2, $a2, 16
|
||||
/* 004C8 8089FD78 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
|
||||
/* 004CC 8089FD7C AFA00010 */ sw $zero, 0x0010($sp)
|
||||
/* 004D0 8089FD80 0C02003E */ jal func_800800F8
|
||||
/* 004D4 8089FD84 AFA20030 */ sw $v0, 0x0030($sp)
|
||||
/* 004D8 8089FD88 8FA80030 */ lw $t0, 0x0030($sp)
|
||||
/* 004DC 8089FD8C 3C0B808A */ lui $t3, %hi(D_808A0510) ## $t3 = 808A0000
|
||||
/* 004E0 8089FD90 256B0510 */ addiu $t3, $t3, %lo(D_808A0510) ## $t3 = 808A0510
|
||||
/* 004E4 8089FD94 000850C0 */ sll $t2, $t0, 3
|
||||
/* 004E8 8089FD98 014B1821 */ addu $v1, $t2, $t3
|
||||
/* 004EC 8089FD9C 8C6C0000 */ lw $t4, 0x0000($v1) ## 00000000
|
||||
/* 004F0 8089FDA0 C6080158 */ lwc1 $f8, 0x0158($s0) ## 00000158
|
||||
/* 004F4 8089FDA4 A60C001C */ sh $t4, 0x001C($s0) ## 0000001C
|
||||
/* 004F8 8089FDA8 8C6D0004 */ lw $t5, 0x0004($v1) ## 00000004
|
||||
/* 004FC 8089FDAC 448D2000 */ mtc1 $t5, $f4 ## $f4 = 0.00
|
||||
/* 00500 8089FDB0 00000000 */ nop
|
||||
/* 00504 8089FDB4 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 00508 8089FDB8 46083280 */ add.s $f10, $f6, $f8
|
||||
/* 0050C 8089FDBC E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L8089FDC0:
|
||||
/* 00510 8089FDC0 87AE002E */ lh $t6, 0x002E($sp)
|
||||
/* 00514 8089FDC4 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
|
||||
/* 00518 8089FDC8 51D80031 */ beql $t6, $t8, .L8089FE90
|
||||
/* 0051C 8089FDCC C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00520 8089FDD0 11C0002E */ beq $t6, $zero, .L8089FE8C
|
||||
/* 00524 8089FDD4 8FA4003C */ lw $a0, 0x003C($sp)
|
||||
/* 00528 8089FDD8 0C00B2ED */ jal Flags_UnsetSwitch
|
||||
|
||||
/* 0052C 8089FDDC 01C02825 */ or $a1, $t6, $zero ## $a1 = 00000000
|
||||
/* 00530 8089FDE0 1000002B */ beq $zero, $zero, .L8089FE90
|
||||
/* 00534 8089FDE4 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
glabel L8089FDE8
|
||||
/* 00538 8089FDE8 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
|
||||
/* 0053C 8089FDEC 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00540 8089FDF0 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 00544 8089FDF4 10400007 */ beq $v0, $zero, .L8089FE14
|
||||
/* 00548 8089FDF8 3C0142AA */ lui $at, 0x42AA ## $at = 42AA0000
|
||||
/* 0054C 8089FDFC C6100158 */ lwc1 $f16, 0x0158($s0) ## 00000158
|
||||
/* 00550 8089FE00 44819000 */ mtc1 $at, $f18 ## $f18 = 85.00
|
||||
/* 00554 8089FE04 00000000 */ nop
|
||||
/* 00558 8089FE08 46128100 */ add.s $f4, $f16, $f18
|
||||
/* 0055C 8089FE0C 1000001F */ beq $zero, $zero, .L8089FE8C
|
||||
/* 00560 8089FE10 E6040154 */ swc1 $f4, 0x0154($s0) ## 00000154
|
||||
.L8089FE14:
|
||||
/* 00564 8089FE14 C6060158 */ lwc1 $f6, 0x0158($s0) ## 00000158
|
||||
/* 00568 8089FE18 1000001C */ beq $zero, $zero, .L8089FE8C
|
||||
/* 0056C 8089FE1C E6060154 */ swc1 $f6, 0x0154($s0) ## 00000154
|
||||
glabel L8089FE20
|
||||
/* 00570 8089FE20 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
|
||||
/* 00574 8089FE24 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00578 8089FE28 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 0057C 8089FE2C 10400007 */ beq $v0, $zero, .L8089FE4C
|
||||
/* 00580 8089FE30 3C0142DC */ lui $at, 0x42DC ## $at = 42DC0000
|
||||
/* 00584 8089FE34 C6080158 */ lwc1 $f8, 0x0158($s0) ## 00000158
|
||||
/* 00588 8089FE38 44815000 */ mtc1 $at, $f10 ## $f10 = 110.00
|
||||
/* 0058C 8089FE3C 00000000 */ nop
|
||||
/* 00590 8089FE40 460A4400 */ add.s $f16, $f8, $f10
|
||||
/* 00594 8089FE44 10000011 */ beq $zero, $zero, .L8089FE8C
|
||||
/* 00598 8089FE48 E6100154 */ swc1 $f16, 0x0154($s0) ## 00000154
|
||||
.L8089FE4C:
|
||||
/* 0059C 8089FE4C C6120158 */ lwc1 $f18, 0x0158($s0) ## 00000158
|
||||
/* 005A0 8089FE50 1000000E */ beq $zero, $zero, .L8089FE8C
|
||||
/* 005A4 8089FE54 E6120154 */ swc1 $f18, 0x0154($s0) ## 00000154
|
||||
glabel L8089FE58
|
||||
/* 005A8 8089FE58 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
|
||||
/* 005AC 8089FE5C 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 005B0 8089FE60 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 005B4 8089FE64 10400007 */ beq $v0, $zero, .L8089FE84
|
||||
/* 005B8 8089FE68 3C014320 */ lui $at, 0x4320 ## $at = 43200000
|
||||
/* 005BC 8089FE6C C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 005C0 8089FE70 44813000 */ mtc1 $at, $f6 ## $f6 = 160.00
|
||||
/* 005C4 8089FE74 00000000 */ nop
|
||||
/* 005C8 8089FE78 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 005CC 8089FE7C 10000003 */ beq $zero, $zero, .L8089FE8C
|
||||
/* 005D0 8089FE80 E6080154 */ swc1 $f8, 0x0154($s0) ## 00000154
|
||||
.L8089FE84:
|
||||
/* 005D4 8089FE84 C60A0158 */ lwc1 $f10, 0x0158($s0) ## 00000158
|
||||
/* 005D8 8089FE88 E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
glabel L8089FE8C
|
||||
.L8089FE8C:
|
||||
/* 005DC 8089FE8C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
.L8089FE90:
|
||||
/* 005E0 8089FE90 C6120154 */ lwc1 $f18, 0x0154($s0) ## 00000154
|
||||
/* 005E4 8089FE94 3C0F808A */ lui $t7, %hi(func_8089FEC4) ## $t7 = 808A0000
|
||||
/* 005E8 8089FE98 25EFFEC4 */ addiu $t7, $t7, %lo(func_8089FEC4) ## $t7 = 8089FEC4
|
||||
/* 005EC 8089FE9C 46128032 */ c.eq.s $f16, $f18
|
||||
/* 005F0 8089FEA0 00000000 */ nop
|
||||
/* 005F4 8089FEA4 45030003 */ bc1tl .L8089FEB4
|
||||
/* 005F8 8089FEA8 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
/* 005FC 8089FEAC AE0F014C */ sw $t7, 0x014C($s0) ## 0000014C
|
||||
/* 00600 8089FEB0 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
.L8089FEB4:
|
||||
/* 00604 8089FEB4 8FB00020 */ lw $s0, 0x0020($sp)
|
||||
/* 00608 8089FEB8 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
|
||||
/* 0060C 8089FEBC 03E00008 */ jr $ra
|
||||
/* 00610 8089FEC0 00000000 */ nop
|
|
@ -1,237 +0,0 @@
|
|||
.late_rodata
|
||||
glabel jtbl_808A0618
|
||||
.word L8089FF08
|
||||
.word L808A0154
|
||||
.word L8089FFE0
|
||||
.word L808A005C
|
||||
.word L808A00D8
|
||||
|
||||
.text
|
||||
glabel func_8089FEC4
|
||||
/* 00614 8089FEC4 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
|
||||
/* 00618 8089FEC8 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 0061C 8089FECC AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 00620 8089FED0 8CAE07C0 */ lw $t6, 0x07C0($a1) ## 000007C0
|
||||
/* 00624 8089FED4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 00628 8089FED8 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
|
||||
/* 0062C 8089FEDC 8DCF0028 */ lw $t7, 0x0028($t6) ## 00000028
|
||||
/* 00630 8089FEE0 AFAF0020 */ sw $t7, 0x0020($sp)
|
||||
/* 00634 8089FEE4 8C980150 */ lw $t8, 0x0150($a0) ## 00000150
|
||||
/* 00638 8089FEE8 2F010005 */ sltiu $at, $t8, 0x0005
|
||||
/* 0063C 8089FEEC 10200099 */ beq $at, $zero, .L808A0154
|
||||
/* 00640 8089FEF0 0018C080 */ sll $t8, $t8, 2
|
||||
/* 00644 8089FEF4 3C01808A */ lui $at, %hi(jtbl_808A0618) ## $at = 808A0000
|
||||
/* 00648 8089FEF8 00380821 */ addu $at, $at, $t8
|
||||
/* 0064C 8089FEFC 8C380618 */ lw $t8, %lo(jtbl_808A0618)($at)
|
||||
/* 00650 8089FF00 03000008 */ jr $t8
|
||||
/* 00654 8089FF04 00000000 */ nop
|
||||
glabel L8089FF08
|
||||
/* 00658 8089FF08 8604001C */ lh $a0, 0x001C($s0) ## 0000001C
|
||||
/* 0065C 8089FF0C AFA70034 */ sw $a3, 0x0034($sp)
|
||||
/* 00660 8089FF10 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
|
||||
/* 00664 8089FF14 0C227E2C */ jal func_8089F8B0
|
||||
/* 00668 8089FF18 A7A4002A */ sh $a0, 0x002A($sp)
|
||||
/* 0066C 8089FF1C 10400010 */ beq $v0, $zero, .L8089FF60
|
||||
/* 00670 8089FF20 87A6002A */ lh $a2, 0x002A($sp)
|
||||
/* 00674 8089FF24 3C08808A */ lui $t0, %hi(D_808A0510) ## $t0 = 808A0000
|
||||
/* 00678 8089FF28 25080510 */ addiu $t0, $t0, %lo(D_808A0510) ## $t0 = 808A0510
|
||||
/* 0067C 8089FF2C 0002C8C0 */ sll $t9, $v0, 3
|
||||
/* 00680 8089FF30 03281821 */ addu $v1, $t9, $t0
|
||||
/* 00684 8089FF34 8C640000 */ lw $a0, 0x0000($v1) ## 00000000
|
||||
/* 00688 8089FF38 50C4000A */ beql $a2, $a0, .L8089FF64
|
||||
/* 0068C 8089FF3C 860A001C */ lh $t2, 0x001C($s0) ## 0000001C
|
||||
/* 00690 8089FF40 A604001C */ sh $a0, 0x001C($s0) ## 0000001C
|
||||
/* 00694 8089FF44 8C690004 */ lw $t1, 0x0004($v1) ## 00000004
|
||||
/* 00698 8089FF48 C6080158 */ lwc1 $f8, 0x0158($s0) ## 00000158
|
||||
/* 0069C 8089FF4C 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00
|
||||
/* 006A0 8089FF50 00000000 */ nop
|
||||
/* 006A4 8089FF54 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 006A8 8089FF58 46083280 */ add.s $f10, $f6, $f8
|
||||
/* 006AC 8089FF5C E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L8089FF60:
|
||||
/* 006B0 8089FF60 860A001C */ lh $t2, 0x001C($s0) ## 0000001C
|
||||
.L8089FF64:
|
||||
/* 006B4 8089FF64 50CA0006 */ beql $a2, $t2, .L8089FF80
|
||||
/* 006B8 8089FF68 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
|
||||
/* 006BC 8089FF6C 10C00003 */ beq $a2, $zero, .L8089FF7C
|
||||
/* 006C0 8089FF70 8FA40034 */ lw $a0, 0x0034($sp)
|
||||
/* 006C4 8089FF74 0C00B2ED */ jal Flags_UnsetSwitch
|
||||
|
||||
/* 006C8 8089FF78 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000
|
||||
.L8089FF7C:
|
||||
/* 006CC 8089FF7C 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
|
||||
.L8089FF80:
|
||||
/* 006D0 8089FF80 8E050154 */ lw $a1, 0x0154($s0) ## 00000154
|
||||
/* 006D4 8089FF84 0C01DE80 */ jal Math_ApproxF
|
||||
|
||||
/* 006D8 8089FF88 3C0640A0 */ lui $a2, 0x40A0 ## $a2 = 40A00000
|
||||
/* 006DC 8089FF8C 10400009 */ beq $v0, $zero, .L8089FFB4
|
||||
/* 006E0 8089FF90 8FAB0034 */ lw $t3, 0x0034($sp)
|
||||
/* 006E4 8089FF94 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 006E8 8089FF98 002B0821 */ addu $at, $at, $t3
|
||||
/* 006EC 8089FF9C 3C0C808A */ lui $t4, %hi(func_8089FCF8) ## $t4 = 808A0000
|
||||
/* 006F0 8089FFA0 A4201D30 */ sh $zero, 0x1D30($at) ## 00011D30
|
||||
/* 006F4 8089FFA4 258CFCF8 */ addiu $t4, $t4, %lo(func_8089FCF8) ## $t4 = 8089FCF8
|
||||
/* 006F8 8089FFA8 AE0C014C */ sw $t4, 0x014C($s0) ## 0000014C
|
||||
/* 006FC 8089FFAC 0C041B33 */ jal func_80106CCC
|
||||
/* 00700 8089FFB0 8FA40034 */ lw $a0, 0x0034($sp)
|
||||
.L8089FFB4:
|
||||
/* 00704 8089FFB4 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00708 8089FFB8 8FAD0034 */ lw $t5, 0x0034($sp)
|
||||
/* 0070C 8089FFBC 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 00710 8089FFC0 8DAE07C0 */ lw $t6, 0x07C0($t5) ## 000007C0
|
||||
/* 00714 8089FFC4 44059000 */ mfc1 $a1, $f18
|
||||
/* 00718 8089FFC8 8DC40028 */ lw $a0, 0x0028($t6) ## 00000028
|
||||
/* 0071C 8089FFCC 00052C00 */ sll $a1, $a1, 16
|
||||
/* 00720 8089FFD0 0C227E74 */ jal func_8089F9D0
|
||||
/* 00724 8089FFD4 00052C03 */ sra $a1, $a1, 16
|
||||
/* 00728 8089FFD8 1000005F */ beq $zero, $zero, .L808A0158
|
||||
/* 0072C 8089FFDC C6000154 */ lwc1 $f0, 0x0154($s0) ## 00000154
|
||||
glabel L8089FFE0
|
||||
/* 00730 8089FFE0 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 00734 8089FFE4 AFA70034 */ sw $a3, 0x0034($sp)
|
||||
/* 00738 8089FFE8 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 0073C 8089FFEC 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
/* 00740 8089FFF0 10400007 */ beq $v0, $zero, .L808A0010
|
||||
/* 00744 8089FFF4 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
|
||||
/* 00748 8089FFF8 3C0142AA */ lui $at, 0x42AA ## $at = 42AA0000
|
||||
/* 0074C 8089FFFC 44813000 */ mtc1 $at, $f6 ## $f6 = 85.00
|
||||
/* 00750 808A0000 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 00754 808A0004 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 00758 808A0008 10000003 */ beq $zero, $zero, .L808A0018
|
||||
/* 0075C 808A000C E6080154 */ swc1 $f8, 0x0154($s0) ## 00000154
|
||||
.L808A0010:
|
||||
/* 00760 808A0010 C60A0158 */ lwc1 $f10, 0x0158($s0) ## 00000158
|
||||
/* 00764 808A0014 E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L808A0018:
|
||||
/* 00768 808A0018 8E050154 */ lw $a1, 0x0154($s0) ## 00000154
|
||||
/* 0076C 808A001C 0C01DE80 */ jal Math_ApproxF
|
||||
|
||||
/* 00770 808A0020 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 00774 808A0024 10400007 */ beq $v0, $zero, .L808A0044
|
||||
/* 00778 808A0028 8FB80034 */ lw $t8, 0x0034($sp)
|
||||
/* 0077C 808A002C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 00780 808A0030 00380821 */ addu $at, $at, $t8
|
||||
/* 00784 808A0034 3C19808A */ lui $t9, %hi(func_8089FCF8) ## $t9 = 808A0000
|
||||
/* 00788 808A0038 A4201D30 */ sh $zero, 0x1D30($at) ## 00011D30
|
||||
/* 0078C 808A003C 2739FCF8 */ addiu $t9, $t9, %lo(func_8089FCF8) ## $t9 = 8089FCF8
|
||||
/* 00790 808A0040 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
|
||||
.L808A0044:
|
||||
/* 00794 808A0044 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00798 808A0048 8FAA0020 */ lw $t2, 0x0020($sp)
|
||||
/* 0079C 808A004C 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 007A0 808A0050 44099000 */ mfc1 $t1, $f18
|
||||
/* 007A4 808A0054 1000003F */ beq $zero, $zero, .L808A0154
|
||||
/* 007A8 808A0058 A5490062 */ sh $t1, 0x0062($t2) ## 00000062
|
||||
glabel L808A005C
|
||||
/* 007AC 808A005C 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 007B0 808A0060 AFA70034 */ sw $a3, 0x0034($sp)
|
||||
/* 007B4 808A0064 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 007B8 808A0068 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
/* 007BC 808A006C 10400007 */ beq $v0, $zero, .L808A008C
|
||||
/* 007C0 808A0070 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
|
||||
/* 007C4 808A0074 3C0142DC */ lui $at, 0x42DC ## $at = 42DC0000
|
||||
/* 007C8 808A0078 44813000 */ mtc1 $at, $f6 ## $f6 = 110.00
|
||||
/* 007CC 808A007C C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 007D0 808A0080 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 007D4 808A0084 10000003 */ beq $zero, $zero, .L808A0094
|
||||
/* 007D8 808A0088 E6080154 */ swc1 $f8, 0x0154($s0) ## 00000154
|
||||
.L808A008C:
|
||||
/* 007DC 808A008C C60A0158 */ lwc1 $f10, 0x0158($s0) ## 00000158
|
||||
/* 007E0 808A0090 E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L808A0094:
|
||||
/* 007E4 808A0094 8E050154 */ lw $a1, 0x0154($s0) ## 00000154
|
||||
/* 007E8 808A0098 0C01DE80 */ jal Math_ApproxF
|
||||
|
||||
/* 007EC 808A009C 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 007F0 808A00A0 10400007 */ beq $v0, $zero, .L808A00C0
|
||||
/* 007F4 808A00A4 8FAB0034 */ lw $t3, 0x0034($sp)
|
||||
/* 007F8 808A00A8 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 007FC 808A00AC 002B0821 */ addu $at, $at, $t3
|
||||
/* 00800 808A00B0 3C0C808A */ lui $t4, %hi(func_8089FCF8) ## $t4 = 808A0000
|
||||
/* 00804 808A00B4 A4201D30 */ sh $zero, 0x1D30($at) ## 00011D30
|
||||
/* 00808 808A00B8 258CFCF8 */ addiu $t4, $t4, %lo(func_8089FCF8) ## $t4 = 8089FCF8
|
||||
/* 0080C 808A00BC AE0C014C */ sw $t4, 0x014C($s0) ## 0000014C
|
||||
.L808A00C0:
|
||||
/* 00810 808A00C0 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00814 808A00C4 8FAF0020 */ lw $t7, 0x0020($sp)
|
||||
/* 00818 808A00C8 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 0081C 808A00CC 440E9000 */ mfc1 $t6, $f18
|
||||
/* 00820 808A00D0 10000020 */ beq $zero, $zero, .L808A0154
|
||||
/* 00824 808A00D4 A5EE0082 */ sh $t6, 0x0082($t7) ## 00000082
|
||||
glabel L808A00D8
|
||||
/* 00828 808A00D8 8E05015C */ lw $a1, 0x015C($s0) ## 0000015C
|
||||
/* 0082C 808A00DC AFA70034 */ sw $a3, 0x0034($sp)
|
||||
/* 00830 808A00E0 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00834 808A00E4 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
/* 00838 808A00E8 10400007 */ beq $v0, $zero, .L808A0108
|
||||
/* 0083C 808A00EC 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
|
||||
/* 00840 808A00F0 3C014320 */ lui $at, 0x4320 ## $at = 43200000
|
||||
/* 00844 808A00F4 44813000 */ mtc1 $at, $f6 ## $f6 = 160.00
|
||||
/* 00848 808A00F8 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158
|
||||
/* 0084C 808A00FC 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 00850 808A0100 10000003 */ beq $zero, $zero, .L808A0110
|
||||
/* 00854 808A0104 E6080154 */ swc1 $f8, 0x0154($s0) ## 00000154
|
||||
.L808A0108:
|
||||
/* 00858 808A0108 C60A0158 */ lwc1 $f10, 0x0158($s0) ## 00000158
|
||||
/* 0085C 808A010C E60A0154 */ swc1 $f10, 0x0154($s0) ## 00000154
|
||||
.L808A0110:
|
||||
/* 00860 808A0110 8E050154 */ lw $a1, 0x0154($s0) ## 00000154
|
||||
/* 00864 808A0114 0C01DE80 */ jal Math_ApproxF
|
||||
|
||||
/* 00868 808A0118 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
|
||||
/* 0086C 808A011C 10400007 */ beq $v0, $zero, .L808A013C
|
||||
/* 00870 808A0120 8FB80034 */ lw $t8, 0x0034($sp)
|
||||
/* 00874 808A0124 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 00878 808A0128 00380821 */ addu $at, $at, $t8
|
||||
/* 0087C 808A012C 3C19808A */ lui $t9, %hi(func_8089FCF8) ## $t9 = 808A0000
|
||||
/* 00880 808A0130 A4201D30 */ sh $zero, 0x1D30($at) ## 00011D30
|
||||
/* 00884 808A0134 2739FCF8 */ addiu $t9, $t9, %lo(func_8089FCF8) ## $t9 = 8089FCF8
|
||||
/* 00888 808A0138 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
|
||||
.L808A013C:
|
||||
/* 0088C 808A013C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
|
||||
/* 00890 808A0140 8FAA0020 */ lw $t2, 0x0020($sp)
|
||||
/* 00894 808A0144 4600848D */ trunc.w.s $f18, $f16
|
||||
/* 00898 808A0148 44099000 */ mfc1 $t1, $f18
|
||||
/* 0089C 808A014C 00000000 */ nop
|
||||
/* 008A0 808A0150 A5490102 */ sh $t1, 0x0102($t2) ## 00000102
|
||||
glabel L808A0154
|
||||
.L808A0154:
|
||||
/* 008A4 808A0154 C6000154 */ lwc1 $f0, 0x0154($s0) ## 00000154
|
||||
.L808A0158:
|
||||
/* 008A8 808A0158 C6020028 */ lwc1 $f2, 0x0028($s0) ## 00000028
|
||||
/* 008AC 808A015C 24050078 */ addiu $a1, $zero, 0x0078 ## $a1 = 00000078
|
||||
/* 008B0 808A0160 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014
|
||||
/* 008B4 808A0164 4602003C */ c.lt.s $f0, $f2
|
||||
/* 008B8 808A0168 00000000 */ nop
|
||||
/* 008BC 808A016C 4502000A */ bc1fl .L808A0198
|
||||
/* 008C0 808A0170 4600103C */ c.lt.s $f2, $f0
|
||||
/* 008C4 808A0174 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
|
||||
/* 008C8 808A0178 0C02A800 */ jal func_800AA000
|
||||
/* 008CC 808A017C 2407000A */ addiu $a3, $zero, 0x000A ## $a3 = 0000000A
|
||||
/* 008D0 808A0180 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 008D4 808A0184 0C00BE52 */ jal func_8002F948
|
||||
/* 008D8 808A0188 2405205E */ addiu $a1, $zero, 0x205E ## $a1 = 0000205E
|
||||
/* 008DC 808A018C 1000000D */ beq $zero, $zero, .L808A01C4
|
||||
/* 008E0 808A0190 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 008E4 808A0194 4600103C */ c.lt.s $f2, $f0
|
||||
.L808A0198:
|
||||
/* 008E8 808A0198 24050078 */ addiu $a1, $zero, 0x0078 ## $a1 = 00000078
|
||||
/* 008EC 808A019C 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014
|
||||
/* 008F0 808A01A0 45020008 */ bc1fl .L808A01C4
|
||||
/* 008F4 808A01A4 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 008F8 808A01A8 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
|
||||
/* 008FC 808A01AC 0C02A800 */ jal func_800AA000
|
||||
/* 00900 808A01B0 2407000A */ addiu $a3, $zero, 0x000A ## $a3 = 0000000A
|
||||
/* 00904 808A01B4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00908 808A01B8 0C00BE52 */ jal func_8002F948
|
||||
/* 0090C 808A01BC 2405205E */ addiu $a1, $zero, 0x205E ## $a1 = 0000205E
|
||||
/* 00910 808A01C0 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
.L808A01C4:
|
||||
/* 00914 808A01C4 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 00918 808A01C8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
|
||||
/* 0091C 808A01CC 03E00008 */ jr $ra
|
||||
/* 00920 808A01D0 00000000 */ nop
|
|
@ -1,27 +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 D_808A0510
|
||||
.word 0x00000000
|
||||
glabel D_808A0514
|
||||
.word 0x00000000, 0x0000001E, 0x00000000, 0x0000001D, 0xFFFFFEC0, 0x0000001C, 0xFFFFFCF4
|
||||
glabel Bg_Mizu_Water_InitVars
|
||||
.word 0x00650100, 0x00000030, 0x00590000, 0x00000160
|
||||
.word BgMizuWater_Init
|
||||
.word BgMizuWater_Destroy
|
||||
.word BgMizuWater_Update
|
||||
.word BgMizuWater_Draw
|
||||
.word 0x00000000, 0x42DC0000
|
||||
glabel D_808A0558
|
||||
.word 0x00000002, 0x00000003, 0x00000005, 0x00000007, 0x0000000C, 0x00000014, 0x00000015, 0x00000016
|
||||
glabel D_808A0578
|
||||
.word 0x40500001, 0x00000000
|
||||
|
|
@ -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_808A0640
|
||||
.incbin "baserom/ovl_Bg_Mizu_Water", 0xD90, 0x00000140
|
3
spec
3
spec
|
@ -1087,8 +1087,7 @@ endseg
|
|||
beginseg
|
||||
name "ovl_Bg_Mizu_Water"
|
||||
include "build/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.o"
|
||||
include "build/data/overlays/actors/z_bg_mizu_water.data.o"
|
||||
include "build/data/overlays/actors/z_bg_mizu_water.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Mizu_Water/ovl_Bg_Mizu_Water_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_bg_mizu_water.c
|
||||
* Overlay: ovl_Bg_Mizu_Water
|
||||
* Description: Water plane in Water Temple. Changes height based on switches 0x1C, 0x1D, 0x1E.
|
||||
*/
|
||||
|
||||
#include "z_bg_mizu_water.h"
|
||||
|
||||
#define FLAGS 0x00000030
|
||||
|
@ -9,7 +15,23 @@ void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgMizuWater_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void BgMizuWater_WaitForAction(BgMizuWater* this, GlobalContext* globalCtx);
|
||||
void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_06004B20[];
|
||||
|
||||
typedef struct {
|
||||
s32 switchFlag;
|
||||
s32 yDiff;
|
||||
} WaterLevel;
|
||||
|
||||
static WaterLevel sWaterLevels[] = {
|
||||
{ 0x00, 0 },
|
||||
{ 0x1E, 0 },
|
||||
{ 0x1D, -320 },
|
||||
{ 0x1C, -780 },
|
||||
};
|
||||
|
||||
const ActorInit Bg_Mizu_Water_InitVars = {
|
||||
ACTOR_BG_MIZU_WATER,
|
||||
ACTORTYPE_BG,
|
||||
|
@ -21,19 +43,307 @@ const ActorInit Bg_Mizu_Water_InitVars = {
|
|||
(ActorFunc)BgMizuWater_Update,
|
||||
(ActorFunc)BgMizuWater_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/func_8089F8B0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/func_8089F9D0.s")
|
||||
static f32 sUnused1 = 0;
|
||||
static f32 sUnused2 = 110.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/BgMizuWater_Init.s")
|
||||
static u32 sWaterBoxIndexes[] = { 2, 3, 5, 7, 12, 20, 21, 22 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/BgMizuWater_Destroy.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F(scale, 1, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/func_8089FCF8.s")
|
||||
u32 BgMizuWater_GetWaterLevelActionIndex(s16 switchFlag, GlobalContext* globalCtx) {
|
||||
u32 ret;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/func_8089FEC4.s")
|
||||
if (bREG(0) != 0) {
|
||||
switch (bREG(1)) {
|
||||
case 0:
|
||||
Flags_SetSwitch(globalCtx, 0x1C);
|
||||
break;
|
||||
case 1:
|
||||
Flags_SetSwitch(globalCtx, 0x1D);
|
||||
break;
|
||||
case 2:
|
||||
Flags_SetSwitch(globalCtx, 0x1E);
|
||||
break;
|
||||
}
|
||||
bREG(0) = 0;
|
||||
}
|
||||
if (Flags_GetSwitch(globalCtx, 0x1C) && (switchFlag != 0x1C)) {
|
||||
ret = 3;
|
||||
} else if (Flags_GetSwitch(globalCtx, 0x1D) && (switchFlag != 0x1D)) {
|
||||
ret = 2;
|
||||
} else if (Flags_GetSwitch(globalCtx, 0x1E) && (switchFlag != 0x1E)) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/BgMizuWater_Update.s")
|
||||
return ret;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Water/BgMizuWater_Draw.s")
|
||||
void BgMizuWater_SetWaterBoxesHeight(WaterBox* waterBoxes, s16 height) {
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
waterBoxes[sWaterBoxIndexes[i]].unk_02 = height;
|
||||
}
|
||||
}
|
||||
|
||||
void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMizuWater* this = THIS;
|
||||
f32 initialActorY;
|
||||
WaterBox* waterBoxes;
|
||||
s32 waterLevelActionIndex;
|
||||
|
||||
waterBoxes = globalCtx->colCtx.stat.colHeader->waterBoxes;
|
||||
this->type = this->actor.params & 0xFF;
|
||||
this->switchFlag = (this->actor.params >> 8) & 0xFF;
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
initialActorY = this->actor.posRot.pos.y;
|
||||
this->baseY = initialActorY;
|
||||
this->targetY = initialActorY;
|
||||
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
if (bREG(15) == 0) {
|
||||
osSyncPrintf("<コンストラクト>%x %x %x\n", Flags_GetSwitch(globalCtx, 0x1C),
|
||||
Flags_GetSwitch(globalCtx, 0x1D), Flags_GetSwitch(globalCtx, 0x1E));
|
||||
}
|
||||
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(-1, globalCtx);
|
||||
this->actor.posRot.pos.y = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
|
||||
BgMizuWater_SetWaterBoxesHeight(waterBoxes, this->actor.posRot.pos.y);
|
||||
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
|
||||
Flags_UnsetSwitch(globalCtx, 0x1C);
|
||||
Flags_UnsetSwitch(globalCtx, 0x1D);
|
||||
Flags_UnsetSwitch(globalCtx, 0x1E);
|
||||
|
||||
switch (this->actor.params) {
|
||||
case 0x1E:
|
||||
Flags_SetSwitch(globalCtx, 0x1E);
|
||||
break;
|
||||
case 0x1D:
|
||||
Flags_SetSwitch(globalCtx, 0x1D);
|
||||
break;
|
||||
case 0x1C:
|
||||
default:
|
||||
Flags_SetSwitch(globalCtx, 0x1C);
|
||||
break;
|
||||
}
|
||||
this->targetY = this->actor.posRot.pos.y;
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actor.posRot.pos.y = this->baseY + 85.0f;
|
||||
}
|
||||
waterBoxes[6].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
case 3:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actor.posRot.pos.y = this->baseY + 110.0f;
|
||||
if (1) {}
|
||||
this->targetY = this->actor.posRot.pos.y;
|
||||
}
|
||||
waterBoxes[8].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
case 4:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actor.posRot.pos.y = this->baseY + 160.0f;
|
||||
if (1) {}
|
||||
this->targetY = this->actor.posRot.pos.y;
|
||||
}
|
||||
waterBoxes[16].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
}
|
||||
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
|
||||
void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgMizuWater_WaitForAction(BgMizuWater* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s32 waterLevelActionIndex;
|
||||
s16 prevSwitchFlag;
|
||||
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
prevSwitchFlag = this->actor.params;
|
||||
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx);
|
||||
if (waterLevelActionIndex != 0) {
|
||||
if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) {
|
||||
func_800800F8(globalCtx, 0xC30, -0x64 - waterLevelActionIndex, 0, 0);
|
||||
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
|
||||
this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
|
||||
}
|
||||
}
|
||||
if ((prevSwitchFlag != this->actor.params) && (prevSwitchFlag != 0)) {
|
||||
Flags_UnsetSwitch(globalCtx, prevSwitchFlag);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 85.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 110.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 160.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->targetY != this->actor.posRot.pos.y) {
|
||||
this->actionFunc = BgMizuWater_ChangeWaterLevel;
|
||||
}
|
||||
}
|
||||
|
||||
void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s16 prevSwitchFlag;
|
||||
s32 waterLevelActionIndex;
|
||||
WaterBox* waterBoxes;
|
||||
|
||||
waterBoxes = globalCtx->colCtx.stat.colHeader->waterBoxes;
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
prevSwitchFlag = this->actor.params;
|
||||
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx);
|
||||
if (waterLevelActionIndex != 0) {
|
||||
if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) {
|
||||
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
|
||||
this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
|
||||
}
|
||||
}
|
||||
|
||||
if ((prevSwitchFlag != this->actor.params) && (prevSwitchFlag != 0)) {
|
||||
Flags_UnsetSwitch(globalCtx, prevSwitchFlag);
|
||||
}
|
||||
|
||||
if (Math_ApproxF(&this->actor.posRot.pos.y, this->targetY, 5.0f)) {
|
||||
globalCtx->unk_11D30[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
func_80106CCC(globalCtx);
|
||||
}
|
||||
BgMizuWater_SetWaterBoxesHeight(globalCtx->colCtx.stat.colHeader->waterBoxes, this->actor.posRot.pos.y);
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 85.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_ApproxF(&this->actor.posRot.pos.y, this->targetY, 1.0f)) {
|
||||
globalCtx->unk_11D30[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[6].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
case 3:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 110.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_ApproxF(&this->actor.posRot.pos.y, this->targetY, 1.0f)) {
|
||||
globalCtx->unk_11D30[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[8].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
case 4:
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->targetY = this->baseY + 160.0f;
|
||||
} else {
|
||||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_ApproxF(&this->actor.posRot.pos.y, this->targetY, 1.0f)) {
|
||||
globalCtx->unk_11D30[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[16].unk_02 = this->actor.posRot.pos.y;
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->targetY < this->actor.posRot.pos.y) {
|
||||
func_800AA000(0.0f, 0x78, 0x14, 0xA);
|
||||
func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
|
||||
} else if (this->targetY > this->actor.posRot.pos.y) {
|
||||
func_800AA000(0.0f, 0x78, 0x14, 0xA);
|
||||
func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMizuWater* this = THIS;
|
||||
s32 posY;
|
||||
s32 unk0;
|
||||
s32 unk1;
|
||||
s32 pad;
|
||||
|
||||
if (bREG(15) == 0) {
|
||||
osSyncPrintf("%x %x %x\n", Flags_GetSwitch(globalCtx, 0x1C), Flags_GetSwitch(globalCtx, 0x1D),
|
||||
Flags_GetSwitch(globalCtx, 0x1E));
|
||||
}
|
||||
|
||||
if (this->type == 0) {
|
||||
posY = this->actor.posRot.pos.y;
|
||||
unk0 = 0;
|
||||
unk1 = 0;
|
||||
if (posY < -15.0f) {
|
||||
unk0 = 0;
|
||||
unk1 = ((posY - -835.0f) / 820.0f) * 200.0f;
|
||||
} else if (posY < 445.0f) {
|
||||
unk0 = 1;
|
||||
unk1 = 0xFF - (s32)(((posY - -15.0f) / 460.0f) * 95.0f);
|
||||
} else if (posY <= 765.0f) {
|
||||
unk0 = 2;
|
||||
unk1 = 0xFF - (s32)(((posY - 445.0f) / 320.0f) * 95.0f);
|
||||
}
|
||||
globalCtx->unk_11D30[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
|
||||
}
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
void BgMizuWater_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMizuWater* this = THIS;
|
||||
s32 gameplayFrames;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 738);
|
||||
gameplayFrames = globalCtx->gameplayFrames;
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(oGfxCtx->polyXlu.p++, 0x0C,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0,
|
||||
-gameplayFrames * 1, 32, 32));
|
||||
|
||||
gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 749),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, 128);
|
||||
|
||||
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 102);
|
||||
|
||||
gSPDisplayList(oGfxCtx->polyXlu.p++, D_06004B20);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 756);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,15 @@
|
|||
|
||||
struct BgMizuWater;
|
||||
|
||||
typedef void (*BgMizuWaterActionFunc)(struct BgMizuWater*, GlobalContext*);
|
||||
|
||||
typedef struct BgMizuWater {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x14];
|
||||
/* 0x014C */ BgMizuWaterActionFunc actionFunc;
|
||||
/* 0x0150 */ s32 type;
|
||||
/* 0x0154 */ f32 targetY;
|
||||
/* 0x0158 */ f32 baseY;
|
||||
/* 0x015C */ s32 switchFlag; // only used for types 2-4
|
||||
} BgMizuWater; // size = 0x0160
|
||||
|
||||
extern const ActorInit Bg_Mizu_Water_InitVars;
|
||||
|
|
|
@ -398,6 +398,9 @@ D_06003C64 = 0x06003C64;
|
|||
// z_bg_mizu_uzu
|
||||
D_060074EC = 0x060074EC;
|
||||
|
||||
// z_bg_mizu_water
|
||||
D_06004B20 = 0x06004B20;
|
||||
|
||||
// z_bg_mori_elevator
|
||||
D_060035F8 = 0x060035F8;
|
||||
D_06002AD0 = 0x06002AD0;
|
||||
|
@ -408,7 +411,7 @@ D_06002590 = 0x06002590;
|
|||
|
||||
// z_bg_spot08_bakudankabe
|
||||
D_060039D4 = 0x060039D4;
|
||||
D_06003898 = 0x06003898;
|
||||
D_06003898 = 0x06003898;
|
||||
D_0500A880 = 0x0500A880;
|
||||
|
||||
// z_bg_ydan_hasi
|
||||
|
@ -1025,7 +1028,7 @@ D_06006078 = 0x06006078;
|
|||
D_04049FE0 = 0x04049FE0;
|
||||
D_06000AE8 = 0x06000AE8;
|
||||
D_06001678 = 0x06001678;
|
||||
|
||||
|
||||
// z_bg_haka_tubo
|
||||
D_060108B8 = 0x060108B8;
|
||||
D_0600FE40 = 0x0600FE40;
|
||||
|
@ -1058,7 +1061,7 @@ D_06000970 = 0x06000970;
|
|||
// z_bg_jya_goroiwa
|
||||
D_060006B0 = 0x060006B0;
|
||||
|
||||
// z_en_js
|
||||
// z_en_js
|
||||
D_0600045C = 0x0600045C;
|
||||
D_06005EA0 = 0x06005EA0;
|
||||
D_0600018C = 0x0600018C;
|
||||
|
|
Loading…
Reference in a new issue