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

Decompiled ovl_Bg_Spot18_Obj (#204)

* Decompiled ovl_Bg_Spot18_Obj

* quick fix

* Added description to c file

* Update z_bg_spot18_obj.c

* PR suggestions

* PR suggestion
This commit is contained in:
Ethan Roseman 2020-06-17 08:02:28 -04:00 committed by GitHub
parent b86edcf92c
commit dcdaf850b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 257 additions and 698 deletions

View file

@ -1,14 +0,0 @@
glabel BgSpot18Obj_Destroy
/* 00480 808B8D90 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00484 808B8D94 AFA40018 */ sw $a0, 0x0018($sp)
/* 00488 808B8D98 8FAE0018 */ lw $t6, 0x0018($sp)
/* 0048C 808B8D9C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00490 808B8DA0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00494 808B8DA4 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 00498 808B8DA8 0C00FB56 */ jal DynaPolyInfo_Free
## DynaPolyInfo_delReserve
/* 0049C 808B8DAC 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
/* 004A0 808B8DB0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 004A4 808B8DB4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 004A8 808B8DB8 03E00008 */ jr $ra
/* 004AC 808B8DBC 00000000 */ nop

View file

@ -1,17 +0,0 @@
glabel BgSpot18Obj_Draw
/* 00784 808B9094 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00788 808B9098 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0078C 808B909C 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
/* 00790 808B90A0 84EE001C */ lh $t6, 0x001C($a3) ## 0000001C
/* 00794 808B90A4 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00798 808B90A8 3C05808C */ lui $a1, %hi(D_808B9144) ## $a1 = 808C0000
/* 0079C 808B90AC 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 007A0 808B90B0 000FC080 */ sll $t8, $t7, 2
/* 007A4 808B90B4 00B82821 */ addu $a1, $a1, $t8
/* 007A8 808B90B8 0C00D498 */ jal Gfx_DrawDListOpa
/* 007AC 808B90BC 8CA59144 */ lw $a1, %lo(D_808B9144)($a1)
/* 007B0 808B90C0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 007B4 808B90C4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 007B8 808B90C8 03E00008 */ jr $ra
/* 007BC 808B90CC 00000000 */ nop

View file

@ -1,41 +0,0 @@
.rdata
glabel D_808B925C
.asciz "Spot18 Object [arg_data : 0x%04x]\n"
.balign 4
.text
glabel BgSpot18Obj_Init
/* 0040C 808B8D1C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00410 808B8D20 AFB00018 */ sw $s0, 0x0018($sp)
/* 00414 808B8D24 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00418 808B8D28 AFBF001C */ sw $ra, 0x001C($sp)
/* 0041C 808B8D2C AFA50024 */ sw $a1, 0x0024($sp)
/* 00420 808B8D30 3C04808C */ lui $a0, %hi(D_808B925C) ## $a0 = 808C0000
/* 00424 808B8D34 2484925C */ addiu $a0, $a0, %lo(D_808B925C) ## $a0 = 808B925C
/* 00428 808B8D38 0C00084C */ jal osSyncPrintf
/* 0042C 808B8D3C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00430 808B8D40 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00434 808B8D44 0C22E2CE */ jal func_808B8B38
/* 00438 808B8D48 8FA50024 */ lw $a1, 0x0024($sp)
/* 0043C 808B8D4C 14400005 */ bne $v0, $zero, .L808B8D64
/* 00440 808B8D50 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00444 808B8D54 0C00B55C */ jal Actor_Kill
/* 00448 808B8D58 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0044C 808B8D5C 10000008 */ beq $zero, $zero, .L808B8D80
/* 00450 808B8D60 8FBF001C */ lw $ra, 0x001C($sp)
.L808B8D64:
/* 00454 808B8D64 0C22E332 */ jal func_808B8CC8
/* 00458 808B8D68 8FA50024 */ lw $a1, 0x0024($sp)
/* 0045C 808B8D6C 54400004 */ bnel $v0, $zero, .L808B8D80
/* 00460 808B8D70 8FBF001C */ lw $ra, 0x001C($sp)
/* 00464 808B8D74 0C00B55C */ jal Actor_Kill
/* 00468 808B8D78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0046C 808B8D7C 8FBF001C */ lw $ra, 0x001C($sp)
.L808B8D80:
/* 00470 808B8D80 8FB00018 */ lw $s0, 0x0018($sp)
/* 00474 808B8D84 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00478 808B8D88 03E00008 */ jr $ra
/* 0047C 808B8D8C 00000000 */ nop

View file

@ -1,15 +0,0 @@
glabel BgSpot18Obj_Update
/* 00750 808B9060 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00754 808B9064 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00758 808B9068 84820168 */ lh $v0, 0x0168($a0) ## 00000168
/* 0075C 808B906C 18400002 */ blez $v0, .L808B9078
/* 00760 808B9070 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00764 808B9074 A48E0168 */ sh $t6, 0x0168($a0) ## 00000168
.L808B9078:
/* 00768 808B9078 8C990164 */ lw $t9, 0x0164($a0) ## 00000164
/* 0076C 808B907C 0320F809 */ jalr $ra, $t9
/* 00770 808B9080 00000000 */ nop
/* 00774 808B9084 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00778 808B9088 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0077C 808B908C 03E00008 */ jr $ra
/* 00780 808B9090 00000000 */ nop

View file

@ -1,130 +0,0 @@
.rdata
glabel D_808B9150
.asciz "Error : (%s %d)(arg_data 0x%04x)\n"
.balign 4
glabel D_808B9184
.asciz "../z_bg_spot18_obj.c"
.balign 4
glabel D_808B919C
.asciz " Object (0x%04x)\n"
.balign 4
glabel D_808B91B8
.asciz "Error : Obj(%s %d)(arg_data 0x%04x)\n"
.balign 4
glabel D_808B91F8
.asciz "../z_bg_spot18_obj.c"
.balign 4
glabel D_808B9210
.asciz "Error : Obj(%s %d)(arg_data 0x%04x)\n"
.balign 4
glabel D_808B9244
.asciz "../z_bg_spot18_obj.c"
.balign 4
.text
glabel func_808B8910
/* 00000 808B8910 3C038016 */ lui $v1, %hi(gSaveContext+4)
/* 00004 808B8914 8C63E664 */ lw $v1, %lo(gSaveContext+4)($v1)
/* 00008 808B8918 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 0000C 808B891C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00010 808B8920 AFA40020 */ sw $a0, 0x0020($sp)
/* 00014 808B8924 10600003 */ beq $v1, $zero, .L808B8934
/* 00018 808B8928 AFA50024 */ sw $a1, 0x0024($sp)
/* 0001C 808B892C 10000002 */ beq $zero, $zero, .L808B8938
/* 00020 808B8930 24020005 */ addiu $v0, $zero, 0x0005 ## $v0 = 00000005
.L808B8934:
/* 00024 808B8934 24020011 */ addiu $v0, $zero, 0x0011 ## $v0 = 00000011
.L808B8938:
/* 00028 808B8938 24010011 */ addiu $at, $zero, 0x0011 ## $at = 00000011
/* 0002C 808B893C 14410003 */ bne $v0, $at, .L808B894C
/* 00030 808B8940 8FAF0020 */ lw $t7, 0x0020($sp)
/* 00034 808B8944 10000013 */ beq $zero, $zero, .L808B8994
/* 00038 808B8948 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
.L808B894C:
/* 0003C 808B894C 10600003 */ beq $v1, $zero, .L808B895C
/* 00040 808B8950 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005
/* 00044 808B8954 10000002 */ beq $zero, $zero, .L808B8960
/* 00048 808B8958 24020005 */ addiu $v0, $zero, 0x0005 ## $v0 = 00000005
.L808B895C:
/* 0004C 808B895C 24020011 */ addiu $v0, $zero, 0x0011 ## $v0 = 00000011
.L808B8960:
/* 00050 808B8960 14410003 */ bne $v0, $at, .L808B8970
/* 00054 808B8964 3C04808C */ lui $a0, %hi(D_808B9150) ## $a0 = 808C0000
/* 00058 808B8968 1000000A */ beq $zero, $zero, .L808B8994
/* 0005C 808B896C 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
.L808B8970:
/* 00060 808B8970 8FAE0020 */ lw $t6, 0x0020($sp)
/* 00064 808B8974 3C05808C */ lui $a1, %hi(D_808B9184) ## $a1 = 808C0000
/* 00068 808B8978 24A59184 */ addiu $a1, $a1, %lo(D_808B9184) ## $a1 = 808B9184
/* 0006C 808B897C 24849150 */ addiu $a0, $a0, %lo(D_808B9150) ## $a0 = 808B9150
/* 00070 808B8980 240600B6 */ addiu $a2, $zero, 0x00B6 ## $a2 = 000000B6
/* 00074 808B8984 0C00084C */ jal osSyncPrintf
/* 00078 808B8988 85C7001C */ lh $a3, 0x001C($t6) ## 0000001C
/* 0007C 808B898C 1000002F */ beq $zero, $zero, .L808B8A4C
/* 00080 808B8990 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L808B8994:
/* 00084 808B8994 85E7001C */ lh $a3, 0x001C($t7) ## 0000001C
/* 00088 808B8998 3C03808C */ lui $v1, %hi(D_808B90F0) ## $v1 = 808C0000
/* 0008C 808B899C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 00090 808B89A0 30F8000F */ andi $t8, $a3, 0x000F ## $t8 = 00000000
/* 00094 808B89A4 0018C840 */ sll $t9, $t8, 1
/* 00098 808B89A8 03264021 */ addu $t0, $t9, $a2
/* 0009C 808B89AC 00681821 */ addu $v1, $v1, $t0
/* 000A0 808B89B0 906390F0 */ lbu $v1, %lo(D_808B90F0)($v1)
/* 000A4 808B89B4 10600007 */ beq $v1, $zero, .L808B89D4
/* 000A8 808B89B8 00601025 */ or $v0, $v1, $zero ## $v0 = 808C0000
/* 000AC 808B89BC 10410005 */ beq $v0, $at, .L808B89D4
/* 000B0 808B89C0 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 000B4 808B89C4 10410014 */ beq $v0, $at, .L808B8A18
/* 000B8 808B89C8 3C04808C */ lui $a0, %hi(D_808B91B8) ## $a0 = 808C0000
/* 000BC 808B89CC 10000019 */ beq $zero, $zero, .L808B8A34
/* 000C0 808B89D0 3C04808C */ lui $a0, %hi(D_808B9210) ## $a0 = 808C0000
.L808B89D4:
/* 000C4 808B89D4 1460000E */ bne $v1, $zero, .L808B8A10
/* 000C8 808B89D8 3C04808C */ lui $a0, %hi(D_808B919C) ## $a0 = 808C0000
/* 000CC 808B89DC 2484919C */ addiu $a0, $a0, %lo(D_808B919C) ## $a0 = 808B919C
/* 000D0 808B89E0 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
/* 000D4 808B89E4 0C00084C */ jal osSyncPrintf
/* 000D8 808B89E8 AFA6001C */ sw $a2, 0x001C($sp)
/* 000DC 808B89EC 8FA90020 */ lw $t1, 0x0020($sp)
/* 000E0 808B89F0 8FA6001C */ lw $a2, 0x001C($sp)
/* 000E4 808B89F4 3C03808C */ lui $v1, %hi(D_808B90F0) ## $v1 = 808C0000
/* 000E8 808B89F8 852A001C */ lh $t2, 0x001C($t1) ## 0000001C
/* 000EC 808B89FC 314B000F */ andi $t3, $t2, 0x000F ## $t3 = 00000000
/* 000F0 808B8A00 000B6040 */ sll $t4, $t3, 1
/* 000F4 808B8A04 01866821 */ addu $t5, $t4, $a2
/* 000F8 808B8A08 006D1821 */ addu $v1, $v1, $t5
/* 000FC 808B8A0C 906390F0 */ lbu $v1, %lo(D_808B90F0)($v1)
.L808B8A10:
/* 00100 808B8A10 1000000E */ beq $zero, $zero, .L808B8A4C
/* 00104 808B8A14 00601025 */ or $v0, $v1, $zero ## $v0 = 808C0000
.L808B8A18:
/* 00108 808B8A18 3C05808C */ lui $a1, %hi(D_808B91F8) ## $a1 = 808C0000
/* 0010C 808B8A1C 24A591F8 */ addiu $a1, $a1, %lo(D_808B91F8) ## $a1 = 808B91F8
/* 00110 808B8A20 248491B8 */ addiu $a0, $a0, %lo(D_808B91B8) ## $a0 = FFFF91B8
/* 00114 808B8A24 0C00084C */ jal osSyncPrintf
/* 00118 808B8A28 240600CA */ addiu $a2, $zero, 0x00CA ## $a2 = 000000CA
/* 0011C 808B8A2C 10000007 */ beq $zero, $zero, .L808B8A4C
/* 00120 808B8A30 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L808B8A34:
/* 00124 808B8A34 3C05808C */ lui $a1, %hi(D_808B9244) ## $a1 = 808C0000
/* 00128 808B8A38 24A59244 */ addiu $a1, $a1, %lo(D_808B9244) ## $a1 = 808B9244
/* 0012C 808B8A3C 24849210 */ addiu $a0, $a0, %lo(D_808B9210) ## $a0 = FFFF9210
/* 00130 808B8A40 0C00084C */ jal osSyncPrintf
/* 00134 808B8A44 240600D2 */ addiu $a2, $zero, 0x00D2 ## $a2 = 000000D2
/* 00138 808B8A48 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L808B8A4C:
/* 0013C 808B8A4C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00140 808B8A50 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00144 808B8A54 03E00008 */ jr $ra
/* 00148 808B8A58 00000000 */ nop

View file

@ -1,17 +0,0 @@
glabel func_808B8A5C
/* 0014C 808B8A5C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00150 808B8A60 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00154 808B8A64 AFA5001C */ sw $a1, 0x001C($sp)
/* 00158 808B8A68 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 0015C 808B8A6C 3C05808C */ lui $a1, %hi(D_808B90F4) ## $a1 = 808C0000
/* 00160 808B8A70 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 00164 808B8A74 000FC080 */ sll $t8, $t7, 2
/* 00168 808B8A78 00B82821 */ addu $a1, $a1, $t8
/* 0016C 808B8A7C 0C00B58B */ jal Actor_SetScale
/* 00170 808B8A80 8CA590F4 */ lw $a1, %lo(D_808B90F4)($a1)
/* 00174 808B8A84 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00178 808B8A88 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0017C 808B8A8C 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 00180 808B8A90 03E00008 */ jr $ra
/* 00184 808B8A94 00000000 */ nop

View file

@ -1,32 +0,0 @@
glabel func_808B8A98
/* 00188 808B8A98 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 0018C 808B8A9C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00190 808B8AA0 AFA5002C */ sw $a1, 0x002C($sp)
/* 00194 808B8AA4 AFA40028 */ sw $a0, 0x0028($sp)
/* 00198 808B8AA8 AFA0001C */ sw $zero, 0x001C($sp)
/* 0019C 808B8AAC 0C010D20 */ jal DynaPolyInfo_SetActorMove
/* 001A0 808B8AB0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 001A4 808B8AB4 8FAE0028 */ lw $t6, 0x0028($sp)
/* 001A8 808B8AB8 3C04808C */ lui $a0, %hi(D_808B90FC) ## $a0 = 808C0000
/* 001AC 808B8ABC 27A5001C */ addiu $a1, $sp, 0x001C ## $a1 = FFFFFFF4
/* 001B0 808B8AC0 85CF001C */ lh $t7, 0x001C($t6) ## 0000001C
/* 001B4 808B8AC4 31F8000F */ andi $t8, $t7, 0x000F ## $t8 = 00000000
/* 001B8 808B8AC8 0018C880 */ sll $t9, $t8, 2
/* 001BC 808B8ACC 00992021 */ addu $a0, $a0, $t9
/* 001C0 808B8AD0 0C010620 */ jal DynaPolyInfo_Alloc
/* 001C4 808B8AD4 8C8490FC */ lw $a0, %lo(D_808B90FC)($a0)
/* 001C8 808B8AD8 8FA4002C */ lw $a0, 0x002C($sp)
/* 001CC 808B8ADC 8FA60028 */ lw $a2, 0x0028($sp)
/* 001D0 808B8AE0 8FA7001C */ lw $a3, 0x001C($sp)
/* 001D4 808B8AE4 0C00FA9D */ jal DynaPolyInfo_RegisterActor
## DynaPolyInfo_setActor
/* 001D8 808B8AE8 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 001DC 808B8AEC 8FA80028 */ lw $t0, 0x0028($sp)
/* 001E0 808B8AF0 AD02014C */ sw $v0, 0x014C($t0) ## 0000014C
/* 001E4 808B8AF4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 001E8 808B8AF8 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 001EC 808B8AFC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 001F0 808B8B00 03E00008 */ jr $ra
/* 001F4 808B8B04 00000000 */ nop

View file

@ -1,13 +0,0 @@
glabel func_808B8B08
/* 001F8 808B8B08 AFA50004 */ sw $a1, 0x0004($sp)
/* 001FC 808B8B0C 848F001C */ lh $t7, 0x001C($a0) ## 0000001C
/* 00200 808B8B10 3C08808C */ lui $t0, %hi(D_808B9104) ## $t0 = 808C0000
/* 00204 808B8B14 8C8E0004 */ lw $t6, 0x0004($a0) ## 00000004
/* 00208 808B8B18 31F8000F */ andi $t8, $t7, 0x000F ## $t8 = 00000000
/* 0020C 808B8B1C 0018C880 */ sll $t9, $t8, 2
/* 00210 808B8B20 01194021 */ addu $t0, $t0, $t9
/* 00214 808B8B24 8D089104 */ lw $t0, %lo(D_808B9104)($t0)
/* 00218 808B8B28 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 0021C 808B8B2C 01C84825 */ or $t1, $t6, $t0 ## $t1 = 808C0000
/* 00220 808B8B30 03E00008 */ jr $ra
/* 00224 808B8B34 AC890004 */ sw $t1, 0x0004($a0) ## 00000004

View file

@ -1,35 +0,0 @@
glabel func_808B8B38
/* 00228 808B8B38 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 0022C 808B8B3C AFB30020 */ sw $s3, 0x0020($sp)
/* 00230 808B8B40 AFB00014 */ sw $s0, 0x0014($sp)
/* 00234 808B8B44 AFB2001C */ sw $s2, 0x001C($sp)
/* 00238 808B8B48 AFB10018 */ sw $s1, 0x0018($sp)
/* 0023C 808B8B4C 3C10808C */ lui $s0, %hi(D_808B910C) ## $s0 = 808C0000
/* 00240 808B8B50 3C13808C */ lui $s3, %hi(D_808B911C) ## $s3 = 808C0000
/* 00244 808B8B54 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000
/* 00248 808B8B58 00A09025 */ or $s2, $a1, $zero ## $s2 = 00000000
/* 0024C 808B8B5C AFBF0024 */ sw $ra, 0x0024($sp)
/* 00250 808B8B60 2673911C */ addiu $s3, $s3, %lo(D_808B911C) ## $s3 = 808B911C
/* 00254 808B8B64 2610910C */ addiu $s0, $s0, %lo(D_808B910C) ## $s0 = 808B910C
/* 00258 808B8B68 8E190000 */ lw $t9, 0x0000($s0) ## 808B910C
.L808B8B6C:
/* 0025C 808B8B6C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00260 808B8B70 02402825 */ or $a1, $s2, $zero ## $a1 = 00000000
/* 00264 808B8B74 0320F809 */ jalr $ra, $t9
/* 00268 808B8B78 00000000 */ nop
/* 0026C 808B8B7C 14400003 */ bne $v0, $zero, .L808B8B8C
/* 00270 808B8B80 26100004 */ addiu $s0, $s0, 0x0004 ## $s0 = 808B9110
/* 00274 808B8B84 10000004 */ beq $zero, $zero, .L808B8B98
/* 00278 808B8B88 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L808B8B8C:
/* 0027C 808B8B8C 5613FFF7 */ bnel $s0, $s3, .L808B8B6C
/* 00280 808B8B90 8E190000 */ lw $t9, 0x0000($s0) ## 808B9110
/* 00284 808B8B94 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L808B8B98:
/* 00288 808B8B98 8FBF0024 */ lw $ra, 0x0024($sp)
/* 0028C 808B8B9C 8FB00014 */ lw $s0, 0x0014($sp)
/* 00290 808B8BA0 8FB10018 */ lw $s1, 0x0018($sp)
/* 00294 808B8BA4 8FB2001C */ lw $s2, 0x001C($sp)
/* 00298 808B8BA8 8FB30020 */ lw $s3, 0x0020($sp)
/* 0029C 808B8BAC 03E00008 */ jr $ra
/* 002A0 808B8BB0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000

View file

@ -1,65 +0,0 @@
glabel func_808B8BB4
/* 002A4 808B8BB4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 002A8 808B8BB8 AFA50024 */ sw $a1, 0x0024($sp)
/* 002AC 808B8BBC AFBF001C */ sw $ra, 0x001C($sp)
/* 002B0 808B8BC0 AFB00018 */ sw $s0, 0x0018($sp)
/* 002B4 808B8BC4 3C05808C */ lui $a1, %hi(D_808B911C) ## $a1 = 808C0000
/* 002B8 808B8BC8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 002BC 808B8BCC 0C01E037 */ jal Actor_ProcessInitChain
/* 002C0 808B8BD0 24A5911C */ addiu $a1, $a1, %lo(D_808B911C) ## $a1 = 808B911C
/* 002C4 808B8BD4 3C0E8016 */ lui $t6, %hi(gSaveContext+4)
/* 002C8 808B8BD8 8DCEE664 */ lw $t6, %lo(gSaveContext+4)($t6)
/* 002CC 808B8BDC 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005
/* 002D0 808B8BE0 24020011 */ addiu $v0, $zero, 0x0011 ## $v0 = 00000011
/* 002D4 808B8BE4 11C00003 */ beq $t6, $zero, .L808B8BF4
/* 002D8 808B8BE8 00000000 */ nop
/* 002DC 808B8BEC 10000001 */ beq $zero, $zero, .L808B8BF4
/* 002E0 808B8BF0 24020005 */ addiu $v0, $zero, 0x0005 ## $v0 = 00000005
.L808B8BF4:
/* 002E4 808B8BF4 54410006 */ bnel $v0, $at, .L808B8C10
/* 002E8 808B8BF8 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 002EC 808B8BFC 0C22E40C */ jal func_808B9030
/* 002F0 808B8C00 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002F4 808B8C04 1000001E */ beq $zero, $zero, .L808B8C80
/* 002F8 808B8C08 8FBF001C */ lw $ra, 0x001C($sp)
/* 002FC 808B8C0C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
.L808B8C10:
/* 00300 808B8C10 8FA40024 */ lw $a0, 0x0024($sp)
/* 00304 808B8C14 00052A03 */ sra $a1, $a1, 8
/* 00308 808B8C18 0C00B2D0 */ jal Flags_GetSwitch
/* 0030C 808B8C1C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00310 808B8C20 10400014 */ beq $v0, $zero, .L808B8C74
/* 00314 808B8C24 00000000 */ nop
/* 00318 808B8C28 0C22E40C */ jal func_808B9030
/* 0031C 808B8C2C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00320 808B8C30 0C01DE1C */ jal Math_Sins
## sins?
/* 00324 808B8C34 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00328 808B8C38 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 0032C 808B8C3C 44812000 */ mtc1 $at, $f4 ## $f4 = 80.00
/* 00330 808B8C40 C6080008 */ lwc1 $f8, 0x0008($s0) ## 00000008
/* 00334 808B8C44 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00338 808B8C48 46040182 */ mul.s $f6, $f0, $f4
/* 0033C 808B8C4C 46083280 */ add.s $f10, $f6, $f8
/* 00340 808B8C50 0C01DE0D */ jal Math_Coss
## coss?
/* 00344 808B8C54 E60A0024 */ swc1 $f10, 0x0024($s0) ## 00000024
/* 00348 808B8C58 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 0034C 808B8C5C 44818000 */ mtc1 $at, $f16 ## $f16 = 80.00
/* 00350 808B8C60 C6040010 */ lwc1 $f4, 0x0010($s0) ## 00000010
/* 00354 808B8C64 46100482 */ mul.s $f18, $f0, $f16
/* 00358 808B8C68 46049180 */ add.s $f6, $f18, $f4
/* 0035C 808B8C6C 10000003 */ beq $zero, $zero, .L808B8C7C
/* 00360 808B8C70 E606002C */ swc1 $f6, 0x002C($s0) ## 0000002C
.L808B8C74:
/* 00364 808B8C74 0C22E399 */ jal func_808B8E64
/* 00368 808B8C78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L808B8C7C:
/* 0036C 808B8C7C 8FBF001C */ lw $ra, 0x001C($sp)
.L808B8C80:
/* 00370 808B8C80 8FB00018 */ lw $s0, 0x0018($sp)
/* 00374 808B8C84 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00378 808B8C88 03E00008 */ jr $ra
/* 0037C 808B8C8C 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001

View file

@ -1,16 +0,0 @@
glabel func_808B8C90
/* 00380 808B8C90 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00384 808B8C94 AFA5001C */ sw $a1, 0x001C($sp)
/* 00388 808B8C98 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0038C 808B8C9C 3C05808C */ lui $a1, %hi(D_808B9130) ## $a1 = 808C0000
/* 00390 808B8CA0 AFA40018 */ sw $a0, 0x0018($sp)
/* 00394 808B8CA4 0C01E037 */ jal Actor_ProcessInitChain
/* 00398 808B8CA8 24A59130 */ addiu $a1, $a1, %lo(D_808B9130) ## $a1 = 808B9130
/* 0039C 808B8CAC 0C22E370 */ jal func_808B8DC0
/* 003A0 808B8CB0 8FA40018 */ lw $a0, 0x0018($sp)
/* 003A4 808B8CB4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 003A8 808B8CB8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 003AC 808B8CBC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 003B0 808B8CC0 03E00008 */ jr $ra
/* 003B4 808B8CC4 00000000 */ nop

View file

@ -1,23 +0,0 @@
glabel func_808B8CC8
/* 003B8 808B8CC8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 003BC 808B8CCC AFBF0014 */ sw $ra, 0x0014($sp)
/* 003C0 808B8CD0 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 003C4 808B8CD4 3C02808C */ lui $v0, %hi(D_808B913C) ## $v0 = 808C0000
/* 003C8 808B8CD8 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 003CC 808B8CDC 000FC080 */ sll $t8, $t7, 2
/* 003D0 808B8CE0 00581021 */ addu $v0, $v0, $t8
/* 003D4 808B8CE4 8C42913C */ lw $v0, %lo(D_808B913C)($v0)
/* 003D8 808B8CE8 50400008 */ beql $v0, $zero, .L808B8D0C
/* 003DC 808B8CEC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 003E0 808B8CF0 0040F809 */ jalr $ra, $v0
/* 003E4 808B8CF4 00000000 */ nop
/* 003E8 808B8CF8 54400004 */ bnel $v0, $zero, .L808B8D0C
/* 003EC 808B8CFC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 003F0 808B8D00 10000002 */ beq $zero, $zero, .L808B8D0C
/* 003F4 808B8D04 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 003F8 808B8D08 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L808B8D0C:
/* 003FC 808B8D0C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00400 808B8D10 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00404 808B8D14 03E00008 */ jr $ra
/* 00408 808B8D18 00000000 */ nop

View file

@ -1,5 +0,0 @@
glabel func_808B8DC0
/* 004B0 808B8DC0 3C0E808C */ lui $t6, %hi(func_808B8DD0) ## $t6 = 808C0000
/* 004B4 808B8DC4 25CE8DD0 */ addiu $t6, $t6, %lo(func_808B8DD0) ## $t6 = 808B8DD0
/* 004B8 808B8DC8 03E00008 */ jr $ra
/* 004BC 808B8DCC AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164

View file

@ -1,4 +0,0 @@
glabel func_808B8DD0
/* 004C0 808B8DD0 AFA40000 */ sw $a0, 0x0000($sp)
/* 004C4 808B8DD4 03E00008 */ jr $ra
/* 004C8 808B8DD8 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,18 +0,0 @@
glabel func_808B8DDC
/* 004CC 808B8DDC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 004D0 808B8DE0 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 004D4 808B8DE4 AFA50024 */ sw $a1, 0x0024($sp)
/* 004D8 808B8DE8 00802825 */ or $a1, $a0, $zero ## $a1 = 00000000
/* 004DC 808B8DEC AFBF001C */ sw $ra, 0x001C($sp)
/* 004E0 808B8DF0 AFA40020 */ sw $a0, 0x0020($sp)
/* 004E4 808B8DF4 240E001C */ addiu $t6, $zero, 0x001C ## $t6 = 0000001C
/* 004E8 808B8DF8 AFAE0014 */ sw $t6, 0x0014($sp)
/* 004EC 808B8DFC 8FA40024 */ lw $a0, 0x0024($sp)
/* 004F0 808B8E00 3C0641A0 */ lui $a2, 0x41A0 ## $a2 = 41A00000
/* 004F4 808B8E04 3C074238 */ lui $a3, 0x4238 ## $a3 = 42380000
/* 004F8 808B8E08 0C00B92D */ jal func_8002E4B4
/* 004FC 808B8E0C E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00500 808B8E10 8FBF001C */ lw $ra, 0x001C($sp)
/* 00504 808B8E14 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00508 808B8E18 03E00008 */ jr $ra
/* 0050C 808B8E1C 00000000 */ nop

View file

@ -1,24 +0,0 @@
.late_rodata
glabel D_808B9280
.float 0.001
.text
glabel func_808B8E20
/* 00510 808B8E20 C4800150 */ lwc1 $f0, 0x0150($a0) ## 00000150
/* 00514 808B8E24 3C01808C */ lui $at, %hi(D_808B9280) ## $at = 808C0000
/* 00518 808B8E28 C4249280 */ lwc1 $f4, %lo(D_808B9280)($at)
/* 0051C 808B8E2C 46000005 */ abs.s $f0, $f0
/* 00520 808B8E30 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 00524 808B8E34 4600203C */ c.lt.s $f4, $f0
/* 00528 808B8E38 00000000 */ nop
/* 0052C 808B8E3C 45000007 */ bc1f .L808B8E5C
/* 00530 808B8E40 00000000 */ nop
/* 00534 808B8E44 44803000 */ mtc1 $zero, $f6 ## $f6 = 0.00
/* 00538 808B8E48 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF
/* 0053C 808B8E4C E4860150 */ swc1 $f6, 0x0150($a0) ## 00000150
/* 00540 808B8E50 8C4E0680 */ lw $t6, 0x0680($v0) ## 00000680
/* 00544 808B8E54 01C17824 */ and $t7, $t6, $at
/* 00548 808B8E58 AC4F0680 */ sw $t7, 0x0680($v0) ## 00000680
.L808B8E5C:
/* 0054C 808B8E5C 03E00008 */ jr $ra
/* 00550 808B8E60 00000000 */ nop

View file

@ -1,7 +0,0 @@
glabel func_808B8E64
/* 00554 808B8E64 3C0F808C */ lui $t7, %hi(func_808B8E7C) ## $t7 = 808C0000
/* 00558 808B8E68 240E0014 */ addiu $t6, $zero, 0x0014 ## $t6 = 00000014
/* 0055C 808B8E6C 25EF8E7C */ addiu $t7, $t7, %lo(func_808B8E7C) ## $t7 = 808B8E7C
/* 00560 808B8E70 A48E0168 */ sh $t6, 0x0168($a0) ## 00000168
/* 00564 808B8E74 03E00008 */ jr $ra
/* 00568 808B8E78 AC8F0164 */ sw $t7, 0x0164($a0) ## 00000164

View file

@ -1,32 +0,0 @@
.late_rodata
glabel D_808B9284
.float -0.001
.text
glabel func_808B8E7C
/* 0056C 808B8E7C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00570 808B8E80 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00574 808B8E84 AFA5001C */ sw $a1, 0x001C($sp)
/* 00578 808B8E88 3C01808C */ lui $at, %hi(D_808B9284) ## $at = 808C0000
/* 0057C 808B8E8C C4269284 */ lwc1 $f6, %lo(D_808B9284)($at)
/* 00580 808B8E90 C4840150 */ lwc1 $f4, 0x0150($a0) ## 00000150
/* 00584 808B8E94 240F0014 */ addiu $t7, $zero, 0x0014 ## $t7 = 00000014
/* 00588 808B8E98 4606203C */ c.lt.s $f4, $f6
/* 0058C 808B8E9C 00000000 */ nop
/* 00590 808B8EA0 45020009 */ bc1fl .L808B8EC8
/* 00594 808B8EA4 A48F0168 */ sh $t7, 0x0168($a0) ## 00000168
/* 00598 808B8EA8 848E0168 */ lh $t6, 0x0168($a0) ## 00000168
/* 0059C 808B8EAC 1DC00006 */ bgtz $t6, .L808B8EC8
/* 005A0 808B8EB0 00000000 */ nop
/* 005A4 808B8EB4 0C22E3B8 */ jal func_808B8EE0
/* 005A8 808B8EB8 AFA40018 */ sw $a0, 0x0018($sp)
/* 005AC 808B8EBC 10000002 */ beq $zero, $zero, .L808B8EC8
/* 005B0 808B8EC0 8FA40018 */ lw $a0, 0x0018($sp)
/* 005B4 808B8EC4 A48F0168 */ sh $t7, 0x0168($a0) ## 00000168
.L808B8EC8:
/* 005B8 808B8EC8 0C22E388 */ jal func_808B8E20
/* 005BC 808B8ECC 8FA5001C */ lw $a1, 0x001C($sp)
/* 005C0 808B8ED0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005C4 808B8ED4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 005C8 808B8ED8 03E00008 */ jr $ra
/* 005CC 808B8EDC 00000000 */ nop

View file

@ -1,11 +0,0 @@
glabel func_808B8EE0
/* 005D0 808B8EE0 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 005D4 808B8EE4 3C0E808C */ lui $t6, %hi(func_808B8F08) ## $t6 = 808C0000
/* 005D8 808B8EE8 25CE8F08 */ addiu $t6, $t6, %lo(func_808B8F08) ## $t6 = 808B8F08
/* 005DC 808B8EEC AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164
/* 005E0 808B8EF0 A4800032 */ sh $zero, 0x0032($a0) ## 00000032
/* 005E4 808B8EF4 E4800068 */ swc1 $f0, 0x0068($a0) ## 00000068
/* 005E8 808B8EF8 E4800064 */ swc1 $f0, 0x0064($a0) ## 00000064
/* 005EC 808B8EFC E4800060 */ swc1 $f0, 0x0060($a0) ## 00000060
/* 005F0 808B8F00 03E00008 */ jr $ra
/* 005F4 808B8F04 E480005C */ swc1 $f0, 0x005C($a0) ## 0000005C

View file

@ -1,83 +0,0 @@
glabel func_808B8F08
/* 005F8 808B8F08 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 005FC 808B8F0C AFBF001C */ sw $ra, 0x001C($sp)
/* 00600 808B8F10 AFB00018 */ sw $s0, 0x0018($sp)
/* 00604 808B8F14 AFA5002C */ sw $a1, 0x002C($sp)
/* 00608 808B8F18 8CAF1C44 */ lw $t7, 0x1C44($a1) ## 00001C44
/* 0060C 808B8F1C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00610 808B8F20 3C053F99 */ lui $a1, 0x3F99 ## $a1 = 3F990000
/* 00614 808B8F24 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000
/* 00618 808B8F28 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD
/* 0061C 808B8F2C 34A5999A */ ori $a1, $a1, 0x999A ## $a1 = 3F99999A
/* 00620 808B8F30 24840068 */ addiu $a0, $a0, 0x0068 ## $a0 = 00000068
/* 00624 808B8F34 0C01DE80 */ jal Math_ApproxF
/* 00628 808B8F38 AFAF0020 */ sw $t7, 0x0020($sp)
/* 0062C 808B8F3C 0C00B638 */ jal Actor_MoveForward
/* 00630 808B8F40 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00634 808B8F44 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00638 808B8F48 0C22E377 */ jal func_808B8DDC
/* 0063C 808B8F4C 8FA5002C */ lw $a1, 0x002C($sp)
/* 00640 808B8F50 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 00644 808B8F54 C60E002C */ lwc1 $f14, 0x002C($s0) ## 0000002C
/* 00648 808B8F58 8E060008 */ lw $a2, 0x0008($s0) ## 00000008
/* 0064C 808B8F5C 0C032D65 */ jal func_800CB594
/* 00650 808B8F60 8E070010 */ lw $a3, 0x0010($s0) ## 00000010
/* 00654 808B8F64 3C0145C8 */ lui $at, 0x45C8 ## $at = 45C80000
/* 00658 808B8F68 44812000 */ mtc1 $at, $f4 ## $f4 = 6400.00
/* 0065C 808B8F6C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00660 808B8F70 4600203E */ c.le.s $f4, $f0
/* 00664 808B8F74 00000000 */ nop
/* 00668 808B8F78 45000026 */ bc1f .L808B9014
/* 0066C 808B8F7C 00000000 */ nop
/* 00670 808B8F80 0C22E40C */ jal func_808B9030
/* 00674 808B8F84 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00678 808B8F88 0C01DE1C */ jal Math_Sins
## sins?
/* 0067C 808B8F8C 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00680 808B8F90 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 00684 808B8F94 44813000 */ mtc1 $at, $f6 ## $f6 = 80.00
/* 00688 808B8F98 C60A0008 */ lwc1 $f10, 0x0008($s0) ## 00000008
/* 0068C 808B8F9C 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00690 808B8FA0 46060202 */ mul.s $f8, $f0, $f6
/* 00694 808B8FA4 460A4400 */ add.s $f16, $f8, $f10
/* 00698 808B8FA8 0C01DE0D */ jal Math_Coss
## coss?
/* 0069C 808B8FAC E6100024 */ swc1 $f16, 0x0024($s0) ## 00000024
/* 006A0 808B8FB0 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 006A4 808B8FB4 44819000 */ mtc1 $at, $f18 ## $f18 = 80.00
/* 006A8 808B8FB8 C6060010 */ lwc1 $f6, 0x0010($s0) ## 00000010
/* 006AC 808B8FBC 8FA20020 */ lw $v0, 0x0020($sp)
/* 006B0 808B8FC0 46120102 */ mul.s $f4, $f0, $f18
/* 006B4 808B8FC4 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00
/* 006B8 808B8FC8 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF
/* 006BC 808B8FCC E60A0150 */ swc1 $f10, 0x0150($s0) ## 00000150
/* 006C0 808B8FD0 46062200 */ add.s $f8, $f4, $f6
/* 006C4 808B8FD4 E608002C */ swc1 $f8, 0x002C($s0) ## 0000002C
/* 006C8 808B8FD8 8C580680 */ lw $t8, 0x0680($v0) ## 00000680
/* 006CC 808B8FDC 0301C824 */ and $t9, $t8, $at
/* 006D0 808B8FE0 AC590680 */ sw $t9, 0x0680($v0) ## 00000680
/* 006D4 808B8FE4 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 006D8 808B8FE8 8FA4002C */ lw $a0, 0x002C($sp)
/* 006DC 808B8FEC 00052A03 */ sra $a1, $a1, 8
/* 006E0 808B8FF0 0C00B2DD */ jal Flags_SetSwitch
/* 006E4 808B8FF4 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 006E8 808B8FF8 0C01E221 */ jal func_80078884
/* 006EC 808B8FFC 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802
/* 006F0 808B9000 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 006F4 808B9004 0C00BE0A */ jal Audio_PlayActorSound2
/* 006F8 808B9008 24052835 */ addiu $a1, $zero, 0x2835 ## $a1 = 00002835
/* 006FC 808B900C 10000004 */ beq $zero, $zero, .L808B9020
/* 00700 808B9010 8FBF001C */ lw $ra, 0x001C($sp)
.L808B9014:
/* 00704 808B9014 0C00BE5D */ jal func_8002F974
/* 00708 808B9018 2405200A */ addiu $a1, $zero, 0x200A ## $a1 = 0000200A
/* 0070C 808B901C 8FBF001C */ lw $ra, 0x001C($sp)
.L808B9020:
/* 00710 808B9020 8FB00018 */ lw $s0, 0x0018($sp)
/* 00714 808B9024 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00718 808B9028 03E00008 */ jr $ra
/* 0071C 808B902C 00000000 */ nop

View file

@ -1,5 +0,0 @@
glabel func_808B9030
/* 00720 808B9030 3C0E808C */ lui $t6, %hi(func_808B9040) ## $t6 = 808C0000
/* 00724 808B9034 25CE9040 */ addiu $t6, $t6, %lo(func_808B9040) ## $t6 = 808B9040
/* 00728 808B9038 03E00008 */ jr $ra
/* 0072C 808B903C AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164

View file

@ -1,9 +0,0 @@
glabel func_808B9040
/* 00730 808B9040 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00734 808B9044 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00738 808B9048 0C22E388 */ jal func_808B8E20
/* 0073C 808B904C 00000000 */ nop
/* 00740 808B9050 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00744 808B9054 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00748 808B9058 03E00008 */ jr $ra
/* 0074C 808B905C 00000000 */ nop

View file

@ -1,40 +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_Spot18_Obj_InitVars
.word 0x00B90100, 0x00000000, 0x00AF0000, 0x0000016C
.word BgSpot18Obj_Init
.word BgSpot18Obj_Destroy
.word BgSpot18Obj_Update
.word BgSpot18Obj_Draw
glabel D_808B90F0
.word 0x01010100
glabel D_808B90F4
.word 0x3DCCCCCD, 0x3DCCCCCD
glabel D_808B90FC
.word 0x06002FE4, 0x0600261C
glabel D_808B9104
.word 0x00000000, 0x00000000
glabel D_808B910C
.word func_808B8A98
.word func_808B8910
.word func_808B8A5C
.word func_808B8B08
glabel D_808B911C
.word 0xB070FFF6, 0xB06CFFFC, 0xB0F40578, 0xB0F801F4, 0x30FC0320
glabel D_808B9130
.word 0xB0F404B0, 0xB0F801F4, 0x30FC02BC
glabel D_808B913C
.word func_808B8BB4
.word func_808B8C90
glabel D_808B9144
.word 0x06002BC0, 0x06002370, 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_808B9290
.incbin "baserom/ovl_Bg_Spot18_Obj", 0x980, 0x00000140

3
spec
View file

@ -1403,8 +1403,7 @@ endseg
beginseg
name "ovl_Bg_Spot18_Obj"
include "build/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.o"
include "build/data/overlays/actors/z_bg_spot18_obj.data.o"
include "build/data/overlays/actors/z_bg_spot18_obj.reloc.o"
include "build/src/overlays/actors/ovl_Bg_Spot18_Obj/ovl_Bg_Spot18_Obj_reloc.o"
endseg
beginseg

View file

@ -1,3 +1,9 @@
/*
* File: z_bg_spot18_obj.c
* Overlay: Bg_Spot18_Obj
* Description:
*/
#include "z_bg_spot18_obj.h"
#define FLAGS 0x00000000
@ -9,7 +15,21 @@ void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgSpot18Obj_Update(Actor* thisx, GlobalContext* globalCtx);
void BgSpot18Obj_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
s32 func_808B8910(BgSpot18Obj* this, GlobalContext* globalCtx);
s32 func_808B8A5C(BgSpot18Obj* this, GlobalContext* globalCtx);
s32 func_808B8A98(BgSpot18Obj* this, GlobalContext* globalCtx);
s32 func_808B8B08(BgSpot18Obj* this, GlobalContext* globalCtx);
s32 func_808B8BB4(BgSpot18Obj* this, GlobalContext* globalCtx);
s32 func_808B8C90(BgSpot18Obj* this, GlobalContext* globalCtx);
void func_808B8DC0(BgSpot18Obj* this);
void func_808B8DD0(BgSpot18Obj* this, GlobalContext* globalCtx);
void func_808B8E64(BgSpot18Obj* this);
void func_808B8E7C(BgSpot18Obj* this, GlobalContext* globalCtx);
void func_808B8EE0(BgSpot18Obj* this);
void func_808B8F08(BgSpot18Obj* this, GlobalContext* globalCtx);
void func_808B9030(BgSpot18Obj* this);
void func_808B9040(BgSpot18Obj* this, GlobalContext* globalCtx);
const ActorInit Bg_Spot18_Obj_InitVars = {
ACTOR_BG_SPOT18_OBJ,
ACTORTYPE_BG,
@ -21,47 +41,252 @@ const ActorInit Bg_Spot18_Obj_InitVars = {
(ActorFunc)BgSpot18Obj_Update,
(ActorFunc)BgSpot18Obj_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8910.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8A5C.s")
u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8A98.s")
f32 D_808B90F4[] = {
0.1f,
0.1f,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8B08.s")
UNK_TYPE D_808B90FC[] = {
0x06002FE4,
0x0600261C,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8B38.s")
u32 D_808B9104[] = {
0,
0,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8BB4.s")
BgSpot18ObjInitFunc D_808B910C[] = {
func_808B8A98,
func_808B8910,
func_808B8A5C,
func_808B8B08,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8C90.s")
static InitChainEntry sInitChain1[] = {
ICHAIN_F32(minVelocityY, 65526, ICHAIN_CONTINUE),
ICHAIN_F32(gravity, 65532, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F4, 1400, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F8, 500, ICHAIN_CONTINUE),
ICHAIN_F32(unk_FC, 800, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8CC8.s")
static InitChainEntry sInitChain2[] = {
ICHAIN_F32(unk_F4, 1200, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F8, 500, ICHAIN_CONTINUE),
ICHAIN_F32(unk_FC, 700, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/BgSpot18Obj_Init.s")
BgSpot18ObjInitFunc D_808B913C[] = {
func_808B8BB4,
func_808B8C90,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/BgSpot18Obj_Destroy.s")
static Gfx* sDlists[] = {
0x06002BC0,
0x06002370,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8DC0.s")
s32 func_808B8910(BgSpot18Obj* this, GlobalContext* globalCtx) {
s32 age;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8DD0.s")
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
age = 1;
} else if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
age = 0;
} else {
osSyncPrintf("Error : リンク年齢不詳 (%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 182,
this->dyna.actor.params);
return 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8DDC.s")
switch (D_808B90F0[this->dyna.actor.params & 0xF][age]) {
case 0:
case 1:
if (D_808B90F0[this->dyna.actor.params & 0xF][age] == 0) {
osSyncPrintf("出現しない Object (0x%04x)\n", this->dyna.actor.params);
}
return D_808B90F0[this->dyna.actor.params & 0xF][age];
case 2:
osSyncPrintf("Error : Obj出現判定が設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 202,
this->dyna.actor.params);
break;
default:
osSyncPrintf("Error : Obj出現判定失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 210,
this->dyna.actor.params);
}
return 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8E20.s")
s32 func_808B8A5C(BgSpot18Obj* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->dyna.actor, D_808B90F4[this->dyna.actor.params & 0xF]);
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8E64.s")
s32 func_808B8A98(BgSpot18Obj* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 localC = 0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8E7C.s")
DynaPolyInfo_SetActorMove(&this->dyna.actor, 0);
DynaPolyInfo_Alloc(D_808B90FC[this->dyna.actor.params & 0xF], &localC);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8EE0.s")
s32 func_808B8B08(BgSpot18Obj* this, GlobalContext* globalCtx) {
this->dyna.actor.flags |= D_808B9104[this->dyna.actor.params & 0xF];
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B8F08.s")
s32 func_808B8B38(BgSpot18Obj* this, GlobalContext* globalCtx) {
s32 i;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B9030.s")
for (i = 0; i < ARRAY_COUNT(D_808B910C); i++) {
if (D_808B910C[i](this, globalCtx) == 0) {
return 0;
}
}
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/func_808B9040.s")
s32 func_808B8BB4(BgSpot18Obj* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain1);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/BgSpot18Obj_Update.s")
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
func_808B9030(this);
} else if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
func_808B9030(this);
this->dyna.actor.posRot.pos.x =
(Math_Sins(this->dyna.actor.posRot.rot.y) * 80.0f) + this->dyna.actor.initPosRot.pos.x;
this->dyna.actor.posRot.pos.z =
(Math_Coss(this->dyna.actor.posRot.rot.y) * 80.0f) + this->dyna.actor.initPosRot.pos.z;
} else {
func_808B8E64(this);
}
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Obj/BgSpot18Obj_Draw.s")
s32 func_808B8C90(BgSpot18Obj* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain2);
func_808B8DC0(this);
return 1;
}
s32 func_808B8CC8(BgSpot18Obj* this, GlobalContext* globalCtx) {
if ((D_808B913C[this->dyna.actor.params & 0xF] != NULL) &&
(!D_808B913C[this->dyna.actor.params & 0xF](this, globalCtx))) {
return 0;
}
return 1;
}
void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Obj* this = THIS;
osSyncPrintf("Spot18 Object [arg_data : 0x%04x]\n", this->dyna.actor.params);
if (!func_808B8B38(this, globalCtx)) {
Actor_Kill(&this->dyna.actor);
} else if (!func_808B8CC8(this, globalCtx)) {
Actor_Kill(&this->dyna.actor);
}
}
void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Obj* this = THIS;
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
}
void func_808B8DC0(BgSpot18Obj* this) {
this->actionFunc = func_808B8DD0;
}
void func_808B8DD0(BgSpot18Obj* this, GlobalContext* globalCtx) {
}
void func_808B8DDC(BgSpot18Obj* this, GlobalContext* globalCtx) {
func_8002E4B4(globalCtx, &this->dyna.actor, 20.0f, 46.0f, 0.0f, 28);
}
void func_808B8E20(BgSpot18Obj* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (fabsf(this->dyna.unk_150) > 0.001f) {
this->dyna.unk_150 = 0.0f;
player->stateFlags2 &= ~0x10;
}
}
void func_808B8E64(BgSpot18Obj* this) {
this->unk_168 = 20;
this->actionFunc = func_808B8E7C;
}
void func_808B8E7C(BgSpot18Obj* this, GlobalContext* globalCtx) {
if (this->dyna.unk_150 < -0.001f) {
if (this->unk_168 <= 0) {
func_808B8EE0(this);
}
} else {
this->unk_168 = 20;
}
func_808B8E20(this, globalCtx);
}
void func_808B8EE0(BgSpot18Obj* this) {
this->actionFunc = func_808B8F08;
this->dyna.actor.posRot.rot.y = 0;
this->dyna.actor.speedXZ = 0.0f;
this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.velocity.x = 0.0f;
}
void func_808B8F08(BgSpot18Obj* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = PLAYER;
Math_ApproxF(&this->dyna.actor.speedXZ, 1.2f, 0.1f);
Actor_MoveForward(&this->dyna.actor);
func_808B8DDC(this, globalCtx);
if (func_800CB594(this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.z, this->dyna.actor.initPosRot.pos.x,
this->dyna.actor.initPosRot.pos.z) >= 6400.0f) {
func_808B9030(this);
this->dyna.actor.posRot.pos.x =
(Math_Sins(this->dyna.actor.posRot.rot.y) * 80.0f) + this->dyna.actor.initPosRot.pos.x;
this->dyna.actor.posRot.pos.z =
(Math_Coss(this->dyna.actor.posRot.rot.y) * 80.0f) + this->dyna.actor.initPosRot.pos.z;
this->dyna.unk_150 = 0.0f;
player->stateFlags2 &= ~0x10;
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
func_80078884(0x4802);
Audio_PlayActorSound2(&this->dyna.actor, 0x2835);
} else {
func_8002F974(&this->dyna.actor, 0x200A);
}
}
void func_808B9030(BgSpot18Obj* this) {
this->actionFunc = func_808B9040;
}
void func_808B9040(BgSpot18Obj* this, GlobalContext* globalCtx) {
func_808B8E20(this, globalCtx);
}
void BgSpot18Obj_Update(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Obj* this = THIS;
if (this->unk_168 > 0) {
this->unk_168 -= 1;
}
this->actionFunc(this, globalCtx);
}
void BgSpot18Obj_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, sDlists[thisx->params & 0xF]);
}

View file

@ -6,9 +6,13 @@
struct BgSpot18Obj;
typedef void (*BgSpot18ObjActionFunc)(struct BgSpot18Obj*, GlobalContext*);
typedef s32 (*BgSpot18ObjInitFunc)(struct BgSpot18Obj*, GlobalContext*);
typedef struct BgSpot18Obj {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x20];
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgSpot18ObjActionFunc actionFunc;
/* 0x0168 */ s16 unk_168;
} BgSpot18Obj; // size = 0x016C
extern const ActorInit Bg_Spot18_Obj_InitVars;

View file

@ -30,7 +30,7 @@ def main():
with open(args.filename, 'rb') as f:
romData = f.read()
except IOError:
print('failed to read file' + args.filename)
print('failed to read file ' + args.filename)
sys.exit(1)
print ('static InitChainEntry sInitChain[] = {')