mirror of
https://github.com/zeldaret/oot.git
synced 2025-04-06 14:46:21 +00:00
Decompiled ovl_Shot_Sun (#236)
* match ShotSun_Init * match ShotSun_Destroy * match func_80BADDCC * break up unk_19C to add spawnTimer * ShotSun_Update * func_80BADE74 * work on func_80BAE05C * make func_80BAE05C closer * use proper macros for osSyncPrintf * format if statement better and add temp player pointer func_80BAE05C * Reorder spawnPos to match stack args later * match func_80BAE05C * almost match func_80BADF0C * Remove temporary and add parenthesis * change part of comment and move last unk_1A4 assignment to be similar to decompiler * Change do while(false) to if (1) * func_80BADF0C * change comment * update spec * fix vt macro * cleanup and name * remove asm * remove data * remove extern Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> * remove & for function pointers * rename and retype D_02007020 * format * remove tiny whitespace * reorder if statement * finish renaming * replace cast with bitwise operation * move globally used functions to functions.h * reorder description * move headers for EnItem00 and EnAObj to z64actor.h * retype Item_DropCollectible and Item_DropCollectible2 to return EnItem00* * rename ShotSun_StartFairyCountdown to ShotSun_TriggerFairy * rename ShotSun_FairyCountdown to ShotSun_SpawnFairy * add unk_E3EC field to MessageContext * rename to ShotSun_UpdateHyliaSun for now * remove != 0 on flag check * remove unsigned suffix and use enum constant for Item_DropCollectible call * add unk_95C field to Player * add ub comment * retype unk_1A4 and remove explicit struct padding * Update src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
a00015a1ac
commit
8c72e1dea6
17 changed files with 254 additions and 590 deletions
|
@ -1,19 +0,0 @@
|
|||
glabel ShotSun_Destroy
|
||||
/* 000CC 80BADD8C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 000D0 80BADD90 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 000D4 80BADD94 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 000D8 80BADD98 24010040 */ addiu $at, $zero, 0x0040 ## $at = 00000040
|
||||
/* 000DC 80BADD9C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
|
||||
/* 000E0 80BADDA0 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
|
||||
/* 000E4 80BADDA4 10410005 */ beq $v0, $at, .L80BADDBC
|
||||
/* 000E8 80BADDA8 24010041 */ addiu $at, $zero, 0x0041 ## $at = 00000041
|
||||
/* 000EC 80BADDAC 10410003 */ beq $v0, $at, .L80BADDBC
|
||||
/* 000F0 80BADDB0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 000F4 80BADDB4 0C0170EB */ jal Collider_DestroyCylinder
|
||||
|
||||
/* 000F8 80BADDB8 24C5014C */ addiu $a1, $a2, 0x014C ## $a1 = 0000014C
|
||||
.L80BADDBC:
|
||||
/* 000FC 80BADDBC 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 00100 80BADDC0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 00104 80BADDC4 03E00008 */ jr $ra
|
||||
/* 00108 80BADDC8 00000000 */ nop
|
|
@ -1,64 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80BAE320
|
||||
.asciz "%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel ShotSun_Init
|
||||
/* 00000 80BADCC0 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
|
||||
/* 00004 80BADCC4 AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 00008 80BADCC8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 0000C 80BADCCC AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00010 80BADCD0 AFA50034 */ sw $a1, 0x0034($sp)
|
||||
/* 00014 80BADCD4 3C0480BB */ lui $a0, %hi(D_80BAE320) ## $a0 = 80BB0000
|
||||
/* 00018 80BADCD8 2484E320 */ addiu $a0, $a0, %lo(D_80BAE320) ## $a0 = 80BAE320
|
||||
/* 0001C 80BADCDC 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 00020 80BADCE0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
|
||||
/* 00024 80BADCE4 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
|
||||
/* 00028 80BADCE8 24010040 */ addiu $at, $zero, 0x0040 ## $at = 00000040
|
||||
/* 0002C 80BADCEC 3C0880BB */ lui $t0, %hi(func_80BADF0C) ## $t0 = 80BB0000
|
||||
/* 00030 80BADCF0 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
|
||||
/* 00034 80BADCF4 10410004 */ beq $v0, $at, .L80BADD08
|
||||
/* 00038 80BADCF8 2508DF0C */ addiu $t0, $t0, %lo(func_80BADF0C) ## $t0 = 80BADF0C
|
||||
/* 0003C 80BADCFC 24010041 */ addiu $at, $zero, 0x0041 ## $at = 00000041
|
||||
/* 00040 80BADD00 1441000D */ bne $v0, $at, .L80BADD38
|
||||
/* 00044 80BADD04 8FA40034 */ lw $a0, 0x0034($sp)
|
||||
.L80BADD08:
|
||||
/* 00048 80BADD08 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
|
||||
/* 0004C 80BADD0C 3C010200 */ lui $at, 0x0200 ## $at = 02000000
|
||||
/* 00050 80BADD10 A20001A4 */ sb $zero, 0x01A4($s0) ## 000001A4
|
||||
/* 00054 80BADD14 35CF0010 */ ori $t7, $t6, 0x0010 ## $t7 = 00000010
|
||||
/* 00058 80BADD18 01E1C825 */ or $t9, $t7, $at ## $t9 = 02000010
|
||||
/* 0005C 80BADD1C AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
|
||||
/* 00060 80BADD20 3C010800 */ lui $at, 0x0800 ## $at = 08000000
|
||||
/* 00064 80BADD24 AE190004 */ sw $t9, 0x0004($s0) ## 00000004
|
||||
/* 00068 80BADD28 03215025 */ or $t2, $t9, $at ## $t2 = 0A000010
|
||||
/* 0006C 80BADD2C AE080198 */ sw $t0, 0x0198($s0) ## 00000198
|
||||
/* 00070 80BADD30 10000011 */ beq $zero, $zero, .L80BADD78
|
||||
/* 00074 80BADD34 AE0A0004 */ sw $t2, 0x0004($s0) ## 00000004
|
||||
.L80BADD38:
|
||||
/* 00078 80BADD38 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C
|
||||
/* 0007C 80BADD3C 0C0170D9 */ jal Collider_InitCylinder
|
||||
|
||||
/* 00080 80BADD40 AFA50024 */ sw $a1, 0x0024($sp)
|
||||
/* 00084 80BADD44 3C0780BB */ lui $a3, %hi(D_80BAE2F0) ## $a3 = 80BB0000
|
||||
/* 00088 80BADD48 8FA50024 */ lw $a1, 0x0024($sp)
|
||||
/* 0008C 80BADD4C 24E7E2F0 */ addiu $a3, $a3, %lo(D_80BAE2F0) ## $a3 = 80BAE2F0
|
||||
/* 00090 80BADD50 8FA40034 */ lw $a0, 0x0034($sp)
|
||||
/* 00094 80BADD54 0C01712B */ jal Collider_SetCylinder
|
||||
|
||||
/* 00098 80BADD58 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
|
||||
/* 0009C 80BADD5C 8E0C0004 */ lw $t4, 0x0004($s0) ## 00000004
|
||||
/* 000A0 80BADD60 3C0B80BB */ lui $t3, %hi(func_80BAE05C) ## $t3 = 80BB0000
|
||||
/* 000A4 80BADD64 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE
|
||||
/* 000A8 80BADD68 256BE05C */ addiu $t3, $t3, %lo(func_80BAE05C) ## $t3 = 80BAE05C
|
||||
/* 000AC 80BADD6C 01816824 */ and $t5, $t4, $at
|
||||
/* 000B0 80BADD70 AE0B0198 */ sw $t3, 0x0198($s0) ## 00000198
|
||||
/* 000B4 80BADD74 AE0D0004 */ sw $t5, 0x0004($s0) ## 00000004
|
||||
.L80BADD78:
|
||||
/* 000B8 80BADD78 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 000BC 80BADD7C 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 000C0 80BADD80 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
|
||||
/* 000C4 80BADD84 03E00008 */ jr $ra
|
||||
/* 000C8 80BADD88 00000000 */ nop
|
|
@ -1,13 +0,0 @@
|
|||
glabel ShotSun_Update
|
||||
/* 005E0 80BAE2A0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 005E4 80BAE2A4 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 005E8 80BAE2A8 8C990198 */ lw $t9, 0x0198($a0) ## 00000198
|
||||
/* 005EC 80BAE2AC 0320F809 */ jalr $ra, $t9
|
||||
/* 005F0 80BAE2B0 00000000 */ nop
|
||||
/* 005F4 80BAE2B4 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 005F8 80BAE2B8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 005FC 80BAE2BC 03E00008 */ jr $ra
|
||||
/* 00600 80BAE2C0 00000000 */ nop
|
||||
/* 00604 80BAE2C4 00000000 */ nop
|
||||
/* 00608 80BAE2C8 00000000 */ nop
|
||||
/* 0060C 80BAE2CC 00000000 */ nop
|
|
@ -1,51 +0,0 @@
|
|||
glabel func_80BADDCC
|
||||
/* 0010C 80BADDCC 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 00110 80BADDD0 AFBF0034 */ sw $ra, 0x0034($sp)
|
||||
/* 00114 80BADDD4 AFB00030 */ sw $s0, 0x0030($sp)
|
||||
/* 00118 80BADDD8 848301A2 */ lh $v1, 0x01A2($a0) ## 000001A2
|
||||
/* 0011C 80BADDDC 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 00120 80BADDE0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 00124 80BADDE4 18600004 */ blez $v1, .L80BADDF8
|
||||
/* 00128 80BADDE8 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
|
||||
/* 0012C 80BADDEC 246EFFFF */ addiu $t6, $v1, 0xFFFF ## $t6 = FFFFFFFF
|
||||
/* 00130 80BADDF0 1000001B */ beq $zero, $zero, .L80BADE60
|
||||
/* 00134 80BADDF4 A48E01A2 */ sh $t6, 0x01A2($a0) ## 000001A2
|
||||
.L80BADDF8:
|
||||
/* 00138 80BADDF8 24010040 */ addiu $at, $zero, 0x0040 ## $at = 00000040
|
||||
/* 0013C 80BADDFC 10410006 */ beq $v0, $at, .L80BADE18
|
||||
/* 00140 80BADE00 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24
|
||||
/* 00144 80BADE04 24010041 */ addiu $at, $zero, 0x0041 ## $at = 00000041
|
||||
/* 00148 80BADE08 10410006 */ beq $v0, $at, .L80BADE24
|
||||
/* 0014C 80BADE0C 24180007 */ addiu $t8, $zero, 0x0007 ## $t8 = 00000007
|
||||
/* 00150 80BADE10 10000006 */ beq $zero, $zero, .L80BADE2C
|
||||
/* 00154 80BADE14 C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C
|
||||
.L80BADE18:
|
||||
/* 00158 80BADE18 240F0007 */ addiu $t7, $zero, 0x0007 ## $t7 = 00000007
|
||||
/* 0015C 80BADE1C 10000002 */ beq $zero, $zero, .L80BADE28
|
||||
/* 00160 80BADE20 AFAF0038 */ sw $t7, 0x0038($sp)
|
||||
.L80BADE24:
|
||||
/* 00164 80BADE24 AFB80038 */ sw $t8, 0x0038($sp)
|
||||
.L80BADE28:
|
||||
/* 00168 80BADE28 C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C
|
||||
.L80BADE2C:
|
||||
/* 0016C 80BADE2C 8E070008 */ lw $a3, 0x0008($s0) ## 00000008
|
||||
/* 00170 80BADE30 8FB90038 */ lw $t9, 0x0038($sp)
|
||||
/* 00174 80BADE34 E7A40010 */ swc1 $f4, 0x0010($sp)
|
||||
/* 00178 80BADE38 C6060010 */ lwc1 $f6, 0x0010($s0) ## 00000010
|
||||
/* 0017C 80BADE3C AFA00020 */ sw $zero, 0x0020($sp)
|
||||
/* 00180 80BADE40 AFA0001C */ sw $zero, 0x001C($sp)
|
||||
/* 00184 80BADE44 AFA00018 */ sw $zero, 0x0018($sp)
|
||||
/* 00188 80BADE48 24060018 */ addiu $a2, $zero, 0x0018 ## $a2 = 00000018
|
||||
/* 0018C 80BADE4C AFB90024 */ sw $t9, 0x0024($sp)
|
||||
/* 00190 80BADE50 0C00C7D4 */ jal Actor_Spawn
|
||||
## ActorSpawn
|
||||
/* 00194 80BADE54 E7A60014 */ swc1 $f6, 0x0014($sp)
|
||||
/* 00198 80BADE58 0C00B55C */ jal Actor_Kill
|
||||
|
||||
/* 0019C 80BADE5C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
.L80BADE60:
|
||||
/* 001A0 80BADE60 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
/* 001A4 80BADE64 8FB00030 */ lw $s0, 0x0030($sp)
|
||||
/* 001A8 80BADE68 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
||||
/* 001AC 80BADE6C 03E00008 */ jr $ra
|
||||
/* 001B0 80BADE70 00000000 */ nop
|
|
@ -1,42 +0,0 @@
|
|||
glabel func_80BADE74
|
||||
/* 001B4 80BADE74 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
|
||||
/* 001B8 80BADE78 AFBF0034 */ sw $ra, 0x0034($sp)
|
||||
/* 001BC 80BADE7C AFB00030 */ sw $s0, 0x0030($sp)
|
||||
/* 001C0 80BADE80 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 001C4 80BADE84 0C016C66 */ jal func_8005B198
|
||||
/* 001C8 80BADE88 AFA5003C */ sw $a1, 0x003C($sp)
|
||||
/* 001CC 80BADE8C 920E0002 */ lbu $t6, 0x0002($s0) ## 00000002
|
||||
/* 001D0 80BADE90 3C1880BB */ lui $t8, %hi(func_80BADDCC) ## $t8 = 80BB0000
|
||||
/* 001D4 80BADE94 8FA5003C */ lw $a1, 0x003C($sp)
|
||||
/* 001D8 80BADE98 104E0004 */ beq $v0, $t6, .L80BADEAC
|
||||
/* 001DC 80BADE9C 2718DDCC */ addiu $t8, $t8, %lo(func_80BADDCC) ## $t8 = 80BADDCC
|
||||
/* 001E0 80BADEA0 860F01A2 */ lh $t7, 0x01A2($s0) ## 000001A2
|
||||
/* 001E4 80BADEA4 51E00015 */ beql $t7, $zero, .L80BADEFC
|
||||
/* 001E8 80BADEA8 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
.L80BADEAC:
|
||||
/* 001EC 80BADEAC C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C
|
||||
/* 001F0 80BADEB0 24190032 */ addiu $t9, $zero, 0x0032 ## $t9 = 00000032
|
||||
/* 001F4 80BADEB4 AE180198 */ sw $t8, 0x0198($s0) ## 00000198
|
||||
/* 001F8 80BADEB8 A61901A2 */ sh $t9, 0x01A2($s0) ## 000001A2
|
||||
/* 001FC 80BADEBC 8E070008 */ lw $a3, 0x0008($s0) ## 00000008
|
||||
/* 00200 80BADEC0 E7A40010 */ swc1 $f4, 0x0010($sp)
|
||||
/* 00204 80BADEC4 C6060010 */ lwc1 $f6, 0x0010($s0) ## 00000010
|
||||
/* 00208 80BADEC8 24080011 */ addiu $t0, $zero, 0x0011 ## $t0 = 00000011
|
||||
/* 0020C 80BADECC AFA80024 */ sw $t0, 0x0024($sp)
|
||||
/* 00210 80BADED0 AFA00020 */ sw $zero, 0x0020($sp)
|
||||
/* 00214 80BADED4 AFA0001C */ sw $zero, 0x001C($sp)
|
||||
/* 00218 80BADED8 AFA00018 */ sw $zero, 0x0018($sp)
|
||||
/* 0021C 80BADEDC 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24
|
||||
/* 00220 80BADEE0 2406008C */ addiu $a2, $zero, 0x008C ## $a2 = 0000008C
|
||||
/* 00224 80BADEE4 0C00C7D4 */ jal Actor_Spawn
|
||||
## ActorSpawn
|
||||
/* 00228 80BADEE8 E7A60014 */ swc1 $f6, 0x0014($sp)
|
||||
/* 0022C 80BADEEC 260400E4 */ addiu $a0, $s0, 0x00E4 ## $a0 = 000000E4
|
||||
/* 00230 80BADEF0 0C01E245 */ jal func_80078914
|
||||
/* 00234 80BADEF4 2405287B */ addiu $a1, $zero, 0x287B ## $a1 = 0000287B
|
||||
/* 00238 80BADEF8 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
.L80BADEFC:
|
||||
/* 0023C 80BADEFC 8FB00030 */ lw $s0, 0x0030($sp)
|
||||
/* 00240 80BADF00 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
|
||||
/* 00244 80BADF04 03E00008 */ jr $ra
|
||||
/* 00248 80BADF08 00000000 */ nop
|
|
@ -1,98 +0,0 @@
|
|||
.late_rodata
|
||||
glabel D_80BAE36C
|
||||
.word 0x46AFC800
|
||||
|
||||
.text
|
||||
glabel func_80BADF0C
|
||||
/* 0024C 80BADF0C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
|
||||
/* 00250 80BADF10 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 00254 80BADF14 8CA31C44 */ lw $v1, 0x1C44($a1) ## 00001C44
|
||||
/* 00258 80BADF18 8488001C */ lh $t0, 0x001C($a0) ## 0000001C
|
||||
/* 0025C 80BADF1C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
|
||||
/* 00260 80BADF20 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
|
||||
/* 00264 80BADF24 310800FF */ andi $t0, $t0, 0x00FF ## $t0 = 00000000
|
||||
/* 00268 80BADF28 AFA8001C */ sw $t0, 0x001C($sp)
|
||||
/* 0026C 80BADF2C AFA7002C */ sw $a3, 0x002C($sp)
|
||||
/* 00270 80BADF30 AFA60028 */ sw $a2, 0x0028($sp)
|
||||
/* 00274 80BADF34 24840024 */ addiu $a0, $a0, 0x0024 ## $a0 = 00000024
|
||||
/* 00278 80BADF38 24650024 */ addiu $a1, $v1, 0x0024 ## $a1 = 00000024
|
||||
/* 0027C 80BADF3C 0C032D94 */ jal func_800CB650
|
||||
/* 00280 80BADF40 AFA30024 */ sw $v1, 0x0024($sp)
|
||||
/* 00284 80BADF44 3C0180BB */ lui $at, %hi(D_80BAE36C) ## $at = 80BB0000
|
||||
/* 00288 80BADF48 C424E36C */ lwc1 $f4, %lo(D_80BAE36C)($at)
|
||||
/* 0028C 80BADF4C 8FA30024 */ lw $v1, 0x0024($sp)
|
||||
/* 00290 80BADF50 8FA60028 */ lw $a2, 0x0028($sp)
|
||||
/* 00294 80BADF54 4600203C */ c.lt.s $f4, $f0
|
||||
/* 00298 80BADF58 8FA7002C */ lw $a3, 0x002C($sp)
|
||||
/* 0029C 80BADF5C 8FA8001C */ lw $t0, 0x001C($sp)
|
||||
/* 002A0 80BADF60 45020004 */ bc1fl .L80BADF74
|
||||
/* 002A4 80BADF64 90C201A4 */ lbu $v0, 0x01A4($a2) ## 000001A4
|
||||
/* 002A8 80BADF68 10000038 */ beq $zero, $zero, .L80BAE04C
|
||||
/* 002AC 80BADF6C A0C001A4 */ sb $zero, 0x01A4($a2) ## 000001A4
|
||||
/* 002B0 80BADF70 90C201A4 */ lbu $v0, 0x01A4($a2) ## 000001A4
|
||||
.L80BADF74:
|
||||
/* 002B4 80BADF74 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
|
||||
/* 002B8 80BADF78 1440000C */ bne $v0, $zero, .L80BADFAC
|
||||
/* 002BC 80BADF7C 00000000 */ nop
|
||||
/* 002C0 80BADF80 8C620680 */ lw $v0, 0x0680($v1) ## 00000680
|
||||
/* 002C4 80BADF84 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001
|
||||
/* 002C8 80BADF88 000271C0 */ sll $t6, $v0, 7
|
||||
/* 002CC 80BADF8C 05C20006 */ bltzl $t6, .L80BADFA8
|
||||
/* 002D0 80BADF90 A0D801A4 */ sb $t8, 0x01A4($a2) ## 000001A4
|
||||
/* 002D4 80BADF94 3C010080 */ lui $at, 0x0080 ## $at = 00800000
|
||||
/* 002D8 80BADF98 00417825 */ or $t7, $v0, $at ## $t7 = 00800000
|
||||
/* 002DC 80BADF9C 1000002B */ beq $zero, $zero, .L80BAE04C
|
||||
/* 002E0 80BADFA0 AC6F0680 */ sw $t7, 0x0680($v1) ## 00000680
|
||||
/* 002E4 80BADFA4 A0D801A4 */ sb $t8, 0x01A4($a2) ## 000001A4
|
||||
.L80BADFA8:
|
||||
/* 002E8 80BADFA8 330200FF */ andi $v0, $t8, 0x00FF ## $v0 = 00000001
|
||||
.L80BADFAC:
|
||||
/* 002EC 80BADFAC 14410008 */ bne $v0, $at, .L80BADFD0
|
||||
/* 002F0 80BADFB0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
/* 002F4 80BADFB4 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
|
||||
/* 002F8 80BADFB8 0C042F56 */ jal func_8010BD58
|
||||
/* 002FC 80BADFBC AFA60028 */ sw $a2, 0x0028($sp)
|
||||
/* 00300 80BADFC0 8FA60028 */ lw $a2, 0x0028($sp)
|
||||
/* 00304 80BADFC4 24190002 */ addiu $t9, $zero, 0x0002 ## $t9 = 00000002
|
||||
/* 00308 80BADFC8 10000020 */ beq $zero, $zero, .L80BAE04C
|
||||
/* 0030C 80BADFCC A0D901A4 */ sb $t9, 0x01A4($a2) ## 000001A4
|
||||
.L80BADFD0:
|
||||
/* 00310 80BADFD0 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
|
||||
/* 00314 80BADFD4 1441001D */ bne $v0, $at, .L80BAE04C
|
||||
/* 00318 80BADFD8 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 0031C 80BADFDC 00E11021 */ addu $v0, $a3, $at
|
||||
/* 00320 80BADFE0 944904C6 */ lhu $t1, 0x04C6($v0) ## 000004C6
|
||||
/* 00324 80BADFE4 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
|
||||
/* 00328 80BADFE8 15210018 */ bne $t1, $at, .L80BAE04C
|
||||
/* 0032C 80BADFEC 24010040 */ addiu $at, $zero, 0x0040 ## $at = 00000040
|
||||
/* 00330 80BADFF0 55010005 */ bnel $t0, $at, .L80BAE008
|
||||
/* 00334 80BADFF4 24010041 */ addiu $at, $zero, 0x0041 ## $at = 00000041
|
||||
/* 00338 80BADFF8 944A04C4 */ lhu $t2, 0x04C4($v0) ## 000004C4
|
||||
/* 0033C 80BADFFC 24010009 */ addiu $at, $zero, 0x0009 ## $at = 00000009
|
||||
/* 00340 80BAE000 11410006 */ beq $t2, $at, .L80BAE01C
|
||||
/* 00344 80BAE004 24010041 */ addiu $at, $zero, 0x0041 ## $at = 00000041
|
||||
.L80BAE008:
|
||||
/* 00348 80BAE008 55010010 */ bnel $t0, $at, .L80BAE04C
|
||||
/* 0034C 80BAE00C A0C001A4 */ sb $zero, 0x01A4($a2) ## 000001A4
|
||||
/* 00350 80BAE010 944B04C4 */ lhu $t3, 0x04C4($v0) ## 000004C4
|
||||
/* 00354 80BAE014 2401000B */ addiu $at, $zero, 0x000B ## $at = 0000000B
|
||||
/* 00358 80BAE018 1561000B */ bne $t3, $at, .L80BAE048
|
||||
.L80BAE01C:
|
||||
/* 0035C 80BAE01C 3C0C80BB */ lui $t4, %hi(func_80BADE74) ## $t4 = 80BB0000
|
||||
/* 00360 80BAE020 258CDE74 */ addiu $t4, $t4, %lo(func_80BADE74) ## $t4 = 80BADE74
|
||||
/* 00364 80BAE024 ACCC0198 */ sw $t4, 0x0198($a2) ## 00000198
|
||||
/* 00368 80BAE028 AFA60028 */ sw $a2, 0x0028($sp)
|
||||
/* 0036C 80BAE02C 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
/* 00370 80BAE030 0C020120 */ jal func_80080480
|
||||
/* 00374 80BAE034 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000
|
||||
/* 00378 80BAE038 8FA60028 */ lw $a2, 0x0028($sp)
|
||||
/* 0037C 80BAE03C A4C001A2 */ sh $zero, 0x01A2($a2) ## 000001A2
|
||||
/* 00380 80BAE040 10000002 */ beq $zero, $zero, .L80BAE04C
|
||||
/* 00384 80BAE044 A0C001A4 */ sb $zero, 0x01A4($a2) ## 000001A4
|
||||
.L80BAE048:
|
||||
/* 00388 80BAE048 A0C001A4 */ sb $zero, 0x01A4($a2) ## 000001A4
|
||||
.L80BAE04C:
|
||||
/* 0038C 80BAE04C 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 00390 80BAE050 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
|
||||
/* 00394 80BAE054 03E00008 */ jr $ra
|
||||
/* 00398 80BAE058 00000000 */ nop
|
|
@ -1,170 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80BAE34C
|
||||
.asciz "[36mSHOT_SUN HIT!!!!!!!\n[m"
|
||||
.balign 4
|
||||
|
||||
.late_rodata
|
||||
glabel D_80BAE370
|
||||
.word 0x45E2E800
|
||||
glabel D_80BAE374
|
||||
.word 0x45E2E800
|
||||
glabel D_80BAE378
|
||||
.word 0x3E2AAAAB, 0x00000000
|
||||
|
||||
.text
|
||||
glabel func_80BAE05C
|
||||
/* 0039C 80BAE05C 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0
|
||||
/* 003A0 80BAE060 AFBF0034 */ sw $ra, 0x0034($sp)
|
||||
/* 003A4 80BAE064 AFB00030 */ sw $s0, 0x0030($sp)
|
||||
/* 003A8 80BAE068 908E015D */ lbu $t6, 0x015D($a0) ## 0000015D
|
||||
/* 003AC 80BAE06C 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
|
||||
/* 003B0 80BAE070 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
|
||||
/* 003B4 80BAE074 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000
|
||||
/* 003B8 80BAE078 11E00048 */ beq $t7, $zero, .L80BAE19C
|
||||
/* 003BC 80BAE07C 8CA31C44 */ lw $v1, 0x1C44($a1) ## 00001C44
|
||||
/* 003C0 80BAE080 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802
|
||||
/* 003C4 80BAE084 0C01E221 */ jal func_80078884
|
||||
/* 003C8 80BAE088 AFA70060 */ sw $a3, 0x0060($sp)
|
||||
/* 003CC 80BAE08C 3C0480BB */ lui $a0, %hi(D_80BAE34C) ## $a0 = 80BB0000
|
||||
/* 003D0 80BAE090 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 003D4 80BAE094 2484E34C */ addiu $a0, $a0, %lo(D_80BAE34C) ## $a0 = 80BAE34C
|
||||
/* 003D8 80BAE098 3C188012 */ lui $t8, %hi(gItemSlots+4)
|
||||
/* 003DC 80BAE09C 93187468 */ lbu $t8, %lo(gItemSlots+4)($t8)
|
||||
/* 003E0 80BAE0A0 3C198016 */ lui $t9, %hi(gSaveContext+0x74)
|
||||
/* 003E4 80BAE0A4 240100FF */ addiu $at, $zero, 0x00FF ## $at = 000000FF
|
||||
/* 003E8 80BAE0A8 0338C821 */ addu $t9, $t9, $t8
|
||||
/* 003EC 80BAE0AC 9339E6D4 */ lbu $t9, %lo(gSaveContext+0x74)($t9)
|
||||
/* 003F0 80BAE0B0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 003F4 80BAE0B4 27A50040 */ addiu $a1, $sp, 0x0040 ## $a1 = FFFFFFE0
|
||||
/* 003F8 80BAE0B8 17210024 */ bne $t9, $at, .L80BAE14C
|
||||
/* 003FC 80BAE0BC 2406000E */ addiu $a2, $zero, 0x000E ## $a2 = 0000000E
|
||||
/* 00400 80BAE0C0 3C01C448 */ lui $at, 0xC448 ## $at = C4480000
|
||||
/* 00404 80BAE0C4 44812000 */ mtc1 $at, $f4 ## $f4 = -800.00
|
||||
/* 00408 80BAE0C8 3C0180BB */ lui $at, %hi(D_80BAE370) ## $at = 80BB0000
|
||||
/* 0040C 80BAE0CC C426E370 */ lwc1 $f6, %lo(D_80BAE370)($at)
|
||||
/* 00410 80BAE0D0 24080007 */ addiu $t0, $zero, 0x0007 ## $t0 = 00000007
|
||||
/* 00414 80BAE0D4 AFA80024 */ sw $t0, 0x0024($sp)
|
||||
/* 00418 80BAE0D8 26041C24 */ addiu $a0, $s0, 0x1C24 ## $a0 = 00001C24
|
||||
/* 0041C 80BAE0DC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
|
||||
/* 00420 80BAE0E0 2406010F */ addiu $a2, $zero, 0x010F ## $a2 = 0000010F
|
||||
/* 00424 80BAE0E4 3C07442F */ lui $a3, 0x442F ## $a3 = 442F0000
|
||||
/* 00428 80BAE0E8 AFA00018 */ sw $zero, 0x0018($sp)
|
||||
/* 0042C 80BAE0EC AFA0001C */ sw $zero, 0x001C($sp)
|
||||
/* 00430 80BAE0F0 AFA00020 */ sw $zero, 0x0020($sp)
|
||||
/* 00434 80BAE0F4 E7A40010 */ swc1 $f4, 0x0010($sp)
|
||||
/* 00438 80BAE0F8 0C00C7D4 */ jal Actor_Spawn
|
||||
## ActorSpawn
|
||||
/* 0043C 80BAE0FC E7A60014 */ swc1 $f6, 0x0014($sp)
|
||||
/* 00440 80BAE100 3C030200 */ lui $v1, 0x0200 ## $v1 = 02000000
|
||||
/* 00444 80BAE104 24637020 */ addiu $v1, $v1, 0x7020 ## $v1 = 02007020
|
||||
/* 00448 80BAE108 00034900 */ sll $t1, $v1, 4
|
||||
/* 0044C 80BAE10C 00095702 */ srl $t2, $t1, 28
|
||||
/* 00450 80BAE110 000A5880 */ sll $t3, $t2, 2
|
||||
/* 00454 80BAE114 3C0C8016 */ lui $t4, %hi(gSegments)
|
||||
/* 00458 80BAE118 018B6021 */ addu $t4, $t4, $t3
|
||||
/* 0045C 80BAE11C 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000
|
||||
/* 00460 80BAE120 8D8C6FA8 */ lw $t4, %lo(gSegments)($t4)
|
||||
/* 00464 80BAE124 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF
|
||||
/* 00468 80BAE128 00616824 */ and $t5, $v1, $at
|
||||
/* 0046C 80BAE12C 3C018000 */ lui $at, 0x8000 ## $at = 80000000
|
||||
/* 00470 80BAE130 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 00474 80BAE134 01C17821 */ addu $t7, $t6, $at
|
||||
/* 00478 80BAE138 AE0F1D68 */ sw $t7, 0x1D68($s0) ## 00001D68
|
||||
/* 0047C 80BAE13C 3C018016 */ lui $at, %hi(gSaveContext+0x1414)
|
||||
/* 00480 80BAE140 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001
|
||||
/* 00484 80BAE144 10000011 */ beq $zero, $zero, .L80BAE18C
|
||||
/* 00488 80BAE148 A038FA74 */ sb $t8, %lo(gSaveContext+0x1414)($at)
|
||||
.L80BAE14C:
|
||||
/* 0048C 80BAE14C 3C01442F */ lui $at, 0x442F ## $at = 442F0000
|
||||
/* 00490 80BAE150 44814000 */ mtc1 $at, $f8 ## $f8 = 700.00
|
||||
/* 00494 80BAE154 3C01C448 */ lui $at, 0xC448 ## $at = C4480000
|
||||
/* 00498 80BAE158 44815000 */ mtc1 $at, $f10 ## $f10 = -800.00
|
||||
/* 0049C 80BAE15C 3C0180BB */ lui $at, %hi(D_80BAE374) ## $at = 80BB0000
|
||||
/* 004A0 80BAE160 C430E374 */ lwc1 $f16, %lo(D_80BAE374)($at)
|
||||
/* 004A4 80BAE164 E7A80040 */ swc1 $f8, 0x0040($sp)
|
||||
/* 004A8 80BAE168 E7AA0044 */ swc1 $f10, 0x0044($sp)
|
||||
/* 004AC 80BAE16C 0C007D52 */ jal Item_DropCollectible
|
||||
|
||||
/* 004B0 80BAE170 E7B00048 */ swc1 $f16, 0x0048($sp)
|
||||
/* 004B4 80BAE174 10400005 */ beq $v0, $zero, .L80BAE18C
|
||||
/* 004B8 80BAE178 00000000 */ nop
|
||||
/* 004BC 80BAE17C 44809000 */ mtc1 $zero, $f18 ## $f18 = 0.00
|
||||
/* 004C0 80BAE180 24191770 */ addiu $t9, $zero, 0x1770 ## $t9 = 00001770
|
||||
/* 004C4 80BAE184 A459015A */ sh $t9, 0x015A($v0) ## 0000015A
|
||||
/* 004C8 80BAE188 E4520068 */ swc1 $f18, 0x0068($v0) ## 00000068
|
||||
.L80BAE18C:
|
||||
/* 004CC 80BAE18C 0C00B55C */ jal Actor_Kill
|
||||
|
||||
/* 004D0 80BAE190 8FA40060 */ lw $a0, 0x0060($sp)
|
||||
/* 004D4 80BAE194 1000003E */ beq $zero, $zero, .L80BAE290
|
||||
/* 004D8 80BAE198 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
.L80BAE19C:
|
||||
/* 004DC 80BAE19C 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000
|
||||
/* 004E0 80BAE1A0 44812000 */ mtc1 $at, $f4 ## $f4 = 120.00
|
||||
/* 004E4 80BAE1A4 C4E60090 */ lwc1 $f6, 0x0090($a3) ## 00000090
|
||||
/* 004E8 80BAE1A8 3C028016 */ lui $v0, %hi(gSaveContext+0xc)
|
||||
/* 004EC 80BAE1AC 4606203C */ c.lt.s $f4, $f6
|
||||
/* 004F0 80BAE1B0 00000000 */ nop
|
||||
/* 004F4 80BAE1B4 45030036 */ bc1tl .L80BAE290
|
||||
/* 004F8 80BAE1B8 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
/* 004FC 80BAE1BC 9442E66C */ lhu $v0, %lo(gSaveContext+0xc)($v0)
|
||||
/* 00500 80BAE1C0 28414555 */ slti $at, $v0, 0x4555
|
||||
/* 00504 80BAE1C4 14200031 */ bne $at, $zero, .L80BAE28C
|
||||
/* 00508 80BAE1C8 28415000 */ slti $at, $v0, 0x5000
|
||||
/* 0050C 80BAE1CC 1020002F */ beq $at, $zero, .L80BAE28C
|
||||
/* 00510 80BAE1D0 3C0180BB */ lui $at, %hi(D_80BAE378) ## $at = 80BB0000
|
||||
/* 00514 80BAE1D4 C420E378 */ lwc1 $f0, %lo(D_80BAE378)($at)
|
||||
/* 00518 80BAE1D8 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 0051C 80BAE1DC 02011021 */ addu $v0, $s0, $at
|
||||
/* 00520 80BAE1E0 C44A0A28 */ lwc1 $f10, 0x0A28($v0) ## 80160A28
|
||||
/* 00524 80BAE1E4 C468095C */ lwc1 $f8, 0x095C($v1) ## 0000095C
|
||||
/* 00528 80BAE1E8 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
|
||||
/* 0052C 80BAE1EC 46005402 */ mul.s $f16, $f10, $f0
|
||||
/* 00530 80BAE1F0 44815000 */ mtc1 $at, $f10 ## $f10 = 30.00
|
||||
/* 00534 80BAE1F4 27A50058 */ addiu $a1, $sp, 0x0058 ## $a1 = FFFFFFF8
|
||||
/* 00538 80BAE1F8 24E6014C */ addiu $a2, $a3, 0x014C ## $a2 = 0000014C
|
||||
/* 0053C 80BAE1FC 00C02025 */ or $a0, $a2, $zero ## $a0 = 0000014C
|
||||
/* 00540 80BAE200 46104480 */ add.s $f18, $f8, $f16
|
||||
/* 00544 80BAE204 4600910D */ trunc.w.s $f4, $f18
|
||||
/* 00548 80BAE208 44092000 */ mfc1 $t1, $f4
|
||||
/* 0054C 80BAE20C 00000000 */ nop
|
||||
/* 00550 80BAE210 A7A90058 */ sh $t1, 0x0058($sp)
|
||||
/* 00554 80BAE214 C4500A2C */ lwc1 $f16, 0x0A2C($v0) ## 80160A2C
|
||||
/* 00558 80BAE218 C4660960 */ lwc1 $f6, 0x0960($v1) ## 00000960
|
||||
/* 0055C 80BAE21C 46008482 */ mul.s $f18, $f16, $f0
|
||||
/* 00560 80BAE220 460A3201 */ sub.s $f8, $f6, $f10
|
||||
/* 00564 80BAE224 46124100 */ add.s $f4, $f8, $f18
|
||||
/* 00568 80BAE228 4600218D */ trunc.w.s $f6, $f4
|
||||
/* 0056C 80BAE22C 440B3000 */ mfc1 $t3, $f6
|
||||
/* 00570 80BAE230 00000000 */ nop
|
||||
/* 00574 80BAE234 A7AB005A */ sh $t3, 0x005A($sp)
|
||||
/* 00578 80BAE238 C4500A30 */ lwc1 $f16, 0x0A30($v0) ## 80160A30
|
||||
/* 0057C 80BAE23C C46A0964 */ lwc1 $f10, 0x0964($v1) ## 00000964
|
||||
/* 00580 80BAE240 46008202 */ mul.s $f8, $f16, $f0
|
||||
/* 00584 80BAE244 46085480 */ add.s $f18, $f10, $f8
|
||||
/* 00588 80BAE248 4600910D */ trunc.w.s $f4, $f18
|
||||
/* 0058C 80BAE24C 440D2000 */ mfc1 $t5, $f4
|
||||
/* 00590 80BAE250 00000000 */ nop
|
||||
/* 00594 80BAE254 A7AD005C */ sh $t5, 0x005C($sp)
|
||||
/* 00598 80BAE258 8CAF0000 */ lw $t7, 0x0000($a1) ## FFFFFFF8
|
||||
/* 0059C 80BAE25C A8EF019C */ swl $t7, 0x019C($a3) ## 0000019C
|
||||
/* 005A0 80BAE260 B8EF019F */ swr $t7, 0x019F($a3) ## 0000019F
|
||||
/* 005A4 80BAE264 94AF0004 */ lhu $t7, 0x0004($a1) ## FFFFFFFC
|
||||
/* 005A8 80BAE268 A4EF01A0 */ sh $t7, 0x01A0($a3) ## 000001A0
|
||||
/* 005AC 80BAE26C 0C0189C6 */ jal func_80062718
|
||||
/* 005B0 80BAE270 AFA6003C */ sw $a2, 0x003C($sp)
|
||||
/* 005B4 80BAE274 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 005B8 80BAE278 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
|
||||
/* 005BC 80BAE27C 8FA6003C */ lw $a2, 0x003C($sp)
|
||||
/* 005C0 80BAE280 02012821 */ addu $a1, $s0, $at
|
||||
/* 005C4 80BAE284 0C01767D */ jal CollisionCheck_SetAC
|
||||
## CollisionCheck_setAC
|
||||
/* 005C8 80BAE288 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
.L80BAE28C:
|
||||
/* 005CC 80BAE28C 8FBF0034 */ lw $ra, 0x0034($sp)
|
||||
.L80BAE290:
|
||||
/* 005D0 80BAE290 8FB00030 */ lw $s0, 0x0030($sp)
|
||||
/* 005D4 80BAE294 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000
|
||||
/* 005D8 80BAE298 03E00008 */ jr $ra
|
||||
/* 005DC 80BAE29C 00000000 */ nop
|
|
@ -1,20 +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 Shot_Sun_InitVars
|
||||
.word 0x01830600, 0x00000009, 0x00010000, 0x000001A8
|
||||
.word ShotSun_Init
|
||||
.word ShotSun_Destroy
|
||||
.word ShotSun_Update
|
||||
.word 0x00000000
|
||||
glabel D_80BAE2F0
|
||||
.word 0x0A000939, 0x10010000, 0x00000000, 0x00000000, 0x00000000, 0x00000020, 0x00000000, 0x00010100, 0x001E003C, 0x00000000, 0x00000000, 0x00000000
|
||||
|
|
@ -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_80BAE380
|
||||
.incbin "baserom/ovl_Shot_Sun", 0x6C0, 0x00000080
|
|
@ -158,8 +158,8 @@ void __osSetHWIntrRoutine(s32 idx, OSMesgQueue* queue, OSMesg msg);
|
|||
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
||||
void __osSetWatchLo(u32);
|
||||
|
||||
Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
|
||||
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
|
||||
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
|
||||
EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
|
||||
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params);
|
||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
|
||||
void EffectBlure_AddSpace(EffectBlure* this);
|
||||
|
@ -701,6 +701,7 @@ s32 Camera_SetParam(Camera*, s32, void*);
|
|||
// ? func_8005AE64(?);
|
||||
Vec3f* func_8005AFB4(Vec3f* dst, Camera* camera);
|
||||
// ? func_8005B044(?);
|
||||
s32 func_8005B198();
|
||||
// ? func_8005B1A4(?);
|
||||
DamageTable* DamageTable_Get(s32 index);
|
||||
// ? func_8005B280(?);
|
||||
|
@ -832,6 +833,7 @@ s32 CollisionCheck_GeneralLineOcCheck(GlobalContext* globalCtx, CollisionCheckCo
|
|||
Vec3f* arg3, Actor** arg4, s32 arg5);
|
||||
// ? func_800626B0(?);
|
||||
void Collider_CylinderUpdate(Actor* actor, ColliderCylinder* collider);
|
||||
void func_80062718(ColliderCylinder* collider, Vec3s* pos);
|
||||
// ? func_80062734(?);
|
||||
void func_800627A0(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void func_80062A28(GlobalContext*, Vec3f*);
|
||||
|
|
|
@ -701,7 +701,8 @@ typedef struct {
|
|||
/* 0xE3E5 */ u8 choiceIndex;
|
||||
/* 0xE3E6 */ char unk_E3E6[0x01];
|
||||
/* 0xE3E7 */ u8 unk_E3E7;
|
||||
/* 0xE3E8 */ char unk_E3E8[0x6];
|
||||
/* 0xE3E8 */ char unk_E3E8[0x04];
|
||||
/* 0xE3EC */ u16 unk_E3EC;
|
||||
/* 0xE3EE */ u16 unk_E3EE;
|
||||
/* 0xE3F0 */ u16 unk_E3F0;
|
||||
/* 0xE3F2 */ char unk_E3F2[0x02];
|
||||
|
|
|
@ -340,7 +340,9 @@ typedef struct Player {
|
|||
/* 0x08B4 */ Struct_80090480_arg2 swordDimensions; // Trail active, tip, base?
|
||||
/* 0x08D0 */ Struct_80090480_arg2 unk_8D0;
|
||||
/* 0x08EC */ Struct_80090480_arg2 unk_8EC;
|
||||
/* 0x0908 */ char unk_908[0xD8];
|
||||
/* 0x0908 */ char unk_908[0x54];
|
||||
/* 0x095C */ Vec3f unk_95C;
|
||||
/* 0x0968 */ char unk_968[0x78];
|
||||
/* 0x09E0 */ MtxF mf_9E0;
|
||||
/* 0x0A20 */ MtxF mf_A20;
|
||||
/* 0x0A60 */ char unk_A60[0x08];
|
||||
|
@ -354,6 +356,84 @@ typedef struct Player {
|
|||
/* 0x0A79 */ char unk_A79[0x1B];
|
||||
} Player; // size = 0xA94
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
/* 0x01 */ ITEM00_RUPEE_BLUE,
|
||||
/* 0x02 */ ITEM00_RUPEE_RED,
|
||||
/* 0x03 */ ITEM00_HEART,
|
||||
/* 0x04 */ ITEM00_BOMBS_A,
|
||||
/* 0x05 */ ITEM00_ARROWS_SINGLE,
|
||||
/* 0x06 */ ITEM00_HEART_PIECE,
|
||||
/* 0x07 */ ITEM00_HEART_CONTAINER,
|
||||
/* 0x08 */ ITEM00_ARROWS_SMALL,
|
||||
/* 0x09 */ ITEM00_ARROWS_MEDIUM,
|
||||
/* 0x0A */ ITEM00_ARROWS_LARGE,
|
||||
/* 0x0B */ ITEM00_BOMBS_B,
|
||||
/* 0x0C */ ITEM00_NUTS,
|
||||
/* 0x0D */ ITEM00_STICK,
|
||||
/* 0x0E */ ITEM00_MAGIC_LARGE,
|
||||
/* 0x0F */ ITEM00_MAGIC_SMALL,
|
||||
/* 0x10 */ ITEM00_SEEDS,
|
||||
/* 0x11 */ ITEM00_SMALL_KEY,
|
||||
/* 0x12 */ ITEM00_FLEXIBLE,
|
||||
/* 0x13 */ ITEM00_RUPEE_ORANGE,
|
||||
/* 0x14 */ ITEM00_RUPEE_PURPLE,
|
||||
/* 0x15 */ ITEM00_SHIELD_DEKU,
|
||||
/* 0x16 */ ITEM00_SHIELD_HYLIAN,
|
||||
/* 0x17 */ ITEM00_TUNIC_ZORA,
|
||||
/* 0x18 */ ITEM00_TUNIC_GORON,
|
||||
/* 0x19 */ ITEM00_BOMBS_SPECIAL
|
||||
} Item00Type;
|
||||
|
||||
struct EnItem00;
|
||||
|
||||
typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct GlobalContext*);
|
||||
|
||||
typedef struct EnItem00 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x14C */ EnItem00ActionFunc actionFunc;
|
||||
/* 0x150 */ s16 collectibleFlag;
|
||||
/* 0x152 */ s16 unk_152;
|
||||
/* 0x154 */ s16 unk_154;
|
||||
/* 0x156 */ s16 unk_156;
|
||||
/* 0x158 */ s16 unk_158;
|
||||
/* 0x15A */ s16 unk_15A;
|
||||
/* 0x15C */ f32 unk_15C;
|
||||
/* 0x160 */ ColliderCylinder collider;
|
||||
} EnItem00; // size = 0x1AC
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ A_OBJ_BLOCK_SMALL,
|
||||
/* 0x01 */ A_OBJ_BLOCK_LARGE,
|
||||
/* 0x02 */ A_OBJ_BLOCK_HUGE,
|
||||
/* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
|
||||
/* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
|
||||
/* 0x05 */ A_OBJ_CUBE_SMALL,
|
||||
/* 0x06 */ A_OBJ_UNKNOWN_6,
|
||||
/* 0x07 */ A_OBJ_GRASS_CLUMP,
|
||||
/* 0x08 */ A_OBJ_TREE_STUMP,
|
||||
/* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
|
||||
/* 0x0A */ A_OBJ_SIGNPOST_ARROW,
|
||||
/* 0x0B */ A_OBJ_KNOB
|
||||
} AObjType;
|
||||
|
||||
struct EnAObj;
|
||||
|
||||
typedef void (*EnAObjActionFunc)(struct EnAObj*, struct GlobalContext*);
|
||||
|
||||
typedef struct EnAObj {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x164 */ EnAObjActionFunc actionFunc;
|
||||
/* 0x168 */ s32 unk_168;
|
||||
/* 0x16C */ s16 textId;
|
||||
/* 0x16E */ s16 unk_16E;
|
||||
/* 0x170 */ s16 unk_170;
|
||||
/* 0x172 */ s16 unk_172;
|
||||
/* 0x174 */ s16 unk_174;
|
||||
/* 0x178 */ f32 unk_178;
|
||||
/* 0x17C */ ColliderCylinder collider;
|
||||
} EnAObj; // size = 0x1C8
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ACTORTYPE_SWITCH,
|
||||
/* 0x01 */ ACTORTYPE_BG,
|
||||
|
|
3
spec
3
spec
|
@ -3830,8 +3830,7 @@ endseg
|
|||
beginseg
|
||||
name "ovl_Shot_Sun"
|
||||
include "build/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o"
|
||||
include "build/data/overlays/actors/z_shot_sun.data.o"
|
||||
include "build/data/overlays/actors/z_shot_sun.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -1,38 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ A_OBJ_BLOCK_SMALL,
|
||||
/* 0x01 */ A_OBJ_BLOCK_LARGE,
|
||||
/* 0x02 */ A_OBJ_BLOCK_HUGE,
|
||||
/* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
|
||||
/* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
|
||||
/* 0x05 */ A_OBJ_CUBE_SMALL,
|
||||
/* 0x06 */ A_OBJ_UNKNOWN_6,
|
||||
/* 0x07 */ A_OBJ_GRASS_CLUMP,
|
||||
/* 0x08 */ A_OBJ_TREE_STUMP,
|
||||
/* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
|
||||
/* 0x0A */ A_OBJ_SIGNPOST_ARROW,
|
||||
/* 0x0B */ A_OBJ_KNOB
|
||||
} AObjType;
|
||||
|
||||
struct EnAObj;
|
||||
|
||||
typedef void (*EnAObjActionFunc)(struct EnAObj*, GlobalContext*);
|
||||
|
||||
typedef struct EnAObj {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x164 */ EnAObjActionFunc actionFunc;
|
||||
/* 0x168 */ s32 unk_168;
|
||||
/* 0x16C */ s16 textId;
|
||||
/* 0x16E */ s16 unk_16E;
|
||||
/* 0x170 */ s16 unk_170;
|
||||
/* 0x172 */ s16 unk_172;
|
||||
/* 0x174 */ s16 unk_174;
|
||||
/* 0x178 */ f32 unk_178;
|
||||
/* 0x17C */ ColliderCylinder collider;
|
||||
} EnAObj; // size = 0x1C8
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
#define THIS ((EnAObj*)thisx)
|
||||
|
|
|
@ -1,52 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
/* 0x01 */ ITEM00_RUPEE_BLUE,
|
||||
/* 0x02 */ ITEM00_RUPEE_RED,
|
||||
/* 0x03 */ ITEM00_HEART,
|
||||
/* 0x04 */ ITEM00_BOMBS_A,
|
||||
/* 0x05 */ ITEM00_ARROWS_SINGLE,
|
||||
/* 0x06 */ ITEM00_HEART_PIECE,
|
||||
/* 0x07 */ ITEM00_HEART_CONTAINER,
|
||||
/* 0x08 */ ITEM00_ARROWS_SMALL,
|
||||
/* 0x09 */ ITEM00_ARROWS_MEDIUM,
|
||||
/* 0x0A */ ITEM00_ARROWS_LARGE,
|
||||
/* 0x0B */ ITEM00_BOMBS_B,
|
||||
/* 0x0C */ ITEM00_NUTS,
|
||||
/* 0x0D */ ITEM00_STICK,
|
||||
/* 0x0E */ ITEM00_MAGIC_LARGE,
|
||||
/* 0x0F */ ITEM00_MAGIC_SMALL,
|
||||
/* 0x10 */ ITEM00_SEEDS,
|
||||
/* 0x11 */ ITEM00_SMALL_KEY,
|
||||
/* 0x12 */ ITEM00_FLEXIBLE,
|
||||
/* 0x13 */ ITEM00_RUPEE_ORANGE,
|
||||
/* 0x14 */ ITEM00_RUPEE_PURPLE,
|
||||
/* 0x15 */ ITEM00_SHIELD_DEKU,
|
||||
/* 0x16 */ ITEM00_SHIELD_HYLIAN,
|
||||
/* 0x17 */ ITEM00_TUNIC_ZORA,
|
||||
/* 0x18 */ ITEM00_TUNIC_GORON,
|
||||
/* 0x19 */ ITEM00_BOMBS_SPECIAL
|
||||
} Item00Type;
|
||||
|
||||
struct EnItem00;
|
||||
|
||||
typedef void (*EnItem00ActionFunc)(struct EnItem00*, GlobalContext*);
|
||||
|
||||
typedef struct EnItem00 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x14C */ EnItem00ActionFunc actionFunc;
|
||||
/* 0x150 */ s16 collectibleFlag;
|
||||
/* 0x152 */ s16 unk_152;
|
||||
/* 0x154 */ s16 unk_154;
|
||||
/* 0x156 */ s16 unk_156;
|
||||
/* 0x158 */ s16 unk_158;
|
||||
/* 0x15A */ s16 unk_15A;
|
||||
/* 0x15C */ f32 unk_15C;
|
||||
/* 0x160 */ ColliderCylinder collider;
|
||||
} EnItem00; // size = 0x1AC
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
#define THIS ((EnItem00*)thisx)
|
||||
|
@ -915,7 +869,7 @@ s16 func_8001F404(s16 dropId) {
|
|||
|
||||
// External functions used by other actors to drop collectibles, which usually results in spawning an En_Item00 actor.
|
||||
|
||||
Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params) {
|
||||
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params) {
|
||||
s32 pad[2];
|
||||
EnItem00* spawnedActor = NULL;
|
||||
s16 param4000 = params & 0x4000;
|
||||
|
@ -955,10 +909,10 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 param
|
|||
}
|
||||
}
|
||||
|
||||
return (Actor*)spawnedActor;
|
||||
return spawnedActor;
|
||||
}
|
||||
|
||||
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params) {
|
||||
EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params) {
|
||||
EnItem00* spawnedActor = NULL;
|
||||
s32 pad;
|
||||
s16 param4000 = params & 0x4000;
|
||||
|
@ -987,7 +941,7 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 para
|
|||
}
|
||||
}
|
||||
|
||||
return (Actor*)spawnedActor;
|
||||
return spawnedActor;
|
||||
}
|
||||
|
||||
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
/*
|
||||
* File: z_shot_sun.c
|
||||
* Overlay: ovl_Shot_Sun
|
||||
* Description: Song of Storms Fairy
|
||||
* Description: Lake Hylia Sun hitbox and Song of Storms Fairy spawner
|
||||
*/
|
||||
|
||||
#include "z_shot_sun.h"
|
||||
#include <vt.h>
|
||||
|
||||
#define FLAGS 0x00000009
|
||||
|
||||
|
@ -14,7 +15,13 @@ void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx);
|
|||
void ShotSun_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ShotSun_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void ShotSun_SpawnFairy(ShotSun* this, GlobalContext* globalCtx);
|
||||
void ShotSun_TriggerFairy(ShotSun* this, GlobalContext* globalCtx);
|
||||
void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx);
|
||||
void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx);
|
||||
|
||||
extern CutsceneData D_02007020[];
|
||||
|
||||
const ActorInit Shot_Sun_InitVars = {
|
||||
ACTOR_SHOT_SUN,
|
||||
ACTORTYPE_PROP,
|
||||
|
@ -26,17 +33,158 @@ const ActorInit Shot_Sun_InitVars = {
|
|||
(ActorFunc)ShotSun_Update,
|
||||
NULL,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/ShotSun_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/ShotSun_Destroy.s")
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_UNK10, 0x00, 0x09, 0x39, 0x10, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000020, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{ 30, 60, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/func_80BADDCC.s")
|
||||
void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ShotSun* this = THIS;
|
||||
s32 params;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/func_80BADE74.s")
|
||||
// Translation: Ocarina secret occurrence
|
||||
osSyncPrintf("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", this->actor.params);
|
||||
params = this->actor.params & 0xFF;
|
||||
if (params == 0x40 || params == 0x41) {
|
||||
this->unk_1A4 = 0;
|
||||
this->actor.flags |= 0x10;
|
||||
this->actor.flags |= 0x2000000;
|
||||
this->actionFunc = func_80BADF0C;
|
||||
this->actor.flags |= 0x8000000;
|
||||
} else {
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actionFunc = ShotSun_UpdateHyliaSun;
|
||||
this->actor.flags &= ~1;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/func_80BADF0C.s")
|
||||
void ShotSun_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ShotSun* this = THIS;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/func_80BAE05C.s")
|
||||
if (params != 0x40 && params != 0x41) {
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Shot_Sun/ShotSun_Update.s")
|
||||
void ShotSun_SpawnFairy(ShotSun* this, GlobalContext* globalCtx) {
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
s32 fairyParams;
|
||||
|
||||
if (this->timer > 0) {
|
||||
this->timer--;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (params) {
|
||||
case 0x40:
|
||||
fairyParams = 7;
|
||||
break;
|
||||
case 0x41:
|
||||
fairyParams = 7;
|
||||
break;
|
||||
}
|
||||
|
||||
// UB: fairyParams may be uninitialized
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.initPosRot.pos.x,
|
||||
this->actor.initPosRot.pos.y, this->actor.initPosRot.pos.z, 0, 0, 0, fairyParams);
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
void ShotSun_TriggerFairy(ShotSun* this, GlobalContext* globalCtx) {
|
||||
if ((func_8005B198() == this->actor.type) || (this->timer != 0)) {
|
||||
this->actionFunc = ShotSun_SpawnFairy;
|
||||
this->timer = 50;
|
||||
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DEMO_KANKYO, this->actor.initPosRot.pos.x,
|
||||
this->actor.initPosRot.pos.y, this->actor.initPosRot.pos.z, 0, 0, 0, 0x11);
|
||||
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
s32 pad;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
|
||||
if (func_800CB650(&this->actor.posRot.pos, &player->actor.posRot.pos) > 22500.0f) {
|
||||
this->unk_1A4 = 0;
|
||||
} else {
|
||||
if (this->unk_1A4 == 0) {
|
||||
if (!(player->stateFlags2 & 0x1000000)) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
return;
|
||||
} else {
|
||||
this->unk_1A4 = 1;
|
||||
}
|
||||
}
|
||||
if (this->unk_1A4 == 1) {
|
||||
func_8010BD58(globalCtx, 1);
|
||||
this->unk_1A4 = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->unk_1A4 == 2 && globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if ((params == 0x40 && globalCtx->msgCtx.unk_E3EC == 9) ||
|
||||
(params == 0x41 && globalCtx->msgCtx.unk_E3EC == 0xB)) {
|
||||
this->actionFunc = ShotSun_TriggerFairy;
|
||||
func_80080480(globalCtx, this);
|
||||
this->timer = 0;
|
||||
} else {
|
||||
this->unk_1A4 = 0;
|
||||
}
|
||||
this->unk_1A4 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) {
|
||||
Vec3s cylinderPos;
|
||||
Player* player = PLAYER;
|
||||
EnItem00* collectible;
|
||||
s32 pad;
|
||||
Vec3f spawnPos;
|
||||
|
||||
if (this->collider.base.acFlags & 2) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST);
|
||||
if (INV_CONTENT(SLOT_ARROW_FIRE) == ITEM_NONE) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7);
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_02007020);
|
||||
if (1) {}
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
} else {
|
||||
spawnPos.x = 700.0f;
|
||||
spawnPos.y = -800.0f;
|
||||
spawnPos.z = 7261.0f;
|
||||
|
||||
collectible = Item_DropCollectible(globalCtx, &spawnPos, ITEM00_MAGIC_LARGE);
|
||||
if (collectible != NULL) {
|
||||
collectible->unk_15A = 6000;
|
||||
collectible->actor.speedXZ = 0.0f;
|
||||
}
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if (!(120.0f < this->actor.xzDistFromLink) && gSaveContext.dayTime >= 0x4555 && gSaveContext.dayTime < 0x5000) {
|
||||
cylinderPos.x = player->unk_95C.x + globalCtx->envCtx.unk_04.x * 0.16666667f;
|
||||
cylinderPos.y = player->unk_95C.y - 30.0f + globalCtx->envCtx.unk_04.y * 0.16666667f;
|
||||
cylinderPos.z = player->unk_95C.z + globalCtx->envCtx.unk_04.z * 0.16666667f;
|
||||
|
||||
this->hitboxPos = cylinderPos;
|
||||
|
||||
func_80062718(&this->collider, &cylinderPos);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShotSun_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ShotSun* this = THIS;
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
|
|
@ -10,9 +10,11 @@ typedef void (*ShotSunActionFunc)(struct ShotSun*, GlobalContext*);
|
|||
|
||||
typedef struct ShotSun {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x4C];
|
||||
/* 0x014C */ ColliderCylinder collider;
|
||||
/* 0x0198 */ ShotSunActionFunc actionFunc;
|
||||
/* 0x019C */ char unk_19C[0xC];
|
||||
/* 0x019C */ Vec3s hitboxPos;
|
||||
/* 0x01A2 */ s16 timer; // Frames until fairy spawns
|
||||
/* 0x01A4 */ u8 unk_1A4;
|
||||
} ShotSun; // size = 0x01A8
|
||||
|
||||
extern const ActorInit Shot_Sun_InitVars;
|
||||
|
|
Loading…
Add table
Reference in a new issue