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

ovl_en_yabusame_mark, 1 nonmatching (#707)

* 1 nonmatching (func_80B42F74)

* #ifdef NON_MATCHING

* deleted unused asm

* review suggestions

* sCollisionVertices
This commit is contained in:
emilybrooks 2021-02-21 17:10:24 -07:00 committed by GitHub
parent bbbf657b4b
commit 579d7008fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 351 additions and 449 deletions

View file

@ -1,11 +0,0 @@
glabel EnYabusameMark_Destroy
/* 00000 80B42DC0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00004 80B42DC4 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00008 80B42DC8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0000C 80B42DCC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00010 80B42DD0 0C017418 */ jal Collider_DestroyQuad
/* 00014 80B42DD4 24C50190 */ addiu $a1, $a2, 0x0190 ## $a1 = 00000190
/* 00018 80B42DD8 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0001C 80B42DDC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00020 80B42DE0 03E00008 */ jr $ra
/* 00024 80B42DE4 00000000 */ nop

View file

@ -1,135 +0,0 @@
.rdata
glabel D_80B43680
.asciz "\n\n"
.balign 4
glabel D_80B43684
.asciz "\x1b[32m %x\n\x1b[m"
.balign 4
glabel D_80B436B4
.asciz "\x1b[32m %d\n\x1b[m"
.balign 4
glabel D_80B436EC
.asciz "\x1b[35m %d\n\x1b[m"
.balign 4
glabel D_80B4371C
.asciz "\x1b[36m %d\n\x1b[m"
.balign 4
.text
glabel EnYabusameMark_Init
/* 00028 80B42DE8 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 0002C 80B42DEC AFB00018 */ sw $s0, 0x0018($sp)
/* 00030 80B42DF0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00034 80B42DF4 AFBF001C */ sw $ra, 0x001C($sp)
/* 00038 80B42DF8 3C0480B4 */ lui $a0, %hi(D_80B43680) ## $a0 = 80B40000
/* 0003C 80B42DFC AFA50034 */ sw $a1, 0x0034($sp)
/* 00040 80B42E00 0C00084C */ jal osSyncPrintf
/* 00044 80B42E04 24843680 */ addiu $a0, $a0, %lo(D_80B43680) ## $a0 = 80B43680
/* 00048 80B42E08 3C0480B4 */ lui $a0, %hi(D_80B43684) ## $a0 = 80B40000
/* 0004C 80B42E0C 24843684 */ addiu $a0, $a0, %lo(D_80B43684) ## $a0 = 80B43684
/* 00050 80B42E10 0C00084C */ jal osSyncPrintf
/* 00054 80B42E14 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00058 80B42E18 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
/* 0005C 80B42E1C 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
/* 00060 80B42E20 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE
/* 00064 80B42E24 24190005 */ addiu $t9, $zero, 0x0005 ## $t9 = 00000005
/* 00068 80B42E28 3C0480B4 */ lui $a0, %hi(D_80B436B4) ## $a0 = 80B40000
/* 0006C 80B42E2C 01C17824 */ and $t7, $t6, $at
/* 00070 80B42E30 A6180150 */ sh $t8, 0x0150($s0) ## 00000150
/* 00074 80B42E34 AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
/* 00078 80B42E38 A219001F */ sb $t9, 0x001F($s0) ## 0000001F
/* 0007C 80B42E3C 86050150 */ lh $a1, 0x0150($s0) ## 00000150
/* 00080 80B42E40 0C00084C */ jal osSyncPrintf
/* 00084 80B42E44 248436B4 */ addiu $a0, $a0, %lo(D_80B436B4) ## $a0 = 80B436B4
/* 00088 80B42E48 86020150 */ lh $v0, 0x0150($s0) ## 00000150
/* 0008C 80B42E4C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 00090 80B42E50 26050190 */ addiu $a1, $s0, 0x0190 ## $a1 = 00000190
/* 00094 80B42E54 50400008 */ beql $v0, $zero, .L80B42E78
/* 00098 80B42E58 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 0009C 80B42E5C 1041000F */ beq $v0, $at, .L80B42E9C
/* 000A0 80B42E60 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 000A4 80B42E64 10410018 */ beq $v0, $at, .L80B42EC8
/* 000A8 80B42E68 240B0004 */ addiu $t3, $zero, 0x0004 ## $t3 = 00000004
/* 000AC 80B42E6C 10000018 */ beq $zero, $zero, .L80B42ED0
/* 000B0 80B42E70 8FA40034 */ lw $a0, 0x0034($sp)
/* 000B4 80B42E74 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
.L80B42E78:
/* 000B8 80B42E78 C606002C */ lwc1 $f6, 0x002C($s0) ## 0000002C
/* 000BC 80B42E7C A6000152 */ sh $zero, 0x0152($s0) ## 00000152
/* 000C0 80B42E80 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001
/* 000C4 80B42E84 4606203C */ c.lt.s $f4, $f6
/* 000C8 80B42E88 00000000 */ nop
/* 000CC 80B42E8C 45020010 */ bc1fl .L80B42ED0
/* 000D0 80B42E90 8FA40034 */ lw $a0, 0x0034($sp)
/* 000D4 80B42E94 1000000D */ beq $zero, $zero, .L80B42ECC
/* 000D8 80B42E98 A6080152 */ sh $t0, 0x0152($s0) ## 00000152
.L80B42E9C:
/* 000DC 80B42E9C 3C01C4FA */ lui $at, 0xC4FA ## $at = C4FA0000
/* 000E0 80B42EA0 44815000 */ mtc1 $at, $f10 ## $f10 = -2000.00
/* 000E4 80B42EA4 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C
/* 000E8 80B42EA8 24090002 */ addiu $t1, $zero, 0x0002 ## $t1 = 00000002
/* 000EC 80B42EAC A6090152 */ sh $t1, 0x0152($s0) ## 00000152
/* 000F0 80B42EB0 460A403C */ c.lt.s $f8, $f10
/* 000F4 80B42EB4 240A0003 */ addiu $t2, $zero, 0x0003 ## $t2 = 00000003
/* 000F8 80B42EB8 45020005 */ bc1fl .L80B42ED0
/* 000FC 80B42EBC 8FA40034 */ lw $a0, 0x0034($sp)
/* 00100 80B42EC0 10000002 */ beq $zero, $zero, .L80B42ECC
/* 00104 80B42EC4 A60A0152 */ sh $t2, 0x0152($s0) ## 00000152
.L80B42EC8:
/* 00108 80B42EC8 A60B0152 */ sh $t3, 0x0152($s0) ## 00000152
.L80B42ECC:
/* 0010C 80B42ECC 8FA40034 */ lw $a0, 0x0034($sp)
.L80B42ED0:
/* 00110 80B42ED0 0C017406 */ jal Collider_InitQuad
/* 00114 80B42ED4 AFA50024 */ sw $a1, 0x0024($sp)
/* 00118 80B42ED8 3C0780B4 */ lui $a3, %hi(D_80B434F0) ## $a3 = 80B40000
/* 0011C 80B42EDC 8FA50024 */ lw $a1, 0x0024($sp)
/* 00120 80B42EE0 24E734F0 */ addiu $a3, $a3, %lo(D_80B434F0) ## $a3 = 80B434F0
/* 00124 80B42EE4 8FA40034 */ lw $a0, 0x0034($sp)
/* 00128 80B42EE8 0C017441 */ jal Collider_SetQuad
/* 0012C 80B42EEC 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00130 80B42EF0 8E0D0024 */ lw $t5, 0x0024($s0) ## 00000024
/* 00134 80B42EF4 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
/* 00138 80B42EF8 8E0C0028 */ lw $t4, 0x0028($s0) ## 00000028
/* 0013C 80B42EFC AE0D0154 */ sw $t5, 0x0154($s0) ## 00000154
/* 00140 80B42F00 8E0D002C */ lw $t5, 0x002C($s0) ## 0000002C
/* 00144 80B42F04 35CF0010 */ ori $t7, $t6, 0x0010 ## $t7 = 00000010
/* 00148 80B42F08 AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
/* 0014C 80B42F0C 3C188016 */ lui $t8, %hi(gSaveContext+0x1360)
/* 00150 80B42F10 AE0C0158 */ sw $t4, 0x0158($s0) ## 00000158
/* 00154 80B42F14 AE0D015C */ sw $t5, 0x015C($s0) ## 0000015C
/* 00158 80B42F18 8F18F9C0 */ lw $t8, %lo(gSaveContext+0x1360)($t8)
/* 0015C 80B42F1C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00160 80B42F20 3C0480B4 */ lui $a0, %hi(D_80B436EC) ## $a0 = 80B40000
/* 00164 80B42F24 13010005 */ beq $t8, $at, .L80B42F3C
/* 00168 80B42F28 248436EC */ addiu $a0, $a0, %lo(D_80B436EC) ## $a0 = 80B436EC
/* 0016C 80B42F2C 0C00B55C */ jal Actor_Kill
/* 00170 80B42F30 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00174 80B42F34 1000000B */ beq $zero, $zero, .L80B42F64
/* 00178 80B42F38 8FBF001C */ lw $ra, 0x001C($sp)
.L80B42F3C:
/* 0017C 80B42F3C 0C00084C */ jal osSyncPrintf
/* 00180 80B42F40 86050150 */ lh $a1, 0x0150($s0) ## 00000150
/* 00184 80B42F44 3C0480B4 */ lui $a0, %hi(D_80B4371C) ## $a0 = 80B40000
/* 00188 80B42F48 2484371C */ addiu $a0, $a0, %lo(D_80B4371C) ## $a0 = 80B4371C
/* 0018C 80B42F4C 0C00084C */ jal osSyncPrintf
/* 00190 80B42F50 86050152 */ lh $a1, 0x0152($s0) ## 00000152
/* 00194 80B42F54 3C1980B4 */ lui $t9, %hi(func_80B42F74) ## $t9 = 80B40000
/* 00198 80B42F58 27392F74 */ addiu $t9, $t9, %lo(func_80B42F74) ## $t9 = 80B42F74
/* 0019C 80B42F5C AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
/* 001A0 80B42F60 8FBF001C */ lw $ra, 0x001C($sp)
.L80B42F64:
/* 001A4 80B42F64 8FB00018 */ lw $s0, 0x0018($sp)
/* 001A8 80B42F68 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 001AC 80B42F6C 03E00008 */ jr $ra
/* 001B0 80B42F70 00000000 */ nop

View file

@ -1,111 +0,0 @@
glabel EnYabusameMark_Update
/* 00584 80B43344 27BDFF90 */ addiu $sp, $sp, 0xFF90 ## $sp = FFFFFF90
/* 00588 80B43348 AFB00048 */ sw $s0, 0x0048($sp)
/* 0058C 80B4334C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00590 80B43350 AFBF004C */ sw $ra, 0x004C($sp)
/* 00594 80B43354 AFA50074 */ sw $a1, 0x0074($sp)
/* 00598 80B43358 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C
/* 0059C 80B4335C 0320F809 */ jalr $ra, $t9
/* 005A0 80B43360 00000000 */ nop
/* 005A4 80B43364 86030150 */ lh $v1, 0x0150($s0) ## 00000150
/* 005A8 80B43368 3C0F80B4 */ lui $t7, %hi(D_80B43560) ## $t7 = 80B40000
/* 005AC 80B4336C 25EF3560 */ addiu $t7, $t7, %lo(D_80B43560) ## $t7 = 80B43560
/* 005B0 80B43370 00031880 */ sll $v1, $v1, 2
/* 005B4 80B43374 00037080 */ sll $t6, $v1, 2
/* 005B8 80B43378 01C37023 */ subu $t6, $t6, $v1
/* 005BC 80B4337C 000E7080 */ sll $t6, $t6, 2
/* 005C0 80B43380 01CF1021 */ addu $v0, $t6, $t7
/* 005C4 80B43384 C4440000 */ lwc1 $f4, 0x0000($v0) ## 00000000
/* 005C8 80B43388 C6000024 */ lwc1 $f0, 0x0024($s0) ## 00000024
/* 005CC 80B4338C C6020028 */ lwc1 $f2, 0x0028($s0) ## 00000028
/* 005D0 80B43390 C60C002C */ lwc1 $f12, 0x002C($s0) ## 0000002C
/* 005D4 80B43394 46002180 */ add.s $f6, $f4, $f0
/* 005D8 80B43398 26040190 */ addiu $a0, $s0, 0x0190 ## $a0 = 00000190
/* 005DC 80B4339C 26180184 */ addiu $t8, $s0, 0x0184 ## $t8 = 00000184
/* 005E0 80B433A0 26050160 */ addiu $a1, $s0, 0x0160 ## $a1 = 00000160
/* 005E4 80B433A4 E6060160 */ swc1 $f6, 0x0160($s0) ## 00000160
/* 005E8 80B433A8 C4480004 */ lwc1 $f8, 0x0004($v0) ## 00000004
/* 005EC 80B433AC 2606016C */ addiu $a2, $s0, 0x016C ## $a2 = 0000016C
/* 005F0 80B433B0 26070178 */ addiu $a3, $s0, 0x0178 ## $a3 = 00000178
/* 005F4 80B433B4 46024280 */ add.s $f10, $f8, $f2
/* 005F8 80B433B8 E60A0164 */ swc1 $f10, 0x0164($s0) ## 00000164
/* 005FC 80B433BC C4500008 */ lwc1 $f16, 0x0008($v0) ## 00000008
/* 00600 80B433C0 460C8480 */ add.s $f18, $f16, $f12
/* 00604 80B433C4 E6120168 */ swc1 $f18, 0x0168($s0) ## 00000168
/* 00608 80B433C8 C444000C */ lwc1 $f4, 0x000C($v0) ## 0000000C
/* 0060C 80B433CC 46002180 */ add.s $f6, $f4, $f0
/* 00610 80B433D0 E606016C */ swc1 $f6, 0x016C($s0) ## 0000016C
/* 00614 80B433D4 C4480010 */ lwc1 $f8, 0x0010($v0) ## 00000010
/* 00618 80B433D8 46024280 */ add.s $f10, $f8, $f2
/* 0061C 80B433DC E60A0170 */ swc1 $f10, 0x0170($s0) ## 00000170
/* 00620 80B433E0 C4500014 */ lwc1 $f16, 0x0014($v0) ## 00000014
/* 00624 80B433E4 460C8480 */ add.s $f18, $f16, $f12
/* 00628 80B433E8 E6120174 */ swc1 $f18, 0x0174($s0) ## 00000174
/* 0062C 80B433EC C4440018 */ lwc1 $f4, 0x0018($v0) ## 00000018
/* 00630 80B433F0 46002180 */ add.s $f6, $f4, $f0
/* 00634 80B433F4 E6060178 */ swc1 $f6, 0x0178($s0) ## 00000178
/* 00638 80B433F8 C448001C */ lwc1 $f8, 0x001C($v0) ## 0000001C
/* 0063C 80B433FC 46024280 */ add.s $f10, $f8, $f2
/* 00640 80B43400 E60A017C */ swc1 $f10, 0x017C($s0) ## 0000017C
/* 00644 80B43404 C4500020 */ lwc1 $f16, 0x0020($v0) ## 00000020
/* 00648 80B43408 460C8480 */ add.s $f18, $f16, $f12
/* 0064C 80B4340C E6120180 */ swc1 $f18, 0x0180($s0) ## 00000180
/* 00650 80B43410 C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024
/* 00654 80B43414 46002180 */ add.s $f6, $f4, $f0
/* 00658 80B43418 E6060184 */ swc1 $f6, 0x0184($s0) ## 00000184
/* 0065C 80B4341C C4480028 */ lwc1 $f8, 0x0028($v0) ## 00000028
/* 00660 80B43420 46024280 */ add.s $f10, $f8, $f2
/* 00664 80B43424 E60A0188 */ swc1 $f10, 0x0188($s0) ## 00000188
/* 00668 80B43428 C450002C */ lwc1 $f16, 0x002C($v0) ## 0000002C
/* 0066C 80B4342C 460C8480 */ add.s $f18, $f16, $f12
/* 00670 80B43430 E612018C */ swc1 $f18, 0x018C($s0) ## 0000018C
/* 00674 80B43434 AFA40050 */ sw $a0, 0x0050($sp)
/* 00678 80B43438 0C0189CD */ jal Collider_SetQuadVertices
/* 0067C 80B4343C AFB80010 */ sw $t8, 0x0010($sp)
/* 00680 80B43440 8FA40074 */ lw $a0, 0x0074($sp)
/* 00684 80B43444 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 00688 80B43448 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 0068C 80B4344C 8FA60050 */ lw $a2, 0x0050($sp)
/* 00690 80B43450 0C01767D */ jal CollisionCheck_SetAC
## CollisionCheck_setAC
/* 00694 80B43454 00812821 */ addu $a1, $a0, $at
/* 00698 80B43458 3C088016 */ lui $t0, %hi(gGameInfo)
/* 0069C 80B4345C 8D08FA90 */ lw $t0, %lo(gGameInfo)($t0)
/* 006A0 80B43460 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 006A4 80B43464 240C00FF */ addiu $t4, $zero, 0x00FF ## $t4 = 000000FF
/* 006A8 80B43468 850912D4 */ lh $t1, 0x12D4($t0) ## 801612D4
/* 006AC 80B4346C 240D00FF */ addiu $t5, $zero, 0x00FF ## $t5 = 000000FF
/* 006B0 80B43470 24190004 */ addiu $t9, $zero, 0x0004 ## $t9 = 00000004
/* 006B4 80B43474 51200017 */ beql $t1, $zero, .L80B434D4
/* 006B8 80B43478 8FBF004C */ lw $ra, 0x004C($sp)
/* 006BC 80B4347C 860A0032 */ lh $t2, 0x0032($s0) ## 00000032
/* 006C0 80B43480 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 006C4 80B43484 C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 006C8 80B43488 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 006CC 80B4348C 86070030 */ lh $a3, 0x0030($s0) ## 00000030
/* 006D0 80B43490 AFAA0010 */ sw $t2, 0x0010($sp)
/* 006D4 80B43494 860B0034 */ lh $t3, 0x0034($s0) ## 00000034
/* 006D8 80B43498 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00
/* 006DC 80B4349C 8FAE0074 */ lw $t6, 0x0074($sp)
/* 006E0 80B434A0 AFB90034 */ sw $t9, 0x0034($sp)
/* 006E4 80B434A4 AFAD0030 */ sw $t5, 0x0030($sp)
/* 006E8 80B434A8 AFA0002C */ sw $zero, 0x002C($sp)
/* 006EC 80B434AC AFAC0028 */ sw $t4, 0x0028($sp)
/* 006F0 80B434B0 AFA00024 */ sw $zero, 0x0024($sp)
/* 006F4 80B434B4 AFAB0014 */ sw $t3, 0x0014($sp)
/* 006F8 80B434B8 E7A00018 */ swc1 $f0, 0x0018($sp)
/* 006FC 80B434BC E7A0001C */ swc1 $f0, 0x001C($sp)
/* 00700 80B434C0 E7A00020 */ swc1 $f0, 0x0020($sp)
/* 00704 80B434C4 8DCF0000 */ lw $t7, 0x0000($t6) ## 00000000
/* 00708 80B434C8 0C018FA7 */ jal DebugDisplay_AddObject
/* 0070C 80B434CC AFAF0038 */ sw $t7, 0x0038($sp)
/* 00710 80B434D0 8FBF004C */ lw $ra, 0x004C($sp)
.L80B434D4:
/* 00714 80B434D4 8FB00048 */ lw $s0, 0x0048($sp)
/* 00718 80B434D8 27BD0070 */ addiu $sp, $sp, 0x0070 ## $sp = 00000000
/* 0071C 80B434DC 03E00008 */ jr $ra
/* 00720 80B434E0 00000000 */ nop
/* 00724 80B434E4 00000000 */ nop
/* 00728 80B434E8 00000000 */ nop
/* 0072C 80B434EC 00000000 */ nop

View file

@ -215,7 +215,7 @@ glabel func_80B42F74
/* 0042C 80B431EC 00000000 */ nop
/* 00430 80B431F0 8FA90068 */ lw $t1, 0x0068($sp)
/* 00434 80B431F4 3C0180B4 */ lui $at, %hi(D_80B435F4) ## $at = 80B40000
/* 00434 80B431F4 3C0180B4 */ lui $at, %hi(D_80B435F0+4) ## $at = 80B40000
/* 00438 80B431F8 3C0480B4 */ lui $a0, %hi(D_80B437F0) ## $a0 = 80B40000
/* 0043C 80B431FC 852A0152 */ lh $t2, 0x0152($t1) ## 00000152
/* 00440 80B43200 248437F0 */ addiu $a0, $a0, %lo(D_80B437F0) ## $a0 = 80B437F0
@ -223,7 +223,7 @@ glabel func_80B42F74
/* 00448 80B43208 016A5823 */ subu $t3, $t3, $t2
/* 0044C 80B4320C 000B5880 */ sll $t3, $t3, 2
/* 00450 80B43210 002B0821 */ addu $at, $at, $t3
/* 00454 80B43214 C42635F4 */ lwc1 $f6, %lo(D_80B435F4)($at)
/* 00454 80B43214 C42635F4 */ lwc1 $f6, %lo(D_80B435F0+4)($at)
/* 00458 80B43218 46003221 */ cvt.d.s $f8, $f6
/* 0045C 80B4321C 44074000 */ mfc1 $a3, $f8
/* 00460 80B43220 44064800 */ mfc1 $a2, $f9
@ -231,7 +231,7 @@ glabel func_80B42F74
/* 00468 80B43228 00000000 */ nop
/* 0046C 80B4322C 8FAD0068 */ lw $t5, 0x0068($sp)
/* 00470 80B43230 3C0180B4 */ lui $at, %hi(D_80B435F8) ## $at = 80B40000
/* 00470 80B43230 3C0180B4 */ lui $at, %hi(D_80B435F0+8) ## $at = 80B40000
/* 00474 80B43234 3C0480B4 */ lui $a0, %hi(D_80B43818) ## $a0 = 80B40000
/* 00478 80B43238 85AE0152 */ lh $t6, 0x0152($t5) ## 00000152
/* 0047C 80B4323C 24843818 */ addiu $a0, $a0, %lo(D_80B43818) ## $a0 = 80B43818
@ -239,7 +239,7 @@ glabel func_80B42F74
/* 00484 80B43244 018E6023 */ subu $t4, $t4, $t6
/* 00488 80B43248 000C6080 */ sll $t4, $t4, 2
/* 0048C 80B4324C 002C0821 */ addu $at, $at, $t4
/* 00490 80B43250 C42A35F8 */ lwc1 $f10, %lo(D_80B435F8)($at)
/* 00490 80B43250 C42A35F8 */ lwc1 $f10, %lo(D_80B435F0+8)($at)
/* 00494 80B43254 46005121 */ cvt.d.s $f4, $f10
/* 00498 80B43258 44072000 */ mfc1 $a3, $f4
/* 0049C 80B4325C 44062800 */ mfc1 $a2, $f5

View file

@ -1,34 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel D_80B434F0
.word 0x0A000900, 0x20030000, 0x00000000, 0x00000000, 0x00000000, 0x0001F824, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
glabel En_Yabusame_Mark_InitVars
.word 0x012F0600, 0x00000000, 0x00010000, 0x00000210
.word EnYabusameMark_Init
.word EnYabusameMark_Destroy
.word EnYabusameMark_Update
.word 0x00000000
glabel D_80B43560
.word 0x428C0000, 0x428C0000, 0x00000000, 0x428C0000, 0xC28C0000, 0x00000000, 0xC28C0000, 0x428C0000, 0x00000000, 0xC28C0000, 0xC28C0000, 0x00000000, 0x42B40000, 0x43020000, 0xC2F00000, 0xC1C80000, 0xC2A00000, 0xC3020000, 0x42B40000, 0x43020000, 0x42F00000, 0xC1C80000, 0xC2A00000, 0x43020000, 0x42E60000, 0x43200000, 0xC3160000, 0xC2480000, 0xC30C0000, 0xC3200000, 0x42E60000, 0x43200000, 0x43160000, 0xC2480000, 0xC30C0000, 0x43200000
glabel D_80B435F0
.word 0x45536000
glabel D_80B435F4
.word 0x44D8C000
glabel D_80B435F8
.word 0xC59A9000, 0x45520000, 0x44D8C000, 0x43F78000, 0x458D2800, 0x44D24000, 0xC4DE6000, 0x458D2800, 0x44D24000, 0xC52FD000, 0x458D5000, 0x44D7E000, 0xC50F8000
glabel D_80B4362C
.word 0x41A00000, 0x42200000, 0x42700000, 0x44424000, 0x42200000, 0x42A00000, 0x42F00000, 0x44424000, 0x42200000, 0x42F00000, 0x43200000, 0x44424000
glabel D_80B4365C
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B43668
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000

5
spec
View file

@ -3143,8 +3143,11 @@ endseg
beginseg
name "ovl_En_Yabusame_Mark"
include "build/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.o"
include "build/data/overlays/actors/z_en_yabusame_mark.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Yabusame_Mark/ovl_En_Yabusame_Mark_reloc.o"
#else
include "build/data/overlays/actors/z_en_yabusame_mark.reloc.o"
#endif
endseg
beginseg

View file

@ -5,6 +5,7 @@
*/
#include "z_en_yabusame_mark.h"
#include "vt.h"
#define FLAGS 0x00000000
@ -13,21 +14,9 @@
void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx);
void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnYabusameMark_Update(Actor* thisx, GlobalContext* globalCtx);
void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx);
/*
const ActorInit En_Yabusame_Mark_InitVars = {
ACTOR_EN_YABUSAME_MARK,
ACTORCAT_PROP,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnYabusameMark),
(ActorFunc)EnYabusameMark_Init,
(ActorFunc)EnYabusameMark_Destroy,
(ActorFunc)EnYabusameMark_Update,
NULL,
};
static ColliderQuadInit D_80B434F0 = {
static ColliderQuadInit sQuadInit = {
{
COLTYPE_NONE,
AT_NONE,
@ -40,17 +29,208 @@ static ColliderQuadInit D_80B434F0 = {
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x0001F824, 0x00, 0x00 },
TOUCH_NONE,
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/EnYabusameMark_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/EnYabusameMark_Init.s")
const ActorInit En_Yabusame_Mark_InitVars = {
ACTOR_EN_YABUSAME_MARK,
ACTORCAT_PROP,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnYabusameMark),
(ActorFunc)EnYabusameMark_Init,
(ActorFunc)EnYabusameMark_Destroy,
(ActorFunc)EnYabusameMark_Update,
NULL,
};
static Vec3f sCollisionVertices[] = {
{ 70.0f, 70.0f, 0.0f }, { 70.0f, -70.0f, 0.0f }, { -70.0f, 70.0f, 0.0f }, { -70.0f, -70.0f, 0.0f },
{ 90.0f, 130.0f, -120.0f }, { -25.0f, -80.0f, -130.0f }, { 90.0f, 130.0f, 120.0f }, { -25.0f, -80.0, 130.0f },
{ 115.0f, 160.0f, -150.0f }, { -50.0f, -140.0f, -160.0f }, { 115.0f, 160.0f, 150.0f }, { -50.0f, -140.0f, 160.0f },
};
Vec3f D_80B435F0[] = {
{ 3382.0f, 1734.0f, -4946.0f }, // small, furthest from entrance
{ 3360.0f, 1734.0f, 495.0f }, // small, closest to entrance
{ 4517.0f, 1682.0f, -1779.0f }, // medium, on the right
{ 4517.0f, 1682.0f, -2813.0f }, // medium, on the left
{ 4522.0f, 1727.0f, -2296.0f }, // large in the center
};
typedef struct {
/* 0x00 */ f32 unk_0; // first ring
/* 0x04 */ f32 unk_4; // second ring
/* 0x08 */ f32 unk_8; // outside edge
/* 0x0C */ f32 unk_C;
} unknownStruct; // size = 0x10
unknownStruct D_80B4362C[] = {
{ 20.0f, 40.0f, 60.0f, 777.0f },
{ 40.0f, 80.0f, 120.0f, 777.0f },
{ 40.0f, 120.0f, 160.0f, 777.0f },
};
Vec3f D_80B4365C = { 0.0f, 0.0f, 0.0f };
Vec3f D_80B43668 = { 0.0f, 0.0f, 0.0f };
void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnYabusameMark* this = THIS;
Collider_DestroyQuad(globalCtx, &this->collider);
}
void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) {
EnYabusameMark* this = THIS;
osSyncPrintf("\n\n");
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめまと ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
this->actor.flags &= ~1;
this->typeIndex = this->actor.params;
this->actor.targetMode = 5;
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 種類インデックス \t ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex);
switch (this->typeIndex) {
case 0:
this->subTypeIndex = 0;
if (this->actor.world.pos.z > 0.0f) {
this->subTypeIndex = 1;
}
break;
case 1:
this->subTypeIndex = 2;
if (this->actor.world.pos.z < -2000.0f) {
this->subTypeIndex = 3;
}
break;
case 2:
this->subTypeIndex = 4;
break;
}
Collider_InitQuad(globalCtx, &this->collider);
Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit);
this->worldPos = this->actor.world.pos;
this->actor.flags |= 0x10;
if (gSaveContext.sceneSetupIndex != 4) {
Actor_Kill(&this->actor);
return;
}
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 種類 ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex);
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ さらに分類 ☆☆☆☆☆ %d\n" VT_RST, this->subTypeIndex);
this->actionFunc = func_80B42F74;
}
#ifdef NON_MATCHING
// regalloc
void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
Vec3f effectAccel;
Vec3f effectVelocity;
Vec3f arrowHitPos;
Vec3f distanceFromCenter;
f32 scoreDistance100;
f32 scoreDistance60;
f32 scoreDistance30;
s32 scoreIndex;
effectAccel = D_80B4365C;
effectVelocity = D_80B43668;
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
arrowHitPos.x = this->collider.info.bumper.hitPos.x;
arrowHitPos.y = this->collider.info.bumper.hitPos.y;
arrowHitPos.z = this->collider.info.bumper.hitPos.z;
effectVelocity.y = 15.0f;
EffectSsHitMark_SpawnCustomScale(globalCtx, 0, 700, &arrowHitPos);
scoreIndex = 2;
distanceFromCenter.x = fabsf(D_80B435F0[this->subTypeIndex].x - arrowHitPos.x);
distanceFromCenter.y = fabsf(D_80B435F0[this->subTypeIndex].y - arrowHitPos.y);
distanceFromCenter.z = fabsf(D_80B435F0[this->subTypeIndex].z - arrowHitPos.z);
scoreDistance100 = D_80B4362C[this->typeIndex].unk_0;
scoreDistance60 = D_80B4362C[this->typeIndex].unk_4;
scoreDistance30 = D_80B4362C[this->typeIndex].unk_8;
if (distanceFromCenter.x > scoreDistance100 || distanceFromCenter.y > scoreDistance100 ||
distanceFromCenter.z > scoreDistance100) {
scoreIndex = 1;
if (distanceFromCenter.x > scoreDistance60 || distanceFromCenter.y > scoreDistance60 ||
distanceFromCenter.z > scoreDistance60) {
scoreIndex = 0;
}
if (distanceFromCenter.x > scoreDistance30 || distanceFromCenter.y > scoreDistance30 ||
distanceFromCenter.z > scoreDistance30) {
return;
}
}
osSyncPrintf("\n\n");
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ pos ☆☆☆☆☆ %f\n" VT_RST, arrowHitPos.x);
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ pos ☆☆☆☆☆ %f\n" VT_RST, arrowHitPos.y);
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ pos ☆☆☆☆☆ %f\n" VT_RST, arrowHitPos.z);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hit ☆☆☆☆☆ %f\n" VT_RST, D_80B435F0[this->subTypeIndex].x);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hit ☆☆☆☆☆ %f\n" VT_RST, D_80B435F0[this->subTypeIndex].y);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hit ☆☆☆☆☆ %f\n" VT_RST, D_80B435F0[this->subTypeIndex].z);
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 小 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance100);
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 大 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance60);
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ point ☆☆☆☆☆ %d\n" VT_RST, scoreIndex);
osSyncPrintf("\n\n");
if (scoreIndex == 2) {
func_800F5C64(0x922);
}
if (scoreIndex == 1) {
func_800F8D04(NA_SE_SY_TRE_BOX_APPEAR);
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
}
if (scoreIndex == 0) {
func_80078884(NA_SE_SY_DECIDE);
}
EffectSsExtra_Spawn(globalCtx, &arrowHitPos, &effectVelocity, &effectAccel, 5, scoreIndex);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/EnYabusameMark_Update.s")
void EnYabusameMark_Update(Actor* thisx, GlobalContext* globalCtx) {
EnYabusameMark* this = THIS;
Vec3f* vertexArray;
u32 arrayIndex;
this->actionFunc(this, globalCtx);
arrayIndex = this->typeIndex * 4;
vertexArray = &sCollisionVertices[arrayIndex];
this->vertexA.x = vertexArray[0].x + this->actor.world.pos.x;
this->vertexA.y = vertexArray[0].y + this->actor.world.pos.y;
this->vertexA.z = vertexArray[0].z + this->actor.world.pos.z;
this->vertexB.x = vertexArray[1].x + this->actor.world.pos.x;
this->vertexB.y = vertexArray[1].y + this->actor.world.pos.y;
this->vertexB.z = vertexArray[1].z + this->actor.world.pos.z;
this->vertexC.x = vertexArray[2].x + this->actor.world.pos.x;
this->vertexC.y = vertexArray[2].y + this->actor.world.pos.y;
this->vertexC.z = vertexArray[2].z + this->actor.world.pos.z;
this->vertexD.x = vertexArray[3].x + this->actor.world.pos.x;
this->vertexD.y = vertexArray[3].y + this->actor.world.pos.y;
this->vertexD.z = vertexArray[3].z + this->actor.world.pos.z;
Collider_SetQuadVertices(&this->collider, &this->vertexA, &this->vertexB, &this->vertexC, &this->vertexD);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
if (BREG(0)) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 0, 0xFF, 0, 0xFF, 4, globalCtx->state.gfxCtx);
}
}

View file

@ -6,9 +6,19 @@
struct EnYabusameMark;
typedef void (*EnYabusameMarkActionFunc)(struct EnYabusameMark*, GlobalContext*);
typedef struct EnYabusameMark {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0xC4];
/* 0x014C */ EnYabusameMarkActionFunc actionFunc;
/* 0x0150 */ s16 typeIndex;
/* 0x0152 */ s16 subTypeIndex;
/* 0x0154 */ Vec3f worldPos;
/* 0x0160 */ Vec3f vertexA;
/* 0x016C */ Vec3f vertexB;
/* 0x0178 */ Vec3f vertexC;
/* 0x0184 */ Vec3f vertexD;
/* 0x0190 */ ColliderQuad collider;
} EnYabusameMark; // size = 0x0210
extern const ActorInit En_Yabusame_Mark_InitVars;