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

ovl_en_hs2 OK (#423)

* Decompiled ovl_en_hs2

* Replaced skelAnime pointer with pad, changed some values to hex, replaced early return with else statment, removed unnecessary padding in the header, removed unneeded & on a function pointer

* Replaced a tab with whitespace, removed address operator in front of ActorShadow_DrawFunc_Circle, moved vec3f inside the PostLimbDraw function

* Changed 0xFFFE to ~1
This commit is contained in:
emilybrooks 2020-10-01 04:49:47 -07:00 committed by GitHub
parent 024d5d69bf
commit 7a8e00e49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 136 additions and 420 deletions

View file

@ -1,12 +0,0 @@
glabel EnHs2_Destroy
/* 000EC 80A6F08C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 000F0 80A6F090 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 000F4 80A6F094 AFBF0014 */ sw $ra, 0x0014($sp)
/* 000F8 80A6F098 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 000FC 80A6F09C 0C0170EB */ jal Collider_DestroyCylinder
/* 00100 80A6F0A0 24C5014C */ addiu $a1, $a2, 0x014C ## $a1 = 0000014C
/* 00104 80A6F0A4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00108 80A6F0A8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0010C 80A6F0AC 03E00008 */ jr $ra
/* 00110 80A6F0B0 00000000 */ nop

View file

@ -1,25 +0,0 @@
glabel EnHs2_Draw
/* 00480 80A6F420 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00484 80A6F424 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00488 80A6F428 AFA40028 */ sw $a0, 0x0028($sp)
/* 0048C 80A6F42C AFA5002C */ sw $a1, 0x002C($sp)
/* 00490 80A6F430 0C0250F2 */ jal func_800943C8
/* 00494 80A6F434 8CA40000 */ lw $a0, 0x0000($a1) ## 00000000
/* 00498 80A6F438 8FA20028 */ lw $v0, 0x0028($sp)
/* 0049C 80A6F43C 3C0F80A7 */ lui $t7, %hi(func_80A6F358) ## $t7 = 80A70000
/* 004A0 80A6F440 3C1880A7 */ lui $t8, %hi(func_80A6F3E0) ## $t8 = 80A70000
/* 004A4 80A6F444 8C45019C */ lw $a1, 0x019C($v0) ## 0000019C
/* 004A8 80A6F448 8C4601B8 */ lw $a2, 0x01B8($v0) ## 000001B8
/* 004AC 80A6F44C 9047019A */ lbu $a3, 0x019A($v0) ## 0000019A
/* 004B0 80A6F450 2718F3E0 */ addiu $t8, $t8, %lo(func_80A6F3E0) ## $t8 = 80A6F3E0
/* 004B4 80A6F454 25EFF358 */ addiu $t7, $t7, %lo(func_80A6F358) ## $t7 = 80A6F358
/* 004B8 80A6F458 AFAF0010 */ sw $t7, 0x0010($sp)
/* 004BC 80A6F45C AFB80014 */ sw $t8, 0x0014($sp)
/* 004C0 80A6F460 8FA4002C */ lw $a0, 0x002C($sp)
/* 004C4 80A6F464 0C0286B2 */ jal SkelAnime_DrawSV
/* 004C8 80A6F468 AFA20018 */ sw $v0, 0x0018($sp)
/* 004CC 80A6F46C 8FBF0024 */ lw $ra, 0x0024($sp)
/* 004D0 80A6F470 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 004D4 80A6F474 03E00008 */ jr $ra
/* 004D8 80A6F478 00000000 */ nop
/* 004DC 80A6F47C 00000000 */ nop

View file

@ -1,71 +0,0 @@
.rdata
glabel D_80A6F4E0
.asciz "\x1b[36m () \n\x1b[m"
.balign 4
.text
glabel EnHs2_Init
/* 00000 80A6EFA0 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 00004 80A6EFA4 AFB00028 */ sw $s0, 0x0028($sp)
/* 00008 80A6EFA8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0000C 80A6EFAC AFBF002C */ sw $ra, 0x002C($sp)
/* 00010 80A6EFB0 AFA50044 */ sw $a1, 0x0044($sp)
/* 00014 80A6EFB4 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle)
/* 00018 80A6EFB8 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawFunc_Circle)
/* 0001C 80A6EFBC 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00020 80A6EFC0 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4
/* 00024 80A6EFC4 0C00AC78 */ jal ActorShape_Init
/* 00028 80A6EFC8 3C074210 */ lui $a3, 0x4210 ## $a3 = 42100000
/* 0002C 80A6EFCC 26050198 */ addiu $a1, $s0, 0x0198 ## $a1 = 00000198
/* 00030 80A6EFD0 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000
/* 00034 80A6EFD4 3C070600 */ lui $a3, 0x0600 ## $a3 = 06000000
/* 00038 80A6EFD8 260E01DC */ addiu $t6, $s0, 0x01DC ## $t6 = 000001DC
/* 0003C 80A6EFDC 260F023C */ addiu $t7, $s0, 0x023C ## $t7 = 0000023C
/* 00040 80A6EFE0 24180010 */ addiu $t8, $zero, 0x0010 ## $t8 = 00000010
/* 00044 80A6EFE4 AFB80018 */ sw $t8, 0x0018($sp)
/* 00048 80A6EFE8 AFAF0014 */ sw $t7, 0x0014($sp)
/* 0004C 80A6EFEC AFAE0010 */ sw $t6, 0x0010($sp)
/* 00050 80A6EFF0 24E705C0 */ addiu $a3, $a3, 0x05C0 ## $a3 = 060005C0
/* 00054 80A6EFF4 24C66260 */ addiu $a2, $a2, 0x6260 ## $a2 = 06006260
/* 00058 80A6EFF8 AFA50034 */ sw $a1, 0x0034($sp)
/* 0005C 80A6EFFC 0C0291BE */ jal SkelAnime_InitSV
/* 00060 80A6F000 8FA40044 */ lw $a0, 0x0044($sp)
/* 00064 80A6F004 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 00068 80A6F008 24A505C0 */ addiu $a1, $a1, 0x05C0 ## $a1 = 060005C0
/* 0006C 80A6F00C 0C0294BE */ jal SkelAnime_ChangeAnimDefaultRepeat
/* 00070 80A6F010 8FA40034 */ lw $a0, 0x0034($sp)
/* 00074 80A6F014 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C
/* 00078 80A6F018 AFA50034 */ sw $a1, 0x0034($sp)
/* 0007C 80A6F01C 0C0170D9 */ jal Collider_InitCylinder
/* 00080 80A6F020 8FA40044 */ lw $a0, 0x0044($sp)
/* 00084 80A6F024 3C0780A7 */ lui $a3, %hi(D_80A6F4A0) ## $a3 = 80A70000
/* 00088 80A6F028 8FA50034 */ lw $a1, 0x0034($sp)
/* 0008C 80A6F02C 24E7F4A0 */ addiu $a3, $a3, %lo(D_80A6F4A0) ## $a3 = 80A6F4A0
/* 00090 80A6F030 8FA40044 */ lw $a0, 0x0044($sp)
/* 00094 80A6F034 0C01712B */ jal Collider_SetCylinder
/* 00098 80A6F038 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 0009C 80A6F03C 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF
/* 000A0 80A6F040 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000
/* 000A4 80A6F044 A21900AE */ sb $t9, 0x00AE($s0) ## 000000AE
/* 000A8 80A6F048 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A
/* 000AC 80A6F04C 0C00B58B */ jal Actor_SetScale
/* 000B0 80A6F050 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000B4 80A6F054 3C0480A7 */ lui $a0, %hi(D_80A6F4E0) ## $a0 = 80A70000
/* 000B8 80A6F058 0C00084C */ jal osSyncPrintf
/* 000BC 80A6F05C 2484F4E0 */ addiu $a0, $a0, %lo(D_80A6F4E0) ## $a0 = 80A6F4E0
/* 000C0 80A6F060 3C0880A7 */ lui $t0, %hi(func_80A6F1A4) ## $t0 = 80A70000
/* 000C4 80A6F064 2508F1A4 */ addiu $t0, $t0, %lo(func_80A6F1A4) ## $t0 = 80A6F1A4
/* 000C8 80A6F068 24090006 */ addiu $t1, $zero, 0x0006 ## $t1 = 00000006
/* 000CC 80A6F06C AE0802AC */ sw $t0, 0x02AC($s0) ## 000002AC
/* 000D0 80A6F070 A60002A8 */ sh $zero, 0x02A8($s0) ## 000002A8
/* 000D4 80A6F074 A209001F */ sb $t1, 0x001F($s0) ## 0000001F
/* 000D8 80A6F078 8FBF002C */ lw $ra, 0x002C($sp)
/* 000DC 80A6F07C 8FB00028 */ lw $s0, 0x0028($sp)
/* 000E0 80A6F080 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 000E4 80A6F084 03E00008 */ jr $ra
/* 000E8 80A6F088 00000000 */ nop

View file

@ -1,102 +0,0 @@
glabel EnHs2_Update
/* 00250 80A6F1F0 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 00254 80A6F1F4 AFB00024 */ sw $s0, 0x0024($sp)
/* 00258 80A6F1F8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0025C 80A6F1FC AFB10028 */ sw $s1, 0x0028($sp)
/* 00260 80A6F200 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 00264 80A6F204 AFBF002C */ sw $ra, 0x002C($sp)
/* 00268 80A6F208 2606014C */ addiu $a2, $s0, 0x014C ## $a2 = 0000014C
/* 0026C 80A6F20C 00C02825 */ or $a1, $a2, $zero ## $a1 = 0000014C
/* 00270 80A6F210 0C0189B7 */ jal Collider_CylinderUpdate
/* 00274 80A6F214 AFA60034 */ sw $a2, 0x0034($sp)
/* 00278 80A6F218 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 0027C 80A6F21C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 00280 80A6F220 8FA60034 */ lw $a2, 0x0034($sp)
/* 00284 80A6F224 02212821 */ addu $a1, $s1, $at
/* 00288 80A6F228 0C017713 */ jal CollisionCheck_SetOC
## CollisionCheck_setOT
/* 0028C 80A6F22C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00290 80A6F230 0C00B638 */ jal Actor_MoveForward
/* 00294 80A6F234 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00298 80A6F238 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 0029C 80A6F23C 240E0004 */ addiu $t6, $zero, 0x0004 ## $t6 = 00000004
/* 002A0 80A6F240 AFAE0014 */ sw $t6, 0x0014($sp)
/* 002A4 80A6F244 44060000 */ mfc1 $a2, $f0
/* 002A8 80A6F248 44070000 */ mfc1 $a3, $f0
/* 002AC 80A6F24C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 002B0 80A6F250 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 002B4 80A6F254 0C00B92D */ jal func_8002E4B4
/* 002B8 80A6F258 E7A00010 */ swc1 $f0, 0x0010($sp)
/* 002BC 80A6F25C 0C02927F */ jal SkelAnime_FrameUpdateMatrix
/* 002C0 80A6F260 26040198 */ addiu $a0, $s0, 0x0198 ## $a0 = 00000198
/* 002C4 80A6F264 50400005 */ beql $v0, $zero, .L80A6F27C
/* 002C8 80A6F268 8E1902AC */ lw $t9, 0x02AC($s0) ## 000002AC
/* 002CC 80A6F26C 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 002D0 80A6F270 00000000 */ nop
/* 002D4 80A6F274 E60401B0 */ swc1 $f4, 0x01B0($s0) ## 000001B0
/* 002D8 80A6F278 8E1902AC */ lw $t9, 0x02AC($s0) ## 000002AC
.L80A6F27C:
/* 002DC 80A6F27C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002E0 80A6F280 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 002E4 80A6F284 0320F809 */ jalr $ra, $t9
/* 002E8 80A6F288 00000000 */ nop
/* 002EC 80A6F28C 960F02A8 */ lhu $t7, 0x02A8($s0) ## 000002A8
/* 002F0 80A6F290 2604029C */ addiu $a0, $s0, 0x029C ## $a0 = 0000029C
/* 002F4 80A6F294 24053200 */ addiu $a1, $zero, 0x3200 ## $a1 = 00003200
/* 002F8 80A6F298 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000
/* 002FC 80A6F29C 13000010 */ beq $t8, $zero, .L80A6F2E0
/* 00300 80A6F2A0 24060006 */ addiu $a2, $zero, 0x0006 ## $a2 = 00000006
/* 00304 80A6F2A4 8E090038 */ lw $t1, 0x0038($s0) ## 00000038
/* 00308 80A6F2A8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0030C 80A6F2AC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00310 80A6F2B0 AFA90010 */ sw $t1, 0x0010($sp)
/* 00314 80A6F2B4 8E08003C */ lw $t0, 0x003C($s0) ## 0000003C
/* 00318 80A6F2B8 2606029C */ addiu $a2, $s0, 0x029C ## $a2 = 0000029C
/* 0031C 80A6F2BC 260702A2 */ addiu $a3, $s0, 0x02A2 ## $a3 = 000002A2
/* 00320 80A6F2C0 AFA80014 */ sw $t0, 0x0014($sp)
/* 00324 80A6F2C4 8E090040 */ lw $t1, 0x0040($s0) ## 00000040
/* 00328 80A6F2C8 0C00E0A4 */ jal func_80038290
/* 0032C 80A6F2CC AFA90018 */ sw $t1, 0x0018($sp)
/* 00330 80A6F2D0 960A02A8 */ lhu $t2, 0x02A8($s0) ## 000002A8
/* 00334 80A6F2D4 314BFFFE */ andi $t3, $t2, 0xFFFE ## $t3 = 00000000
/* 00338 80A6F2D8 1000001A */ beq $zero, $zero, .L80A6F344
/* 0033C 80A6F2DC A60B02A8 */ sh $t3, 0x02A8($s0) ## 000002A8
.L80A6F2E0:
/* 00340 80A6F2E0 240C0064 */ addiu $t4, $zero, 0x0064 ## $t4 = 00000064
/* 00344 80A6F2E4 AFAC0010 */ sw $t4, 0x0010($sp)
/* 00348 80A6F2E8 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 0034C 80A6F2EC 24071838 */ addiu $a3, $zero, 0x1838 ## $a3 = 00001838
/* 00350 80A6F2F0 240D0064 */ addiu $t5, $zero, 0x0064 ## $t5 = 00000064
/* 00354 80A6F2F4 AFAD0010 */ sw $t5, 0x0010($sp)
/* 00358 80A6F2F8 2604029E */ addiu $a0, $s0, 0x029E ## $a0 = 0000029E
/* 0035C 80A6F2FC 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00360 80A6F300 24060006 */ addiu $a2, $zero, 0x0006 ## $a2 = 00000006
/* 00364 80A6F304 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 00368 80A6F308 24071838 */ addiu $a3, $zero, 0x1838 ## $a3 = 00001838
/* 0036C 80A6F30C 240E0064 */ addiu $t6, $zero, 0x0064 ## $t6 = 00000064
/* 00370 80A6F310 AFAE0010 */ sw $t6, 0x0010($sp)
/* 00374 80A6F314 260402A2 */ addiu $a0, $s0, 0x02A2 ## $a0 = 000002A2
/* 00378 80A6F318 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 0037C 80A6F31C 24060006 */ addiu $a2, $zero, 0x0006 ## $a2 = 00000006
/* 00380 80A6F320 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 00384 80A6F324 24071838 */ addiu $a3, $zero, 0x1838 ## $a3 = 00001838
/* 00388 80A6F328 24190064 */ addiu $t9, $zero, 0x0064 ## $t9 = 00000064
/* 0038C 80A6F32C AFB90010 */ sw $t9, 0x0010($sp)
/* 00390 80A6F330 260402A4 */ addiu $a0, $s0, 0x02A4 ## $a0 = 000002A4
/* 00394 80A6F334 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00398 80A6F338 24060006 */ addiu $a2, $zero, 0x0006 ## $a2 = 00000006
/* 0039C 80A6F33C 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 003A0 80A6F340 24071838 */ addiu $a3, $zero, 0x1838 ## $a3 = 00001838
.L80A6F344:
/* 003A4 80A6F344 8FBF002C */ lw $ra, 0x002C($sp)
/* 003A8 80A6F348 8FB00024 */ lw $s0, 0x0024($sp)
/* 003AC 80A6F34C 8FB10028 */ lw $s1, 0x0028($sp)
/* 003B0 80A6F350 03E00008 */ jr $ra
/* 003B4 80A6F354 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000

View file

@ -1,50 +0,0 @@
glabel func_80A6F0B4
/* 00114 80A6F0B4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00118 80A6F0B8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0011C 80A6F0BC AFA5001C */ sw $a1, 0x001C($sp)
/* 00120 80A6F0C0 AFA60020 */ sw $a2, 0x0020($sp)
/* 00124 80A6F0C4 AFA70024 */ sw $a3, 0x0024($sp)
/* 00128 80A6F0C8 0C00BC65 */ jal func_8002F194
/* 0012C 80A6F0CC AFA40018 */ sw $a0, 0x0018($sp)
/* 00130 80A6F0D0 10400005 */ beq $v0, $zero, .L80A6F0E8
/* 00134 80A6F0D4 8FA40018 */ lw $a0, 0x0018($sp)
/* 00138 80A6F0D8 8FAE0024 */ lw $t6, 0x0024($sp)
/* 0013C 80A6F0DC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 00140 80A6F0E0 1000001C */ beq $zero, $zero, .L80A6F154
/* 00144 80A6F0E4 AC8E02AC */ sw $t6, 0x02AC($a0) ## 000002AC
.L80A6F0E8:
/* 00148 80A6F0E8 8498008A */ lh $t8, 0x008A($a0) ## 0000008A
/* 0014C 80A6F0EC 849900B6 */ lh $t9, 0x00B6($a0) ## 000000B6
/* 00150 80A6F0F0 97AF0022 */ lhu $t7, 0x0022($sp)
/* 00154 80A6F0F4 03191023 */ subu $v0, $t8, $t9
/* 00158 80A6F0F8 00021400 */ sll $v0, $v0, 16
/* 0015C 80A6F0FC 00021403 */ sra $v0, $v0, 16
/* 00160 80A6F100 04400003 */ bltz $v0, .L80A6F110
/* 00164 80A6F104 A48F010E */ sh $t7, 0x010E($a0) ## 0000010E
/* 00168 80A6F108 10000002 */ beq $zero, $zero, .L80A6F114
/* 0016C 80A6F10C 00401825 */ or $v1, $v0, $zero ## $v1 = 00000001
.L80A6F110:
/* 00170 80A6F110 00021823 */ subu $v1, $zero, $v0
.L80A6F114:
/* 00174 80A6F114 28612151 */ slti $at, $v1, 0x2151
/* 00178 80A6F118 1020000D */ beq $at, $zero, .L80A6F150
/* 0017C 80A6F11C 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000
/* 00180 80A6F120 44810000 */ mtc1 $at, $f0 ## $f0 = 100.00
/* 00184 80A6F124 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090
/* 00188 80A6F128 4600203C */ c.lt.s $f4, $f0
/* 0018C 80A6F12C 00000000 */ nop
/* 00190 80A6F130 45020008 */ bc1fl .L80A6F154
/* 00194 80A6F134 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 00198 80A6F138 948802A8 */ lhu $t0, 0x02A8($a0) ## 000002A8
/* 0019C 80A6F13C 44060000 */ mfc1 $a2, $f0
/* 001A0 80A6F140 35090001 */ ori $t1, $t0, 0x0001 ## $t1 = 00000001
/* 001A4 80A6F144 A48902A8 */ sh $t1, 0x02A8($a0) ## 000002A8
/* 001A8 80A6F148 0C00BCB3 */ jal func_8002F2CC
/* 001AC 80A6F14C 8FA5001C */ lw $a1, 0x001C($sp)
.L80A6F150:
/* 001B0 80A6F150 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L80A6F154:
/* 001B4 80A6F154 8FBF0014 */ lw $ra, 0x0014($sp)
/* 001B8 80A6F158 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 001BC 80A6F15C 03E00008 */ jr $ra
/* 001C0 80A6F160 00000000 */ nop

View file

@ -1,18 +0,0 @@
glabel func_80A6F164
/* 001C4 80A6F164 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 001C8 80A6F168 AFBF0014 */ sw $ra, 0x0014($sp)
/* 001CC 80A6F16C 0C00BCCD */ jal func_8002F334
/* 001D0 80A6F170 AFA40018 */ sw $a0, 0x0018($sp)
/* 001D4 80A6F174 10400004 */ beq $v0, $zero, .L80A6F188
/* 001D8 80A6F178 8FA40018 */ lw $a0, 0x0018($sp)
/* 001DC 80A6F17C 3C0E80A7 */ lui $t6, %hi(func_80A6F1A4) ## $t6 = 80A70000
/* 001E0 80A6F180 25CEF1A4 */ addiu $t6, $t6, %lo(func_80A6F1A4) ## $t6 = 80A6F1A4
/* 001E4 80A6F184 AC8E02AC */ sw $t6, 0x02AC($a0) ## 000002AC
.L80A6F188:
/* 001E8 80A6F188 948F02A8 */ lhu $t7, 0x02A8($a0) ## 000002A8
/* 001EC 80A6F18C 35F80001 */ ori $t8, $t7, 0x0001 ## $t8 = 00000001
/* 001F0 80A6F190 A49802A8 */ sh $t8, 0x02A8($a0) ## 000002A8
/* 001F4 80A6F194 8FBF0014 */ lw $ra, 0x0014($sp)
/* 001F8 80A6F198 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 001FC 80A6F19C 03E00008 */ jr $ra
/* 00200 80A6F1A0 00000000 */ nop

View file

@ -1,21 +0,0 @@
glabel func_80A6F1A4
/* 00204 80A6F1A4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00208 80A6F1A8 AFA40018 */ sw $a0, 0x0018($sp)
/* 0020C 80A6F1AC AFBF0014 */ sw $ra, 0x0014($sp)
/* 00210 80A6F1B0 AFA5001C */ sw $a1, 0x001C($sp)
/* 00214 80A6F1B4 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00218 80A6F1B8 0C01B0D8 */ jal Text_GetFaceReaction
/* 0021C 80A6F1BC 24050009 */ addiu $a1, $zero, 0x0009 ## $a1 = 00000009
/* 00220 80A6F1C0 14400002 */ bne $v0, $zero, .L80A6F1CC
/* 00224 80A6F1C4 3046FFFF */ andi $a2, $v0, 0xFFFF ## $a2 = 00000000
/* 00228 80A6F1C8 24065069 */ addiu $a2, $zero, 0x5069 ## $a2 = 00005069
.L80A6F1CC:
/* 0022C 80A6F1CC 3C0780A7 */ lui $a3, %hi(func_80A6F164) ## $a3 = 80A70000
/* 00230 80A6F1D0 24E7F164 */ addiu $a3, $a3, %lo(func_80A6F164) ## $a3 = 80A6F164
/* 00234 80A6F1D4 8FA40018 */ lw $a0, 0x0018($sp)
/* 00238 80A6F1D8 0C29BC2D */ jal func_80A6F0B4
/* 0023C 80A6F1DC 8FA5001C */ lw $a1, 0x001C($sp)
/* 00240 80A6F1E0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00244 80A6F1E4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00248 80A6F1E8 03E00008 */ jr $ra
/* 0024C 80A6F1EC 00000000 */ nop

View file

@ -1,28 +0,0 @@
.late_rodata
.late_rodata_alignment 8
glabel D_80A6F500
.word func_80A6F390
.word L80A6F3BC
.word func_80A6F3C8
.word L80A6F384
.word L80A6F384
.word 0x00000000, 0x00000000, 0x00000000
.text
glabel func_80A6F358
/* 003B8 80A6F358 24AEFFF7 */ addiu $t6, $a1, 0xFFF7 ## $t6 = FFFFFFF7
/* 003BC 80A6F35C 2DC10005 */ sltiu $at, $t6, 0x0005
/* 003C0 80A6F360 AFA40000 */ sw $a0, 0x0000($sp)
/* 003C4 80A6F364 1020001B */ beq $at, $zero, .L80A6F3D4
/* 003C8 80A6F368 AFA7000C */ sw $a3, 0x000C($sp)
/* 003CC 80A6F36C 000E7080 */ sll $t6, $t6, 2
/* 003D0 80A6F370 3C0180A7 */ lui $at, %hi(D_80A6F500) ## $at = 80A70000
/* 003D4 80A6F374 002E0821 */ addu $at, $at, $t6
/* 003D8 80A6F378 8C2EF500 */ lw $t6, %lo(D_80A6F500)($at)
/* 003DC 80A6F37C 01C00008 */ jr $t6
/* 003E0 80A6F380 00000000 */ nop
glabel L80A6F384
/* 003E4 80A6F384 ACC00000 */ sw $zero, 0x0000($a2) ## 00000000
/* 003E8 80A6F388 03E00008 */ jr $ra
/* 003EC 80A6F38C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000

View file

@ -1,16 +0,0 @@
glabel func_80A6F390
/* 003F0 80A6F390 8FA20014 */ lw $v0, 0x0014($sp)
/* 003F4 80A6F394 8FA30010 */ lw $v1, 0x0010($sp)
/* 003F8 80A6F398 8458029E */ lh $t8, 0x029E($v0) ## 0000029E
/* 003FC 80A6F39C 846F0000 */ lh $t7, 0x0000($v1) ## 00000000
/* 00400 80A6F3A0 84680004 */ lh $t0, 0x0004($v1) ## 00000004
/* 00404 80A6F3A4 01F8C821 */ addu $t9, $t7, $t8
/* 00408 80A6F3A8 A4790000 */ sh $t9, 0x0000($v1) ## 00000000
/* 0040C 80A6F3AC 8449029C */ lh $t1, 0x029C($v0) ## 0000029C
/* 00410 80A6F3B0 01095021 */ addu $t2, $t0, $t1
/* 00414 80A6F3B4 10000007 */ beq $zero, $zero, .L80A6F3D4
/* 00418 80A6F3B8 A46A0004 */ sh $t2, 0x0004($v1) ## 00000004
glabel L80A6F3BC
/* 0041C 80A6F3BC ACC00000 */ sw $zero, 0x0000($a2) ## 00000000
/* 00420 80A6F3C0 03E00008 */ jr $ra
/* 00424 80A6F3C4 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000

View file

@ -1,8 +0,0 @@
glabel func_80A6F3C8
/* 00428 80A6F3C8 ACC00000 */ sw $zero, 0x0000($a2) ## 00000000
/* 0042C 80A6F3CC 03E00008 */ jr $ra
/* 00430 80A6F3D0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L80A6F3D4:
/* 00434 80A6F3D4 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 00438 80A6F3D8 03E00008 */ jr $ra
/* 0043C 80A6F3DC 00000000 */ nop

View file

@ -1,18 +0,0 @@
glabel func_80A6F3E0
/* 00440 80A6F3E0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00444 80A6F3E4 24010009 */ addiu $at, $zero, 0x0009 ## $at = 00000009
/* 00448 80A6F3E8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0044C 80A6F3EC AFA40018 */ sw $a0, 0x0018($sp)
/* 00450 80A6F3F0 AFA60020 */ sw $a2, 0x0020($sp)
/* 00454 80A6F3F4 14A10006 */ bne $a1, $at, .L80A6F410
/* 00458 80A6F3F8 AFA70024 */ sw $a3, 0x0024($sp)
/* 0045C 80A6F3FC 8FA50028 */ lw $a1, 0x0028($sp)
/* 00460 80A6F400 3C0480A7 */ lui $a0, %hi(D_80A6F4CC) ## $a0 = 80A70000
/* 00464 80A6F404 2484F4CC */ addiu $a0, $a0, %lo(D_80A6F4CC) ## $a0 = 80A6F4CC
/* 00468 80A6F408 0C0346BD */ jal Matrix_MultVec3f
/* 0046C 80A6F40C 24A50038 */ addiu $a1, $a1, 0x0038 ## $a1 = 00000038
.L80A6F410:
/* 00470 80A6F410 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00474 80A6F414 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00478 80A6F418 03E00008 */ jr $ra
/* 0047C 80A6F41C 00000000 */ nop

View file

@ -1,22 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel En_Hs2_InitVars
.word 0x01A60400, 0x00000009, 0x01280000, 0x000002B0
.word EnHs2_Init
.word EnHs2_Destroy
.word EnHs2_Update
.word EnHs2_Draw
glabel D_80A6F4A0
.word 0x0A001139, 0x10010000, 0x00000000, 0x00000000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00010100, 0x00280028, 0x00000000, 0x00000000
glabel D_80A6F4CC
.word 0x43960000, 0x447A0000, 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_80A6F520
.incbin "baserom/ovl_En_Hs2", 0x580, 0x00000090

3
spec
View file

@ -2569,8 +2569,7 @@ endseg
beginseg
name "ovl_En_Hs2"
include "build/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o"
include "build/data/overlays/actors/z_en_hs2.data.o"
include "build/data/overlays/actors/z_en_hs2.reloc.o"
include "build/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o"
endseg
beginseg

View file

@ -6,6 +6,8 @@
#include "z_en_hs2.h"
#include <vt.h>
#define FLAGS 0x00000009
#define THIS ((EnHs2*)thisx)
@ -14,8 +16,8 @@ void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx);
void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnHs2_Update(Actor* thisx, GlobalContext* globalCtx);
void EnHs2_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80A6F1A4(EnHs2* this, GlobalContext* globalCtx);
/*
const ActorInit En_Hs2_InitVars = {
ACTOR_EN_HS2,
ACTORTYPE_NPC,
@ -27,25 +29,131 @@ const ActorInit En_Hs2_InitVars = {
(ActorFunc)EnHs2_Update,
(ActorFunc)EnHs2_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/EnHs2_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/EnHs2_Destroy.s")
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x11, 0x39, 0x10, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{ 40, 40, 0, { 0, 0, 0 } },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F0B4.s")
extern SkeletonHeader D_06006260;
extern AnimationHeader D_060005C0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F164.s")
void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx) {
EnHs2* this = THIS;
s32 pad;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F1A4.s")
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06006260, &D_060005C0, this->limbDrawTable,
this->transitionDrawTable, 16);
SkelAnime_ChangeAnimDefaultRepeat(&this->skelAnime, &D_060005C0);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
Actor_SetScale(&this->actor, 0.01f);
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(子人の時) \n" VT_RST);
this->actionFunc = func_80A6F1A4;
this->unk_2A8 = 0;
this->actor.unk_1F = 6;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/EnHs2_Update.s")
void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnHs2* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F358.s")
Collider_DestroyCylinder(globalCtx, &this->collider);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F390.s")
s32 func_80A6F0B4(EnHs2* this, GlobalContext* globalCtx, u16 textId, EnHs2ActionFunc actionFunc) {
if (func_8002F194(&this->actor, globalCtx)) {
this->actionFunc = actionFunc;
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F3C8.s")
this->actor.textId = textId;
if (ABS((s16)(this->actor.yawTowardsLink - this->actor.shape.rot.y)) < 0x2151 &&
this->actor.xzDistFromLink < 100.0f) {
this->unk_2A8 |= 0x1;
func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
return 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/func_80A6F3E0.s")
void func_80A6F164(EnHs2* this, GlobalContext* globalCtx) {
if (func_8002F334(&this->actor, globalCtx)) {
this->actionFunc = func_80A6F1A4;
}
this->unk_2A8 |= 0x1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Hs2/EnHs2_Draw.s")
void func_80A6F1A4(EnHs2* this, GlobalContext* globalCtx) {
u16 textId;
textId = Text_GetFaceReaction(globalCtx, 9);
if (textId == 0) {
textId = 0x5069;
}
func_80A6F0B4(this, globalCtx, textId, func_80A6F164);
}
void EnHs2_Update(Actor* thisx, GlobalContext* globalCtx) {
EnHs2* this = THIS;
s32 pad;
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) != 0) {
this->skelAnime.animCurrentFrame = 0.0f;
}
this->actionFunc(this, globalCtx);
if (this->unk_2A8 & 0x1) {
func_80038290(globalCtx, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.posRot2.pos);
this->unk_2A8 &= ~1;
} else {
Math_SmoothScaleMaxMinS(&this->unk_29C.x, 12800, 6, 6200, 100);
Math_SmoothScaleMaxMinS(&this->unk_29C.y, 0, 6, 6200, 100);
Math_SmoothScaleMaxMinS(&this->unk_2A2.x, 0, 6, 6200, 100);
Math_SmoothScaleMaxMinS(&this->unk_2A2.y, 0, 6, 6200, 100);
}
}
s32 EnHs2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* pos, Vec3s* rot, Actor* thisx) {
EnHs2* this = THIS;
switch (limbIndex) {
case 12:
case 13:
*dList = NULL;
return 0;
case 9:
rot->x += this->unk_29C.y;
rot->z += this->unk_29C.x;
break;
case 10:
*dList = NULL;
return 0;
case 11:
*dList = NULL;
return 0;
}
return 0;
}
void EnHs2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Vec3f D_80A6F4CC = { 300.0f, 1000.0f, 0.0f };
EnHs2* this = THIS;
if (limbIndex == 9) {
Matrix_MultVec3f(&D_80A6F4CC, &this->actor.posRot2.pos);
}
}
void EnHs2_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnHs2* this = THIS;
func_800943C8(globalCtx->state.gfxCtx);
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
EnHs2_OverrideLimbDraw, EnHs2_PostLimbDraw, &this->actor);
}

View file

@ -6,9 +6,18 @@
struct EnHs2;
typedef void (*EnHs2ActionFunc)(struct EnHs2*, GlobalContext*);
typedef struct EnHs2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x164];
/* 0x014C */ ColliderCylinder collider;
/* 0x0198 */ SkelAnime skelAnime;
/* 0x01DC */ Vec3s limbDrawTable[16];
/* 0x023C */ Vec3s transitionDrawTable[16];
/* 0x029C */ Vec3s unk_29C;
/* 0x02A2 */ Vec3s unk_2A2;
/* 0x02A8 */ u16 unk_2A8;
/* 0x02AC */ EnHs2ActionFunc actionFunc;
} EnHs2; // size = 0x02B0
extern const ActorInit En_Hs2_InitVars;

View file

@ -501,6 +501,10 @@ D_06000170 = 0x06000170;
// z_eff_ss_kirakira
D_04037880 = 0x04037880;
// z_en_hs2
D_060005C0 = 0x60005C0;
D_06006260 = 0x6006260;
// z_en_bird
D_0600006C = 0x0600006C;
D_06002190 = 0x06002190;