1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-24 17:47:33 +00:00

ovl_Item_Etcetera OK (#281)

* started item_etcetera

* ovl_Item_Etcetera OK

* z_item_etcetera cleanup

* fixed

* removed padding

* z_item_etcetera updates

* made suggested changes

* change member in enum
This commit is contained in:
Lucas Shaw 2020-07-28 21:17:26 -07:00 committed by GitHub
parent b35f2007ad
commit c3421dda0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 215 additions and 651 deletions

View file

@ -1,4 +0,0 @@
glabel ItemEtcetera_Destroy
/* 001D4 80B857C4 AFA40000 */ sw $a0, 0x0000($sp)
/* 001D8 80B857C8 03E00008 */ jr $ra
/* 001DC 80B857CC AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,167 +0,0 @@
.rdata
glabel D_80B85DA0
.asciz "no = %d\n"
.balign 4
glabel D_80B85DAC
.asciz "bank_ID = %d\n"
.balign 4
glabel D_80B85DBC
.asciz "0"
.balign 4
glabel D_80B85DC0
.asciz "../z_item_etcetera.c"
.balign 4
.late_rodata
glabel jtbl_80B85E24
.word L80B85710
.word L80B857B0
.word L80B857B0
.word L80B857B0
.word L80B857B0
.word L80B857B0
.word L80B8574C
.word L80B85778
.word L80B85778
.word L80B85778
.word L80B85778
.word L80B85778
.word L80B85778
.text
glabel ItemEtcetera_Init
/* 00008 80B855F8 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 0000C 80B855FC AFBF001C */ sw $ra, 0x001C($sp)
/* 00010 80B85600 AFB00018 */ sw $s0, 0x0018($sp)
/* 00014 80B85604 AFA5003C */ sw $a1, 0x003C($sp)
/* 00018 80B85608 8485001C */ lh $a1, 0x001C($a0) ## 0000001C
/* 0001C 80B8560C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00020 80B85610 3C0480B8 */ lui $a0, %hi(D_80B85DA0) ## $a0 = 80B80000
/* 00024 80B85614 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 00000000
/* 00028 80B85618 AFA5002C */ sw $a1, 0x002C($sp)
/* 0002C 80B8561C 0C00084C */ jal osSyncPrintf
/* 00030 80B85620 24845DA0 */ addiu $a0, $a0, %lo(D_80B85DA0) ## $a0 = 80B85DA0
/* 00034 80B85624 8FA2002C */ lw $v0, 0x002C($sp)
/* 00038 80B85628 8FA4003C */ lw $a0, 0x003C($sp)
/* 0003C 80B8562C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 00040 80B85630 3C0580B8 */ lui $a1, %hi(D_80B85D20) ## $a1 = 80B80000
/* 00044 80B85634 00021040 */ sll $v0, $v0, 1
/* 00048 80B85638 00A22821 */ addu $a1, $a1, $v0
/* 0004C 80B8563C 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4
/* 00050 80B85640 84A55D20 */ lh $a1, %lo(D_80B85D20)($a1)
/* 00054 80B85644 AFA20024 */ sw $v0, 0x0024($sp)
/* 00058 80B85648 0C02604B */ jal Object_GetIndex
## ObjectIndex
/* 0005C 80B8564C 00812021 */ addu $a0, $a0, $at
/* 00060 80B85650 3C0480B8 */ lui $a0, %hi(D_80B85DAC) ## $a0 = 80B80000
/* 00064 80B85654 24845DAC */ addiu $a0, $a0, %lo(D_80B85DAC) ## $a0 = 80B85DAC
/* 00068 80B85658 00402825 */ or $a1, $v0, $zero ## $a1 = 00000000
/* 0006C 80B8565C 0C00084C */ jal osSyncPrintf
/* 00070 80B85660 AFA20028 */ sw $v0, 0x0028($sp)
/* 00074 80B85664 8FA30028 */ lw $v1, 0x0028($sp)
/* 00078 80B85668 3C0480B8 */ lui $a0, %hi(D_80B85DBC) ## $a0 = 80B80000
/* 0007C 80B8566C 24845DBC */ addiu $a0, $a0, %lo(D_80B85DBC) ## $a0 = 80B85DBC
/* 00080 80B85670 04610006 */ bgez $v1, .L80B8568C
/* 00084 80B85674 3C0580B8 */ lui $a1, %hi(D_80B85DC0) ## $a1 = 80B80000
/* 00088 80B85678 24A55DC0 */ addiu $a1, $a1, %lo(D_80B85DC0) ## $a1 = 80B85DC0
/* 0008C 80B8567C 0C0007FC */ jal __assert
/* 00090 80B85680 240600F1 */ addiu $a2, $zero, 0x00F1 ## $a2 = 000000F1
/* 00094 80B85684 10000003 */ beq $zero, $zero, .L80B85694
/* 00098 80B85688 8FA20024 */ lw $v0, 0x0024($sp)
.L80B8568C:
/* 0009C 80B8568C A2030154 */ sb $v1, 0x0154($s0) ## 00000154
/* 000A0 80B85690 8FA20024 */ lw $v0, 0x0024($sp)
.L80B85694:
/* 000A4 80B85694 3C0E80B8 */ lui $t6, %hi(D_80B85D3C) ## $t6 = 80B80000
/* 000A8 80B85698 3C0F80B8 */ lui $t7, %hi(D_80B85D58) ## $t7 = 80B80000
/* 000AC 80B8569C 01C27021 */ addu $t6, $t6, $v0
/* 000B0 80B856A0 85CE5D3C */ lh $t6, %lo(D_80B85D3C)($t6)
/* 000B4 80B856A4 01E27821 */ addu $t7, $t7, $v0
/* 000B8 80B856A8 3C1880B8 */ lui $t8, %hi(func_80B85824) ## $t8 = 80B80000
/* 000BC 80B856AC A60E0150 */ sh $t6, 0x0150($s0) ## 00000150
/* 000C0 80B856B0 85EF5D58 */ lh $t7, %lo(D_80B85D58)($t7)
/* 000C4 80B856B4 3C1980B8 */ lui $t9, %hi(func_80B85CB8) ## $t9 = 80B80000
/* 000C8 80B856B8 27185824 */ addiu $t8, $t8, %lo(func_80B85824) ## $t8 = 80B85824
/* 000CC 80B856BC 27395CB8 */ addiu $t9, $t9, %lo(func_80B85CB8) ## $t9 = 80B85CB8
/* 000D0 80B856C0 AE18014C */ sw $t8, 0x014C($s0) ## 0000014C
/* 000D4 80B856C4 AE190158 */ sw $t9, 0x0158($s0) ## 00000158
/* 000D8 80B856C8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000DC 80B856CC 3C053E80 */ lui $a1, 0x3E80 ## $a1 = 3E800000
/* 000E0 80B856D0 0C00B58B */ jal Actor_SetScale
/* 000E4 80B856D4 A60F0152 */ sh $t7, 0x0152($s0) ## 00000152
/* 000E8 80B856D8 3C0580B8 */ lui $a1, %hi(func_80B857D0) ## $a1 = 80B80000
/* 000EC 80B856DC 24A557D0 */ addiu $a1, $a1, %lo(func_80B857D0) ## $a1 = 80B857D0
/* 000F0 80B856E0 0C2E157C */ jal func_80B855F0
/* 000F4 80B856E4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000F8 80B856E8 8FA8002C */ lw $t0, 0x002C($sp)
/* 000FC 80B856EC 2509FFFF */ addiu $t1, $t0, 0xFFFF ## $t1 = FFFFFFFF
/* 00100 80B856F0 2D21000D */ sltiu $at, $t1, 0x000D
/* 00104 80B856F4 1020002E */ beq $at, $zero, .L80B857B0
/* 00108 80B856F8 00094880 */ sll $t1, $t1, 2
/* 0010C 80B856FC 3C0180B8 */ lui $at, %hi(jtbl_80B85E24) ## $at = 80B80000
/* 00110 80B85700 00290821 */ addu $at, $at, $t1
/* 00114 80B85704 8C295E24 */ lw $t1, %lo(jtbl_80B85E24)($at)
/* 00118 80B85708 01200008 */ jr $t1
/* 0011C 80B8570C 00000000 */ nop
glabel L80B85710
/* 00120 80B85710 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00124 80B85714 0C00B58B */ jal Actor_SetScale
/* 00128 80B85718 3C053F00 */ lui $a1, 0x3F00 ## $a1 = 3F000000
/* 0012C 80B8571C 3C0A80B8 */ lui $t2, %hi(func_80B858B4) ## $t2 = 80B80000
/* 00130 80B85720 254A58B4 */ addiu $t2, $t2, %lo(func_80B858B4) ## $t2 = 80B858B4
/* 00134 80B85724 AE0A014C */ sw $t2, 0x014C($s0) ## 0000014C
/* 00138 80B85728 3C0B8016 */ lui $t3, %hi(gSaveContext+0xeda)
/* 0013C 80B8572C 956BF53A */ lhu $t3, %lo(gSaveContext+0xeda)($t3)
/* 00140 80B85730 316C0002 */ andi $t4, $t3, 0x0002 ## $t4 = 00000000
/* 00144 80B85734 5180001F */ beql $t4, $zero, .L80B857B4
/* 00148 80B85738 8FBF001C */ lw $ra, 0x001C($sp)
/* 0014C 80B8573C 0C00B55C */ jal Actor_Kill
/* 00150 80B85740 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00154 80B85744 1000001B */ beq $zero, $zero, .L80B857B4
/* 00158 80B85748 8FBF001C */ lw $ra, 0x001C($sp)
glabel L80B8574C
/* 0015C 80B8574C 3C0D80B8 */ lui $t5, %hi(func_80B85B6C) ## $t5 = 80B80000
/* 00160 80B85750 25AD5B6C */ addiu $t5, $t5, %lo(func_80B85B6C) ## $t5 = 80B85B6C
/* 00164 80B85754 AE0D014C */ sw $t5, 0x014C($s0) ## 0000014C
/* 00168 80B85758 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0016C 80B8575C 0C00B58B */ jal Actor_SetScale
/* 00170 80B85760 3C053F00 */ lui $a1, 0x3F00 ## $a1 = 3F000000
/* 00174 80B85764 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00178 80B85768 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 0017C 80B8576C AE000134 */ sw $zero, 0x0134($s0) ## 00000134
/* 00180 80B85770 1000000F */ beq $zero, $zero, .L80B857B0
/* 00184 80B85774 E60400BC */ swc1 $f4, 0x00BC($s0) ## 000000BC
glabel L80B85778
/* 00188 80B85778 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0018C 80B8577C 0C00B58B */ jal Actor_SetScale
/* 00190 80B85780 3C053F00 */ lui $a1, 0x3F00 ## $a1 = 3F000000
/* 00194 80B85784 3C014170 */ lui $at, 0x4170 ## $at = 41700000
/* 00198 80B85788 44814000 */ mtc1 $at, $f8 ## $f8 = 15.00
/* 0019C 80B8578C C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028
/* 001A0 80B85790 3C0E80B8 */ lui $t6, %hi(func_80B85B28) ## $t6 = 80B80000
/* 001A4 80B85794 3C0F80B8 */ lui $t7, %hi(func_80B85C64) ## $t7 = 80B80000
/* 001A8 80B85798 46083280 */ add.s $f10, $f6, $f8
/* 001AC 80B8579C 25CE5B28 */ addiu $t6, $t6, %lo(func_80B85B28) ## $t6 = 80B85B28
/* 001B0 80B857A0 25EF5C64 */ addiu $t7, $t7, %lo(func_80B85C64) ## $t7 = 80B85C64
/* 001B4 80B857A4 AE0E014C */ sw $t6, 0x014C($s0) ## 0000014C
/* 001B8 80B857A8 AE0F0158 */ sw $t7, 0x0158($s0) ## 00000158
/* 001BC 80B857AC E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028
glabel L80B857B0
.L80B857B0:
/* 001C0 80B857B0 8FBF001C */ lw $ra, 0x001C($sp)
.L80B857B4:
/* 001C4 80B857B4 8FB00018 */ lw $s0, 0x0018($sp)
/* 001C8 80B857B8 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 001CC 80B857BC 03E00008 */ jr $ra
/* 001D0 80B857C0 00000000 */ nop

View file

@ -1,10 +0,0 @@
glabel ItemEtcetera_Update
/* 00650 80B85C40 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00654 80B85C44 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00658 80B85C48 8C99015C */ lw $t9, 0x015C($a0) ## 0000015C
/* 0065C 80B85C4C 0320F809 */ jalr $ra, $t9
/* 00660 80B85C50 00000000 */ nop
/* 00664 80B85C54 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00668 80B85C58 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0066C 80B85C5C 03E00008 */ jr $ra
/* 00670 80B85C60 00000000 */ nop

View file

@ -1,3 +0,0 @@
glabel func_80B855F0
/* 00000 80B855F0 03E00008 */ jr $ra
/* 00004 80B855F4 AC85015C */ sw $a1, 0x015C($a0) ## 0000015C

View file

@ -1,24 +0,0 @@
glabel func_80B857D0
/* 001E0 80B857D0 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 001E4 80B857D4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 001E8 80B857D8 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 001EC 80B857DC 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4
/* 001F0 80B857E0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 001F4 80B857E4 00A12021 */ addu $a0, $a1, $at
/* 001F8 80B857E8 90C50154 */ lbu $a1, 0x0154($a2) ## 00000154
/* 001FC 80B857EC 0C026062 */ jal Object_IsLoaded
/* 00200 80B857F0 AFA60018 */ sw $a2, 0x0018($sp)
/* 00204 80B857F4 10400007 */ beq $v0, $zero, .L80B85814
/* 00208 80B857F8 8FA60018 */ lw $a2, 0x0018($sp)
/* 0020C 80B857FC 90CE0154 */ lbu $t6, 0x0154($a2) ## 00000154
/* 00210 80B85800 8CCF0158 */ lw $t7, 0x0158($a2) ## 00000158
/* 00214 80B85804 8CD8014C */ lw $t8, 0x014C($a2) ## 0000014C
/* 00218 80B85808 A0CE001E */ sb $t6, 0x001E($a2) ## 0000001E
/* 0021C 80B8580C ACCF0134 */ sw $t7, 0x0134($a2) ## 00000134
/* 00220 80B85810 ACD8015C */ sw $t8, 0x015C($a2) ## 0000015C
.L80B85814:
/* 00224 80B85814 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00228 80B85818 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0022C 80B8581C 03E00008 */ jr $ra
/* 00230 80B85820 00000000 */ nop

View file

@ -1,42 +0,0 @@
glabel func_80B85824
/* 00234 80B85824 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00238 80B85828 AFBF0024 */ sw $ra, 0x0024($sp)
/* 0023C 80B8582C AFB00020 */ sw $s0, 0x0020($sp)
/* 00240 80B85830 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00244 80B85834 0C00BD04 */ jal func_8002F410
/* 00248 80B85838 AFA5002C */ sw $a1, 0x002C($sp)
/* 0024C 80B8583C 10400011 */ beq $v0, $zero, .L80B85884
/* 00250 80B85840 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00254 80B85844 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 00258 80B85848 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 0025C 80B8584C 3C028016 */ lui $v0, %hi(gSaveContext)
/* 00260 80B85850 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000
/* 00264 80B85854 15E10007 */ bne $t7, $at, .L80B85874
/* 00268 80B85858 2442E660 */ addiu $v0, %lo(gSaveContext)
/* 0026C 80B8585C 94580EDA */ lhu $t8, 0x0EDA($v0) ## 8015F53A
/* 00270 80B85860 8FA4002C */ lw $a0, 0x002C($sp)
/* 00274 80B85864 2405000B */ addiu $a1, $zero, 0x000B ## $a1 = 0000000B
/* 00278 80B85868 37190002 */ ori $t9, $t8, 0x0002 ## $t9 = 00000002
/* 0027C 80B8586C 0C00B2DD */ jal Flags_SetSwitch
/* 00280 80B85870 A4590EDA */ sh $t9, 0x0EDA($v0) ## 8015F53A
.L80B85874:
/* 00284 80B85874 0C00B55C */ jal Actor_Kill
/* 00288 80B85878 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0028C 80B8587C 10000009 */ beq $zero, $zero, .L80B858A4
/* 00290 80B85880 8FBF0024 */ lw $ra, 0x0024($sp)
.L80B85884:
/* 00294 80B85884 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00298 80B85888 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 0029C 80B8588C 86060152 */ lh $a2, 0x0152($s0) ## 00000152
/* 002A0 80B85890 8FA5002C */ lw $a1, 0x002C($sp)
/* 002A4 80B85894 3C0741F0 */ lui $a3, 0x41F0 ## $a3 = 41F00000
/* 002A8 80B85898 0C00BD0D */ jal func_8002F434
/* 002AC 80B8589C E7A40010 */ swc1 $f4, 0x0010($sp)
/* 002B0 80B858A0 8FBF0024 */ lw $ra, 0x0024($sp)
.L80B858A4:
/* 002B4 80B858A4 8FB00020 */ lw $s0, 0x0020($sp)
/* 002B8 80B858A8 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 002BC 80B858AC 03E00008 */ jr $ra
/* 002C0 80B858B0 00000000 */ nop

View file

@ -1,66 +0,0 @@
.late_rodata
glabel D_80B85E58
.float 0.13
.text
glabel func_80B858B4
/* 002C4 80B858B4 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 002C8 80B858B8 AFBF0024 */ sw $ra, 0x0024($sp)
/* 002CC 80B858BC AFB10020 */ sw $s1, 0x0020($sp)
/* 002D0 80B858C0 AFB0001C */ sw $s0, 0x001C($sp)
/* 002D4 80B858C4 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 002D8 80B858C8 0C00BD04 */ jal func_8002F410
/* 002DC 80B858CC 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000
/* 002E0 80B858D0 10400011 */ beq $v0, $zero, .L80B85918
/* 002E4 80B858D4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 002E8 80B858D8 862E001C */ lh $t6, 0x001C($s1) ## 0000001C
/* 002EC 80B858DC 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 002F0 80B858E0 3C028016 */ lui $v0, %hi(gSaveContext)
/* 002F4 80B858E4 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000
/* 002F8 80B858E8 15E10007 */ bne $t7, $at, .L80B85908
/* 002FC 80B858EC 2442E660 */ addiu $v0, %lo(gSaveContext)
/* 00300 80B858F0 94580EDA */ lhu $t8, 0x0EDA($v0) ## 8015F53A
/* 00304 80B858F4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00308 80B858F8 2405000B */ addiu $a1, $zero, 0x000B ## $a1 = 0000000B
/* 0030C 80B858FC 37190002 */ ori $t9, $t8, 0x0002 ## $t9 = 00000002
/* 00310 80B85900 0C00B2DD */ jal Flags_SetSwitch
/* 00314 80B85904 A4590EDA */ sh $t9, 0x0EDA($v0) ## 8015F53A
.L80B85908:
/* 00318 80B85908 0C00B55C */ jal Actor_Kill
/* 0031C 80B8590C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00320 80B85910 1000001A */ beq $zero, $zero, .L80B8597C
/* 00324 80B85914 8FBF0024 */ lw $ra, 0x0024($sp)
.L80B85918:
/* 00328 80B85918 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 0032C 80B8591C 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 00330 80B85920 86260152 */ lh $a2, 0x0152($s1) ## 00000152
/* 00334 80B85924 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00338 80B85928 3C0741F0 */ lui $a3, 0x41F0 ## $a3 = 41F00000
/* 0033C 80B8592C 0C00BD0D */ jal func_8002F434
/* 00340 80B85930 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00344 80B85934 3C080001 */ lui $t0, 0x0001 ## $t0 = 00010000
/* 00348 80B85938 01104021 */ addu $t0, $t0, $s0
/* 0034C 80B8593C 8D081DE4 */ lw $t0, 0x1DE4($t0) ## 00011DE4
/* 00350 80B85940 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00354 80B85944 26250024 */ addiu $a1, $s1, 0x0024 ## $a1 = 00000024
/* 00358 80B85948 3109000D */ andi $t1, $t0, 0x000D ## $t1 = 00000000
/* 0035C 80B8594C 1520000A */ bne $t1, $zero, .L80B85978
/* 00360 80B85950 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 00364 80B85954 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00368 80B85958 44813000 */ mtc1 $at, $f6 ## $f6 = 10.00
/* 0036C 80B8595C 3C0180B8 */ lui $at, %hi(D_80B85E58) ## $at = 80B80000
/* 00370 80B85960 C4285E58 */ lwc1 $f8, %lo(D_80B85E58)($at)
/* 00374 80B85964 44060000 */ mfc1 $a2, $f0
/* 00378 80B85968 44070000 */ mfc1 $a3, $f0
/* 0037C 80B8596C E7A60010 */ swc1 $f6, 0x0010($sp)
/* 00380 80B85970 0C00A4F9 */ jal func_800293E4
/* 00384 80B85974 E7A80014 */ swc1 $f8, 0x0014($sp)
.L80B85978:
/* 00388 80B85978 8FBF0024 */ lw $ra, 0x0024($sp)
.L80B8597C:
/* 0038C 80B8597C 8FB0001C */ lw $s0, 0x001C($sp)
/* 00390 80B85980 8FB10020 */ lw $s1, 0x0020($sp)
/* 00394 80B85984 03E00008 */ jr $ra
/* 00398 80B85988 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000

View file

@ -1,80 +0,0 @@
.late_rodata
glabel D_80B85E5C
.float -0.05
glabel D_80B85E60
.float -0.025
.text
glabel func_80B8598C
/* 0039C 80B8598C 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 003A0 80B85990 3C014040 */ lui $at, 0x4040 ## $at = 40400000
/* 003A4 80B85994 AFBF0024 */ sw $ra, 0x0024($sp)
/* 003A8 80B85998 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00
/* 003AC 80B8599C AFA40038 */ sw $a0, 0x0038($sp)
/* 003B0 80B859A0 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 003B4 80B859A4 AFA5003C */ sw $a1, 0x003C($sp)
/* 003B8 80B859A8 3C0180B8 */ lui $at, %hi(D_80B85D74) ## $at = 80B80000
/* 003BC 80B859AC E4205D74 */ swc1 $f0, %lo(D_80B85D74)($at)
/* 003C0 80B859B0 3C014040 */ lui $at, 0x4040 ## $at = 40400000
/* 003C4 80B859B4 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00
/* 003C8 80B859B8 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 003CC 80B859BC 00000000 */ nop
/* 003D0 80B859C0 3C0180B8 */ lui $at, %hi(D_80B85D7C) ## $at = 80B80000
/* 003D4 80B859C4 E4205D7C */ swc1 $f0, %lo(D_80B85D7C)($at)
/* 003D8 80B859C8 3C0180B8 */ lui $at, %hi(D_80B85E5C) ## $at = 80B80000
/* 003DC 80B859CC C4245E5C */ lwc1 $f4, %lo(D_80B85E5C)($at)
/* 003E0 80B859D0 3C0180B8 */ lui $at, %hi(D_80B85D78) ## $at = 80B80000
/* 003E4 80B859D4 E4245D78 */ swc1 $f4, %lo(D_80B85D78)($at)
/* 003E8 80B859D8 3C0180B8 */ lui $at, %hi(D_80B85E60) ## $at = 80B80000
/* 003EC 80B859DC C4265E60 */ lwc1 $f6, %lo(D_80B85E60)($at)
/* 003F0 80B859E0 3C0180B8 */ lui $at, %hi(D_80B85D84) ## $at = 80B80000
/* 003F4 80B859E4 E4265D84 */ swc1 $f6, %lo(D_80B85D84)($at)
/* 003F8 80B859E8 3C014140 */ lui $at, 0x4140 ## $at = 41400000
/* 003FC 80B859EC 44816000 */ mtc1 $at, $f12 ## $f12 = 12.00
/* 00400 80B859F0 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 00404 80B859F4 00000000 */ nop
/* 00408 80B859F8 8FAE0038 */ lw $t6, 0x0038($sp)
/* 0040C 80B859FC C5C80024 */ lwc1 $f8, 0x0024($t6) ## 00000024
/* 00410 80B85A00 46080280 */ add.s $f10, $f0, $f8
/* 00414 80B85A04 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00418 80B85A08 E7AA002C */ swc1 $f10, 0x002C($sp)
/* 0041C 80B85A0C 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 00420 80B85A10 44818000 */ mtc1 $at, $f16 ## $f16 = 6.00
/* 00424 80B85A14 8FAF0038 */ lw $t7, 0x0038($sp)
/* 00428 80B85A18 3C014140 */ lui $at, 0x4140 ## $at = 41400000
/* 0042C 80B85A1C 46100482 */ mul.s $f18, $f0, $f16
/* 00430 80B85A20 C5E40028 */ lwc1 $f4, 0x0028($t7) ## 00000028
/* 00434 80B85A24 44816000 */ mtc1 $at, $f12 ## $f12 = 12.00
/* 00438 80B85A28 46049180 */ add.s $f6, $f18, $f4
/* 0043C 80B85A2C 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 00440 80B85A30 E7A60030 */ swc1 $f6, 0x0030($sp)
/* 00444 80B85A34 8FB80038 */ lw $t8, 0x0038($sp)
/* 00448 80B85A38 3C1980B8 */ lui $t9, %hi(D_80B85D8C) ## $t9 = 80B80000
/* 0044C 80B85A3C 3C0880B8 */ lui $t0, %hi(D_80B85D90) ## $t0 = 80B80000
/* 00450 80B85A40 C708002C */ lwc1 $f8, 0x002C($t8) ## 0000002C
/* 00454 80B85A44 25085D90 */ addiu $t0, $t0, %lo(D_80B85D90) ## $t0 = 80B85D90
/* 00458 80B85A48 27395D8C */ addiu $t9, $t9, %lo(D_80B85D8C) ## $t9 = 80B85D8C
/* 0045C 80B85A4C 46080280 */ add.s $f10, $f0, $f8
/* 00460 80B85A50 3C0680B8 */ lui $a2, %hi(D_80B85D74) ## $a2 = 80B80000
/* 00464 80B85A54 3C0780B8 */ lui $a3, %hi(D_80B85D80) ## $a3 = 80B80000
/* 00468 80B85A58 24091388 */ addiu $t1, $zero, 0x1388 ## $t1 = 00001388
/* 0046C 80B85A5C 240A0010 */ addiu $t2, $zero, 0x0010 ## $t2 = 00000010
/* 00470 80B85A60 E7AA0034 */ swc1 $f10, 0x0034($sp)
/* 00474 80B85A64 AFAA001C */ sw $t2, 0x001C($sp)
/* 00478 80B85A68 AFA90018 */ sw $t1, 0x0018($sp)
/* 0047C 80B85A6C 24E75D80 */ addiu $a3, $a3, %lo(D_80B85D80) ## $a3 = 80B85D80
/* 00480 80B85A70 24C65D74 */ addiu $a2, $a2, %lo(D_80B85D74) ## $a2 = 80B85D74
/* 00484 80B85A74 AFB90010 */ sw $t9, 0x0010($sp)
/* 00488 80B85A78 AFA80014 */ sw $t0, 0x0014($sp)
/* 0048C 80B85A7C 8FA4003C */ lw $a0, 0x003C($sp)
/* 00490 80B85A80 0C00A2EC */ jal func_80028BB0
/* 00494 80B85A84 27A5002C */ addiu $a1, $sp, 0x002C ## $a1 = FFFFFFF4
/* 00498 80B85A88 8FBF0024 */ lw $ra, 0x0024($sp)
/* 0049C 80B85A8C 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 004A0 80B85A90 03E00008 */ jr $ra
/* 004A4 80B85A94 00000000 */ nop

View file

@ -1,39 +0,0 @@
glabel func_80B85A98
/* 004A8 80B85A98 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 004AC 80B85A9C 44810000 */ mtc1 $at, $f0 ## $f0 = 10.00
/* 004B0 80B85AA0 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 004B4 80B85AA4 AFB00020 */ sw $s0, 0x0020($sp)
/* 004B8 80B85AA8 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 004BC 80B85AAC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 004C0 80B85AB0 AFBF0024 */ sw $ra, 0x0024($sp)
/* 004C4 80B85AB4 AFA5002C */ sw $a1, 0x002C($sp)
/* 004C8 80B85AB8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 004CC 80B85ABC 240E0005 */ addiu $t6, $zero, 0x0005 ## $t6 = 00000005
/* 004D0 80B85AC0 44060000 */ mfc1 $a2, $f0
/* 004D4 80B85AC4 44070000 */ mfc1 $a3, $f0
/* 004D8 80B85AC8 AFAE0014 */ sw $t6, 0x0014($sp)
/* 004DC 80B85ACC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 004E0 80B85AD0 0C00B92D */ jal func_8002E4B4
/* 004E4 80B85AD4 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 004E8 80B85AD8 0C00B638 */ jal Actor_MoveForward
/* 004EC 80B85ADC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 004F0 80B85AE0 960F0088 */ lhu $t7, 0x0088($s0) ## 00000088
/* 004F4 80B85AE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 004F8 80B85AE8 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000
/* 004FC 80B85AEC 57000004 */ bnel $t8, $zero, .L80B85B00
/* 00500 80B85AF0 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6
/* 00504 80B85AF4 0C2E1663 */ jal func_80B8598C
/* 00508 80B85AF8 8FA5002C */ lw $a1, 0x002C($sp)
/* 0050C 80B85AFC 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6
.L80B85B00:
/* 00510 80B85B00 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00514 80B85B04 27280400 */ addiu $t0, $t9, 0x0400 ## $t0 = 00000400
/* 00518 80B85B08 A60800B6 */ sh $t0, 0x00B6($s0) ## 000000B6
/* 0051C 80B85B0C 0C2E1609 */ jal func_80B85824
/* 00520 80B85B10 8FA5002C */ lw $a1, 0x002C($sp)
/* 00524 80B85B14 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00528 80B85B18 8FB00020 */ lw $s0, 0x0020($sp)
/* 0052C 80B85B1C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00530 80B85B20 03E00008 */ jr $ra
/* 00534 80B85B24 00000000 */ nop

View file

@ -1,21 +0,0 @@
glabel func_80B85B28
/* 00538 80B85B28 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0053C 80B85B2C AFA40018 */ sw $a0, 0x0018($sp)
/* 00540 80B85B30 8FAE0018 */ lw $t6, 0x0018($sp)
/* 00544 80B85B34 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00548 80B85B38 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 0054C 80B85B3C 85C5001C */ lh $a1, 0x001C($t6) ## 0000001C
/* 00550 80B85B40 00052A03 */ sra $a1, $a1, 8
/* 00554 80B85B44 0C00B32C */ jal Flags_GetTreasure
/* 00558 80B85B48 30A5001F */ andi $a1, $a1, 0x001F ## $a1 = 00000000
/* 0055C 80B85B4C 50400004 */ beql $v0, $zero, .L80B85B60
/* 00560 80B85B50 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00564 80B85B54 0C00B55C */ jal Actor_Kill
/* 00568 80B85B58 8FA40018 */ lw $a0, 0x0018($sp)
/* 0056C 80B85B5C 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B85B60:
/* 00570 80B85B60 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00574 80B85B64 03E00008 */ jr $ra
/* 00578 80B85B68 00000000 */ nop

View file

@ -1,75 +0,0 @@
.rdata
glabel D_80B85DD8
.asciz "../z_item_etcetera.c"
.balign 4
glabel D_80B85DF0
.asciz "(game_play->demo_play.npcdemopnt[0]->dousa) = %d\n"
.balign 4
.late_rodata
glabel D_80B85E64
.float -0.1
glabel D_80B85E68
.float -0.1
.text
glabel func_80B85B6C
/* 0057C 80B85B6C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00580 80B85B70 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00584 80B85B74 90AE1D6C */ lbu $t6, 0x1D6C($a1) ## 00001D6C
/* 00588 80B85B78 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 0058C 80B85B7C 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
/* 00590 80B85B80 11C00023 */ beq $t6, $zero, .L80B85C10
/* 00594 80B85B84 3C0180B8 */ lui $at, %hi(D_80B85E68) ## $at = 80B80000
/* 00598 80B85B88 8CAF1D8C */ lw $t7, 0x1D8C($a1) ## 00001D8C
/* 0059C 80B85B8C 3C0480B8 */ lui $a0, %hi(D_80B85DD8) ## $a0 = 80B80000
/* 005A0 80B85B90 24845DD8 */ addiu $a0, $a0, %lo(D_80B85DD8) ## $a0 = 80B85DD8
/* 005A4 80B85B94 11E0001E */ beq $t7, $zero, .L80B85C10
/* 005A8 80B85B98 240501B9 */ addiu $a1, $zero, 0x01B9 ## $a1 = 000001B9
/* 005AC 80B85B9C AFA60018 */ sw $a2, 0x0018($sp)
/* 005B0 80B85BA0 0C000B84 */ jal LogUtils_LogThreadId
/* 005B4 80B85BA4 AFA7001C */ sw $a3, 0x001C($sp)
/* 005B8 80B85BA8 8FA7001C */ lw $a3, 0x001C($sp)
/* 005BC 80B85BAC 3C0480B8 */ lui $a0, %hi(D_80B85DF0) ## $a0 = 80B80000
/* 005C0 80B85BB0 24845DF0 */ addiu $a0, $a0, %lo(D_80B85DF0) ## $a0 = 80B85DF0
/* 005C4 80B85BB4 8CF81D8C */ lw $t8, 0x1D8C($a3) ## 00001D8C
/* 005C8 80B85BB8 0C00084C */ jal osSyncPrintf
/* 005CC 80B85BBC 97050000 */ lhu $a1, 0x0000($t8) ## 00000000
/* 005D0 80B85BC0 8FA7001C */ lw $a3, 0x001C($sp)
/* 005D4 80B85BC4 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 005D8 80B85BC8 3C0980B8 */ lui $t1, %hi(func_80B85CB8) ## $t1 = 80B80000
/* 005DC 80B85BCC 8CF91D8C */ lw $t9, 0x1D8C($a3) ## 00001D8C
/* 005E0 80B85BD0 3C0A80B8 */ lui $t2, %hi(func_80B85A98) ## $t2 = 80B80000
/* 005E4 80B85BD4 8FA60018 */ lw $a2, 0x0018($sp)
/* 005E8 80B85BD8 97280000 */ lhu $t0, 0x0000($t9) ## 00000000
/* 005EC 80B85BDC 25295CB8 */ addiu $t1, $t1, %lo(func_80B85CB8) ## $t1 = 80B85CB8
/* 005F0 80B85BE0 254A5A98 */ addiu $t2, $t2, %lo(func_80B85A98) ## $t2 = 80B85A98
/* 005F4 80B85BE4 55010013 */ bnel $t0, $at, .L80B85C34
/* 005F8 80B85BE8 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005FC 80B85BEC ACC90134 */ sw $t1, 0x0134($a2) ## 00000134
/* 00600 80B85BF0 3C0180B8 */ lui $at, %hi(D_80B85E64) ## $at = 80B80000
/* 00604 80B85BF4 C4245E64 */ lwc1 $f4, %lo(D_80B85E64)($at)
/* 00608 80B85BF8 3C01C080 */ lui $at, 0xC080 ## $at = C0800000
/* 0060C 80B85BFC 44813000 */ mtc1 $at, $f6 ## $f6 = -4.00
/* 00610 80B85C00 ACCA015C */ sw $t2, 0x015C($a2) ## 0000015C
/* 00614 80B85C04 E4C4006C */ swc1 $f4, 0x006C($a2) ## 0000006C
/* 00618 80B85C08 10000009 */ beq $zero, $zero, .L80B85C30
/* 0061C 80B85C0C E4C60070 */ swc1 $f6, 0x0070($a2) ## 00000070
.L80B85C10:
/* 00620 80B85C10 C4285E68 */ lwc1 $f8, %lo(D_80B85E68)($at)
/* 00624 80B85C14 3C01C080 */ lui $at, 0xC080 ## $at = C0800000
/* 00628 80B85C18 44815000 */ mtc1 $at, $f10 ## $f10 = -4.00
/* 0062C 80B85C1C 3C0B80B8 */ lui $t3, %hi(func_80B85A98) ## $t3 = 80B80000
/* 00630 80B85C20 256B5A98 */ addiu $t3, $t3, %lo(func_80B85A98) ## $t3 = 80B85A98
/* 00634 80B85C24 ACCB015C */ sw $t3, 0x015C($a2) ## 0000015C
/* 00638 80B85C28 E4C8006C */ swc1 $f8, 0x006C($a2) ## 0000006C
/* 0063C 80B85C2C E4CA0070 */ swc1 $f10, 0x0070($a2) ## 00000070
.L80B85C30:
/* 00640 80B85C30 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B85C34:
/* 00644 80B85C34 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00648 80B85C38 03E00008 */ jr $ra
/* 0064C 80B85C3C 00000000 */ nop

View file

@ -1,23 +0,0 @@
glabel func_80B85C64
/* 00674 80B85C64 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00678 80B85C68 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0067C 80B85C6C AFA40018 */ sw $a0, 0x0018($sp)
/* 00680 80B85C70 90AE1C27 */ lbu $t6, 0x1C27($a1) ## 00001C27
/* 00684 80B85C74 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 00688 80B85C78 51C0000C */ beql $t6, $zero, .L80B85CAC
/* 0068C 80B85C7C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00690 80B85C80 0C00BAF3 */ jal func_8002EBCC
/* 00694 80B85C84 AFA5001C */ sw $a1, 0x001C($sp)
/* 00698 80B85C88 8FA40018 */ lw $a0, 0x0018($sp)
/* 0069C 80B85C8C 8FA5001C */ lw $a1, 0x001C($sp)
/* 006A0 80B85C90 0C00BB60 */ jal func_8002ED80
/* 006A4 80B85C94 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 006A8 80B85C98 8FAF0018 */ lw $t7, 0x0018($sp)
/* 006AC 80B85C9C 8FA4001C */ lw $a0, 0x001C($sp)
/* 006B0 80B85CA0 0C01A528 */ jal func_800694A0
/* 006B4 80B85CA4 85E50150 */ lh $a1, 0x0150($t7) ## 00000150
/* 006B8 80B85CA8 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B85CAC:
/* 006BC 80B85CAC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 006C0 80B85CB0 03E00008 */ jr $ra
/* 006C4 80B85CB4 00000000 */ nop

View file

@ -1,19 +0,0 @@
glabel func_80B85CB8
/* 006C8 80B85CB8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 006CC 80B85CBC AFBF0014 */ sw $ra, 0x0014($sp)
/* 006D0 80B85CC0 AFA40018 */ sw $a0, 0x0018($sp)
/* 006D4 80B85CC4 AFA5001C */ sw $a1, 0x001C($sp)
/* 006D8 80B85CC8 0C00BAF3 */ jal func_8002EBCC
/* 006DC 80B85CCC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 006E0 80B85CD0 8FA40018 */ lw $a0, 0x0018($sp)
/* 006E4 80B85CD4 8FA5001C */ lw $a1, 0x001C($sp)
/* 006E8 80B85CD8 0C00BB60 */ jal func_8002ED80
/* 006EC 80B85CDC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 006F0 80B85CE0 8FAE0018 */ lw $t6, 0x0018($sp)
/* 006F4 80B85CE4 8FA4001C */ lw $a0, 0x001C($sp)
/* 006F8 80B85CE8 0C01A528 */ jal func_800694A0
/* 006FC 80B85CEC 85C50150 */ lh $a1, 0x0150($t6) ## 00000150
/* 00700 80B85CF0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00704 80B85CF4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00708 80B85CF8 03E00008 */ jr $ra
/* 0070C 80B85CFC 00000000 */ nop

View file

@ -1,38 +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 Item_Etcetera_InitVars
.word 0x010F0600, 0x00000010, 0x00010000, 0x00000160
.word ItemEtcetera_Init
.word ItemEtcetera_Destroy
.word ItemEtcetera_Update
.word 0x00000000
glabel D_80B85D20
.word 0x00C6010B, 0x00DC00BE, 0x00DB00DB, 0x00AA0158, 0x017F017F, 0x017F017F, 0x00BD00AA
glabel D_80B85D3C
.word 0x00000044, 0x002B0015, 0x0029002A, 0x0001005F, 0x006C006D, 0x006E0070, 0x00130001
glabel D_80B85D58
.word 0x000F0015, 0x002A0030, 0x00370038, 0x00420058, 0x00000000, 0x00000000, 0x00000000
glabel D_80B85D74
.word 0x00000000
glabel D_80B85D78
.word 0x3E4CCCCD
glabel D_80B85D7C
.word 0x00000000
glabel D_80B85D80
.word 0x00000000
glabel D_80B85D84
.word 0x3D4CCCCD, 0x00000000
glabel D_80B85D8C
.word 0xFFFFFF00
glabel D_80B85D90
.word 0xFF323200, 0x00000000, 0x00000000, 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_80B85E70
.incbin "baserom/ovl_Item_Etcetera", 0x880, 0x00000170

3
spec
View file

@ -3486,8 +3486,7 @@ endseg
beginseg
name "ovl_Item_Etcetera"
include "build/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o"
include "build/data/overlays/actors/z_item_etcetera.data.o"
include "build/data/overlays/actors/z_item_etcetera.reloc.o"
include "build/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o"
endseg
beginseg

View file

@ -156,7 +156,6 @@ DrawItemTableEntry sDrawItemTable[] = {
{ func_8006A9CC, { 0x06000960 } },
{ func_80069EB0, { 0x06004DB0, 0x06004EB8 } },
};
/**
* Draw "Get Item" Model
* Calls the corresponding draw function for the given draw ID

View file

@ -13,8 +13,17 @@
void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx);
void ItemEtcetera_Destroy(Actor* thisx, GlobalContext* globalCtx);
void ItemEtcetera_Update(Actor* thisx, GlobalContext* globalCtx);
void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx);
void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80B857D0(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B8598C(ItemEtcetera* this, GlobalContext* globalCtx);
void ItemEtcetera_MoveFireArrowDown(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B85B28(ItemEtcetera* this, GlobalContext* globalCtx);
void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, GlobalContext* globalCtx);
/*
const ActorInit Item_Etcetera_InitVars = {
ACTOR_ITEM_ETCETERA,
ACTORTYPE_PROP,
@ -26,29 +35,186 @@ const ActorInit Item_Etcetera_InitVars = {
(ActorFunc)ItemEtcetera_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B855F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/ItemEtcetera_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/ItemEtcetera_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B857D0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85824.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B858B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B8598C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85A98.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85B28.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85B6C.s")
static s16 sObjectIds[] = {
OBJECT_GI_BOTTLE, OBJECT_GI_BOTTLE_LETTER, OBJECT_GI_SHIELD_2, OBJECT_GI_ARROWCASE, OBJECT_GI_SCALE,
OBJECT_GI_SCALE, OBJECT_GI_KEY, OBJECT_GI_M_ARROW, OBJECT_GI_RUPY, OBJECT_GI_RUPY,
OBJECT_GI_RUPY, OBJECT_GI_RUPY, OBJECT_GI_HEARTS, OBJECT_GI_KEY,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/ItemEtcetera_Update.s")
// Indexes passed to the item table in z_draw.c
static s16 sDrawItemIndexes[] = {
0x0000, 0x0044, 0x002B, 0x0015, 0x0029, 0x002A, 0x0001, 0x005F, 0x006C, 0x006D, 0x006E, 0x0070, 0x0013, 0x0001,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85C64.s")
static s16 sGetItemIds[] = {
GI_BOTTLE, GI_LETTER_RUTO, GI_SHIELD_HYLIAN, GI_QUIVER_40, GI_SCALE_SILVER, GI_SCALE_GOLD, GI_KEY_SMALL,
GI_ARROW_FIRE, GI_INVALID, GI_INVALID, GI_INVALID, GI_INVALID, GI_INVALID, GI_INVALID,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Etcetera/func_80B85CB8.s")
void ItemEtcetera_SetupAction(ItemEtcetera* this, ItemEtceteraActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx) {
ItemEtcetera* this = THIS;
s32 pad;
s32 type;
s32 objBankIndex;
type = this->actor.params & 0xFF;
osSyncPrintf("no = %d\n", type);
objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIds[type]);
osSyncPrintf("bank_ID = %d\n", objBankIndex);
if (objBankIndex < 0) {
__assert("0", "../z_item_etcetera.c", 241);
} else {
this->objBankIndex = objBankIndex;
}
this->drawId = sDrawItemIndexes[type];
this->getItemId = sGetItemIds[type];
this->futureActionFunc = func_80B85824;
this->drawFunc = ItemEtcetera_Draw;
Actor_SetScale(&this->actor, 0.25f);
ItemEtcetera_SetupAction(this, func_80B857D0);
switch (type) {
case ITEM_ETCETERA_LETTER:
Actor_SetScale(&this->actor, 0.5f);
this->futureActionFunc = func_80B858B4;
if (gSaveContext.eventChkInf[3] & 2) {
Actor_Kill(&this->actor);
}
break;
case ITEM_ETCETERA_ARROW_FIRE:
this->futureActionFunc = ItemEtcetera_UpdateFireArrow;
Actor_SetScale(&this->actor, 0.5f);
this->actor.draw = NULL;
this->actor.shape.unk_08 = 50.0f;
break;
case ITEM_ETCETERA_RUPEE_GREEN_CHEST_GAME:
case ITEM_ETCETERA_RUPEE_BLUE_CHEST_GAME:
case ITEM_ETCETERA_RUPEE_RED_CHEST_GAME:
case ITEM_ETCETERA_RUPEE_PURPLE_CHEST_GAME:
case ITEM_ETCETERA_HEART_PIECE_CHEST_GAME:
case ITEM_ETCETERA_KEY_SMALL_CHEST_GAME:
Actor_SetScale(&this->actor, 0.5f);
this->futureActionFunc = func_80B85B28;
this->drawFunc = ItemEtcetera_DrawThroughLens;
this->actor.posRot.pos.y += 15.0f;
break;
}
}
void ItemEtcetera_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80B857D0(ItemEtcetera* this, GlobalContext* globalCtx) {
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
this->actor.objBankIndex = this->objBankIndex;
this->actor.draw = this->drawFunc;
this->actionFunc = this->futureActionFunc;
}
}
void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) {
if (func_8002F410(&this->actor, globalCtx) != 0) {
if ((this->actor.params & 0xFF) == 1) {
gSaveContext.eventChkInf[3] |= 2;
Flags_SetSwitch(globalCtx, 0xB);
}
Actor_Kill(&this->actor);
} else {
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
}
}
void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
if (func_8002F410(&this->actor, globalCtx) != 0) {
if ((this->actor.params & 0xFF) == 1) {
gSaveContext.eventChkInf[3] |= 2;
Flags_SetSwitch(globalCtx, 0xB);
}
Actor_Kill(&this->actor);
} else {
if (0) {} // Necessary to match
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
if ((globalCtx->gameplayFrames & 0xD) == 0) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
}
}
}
void func_80B8598C(ItemEtcetera* this, GlobalContext* globalCtx) {
static Vec3f D_80B85D74 = { 0.0f, 0.2f, 0.0f };
static Vec3f D_80B85D80 = { 0.0f, 0.05f, 0.0f };
static Color_RGB8 D_80B85D8C = { 255, 255, 255 };
static Color_RGB8 D_80B85D90 = { 255, 50, 50 };
Vec3f vec;
D_80B85D74.x = Math_Rand_CenteredFloat(3.0f);
D_80B85D74.z = Math_Rand_CenteredFloat(3.0f);
D_80B85D74.y = -0.05f;
D_80B85D80.y = -0.025f;
vec.x = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.x;
vec.y = (Math_Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
vec.z = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.z;
func_80028BB0(globalCtx, &vec, &D_80B85D74, &D_80B85D80, &D_80B85D8C, &D_80B85D90, 0x1388, 0x10);
}
void ItemEtcetera_MoveFireArrowDown(ItemEtcetera* this, GlobalContext* globalCtx) {
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 0.0f, 5);
Actor_MoveForward(&this->actor);
if (!(this->actor.bgCheckFlags & 1)) {
func_80B8598C(this, globalCtx);
}
this->actor.shape.rot.y += 0x400;
func_80B85824(this, globalCtx);
}
void func_80B85B28(ItemEtcetera* this, GlobalContext* globalCtx) {
if (Flags_GetTreasure(globalCtx, (this->actor.params >> 8) & 0x1F)) {
Actor_Kill(&this->actor);
}
}
void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
LOG_NUM("(game_play->demo_play.npcdemopnt[0]->dousa)", globalCtx->csCtx.npcActions[0]->action,
"../z_item_etcetera.c", 441);
if (globalCtx->csCtx.npcActions[0]->action == 2) {
this->actor.draw = ItemEtcetera_Draw;
this->actor.gravity = -0.1f;
this->actor.minVelocityY = -4.0f;
this->actionFunc = ItemEtcetera_MoveFireArrowDown;
}
} else {
this->actor.gravity = -0.1f;
this->actor.minVelocityY = -4.0f;
this->actionFunc = ItemEtcetera_MoveFireArrowDown;
}
}
void ItemEtcetera_Update(Actor* thisx, GlobalContext* globalCtx) {
ItemEtcetera* this = THIS;
this->actionFunc(this, globalCtx);
}
void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
ItemEtcetera* this = THIS;
if (globalCtx->actorCtx.unk_03 != 0) {
func_8002EBCC(&this->actor, globalCtx, 0);
func_8002ED80(&this->actor, globalCtx, 0);
func_800694A0(globalCtx, this->drawId);
}
}
void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
ItemEtcetera* this = THIS;
func_8002EBCC(&this->actor, globalCtx, 0);
func_8002ED80(&this->actor, globalCtx, 0);
func_800694A0(globalCtx, this->drawId);
}

View file

@ -6,11 +6,35 @@
struct ItemEtcetera;
typedef void (*ItemEtceteraActionFunc)(struct ItemEtcetera*, GlobalContext*);
typedef struct ItemEtcetera {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x14];
/* 0x014C */ ItemEtceteraActionFunc futureActionFunc;
/* 0x0150 */ s16 drawId;
/* 0x0152 */ s16 getItemId;
/* 0x0154 */ u8 objBankIndex;
/* 0x0158 */ ActorFunc drawFunc;
/* 0x015C */ ItemEtceteraActionFunc actionFunc;
} ItemEtcetera; // size = 0x0160
typedef enum {
/* 0x00 */ ITEM_ETCETERA_BOTTLE,
/* 0x01 */ ITEM_ETCETERA_LETTER,
/* 0x02 */ ITEM_ETCETERA_SHIELD_HYLIAN,
/* 0x03 */ ITEM_ETCETERA_QUIVER,
/* 0x04 */ ITEM_ETCETERA_SCALE_SILVER,
/* 0x05 */ ITEM_ETCETERA_SCALE_GOLD,
/* 0x06 */ ITEM_ETCETERA_KEY_SMALL,
/* 0x07 */ ITEM_ETCETERA_ARROW_FIRE,
/* 0x08 */ ITEM_ETCETERA_RUPEE_GREEN_CHEST_GAME,
/* 0x09 */ ITEM_ETCETERA_RUPEE_BLUE_CHEST_GAME,
/* 0x0A */ ITEM_ETCETERA_RUPEE_RED_CHEST_GAME,
/* 0x0B */ ITEM_ETCETERA_RUPEE_PURPLE_CHEST_GAME,
/* 0x0C */ ITEM_ETCETERA_HEART_PIECE_CHEST_GAME,
/* 0x0D */ ITEM_ETCETERA_KEY_SMALL_CHEST_GAME
} ItemEtceteraType;
extern const ActorInit Item_Etcetera_InitVars;
#endif