1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-25 22:26:12 +00:00

Darkmeiro decompilation (#320)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* forgot to remove ASM

* Now with better formatting

* removed some stray thisx

* Update src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c

Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c

Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c

Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>

* one more cleanup

* cleanup as per discussion

* fancy new names

* sfx

* ZAP

* more cleanup

* more cleanup

* and a little more

* renaming some stuff

* a little more tidying up

* bug comment

Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
This commit is contained in:
petrie911 2020-09-14 15:53:57 -05:00 committed by GitHub
parent 9891ac04c3
commit 203cd19f8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 208 additions and 631 deletions

View file

@ -1,19 +0,0 @@
glabel BgGndDarkmeiro_Destroy
/* 002B8 80878EE8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 002BC 80878EEC AFBF0014 */ sw $ra, 0x0014($sp)
/* 002C0 80878EF0 AFA40018 */ sw $a0, 0x0018($sp)
/* 002C4 80878EF4 848F001C */ lh $t7, 0x001C($a0) ## 0000001C
/* 002C8 80878EF8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 002CC 80878EFC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 002D0 80878F00 31F800FF */ andi $t8, $t7, 0x00FF ## $t8 = 00000000
/* 002D4 80878F04 17010004 */ bne $t8, $at, .L80878F18
/* 002D8 80878F08 8FB90018 */ lw $t9, 0x0018($sp)
/* 002DC 80878F0C 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 002E0 80878F10 0C00FB56 */ jal DynaPolyInfo_Free
## DynaPolyInfo_delReserve
/* 002E4 80878F14 8F26014C */ lw $a2, 0x014C($t9) ## 0000014C
.L80878F18:
/* 002E8 80878F18 8FBF0014 */ lw $ra, 0x0014($sp)
/* 002EC 80878F1C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 002F0 80878F20 03E00008 */ jr $ra
/* 002F4 80878F24 00000000 */ nop

View file

@ -1,158 +0,0 @@
glabel BgGndDarkmeiro_Init
/* 00090 80878CC0 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00094 80878CC4 AFB10018 */ sw $s1, 0x0018($sp)
/* 00098 80878CC8 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 0009C 80878CCC 3C0E8088 */ lui $t6, %hi(func_80878F28) ## $t6 = 80880000
/* 000A0 80878CD0 AFBF001C */ sw $ra, 0x001C($sp)
/* 000A4 80878CD4 AFB00014 */ sw $s0, 0x0014($sp)
/* 000A8 80878CD8 AFA00030 */ sw $zero, 0x0030($sp)
/* 000AC 80878CDC 25CE8F28 */ addiu $t6, $t6, %lo(func_80878F28) ## $t6 = 80878F28
/* 000B0 80878CE0 3C053DCC */ lui $a1, 0x3DCC ## $a1 = 3DCC0000
/* 000B4 80878CE4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 000B8 80878CE8 AC8E016C */ sw $t6, 0x016C($a0) ## 0000016C
/* 000BC 80878CEC 0C00B58B */ jal Actor_SetScale
/* 000C0 80878CF0 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3DCCCCCD
/* 000C4 80878CF4 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 000C8 80878CF8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 000CC 80878CFC 3C0F8088 */ lui $t7, %hi(func_808791BC) ## $t7 = 80880000
/* 000D0 80878D00 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
/* 000D4 80878D04 50400009 */ beql $v0, $zero, .L80878D2C
/* 000D8 80878D08 8E180004 */ lw $t8, 0x0004($s0) ## 00000004
/* 000DC 80878D0C 1041000C */ beq $v0, $at, .L80878D40
/* 000E0 80878D10 3C040601 */ lui $a0, 0x0601 ## $a0 = 06010000
/* 000E4 80878D14 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 000E8 80878D18 1041003B */ beq $v0, $at, .L80878E08
/* 000EC 80878D1C 3C088088 */ lui $t0, %hi(func_80878F34) ## $t0 = 80880000
/* 000F0 80878D20 1000006D */ beq $zero, $zero, .L80878ED8
/* 000F4 80878D24 8FBF001C */ lw $ra, 0x001C($sp)
/* 000F8 80878D28 8E180004 */ lw $t8, 0x0004($s0) ## 00000004
.L80878D2C:
/* 000FC 80878D2C 25EF91BC */ addiu $t7, $t7, %lo(func_808791BC) ## $t7 = 808791BC
/* 00100 80878D30 AE0F0134 */ sw $t7, 0x0134($s0) ## 00000134
/* 00104 80878D34 37190080 */ ori $t9, $t8, 0x0080 ## $t9 = 00000080
/* 00108 80878D38 10000066 */ beq $zero, $zero, .L80878ED4
/* 0010C 80878D3C AE190004 */ sw $t9, 0x0004($s0) ## 00000004
.L80878D40:
/* 00110 80878D40 2484C080 */ addiu $a0, $a0, 0xC080 ## $a0 = 0600C080
/* 00114 80878D44 0C010620 */ jal DynaPolyInfo_Alloc
/* 00118 80878D48 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF8
/* 0011C 80878D4C 26250810 */ addiu $a1, $s1, 0x0810 ## $a1 = 00000810
/* 00120 80878D50 AFA50020 */ sw $a1, 0x0020($sp)
/* 00124 80878D54 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00128 80878D58 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 0012C 80878D5C 0C00FA9D */ jal DynaPolyInfo_RegisterActor
## DynaPolyInfo_setActor
/* 00130 80878D60 8FA70030 */ lw $a3, 0x0030($sp)
/* 00134 80878D64 8608001C */ lh $t0, 0x001C($s0) ## 0000001C
/* 00138 80878D68 2401003F */ addiu $at, $zero, 0x003F ## $at = 0000003F
/* 0013C 80878D6C AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 00140 80878D70 00084A03 */ sra $t1, $t0, 8
/* 00144 80878D74 312A003F */ andi $t2, $t1, 0x003F ## $t2 = 00000000
/* 00148 80878D78 15410008 */ bne $t2, $at, .L80878D9C
/* 0014C 80878D7C 3C0D8088 */ lui $t5, %hi(func_808791E8) ## $t5 = 80880000
/* 00150 80878D80 3C0B8088 */ lui $t3, %hi(func_80879128) ## $t3 = 80880000
/* 00154 80878D84 3C0C8088 */ lui $t4, %hi(func_80879334) ## $t4 = 80880000
/* 00158 80878D88 256B9128 */ addiu $t3, $t3, %lo(func_80879128) ## $t3 = 80879128
/* 0015C 80878D8C 258C9334 */ addiu $t4, $t4, %lo(func_80879334) ## $t4 = 80879334
/* 00160 80878D90 AE0B016C */ sw $t3, 0x016C($s0) ## 0000016C
/* 00164 80878D94 1000004F */ beq $zero, $zero, .L80878ED4
/* 00168 80878D98 AE0C0134 */ sw $t4, 0x0134($s0) ## 00000134
.L80878D9C:
/* 0016C 80878D9C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00170 80878DA0 A6000168 */ sh $zero, 0x0168($s0) ## 00000168
/* 00174 80878DA4 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 00178 80878DA8 3C0E8088 */ lui $t6, %hi(func_80879134) ## $t6 = 80880000
/* 0017C 80878DAC 25AD91E8 */ addiu $t5, $t5, %lo(func_808791E8) ## $t5 = 808791E8
/* 00180 80878DB0 25CE9134 */ addiu $t6, $t6, %lo(func_80879134) ## $t6 = 80879134
/* 00184 80878DB4 00052A03 */ sra $a1, $a1, 8
/* 00188 80878DB8 AE0D0134 */ sw $t5, 0x0134($s0) ## 00000134
/* 0018C 80878DBC AE0E016C */ sw $t6, 0x016C($s0) ## 0000016C
/* 00190 80878DC0 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00194 80878DC4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00198 80878DC8 A6020166 */ sh $v0, 0x0166($s0) ## 00000166
/* 0019C 80878DCC 0C00B2D0 */ jal Flags_GetSwitch
/* 001A0 80878DD0 A6020164 */ sh $v0, 0x0164($s0) ## 00000164
/* 001A4 80878DD4 14400006 */ bne $v0, $zero, .L80878DF0
/* 001A8 80878DD8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 001AC 80878DDC 8FA50020 */ lw $a1, 0x0020($sp)
/* 001B0 80878DE0 0C00FAFE */ jal func_8003EBF8
/* 001B4 80878DE4 8E06014C */ lw $a2, 0x014C($s0) ## 0000014C
/* 001B8 80878DE8 1000003B */ beq $zero, $zero, .L80878ED8
/* 001BC 80878DEC 8FBF001C */ lw $ra, 0x001C($sp)
.L80878DF0:
/* 001C0 80878DF0 96180164 */ lhu $t8, 0x0164($s0) ## 00000164
/* 001C4 80878DF4 240F0040 */ addiu $t7, $zero, 0x0040 ## $t7 = 00000040
/* 001C8 80878DF8 A60F0166 */ sh $t7, 0x0166($s0) ## 00000166
/* 001CC 80878DFC 37190002 */ ori $t9, $t8, 0x0002 ## $t9 = 00000002
/* 001D0 80878E00 10000034 */ beq $zero, $zero, .L80878ED4
/* 001D4 80878E04 A6190164 */ sh $t9, 0x0164($s0) ## 00000164
.L80878E08:
/* 001D8 80878E08 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 001DC 80878E0C A6000168 */ sh $zero, 0x0168($s0) ## 00000168
/* 001E0 80878E10 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 001E4 80878E14 00052A03 */ sra $a1, $a1, 8
/* 001E8 80878E18 25088F34 */ addiu $t0, $t0, %lo(func_80878F34) ## $t0 = FFFF8F34
/* 001EC 80878E1C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 001F0 80878E20 AE08016C */ sw $t0, 0x016C($s0) ## 0000016C
/* 001F4 80878E24 AE000134 */ sw $zero, 0x0134($s0) ## 00000134
/* 001F8 80878E28 24A50001 */ addiu $a1, $a1, 0x0001 ## $a1 = 00000001
/* 001FC 80878E2C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00200 80878E30 A6020166 */ sh $v0, 0x0166($s0) ## 00000166
/* 00204 80878E34 0C00B2D0 */ jal Flags_GetSwitch
/* 00208 80878E38 A6020164 */ sh $v0, 0x0164($s0) ## 00000164
/* 0020C 80878E3C 50400007 */ beql $v0, $zero, .L80878E5C
/* 00210 80878E40 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00214 80878E44 960A0164 */ lhu $t2, 0x0164($s0) ## 00000164
/* 00218 80878E48 24090040 */ addiu $t1, $zero, 0x0040 ## $t1 = 00000040
/* 0021C 80878E4C A6090166 */ sh $t1, 0x0166($s0) ## 00000166
/* 00220 80878E50 354B0004 */ ori $t3, $t2, 0x0004 ## $t3 = 00000004
/* 00224 80878E54 A60B0164 */ sh $t3, 0x0164($s0) ## 00000164
/* 00228 80878E58 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L80878E5C:
/* 0022C 80878E5C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00230 80878E60 00052A03 */ sra $a1, $a1, 8
/* 00234 80878E64 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00238 80878E68 0C00B2D0 */ jal Flags_GetSwitch
/* 0023C 80878E6C 24A50002 */ addiu $a1, $a1, 0x0002 ## $a1 = 00000002
/* 00240 80878E70 50400007 */ beql $v0, $zero, .L80878E90
/* 00244 80878E74 860F0166 */ lh $t7, 0x0166($s0) ## 00000166
/* 00248 80878E78 960D0164 */ lhu $t5, 0x0164($s0) ## 00000164
/* 0024C 80878E7C 240C0040 */ addiu $t4, $zero, 0x0040 ## $t4 = 00000040
/* 00250 80878E80 A60C0168 */ sh $t4, 0x0168($s0) ## 00000168
/* 00254 80878E84 35AE0008 */ ori $t6, $t5, 0x0008 ## $t6 = 00000008
/* 00258 80878E88 A60E0164 */ sh $t6, 0x0164($s0) ## 00000164
/* 0025C 80878E8C 860F0166 */ lh $t7, 0x0166($s0) ## 00000166
.L80878E90:
/* 00260 80878E90 55E00005 */ bnel $t7, $zero, .L80878EA8
/* 00264 80878E94 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00268 80878E98 86180168 */ lh $t8, 0x0168($s0) ## 00000168
/* 0026C 80878E9C 53000009 */ beql $t8, $zero, .L80878EC4
/* 00270 80878EA0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00274 80878EA4 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L80878EA8:
/* 00278 80878EA8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0027C 80878EAC 00052A03 */ sra $a1, $a1, 8
/* 00280 80878EB0 0C00B2DD */ jal Flags_SetSwitch
/* 00284 80878EB4 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00288 80878EB8 10000007 */ beq $zero, $zero, .L80878ED8
/* 0028C 80878EBC 8FBF001C */ lw $ra, 0x001C($sp)
/* 00290 80878EC0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L80878EC4:
/* 00294 80878EC4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00298 80878EC8 00052A03 */ sra $a1, $a1, 8
/* 0029C 80878ECC 0C00B2ED */ jal Flags_UnsetSwitch
/* 002A0 80878ED0 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
.L80878ED4:
/* 002A4 80878ED4 8FBF001C */ lw $ra, 0x001C($sp)
.L80878ED8:
/* 002A8 80878ED8 8FB00014 */ lw $s0, 0x0014($sp)
/* 002AC 80878EDC 8FB10018 */ lw $s1, 0x0018($sp)
/* 002B0 80878EE0 03E00008 */ jr $ra
/* 002B4 80878EE4 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000

View file

@ -1,10 +0,0 @@
glabel BgGndDarkmeiro_Update
/* 00568 80879198 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0056C 8087919C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00570 808791A0 8C99016C */ lw $t9, 0x016C($a0) ## 0000016C
/* 00574 808791A4 0320F809 */ jalr $ra, $t9
/* 00578 808791A8 00000000 */ nop
/* 0057C 808791AC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00580 808791B0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00584 808791B4 03E00008 */ jr $ra
/* 00588 808791B8 00000000 */ nop

View file

@ -1,40 +0,0 @@
glabel func_80878C30
/* 00000 80878C30 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00004 80878C34 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00008 80878C38 AFA5001C */ sw $a1, 0x001C($sp)
/* 0000C 80878C3C 948E0164 */ lhu $t6, 0x0164($a0) ## 00000164
/* 00010 80878C40 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
/* 00014 80878C44 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000
/* 00018 80878C48 51E0000F */ beql $t7, $zero, .L80878C88
/* 0001C 80878C4C 84EA0166 */ lh $t2, 0x0166($a3) ## 00000166
/* 00020 80878C50 84980166 */ lh $t8, 0x0166($a0) ## 00000166
/* 00024 80878C54 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00028 80878C58 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 0002C 80878C5C 57000015 */ bnel $t8, $zero, .L80878CB4
/* 00030 80878C60 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00034 80878C64 8CE6014C */ lw $a2, 0x014C($a3) ## 0000014C
/* 00038 80878C68 0C00FAFE */ jal func_8003EBF8
/* 0003C 80878C6C AFA70018 */ sw $a3, 0x0018($sp)
/* 00040 80878C70 8FA70018 */ lw $a3, 0x0018($sp)
/* 00044 80878C74 94E80164 */ lhu $t0, 0x0164($a3) ## 00000164
/* 00048 80878C78 3109FFFD */ andi $t1, $t0, 0xFFFD ## $t1 = 00000000
/* 0004C 80878C7C 1000000C */ beq $zero, $zero, .L80878CB0
/* 00050 80878C80 A4E90164 */ sh $t1, 0x0164($a3) ## 00000164
/* 00054 80878C84 84EA0166 */ lh $t2, 0x0166($a3) ## 00000166
.L80878C88:
/* 00058 80878C88 8FA4001C */ lw $a0, 0x001C($sp)
/* 0005C 80878C8C 11400008 */ beq $t2, $zero, .L80878CB0
/* 00060 80878C90 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 00064 80878C94 8CE6014C */ lw $a2, 0x014C($a3) ## 0000014C
/* 00068 80878C98 0C00FB14 */ jal func_8003EC50
/* 0006C 80878C9C AFA70018 */ sw $a3, 0x0018($sp)
/* 00070 80878CA0 8FA70018 */ lw $a3, 0x0018($sp)
/* 00074 80878CA4 94EC0164 */ lhu $t4, 0x0164($a3) ## 00000164
/* 00078 80878CA8 358D0002 */ ori $t5, $t4, 0x0002 ## $t5 = 00000002
/* 0007C 80878CAC A4ED0164 */ sh $t5, 0x0164($a3) ## 00000164
.L80878CB0:
/* 00080 80878CB0 8FBF0014 */ lw $ra, 0x0014($sp)
.L80878CB4:
/* 00084 80878CB4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00088 80878CB8 03E00008 */ jr $ra
/* 0008C 80878CBC 00000000 */ nop

View file

@ -1,4 +0,0 @@
glabel func_80878F28
/* 002F8 80878F28 AFA40000 */ sw $a0, 0x0000($sp)
/* 002FC 80878F2C 03E00008 */ jr $ra
/* 00300 80878F30 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,147 +0,0 @@
glabel func_80878F34
/* 00304 80878F34 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00308 80878F38 AFB00020 */ sw $s0, 0x0020($sp)
/* 0030C 80878F3C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00310 80878F40 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00314 80878F44 AFA5002C */ sw $a1, 0x002C($sp)
/* 00318 80878F48 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 0031C 80878F4C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00320 80878F50 00052A03 */ sra $a1, $a1, 8
/* 00324 80878F54 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00328 80878F58 0C00B2D0 */ jal Flags_GetSwitch
/* 0032C 80878F5C 24A50001 */ addiu $a1, $a1, 0x0001 ## $a1 = 00000001
/* 00330 80878F60 50400023 */ beql $v0, $zero, .L80878FF0
/* 00334 80878F64 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00338 80878F68 96020164 */ lhu $v0, 0x0164($s0) ## 00000164
/* 0033C 80878F6C 24090130 */ addiu $t1, $zero, 0x0130 ## $t1 = 00000130
/* 00340 80878F70 24042881 */ addiu $a0, $zero, 0x2881 ## $a0 = 00002881
/* 00344 80878F74 304E0004 */ andi $t6, $v0, 0x0004 ## $t6 = 00000000
/* 00348 80878F78 11C00010 */ beq $t6, $zero, .L80878FBC
/* 0034C 80878F7C 34480004 */ ori $t0, $v0, 0x0004 ## $t0 = 00000004
/* 00350 80878F80 86030166 */ lh $v1, 0x0166($s0) ## 00000166
/* 00354 80878F84 18600003 */ blez $v1, .L80878F94
/* 00358 80878F88 246FFFFF */ addiu $t7, $v1, 0xFFFF ## $t7 = FFFFFFFF
/* 0035C 80878F8C 10000017 */ beq $zero, $zero, .L80878FEC
/* 00360 80878F90 A60F0166 */ sh $t7, 0x0166($s0) ## 00000166
.L80878F94:
/* 00364 80878F94 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00368 80878F98 8FA4002C */ lw $a0, 0x002C($sp)
/* 0036C 80878F9C 00052A03 */ sra $a1, $a1, 8
/* 00370 80878FA0 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00374 80878FA4 0C00B2ED */ jal Flags_UnsetSwitch
/* 00378 80878FA8 24A50001 */ addiu $a1, $a1, 0x0001 ## $a1 = 00000001
/* 0037C 80878FAC 96180164 */ lhu $t8, 0x0164($s0) ## 00000164
/* 00380 80878FB0 3319FFFB */ andi $t9, $t8, 0xFFFB ## $t9 = 00000000
/* 00384 80878FB4 1000000D */ beq $zero, $zero, .L80878FEC
/* 00388 80878FB8 A6190164 */ sh $t9, 0x0164($s0) ## 00000164
.L80878FBC:
/* 0038C 80878FBC 3C0A8013 */ lui $t2, %hi(D_801333E0)
/* 00390 80878FC0 3C0B8013 */ lui $t3, %hi(D_801333E8)
/* 00394 80878FC4 A6080164 */ sh $t0, 0x0164($s0) ## 00000164
/* 00398 80878FC8 A6090166 */ sh $t1, 0x0166($s0) ## 00000166
/* 0039C 80878FCC 256B33E8 */ addiu $t3, %lo(D_801333E8)
/* 003A0 80878FD0 254733E0 */ addiu $a3, $t2, %lo(D_801333E0)
/* 003A4 80878FD4 3C058013 */ lui $a1, %hi(D_801333D4)
/* 003A8 80878FD8 24A533D4 */ addiu $a1, %lo(D_801333D4)
/* 003AC 80878FDC AFA70010 */ sw $a3, 0x0010($sp)
/* 003B0 80878FE0 AFAB0014 */ sw $t3, 0x0014($sp)
/* 003B4 80878FE4 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 003B8 80878FE8 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
.L80878FEC:
/* 003BC 80878FEC 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L80878FF0:
/* 003C0 80878FF0 8FA4002C */ lw $a0, 0x002C($sp)
/* 003C4 80878FF4 00052A03 */ sra $a1, $a1, 8
/* 003C8 80878FF8 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 003CC 80878FFC 0C00B2D0 */ jal Flags_GetSwitch
/* 003D0 80879000 24A50002 */ addiu $a1, $a1, 0x0002 ## $a1 = 00000002
/* 003D4 80879004 50400023 */ beql $v0, $zero, .L80879094
/* 003D8 80879008 86030166 */ lh $v1, 0x0166($s0) ## 00000166
/* 003DC 8087900C 96020164 */ lhu $v0, 0x0164($s0) ## 00000164
/* 003E0 80879010 3C078013 */ lui $a3, %hi(D_801333E0)
/* 003E4 80879014 24E733E0 */ addiu $a3, %lo(D_801333E0)
/* 003E8 80879018 304C0008 */ andi $t4, $v0, 0x0008 ## $t4 = 00000000
/* 003EC 8087901C 11800010 */ beq $t4, $zero, .L80879060
/* 003F0 80879020 34580008 */ ori $t8, $v0, 0x0008 ## $t8 = 00000008
/* 003F4 80879024 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 003F8 80879028 18400003 */ blez $v0, .L80879038
/* 003FC 8087902C 244DFFFF */ addiu $t5, $v0, 0xFFFF ## $t5 = FFFFFFFF
/* 00400 80879030 10000017 */ beq $zero, $zero, .L80879090
/* 00404 80879034 A60D0168 */ sh $t5, 0x0168($s0) ## 00000168
.L80879038:
/* 00408 80879038 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 0040C 8087903C 8FA4002C */ lw $a0, 0x002C($sp)
/* 00410 80879040 00052A03 */ sra $a1, $a1, 8
/* 00414 80879044 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00418 80879048 0C00B2ED */ jal Flags_UnsetSwitch
/* 0041C 8087904C 24A50002 */ addiu $a1, $a1, 0x0002 ## $a1 = 00000002
/* 00420 80879050 960E0164 */ lhu $t6, 0x0164($s0) ## 00000164
/* 00424 80879054 31CFFFF7 */ andi $t7, $t6, 0xFFF7 ## $t7 = 00000000
/* 00428 80879058 1000000D */ beq $zero, $zero, .L80879090
/* 0042C 8087905C A60F0164 */ sh $t7, 0x0164($s0) ## 00000164
.L80879060:
/* 00430 80879060 24190130 */ addiu $t9, $zero, 0x0130 ## $t9 = 00000130
/* 00434 80879064 3C088013 */ lui $t0, %hi(D_801333E8)
/* 00438 80879068 A6180164 */ sh $t8, 0x0164($s0) ## 00000164
/* 0043C 8087906C A6190168 */ sh $t9, 0x0168($s0) ## 00000168
/* 00440 80879070 250833E8 */ addiu $t0, %lo(D_801333E8)
/* 00444 80879074 3C058013 */ lui $a1, %hi(D_801333D4)
/* 00448 80879078 24A533D4 */ addiu $a1, %lo(D_801333D4)
/* 0044C 8087907C AFA80014 */ sw $t0, 0x0014($sp)
/* 00450 80879080 AFA70010 */ sw $a3, 0x0010($sp)
/* 00454 80879084 24042881 */ addiu $a0, $zero, 0x2881 ## $a0 = 00002881
/* 00458 80879088 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 0045C 8087908C 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
.L80879090:
/* 00460 80879090 86030166 */ lh $v1, 0x0166($s0) ## 00000166
.L80879094:
/* 00464 80879094 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 00468 80879098 00032C00 */ sll $a1, $v1, 16
/* 0046C 8087909C 0062082A */ slt $at, $v1, $v0
/* 00470 808790A0 10200004 */ beq $at, $zero, .L808790B4
/* 00474 808790A4 00052C03 */ sra $a1, $a1, 16
/* 00478 808790A8 00022C00 */ sll $a1, $v0, 16
/* 0047C 808790AC 10000001 */ beq $zero, $zero, .L808790B4
/* 00480 808790B0 00052C03 */ sra $a1, $a1, 16
.L808790B4:
/* 00484 808790B4 58A00005 */ blezl $a1, .L808790CC
/* 00488 808790B8 28610040 */ slti $at, $v1, 0x0040
/* 0048C 808790BC 0C00BE65 */ jal func_8002F994
/* 00490 808790C0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00494 808790C4 86030166 */ lh $v1, 0x0166($s0) ## 00000166
/* 00498 808790C8 28610040 */ slti $at, $v1, 0x0040
.L808790CC:
/* 0049C 808790CC 50200006 */ beql $at, $zero, .L808790E8
/* 004A0 808790D0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 004A4 808790D4 86090168 */ lh $t1, 0x0168($s0) ## 00000168
/* 004A8 808790D8 29210040 */ slti $at, $t1, 0x0040
/* 004AC 808790DC 54200009 */ bnel $at, $zero, .L80879104
/* 004B0 808790E0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 004B4 808790E4 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L808790E8:
/* 004B8 808790E8 8FA4002C */ lw $a0, 0x002C($sp)
/* 004BC 808790EC 00052A03 */ sra $a1, $a1, 8
/* 004C0 808790F0 0C00B2DD */ jal Flags_SetSwitch
/* 004C4 808790F4 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 004C8 808790F8 10000007 */ beq $zero, $zero, .L80879118
/* 004CC 808790FC 8FBF0024 */ lw $ra, 0x0024($sp)
/* 004D0 80879100 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L80879104:
/* 004D4 80879104 8FA4002C */ lw $a0, 0x002C($sp)
/* 004D8 80879108 00052A03 */ sra $a1, $a1, 8
/* 004DC 8087910C 0C00B2ED */ jal Flags_UnsetSwitch
/* 004E0 80879110 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 004E4 80879114 8FBF0024 */ lw $ra, 0x0024($sp)
.L80879118:
/* 004E8 80879118 8FB00020 */ lw $s0, 0x0020($sp)
/* 004EC 8087911C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 004F0 80879120 03E00008 */ jr $ra
/* 004F4 80879124 00000000 */ nop

View file

@ -1,4 +0,0 @@
glabel func_80879128
/* 004F8 80879128 AFA40000 */ sw $a0, 0x0000($sp)
/* 004FC 8087912C 03E00008 */ jr $ra
/* 00500 80879130 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,29 +0,0 @@
glabel func_80879134
/* 00504 80879134 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00508 80879138 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0050C 8087913C AFA5001C */ sw $a1, 0x001C($sp)
/* 00510 80879140 84820166 */ lh $v0, 0x0166($a0) ## 00000166
/* 00514 80879144 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00518 80879148 18400002 */ blez $v0, .L80879154
/* 0051C 8087914C 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00520 80879150 A48E0166 */ sh $t6, 0x0166($a0) ## 00000166
.L80879154:
/* 00524 80879154 84C5001C */ lh $a1, 0x001C($a2) ## 0000001C
/* 00528 80879158 AFA60018 */ sw $a2, 0x0018($sp)
/* 0052C 8087915C 8FA4001C */ lw $a0, 0x001C($sp)
/* 00530 80879160 00052A03 */ sra $a1, $a1, 8
/* 00534 80879164 0C00B2D0 */ jal Flags_GetSwitch
/* 00538 80879168 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 0053C 8087916C 10400003 */ beq $v0, $zero, .L8087917C
/* 00540 80879170 8FA60018 */ lw $a2, 0x0018($sp)
/* 00544 80879174 240F0040 */ addiu $t7, $zero, 0x0040 ## $t7 = 00000040
/* 00548 80879178 A4CF0166 */ sh $t7, 0x0166($a2) ## 00000166
.L8087917C:
/* 0054C 8087917C 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
/* 00550 80879180 0C21E30C */ jal func_80878C30
/* 00554 80879184 8FA5001C */ lw $a1, 0x001C($sp)
/* 00558 80879188 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0055C 8087918C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00560 80879190 03E00008 */ jr $ra
/* 00564 80879194 00000000 */ nop

View file

@ -1,13 +0,0 @@
glabel func_808791BC
/* 0058C 808791BC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00590 808791C0 AFA40018 */ sw $a0, 0x0018($sp)
/* 00594 808791C4 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00598 808791C8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0059C 808791CC 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000
/* 005A0 808791D0 0C00D4C9 */ jal Gfx_DrawDListXlu
/* 005A4 808791D4 24A588B0 */ addiu $a1, $a1, 0x88B0 ## $a1 = 060088B0
/* 005A8 808791D8 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005AC 808791DC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 005B0 808791E0 03E00008 */ jr $ra
/* 005B4 808791E4 00000000 */ nop

View file

@ -1,102 +0,0 @@
.rdata
glabel D_808793E0
.asciz "../z_bg_gnd_darkmeiro.c"
.balign 4
glabel D_808793F8
.asciz "../z_bg_gnd_darkmeiro.c"
.balign 4
.text
glabel func_808791E8
/* 005B8 808791E8 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8
/* 005BC 808791EC AFBF001C */ sw $ra, 0x001C($sp)
/* 005C0 808791F0 AFB00018 */ sw $s0, 0x0018($sp)
/* 005C4 808791F4 AFA5004C */ sw $a1, 0x004C($sp)
/* 005C8 808791F8 84830166 */ lh $v1, 0x0166($a0) ## 00000166
/* 005CC 808791FC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 005D0 80879200 00031400 */ sll $v0, $v1, 16
/* 005D4 80879204 00021403 */ sra $v0, $v0, 16
/* 005D8 80879208 10400045 */ beq $v0, $zero, .L80879320
/* 005DC 8087920C 28410041 */ slti $at, $v0, 0x0041
/* 005E0 80879210 5420000B */ bnel $at, $zero, .L80879240
/* 005E4 80879214 28410011 */ slti $at, $v0, 0x0011
/* 005E8 80879218 84820168 */ lh $v0, 0x0168($a0) ## 00000168
/* 005EC 8087921C 240F007F */ addiu $t7, $zero, 0x007F ## $t7 = 0000007F
/* 005F0 80879220 28410078 */ slti $at, $v0, 0x0078
/* 005F4 80879224 10200003 */ beq $at, $zero, .L80879234
/* 005F8 80879228 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 005FC 8087922C 1000001D */ beq $zero, $zero, .L808792A4
/* 00600 80879230 A48E0168 */ sh $t6, 0x0168($a0) ## 00000168
.L80879234:
/* 00604 80879234 1000001B */ beq $zero, $zero, .L808792A4
/* 00608 80879238 A60F0168 */ sh $t7, 0x0168($s0) ## 00000168
/* 0060C 8087923C 28410011 */ slti $at, $v0, 0x0011
.L80879240:
/* 00610 80879240 14200017 */ bne $at, $zero, .L808792A0
/* 00614 80879244 000258C0 */ sll $t3, $v0, 3
/* 00618 80879248 00602025 */ or $a0, $v1, $zero ## $a0 = 00000000
/* 0061C 8087924C 00042300 */ sll $a0, $a0, 12
/* 00620 80879250 00042400 */ sll $a0, $a0, 16
/* 00624 80879254 0C01DE0D */ jal Math_Coss
## coss?
/* 00628 80879258 00042403 */ sra $a0, $a0, 16
/* 0062C 8087925C 3C014280 */ lui $at, 0x4280 ## $at = 42800000
/* 00630 80879260 44812000 */ mtc1 $at, $f4 ## $f4 = 64.00
/* 00634 80879264 3C0142FE */ lui $at, 0x42FE ## $at = 42FE0000
/* 00638 80879268 44814000 */ mtc1 $at, $f8 ## $f8 = 127.00
/* 0063C 8087926C 46040182 */ mul.s $f6, $f0, $f4
/* 00640 80879270 240A007F */ addiu $t2, $zero, 0x007F ## $t2 = 0000007F
/* 00644 80879274 46083280 */ add.s $f10, $f6, $f8
/* 00648 80879278 4600540D */ trunc.w.s $f16, $f10
/* 0064C 8087927C 44198000 */ mfc1 $t9, $f16
/* 00650 80879280 00000000 */ nop
/* 00654 80879284 A6190168 */ sh $t9, 0x0168($s0) ## 00000168
/* 00658 80879288 86090168 */ lh $t1, 0x0168($s0) ## 00000168
/* 0065C 8087928C 29210080 */ slti $at, $t1, 0x0080
/* 00660 80879290 54200005 */ bnel $at, $zero, .L808792A8
/* 00664 80879294 8FAC004C */ lw $t4, 0x004C($sp)
/* 00668 80879298 10000002 */ beq $zero, $zero, .L808792A4
/* 0066C 8087929C A60A0168 */ sh $t2, 0x0168($s0) ## 00000168
.L808792A0:
/* 00670 808792A0 A60B0168 */ sh $t3, 0x0168($s0) ## 00000168
.L808792A4:
/* 00674 808792A4 8FAC004C */ lw $t4, 0x004C($sp)
.L808792A8:
/* 00678 808792A8 3C068088 */ lui $a2, %hi(D_808793E0) ## $a2 = 80880000
/* 0067C 808792AC 24C693E0 */ addiu $a2, $a2, %lo(D_808793E0) ## $a2 = 808793E0
/* 00680 808792B0 8D850000 */ lw $a1, 0x0000($t4) ## 00000000
/* 00684 808792B4 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFE4
/* 00688 808792B8 2407017A */ addiu $a3, $zero, 0x017A ## $a3 = 0000017A
/* 0068C 808792BC 0C031AB1 */ jal Graph_OpenDisps
/* 00690 808792C0 AFA5003C */ sw $a1, 0x003C($sp)
/* 00694 808792C4 8FA8003C */ lw $t0, 0x003C($sp)
/* 00698 808792C8 3C0EFA00 */ lui $t6, 0xFA00 ## $t6 = FA000000
/* 0069C 808792CC 3C01C6CA */ lui $at, 0xC6CA ## $at = C6CA0000
/* 006A0 808792D0 8D0302D0 */ lw $v1, 0x02D0($t0) ## 000002D0
/* 006A4 808792D4 3421D000 */ ori $at, $at, 0xD000 ## $at = C6CAD000
/* 006A8 808792D8 3C068088 */ lui $a2, %hi(D_808793F8) ## $a2 = 80880000
/* 006AC 808792DC 246D0008 */ addiu $t5, $v1, 0x0008 ## $t5 = 00000008
/* 006B0 808792E0 AD0D02D0 */ sw $t5, 0x02D0($t0) ## 000002D0
/* 006B4 808792E4 AC6E0000 */ sw $t6, 0x0000($v1) ## 00000000
/* 006B8 808792E8 860F0168 */ lh $t7, 0x0168($s0) ## 00000168
/* 006BC 808792EC 24C693F8 */ addiu $a2, $a2, %lo(D_808793F8) ## $a2 = 808793F8
/* 006C0 808792F0 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFE4
/* 006C4 808792F4 31F800FF */ andi $t8, $t7, 0x00FF ## $t8 = 00000000
/* 006C8 808792F8 0301C825 */ or $t9, $t8, $at ## $t9 = C6CAD000
/* 006CC 808792FC AC790004 */ sw $t9, 0x0004($v1) ## 00000004
/* 006D0 80879300 8FA9004C */ lw $t1, 0x004C($sp)
/* 006D4 80879304 2407017C */ addiu $a3, $zero, 0x017C ## $a3 = 0000017C
/* 006D8 80879308 0C031AD5 */ jal Graph_CloseDisps
/* 006DC 8087930C 8D250000 */ lw $a1, 0x0000($t1) ## 00000000
/* 006E0 80879310 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000
/* 006E4 80879314 24A5BEC0 */ addiu $a1, $a1, 0xBEC0 ## $a1 = 0600BEC0
/* 006E8 80879318 0C00D4C9 */ jal Gfx_DrawDListXlu
/* 006EC 8087931C 8FA4004C */ lw $a0, 0x004C($sp)
.L80879320:
/* 006F0 80879320 8FBF001C */ lw $ra, 0x001C($sp)
/* 006F4 80879324 8FB00018 */ lw $s0, 0x0018($sp)
/* 006F8 80879328 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000
/* 006FC 8087932C 03E00008 */ jr $ra
/* 00700 80879330 00000000 */ nop

View file

@ -1,47 +0,0 @@
.rdata
glabel D_80879410
.asciz "../z_bg_gnd_darkmeiro.c"
.balign 4
glabel D_80879428
.asciz "../z_bg_gnd_darkmeiro.c"
.balign 4
.text
glabel func_80879334
/* 00704 80879334 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00708 80879338 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0070C 8087933C AFA40038 */ sw $a0, 0x0038($sp)
/* 00710 80879340 AFA5003C */ sw $a1, 0x003C($sp)
/* 00714 80879344 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 00718 80879348 3C068088 */ lui $a2, %hi(D_80879410) ## $a2 = 80880000
/* 0071C 8087934C 24C69410 */ addiu $a2, $a2, %lo(D_80879410) ## $a2 = 80879410
/* 00720 80879350 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFEC
/* 00724 80879354 24070187 */ addiu $a3, $zero, 0x0187 ## $a3 = 00000187
/* 00728 80879358 0C031AB1 */ jal Graph_OpenDisps
/* 0072C 8087935C AFA50034 */ sw $a1, 0x0034($sp)
/* 00730 80879360 8FA80034 */ lw $t0, 0x0034($sp)
/* 00734 80879364 3C19C6CA */ lui $t9, 0xC6CA ## $t9 = C6CA0000
/* 00738 80879368 3739D0FF */ ori $t9, $t9, 0xD0FF ## $t9 = C6CAD0FF
/* 0073C 8087936C 8D0302D0 */ lw $v1, 0x02D0($t0) ## 000002D0
/* 00740 80879370 3C18FA00 */ lui $t8, 0xFA00 ## $t8 = FA000000
/* 00744 80879374 3C068088 */ lui $a2, %hi(D_80879428) ## $a2 = 80880000
/* 00748 80879378 246F0008 */ addiu $t7, $v1, 0x0008 ## $t7 = 00000008
/* 0074C 8087937C AD0F02D0 */ sw $t7, 0x02D0($t0) ## 000002D0
/* 00750 80879380 AC790004 */ sw $t9, 0x0004($v1) ## 00000004
/* 00754 80879384 AC780000 */ sw $t8, 0x0000($v1) ## 00000000
/* 00758 80879388 8FA9003C */ lw $t1, 0x003C($sp)
/* 0075C 8087938C 24C69428 */ addiu $a2, $a2, %lo(D_80879428) ## $a2 = 80879428
/* 00760 80879390 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFEC
/* 00764 80879394 24070189 */ addiu $a3, $zero, 0x0189 ## $a3 = 00000189
/* 00768 80879398 0C031AD5 */ jal Graph_CloseDisps
/* 0076C 8087939C 8D250000 */ lw $a1, 0x0000($t1) ## 00000000
/* 00770 808793A0 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000
/* 00774 808793A4 24A5BEC0 */ addiu $a1, $a1, 0xBEC0 ## $a1 = 0600BEC0
/* 00778 808793A8 0C00D4C9 */ jal Gfx_DrawDListXlu
/* 0077C 808793AC 8FA4003C */ lw $a0, 0x003C($sp)
/* 00780 808793B0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00784 808793B4 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 00788 808793B8 03E00008 */ jr $ra
/* 0078C 808793BC 00000000 */ nop

View file

@ -1,18 +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 Bg_Gnd_Darkmeiro_InitVars
.word 0x01B40600, 0x00000030, 0x01790000, 0x00000170
.word BgGndDarkmeiro_Init
.word BgGndDarkmeiro_Destroy
.word BgGndDarkmeiro_Update
.word 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_80879440
.incbin "baserom/ovl_Bg_Gnd_Darkmeiro", 0x810, 0x00000080

3
spec
View file

@ -714,8 +714,7 @@ endseg
beginseg
name "ovl_Bg_Gnd_Darkmeiro"
include "build/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.o"
include "build/data/overlays/actors/z_bg_gnd_darkmeiro.data.o"
include "build/data/overlays/actors/z_bg_gnd_darkmeiro.reloc.o"
include "build/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/ovl_Bg_Gnd_Darkmeiro_reloc.o"
endseg
beginseg

View file

@ -1,7 +1,7 @@
/*
* File: z_bg_gnd_darkmeiro.c
* Overlay: ovl_Bg_Gnd_Darkmeiro
* Description: Clear block
* Description: Shadow trial actors (invisible path, clear block, and timer)
*/
#include "z_bg_gnd_darkmeiro.h"
@ -13,17 +13,15 @@
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_DrawInvisiblePath(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_DrawSwitchBlock(Actor* thisx, GlobalContext* globalCtx);
void BgGndDarkmeiro_DrawStaticBlock(Actor* thisx, GlobalContext* globalCtx);
void func_80878C30(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_80878F28(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_80878F34(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_80879128(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_80879134(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_808791BC(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_808791E8(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void func_80879334(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void BgGndDarkmeiro_UpdateStaticBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx);
void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx);
/*
const ActorInit Bg_Gnd_Darkmeiro_InitVars = {
ACTOR_BG_GND_DARKMEIRO,
ACTORTYPE_PROP,
@ -35,25 +33,189 @@ const ActorInit Bg_Gnd_Darkmeiro_InitVars = {
(ActorFunc)BgGndDarkmeiro_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80878C30.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/BgGndDarkmeiro_Init.s")
extern Gfx D_060088B0[];
extern Gfx D_0600BEC0[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/BgGndDarkmeiro_Destroy.s")
extern UNK_TYPE D_0600C080;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80878F28.s")
void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
if (this->actionFlags & 2) {
if (this->timer1 == 0) {
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
this->actionFlags &= ~2;
}
} else if (this->timer1 != 0) {
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
this->actionFlags |= 2;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80878F34.s")
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
GlobalContext* globalCtx2 = globalCtx;
s32 local_c = 0;
BgGndDarkmeiro* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80879128.s")
this->updateFunc = BgGndDarkmeiro_Noop;
Actor_SetScale(&this->dyna.actor, 0.1f);
switch (this->dyna.actor.params & 0xFF) {
case DARKMEIRO_INVISIBLE_PATH:
this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath;
this->dyna.actor.flags |= 0x80;
break;
case DARKMEIRO_CLEAR_BLOCK:
DynaPolyInfo_Alloc(&D_0600C080, &local_c);
this->dyna.dynaPolyId =
DynaPolyInfo_RegisterActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, local_c);
if (((this->dyna.actor.params >> 8) & 0x3F) == 0x3F) {
this->updateFunc = BgGndDarkmeiro_UpdateStaticBlock;
this->dyna.actor.draw = BgGndDarkmeiro_DrawStaticBlock;
} else {
this->actionFlags = this->timer1 = this->timer2 = 0;
thisx->draw = BgGndDarkmeiro_DrawSwitchBlock;
this->updateFunc = BgGndDarkmeiro_UpdateSwitchBlock;
if (!Flags_GetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F)) {
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.dynaPolyId);
} else {
this->timer1 = 64;
this->actionFlags |= 2;
}
}
break;
case DARKMEIRO_BLOCK_TIMER:
this->actionFlags = this->timer1 = this->timer2 = 0;
this->updateFunc = BgGndDarkmeiro_UpdateBlockTimer;
thisx->draw = NULL;
if (Flags_GetSwitch(globalCtx2, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
this->timer1 = 64;
this->actionFlags |= 4;
}
if (Flags_GetSwitch(globalCtx2, ((this->dyna.actor.params >> 8) & 0x3F) + 2)) {
this->timer2 = 64;
this->actionFlags |= 8;
}
if ((this->timer1 != 0) || (this->timer2 != 0)) {
Flags_SetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F);
} else {
Flags_UnsetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F);
}
break;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80879134.s")
void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx) {
GlobalContext* globalCtx2 = globalCtx;
BgGndDarkmeiro* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/BgGndDarkmeiro_Update.s")
if ((this->dyna.actor.params & 0xFF) == 1) {
if (1) {}
DynaPolyInfo_Free(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.dynaPolyId);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_808791BC.s")
void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_808791E8.s")
void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
s16 timeLeft;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Gnd_Darkmeiro/func_80879334.s")
if (Flags_GetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
if (this->actionFlags & 4) {
if (this->timer1 > 0) {
this->timer1--;
} else {
Flags_UnsetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 1);
this->actionFlags &= ~4;
}
} else {
this->actionFlags |= 4;
this->timer1 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
if (Flags_GetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 2)) {
if (this->actionFlags & 8) {
if (this->timer2 > 0) {
this->timer2--;
} else {
Flags_UnsetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 2);
this->actionFlags &= ~8;
}
} else {
this->actionFlags |= 8;
this->timer2 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
timeLeft = CLAMP_MIN(this->timer1, this->timer2);
if (timeLeft > 0) {
func_8002F994(&this->dyna.actor, timeLeft);
}
if ((this->timer1 >= 64) || (this->timer2 >= 64)) {
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
} else {
Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
}
}
void BgGndDarkmeiro_UpdateStaticBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
}
void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
if (this->timer1 > 0) {
this->timer1--;
}
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
this->timer1 = 64;
}
BgGndDarkmeiro_ToggleBlock(this, globalCtx);
}
void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx) {
BgGndDarkmeiro* this = THIS;
GlobalContext* globalCtx2 = globalCtx;
this->updateFunc(this, globalCtx2);
}
void BgGndDarkmeiro_DrawInvisiblePath(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListXlu(globalCtx, D_060088B0);
}
void BgGndDarkmeiro_DrawSwitchBlock(Actor* thisx, GlobalContext* globalCtx) {
BgGndDarkmeiro* this = THIS;
s16 vanishTimer;
vanishTimer = this->timer1;
if (vanishTimer != 0) {
if (vanishTimer > 64) {
this->timer2 = (this->timer2 < 120) ? this->timer2 + 8 : 127;
} else if (vanishTimer > 16) {
this->timer2 = (Math_Coss((u16)this->timer1 * 0x1000) * 64.0f) + 127.0f;
if (this->timer2 > 127) {
this->timer2 = 127;
}
} else {
this->timer2 = vanishTimer * 8;
}
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 378);
//@bug Due to a bug in the display list, the transparency data is not used.
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 198, 202, 208, this->timer2);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 380);
Gfx_DrawDListXlu(globalCtx, D_0600BEC0);
}
}
void BgGndDarkmeiro_DrawStaticBlock(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 391);
gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 198, 202, 208, 255);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gnd_darkmeiro.c", 393);
Gfx_DrawDListXlu(globalCtx, D_0600BEC0);
}

View file

@ -6,14 +6,29 @@
struct BgGndDarkmeiro;
typedef void (*BgGndDarkmeiroActionFunc)(struct BgGndDarkmeiro*, GlobalContext*);
typedef void (*BgGndDarkmeiroUpdateFunc)(struct BgGndDarkmeiro*, GlobalContext*);
typedef struct BgGndDarkmeiro {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ char unk_164[0x8];
/* 0x016C */ BgGndDarkmeiroActionFunc actionFunc;
/* 0x0164 */ u16 actionFlags; // 0x8 for timer 2, 0x4 for timer 1, 0x2 for blocks.
/* 0x0166 */ s16 timer1; // Vanish countdown for clear blocks
/* 0x0168 */ s16 timer2; // Transparency flicker for clear blocks. Does not work.
/* 0x016C */ BgGndDarkmeiroUpdateFunc updateFunc;
} BgGndDarkmeiro; // size = 0x0170
typedef enum {
/* 0 */ DARKMEIRO_INVISIBLE_PATH, // Textures for the invisible path in shadow trial.
/* 1 */ DARKMEIRO_CLEAR_BLOCK, /* Clear blocks appear when their switch flag is set and
disappear 64 frames after their switch flag is cleared.
Clear blocks with flag 0x3F are always on. */
/* 2 */ DARKMEIRO_BLOCK_TIMER /* A block timer with switch flag N reacts to switch flags N+1
and N+2 being set, setting its own switch flag and a timer
for 304 frames. There are separate timers for N+1 and N+2,
and the timer sets flag N if either timer is above 64 frames. */
} DarkmeiroType;
extern const ActorInit Bg_Gnd_Darkmeiro_InitVars;
#endif

View file

@ -913,6 +913,11 @@ D_0600045C = 0x0600045C;
D_06005EA0 = 0x06005EA0;
D_0600018C = 0x0600018C;
// z_bg_gnd_darkmeiro
D_0600C080 = 0x0600C080;
D_060088B0 = 0x060088B0;
D_0600BEC0 = 0x0600BEC0;
// z_en_st
D_06005298 = 0x06005298;
D_06000304 = 0x06000304;