diff --git a/.gitignore b/.gitignore index 49d6418cdc..0ec796976e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Cache files __pycache__/ .pyc +.DS_Store # Text editor remnants .vscode/ diff --git a/asm/non_matchings/code/audio_heap/func_800DE3DC.s b/asm/non_matchings/code/audio_heap/Audio_Alloc.s similarity index 98% rename from asm/non_matchings/code/audio_heap/func_800DE3DC.s rename to asm/non_matchings/code/audio_heap/Audio_Alloc.s index 98db323860..12bf776e96 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE3DC.s +++ b/asm/non_matchings/code/audio_heap/Audio_Alloc.s @@ -1,4 +1,4 @@ -glabel func_800DE3DC +glabel Audio_Alloc /* B5557C 800DE3DC 8C860004 */ lw $a2, 4($a0) /* B55580 800DE3E0 8C8E0000 */ lw $t6, ($a0) /* B55584 800DE3E4 8C8F0008 */ lw $t7, 8($a0) diff --git a/asm/non_matchings/code/audio_heap/func_800DE8E0.s b/asm/non_matchings/code/audio_heap/Audio_AllocBankOrSeq.s similarity index 89% rename from asm/non_matchings/code/audio_heap/func_800DE8E0.s rename to asm/non_matchings/code/audio_heap/Audio_AllocBankOrSeq.s index 7507cefc38..9d26ecbc9d 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE8E0.s +++ b/asm/non_matchings/code/audio_heap/Audio_AllocBankOrSeq.s @@ -1,4 +1,4 @@ -glabel func_800DE8E0 +glabel Audio_AllocBankOrSeq /* B55A80 800DE8E0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* B55A84 800DE8E4 AFB00018 */ sw $s0, 0x18($sp) /* B55A88 800DE8E8 00808025 */ move $s0, $a0 @@ -19,22 +19,22 @@ glabel func_800DE8E0 /* B55AC0 800DE920 1000000F */ b .L800DE960 /* B55AC4 800DE924 00000000 */ nop .L800DE928: -/* B55AC8 800DE928 3C088017 */ lui $t0, %hi(D_80171BA0) # $t0, 0x8017 -/* B55ACC 800DE92C 3C0B8017 */ lui $t3, %hi(D_80172618) # $t3, 0x8017 -/* B55AD0 800DE930 25081BA0 */ addiu $t0, %lo(D_80171BA0) # addiu $t0, $t0, 0x1ba0 +/* B55AC8 800DE928 3C088017 */ lui $t0, %hi(gAudioContext+0x2a20) # $t0, 0x8017 +/* B55ACC 800DE92C 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3498) # $t3, 0x8017 +/* B55AD0 800DE930 25081BA0 */ addiu $t0, %lo(gAudioContext+0x2a20) # addiu $t0, $t0, 0x1ba0 /* B55AD4 800DE934 1000000A */ b .L800DE960 -/* B55AD8 800DE938 256B2618 */ addiu $t3, %lo(D_80172618) # addiu $t3, $t3, 0x2618 +/* B55AD8 800DE938 256B2618 */ addiu $t3, %lo(gAudioContext+0x3498) # addiu $t3, $t3, 0x2618 .L800DE93C: -/* B55ADC 800DE93C 3C088017 */ lui $t0, %hi(D_80171CB0) # $t0, 0x8017 -/* B55AE0 800DE940 3C0B8017 */ lui $t3, %hi(D_801725E8) # $t3, 0x8017 -/* B55AE4 800DE944 25081CB0 */ addiu $t0, %lo(D_80171CB0) # addiu $t0, $t0, 0x1cb0 +/* B55ADC 800DE93C 3C088017 */ lui $t0, %hi(gAudioContext+0x2b30) # $t0, 0x8017 +/* B55AE0 800DE940 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3468) # $t3, 0x8017 +/* B55AE4 800DE944 25081CB0 */ addiu $t0, %lo(gAudioContext+0x2b30) # addiu $t0, $t0, 0x1cb0 /* B55AE8 800DE948 10000005 */ b .L800DE960 -/* B55AEC 800DE94C 256B25E8 */ addiu $t3, %lo(D_801725E8) # addiu $t3, $t3, 0x25e8 +/* B55AEC 800DE94C 256B25E8 */ addiu $t3, %lo(gAudioContext+0x3468) # addiu $t3, $t3, 0x25e8 .L800DE950: -/* B55AF0 800DE950 3C088017 */ lui $t0, %hi(D_80171DC0) # $t0, 0x8017 -/* B55AF4 800DE954 3C0B8017 */ lui $t3, %hi(D_801725B8) # $t3, 0x8017 -/* B55AF8 800DE958 25081DC0 */ addiu $t0, %lo(D_80171DC0) # addiu $t0, $t0, 0x1dc0 -/* B55AFC 800DE95C 256B25B8 */ addiu $t3, %lo(D_801725B8) # addiu $t3, $t3, 0x25b8 +/* B55AF0 800DE950 3C088017 */ lui $t0, %hi(gAudioContext+0x2c40) # $t0, 0x8017 +/* B55AF4 800DE954 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3438) # $t3, 0x8017 +/* B55AF8 800DE958 25081DC0 */ addiu $t0, %lo(gAudioContext+0x2c40) # addiu $t0, $t0, 0x1dc0 +/* B55AFC 800DE95C 256B25B8 */ addiu $t3, %lo(gAudioContext+0x3438) # addiu $t3, $t3, 0x25b8 .L800DE960: /* B55B00 800DE960 14C00192 */ bnez $a2, .L800DEFAC /* B55B04 800DE964 25040004 */ addiu $a0, $t0, 4 @@ -68,13 +68,13 @@ glabel func_800DE8E0 /* B55B60 800DE9C0 16090047 */ bne $s0, $t1, .L800DEAE0 /* B55B64 800DE9C4 24010004 */ li $at, 4 /* B55B68 800DE9C8 15810020 */ bne $t4, $at, .L800DEA4C -/* B55B6C 800DE9CC 3C058017 */ lui $a1, %hi(D_80171A14) # $a1, 0x8017 -/* B55B70 800DE9D0 8CA51A14 */ lw $a1, %lo(D_80171A14)($a1) +/* B55B6C 800DE9CC 3C058017 */ lui $a1, %hi(gAudioContext+0x2894) # $a1, 0x8017 +/* B55B70 800DE9D0 8CA51A14 */ lw $a1, %lo(gAudioContext+0x2894)($a1) /* B55B74 800DE9D4 00001825 */ move $v1, $zero -/* B55B78 800DE9D8 3C028017 */ lui $v0, %hi(D_801726AC) # $v0, 0x8017 +/* B55B78 800DE9D8 3C028017 */ lui $v0, %hi(gAudioContext+0x352c) # $v0, 0x8017 /* B55B7C 800DE9DC 18A0000D */ blez $a1, .L800DEA14 /* B55B80 800DE9E0 00C02025 */ move $a0, $a2 -/* B55B84 800DE9E4 8C4226AC */ lw $v0, %lo(D_801726AC)($v0) +/* B55B84 800DE9E4 8C4226AC */ lw $v0, %lo(gAudioContext+0x352c)($v0) .L800DE9E8: /* B55B88 800DE9E8 904E0033 */ lbu $t6, 0x33($v0) /* B55B8C 800DE9EC 55C60006 */ bnel $t6, $a2, .L800DEA08 @@ -94,7 +94,7 @@ glabel func_800DE8E0 /* B55BBC 800DEA1C AFA70024 */ sw $a3, 0x24($sp) /* B55BC0 800DEA20 AFA8004C */ sw $t0, 0x4c($sp) /* B55BC4 800DEA24 AFAB0030 */ sw $t3, 0x30($sp) -/* B55BC8 800DEA28 0C038686 */ jal func_800E1A18 +/* B55BC8 800DEA28 0C038686 */ jal Audio_SetBankLoadStatus /* B55BCC 800DEA2C A3AD003A */ sb $t5, 0x3a($sp) /* B55BD0 800DEA30 8FA70024 */ lw $a3, 0x24($sp) /* B55BD4 800DEA34 8FA8004C */ lw $t0, 0x4c($sp) @@ -106,13 +106,13 @@ glabel func_800DE8E0 .L800DEA4C: /* B55BEC 800DEA4C 24010004 */ li $at, 4 /* B55BF0 800DEA50 15A10023 */ bne $t5, $at, .L800DEAE0 -/* B55BF4 800DEA54 3C058017 */ lui $a1, %hi(D_80171A14) # $a1, 0x8017 -/* B55BF8 800DEA58 8CA51A14 */ lw $a1, %lo(D_80171A14)($a1) +/* B55BF4 800DEA54 3C058017 */ lui $a1, %hi(gAudioContext+0x2894) # $a1, 0x8017 +/* B55BF8 800DEA58 8CA51A14 */ lw $a1, %lo(gAudioContext+0x2894)($a1) /* B55BFC 800DEA5C 00001825 */ move $v1, $zero -/* B55C00 800DEA60 3C028017 */ lui $v0, %hi(D_801726AC) # $v0, 0x8017 +/* B55C00 800DEA60 3C028017 */ lui $v0, %hi(gAudioContext+0x352c) # $v0, 0x8017 /* B55C04 800DEA64 18A0000E */ blez $a1, .L800DEAA0 /* B55C08 800DEA68 00000000 */ nop -/* B55C0C 800DEA6C 8C4226AC */ lw $v0, %lo(D_801726AC)($v0) +/* B55C0C 800DEA6C 8C4226AC */ lw $v0, %lo(gAudioContext+0x352c)($v0) /* B55C10 800DEA70 84E4002A */ lh $a0, 0x2a($a3) .L800DEA74: /* B55C14 800DEA74 90590033 */ lbu $t9, 0x33($v0) @@ -135,7 +135,7 @@ glabel func_800DE8E0 /* B55C50 800DEAB0 AFAB0030 */ sw $t3, 0x30($sp) /* B55C54 800DEAB4 AFA8004C */ sw $t0, 0x4c($sp) /* B55C58 800DEAB8 AFA70024 */ sw $a3, 0x24($sp) -/* B55C5C 800DEABC 0C038686 */ jal func_800E1A18 +/* B55C5C 800DEABC 0C038686 */ jal Audio_SetBankLoadStatus /* B55C60 800DEAC0 24050003 */ li $a1, 3 /* B55C64 800DEAC4 8FA70024 */ lw $a3, 0x24($sp) /* B55C68 800DEAC8 8FA8004C */ lw $t0, 0x4c($sp) @@ -179,8 +179,8 @@ glabel func_800DE8E0 /* B55CE8 800DEB48 1600002F */ bnez $s0, .L800DEC08 /* B55CEC 800DEB4C 00000000 */ nop /* B55CF0 800DEB50 155F0016 */ bne $t2, $ra, .L800DEBAC -/* B55CF4 800DEB54 3C048017 */ lui $a0, %hi(D_801719DC) # $a0, 0x8017 -/* B55CF8 800DEB58 848419DC */ lh $a0, %lo(D_801719DC)($a0) +/* B55CF4 800DEB54 3C048017 */ lui $a0, %hi(gAudioContext+0x285c) # $a0, 0x8017 +/* B55CF8 800DEB58 848419DC */ lh $a0, %lo(gAudioContext+0x285c)($a0) /* B55CFC 800DEB5C 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 /* B55D00 800DEB60 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B55D04 800DEB64 1880000D */ blez $a0, .L800DEB9C @@ -206,8 +206,8 @@ glabel func_800DE8E0 /* B55D48 800DEBA8 ACE00000 */ sw $zero, ($a3) .L800DEBAC: /* B55D4C 800DEBAC 154C0048 */ bne $t2, $t4, .L800DECD0 -/* B55D50 800DEBB0 3C048017 */ lui $a0, %hi(D_801719DC) # $a0, 0x8017 -/* B55D54 800DEBB4 848419DC */ lh $a0, %lo(D_801719DC)($a0) +/* B55D50 800DEBB0 3C048017 */ lui $a0, %hi(gAudioContext+0x285c) # $a0, 0x8017 +/* B55D54 800DEBB4 848419DC */ lh $a0, %lo(gAudioContext+0x285c)($a0) /* B55D58 800DEBB8 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 /* B55D5C 800DEBBC 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B55D60 800DEBC0 1880000D */ blez $a0, .L800DEBF8 @@ -235,13 +235,13 @@ glabel func_800DE8E0 /* B55DA8 800DEC08 56090032 */ bnel $s0, $t1, .L800DECD4 /* B55DAC 800DEC0C 8CE20000 */ lw $v0, ($a3) /* B55DB0 800DEC10 155F0017 */ bne $t2, $ra, .L800DEC70 -/* B55DB4 800DEC14 3C058017 */ lui $a1, %hi(D_80171A14) # $a1, 0x8017 -/* B55DB8 800DEC18 8CA51A14 */ lw $a1, %lo(D_80171A14)($a1) +/* B55DB4 800DEC14 3C058017 */ lui $a1, %hi(gAudioContext+0x2894) # $a1, 0x8017 +/* B55DB8 800DEC18 8CA51A14 */ lw $a1, %lo(gAudioContext+0x2894)($a1) /* B55DBC 800DEC1C 00001825 */ move $v1, $zero -/* B55DC0 800DEC20 3C028017 */ lui $v0, %hi(D_801726AC) # $v0, 0x8017 +/* B55DC0 800DEC20 3C028017 */ lui $v0, %hi(gAudioContext+0x352c) # $v0, 0x8017 /* B55DC4 800DEC24 18A0000E */ blez $a1, .L800DEC60 /* B55DC8 800DEC28 00000000 */ nop -/* B55DCC 800DEC2C 8C4226AC */ lw $v0, %lo(D_801726AC)($v0) +/* B55DCC 800DEC2C 8C4226AC */ lw $v0, %lo(gAudioContext+0x352c)($v0) /* B55DD0 800DEC30 84E6001E */ lh $a2, 0x1e($a3) .L800DEC34: /* B55DD4 800DEC34 904F0033 */ lbu $t7, 0x33($v0) @@ -263,13 +263,13 @@ glabel func_800DE8E0 /* B55E0C 800DEC6C ACE00000 */ sw $zero, ($a3) .L800DEC70: /* B55E10 800DEC70 154C0017 */ bne $t2, $t4, .L800DECD0 -/* B55E14 800DEC74 3C058017 */ lui $a1, %hi(D_80171A14) # $a1, 0x8017 -/* B55E18 800DEC78 8CA51A14 */ lw $a1, %lo(D_80171A14)($a1) +/* B55E14 800DEC74 3C058017 */ lui $a1, %hi(gAudioContext+0x2894) # $a1, 0x8017 +/* B55E18 800DEC78 8CA51A14 */ lw $a1, %lo(gAudioContext+0x2894)($a1) /* B55E1C 800DEC7C 00001825 */ move $v1, $zero -/* B55E20 800DEC80 3C028017 */ lui $v0, %hi(D_801726AC) # $v0, 0x8017 +/* B55E20 800DEC80 3C028017 */ lui $v0, %hi(gAudioContext+0x352c) # $v0, 0x8017 /* B55E24 800DEC84 18A0000E */ blez $a1, .L800DECC0 /* B55E28 800DEC88 00000000 */ nop -/* B55E2C 800DEC8C 8C4226AC */ lw $v0, %lo(D_801726AC)($v0) +/* B55E2C 800DEC8C 8C4226AC */ lw $v0, %lo(gAudioContext+0x352c)($v0) /* B55E30 800DEC90 84E4002A */ lh $a0, 0x2a($a3) .L800DEC94: /* B55E34 800DEC94 904E0033 */ lbu $t6, 0x33($v0) @@ -497,7 +497,7 @@ glabel func_800DE8E0 .L800DEFAC: /* B5614C 800DEFAC AFA60058 */ sw $a2, 0x58($sp) /* B56150 800DEFB0 AFA8004C */ sw $t0, 0x4c($sp) -/* B56154 800DEFB4 0C0378F7 */ jal func_800DE3DC +/* B56154 800DEFB4 0C0378F7 */ jal Audio_Alloc /* B56158 800DEFB8 AFAB0030 */ sw $t3, 0x30($sp) /* B5615C 800DEFBC 8FA8004C */ lw $t0, 0x4c($sp) /* B56160 800DEFC0 2407000C */ li $a3, 12 diff --git a/asm/non_matchings/code/audio_heap/Audio_SoundAlloc.s b/asm/non_matchings/code/audio_heap/Audio_AllocDmaMemory.s similarity index 90% rename from asm/non_matchings/code/audio_heap/Audio_SoundAlloc.s rename to asm/non_matchings/code/audio_heap/Audio_AllocDmaMemory.s index 80c8fc6102..47b2007521 100644 --- a/asm/non_matchings/code/audio_heap/Audio_SoundAlloc.s +++ b/asm/non_matchings/code/audio_heap/Audio_AllocDmaMemory.s @@ -1,7 +1,7 @@ -glabel Audio_SoundAlloc +glabel Audio_AllocDmaMemory /* B554A8 800DE308 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B554AC 800DE30C AFBF0014 */ sw $ra, 0x14($sp) -/* B554B0 800DE310 0C0378F7 */ jal func_800DE3DC +/* B554B0 800DE310 0C0378F7 */ jal Audio_Alloc /* B554B4 800DE314 AFA50024 */ sw $a1, 0x24($sp) /* B554B8 800DE318 10400005 */ beqz $v0, .L800DE330 /* B554BC 800DE31C 00402025 */ move $a0, $v0 diff --git a/asm/non_matchings/code/audio_heap/func_800DE380.s b/asm/non_matchings/code/audio_heap/Audio_AllocZeroed.s similarity index 93% rename from asm/non_matchings/code/audio_heap/func_800DE380.s rename to asm/non_matchings/code/audio_heap/Audio_AllocZeroed.s index cf59907563..a7bc257b7b 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE380.s +++ b/asm/non_matchings/code/audio_heap/Audio_AllocZeroed.s @@ -1,7 +1,7 @@ -glabel func_800DE380 +glabel Audio_AllocZeroed /* B55520 800DE380 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B55524 800DE384 AFBF0014 */ sw $ra, 0x14($sp) -/* B55528 800DE388 0C0378F7 */ jal func_800DE3DC +/* B55528 800DE388 0C0378F7 */ jal Audio_Alloc /* B5552C 800DE38C AFA40018 */ sw $a0, 0x18($sp) /* B55530 800DE390 8FA40018 */ lw $a0, 0x18($sp) /* B55534 800DE394 1040000C */ beqz $v0, .L800DE3C8 diff --git a/asm/non_matchings/code/audio_heap/Audio_InitMainPools.s b/asm/non_matchings/code/audio_heap/Audio_InitMainPools.s new file mode 100644 index 0000000000..96a4432375 --- /dev/null +++ b/asm/non_matchings/code/audio_heap/Audio_InitMainPools.s @@ -0,0 +1,26 @@ +glabel Audio_InitMainPools +/* B55790 800DE5F0 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* B55794 800DE5F4 00803025 */ move $a2, $a0 +/* B55798 800DE5F8 AFBF0014 */ sw $ra, 0x14($sp) +/* B5579C 800DE5FC 3C048017 */ lui $a0, %hi(gAudioContext+0x29b0) # $a0, 0x8017 +/* B557A0 800DE600 3C058017 */ lui $a1, %hi(gAudioContext+0x3524) # $a1, 0x8017 +/* B557A4 800DE604 8CA526A4 */ lw $a1, %lo(gAudioContext+0x3524)($a1) +/* B557A8 800DE608 24841B30 */ addiu $a0, %lo(gAudioContext+0x29b0) # addiu $a0, $a0, 0x1b30 +/* B557AC 800DE60C 0C03790D */ jal Audio_SoundAllocPoolInit +/* B557B0 800DE610 AFA60018 */ sw $a2, 0x18($sp) +/* B557B4 800DE614 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 +/* B557B8 800DE618 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 +/* B557BC 800DE61C 8FA70018 */ lw $a3, 0x18($sp) +/* B557C0 800DE620 8C4E3524 */ lw $t6, 0x3524($v0) +/* B557C4 800DE624 8C4F3528 */ lw $t7, 0x3528($v0) +/* B557C8 800DE628 3C048017 */ lui $a0, %hi(gAudioContext+0x2990) # $a0, 0x8017 +/* B557CC 800DE62C 24841B10 */ addiu $a0, %lo(gAudioContext+0x2990) # addiu $a0, $a0, 0x1b10 +/* B557D0 800DE630 01C72821 */ addu $a1, $t6, $a3 +/* B557D4 800DE634 0C03790D */ jal Audio_SoundAllocPoolInit +/* B557D8 800DE638 01E73023 */ subu $a2, $t7, $a3 +/* B557DC 800DE63C 8FBF0014 */ lw $ra, 0x14($sp) +/* B557E0 800DE640 3C018017 */ lui $at, %hi(gAudioContext+0x29a0) # $at, 0x8017 +/* B557E4 800DE644 AC201B20 */ sw $zero, %lo(gAudioContext+0x29a0)($at) +/* B557E8 800DE648 03E00008 */ jr $ra +/* B557EC 800DE64C 27BD0018 */ addiu $sp, $sp, 0x18 + diff --git a/asm/non_matchings/code/audio_heap/func_800DE45C.s b/asm/non_matchings/code/audio_heap/Audio_PersistentPoolClear.s similarity index 88% rename from asm/non_matchings/code/audio_heap/func_800DE45C.s rename to asm/non_matchings/code/audio_heap/Audio_PersistentPoolClear.s index f50ddd0ea6..1c418fc681 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE45C.s +++ b/asm/non_matchings/code/audio_heap/Audio_PersistentPoolClear.s @@ -1,4 +1,4 @@ -glabel func_800DE45C +glabel Audio_PersistentPoolClear /* B555FC 800DE45C 8C8E0004 */ lw $t6, 4($a0) /* B55600 800DE460 AC800010 */ sw $zero, 0x10($a0) /* B55604 800DE464 AC800000 */ sw $zero, ($a0) diff --git a/asm/non_matchings/code/audio_heap/Audio_PersistentPoolsInit.s b/asm/non_matchings/code/audio_heap/Audio_PersistentPoolsInit.s new file mode 100644 index 0000000000..fccda65a66 --- /dev/null +++ b/asm/non_matchings/code/audio_heap/Audio_PersistentPoolsInit.s @@ -0,0 +1,51 @@ +glabel Audio_PersistentPoolsInit +/* B558F8 800DE758 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 +/* B558FC 800DE75C 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 +/* B55900 800DE760 8C4E2A00 */ lw $t6, 0x2a00($v0) +/* B55904 800DE764 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* B55908 800DE768 AFB00018 */ sw $s0, 0x18($sp) +/* B5590C 800DE76C 00808025 */ move $s0, $a0 +/* B55910 800DE770 AFBF001C */ sw $ra, 0x1c($sp) +/* B55914 800DE774 3C048017 */ lui $a0, %hi(gAudioContext+0x2a00) # $a0, 0x8017 +/* B55918 800DE778 AC4E2A04 */ sw $t6, 0x2a04($v0) +/* B5591C 800DE77C 8E050000 */ lw $a1, ($s0) +/* B55920 800DE780 0C0378F7 */ jal Audio_Alloc +/* B55924 800DE784 24841B80 */ addiu $a0, %lo(gAudioContext+0x2a00) # addiu $a0, $a0, 0x1b80 +/* B55928 800DE788 3C048017 */ lui $a0, %hi(gAudioContext+0x2a24) # $a0, 0x8017 +/* B5592C 800DE78C 24841BA4 */ addiu $a0, %lo(gAudioContext+0x2a24) # addiu $a0, $a0, 0x1ba4 +/* B55930 800DE790 00402825 */ move $a1, $v0 +/* B55934 800DE794 0C03790D */ jal Audio_SoundAllocPoolInit +/* B55938 800DE798 8E060000 */ lw $a2, ($s0) +/* B5593C 800DE79C 3C048017 */ lui $a0, %hi(gAudioContext+0x2a00) # $a0, 0x8017 +/* B55940 800DE7A0 24841B80 */ addiu $a0, %lo(gAudioContext+0x2a00) # addiu $a0, $a0, 0x1b80 +/* B55944 800DE7A4 0C0378F7 */ jal Audio_Alloc +/* B55948 800DE7A8 8E050004 */ lw $a1, 4($s0) +/* B5594C 800DE7AC 3C048017 */ lui $a0, %hi(gAudioContext+0x2b34) # $a0, 0x8017 +/* B55950 800DE7B0 24841CB4 */ addiu $a0, %lo(gAudioContext+0x2b34) # addiu $a0, $a0, 0x1cb4 +/* B55954 800DE7B4 00402825 */ move $a1, $v0 +/* B55958 800DE7B8 0C03790D */ jal Audio_SoundAllocPoolInit +/* B5595C 800DE7BC 8E060004 */ lw $a2, 4($s0) +/* B55960 800DE7C0 3C048017 */ lui $a0, %hi(gAudioContext+0x2a00) # $a0, 0x8017 +/* B55964 800DE7C4 24841B80 */ addiu $a0, %lo(gAudioContext+0x2a00) # addiu $a0, $a0, 0x1b80 +/* B55968 800DE7C8 0C0378F7 */ jal Audio_Alloc +/* B5596C 800DE7CC 8E050008 */ lw $a1, 8($s0) +/* B55970 800DE7D0 3C048017 */ lui $a0, %hi(gAudioContext+0x2c44) # $a0, 0x8017 +/* B55974 800DE7D4 24841DC4 */ addiu $a0, %lo(gAudioContext+0x2c44) # addiu $a0, $a0, 0x1dc4 +/* B55978 800DE7D8 00402825 */ move $a1, $v0 +/* B5597C 800DE7DC 0C03790D */ jal Audio_SoundAllocPoolInit +/* B55980 800DE7E0 8E060008 */ lw $a2, 8($s0) +/* B55984 800DE7E4 3C048017 */ lui $a0, %hi(gAudioContext+0x2a20) # $a0, 0x8017 +/* B55988 800DE7E8 0C037917 */ jal Audio_PersistentPoolClear +/* B5598C 800DE7EC 24841BA0 */ addiu $a0, %lo(gAudioContext+0x2a20) # addiu $a0, $a0, 0x1ba0 +/* B55990 800DE7F0 3C048017 */ lui $a0, %hi(gAudioContext+0x2b30) # $a0, 0x8017 +/* B55994 800DE7F4 0C037917 */ jal Audio_PersistentPoolClear +/* B55998 800DE7F8 24841CB0 */ addiu $a0, %lo(gAudioContext+0x2b30) # addiu $a0, $a0, 0x1cb0 +/* B5599C 800DE7FC 3C048017 */ lui $a0, %hi(gAudioContext+0x2c40) # $a0, 0x8017 +/* B559A0 800DE800 0C037917 */ jal Audio_PersistentPoolClear +/* B559A4 800DE804 24841DC0 */ addiu $a0, %lo(gAudioContext+0x2c40) # addiu $a0, $a0, 0x1dc0 +/* B559A8 800DE808 8FBF001C */ lw $ra, 0x1c($sp) +/* B559AC 800DE80C 8FB00018 */ lw $s0, 0x18($sp) +/* B559B0 800DE810 27BD0020 */ addiu $sp, $sp, 0x20 +/* B559B4 800DE814 03E00008 */ jr $ra +/* B559B8 800DE818 00000000 */ nop + diff --git a/asm/non_matchings/code/audio_heap/func_800DE6D4.s b/asm/non_matchings/code/audio_heap/Audio_SeqAndBankPoolInit.s similarity index 53% rename from asm/non_matchings/code/audio_heap/func_800DE6D4.s rename to asm/non_matchings/code/audio_heap/Audio_SeqAndBankPoolInit.s index bae19599dd..b5a6590575 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE6D4.s +++ b/asm/non_matchings/code/audio_heap/Audio_SeqAndBankPoolInit.s @@ -1,4 +1,4 @@ -glabel func_800DE6D4 +glabel Audio_SeqAndBankPoolInit /* B55874 800DE6D4 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 /* B55878 800DE6D8 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B5587C 800DE6DC 8C4E29F0 */ lw $t6, 0x29f0($v0) @@ -6,27 +6,27 @@ glabel func_800DE6D4 /* B55884 800DE6E4 AFA40018 */ sw $a0, 0x18($sp) /* B55888 800DE6E8 8FAF0018 */ lw $t7, 0x18($sp) /* B5588C 800DE6EC AFBF0014 */ sw $ra, 0x14($sp) -/* B55890 800DE6F0 3C048017 */ lui $a0, %hi(D_80171B70) # $a0, 0x8017 +/* B55890 800DE6F0 3C048017 */ lui $a0, %hi(gAudioContext+0x29f0) # $a0, 0x8017 /* B55894 800DE6F4 AC4E29F4 */ sw $t6, 0x29f4($v0) -/* B55898 800DE6F8 24841B70 */ addiu $a0, %lo(D_80171B70) # addiu $a0, $a0, 0x1b70 -/* B5589C 800DE6FC 0C0378F7 */ jal func_800DE3DC +/* B55898 800DE6F8 24841B70 */ addiu $a0, %lo(gAudioContext+0x29f0) # addiu $a0, $a0, 0x1b70 +/* B5589C 800DE6FC 0C0378F7 */ jal Audio_Alloc /* B558A0 800DE700 8DE50000 */ lw $a1, ($t7) /* B558A4 800DE704 8FB80018 */ lw $t8, 0x18($sp) -/* B558A8 800DE708 3C048017 */ lui $a0, %hi(D_80171B80) # $a0, 0x8017 -/* B558AC 800DE70C 24841B80 */ addiu $a0, %lo(D_80171B80) # addiu $a0, $a0, 0x1b80 +/* B558A8 800DE708 3C048017 */ lui $a0, %hi(gAudioContext+0x2a00) # $a0, 0x8017 +/* B558AC 800DE70C 24841B80 */ addiu $a0, %lo(gAudioContext+0x2a00) # addiu $a0, $a0, 0x1b80 /* B558B0 800DE710 00402825 */ move $a1, $v0 -/* B558B4 800DE714 0C03790D */ jal func_800DE434 +/* B558B4 800DE714 0C03790D */ jal Audio_SoundAllocPoolInit /* B558B8 800DE718 8F060000 */ lw $a2, ($t8) /* B558BC 800DE71C 8FB90018 */ lw $t9, 0x18($sp) -/* B558C0 800DE720 3C048017 */ lui $a0, %hi(D_80171B70) # $a0, 0x8017 -/* B558C4 800DE724 24841B70 */ addiu $a0, %lo(D_80171B70) # addiu $a0, $a0, 0x1b70 -/* B558C8 800DE728 0C0378F7 */ jal func_800DE3DC +/* B558C0 800DE720 3C048017 */ lui $a0, %hi(gAudioContext+0x29f0) # $a0, 0x8017 +/* B558C4 800DE724 24841B70 */ addiu $a0, %lo(gAudioContext+0x29f0) # addiu $a0, $a0, 0x1b70 +/* B558C8 800DE728 0C0378F7 */ jal Audio_Alloc /* B558CC 800DE72C 8F250004 */ lw $a1, 4($t9) /* B558D0 800DE730 8FA80018 */ lw $t0, 0x18($sp) -/* B558D4 800DE734 3C048017 */ lui $a0, %hi(D_80171B90) # $a0, 0x8017 -/* B558D8 800DE738 24841B90 */ addiu $a0, %lo(D_80171B90) # addiu $a0, $a0, 0x1b90 +/* B558D4 800DE734 3C048017 */ lui $a0, %hi(gAudioContext+0x2a10) # $a0, 0x8017 +/* B558D8 800DE738 24841B90 */ addiu $a0, %lo(gAudioContext+0x2a10) # addiu $a0, $a0, 0x1b90 /* B558DC 800DE73C 00402825 */ move $a1, $v0 -/* B558E0 800DE740 0C03790D */ jal func_800DE434 +/* B558E0 800DE740 0C03790D */ jal Audio_SoundAllocPoolInit /* B558E4 800DE744 8D060004 */ lw $a2, 4($t0) /* B558E8 800DE748 8FBF0014 */ lw $ra, 0x14($sp) /* B558EC 800DE74C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/code/audio_heap/func_800DE650.s b/asm/non_matchings/code/audio_heap/Audio_SessionPoolsInit.s similarity index 54% rename from asm/non_matchings/code/audio_heap/func_800DE650.s rename to asm/non_matchings/code/audio_heap/Audio_SessionPoolsInit.s index 9c09f014a4..ff9b330830 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE650.s +++ b/asm/non_matchings/code/audio_heap/Audio_SessionPoolsInit.s @@ -1,4 +1,4 @@ -glabel func_800DE650 +glabel Audio_SessionPoolsInit /* B557F0 800DE650 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 /* B557F4 800DE654 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B557F8 800DE658 8C4E2990 */ lw $t6, 0x2990($v0) @@ -6,27 +6,27 @@ glabel func_800DE650 /* B55800 800DE660 AFA40018 */ sw $a0, 0x18($sp) /* B55804 800DE664 8FAF0018 */ lw $t7, 0x18($sp) /* B55808 800DE668 AFBF0014 */ sw $ra, 0x14($sp) -/* B5580C 800DE66C 3C048017 */ lui $a0, %hi(D_80171B10) # $a0, 0x8017 +/* B5580C 800DE66C 3C048017 */ lui $a0, %hi(gAudioContext+0x2990) # $a0, 0x8017 /* B55810 800DE670 AC4E2994 */ sw $t6, 0x2994($v0) -/* B55814 800DE674 24841B10 */ addiu $a0, %lo(D_80171B10) # addiu $a0, $a0, 0x1b10 -/* B55818 800DE678 0C0378F7 */ jal func_800DE3DC +/* B55814 800DE674 24841B10 */ addiu $a0, %lo(gAudioContext+0x2990) # addiu $a0, $a0, 0x1b10 +/* B55818 800DE678 0C0378F7 */ jal Audio_Alloc /* B5581C 800DE67C 8DE50000 */ lw $a1, ($t7) /* B55820 800DE680 8FB80018 */ lw $t8, 0x18($sp) -/* B55824 800DE684 3C048017 */ lui $a0, %hi(D_80171B40) # $a0, 0x8017 -/* B55828 800DE688 24841B40 */ addiu $a0, %lo(D_80171B40) # addiu $a0, $a0, 0x1b40 +/* B55824 800DE684 3C048017 */ lui $a0, %hi(gAudioContext+0x29c0) # $a0, 0x8017 +/* B55828 800DE688 24841B40 */ addiu $a0, %lo(gAudioContext+0x29c0) # addiu $a0, $a0, 0x1b40 /* B5582C 800DE68C 00402825 */ move $a1, $v0 -/* B55830 800DE690 0C03790D */ jal func_800DE434 +/* B55830 800DE690 0C03790D */ jal Audio_SoundAllocPoolInit /* B55834 800DE694 8F060000 */ lw $a2, ($t8) /* B55838 800DE698 8FB90018 */ lw $t9, 0x18($sp) -/* B5583C 800DE69C 3C048017 */ lui $a0, %hi(D_80171B10) # $a0, 0x8017 -/* B55840 800DE6A0 24841B10 */ addiu $a0, %lo(D_80171B10) # addiu $a0, $a0, 0x1b10 -/* B55844 800DE6A4 0C0378F7 */ jal func_800DE3DC +/* B5583C 800DE69C 3C048017 */ lui $a0, %hi(gAudioContext+0x2990) # $a0, 0x8017 +/* B55840 800DE6A0 24841B10 */ addiu $a0, %lo(gAudioContext+0x2990) # addiu $a0, $a0, 0x1b10 +/* B55844 800DE6A4 0C0378F7 */ jal Audio_Alloc /* B55848 800DE6A8 8F25000C */ lw $a1, 0xc($t9) /* B5584C 800DE6AC 8FA80018 */ lw $t0, 0x18($sp) -/* B55850 800DE6B0 3C048017 */ lui $a0, %hi(D_80171B70) # $a0, 0x8017 -/* B55854 800DE6B4 24841B70 */ addiu $a0, %lo(D_80171B70) # addiu $a0, $a0, 0x1b70 +/* B55850 800DE6B0 3C048017 */ lui $a0, %hi(gAudioContext+0x29f0) # $a0, 0x8017 +/* B55854 800DE6B4 24841B70 */ addiu $a0, %lo(gAudioContext+0x29f0) # addiu $a0, $a0, 0x1b70 /* B55858 800DE6B8 00402825 */ move $a1, $v0 -/* B5585C 800DE6BC 0C03790D */ jal func_800DE434 +/* B5585C 800DE6BC 0C03790D */ jal Audio_SoundAllocPoolInit /* B55860 800DE6C0 8D06000C */ lw $a2, 0xc($t0) /* B55864 800DE6C4 8FBF0014 */ lw $ra, 0x14($sp) /* B55868 800DE6C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/code/audio_heap/func_800DE434.s b/asm/non_matchings/code/audio_heap/Audio_SoundAllocPoolInit.s similarity index 94% rename from asm/non_matchings/code/audio_heap/func_800DE434.s rename to asm/non_matchings/code/audio_heap/Audio_SoundAllocPoolInit.s index c80b453fd9..e66f114661 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE434.s +++ b/asm/non_matchings/code/audio_heap/Audio_SoundAllocPoolInit.s @@ -1,4 +1,4 @@ -glabel func_800DE434 +glabel Audio_SoundAllocPoolInit /* B555D4 800DE434 24A2000F */ addiu $v0, $a1, 0xf /* B555D8 800DE438 2401FFF0 */ li $at, -16 /* B555DC 800DE43C 30AE000F */ andi $t6, $a1, 0xf diff --git a/asm/non_matchings/code/audio_heap/func_800DE470.s b/asm/non_matchings/code/audio_heap/Audio_TemporaryPoolClear.s similarity index 95% rename from asm/non_matchings/code/audio_heap/func_800DE470.s rename to asm/non_matchings/code/audio_heap/Audio_TemporaryPoolClear.s index fc8ed498c1..6f233e71fc 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE470.s +++ b/asm/non_matchings/code/audio_heap/Audio_TemporaryPoolClear.s @@ -1,4 +1,4 @@ -glabel func_800DE470 +glabel Audio_TemporaryPoolClear /* B55610 800DE470 8C820004 */ lw $v0, 4($a0) /* B55614 800DE474 8C8E000C */ lw $t6, 0xc($a0) /* B55618 800DE478 2403FFFF */ li $v1, -1 diff --git a/asm/non_matchings/code/audio_heap/Audio_TemporaryPoolsInit.s b/asm/non_matchings/code/audio_heap/Audio_TemporaryPoolsInit.s new file mode 100644 index 0000000000..7f24e4476d --- /dev/null +++ b/asm/non_matchings/code/audio_heap/Audio_TemporaryPoolsInit.s @@ -0,0 +1,51 @@ +glabel Audio_TemporaryPoolsInit +/* B559BC 800DE81C 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 +/* B559C0 800DE820 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 +/* B559C4 800DE824 8C4E2A10 */ lw $t6, 0x2a10($v0) +/* B559C8 800DE828 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* B559CC 800DE82C AFB00018 */ sw $s0, 0x18($sp) +/* B559D0 800DE830 00808025 */ move $s0, $a0 +/* B559D4 800DE834 AFBF001C */ sw $ra, 0x1c($sp) +/* B559D8 800DE838 3C048017 */ lui $a0, %hi(gAudioContext+0x2a10) # $a0, 0x8017 +/* B559DC 800DE83C AC4E2A14 */ sw $t6, 0x2a14($v0) +/* B559E0 800DE840 8E050000 */ lw $a1, ($s0) +/* B559E4 800DE844 0C0378F7 */ jal Audio_Alloc +/* B559E8 800DE848 24841B90 */ addiu $a0, %lo(gAudioContext+0x2a10) # addiu $a0, $a0, 0x1b90 +/* B559EC 800DE84C 3C048017 */ lui $a0, %hi(gAudioContext+0x2af8) # $a0, 0x8017 +/* B559F0 800DE850 24841C78 */ addiu $a0, %lo(gAudioContext+0x2af8) # addiu $a0, $a0, 0x1c78 +/* B559F4 800DE854 00402825 */ move $a1, $v0 +/* B559F8 800DE858 0C03790D */ jal Audio_SoundAllocPoolInit +/* B559FC 800DE85C 8E060000 */ lw $a2, ($s0) +/* B55A00 800DE860 3C048017 */ lui $a0, %hi(gAudioContext+0x2a10) # $a0, 0x8017 +/* B55A04 800DE864 24841B90 */ addiu $a0, %lo(gAudioContext+0x2a10) # addiu $a0, $a0, 0x1b90 +/* B55A08 800DE868 0C0378F7 */ jal Audio_Alloc +/* B55A0C 800DE86C 8E050004 */ lw $a1, 4($s0) +/* B55A10 800DE870 3C048017 */ lui $a0, %hi(gAudioContext+0x2c08) # $a0, 0x8017 +/* B55A14 800DE874 24841D88 */ addiu $a0, %lo(gAudioContext+0x2c08) # addiu $a0, $a0, 0x1d88 +/* B55A18 800DE878 00402825 */ move $a1, $v0 +/* B55A1C 800DE87C 0C03790D */ jal Audio_SoundAllocPoolInit +/* B55A20 800DE880 8E060004 */ lw $a2, 4($s0) +/* B55A24 800DE884 3C048017 */ lui $a0, %hi(gAudioContext+0x2a10) # $a0, 0x8017 +/* B55A28 800DE888 24841B90 */ addiu $a0, %lo(gAudioContext+0x2a10) # addiu $a0, $a0, 0x1b90 +/* B55A2C 800DE88C 0C0378F7 */ jal Audio_Alloc +/* B55A30 800DE890 8E050008 */ lw $a1, 8($s0) +/* B55A34 800DE894 3C048017 */ lui $a0, %hi(gAudioContext+0x2d18) # $a0, 0x8017 +/* B55A38 800DE898 24841E98 */ addiu $a0, %lo(gAudioContext+0x2d18) # addiu $a0, $a0, 0x1e98 +/* B55A3C 800DE89C 00402825 */ move $a1, $v0 +/* B55A40 800DE8A0 0C03790D */ jal Audio_SoundAllocPoolInit +/* B55A44 800DE8A4 8E060008 */ lw $a2, 8($s0) +/* B55A48 800DE8A8 3C048017 */ lui $a0, %hi(gAudioContext+0x2af4) # $a0, 0x8017 +/* B55A4C 800DE8AC 0C03791C */ jal Audio_TemporaryPoolClear +/* B55A50 800DE8B0 24841C74 */ addiu $a0, %lo(gAudioContext+0x2af4) # addiu $a0, $a0, 0x1c74 +/* B55A54 800DE8B4 3C048017 */ lui $a0, %hi(gAudioContext+0x2c04) # $a0, 0x8017 +/* B55A58 800DE8B8 0C03791C */ jal Audio_TemporaryPoolClear +/* B55A5C 800DE8BC 24841D84 */ addiu $a0, %lo(gAudioContext+0x2c04) # addiu $a0, $a0, 0x1d84 +/* B55A60 800DE8C0 3C048017 */ lui $a0, %hi(gAudioContext+0x2d14) # $a0, 0x8017 +/* B55A64 800DE8C4 0C03791C */ jal Audio_TemporaryPoolClear +/* B55A68 800DE8C8 24841E94 */ addiu $a0, %lo(gAudioContext+0x2d14) # addiu $a0, $a0, 0x1e94 +/* B55A6C 800DE8CC 8FBF001C */ lw $ra, 0x1c($sp) +/* B55A70 800DE8D0 8FB00018 */ lw $s0, 0x18($sp) +/* B55A74 800DE8D4 27BD0020 */ addiu $sp, $sp, 0x20 +/* B55A78 800DE8D8 03E00008 */ jr $ra +/* B55A7C 800DE8DC 00000000 */ nop + diff --git a/asm/non_matchings/code/audio_heap/func_800DDE20.s b/asm/non_matchings/code/audio_heap/func_800DDE20.s index 36d8dec781..6ed91b3a7d 100644 --- a/asm/non_matchings/code/audio_heap/func_800DDE20.s +++ b/asm/non_matchings/code/audio_heap/func_800DDE20.s @@ -1,8 +1,8 @@ glabel func_800DDE20 /* B54FC0 800DDE20 3C014380 */ li $at, 0x43800000 # 0.000000 /* B54FC4 800DDE24 44812000 */ mtc1 $at, $f4 -/* B54FC8 800DDE28 3C018017 */ lui $at, %hi(D_801719E8) -/* B54FCC 800DDE2C C42619E8 */ lwc1 $f6, %lo(D_801719E8)($at) +/* B54FC8 800DDE28 3C018017 */ lui $at, %hi(gAudioContext+0x2868) +/* B54FCC 800DDE2C C42619E8 */ lwc1 $f6, %lo(gAudioContext+0x2868)($at) /* B54FD0 800DDE30 46062202 */ mul.s $f8, $f4, $f6 /* B54FD4 800DDE34 03E00008 */ jr $ra /* B54FD8 800DDE38 460C4003 */ div.s $f0, $f8, $f12 diff --git a/asm/non_matchings/code/audio_heap/func_800DDF80.s b/asm/non_matchings/code/audio_heap/func_800DDF80.s index a94310f3ca..fa6a373c65 100644 --- a/asm/non_matchings/code/audio_heap/func_800DDF80.s +++ b/asm/non_matchings/code/audio_heap/func_800DDF80.s @@ -1,7 +1,7 @@ glabel func_800DDF80 /* B55120 800DDF80 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B55124 800DDF84 3C028017 */ lui $v0, %hi(D_8016F1B0) # $v0, 0x8017 -/* B55128 800DDF88 2442F1B0 */ addiu $v0, %lo(D_8016F1B0) # addiu $v0, $v0, -0xe50 +/* B55124 800DDF84 3C028017 */ lui $v0, %hi(gAudioContext+0x30) # $v0, 0x8017 +/* B55128 800DDF88 2442F1B0 */ addiu $v0, %lo(gAudioContext+0x30) # addiu $v0, $v0, -0xe50 /* B5512C 800DDF8C 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 /* B55130 800DDF90 24040005 */ li $a0, 5 /* B55134 800DDF94 906E3468 */ lbu $t6, 0x3468($v1) @@ -15,8 +15,8 @@ glabel func_800DDF80 /* B5514C 800DDFAC 5420FFFA */ bnezl $at, .L800DDF98 /* B55150 800DDFB0 906E3468 */ lbu $t6, 0x3468($v1) /* B55154 800DDFB4 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B55158 800DDFB8 3C028017 */ lui $v0, %hi(D_8016F1B0) # $v0, 0x8017 -/* B5515C 800DDFBC 2442F1B0 */ addiu $v0, %lo(D_8016F1B0) # addiu $v0, $v0, -0xe50 +/* B55158 800DDFB8 3C028017 */ lui $v0, %hi(gAudioContext+0x30) # $v0, 0x8017 +/* B5515C 800DDFBC 2442F1B0 */ addiu $v0, %lo(gAudioContext+0x30) # addiu $v0, $v0, -0xe50 /* B55160 800DDFC0 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 /* B55164 800DDFC4 906F3438 */ lbu $t7, 0x3438($v1) .L800DDFC8: @@ -29,8 +29,8 @@ glabel func_800DDF80 /* B5517C 800DDFDC 5420FFFA */ bnezl $at, .L800DDFC8 /* B55180 800DDFE0 906F3438 */ lbu $t7, 0x3438($v1) /* B55184 800DDFE4 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B55188 800DDFE8 3C028017 */ lui $v0, %hi(D_8016F200) # $v0, 0x8017 -/* B5518C 800DDFEC 2442F200 */ addiu $v0, %lo(D_8016F200) # addiu $v0, $v0, -0xe00 +/* B55188 800DDFE8 3C028017 */ lui $v0, %hi(gAudioContext+0x80) # $v0, 0x8017 +/* B5518C 800DDFEC 2442F200 */ addiu $v0, %lo(gAudioContext+0x80) # addiu $v0, $v0, -0xe00 /* B55190 800DDFF0 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 /* B55194 800DDFF4 90783498 */ lbu $t8, 0x3498($v1) .L800DDFF8: diff --git a/asm/non_matchings/code/audio_heap/func_800DE1B4.s b/asm/non_matchings/code/audio_heap/func_800DE1B4.s index 9727bc14b3..d22a3d5f4a 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE1B4.s +++ b/asm/non_matchings/code/audio_heap/func_800DE1B4.s @@ -1,6 +1,6 @@ glabel func_800DE1B4 -/* B55354 800DE1B4 3C028017 */ lui $v0, %hi(D_801719DC) # $v0, 0x8017 -/* B55358 800DE1B8 844219DC */ lh $v0, %lo(D_801719DC)($v0) +/* B55354 800DE1B4 3C028017 */ lui $v0, %hi(gAudioContext+0x285c) # $v0, 0x8017 +/* B55358 800DE1B8 844219DC */ lh $v0, %lo(gAudioContext+0x285c)($v0) /* B5535C 800DE1BC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* B55360 800DE1C0 AFB20020 */ sw $s2, 0x20($sp) /* B55364 800DE1C4 AFB1001C */ sw $s1, 0x1c($sp) @@ -21,8 +21,8 @@ glabel func_800DE1B4 /* B5539C 800DE1FC 26310001 */ addiu $s1, $s1, 1 /* B553A0 800DE200 0C03A6DB */ jal Audio_SequencePlayerDisable /* B553A4 800DE204 26043530 */ addiu $a0, $s0, 0x3530 -/* B553A8 800DE208 3C028017 */ lui $v0, %hi(D_801719DC) # $v0, 0x8017 -/* B553AC 800DE20C 844219DC */ lh $v0, %lo(D_801719DC)($v0) +/* B553A8 800DE208 3C028017 */ lui $v0, %hi(gAudioContext+0x285c) # $v0, 0x8017 +/* B553AC 800DE20C 844219DC */ lh $v0, %lo(gAudioContext+0x285c)($v0) /* B553B0 800DE210 26310001 */ addiu $s1, $s1, 1 .L800DE214: /* B553B4 800DE214 0222082A */ slt $at, $s1, $v0 diff --git a/asm/non_matchings/code/audio_heap/func_800DE258.s b/asm/non_matchings/code/audio_heap/func_800DE258.s index 5882531773..040e3305bb 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE258.s +++ b/asm/non_matchings/code/audio_heap/func_800DE258.s @@ -1,20 +1,20 @@ glabel func_800DE258 -/* B553F8 800DE258 3C0E8017 */ lui $t6, %hi(D_80171B20) # $t6, 0x8017 -/* B553FC 800DE25C 8DCE1B20 */ lw $t6, %lo(D_80171B20)($t6) +/* B553F8 800DE258 3C0E8017 */ lui $t6, %hi(gAudioContext+0x29a0) # $t6, 0x8017 +/* B553FC 800DE25C 8DCE1B20 */ lw $t6, %lo(gAudioContext+0x29a0)($t6) /* B55400 800DE260 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B55404 800DE264 AFBF0014 */ sw $ra, 0x14($sp) /* B55408 800DE268 AFA40018 */ sw $a0, 0x18($sp) /* B5540C 800DE26C AFA5001C */ sw $a1, 0x1c($sp) /* B55410 800DE270 11C00005 */ beqz $t6, .L800DE288 /* B55414 800DE274 00001825 */ move $v1, $zero -/* B55418 800DE278 3C048017 */ lui $a0, %hi(D_80171B20) # $a0, 0x8017 -/* B5541C 800DE27C 0C0378E0 */ jal func_800DE380 -/* B55420 800DE280 24841B20 */ addiu $a0, %lo(D_80171B20) # addiu $a0, $a0, 0x1b20 +/* B55418 800DE278 3C048017 */ lui $a0, %hi(gAudioContext+0x29a0) # $a0, 0x8017 +/* B5541C 800DE27C 0C0378E0 */ jal Audio_AllocZeroed +/* B55420 800DE280 24841B20 */ addiu $a0, %lo(gAudioContext+0x29a0) # addiu $a0, $a0, 0x1b20 /* B55424 800DE284 00401825 */ move $v1, $v0 .L800DE288: /* B55428 800DE288 14600004 */ bnez $v1, .L800DE29C /* B5542C 800DE28C 8FA40018 */ lw $a0, 0x18($sp) -/* B55430 800DE290 0C0378E0 */ jal func_800DE380 +/* B55430 800DE290 0C0378E0 */ jal Audio_AllocZeroed /* B55434 800DE294 8FA5001C */ lw $a1, 0x1c($sp) /* B55438 800DE298 00401825 */ move $v1, $v0 .L800DE29C: diff --git a/asm/non_matchings/code/audio_heap/func_800DE2B0.s b/asm/non_matchings/code/audio_heap/func_800DE2B0.s index 459b3e4cd7..b259d12f33 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE2B0.s +++ b/asm/non_matchings/code/audio_heap/func_800DE2B0.s @@ -1,20 +1,20 @@ glabel func_800DE2B0 -/* B55450 800DE2B0 3C0E8017 */ lui $t6, %hi(D_80171B20) # $t6, 0x8017 -/* B55454 800DE2B4 8DCE1B20 */ lw $t6, %lo(D_80171B20)($t6) +/* B55450 800DE2B0 3C0E8017 */ lui $t6, %hi(gAudioContext+0x29a0) # $t6, 0x8017 +/* B55454 800DE2B4 8DCE1B20 */ lw $t6, %lo(gAudioContext+0x29a0)($t6) /* B55458 800DE2B8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B5545C 800DE2BC AFBF0014 */ sw $ra, 0x14($sp) /* B55460 800DE2C0 AFA40018 */ sw $a0, 0x18($sp) /* B55464 800DE2C4 AFA5001C */ sw $a1, 0x1c($sp) /* B55468 800DE2C8 11C00005 */ beqz $t6, .L800DE2E0 /* B5546C 800DE2CC 00001825 */ move $v1, $zero -/* B55470 800DE2D0 3C048017 */ lui $a0, %hi(D_80171B20) # $a0, 0x8017 -/* B55474 800DE2D4 0C0378F7 */ jal func_800DE3DC -/* B55478 800DE2D8 24841B20 */ addiu $a0, %lo(D_80171B20) # addiu $a0, $a0, 0x1b20 +/* B55470 800DE2D0 3C048017 */ lui $a0, %hi(gAudioContext+0x29a0) # $a0, 0x8017 +/* B55474 800DE2D4 0C0378F7 */ jal Audio_Alloc +/* B55478 800DE2D8 24841B20 */ addiu $a0, %lo(gAudioContext+0x29a0) # addiu $a0, $a0, 0x1b20 /* B5547C 800DE2DC 00401825 */ move $v1, $v0 .L800DE2E0: /* B55480 800DE2E0 14600004 */ bnez $v1, .L800DE2F4 /* B55484 800DE2E4 8FA40018 */ lw $a0, 0x18($sp) -/* B55488 800DE2E8 0C0378F7 */ jal func_800DE3DC +/* B55488 800DE2E8 0C0378F7 */ jal Audio_Alloc /* B5548C 800DE2EC 8FA5001C */ lw $a1, 0x1c($sp) /* B55490 800DE2F0 00401825 */ move $v1, $v0 .L800DE2F4: diff --git a/asm/non_matchings/code/audio_heap/func_800DE344.s b/asm/non_matchings/code/audio_heap/func_800DE344.s index b93ee2e7b0..189cc0f6f5 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE344.s +++ b/asm/non_matchings/code/audio_heap/func_800DE344.s @@ -1,7 +1,7 @@ glabel func_800DE344 /* B554E4 800DE344 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B554E8 800DE348 AFBF0014 */ sw $ra, 0x14($sp) -/* B554EC 800DE34C 0C0378E0 */ jal func_800DE380 +/* B554EC 800DE34C 0C0378E0 */ jal Audio_AllocZeroed /* B554F0 800DE350 AFA50024 */ sw $a1, 0x24($sp) /* B554F4 800DE354 10400005 */ beqz $v0, .L800DE36C /* B554F8 800DE358 00402025 */ move $a0, $v0 diff --git a/asm/non_matchings/code/audio_heap/func_800DE4B0.s b/asm/non_matchings/code/audio_heap/func_800DE4B0.s index a8d48f9f47..6c84cda114 100644 --- a/asm/non_matchings/code/audio_heap/func_800DE4B0.s +++ b/asm/non_matchings/code/audio_heap/func_800DE4B0.s @@ -5,29 +5,29 @@ glabel func_800DE4B0 /* B5565C 800DE4BC 00803025 */ move $a2, $a0 /* B55660 800DE4C0 24010001 */ li $at, 1 /* B55664 800DE4C4 1081000C */ beq $a0, $at, .L800DE4F8 -/* B55668 800DE4C8 3C038017 */ lui $v1, %hi(D_80171CB0) +/* B55668 800DE4C8 3C038017 */ lui $v1, %hi(gAudioContext+0x2b30) /* B5566C 800DE4CC 24010002 */ li $at, 2 /* B55670 800DE4D0 1081000E */ beq $a0, $at, .L800DE50C -/* B55674 800DE4D4 3C038017 */ lui $v1, %hi(D_80171DC0) +/* B55674 800DE4D4 3C038017 */ lui $v1, %hi(gAudioContext+0x2c40) /* B55678 800DE4D8 10000010 */ b .L800DE51C /* B5567C 800DE4DC 8FA3002C */ lw $v1, 0x2c($sp) .L800DE4E0: -/* B55680 800DE4E0 3C0E8017 */ lui $t6, %hi(D_80172618) # $t6, 0x8017 -/* B55684 800DE4E4 3C038017 */ lui $v1, %hi(D_80171BA0) # $v1, 0x8017 -/* B55688 800DE4E8 25CE2618 */ addiu $t6, %lo(D_80172618) # addiu $t6, $t6, 0x2618 -/* B5568C 800DE4EC 24631BA0 */ addiu $v1, %lo(D_80171BA0) # addiu $v1, $v1, 0x1ba0 +/* B55680 800DE4E0 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3498) # $t6, 0x8017 +/* B55684 800DE4E4 3C038017 */ lui $v1, %hi(gAudioContext+0x2a20) # $v1, 0x8017 +/* B55688 800DE4E8 25CE2618 */ addiu $t6, %lo(gAudioContext+0x3498) # addiu $t6, $t6, 0x2618 +/* B5568C 800DE4EC 24631BA0 */ addiu $v1, %lo(gAudioContext+0x2a20) # addiu $v1, $v1, 0x1ba0 /* B55690 800DE4F0 1000000A */ b .L800DE51C /* B55694 800DE4F4 AFAE001C */ sw $t6, 0x1c($sp) .L800DE4F8: -/* B55698 800DE4F8 3C0F8017 */ lui $t7, %hi(D_801725E8) # $t7, 0x8017 -/* B5569C 800DE4FC 25EF25E8 */ addiu $t7, %lo(D_801725E8) # addiu $t7, $t7, 0x25e8 -/* B556A0 800DE500 24631CB0 */ addiu $v1, %lo(D_80171CB0) +/* B55698 800DE4F8 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3468) # $t7, 0x8017 +/* B5569C 800DE4FC 25EF25E8 */ addiu $t7, %lo(gAudioContext+0x3468) # addiu $t7, $t7, 0x25e8 +/* B556A0 800DE500 24631CB0 */ addiu $v1, %lo(gAudioContext+0x2b30) /* B556A4 800DE504 10000005 */ b .L800DE51C /* B556A8 800DE508 AFAF001C */ sw $t7, 0x1c($sp) .L800DE50C: -/* B556AC 800DE50C 3C188017 */ lui $t8, %hi(D_801725B8) # $t8, 0x8017 -/* B556B0 800DE510 271825B8 */ addiu $t8, %lo(D_801725B8) # addiu $t8, $t8, 0x25b8 -/* B556B4 800DE514 24631DC0 */ addiu $v1, %lo(D_80171DC0) +/* B556AC 800DE50C 3C188017 */ lui $t8, %hi(gAudioContext+0x3438) # $t8, 0x8017 +/* B556B0 800DE510 271825B8 */ addiu $t8, %lo(gAudioContext+0x3438) # addiu $t8, $t8, 0x25b8 +/* B556B4 800DE514 24631DC0 */ addiu $v1, %lo(gAudioContext+0x2c40) /* B556B8 800DE518 AFB8001C */ sw $t8, 0x1c($sp) .L800DE51C: /* B556BC 800DE51C 8C650000 */ lw $a1, ($v1) diff --git a/asm/non_matchings/code/audio_heap/func_800DE5F0.s b/asm/non_matchings/code/audio_heap/func_800DE5F0.s deleted file mode 100644 index b2fe7d61aa..0000000000 --- a/asm/non_matchings/code/audio_heap/func_800DE5F0.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_800DE5F0 -/* B55790 800DE5F0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B55794 800DE5F4 00803025 */ move $a2, $a0 -/* B55798 800DE5F8 AFBF0014 */ sw $ra, 0x14($sp) -/* B5579C 800DE5FC 3C048017 */ lui $a0, %hi(D_80171B30) # $a0, 0x8017 -/* B557A0 800DE600 3C058017 */ lui $a1, %hi(D_801726A4) # $a1, 0x8017 -/* B557A4 800DE604 8CA526A4 */ lw $a1, %lo(D_801726A4)($a1) -/* B557A8 800DE608 24841B30 */ addiu $a0, %lo(D_80171B30) # addiu $a0, $a0, 0x1b30 -/* B557AC 800DE60C 0C03790D */ jal func_800DE434 -/* B557B0 800DE610 AFA60018 */ sw $a2, 0x18($sp) -/* B557B4 800DE614 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B557B8 800DE618 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 -/* B557BC 800DE61C 8FA70018 */ lw $a3, 0x18($sp) -/* B557C0 800DE620 8C4E3524 */ lw $t6, 0x3524($v0) -/* B557C4 800DE624 8C4F3528 */ lw $t7, 0x3528($v0) -/* B557C8 800DE628 3C048017 */ lui $a0, %hi(D_80171B10) # $a0, 0x8017 -/* B557CC 800DE62C 24841B10 */ addiu $a0, %lo(D_80171B10) # addiu $a0, $a0, 0x1b10 -/* B557D0 800DE630 01C72821 */ addu $a1, $t6, $a3 -/* B557D4 800DE634 0C03790D */ jal func_800DE434 -/* B557D8 800DE638 01E73023 */ subu $a2, $t7, $a3 -/* B557DC 800DE63C 8FBF0014 */ lw $ra, 0x14($sp) -/* B557E0 800DE640 3C018017 */ lui $at, %hi(D_80171B20) # $at, 0x8017 -/* B557E4 800DE644 AC201B20 */ sw $zero, %lo(D_80171B20)($at) -/* B557E8 800DE648 03E00008 */ jr $ra -/* B557EC 800DE64C 27BD0018 */ addiu $sp, $sp, 0x18 - diff --git a/asm/non_matchings/code/audio_heap/func_800DE758.s b/asm/non_matchings/code/audio_heap/func_800DE758.s deleted file mode 100644 index 04567350c0..0000000000 --- a/asm/non_matchings/code/audio_heap/func_800DE758.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel func_800DE758 -/* B558F8 800DE758 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B558FC 800DE75C 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 -/* B55900 800DE760 8C4E2A00 */ lw $t6, 0x2a00($v0) -/* B55904 800DE764 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B55908 800DE768 AFB00018 */ sw $s0, 0x18($sp) -/* B5590C 800DE76C 00808025 */ move $s0, $a0 -/* B55910 800DE770 AFBF001C */ sw $ra, 0x1c($sp) -/* B55914 800DE774 3C048017 */ lui $a0, %hi(D_80171B80) # $a0, 0x8017 -/* B55918 800DE778 AC4E2A04 */ sw $t6, 0x2a04($v0) -/* B5591C 800DE77C 8E050000 */ lw $a1, ($s0) -/* B55920 800DE780 0C0378F7 */ jal func_800DE3DC -/* B55924 800DE784 24841B80 */ addiu $a0, %lo(D_80171B80) # addiu $a0, $a0, 0x1b80 -/* B55928 800DE788 3C048017 */ lui $a0, %hi(D_80171BA4) # $a0, 0x8017 -/* B5592C 800DE78C 24841BA4 */ addiu $a0, %lo(D_80171BA4) # addiu $a0, $a0, 0x1ba4 -/* B55930 800DE790 00402825 */ move $a1, $v0 -/* B55934 800DE794 0C03790D */ jal func_800DE434 -/* B55938 800DE798 8E060000 */ lw $a2, ($s0) -/* B5593C 800DE79C 3C048017 */ lui $a0, %hi(D_80171B80) # $a0, 0x8017 -/* B55940 800DE7A0 24841B80 */ addiu $a0, %lo(D_80171B80) # addiu $a0, $a0, 0x1b80 -/* B55944 800DE7A4 0C0378F7 */ jal func_800DE3DC -/* B55948 800DE7A8 8E050004 */ lw $a1, 4($s0) -/* B5594C 800DE7AC 3C048017 */ lui $a0, %hi(D_80171CB4) # $a0, 0x8017 -/* B55950 800DE7B0 24841CB4 */ addiu $a0, %lo(D_80171CB4) # addiu $a0, $a0, 0x1cb4 -/* B55954 800DE7B4 00402825 */ move $a1, $v0 -/* B55958 800DE7B8 0C03790D */ jal func_800DE434 -/* B5595C 800DE7BC 8E060004 */ lw $a2, 4($s0) -/* B55960 800DE7C0 3C048017 */ lui $a0, %hi(D_80171B80) # $a0, 0x8017 -/* B55964 800DE7C4 24841B80 */ addiu $a0, %lo(D_80171B80) # addiu $a0, $a0, 0x1b80 -/* B55968 800DE7C8 0C0378F7 */ jal func_800DE3DC -/* B5596C 800DE7CC 8E050008 */ lw $a1, 8($s0) -/* B55970 800DE7D0 3C048017 */ lui $a0, %hi(D_80171DC4) # $a0, 0x8017 -/* B55974 800DE7D4 24841DC4 */ addiu $a0, %lo(D_80171DC4) # addiu $a0, $a0, 0x1dc4 -/* B55978 800DE7D8 00402825 */ move $a1, $v0 -/* B5597C 800DE7DC 0C03790D */ jal func_800DE434 -/* B55980 800DE7E0 8E060008 */ lw $a2, 8($s0) -/* B55984 800DE7E4 3C048017 */ lui $a0, %hi(D_80171BA0) # $a0, 0x8017 -/* B55988 800DE7E8 0C037917 */ jal func_800DE45C -/* B5598C 800DE7EC 24841BA0 */ addiu $a0, %lo(D_80171BA0) # addiu $a0, $a0, 0x1ba0 -/* B55990 800DE7F0 3C048017 */ lui $a0, %hi(D_80171CB0) # $a0, 0x8017 -/* B55994 800DE7F4 0C037917 */ jal func_800DE45C -/* B55998 800DE7F8 24841CB0 */ addiu $a0, %lo(D_80171CB0) # addiu $a0, $a0, 0x1cb0 -/* B5599C 800DE7FC 3C048017 */ lui $a0, %hi(D_80171DC0) # $a0, 0x8017 -/* B559A0 800DE800 0C037917 */ jal func_800DE45C -/* B559A4 800DE804 24841DC0 */ addiu $a0, %lo(D_80171DC0) # addiu $a0, $a0, 0x1dc0 -/* B559A8 800DE808 8FBF001C */ lw $ra, 0x1c($sp) -/* B559AC 800DE80C 8FB00018 */ lw $s0, 0x18($sp) -/* B559B0 800DE810 27BD0020 */ addiu $sp, $sp, 0x20 -/* B559B4 800DE814 03E00008 */ jr $ra -/* B559B8 800DE818 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_heap/func_800DE81C.s b/asm/non_matchings/code/audio_heap/func_800DE81C.s deleted file mode 100644 index 0abca51254..0000000000 --- a/asm/non_matchings/code/audio_heap/func_800DE81C.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel func_800DE81C -/* B559BC 800DE81C 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B559C0 800DE820 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 -/* B559C4 800DE824 8C4E2A10 */ lw $t6, 0x2a10($v0) -/* B559C8 800DE828 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B559CC 800DE82C AFB00018 */ sw $s0, 0x18($sp) -/* B559D0 800DE830 00808025 */ move $s0, $a0 -/* B559D4 800DE834 AFBF001C */ sw $ra, 0x1c($sp) -/* B559D8 800DE838 3C048017 */ lui $a0, %hi(D_80171B90) # $a0, 0x8017 -/* B559DC 800DE83C AC4E2A14 */ sw $t6, 0x2a14($v0) -/* B559E0 800DE840 8E050000 */ lw $a1, ($s0) -/* B559E4 800DE844 0C0378F7 */ jal func_800DE3DC -/* B559E8 800DE848 24841B90 */ addiu $a0, %lo(D_80171B90) # addiu $a0, $a0, 0x1b90 -/* B559EC 800DE84C 3C048017 */ lui $a0, %hi(D_80171C78) # $a0, 0x8017 -/* B559F0 800DE850 24841C78 */ addiu $a0, %lo(D_80171C78) # addiu $a0, $a0, 0x1c78 -/* B559F4 800DE854 00402825 */ move $a1, $v0 -/* B559F8 800DE858 0C03790D */ jal func_800DE434 -/* B559FC 800DE85C 8E060000 */ lw $a2, ($s0) -/* B55A00 800DE860 3C048017 */ lui $a0, %hi(D_80171B90) # $a0, 0x8017 -/* B55A04 800DE864 24841B90 */ addiu $a0, %lo(D_80171B90) # addiu $a0, $a0, 0x1b90 -/* B55A08 800DE868 0C0378F7 */ jal func_800DE3DC -/* B55A0C 800DE86C 8E050004 */ lw $a1, 4($s0) -/* B55A10 800DE870 3C048017 */ lui $a0, %hi(D_80171D88) # $a0, 0x8017 -/* B55A14 800DE874 24841D88 */ addiu $a0, %lo(D_80171D88) # addiu $a0, $a0, 0x1d88 -/* B55A18 800DE878 00402825 */ move $a1, $v0 -/* B55A1C 800DE87C 0C03790D */ jal func_800DE434 -/* B55A20 800DE880 8E060004 */ lw $a2, 4($s0) -/* B55A24 800DE884 3C048017 */ lui $a0, %hi(D_80171B90) # $a0, 0x8017 -/* B55A28 800DE888 24841B90 */ addiu $a0, %lo(D_80171B90) # addiu $a0, $a0, 0x1b90 -/* B55A2C 800DE88C 0C0378F7 */ jal func_800DE3DC -/* B55A30 800DE890 8E050008 */ lw $a1, 8($s0) -/* B55A34 800DE894 3C048017 */ lui $a0, %hi(D_80171E98) # $a0, 0x8017 -/* B55A38 800DE898 24841E98 */ addiu $a0, %lo(D_80171E98) # addiu $a0, $a0, 0x1e98 -/* B55A3C 800DE89C 00402825 */ move $a1, $v0 -/* B55A40 800DE8A0 0C03790D */ jal func_800DE434 -/* B55A44 800DE8A4 8E060008 */ lw $a2, 8($s0) -/* B55A48 800DE8A8 3C048017 */ lui $a0, %hi(D_80171C74) # $a0, 0x8017 -/* B55A4C 800DE8AC 0C03791C */ jal func_800DE470 -/* B55A50 800DE8B0 24841C74 */ addiu $a0, %lo(D_80171C74) # addiu $a0, $a0, 0x1c74 -/* B55A54 800DE8B4 3C048017 */ lui $a0, %hi(D_80171D84) # $a0, 0x8017 -/* B55A58 800DE8B8 0C03791C */ jal func_800DE470 -/* B55A5C 800DE8BC 24841D84 */ addiu $a0, %lo(D_80171D84) # addiu $a0, $a0, 0x1d84 -/* B55A60 800DE8C0 3C048017 */ lui $a0, %hi(D_80171E94) # $a0, 0x8017 -/* B55A64 800DE8C4 0C03791C */ jal func_800DE470 -/* B55A68 800DE8C8 24841E94 */ addiu $a0, %lo(D_80171E94) # addiu $a0, $a0, 0x1e94 -/* B55A6C 800DE8CC 8FBF001C */ lw $ra, 0x1c($sp) -/* B55A70 800DE8D0 8FB00018 */ lw $s0, 0x18($sp) -/* B55A74 800DE8D4 27BD0020 */ addiu $sp, $sp, 0x20 -/* B55A78 800DE8D8 03E00008 */ jr $ra -/* B55A7C 800DE8DC 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_heap/func_800DF0CC.s b/asm/non_matchings/code/audio_heap/func_800DF0CC.s index 505ee2f77b..9f13048913 100644 --- a/asm/non_matchings/code/audio_heap/func_800DF0CC.s +++ b/asm/non_matchings/code/audio_heap/func_800DF0CC.s @@ -6,21 +6,21 @@ glabel func_800DF0CC /* B5627C 800DF0DC 00803825 */ move $a3, $a0 /* B56280 800DF0E0 24010001 */ li $at, 1 /* B56284 800DF0E4 10810009 */ beq $a0, $at, .L800DF10C -/* B56288 800DF0E8 3C058017 */ lui $a1, %hi(D_80171CB0) +/* B56288 800DF0E8 3C058017 */ lui $a1, %hi(gAudioContext+0x2b30) /* B5628C 800DF0EC 24010002 */ li $at, 2 /* B56290 800DF0F0 10810008 */ beq $a0, $at, .L800DF114 -/* B56294 800DF0F4 3C058017 */ lui $a1, %hi(D_80171DC0) +/* B56294 800DF0F4 3C058017 */ lui $a1, %hi(gAudioContext+0x2c40) /* B56298 800DF0F8 10000007 */ b .L800DF118 /* B5629C 800DF0FC 8FA50018 */ lw $a1, 0x18($sp) .L800DF100: -/* B562A0 800DF100 3C058017 */ lui $a1, %hi(D_80171BA0) # $a1, 0x8017 +/* B562A0 800DF100 3C058017 */ lui $a1, %hi(gAudioContext+0x2a20) # $a1, 0x8017 /* B562A4 800DF104 10000004 */ b .L800DF118 -/* B562A8 800DF108 24A51BA0 */ addiu $a1, %lo(D_80171BA0) # addiu $a1, $a1, 0x1ba0 +/* B562A8 800DF108 24A51BA0 */ addiu $a1, %lo(gAudioContext+0x2a20) # addiu $a1, $a1, 0x1ba0 .L800DF10C: /* B562AC 800DF10C 10000002 */ b .L800DF118 -/* B562B0 800DF110 24A51CB0 */ addiu $a1, %lo(D_80171CB0) +/* B562B0 800DF110 24A51CB0 */ addiu $a1, %lo(gAudioContext+0x2b30) .L800DF114: -/* B562B4 800DF114 24A51DC0 */ addiu $a1, %lo(D_80171DC0) +/* B562B4 800DF114 24A51DC0 */ addiu $a1, %lo(gAudioContext+0x2c40) .L800DF118: /* B562B8 800DF118 8FAE0024 */ lw $t6, 0x24($sp) /* B562BC 800DF11C 24A300D4 */ addiu $v1, $a1, 0xd4 diff --git a/asm/non_matchings/code/audio_heap/func_800DF7C4.s b/asm/non_matchings/code/audio_heap/func_800DF7C4.s index 8b65f64612..26ba9d328f 100644 --- a/asm/non_matchings/code/audio_heap/func_800DF7C4.s +++ b/asm/non_matchings/code/audio_heap/func_800DF7C4.s @@ -39,8 +39,8 @@ glabel func_800DF7C4 /* B569E8 800DF848 26100001 */ addiu $s0, $s0, 1 /* B569EC 800DF84C 1612FFFC */ bne $s0, $s2, .L800DF840 /* B569F0 800DF850 00000000 */ nop -/* B569F4 800DF854 3C028017 */ lui $v0, %hi(D_8016F181) # $v0, 0x8017 -/* B569F8 800DF858 8042F181 */ lb $v0, %lo(D_8016F181)($v0) +/* B569F4 800DF854 3C028017 */ lui $v0, %hi(gAudioContext+0x1) # $v0, 0x8017 +/* B569F8 800DF858 8042F181 */ lb $v0, %lo(gAudioContext+0x1)($v0) .L800DF85C: /* B569FC 800DF85C 26730001 */ addiu $s3, $s3, 1 /* B56A00 800DF860 0262082A */ slt $at, $s3, $v0 diff --git a/asm/non_matchings/code/audio_heap/func_800DF8F4.s b/asm/non_matchings/code/audio_heap/func_800DF8F4.s index e27f5cae1d..26b522f32b 100644 --- a/asm/non_matchings/code/audio_heap/func_800DF8F4.s +++ b/asm/non_matchings/code/audio_heap/func_800DF8F4.s @@ -39,11 +39,11 @@ glabel L800DF954 /* B56AF8 800DF958 00002825 */ move $a1, $zero /* B56AFC 800DF95C 5920000E */ blezl $t1, .L800DF998 /* B56B00 800DF960 8FAB0024 */ lw $t3, 0x24($sp) -/* B56B04 800DF964 3C108017 */ lui $s0, %hi(D_801726B0) # $s0, 0x8017 -/* B56B08 800DF968 261026B0 */ addiu $s0, %lo(D_801726B0) # addiu $s0, $s0, 0x26b0 +/* B56B04 800DF964 3C108017 */ lui $s0, %hi(gAudioContext+0x3530) # $s0, 0x8017 +/* B56B08 800DF968 261026B0 */ addiu $s0, %lo(gAudioContext+0x3530) # addiu $s0, $s0, 0x26b0 /* B56B0C 800DF96C 02002025 */ move $a0, $s0 .L800DF970: -/* B56B10 800DF970 0C03A6D1 */ jal func_800E9B44 +/* B56B10 800DF970 0C03A6D1 */ jal Audio_SequencePlayerDisableAsFinished /* B56B14 800DF974 AFA5002C */ sw $a1, 0x2c($sp) /* B56B18 800DF978 8FA5002C */ lw $a1, 0x2c($sp) /* B56B1C 800DF97C 862A285C */ lh $t2, 0x285c($s1) @@ -185,9 +185,9 @@ glabel L800DFB54 /* B56CF8 800DFB58 00000000 */ nop /* B56CFC 800DFB5C 3C0F8017 */ lui $t7, %hi(gAudioContext) /* B56D00 800DFB60 25E3F180 */ addiu $v1, $t7, %lo(gAudioContext) -/* B56D04 800DFB64 3C078017 */ lui $a3, %hi(D_8016F18C) # $a3, 0x8017 +/* B56D04 800DFB64 3C078017 */ lui $a3, %hi(gAudioContext+0xc) # $a3, 0x8017 /* B56D08 800DFB68 A2203518 */ sb $zero, 0x3518($s1) -/* B56D0C 800DFB6C 24E7F18C */ addiu $a3, %lo(D_8016F18C) # addiu $a3, $a3, -0xe74 +/* B56D0C 800DFB6C 24E7F18C */ addiu $a3, %lo(gAudioContext+0xc) # addiu $a3, $a3, -0xe74 /* B56D10 800DFB70 00603025 */ move $a2, $v1 /* B56D14 800DFB74 24040B00 */ li $a0, 2816 .L800DFB78: diff --git a/asm/non_matchings/code/audio_heap/func_800DFBF8.s b/asm/non_matchings/code/audio_heap/func_800DFBF8.s index de3d144be5..f6e1ab2a9e 100644 --- a/asm/non_matchings/code/audio_heap/func_800DFBF8.s +++ b/asm/non_matchings/code/audio_heap/func_800DFBF8.s @@ -95,8 +95,8 @@ glabel func_800DFBF8 /* B56EE8 800DFD48 24ABFFF8 */ addiu $t3, $a1, -8 /* B56EEC 800DFD4C A6CA2858 */ sh $t2, 0x2858($s6) /* B56EF0 800DFD50 A6CB285A */ sh $t3, 0x285a($s6) -/* B56EF4 800DFD54 3C048017 */ lui $a0, %hi(D_80172588) -/* B56EF8 800DFD58 24842588 */ addiu $a0, %lo(D_80172588) # addiu $a0, $a0, 0x2588 +/* B56EF4 800DFD54 3C048017 */ lui $a0, %hi(gAudioContext+0x3408) +/* B56EF8 800DFD58 24842588 */ addiu $a0, %lo(gAudioContext+0x3408) # addiu $a0, $a0, 0x2588 /* B56EFC 800DFD5C E6C8286C */ swc1 $f8, 0x286c($s6) /* B56F00 800DFD60 46009183 */ div.s $f6, $f18, $f0 /* B56F04 800DFD64 E6CA2860 */ swc1 $f10, 0x2860($s6) @@ -229,7 +229,7 @@ glabel func_800DFBF8 /* B570E8 800DFF48 01CD7023 */ subu $t6, $t6, $t5 /* B570EC 800DFF4C 000E70C0 */ sll $t6, $t6, 3 /* B570F0 800DFF50 8EC329A0 */ lw $v1, 0x29a0($s6) -/* B570F4 800DFF54 3C018017 */ lui $at, %hi(D_80172594) # $at, 0x8017 +/* B570F4 800DFF54 3C018017 */ lui $at, %hi(gAudioContext+0x3414) # $at, 0x8017 /* B570F8 800DFF58 00006012 */ mflo $t4 /* B570FC 800DFF5C 018E7821 */ addu $t7, $t4, $t6 /* B57100 800DFF60 25F80140 */ addiu $t8, $t7, 0x140 @@ -254,43 +254,43 @@ glabel func_800DFBF8 /* B5714C 800DFFAC AEC329A4 */ sw $v1, 0x29a4($s6) .L800DFFB0: /* B57150 800DFFB0 AEC53408 */ sw $a1, 0x3408($s6) -/* B57154 800DFFB4 0C037994 */ jal func_800DE650 -/* B57158 800DFFB8 AC222594 */ sw $v0, %lo(D_80172594)($at) -/* B5715C 800DFFBC 3C048017 */ lui $a0, %hi(D_80172598) # $a0, 0x8017 +/* B57154 800DFFB4 0C037994 */ jal Audio_SessionPoolsInit +/* B57158 800DFFB8 AC222594 */ sw $v0, %lo(gAudioContext+0x3414)($at) +/* B5715C 800DFFBC 3C048017 */ lui $a0, %hi(gAudioContext+0x3418) # $a0, 0x8017 /* B57160 800DFFC0 AED03418 */ sw $s0, 0x3418($s6) /* B57164 800DFFC4 AED1341C */ sw $s1, 0x341c($s6) -/* B57168 800DFFC8 0C0379B5 */ jal func_800DE6D4 -/* B5716C 800DFFCC 24842598 */ addiu $a0, %lo(D_80172598) # addiu $a0, $a0, 0x2598 +/* B57168 800DFFC8 0C0379B5 */ jal Audio_SeqAndBankPoolInit +/* B5716C 800DFFCC 24842598 */ addiu $a0, %lo(gAudioContext+0x3418) # addiu $a0, $a0, 0x2598 /* B57170 800DFFD0 8FA20068 */ lw $v0, 0x68($sp) -/* B57174 800DFFD4 3C048017 */ lui $a0, %hi(D_801725A0) # $a0, 0x8017 -/* B57178 800DFFD8 248425A0 */ addiu $a0, %lo(D_801725A0) # addiu $a0, $a0, 0x25a0 +/* B57174 800DFFD4 3C048017 */ lui $a0, %hi(gAudioContext+0x3420) # $a0, 0x8017 +/* B57178 800DFFD8 248425A0 */ addiu $a0, %lo(gAudioContext+0x3420) # addiu $a0, $a0, 0x25a0 /* B5717C 800DFFDC 8C4A0018 */ lw $t2, 0x18($v0) /* B57180 800DFFE0 AECA3420 */ sw $t2, 0x3420($s6) /* B57184 800DFFE4 8C4B001C */ lw $t3, 0x1c($v0) /* B57188 800DFFE8 AECB3424 */ sw $t3, 0x3424($s6) /* B5718C 800DFFEC 8C4D0020 */ lw $t5, 0x20($v0) -/* B57190 800DFFF0 0C0379D6 */ jal func_800DE758 +/* B57190 800DFFF0 0C0379D6 */ jal Audio_PersistentPoolsInit /* B57194 800DFFF4 AECD3428 */ sw $t5, 0x3428($s6) /* B57198 800DFFF8 8FA20068 */ lw $v0, 0x68($sp) -/* B5719C 800DFFFC 3C048017 */ lui $a0, %hi(D_801725AC) # $a0, 0x8017 -/* B571A0 800E0000 248425AC */ addiu $a0, %lo(D_801725AC) # addiu $a0, $a0, 0x25ac +/* B5719C 800DFFFC 3C048017 */ lui $a0, %hi(gAudioContext+0x342c) # $a0, 0x8017 +/* B571A0 800E0000 248425AC */ addiu $a0, %lo(gAudioContext+0x342c) # addiu $a0, $a0, 0x25ac /* B571A4 800E0004 8C4C0024 */ lw $t4, 0x24($v0) /* B571A8 800E0008 AECC342C */ sw $t4, 0x342c($s6) /* B571AC 800E000C 8C4E0028 */ lw $t6, 0x28($v0) /* B571B0 800E0010 AECE3430 */ sw $t6, 0x3430($s6) /* B571B4 800E0014 8C4F002C */ lw $t7, 0x2c($v0) -/* B571B8 800E0018 0C037A07 */ jal func_800DE81C +/* B571B8 800E0018 0C037A07 */ jal Audio_TemporaryPoolsInit /* B571BC 800E001C AECF3434 */ sw $t7, 0x3434($s6) /* B571C0 800E0020 0C0377E0 */ jal func_800DDF80 /* B571C4 800E0024 00000000 */ nop /* B571C8 800E0028 8EC52894 */ lw $a1, 0x2894($s6) -/* B571CC 800E002C 3C138017 */ lui $s3, %hi(D_80171B40) # $s3, 0x8017 -/* B571D0 800E0030 26731B40 */ addiu $s3, %lo(D_80171B40) # addiu $s3, $s3, 0x1b40 +/* B571CC 800E002C 3C138017 */ lui $s3, %hi(gAudioContext+0x29c0) # $s3, 0x8017 +/* B571D0 800E0030 26731B40 */ addiu $s3, %lo(gAudioContext+0x29c0) # addiu $s3, $s3, 0x1b40 /* B571D4 800E0034 00A00821 */ addu $at, $a1, $zero /* B571D8 800E0038 000528C0 */ sll $a1, $a1, 3 /* B571DC 800E003C 00A12823 */ subu $a1, $a1, $at /* B571E0 800E0040 00052940 */ sll $a1, $a1, 5 -/* B571E4 800E0044 0C0378E0 */ jal func_800DE380 +/* B571E4 800E0044 0C0378E0 */ jal Audio_AllocZeroed /* B571E8 800E0048 02602025 */ move $a0, $s3 /* B571EC 800E004C 0C03A1E2 */ jal Audio_NoteInitAll /* B571F0 800E0050 AEC2352C */ sw $v0, 0x352c($s6) @@ -302,12 +302,12 @@ glabel func_800DFBF8 /* B57208 800E0068 03190019 */ multu $t8, $t9 /* B5720C 800E006C 00002812 */ mflo $a1 /* B57210 800E0070 00052940 */ sll $a1, $a1, 5 -/* B57214 800E0074 0C0378E0 */ jal func_800DE380 +/* B57214 800E0074 0C0378E0 */ jal Audio_AllocZeroed /* B57218 800E0078 00000000 */ nop /* B5721C 800E007C 3C108017 */ lui $s0, %hi(gAudioContext) # $s0, 0x8017 -/* B57220 800E0080 3C118017 */ lui $s1, %hi(D_8016F188) # $s1, 0x8017 +/* B57220 800E0080 3C118017 */ lui $s1, %hi(gAudioContext+0x8) # $s1, 0x8017 /* B57224 800E0084 AEC20014 */ sw $v0, 0x14($s6) -/* B57228 800E0088 2631F188 */ addiu $s1, %lo(D_8016F188) # addiu $s1, $s1, -0xe78 +/* B57228 800E0088 2631F188 */ addiu $s1, %lo(gAudioContext+0x8) # addiu $s1, $s1, -0xe78 /* B5722C 800E008C 2610F180 */ addiu $s0, %lo(gAudioContext) # addiu $s0, $s0, -0xe80 .L800E0090: /* B57230 800E0090 8EC52890 */ lw $a1, 0x2890($s6) @@ -318,13 +318,13 @@ glabel func_800DFBF8 /* B57244 800E00A4 1611FFFA */ bne $s0, $s1, .L800E0090 /* B57248 800E00A8 AE0228A8 */ sw $v0, 0x28a8($s0) /* B5724C 800E00AC 02602025 */ move $a0, $s3 -/* B57250 800E00B0 0C0378F7 */ jal func_800DE3DC +/* B57250 800E00B0 0C0378F7 */ jal Audio_Alloc /* B57254 800E00B4 24050400 */ li $a1, 1024 /* B57258 800E00B8 0C03778F */ jal func_800DDE3C /* B5725C 800E00BC AEC23520 */ sw $v0, 0x3520($s6) /* B57260 800E00C0 3C148017 */ lui $s4, %hi(gAudioContext) # $s4, 0x8017 -/* B57264 800E00C4 3C028017 */ lui $v0, %hi(D_8016FCA0) # $v0, 0x8017 -/* B57268 800E00C8 2442FCA0 */ addiu $v0, %lo(D_8016FCA0) # addiu $v0, $v0, -0x360 +/* B57264 800E00C4 3C028017 */ lui $v0, %hi(gAudioContext+0xb20) # $v0, 0x8017 +/* B57268 800E00C8 2442FCA0 */ addiu $v0, %lo(gAudioContext+0xb20) # addiu $v0, $v0, -0x360 /* B5726C 800E00CC 2694F180 */ addiu $s4, %lo(gAudioContext) # addiu $s4, $s4, -0xe80 .L800E00D0: /* B57270 800E00D0 269402C8 */ addiu $s4, $s4, 0x2c8 @@ -337,13 +337,13 @@ glabel func_800DFBF8 /* B5728C 800E00EC A2CA0001 */ sb $t2, 1($s6) /* B57290 800E00F0 82CB0001 */ lb $t3, 1($s6) /* B57294 800E00F4 196000CA */ blez $t3, .L800E0420 -/* B57298 800E00F8 3C0D8017 */ lui $t5, %hi(D_8016F430) # $t5, 0x8017 -/* B5729C 800E00FC 25ADF430 */ addiu $t5, %lo(D_8016F430) # addiu $t5, $t5, -0xbd0 +/* B57298 800E00F8 3C0D8017 */ lui $t5, %hi(gAudioContext+0x2b0) # $t5, 0x8017 +/* B5729C 800E00FC 25ADF430 */ addiu $t5, %lo(gAudioContext+0x2b0) # addiu $t5, $t5, -0xbd0 /* B572A0 800E0100 3C148017 */ lui $s4, %hi(gAudioContext) # $s4, 0x8017 -/* B572A4 800E0104 3C128017 */ lui $s2, %hi(D_8016F198) # $s2, 0x8017 -/* B572A8 800E0108 3C1E8017 */ lui $fp, %hi(D_8016F420) # $fp, 0x8017 -/* B572AC 800E010C 27DEF420 */ addiu $fp, %lo(D_8016F420) # addiu $fp, $fp, -0xbe0 -/* B572B0 800E0110 2652F198 */ addiu $s2, %lo(D_8016F198) # addiu $s2, $s2, -0xe68 +/* B572A4 800E0104 3C128017 */ lui $s2, %hi(gAudioContext+0x18) # $s2, 0x8017 +/* B572A8 800E0108 3C1E8017 */ lui $fp, %hi(gAudioContext+0x2a0) # $fp, 0x8017 +/* B572AC 800E010C 27DEF420 */ addiu $fp, %lo(gAudioContext+0x2a0) # addiu $fp, $fp, -0xbe0 +/* B572B0 800E0110 2652F198 */ addiu $s2, %lo(gAudioContext+0x18) # addiu $s2, $s2, -0xe68 /* B572B4 800E0114 2694F180 */ addiu $s4, %lo(gAudioContext) # addiu $s4, $s4, -0xe80 /* B572B8 800E0118 AFAD0044 */ sw $t5, 0x44($sp) /* B572BC 800E011C 0000B825 */ move $s7, $zero @@ -460,19 +460,19 @@ glabel func_800DFBF8 .L800E02C8: /* B57468 800E02C8 02602025 */ move $a0, $s3 /* B5746C 800E02CC 24050020 */ li $a1, 32 -/* B57470 800E02D0 0C0378E0 */ jal func_800DE380 +/* B57470 800E02D0 0C0378E0 */ jal Audio_AllocZeroed /* B57474 800E02D4 00008825 */ move $s1, $zero /* B57478 800E02D8 AE420030 */ sw $v0, 0x30($s2) /* B5747C 800E02DC 02602025 */ move $a0, $s3 -/* B57480 800E02E0 0C0378E0 */ jal func_800DE380 +/* B57480 800E02E0 0C0378E0 */ jal Audio_AllocZeroed /* B57484 800E02E4 24050020 */ li $a1, 32 /* B57488 800E02E8 AE420034 */ sw $v0, 0x34($s2) /* B5748C 800E02EC 02602025 */ move $a0, $s3 -/* B57490 800E02F0 0C0378E0 */ jal func_800DE380 +/* B57490 800E02F0 0C0378E0 */ jal Audio_AllocZeroed /* B57494 800E02F4 24050020 */ li $a1, 32 /* B57498 800E02F8 AE420038 */ sw $v0, 0x38($s2) /* B5749C 800E02FC 02602025 */ move $a0, $s3 -/* B574A0 800E0300 0C0378E0 */ jal func_800DE380 +/* B574A0 800E0300 0C0378E0 */ jal Audio_AllocZeroed /* B574A4 800E0304 24050020 */ li $a1, 32 /* B574A8 800E0308 AE42003C */ sw $v0, 0x3c($s2) /* B574AC 800E030C 86D82854 */ lh $t8, 0x2854($s6) @@ -508,7 +508,7 @@ glabel func_800DFBF8 /* B57518 800E0378 24050040 */ li $a1, 64 /* B5751C 800E037C AE420278 */ sw $v0, 0x278($s2) /* B57520 800E0380 02602025 */ move $a0, $s3 -/* B57524 800E0384 0C0378C2 */ jal Audio_SoundAlloc +/* B57524 800E0384 0C0378C2 */ jal Audio_AllocDmaMemory /* B57528 800E0388 24050010 */ li $a1, 16 /* B5752C 800E038C AE420270 */ sw $v0, 0x270($s2) /* B57530 800E0390 86A50014 */ lh $a1, 0x14($s5) @@ -527,7 +527,7 @@ glabel func_800DFBF8 /* B5755C 800E03BC 24050040 */ li $a1, 64 /* B57560 800E03C0 AE42027C */ sw $v0, 0x27c($s2) /* B57564 800E03C4 02602025 */ move $a0, $s3 -/* B57568 800E03C8 0C0378C2 */ jal Audio_SoundAlloc +/* B57568 800E03C8 0C0378C2 */ jal Audio_AllocDmaMemory /* B5756C 800E03CC 24050010 */ li $a1, 16 /* B57570 800E03D0 AE420274 */ sw $v0, 0x274($s2) /* B57574 800E03D4 86A50016 */ lh $a1, 0x16($s5) @@ -552,17 +552,17 @@ glabel func_800DFBF8 /* B575B8 800E0418 1420FF41 */ bnez $at, .L800E0120 /* B575BC 800E041C 27DE02C8 */ addiu $fp, $fp, 0x2c8 .L800E0420: -/* B575C0 800E0420 0C03B237 */ jal func_800EC8DC +/* B575C0 800E0420 0C03B237 */ jal Audio_InitSequencePlayers /* B575C4 800E0424 00008825 */ move $s1, $zero /* B575C8 800E0428 86D9285C */ lh $t9, 0x285c($s6) -/* B575CC 800E042C 3C108017 */ lui $s0, %hi(D_801726B0) # $s0, 0x8017 -/* B575D0 800E0430 261026B0 */ addiu $s0, %lo(D_801726B0) # addiu $s0, $s0, 0x26b0 +/* B575CC 800E042C 3C108017 */ lui $s0, %hi(gAudioContext+0x3530) # $s0, 0x8017 +/* B575D0 800E0430 261026B0 */ addiu $s0, %lo(gAudioContext+0x3530) # addiu $s0, $s0, 0x26b0 /* B575D4 800E0434 5B20000C */ blezl $t9, .L800E0468 /* B575D8 800E0438 8FAB0068 */ lw $t3, 0x68($sp) .L800E043C: /* B575DC 800E043C 0C03B1CD */ jal func_800EC734 /* B575E0 800E0440 02202025 */ move $a0, $s1 -/* B575E4 800E0444 0C03B19A */ jal func_800EC668 +/* B575E4 800E0444 0C03B19A */ jal Audio_ResetSequencePlayer /* B575E8 800E0448 02002025 */ move $a0, $s0 /* B575EC 800E044C 86CA285C */ lh $t2, 0x285c($s6) /* B575F0 800E0450 26310001 */ addiu $s1, $s1, 1 diff --git a/asm/non_matchings/code/audio_heap/func_800E04E8.s b/asm/non_matchings/code/audio_heap/func_800E04E8.s index e5ba83f21a..43e77f8210 100644 --- a/asm/non_matchings/code/audio_heap/func_800E04E8.s +++ b/asm/non_matchings/code/audio_heap/func_800E04E8.s @@ -1,6 +1,6 @@ glabel func_800E04E8 -/* B57688 800E04E8 3C038017 */ lui $v1, %hi(D_80171EDC) # $v1, 0x8017 -/* B5768C 800E04EC 8C631EDC */ lw $v1, %lo(D_80171EDC)($v1) +/* B57688 800E04E8 3C038017 */ lui $v1, %hi(gAudioContext+0x2d5c) # $v1, 0x8017 +/* B5768C 800E04EC 8C631EDC */ lw $v1, %lo(gAudioContext+0x2d5c)($v1) /* B57690 800E04F0 00A03025 */ move $a2, $a1 /* B57694 800E04F4 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 /* B57698 800E04F8 1860000E */ blez $v1, .L800E0534 diff --git a/asm/non_matchings/code/audio_heap/func_800E0540.s b/asm/non_matchings/code/audio_heap/func_800E0540.s index 87e178919f..ce08fcba94 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0540.s +++ b/asm/non_matchings/code/audio_heap/func_800E0540.s @@ -1,15 +1,15 @@ glabel func_800E0540 /* B576E0 800E0540 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B576E4 800E0544 3C0E8017 */ lui $t6, %hi(D_80171EDC) # $t6, 0x8017 -/* B576E8 800E0548 8DCE1EDC */ lw $t6, %lo(D_80171EDC)($t6) +/* B576E4 800E0544 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2d5c) # $t6, 0x8017 +/* B576E8 800E0548 8DCE1EDC */ lw $t6, %lo(gAudioContext+0x2d5c)($t6) /* B576EC 800E054C AFA40020 */ sw $a0, 0x20($sp) /* B576F0 800E0550 AFBF0014 */ sw $ra, 0x14($sp) /* B576F4 800E0554 AFA50024 */ sw $a1, 0x24($sp) -/* B576F8 800E0558 3C048017 */ lui $a0, %hi(D_80171ED0) # $a0, 0x8017 +/* B576F8 800E0558 3C048017 */ lui $a0, %hi(gAudioContext+0x2d50) # $a0, 0x8017 /* B576FC 800E055C AFA60028 */ sw $a2, 0x28($sp) -/* B57700 800E0560 24841ED0 */ addiu $a0, %lo(D_80171ED0) # addiu $a0, $a0, 0x1ed0 +/* B57700 800E0560 24841ED0 */ addiu $a0, %lo(gAudioContext+0x2d50) # addiu $a0, $a0, 0x1ed0 /* B57704 800E0564 00C02825 */ move $a1, $a2 -/* B57708 800E0568 0C0378F7 */ jal func_800DE3DC +/* B57708 800E0568 0C0378F7 */ jal Audio_Alloc /* B5770C 800E056C AFAE0018 */ sw $t6, 0x18($sp) /* B57710 800E0570 8FAF0018 */ lw $t7, 0x18($sp) /* B57714 800E0574 3C198017 */ lui $t9, %hi(gAudioContext) # $t9, 0x8017 diff --git a/asm/non_matchings/code/audio_heap/func_800E0634.s b/asm/non_matchings/code/audio_heap/func_800E0634.s index 096d5b1abf..060ca424f1 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0634.s +++ b/asm/non_matchings/code/audio_heap/func_800E0634.s @@ -3,23 +3,23 @@ glabel func_800E0634 /* B577D8 800E0638 AFA40018 */ sw $a0, 0x18($sp) /* B577DC 800E063C AFBF0014 */ sw $ra, 0x14($sp) /* B577E0 800E0640 AFA5001C */ sw $a1, 0x1c($sp) -/* B577E4 800E0644 3C048017 */ lui $a0, %hi(D_80171B40) # $a0, 0x8017 -/* B577E8 800E0648 24841B40 */ addiu $a0, %lo(D_80171B40) # addiu $a0, $a0, 0x1b40 +/* B577E4 800E0644 3C048017 */ lui $a0, %hi(gAudioContext+0x29c0) # $a0, 0x8017 +/* B577E8 800E0648 24841B40 */ addiu $a0, %lo(gAudioContext+0x29c0) # addiu $a0, $a0, 0x1b40 /* B577EC 800E064C 0C0378AC */ jal func_800DE2B0 /* B577F0 800E0650 8FA50018 */ lw $a1, 0x18($sp) /* B577F4 800E0654 14400004 */ bnez $v0, .L800E0668 /* B577F8 800E0658 00402825 */ move $a1, $v0 -/* B577FC 800E065C 3C018017 */ lui $at, %hi(D_80172068) # $at, 0x8017 +/* B577FC 800E065C 3C018017 */ lui $at, %hi(gAudioContext+0x2ee8) # $at, 0x8017 /* B57800 800E0660 10000005 */ b .L800E0678 -/* B57804 800E0664 AC202068 */ sw $zero, %lo(D_80172068)($at) +/* B57804 800E0664 AC202068 */ sw $zero, %lo(gAudioContext+0x2ee8)($at) .L800E0668: -/* B57808 800E0668 3C048017 */ lui $a0, %hi(D_80172060) # $a0, 0x8017 -/* B5780C 800E066C 24842060 */ addiu $a0, %lo(D_80172060) # addiu $a0, $a0, 0x2060 -/* B57810 800E0670 0C03790D */ jal func_800DE434 +/* B57808 800E0668 3C048017 */ lui $a0, %hi(gAudioContext+0x2ee0) # $a0, 0x8017 +/* B5780C 800E066C 24842060 */ addiu $a0, %lo(gAudioContext+0x2ee0) # addiu $a0, $a0, 0x2060 +/* B57810 800E0670 0C03790D */ jal Audio_SoundAllocPoolInit /* B57814 800E0674 8FA60018 */ lw $a2, 0x18($sp) .L800E0678: -/* B57818 800E0678 3C048017 */ lui $a0, %hi(D_80171B40) # $a0, 0x8017 -/* B5781C 800E067C 24841B40 */ addiu $a0, %lo(D_80171B40) # addiu $a0, $a0, 0x1b40 +/* B57818 800E0678 3C048017 */ lui $a0, %hi(gAudioContext+0x29c0) # $a0, 0x8017 +/* B5781C 800E067C 24841B40 */ addiu $a0, %lo(gAudioContext+0x29c0) # addiu $a0, $a0, 0x1b40 /* B57820 800E0680 0C0378AC */ jal func_800DE2B0 /* B57824 800E0684 8FA5001C */ lw $a1, 0x1c($sp) /* B57828 800E0688 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 @@ -29,9 +29,9 @@ glabel func_800E0634 /* B57838 800E0698 10000007 */ b .L800E06B8 /* B5783C 800E069C AC60317C */ sw $zero, 0x317c($v1) .L800E06A0: -/* B57840 800E06A0 3C048017 */ lui $a0, %hi(D_801722F4) # $a0, 0x8017 -/* B57844 800E06A4 248422F4 */ addiu $a0, %lo(D_801722F4) # addiu $a0, $a0, 0x22f4 -/* B57848 800E06A8 0C03790D */ jal func_800DE434 +/* B57840 800E06A0 3C048017 */ lui $a0, %hi(gAudioContext+0x3174) # $a0, 0x8017 +/* B57844 800E06A4 248422F4 */ addiu $a0, %lo(gAudioContext+0x3174) # addiu $a0, $a0, 0x22f4 +/* B57848 800E06A8 0C03790D */ jal Audio_SoundAllocPoolInit /* B5784C 800E06AC 8FA6001C */ lw $a2, 0x1c($sp) /* B57850 800E06B0 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 /* B57854 800E06B4 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 diff --git a/asm/non_matchings/code/audio_heap/func_800E06CC.s b/asm/non_matchings/code/audio_heap/func_800E06CC.s index 63c9280ac3..ccd5ebd986 100644 --- a/asm/non_matchings/code/audio_heap/func_800E06CC.s +++ b/asm/non_matchings/code/audio_heap/func_800E06CC.s @@ -2,10 +2,10 @@ glabel func_800E06CC /* B5786C 800E06CC 27BDFFB8 */ addiu $sp, $sp, -0x48 /* B57870 800E06D0 AFB6002C */ sw $s6, 0x2c($sp) /* B57874 800E06D4 AFA40048 */ sw $a0, 0x48($sp) -/* B57878 800E06D8 3C048017 */ lui $a0, %hi(D_801722F4) # $a0, 0x8017 +/* B57878 800E06D8 3C048017 */ lui $a0, %hi(gAudioContext+0x3174) # $a0, 0x8017 /* B5787C 800E06DC 3C168017 */ lui $s6, %hi(gAudioContext) # $s6, 0x8017 /* B57880 800E06E0 26D6F180 */ addiu $s6, %lo(gAudioContext) # addiu $s6, $s6, -0xe80 -/* B57884 800E06E4 248422F4 */ addiu $a0, %lo(D_801722F4) # addiu $a0, $a0, 0x22f4 +/* B57884 800E06E4 248422F4 */ addiu $a0, %lo(gAudioContext+0x3174) # addiu $a0, $a0, 0x22f4 /* B57888 800E06E8 AFBF0034 */ sw $ra, 0x34($sp) /* B5788C 800E06EC AFB40024 */ sw $s4, 0x24($sp) /* B57890 800E06F0 AFB30020 */ sw $s3, 0x20($sp) @@ -16,33 +16,33 @@ glabel func_800E06CC /* B578A4 800E0704 AFB00014 */ sw $s0, 0x14($sp) /* B578A8 800E0708 0080A025 */ move $s4, $a0 /* B578AC 800E070C 8ED33178 */ lw $s3, 0x3178($s6) -/* B578B0 800E0710 0C0378F7 */ jal func_800DE3DC +/* B578B0 800E0710 0C0378F7 */ jal Audio_Alloc /* B578B4 800E0714 8FA50048 */ lw $a1, 0x48($sp) /* B578B8 800E0718 14400013 */ bnez $v0, .L800E0768 /* B578BC 800E071C AFA2003C */ sw $v0, 0x3c($sp) -/* B578C0 800E0720 3C0E8017 */ lui $t6, %hi(D_801722F4) # $t6, 0x8017 -/* B578C4 800E0724 8DCE22F4 */ lw $t6, %lo(D_801722F4)($t6) -/* B578C8 800E0728 3C108017 */ lui $s0, %hi(D_801722F8) # $s0, 0x8017 -/* B578CC 800E072C 8E1022F8 */ lw $s0, %lo(D_801722F8)($s0) -/* B578D0 800E0730 3C018017 */ lui $at, %hi(D_801722F8) # $at, 0x8017 -/* B578D4 800E0734 3C048017 */ lui $a0, %hi(D_801722F4) # $a0, 0x8017 -/* B578D8 800E0738 248422F4 */ addiu $a0, %lo(D_801722F4) # addiu $a0, $a0, 0x22f4 +/* B578C0 800E0720 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3174) # $t6, 0x8017 +/* B578C4 800E0724 8DCE22F4 */ lw $t6, %lo(gAudioContext+0x3174)($t6) +/* B578C8 800E0728 3C108017 */ lui $s0, %hi(gAudioContext+0x3178) # $s0, 0x8017 +/* B578CC 800E072C 8E1022F8 */ lw $s0, %lo(gAudioContext+0x3178)($s0) +/* B578D0 800E0730 3C018017 */ lui $at, %hi(gAudioContext+0x3178) # $at, 0x8017 +/* B578D4 800E0734 3C048017 */ lui $a0, %hi(gAudioContext+0x3174) # $a0, 0x8017 +/* B578D8 800E0738 248422F4 */ addiu $a0, %lo(gAudioContext+0x3174) # addiu $a0, $a0, 0x22f4 /* B578DC 800E073C 8FA50048 */ lw $a1, 0x48($sp) -/* B578E0 800E0740 0C0378F7 */ jal func_800DE3DC -/* B578E4 800E0744 AC2E22F8 */ sw $t6, %lo(D_801722F8)($at) +/* B578E0 800E0740 0C0378F7 */ jal Audio_Alloc +/* B578E4 800E0744 AC2E22F8 */ sw $t6, %lo(gAudioContext+0x3178)($at) /* B578E8 800E0748 14400005 */ bnez $v0, .L800E0760 /* B578EC 800E074C AFA2003C */ sw $v0, 0x3c($sp) -/* B578F0 800E0750 3C018017 */ lui $at, %hi(D_801722F8) # $at, 0x8017 -/* B578F4 800E0754 AC3022F8 */ sw $s0, %lo(D_801722F8)($at) +/* B578F0 800E0750 3C018017 */ lui $at, %hi(gAudioContext+0x3178) # $at, 0x8017 +/* B578F4 800E0754 AC3022F8 */ sw $s0, %lo(gAudioContext+0x3178)($at) /* B578F8 800E0758 10000077 */ b .L800E0938 /* B578FC 800E075C 00001025 */ move $v0, $zero .L800E0760: -/* B57900 800E0760 3C138017 */ lui $s3, %hi(D_801722F4) # $s3, 0x8017 -/* B57904 800E0764 8E7322F4 */ lw $s3, %lo(D_801722F4)($s3) +/* B57900 800E0760 3C138017 */ lui $s3, %hi(gAudioContext+0x3174) # $s3, 0x8017 +/* B57904 800E0764 8E7322F4 */ lw $s3, %lo(gAudioContext+0x3174)($s3) .L800E0768: /* B57908 800E0768 8EC7176C */ lw $a3, 0x176c($s6) -/* B5790C 800E076C 3C128017 */ lui $s2, %hi(D_801722F8) # $s2, 0x8017 -/* B57910 800E0770 8E5222F8 */ lw $s2, %lo(D_801722F8)($s2) +/* B5790C 800E076C 3C128017 */ lui $s2, %hi(gAudioContext+0x3178) # $s2, 0x8017 +/* B57910 800E0770 8E5222F8 */ lw $s2, %lo(gAudioContext+0x3178)($s2) /* B57914 800E0774 2415FFFF */ li $s5, -1 /* B57918 800E0778 18E00034 */ blez $a3, .L800E084C /* B5791C 800E077C 00008825 */ move $s1, $zero @@ -89,8 +89,8 @@ glabel func_800E06CC /* B579B8 800E0818 016C1021 */ addu $v0, $t3, $t4 .L800E081C: /* B579BC 800E081C AC970010 */ sw $s7, 0x10($a0) -/* B579C0 800E0820 3C078017 */ lui $a3, %hi(D_801708EC) # $a3, 0x8017 -/* B579C4 800E0824 8CE708EC */ lw $a3, %lo(D_801708EC)($a3) +/* B579C0 800E0820 3C078017 */ lui $a3, %hi(gAudioContext+0x176c) # $a3, 0x8017 +/* B579C4 800E0824 8CE708EC */ lw $a3, %lo(gAudioContext+0x176c)($a3) .L800E0828: /* B579C8 800E0828 00076880 */ sll $t5, $a3, 2 /* B579CC 800E082C 01A76821 */ addu $t5, $t5, $a3 @@ -103,12 +103,12 @@ glabel func_800E06CC /* B579E4 800E0844 8CCF0D78 */ lw $t7, 0xd78($a2) /* B579E8 800E0848 00008825 */ move $s1, $zero .L800E084C: -/* B579EC 800E084C 3C0F8017 */ lui $t7, %hi(D_80172584) # $t7, 0x8017 -/* B579F0 800E0850 8DEF2584 */ lw $t7, %lo(D_80172584)($t7) -/* B579F4 800E0854 3C108017 */ lui $s0, %hi(D_801722F4) # $s0, 0x8017 +/* B579EC 800E084C 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3404) # $t7, 0x8017 +/* B579F0 800E0850 8DEF2584 */ lw $t7, %lo(gAudioContext+0x3404)($t7) +/* B579F4 800E0854 3C108017 */ lui $s0, %hi(gAudioContext+0x3174) # $s0, 0x8017 /* B579F8 800E0858 24170001 */ li $s7, 1 /* B579FC 800E085C 19E00023 */ blez $t7, .L800E08EC -/* B57A00 800E0860 261022F4 */ addiu $s0, %lo(D_801722F4) # addiu $s0, $s0, 0x22f4 +/* B57A00 800E0860 261022F4 */ addiu $s0, %lo(gAudioContext+0x3174) # addiu $s0, $s0, 0x22f4 /* B57A04 800E0864 2416FFFF */ li $s6, -1 .L800E0868: /* B57A08 800E0868 82180010 */ lb $t8, 0x10($s0) @@ -152,17 +152,17 @@ glabel func_800E06CC .L800E08EC: /* B57A8C 800E08EC 2416FFFF */ li $s6, -1 /* B57A90 800E08F0 16B60006 */ bne $s5, $s6, .L800E090C -/* B57A94 800E08F4 3C0B8017 */ lui $t3, %hi(D_801722F4) # $t3, 0x8017 -/* B57A98 800E08F8 3C088017 */ lui $t0, %hi(D_80172584) # $t0, 0x8017 -/* B57A9C 800E08FC 8D152584 */ lw $s5, %lo(D_80172584)($t0) -/* B57AA0 800E0900 3C018017 */ lui $at, %hi(D_80172584) # $at, 0x8017 +/* B57A94 800E08F4 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3174) # $t3, 0x8017 +/* B57A98 800E08F8 3C088017 */ lui $t0, %hi(gAudioContext+0x3404) # $t0, 0x8017 +/* B57A9C 800E08FC 8D152584 */ lw $s5, %lo(gAudioContext+0x3404)($t0) +/* B57AA0 800E0900 3C018017 */ lui $at, %hi(gAudioContext+0x3404) # $at, 0x8017 /* B57AA4 800E0904 26A90001 */ addiu $t1, $s5, 1 -/* B57AA8 800E0908 AC292584 */ sw $t1, %lo(D_80172584)($at) +/* B57AA8 800E0908 AC292584 */ sw $t1, %lo(gAudioContext+0x3404)($at) .L800E090C: /* B57AAC 800E090C 00155080 */ sll $t2, $s5, 2 /* B57AB0 800E0910 01555021 */ addu $t2, $t2, $s5 /* B57AB4 800E0914 000A5080 */ sll $t2, $t2, 2 -/* B57AB8 800E0918 256B22F4 */ addiu $t3, %lo(D_801722F4) # addiu $t3, $t3, 0x22f4 +/* B57AB8 800E0918 256B22F4 */ addiu $t3, %lo(gAudioContext+0x3174) # addiu $t3, $t3, 0x22f4 /* B57ABC 800E091C 014B1821 */ addu $v1, $t2, $t3 /* B57AC0 800E0920 8FAC003C */ lw $t4, 0x3c($sp) /* B57AC4 800E0924 8FAD0048 */ lw $t5, 0x48($sp) diff --git a/asm/non_matchings/code/audio_heap/func_800E0AD8.s b/asm/non_matchings/code/audio_heap/func_800E0AD8.s index a76c2b6c00..de4abced89 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0AD8.s +++ b/asm/non_matchings/code/audio_heap/func_800E0AD8.s @@ -40,7 +40,7 @@ glabel func_800E0AD8 /* B57D00 800E0B60 02003025 */ move $a2, $s0 /* B57D04 800E0B64 50400008 */ beql $v0, $zero, .L800E0B88 /* B57D08 800E0B68 26100001 */ addiu $s0, $s0, 1 -/* B57D0C 800E0B6C 0C03862C */ jal func_800E18B0 +/* B57D0C 800E0B6C 0C03862C */ jal Audio_IsBankLoadComplete /* B57D10 800E0B70 02002025 */ move $a0, $s0 /* B57D14 800E0B74 10400003 */ beqz $v0, .L800E0B84 /* B57D18 800E0B78 02402025 */ move $a0, $s2 diff --git a/asm/non_matchings/code/audio_heap/func_800E0BF8.s b/asm/non_matchings/code/audio_heap/func_800E0BF8.s index 3fcc842226..3fe03293ee 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0BF8.s +++ b/asm/non_matchings/code/audio_heap/func_800E0BF8.s @@ -2,19 +2,19 @@ glabel func_800E0BF8 /* B57D98 800E0BF8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B57D9C 800E0BFC AFA40018 */ sw $a0, 0x18($sp) /* B57DA0 800E0C00 AFBF0014 */ sw $ra, 0x14($sp) -/* B57DA4 800E0C04 3C048017 */ lui $a0, %hi(D_80172060) # $a0, 0x8017 -/* B57DA8 800E0C08 24842060 */ addiu $a0, %lo(D_80172060) # addiu $a0, $a0, 0x2060 -/* B57DAC 800E0C0C 0C0378F7 */ jal func_800DE3DC +/* B57DA4 800E0C04 3C048017 */ lui $a0, %hi(gAudioContext+0x2ee0) # $a0, 0x8017 +/* B57DA8 800E0C08 24842060 */ addiu $a0, %lo(gAudioContext+0x2ee0) # addiu $a0, $a0, 0x2060 +/* B57DAC 800E0C0C 0C0378F7 */ jal Audio_Alloc /* B57DB0 800E0C10 8FA50018 */ lw $a1, 0x18($sp) /* B57DB4 800E0C14 14400003 */ bnez $v0, .L800E0C24 /* B57DB8 800E0C18 00402025 */ move $a0, $v0 /* B57DBC 800E0C1C 10000014 */ b .L800E0C70 /* B57DC0 800E0C20 00001025 */ move $v0, $zero .L800E0C24: -/* B57DC4 800E0C24 3C0E8017 */ lui $t6, %hi(D_801722F0) # $t6, 0x8017 -/* B57DC8 800E0C28 8DCE22F0 */ lw $t6, %lo(D_801722F0)($t6) -/* B57DCC 800E0C2C 3C198017 */ lui $t9, %hi(D_80172060) # $t9, 0x8017 -/* B57DD0 800E0C30 27392060 */ addiu $t9, %lo(D_80172060) # addiu $t9, $t9, 0x2060 +/* B57DC4 800E0C24 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3170) # $t6, 0x8017 +/* B57DC8 800E0C28 8DCE22F0 */ lw $t6, %lo(gAudioContext+0x3170)($t6) +/* B57DCC 800E0C2C 3C198017 */ lui $t9, %hi(gAudioContext+0x2ee0) # $t9, 0x8017 +/* B57DD0 800E0C30 27392060 */ addiu $t9, %lo(gAudioContext+0x2ee0) # addiu $t9, $t9, 0x2060 /* B57DD4 800E0C34 000E7880 */ sll $t7, $t6, 2 /* B57DD8 800E0C38 01EE7821 */ addu $t7, $t7, $t6 /* B57DDC 800E0C3C 000F7880 */ sll $t7, $t7, 2 @@ -24,12 +24,12 @@ glabel func_800E0BF8 /* B57DEC 800E0C4C A0480000 */ sb $t0, ($v0) /* B57DF0 800E0C50 AC440008 */ sw $a0, 8($v0) /* B57DF4 800E0C54 8FA90018 */ lw $t1, 0x18($sp) -/* B57DF8 800E0C58 3C0A8017 */ lui $t2, %hi(D_801722F0) # $t2, 0x8017 -/* B57DFC 800E0C5C 3C018017 */ lui $at, %hi(D_801722F0) # $at, 0x8017 +/* B57DF8 800E0C58 3C0A8017 */ lui $t2, %hi(gAudioContext+0x3170) # $t2, 0x8017 +/* B57DFC 800E0C5C 3C018017 */ lui $at, %hi(gAudioContext+0x3170) # $at, 0x8017 /* B57E00 800E0C60 AC490010 */ sw $t1, 0x10($v0) -/* B57E04 800E0C64 8D4A22F0 */ lw $t2, %lo(D_801722F0)($t2) +/* B57E04 800E0C64 8D4A22F0 */ lw $t2, %lo(gAudioContext+0x3170)($t2) /* B57E08 800E0C68 254B0001 */ addiu $t3, $t2, 1 -/* B57E0C 800E0C6C AC2B22F0 */ sw $t3, %lo(D_801722F0)($at) +/* B57E0C 800E0C6C AC2B22F0 */ sw $t3, %lo(gAudioContext+0x3170)($at) .L800E0C70: /* B57E10 800E0C70 8FBF0014 */ lw $ra, 0x14($sp) /* B57E14 800E0C74 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/code/audio_heap/func_800E0CBC.s b/asm/non_matchings/code/audio_heap/func_800E0CBC.s index f93a742fd0..9905371771 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0CBC.s +++ b/asm/non_matchings/code/audio_heap/func_800E0CBC.s @@ -34,13 +34,13 @@ glabel func_800E0CBC /* B57ED4 800E0D34 02803025 */ move $a2, $s4 /* B57ED8 800E0D38 50400026 */ beql $v0, $zero, .L800E0DD4 /* B57EDC 800E0D3C 26940001 */ addiu $s4, $s4, 1 -/* B57EE0 800E0D40 0C03862C */ jal func_800E18B0 +/* B57EE0 800E0D40 0C03862C */ jal Audio_IsBankLoadComplete /* B57EE4 800E0D44 02802025 */ move $a0, $s4 /* B57EE8 800E0D48 50400022 */ beql $v0, $zero, .L800E0DD4 /* B57EEC 800E0D4C 26940001 */ addiu $s4, $s4, 1 /* B57EF0 800E0D50 8EB83170 */ lw $t8, 0x3170($s5) -/* B57EF4 800E0D54 3C118017 */ lui $s1, %hi(D_80172070) # $s1, 0x8017 -/* B57EF8 800E0D58 26312070 */ addiu $s1, %lo(D_80172070) # addiu $s1, $s1, 0x2070 +/* B57EF4 800E0D54 3C118017 */ lui $s1, %hi(gAudioContext+0x2ef0) # $s1, 0x8017 +/* B57EF8 800E0D58 26312070 */ addiu $s1, %lo(gAudioContext+0x2ef0) # addiu $s1, $s1, 0x2070 /* B57EFC 800E0D5C 1B00000D */ blez $t8, .L800E0D94 /* B57F00 800E0D60 00008025 */ move $s0, $zero /* B57F04 800E0D64 02202025 */ move $a0, $s1 @@ -58,8 +58,8 @@ glabel func_800E0CBC /* B57F30 800E0D90 00008025 */ move $s0, $zero .L800E0D94: /* B57F34 800E0D94 8EA83404 */ lw $t0, 0x3404($s5) -/* B57F38 800E0D98 3C118017 */ lui $s1, %hi(D_80172304) # $s1, 0x8017 -/* B57F3C 800E0D9C 26312304 */ addiu $s1, %lo(D_80172304) # addiu $s1, $s1, 0x2304 +/* B57F38 800E0D98 3C118017 */ lui $s1, %hi(gAudioContext+0x3184) # $s1, 0x8017 +/* B57F3C 800E0D9C 26312304 */ addiu $s1, %lo(gAudioContext+0x3184) # addiu $s1, $s1, 0x2304 /* B57F40 800E0DA0 1900000B */ blez $t0, .L800E0DD0 /* B57F44 800E0DA4 02202025 */ move $a0, $s1 .L800E0DA8: diff --git a/asm/non_matchings/code/audio_heap/func_800E0EB4.s b/asm/non_matchings/code/audio_heap/func_800E0EB4.s index 69c2fb0d5b..a1cd0adda1 100644 --- a/asm/non_matchings/code/audio_heap/func_800E0EB4.s +++ b/asm/non_matchings/code/audio_heap/func_800E0EB4.s @@ -70,7 +70,7 @@ glabel func_800E0EB4 /* B58154 800E0FB4 52210054 */ beql $s1, $at, .L800E1108 /* B58158 800E0FB8 8FA90094 */ lw $t1, 0x94($sp) .L800E0FBC: -/* B5815C 800E0FBC 0C03862C */ jal func_800E18B0 +/* B5815C 800E0FBC 0C03862C */ jal Audio_IsBankLoadComplete /* B58160 800E0FC0 02A02025 */ move $a0, $s5 /* B58164 800E0FC4 1040004F */ beqz $v0, .L800E1104 /* B58168 800E0FC8 24040001 */ li $a0, 1 diff --git a/asm/non_matchings/code/audio_heap/func_800E1148.s b/asm/non_matchings/code/audio_heap/func_800E1148.s index ff351eaf13..79c78ea554 100644 --- a/asm/non_matchings/code/audio_heap/func_800E1148.s +++ b/asm/non_matchings/code/audio_heap/func_800E1148.s @@ -1,6 +1,6 @@ glabel func_800E1148 -/* B582E8 800E1148 3C0E8017 */ lui $t6, %hi(D_80171EB2) # $t6, 0x8017 -/* B582EC 800E114C 85CE1EB2 */ lh $t6, %lo(D_80171EB2)($t6) +/* B582E8 800E1148 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2d32) # $t6, 0x8017 +/* B582EC 800E114C 85CE1EB2 */ lh $t6, %lo(gAudioContext+0x2d32)($t6) /* B582F0 800E1150 27BDFFD8 */ addiu $sp, $sp, -0x28 /* B582F4 800E1154 AFB00018 */ sw $s0, 0x18($sp) /* B582F8 800E1158 2410FFFF */ li $s0, -1 @@ -11,17 +11,17 @@ glabel func_800E1148 /* B5830C 800E116C 0C03839B */ jal func_800E0E6C /* B58310 800E1170 01C02025 */ move $a0, $t6 .L800E1174: -/* B58314 800E1174 3C048017 */ lui $a0, %hi(D_80171EBE) # $a0, 0x8017 -/* B58318 800E1178 84841EBE */ lh $a0, %lo(D_80171EBE)($a0) +/* B58314 800E1174 3C048017 */ lui $a0, %hi(gAudioContext+0x2d3e) # $a0, 0x8017 +/* B58318 800E1178 84841EBE */ lh $a0, %lo(gAudioContext+0x2d3e)($a0) /* B5831C 800E117C 12040003 */ beq $s0, $a0, .L800E118C /* B58320 800E1180 00000000 */ nop /* B58324 800E1184 0C03839B */ jal func_800E0E6C /* B58328 800E1188 00000000 */ nop .L800E118C: -/* B5832C 800E118C 3C188017 */ lui $t8, %hi(D_80171DC0) # $t8, 0x8017 -/* B58330 800E1190 8F181DC0 */ lw $t8, %lo(D_80171DC0)($t8) -/* B58334 800E1194 3C0F8017 */ lui $t7, %hi(D_80171DC0) # $t7, 0x8017 -/* B58338 800E1198 25EF1DC0 */ addiu $t7, %lo(D_80171DC0) # addiu $t7, $t7, 0x1dc0 +/* B5832C 800E118C 3C188017 */ lui $t8, %hi(gAudioContext+0x2c40) # $t8, 0x8017 +/* B58330 800E1190 8F181DC0 */ lw $t8, %lo(gAudioContext+0x2c40)($t8) +/* B58334 800E1194 3C0F8017 */ lui $t7, %hi(gAudioContext+0x2c40) # $t7, 0x8017 +/* B58338 800E1198 25EF1DC0 */ addiu $t7, %lo(gAudioContext+0x2c40) # addiu $t7, $t7, 0x1dc0 /* B5833C 800E119C 01E09025 */ move $s2, $t7 /* B58340 800E11A0 1300000A */ beqz $t8, .L800E11CC /* B58344 800E11A4 00008025 */ move $s0, $zero diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPopBack.s b/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPopBack.s deleted file mode 100644 index 83d171a52d..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPopBack.s +++ /dev/null @@ -1,19 +0,0 @@ -glabel Audio_AudioListPopBack -/* B60E08 800E9C68 8C830000 */ lw $v1, ($a0) -/* B60E0C 800E9C6C 54640004 */ bnel $v1, $a0, .L800E9C80 -/* B60E10 800E9C70 8C6E0000 */ lw $t6, ($v1) -/* B60E14 800E9C74 03E00008 */ jr $ra -/* B60E18 800E9C78 00001025 */ move $v0, $zero -/* B60E1C 800E9C7C 8C6E0000 */ lw $t6, ($v1) -.L800E9C80: -/* B60E20 800E9C80 ADC40004 */ sw $a0, 4($t6) -/* B60E24 800E9C84 8C6F0000 */ lw $t7, ($v1) -/* B60E28 800E9C88 AC8F0000 */ sw $t7, ($a0) -/* B60E2C 800E9C8C AC600000 */ sw $zero, ($v1) -/* B60E30 800E9C90 8C980008 */ lw $t8, 8($a0) -/* B60E34 800E9C94 2719FFFF */ addiu $t9, $t8, -1 -/* B60E38 800E9C98 AC990008 */ sw $t9, 8($a0) -/* B60E3C 800E9C9C 8C620008 */ lw $v0, 8($v1) -/* B60E40 800E9CA0 03E00008 */ jr $ra -/* B60E44 800E9CA4 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPushBack.s b/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPushBack.s deleted file mode 100644 index 9eb6062f1a..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_AudioListPushBack.s +++ /dev/null @@ -1,19 +0,0 @@ -glabel Audio_AudioListPushBack -/* B60DC8 800E9C28 8CAE0000 */ lw $t6, ($a1) -/* B60DCC 800E9C2C 15C0000C */ bnez $t6, .L800E9C60 -/* B60DD0 800E9C30 00000000 */ nop -/* B60DD4 800E9C34 8C8F0000 */ lw $t7, ($a0) -/* B60DD8 800E9C38 ADE50004 */ sw $a1, 4($t7) -/* B60DDC 800E9C3C 8C980000 */ lw $t8, ($a0) -/* B60DE0 800E9C40 ACA40004 */ sw $a0, 4($a1) -/* B60DE4 800E9C44 ACB80000 */ sw $t8, ($a1) -/* B60DE8 800E9C48 8C990008 */ lw $t9, 8($a0) -/* B60DEC 800E9C4C 8C89000C */ lw $t1, 0xc($a0) -/* B60DF0 800E9C50 AC850000 */ sw $a1, ($a0) -/* B60DF4 800E9C54 27280001 */ addiu $t0, $t9, 1 -/* B60DF8 800E9C58 AC880008 */ sw $t0, 8($a0) -/* B60DFC 800E9C5C ACA9000C */ sw $t1, 0xc($a1) -.L800E9C60: -/* B60E00 800E9C60 03E00008 */ jr $ra -/* B60E04 800E9C64 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelDisable.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelDisable.s deleted file mode 100644 index dacd9beaba..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelDisable.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel Audio_SequenceChannelDisable -/* B60A68 800E98C8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B60A6C 800E98CC AFB20020 */ sw $s2, 0x20($sp) -/* B60A70 800E98D0 AFB1001C */ sw $s1, 0x1c($sp) -/* B60A74 800E98D4 AFB00018 */ sw $s0, 0x18($sp) -/* B60A78 800E98D8 00808825 */ move $s1, $a0 -/* B60A7C 800E98DC AFBF0024 */ sw $ra, 0x24($sp) -/* B60A80 800E98E0 00008025 */ move $s0, $zero -/* B60A84 800E98E4 24120004 */ li $s2, 4 -/* B60A88 800E98E8 02202025 */ move $a0, $s1 -.L800E98EC: -/* B60A8C 800E98EC 0C03A61E */ jal func_800E9878 -/* B60A90 800E98F0 02002825 */ move $a1, $s0 -/* B60A94 800E98F4 26100001 */ addiu $s0, $s0, 1 -/* B60A98 800E98F8 5612FFFC */ bnel $s0, $s2, .L800E98EC -/* B60A9C 800E98FC 02202025 */ move $a0, $s1 -/* B60AA0 800E9900 0C039F80 */ jal Audio_NotePoolClear -/* B60AA4 800E9904 26240084 */ addiu $a0, $s1, 0x84 -/* B60AA8 800E9908 922E0000 */ lbu $t6, ($s1) -/* B60AAC 800E990C 31D9FF7F */ andi $t9, $t6, 0xff7f -/* B60AB0 800E9910 A2390000 */ sb $t9, ($s1) -/* B60AB4 800E9914 37280040 */ ori $t0, $t9, 0x40 -/* B60AB8 800E9918 A2280000 */ sb $t0, ($s1) -/* B60ABC 800E991C 8FBF0024 */ lw $ra, 0x24($sp) -/* B60AC0 800E9920 8FB20020 */ lw $s2, 0x20($sp) -/* B60AC4 800E9924 8FB1001C */ lw $s1, 0x1c($sp) -/* B60AC8 800E9928 8FB00018 */ lw $s0, 0x18($sp) -/* B60ACC 800E992C 03E00008 */ jr $ra -/* B60AD0 800E9930 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EB068.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s similarity index 95% rename from asm/non_matchings/code/audio_seqplayer/func_800EB068.s rename to asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s index 29ac91b8f8..24f59c8d88 100644 --- a/asm/non_matchings/code/audio_seqplayer/func_800EB068.s +++ b/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s @@ -210,7 +210,7 @@ glabel jtbl_80149860 .word L800EBC4C .text -glabel func_800EB068 +glabel Audio_SequenceChannelProcessScript /* B62208 800EB068 27BDFF78 */ addiu $sp, $sp, -0x88 /* B6220C 800EB06C AFBF003C */ sw $ra, 0x3c($sp) /* B62210 800EB070 AFBE0038 */ sw $fp, 0x38($sp) @@ -251,7 +251,7 @@ glabel func_800EB068 /* B62290 800EB0F0 241EFFFF */ li $fp, -1 .L800EB0F4: glabel L800EB0F4 -/* B62294 800EB0F4 0C03A752 */ jal func_800E9D48 +/* B62294 800EB0F4 0C03A752 */ jal Audio_M64ReadU8 /* B62298 800EB0F8 02C02025 */ move $a0, $s6 /* B6229C 800EB0FC 284100B0 */ slti $at, $v0, 0xb0 /* B622A0 800EB100 305200FF */ andi $s2, $v0, 0xff @@ -271,12 +271,12 @@ glabel L800EB0F4 /* B622D4 800EB134 30780080 */ andi $t8, $v1, 0x80 /* B622D8 800EB138 17000005 */ bnez $t8, .L800EB150 /* B622DC 800EB13C 00608825 */ move $s1, $v1 -/* B622E0 800EB140 0C03A752 */ jal func_800E9D48 +/* B622E0 800EB140 0C03A752 */ jal Audio_M64ReadU8 /* B622E4 800EB144 02C02025 */ move $a0, $s6 /* B622E8 800EB148 10000004 */ b .L800EB15C /* B622EC 800EB14C AE020000 */ sw $v0, ($s0) .L800EB150: -/* B622F0 800EB150 0C03A757 */ jal func_800E9D5C +/* B622F0 800EB150 0C03A757 */ jal Audio_M64ReadS16 /* B622F4 800EB154 02C02025 */ move $a0, $s6 /* B622F8 800EB158 AE020000 */ sw $v0, ($s0) .L800EB15C: @@ -293,7 +293,7 @@ glabel L800EB0F4 /* B62320 800EB180 02E02025 */ move $a0, $s7 /* B62324 800EB184 02C02825 */ move $a1, $s6 /* B62328 800EB188 02003025 */ move $a2, $s0 -/* B6232C 800EB18C 0C03A4EA */ jal func_800E93A8 +/* B6232C 800EB18C 0C03A4EA */ jal Audio_HandleScriptFlowControl /* B62330 800EB190 8FA70060 */ lw $a3, 0x60($sp) /* B62334 800EB194 1040FFD7 */ beqz $v0, .L800EB0F4 /* B62338 800EB198 00000000 */ nop @@ -364,8 +364,8 @@ glabel L800EB270 /* B6241C 800EB27C 1161000D */ beq $t3, $at, .L800EB2B4 /* B62420 800EB280 01409025 */ move $s2, $t2 /* B62424 800EB284 92EC0004 */ lbu $t4, 4($s7) -/* B62428 800EB288 3C028017 */ lui $v0, %hi(D_801719BC) # $v0, 0x8017 -/* B6242C 800EB28C 8C4219BC */ lw $v0, %lo(D_801719BC)($v0) +/* B62428 800EB288 3C028017 */ lui $v0, %hi(gAudioContext+0x283c) # $v0, 0x8017 +/* B6242C 800EB28C 8C4219BC */ lw $v0, %lo(gAudioContext+0x283c)($v0) /* B62430 800EB290 000C6840 */ sll $t5, $t4, 1 /* B62434 800EB294 004D7821 */ addu $t7, $v0, $t5 /* B62438 800EB298 95F10000 */ lhu $s1, ($t7) @@ -388,7 +388,7 @@ glabel L800EB270 /* B62474 800EB2D4 AFA90060 */ sw $t1, 0x60($sp) glabel L800EB2D8 /* B62478 800EB2D8 93A50063 */ lbu $a1, 0x63($sp) -/* B6247C 800EB2DC 0C03ABE6 */ jal func_800EAF98 +/* B6247C 800EB2DC 0C03ABE6 */ jal Audio_SetInstrument /* B62480 800EB2E0 02802025 */ move $a0, $s4 /* B62484 800EB2E4 1000FF83 */ b .L800EB0F4 /* B62488 800EB2E8 00000000 */ nop @@ -404,7 +404,7 @@ glabel L800EB2FC /* B624A8 800EB308 A2980000 */ sb $t8, ($s4) glabel L800EB30C /* B624AC 800EB30C 93A50063 */ lbu $a1, 0x63($sp) -/* B624B0 800EB310 0C03AC11 */ jal func_800EB044 +/* B624B0 800EB310 0C03AC11 */ jal Audio_SequenceChannelSetVolume /* B624B4 800EB314 02802025 */ move $a0, $s4 /* B624B8 800EB318 928A0001 */ lbu $t2, 1($s4) /* B624BC 800EB31C 35590040 */ ori $t9, $t2, 0x40 @@ -540,8 +540,8 @@ glabel L800EB4D8 /* B62684 800EB4E4 1121000D */ beq $t1, $at, .L800EB51C /* B62688 800EB4E8 01009025 */ move $s2, $t0 /* B6268C 800EB4EC 92EB0004 */ lbu $t3, 4($s7) -/* B62690 800EB4F0 3C028017 */ lui $v0, %hi(D_801719BC) # $v0, 0x8017 -/* B62694 800EB4F4 8C4219BC */ lw $v0, %lo(D_801719BC)($v0) +/* B62690 800EB4F0 3C028017 */ lui $v0, %hi(gAudioContext+0x283c) # $v0, 0x8017 +/* B62694 800EB4F4 8C4219BC */ lw $v0, %lo(gAudioContext+0x283c)($v0) /* B62698 800EB4F8 000B6040 */ sll $t4, $t3, 1 /* B6269C 800EB4FC 004C6821 */ addu $t5, $v0, $t4 /* B626A0 800EB500 95B10000 */ lhu $s1, ($t5) @@ -717,21 +717,21 @@ glabel L800EB748 /* B628F8 800EB758 A28F0002 */ sb $t7, 2($s4) /* B628FC 800EB75C 0C03ABBD */ jal func_800EAEF4 /* B62900 800EB760 93A5006B */ lbu $a1, 0x6b($sp) -/* B62904 800EB764 0C03A752 */ jal func_800E9D48 +/* B62904 800EB764 0C03A752 */ jal Audio_M64ReadU8 /* B62908 800EB768 02C02025 */ move $a0, $s6 /* B6290C 800EB76C 0002C600 */ sll $t8, $v0, 0x18 /* B62910 800EB770 00184603 */ sra $t0, $t8, 0x18 /* B62914 800EB774 A6880026 */ sh $t0, 0x26($s4) -/* B62918 800EB778 0C03A752 */ jal func_800E9D48 +/* B62918 800EB778 0C03A752 */ jal Audio_M64ReadU8 /* B6291C 800EB77C 02C02025 */ move $a0, $s6 /* B62920 800EB780 A282000A */ sb $v0, 0xa($s4) -/* B62924 800EB784 0C03A752 */ jal func_800E9D48 +/* B62924 800EB784 0C03A752 */ jal Audio_M64ReadU8 /* B62928 800EB788 02C02025 */ move $a0, $s6 /* B6292C 800EB78C A282000B */ sb $v0, 0xb($s4) -/* B62930 800EB790 0C03A752 */ jal func_800E9D48 +/* B62930 800EB790 0C03A752 */ jal Audio_M64ReadU8 /* B62934 800EB794 02C02025 */ move $a0, $s6 /* B62938 800EB798 A2820004 */ sb $v0, 4($s4) -/* B6293C 800EB79C 0C03A752 */ jal func_800E9D48 +/* B6293C 800EB79C 0C03A752 */ jal Audio_M64ReadU8 /* B62940 800EB7A0 02C02025 */ move $a0, $s6 /* B62944 800EB7A4 928E0001 */ lbu $t6, 1($s4) /* B62948 800EB7A8 A2820008 */ sb $v0, 8($s4) @@ -822,16 +822,16 @@ glabel L800EB8C0 /* B62A74 800EB8D4 A2CE0019 */ sb $t6, 0x19($s6) glabel L800EB8D8 /* B62A78 800EB8D8 8FB90060 */ lw $t9, 0x60($sp) -/* B62A7C 800EB8DC 3C0C8017 */ lui $t4, %hi(D_80171AFC) # $t4, 0x8017 +/* B62A7C 800EB8DC 3C0C8017 */ lui $t4, %hi(gAudioContext+0x297c) # $t4, 0x8017 /* B62A80 800EB8E0 8FAB0060 */ lw $t3, 0x60($sp) /* B62A84 800EB8E4 17200005 */ bnez $t9, .L800EB8FC /* B62A88 800EB8E8 00000000 */ nop -/* B62A8C 800EB8EC 3C0D8017 */ lui $t5, %hi(D_80171AFC) # $t5, 0x8017 -/* B62A90 800EB8F0 8DA91AFC */ lw $t1, %lo(D_80171AFC)($t5) +/* B62A8C 800EB8EC 3C0D8017 */ lui $t5, %hi(gAudioContext+0x297c) # $t5, 0x8017 +/* B62A90 800EB8F0 8DA91AFC */ lw $t1, %lo(gAudioContext+0x297c)($t5) /* B62A94 800EB8F4 1000FDFF */ b .L800EB0F4 /* B62A98 800EB8F8 A6890022 */ sh $t1, 0x22($s4) .L800EB8FC: -/* B62A9C 800EB8FC 8D8C1AFC */ lw $t4, %lo(D_80171AFC)($t4) +/* B62A9C 800EB8FC 8D8C1AFC */ lw $t4, %lo(gAudioContext+0x297c)($t4) /* B62AA0 800EB900 018B001B */ divu $zero, $t4, $t3 /* B62AA4 800EB904 00007810 */ mfhi $t7 /* B62AA8 800EB908 A68F0022 */ sh $t7, 0x22($s4) @@ -843,16 +843,16 @@ glabel L800EB8D8 /* B62ABC 800EB91C 00000000 */ nop glabel L800EB920 /* B62AC0 800EB920 8FB80060 */ lw $t8, 0x60($sp) -/* B62AC4 800EB924 3C0E8017 */ lui $t6, %hi(D_80171AFC) # $t6, 0x8017 +/* B62AC4 800EB924 3C0E8017 */ lui $t6, %hi(gAudioContext+0x297c) # $t6, 0x8017 /* B62AC8 800EB928 8FB90060 */ lw $t9, 0x60($sp) /* B62ACC 800EB92C 17000005 */ bnez $t8, .L800EB944 /* B62AD0 800EB930 00000000 */ nop -/* B62AD4 800EB934 3C088017 */ lui $t0, %hi(D_80171AFC) # $t0, 0x8017 -/* B62AD8 800EB938 8D0A1AFC */ lw $t2, %lo(D_80171AFC)($t0) +/* B62AD4 800EB934 3C088017 */ lui $t0, %hi(gAudioContext+0x297c) # $t0, 0x8017 +/* B62AD8 800EB938 8D0A1AFC */ lw $t2, %lo(gAudioContext+0x297c)($t0) /* B62ADC 800EB93C 1000FDED */ b .L800EB0F4 /* B62AE0 800EB940 A2CA0019 */ sb $t2, 0x19($s6) .L800EB944: -/* B62AE4 800EB944 8DCE1AFC */ lw $t6, %lo(D_80171AFC)($t6) +/* B62AE4 800EB944 8DCE1AFC */ lw $t6, %lo(gAudioContext+0x297c)($t6) /* B62AE8 800EB948 01D9001B */ divu $zero, $t6, $t9 /* B62AEC 800EB94C 00006810 */ mfhi $t5 /* B62AF0 800EB950 A2CD0019 */ sb $t5, 0x19($s6) @@ -960,11 +960,11 @@ glabel L800EBA84 /* B62C4C 800EBAAC 1000FD91 */ b .L800EB0F4 /* B62C50 800EBAB0 A2DE0019 */ sb $fp, 0x19($s6) glabel L800EBAB4 -/* B62C54 800EBAB4 0C03A757 */ jal func_800E9D5C +/* B62C54 800EBAB4 0C03A757 */ jal Audio_M64ReadS16 /* B62C58 800EBAB8 02C02025 */ move $a0, $s6 /* B62C5C 800EBABC 3051FFFF */ andi $s1, $v0, 0xffff /* B62C60 800EBAC0 02802025 */ move $a0, $s4 -/* B62C64 800EBAC4 0C03A5B6 */ jal func_800E96D8 +/* B62C64 800EBAC4 0C03A5B6 */ jal Audio_SeqChannelSetLayer /* B62C68 800EBAC8 02A02825 */ move $a1, $s5 /* B62C6C 800EBACC 1440FD89 */ bnez $v0, .L800EB0F4 /* B62C70 800EBAD0 00154080 */ sll $t0, $s5, 2 @@ -976,7 +976,7 @@ glabel L800EBAB4 /* B62C88 800EBAE8 ADD80054 */ sw $t8, 0x54($t6) glabel L800EBAEC /* B62C8C 800EBAEC 02802025 */ move $a0, $s4 -/* B62C90 800EBAF0 0C03A61E */ jal func_800E9878 +/* B62C90 800EBAF0 0C03A61E */ jal Audio_SeqChannelLayerFree /* B62C94 800EBAF4 02A02825 */ move $a1, $s5 /* B62C98 800EBAF8 1000FD7E */ b .L800EB0F4 /* B62C9C 800EBAFC 00000000 */ nop @@ -985,7 +985,7 @@ glabel L800EBB00 /* B62CA4 800EBB04 02802025 */ move $a0, $s4 /* B62CA8 800EBB08 13D9FD7A */ beq $fp, $t9, .L800EB0F4 /* B62CAC 800EBB0C 00000000 */ nop -/* B62CB0 800EBB10 0C03A5B6 */ jal func_800E96D8 +/* B62CB0 800EBB10 0C03A5B6 */ jal Audio_SeqChannelSetLayer /* B62CB4 800EBB14 02A02825 */ move $a1, $s5 /* B62CB8 800EBB18 105EFD76 */ beq $v0, $fp, .L800EB0F4 /* B62CBC 800EBB1C 00157080 */ sll $t6, $s5, 2 @@ -1010,12 +1010,12 @@ glabel L800EBB5C /* B62D04 800EBB64 1000FD63 */ b .L800EB0F4 /* B62D08 800EBB68 A18D00C4 */ sb $t5, 0xc4($t4) glabel L800EBB6C -/* B62D0C 800EBB6C 0C03A757 */ jal func_800E9D5C +/* B62D0C 800EBB6C 0C03A757 */ jal Audio_M64ReadS16 /* B62D10 800EBB70 02C02025 */ move $a0, $s6 /* B62D14 800EBB74 00028400 */ sll $s0, $v0, 0x10 /* B62D18 800EBB78 00108403 */ sra $s0, $s0, 0x10 /* B62D1C 800EBB7C 02802025 */ move $a0, $s4 -/* B62D20 800EBB80 0C03A5B6 */ jal func_800E96D8 +/* B62D20 800EBB80 0C03A5B6 */ jal Audio_SeqChannelSetLayer /* B62D24 800EBB84 02A02825 */ move $a1, $s5 /* B62D28 800EBB88 1440FD5A */ bnez $v0, .L800EB0F4 /* B62D2C 800EBB8C 00154080 */ sll $t0, $s5, 2 @@ -1088,19 +1088,19 @@ glabel L800EBC6C /* B62E20 800EBC80 1000FD1C */ b .L800EB0F4 /* B62E24 800EBC84 A2D90019 */ sb $t9, 0x19($s6) glabel L800EBC88 -/* B62E28 800EBC88 0C03A757 */ jal func_800E9D5C +/* B62E28 800EBC88 0C03A757 */ jal Audio_M64ReadS16 /* B62E2C 800EBC8C 02C02025 */ move $a0, $s6 /* B62E30 800EBC90 8EF80018 */ lw $t8, 0x18($s7) /* B62E34 800EBC94 02402825 */ move $a1, $s2 /* B62E38 800EBC98 3049FFFF */ andi $t1, $v0, 0xffff /* B62E3C 800EBC9C 30A5000F */ andi $a1, $a1, 0xf /* B62E40 800EBCA0 02E02025 */ move $a0, $s7 -/* B62E44 800EBCA4 0C03A6AB */ jal func_800E9AAC +/* B62E44 800EBCA4 0C03A6AB */ jal Audio_SequenceChannelEnable /* B62E48 800EBCA8 03093021 */ addu $a2, $t8, $t1 /* B62E4C 800EBCAC 1000FD11 */ b .L800EB0F4 /* B62E50 800EBCB0 00000000 */ nop glabel L800EBCB4 -/* B62E54 800EBCB4 0C03A752 */ jal func_800E9D48 +/* B62E54 800EBCB4 0C03A752 */ jal Audio_M64ReadU8 /* B62E58 800EBCB8 02C02025 */ move $a0, $s6 /* B62E5C 800EBCBC 00156080 */ sll $t4, $s5, 2 /* B62E60 800EBCC0 02EC7821 */ addu $t7, $s7, $t4 @@ -1110,7 +1110,7 @@ glabel L800EBCB4 /* B62E70 800EBCD0 1000FD08 */ b .L800EB0F4 /* B62E74 800EBCD4 A16D00C4 */ sb $t5, 0xc4($t3) glabel L800EBCD8 -/* B62E78 800EBCD8 0C03A752 */ jal func_800E9D48 +/* B62E78 800EBCD8 0C03A752 */ jal Audio_M64ReadU8 /* B62E7C 800EBCDC 02C02025 */ move $a0, $s6 /* B62E80 800EBCE0 00154080 */ sll $t0, $s5, 2 /* B62E84 800EBCE4 02E87021 */ addu $t6, $s7, $t0 @@ -1128,7 +1128,7 @@ glabel L800EBCD8 /* B62EA8 800EBD08 8E240050 */ lw $a0, 0x50($s1) /* B62EAC 800EBD0C 50800004 */ beql $a0, $zero, .L800EBD20 /* B62EB0 800EBD10 26100004 */ addiu $s0, $s0, 4 -/* B62EB4 800EBD14 0C03A775 */ jal func_800E9DD4 +/* B62EB4 800EBD14 0C03A775 */ jal Audio_SeqChannelLayerProcessScript /* B62EB8 800EBD18 00000000 */ nop /* B62EBC 800EBD1C 26100004 */ addiu $s0, $s0, 4 .L800EBD20: diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerDisable.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerDisable.s deleted file mode 100644 index 5255581c16..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerDisable.s +++ /dev/null @@ -1,54 +0,0 @@ -glabel Audio_SequencePlayerDisable -/* B60D0C 800E9B6C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B60D10 800E9B70 AFBF001C */ sw $ra, 0x1c($sp) -/* B60D14 800E9B74 AFB00018 */ sw $s0, 0x18($sp) -/* B60D18 800E9B78 00808025 */ move $s0, $a0 -/* B60D1C 800E9B7C 0C03A68B */ jal func_800E9A2C -/* B60D20 800E9B80 3405FFFF */ li $a1, 65535 -/* B60D24 800E9B84 0C039F80 */ jal Audio_NotePoolClear -/* B60D28 800E9B88 2604009C */ addiu $a0, $s0, 0x9c -/* B60D2C 800E9B8C 8E0E0000 */ lw $t6, ($s0) -/* B60D30 800E9B90 000E7FC2 */ srl $t7, $t6, 0x1f -/* B60D34 800E9B94 51E00020 */ beql $t7, $zero, .L800E9C18 -/* B60D38 800E9B98 8FBF001C */ lw $ra, 0x1c($sp) -/* B60D3C 800E9B9C 92180000 */ lbu $t8, ($s0) -/* B60D40 800E9BA0 92040004 */ lbu $a0, 4($s0) -/* B60D44 800E9BA4 3309FF7F */ andi $t1, $t8, 0xff7f -/* B60D48 800E9BA8 A2090000 */ sb $t1, ($s0) -/* B60D4C 800E9BAC 352A0040 */ ori $t2, $t1, 0x40 -/* B60D50 800E9BB0 0C03864A */ jal func_800E1928 -/* B60D54 800E9BB4 A20A0000 */ sb $t2, ($s0) -/* B60D58 800E9BB8 10400003 */ beqz $v0, .L800E9BC8 -/* B60D5C 800E9BBC 24050003 */ li $a1, 3 -/* B60D60 800E9BC0 0C038692 */ jal func_800E1A48 -/* B60D64 800E9BC4 92040004 */ lbu $a0, 4($s0) -.L800E9BC8: -/* B60D68 800E9BC8 0C03862C */ jal func_800E18B0 -/* B60D6C 800E9BCC 92040005 */ lbu $a0, 5($s0) -/* B60D70 800E9BD0 10400003 */ beqz $v0, .L800E9BE0 -/* B60D74 800E9BD4 24050004 */ li $a1, 4 -/* B60D78 800E9BD8 0C038686 */ jal func_800E1A18 -/* B60D7C 800E9BDC 92040005 */ lbu $a0, 5($s0) -.L800E9BE0: -/* B60D80 800E9BE0 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B60D84 800E9BE4 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 -/* B60D88 800E9BE8 846B2C22 */ lh $t3, 0x2c22($v1) -/* B60D8C 800E9BEC 92020005 */ lbu $v0, 5($s0) -/* B60D90 800E9BF0 544B0004 */ bnel $v0, $t3, .L800E9C04 -/* B60D94 800E9BF4 846C2C2E */ lh $t4, 0x2c2e($v1) -/* B60D98 800E9BF8 10000006 */ b .L800E9C14 -/* B60D9C 800E9BFC AC602C04 */ sw $zero, 0x2c04($v1) -/* B60DA0 800E9C00 846C2C2E */ lh $t4, 0x2c2e($v1) -.L800E9C04: -/* B60DA4 800E9C04 240D0001 */ li $t5, 1 -/* B60DA8 800E9C08 544C0003 */ bnel $v0, $t4, .L800E9C18 -/* B60DAC 800E9C0C 8FBF001C */ lw $ra, 0x1c($sp) -/* B60DB0 800E9C10 AC6D2C04 */ sw $t5, 0x2c04($v1) -.L800E9C14: -/* B60DB4 800E9C14 8FBF001C */ lw $ra, 0x1c($sp) -.L800E9C18: -/* B60DB8 800E9C18 8FB00018 */ lw $s0, 0x18($sp) -/* B60DBC 800E9C1C 27BD0020 */ addiu $sp, $sp, 0x20 -/* B60DC0 800E9C20 03E00008 */ jr $ra -/* B60DC4 800E9C24 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EBD58.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s similarity index 89% rename from asm/non_matchings/code/audio_seqplayer/func_800EBD58.s rename to asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s index baa46e7264..e30c6b5d17 100644 --- a/asm/non_matchings/code/audio_seqplayer/func_800EBD58.s +++ b/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s @@ -163,7 +163,7 @@ glabel jtbl_80149A9C .word L800EC4A8 .text -glabel func_800EBD58 +glabel Audio_SequencePlayerProcessSequence /* B62EF8 800EBD58 27BDFF98 */ addiu $sp, $sp, -0x68 /* B62EFC 800EBD5C AFBF0024 */ sw $ra, 0x24($sp) /* B62F00 800EBD60 AFB20020 */ sw $s2, 0x20($sp) @@ -174,11 +174,11 @@ glabel func_800EBD58 /* B62F14 800EBD74 000E7FC2 */ srl $t7, $t6, 0x1f /* B62F18 800EBD78 51E001F5 */ beql $t7, $zero, .L800EC550 /* B62F1C 800EBD7C 8FBF0024 */ lw $ra, 0x24($sp) -/* B62F20 800EBD80 0C03864A */ jal func_800E1928 +/* B62F20 800EBD80 0C03864A */ jal Audio_IsSeqLoadComplete /* B62F24 800EBD84 90840004 */ lbu $a0, 4($a0) /* B62F28 800EBD88 10400005 */ beqz $v0, .L800EBDA0 /* B62F2C 800EBD8C 00000000 */ nop -/* B62F30 800EBD90 0C03862C */ jal func_800E18B0 +/* B62F30 800EBD90 0C03862C */ jal Audio_IsBankLoadComplete /* B62F34 800EBD94 92440005 */ lbu $a0, 5($s2) /* B62F38 800EBD98 14400005 */ bnez $v0, .L800EBDB0 /* B62F3C 800EBD9C 24050002 */ li $a1, 2 @@ -188,13 +188,13 @@ glabel func_800EBD58 /* B62F48 800EBDA8 100001E9 */ b .L800EC550 /* B62F4C 800EBDAC 8FBF0024 */ lw $ra, 0x24($sp) .L800EBDB0: -/* B62F50 800EBDB0 0C038692 */ jal func_800E1A48 +/* B62F50 800EBDB0 0C038692 */ jal Audio_SetSeqLoadStatus /* B62F54 800EBDB4 92440004 */ lbu $a0, 4($s2) /* B62F58 800EBDB8 92440005 */ lbu $a0, 5($s2) -/* B62F5C 800EBDBC 0C038686 */ jal func_800E1A18 +/* B62F5C 800EBDBC 0C038686 */ jal Audio_SetBankLoadStatus /* B62F60 800EBDC0 24050002 */ li $a1, 2 /* B62F64 800EBDC4 8E580000 */ lw $t8, ($s2) -/* B62F68 800EBDC8 3C048017 */ lui $a0, %hi(D_80171A18) +/* B62F68 800EBDC8 3C048017 */ lui $a0, %hi(gAudioContext+0x2898) /* B62F6C 800EBDCC 00184080 */ sll $t0, $t8, 2 /* B62F70 800EBDD0 05030006 */ bgezl $t0, .L800EBDEC /* B62F74 800EBDD4 964D000A */ lhu $t5, 0xa($s2) @@ -213,7 +213,7 @@ glabel func_800EBD58 /* B62FA4 800EBE04 03194021 */ addu $t0, $t8, $t9 /* B62FA8 800EBE08 AE4C00E0 */ sw $t4, 0xe0($s2) /* B62FAC 800EBE0C A648000A */ sh $t0, 0xa($s2) -/* B62FB0 800EBE10 84841A18 */ lh $a0, %lo(D_80171A18)($a0) +/* B62FB0 800EBE10 84841A18 */ lh $a0, %lo(gAudioContext+0x2898)($a0) /* B62FB4 800EBE14 3102FFFF */ andi $v0, $t0, 0xffff /* B62FB8 800EBE18 0044082A */ slt $at, $v0, $a0 /* B62FBC 800EBE1C 542001CC */ bnezl $at, .L800EC550 @@ -238,18 +238,18 @@ glabel func_800EBD58 /* B63004 800EBE64 A2590000 */ sb $t9, ($s2) .L800EBE68: glabel L800EBE68 -/* B63008 800EBE68 0C03A752 */ jal func_800E9D48 +/* B63008 800EBE68 0C03A752 */ jal Audio_M64ReadU8 /* B6300C 800EBE6C 02202025 */ move $a0, $s1 /* B63010 800EBE70 284100F2 */ slti $at, $v0, 0xf2 /* B63014 800EBE74 14200014 */ bnez $at, .L800EBEC8 /* B63018 800EBE78 305000FF */ andi $s0, $v0, 0xff /* B6301C 800EBE7C 02202025 */ move $a0, $s1 -/* B63020 800EBE80 0C03A4D0 */ jal func_800E9340 +/* B63020 800EBE80 0C03A4D0 */ jal Audio_GetScriptControlFlowArgument /* B63024 800EBE84 320500FF */ andi $a1, $s0, 0xff /* B63028 800EBE88 02402025 */ move $a0, $s2 /* B6302C 800EBE8C 02202825 */ move $a1, $s1 /* B63030 800EBE90 02003025 */ move $a2, $s0 -/* B63034 800EBE94 0C03A4EA */ jal func_800E93A8 +/* B63034 800EBE94 0C03A4EA */ jal Audio_HandleScriptFlowControl /* B63038 800EBE98 00403825 */ move $a3, $v0 /* B6303C 800EBE9C 1040FFF2 */ beqz $v0, .L800EBE68 /* B63040 800EBEA0 00000000 */ nop @@ -281,7 +281,7 @@ glabel L800EBEFC /* B6309C 800EBEFC 2650009C */ addiu $s0, $s2, 0x9c /* B630A0 800EBF00 0C039F80 */ jal Audio_NotePoolClear /* B630A4 800EBF04 02002025 */ move $a0, $s0 -/* B630A8 800EBF08 0C03A752 */ jal func_800E9D48 +/* B630A8 800EBF08 0C03A752 */ jal Audio_M64ReadU8 /* B630AC 800EBF0C 02202025 */ move $a0, $s1 /* B630B0 800EBF10 02002025 */ move $a0, $s0 /* B630B4 800EBF14 0C039FD8 */ jal Audio_NotePoolFill @@ -298,7 +298,7 @@ glabel L800EBF2C glabel L800EBF3C /* B630DC 800EBF3C A640000E */ sh $zero, 0xe($s2) glabel L800EBF40 -/* B630E0 800EBF40 0C03A752 */ jal func_800E9D48 +/* B630E0 800EBF40 0C03A752 */ jal Audio_M64ReadU8 /* B630E4 800EBF44 02202025 */ move $a0, $s1 /* B630E8 800EBF48 8649000E */ lh $t1, 0xe($s2) /* B630EC 800EBF4C 00025600 */ sll $t2, $v0, 0x18 @@ -307,14 +307,14 @@ glabel L800EBF40 /* B630F8 800EBF58 1000FFC3 */ b .L800EBE68 /* B630FC 800EBF5C A64C000E */ sh $t4, 0xe($s2) glabel L800EBF60 -/* B63100 800EBF60 0C03A752 */ jal func_800E9D48 +/* B63100 800EBF60 0C03A752 */ jal Audio_M64ReadU8 /* B63104 800EBF64 02202025 */ move $a0, $s1 /* B63108 800EBF68 00026880 */ sll $t5, $v0, 2 /* B6310C 800EBF6C 01A26823 */ subu $t5, $t5, $v0 /* B63110 800EBF70 000D6900 */ sll $t5, $t5, 4 /* B63114 800EBF74 A64D0008 */ sh $t5, 8($s2) -/* B63118 800EBF78 3C048017 */ lui $a0, %hi(D_80171A18) -/* B6311C 800EBF7C 84841A18 */ lh $a0, %lo(D_80171A18)($a0) +/* B63118 800EBF78 3C048017 */ lui $a0, %hi(gAudioContext+0x2898) +/* B6311C 800EBF7C 84841A18 */ lh $a0, %lo(gAudioContext+0x2898)($a0) /* B63120 800EBF80 31A3FFFF */ andi $v1, $t5, 0xffff /* B63124 800EBF84 24180001 */ li $t8, 1 /* B63128 800EBF88 0083082A */ slt $at, $a0, $v1 @@ -330,7 +330,7 @@ glabel L800EBF60 /* B6314C 800EBFAC 1000FFAE */ b .L800EBE68 /* B63150 800EBFB0 A6580008 */ sh $t8, 8($s2) glabel L800EBFB4 -/* B63154 800EBFB4 0C03A752 */ jal func_800E9D48 +/* B63154 800EBFB4 0C03A752 */ jal Audio_M64ReadU8 /* B63158 800EBFB8 02202025 */ move $a0, $s1 /* B6315C 800EBFBC 0002CE00 */ sll $t9, $v0, 0x18 /* B63160 800EBFC0 00194603 */ sra $t0, $t9, 0x18 @@ -340,10 +340,10 @@ glabel L800EBFB4 /* B63170 800EBFD0 1000FFA5 */ b .L800EBE68 /* B63174 800EBFD4 A64A000C */ sh $t2, 0xc($s2) glabel L800EBFD8 -/* B63178 800EBFD8 0C03A752 */ jal func_800E9D48 +/* B63178 800EBFD8 0C03A752 */ jal Audio_M64ReadU8 /* B6317C 800EBFDC 02202025 */ move $a0, $s1 /* B63180 800EBFE0 305000FF */ andi $s0, $v0, 0xff -/* B63184 800EBFE4 0C03A757 */ jal func_800E9D5C +/* B63184 800EBFE4 0C03A757 */ jal Audio_M64ReadS16 /* B63188 800EBFE8 02202025 */ move $a0, $s1 /* B6318C 800EBFEC 12000008 */ beqz $s0, .L800EC010 /* B63190 800EBFF0 02002025 */ move $a0, $s0 @@ -374,7 +374,7 @@ glabel L800EBFD8 /* B631EC 800EC04C 1000FF86 */ b .L800EBE68 /* B631F0 800EC050 E6520020 */ swc1 $f18, 0x20($s2) glabel L800EC054 -/* B631F4 800EC054 0C03A752 */ jal func_800E9D48 +/* B631F4 800EC054 0C03A752 */ jal Audio_M64ReadU8 /* B631F8 800EC058 02202025 */ move $a0, $s1 /* B631FC 800EC05C 92430001 */ lbu $v1, 1($s2) /* B63200 800EC060 24010001 */ li $at, 1 @@ -416,7 +416,7 @@ glabel L800EC054 /* B63284 800EC0E4 1000FF60 */ b .L800EBE68 /* B63288 800EC0E8 E644001C */ swc1 $f4, 0x1c($s2) glabel L800EC0EC -/* B6328C 800EC0EC 0C03A752 */ jal func_800E9D48 +/* B6328C 800EC0EC 0C03A752 */ jal Audio_M64ReadU8 /* B63290 800EC0F0 02202025 */ move $a0, $s1 /* B63294 800EC0F4 00026E00 */ sll $t5, $v0, 0x18 /* B63298 800EC0F8 000D7603 */ sra $t6, $t5, 0x18 @@ -428,20 +428,20 @@ glabel L800EC0EC /* B632B0 800EC110 1000FF55 */ b .L800EBE68 /* B632B4 800EC114 E652002C */ swc1 $f18, 0x2c($s2) glabel L800EC118 -/* B632B8 800EC118 0C03A757 */ jal func_800E9D5C +/* B632B8 800EC118 0C03A757 */ jal Audio_M64ReadS16 /* B632BC 800EC11C 02202025 */ move $a0, $s1 /* B632C0 800EC120 02402025 */ move $a0, $s2 -/* B632C4 800EC124 0C03A64D */ jal func_800E9934 +/* B632C4 800EC124 0C03A64D */ jal Audio_SequencePlayerInitChannels /* B632C8 800EC128 3045FFFF */ andi $a1, $v0, 0xffff /* B632CC 800EC12C 1000FF4E */ b .L800EBE68 /* B632D0 800EC130 00000000 */ nop glabel L800EC134 -/* B632D4 800EC134 0C03A757 */ jal func_800E9D5C +/* B632D4 800EC134 0C03A757 */ jal Audio_M64ReadS16 /* B632D8 800EC138 02202025 */ move $a0, $s1 /* B632DC 800EC13C 1000FF4A */ b .L800EBE68 /* B632E0 800EC140 00000000 */ nop glabel L800EC144 -/* B632E4 800EC144 0C03A752 */ jal func_800E9D48 +/* B632E4 800EC144 0C03A752 */ jal Audio_M64ReadU8 /* B632E8 800EC148 02202025 */ move $a0, $s1 /* B632EC 800EC14C 00027E00 */ sll $t7, $v0, 0x18 /* B632F0 800EC150 000FC603 */ sra $t8, $t7, 0x18 @@ -458,12 +458,12 @@ glabel L800EC170 /* B63318 800EC178 1000FF3B */ b .L800EBE68 /* B6331C 800EC17C A24A0000 */ sb $t2, ($s2) glabel L800EC180 -/* B63320 800EC180 0C03A752 */ jal func_800E9D48 +/* B63320 800EC180 0C03A752 */ jal Audio_M64ReadU8 /* B63324 800EC184 02202025 */ move $a0, $s1 /* B63328 800EC188 1000FF37 */ b .L800EBE68 /* B6332C 800EC18C A2420003 */ sb $v0, 3($s2) glabel L800EC190 -/* B63330 800EC190 0C03A757 */ jal func_800E9D5C +/* B63330 800EC190 0C03A757 */ jal Audio_M64ReadS16 /* B63334 800EC194 02202025 */ move $a0, $s1 /* B63338 800EC198 8E490018 */ lw $t1, 0x18($s2) /* B6333C 800EC19C 304BFFFF */ andi $t3, $v0, 0xffff @@ -476,22 +476,22 @@ glabel L800EC190 /* B63354 800EC1B4 1000FF2C */ b .L800EBE68 /* B63358 800EC1B8 AE430098 */ sw $v1, 0x98($s2) glabel L800EC1BC -/* B6335C 800EC1BC 0C03A752 */ jal func_800E9D48 +/* B6335C 800EC1BC 0C03A752 */ jal Audio_M64ReadU8 /* B63360 800EC1C0 02202025 */ move $a0, $s1 /* B63364 800EC1C4 1000FF28 */ b .L800EBE68 /* B63368 800EC1C8 A2420002 */ sb $v0, 2($s2) glabel L800EC1CC -/* B6336C 800EC1CC 0C03A752 */ jal func_800E9D48 +/* B6336C 800EC1CC 0C03A752 */ jal Audio_M64ReadU8 /* B63370 800EC1D0 02202025 */ move $a0, $s1 /* B63374 800EC1D4 14400006 */ bnez $v0, .L800EC1F0 -/* B63378 800EC1D8 3C0F8017 */ lui $t7, %hi(D_80171AFC) # $t7, 0x8017 -/* B6337C 800EC1DC 3C0C8017 */ lui $t4, %hi(D_80171AFC) # $t4, 0x8017 -/* B63380 800EC1E0 8D8C1AFC */ lw $t4, %lo(D_80171AFC)($t4) +/* B63378 800EC1D8 3C0F8017 */ lui $t7, %hi(gAudioContext+0x297c) # $t7, 0x8017 +/* B6337C 800EC1DC 3C0C8017 */ lui $t4, %hi(gAudioContext+0x297c) # $t4, 0x8017 +/* B63380 800EC1E0 8D8C1AFC */ lw $t4, %lo(gAudioContext+0x297c)($t4) /* B63384 800EC1E4 000C7082 */ srl $t6, $t4, 2 /* B63388 800EC1E8 1000FF1F */ b .L800EBE68 /* B6338C 800EC1EC A22E0019 */ sb $t6, 0x19($s1) .L800EC1F0: -/* B63390 800EC1F0 8DEF1AFC */ lw $t7, %lo(D_80171AFC)($t7) +/* B63390 800EC1F0 8DEF1AFC */ lw $t7, %lo(gAudioContext+0x297c)($t7) /* B63394 800EC1F4 305900FF */ andi $t9, $v0, 0xff /* B63398 800EC1F8 000FC082 */ srl $t8, $t7, 2 /* B6339C 800EC1FC 0319001B */ divu $zero, $t8, $t9 @@ -504,7 +504,7 @@ glabel L800EC1CC /* B633B4 800EC214 1000FF14 */ b .L800EBE68 /* B633B8 800EC218 00000000 */ nop glabel L800EC21C -/* B633BC 800EC21C 0C03A757 */ jal func_800E9D5C +/* B633BC 800EC21C 0C03A757 */ jal Audio_M64ReadS16 /* B633C0 800EC220 02202025 */ move $a0, $s1 /* B633C4 800EC224 82250019 */ lb $a1, 0x19($s1) /* B633C8 800EC228 2401FFFF */ li $at, -1 @@ -535,29 +535,29 @@ glabel L800EC21C /* B6342C 800EC28C 1000FEF6 */ b .L800EBE68 /* B63430 800EC290 AE2B0000 */ sw $t3, ($s1) glabel L800EC294 -/* B63434 800EC294 0C03A752 */ jal func_800E9D48 +/* B63434 800EC294 0C03A752 */ jal Audio_M64ReadU8 /* B63438 800EC298 02202025 */ move $a0, $s1 /* B6343C 800EC29C 1000FEF2 */ b .L800EBE68 /* B63440 800EC2A0 A2220019 */ sb $v0, 0x19($s1) glabel L800EC2A4 -/* B63444 800EC2A4 0C03A752 */ jal func_800E9D48 +/* B63444 800EC2A4 0C03A752 */ jal Audio_M64ReadU8 /* B63448 800EC2A8 02202025 */ move $a0, $s1 /* B6344C 800EC2AC 822E0019 */ lb $t6, 0x19($s1) /* B63450 800EC2B0 01C26824 */ and $t5, $t6, $v0 /* B63454 800EC2B4 1000FEEC */ b .L800EBE68 /* B63458 800EC2B8 A22D0019 */ sb $t5, 0x19($s1) glabel L800EC2BC -/* B6345C 800EC2BC 0C03A752 */ jal func_800E9D48 +/* B6345C 800EC2BC 0C03A752 */ jal Audio_M64ReadU8 /* B63460 800EC2C0 02202025 */ move $a0, $s1 /* B63464 800EC2C4 822F0019 */ lb $t7, 0x19($s1) /* B63468 800EC2C8 01E2C023 */ subu $t8, $t7, $v0 /* B6346C 800EC2CC 1000FEE6 */ b .L800EBE68 /* B63470 800EC2D0 A2380019 */ sb $t8, 0x19($s1) glabel L800EC2D4 -/* B63474 800EC2D4 0C03A752 */ jal func_800E9D48 +/* B63474 800EC2D4 0C03A752 */ jal Audio_M64ReadU8 /* B63478 800EC2D8 02202025 */ move $a0, $s1 /* B6347C 800EC2DC 305000FF */ andi $s0, $v0, 0xff -/* B63480 800EC2E0 0C03A757 */ jal func_800E9D5C +/* B63480 800EC2E0 0C03A757 */ jal Audio_M64ReadS16 /* B63484 800EC2E4 02202025 */ move $a0, $s1 /* B63488 800EC2E8 8E590018 */ lw $t9, 0x18($s2) /* B6348C 800EC2EC 92280019 */ lbu $t0, 0x19($s1) @@ -572,27 +572,27 @@ glabel L800EC304 /* B634AC 800EC30C 1000008F */ b .L800EC54C /* B634B0 800EC310 A24E0000 */ sb $t6, ($s2) glabel L800EC314 -/* B634B4 800EC314 0C03A757 */ jal func_800E9D5C +/* B634B4 800EC314 0C03A757 */ jal Audio_M64ReadS16 /* B634B8 800EC318 02202025 */ move $a0, $s1 /* B634BC 800EC31C 304DFFFF */ andi $t5, $v0, 0xffff /* B634C0 800EC320 1000FED1 */ b .L800EBE68 /* B634C4 800EC324 AE4D00E0 */ sw $t5, 0xe0($s2) glabel L800EC328 -/* B634C8 800EC328 0C03A757 */ jal func_800E9D5C +/* B634C8 800EC328 0C03A757 */ jal Audio_M64ReadS16 /* B634CC 800EC32C 02202025 */ move $a0, $s1 -/* B634D0 800EC330 0C03A752 */ jal func_800E9D48 +/* B634D0 800EC330 0C03A752 */ jal Audio_M64ReadU8 /* B634D4 800EC334 02202025 */ move $a0, $s1 /* B634D8 800EC338 1000FECB */ b .L800EBE68 /* B634DC 800EC33C 00000000 */ nop glabel L800EC340 -/* B634E0 800EC340 0C03A752 */ jal func_800E9D48 +/* B634E0 800EC340 0C03A752 */ jal Audio_M64ReadU8 /* B634E4 800EC344 02202025 */ move $a0, $s1 /* B634E8 800EC348 240100FF */ li $at, 255 /* B634EC 800EC34C 14410002 */ bne $v0, $at, .L800EC358 /* B634F0 800EC350 305000FF */ andi $s0, $v0, 0xff /* B634F4 800EC354 92500007 */ lbu $s0, 7($s2) .L800EC358: -/* B634F8 800EC358 0C03A752 */ jal func_800E9D48 +/* B634F8 800EC358 0C03A752 */ jal Audio_M64ReadU8 /* B634FC 800EC35C 02202025 */ move $a0, $s1 /* B63500 800EC360 02002025 */ move $a0, $s0 /* B63504 800EC364 00402825 */ move $a1, $v0 @@ -663,33 +663,33 @@ glabel L800EC438 /* B635EC 800EC44C 1000FE86 */ b .L800EBE68 /* B635F0 800EC450 00000000 */ nop glabel L800EC454 -/* B635F4 800EC454 0C03A757 */ jal func_800E9D5C +/* B635F4 800EC454 0C03A757 */ jal Audio_M64ReadS16 /* B635F8 800EC458 02202025 */ move $a0, $s1 /* B635FC 800EC45C 8E4A0018 */ lw $t2, 0x18($s2) /* B63600 800EC460 02002825 */ move $a1, $s0 /* B63604 800EC464 3049FFFF */ andi $t1, $v0, 0xffff /* B63608 800EC468 30A5000F */ andi $a1, $a1, 0xf /* B6360C 800EC46C 02402025 */ move $a0, $s2 -/* B63610 800EC470 0C03A6AB */ jal func_800E9AAC +/* B63610 800EC470 0C03A6AB */ jal Audio_SequenceChannelEnable /* B63614 800EC474 01493021 */ addu $a2, $t2, $t1 /* B63618 800EC478 1000FE7B */ b .L800EBE68 /* B6361C 800EC47C 00000000 */ nop glabel L800EC480 -/* B63620 800EC480 0C03A757 */ jal func_800E9D5C +/* B63620 800EC480 0C03A757 */ jal Audio_M64ReadS16 /* B63624 800EC484 02202025 */ move $a0, $s1 /* B63628 800EC488 8E280000 */ lw $t0, ($s1) /* B6362C 800EC48C 02002825 */ move $a1, $s0 /* B63630 800EC490 30A5000F */ andi $a1, $a1, 0xf /* B63634 800EC494 02402025 */ move $a0, $s2 -/* B63638 800EC498 0C03A6AB */ jal func_800E9AAC +/* B63638 800EC498 0C03A6AB */ jal Audio_SequenceChannelEnable /* B6363C 800EC49C 01023021 */ addu $a2, $t0, $v0 /* B63640 800EC4A0 1000FE71 */ b .L800EBE68 /* B63644 800EC4A4 00000000 */ nop glabel L800EC4A8 -/* B63648 800EC4A8 0C03A752 */ jal func_800E9D48 +/* B63648 800EC4A8 0C03A752 */ jal Audio_M64ReadU8 /* B6364C 800EC4AC 02202025 */ move $a0, $s1 /* B63650 800EC4B0 305000FF */ andi $s0, $v0, 0xff -/* B63654 800EC4B4 0C03A757 */ jal func_800E9D5C +/* B63654 800EC4B4 0C03A757 */ jal Audio_M64ReadS16 /* B63658 800EC4B8 02202025 */ move $a0, $s1 /* B6365C 800EC4BC 93AE0066 */ lbu $t6, 0x66($sp) /* B63660 800EC4C0 8E4C0018 */ lw $t4, 0x18($s2) @@ -702,10 +702,10 @@ glabel L800EC4A8 /* B6367C 800EC4DC 1000FE62 */ b .L800EBE68 /* B63680 800EC4E0 00000000 */ nop glabel L800EC4E4 -/* B63684 800EC4E4 0C03A752 */ jal func_800E9D48 +/* B63684 800EC4E4 0C03A752 */ jal Audio_M64ReadU8 /* B63688 800EC4E8 02202025 */ move $a0, $s1 /* B6368C 800EC4EC 00408025 */ move $s0, $v0 -/* B63690 800EC4F0 0C03A752 */ jal func_800E9D48 +/* B63690 800EC4F0 0C03A752 */ jal Audio_M64ReadU8 /* B63694 800EC4F4 02202025 */ move $a0, $s1 /* B63698 800EC4F8 93AF0066 */ lbu $t7, 0x66($sp) /* B6369C 800EC4FC 02002025 */ move $a0, $s0 @@ -726,7 +726,7 @@ glabel L800EC4E4 /* B636CC 800EC52C 00186FC2 */ srl $t5, $t8, 0x1f /* B636D0 800EC530 51A00004 */ beql $t5, $zero, .L800EC544 /* B636D4 800EC534 26100004 */ addiu $s0, $s0, 4 -/* B636D8 800EC538 0C03AC1A */ jal func_800EB068 +/* B636D8 800EC538 0C03AC1A */ jal Audio_SequenceChannelProcessScript /* B636DC 800EC53C 00000000 */ nop /* B636E0 800EC540 26100004 */ addiu $s0, $s0, 4 .L800EC544: diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9340.s b/asm/non_matchings/code/audio_seqplayer/func_800E9340.s deleted file mode 100644 index 26d1396803..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9340.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel func_800E9340 -/* B604E0 800E9340 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B604E4 800E9344 AFA5001C */ sw $a1, 0x1c($sp) -/* B604E8 800E9348 30A500FF */ andi $a1, $a1, 0xff -/* B604EC 800E934C 3C028013 */ lui $v0, %hi(D_80130470) -/* B604F0 800E9350 00451021 */ addu $v0, $v0, $a1 -/* B604F4 800E9354 90420470 */ lbu $v0, %lo(D_80130470)($v0) -/* B604F8 800E9358 24010001 */ li $at, 1 -/* B604FC 800E935C AFBF0014 */ sw $ra, 0x14($sp) -/* B60500 800E9360 304F0003 */ andi $t7, $v0, 3 -/* B60504 800E9364 15E1000B */ bne $t7, $at, .L800E9394 -/* B60508 800E9368 00001825 */ move $v1, $zero -/* B6050C 800E936C 30580080 */ andi $t8, $v0, 0x80 -/* B60510 800E9370 17000005 */ bnez $t8, .L800E9388 -/* B60514 800E9374 00000000 */ nop -/* B60518 800E9378 0C03A752 */ jal func_800E9D48 -/* B6051C 800E937C 00000000 */ nop -/* B60520 800E9380 10000004 */ b .L800E9394 -/* B60524 800E9384 3043FFFF */ andi $v1, $v0, 0xffff -.L800E9388: -/* B60528 800E9388 0C03A757 */ jal func_800E9D5C -/* B6052C 800E938C 00000000 */ nop -/* B60530 800E9390 3043FFFF */ andi $v1, $v0, 0xffff -.L800E9394: -/* B60534 800E9394 8FBF0014 */ lw $ra, 0x14($sp) -/* B60538 800E9398 27BD0018 */ addiu $sp, $sp, 0x18 -/* B6053C 800E939C 00601025 */ move $v0, $v1 -/* B60540 800E93A0 03E00008 */ jr $ra -/* B60544 800E93A4 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E93A8.s b/asm/non_matchings/code/audio_seqplayer/func_800E93A8.s deleted file mode 100644 index 80d59be8f5..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E93A8.s +++ /dev/null @@ -1,158 +0,0 @@ -.late_rodata -glabel jtbl_80149620 - .word L800E9530 - .word L800E9530 - .word L800E9530 - .word L800E94DC - .word L800E94CC - .word L800E9484 - .word L800E9454 - .word L800E94DC - .word L800E94DC - .word L800E94DC - .word L800E9420 - .word L800E9408 - .word L800E9418 - .word L800E93D8 - -.text -glabel func_800E93A8 -/* B60548 800E93A8 24CEFF0E */ addiu $t6, $a2, -0xf2 -/* B6054C 800E93AC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B60550 800E93B0 2DC1000E */ sltiu $at, $t6, 0xe -/* B60554 800E93B4 AFBF0014 */ sw $ra, 0x14($sp) -/* B60558 800E93B8 1020006D */ beqz $at, .L800E9570 -/* B6055C 800E93BC 00C01025 */ move $v0, $a2 -/* B60560 800E93C0 000E7080 */ sll $t6, $t6, 2 -/* B60564 800E93C4 3C018015 */ lui $at, %hi(jtbl_80149620) -/* B60568 800E93C8 002E0821 */ addu $at, $at, $t6 -/* B6056C 800E93CC 8C2E9620 */ lw $t6, %lo(jtbl_80149620)($at) -/* B60570 800E93D0 01C00008 */ jr $t6 -/* B60574 800E93D4 00000000 */ nop -glabel L800E93D8 -/* B60578 800E93D8 90A20018 */ lbu $v0, 0x18($a1) -/* B6057C 800E93DC 14400003 */ bnez $v0, .L800E93EC -/* B60580 800E93E0 2443FFFF */ addiu $v1, $v0, -1 -/* B60584 800E93E4 10000063 */ b .L800E9574 -/* B60588 800E93E8 2402FFFF */ li $v0, -1 -.L800E93EC: -/* B6058C 800E93EC 306300FF */ andi $v1, $v1, 0xff -/* B60590 800E93F0 00037880 */ sll $t7, $v1, 2 -/* B60594 800E93F4 00AFC021 */ addu $t8, $a1, $t7 -/* B60598 800E93F8 A0A30018 */ sb $v1, 0x18($a1) -/* B6059C 800E93FC 8F190004 */ lw $t9, 4($t8) -/* B605A0 800E9400 1000005B */ b .L800E9570 -/* B605A4 800E9404 ACB90000 */ sw $t9, ($a1) -glabel L800E9408 -/* B605A8 800E9408 0C03A765 */ jal func_800E9D94 -/* B605AC 800E940C 00A02025 */ move $a0, $a1 -/* B605B0 800E9410 10000059 */ b .L800E9578 -/* B605B4 800E9414 8FBF0014 */ lw $ra, 0x14($sp) -glabel L800E9418 -/* B605B8 800E9418 10000056 */ b .L800E9574 -/* B605BC 800E941C 24020001 */ li $v0, 1 -glabel L800E9420 -/* B605C0 800E9420 90A90018 */ lbu $t1, 0x18($a1) -/* B605C4 800E9424 8CA80000 */ lw $t0, ($a1) -/* B605C8 800E9428 30EFFFFF */ andi $t7, $a3, 0xffff -/* B605CC 800E942C 00095080 */ sll $t2, $t1, 2 -/* B605D0 800E9430 00AA5821 */ addu $t3, $a1, $t2 -/* B605D4 800E9434 AD680004 */ sw $t0, 4($t3) -/* B605D8 800E9438 90AC0018 */ lbu $t4, 0x18($a1) -/* B605DC 800E943C 258D0001 */ addiu $t5, $t4, 1 -/* B605E0 800E9440 A0AD0018 */ sb $t5, 0x18($a1) -/* B605E4 800E9444 8C8E0018 */ lw $t6, 0x18($a0) -/* B605E8 800E9448 01CFC021 */ addu $t8, $t6, $t7 -/* B605EC 800E944C 10000048 */ b .L800E9570 -/* B605F0 800E9450 ACB80000 */ sw $t8, ($a1) -glabel L800E9454 -/* B605F4 800E9454 90B90018 */ lbu $t9, 0x18($a1) -/* B605F8 800E9458 00B94821 */ addu $t1, $a1, $t9 -/* B605FC 800E945C A1270014 */ sb $a3, 0x14($t1) -/* B60600 800E9460 90A80018 */ lbu $t0, 0x18($a1) -/* B60604 800E9464 8CAA0000 */ lw $t2, ($a1) -/* B60608 800E9468 00085880 */ sll $t3, $t0, 2 -/* B6060C 800E946C 00AB6021 */ addu $t4, $a1, $t3 -/* B60610 800E9470 AD8A0004 */ sw $t2, 4($t4) -/* B60614 800E9474 90AD0018 */ lbu $t5, 0x18($a1) -/* B60618 800E9478 25AE0001 */ addiu $t6, $t5, 1 -/* B6061C 800E947C 1000003C */ b .L800E9570 -/* B60620 800E9480 A0AE0018 */ sb $t6, 0x18($a1) -glabel L800E9484 -/* B60624 800E9484 90AF0018 */ lbu $t7, 0x18($a1) -/* B60628 800E9488 00AF1821 */ addu $v1, $a1, $t7 -/* B6062C 800E948C 90780013 */ lbu $t8, 0x13($v1) -/* B60630 800E9490 2719FFFF */ addiu $t9, $t8, -1 -/* B60634 800E9494 A0790013 */ sb $t9, 0x13($v1) -/* B60638 800E9498 90A20018 */ lbu $v0, 0x18($a1) -/* B6063C 800E949C 00A24821 */ addu $t1, $a1, $v0 -/* B60640 800E94A0 91280013 */ lbu $t0, 0x13($t1) -/* B60644 800E94A4 00402025 */ move $a0, $v0 -/* B60648 800E94A8 00045880 */ sll $t3, $a0, 2 -/* B6064C 800E94AC 11000005 */ beqz $t0, .L800E94C4 -/* B60650 800E94B0 244DFFFF */ addiu $t5, $v0, -1 -/* B60654 800E94B4 00AB5021 */ addu $t2, $a1, $t3 -/* B60658 800E94B8 8D4C0000 */ lw $t4, ($t2) -/* B6065C 800E94BC 1000002C */ b .L800E9570 -/* B60660 800E94C0 ACAC0000 */ sw $t4, ($a1) -.L800E94C4: -/* B60664 800E94C4 1000002A */ b .L800E9570 -/* B60668 800E94C8 A0AD0018 */ sb $t5, 0x18($a1) -glabel L800E94CC -/* B6066C 800E94CC 90AE0018 */ lbu $t6, 0x18($a1) -/* B60670 800E94D0 25CFFFFF */ addiu $t7, $t6, -1 -/* B60674 800E94D4 10000026 */ b .L800E9570 -/* B60678 800E94D8 A0AF0018 */ sb $t7, 0x18($a1) -glabel L800E94DC -/* B6067C 800E94DC 240100FA */ li $at, 250 -/* B60680 800E94E0 54410004 */ bnel $v0, $at, .L800E94F4 -/* B60684 800E94E4 240100F9 */ li $at, 249 -/* B60688 800E94E8 80B80019 */ lb $t8, 0x19($a1) -/* B6068C 800E94EC 17000020 */ bnez $t8, .L800E9570 -/* B60690 800E94F0 240100F9 */ li $at, 249 -.L800E94F4: -/* B60694 800E94F4 54410004 */ bnel $v0, $at, .L800E9508 -/* B60698 800E94F8 240100F5 */ li $at, 245 -/* B6069C 800E94FC 80B90019 */ lb $t9, 0x19($a1) -/* B606A0 800E9500 0721001B */ bgez $t9, .L800E9570 -/* B606A4 800E9504 240100F5 */ li $at, 245 -.L800E9508: -/* B606A8 800E9508 54410005 */ bnel $v0, $at, .L800E9520 -/* B606AC 800E950C 8C880018 */ lw $t0, 0x18($a0) -/* B606B0 800E9510 80A90019 */ lb $t1, 0x19($a1) -/* B606B4 800E9514 05220017 */ bltzl $t1, .L800E9574 -/* B606B8 800E9518 00001025 */ move $v0, $zero -/* B606BC 800E951C 8C880018 */ lw $t0, 0x18($a0) -.L800E9520: -/* B606C0 800E9520 30EBFFFF */ andi $t3, $a3, 0xffff -/* B606C4 800E9524 010B5021 */ addu $t2, $t0, $t3 -/* B606C8 800E9528 10000011 */ b .L800E9570 -/* B606CC 800E952C ACAA0000 */ sw $t2, ($a1) -glabel L800E9530 -/* B606D0 800E9530 240100F3 */ li $at, 243 -/* B606D4 800E9534 54410004 */ bnel $v0, $at, .L800E9548 -/* B606D8 800E9538 240100F2 */ li $at, 242 -/* B606DC 800E953C 80AC0019 */ lb $t4, 0x19($a1) -/* B606E0 800E9540 1580000B */ bnez $t4, .L800E9570 -/* B606E4 800E9544 240100F2 */ li $at, 242 -.L800E9548: -/* B606E8 800E9548 54410005 */ bnel $v0, $at, .L800E9560 -/* B606EC 800E954C 8CAE0000 */ lw $t6, ($a1) -/* B606F0 800E9550 80AD0019 */ lb $t5, 0x19($a1) -/* B606F4 800E9554 05A30007 */ bgezl $t5, .L800E9574 -/* B606F8 800E9558 00001025 */ move $v0, $zero -/* B606FC 800E955C 8CAE0000 */ lw $t6, ($a1) -.L800E9560: -/* B60700 800E9560 0007C600 */ sll $t8, $a3, 0x18 -/* B60704 800E9564 0018CE03 */ sra $t9, $t8, 0x18 -/* B60708 800E9568 01D94821 */ addu $t1, $t6, $t9 -/* B6070C 800E956C ACA90000 */ sw $t1, ($a1) -.L800E9570: -/* B60710 800E9570 00001025 */ move $v0, $zero -.L800E9574: -/* B60714 800E9574 8FBF0014 */ lw $ra, 0x14($sp) -.L800E9578: -/* B60718 800E9578 27BD0018 */ addiu $sp, $sp, 0x18 -/* B6071C 800E957C 03E00008 */ jr $ra -/* B60720 800E9580 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9584.s b/asm/non_matchings/code/audio_seqplayer/func_800E9584.s deleted file mode 100644 index 04e120c4a3..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9584.s +++ /dev/null @@ -1,89 +0,0 @@ -glabel func_800E9584 -/* B60724 800E9584 3C0E8017 */ lui $t6, %hi(gAudioContext) # $t6, 0x8017 -/* B60728 800E9588 25CEF180 */ addiu $t6, %lo(gAudioContext) # addiu $t6, $t6, -0xe80 -/* B6072C 800E958C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B60730 800E9590 25CF5AB0 */ addiu $t7, $t6, 0x5ab0 -/* B60734 800E9594 AFBF0014 */ sw $ra, 0x14($sp) -/* B60738 800E9598 108F004B */ beq $a0, $t7, .L800E96C8 -/* B6073C 800E959C 00802825 */ move $a1, $a0 -/* B60740 800E95A0 90980000 */ lbu $t8, ($a0) -/* B60744 800E95A4 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B60748 800E95A8 44810000 */ mtc1 $at, $f0 -/* B6074C 800E95AC 3308FF7F */ andi $t0, $t8, 0xff7f -/* B60750 800E95B0 310A00BF */ andi $t2, $t0, 0xbf -/* B60754 800E95B4 A0880000 */ sb $t0, ($a0) -/* B60758 800E95B8 314C00DF */ andi $t4, $t2, 0xdf -/* B6075C 800E95BC A08A0000 */ sb $t2, ($a0) -/* B60760 800E95C0 318E00EF */ andi $t6, $t4, 0xef -/* B60764 800E95C4 A08C0000 */ sb $t4, ($a0) -/* B60768 800E95C8 31D800F7 */ andi $t8, $t6, 0xf7 -/* B6076C 800E95CC A08E0000 */ sb $t6, ($a0) -/* B60770 800E95D0 330800FB */ andi $t0, $t8, 0xfb -/* B60774 800E95D4 A0980000 */ sb $t8, ($a0) -/* B60778 800E95D8 24020800 */ li $v0, 2048 -/* B6077C 800E95DC 3C0F8013 */ lui $t7, %hi(D_8012FAD4) # $t7, 0x8013 -/* B60780 800E95E0 A0880000 */ sb $t0, ($a0) -/* B60784 800E95E4 310900FD */ andi $t1, $t0, 0xfd -/* B60788 800E95E8 240A00FF */ li $t2, 255 -/* B6078C 800E95EC 240B0040 */ li $t3, 64 -/* B60790 800E95F0 240C0080 */ li $t4, 128 -/* B60794 800E95F4 240D0003 */ li $t5, 3 -/* B60798 800E95F8 240E0001 */ li $t6, 1 -/* B6079C 800E95FC 25EFFAD4 */ addiu $t7, %lo(D_8012FAD4) # addiu $t7, $t7, -0x52c -/* B607A0 800E9600 241800F0 */ li $t8, 240 -/* B607A4 800E9604 A4820014 */ sh $v0, 0x14($a0) -/* B607A8 800E9608 A4820010 */ sh $v0, 0x10($a0) -/* B607AC 800E960C A4800026 */ sh $zero, 0x26($a0) -/* B607B0 800E9610 A0890000 */ sb $t1, ($a0) -/* B607B4 800E9614 A0800009 */ sb $zero, 9($a0) -/* B607B8 800E9618 A08000D0 */ sb $zero, 0xd0($a0) -/* B607BC 800E961C A08A0001 */ sb $t2, 1($a0) -/* B607C0 800E9620 A0800078 */ sb $zero, 0x78($a0) -/* B607C4 800E9624 A08B000A */ sb $t3, 0xa($a0) -/* B607C8 800E9628 A08C000B */ sb $t4, 0xb($a0) -/* B607CC 800E962C A080000D */ sb $zero, 0xd($a0) -/* B607D0 800E9630 A080000E */ sb $zero, 0xe($a0) -/* B607D4 800E9634 AC800040 */ sw $zero, 0x40($a0) -/* B607D8 800E9638 A0800008 */ sb $zero, 8($a0) -/* B607DC 800E963C A0800004 */ sb $zero, 4($a0) -/* B607E0 800E9640 A080000C */ sb $zero, 0xc($a0) -/* B607E4 800E9644 A08D0005 */ sb $t5, 5($a0) -/* B607E8 800E9648 A08E0006 */ sb $t6, 6($a0) -/* B607EC 800E964C A480001E */ sh $zero, 0x1e($a0) -/* B607F0 800E9650 AC8F0080 */ sw $t7, 0x80($a0) -/* B607F4 800E9654 A098007C */ sb $t8, 0x7c($a0) -/* B607F8 800E9658 A080007D */ sb $zero, 0x7d($a0) -/* B607FC 800E965C A4800016 */ sh $zero, 0x16($a0) -/* B60800 800E9660 A4800012 */ sh $zero, 0x12($a0) -/* B60804 800E9664 A4800018 */ sh $zero, 0x18($a0) -/* B60808 800E9668 A480001A */ sh $zero, 0x1a($a0) -/* B6080C 800E966C A480001C */ sh $zero, 0x1c($a0) -/* B60810 800E9670 AC8000CC */ sw $zero, 0xcc($a0) -/* B60814 800E9674 A4800020 */ sh $zero, 0x20($a0) -/* B60818 800E9678 A080000F */ sb $zero, 0xf($a0) -/* B6081C 800E967C E480002C */ swc1 $f0, 0x2c($a0) -/* B60820 800E9680 E4800028 */ swc1 $f0, 0x28($a0) -/* B60824 800E9684 E4800038 */ swc1 $f0, 0x38($a0) -/* B60828 800E9688 00002025 */ move $a0, $zero -/* B6082C 800E968C 2402FFFF */ li $v0, -1 -/* B60830 800E9690 00A01825 */ move $v1, $a1 -/* B60834 800E9694 24060008 */ li $a2, 8 -.L800E9698: -/* B60838 800E9698 24840004 */ addiu $a0, $a0, 4 -/* B6083C 800E969C A06200C5 */ sb $v0, 0xc5($v1) -/* B60840 800E96A0 A06200C6 */ sb $v0, 0xc6($v1) -/* B60844 800E96A4 A06200C7 */ sb $v0, 0xc7($v1) -/* B60848 800E96A8 24630004 */ addiu $v1, $v1, 4 -/* B6084C 800E96AC 1486FFFA */ bne $a0, $a2, .L800E9698 -/* B60850 800E96B0 A06200C0 */ sb $v0, 0xc0($v1) -/* B60854 800E96B4 90B90000 */ lbu $t9, ($a1) -/* B60858 800E96B8 24A40084 */ addiu $a0, $a1, 0x84 -/* B6085C 800E96BC 3328FFFE */ andi $t0, $t9, 0xfffe -/* B60860 800E96C0 0C039F43 */ jal Audio_InitNoteLists -/* B60864 800E96C4 A0A80000 */ sb $t0, ($a1) -.L800E96C8: -/* B60868 800E96C8 8FBF0014 */ lw $ra, 0x14($sp) -/* B6086C 800E96CC 27BD0018 */ addiu $sp, $sp, 0x18 -/* B60870 800E96D0 03E00008 */ jr $ra -/* B60874 800E96D4 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E96D8.s b/asm/non_matchings/code/audio_seqplayer/func_800E96D8.s deleted file mode 100644 index 520d9fb3f0..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E96D8.s +++ /dev/null @@ -1,78 +0,0 @@ -glabel func_800E96D8 -/* B60878 800E96D8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B6087C 800E96DC 00057880 */ sll $t7, $a1, 2 -/* B60880 800E96E0 AFBF0014 */ sw $ra, 0x14($sp) -/* B60884 800E96E4 AFA40028 */ sw $a0, 0x28($sp) -/* B60888 800E96E8 008F3021 */ addu $a2, $a0, $t7 -/* B6088C 800E96EC 8CC70050 */ lw $a3, 0x50($a2) -/* B60890 800E96F0 14E0000B */ bnez $a3, .L800E9720 -/* B60894 800E96F4 00E02025 */ move $a0, $a3 -/* B60898 800E96F8 3C048017 */ lui $a0, %hi(D_80174D08) -/* B6089C 800E96FC 24844D08 */ addiu $a0, %lo(D_80174D08) # addiu $a0, $a0, 0x4d08 -/* B608A0 800E9700 0C03A71A */ jal Audio_AudioListPopBack -/* B608A4 800E9704 AFA6001C */ sw $a2, 0x1c($sp) -/* B608A8 800E9708 8FA6001C */ lw $a2, 0x1c($sp) -/* B608AC 800E970C 14400007 */ bnez $v0, .L800E972C -/* B608B0 800E9710 ACC20050 */ sw $v0, 0x50($a2) -/* B608B4 800E9714 ACC00050 */ sw $zero, 0x50($a2) -/* B608B8 800E9718 10000034 */ b .L800E97EC -/* B608BC 800E971C 2402FFFF */ li $v0, -1 -.L800E9720: -/* B608C0 800E9720 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B608C4 800E9724 AFA6001C */ sw $a2, 0x1c($sp) -/* B608C8 800E9728 8FA6001C */ lw $a2, 0x1c($sp) -.L800E972C: -/* B608CC 800E972C 8CC30050 */ lw $v1, 0x50($a2) -/* B608D0 800E9730 8FB80028 */ lw $t8, 0x28($sp) -/* B608D4 800E9734 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B608D8 800E9738 906B0000 */ lbu $t3, ($v1) -/* B608DC 800E973C AC780050 */ sw $t8, 0x50($v1) -/* B608E0 800E9740 8FB90028 */ lw $t9, 0x28($sp) -/* B608E4 800E9744 356D0080 */ ori $t5, $t3, 0x80 -/* B608E8 800E9748 31AF00BF */ andi $t7, $t5, 0xbf -/* B608EC 800E974C 8F29007C */ lw $t1, 0x7c($t9) -/* B608F0 800E9750 44810000 */ mtc1 $at, $f0 -/* B608F4 800E9754 44802000 */ mtc1 $zero, $f4 -/* B608F8 800E9758 AC690018 */ sw $t1, 0x18($v1) -/* B608FC 800E975C 8F280080 */ lw $t0, 0x80($t9) -/* B60900 800E9760 31F900DF */ andi $t9, $t7, 0xdf -/* B60904 800E9764 A06D0000 */ sb $t5, ($v1) -/* B60908 800E9768 332900EF */ andi $t1, $t9, 0xef -/* B6090C 800E976C A06F0000 */ sb $t7, ($v1) -/* B60910 800E9770 312B00F7 */ andi $t3, $t1, 0xf7 -/* B60914 800E9774 A0790000 */ sb $t9, ($v1) -/* B60918 800E9778 316D00FB */ andi $t5, $t3, 0xfb -/* B6091C 800E977C A0690000 */ sb $t1, ($v1) -/* B60920 800E9780 31AF00FD */ andi $t7, $t5, 0xfd -/* B60924 800E9784 A06B0000 */ sb $t3, ($v1) -/* B60928 800E9788 A06D0000 */ sb $t5, ($v1) -/* B6092C 800E978C AC68001C */ sw $t0, 0x1c($v1) -/* B60930 800E9790 31F800FE */ andi $t8, $t7, 0xfe -/* B60934 800E9794 24190080 */ li $t9, 128 -/* B60938 800E9798 24080040 */ li $t0, 64 -/* B6093C 800E979C 240900FF */ li $t1, 255 -/* B60940 800E97A0 A06F0000 */ sb $t7, ($v1) -/* B60944 800E97A4 00001025 */ move $v0, $zero -/* B60948 800E97A8 A0600018 */ sb $zero, 0x18($v1) -/* B6094C 800E97AC A0780000 */ sb $t8, ($v1) -/* B60950 800E97B0 A0600001 */ sb $zero, 1($v1) -/* B60954 800E97B4 A0600020 */ sb $zero, 0x20($v1) -/* B60958 800E97B8 A060006C */ sb $zero, 0x6c($v1) -/* B6095C 800E97BC A0790003 */ sb $t9, 3($v1) -/* B60960 800E97C0 A0680006 */ sb $t0, 6($v1) -/* B60964 800E97C4 A4600010 */ sh $zero, 0x10($v1) -/* B60968 800E97C8 A4600008 */ sh $zero, 8($v1) -/* B6096C 800E97CC A460000A */ sh $zero, 0xa($v1) -/* B60970 800E97D0 A460000C */ sh $zero, 0xc($v1) -/* B60974 800E97D4 AC60002C */ sw $zero, 0x2c($v1) -/* B60978 800E97D8 AC600048 */ sw $zero, 0x48($v1) -/* B6097C 800E97DC A0690002 */ sb $t1, 2($v1) -/* B60980 800E97E0 E4600030 */ swc1 $f0, 0x30($v1) -/* B60984 800E97E4 E4600034 */ swc1 $f0, 0x34($v1) -/* B60988 800E97E8 E4640038 */ swc1 $f4, 0x38($v1) -.L800E97EC: -/* B6098C 800E97EC 8FBF0014 */ lw $ra, 0x14($sp) -/* B60990 800E97F0 27BD0028 */ addiu $sp, $sp, 0x28 -/* B60994 800E97F4 03E00008 */ jr $ra -/* B60998 800E97F8 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E97FC.s b/asm/non_matchings/code/audio_seqplayer/func_800E97FC.s deleted file mode 100644 index bdd4a23d0d..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E97FC.s +++ /dev/null @@ -1,36 +0,0 @@ -glabel func_800E97FC -/* B6099C 800E97FC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B609A0 800E9800 10800019 */ beqz $a0, .L800E9868 -/* B609A4 800E9804 AFBF0014 */ sw $ra, 0x14($sp) -/* B609A8 800E9808 8C820050 */ lw $v0, 0x50($a0) -/* B609AC 800E980C 3C0E8017 */ lui $t6, %hi(D_80174C30) # $t6, 0x8017 -/* B609B0 800E9810 25CE4C30 */ addiu $t6, %lo(D_80174C30) # addiu $t6, $t6, 0x4c30 -/* B609B4 800E9814 11C2000C */ beq $t6, $v0, .L800E9848 -/* B609B8 800E9818 00000000 */ nop -/* B609BC 800E981C 8C4F004C */ lw $t7, 0x4c($v0) -/* B609C0 800E9820 24010001 */ li $at, 1 -/* B609C4 800E9824 8DF80000 */ lw $t8, ($t7) -/* B609C8 800E9828 0018C840 */ sll $t9, $t8, 1 -/* B609CC 800E982C 001947C2 */ srl $t0, $t9, 0x1f -/* B609D0 800E9830 15010005 */ bne $t0, $at, .L800E9848 -/* B609D4 800E9834 00000000 */ nop -/* B609D8 800E9838 0C039EE0 */ jal Audio_SeqChanLayerNoteRelease -/* B609DC 800E983C AFA40018 */ sw $a0, 0x18($sp) -/* B609E0 800E9840 10000004 */ b .L800E9854 -/* B609E4 800E9844 8FA40018 */ lw $a0, 0x18($sp) -.L800E9848: -/* B609E8 800E9848 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B609EC 800E984C AFA40018 */ sw $a0, 0x18($sp) -/* B609F0 800E9850 8FA40018 */ lw $a0, 0x18($sp) -.L800E9854: -/* B609F4 800E9854 90890000 */ lbu $t1, ($a0) -/* B609F8 800E9858 312CFF7F */ andi $t4, $t1, 0xff7f -/* B609FC 800E985C A08C0000 */ sb $t4, ($a0) -/* B60A00 800E9860 358D0040 */ ori $t5, $t4, 0x40 -/* B60A04 800E9864 A08D0000 */ sb $t5, ($a0) -.L800E9868: -/* B60A08 800E9868 8FBF0014 */ lw $ra, 0x14($sp) -/* B60A0C 800E986C 27BD0018 */ addiu $sp, $sp, 0x18 -/* B60A10 800E9870 03E00008 */ jr $ra -/* B60A14 800E9874 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9878.s b/asm/non_matchings/code/audio_seqplayer/func_800E9878.s deleted file mode 100644 index 0bb16aa92b..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9878.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_800E9878 -/* B60A18 800E9878 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B60A1C 800E987C 00057080 */ sll $t6, $a1, 2 -/* B60A20 800E9880 AFBF0014 */ sw $ra, 0x14($sp) -/* B60A24 800E9884 008E1021 */ addu $v0, $a0, $t6 -/* B60A28 800E9888 8C460050 */ lw $a2, 0x50($v0) -/* B60A2C 800E988C 3C048017 */ lui $a0, %hi(D_80174D08) # $a0, 0x8017 -/* B60A30 800E9890 24844D08 */ addiu $a0, %lo(D_80174D08) # addiu $a0, $a0, 0x4d08 -/* B60A34 800E9894 10C00008 */ beqz $a2, .L800E98B8 -/* B60A38 800E9898 24C50070 */ addiu $a1, $a2, 0x70 -/* B60A3C 800E989C AFA20018 */ sw $v0, 0x18($sp) -/* B60A40 800E98A0 0C03A70A */ jal Audio_AudioListPushBack -/* B60A44 800E98A4 AFA6001C */ sw $a2, 0x1c($sp) -/* B60A48 800E98A8 0C03A5FF */ jal func_800E97FC -/* B60A4C 800E98AC 8FA4001C */ lw $a0, 0x1c($sp) -/* B60A50 800E98B0 8FA20018 */ lw $v0, 0x18($sp) -/* B60A54 800E98B4 AC400050 */ sw $zero, 0x50($v0) -.L800E98B8: -/* B60A58 800E98B8 8FBF0014 */ lw $ra, 0x14($sp) -/* B60A5C 800E98BC 27BD0020 */ addiu $sp, $sp, 0x20 -/* B60A60 800E98C0 03E00008 */ jr $ra -/* B60A64 800E98C4 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9934.s b/asm/non_matchings/code/audio_seqplayer/func_800E9934.s deleted file mode 100644 index 3380297458..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9934.s +++ /dev/null @@ -1,69 +0,0 @@ -glabel func_800E9934 -/* B60AD4 800E9934 AFA50004 */ sw $a1, 4($sp) -/* B60AD8 800E9938 30A5FFFF */ andi $a1, $a1, 0xffff -/* B60ADC 800E993C 00803025 */ move $a2, $a0 -/* B60AE0 800E9940 00001025 */ move $v0, $zero -/* B60AE4 800E9944 24070010 */ li $a3, 16 -.L800E9948: -/* B60AE8 800E9948 30AE0001 */ andi $t6, $a1, 1 -/* B60AEC 800E994C 11C0000A */ beqz $t6, .L800E9978 -/* B60AF0 800E9950 00A01825 */ move $v1, $a1 -/* B60AF4 800E9954 00027880 */ sll $t7, $v0, 2 -/* B60AF8 800E9958 00CFC021 */ addu $t8, $a2, $t7 -/* B60AFC 800E995C 8F040038 */ lw $a0, 0x38($t8) -/* B60B00 800E9960 90D90005 */ lbu $t9, 5($a2) -/* B60B04 800E9964 A0990007 */ sb $t9, 7($a0) -/* B60B08 800E9968 90C80003 */ lbu $t0, 3($a2) -/* B60B0C 800E996C A0880003 */ sb $t0, 3($a0) -/* B60B10 800E9970 90C90002 */ lbu $t1, 2($a2) -/* B60B14 800E9974 A0890002 */ sb $t1, 2($a0) -.L800E9978: -/* B60B18 800E9978 00032843 */ sra $a1, $v1, 1 -/* B60B1C 800E997C 30A3FFFF */ andi $v1, $a1, 0xffff -/* B60B20 800E9980 306A0001 */ andi $t2, $v1, 1 -/* B60B24 800E9984 1140000A */ beqz $t2, .L800E99B0 -/* B60B28 800E9988 00032843 */ sra $a1, $v1, 1 -/* B60B2C 800E998C 00025880 */ sll $t3, $v0, 2 -/* B60B30 800E9990 00CB6021 */ addu $t4, $a2, $t3 -/* B60B34 800E9994 8D84003C */ lw $a0, 0x3c($t4) -/* B60B38 800E9998 90CD0005 */ lbu $t5, 5($a2) -/* B60B3C 800E999C A08D0007 */ sb $t5, 7($a0) -/* B60B40 800E99A0 90CE0003 */ lbu $t6, 3($a2) -/* B60B44 800E99A4 A08E0003 */ sb $t6, 3($a0) -/* B60B48 800E99A8 90CF0002 */ lbu $t7, 2($a2) -/* B60B4C 800E99AC A08F0002 */ sb $t7, 2($a0) -.L800E99B0: -/* B60B50 800E99B0 30A3FFFF */ andi $v1, $a1, 0xffff -/* B60B54 800E99B4 30780001 */ andi $t8, $v1, 1 -/* B60B58 800E99B8 1300000A */ beqz $t8, .L800E99E4 -/* B60B5C 800E99BC 00032843 */ sra $a1, $v1, 1 -/* B60B60 800E99C0 0002C880 */ sll $t9, $v0, 2 -/* B60B64 800E99C4 00D94021 */ addu $t0, $a2, $t9 -/* B60B68 800E99C8 8D040040 */ lw $a0, 0x40($t0) -/* B60B6C 800E99CC 90C90005 */ lbu $t1, 5($a2) -/* B60B70 800E99D0 A0890007 */ sb $t1, 7($a0) -/* B60B74 800E99D4 90CA0003 */ lbu $t2, 3($a2) -/* B60B78 800E99D8 A08A0003 */ sb $t2, 3($a0) -/* B60B7C 800E99DC 90CB0002 */ lbu $t3, 2($a2) -/* B60B80 800E99E0 A08B0002 */ sb $t3, 2($a0) -.L800E99E4: -/* B60B84 800E99E4 30A3FFFF */ andi $v1, $a1, 0xffff -/* B60B88 800E99E8 306C0001 */ andi $t4, $v1, 1 -/* B60B8C 800E99EC 1180000A */ beqz $t4, .L800E9A18 -/* B60B90 800E99F0 00032843 */ sra $a1, $v1, 1 -/* B60B94 800E99F4 00026880 */ sll $t5, $v0, 2 -/* B60B98 800E99F8 00CD7021 */ addu $t6, $a2, $t5 -/* B60B9C 800E99FC 8DC40044 */ lw $a0, 0x44($t6) -/* B60BA0 800E9A00 90CF0005 */ lbu $t7, 5($a2) -/* B60BA4 800E9A04 A08F0007 */ sb $t7, 7($a0) -/* B60BA8 800E9A08 90D80003 */ lbu $t8, 3($a2) -/* B60BAC 800E9A0C A0980003 */ sb $t8, 3($a0) -/* B60BB0 800E9A10 90D90002 */ lbu $t9, 2($a2) -/* B60BB4 800E9A14 A0990002 */ sb $t9, 2($a0) -.L800E9A18: -/* B60BB8 800E9A18 24420004 */ addiu $v0, $v0, 4 -/* B60BBC 800E9A1C 1447FFCA */ bne $v0, $a3, .L800E9948 -/* B60BC0 800E9A20 30A5FFFF */ andi $a1, $a1, 0xffff -/* B60BC4 800E9A24 03E00008 */ jr $ra -/* B60BC8 800E9A28 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9A2C.s b/asm/non_matchings/code/audio_seqplayer/func_800E9A2C.s deleted file mode 100644 index d7a2be5658..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9A2C.s +++ /dev/null @@ -1,36 +0,0 @@ -glabel func_800E9A2C -/* B60BCC 800E9A2C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* B60BD0 800E9A30 AFB20020 */ sw $s2, 0x20($sp) -/* B60BD4 800E9A34 AFB40028 */ sw $s4, 0x28($sp) -/* B60BD8 800E9A38 AFB30024 */ sw $s3, 0x24($sp) -/* B60BDC 800E9A3C AFB1001C */ sw $s1, 0x1c($sp) -/* B60BE0 800E9A40 AFB00018 */ sw $s0, 0x18($sp) -/* B60BE4 800E9A44 3C128017 */ lui $s2, %hi(D_80174C30) # $s2, 0x8017 -/* B60BE8 800E9A48 AFBF002C */ sw $ra, 0x2c($sp) -/* B60BEC 800E9A4C AFA50034 */ sw $a1, 0x34($sp) -/* B60BF0 800E9A50 26524C30 */ addiu $s2, %lo(D_80174C30) # addiu $s2, $s2, 0x4c30 -/* B60BF4 800E9A54 00008025 */ move $s0, $zero -/* B60BF8 800E9A58 00808825 */ move $s1, $a0 -/* B60BFC 800E9A5C 24130001 */ li $s3, 1 -/* B60C00 800E9A60 24140040 */ li $s4, 64 -.L800E9A64: -/* B60C04 800E9A64 8E240038 */ lw $a0, 0x38($s1) -/* B60C08 800E9A68 00927026 */ xor $t6, $a0, $s2 -/* B60C0C 800E9A6C 000E702B */ sltu $t6, $zero, $t6 -/* B60C10 800E9A70 566E0004 */ bnel $s3, $t6, .L800E9A84 -/* B60C14 800E9A74 26100004 */ addiu $s0, $s0, 4 -/* B60C18 800E9A78 0C03A632 */ jal Audio_SequenceChannelDisable -/* B60C1C 800E9A7C 00000000 */ nop -/* B60C20 800E9A80 26100004 */ addiu $s0, $s0, 4 -.L800E9A84: -/* B60C24 800E9A84 1614FFF7 */ bne $s0, $s4, .L800E9A64 -/* B60C28 800E9A88 26310004 */ addiu $s1, $s1, 4 -/* B60C2C 800E9A8C 8FBF002C */ lw $ra, 0x2c($sp) -/* B60C30 800E9A90 8FB00018 */ lw $s0, 0x18($sp) -/* B60C34 800E9A94 8FB1001C */ lw $s1, 0x1c($sp) -/* B60C38 800E9A98 8FB20020 */ lw $s2, 0x20($sp) -/* B60C3C 800E9A9C 8FB30024 */ lw $s3, 0x24($sp) -/* B60C40 800E9AA0 8FB40028 */ lw $s4, 0x28($sp) -/* B60C44 800E9AA4 03E00008 */ jr $ra -/* B60C48 800E9AA8 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9AAC.s b/asm/non_matchings/code/audio_seqplayer/func_800E9AAC.s deleted file mode 100644 index e0fc347516..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9AAC.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel func_800E9AAC -/* B60C4C 800E9AAC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B60C50 800E9AB0 AFA5002C */ sw $a1, 0x2c($sp) -/* B60C54 800E9AB4 30A500FF */ andi $a1, $a1, 0xff -/* B60C58 800E9AB8 00057080 */ sll $t6, $a1, 2 -/* B60C5C 800E9ABC AFBF0024 */ sw $ra, 0x24($sp) -/* B60C60 800E9AC0 AFB30020 */ sw $s3, 0x20($sp) -/* B60C64 800E9AC4 AFB2001C */ sw $s2, 0x1c($sp) -/* B60C68 800E9AC8 AFB10018 */ sw $s1, 0x18($sp) -/* B60C6C 800E9ACC AFB00014 */ sw $s0, 0x14($sp) -/* B60C70 800E9AD0 008E7821 */ addu $t7, $a0, $t6 -/* B60C74 800E9AD4 8DF20038 */ lw $s2, 0x38($t7) -/* B60C78 800E9AD8 00008025 */ move $s0, $zero -/* B60C7C 800E9ADC 24130004 */ li $s3, 4 -/* B60C80 800E9AE0 92590000 */ lbu $t9, ($s2) -/* B60C84 800E9AE4 A2400078 */ sb $zero, 0x78($s2) -/* B60C88 800E9AE8 AE460060 */ sw $a2, 0x60($s2) -/* B60C8C 800E9AEC 37290080 */ ori $t1, $t9, 0x80 -/* B60C90 800E9AF0 312A00BF */ andi $t2, $t1, 0xbf -/* B60C94 800E9AF4 A2490000 */ sb $t1, ($s2) -/* B60C98 800E9AF8 A24A0000 */ sb $t2, ($s2) -/* B60C9C 800E9AFC A640001E */ sh $zero, 0x1e($s2) -/* B60CA0 800E9B00 02408825 */ move $s1, $s2 -.L800E9B04: -/* B60CA4 800E9B04 8E2B0050 */ lw $t3, 0x50($s1) -/* B60CA8 800E9B08 02402025 */ move $a0, $s2 -/* B60CAC 800E9B0C 51600004 */ beql $t3, $zero, .L800E9B20 -/* B60CB0 800E9B10 26100001 */ addiu $s0, $s0, 1 -/* B60CB4 800E9B14 0C03A61E */ jal func_800E9878 -/* B60CB8 800E9B18 02002825 */ move $a1, $s0 -/* B60CBC 800E9B1C 26100001 */ addiu $s0, $s0, 1 -.L800E9B20: -/* B60CC0 800E9B20 1613FFF8 */ bne $s0, $s3, .L800E9B04 -/* B60CC4 800E9B24 26310004 */ addiu $s1, $s1, 4 -/* B60CC8 800E9B28 8FBF0024 */ lw $ra, 0x24($sp) -/* B60CCC 800E9B2C 8FB00014 */ lw $s0, 0x14($sp) -/* B60CD0 800E9B30 8FB10018 */ lw $s1, 0x18($sp) -/* B60CD4 800E9B34 8FB2001C */ lw $s2, 0x1c($sp) -/* B60CD8 800E9B38 8FB30020 */ lw $s3, 0x20($sp) -/* B60CDC 800E9B3C 03E00008 */ jr $ra -/* B60CE0 800E9B40 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9B44.s b/asm/non_matchings/code/audio_seqplayer/func_800E9B44.s deleted file mode 100644 index 8f6e40b4e4..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9B44.s +++ /dev/null @@ -1,12 +0,0 @@ -glabel func_800E9B44 -/* B60CE4 800E9B44 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B60CE8 800E9B48 AFBF0014 */ sw $ra, 0x14($sp) -/* B60CEC 800E9B4C 908F0000 */ lbu $t7, ($a0) -/* B60CF0 800E9B50 35F80040 */ ori $t8, $t7, 0x40 -/* B60CF4 800E9B54 0C03A6DB */ jal Audio_SequencePlayerDisable -/* B60CF8 800E9B58 A0980000 */ sb $t8, ($a0) -/* B60CFC 800E9B5C 8FBF0014 */ lw $ra, 0x14($sp) -/* B60D00 800E9B60 27BD0018 */ addiu $sp, $sp, 0x18 -/* B60D04 800E9B64 03E00008 */ jr $ra -/* B60D08 800E9B68 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9CA8.s b/asm/non_matchings/code/audio_seqplayer/func_800E9CA8.s deleted file mode 100644 index 192506c1e8..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9CA8.s +++ /dev/null @@ -1,43 +0,0 @@ -glabel func_800E9CA8 -/* B60E48 800E9CA8 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* B60E4C 800E9CAC 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B60E50 800E9CB0 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 -/* B60E54 800E9CB4 AFB30024 */ sw $s3, 0x24($sp) -/* B60E58 800E9CB8 3C138017 */ lui $s3, %hi(D_80174D08) # $s3, 0x8017 -/* B60E5C 800E9CBC 26734D08 */ addiu $s3, %lo(D_80174D08) # addiu $s3, $s3, 0x4d08 -/* B60E60 800E9CC0 AFB40028 */ sw $s4, 0x28($sp) -/* B60E64 800E9CC4 AFB20020 */ sw $s2, 0x20($sp) -/* B60E68 800E9CC8 AFB1001C */ sw $s1, 0x1c($sp) -/* B60E6C 800E9CCC AFB00018 */ sw $s0, 0x18($sp) -/* B60E70 800E9CD0 3C108017 */ lui $s0, %hi(gAudioContext) # $s0, 0x8017 -/* B60E74 800E9CD4 3C118017 */ lui $s1, %hi(D_80172CA0) # $s1, 0x8017 -/* B60E78 800E9CD8 3C128017 */ lui $s2, %hi(D_80172C30) # $s2, 0x8017 -/* B60E7C 800E9CDC 3C148017 */ lui $s4, %hi(D_80174CA0) # $s4, 0x8017 -/* B60E80 800E9CE0 AFBF002C */ sw $ra, 0x2c($sp) -/* B60E84 800E9CE4 AC535B88 */ sw $s3, 0x5b88($v0) -/* B60E88 800E9CE8 AC535B8C */ sw $s3, 0x5b8c($v0) -/* B60E8C 800E9CEC AC405B90 */ sw $zero, 0x5b90($v0) -/* B60E90 800E9CF0 AC405B94 */ sw $zero, 0x5b94($v0) -/* B60E94 800E9CF4 26944CA0 */ addiu $s4, %lo(D_80174CA0) # addiu $s4, $s4, 0x4ca0 -/* B60E98 800E9CF8 26522C30 */ addiu $s2, %lo(D_80172C30) # addiu $s2, $s2, 0x2c30 -/* B60E9C 800E9CFC 26312CA0 */ addiu $s1, %lo(D_80172CA0) # addiu $s1, $s1, 0x2ca0 -/* B60EA0 800E9D00 2610F180 */ addiu $s0, %lo(gAudioContext) # addiu $s0, $s0, -0xe80 -.L800E9D04: -/* B60EA4 800E9D04 AE123B28 */ sw $s2, 0x3b28($s0) -/* B60EA8 800E9D08 AE003B20 */ sw $zero, 0x3b20($s0) -/* B60EAC 800E9D0C 02602025 */ move $a0, $s3 -/* B60EB0 800E9D10 0C03A70A */ jal Audio_AudioListPushBack -/* B60EB4 800E9D14 02202825 */ move $a1, $s1 -/* B60EB8 800E9D18 26310080 */ addiu $s1, $s1, 0x80 -/* B60EBC 800E9D1C 26100080 */ addiu $s0, $s0, 0x80 -/* B60EC0 800E9D20 1634FFF8 */ bne $s1, $s4, .L800E9D04 -/* B60EC4 800E9D24 26520080 */ addiu $s2, $s2, 0x80 -/* B60EC8 800E9D28 8FBF002C */ lw $ra, 0x2c($sp) -/* B60ECC 800E9D2C 8FB00018 */ lw $s0, 0x18($sp) -/* B60ED0 800E9D30 8FB1001C */ lw $s1, 0x1c($sp) -/* B60ED4 800E9D34 8FB20020 */ lw $s2, 0x20($sp) -/* B60ED8 800E9D38 8FB30024 */ lw $s3, 0x24($sp) -/* B60EDC 800E9D3C 8FB40028 */ lw $s4, 0x28($sp) -/* B60EE0 800E9D40 03E00008 */ jr $ra -/* B60EE4 800E9D44 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9D48.s b/asm/non_matchings/code/audio_seqplayer/func_800E9D48.s deleted file mode 100644 index b0a0ba189d..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9D48.s +++ /dev/null @@ -1,7 +0,0 @@ -glabel func_800E9D48 -/* B60EE8 800E9D48 8C850000 */ lw $a1, ($a0) -/* B60EEC 800E9D4C 90A20000 */ lbu $v0, ($a1) -/* B60EF0 800E9D50 24AE0001 */ addiu $t6, $a1, 1 -/* B60EF4 800E9D54 03E00008 */ jr $ra -/* B60EF8 800E9D58 AC8E0000 */ sw $t6, ($a0) - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9D5C.s b/asm/non_matchings/code/audio_seqplayer/func_800E9D5C.s deleted file mode 100644 index 8208715e40..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9D5C.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_800E9D5C -/* B60EFC 800E9D5C 8C850000 */ lw $a1, ($a0) -/* B60F00 800E9D60 90A30000 */ lbu $v1, ($a1) -/* B60F04 800E9D64 24AE0001 */ addiu $t6, $a1, 1 -/* B60F08 800E9D68 AC8E0000 */ sw $t6, ($a0) -/* B60F0C 800E9D6C 91CF0000 */ lbu $t7, ($t6) -/* B60F10 800E9D70 00031A00 */ sll $v1, $v1, 8 -/* B60F14 800E9D74 00031C00 */ sll $v1, $v1, 0x10 -/* B60F18 800E9D78 00031C03 */ sra $v1, $v1, 0x10 -/* B60F1C 800E9D7C 01E31825 */ or $v1, $t7, $v1 -/* B60F20 800E9D80 00031C00 */ sll $v1, $v1, 0x10 -/* B60F24 800E9D84 25D80001 */ addiu $t8, $t6, 1 -/* B60F28 800E9D88 AC980000 */ sw $t8, ($a0) -/* B60F2C 800E9D8C 03E00008 */ jr $ra -/* B60F30 800E9D90 00031403 */ sra $v0, $v1, 0x10 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9D94.s b/asm/non_matchings/code/audio_seqplayer/func_800E9D94.s deleted file mode 100644 index 389f89b55e..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9D94.s +++ /dev/null @@ -1,19 +0,0 @@ -glabel func_800E9D94 -/* B60F34 800E9D94 8C820000 */ lw $v0, ($a0) -/* B60F38 800E9D98 90430000 */ lbu $v1, ($v0) -/* B60F3C 800E9D9C 244E0001 */ addiu $t6, $v0, 1 -/* B60F40 800E9DA0 AC8E0000 */ sw $t6, ($a0) -/* B60F44 800E9DA4 306F0080 */ andi $t7, $v1, 0x80 -/* B60F48 800E9DA8 11E00008 */ beqz $t7, .L800E9DCC -/* B60F4C 800E9DAC 00602825 */ move $a1, $v1 -/* B60F50 800E9DB0 91D80000 */ lbu $t8, ($t6) -/* B60F54 800E9DB4 00051A00 */ sll $v1, $a1, 8 -/* B60F58 800E9DB8 30637F00 */ andi $v1, $v1, 0x7f00 -/* B60F5C 800E9DBC 25D90001 */ addiu $t9, $t6, 1 -/* B60F60 800E9DC0 03031825 */ or $v1, $t8, $v1 -/* B60F64 800E9DC4 3063FFFF */ andi $v1, $v1, 0xffff -/* B60F68 800E9DC8 AC990000 */ sw $t9, ($a0) -.L800E9DCC: -/* B60F6C 800E9DCC 03E00008 */ jr $ra -/* B60F70 800E9DD0 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9DD4.s b/asm/non_matchings/code/audio_seqplayer/func_800E9DD4.s deleted file mode 100644 index 081dc94b8c..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9DD4.s +++ /dev/null @@ -1,73 +0,0 @@ -glabel func_800E9DD4 -/* B60F74 800E9DD4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B60F78 800E9DD8 AFBF001C */ sw $ra, 0x1c($sp) -/* B60F7C 800E9DDC AFB00018 */ sw $s0, 0x18($sp) -/* B60F80 800E9DE0 8C820000 */ lw $v0, ($a0) -/* B60F84 800E9DE4 00808025 */ move $s0, $a0 -/* B60F88 800E9DE8 000277C2 */ srl $t6, $v0, 0x1f -/* B60F8C 800E9DEC 51C00036 */ beql $t6, $zero, .L800E9EC8 -/* B60F90 800E9DF0 8FBF001C */ lw $ra, 0x1c($sp) -/* B60F94 800E9DF4 84830008 */ lh $v1, 8($a0) -/* B60F98 800E9DF8 0002C880 */ sll $t9, $v0, 2 -/* B60F9C 800E9DFC 28610002 */ slti $at, $v1, 2 -/* B60FA0 800E9E00 1420000E */ bnez $at, .L800E9E3C -/* B60FA4 800E9E04 246FFFFF */ addiu $t7, $v1, -1 -/* B60FA8 800E9E08 0720002E */ bltz $t9, .L800E9EC4 -/* B60FAC 800E9E0C A48F0008 */ sh $t7, 8($a0) -/* B60FB0 800E9E10 8488000A */ lh $t0, 0xa($a0) -/* B60FB4 800E9E14 84890008 */ lh $t1, 8($a0) -/* B60FB8 800E9E18 0109082A */ slt $at, $t0, $t1 -/* B60FBC 800E9E1C 5420002A */ bnezl $at, .L800E9EC8 -/* B60FC0 800E9E20 8FBF001C */ lw $ra, 0x1c($sp) -/* B60FC4 800E9E24 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B60FC8 800E9E28 00000000 */ nop -/* B60FCC 800E9E2C 920B0000 */ lbu $t3, ($s0) -/* B60FD0 800E9E30 356C0020 */ ori $t4, $t3, 0x20 -/* B60FD4 800E9E34 10000023 */ b .L800E9EC4 -/* B60FD8 800E9E38 A20C0000 */ sb $t4, ($s0) -.L800E9E3C: -/* B60FDC 800E9E3C 0C03A7B6 */ jal func_800E9ED8 -/* B60FE0 800E9E40 02002025 */ move $a0, $s0 -/* B60FE4 800E9E44 0C03A830 */ jal func_800EA0C0 -/* B60FE8 800E9E48 02002025 */ move $a0, $s0 -/* B60FEC 800E9E4C 2401FFFF */ li $at, -1 -/* B60FF0 800E9E50 1041001C */ beq $v0, $at, .L800E9EC4 -/* B60FF4 800E9E54 00402825 */ move $a1, $v0 -/* B60FF8 800E9E58 0C03AAB8 */ jal func_800EAAE0 -/* B60FFC 800E9E5C 02002025 */ move $a0, $s0 -/* B61000 800E9E60 2401FFFF */ li $at, -1 -/* B61004 800E9E64 10410004 */ beq $v0, $at, .L800E9E78 -/* B61008 800E9E68 00402825 */ move $a1, $v0 -/* B6100C 800E9E6C 0C03A910 */ jal func_800EA440 -/* B61010 800E9E70 02002025 */ move $a0, $s0 -/* B61014 800E9E74 00402825 */ move $a1, $v0 -.L800E9E78: -/* B61018 800E9E78 2401FFFF */ li $at, -1 -/* B6101C 800E9E7C 50410004 */ beql $v0, $at, .L800E9E90 -/* B61020 800E9E80 8E020000 */ lw $v0, ($s0) -/* B61024 800E9E84 0C03A7D9 */ jal func_800E9F64 -/* B61028 800E9E88 02002025 */ move $a0, $s0 -/* B6102C 800E9E8C 8E020000 */ lw $v0, ($s0) -.L800E9E90: -/* B61030 800E9E90 24010001 */ li $at, 1 -/* B61034 800E9E94 00026880 */ sll $t5, $v0, 2 -/* B61038 800E9E98 000D77C2 */ srl $t6, $t5, 0x1f -/* B6103C 800E9E9C 55C1000A */ bnel $t6, $at, .L800E9EC8 -/* B61040 800E9EA0 8FBF001C */ lw $ra, 0x1c($sp) -/* B61044 800E9EA4 8E0F002C */ lw $t7, 0x2c($s0) -/* B61048 800E9EA8 0002C8C0 */ sll $t9, $v0, 3 -/* B6104C 800E9EAC 15E00003 */ bnez $t7, .L800E9EBC -/* B61050 800E9EB0 00000000 */ nop -/* B61054 800E9EB4 07230004 */ bgezl $t9, .L800E9EC8 -/* B61058 800E9EB8 8FBF001C */ lw $ra, 0x1c($sp) -.L800E9EBC: -/* B6105C 800E9EBC 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B61060 800E9EC0 02002025 */ move $a0, $s0 -.L800E9EC4: -/* B61064 800E9EC4 8FBF001C */ lw $ra, 0x1c($sp) -.L800E9EC8: -/* B61068 800E9EC8 8FB00018 */ lw $s0, 0x18($sp) -/* B6106C 800E9ECC 27BD0020 */ addiu $sp, $sp, 0x20 -/* B61070 800E9ED0 03E00008 */ jr $ra -/* B61074 800E9ED4 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9ED8.s b/asm/non_matchings/code/audio_seqplayer/func_800E9ED8.s deleted file mode 100644 index bb07b44eea..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9ED8.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel func_800E9ED8 -/* B61078 800E9ED8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B6107C 800E9EDC AFBF0014 */ sw $ra, 0x14($sp) -/* B61080 800E9EE0 8C8E0000 */ lw $t6, ($a0) -/* B61084 800E9EE4 000EC0C0 */ sll $t8, $t6, 3 -/* B61088 800E9EE8 07020006 */ bltzl $t8, .L800E9F04 -/* B6108C 800E9EEC 8C82002C */ lw $v0, 0x2c($a0) -/* B61090 800E9EF0 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B61094 800E9EF4 AFA40018 */ sw $a0, 0x18($sp) -/* B61098 800E9EF8 1000000A */ b .L800E9F24 -/* B6109C 800E9EFC 8FA40018 */ lw $a0, 0x18($sp) -/* B610A0 800E9F00 8C82002C */ lw $v0, 0x2c($a0) -.L800E9F04: -/* B610A4 800E9F04 50400008 */ beql $v0, $zero, .L800E9F28 -/* B610A8 800E9F08 90820020 */ lbu $v0, 0x20($a0) -/* B610AC 800E9F0C 8C590048 */ lw $t9, 0x48($v0) -/* B610B0 800E9F10 54990005 */ bnel $a0, $t9, .L800E9F28 -/* B610B4 800E9F14 90820020 */ lbu $v0, 0x20($a0) -/* B610B8 800E9F18 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B610BC 800E9F1C AFA40018 */ sw $a0, 0x18($sp) -/* B610C0 800E9F20 8FA40018 */ lw $a0, 0x18($sp) -.L800E9F24: -/* B610C4 800E9F24 90820020 */ lbu $v0, 0x20($a0) -.L800E9F28: -/* B610C8 800E9F28 2401FF7F */ li $at, -129 -/* B610CC 800E9F2C 00411024 */ and $v0, $v0, $at -/* B610D0 800E9F30 24010001 */ li $at, 1 -/* B610D4 800E9F34 10410003 */ beq $v0, $at, .L800E9F44 -/* B610D8 800E9F38 24010002 */ li $at, 2 -/* B610DC 800E9F3C 54410003 */ bnel $v0, $at, .L800E9F4C -/* B610E0 800E9F40 90890000 */ lbu $t1, ($a0) -.L800E9F44: -/* B610E4 800E9F44 A0800020 */ sb $zero, 0x20($a0) -/* B610E8 800E9F48 90890000 */ lbu $t1, ($a0) -.L800E9F4C: -/* B610EC 800E9F4C 352A0001 */ ori $t2, $t1, 1 -/* B610F0 800E9F50 A08A0000 */ sb $t2, ($a0) -/* B610F4 800E9F54 8FBF0014 */ lw $ra, 0x14($sp) -/* B610F8 800E9F58 27BD0018 */ addiu $sp, $sp, 0x18 -/* B610FC 800E9F5C 03E00008 */ jr $ra -/* B61100 800E9F60 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800E9F64.s b/asm/non_matchings/code/audio_seqplayer/func_800E9F64.s deleted file mode 100644 index e9572bbec7..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800E9F64.s +++ /dev/null @@ -1,97 +0,0 @@ -glabel func_800E9F64 -/* B61104 800E9F64 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B61108 800E9F68 AFBF0014 */ sw $ra, 0x14($sp) -/* B6110C 800E9F6C 8C820000 */ lw $v0, ($a0) -/* B61110 800E9F70 00803825 */ move $a3, $a0 -/* B61114 800E9F74 00027880 */ sll $t7, $v0, 2 -/* B61118 800E9F78 05E20013 */ bltzl $t7, .L800E9FC8 -/* B6111C 800E9F7C 000218C0 */ sll $v1, $v0, 3 -/* B61120 800E9F80 8C83004C */ lw $v1, 0x4c($a0) -/* B61124 800E9F84 50600010 */ beql $v1, $zero, .L800E9FC8 -/* B61128 800E9F88 000218C0 */ sll $v1, $v0, 3 -/* B6112C 800E9F8C 8C780000 */ lw $t8, ($v1) -/* B61130 800E9F90 24010002 */ li $at, 2 -/* B61134 800E9F94 8F040000 */ lw $a0, ($t8) -/* B61138 800E9F98 0004CF02 */ srl $t9, $a0, 0x1c -/* B6113C 800E9F9C 17210009 */ bne $t9, $at, .L800E9FC4 -/* B61140 800E9FA0 00044100 */ sll $t0, $a0, 4 -/* B61144 800E9FA4 00084F82 */ srl $t1, $t0, 0x1e -/* B61148 800E9FA8 51200007 */ beql $t1, $zero, .L800E9FC8 -/* B6114C 800E9FAC 000218C0 */ sll $v1, $v0, 3 -/* B61150 800E9FB0 90EB0000 */ lbu $t3, ($a3) -/* B61154 800E9FB4 2402FFFF */ li $v0, -1 -/* B61158 800E9FB8 356C0020 */ ori $t4, $t3, 0x20 -/* B6115C 800E9FBC 1000003C */ b .L800EA0B0 -/* B61160 800E9FC0 A0EC0000 */ sb $t4, ($a3) -.L800E9FC4: -/* B61164 800E9FC4 000218C0 */ sll $v1, $v0, 3 -.L800E9FC8: -/* B61168 800E9FC8 24040001 */ li $a0, 1 -/* B6116C 800E9FCC 00031FC2 */ srl $v1, $v1, 0x1f -/* B61170 800E9FD0 14830006 */ bne $a0, $v1, .L800E9FEC -/* B61174 800E9FD4 00026980 */ sll $t5, $v0, 6 -/* B61178 800E9FD8 000D77C2 */ srl $t6, $t5, 0x1f -/* B6117C 800E9FDC 148E0003 */ bne $a0, $t6, .L800E9FEC -/* B61180 800E9FE0 00000000 */ nop -/* B61184 800E9FE4 10000032 */ b .L800EA0B0 -/* B61188 800E9FE8 00001025 */ move $v0, $zero -.L800E9FEC: -/* B6118C 800E9FEC 14830015 */ bne $a0, $v1, .L800EA044 -/* B61190 800E9FF0 00000000 */ nop -/* B61194 800E9FF4 8CE6002C */ lw $a2, 0x2c($a3) -/* B61198 800E9FF8 0002C100 */ sll $t8, $v0, 4 -/* B6119C 800E9FFC 10C00011 */ beqz $a2, .L800EA044 -/* B611A0 800EA000 00000000 */ nop -/* B611A4 800EA004 0701000F */ bgez $t8, .L800EA044 -/* B611A8 800EA008 00000000 */ nop -/* B611AC 800EA00C 14A4000D */ bne $a1, $a0, .L800EA044 -/* B611B0 800EA010 00000000 */ nop -/* B611B4 800EA014 8CD90044 */ lw $t9, 0x44($a2) -/* B611B8 800EA018 14F9000A */ bne $a3, $t9, .L800EA044 -/* B611BC 800EA01C 00000000 */ nop -/* B611C0 800EA020 8CE8004C */ lw $t0, 0x4c($a3) -/* B611C4 800EA024 00C02025 */ move $a0, $a2 -/* B611C8 800EA028 00E02825 */ move $a1, $a3 -/* B611CC 800EA02C 55000018 */ bnezl $t0, .L800EA090 -/* B611D0 800EA030 8CE6002C */ lw $a2, 0x2c($a3) -/* B611D4 800EA034 0C039F29 */ jal Audio_InitSyntheticWave -/* B611D8 800EA038 AFA70018 */ sw $a3, 0x18($sp) -/* B611DC 800EA03C 10000013 */ b .L800EA08C -/* B611E0 800EA040 8FA70018 */ lw $a3, 0x18($sp) -.L800EA044: -/* B611E4 800EA044 14A00004 */ bnez $a1, .L800EA058 -/* B611E8 800EA048 00E02025 */ move $a0, $a3 -/* B611EC 800EA04C 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B611F0 800EA050 AFA70018 */ sw $a3, 0x18($sp) -/* B611F4 800EA054 8FA70018 */ lw $a3, 0x18($sp) -.L800EA058: -/* B611F8 800EA058 00E02025 */ move $a0, $a3 -/* B611FC 800EA05C 0C03A12D */ jal Audio_AllocNote -/* B61200 800EA060 AFA70018 */ sw $a3, 0x18($sp) -/* B61204 800EA064 8FA70018 */ lw $a3, 0x18($sp) -/* B61208 800EA068 10400008 */ beqz $v0, .L800EA08C -/* B6120C 800EA06C ACE2002C */ sw $v0, 0x2c($a3) -/* B61210 800EA070 8C490044 */ lw $t1, 0x44($v0) -/* B61214 800EA074 00402025 */ move $a0, $v0 -/* B61218 800EA078 54E90005 */ bnel $a3, $t1, .L800EA090 -/* B6121C 800EA07C 8CE6002C */ lw $a2, 0x2c($a3) -/* B61220 800EA080 0C03A3C0 */ jal Audio_NoteVibratoInit -/* B61224 800EA084 AFA70018 */ sw $a3, 0x18($sp) -/* B61228 800EA088 8FA70018 */ lw $a3, 0x18($sp) -.L800EA08C: -/* B6122C 800EA08C 8CE6002C */ lw $a2, 0x2c($a3) -.L800EA090: -/* B61230 800EA090 50C00007 */ beql $a2, $zero, .L800EA0B0 -/* B61234 800EA094 00001025 */ move $v0, $zero -/* B61238 800EA098 8CCA0044 */ lw $t2, 0x44($a2) -/* B6123C 800EA09C 54EA0004 */ bnel $a3, $t2, .L800EA0B0 -/* B61240 800EA0A0 00001025 */ move $v0, $zero -/* B61244 800EA0A4 0C03A3EE */ jal Audio_NotePortamentoInit -/* B61248 800EA0A8 00C02025 */ move $a0, $a2 -/* B6124C 800EA0AC 00001025 */ move $v0, $zero -.L800EA0B0: -/* B61250 800EA0B0 8FBF0014 */ lw $ra, 0x14($sp) -/* B61254 800EA0B4 27BD0018 */ addiu $sp, $sp, 0x18 -/* B61258 800EA0B8 03E00008 */ jr $ra -/* B6125C 800EA0BC 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EA0C0.s b/asm/non_matchings/code/audio_seqplayer/func_800EA0C0.s deleted file mode 100644 index fda1f0fe26..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EA0C0.s +++ /dev/null @@ -1,277 +0,0 @@ -.late_rodata -glabel D_80149658 - .float 16129 - -glabel jtbl_8014965C - .word L800EA180 - .word L800EA1C0 - .word L800EA22C - .word L800EA1E8 - .word L800EA1E8 - .word L800EA23C - .word L800EA2C0 - .word L800EA340 - .word L800EA1C0 - .word L800EA180 - .word L800EA348 - .word L800EA370 - .word L800EA380 - .word L800EA390 - .word L800EA360 - -.text -glabel func_800EA0C0 -/* B61260 800EA0C0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* B61264 800EA0C4 AFBF0034 */ sw $ra, 0x34($sp) -/* B61268 800EA0C8 AFB40030 */ sw $s4, 0x30($sp) -/* B6126C 800EA0CC AFB3002C */ sw $s3, 0x2c($sp) -/* B61270 800EA0D0 AFB20028 */ sw $s2, 0x28($sp) -/* B61274 800EA0D4 AFB10024 */ sw $s1, 0x24($sp) -/* B61278 800EA0D8 AFB00020 */ sw $s0, 0x20($sp) -/* B6127C 800EA0DC F7B40018 */ sdc1 $f20, 0x18($sp) -/* B61280 800EA0E0 8C940050 */ lw $s4, 0x50($a0) -/* B61284 800EA0E4 3C018015 */ lui $at, %hi(D_80149658) -/* B61288 800EA0E8 00808825 */ move $s1, $a0 -/* B6128C 800EA0EC C4349658 */ lwc1 $f20, %lo(D_80149658)($at) -/* B61290 800EA0F0 24920054 */ addiu $s2, $a0, 0x54 -/* B61294 800EA0F4 8E93004C */ lw $s3, 0x4c($s4) -.L800EA0F8: -/* B61298 800EA0F8 0C03A752 */ jal func_800E9D48 -/* B6129C 800EA0FC 02402025 */ move $a0, $s2 -/* B612A0 800EA100 284100C1 */ slti $at, $v0, 0xc1 -/* B612A4 800EA104 305000FF */ andi $s0, $v0, 0xff -/* B612A8 800EA108 10200003 */ beqz $at, .L800EA118 -/* B612AC 800EA10C 00402025 */ move $a0, $v0 -/* B612B0 800EA110 100000C2 */ b .L800EA41C -/* B612B4 800EA114 02001025 */ move $v0, $s0 -.L800EA118: -/* B612B8 800EA118 288100F2 */ slti $at, $a0, 0xf2 -/* B612BC 800EA11C 1420000F */ bnez $at, .L800EA15C -/* B612C0 800EA120 248EFF3F */ addiu $t6, $a0, -0xc1 -/* B612C4 800EA124 02402025 */ move $a0, $s2 -/* B612C8 800EA128 0C03A4D0 */ jal func_800E9340 -/* B612CC 800EA12C 320500FF */ andi $a1, $s0, 0xff -/* B612D0 800EA130 02602025 */ move $a0, $s3 -/* B612D4 800EA134 02402825 */ move $a1, $s2 -/* B612D8 800EA138 02003025 */ move $a2, $s0 -/* B612DC 800EA13C 0C03A4EA */ jal func_800E93A8 -/* B612E0 800EA140 00403825 */ move $a3, $v0 -/* B612E4 800EA144 1040FFEC */ beqz $v0, .L800EA0F8 -/* B612E8 800EA148 00000000 */ nop -/* B612EC 800EA14C 0C03A5FF */ jal func_800E97FC -/* B612F0 800EA150 02202025 */ move $a0, $s1 -/* B612F4 800EA154 100000B1 */ b .L800EA41C -/* B612F8 800EA158 2402FFFF */ li $v0, -1 -.L800EA15C: -/* B612FC 800EA15C 2DC1000F */ sltiu $at, $t6, 0xf -/* B61300 800EA160 10200095 */ beqz $at, .L800EA3B8 -/* B61304 800EA164 308300F0 */ andi $v1, $a0, 0xf0 -/* B61308 800EA168 000E7080 */ sll $t6, $t6, 2 -/* B6130C 800EA16C 3C018015 */ lui $at, %hi(jtbl_8014965C) -/* B61310 800EA170 002E0821 */ addu $at, $at, $t6 -/* B61314 800EA174 8C2E965C */ lw $t6, %lo(jtbl_8014965C)($at) -/* B61318 800EA178 01C00008 */ jr $t6 -/* B6131C 800EA17C 00000000 */ nop -glabel L800EA180 -/* B61320 800EA180 8E430000 */ lw $v1, ($s2) -/* B61324 800EA184 240100C1 */ li $at, 193 -/* B61328 800EA188 90650000 */ lbu $a1, ($v1) -/* B6132C 800EA18C 246F0001 */ addiu $t7, $v1, 1 -/* B61330 800EA190 14810009 */ bne $a0, $at, .L800EA1B8 -/* B61334 800EA194 AE4F0000 */ sw $t7, ($s2) -/* B61338 800EA198 00A50019 */ multu $a1, $a1 -/* B6133C 800EA19C 0000C012 */ mflo $t8 -/* B61340 800EA1A0 44982000 */ mtc1 $t8, $f4 -/* B61344 800EA1A4 00000000 */ nop -/* B61348 800EA1A8 468021A0 */ cvt.s.w $f6, $f4 -/* B6134C 800EA1AC 46143203 */ div.s $f8, $f6, $f20 -/* B61350 800EA1B0 1000FFD1 */ b .L800EA0F8 -/* B61354 800EA1B4 E628003C */ swc1 $f8, 0x3c($s1) -.L800EA1B8: -/* B61358 800EA1B8 1000FFCF */ b .L800EA0F8 -/* B6135C 800EA1BC A2250006 */ sb $a1, 6($s1) -glabel L800EA1C0 -/* B61360 800EA1C0 8E430000 */ lw $v1, ($s2) -/* B61364 800EA1C4 240100C9 */ li $at, 201 -/* B61368 800EA1C8 90650000 */ lbu $a1, ($v1) -/* B6136C 800EA1CC 24790001 */ addiu $t9, $v1, 1 -/* B61370 800EA1D0 14810003 */ bne $a0, $at, .L800EA1E0 -/* B61374 800EA1D4 AE590000 */ sw $t9, ($s2) -/* B61378 800EA1D8 1000FFC7 */ b .L800EA0F8 -/* B6137C 800EA1DC A2250003 */ sb $a1, 3($s1) -.L800EA1E0: -/* B61380 800EA1E0 1000FFC5 */ b .L800EA0F8 -/* B61384 800EA1E4 A6250010 */ sh $a1, 0x10($s1) -glabel L800EA1E8 -/* B61388 800EA1E8 240100C4 */ li $at, 196 -/* B6138C 800EA1EC 54810006 */ bnel $a0, $at, .L800EA208 -/* B61390 800EA1F0 922B0000 */ lbu $t3, ($s1) -/* B61394 800EA1F4 92290000 */ lbu $t1, ($s1) -/* B61398 800EA1F8 352A0010 */ ori $t2, $t1, 0x10 -/* B6139C 800EA1FC 10000004 */ b .L800EA210 -/* B613A0 800EA200 A22A0000 */ sb $t2, ($s1) -/* B613A4 800EA204 922B0000 */ lbu $t3, ($s1) -.L800EA208: -/* B613A8 800EA208 316CFFEF */ andi $t4, $t3, 0xffef -/* B613AC 800EA20C A22C0000 */ sb $t4, ($s1) -.L800EA210: -/* B613B0 800EA210 922D0000 */ lbu $t5, ($s1) -/* B613B4 800EA214 02202025 */ move $a0, $s1 -/* B613B8 800EA218 31AEFFFD */ andi $t6, $t5, 0xfffd -/* B613BC 800EA21C 0C039ED8 */ jal Audio_SeqChanLayerNoteDecay -/* B613C0 800EA220 A22E0000 */ sb $t6, ($s1) -/* B613C4 800EA224 1000FFB4 */ b .L800EA0F8 -/* B613C8 800EA228 00000000 */ nop -glabel L800EA22C -/* B613CC 800EA22C 0C03A765 */ jal func_800E9D94 -/* B613D0 800EA230 02402025 */ move $a0, $s2 -/* B613D4 800EA234 1000FFB0 */ b .L800EA0F8 -/* B613D8 800EA238 A6220012 */ sh $v0, 0x12($s1) -glabel L800EA23C -/* B613DC 800EA23C 0C03A752 */ jal func_800E9D48 -/* B613E0 800EA240 02402025 */ move $a0, $s2 -/* B613E4 800EA244 2841007E */ slti $at, $v0, 0x7e -/* B613E8 800EA248 305000FF */ andi $s0, $v0, 0xff -/* B613EC 800EA24C 14200012 */ bnez $at, .L800EA298 -/* B613F0 800EA250 00402025 */ move $a0, $v0 -/* B613F4 800EA254 2401007E */ li $at, 126 -/* B613F8 800EA258 14410003 */ bne $v0, $at, .L800EA268 -/* B613FC 800EA25C 240F0001 */ li $t7, 1 -/* B61400 800EA260 10000008 */ b .L800EA284 -/* B61404 800EA264 A22F0002 */ sb $t7, 2($s1) -.L800EA268: -/* B61408 800EA268 2401007F */ li $at, 127 -/* B6140C 800EA26C 54810004 */ bnel $a0, $at, .L800EA280 -/* B61410 800EA270 A2220002 */ sb $v0, 2($s1) -/* B61414 800EA274 10000003 */ b .L800EA284 -/* B61418 800EA278 A2200002 */ sb $zero, 2($s1) -/* B6141C 800EA27C A2220002 */ sb $v0, 2($s1) -.L800EA280: -/* B61420 800EA280 AE200048 */ sw $zero, 0x48($s1) -.L800EA284: -/* B61424 800EA284 240100FF */ li $at, 255 -/* B61428 800EA288 1481FF9B */ bne $a0, $at, .L800EA0F8 -/* B6142C 800EA28C 00000000 */ nop -/* B61430 800EA290 1000FF99 */ b .L800EA0F8 -/* B61434 800EA294 A2200018 */ sb $zero, 0x18($s1) -.L800EA298: -/* B61438 800EA298 02802025 */ move $a0, $s4 -/* B6143C 800EA29C 320500FF */ andi $a1, $s0, 0xff -/* B61440 800EA2A0 26260048 */ addiu $a2, $s1, 0x48 -/* B61444 800EA2A4 0C03ABC9 */ jal func_800EAF24 -/* B61448 800EA2A8 26270018 */ addiu $a3, $s1, 0x18 -/* B6144C 800EA2AC 1440FF92 */ bnez $v0, .L800EA0F8 -/* B61450 800EA2B0 A2220002 */ sb $v0, 2($s1) -/* B61454 800EA2B4 241800FF */ li $t8, 255 -/* B61458 800EA2B8 1000FF8F */ b .L800EA0F8 -/* B6145C 800EA2BC A2380002 */ sb $t8, 2($s1) -glabel L800EA2C0 -/* B61460 800EA2C0 0C03A752 */ jal func_800E9D48 -/* B61464 800EA2C4 02402025 */ move $a0, $s2 -/* B61468 800EA2C8 A2220020 */ sb $v0, 0x20($s1) -/* B6146C 800EA2CC 0C03A752 */ jal func_800E9D48 -/* B61470 800EA2D0 02402025 */ move $a0, $s2 -/* B61474 800EA2D4 86990026 */ lh $t9, 0x26($s4) -/* B61478 800EA2D8 86280010 */ lh $t0, 0x10($s1) -/* B6147C 800EA2DC 8669000E */ lh $t1, 0xe($s3) -/* B61480 800EA2E0 00598021 */ addu $s0, $v0, $t9 -/* B61484 800EA2E4 02088021 */ addu $s0, $s0, $t0 -/* B61488 800EA2E8 02098021 */ addu $s0, $s0, $t1 -/* B6148C 800EA2EC 321000FF */ andi $s0, $s0, 0xff -/* B61490 800EA2F0 2A010080 */ slti $at, $s0, 0x80 -/* B61494 800EA2F4 54200003 */ bnezl $at, .L800EA304 -/* B61498 800EA2F8 922A0020 */ lbu $t2, 0x20($s1) -/* B6149C 800EA2FC 00008025 */ move $s0, $zero -/* B614A0 800EA300 922A0020 */ lbu $t2, 0x20($s1) -.L800EA304: -/* B614A4 800EA304 A2300005 */ sb $s0, 5($s1) -/* B614A8 800EA308 314B0080 */ andi $t3, $t2, 0x80 -/* B614AC 800EA30C 11600008 */ beqz $t3, .L800EA330 -/* B614B0 800EA310 00000000 */ nop -/* B614B4 800EA314 8E4C0000 */ lw $t4, ($s2) -/* B614B8 800EA318 918D0000 */ lbu $t5, ($t4) -/* B614BC 800EA31C A62D000E */ sh $t5, 0xe($s1) -/* B614C0 800EA320 8E4E0000 */ lw $t6, ($s2) -/* B614C4 800EA324 25CF0001 */ addiu $t7, $t6, 1 -/* B614C8 800EA328 1000FF73 */ b .L800EA0F8 -/* B614CC 800EA32C AE4F0000 */ sw $t7, ($s2) -.L800EA330: -/* B614D0 800EA330 0C03A765 */ jal func_800E9D94 -/* B614D4 800EA334 02402025 */ move $a0, $s2 -/* B614D8 800EA338 1000FF6F */ b .L800EA0F8 -/* B614DC 800EA33C A622000E */ sh $v0, 0xe($s1) -glabel L800EA340 -/* B614E0 800EA340 1000FF6D */ b .L800EA0F8 -/* B614E4 800EA344 A2200020 */ sb $zero, 0x20($s1) -glabel L800EA348 -/* B614E8 800EA348 0C03A757 */ jal func_800E9D5C -/* B614EC 800EA34C 02402025 */ move $a0, $s2 -/* B614F0 800EA350 8E780018 */ lw $t8, 0x18($s3) -/* B614F4 800EA354 3059FFFF */ andi $t9, $v0, 0xffff -/* B614F8 800EA358 03194021 */ addu $t0, $t8, $t9 -/* B614FC 800EA35C AE28001C */ sw $t0, 0x1c($s1) -glabel L800EA360 -/* B61500 800EA360 0C03A752 */ jal func_800E9D48 -/* B61504 800EA364 02402025 */ move $a0, $s2 -/* B61508 800EA368 1000FF63 */ b .L800EA0F8 -/* B6150C 800EA36C A2220018 */ sb $v0, 0x18($s1) -glabel L800EA370 -/* B61510 800EA370 922A0000 */ lbu $t2, ($s1) -/* B61514 800EA374 354B0004 */ ori $t3, $t2, 4 -/* B61518 800EA378 1000FF5F */ b .L800EA0F8 -/* B6151C 800EA37C A22B0000 */ sb $t3, ($s1) -glabel L800EA380 -/* B61520 800EA380 0C03A752 */ jal func_800E9D48 -/* B61524 800EA384 02402025 */ move $a0, $s2 -/* B61528 800EA388 1000FF5B */ b .L800EA0F8 -/* B6152C 800EA38C A2220001 */ sb $v0, 1($s1) -glabel L800EA390 -/* B61530 800EA390 0C03A752 */ jal func_800E9D48 -/* B61534 800EA394 02402025 */ move $a0, $s2 -/* B61538 800EA398 244C0080 */ addiu $t4, $v0, 0x80 -/* B6153C 800EA39C 318D00FF */ andi $t5, $t4, 0xff -/* B61540 800EA3A0 000D7080 */ sll $t6, $t5, 2 -/* B61544 800EA3A4 3C018013 */ lui $at, %hi(D_8012F4B4) -/* B61548 800EA3A8 002E0821 */ addu $at, $at, $t6 -/* B6154C 800EA3AC C42AF4B4 */ lwc1 $f10, %lo(D_8012F4B4)($at) -/* B61550 800EA3B0 1000FF51 */ b .L800EA0F8 -/* B61554 800EA3B4 E62A0034 */ swc1 $f10, 0x34($s1) -.L800EA3B8: -/* B61558 800EA3B8 240100D0 */ li $at, 208 -/* B6155C 800EA3BC 10610005 */ beq $v1, $at, .L800EA3D4 -/* B61560 800EA3C0 240100E0 */ li $at, 224 -/* B61564 800EA3C4 50610010 */ beql $v1, $at, .L800EA408 -/* B61568 800EA3C8 8E690098 */ lw $t1, 0x98($s3) -/* B6156C 800EA3CC 1000FF4A */ b .L800EA0F8 -/* B61570 800EA3D0 00000000 */ nop -.L800EA3D4: -/* B61574 800EA3D4 8E6F0094 */ lw $t7, 0x94($s3) -/* B61578 800EA3D8 3098000F */ andi $t8, $a0, 0xf -/* B6157C 800EA3DC 01F8C821 */ addu $t9, $t7, $t8 -/* B61580 800EA3E0 93250000 */ lbu $a1, ($t9) -/* B61584 800EA3E4 00A50019 */ multu $a1, $a1 -/* B61588 800EA3E8 00004012 */ mflo $t0 -/* B6158C 800EA3EC 44888000 */ mtc1 $t0, $f16 -/* B61590 800EA3F0 00000000 */ nop -/* B61594 800EA3F4 468084A0 */ cvt.s.w $f18, $f16 -/* B61598 800EA3F8 46149103 */ div.s $f4, $f18, $f20 -/* B6159C 800EA3FC 1000FF3E */ b .L800EA0F8 -/* B615A0 800EA400 E624003C */ swc1 $f4, 0x3c($s1) -/* B615A4 800EA404 8E690098 */ lw $t1, 0x98($s3) -.L800EA408: -/* B615A8 800EA408 308A000F */ andi $t2, $a0, 0xf -/* B615AC 800EA40C 012A5821 */ addu $t3, $t1, $t2 -/* B615B0 800EA410 916C0000 */ lbu $t4, ($t3) -/* B615B4 800EA414 1000FF38 */ b .L800EA0F8 -/* B615B8 800EA418 A22C0003 */ sb $t4, 3($s1) -.L800EA41C: -/* B615BC 800EA41C 8FBF0034 */ lw $ra, 0x34($sp) -/* B615C0 800EA420 D7B40018 */ ldc1 $f20, 0x18($sp) -/* B615C4 800EA424 8FB00020 */ lw $s0, 0x20($sp) -/* B615C8 800EA428 8FB10024 */ lw $s1, 0x24($sp) -/* B615CC 800EA42C 8FB20028 */ lw $s2, 0x28($sp) -/* B615D0 800EA430 8FB3002C */ lw $s3, 0x2c($sp) -/* B615D4 800EA434 8FB40030 */ lw $s4, 0x30($sp) -/* B615D8 800EA438 03E00008 */ jr $ra -/* B615DC 800EA43C 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EA440.s b/asm/non_matchings/code/audio_seqplayer/func_800EA440.s deleted file mode 100644 index 801abf2b98..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EA440.s +++ /dev/null @@ -1,483 +0,0 @@ -.late_rodata -glabel jtbl_80149698 - .word L800EA728 - .word L800EA734 - .word L800EA728 - .word L800EA734 - .word L800EA728 - -glabel D_801496AC - .float 32766 - -.text -glabel func_800EA440 -/* B615E0 800EA440 27BDFF88 */ addiu $sp, $sp, -0x78 -/* B615E4 800EA444 AFBF0014 */ sw $ra, 0x14($sp) -/* B615E8 800EA448 AFA5007C */ sw $a1, 0x7c($sp) -/* B615EC 800EA44C 90820002 */ lbu $v0, 2($a0) -/* B615F0 800EA450 8C830050 */ lw $v1, 0x50($a0) -/* B615F4 800EA454 240800FF */ li $t0, 255 -/* B615F8 800EA458 00803025 */ move $a2, $a0 -/* B615FC 800EA45C 240B0001 */ li $t3, 1 -/* B61600 800EA460 14480008 */ bne $v0, $t0, .L800EA484 -/* B61604 800EA464 8C6A004C */ lw $t2, 0x4c($v1) -/* B61608 800EA468 8C6E0000 */ lw $t6, ($v1) -/* B6160C 800EA46C 000EC100 */ sll $t8, $t6, 4 -/* B61610 800EA470 07020004 */ bltzl $t8, .L800EA484 -/* B61614 800EA474 84620024 */ lh $v0, 0x24($v1) -/* B61618 800EA478 10000195 */ b .L800EAAD0 -/* B6161C 800EA47C 2402FFFF */ li $v0, -1 -/* B61620 800EA480 84620024 */ lh $v0, 0x24($v1) -.L800EA484: -/* B61624 800EA484 10400006 */ beqz $v0, .L800EA4A0 -/* B61628 800EA488 93B9007F */ lbu $t9, 0x7f($sp) -/* B6162C 800EA48C 24010001 */ li $at, 1 -/* B61630 800EA490 10410029 */ beq $v0, $at, .L800EA538 -/* B61634 800EA494 93AE007F */ lbu $t6, 0x7f($sp) -/* B61638 800EA498 10000045 */ b .L800EA5B0 -/* B6163C 800EA49C 854F000E */ lh $t7, 0xe($t2) -.L800EA4A0: -/* B61640 800EA4A0 846C0026 */ lh $t4, 0x26($v1) -/* B61644 800EA4A4 84CE0010 */ lh $t6, 0x10($a2) -/* B61648 800EA4A8 032C6821 */ addu $t5, $t9, $t4 -/* B6164C 800EA4AC 01AE4821 */ addu $t1, $t5, $t6 -/* B61650 800EA4B0 312500FF */ andi $a1, $t1, 0xff -/* B61654 800EA4B4 A0C50004 */ sb $a1, 4($a2) -/* B61658 800EA4B8 90640007 */ lbu $a0, 7($v1) -/* B6165C 800EA4BC AFAB0074 */ sw $t3, 0x74($sp) -/* B61660 800EA4C0 AFAA0040 */ sw $t2, 0x40($sp) -/* B61664 800EA4C4 0C039D5B */ jal Audio_GetDrum -/* B61668 800EA4C8 AFA60078 */ sw $a2, 0x78($sp) -/* B6166C 800EA4CC 8FA60078 */ lw $a2, 0x78($sp) -/* B61670 800EA4D0 8FAA0040 */ lw $t2, 0x40($sp) -/* B61674 800EA4D4 14400008 */ bnez $v0, .L800EA4F8 -/* B61678 800EA4D8 8FAB0074 */ lw $t3, 0x74($sp) -/* B6167C 800EA4DC 90D80000 */ lbu $t8, ($a2) -/* B61680 800EA4E0 84CC0008 */ lh $t4, 8($a2) -/* B61684 800EA4E4 2402FFFF */ li $v0, -1 -/* B61688 800EA4E8 37190020 */ ori $t9, $t8, 0x20 -/* B6168C 800EA4EC A0D90000 */ sb $t9, ($a2) -/* B61690 800EA4F0 10000177 */ b .L800EAAD0 -/* B61694 800EA4F4 A4CC000C */ sh $t4, 0xc($a2) -.L800EA4F8: -/* B61698 800EA4F8 8C4D000C */ lw $t5, 0xc($v0) -/* B6169C 800EA4FC 8CCF0000 */ lw $t7, ($a2) -/* B616A0 800EA500 24430004 */ addiu $v1, $v0, 4 -/* B616A4 800EA504 ACCD001C */ sw $t5, 0x1c($a2) -/* B616A8 800EA508 904E0000 */ lbu $t6, ($v0) -/* B616AC 800EA50C 000FC940 */ sll $t9, $t7, 5 -/* B616B0 800EA510 07200003 */ bltz $t9, .L800EA520 -/* B616B4 800EA514 A0CE0018 */ sb $t6, 0x18($a2) -/* B616B8 800EA518 904C0001 */ lbu $t4, 1($v0) -/* B616BC 800EA51C A0CC0006 */ sb $t4, 6($a2) -.L800EA520: -/* B616C0 800EA520 ACC3004C */ sw $v1, 0x4c($a2) -/* B616C4 800EA524 C4640004 */ lwc1 $f4, 4($v1) -/* B616C8 800EA528 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 -/* B616CC 800EA52C 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -/* B616D0 800EA530 10000103 */ b .L800EA940 -/* B616D4 800EA534 E4C40030 */ swc1 $f4, 0x30($a2) -.L800EA538: -/* B616D8 800EA538 93A2007F */ lbu $v0, 0x7f($sp) -/* B616DC 800EA53C 84CD0010 */ lh $t5, 0x10($a2) -/* B616E0 800EA540 A0C20004 */ sb $v0, 4($a2) -/* B616E4 800EA544 90640007 */ lbu $a0, 7($v1) -/* B616E8 800EA548 000D7180 */ sll $t6, $t5, 6 -/* B616EC 800EA54C 01C23821 */ addu $a3, $t6, $v0 -/* B616F0 800EA550 30E5FFFF */ andi $a1, $a3, 0xffff -/* B616F4 800EA554 AFAB0074 */ sw $t3, 0x74($sp) -/* B616F8 800EA558 AFAA0040 */ sw $t2, 0x40($sp) -/* B616FC 800EA55C 0C039D94 */ jal Audio_GetUnkInstrument -/* B61700 800EA560 AFA60078 */ sw $a2, 0x78($sp) -/* B61704 800EA564 8FA60078 */ lw $a2, 0x78($sp) -/* B61708 800EA568 8FAA0040 */ lw $t2, 0x40($sp) -/* B6170C 800EA56C 14400009 */ bnez $v0, .L800EA594 -/* B61710 800EA570 8FAB0074 */ lw $t3, 0x74($sp) -/* B61714 800EA574 90D80000 */ lbu $t8, ($a2) -/* B61718 800EA578 84CC0008 */ lh $t4, 8($a2) -/* B6171C 800EA57C 2402FFFF */ li $v0, -1 -/* B61720 800EA580 37190020 */ ori $t9, $t8, 0x20 -/* B61724 800EA584 258D0001 */ addiu $t5, $t4, 1 -/* B61728 800EA588 A0D90000 */ sb $t9, ($a2) -/* B6172C 800EA58C 10000150 */ b .L800EAAD0 -/* B61730 800EA590 A4CD000C */ sh $t5, 0xc($a2) -.L800EA594: -/* B61734 800EA594 ACC2004C */ sw $v0, 0x4c($a2) -/* B61738 800EA598 C4460004 */ lwc1 $f6, 4($v0) -/* B6173C 800EA59C 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 -/* B61740 800EA5A0 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -/* B61744 800EA5A4 100000E6 */ b .L800EA940 -/* B61748 800EA5A8 E4C60030 */ swc1 $f6, 0x30($a2) -/* B6174C 800EA5AC 854F000E */ lh $t7, 0xe($t2) -.L800EA5B0: -/* B61750 800EA5B0 84790026 */ lh $t9, 0x26($v1) -/* B61754 800EA5B4 84CD0010 */ lh $t5, 0x10($a2) -/* B61758 800EA5B8 01CFC021 */ addu $t8, $t6, $t7 -/* B6175C 800EA5BC 03196021 */ addu $t4, $t8, $t9 -/* B61760 800EA5C0 018D4821 */ addu $t1, $t4, $t5 -/* B61764 800EA5C4 312900FF */ andi $t1, $t1, 0xff -/* B61768 800EA5C8 29210080 */ slti $at, $t1, 0x80 -/* B6176C 800EA5CC A0C90004 */ sb $t1, 4($a2) -/* B61770 800EA5D0 14200006 */ bnez $at, .L800EA5EC -/* B61774 800EA5D4 01203825 */ move $a3, $t1 -/* B61778 800EA5D8 90CF0000 */ lbu $t7, ($a2) -/* B6177C 800EA5DC 2402FFFF */ li $v0, -1 -/* B61780 800EA5E0 35F80020 */ ori $t8, $t7, 0x20 -/* B61784 800EA5E4 1000013A */ b .L800EAAD0 -/* B61788 800EA5E8 A0D80000 */ sb $t8, ($a2) -.L800EA5EC: -/* B6178C 800EA5EC 90D90002 */ lbu $t9, 2($a2) -/* B61790 800EA5F0 55190004 */ bnel $t0, $t9, .L800EA604 -/* B61794 800EA5F4 8CC40048 */ lw $a0, 0x48($a2) -/* B61798 800EA5F8 10000002 */ b .L800EA604 -/* B6179C 800EA5FC 8C640048 */ lw $a0, 0x48($v1) -/* B617A0 800EA600 8CC40048 */ lw $a0, 0x48($a2) -.L800EA604: -/* B617A4 800EA604 90CC0020 */ lbu $t4, 0x20($a2) -/* B617A8 800EA608 1180009E */ beqz $t4, .L800EA884 -/* B617AC 800EA60C 00000000 */ nop -/* B617B0 800EA610 24C80020 */ addiu $t0, $a2, 0x20 -/* B617B4 800EA614 AFA80060 */ sw $t0, 0x60($sp) -/* B617B8 800EA618 90C30005 */ lbu $v1, 5($a2) -/* B617BC 800EA61C 0067082A */ slt $at, $v1, $a3 -/* B617C0 800EA620 10200003 */ beqz $at, .L800EA630 -/* B617C4 800EA624 00602825 */ move $a1, $v1 -/* B617C8 800EA628 10000001 */ b .L800EA630 -/* B617CC 800EA62C 00E02825 */ move $a1, $a3 -.L800EA630: -/* B617D0 800EA630 10800012 */ beqz $a0, .L800EA67C -/* B617D4 800EA634 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B617D8 800EA638 AFA60078 */ sw $a2, 0x78($sp) -/* B617DC 800EA63C AFA70020 */ sw $a3, 0x20($sp) -/* B617E0 800EA640 AFA8001C */ sw $t0, 0x1c($sp) -/* B617E4 800EA644 A3A9003F */ sb $t1, 0x3f($sp) -/* B617E8 800EA648 0C039D17 */ jal Audio_InstrumentGetAudioBankSound -/* B617EC 800EA64C AFAA0040 */ sw $t2, 0x40($sp) -/* B617F0 800EA650 8FA60078 */ lw $a2, 0x78($sp) -/* B617F4 800EA654 8FA70020 */ lw $a3, 0x20($sp) -/* B617F8 800EA658 8FA8001C */ lw $t0, 0x1c($sp) -/* B617FC 800EA65C 8CCD004C */ lw $t5, 0x4c($a2) -/* B61800 800EA660 93A9003F */ lbu $t1, 0x3f($sp) -/* B61804 800EA664 8FAA0040 */ lw $t2, 0x40($sp) -/* B61808 800EA668 ACC2004C */ sw $v0, 0x4c($a2) -/* B6180C 800EA66C 004D5826 */ xor $t3, $v0, $t5 -/* B61810 800EA670 2D6B0001 */ sltiu $t3, $t3, 1 -/* B61814 800EA674 10000013 */ b .L800EA6C4 -/* B61818 800EA678 C4400004 */ lwc1 $f0, 4($v0) -.L800EA67C: -/* B6181C 800EA67C 44810000 */ mtc1 $at, $f0 -/* B61820 800EA680 284100C0 */ slti $at, $v0, 0xc0 -/* B61824 800EA684 1420000F */ bnez $at, .L800EA6C4 -/* B61828 800EA688 ACC0004C */ sw $zero, 0x4c($a2) -/* B6182C 800EA68C 00027080 */ sll $t6, $v0, 2 -/* B61830 800EA690 01C27023 */ subu $t6, $t6, $v0 -/* B61834 800EA694 000E7080 */ sll $t6, $t6, 2 -/* B61838 800EA698 01C27023 */ subu $t6, $t6, $v0 -/* B6183C 800EA69C 000E70C0 */ sll $t6, $t6, 3 -/* B61840 800EA6A0 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 -/* B61844 800EA6A4 01C27021 */ addu $t6, $t6, $v0 -/* B61848 800EA6A8 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -/* B6184C 800EA6AC 000E70C0 */ sll $t6, $t6, 3 -/* B61850 800EA6B0 3C01FFFD */ lui $at, (0xFFFDEC98 >> 16) # lui $at, 0xfffd -/* B61854 800EA6B4 3421EC98 */ ori $at, (0xFFFDEC98 & 0xFFFF) # ori $at, $at, 0xec98 -/* B61858 800EA6B8 00AE7821 */ addu $t7, $a1, $t6 -/* B6185C 800EA6BC 01E1C021 */ addu $t8, $t7, $at -/* B61860 800EA6C0 ACD8004C */ sw $t8, 0x4c($a2) -.L800EA6C4: -/* B61864 800EA6C4 3C038013 */ lui $v1, %hi(D_8012F8B4) # $v1, 0x8013 -/* B61868 800EA6C8 90CD0005 */ lbu $t5, 5($a2) -/* B6186C 800EA6CC 2463F8B4 */ addiu $v1, %lo(D_8012F8B4) # addiu $v1, $v1, -0x74c -/* B61870 800EA6D0 0007C880 */ sll $t9, $a3, 2 -/* B61874 800EA6D4 00796021 */ addu $t4, $v1, $t9 -/* B61878 800EA6D8 C5880000 */ lwc1 $f8, ($t4) -/* B6187C 800EA6DC 91020000 */ lbu $v0, ($t0) -/* B61880 800EA6E0 000D7080 */ sll $t6, $t5, 2 -/* B61884 800EA6E4 006E7821 */ addu $t7, $v1, $t6 -/* B61888 800EA6E8 C5EA0000 */ lwc1 $f10, ($t7) -/* B6188C 800EA6EC 46004082 */ mul.s $f2, $f8, $f0 -/* B61890 800EA6F0 2404FF7F */ li $a0, -129 -/* B61894 800EA6F4 0044C024 */ and $t8, $v0, $a0 -/* B61898 800EA6F8 2719FFFF */ addiu $t9, $t8, -1 -/* B6189C 800EA6FC 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 -/* B618A0 800EA700 2F210005 */ sltiu $at, $t9, 5 -/* B618A4 800EA704 46005382 */ mul.s $f14, $f10, $f0 -/* B618A8 800EA708 1020000D */ beqz $at, .L800EA740 -/* B618AC 800EA70C 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -/* B618B0 800EA710 0019C880 */ sll $t9, $t9, 2 -/* B618B4 800EA714 3C018015 */ lui $at, %hi(jtbl_80149698) -/* B618B8 800EA718 00390821 */ addu $at, $at, $t9 -/* B618BC 800EA71C 8C399698 */ lw $t9, %lo(jtbl_80149698)($at) -/* B618C0 800EA720 03200008 */ jr $t9 -/* B618C4 800EA724 00000000 */ nop -glabel L800EA728 -/* B618C8 800EA728 46001006 */ mov.s $f0, $f2 -/* B618CC 800EA72C 10000006 */ b .L800EA748 -/* B618D0 800EA730 46007306 */ mov.s $f12, $f14 -glabel L800EA734 -/* B618D4 800EA734 46001306 */ mov.s $f12, $f2 -/* B618D8 800EA738 10000003 */ b .L800EA748 -/* B618DC 800EA73C 46007006 */ mov.s $f0, $f14 -.L800EA740: -/* B618E0 800EA740 46001306 */ mov.s $f12, $f2 -/* B618E4 800EA744 46001006 */ mov.s $f0, $f2 -.L800EA748: -/* B618E8 800EA748 460C0403 */ div.s $f16, $f0, $f12 -/* B618EC 800EA74C 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B618F0 800EA750 44819000 */ mtc1 $at, $f18 -/* B618F4 800EA754 304C0080 */ andi $t4, $v0, 0x80 -/* B618F8 800EA758 46128101 */ sub.s $f4, $f16, $f18 -/* B618FC 800EA75C 11800025 */ beqz $t4, .L800EA7F4 -/* B61900 800EA760 E5040008 */ swc1 $f4, 8($t0) -/* B61904 800EA764 954D0008 */ lhu $t5, 8($t2) -/* B61908 800EA768 84AF2898 */ lh $t7, 0x2898($a1) -/* B6190C 800EA76C 84C20008 */ lh $v0, 8($a2) -/* B61910 800EA770 000D73C0 */ sll $t6, $t5, 0xf -/* B61914 800EA774 01CF001A */ div $zero, $t6, $t7 -/* B61918 800EA778 00001812 */ mflo $v1 -/* B6191C 800EA77C 15E00002 */ bnez $t7, .L800EA788 -/* B61920 800EA780 00000000 */ nop -/* B61924 800EA784 0007000D */ break 7 -.L800EA788: -/* B61928 800EA788 2401FFFF */ li $at, -1 -/* B6192C 800EA78C 15E10004 */ bne $t7, $at, .L800EA7A0 -/* B61930 800EA790 3C018000 */ lui $at, 0x8000 -/* B61934 800EA794 15C10002 */ bne $t6, $at, .L800EA7A0 -/* B61938 800EA798 00000000 */ nop -/* B6193C 800EA79C 0006000D */ break 6 -.L800EA7A0: -/* B61940 800EA7A0 50400027 */ beql $v0, $zero, .L800EA840 -/* B61944 800EA7A4 28617FFF */ slti $at, $v1, 0x7fff -/* B61948 800EA7A8 94D9000E */ lhu $t9, 0xe($a2) -/* B6194C 800EA7AC 0003C200 */ sll $t8, $v1, 8 -/* B61950 800EA7B0 00590019 */ multu $v0, $t9 -/* B61954 800EA7B4 00006012 */ mflo $t4 -/* B61958 800EA7B8 00000000 */ nop -/* B6195C 800EA7BC 00000000 */ nop -/* B61960 800EA7C0 030C001A */ div $zero, $t8, $t4 -/* B61964 800EA7C4 00001812 */ mflo $v1 -/* B61968 800EA7C8 15800002 */ bnez $t4, .L800EA7D4 -/* B6196C 800EA7CC 00000000 */ nop -/* B61970 800EA7D0 0007000D */ break 7 -.L800EA7D4: -/* B61974 800EA7D4 2401FFFF */ li $at, -1 -/* B61978 800EA7D8 15810004 */ bne $t4, $at, .L800EA7EC -/* B6197C 800EA7DC 3C018000 */ lui $at, 0x8000 -/* B61980 800EA7E0 17010002 */ bne $t8, $at, .L800EA7EC -/* B61984 800EA7E4 00000000 */ nop -/* B61988 800EA7E8 0006000D */ break 6 -.L800EA7EC: -/* B6198C 800EA7EC 10000014 */ b .L800EA840 -/* B61990 800EA7F0 28617FFF */ slti $at, $v1, 0x7fff -.L800EA7F4: -/* B61994 800EA7F4 94CD000E */ lhu $t5, 0xe($a2) -/* B61998 800EA7F8 84AE2854 */ lh $t6, 0x2854($a1) -/* B6199C 800EA7FC 3C190002 */ lui $t9, 2 -/* B619A0 800EA800 01AE0019 */ multu $t5, $t6 -/* B619A4 800EA804 00007812 */ mflo $t7 -/* B619A8 800EA808 00000000 */ nop -/* B619AC 800EA80C 00000000 */ nop -/* B619B0 800EA810 032F001A */ div $zero, $t9, $t7 -/* B619B4 800EA814 00001812 */ mflo $v1 -/* B619B8 800EA818 15E00002 */ bnez $t7, .L800EA824 -/* B619BC 800EA81C 00000000 */ nop -/* B619C0 800EA820 0007000D */ break 7 -.L800EA824: -/* B619C4 800EA824 2401FFFF */ li $at, -1 -/* B619C8 800EA828 15E10004 */ bne $t7, $at, .L800EA83C -/* B619CC 800EA82C 3C018000 */ lui $at, 0x8000 -/* B619D0 800EA830 17210002 */ bne $t9, $at, .L800EA83C -/* B619D4 800EA834 00000000 */ nop -/* B619D8 800EA838 0006000D */ break 6 -.L800EA83C: -/* B619DC 800EA83C 28617FFF */ slti $at, $v1, 0x7fff -.L800EA840: -/* B619E0 800EA840 14200003 */ bnez $at, .L800EA850 -/* B619E4 800EA844 00000000 */ nop -/* B619E8 800EA848 10000004 */ b .L800EA85C -/* B619EC 800EA84C 24037FFF */ li $v1, 32767 -.L800EA850: -/* B619F0 800EA850 5C600003 */ bgtzl $v1, .L800EA860 -/* B619F4 800EA854 A5030004 */ sh $v1, 4($t0) -/* B619F8 800EA858 24030001 */ li $v1, 1 -.L800EA85C: -/* B619FC 800EA85C A5030004 */ sh $v1, 4($t0) -.L800EA860: -/* B61A00 800EA860 A5000002 */ sh $zero, 2($t0) -/* B61A04 800EA864 E4CC0030 */ swc1 $f12, 0x30($a2) -/* B61A08 800EA868 91180000 */ lbu $t8, ($t0) -/* B61A0C 800EA86C 24010005 */ li $at, 5 -/* B61A10 800EA870 03046024 */ and $t4, $t8, $a0 -/* B61A14 800EA874 55810033 */ bnel $t4, $at, .L800EA944 -/* B61A18 800EA878 C4D20030 */ lwc1 $f18, 0x30($a2) -/* B61A1C 800EA87C 10000030 */ b .L800EA940 -/* B61A20 800EA880 A0C90005 */ sb $t1, 5($a2) -.L800EA884: -/* B61A24 800EA884 10800015 */ beqz $a0, .L800EA8DC -/* B61A28 800EA888 00E02825 */ move $a1, $a3 -/* B61A2C 800EA88C AFA60078 */ sw $a2, 0x78($sp) -/* B61A30 800EA890 AFA70020 */ sw $a3, 0x20($sp) -/* B61A34 800EA894 0C039D17 */ jal Audio_InstrumentGetAudioBankSound -/* B61A38 800EA898 AFAA0040 */ sw $t2, 0x40($sp) -/* B61A3C 800EA89C 8FA60078 */ lw $a2, 0x78($sp) -/* B61A40 800EA8A0 8FA70020 */ lw $a3, 0x20($sp) -/* B61A44 800EA8A4 3C038013 */ lui $v1, %hi(D_8012F8B4) # $v1, 0x8013 -/* B61A48 800EA8A8 8CCD004C */ lw $t5, 0x4c($a2) -/* B61A4C 800EA8AC 8FAA0040 */ lw $t2, 0x40($sp) -/* B61A50 800EA8B0 2463F8B4 */ addiu $v1, %lo(D_8012F8B4) # addiu $v1, $v1, -0x74c -/* B61A54 800EA8B4 ACC2004C */ sw $v0, 0x4c($a2) -/* B61A58 800EA8B8 00077080 */ sll $t6, $a3, 2 -/* B61A5C 800EA8BC 006EC821 */ addu $t9, $v1, $t6 -/* B61A60 800EA8C0 C7260000 */ lwc1 $f6, ($t9) -/* B61A64 800EA8C4 C4480004 */ lwc1 $f8, 4($v0) -/* B61A68 800EA8C8 004D5826 */ xor $t3, $v0, $t5 -/* B61A6C 800EA8CC 2D6B0001 */ sltiu $t3, $t3, 1 -/* B61A70 800EA8D0 46083282 */ mul.s $f10, $f6, $f8 -/* B61A74 800EA8D4 10000018 */ b .L800EA938 -/* B61A78 800EA8D8 E4CA0030 */ swc1 $f10, 0x30($a2) -.L800EA8DC: -/* B61A7C 800EA8DC 3C038013 */ lui $v1, %hi(D_8012F8B4) # $v1, 0x8013 -/* B61A80 800EA8E0 2463F8B4 */ addiu $v1, %lo(D_8012F8B4) # addiu $v1, $v1, -0x74c -/* B61A84 800EA8E4 00077880 */ sll $t7, $a3, 2 -/* B61A88 800EA8E8 ACC0004C */ sw $zero, 0x4c($a2) -/* B61A8C 800EA8EC 006FC021 */ addu $t8, $v1, $t7 -/* B61A90 800EA8F0 C7100000 */ lwc1 $f16, ($t8) -/* B61A94 800EA8F4 284100C0 */ slti $at, $v0, 0xc0 -/* B61A98 800EA8F8 1420000F */ bnez $at, .L800EA938 -/* B61A9C 800EA8FC E4D00030 */ swc1 $f16, 0x30($a2) -/* B61AA0 800EA900 00026080 */ sll $t4, $v0, 2 -/* B61AA4 800EA904 01826023 */ subu $t4, $t4, $v0 -/* B61AA8 800EA908 000C6080 */ sll $t4, $t4, 2 -/* B61AAC 800EA90C 01826023 */ subu $t4, $t4, $v0 -/* B61AB0 800EA910 000C60C0 */ sll $t4, $t4, 3 -/* B61AB4 800EA914 3C058017 */ lui $a1, %hi(gAudioContext) # $a1, 0x8017 -/* B61AB8 800EA918 01826021 */ addu $t4, $t4, $v0 -/* B61ABC 800EA91C 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -/* B61AC0 800EA920 000C60C0 */ sll $t4, $t4, 3 -/* B61AC4 800EA924 3C01FFFD */ li $at, 0xFFFD0000 # 0.000000 -/* B61AC8 800EA928 3421EC98 */ ori $at, (0xFFFDEC98 & 0xFFFF) # ori $at, $at, 0xec98 -/* B61ACC 800EA92C 00AC6821 */ addu $t5, $a1, $t4 -/* B61AD0 800EA930 01A17021 */ addu $t6, $t5, $at -/* B61AD4 800EA934 ACCE004C */ sw $t6, 0x4c($a2) -.L800EA938: -/* B61AD8 800EA938 3C058017 */ lui $a1, %hi(gAudioContext) -/* B61ADC 800EA93C 24A5F180 */ addiu $a1, %lo(gAudioContext) # addiu $a1, $a1, -0xe80 -.L800EA940: -/* B61AE0 800EA940 C4D20030 */ lwc1 $f18, 0x30($a2) -.L800EA944: -/* B61AE4 800EA944 C4C40034 */ lwc1 $f4, 0x34($a2) -/* B61AE8 800EA948 84C20008 */ lh $v0, 8($a2) -/* B61AEC 800EA94C 46049182 */ mul.s $f6, $f18, $f4 -/* B61AF0 800EA950 A4C2000C */ sh $v0, 0xc($a2) -/* B61AF4 800EA954 1440005D */ bnez $v0, .L800EAACC -/* B61AF8 800EA958 E4C60030 */ swc1 $f6, 0x30($a2) -/* B61AFC 800EA95C 8CC2004C */ lw $v0, 0x4c($a2) -/* B61B00 800EA960 5040000E */ beql $v0, $zero, .L800EA99C -/* B61B04 800EA964 44800000 */ mtc1 $zero, $f0 -/* B61B08 800EA968 8C590000 */ lw $t9, ($v0) -/* B61B0C 800EA96C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* B61B10 800EA970 8F2F0008 */ lw $t7, 8($t9) -/* B61B14 800EA974 8DF80004 */ lw $t8, 4($t7) -/* B61B18 800EA978 44984000 */ mtc1 $t8, $f8 -/* B61B1C 800EA97C 07010008 */ bgez $t8, .L800EA9A0 -/* B61B20 800EA980 46804020 */ cvt.s.w $f0, $f8 -/* B61B24 800EA984 44815000 */ mtc1 $at, $f10 -/* B61B28 800EA988 00000000 */ nop -/* B61B2C 800EA98C 460A0000 */ add.s $f0, $f0, $f10 -/* B61B30 800EA990 10000004 */ b .L800EA9A4 -/* B61B34 800EA994 954C0008 */ lhu $t4, 8($t2) -/* B61B38 800EA998 44800000 */ mtc1 $zero, $f0 -.L800EA99C: -/* B61B3C 800EA99C 00000000 */ nop -.L800EA9A0: -/* B61B40 800EA9A0 954C0008 */ lhu $t4, 8($t2) -.L800EA9A4: -/* B61B44 800EA9A4 3C018015 */ lui $at, %hi(D_801496AC) -/* B61B48 800EA9A8 C42296AC */ lwc1 $f2, %lo(D_801496AC)($at) -/* B61B4C 800EA9AC 448C8000 */ mtc1 $t4, $f16 -/* B61B50 800EA9B0 05810005 */ bgez $t4, .L800EA9C8 -/* B61B54 800EA9B4 468084A0 */ cvt.s.w $f18, $f16 -/* B61B58 800EA9B8 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* B61B5C 800EA9BC 44812000 */ mtc1 $at, $f4 -/* B61B60 800EA9C0 00000000 */ nop -/* B61B64 800EA9C4 46049480 */ add.s $f18, $f18, $f4 -.L800EA9C8: -/* B61B68 800EA9C8 46120002 */ mul.s $f0, $f0, $f18 -/* B61B6C 800EA9CC C4A62870 */ lwc1 $f6, 0x2870($a1) -/* B61B70 800EA9D0 C4C80030 */ lwc1 $f8, 0x30($a2) -/* B61B74 800EA9D4 46060002 */ mul.s $f0, $f0, $f6 -/* B61B78 800EA9D8 46080003 */ div.s $f0, $f0, $f8 -/* B61B7C 800EA9DC 4600103C */ c.lt.s $f2, $f0 -/* B61B80 800EA9E0 00000000 */ nop -/* B61B84 800EA9E4 45020003 */ bc1fl .L800EA9F4 -/* B61B88 800EA9E8 4600028D */ trunc.w.s $f10, $f0 -/* B61B8C 800EA9EC 46001006 */ mov.s $f0, $f2 -/* B61B90 800EA9F0 4600028D */ trunc.w.s $f10, $f0 -.L800EA9F4: -/* B61B94 800EA9F4 90D80020 */ lbu $t8, 0x20($a2) -/* B61B98 800EA9F8 A4C0000A */ sh $zero, 0xa($a2) -/* B61B9C 800EA9FC 44195000 */ mfc1 $t9, $f10 -/* B61BA0 800EAA00 00000000 */ nop -/* B61BA4 800EAA04 272F0001 */ addiu $t7, $t9, 1 -/* B61BA8 800EAA08 13000030 */ beqz $t8, .L800EAACC -/* B61BAC 800EAA0C A4CF0008 */ sh $t7, 8($a2) -/* B61BB0 800EAA10 8FAC0060 */ lw $t4, 0x60($sp) -/* B61BB4 800EAA14 918D0000 */ lbu $t5, ($t4) -/* B61BB8 800EAA18 31AE0080 */ andi $t6, $t5, 0x80 -/* B61BBC 800EAA1C 51C0002C */ beql $t6, $zero, .L800EAAD0 -/* B61BC0 800EAA20 01601025 */ move $v0, $t3 -/* B61BC4 800EAA24 95590008 */ lhu $t9, 8($t2) -/* B61BC8 800EAA28 84B82898 */ lh $t8, 0x2898($a1) -/* B61BCC 800EAA2C 84CC0008 */ lh $t4, 8($a2) -/* B61BD0 800EAA30 00197BC0 */ sll $t7, $t9, 0xf -/* B61BD4 800EAA34 01F8001A */ div $zero, $t7, $t8 -/* B61BD8 800EAA38 00001012 */ mflo $v0 -/* B61BDC 800EAA3C 94CD000E */ lhu $t5, 0xe($a2) -/* B61BE0 800EAA40 0002CA00 */ sll $t9, $v0, 8 -/* B61BE4 800EAA44 17000002 */ bnez $t8, .L800EAA50 -/* B61BE8 800EAA48 00000000 */ nop -/* B61BEC 800EAA4C 0007000D */ break 7 -.L800EAA50: -/* B61BF0 800EAA50 2401FFFF */ li $at, -1 -/* B61BF4 800EAA54 17010004 */ bne $t8, $at, .L800EAA68 -/* B61BF8 800EAA58 3C018000 */ lui $at, 0x8000 -/* B61BFC 800EAA5C 15E10002 */ bne $t7, $at, .L800EAA68 -/* B61C00 800EAA60 00000000 */ nop -/* B61C04 800EAA64 0006000D */ break 6 -.L800EAA68: -/* B61C08 800EAA68 018D0019 */ multu $t4, $t5 -/* B61C0C 800EAA6C 8FAF0060 */ lw $t7, 0x60($sp) -/* B61C10 800EAA70 00007012 */ mflo $t6 -/* B61C14 800EAA74 00000000 */ nop -/* B61C18 800EAA78 00000000 */ nop -/* B61C1C 800EAA7C 032E001A */ div $zero, $t9, $t6 -/* B61C20 800EAA80 15C00002 */ bnez $t6, .L800EAA8C -/* B61C24 800EAA84 00000000 */ nop -/* B61C28 800EAA88 0007000D */ break 7 -.L800EAA8C: -/* B61C2C 800EAA8C 2401FFFF */ li $at, -1 -/* B61C30 800EAA90 15C10004 */ bne $t6, $at, .L800EAAA4 -/* B61C34 800EAA94 3C018000 */ lui $at, 0x8000 -/* B61C38 800EAA98 17210002 */ bne $t9, $at, .L800EAAA4 -/* B61C3C 800EAA9C 00000000 */ nop -/* B61C40 800EAAA0 0006000D */ break 6 -.L800EAAA4: -/* B61C44 800EAAA4 00001012 */ mflo $v0 -/* B61C48 800EAAA8 28417FFF */ slti $at, $v0, 0x7fff -/* B61C4C 800EAAAC 14200003 */ bnez $at, .L800EAABC -/* B61C50 800EAAB0 00000000 */ nop -/* B61C54 800EAAB4 10000004 */ b .L800EAAC8 -/* B61C58 800EAAB8 24027FFF */ li $v0, 32767 -.L800EAABC: -/* B61C5C 800EAABC 5C400003 */ bgtzl $v0, .L800EAACC -/* B61C60 800EAAC0 A5E20004 */ sh $v0, 4($t7) -/* B61C64 800EAAC4 24020001 */ li $v0, 1 -.L800EAAC8: -/* B61C68 800EAAC8 A5E20004 */ sh $v0, 4($t7) -.L800EAACC: -/* B61C6C 800EAACC 01601025 */ move $v0, $t3 -.L800EAAD0: -/* B61C70 800EAAD0 8FBF0014 */ lw $ra, 0x14($sp) -/* B61C74 800EAAD4 27BD0078 */ addiu $sp, $sp, 0x78 -/* B61C78 800EAAD8 03E00008 */ jr $ra -/* B61C7C 800EAADC 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EAAE0.s b/asm/non_matchings/code/audio_seqplayer/func_800EAAE0.s deleted file mode 100644 index ed37be7a71..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EAAE0.s +++ /dev/null @@ -1,298 +0,0 @@ -.late_rodata -glabel D_801496B0 - .float 16129 - -.text -glabel func_800EAAE0 -/* B61C80 800EAAE0 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* B61C84 800EAAE4 AFBF0014 */ sw $ra, 0x14($sp) -/* B61C88 800EAAE8 AFA50044 */ sw $a1, 0x44($sp) -/* B61C8C 800EAAEC 8C880050 */ lw $t0, 0x50($a0) -/* B61C90 800EAAF0 240100C0 */ li $at, 192 -/* B61C94 800EAAF4 00803025 */ move $a2, $a0 -/* B61C98 800EAAF8 8D0E004C */ lw $t6, 0x4c($t0) -/* B61C9C 800EAAFC 14A1000D */ bne $a1, $at, .L800EAB34 -/* B61CA0 800EAB00 AFAE002C */ sw $t6, 0x2c($sp) -/* B61CA4 800EAB04 24C40054 */ addiu $a0, $a2, 0x54 -/* B61CA8 800EAB08 0C03A765 */ jal func_800E9D94 -/* B61CAC 800EAB0C AFA60040 */ sw $a2, 0x40($sp) -/* B61CB0 800EAB10 8FA60040 */ lw $a2, 0x40($sp) -/* B61CB4 800EAB14 90D90000 */ lbu $t9, ($a2) -/* B61CB8 800EAB18 A4C20008 */ sh $v0, 8($a2) -/* B61CBC 800EAB1C 2402FFFF */ li $v0, -1 -/* B61CC0 800EAB20 372A0020 */ ori $t2, $t9, 0x20 -/* B61CC4 800EAB24 314B00FD */ andi $t3, $t2, 0xfd -/* B61CC8 800EAB28 A0CA0000 */ sb $t2, ($a2) -/* B61CCC 800EAB2C 100000ED */ b .L800EAEE4 -/* B61CD0 800EAB30 A0CB0000 */ sb $t3, ($a2) -.L800EAB34: -/* B61CD4 800EAB34 90CC0000 */ lbu $t4, ($a2) -/* B61CD8 800EAB38 24010001 */ li $at, 1 -/* B61CDC 800EAB3C 318DFFDF */ andi $t5, $t4, 0xffdf -/* B61CE0 800EAB40 A0CD0000 */ sb $t5, ($a2) -/* B61CE4 800EAB44 8D0E0000 */ lw $t6, ($t0) -/* B61CE8 800EAB48 8FA50044 */ lw $a1, 0x44($sp) -/* B61CEC 800EAB4C 000E7980 */ sll $t7, $t6, 6 -/* B61CF0 800EAB50 000FC7C2 */ srl $t8, $t7, 0x1f -/* B61CF4 800EAB54 17010053 */ bne $t8, $at, .L800EACA4 -/* B61CF8 800EAB58 30A500C0 */ andi $a1, $a1, 0xc0 -/* B61CFC 800EAB5C 8FA50044 */ lw $a1, 0x44($sp) -/* B61D00 800EAB60 24010040 */ li $at, 64 -/* B61D04 800EAB64 30A500C0 */ andi $a1, $a1, 0xc0 -/* B61D08 800EAB68 50A00008 */ beql $a1, $zero, .L800EAB8C -/* B61D0C 800EAB6C 24C40054 */ addiu $a0, $a2, 0x54 -/* B61D10 800EAB70 10A1001C */ beq $a1, $at, .L800EABE4 -/* B61D14 800EAB74 24010080 */ li $at, 128 -/* B61D18 800EAB78 50A1002D */ beql $a1, $at, .L800EAC30 -/* B61D1C 800EAB7C 84CE0014 */ lh $t6, 0x14($a2) -/* B61D20 800EAB80 10000037 */ b .L800EAC60 -/* B61D24 800EAB84 8FA70034 */ lw $a3, 0x34($sp) -/* B61D28 800EAB88 24C40054 */ addiu $a0, $a2, 0x54 -.L800EAB8C: -/* B61D2C 800EAB8C AFA4001C */ sw $a0, 0x1c($sp) -/* B61D30 800EAB90 AFA50018 */ sw $a1, 0x18($sp) -/* B61D34 800EAB94 AFA60040 */ sw $a2, 0x40($sp) -/* B61D38 800EAB98 0C03A765 */ jal func_800E9D94 -/* B61D3C 800EAB9C AFA80030 */ sw $t0, 0x30($sp) -/* B61D40 800EABA0 8FA4001C */ lw $a0, 0x1c($sp) -/* B61D44 800EABA4 A7A2003A */ sh $v0, 0x3a($sp) -/* B61D48 800EABA8 8FA60040 */ lw $a2, 0x40($sp) -/* B61D4C 800EABAC 8C830000 */ lw $v1, ($a0) -/* B61D50 800EABB0 8FA50018 */ lw $a1, 0x18($sp) -/* B61D54 800EABB4 8FA80030 */ lw $t0, 0x30($sp) -/* B61D58 800EABB8 90670000 */ lbu $a3, ($v1) -/* B61D5C 800EABBC 24790001 */ addiu $t9, $v1, 1 -/* B61D60 800EABC0 AC990000 */ sw $t9, ($a0) -/* B61D64 800EABC4 932A0000 */ lbu $t2, ($t9) -/* B61D68 800EABC8 03204825 */ move $t1, $t9 -/* B61D6C 800EABCC A0CA0003 */ sb $t2, 3($a2) -/* B61D70 800EABD0 8C8B0000 */ lw $t3, ($a0) -/* B61D74 800EABD4 256C0001 */ addiu $t4, $t3, 1 -/* B61D78 800EABD8 AC8C0000 */ sw $t4, ($a0) -/* B61D7C 800EABDC 10000020 */ b .L800EAC60 -/* B61D80 800EABE0 A4C20014 */ sh $v0, 0x14($a2) -.L800EABE4: -/* B61D84 800EABE4 24C40054 */ addiu $a0, $a2, 0x54 -/* B61D88 800EABE8 AFA4001C */ sw $a0, 0x1c($sp) -/* B61D8C 800EABEC AFA50018 */ sw $a1, 0x18($sp) -/* B61D90 800EABF0 AFA60040 */ sw $a2, 0x40($sp) -/* B61D94 800EABF4 0C03A765 */ jal func_800E9D94 -/* B61D98 800EABF8 AFA80030 */ sw $t0, 0x30($sp) -/* B61D9C 800EABFC 8FA4001C */ lw $a0, 0x1c($sp) -/* B61DA0 800EAC00 A7A2003A */ sh $v0, 0x3a($sp) -/* B61DA4 800EAC04 8FA60040 */ lw $a2, 0x40($sp) -/* B61DA8 800EAC08 8C830000 */ lw $v1, ($a0) -/* B61DAC 800EAC0C 8FA50018 */ lw $a1, 0x18($sp) -/* B61DB0 800EAC10 8FA80030 */ lw $t0, 0x30($sp) -/* B61DB4 800EAC14 90670000 */ lbu $a3, ($v1) -/* B61DB8 800EAC18 246D0001 */ addiu $t5, $v1, 1 -/* B61DBC 800EAC1C AC8D0000 */ sw $t5, ($a0) -/* B61DC0 800EAC20 A0C00003 */ sb $zero, 3($a2) -/* B61DC4 800EAC24 1000000E */ b .L800EAC60 -/* B61DC8 800EAC28 A4C20014 */ sh $v0, 0x14($a2) -/* B61DCC 800EAC2C 84CE0014 */ lh $t6, 0x14($a2) -.L800EAC30: -/* B61DD0 800EAC30 24C40054 */ addiu $a0, $a2, 0x54 -/* B61DD4 800EAC34 A7AE003A */ sh $t6, 0x3a($sp) -/* B61DD8 800EAC38 8C830000 */ lw $v1, ($a0) -/* B61DDC 800EAC3C 90670000 */ lbu $a3, ($v1) -/* B61DE0 800EAC40 246F0001 */ addiu $t7, $v1, 1 -/* B61DE4 800EAC44 AC8F0000 */ sw $t7, ($a0) -/* B61DE8 800EAC48 91F90000 */ lbu $t9, ($t7) -/* B61DEC 800EAC4C 01E0C025 */ move $t8, $t7 -/* B61DF0 800EAC50 A0D90003 */ sb $t9, 3($a2) -/* B61DF4 800EAC54 8C890000 */ lw $t1, ($a0) -/* B61DF8 800EAC58 252A0001 */ addiu $t2, $t1, 1 -/* B61DFC 800EAC5C AC8A0000 */ sw $t2, ($a0) -.L800EAC60: -/* B61E00 800EAC60 28E10080 */ slti $at, $a3, 0x80 -/* B61E04 800EAC64 50200004 */ beql $at, $zero, .L800EAC78 -/* B61E08 800EAC68 2407007F */ li $a3, 127 -/* B61E0C 800EAC6C 04E30003 */ bgezl $a3, .L800EAC7C -/* B61E10 800EAC70 44872000 */ mtc1 $a3, $f4 -/* B61E14 800EAC74 2407007F */ li $a3, 127 -.L800EAC78: -/* B61E18 800EAC78 44872000 */ mtc1 $a3, $f4 -.L800EAC7C: -/* B61E1C 800EAC7C 3C018015 */ lui $at, %hi(D_801496B0) -/* B61E20 800EAC80 C42896B0 */ lwc1 $f8, %lo(D_801496B0)($at) -/* B61E24 800EAC84 46802020 */ cvt.s.w $f0, $f4 -/* B61E28 800EAC88 46000182 */ mul.s $f6, $f0, $f0 -/* B61E2C 800EAC8C 46083283 */ div.s $f10, $f6, $f8 -/* B61E30 800EAC90 E4CA003C */ swc1 $f10, 0x3c($a2) -/* B61E34 800EAC94 8FAB0044 */ lw $t3, 0x44($sp) -/* B61E38 800EAC98 01656023 */ subu $t4, $t3, $a1 -/* B61E3C 800EAC9C 1000001D */ b .L800EAD14 -/* B61E40 800EACA0 AFAC0044 */ sw $t4, 0x44($sp) -.L800EACA4: -/* B61E44 800EACA4 10A00008 */ beqz $a1, .L800EACC8 -/* B61E48 800EACA8 24010040 */ li $at, 64 -/* B61E4C 800EACAC 50A10012 */ beql $a1, $at, .L800EACF8 -/* B61E50 800EACB0 84CD0012 */ lh $t5, 0x12($a2) -/* B61E54 800EACB4 24010080 */ li $at, 128 -/* B61E58 800EACB8 50A10012 */ beql $a1, $at, .L800EAD04 -/* B61E5C 800EACBC 84CE0014 */ lh $t6, 0x14($a2) -/* B61E60 800EACC0 10000012 */ b .L800EAD0C -/* B61E64 800EACC4 8FAF0044 */ lw $t7, 0x44($sp) -.L800EACC8: -/* B61E68 800EACC8 24C40054 */ addiu $a0, $a2, 0x54 -/* B61E6C 800EACCC AFA50018 */ sw $a1, 0x18($sp) -/* B61E70 800EACD0 AFA60040 */ sw $a2, 0x40($sp) -/* B61E74 800EACD4 0C03A765 */ jal func_800E9D94 -/* B61E78 800EACD8 AFA80030 */ sw $t0, 0x30($sp) -/* B61E7C 800EACDC 8FA60040 */ lw $a2, 0x40($sp) -/* B61E80 800EACE0 8FA50018 */ lw $a1, 0x18($sp) -/* B61E84 800EACE4 8FA80030 */ lw $t0, 0x30($sp) -/* B61E88 800EACE8 A7A2003A */ sh $v0, 0x3a($sp) -/* B61E8C 800EACEC 10000006 */ b .L800EAD08 -/* B61E90 800EACF0 A4C20014 */ sh $v0, 0x14($a2) -/* B61E94 800EACF4 84CD0012 */ lh $t5, 0x12($a2) -.L800EACF8: -/* B61E98 800EACF8 10000003 */ b .L800EAD08 -/* B61E9C 800EACFC A7AD003A */ sh $t5, 0x3a($sp) -/* B61EA0 800EAD00 84CE0014 */ lh $t6, 0x14($a2) -.L800EAD04: -/* B61EA4 800EAD04 A7AE003A */ sh $t6, 0x3a($sp) -.L800EAD08: -/* B61EA8 800EAD08 8FAF0044 */ lw $t7, 0x44($sp) -.L800EAD0C: -/* B61EAC 800EAD0C 01E5C023 */ subu $t8, $t7, $a1 -/* B61EB0 800EAD10 AFB80044 */ sw $t8, 0x44($sp) -.L800EAD14: -/* B61EB4 800EAD14 9103000D */ lbu $v1, 0xd($t0) -/* B61EB8 800EAD18 3C028017 */ lui $v0, %hi(D_80171AFC) -/* B61EBC 800EAD1C 5060002A */ beql $v1, $zero, .L800EADC8 -/* B61EC0 800EAD20 C4D0003C */ lwc1 $f16, 0x3c($a2) -/* B61EC4 800EAD24 8C421AFC */ lw $v0, %lo(D_80171AFC)($v0) -/* B61EC8 800EAD28 C4CC003C */ lwc1 $f12, 0x3c($a2) -/* B61ECC 800EAD2C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* B61ED0 800EAD30 0043001B */ divu $zero, $v0, $v1 -/* B61ED4 800EAD34 0000C810 */ mfhi $t9 -/* B61ED8 800EAD38 44998000 */ mtc1 $t9, $f16 -/* B61EDC 800EAD3C 14600002 */ bnez $v1, .L800EAD48 -/* B61EE0 800EAD40 00000000 */ nop -/* B61EE4 800EAD44 0007000D */ break 7 -.L800EAD48: -/* B61EE8 800EAD48 468084A0 */ cvt.s.w $f18, $f16 -/* B61EEC 800EAD4C 07210004 */ bgez $t9, .L800EAD60 -/* B61EF0 800EAD50 00000000 */ nop -/* B61EF4 800EAD54 44812000 */ mtc1 $at, $f4 -/* B61EF8 800EAD58 00000000 */ nop -/* B61EFC 800EAD5C 46049480 */ add.s $f18, $f18, $f4 -.L800EAD60: -/* B61F00 800EAD60 46126182 */ mul.s $f6, $f12, $f18 -/* B61F04 800EAD64 3C0142C8 */ li $at, 0x42C80000 # 0.000000 -/* B61F08 800EAD68 44814000 */ mtc1 $at, $f8 -/* B61F0C 800EAD6C 30498000 */ andi $t1, $v0, 0x8000 -/* B61F10 800EAD70 11200002 */ beqz $t1, .L800EAD7C -/* B61F14 800EAD74 46083083 */ div.s $f2, $f6, $f8 -/* B61F18 800EAD78 46001087 */ neg.s $f2, $f2 -.L800EAD7C: -/* B61F1C 800EAD7C 46026000 */ add.s $f0, $f12, $f2 -/* B61F20 800EAD80 44807000 */ mtc1 $zero, $f14 -/* B61F24 800EAD84 00000000 */ nop -/* B61F28 800EAD88 460E003C */ c.lt.s $f0, $f14 -/* B61F2C 800EAD8C E4C00038 */ swc1 $f0, 0x38($a2) -/* B61F30 800EAD90 45020004 */ bc1fl .L800EADA4 -/* B61F34 800EAD94 3C013F80 */ lui $at, 0x3f80 -/* B61F38 800EAD98 1000000C */ b .L800EADCC -/* B61F3C 800EAD9C E4CE0038 */ swc1 $f14, 0x38($a2) -/* B61F40 800EADA0 3C013F80 */ li $at, 0x3F800000 # 0.000000 -.L800EADA4: -/* B61F44 800EADA4 44810000 */ mtc1 $at, $f0 -/* B61F48 800EADA8 C4CA0038 */ lwc1 $f10, 0x38($a2) -/* B61F4C 800EADAC 460A003C */ c.lt.s $f0, $f10 -/* B61F50 800EADB0 00000000 */ nop -/* B61F54 800EADB4 45020006 */ bc1fl .L800EADD0 -/* B61F58 800EADB8 97A2003A */ lhu $v0, 0x3a($sp) -/* B61F5C 800EADBC 10000003 */ b .L800EADCC -/* B61F60 800EADC0 E4C00038 */ swc1 $f0, 0x38($a2) -/* B61F64 800EADC4 C4D0003C */ lwc1 $f16, 0x3c($a2) -.L800EADC8: -/* B61F68 800EADC8 E4D00038 */ swc1 $f16, 0x38($a2) -.L800EADCC: -/* B61F6C 800EADCC 97A2003A */ lhu $v0, 0x3a($sp) -.L800EADD0: -/* B61F70 800EADD0 90CA0003 */ lbu $t2, 3($a2) -/* B61F74 800EADD4 A4C20008 */ sh $v0, 8($a2) -/* B61F78 800EADD8 01420019 */ multu $t2, $v0 -/* B61F7C 800EADDC 3C028017 */ lui $v0, %hi(D_80171AFC) # $v0, 0x8017 -/* B61F80 800EADE0 00005812 */ mflo $t3 -/* B61F84 800EADE4 000B6203 */ sra $t4, $t3, 8 -/* B61F88 800EADE8 A4CC000A */ sh $t4, 0xa($a2) -/* B61F8C 800EADEC 910D000E */ lbu $t5, 0xe($t0) -/* B61F90 800EADF0 51A00021 */ beql $t5, $zero, .L800EAE78 -/* B61F94 800EADF4 8FA9002C */ lw $t1, 0x2c($sp) -/* B61F98 800EADF8 8C421AFC */ lw $v0, %lo(D_80171AFC)($v0) -/* B61F9C 800EADFC 910E000D */ lbu $t6, 0xd($t0) -/* B61FA0 800EAE00 84C3000A */ lh $v1, 0xa($a2) -/* B61FA4 800EAE04 24010064 */ li $at, 100 -/* B61FA8 800EAE08 004E001B */ divu $zero, $v0, $t6 -/* B61FAC 800EAE0C 00007810 */ mfhi $t7 -/* B61FB0 800EAE10 30584000 */ andi $t8, $v0, 0x4000 -/* B61FB4 800EAE14 15C00002 */ bnez $t6, .L800EAE20 -/* B61FB8 800EAE18 00000000 */ nop -/* B61FBC 800EAE1C 0007000D */ break 7 -.L800EAE20: -/* B61FC0 800EAE20 006F0019 */ multu $v1, $t7 -/* B61FC4 800EAE24 00002012 */ mflo $a0 -/* B61FC8 800EAE28 00000000 */ nop -/* B61FCC 800EAE2C 00000000 */ nop -/* B61FD0 800EAE30 0081001B */ divu $zero, $a0, $at -/* B61FD4 800EAE34 00002012 */ mflo $a0 -/* B61FD8 800EAE38 53000003 */ beql $t8, $zero, .L800EAE48 -/* B61FDC 800EAE3C 0064C821 */ addu $t9, $v1, $a0 -/* B61FE0 800EAE40 00042023 */ negu $a0, $a0 -/* B61FE4 800EAE44 0064C821 */ addu $t9, $v1, $a0 -.L800EAE48: -/* B61FE8 800EAE48 A4D9000A */ sh $t9, 0xa($a2) -/* B61FEC 800EAE4C 84C3000A */ lh $v1, 0xa($a2) -/* B61FF0 800EAE50 04630004 */ bgezl $v1, .L800EAE64 -/* B61FF4 800EAE54 84C20008 */ lh $v0, 8($a2) -/* B61FF8 800EAE58 10000006 */ b .L800EAE74 -/* B61FFC 800EAE5C A4C0000A */ sh $zero, 0xa($a2) -/* B62000 800EAE60 84C20008 */ lh $v0, 8($a2) -.L800EAE64: -/* B62004 800EAE64 0043082A */ slt $at, $v0, $v1 -/* B62008 800EAE68 50200003 */ beql $at, $zero, .L800EAE78 -/* B6200C 800EAE6C 8FA9002C */ lw $t1, 0x2c($sp) -/* B62010 800EAE70 A4C2000A */ sh $v0, 0xa($a2) -.L800EAE74: -/* B62014 800EAE74 8FA9002C */ lw $t1, 0x2c($sp) -.L800EAE78: -/* B62018 800EAE78 8D2A0000 */ lw $t2, ($t1) -/* B6201C 800EAE7C 000A6080 */ sll $t4, $t2, 2 -/* B62020 800EAE80 05830006 */ bgezl $t4, .L800EAE9C -/* B62024 800EAE84 8D0F0000 */ lw $t7, ($t0) -/* B62028 800EAE88 910D0003 */ lbu $t5, 3($t0) -/* B6202C 800EAE8C 31AE0050 */ andi $t6, $t5, 0x50 -/* B62030 800EAE90 55C00007 */ bnezl $t6, .L800EAEB0 -/* B62034 800EAE94 90CA0000 */ lbu $t2, ($a2) -/* B62038 800EAE98 8D0F0000 */ lw $t7, ($t0) -.L800EAE9C: -/* B6203C 800EAE9C 8FAC002C */ lw $t4, 0x2c($sp) -/* B62040 800EAEA0 000FC8C0 */ sll $t9, $t7, 3 -/* B62044 800EAEA4 07230007 */ bgezl $t9, .L800EAEC4 -/* B62048 800EAEA8 8D8D00DC */ lw $t5, 0xdc($t4) -/* B6204C 800EAEAC 90CA0000 */ lbu $t2, ($a2) -.L800EAEB0: -/* B62050 800EAEB0 2402FFFF */ li $v0, -1 -/* B62054 800EAEB4 354B0020 */ ori $t3, $t2, 0x20 -/* B62058 800EAEB8 1000000A */ b .L800EAEE4 -/* B6205C 800EAEBC A0CB0000 */ sb $t3, ($a2) -/* B62060 800EAEC0 8D8D00DC */ lw $t5, 0xdc($t4) -.L800EAEC4: -/* B62064 800EAEC4 8FA20044 */ lw $v0, 0x44($sp) -/* B62068 800EAEC8 11A00006 */ beqz $t5, .L800EAEE4 -/* B6206C 800EAECC 00000000 */ nop -/* B62070 800EAED0 90CF0000 */ lbu $t7, ($a2) -/* B62074 800EAED4 2402FFFF */ li $v0, -1 -/* B62078 800EAED8 35F80020 */ ori $t8, $t7, 0x20 -/* B6207C 800EAEDC 10000001 */ b .L800EAEE4 -/* B62080 800EAEE0 A0D80000 */ sb $t8, ($a2) -.L800EAEE4: -/* B62084 800EAEE4 8FBF0014 */ lw $ra, 0x14($sp) -/* B62088 800EAEE8 27BD0040 */ addiu $sp, $sp, 0x40 -/* B6208C 800EAEEC 03E00008 */ jr $ra -/* B62090 800EAEF0 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EAEF4.s b/asm/non_matchings/code/audio_seqplayer/func_800EAEF4.s deleted file mode 100644 index c0e33938dd..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EAEF4.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_800EAEF4 -/* B62094 800EAEF4 30A200FF */ andi $v0, $a1, 0xff -/* B62098 800EAEF8 3043000F */ andi $v1, $v0, 0xf -/* B6209C 800EAEFC 10600002 */ beqz $v1, .L800EAF08 -/* B620A0 800EAF00 AFA50004 */ sw $a1, 4($sp) -/* B620A4 800EAF04 A0830005 */ sb $v1, 5($a0) -.L800EAF08: -/* B620A8 800EAF08 00022903 */ sra $a1, $v0, 4 -/* B620AC 800EAF0C 30A500FF */ andi $a1, $a1, 0xff -/* B620B0 800EAF10 10A00002 */ beqz $a1, .L800EAF1C -/* B620B4 800EAF14 00000000 */ nop -/* B620B8 800EAF18 A0850006 */ sb $a1, 6($a0) -.L800EAF1C: -/* B620BC 800EAF1C 03E00008 */ jr $ra -/* B620C0 800EAF20 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EAF24.s b/asm/non_matchings/code/audio_seqplayer/func_800EAF24.s deleted file mode 100644 index a73089bab2..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EAF24.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_800EAF24 -/* B620C4 800EAF24 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B620C8 800EAF28 AFA50024 */ sw $a1, 0x24($sp) -/* B620CC 800EAF2C 93A50027 */ lbu $a1, 0x27($sp) -/* B620D0 800EAF30 AFBF0014 */ sw $ra, 0x14($sp) -/* B620D4 800EAF34 AFA40020 */ sw $a0, 0x20($sp) -/* B620D8 800EAF38 AFA60028 */ sw $a2, 0x28($sp) -/* B620DC 800EAF3C AFA7002C */ sw $a3, 0x2c($sp) -/* B620E0 800EAF40 90840007 */ lbu $a0, 7($a0) -/* B620E4 800EAF44 0C039D26 */ jal Audio_GetInstrumentInner -/* B620E8 800EAF48 AFA50018 */ sw $a1, 0x18($sp) -/* B620EC 800EAF4C 8FA50018 */ lw $a1, 0x18($sp) -/* B620F0 800EAF50 8FA60028 */ lw $a2, 0x28($sp) -/* B620F4 800EAF54 8FA7002C */ lw $a3, 0x2c($sp) -/* B620F8 800EAF58 14400004 */ bnez $v0, .L800EAF6C -/* B620FC 800EAF5C 00401825 */ move $v1, $v0 -/* B62100 800EAF60 ACC00000 */ sw $zero, ($a2) -/* B62104 800EAF64 10000008 */ b .L800EAF88 -/* B62108 800EAF68 00001025 */ move $v0, $zero -.L800EAF6C: -/* B6210C 800EAF6C 8C6F0004 */ lw $t7, 4($v1) -/* B62110 800EAF70 24A40002 */ addiu $a0, $a1, 2 -/* B62114 800EAF74 308200FF */ andi $v0, $a0, 0xff -/* B62118 800EAF78 ACEF0004 */ sw $t7, 4($a3) -/* B6211C 800EAF7C 90780003 */ lbu $t8, 3($v1) -/* B62120 800EAF80 A0F80000 */ sb $t8, ($a3) -/* B62124 800EAF84 ACC30000 */ sw $v1, ($a2) -.L800EAF88: -/* B62128 800EAF88 8FBF0014 */ lw $ra, 0x14($sp) -/* B6212C 800EAF8C 27BD0020 */ addiu $sp, $sp, 0x20 -/* B62130 800EAF90 03E00008 */ jr $ra -/* B62134 800EAF94 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EAF98.s b/asm/non_matchings/code/audio_seqplayer/func_800EAF98.s deleted file mode 100644 index c6260b9198..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EAF98.s +++ /dev/null @@ -1,50 +0,0 @@ -glabel func_800EAF98 -/* B62138 800EAF98 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B6213C 800EAF9C AFA5001C */ sw $a1, 0x1c($sp) -/* B62140 800EAFA0 30A500FF */ andi $a1, $a1, 0xff -/* B62144 800EAFA4 28A10080 */ slti $at, $a1, 0x80 -/* B62148 800EAFA8 AFBF0014 */ sw $ra, 0x14($sp) -/* B6214C 800EAFAC 14200004 */ bnez $at, .L800EAFC0 -/* B62150 800EAFB0 00A01025 */ move $v0, $a1 -/* B62154 800EAFB4 A4820024 */ sh $v0, 0x24($a0) -/* B62158 800EAFB8 1000001B */ b .L800EB028 -/* B6215C 800EAFBC AC800048 */ sw $zero, 0x48($a0) -.L800EAFC0: -/* B62160 800EAFC0 2401007F */ li $at, 127 -/* B62164 800EAFC4 14410004 */ bne $v0, $at, .L800EAFD8 -/* B62168 800EAFC8 240E0001 */ li $t6, 1 -/* B6216C 800EAFCC A4800024 */ sh $zero, 0x24($a0) -/* B62170 800EAFD0 10000015 */ b .L800EB028 -/* B62174 800EAFD4 AC8E0048 */ sw $t6, 0x48($a0) -.L800EAFD8: -/* B62178 800EAFD8 2401007E */ li $at, 126 -/* B6217C 800EAFDC 14410006 */ bne $v0, $at, .L800EAFF8 -/* B62180 800EAFE0 24860048 */ addiu $a2, $a0, 0x48 -/* B62184 800EAFE4 240F0001 */ li $t7, 1 -/* B62188 800EAFE8 24180002 */ li $t8, 2 -/* B6218C 800EAFEC A48F0024 */ sh $t7, 0x24($a0) -/* B62190 800EAFF0 1000000D */ b .L800EB028 -/* B62194 800EAFF4 AC980048 */ sw $t8, 0x48($a0) -.L800EAFF8: -/* B62198 800EAFF8 2487007C */ addiu $a3, $a0, 0x7c -/* B6219C 800EAFFC 0C03ABC9 */ jal func_800EAF24 -/* B621A0 800EB000 AFA40018 */ sw $a0, 0x18($sp) -/* B621A4 800EB004 8FA40018 */ lw $a0, 0x18($sp) -/* B621A8 800EB008 0002CC00 */ sll $t9, $v0, 0x10 -/* B621AC 800EB00C 00194403 */ sra $t0, $t9, 0x10 -/* B621B0 800EB010 15000005 */ bnez $t0, .L800EB028 -/* B621B4 800EB014 A4820024 */ sh $v0, 0x24($a0) -/* B621B8 800EB018 90890000 */ lbu $t1, ($a0) -/* B621BC 800EB01C 312AFFF7 */ andi $t2, $t1, 0xfff7 -/* B621C0 800EB020 10000004 */ b .L800EB034 -/* B621C4 800EB024 A08A0000 */ sb $t2, ($a0) -.L800EB028: -/* B621C8 800EB028 908C0000 */ lbu $t4, ($a0) -/* B621CC 800EB02C 358D0008 */ ori $t5, $t4, 8 -/* B621D0 800EB030 A08D0000 */ sb $t5, ($a0) -.L800EB034: -/* B621D4 800EB034 8FBF0014 */ lw $ra, 0x14($sp) -/* B621D8 800EB038 27BD0018 */ addiu $sp, $sp, 0x18 -/* B621DC 800EB03C 03E00008 */ jr $ra -/* B621E0 800EB040 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EB044.s b/asm/non_matchings/code/audio_seqplayer/func_800EB044.s deleted file mode 100644 index b93312d0b7..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EB044.s +++ /dev/null @@ -1,11 +0,0 @@ -glabel func_800EB044 -/* B621E4 800EB044 AFA50004 */ sw $a1, 4($sp) -/* B621E8 800EB048 30A500FF */ andi $a1, $a1, 0xff -/* B621EC 800EB04C 44852000 */ mtc1 $a1, $f4 -/* B621F0 800EB050 3C0142FE */ li $at, 0x42FE0000 # 0.000000 -/* B621F4 800EB054 44814000 */ mtc1 $at, $f8 -/* B621F8 800EB058 468021A0 */ cvt.s.w $f6, $f4 -/* B621FC 800EB05C 46083283 */ div.s $f10, $f6, $f8 -/* B62200 800EB060 03E00008 */ jr $ra -/* B62204 800EB064 E48A002C */ swc1 $f10, 0x2c($a0) - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC564.s b/asm/non_matchings/code/audio_seqplayer/func_800EC564.s deleted file mode 100644 index 9da92b0834..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC564.s +++ /dev/null @@ -1,50 +0,0 @@ -glabel func_800EC564 -/* B63704 800EC564 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B63708 800EC568 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 -/* B6370C 800EC56C 846E2854 */ lh $t6, 0x2854($v1) -/* B63710 800EC570 8C792894 */ lw $t9, 0x2894($v1) -/* B63714 800EC574 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B63718 800EC578 01C47823 */ subu $t7, $t6, $a0 -/* B6371C 800EC57C 25F8FFFF */ addiu $t8, $t7, -1 -/* B63720 800EC580 03190019 */ multu $t8, $t9 -/* B63724 800EC584 8462285C */ lh $v0, 0x285c($v1) -/* B63728 800EC588 AFB10018 */ sw $s1, 0x18($sp) -/* B6372C 800EC58C AFB30020 */ sw $s3, 0x20($sp) -/* B63730 800EC590 AFB2001C */ sw $s2, 0x1c($sp) -/* B63734 800EC594 3C118017 */ lui $s1, %hi(gAudioContext) # $s1, 0x8017 -/* B63738 800EC598 AFBF0024 */ sw $ra, 0x24($sp) -/* B6373C 800EC59C AFB00014 */ sw $s0, 0x14($sp) -/* B63740 800EC5A0 2631F180 */ addiu $s1, %lo(gAudioContext) # addiu $s1, $s1, -0xe80 -/* B63744 800EC5A4 00009025 */ move $s2, $zero -/* B63748 800EC5A8 00004012 */ mflo $t0 -/* B6374C 800EC5AC AC685B84 */ sw $t0, 0x5b84($v1) -/* B63750 800EC5B0 10400010 */ beqz $v0, .L800EC5F4 -/* B63754 800EC5B4 24130001 */ li $s3, 1 -.L800EC5B8: -/* B63758 800EC5B8 8E293530 */ lw $t1, 0x3530($s1) -/* B6375C 800EC5BC 26303530 */ addiu $s0, $s1, 0x3530 -/* B63760 800EC5C0 000957C2 */ srl $t2, $t1, 0x1f -/* B63764 800EC5C4 566A0008 */ bnel $s3, $t2, .L800EC5E8 -/* B63768 800EC5C8 26520001 */ addiu $s2, $s2, 1 -/* B6376C 800EC5CC 0C03AF56 */ jal func_800EBD58 -/* B63770 800EC5D0 02002025 */ move $a0, $s0 -/* B63774 800EC5D4 0C03A2A2 */ jal Audio_SequencePlayerProcessSound -/* B63778 800EC5D8 02002025 */ move $a0, $s0 -/* B6377C 800EC5DC 3C028017 */ lui $v0, %hi(D_801719DC) # $v0, 0x8017 -/* B63780 800EC5E0 844219DC */ lh $v0, %lo(D_801719DC)($v0) -/* B63784 800EC5E4 26520001 */ addiu $s2, $s2, 1 -.L800EC5E8: -/* B63788 800EC5E8 0242082B */ sltu $at, $s2, $v0 -/* B6378C 800EC5EC 1420FFF2 */ bnez $at, .L800EC5B8 -/* B63790 800EC5F0 26310160 */ addiu $s1, $s1, 0x160 -.L800EC5F4: -/* B63794 800EC5F4 0C039BE3 */ jal Audio_ProcessNotes -/* B63798 800EC5F8 00000000 */ nop -/* B6379C 800EC5FC 8FBF0024 */ lw $ra, 0x24($sp) -/* B637A0 800EC600 8FB00014 */ lw $s0, 0x14($sp) -/* B637A4 800EC604 8FB10018 */ lw $s1, 0x18($sp) -/* B637A8 800EC608 8FB2001C */ lw $s2, 0x1c($sp) -/* B637AC 800EC60C 8FB30020 */ lw $s3, 0x20($sp) -/* B637B0 800EC610 03E00008 */ jr $ra -/* B637B4 800EC614 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC618.s b/asm/non_matchings/code/audio_seqplayer/func_800EC618.s deleted file mode 100644 index f285d7530c..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC618.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel func_800EC618 -/* B637B8 800EC618 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B637BC 800EC61C AFBF001C */ sw $ra, 0x1c($sp) -/* B637C0 800EC620 AFB00018 */ sw $s0, 0x18($sp) -/* B637C4 800EC624 8C8E00DC */ lw $t6, 0xdc($a0) -/* B637C8 800EC628 00808025 */ move $s0, $a0 -/* B637CC 800EC62C 59C0000A */ blezl $t6, .L800EC658 -/* B637D0 800EC630 8FBF001C */ lw $ra, 0x1c($sp) -.L800EC634: -/* B637D4 800EC634 0C03AF56 */ jal func_800EBD58 -/* B637D8 800EC638 02002025 */ move $a0, $s0 -/* B637DC 800EC63C 0C03A2A2 */ jal Audio_SequencePlayerProcessSound -/* B637E0 800EC640 02002025 */ move $a0, $s0 -/* B637E4 800EC644 8E0F00DC */ lw $t7, 0xdc($s0) -/* B637E8 800EC648 25F8FFFF */ addiu $t8, $t7, -1 -/* B637EC 800EC64C 1F00FFF9 */ bgtz $t8, .L800EC634 -/* B637F0 800EC650 AE1800DC */ sw $t8, 0xdc($s0) -/* B637F4 800EC654 8FBF001C */ lw $ra, 0x1c($sp) -.L800EC658: -/* B637F8 800EC658 8FB00018 */ lw $s0, 0x18($sp) -/* B637FC 800EC65C 27BD0020 */ addiu $sp, $sp, 0x20 -/* B63800 800EC660 03E00008 */ jr $ra -/* B63804 800EC664 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC668.s b/asm/non_matchings/code/audio_seqplayer/func_800EC668.s deleted file mode 100644 index 92b889a65b..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC668.s +++ /dev/null @@ -1,54 +0,0 @@ -glabel func_800EC668 -/* B63808 800EC668 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B6380C 800EC66C AFBF0024 */ sw $ra, 0x24($sp) -/* B63810 800EC670 AFB20020 */ sw $s2, 0x20($sp) -/* B63814 800EC674 AFB1001C */ sw $s1, 0x1c($sp) -/* B63818 800EC678 AFB00018 */ sw $s0, 0x18($sp) -/* B6381C 800EC67C 0C03A6DB */ jal Audio_SequencePlayerDisable -/* B63820 800EC680 AFA40028 */ sw $a0, 0x28($sp) -/* B63824 800EC684 8FB10028 */ lw $s1, 0x28($sp) -/* B63828 800EC688 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B6382C 800EC68C 44812000 */ mtc1 $at, $f4 -/* B63830 800EC690 44800000 */ mtc1 $zero, $f0 -/* B63834 800EC694 922E0000 */ lbu $t6, ($s1) -/* B63838 800EC698 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* B6383C 800EC69C 44813000 */ mtc1 $at, $f6 -/* B63840 800EC6A0 3C088013 */ lui $t0, %hi(D_8012FAB4) # $t0, 0x8013 -/* B63844 800EC6A4 3C098013 */ lui $t1, %hi(D_8012FAC4) # $t1, 0x8013 -/* B63848 800EC6A8 24180001 */ li $t8, 1 -/* B6384C 800EC6AC 24191680 */ li $t9, 5760 -/* B63850 800EC6B0 2508FAB4 */ addiu $t0, %lo(D_8012FAB4) # addiu $t0, $t0, -0x54c -/* B63854 800EC6B4 2529FAC4 */ addiu $t1, %lo(D_8012FAC4) # addiu $t1, $t1, -0x53c -/* B63858 800EC6B8 31CFFFFD */ andi $t7, $t6, 0xfffd -/* B6385C 800EC6BC 00008025 */ move $s0, $zero -/* B63860 800EC6C0 24120040 */ li $s2, 64 -/* B63864 800EC6C4 A22F0000 */ sb $t7, ($s1) -/* B63868 800EC6C8 A6200010 */ sh $zero, 0x10($s1) -/* B6386C 800EC6CC A2380001 */ sb $t8, 1($s1) -/* B63870 800EC6D0 A6200012 */ sh $zero, 0x12($s1) -/* B63874 800EC6D4 A6200014 */ sh $zero, 0x14($s1) -/* B63878 800EC6D8 A620000A */ sh $zero, 0xa($s1) -/* B6387C 800EC6DC A6390008 */ sh $t9, 8($s1) -/* B63880 800EC6E0 A620000C */ sh $zero, 0xc($s1) -/* B63884 800EC6E4 A620000E */ sh $zero, 0xe($s1) -/* B63888 800EC6E8 A2200002 */ sb $zero, 2($s1) -/* B6388C 800EC6EC AE280094 */ sw $t0, 0x94($s1) -/* B63890 800EC6F0 AE290098 */ sw $t1, 0x98($s1) -/* B63894 800EC6F4 AE2000E0 */ sw $zero, 0xe0($s1) -/* B63898 800EC6F8 E624001C */ swc1 $f4, 0x1c($s1) -/* B6389C 800EC6FC E6200020 */ swc1 $f0, 0x20($s1) -/* B638A0 800EC700 E6200024 */ swc1 $f0, 0x24($s1) -/* B638A4 800EC704 E6260028 */ swc1 $f6, 0x28($s1) -.L800EC708: -/* B638A8 800EC708 0C03A561 */ jal func_800E9584 -/* B638AC 800EC70C 8E240038 */ lw $a0, 0x38($s1) -/* B638B0 800EC710 26100004 */ addiu $s0, $s0, 4 -/* B638B4 800EC714 1612FFFC */ bne $s0, $s2, .L800EC708 -/* B638B8 800EC718 26310004 */ addiu $s1, $s1, 4 -/* B638BC 800EC71C 8FBF0024 */ lw $ra, 0x24($sp) -/* B638C0 800EC720 8FB00018 */ lw $s0, 0x18($sp) -/* B638C4 800EC724 8FB1001C */ lw $s1, 0x1c($sp) -/* B638C8 800EC728 8FB20020 */ lw $s2, 0x20($sp) -/* B638CC 800EC72C 03E00008 */ jr $ra -/* B638D0 800EC730 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC734.s b/asm/non_matchings/code/audio_seqplayer/func_800EC734.s deleted file mode 100644 index 028813fe37..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC734.s +++ /dev/null @@ -1,59 +0,0 @@ -glabel func_800EC734 -/* B638D4 800EC734 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* B638D8 800EC738 00047080 */ sll $t6, $a0, 2 -/* B638DC 800EC73C 01C47023 */ subu $t6, $t6, $a0 -/* B638E0 800EC740 000E7080 */ sll $t6, $t6, 2 -/* B638E4 800EC744 01C47023 */ subu $t6, $t6, $a0 -/* B638E8 800EC748 000E7140 */ sll $t6, $t6, 5 -/* B638EC 800EC74C 3C188017 */ lui $t8, %hi(gAudioContext) # $t8, 0x8017 -/* B638F0 800EC750 AFB40024 */ sw $s4, 0x24($sp) -/* B638F4 800EC754 AFB30020 */ sw $s3, 0x20($sp) -/* B638F8 800EC758 AFB2001C */ sw $s2, 0x1c($sp) -/* B638FC 800EC75C 2718F180 */ addiu $t8, %lo(gAudioContext) # addiu $t8, $t8, -0xe80 -/* B63900 800EC760 25CF3530 */ addiu $t7, $t6, 0x3530 -/* B63904 800EC764 AFB50028 */ sw $s5, 0x28($sp) -/* B63908 800EC768 AFB10018 */ sw $s1, 0x18($sp) -/* B6390C 800EC76C AFB00014 */ sw $s0, 0x14($sp) -/* B63910 800EC770 01F89021 */ addu $s2, $t7, $t8 -/* B63914 800EC774 3C138017 */ lui $s3, %hi(D_80171B40) # $s3, 0x8017 -/* B63918 800EC778 3C148017 */ lui $s4, %hi(D_80174C30) # $s4, 0x8017 -/* B6391C 800EC77C AFBF002C */ sw $ra, 0x2c($sp) -/* B63920 800EC780 26944C30 */ addiu $s4, %lo(D_80174C30) # addiu $s4, $s4, 0x4c30 -/* B63924 800EC784 26731B40 */ addiu $s3, %lo(D_80171B40) # addiu $s3, $s3, 0x1b40 -/* B63928 800EC788 02408025 */ move $s0, $s2 -/* B6392C 800EC78C 00008825 */ move $s1, $zero -/* B63930 800EC790 24150040 */ li $s5, 64 -.L800EC794: -/* B63934 800EC794 02602025 */ move $a0, $s3 -/* B63938 800EC798 0C0378E0 */ jal func_800DE380 -/* B6393C 800EC79C 240500D4 */ li $a1, 212 -/* B63940 800EC7A0 14400003 */ bnez $v0, .L800EC7B0 -/* B63944 800EC7A4 AE020038 */ sw $v0, 0x38($s0) -/* B63948 800EC7A8 1000000A */ b .L800EC7D4 -/* B6394C 800EC7AC AE140038 */ sw $s4, 0x38($s0) -.L800EC7B0: -/* B63950 800EC7B0 8E030038 */ lw $v1, 0x38($s0) -/* B63954 800EC7B4 90790000 */ lbu $t9, ($v1) -/* B63958 800EC7B8 AC72004C */ sw $s2, 0x4c($v1) -/* B6395C 800EC7BC AC600054 */ sw $zero, 0x54($v1) -/* B63960 800EC7C0 3328FF7F */ andi $t0, $t9, 0xff7f -/* B63964 800EC7C4 A0680000 */ sb $t0, ($v1) -/* B63968 800EC7C8 AC600058 */ sw $zero, 0x58($v1) -/* B6396C 800EC7CC AC60005C */ sw $zero, 0x5c($v1) -/* B63970 800EC7D0 AC600050 */ sw $zero, 0x50($v1) -.L800EC7D4: -/* B63974 800EC7D4 0C03A561 */ jal func_800E9584 -/* B63978 800EC7D8 8E040038 */ lw $a0, 0x38($s0) -/* B6397C 800EC7DC 26310004 */ addiu $s1, $s1, 4 -/* B63980 800EC7E0 1635FFEC */ bne $s1, $s5, .L800EC794 -/* B63984 800EC7E4 26100004 */ addiu $s0, $s0, 4 -/* B63988 800EC7E8 8FBF002C */ lw $ra, 0x2c($sp) -/* B6398C 800EC7EC 8FB00014 */ lw $s0, 0x14($sp) -/* B63990 800EC7F0 8FB10018 */ lw $s1, 0x18($sp) -/* B63994 800EC7F4 8FB2001C */ lw $s2, 0x1c($sp) -/* B63998 800EC7F8 8FB30020 */ lw $s3, 0x20($sp) -/* B6399C 800EC7FC 8FB40024 */ lw $s4, 0x24($sp) -/* B639A0 800EC800 8FB50028 */ lw $s5, 0x28($sp) -/* B639A4 800EC804 03E00008 */ jr $ra -/* B639A8 800EC808 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC80C.s b/asm/non_matchings/code/audio_seqplayer/func_800EC80C.s deleted file mode 100644 index 9a5be0ab8f..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC80C.s +++ /dev/null @@ -1,56 +0,0 @@ -glabel func_800EC80C -/* B639AC 800EC80C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B639B0 800EC810 00803025 */ move $a2, $a0 -/* B639B4 800EC814 00801825 */ move $v1, $a0 -/* B639B8 800EC818 3C028017 */ lui $v0, %hi(D_80174C30) # $v0, 0x8017 -/* B639BC 800EC81C AFBF0014 */ sw $ra, 0x14($sp) -/* B639C0 800EC820 24424C30 */ addiu $v0, %lo(D_80174C30) # addiu $v0, $v0, 0x4c30 -/* B639C4 800EC824 24040010 */ li $a0, 16 -/* B639C8 800EC828 00002825 */ move $a1, $zero -.L800EC82C: -/* B639CC 800EC82C 24A50004 */ addiu $a1, $a1, 4 -/* B639D0 800EC830 AC62003C */ sw $v0, 0x3c($v1) -/* B639D4 800EC834 AC620040 */ sw $v0, 0x40($v1) -/* B639D8 800EC838 AC620044 */ sw $v0, 0x44($v1) -/* B639DC 800EC83C 24630010 */ addiu $v1, $v1, 0x10 -/* B639E0 800EC840 14A4FFFA */ bne $a1, $a0, .L800EC82C -/* B639E4 800EC844 AC620028 */ sw $v0, 0x28($v1) -/* B639E8 800EC848 90CE0000 */ lbu $t6, ($a2) -/* B639EC 800EC84C 00002025 */ move $a0, $zero -/* B639F0 800EC850 00C01825 */ move $v1, $a2 -/* B639F4 800EC854 31D8FF7F */ andi $t8, $t6, 0xff7f -/* B639F8 800EC858 330800DF */ andi $t0, $t8, 0xdf -/* B639FC 800EC85C A0D80000 */ sb $t8, ($a2) -/* B63A00 800EC860 310A00F7 */ andi $t2, $t0, 0xf7 -/* B63A04 800EC864 A0C80000 */ sb $t0, ($a2) -/* B63A08 800EC868 314C00EF */ andi $t4, $t2, 0xef -/* B63A0C 800EC86C A0CA0000 */ sb $t2, ($a2) -/* B63A10 800EC870 A0CC0000 */ sb $t4, ($a2) -/* B63A14 800EC874 318D00FE */ andi $t5, $t4, 0xfe -/* B63A18 800EC878 A0CD0000 */ sb $t5, ($a2) -/* B63A1C 800EC87C 24050008 */ li $a1, 8 -/* B63A20 800EC880 2402FFFF */ li $v0, -1 -.L800EC884: -/* B63A24 800EC884 24840004 */ addiu $a0, $a0, 4 -/* B63A28 800EC888 A0620159 */ sb $v0, 0x159($v1) -/* B63A2C 800EC88C A062015A */ sb $v0, 0x15a($v1) -/* B63A30 800EC890 A062015B */ sb $v0, 0x15b($v1) -/* B63A34 800EC894 24630004 */ addiu $v1, $v1, 4 -/* B63A38 800EC898 1485FFFA */ bne $a0, $a1, .L800EC884 -/* B63A3C 800EC89C A0620154 */ sb $v0, 0x154($v1) -/* B63A40 800EC8A0 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B63A44 800EC8A4 44810000 */ mtc1 $at, $f0 -/* B63A48 800EC8A8 240E0060 */ li $t6, 96 -/* B63A4C 800EC8AC A0CE0003 */ sb $t6, 3($a2) -/* B63A50 800EC8B0 E4C0002C */ swc1 $f0, 0x2c($a2) -/* B63A54 800EC8B4 E4C00034 */ swc1 $f0, 0x34($a2) -/* B63A58 800EC8B8 AFA60018 */ sw $a2, 0x18($sp) -/* B63A5C 800EC8BC 0C039F43 */ jal Audio_InitNoteLists -/* B63A60 800EC8C0 24C4009C */ addiu $a0, $a2, 0x9c -/* B63A64 800EC8C4 0C03B19A */ jal func_800EC668 -/* B63A68 800EC8C8 8FA40018 */ lw $a0, 0x18($sp) -/* B63A6C 800EC8CC 8FBF0014 */ lw $ra, 0x14($sp) -/* B63A70 800EC8D0 27BD0018 */ addiu $sp, $sp, 0x18 -/* B63A74 800EC8D4 03E00008 */ jr $ra -/* B63A78 800EC8D8 00000000 */ nop - diff --git a/asm/non_matchings/code/audio_seqplayer/func_800EC8DC.s b/asm/non_matchings/code/audio_seqplayer/func_800EC8DC.s deleted file mode 100644 index 5cc2432525..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/func_800EC8DC.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_800EC8DC -/* B63A7C 800EC8DC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B63A80 800EC8E0 AFBF001C */ sw $ra, 0x1c($sp) -/* B63A84 800EC8E4 AFB10018 */ sw $s1, 0x18($sp) -/* B63A88 800EC8E8 0C03A72A */ jal func_800E9CA8 -/* B63A8C 800EC8EC AFB00014 */ sw $s0, 0x14($sp) -/* B63A90 800EC8F0 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B63A94 800EC8F4 3C038017 */ lui $v1, %hi(D_80171180) # $v1, 0x8017 -/* B63A98 800EC8F8 24631180 */ addiu $v1, %lo(D_80171180) # addiu $v1, $v1, 0x1180 -/* B63A9C 800EC8FC 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 -.L800EC900: -/* B63AA0 800EC900 904E3AB0 */ lbu $t6, 0x3ab0($v0) -/* B63AA4 800EC904 24420080 */ addiu $v0, $v0, 0x80 -/* B63AA8 800EC908 0043082B */ sltu $at, $v0, $v1 -/* B63AAC 800EC90C 31CFFF7F */ andi $t7, $t6, 0xff7f -/* B63AB0 800EC910 AC403A80 */ sw $zero, 0x3a80($v0) -/* B63AB4 800EC914 1420FFFA */ bnez $at, .L800EC900 -/* B63AB8 800EC918 A04F3A30 */ sb $t7, 0x3a30($v0) -/* B63ABC 800EC91C 3C108017 */ lui $s0, %hi(D_801726B0) # $s0, 0x8017 -/* B63AC0 800EC920 3C118017 */ lui $s1, %hi(D_80172C30) # $s1, 0x8017 -/* B63AC4 800EC924 26312C30 */ addiu $s1, %lo(D_80172C30) # addiu $s1, $s1, 0x2c30 -/* B63AC8 800EC928 261026B0 */ addiu $s0, %lo(D_801726B0) # addiu $s0, $s0, 0x26b0 -.L800EC92C: -/* B63ACC 800EC92C 0C03B203 */ jal func_800EC80C -/* B63AD0 800EC930 02002025 */ move $a0, $s0 -/* B63AD4 800EC934 26100160 */ addiu $s0, $s0, 0x160 -/* B63AD8 800EC938 1611FFFC */ bne $s0, $s1, .L800EC92C -/* B63ADC 800EC93C 00000000 */ nop -/* B63AE0 800EC940 8FBF001C */ lw $ra, 0x1c($sp) -/* B63AE4 800EC944 8FB00014 */ lw $s0, 0x14($sp) -/* B63AE8 800EC948 8FB10018 */ lw $s1, 0x18($sp) -/* B63AEC 800EC94C 03E00008 */ jr $ra -/* B63AF0 800EC950 27BD0020 */ addiu $sp, $sp, 0x20 \ No newline at end of file diff --git a/asm/non_matchings/code/code_800DACC0/func_800DB0C4.s b/asm/non_matchings/code/code_800DACC0/func_800DB0C4.s index d44b67a2d6..fae0c22fbb 100644 --- a/asm/non_matchings/code/code_800DACC0/func_800DB0C4.s +++ b/asm/non_matchings/code/code_800DACC0/func_800DB0C4.s @@ -21,7 +21,7 @@ glabel func_800DB0C4 /* B522B0 800DB110 0080F025 */ move $fp, $a0 .L800DB114: /* B522B4 800DB114 2690FFFF */ addiu $s0, $s4, -1 -/* B522B8 800DB118 0C03B159 */ jal func_800EC564 +/* B522B8 800DB118 0C03B159 */ jal Audio_ProcessSequences /* B522BC 800DB11C 02002025 */ move $a0, $s0 /* B522C0 800DB120 86AE2854 */ lh $t6, 0x2854($s5) /* B522C4 800DB124 0C036C0F */ jal func_800DB03C diff --git a/asm/non_matchings/code/code_800DACC0/func_800DC910.s b/asm/non_matchings/code/code_800DACC0/func_800DC910.s index 4f2116f253..3ad2f7f00e 100644 --- a/asm/non_matchings/code/code_800DACC0/func_800DC910.s +++ b/asm/non_matchings/code/code_800DACC0/func_800DC910.s @@ -24,9 +24,9 @@ glabel func_800DC910 /* B53AE0 800DC940 AFA7016C */ sw $a3, 0x16c($sp) /* B53AE4 800DC944 8CA30000 */ lw $v1, ($a1) /* B53AE8 800DC948 0004C8C0 */ sll $t9, $a0, 3 -/* B53AEC 800DC94C 3C0C8017 */ lui $t4, %hi(D_801726AC) # $t4, 0x8017 +/* B53AEC 800DC94C 3C0C8017 */ lui $t4, %hi(gAudioContext+0x352c) # $t4, 0x8017 /* B53AF0 800DC950 000372C0 */ sll $t6, $v1, 0xb -/* B53AF4 800DC954 8D8C26AC */ lw $t4, %lo(D_801726AC)($t4) +/* B53AF4 800DC954 8D8C26AC */ lw $t4, %lo(gAudioContext+0x352c)($t4) /* B53AF8 800DC958 000E7F82 */ srl $t7, $t6, 0x1e /* B53AFC 800DC95C 0324C823 */ subu $t9, $t9, $a0 /* B53B00 800DC960 00036840 */ sll $t5, $v1, 1 @@ -157,8 +157,8 @@ glabel func_800DC910 /* B53CDC 800DCB3C 00000000 */ nop .L800DCB40: /* B53CE0 800DCB40 8FAE0150 */ lw $t6, 0x150($sp) -/* B53CE4 800DCB44 3C188017 */ lui $t8, %hi(D_8016F190) # $t8, 0x8017 -/* B53CE8 800DCB48 8F18F190 */ lw $t8, %lo(D_8016F190)($t8) +/* B53CE4 800DCB44 3C188017 */ lui $t8, %hi(gAudioContext+0x10) # $t8, 0x8017 +/* B53CE8 800DCB48 8F18F190 */ lw $t8, %lo(gAudioContext+0x10)($t8) /* B53CEC 800DCB4C 8DC2000C */ lw $v0, 0xc($t6) /* B53CF0 800DCB50 8FAF008C */ lw $t7, 0x8c($sp) /* B53CF4 800DCB54 24010001 */ li $at, 1 @@ -176,19 +176,19 @@ glabel func_800DC910 /* B53D24 800DCB84 00000000 */ nop .L800DCB88: /* B53D28 800DCB88 258CFBAA */ addiu $t4, %lo(D_8012FBAA) # addiu $t4, $t4, -0x456 -/* B53D2C 800DCB8C 3C018017 */ lui $at, %hi(D_8016F190) # $at, 0x8017 +/* B53D2C 800DCB8C 3C018017 */ lui $at, %hi(gAudioContext+0x10) # $at, 0x8017 /* B53D30 800DCB90 10000003 */ b .L800DCBA0 -/* B53D34 800DCB94 AC2CF190 */ sw $t4, %lo(D_8016F190)($at) +/* B53D34 800DCB94 AC2CF190 */ sw $t4, %lo(gAudioContext+0x10)($at) .L800DCB98: -/* B53D38 800DCB98 3C018017 */ lui $at, %hi(D_8016F190) # $at, 0x8017 -/* B53D3C 800DCB9C AC22F190 */ sw $v0, %lo(D_8016F190)($at) +/* B53D38 800DCB98 3C018017 */ lui $at, %hi(gAudioContext+0x10) # $at, 0x8017 +/* B53D3C 800DCB9C AC22F190 */ sw $v0, %lo(gAudioContext+0x10)($at) .L800DCBA0: /* B53D40 800DCBA0 8FB90150 */ lw $t9, 0x150($sp) /* B53D44 800DCBA4 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff /* B53D48 800DCBA8 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff /* B53D4C 800DCBAC 8F22000C */ lw $v0, 0xc($t9) /* B53D50 800DCBB0 02401825 */ move $v1, $s2 -/* B53D54 800DCBB4 3C198017 */ lui $t9, %hi(D_8016F190) # $t9, 0x8017 +/* B53D54 800DCBB4 3C198017 */ lui $t9, %hi(gAudioContext+0x10) # $t9, 0x8017 /* B53D58 800DCBB8 8C4D0000 */ lw $t5, ($v0) /* B53D5C 800DCBBC 8C580004 */ lw $t8, 4($v0) /* B53D60 800DCBC0 26520008 */ addiu $s2, $s2, 8 @@ -199,7 +199,7 @@ glabel func_800DC910 /* B53D74 800DCBD4 3C010B00 */ lui $at, 0xb00 /* B53D78 800DCBD8 01E16025 */ or $t4, $t7, $at /* B53D7C 800DCBDC AC6C0000 */ sw $t4, ($v1) -/* B53D80 800DCBE0 8F39F190 */ lw $t9, %lo(D_8016F190)($t9) +/* B53D80 800DCBE0 8F39F190 */ lw $t9, %lo(gAudioContext+0x10)($t9) /* B53D84 800DCBE4 AC790004 */ sw $t9, 4($v1) /* B53D88 800DCBE8 8FA300C0 */ lw $v1, 0xc0($sp) .L800DCBEC: diff --git a/asm/non_matchings/code/code_800E11F0/func_800E18B0.s b/asm/non_matchings/code/code_800E11F0/Audio_IsBankLoadComplete.s similarity index 80% rename from asm/non_matchings/code/code_800E11F0/func_800E18B0.s rename to asm/non_matchings/code/code_800E11F0/Audio_IsBankLoadComplete.s index 26b00a3496..286d4532b2 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E18B0.s +++ b/asm/non_matchings/code/code_800E11F0/Audio_IsBankLoadComplete.s @@ -1,4 +1,4 @@ -glabel func_800E18B0 +glabel Audio_IsBankLoadComplete /* B58A50 800E18B0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B58A54 800E18B4 240100FF */ li $at, 255 /* B58A58 800E18B8 AFBF0014 */ sw $ra, 0x14($sp) @@ -7,9 +7,9 @@ glabel func_800E18B0 /* B58A64 800E18C4 10000014 */ b .L800E1918 /* B58A68 800E18C8 24020001 */ li $v0, 1 .L800E18CC: -/* B58A6C 800E18CC 3C0E8017 */ lui $t6, %hi(D_801725E8) +/* B58A6C 800E18CC 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3468) /* B58A70 800E18D0 01C57021 */ addu $t6, $t6, $a1 -/* B58A74 800E18D4 91CE25E8 */ lbu $t6, %lo(D_801725E8)($t6) +/* B58A74 800E18D4 91CE25E8 */ lbu $t6, %lo(gAudioContext+0x3468)($t6) /* B58A78 800E18D8 29C10002 */ slti $at, $t6, 2 /* B58A7C 800E18DC 14200003 */ bnez $at, .L800E18EC /* B58A80 800E18E0 00000000 */ nop @@ -18,9 +18,9 @@ glabel func_800E18B0 .L800E18EC: /* B58A8C 800E18EC 0C0389DA */ jal func_800E2768 /* B58A90 800E18F0 24040001 */ li $a0, 1 -/* B58A94 800E18F4 3C0F8017 */ lui $t7, %hi(D_801725E8) +/* B58A94 800E18F4 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3468) /* B58A98 800E18F8 01E27821 */ addu $t7, $t7, $v0 -/* B58A9C 800E18FC 91EF25E8 */ lbu $t7, %lo(D_801725E8)($t7) +/* B58A9C 800E18FC 91EF25E8 */ lbu $t7, %lo(gAudioContext+0x3468)($t7) /* B58AA0 800E1900 00001025 */ move $v0, $zero /* B58AA4 800E1904 29E10002 */ slti $at, $t7, 2 /* B58AA8 800E1908 14200003 */ bnez $at, .L800E1918 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1928.s b/asm/non_matchings/code/code_800E11F0/Audio_IsSeqLoadComplete.s similarity index 80% rename from asm/non_matchings/code/code_800E11F0/func_800E1928.s rename to asm/non_matchings/code/code_800E11F0/Audio_IsSeqLoadComplete.s index cf1a334349..7fe2fd19ee 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1928.s +++ b/asm/non_matchings/code/code_800E11F0/Audio_IsSeqLoadComplete.s @@ -1,4 +1,4 @@ -glabel func_800E1928 +glabel Audio_IsSeqLoadComplete /* B58AC8 800E1928 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B58ACC 800E192C 240100FF */ li $at, 255 /* B58AD0 800E1930 AFBF0014 */ sw $ra, 0x14($sp) @@ -7,9 +7,9 @@ glabel func_800E1928 /* B58ADC 800E193C 10000014 */ b .L800E1990 /* B58AE0 800E1940 24020001 */ li $v0, 1 .L800E1944: -/* B58AE4 800E1944 3C0E8017 */ lui $t6, %hi(D_80172618) +/* B58AE4 800E1944 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3498) /* B58AE8 800E1948 01C57021 */ addu $t6, $t6, $a1 -/* B58AEC 800E194C 91CE2618 */ lbu $t6, %lo(D_80172618)($t6) +/* B58AEC 800E194C 91CE2618 */ lbu $t6, %lo(gAudioContext+0x3498)($t6) /* B58AF0 800E1950 29C10002 */ slti $at, $t6, 2 /* B58AF4 800E1954 14200003 */ bnez $at, .L800E1964 /* B58AF8 800E1958 00000000 */ nop @@ -18,9 +18,9 @@ glabel func_800E1928 .L800E1964: /* B58B04 800E1964 0C0389DA */ jal func_800E2768 /* B58B08 800E1968 00002025 */ move $a0, $zero -/* B58B0C 800E196C 3C0F8017 */ lui $t7, %hi(D_80172618) +/* B58B0C 800E196C 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3498) /* B58B10 800E1970 01E27821 */ addu $t7, $t7, $v0 -/* B58B14 800E1974 91EF2618 */ lbu $t7, %lo(D_80172618)($t7) +/* B58B14 800E1974 91EF2618 */ lbu $t7, %lo(gAudioContext+0x3498)($t7) /* B58B18 800E1978 00001025 */ move $v0, $zero /* B58B1C 800E197C 29E10002 */ slti $at, $t7, 2 /* B58B20 800E1980 14200003 */ bnez $at, .L800E1990 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1A18.s b/asm/non_matchings/code/code_800E11F0/Audio_SetBankLoadStatus.s similarity index 95% rename from asm/non_matchings/code/code_800E11F0/func_800E1A18.s rename to asm/non_matchings/code/code_800E11F0/Audio_SetBankLoadStatus.s index 38ac287c35..25cd9f239d 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1A18.s +++ b/asm/non_matchings/code/code_800E11F0/Audio_SetBankLoadStatus.s @@ -1,4 +1,4 @@ -glabel func_800E1A18 +glabel Audio_SetBankLoadStatus /* B58BB8 800E1A18 240100FF */ li $at, 255 /* B58BBC 800E1A1C 10810008 */ beq $a0, $at, .L800E1A40 /* B58BC0 800E1A20 3C0E8017 */ lui $t6, %hi(gAudioContext) # $t6, 0x8017 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1A48.s b/asm/non_matchings/code/code_800E11F0/Audio_SetSeqLoadStatus.s similarity index 95% rename from asm/non_matchings/code/code_800E11F0/func_800E1A48.s rename to asm/non_matchings/code/code_800E11F0/Audio_SetSeqLoadStatus.s index 33d233f69a..237202276a 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1A48.s +++ b/asm/non_matchings/code/code_800E11F0/Audio_SetSeqLoadStatus.s @@ -1,4 +1,4 @@ -glabel func_800E1A48 +glabel Audio_SetSeqLoadStatus /* B58BE8 800E1A48 240100FF */ li $at, 255 /* B58BEC 800E1A4C 10810008 */ beq $a0, $at, .L800E1A70 /* B58BF0 800E1A50 3C0E8017 */ lui $t6, %hi(gAudioContext) # $t6, 0x8017 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E12DC.s b/asm/non_matchings/code/code_800E11F0/func_800E12DC.s index fc933ae708..860a4e5ed5 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E12DC.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E12DC.s @@ -191,10 +191,10 @@ glabel func_800E12DC /* B58730 800E1590 0003C080 */ sll $t8, $v1, 2 /* B58734 800E1594 0303C023 */ subu $t8, $t8, $v1 /* B58738 800E1598 0018C0C0 */ sll $t8, $t8, 3 -/* B5873C 800E159C 3C0C8017 */ lui $t4, %hi(D_80171050) # $t4, 0x8017 +/* B5873C 800E159C 3C0C8017 */ lui $t4, %hi(gAudioContext+0x1ed0) # $t4, 0x8017 /* B58740 800E15A0 3C0F8015 */ lui $t7, %hi(D_80149420) # $t7, 0x8015 /* B58744 800E15A4 25EF9420 */ addiu $t7, %lo(D_80149420) # addiu $t7, $t7, -0x6be0 -/* B58748 800E15A8 258C1050 */ addiu $t4, %lo(D_80171050) # addiu $t4, $t4, 0x1050 +/* B58748 800E15A8 258C1050 */ addiu $t4, %lo(gAudioContext+0x1ed0) # addiu $t4, $t4, 0x1050 /* B5874C 800E15AC 01382021 */ addu $a0, $t1, $t8 /* B58750 800E15B0 246D0001 */ addiu $t5, $v1, 1 /* B58754 800E15B4 AD2D28A0 */ sw $t5, 0x28a0($t1) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1618.s b/asm/non_matchings/code/code_800E11F0/func_800E1618.s index 3a98c30bbd..b035fa27ee 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1618.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E1618.s @@ -9,8 +9,8 @@ glabel func_800E1618 /* B587D4 800E1634 0018C980 */ sll $t9, $t8, 6 /* B587D8 800E1638 03280019 */ multu $t9, $t0 /* B587DC 800E163C 8E4E2874 */ lw $t6, 0x2874($s2) -/* B587E0 800E1640 3C148017 */ lui $s4, %hi(D_80171B40) # $s4, 0x8017 -/* B587E4 800E1644 26941B40 */ addiu $s4, %lo(D_80171B40) # addiu $s4, $s4, 0x1b40 +/* B587E0 800E1640 3C148017 */ lui $s4, %hi(gAudioContext+0x29c0) # $s4, 0x8017 +/* B587E4 800E1644 26941B40 */ addiu $s4, %lo(gAudioContext+0x29c0) # addiu $s4, $s4, 0x1b40 /* B587E8 800E1648 AFBF002C */ sw $ra, 0x2c($sp) /* B587EC 800E164C AFA40030 */ sw $a0, 0x30($sp) /* B587F0 800E1650 AFB30024 */ sw $s3, 0x24($sp) @@ -19,7 +19,7 @@ glabel func_800E1618 /* B587FC 800E165C 02802025 */ move $a0, $s4 /* B58800 800E1660 00002812 */ mflo $a1 /* B58804 800E1664 AE4E288C */ sw $t6, 0x288c($s2) -/* B58808 800E1668 0C0378F7 */ jal func_800DE3DC +/* B58808 800E1668 0C0378F7 */ jal Audio_Alloc /* B5880C 800E166C 00000000 */ nop /* B58810 800E1670 8E492894 */ lw $t1, 0x2894($s2) /* B58814 800E1674 864B2848 */ lh $t3, 0x2848($s2) @@ -82,8 +82,8 @@ glabel func_800E1618 /* B588E0 800E1740 28810100 */ slti $at, $a0, 0x100 /* B588E4 800E1744 10200009 */ beqz $at, .L800E176C /* B588E8 800E1748 00808825 */ move $s1, $a0 -/* B588EC 800E174C 3C038017 */ lui $v1, %hi(D_8016F280) # $v1, 0x8017 -/* B588F0 800E1750 2463F280 */ addiu $v1, %lo(D_8016F280) # addiu $v1, $v1, -0xd80 +/* B588EC 800E174C 3C038017 */ lui $v1, %hi(gAudioContext+0x100) # $v1, 0x8017 +/* B588F0 800E1750 2463F280 */ addiu $v1, %lo(gAudioContext+0x100) # addiu $v1, $v1, -0xd80 /* B588F4 800E1754 02511021 */ addu $v0, $s2, $s1 .L800E1758: /* B588F8 800E1758 24420001 */ addiu $v0, $v0, 1 @@ -157,8 +157,8 @@ glabel func_800E1618 /* B589F0 800E1850 28810100 */ slti $at, $a0, 0x100 /* B589F4 800E1854 1020000A */ beqz $at, .L800E1880 /* B589F8 800E1858 00808825 */ move $s1, $a0 -/* B589FC 800E185C 3C038017 */ lui $v1, %hi(D_8016F280) # $v1, 0x8017 -/* B58A00 800E1860 2463F280 */ addiu $v1, %lo(D_8016F280) # addiu $v1, $v1, -0xd80 +/* B589FC 800E185C 3C038017 */ lui $v1, %hi(gAudioContext+0x100) # $v1, 0x8017 +/* B58A00 800E1860 2463F280 */ addiu $v1, %lo(gAudioContext+0x100) # addiu $v1, $v1, -0xd80 /* B58A04 800E1864 02511021 */ addu $v0, $s2, $s1 .L800E1868: /* B58A08 800E1868 8E582624 */ lw $t8, 0x2624($s2) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E19A0.s b/asm/non_matchings/code/code_800E11F0/func_800E19A0.s index 1ae602f54c..f752d00eca 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E19A0.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E19A0.s @@ -7,9 +7,9 @@ glabel func_800E19A0 /* B58B54 800E19B4 10000014 */ b .L800E1A08 /* B58B58 800E19B8 24020001 */ li $v0, 1 .L800E19BC: -/* B58B5C 800E19BC 3C0E8017 */ lui $t6, %hi(D_801725B8) +/* B58B5C 800E19BC 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3438) /* B58B60 800E19C0 01C57021 */ addu $t6, $t6, $a1 -/* B58B64 800E19C4 91CE25B8 */ lbu $t6, %lo(D_801725B8)($t6) +/* B58B64 800E19C4 91CE25B8 */ lbu $t6, %lo(gAudioContext+0x3438)($t6) /* B58B68 800E19C8 29C10002 */ slti $at, $t6, 2 /* B58B6C 800E19CC 14200003 */ bnez $at, .L800E19DC /* B58B70 800E19D0 00000000 */ nop @@ -18,9 +18,9 @@ glabel func_800E19A0 .L800E19DC: /* B58B7C 800E19DC 0C0389DA */ jal func_800E2768 /* B58B80 800E19E0 24040002 */ li $a0, 2 -/* B58B84 800E19E4 3C0F8017 */ lui $t7, %hi(D_801725B8) +/* B58B84 800E19E4 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3438) /* B58B88 800E19E8 01E27821 */ addu $t7, $t7, $v0 -/* B58B8C 800E19EC 91EF25B8 */ lbu $t7, %lo(D_801725B8)($t7) +/* B58B8C 800E19EC 91EF25B8 */ lbu $t7, %lo(gAudioContext+0x3438)($t7) /* B58B90 800E19F0 00001025 */ move $v0, $zero /* B58B94 800E19F4 29E10002 */ slti $at, $t7, 2 /* B58B98 800E19F8 14200003 */ bnez $at, .L800E1A08 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1C18.s b/asm/non_matchings/code/code_800E11F0/func_800E1C18.s index e379cb56a4..498c5f278c 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1C18.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E1C18.s @@ -1,6 +1,6 @@ glabel func_800E1C18 -/* B58DB8 800E1C18 3C0E8017 */ lui $t6, %hi(D_801719C0) # $t6, 0x8017 -/* B58DBC 800E1C1C 95CE19C0 */ lhu $t6, %lo(D_801719C0)($t6) +/* B58DB8 800E1C18 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2840) # $t6, 0x8017 +/* B58DBC 800E1C1C 95CE19C0 */ lhu $t6, %lo(gAudioContext+0x2840)($t6) /* B58DC0 800E1C20 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B58DC4 800E1C24 AFBF0014 */ sw $ra, 0x14($sp) /* B58DC8 800E1C28 008E082A */ slt $at, $a0, $t6 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1C78.s b/asm/non_matchings/code/code_800E11F0/func_800E1C78.s index b4f0474ea3..0e3114fd4e 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1C78.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E1C78.s @@ -28,12 +28,12 @@ glabel func_800E1C78 .L800E1CE0: /* B58E80 800E1CE0 8E020000 */ lw $v0, ($s0) /* B58E84 800E1CE4 24010001 */ li $at, 1 -/* B58E88 800E1CE8 3C198017 */ lui $t9, %hi(D_801719B8) # $t9, 0x8017 +/* B58E88 800E1CE8 3C198017 */ lui $t9, %hi(gAudioContext+0x2838) # $t9, 0x8017 /* B58E8C 800E1CEC 00021900 */ sll $v1, $v0, 4 /* B58E90 800E1CF0 00031F82 */ srl $v1, $v1, 0x1e /* B58E94 800E1CF4 1461000B */ bne $v1, $at, .L800E1D24 /* B58E98 800E1CF8 00603825 */ move $a3, $v1 -/* B58E9C 800E1CFC 8F3919B8 */ lw $t9, %lo(D_801719B8)($t9) +/* B58E9C 800E1CFC 8F3919B8 */ lw $t9, %lo(gAudioContext+0x2838)($t9) /* B58EA0 800E1D00 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff /* B58EA4 800E1D04 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff /* B58EA8 800E1D08 8E040004 */ lw $a0, 4($s0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E1F7C.s b/asm/non_matchings/code/code_800E11F0/func_800E1F7C.s index ea8f41cdcb..97271bf264 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E1F7C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E1F7C.s @@ -33,7 +33,7 @@ glabel func_800E1F7C /* B59194 800E1FF4 0C03880B */ jal func_800E202C /* B59198 800E1FF8 02002025 */ move $a0, $s0 /* B5919C 800E1FFC 02002025 */ move $a0, $s0 -/* B591A0 800E2000 0C038686 */ jal func_800E1A18 +/* B591A0 800E2000 0C038686 */ jal Audio_SetBankLoadStatus /* B591A4 800E2004 00002825 */ move $a1, $zero .L800E2008: /* B591A8 800E2008 5E40FFEE */ bgtzl $s2, .L800E1FC4 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E202C.s b/asm/non_matchings/code/code_800E11F0/func_800E202C.s index f12e334f17..7b9e9928b7 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E202C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E202C.s @@ -1,27 +1,27 @@ glabel func_800E202C -/* B591CC 800E202C 3C0E8017 */ lui $t6, %hi(D_80171DA2) # $t6, 0x8017 -/* B591D0 800E2030 85CE1DA2 */ lh $t6, %lo(D_80171DA2)($t6) +/* B591CC 800E202C 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2c22) # $t6, 0x8017 +/* B591D0 800E2030 85CE1DA2 */ lh $t6, %lo(gAudioContext+0x2c22)($t6) /* B591D4 800E2034 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B591D8 800E2038 AFBF0014 */ sw $ra, 0x14($sp) /* B591DC 800E203C 148E0005 */ bne $a0, $t6, .L800E2054 /* B591E0 800E2040 00803025 */ move $a2, $a0 /* B591E4 800E2044 240FFFFF */ li $t7, -1 -/* B591E8 800E2048 3C018017 */ lui $at, %hi(D_80171DA2) # $at, 0x8017 +/* B591E8 800E2048 3C018017 */ lui $at, %hi(gAudioContext+0x2c22) # $at, 0x8017 /* B591EC 800E204C 10000008 */ b .L800E2070 -/* B591F0 800E2050 A42F1DA2 */ sh $t7, %lo(D_80171DA2)($at) +/* B591F0 800E2050 A42F1DA2 */ sh $t7, %lo(gAudioContext+0x2c22)($at) .L800E2054: -/* B591F4 800E2054 3C188017 */ lui $t8, %hi(D_80171DAE) # $t8, 0x8017 -/* B591F8 800E2058 87181DAE */ lh $t8, %lo(D_80171DAE)($t8) +/* B591F4 800E2054 3C188017 */ lui $t8, %hi(gAudioContext+0x2c2e) # $t8, 0x8017 +/* B591F8 800E2058 87181DAE */ lh $t8, %lo(gAudioContext+0x2c2e)($t8) /* B591FC 800E205C 2419FFFF */ li $t9, -1 -/* B59200 800E2060 3C018017 */ lui $at, %hi(D_80171DAE) # $at, 0x8017 +/* B59200 800E2060 3C018017 */ lui $at, %hi(gAudioContext+0x2c2e) # $at, 0x8017 /* B59204 800E2064 14D80002 */ bne $a2, $t8, .L800E2070 /* B59208 800E2068 00000000 */ nop -/* B5920C 800E206C A4391DAE */ sh $t9, %lo(D_80171DAE)($at) +/* B5920C 800E206C A4391DAE */ sh $t9, %lo(gAudioContext+0x2c2e)($at) .L800E2070: -/* B59210 800E2070 3C098017 */ lui $t1, %hi(D_80171CB0) # $t1, 0x8017 -/* B59214 800E2074 8D291CB0 */ lw $t1, %lo(D_80171CB0)($t1) -/* B59218 800E2078 3C088017 */ lui $t0, %hi(D_80171CB0) # $t0, 0x8017 -/* B5921C 800E207C 25081CB0 */ addiu $t0, %lo(D_80171CB0) # addiu $t0, $t0, 0x1cb0 +/* B59210 800E2070 3C098017 */ lui $t1, %hi(gAudioContext+0x2b30) # $t1, 0x8017 +/* B59214 800E2074 8D291CB0 */ lw $t1, %lo(gAudioContext+0x2b30)($t1) +/* B59218 800E2078 3C088017 */ lui $t0, %hi(gAudioContext+0x2b30) # $t0, 0x8017 +/* B5921C 800E207C 25081CB0 */ addiu $t0, %lo(gAudioContext+0x2b30) # addiu $t0, $t0, 0x1cb0 /* B59220 800E2080 01002025 */ move $a0, $t0 /* B59224 800E2084 1120000D */ beqz $t1, .L800E20BC /* B59228 800E2088 00001825 */ move $v1, $zero diff --git a/asm/non_matchings/code/code_800E11F0/func_800E217C.s b/asm/non_matchings/code/code_800E11F0/func_800E217C.s index a4785bf954..ed07db5896 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E217C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E217C.s @@ -56,7 +56,7 @@ glabel func_800E217C /* B593E8 800E2248 10000016 */ b .L800E22A4 /* B593EC 800E224C 00001025 */ move $v0, $zero .L800E2250: -/* B593F0 800E2250 0C03B19A */ jal func_800EC668 +/* B593F0 800E2250 0C03B19A */ jal Audio_ResetSequencePlayer /* B593F4 800E2254 02802025 */ move $a0, $s4 /* B593F8 800E2258 8FAE0034 */ lw $t6, 0x34($sp) /* B593FC 800E225C 24040001 */ li $a0, 1 @@ -75,7 +75,7 @@ glabel func_800E217C /* B59430 800E2290 A2890000 */ sb $t1, ($s4) /* B59434 800E2294 8FAA0030 */ lw $t2, 0x30($sp) /* B59438 800E2298 02802025 */ move $a0, $s4 -/* B5943C 800E229C 0C03B186 */ jal func_800EC618 +/* B5943C 800E229C 0C03B186 */ jal Audio_ProcessSequence /* B59440 800E22A0 A28A0007 */ sb $t2, 7($s4) .L800E22A4: /* B59444 800E22A4 8FBF002C */ lw $ra, 0x2c($sp) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E22C4.s b/asm/non_matchings/code/code_800E11F0/func_800E22C4.s index 02175f7e2e..b91f56cb1a 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E22C4.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E22C4.s @@ -5,9 +5,9 @@ glabel func_800E22C4 /* B59470 800E22D0 8FA50028 */ lw $a1, 0x28($sp) /* B59474 800E22D4 0C0389DA */ jal func_800E2768 /* B59478 800E22D8 00002025 */ move $a0, $zero -/* B5947C 800E22DC 3C0E8017 */ lui $t6, %hi(D_80172618) +/* B5947C 800E22DC 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3498) /* B59480 800E22E0 01C27021 */ addu $t6, $t6, $v0 -/* B59484 800E22E4 91CE2618 */ lbu $t6, %lo(D_80172618)($t6) +/* B59484 800E22E4 91CE2618 */ lbu $t6, %lo(gAudioContext+0x3498)($t6) /* B59488 800E22E8 24010001 */ li $at, 1 /* B5948C 800E22EC 00002025 */ move $a0, $zero /* B59490 800E22F0 15C10003 */ bne $t6, $at, .L800E2300 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E2338.s b/asm/non_matchings/code/code_800E11F0/func_800E2338.s index f035e78192..c818a133ed 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E2338.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E2338.s @@ -18,9 +18,9 @@ glabel func_800E2338 /* B59518 800E2378 8FA30030 */ lw $v1, 0x30($sp) /* B5951C 800E237C 1040000F */ beqz $v0, .L800E23BC /* B59520 800E2380 00403025 */ move $a2, $v0 -/* B59524 800E2384 3C0E8017 */ lui $t6, %hi(D_801725B8) +/* B59524 800E2384 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3438) /* B59528 800E2388 01D07021 */ addu $t6, $t6, $s0 -/* B5952C 800E238C 91CE25B8 */ lbu $t6, %lo(D_801725B8)($t6) +/* B5952C 800E238C 91CE25B8 */ lbu $t6, %lo(gAudioContext+0x3438)($t6) /* B59530 800E2390 24010001 */ li $at, 1 /* B59534 800E2394 02002025 */ move $a0, $s0 /* B59538 800E2398 11C10004 */ beq $t6, $at, .L800E23AC diff --git a/asm/non_matchings/code/code_800E11F0/func_800E2558.s b/asm/non_matchings/code/code_800E11F0/func_800E2558.s index 547476fad4..420aed9751 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E2558.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E2558.s @@ -59,7 +59,7 @@ glabel L800E2630 /* B597D0 800E2630 8FA40050 */ lw $a0, 0x50($sp) /* B597D4 800E2634 8FA5004C */ lw $a1, 0x4c($sp) /* B597D8 800E2638 24060001 */ li $a2, 1 -/* B597DC 800E263C 0C037A38 */ jal func_800DE8E0 +/* B597DC 800E263C 0C037A38 */ jal Audio_AllocBankOrSeq /* B597E0 800E2640 8FA7002C */ lw $a3, 0x2c($sp) /* B597E4 800E2644 14400015 */ bnez $v0, .L800E269C /* B597E8 800E2648 00408025 */ move $s0, $v0 @@ -69,7 +69,7 @@ glabel L800E2654 /* B597F4 800E2654 8FA40050 */ lw $a0, 0x50($sp) /* B597F8 800E2658 8FA5004C */ lw $a1, 0x4c($sp) /* B597FC 800E265C 00003025 */ move $a2, $zero -/* B59800 800E2660 0C037A38 */ jal func_800DE8E0 +/* B59800 800E2660 0C037A38 */ jal Audio_AllocBankOrSeq /* B59804 800E2664 8FA7002C */ lw $a3, 0x2c($sp) /* B59808 800E2668 1440000C */ bnez $v0, .L800E269C /* B5980C 800E266C 00408025 */ move $s0, $v0 @@ -79,7 +79,7 @@ glabel L800E2678 /* B59818 800E2678 8FA40050 */ lw $a0, 0x50($sp) /* B5981C 800E267C 8FA5004C */ lw $a1, 0x4c($sp) /* B59820 800E2680 24060002 */ li $a2, 2 -/* B59824 800E2684 0C037A38 */ jal func_800DE8E0 +/* B59824 800E2684 0C037A38 */ jal Audio_AllocBankOrSeq /* B59828 800E2688 8FA7002C */ lw $a3, 0x2c($sp) /* B5982C 800E268C 14400003 */ bnez $v0, .L800E269C /* B59830 800E2690 00408025 */ move $s0, $v0 @@ -125,12 +125,12 @@ glabel L800E2678 /* B598C0 800E2720 1000000C */ b .L800E2754 /* B598C4 800E2724 02001025 */ move $v0, $s0 .L800E2728: -/* B598C8 800E2728 0C038692 */ jal func_800E1A48 +/* B598C8 800E2728 0C038692 */ jal Audio_SetSeqLoadStatus /* B598CC 800E272C 8FA4002C */ lw $a0, 0x2c($sp) /* B598D0 800E2730 10000008 */ b .L800E2754 /* B598D4 800E2734 02001025 */ move $v0, $s0 .L800E2738: -/* B598D8 800E2738 0C038686 */ jal func_800E1A18 +/* B598D8 800E2738 0C038686 */ jal Audio_SetBankLoadStatus /* B598DC 800E273C 8FA4002C */ lw $a0, 0x2c($sp) /* B598E0 800E2740 10000004 */ b .L800E2754 /* B598E4 800E2744 02001025 */ move $v0, $s0 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E27F8.s b/asm/non_matchings/code/code_800E11F0/func_800E27F8.s index 368c50cd60..c14c692c17 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E27F8.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E27F8.s @@ -1,25 +1,25 @@ glabel func_800E27F8 /* B59998 800E27F8 10800009 */ beqz $a0, .L800E2820 -/* B5999C 800E27FC 3C038017 */ lui $v1, %hi(D_801719B0) +/* B5999C 800E27FC 3C038017 */ lui $v1, %hi(gAudioContext+0x2830) /* B599A0 800E2800 24010001 */ li $at, 1 /* B599A4 800E2804 10810008 */ beq $a0, $at, .L800E2828 -/* B599A8 800E2808 3C038017 */ lui $v1, %hi(D_801719B4) +/* B599A8 800E2808 3C038017 */ lui $v1, %hi(gAudioContext+0x2834) /* B599AC 800E280C 24010002 */ li $at, 2 /* B599B0 800E2810 10810007 */ beq $a0, $at, .L800E2830 -/* B599B4 800E2814 3C038017 */ lui $v1, %hi(D_801719B8) +/* B599B4 800E2814 3C038017 */ lui $v1, %hi(gAudioContext+0x2838) /* B599B8 800E2818 03E00008 */ jr $ra /* B599BC 800E281C 00001025 */ move $v0, $zero .L800E2820: /* B599C0 800E2820 03E00008 */ jr $ra -/* B599C4 800E2824 8C6219B0 */ lw $v0, %lo(D_801719B0)($v1) +/* B599C4 800E2824 8C6219B0 */ lw $v0, %lo(gAudioContext+0x2830)($v1) .L800E2828: /* B599C8 800E2828 03E00008 */ jr $ra -/* B599CC 800E282C 8C6219B4 */ lw $v0, %lo(D_801719B4)($v1) +/* B599CC 800E282C 8C6219B4 */ lw $v0, %lo(gAudioContext+0x2834)($v1) .L800E2830: -/* B599D0 800E2830 8C6319B8 */ lw $v1, %lo(D_801719B8)($v1) +/* B599D0 800E2830 8C6319B8 */ lw $v1, %lo(gAudioContext+0x2838)($v1) /* B599D4 800E2834 03E00008 */ jr $ra /* B599D8 800E2838 00601025 */ move $v0, $v1 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E283C.s b/asm/non_matchings/code/code_800E11F0/func_800E283C.s index 90fa46a2a1..12d24d197f 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E283C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E283C.s @@ -1,8 +1,8 @@ glabel func_800E283C /* B599DC 800E283C 27BDFF90 */ addiu $sp, $sp, -0x70 /* B599E0 800E2840 00047080 */ sll $t6, $a0, 2 -/* B599E4 800E2844 3C0F8017 */ lui $t7, %hi(D_801719C4) # $t7, 0x8017 -/* B599E8 800E2848 8DEF19C4 */ lw $t7, %lo(D_801719C4)($t7) +/* B599E4 800E2844 3C0F8017 */ lui $t7, %hi(gAudioContext+0x2844) # $t7, 0x8017 +/* B599E8 800E2848 8DEF19C4 */ lw $t7, %lo(gAudioContext+0x2844)($t7) /* B599EC 800E284C 01C47021 */ addu $t6, $t6, $a0 /* B599F0 800E2850 000E7080 */ sll $t6, $t6, 2 /* B599F4 800E2854 AFBF0034 */ sw $ra, 0x34($sp) @@ -141,21 +141,21 @@ glabel func_800E283C /* B59BD0 800E2A30 5020FFE0 */ beql $at, $zero, .L800E29B4 /* B59BD4 800E2A34 8E420000 */ lw $v0, ($s2) .L800E2A38: -/* B59BD8 800E2A38 3C0E8017 */ lui $t6, %hi(D_801719C4) # $t6, 0x8017 -/* B59BDC 800E2A3C 8DCE19C4 */ lw $t6, %lo(D_801719C4)($t6) +/* B59BD8 800E2A38 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2844) # $t6, 0x8017 +/* B59BDC 800E2A3C 8DCE19C4 */ lw $t6, %lo(gAudioContext+0x2844)($t6) /* B59BE0 800E2A40 8FAF0044 */ lw $t7, 0x44($sp) /* B59BE4 800E2A44 8E6D0000 */ lw $t5, ($s3) -/* B59BE8 800E2A48 3C088017 */ lui $t0, %hi(D_801719C4) # $t0, 0x8017 +/* B59BE8 800E2A48 3C088017 */ lui $t0, %hi(gAudioContext+0x2844) # $t0, 0x8017 /* B59BEC 800E2A4C 01CFC021 */ addu $t8, $t6, $t7 /* B59BF0 800E2A50 AF0D000C */ sw $t5, 0xc($t8) /* B59BF4 800E2A54 8FA90044 */ lw $t1, 0x44($sp) -/* B59BF8 800E2A58 8D0819C4 */ lw $t0, %lo(D_801719C4)($t0) +/* B59BF8 800E2A58 8D0819C4 */ lw $t0, %lo(gAudioContext+0x2844)($t0) /* B59BFC 800E2A5C 8E790004 */ lw $t9, 4($s3) -/* B59C00 800E2A60 3C0C8017 */ lui $t4, %hi(D_801719C4) # $t4, 0x8017 +/* B59C00 800E2A60 3C0C8017 */ lui $t4, %hi(gAudioContext+0x2844) # $t4, 0x8017 /* B59C04 800E2A64 01095021 */ addu $t2, $t0, $t1 /* B59C08 800E2A68 AD590010 */ sw $t9, 0x10($t2) /* B59C0C 800E2A6C 8FAE0044 */ lw $t6, 0x44($sp) -/* B59C10 800E2A70 8D8C19C4 */ lw $t4, %lo(D_801719C4)($t4) +/* B59C10 800E2A70 8D8C19C4 */ lw $t4, %lo(gAudioContext+0x2844)($t4) /* B59C14 800E2A74 266B0008 */ addiu $t3, $s3, 8 /* B59C18 800E2A78 018E7821 */ addu $t7, $t4, $t6 /* B59C1C 800E2A7C ADEB0008 */ sw $t3, 8($t7) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E2AA8.s b/asm/non_matchings/code/code_800E11F0/func_800E2AA8.s index f428e1ee1f..69e6819740 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E2AA8.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E2AA8.s @@ -17,12 +17,12 @@ glabel func_800E2AA8 /* B59C84 800E2AE4 AFB3003C */ sw $s3, 0x3c($sp) /* B59C88 800E2AE8 0C039A10 */ jal func_800E6840 /* B59C8C 800E2AEC 02002825 */ move $a1, $s0 -/* B59C90 800E2AF0 3C168017 */ lui $s6, %hi(D_80171784) # $s6, 0x8017 +/* B59C90 800E2AF0 3C168017 */ lui $s6, %hi(gAudioContext+0x2604) # $s6, 0x8017 /* B59C94 800E2AF4 3C148015 */ lui $s4, %hi(D_8014942C) # $s4, 0x8015 -/* B59C98 800E2AF8 3C138017 */ lui $s3, %hi(D_80171768) # $s3, 0x8017 -/* B59C9C 800E2AFC 26731768 */ addiu $s3, %lo(D_80171768) # addiu $s3, $s3, 0x1768 +/* B59C98 800E2AF8 3C138017 */ lui $s3, %hi(gAudioContext+0x25e8) # $s3, 0x8017 +/* B59C9C 800E2AFC 26731768 */ addiu $s3, %lo(gAudioContext+0x25e8) # addiu $s3, $s3, 0x1768 /* B59CA0 800E2B00 2694942C */ addiu $s4, %lo(D_8014942C) # addiu $s4, $s4, -0x6bd4 -/* B59CA4 800E2B04 26D61784 */ addiu $s6, %lo(D_80171784) # addiu $s6, $s6, 0x1784 +/* B59CA4 800E2B04 26D61784 */ addiu $s6, %lo(gAudioContext+0x2604) # addiu $s6, $s6, 0x1784 /* B59CA8 800E2B08 2E010400 */ sltiu $at, $s0, 0x400 /* B59CAC 800E2B0C 14200014 */ bnez $at, .L800E2B60 .L800E2B10: diff --git a/asm/non_matchings/code/code_800E11F0/func_800E2CE0.s b/asm/non_matchings/code/code_800E11F0/func_800E2CE0.s index ff0b282773..82e9140c1e 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E2CE0.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E2CE0.s @@ -11,16 +11,16 @@ glabel func_800E2CE0 /* B59EA4 800E2D04 00402825 */ move $a1, $v0 /* B59EA8 800E2D08 24030001 */ li $v1, 1 /* B59EAC 800E2D0C 12030010 */ beq $s0, $v1, .L800E2D50 -/* B59EB0 800E2D10 3C0F8017 */ lui $t7, %hi(D_801725E8) +/* B59EB0 800E2D10 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3468) /* B59EB4 800E2D14 24010002 */ li $at, 2 /* B59EB8 800E2D18 12010013 */ beq $s0, $at, .L800E2D68 -/* B59EBC 800E2D1C 3C188017 */ lui $t8, %hi(D_801725B8) +/* B59EBC 800E2D1C 3C188017 */ lui $t8, %hi(gAudioContext+0x3438) /* B59EC0 800E2D20 10000018 */ b .L800E2D84 /* B59EC4 800E2D24 02002025 */ move $a0, $s0 .L800E2D28: -/* B59EC8 800E2D28 3C0E8017 */ lui $t6, %hi(D_80172618) +/* B59EC8 800E2D28 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3498) /* B59ECC 800E2D2C 01C27021 */ addu $t6, $t6, $v0 -/* B59ED0 800E2D30 91CE2618 */ lbu $t6, %lo(D_80172618)($t6) +/* B59ED0 800E2D30 91CE2618 */ lbu $t6, %lo(gAudioContext+0x3498)($t6) /* B59ED4 800E2D34 24010001 */ li $at, 1 /* B59ED8 800E2D38 15C10003 */ bne $t6, $at, .L800E2D48 /* B59EDC 800E2D3C 00000000 */ nop @@ -31,14 +31,14 @@ glabel func_800E2CE0 /* B59EEC 800E2D4C 02002025 */ move $a0, $s0 .L800E2D50: /* B59EF0 800E2D50 01E27821 */ addu $t7, $t7, $v0 -/* B59EF4 800E2D54 91EF25E8 */ lbu $t7, %lo(D_801725E8)($t7) +/* B59EF4 800E2D54 91EF25E8 */ lbu $t7, %lo(gAudioContext+0x3468)($t7) /* B59EF8 800E2D58 546F000A */ bnel $v1, $t7, .L800E2D84 /* B59EFC 800E2D5C 02002025 */ move $a0, $s0 /* B59F00 800E2D60 1000009D */ b .L800E2FD8 /* B59F04 800E2D64 00001025 */ move $v0, $zero .L800E2D68: /* B59F08 800E2D68 0302C021 */ addu $t8, $t8, $v0 -/* B59F0C 800E2D6C 931825B8 */ lbu $t8, %lo(D_801725B8)($t8) +/* B59F0C 800E2D6C 931825B8 */ lbu $t8, %lo(gAudioContext+0x3438)($t8) /* B59F10 800E2D70 54780004 */ bnel $v1, $t8, .L800E2D84 /* B59F14 800E2D74 02002025 */ move $a0, $s0 /* B59F18 800E2D78 10000097 */ b .L800E2FD8 @@ -106,7 +106,7 @@ glabel L800E2E5C /* B59FFC 800E2E5C 02002025 */ move $a0, $s0 /* B5A000 800E2E60 8FA50054 */ lw $a1, 0x54($sp) /* B5A004 800E2E64 24060001 */ li $a2, 1 -/* B5A008 800E2E68 0C037A38 */ jal func_800DE8E0 +/* B5A008 800E2E68 0C037A38 */ jal Audio_AllocBankOrSeq /* B5A00C 800E2E6C 8FA70034 */ lw $a3, 0x34($sp) /* B5A010 800E2E70 14400015 */ bnez $v0, .L800E2EC8 /* B5A014 800E2E74 AFA2004C */ sw $v0, 0x4c($sp) @@ -116,7 +116,7 @@ glabel L800E2E80 /* B5A020 800E2E80 02002025 */ move $a0, $s0 /* B5A024 800E2E84 8FA50054 */ lw $a1, 0x54($sp) /* B5A028 800E2E88 00003025 */ move $a2, $zero -/* B5A02C 800E2E8C 0C037A38 */ jal func_800DE8E0 +/* B5A02C 800E2E8C 0C037A38 */ jal Audio_AllocBankOrSeq /* B5A030 800E2E90 8FA70034 */ lw $a3, 0x34($sp) /* B5A034 800E2E94 1440000C */ bnez $v0, .L800E2EC8 /* B5A038 800E2E98 AFA2004C */ sw $v0, 0x4c($sp) @@ -126,7 +126,7 @@ glabel L800E2EA4 /* B5A044 800E2EA4 02002025 */ move $a0, $s0 /* B5A048 800E2EA8 8FA50054 */ lw $a1, 0x54($sp) /* B5A04C 800E2EAC 24060002 */ li $a2, 2 -/* B5A050 800E2EB0 0C037A38 */ jal func_800DE8E0 +/* B5A050 800E2EB0 0C037A38 */ jal Audio_AllocBankOrSeq /* B5A054 800E2EB4 8FA70034 */ lw $a3, 0x34($sp) /* B5A058 800E2EB8 14400003 */ bnez $v0, .L800E2EC8 /* B5A05C 800E2EBC AFA2004C */ sw $v0, 0x4c($sp) @@ -194,12 +194,12 @@ glabel L800E2EA4 /* B5A144 800E2FA4 1000000C */ b .L800E2FD8 /* B5A148 800E2FA8 8FA2004C */ lw $v0, 0x4c($sp) .L800E2FAC: -/* B5A14C 800E2FAC 0C038692 */ jal func_800E1A48 +/* B5A14C 800E2FAC 0C038692 */ jal Audio_SetSeqLoadStatus /* B5A150 800E2FB0 8FA5003C */ lw $a1, 0x3c($sp) /* B5A154 800E2FB4 10000008 */ b .L800E2FD8 /* B5A158 800E2FB8 8FA2004C */ lw $v0, 0x4c($sp) .L800E2FBC: -/* B5A15C 800E2FBC 0C038686 */ jal func_800E1A18 +/* B5A15C 800E2FBC 0C038686 */ jal Audio_SetBankLoadStatus /* B5A160 800E2FC0 8FA5003C */ lw $a1, 0x3c($sp) /* B5A164 800E2FC4 10000004 */ b .L800E2FD8 /* B5A168 800E2FC8 8FA2004C */ lw $v0, 0x4c($sp) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3094.s b/asm/non_matchings/code/code_800E11F0/func_800E3094.s index 920a56ccef..e5b342177e 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3094.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3094.s @@ -50,8 +50,8 @@ glabel func_800E3094 /* B5A2E0 800E3140 0C039A06 */ jal func_800E6818 /* B5A2E4 800E3144 00000000 */ nop /* B5A2E8 800E3148 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B5A2EC 800E314C 3C048017 */ lui $a0, %hi(D_8016F186) # $a0, 0x8017 -/* B5A2F0 800E3150 2484F186 */ addiu $a0, %lo(D_8016F186) # addiu $a0, $a0, -0xe7a +/* B5A2EC 800E314C 3C048017 */ lui $a0, %hi(gAudioContext+0x6) # $a0, 0x8017 +/* B5A2F0 800E3150 2484F186 */ addiu $a0, %lo(gAudioContext+0x6) # addiu $a0, $a0, -0xe7a /* B5A2F4 800E3154 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B5A2F8 800E3158 240300A0 */ li $v1, 160 .L800E315C: @@ -59,8 +59,8 @@ glabel func_800E3094 /* B5A300 800E3160 0044082B */ sltu $at, $v0, $a0 /* B5A304 800E3164 1420FFFD */ bnez $at, .L800E315C /* B5A308 800E3168 A4432972 */ sh $v1, 0x2972($v0) -/* B5A30C 800E316C 3C048017 */ lui $a0, %hi(D_80171768) # $a0, 0x8017 -/* B5A310 800E3170 3C058017 */ lui $a1, %hi(D_80171780) # $a1, 0x8017 +/* B5A30C 800E316C 3C048017 */ lui $a0, %hi(gAudioContext+0x25e8) # $a0, 0x8017 +/* B5A310 800E3170 3C058017 */ lui $a1, %hi(gAudioContext+0x2600) # $a1, 0x8017 /* B5A314 800E3174 AE20289C */ sw $zero, 0x289c($s1) /* B5A318 800E3178 AE2028A4 */ sw $zero, 0x28a4($s1) /* B5A31C 800E317C AE2028A8 */ sw $zero, 0x28a8($s1) @@ -68,26 +68,26 @@ glabel func_800E3094 /* B5A324 800E3184 AE2028B8 */ sw $zero, 0x28b8($s1) /* B5A328 800E3188 AE2028F4 */ sw $zero, 0x28f4($s1) /* B5A32C 800E318C AE202944 */ sw $zero, 0x2944($s1) -/* B5A330 800E3190 24A51780 */ addiu $a1, %lo(D_80171780) # addiu $a1, $a1, 0x1780 -/* B5A334 800E3194 24841768 */ addiu $a0, %lo(D_80171768) # addiu $a0, $a0, 0x1768 +/* B5A330 800E3190 24A51780 */ addiu $a1, %lo(gAudioContext+0x2600) # addiu $a1, $a1, 0x1780 +/* B5A334 800E3194 24841768 */ addiu $a0, %lo(gAudioContext+0x25e8) # addiu $a0, $a0, 0x1768 /* B5A338 800E3198 0C001874 */ jal osCreateMesgQueue /* B5A33C 800E319C 24060001 */ li $a2, 1 -/* B5A340 800E31A0 3C048017 */ lui $a0, %hi(D_80171050) # $a0, 0x8017 -/* B5A344 800E31A4 3C058017 */ lui $a1, %hi(D_80171068) # $a1, 0x8017 -/* B5A348 800E31A8 24A51068 */ addiu $a1, %lo(D_80171068) # addiu $a1, $a1, 0x1068 -/* B5A34C 800E31AC 24841050 */ addiu $a0, %lo(D_80171050) # addiu $a0, $a0, 0x1050 +/* B5A340 800E31A0 3C048017 */ lui $a0, %hi(gAudioContext+0x1ed0) # $a0, 0x8017 +/* B5A344 800E31A4 3C058017 */ lui $a1, %hi(gAudioContext+0x1ee8) # $a1, 0x8017 +/* B5A348 800E31A8 24A51068 */ addiu $a1, %lo(gAudioContext+0x1ee8) # addiu $a1, $a1, 0x1068 +/* B5A34C 800E31AC 24841050 */ addiu $a0, %lo(gAudioContext+0x1ed0) # addiu $a0, $a0, 0x1050 /* B5A350 800E31B0 0C001874 */ jal osCreateMesgQueue /* B5A354 800E31B4 24060040 */ li $a2, 64 -/* B5A358 800E31B8 3C048017 */ lui $a0, %hi(D_80170FA0) # $a0, 0x8017 -/* B5A35C 800E31BC 3C058017 */ lui $a1, %hi(D_80170FB8) # $a1, 0x8017 -/* B5A360 800E31C0 24A50FB8 */ addiu $a1, %lo(D_80170FB8) # addiu $a1, $a1, 0xfb8 -/* B5A364 800E31C4 24840FA0 */ addiu $a0, %lo(D_80170FA0) # addiu $a0, $a0, 0xfa0 +/* B5A358 800E31B8 3C048017 */ lui $a0, %hi(gAudioContext+0x1e20) # $a0, 0x8017 +/* B5A35C 800E31BC 3C058017 */ lui $a1, %hi(gAudioContext+0x1e38) # $a1, 0x8017 +/* B5A360 800E31C0 24A50FB8 */ addiu $a1, %lo(gAudioContext+0x1e38) # addiu $a1, $a1, 0xfb8 +/* B5A364 800E31C4 24840FA0 */ addiu $a0, %lo(gAudioContext+0x1e20) # addiu $a0, $a0, 0xfa0 /* B5A368 800E31C8 0C001874 */ jal osCreateMesgQueue /* B5A36C 800E31CC 24060010 */ li $a2, 16 -/* B5A370 800E31D0 3C048017 */ lui $a0, %hi(D_80170FF8) # $a0, 0x8017 -/* B5A374 800E31D4 3C058017 */ lui $a1, %hi(D_80171010) # $a1, 0x8017 -/* B5A378 800E31D8 24A51010 */ addiu $a1, %lo(D_80171010) # addiu $a1, $a1, 0x1010 -/* B5A37C 800E31DC 24840FF8 */ addiu $a0, %lo(D_80170FF8) # addiu $a0, $a0, 0xff8 +/* B5A370 800E31D0 3C048017 */ lui $a0, %hi(gAudioContext+0x1e78) # $a0, 0x8017 +/* B5A374 800E31D4 3C058017 */ lui $a1, %hi(gAudioContext+0x1e90) # $a1, 0x8017 +/* B5A378 800E31D8 24A51010 */ addiu $a1, %lo(gAudioContext+0x1e90) # addiu $a1, $a1, 0x1010 +/* B5A37C 800E31DC 24840FF8 */ addiu $a0, %lo(gAudioContext+0x1e78) # addiu $a0, $a0, 0xff8 /* B5A380 800E31E0 0C001874 */ jal osCreateMesgQueue /* B5A384 800E31E4 24060010 */ li $a2, 16 /* B5A388 800E31E8 AE2028A0 */ sw $zero, 0x28a0($s1) @@ -137,17 +137,17 @@ glabel func_800E3094 /* B5A424 800E3284 5420FFF2 */ bnezl $at, .L800E3250 /* B5A428 800E3288 8E2E3524 */ lw $t6, 0x3524($s1) .L800E328C: -/* B5A42C 800E328C 0C03797C */ jal func_800DE5F0 +/* B5A42C 800E328C 0C03797C */ jal Audio_InitMainPools /* B5A430 800E3290 8C84A6C8 */ lw $a0, %lo(D_8014A6C8)($a0) /* B5A434 800E3294 3C108017 */ lui $s0, %hi(gAudioContext) # $s0, 0x8017 /* B5A438 800E3298 2610F180 */ addiu $s0, %lo(gAudioContext) # addiu $s0, $s0, -0xe80 .L800E329C: -/* B5A43C 800E329C 3C048017 */ lui $a0, %hi(D_80171B30) # $a0, 0x8017 -/* B5A440 800E32A0 24841B30 */ addiu $a0, %lo(D_80171B30) # addiu $a0, $a0, 0x1b30 -/* B5A444 800E32A4 0C0378E0 */ jal func_800DE380 +/* B5A43C 800E329C 3C048017 */ lui $a0, %hi(gAudioContext+0x29b0) # $a0, 0x8017 +/* B5A440 800E32A0 24841B30 */ addiu $a0, %lo(gAudioContext+0x29b0) # addiu $a0, $a0, 0x1b30 +/* B5A444 800E32A4 0C0378E0 */ jal Audio_AllocZeroed /* B5A448 800E32A8 24050B00 */ li $a1, 2816 -/* B5A44C 800E32AC 3C088017 */ lui $t0, %hi(D_8016F18C) # $t0, 0x8017 -/* B5A450 800E32B0 2508F18C */ addiu $t0, %lo(D_8016F18C) # addiu $t0, $t0, -0xe74 +/* B5A44C 800E32AC 3C088017 */ lui $t0, %hi(gAudioContext+0xc) # $t0, 0x8017 +/* B5A450 800E32B0 2508F18C */ addiu $t0, %lo(gAudioContext+0xc) # addiu $t0, $t0, -0xe74 /* B5A454 800E32B4 26100004 */ addiu $s0, $s0, 4 /* B5A458 800E32B8 0208082B */ sltu $at, $s0, $t0 /* B5A45C 800E32BC 1420FFF7 */ bnez $at, .L800E329C @@ -186,13 +186,13 @@ glabel func_800E3094 /* B5A4E0 800E3340 0C0386C2 */ jal func_800E1B08 /* B5A4E4 800E3344 00003025 */ move $a2, $zero /* B5A4E8 800E3348 8E382834 */ lw $t8, 0x2834($s1) -/* B5A4EC 800E334C 3C048017 */ lui $a0, %hi(D_80171B30) # $a0, 0x8017 -/* B5A4F0 800E3350 24841B30 */ addiu $a0, %lo(D_80171B30) # addiu $a0, $a0, 0x1b30 +/* B5A4EC 800E334C 3C048017 */ lui $a0, %hi(gAudioContext+0x29b0) # $a0, 0x8017 +/* B5A4F0 800E3350 24841B30 */ addiu $a0, %lo(gAudioContext+0x29b0) # addiu $a0, $a0, 0x1b30 /* B5A4F4 800E3354 87030000 */ lh $v1, ($t8) /* B5A4F8 800E3358 00032880 */ sll $a1, $v1, 2 /* B5A4FC 800E335C 00A32821 */ addu $a1, $a1, $v1 /* B5A500 800E3360 00052880 */ sll $a1, $a1, 2 -/* B5A504 800E3364 0C0378F7 */ jal func_800DE3DC +/* B5A504 800E3364 0C0378F7 */ jal Audio_Alloc /* B5A508 800E3368 AFA30024 */ sw $v1, 0x24($sp) /* B5A50C 800E336C 8FA30024 */ lw $v1, 0x24($sp) /* B5A510 800E3370 AE222844 */ sw $v0, 0x2844($s1) @@ -207,21 +207,21 @@ glabel func_800E3094 /* B5A530 800E3390 5603FFFB */ bnel $s0, $v1, .L800E3380 /* B5A534 800E3394 02002025 */ move $a0, $s0 .L800E3398: -/* B5A538 800E3398 3C048017 */ lui $a0, %hi(D_80171B30) # $a0, 0x8017 +/* B5A538 800E3398 3C048017 */ lui $a0, %hi(gAudioContext+0x29b0) # $a0, 0x8017 /* B5A53C 800E339C 3C058015 */ lui $a1, %hi(D_8014A6CC) # $a1, 0x8015 /* B5A540 800E33A0 8CA5A6CC */ lw $a1, %lo(D_8014A6CC)($a1) -/* B5A544 800E33A4 0C0378F7 */ jal func_800DE3DC -/* B5A548 800E33A8 24841B30 */ addiu $a0, %lo(D_80171B30) # addiu $a0, $a0, 0x1b30 +/* B5A544 800E33A4 0C0378F7 */ jal Audio_Alloc +/* B5A548 800E33A8 24841B30 */ addiu $a0, %lo(gAudioContext+0x29b0) # addiu $a0, $a0, 0x1b30 /* B5A54C 800E33AC 14400003 */ bnez $v0, .L800E33BC /* B5A550 800E33B0 00402825 */ move $a1, $v0 /* B5A554 800E33B4 3C018015 */ lui $at, %hi(D_8014A6CC) # $at, 0x8015 /* B5A558 800E33B8 AC20A6CC */ sw $zero, %lo(D_8014A6CC)($at) .L800E33BC: -/* B5A55C 800E33BC 3C048017 */ lui $a0, %hi(D_80171ED0) # $a0, 0x8017 +/* B5A55C 800E33BC 3C048017 */ lui $a0, %hi(gAudioContext+0x2d50) # $a0, 0x8017 /* B5A560 800E33C0 3C068015 */ lui $a2, %hi(D_8014A6CC) # $a2, 0x8015 /* B5A564 800E33C4 8CC6A6CC */ lw $a2, %lo(D_8014A6CC)($a2) -/* B5A568 800E33C8 0C03790D */ jal func_800DE434 -/* B5A56C 800E33CC 24841ED0 */ addiu $a0, %lo(D_80171ED0) # addiu $a0, $a0, 0x1ed0 +/* B5A568 800E33C8 0C03790D */ jal Audio_SoundAllocPoolInit +/* B5A56C 800E33CC 24841ED0 */ addiu $a0, %lo(gAudioContext+0x2d50) # addiu $a0, $a0, 0x1ed0 /* B5A570 800E33D0 24190001 */ li $t9, 1 /* B5A574 800E33D4 3C018013 */ lui $at, %hi(D_801304D8) # $at, 0x8013 /* B5A578 800E33D8 AC3904D8 */ sw $t9, %lo(D_801304D8)($at) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E36EC.s b/asm/non_matchings/code/code_800E11F0/func_800E36EC.s index b766d09348..13c9d3091a 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E36EC.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E36EC.s @@ -7,12 +7,12 @@ glabel func_800E36EC /* B5A8A0 800E3700 AFB40024 */ sw $s4, 0x24($sp) /* B5A8A4 800E3704 AFB30020 */ sw $s3, 0x20($sp) /* B5A8A8 800E3708 3C128017 */ lui $s2, %hi(gAudioContext) # $s2, 0x8017 -/* B5A8AC 800E370C 3C178017 */ lui $s7, %hi(D_8016F248) # $s7, 0x8017 +/* B5A8AC 800E370C 3C178017 */ lui $s7, %hi(gAudioContext+0xc8) # $s7, 0x8017 /* B5A8B0 800E3710 0080B025 */ move $s6, $a0 /* B5A8B4 800E3714 AFBF0034 */ sw $ra, 0x34($sp) /* B5A8B8 800E3718 AFB10018 */ sw $s1, 0x18($sp) /* B5A8BC 800E371C AFB00014 */ sw $s0, 0x14($sp) -/* B5A8C0 800E3720 26F7F248 */ addiu $s7, %lo(D_8016F248) # addiu $s7, $s7, -0xdb8 +/* B5A8C0 800E3720 26F7F248 */ addiu $s7, %lo(gAudioContext+0xc8) # addiu $s7, $s7, -0xdb8 /* B5A8C4 800E3724 2652F180 */ addiu $s2, %lo(gAudioContext) # addiu $s2, $s2, -0xe80 /* B5A8C8 800E3728 24130001 */ li $s3, 1 /* B5A8CC 800E372C 24140002 */ li $s4, 2 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3A14.s b/asm/non_matchings/code/code_800E11F0/func_800E3A14.s index 248cb21a15..356977ee3f 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3A14.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3A14.s @@ -1,7 +1,7 @@ glabel func_800E3A14 /* B5ABB4 800E3A14 3C038017 */ lui $v1, %hi(gAudioContext) # $v1, 0x8017 -/* B5ABB8 800E3A18 3C028017 */ lui $v0, %hi(D_8016F700) # $v0, 0x8017 -/* B5ABBC 800E3A1C 2442F700 */ addiu $v0, %lo(D_8016F700) # addiu $v0, $v0, -0x900 +/* B5ABB8 800E3A18 3C028017 */ lui $v0, %hi(gAudioContext+0x580) # $v0, 0x8017 +/* B5ABBC 800E3A1C 2442F700 */ addiu $v0, %lo(gAudioContext+0x580) # addiu $v0, $v0, -0x900 /* B5ABC0 800E3A20 2463F180 */ addiu $v1, %lo(gAudioContext) # addiu $v1, $v1, -0xe80 .L800E3A24: /* B5ABC4 800E3A24 24630160 */ addiu $v1, $v1, 0x160 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3A44.s b/asm/non_matchings/code/code_800E11F0/func_800E3A44.s index acf5d06bd9..aa7866177b 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3A44.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3A44.s @@ -21,8 +21,8 @@ glabel func_800E3A44 /* B5AC30 800E3A90 10000009 */ b .L800E3AB8 /* B5AC34 800E3A94 00001025 */ move $v0, $zero .L800E3A98: -/* B5AC38 800E3A98 3C048017 */ lui $a0, %hi(D_80170E70) # $a0, 0x8017 -/* B5AC3C 800E3A9C 24840E70 */ addiu $a0, %lo(D_80170E70) # addiu $a0, $a0, 0xe70 +/* B5AC38 800E3A98 3C048017 */ lui $a0, %hi(gAudioContext+0x1cf0) # $a0, 0x8017 +/* B5AC3C 800E3A9C 24840E70 */ addiu $a0, %lo(gAudioContext+0x1cf0) # addiu $a0, $a0, 0xe70 /* B5AC40 800E3AA0 00003025 */ move $a2, $zero /* B5AC44 800E3AA4 0C000C18 */ jal osSendMesg /* B5AC48 800E3AA8 AFA5002C */ sw $a1, 0x2c($sp) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3AC8.s b/asm/non_matchings/code/code_800E11F0/func_800E3AC8.s index d2af700c6d..9250cb61de 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3AC8.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3AC8.s @@ -1,10 +1,10 @@ glabel func_800E3AC8 /* B5AC68 800E3AC8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B5AC6C 800E3ACC 3C028017 */ lui $v0, %hi(gAudioContext) # $v0, 0x8017 -/* B5AC70 800E3AD0 3C038017 */ lui $v1, %hi(D_8016F700) # $v1, 0x8017 +/* B5AC70 800E3AD0 3C038017 */ lui $v1, %hi(gAudioContext+0x580) # $v1, 0x8017 /* B5AC74 800E3AD4 AFBF0014 */ sw $ra, 0x14($sp) /* B5AC78 800E3AD8 AFA40020 */ sw $a0, 0x20($sp) -/* B5AC7C 800E3ADC 2463F700 */ addiu $v1, %lo(D_8016F700) # addiu $v1, $v1, -0x900 +/* B5AC7C 800E3ADC 2463F700 */ addiu $v1, %lo(gAudioContext+0x580) # addiu $v1, $v1, -0x900 /* B5AC80 800E3AE0 2442F180 */ addiu $v0, %lo(gAudioContext) # addiu $v0, $v0, -0xe80 /* B5AC84 800E3AE4 804E1770 */ lb $t6, 0x1770($v0) .L800E3AE8: @@ -18,8 +18,8 @@ glabel func_800E3AC8 /* B5ACA0 800E3B00 804E1770 */ lb $t6, 0x1770($v0) /* B5ACA4 800E3B04 8FA3001C */ lw $v1, 0x1c($sp) .L800E3B08: -/* B5ACA8 800E3B08 3C0F8017 */ lui $t7, %hi(D_8016F700) # $t7, 0x8017 -/* B5ACAC 800E3B0C 25EFF700 */ addiu $t7, %lo(D_8016F700) # addiu $t7, $t7, -0x900 +/* B5ACA8 800E3B08 3C0F8017 */ lui $t7, %hi(gAudioContext+0x580) # $t7, 0x8017 +/* B5ACAC 800E3B0C 25EFF700 */ addiu $t7, %lo(gAudioContext+0x580) # addiu $t7, $t7, -0x900 /* B5ACB0 800E3B10 144F0003 */ bne $v0, $t7, .L800E3B20 /* B5ACB4 800E3B14 8FA40030 */ lw $a0, 0x30($sp) /* B5ACB8 800E3B18 10000030 */ b .L800E3BDC diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3BEC.s b/asm/non_matchings/code/code_800E11F0/func_800E3BEC.s index 9d21891a56..e9233c0968 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3BEC.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3BEC.s @@ -15,9 +15,9 @@ glabel func_800E3BEC /* B5ADC0 800E3C20 1480001D */ bnez $a0, .L800E3C98 /* B5ADC4 800E3C24 00000000 */ nop /* B5ADC8 800E3C28 1260000E */ beqz $s3, .L800E3C64 -/* B5ADCC 800E3C2C 3C108017 */ lui $s0, %hi(D_80170E70) -/* B5ADD0 800E3C30 3C108017 */ lui $s0, %hi(D_80170E70) # $s0, 0x8017 -/* B5ADD4 800E3C34 26100E70 */ addiu $s0, %lo(D_80170E70) # addiu $s0, $s0, 0xe70 +/* B5ADCC 800E3C2C 3C108017 */ lui $s0, %hi(gAudioContext+0x1cf0) +/* B5ADD0 800E3C30 3C108017 */ lui $s0, %hi(gAudioContext+0x1cf0) # $s0, 0x8017 +/* B5ADD4 800E3C34 26100E70 */ addiu $s0, %lo(gAudioContext+0x1cf0) # addiu $s0, $s0, 0xe70 /* B5ADD8 800E3C38 2412FFFF */ li $s2, -1 /* B5ADDC 800E3C3C 27B10034 */ addiu $s1, $sp, 0x34 /* B5ADE0 800E3C40 02002025 */ move $a0, $s0 @@ -27,11 +27,11 @@ glabel func_800E3BEC /* B5ADEC 800E3C4C 00003025 */ move $a2, $zero /* B5ADF0 800E3C50 5452FFFC */ bnel $v0, $s2, .L800E3C44 /* B5ADF4 800E3C54 02002025 */ move $a0, $s0 -/* B5ADF8 800E3C58 3C048017 */ lui $a0, %hi(D_80170EC8) # $a0, 0x8017 +/* B5ADF8 800E3C58 3C048017 */ lui $a0, %hi(gAudioContext+0x1d48) # $a0, 0x8017 /* B5ADFC 800E3C5C 1000000E */ b .L800E3C98 -/* B5AE00 800E3C60 8C840EC8 */ lw $a0, %lo(D_80170EC8)($a0) +/* B5AE00 800E3C60 8C840EC8 */ lw $a0, %lo(gAudioContext+0x1d48)($a0) .L800E3C64: -/* B5AE04 800E3C64 26040E70 */ addiu $a0, $s0, %lo(D_80170E70) +/* B5AE04 800E3C64 26040E70 */ addiu $a0, $s0, %lo(gAudioContext+0x1cf0) /* B5AE08 800E3C68 27A50034 */ addiu $a1, $sp, 0x34 /* B5AE0C 800E3C6C 0C000CA0 */ jal osRecvMesg /* B5AE10 800E3C70 00003025 */ move $a2, $zero @@ -52,8 +52,8 @@ glabel func_800E3BEC /* B5AE44 800E3CA4 02602825 */ move $a1, $s3 .L800E3CA8: /* B5AE48 800E3CA8 3C108017 */ lui $s0, %hi(gAudioContext) # $s0, 0x8017 -/* B5AE4C 800E3CAC 3C128017 */ lui $s2, %hi(D_8016F700) # $s2, 0x8017 -/* B5AE50 800E3CB0 2652F700 */ addiu $s2, %lo(D_8016F700) # addiu $s2, $s2, -0x900 +/* B5AE4C 800E3CAC 3C128017 */ lui $s2, %hi(gAudioContext+0x580) # $s2, 0x8017 +/* B5AE50 800E3CB0 2652F700 */ addiu $s2, %lo(gAudioContext+0x580) # addiu $s2, $s2, -0x900 /* B5AE54 800E3CB4 2610F180 */ addiu $s0, %lo(gAudioContext) # addiu $s0, $s0, -0xe80 /* B5AE58 800E3CB8 24110001 */ li $s1, 1 /* B5AE5C 800E3CBC 82181770 */ lb $t8, 0x1770($s0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3D1C.s b/asm/non_matchings/code/code_800E11F0/func_800E3D1C.s index 3a1a593e67..060b81c026 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3D1C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3D1C.s @@ -19,7 +19,7 @@ glabel func_800E3D1C .L800E3D60: /* B5AF00 800E3D60 00032202 */ srl $a0, $v1, 8 /* B5AF04 800E3D64 308400FF */ andi $a0, $a0, 0xff -/* B5AF08 800E3D68 0C038692 */ jal func_800E1A48 +/* B5AF08 800E3D68 0C038692 */ jal Audio_SetSeqLoadStatus /* B5AF0C 800E3D6C 306500FF */ andi $a1, $v1, 0xff /* B5AF10 800E3D70 10000030 */ b .L800E3E34 /* B5AF14 800E3D74 8E05001C */ lw $a1, 0x1c($s0) @@ -31,8 +31,8 @@ glabel func_800E3D1C /* B5AF28 800E3D88 8E05001C */ lw $a1, 0x1c($s0) .L800E3D8C: /* B5AF2C 800E3D8C 31CF00FF */ andi $t7, $t6, 0xff -/* B5AF30 800E3D90 3C188017 */ lui $t8, %hi(D_801719C4) # $t8, 0x8017 -/* B5AF34 800E3D94 8F1819C4 */ lw $t8, %lo(D_801719C4)($t8) +/* B5AF30 800E3D90 3C188017 */ lui $t8, %hi(gAudioContext+0x2844) # $t8, 0x8017 +/* B5AF34 800E3D94 8F1819C4 */ lw $t8, %lo(gAudioContext+0x2844)($t8) /* B5AF38 800E3D98 000FC880 */ sll $t9, $t7, 2 /* B5AF3C 800E3D9C 032FC821 */ addu $t9, $t9, $t7 /* B5AF40 800E3DA0 0019C880 */ sll $t9, $t9, 2 @@ -68,7 +68,7 @@ glabel func_800E3D1C /* B5AFAC 800E3E0C AFA0003C */ sw $zero, 0x3c($sp) .L800E3E10: /* B5AFB0 800E3E10 8FA40028 */ lw $a0, 0x28($sp) -/* B5AFB4 800E3E14 0C038686 */ jal func_800E1A18 +/* B5AFB4 800E3E14 0C038686 */ jal Audio_SetBankLoadStatus /* B5AFB8 800E3E18 306500FF */ andi $a1, $v1, 0xff /* B5AFBC 800E3E1C 8FA40028 */ lw $a0, 0x28($sp) /* B5AFC0 800E3E20 8E050004 */ lw $a1, 4($s0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E3E58.s b/asm/non_matchings/code/code_800E11F0/func_800E3E58.s index 9b09ff6835..295ad368a1 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E3E58.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E3E58.s @@ -3,11 +3,11 @@ glabel func_800E3E58 /* B5AFFC 800E3E5C AFBF001C */ sw $ra, 0x1c($sp) /* B5B000 800E3E60 AFB00018 */ sw $s0, 0x18($sp) /* B5B004 800E3E64 80820001 */ lb $v0, 1($a0) -/* B5B008 800E3E68 3C038017 */ lui $v1, %hi(D_801719B8) # $v1, 0x8017 +/* B5B008 800E3E68 3C038017 */ lui $v1, %hi(gAudioContext+0x2838) # $v1, 0x8017 /* B5B00C 800E3E6C 00808025 */ move $s0, $a0 /* B5B010 800E3E70 28410002 */ slti $at, $v0, 2 /* B5B014 800E3E74 14200004 */ bnez $at, .L800E3E88 -/* B5B018 800E3E78 8C6319B8 */ lw $v1, %lo(D_801719B8)($v1) +/* B5B018 800E3E78 8C6319B8 */ lw $v1, %lo(gAudioContext+0x2838)($v1) /* B5B01C 800E3E7C 244EFFFF */ addiu $t6, $v0, -1 /* B5B020 800E3E80 10000047 */ b .L800E3FA0 /* B5B024 800E3E84 A08E0001 */ sb $t6, 1($a0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E4198.s b/asm/non_matchings/code/code_800E11F0/func_800E4198.s index 3f2e889a70..96582cfc9c 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E4198.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E4198.s @@ -247,12 +247,12 @@ glabel func_800E4198 /* B5B6C0 800E4520 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff /* B5B6C4 800E4524 8E030000 */ lw $v1, ($s0) /* B5B6C8 800E4528 8C450D5C */ lw $a1, 0xd5c($v0) -/* B5B6CC 800E452C 3C0A8017 */ lui $t2, %hi(D_80170FF8) # $t2, 0x8017 +/* B5B6CC 800E452C 3C0A8017 */ lui $t2, %hi(gAudioContext+0x1e78) # $t2, 0x8017 /* B5B6D0 800E4530 00613024 */ and $a2, $v1, $at /* B5B6D4 800E4534 00064302 */ srl $t0, $a2, 0xc /* B5B6D8 800E4538 8E040004 */ lw $a0, 4($s0) /* B5B6DC 800E453C 25080001 */ addiu $t0, $t0, 1 -/* B5B6E0 800E4540 254A0FF8 */ addiu $t2, %lo(D_80170FF8) # addiu $t2, $t2, 0xff8 +/* B5B6E0 800E4540 254A0FF8 */ addiu $t2, %lo(gAudioContext+0x1e78) # addiu $t2, $t2, 0xff8 /* B5B6E4 800E4544 AFAA0014 */ sw $t2, 0x14($sp) /* B5B6E8 800E4548 AFA80010 */ sw $t0, 0x10($sp) /* B5B6EC 800E454C 8C590D60 */ lw $t9, 0xd60($v0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E4590.s b/asm/non_matchings/code/code_800E11F0/func_800E4590.s index 240004a6da..8f6b11b770 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E4590.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E4590.s @@ -8,8 +8,8 @@ glabel func_800E4590 /* B5B748 800E45A8 AFB00028 */ sw $s0, 0x28($sp) /* B5B74C 800E45AC 1080000B */ beqz $a0, .L800E45DC /* B5B750 800E45B0 27A5004C */ addiu $a1, $sp, 0x4c -/* B5B754 800E45B4 3C048017 */ lui $a0, %hi(D_80170FF8) # $a0, 0x8017 -/* B5B758 800E45B8 24840FF8 */ addiu $a0, %lo(D_80170FF8) # addiu $a0, $a0, 0xff8 +/* B5B754 800E45B4 3C048017 */ lui $a0, %hi(gAudioContext+0x1e78) # $a0, 0x8017 +/* B5B758 800E45B8 24840FF8 */ addiu $a0, %lo(gAudioContext+0x1e78) # addiu $a0, $a0, 0xff8 /* B5B75C 800E45BC 27A5004C */ addiu $a1, $sp, 0x4c /* B5B760 800E45C0 0C000CA0 */ jal osRecvMesg /* B5B764 800E45C4 00003025 */ move $a2, $zero @@ -19,8 +19,8 @@ glabel func_800E4590 /* B5B774 800E45D4 10000056 */ b .L800E4730 /* B5B778 800E45D8 00001025 */ move $v0, $zero .L800E45DC: -/* B5B77C 800E45DC 3C048017 */ lui $a0, %hi(D_80170FF8) # $a0, 0x8017 -/* B5B780 800E45E0 24840FF8 */ addiu $a0, %lo(D_80170FF8) # addiu $a0, $a0, 0xff8 +/* B5B77C 800E45DC 3C048017 */ lui $a0, %hi(gAudioContext+0x1e78) # $a0, 0x8017 +/* B5B780 800E45E0 24840FF8 */ addiu $a0, %lo(gAudioContext+0x1e78) # addiu $a0, $a0, 0xff8 /* B5B784 800E45E4 0C000CA0 */ jal osRecvMesg /* B5B788 800E45E8 00003025 */ move $a2, $zero /* B5B78C 800E45EC 3C078017 */ lui $a3, %hi(gAudioContext) # $a3, 0x8017 @@ -99,8 +99,8 @@ glabel func_800E4590 /* B5B8A0 800E4700 ACED176C */ sw $t5, 0x176c($a3) .L800E4704: /* B5B8A4 800E4704 8C650008 */ lw $a1, 8($v1) -/* B5B8A8 800E4708 3C0F8017 */ lui $t7, %hi(D_80170FF8) # $t7, 0x8017 -/* B5B8AC 800E470C 25EF0FF8 */ addiu $t7, %lo(D_80170FF8) # addiu $t7, $t7, 0xff8 +/* B5B8A8 800E4708 3C0F8017 */ lui $t7, %hi(gAudioContext+0x1e78) # $t7, 0x8017 +/* B5B8AC 800E470C 25EF0FF8 */ addiu $t7, %lo(gAudioContext+0x1e78) # addiu $t7, $t7, 0xff8 /* B5B8B0 800E4710 AFAF0014 */ sw $t7, 0x14($sp) /* B5B8B4 800E4714 AFAA0010 */ sw $t2, 0x10($sp) /* B5B8B8 800E4718 8C78000C */ lw $t8, 0xc($v1) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E478C.s b/asm/non_matchings/code/code_800E11F0/func_800E478C.s index 05dad56bc1..c07d5a3d83 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E478C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E478C.s @@ -1,7 +1,7 @@ glabel func_800E478C /* B5B92C 800E478C 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* B5B930 800E4790 3C0E8017 */ lui $t6, %hi(D_801719C4) # $t6, 0x8017 -/* B5B934 800E4794 8DCE19C4 */ lw $t6, %lo(D_801719C4)($t6) +/* B5B930 800E4790 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2844) # $t6, 0x8017 +/* B5B934 800E4794 8DCE19C4 */ lw $t6, %lo(gAudioContext+0x2844)($t6) /* B5B938 800E4798 00047880 */ sll $t7, $a0, 2 /* B5B93C 800E479C 01E47821 */ addu $t7, $t7, $a0 /* B5B940 800E47A0 000F7880 */ sll $t7, $t7, 2 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E4918.s b/asm/non_matchings/code/code_800E11F0/func_800E4918.s index f9809647d2..5b8ebc89f8 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E4918.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E4918.s @@ -291,12 +291,12 @@ glabel func_800E4918 /* B5BECC 800E4D2C 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff /* B5BED0 800E4D30 8E030000 */ lw $v1, ($s0) /* B5BED4 800E4D34 8C450D5C */ lw $a1, 0xd5c($v0) -/* B5BED8 800E4D38 3C0E8017 */ lui $t6, %hi(D_80170FF8) # $t6, 0x8017 +/* B5BED8 800E4D38 3C0E8017 */ lui $t6, %hi(gAudioContext+0x1e78) # $t6, 0x8017 /* B5BEDC 800E4D3C 00613024 */ and $a2, $v1, $at /* B5BEE0 800E4D40 00064B02 */ srl $t1, $a2, 0xc /* B5BEE4 800E4D44 8E040004 */ lw $a0, 4($s0) /* B5BEE8 800E4D48 25290001 */ addiu $t1, $t1, 1 -/* B5BEEC 800E4D4C 25CE0FF8 */ addiu $t6, %lo(D_80170FF8) # addiu $t6, $t6, 0xff8 +/* B5BEEC 800E4D4C 25CE0FF8 */ addiu $t6, %lo(gAudioContext+0x1e78) # addiu $t6, $t6, 0xff8 /* B5BEF0 800E4D50 AFAE0014 */ sw $t6, 0x14($sp) /* B5BEF4 800E4D54 AFA90010 */ sw $t1, 0x10($sp) /* B5BEF8 800E4D58 8C4D0D60 */ lw $t5, 0xd60($v0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E5000.s b/asm/non_matchings/code/code_800E11F0/func_800E5000.s index 7fd3a05da5..52a3e49105 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E5000.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E5000.s @@ -33,10 +33,10 @@ glabel func_800E5000 /* B5C214 800E5074 24990001 */ addiu $t9, $a0, 1 /* B5C218 800E5078 0040F809 */ jalr $v0 /* B5C21C 800E507C 00000000 */ nop -/* B5C220 800E5080 3C038017 */ lui $v1, %hi(D_801719C8) # $v1, 0x8017 -/* B5C224 800E5084 3C188017 */ lui $t8, %hi(D_80171A1C) # $t8, 0x8017 -/* B5C228 800E5088 8F181A1C */ lw $t8, %lo(D_80171A1C)($t8) -/* B5C22C 800E508C 846319C8 */ lh $v1, %lo(D_801719C8)($v1) +/* B5C220 800E5080 3C038017 */ lui $v1, %hi(gAudioContext+0x2848) # $v1, 0x8017 +/* B5C224 800E5084 3C188017 */ lui $t8, %hi(gAudioContext+0x289c) # $t8, 0x8017 +/* B5C228 800E5088 8F181A1C */ lw $t8, %lo(gAudioContext+0x289c)($t8) +/* B5C22C 800E508C 846319C8 */ lh $v1, %lo(gAudioContext+0x2848)($v1) /* B5C230 800E5090 0303001A */ div $zero, $t8, $v1 /* B5C234 800E5094 00002010 */ mfhi $a0 /* B5C238 800E5098 14600002 */ bnez $v1, .L800E50A4 @@ -126,8 +126,8 @@ glabel func_800E5000 /* B5C360 800E51C0 00000000 */ nop /* B5C364 800E51C4 8E4328A0 */ lw $v1, 0x28a0($s2) .L800E51C8: -/* B5C368 800E51C8 3C118017 */ lui $s1, %hi(D_80171050) # $s1, 0x8017 -/* B5C36C 800E51CC 26311050 */ addiu $s1, %lo(D_80171050) # addiu $s1, $s1, 0x1050 +/* B5C368 800E51C8 3C118017 */ lui $s1, %hi(gAudioContext+0x1ed0) # $s1, 0x8017 +/* B5C36C 800E51CC 26311050 */ addiu $s1, %lo(gAudioContext+0x1ed0) # addiu $s1, $s1, 0x1050 /* B5C370 800E51D0 1860000E */ blez $v1, .L800E520C /* B5C374 800E51D4 00008025 */ move $s0, $zero /* B5C378 800E51D8 02202025 */ move $a0, $s1 @@ -146,9 +146,9 @@ glabel func_800E5000 /* B5C3A4 800E5204 5420FFF5 */ bnezl $at, .L800E51DC /* B5C3A8 800E5208 02202025 */ move $a0, $s1 .L800E520C: -/* B5C3AC 800E520C 3C118017 */ lui $s1, %hi(D_80171050) # $s1, 0x8017 +/* B5C3AC 800E520C 3C118017 */ lui $s1, %hi(gAudioContext+0x1ed0) # $s1, 0x8017 /* B5C3B0 800E5210 1060000C */ beqz $v1, .L800E5244 -/* B5C3B4 800E5214 26311050 */ addiu $s1, %lo(D_80171050) # addiu $s1, $s1, 0x1050 +/* B5C3B4 800E5214 26311050 */ addiu $s1, %lo(gAudioContext+0x1ed0) # addiu $s1, $s1, 0x1050 /* B5C3B8 800E5218 1860000A */ blez $v1, .L800E5244 /* B5C3BC 800E521C 00008025 */ move $s0, $zero /* B5C3C0 800E5220 02202025 */ move $a0, $s1 diff --git a/asm/non_matchings/code/code_800E11F0/func_800E5584.s b/asm/non_matchings/code/code_800E11F0/func_800E5584.s index 25efeb0e42..3388cf321e 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E5584.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E5584.s @@ -66,7 +66,7 @@ glabel L800E563C /* B5C810 800E5670 8E050004 */ lw $a1, 4($s0) /* B5C814 800E5674 14A00005 */ bnez $a1, .L800E568C /* B5C818 800E5678 00000000 */ nop -/* B5C81C 800E567C 0C03A6D1 */ jal func_800E9B44 +/* B5C81C 800E567C 0C03A6D1 */ jal Audio_SequencePlayerDisableAsFinished /* B5C820 800E5680 24643530 */ addiu $a0, $v1, 0x3530 /* B5C824 800E5684 100000B0 */ b .L800E5948 /* B5C828 800E5688 8FBF001C */ lw $ra, 0x1c($sp) @@ -170,8 +170,8 @@ glabel L800E57D8 /* B5C988 800E57E8 10000057 */ b .L800E5948 /* B5C98C 800E57EC 8FBF001C */ lw $ra, 0x1c($sp) glabel L800E57F0 -/* B5C990 800E57F0 3C078017 */ lui $a3, %hi(D_80170FA0) # $a3, 0x8017 -/* B5C994 800E57F4 24E70FA0 */ addiu $a3, %lo(D_80170FA0) # addiu $a3, $a3, 0xfa0 +/* B5C990 800E57F0 3C078017 */ lui $a3, %hi(gAudioContext+0x1e20) # $a3, 0x8017 +/* B5C994 800E57F4 24E70FA0 */ addiu $a3, %lo(gAudioContext+0x1e20) # addiu $a3, $a3, 0xfa0 /* B5C998 800E57F8 92040001 */ lbu $a0, 1($s0) /* B5C99C 800E57FC 92050002 */ lbu $a1, 2($s0) /* B5C9A0 800E5800 0C0387AC */ jal func_800E1EB0 @@ -179,8 +179,8 @@ glabel L800E57F0 /* B5C9A8 800E5808 1000004F */ b .L800E5948 /* B5C9AC 800E580C 8FBF001C */ lw $ra, 0x1c($sp) glabel L800E5810 -/* B5C9B0 800E5810 3C078017 */ lui $a3, %hi(D_80170FA0) # $a3, 0x8017 -/* B5C9B4 800E5814 24E70FA0 */ addiu $a3, %lo(D_80170FA0) # addiu $a3, $a3, 0xfa0 +/* B5C9B0 800E5810 3C078017 */ lui $a3, %hi(gAudioContext+0x1e20) # $a3, 0x8017 +/* B5C9B4 800E5814 24E70FA0 */ addiu $a3, %lo(gAudioContext+0x1e20) # addiu $a3, $a3, 0xfa0 /* B5C9B8 800E5818 92040001 */ lbu $a0, 1($s0) /* B5C9BC 800E581C 92050002 */ lbu $a1, 2($s0) /* B5C9C0 800E5820 0C0387BD */ jal func_800E1EF4 @@ -188,8 +188,8 @@ glabel L800E5810 /* B5C9C8 800E5828 10000047 */ b .L800E5948 /* B5C9CC 800E582C 8FBF001C */ lw $ra, 0x1c($sp) glabel L800E5830 -/* B5C9D0 800E5830 3C078017 */ lui $a3, %hi(D_80170FA0) # $a3, 0x8017 -/* B5C9D4 800E5834 24E70FA0 */ addiu $a3, %lo(D_80170FA0) # addiu $a3, $a3, 0xfa0 +/* B5C9D0 800E5830 3C078017 */ lui $a3, %hi(gAudioContext+0x1e20) # $a3, 0x8017 +/* B5C9D4 800E5834 24E70FA0 */ addiu $a3, %lo(gAudioContext+0x1e20) # addiu $a3, $a3, 0xfa0 /* B5C9D8 800E5838 92040001 */ lbu $a0, 1($s0) /* B5C9DC 800E583C 92050002 */ lbu $a1, 2($s0) /* B5C9E0 800E5840 0C03879B */ jal func_800E1E6C @@ -249,10 +249,10 @@ glabel L800E58C8 /* B5CA9C 800E58FC 001847C2 */ srl $t0, $t8, 0x1f /* B5CAA0 800E5900 51000007 */ beql $t0, $zero, .L800E5920 /* B5CAA4 800E5904 24A50001 */ addiu $a1, $a1, 1 -/* B5CAA8 800E5908 0C03A6D1 */ jal func_800E9B44 +/* B5CAA8 800E5908 0C03A6D1 */ jal Audio_SequencePlayerDisableAsFinished /* B5CAAC 800E590C AFA50034 */ sw $a1, 0x34($sp) -/* B5CAB0 800E5910 3C028017 */ lui $v0, %hi(D_801719DC) # $v0, 0x8017 -/* B5CAB4 800E5914 844219DC */ lh $v0, %lo(D_801719DC)($v0) +/* B5CAB0 800E5910 3C028017 */ lui $v0, %hi(gAudioContext+0x285c) # $v0, 0x8017 +/* B5CAB4 800E5914 844219DC */ lh $v0, %lo(gAudioContext+0x285c)($v0) /* B5CAB8 800E5918 8FA50034 */ lw $a1, 0x34($sp) /* B5CABC 800E591C 24A50001 */ addiu $a1, $a1, 1 .L800E5920: diff --git a/asm/non_matchings/code/code_800E11F0/func_800E5E20.s b/asm/non_matchings/code/code_800E11F0/func_800E5E20.s index 3863d6436f..2344f88e9a 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E5E20.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E5E20.s @@ -2,8 +2,8 @@ glabel func_800E5E20 /* B5CFC0 800E5E20 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B5CFC4 800E5E24 AFA40020 */ sw $a0, 0x20($sp) /* B5CFC8 800E5E28 AFBF0014 */ sw $ra, 0x14($sp) -/* B5CFCC 800E5E2C 3C048017 */ lui $a0, %hi(D_80170FA0) # $a0, 0x8017 -/* B5CFD0 800E5E30 24840FA0 */ addiu $a0, %lo(D_80170FA0) # addiu $a0, $a0, 0xfa0 +/* B5CFCC 800E5E2C 3C048017 */ lui $a0, %hi(gAudioContext+0x1e20) # $a0, 0x8017 +/* B5CFD0 800E5E30 24840FA0 */ addiu $a0, %lo(gAudioContext+0x1e20) # addiu $a0, $a0, 0xfa0 /* B5CFD4 800E5E34 27A5001C */ addiu $a1, $sp, 0x1c /* B5CFD8 800E5E38 0C000CA0 */ jal osRecvMesg /* B5CFDC 800E5E3C 00003025 */ move $a2, $zero diff --git a/asm/non_matchings/code/code_800E11F0/func_800E5EDC.s b/asm/non_matchings/code/code_800E11F0/func_800E5EDC.s index ce5d6848a9..eb9f2d4ff8 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E5EDC.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E5EDC.s @@ -12,8 +12,8 @@ glabel func_800E5EDC /* B5D0A4 800E5F04 10000009 */ b .L800E5F2C /* B5D0A8 800E5F08 00001025 */ move $v0, $zero .L800E5F0C: -/* B5D0AC 800E5F0C 3C0F8017 */ lui $t7, %hi(D_80172699) # $t7, 0x8017 -/* B5D0B0 800E5F10 91EF2699 */ lbu $t7, %lo(D_80172699)($t7) +/* B5D0AC 800E5F0C 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3519) # $t7, 0x8017 +/* B5D0B0 800E5F10 91EF2699 */ lbu $t7, %lo(gAudioContext+0x3519)($t7) /* B5D0B4 800E5F14 8FAE0018 */ lw $t6, 0x18($sp) /* B5D0B8 800E5F18 24020001 */ li $v0, 1 /* B5D0BC 800E5F1C 11CF0003 */ beq $t6, $t7, .L800E5F2C diff --git a/asm/non_matchings/code/code_800E11F0/func_800E60C4.s b/asm/non_matchings/code/code_800E11F0/func_800E60C4.s index 13de02de80..e44cf42924 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E60C4.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E60C4.s @@ -5,8 +5,8 @@ glabel func_800E60C4 /* B5D270 800E60D0 01C47023 */ subu $t6, $t6, $a0 /* B5D274 800E60D4 000E7140 */ sll $t6, $t6, 5 /* B5D278 800E60D8 01C57821 */ addu $t7, $t6, $a1 -/* B5D27C 800E60DC 3C028017 */ lui $v0, %hi(D_80172808) +/* B5D27C 800E60DC 3C028017 */ lui $v0, %hi(gAudioContext+0x3688) /* B5D280 800E60E0 004F1021 */ addu $v0, $v0, $t7 /* B5D284 800E60E4 03E00008 */ jr $ra -/* B5D288 800E60E8 80422808 */ lb $v0, %lo(D_80172808)($v0) +/* B5D288 800E60E8 80422808 */ lb $v0, %lo(gAudioContext+0x3688)($v0) diff --git a/asm/non_matchings/code/code_800E11F0/func_800E60EC.s b/asm/non_matchings/code/code_800E11F0/func_800E60EC.s index 84f79e5cf4..2028272111 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E60EC.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E60EC.s @@ -4,9 +4,9 @@ glabel func_800E60EC /* B5D294 800E60F4 00802825 */ move $a1, $a0 /* B5D298 800E60F8 AFA40018 */ sw $a0, 0x18($sp) /* B5D29C 800E60FC AFBF0014 */ sw $ra, 0x14($sp) -/* B5D2A0 800E6100 3C048017 */ lui $a0, %hi(D_80171B20) # $a0, 0x8017 -/* B5D2A4 800E6104 0C03790D */ jal func_800DE434 -/* B5D2A8 800E6108 24841B20 */ addiu $a0, %lo(D_80171B20) # addiu $a0, $a0, 0x1b20 +/* B5D2A0 800E6100 3C048017 */ lui $a0, %hi(gAudioContext+0x29a0) # $a0, 0x8017 +/* B5D2A4 800E6104 0C03790D */ jal Audio_SoundAllocPoolInit +/* B5D2A8 800E6108 24841B20 */ addiu $a0, %lo(gAudioContext+0x29a0) # addiu $a0, $a0, 0x1b20 /* B5D2AC 800E610C 8FBF0014 */ lw $ra, 0x14($sp) /* B5D2B0 800E6110 27BD0018 */ addiu $sp, $sp, 0x18 /* B5D2B4 800E6114 03E00008 */ jr $ra diff --git a/asm/non_matchings/code/code_800E11F0/func_800E611C.s b/asm/non_matchings/code/code_800E11F0/func_800E611C.s index 3340a07838..2f43f1c779 100644 --- a/asm/non_matchings/code/code_800E11F0/func_800E611C.s +++ b/asm/non_matchings/code/code_800E11F0/func_800E611C.s @@ -1,5 +1,5 @@ glabel func_800E611C -/* B5D2BC 800E611C 3C018017 */ lui $at, %hi(D_80171B20) +/* B5D2BC 800E611C 3C018017 */ lui $at, %hi(gAudioContext+0x29a0) /* B5D2C0 800E6120 03E00008 */ jr $ra -/* B5D2C4 800E6124 AC201B20 */ sw $zero, %lo(D_80171B20)($at) +/* B5D2C4 800E6124 AC201B20 */ sw $zero, %lo(gAudioContext+0x29a0)($at) diff --git a/asm/non_matchings/code/code_800EC960/func_800EE6F4.s b/asm/non_matchings/code/code_800EC960/func_800EE6F4.s index f26bd75d95..e655fc968e 100644 --- a/asm/non_matchings/code/code_800EC960/func_800EE6F4.s +++ b/asm/non_matchings/code/code_800EC960/func_800EE6F4.s @@ -1,8 +1,8 @@ glabel func_800EE6F4 /* B65894 800EE6F4 3C0F8013 */ lui $t7, %hi(D_80130F10) # $t7, 0x8013 /* B65898 800EE6F8 81EF0F10 */ lb $t7, %lo(D_80130F10)($t7) -/* B6589C 800EE6FC 3C0E8017 */ lui $t6, %hi(D_80171A1C) # $t6, 0x8017 -/* B658A0 800EE700 8DCE1A1C */ lw $t6, %lo(D_80171A1C)($t6) +/* B6589C 800EE6FC 3C0E8017 */ lui $t6, %hi(gAudioContext+0x289c) # $t6, 0x8017 +/* B658A0 800EE700 8DCE1A1C */ lw $t6, %lo(gAudioContext+0x289c)($t6) /* B658A4 800EE704 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B658A8 800EE708 3C018017 */ lui $at, %hi(D_8016BA04) # $at, 0x8017 /* B658AC 800EE70C AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/code/code_800EC960/func_800EEA50.s b/asm/non_matchings/code/code_800EC960/func_800EEA50.s index 15c93680b4..03e9d45abb 100644 --- a/asm/non_matchings/code/code_800EC960/func_800EEA50.s +++ b/asm/non_matchings/code/code_800EC960/func_800EEA50.s @@ -618,8 +618,8 @@ glabel func_800EEA50 /* B65D28 800EEB88 3C0E8013 */ lui $t6, %hi(D_80131F68) # $t6, 0x8013 /* B65D2C 800EEB8C 18800013 */ blez $a0, .L800EEBDC /* B65D30 800EEB90 2718B9E0 */ addiu $t8, %lo(D_8016B9E0) # addiu $t8, $t8, -0x4620 -/* B65D34 800EEB94 3C028017 */ lui $v0, %hi(D_801726AC) # $v0, 0x8017 -/* B65D38 800EEB98 8C4226AC */ lw $v0, %lo(D_801726AC)($v0) +/* B65D34 800EEB94 3C028017 */ lui $v0, %hi(gAudioContext+0x352c) # $v0, 0x8017 +/* B65D38 800EEB98 8C4226AC */ lw $v0, %lo(gAudioContext+0x352c)($v0) /* B65D3C 800EEB9C 24070001 */ li $a3, 1 /* B65D40 800EEBA0 240300E0 */ li $v1, 224 .L800EEBA4: @@ -1368,7 +1368,7 @@ glabel L800EF3F0 /* B66870 800EF6D0 8C590004 */ lw $t9, 4($v0) .L800EF6D4: /* B66874 800EF6D4 8C4F0000 */ lw $t7, ($v0) -/* B66878 800EF6D8 3C038017 */ lui $v1, %hi(D_801729A8) +/* B66878 800EF6D8 3C038017 */ lui $v1, %hi(gAudioContext+0x3828) /* B6687C 800EF6DC C7280000 */ lwc1 $f8, ($t9) /* B66880 800EF6E0 C5E40000 */ lwc1 $f4, ($t7) /* B66884 800EF6E4 3C058015 */ lui $a1, %hi(D_80149EAC) # $a1, 0x8015 @@ -1389,7 +1389,7 @@ glabel L800EF3F0 /* B668C0 800EF720 904F002E */ lbu $t7, 0x2e($v0) /* B668C4 800EF724 000FC080 */ sll $t8, $t7, 2 /* B668C8 800EF728 00781821 */ addu $v1, $v1, $t8 -/* B668CC 800EF72C 8C6329A8 */ lw $v1, %lo(D_801729A8)($v1) +/* B668CC 800EF72C 8C6329A8 */ lw $v1, %lo(gAudioContext+0x3828)($v1) /* B668D0 800EF730 C464002C */ lwc1 $f4, 0x2c($v1) /* B668D4 800EF734 46142182 */ mul.s $f6, $f4, $f20 /* B668D8 800EF738 4600320D */ trunc.w.s $f8, $f6 @@ -1439,7 +1439,7 @@ glabel L800EF3F0 /* B66978 800EF7D8 8C4F0004 */ lw $t7, 4($v0) .L800EF7DC: /* B6697C 800EF7DC 8C4D0000 */ lw $t5, ($v0) -/* B66980 800EF7E0 3C038017 */ lui $v1, %hi(D_801729A8) +/* B66980 800EF7E0 3C038017 */ lui $v1, %hi(gAudioContext+0x3828) /* B66984 800EF7E4 C5F20000 */ lwc1 $f18, ($t7) /* B66988 800EF7E8 C5AA0000 */ lwc1 $f10, ($t5) /* B6698C 800EF7EC 3C058015 */ lui $a1, %hi(D_80149EF0) # $a1, 0x8015 @@ -1460,7 +1460,7 @@ glabel L800EF3F0 /* B669C8 800EF828 904D002E */ lbu $t5, 0x2e($v0) /* B669CC 800EF82C 000D7080 */ sll $t6, $t5, 2 /* B669D0 800EF830 006E1821 */ addu $v1, $v1, $t6 -/* B669D4 800EF834 8C6329A8 */ lw $v1, %lo(D_801729A8)($v1) +/* B669D4 800EF834 8C6329A8 */ lw $v1, %lo(gAudioContext+0x3828)($v1) /* B669D8 800EF838 C46A0038 */ lwc1 $f10, 0x38($v1) /* B669DC 800EF83C 46165402 */ mul.s $f16, $f10, $f22 /* B669E0 800EF840 4600848D */ trunc.w.s $f18, $f16 @@ -2164,7 +2164,7 @@ glabel L800F008C /* B67460 800F02C0 24060007 */ li $a2, 7 /* B67464 800F02C4 92AE0000 */ lbu $t6, ($s5) /* B67468 800F02C8 00168880 */ sll $s1, $s6, 2 -/* B6746C 800F02CC 3C198017 */ lui $t9, %hi(D_801726E8) +/* B6746C 800F02CC 3C198017 */ lui $t9, %hi(gAudioContext+0x3568) /* B67470 800F02D0 000E7880 */ sll $t7, $t6, 2 /* B67474 800F02D4 01EE7823 */ subu $t7, $t7, $t6 /* B67478 800F02D8 000F7880 */ sll $t7, $t7, 2 @@ -2172,7 +2172,7 @@ glabel L800F008C /* B67480 800F02E0 000F7940 */ sll $t7, $t7, 5 /* B67484 800F02E4 01F1C021 */ addu $t8, $t7, $s1 /* B67488 800F02E8 0338C821 */ addu $t9, $t9, $t8 -/* B6748C 800F02EC 8F3926E8 */ lw $t9, %lo(D_801726E8)($t9) +/* B6748C 800F02EC 8F3926E8 */ lw $t9, %lo(gAudioContext+0x3568)($t9) /* B67490 800F02F0 8FA400B0 */ lw $a0, 0xb0($sp) /* B67494 800F02F4 3C058015 */ lui $a1, %hi(D_8014A05C) # $a1, 0x8015 /* B67498 800F02F8 8F2A0000 */ lw $t2, ($t9) @@ -2193,7 +2193,7 @@ glabel L800F008C /* B674CC 800F032C 0C03ED07 */ jal GfxPrint_SetPos /* B674D0 800F0330 24060008 */ li $a2, 8 /* B674D4 800F0334 92AC0000 */ lbu $t4, ($s5) -/* B674D8 800F0338 3C0F8017 */ lui $t7, %hi(D_801726E8) +/* B674D8 800F0338 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3568) /* B674DC 800F033C 8FA400B0 */ lw $a0, 0xb0($sp) /* B674E0 800F0340 000C6880 */ sll $t5, $t4, 2 /* B674E4 800F0344 01AC6823 */ subu $t5, $t5, $t4 @@ -2202,7 +2202,7 @@ glabel L800F008C /* B674F0 800F0350 000D6940 */ sll $t5, $t5, 5 /* B674F4 800F0354 01B17021 */ addu $t6, $t5, $s1 /* B674F8 800F0358 01EE7821 */ addu $t7, $t7, $t6 -/* B674FC 800F035C 8DEF26E8 */ lw $t7, %lo(D_801726E8)($t7) +/* B674FC 800F035C 8DEF26E8 */ lw $t7, %lo(gAudioContext+0x3568)($t7) /* B67500 800F0360 3C058015 */ lui $a1, %hi(D_8014A064) /* B67504 800F0364 8DF80000 */ lw $t8, ($t7) /* B67508 800F0368 001850C0 */ sll $t2, $t8, 3 @@ -2223,7 +2223,7 @@ glabel L800F008C /* B6753C 800F039C 0C03ED07 */ jal GfxPrint_SetPos /* B67540 800F03A0 24060009 */ li $a2, 9 /* B67544 800F03A4 92AB0000 */ lbu $t3, ($s5) -/* B67548 800F03A8 3C028017 */ lui $v0, %hi(D_801726E8) +/* B67548 800F03A8 3C028017 */ lui $v0, %hi(gAudioContext+0x3568) /* B6754C 800F03AC 00008025 */ move $s0, $zero /* B67550 800F03B0 000B6080 */ sll $t4, $t3, 2 /* B67554 800F03B4 018B6023 */ subu $t4, $t4, $t3 @@ -2232,7 +2232,7 @@ glabel L800F008C /* B67560 800F03C0 000C6140 */ sll $t4, $t4, 5 /* B67564 800F03C4 01916821 */ addu $t5, $t4, $s1 /* B67568 800F03C8 004D1021 */ addu $v0, $v0, $t5 -/* B6756C 800F03CC 8C4226E8 */ lw $v0, %lo(D_801726E8)($v0) +/* B6756C 800F03CC 8C4226E8 */ lw $v0, %lo(gAudioContext+0x3568)($v0) /* B67570 800F03D0 00107080 */ sll $t6, $s0, 2 .L800F03D4: /* B67574 800F03D4 004E7821 */ addu $t7, $v0, $t6 @@ -2418,9 +2418,9 @@ glabel L800F008C /* B67838 800F0698 000F7940 */ sll $t7, $t7, 5 /* B6783C 800F069C 0018C880 */ sll $t9, $t8, 2 /* B67840 800F06A0 01F95021 */ addu $t2, $t7, $t9 -/* B67844 800F06A4 3C0B8017 */ lui $t3, %hi(D_801726E8) +/* B67844 800F06A4 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3568) /* B67848 800F06A8 016A5821 */ addu $t3, $t3, $t2 -/* B6784C 800F06AC 8D6B26E8 */ lw $t3, %lo(D_801726E8)($t3) +/* B6784C 800F06AC 8D6B26E8 */ lw $t3, %lo(gAudioContext+0x3568)($t3) /* B67850 800F06B0 8FA400B0 */ lw $a0, 0xb0($sp) /* B67854 800F06B4 02002825 */ move $a1, $s0 /* B67858 800F06B8 01766021 */ addu $t4, $t3, $s6 @@ -2441,9 +2441,9 @@ glabel L800F008C /* B67894 800F06F4 000E7140 */ sll $t6, $t6, 5 /* B67898 800F06F8 00187880 */ sll $t7, $t8, 2 /* B6789C 800F06FC 01CFC821 */ addu $t9, $t6, $t7 -/* B678A0 800F0700 3C0A8017 */ lui $t2, %hi(D_801726E8) +/* B678A0 800F0700 3C0A8017 */ lui $t2, %hi(gAudioContext+0x3568) /* B678A4 800F0704 01595021 */ addu $t2, $t2, $t9 -/* B678A8 800F0708 8D4A26E8 */ lw $t2, %lo(D_801726E8)($t2) +/* B678A8 800F0708 8D4A26E8 */ lw $t2, %lo(gAudioContext+0x3568)($t2) /* B678AC 800F070C 8FA400B0 */ lw $a0, 0xb0($sp) /* B678B0 800F0710 2405000F */ li $a1, 15 /* B678B4 800F0714 8D4B0000 */ lw $t3, ($t2) @@ -2462,9 +2462,9 @@ glabel L800F008C /* B678E8 800F0748 0018C140 */ sll $t8, $t8, 5 /* B678EC 800F074C 000E7880 */ sll $t7, $t6, 2 /* B678F0 800F0750 030FC821 */ addu $t9, $t8, $t7 -/* B678F4 800F0754 3C0A8017 */ lui $t2, %hi(D_801726E8) +/* B678F4 800F0754 3C0A8017 */ lui $t2, %hi(gAudioContext+0x3568) /* B678F8 800F0758 01595021 */ addu $t2, $t2, $t9 -/* B678FC 800F075C 8D4A26E8 */ lw $t2, %lo(D_801726E8)($t2) +/* B678FC 800F075C 8D4A26E8 */ lw $t2, %lo(gAudioContext+0x3568)($t2) /* B67900 800F0760 3C018015 */ lui $at, %hi(D_8014A4C8) /* B67904 800F0764 D434A4C8 */ ldc1 $f20, %lo(D_8014A4C8)($at) /* B67908 800F0768 C544002C */ lwc1 $f4, 0x2c($t2) @@ -2525,9 +2525,9 @@ glabel L800F008C /* B679D8 800F0838 000D6940 */ sll $t5, $t5, 5 /* B679DC 800F083C 000EC080 */ sll $t8, $t6, 2 /* B679E0 800F0840 01B87821 */ addu $t7, $t5, $t8 -/* B679E4 800F0844 3C198017 */ lui $t9, %hi(D_801726E8) +/* B679E4 800F0844 3C198017 */ lui $t9, %hi(gAudioContext+0x3568) /* B679E8 800F0848 032FC821 */ addu $t9, $t9, $t7 -/* B679EC 800F084C 8F3926E8 */ lw $t9, %lo(D_801726E8)($t9) +/* B679EC 800F084C 8F3926E8 */ lw $t9, %lo(gAudioContext+0x3568)($t9) /* B679F0 800F0850 24060001 */ li $a2, 1 /* B679F4 800F0854 3C058015 */ lui $a1, %hi(D_8014A10C) /* B679F8 800F0858 C7300028 */ lwc1 $f16, 0x28($t9) @@ -2586,9 +2586,9 @@ glabel L800F008C /* B67AC0 800F0920 000C6140 */ sll $t4, $t4, 5 /* B67AC4 800F0924 000E6880 */ sll $t5, $t6, 2 /* B67AC8 800F0928 018DC021 */ addu $t8, $t4, $t5 -/* B67ACC 800F092C 3C0F8017 */ lui $t7, %hi(D_801726E8) +/* B67ACC 800F092C 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3568) /* B67AD0 800F0930 01F87821 */ addu $t7, $t7, $t8 -/* B67AD4 800F0934 8DEF26E8 */ lw $t7, %lo(D_801726E8)($t7) +/* B67AD4 800F0934 8DEF26E8 */ lw $t7, %lo(gAudioContext+0x3568)($t7) /* B67AD8 800F0938 3C058015 */ lui $a1, %hi(D_8014A110) # $a1, 0x8015 /* B67ADC 800F093C 24A5A110 */ addiu $a1, %lo(D_8014A110) # addiu $a1, $a1, -0x5ef0 /* B67AE0 800F0940 8FA400B0 */ lw $a0, 0xb0($sp) @@ -2604,9 +2604,9 @@ glabel L800F008C /* B67B08 800F0968 000A5140 */ sll $t2, $t2, 5 /* B67B0C 800F096C 000B7080 */ sll $t6, $t3, 2 /* B67B10 800F0970 014E6021 */ addu $t4, $t2, $t6 -/* B67B14 800F0974 3C0D8017 */ lui $t5, %hi(D_801726E8) +/* B67B14 800F0974 3C0D8017 */ lui $t5, %hi(gAudioContext+0x3568) /* B67B18 800F0978 01AC6821 */ addu $t5, $t5, $t4 -/* B67B1C 800F097C 8DAD26E8 */ lw $t5, %lo(D_801726E8)($t5) +/* B67B1C 800F097C 8DAD26E8 */ lw $t5, %lo(gAudioContext+0x3568)($t5) /* B67B20 800F0980 8FA400B0 */ lw $a0, 0xb0($sp) /* B67B24 800F0984 2405000F */ li $a1, 15 /* B67B28 800F0988 91B20025 */ lbu $s2, 0x25($t5) @@ -2643,9 +2643,9 @@ glabel L800F008C /* B67B9C 800F09FC 000F7940 */ sll $t7, $t7, 5 /* B67BA0 800F0A00 00195880 */ sll $t3, $t9, 2 /* B67BA4 800F0A04 01EB5021 */ addu $t2, $t7, $t3 -/* B67BA8 800F0A08 3C0E8017 */ lui $t6, %hi(D_801726E8) +/* B67BA8 800F0A08 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3568) /* B67BAC 800F0A0C 01CA7021 */ addu $t6, $t6, $t2 -/* B67BB0 800F0A10 8DCE26E8 */ lw $t6, %lo(D_801726E8)($t6) +/* B67BB0 800F0A10 8DCE26E8 */ lw $t6, %lo(gAudioContext+0x3568)($t6) /* B67BB4 800F0A14 3C058015 */ lui $a1, %hi(D_8014A118) # $a1, 0x8015 /* B67BB8 800F0A18 24A5A118 */ addiu $a1, %lo(D_8014A118) # addiu $a1, $a1, -0x5ee8 /* B67BBC 800F0A1C 8FA400B0 */ lw $a0, 0xb0($sp) @@ -2665,9 +2665,9 @@ glabel L800F008C /* B67BF4 800F0A54 000D6940 */ sll $t5, $t5, 5 /* B67BF8 800F0A58 0018C880 */ sll $t9, $t8, 2 /* B67BFC 800F0A5C 01B97821 */ addu $t7, $t5, $t9 -/* B67C00 800F0A60 3C0B8017 */ lui $t3, %hi(D_801726E8) +/* B67C00 800F0A60 3C0B8017 */ lui $t3, %hi(gAudioContext+0x3568) /* B67C04 800F0A64 016F5821 */ addu $t3, $t3, $t7 -/* B67C08 800F0A68 8D6B26E8 */ lw $t3, %lo(D_801726E8)($t3) +/* B67C08 800F0A68 8D6B26E8 */ lw $t3, %lo(gAudioContext+0x3568)($t3) /* B67C0C 800F0A6C 3C058015 */ lui $a1, %hi(D_8014A11C) # $a1, 0x8015 /* B67C10 800F0A70 24A5A11C */ addiu $a1, %lo(D_8014A11C) # addiu $a1, $a1, -0x5ee4 /* B67C14 800F0A74 8FA400B0 */ lw $a0, 0xb0($sp) @@ -2687,9 +2687,9 @@ glabel L800F008C /* B67C4C 800F0AAC 000E7140 */ sll $t6, $t6, 5 /* B67C50 800F0AB0 000CC080 */ sll $t8, $t4, 2 /* B67C54 800F0AB4 01D86821 */ addu $t5, $t6, $t8 -/* B67C58 800F0AB8 3C198017 */ lui $t9, %hi(D_801726E8) +/* B67C58 800F0AB8 3C198017 */ lui $t9, %hi(gAudioContext+0x3568) /* B67C5C 800F0ABC 032DC821 */ addu $t9, $t9, $t5 -/* B67C60 800F0AC0 8F3926E8 */ lw $t9, %lo(D_801726E8)($t9) +/* B67C60 800F0AC0 8F3926E8 */ lw $t9, %lo(gAudioContext+0x3568)($t9) /* B67C64 800F0AC4 3C058015 */ lui $a1, %hi(D_8014A120) # $a1, 0x8015 /* B67C68 800F0AC8 24A5A120 */ addiu $a1, %lo(D_8014A120) # addiu $a1, $a1, -0x5ee0 /* B67C6C 800F0ACC 8FA400B0 */ lw $a0, 0xb0($sp) @@ -2709,9 +2709,9 @@ glabel L800F008C /* B67CA4 800F0B04 000B5940 */ sll $t3, $t3, 5 /* B67CA8 800F0B08 000A6080 */ sll $t4, $t2, 2 /* B67CAC 800F0B0C 016C7021 */ addu $t6, $t3, $t4 -/* B67CB0 800F0B10 3C188017 */ lui $t8, %hi(D_801726E8) +/* B67CB0 800F0B10 3C188017 */ lui $t8, %hi(gAudioContext+0x3568) /* B67CB4 800F0B14 030EC021 */ addu $t8, $t8, $t6 -/* B67CB8 800F0B18 8F1826E8 */ lw $t8, %lo(D_801726E8)($t8) +/* B67CB8 800F0B18 8F1826E8 */ lw $t8, %lo(gAudioContext+0x3568)($t8) /* B67CBC 800F0B1C 3C058015 */ lui $a1, %hi(D_8014A124) # $a1, 0x8015 /* B67CC0 800F0B20 24A5A124 */ addiu $a1, %lo(D_8014A124) # addiu $a1, $a1, -0x5edc /* B67CC4 800F0B24 8FA400B0 */ lw $a0, 0xb0($sp) @@ -2731,9 +2731,9 @@ glabel L800F008C /* B67CFC 800F0B5C 0019C940 */ sll $t9, $t9, 5 /* B67D00 800F0B60 000F5080 */ sll $t2, $t7, 2 /* B67D04 800F0B64 032A5821 */ addu $t3, $t9, $t2 -/* B67D08 800F0B68 3C0C8017 */ lui $t4, %hi(D_801726E8) +/* B67D08 800F0B68 3C0C8017 */ lui $t4, %hi(gAudioContext+0x3568) /* B67D0C 800F0B6C 018B6021 */ addu $t4, $t4, $t3 -/* B67D10 800F0B70 8D8C26E8 */ lw $t4, %lo(D_801726E8)($t4) +/* B67D10 800F0B70 8D8C26E8 */ lw $t4, %lo(gAudioContext+0x3568)($t4) /* B67D14 800F0B74 3C058015 */ lui $a1, %hi(D_8014A128) # $a1, 0x8015 /* B67D18 800F0B78 24A5A128 */ addiu $a1, %lo(D_8014A128) # addiu $a1, $a1, -0x5ed8 /* B67D1C 800F0B7C 95860014 */ lhu $a2, 0x14($t4) @@ -2759,9 +2759,9 @@ glabel L800F008C /* B67D68 800F0BC8 0018C140 */ sll $t8, $t8, 5 /* B67D6C 800F0BCC 000D7880 */ sll $t7, $t5, 2 /* B67D70 800F0BD0 030FC821 */ addu $t9, $t8, $t7 -/* B67D74 800F0BD4 3C0A8017 */ lui $t2, %hi(D_801726E8) +/* B67D74 800F0BD4 3C0A8017 */ lui $t2, %hi(gAudioContext+0x3568) /* B67D78 800F0BD8 01595021 */ addu $t2, $t2, $t9 -/* B67D7C 800F0BDC 8D4A26E8 */ lw $t2, %lo(D_801726E8)($t2) +/* B67D7C 800F0BDC 8D4A26E8 */ lw $t2, %lo(gAudioContext+0x3568)($t2) /* B67D80 800F0BE0 3C058015 */ lui $a1, %hi(D_8014A12C) # $a1, 0x8015 /* B67D84 800F0BE4 24A5A12C */ addiu $a1, %lo(D_8014A12C) # addiu $a1, $a1, -0x5ed4 /* B67D88 800F0BE8 95460016 */ lhu $a2, 0x16($t2) @@ -2787,9 +2787,9 @@ glabel L800F008C /* B67DD4 800F0C34 000C6140 */ sll $t4, $t4, 5 /* B67DD8 800F0C38 000E6880 */ sll $t5, $t6, 2 /* B67DDC 800F0C3C 018DC021 */ addu $t8, $t4, $t5 -/* B67DE0 800F0C40 3C0F8017 */ lui $t7, %hi(D_801726E8) +/* B67DE0 800F0C40 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3568) /* B67DE4 800F0C44 01F87821 */ addu $t7, $t7, $t8 -/* B67DE8 800F0C48 8DEF26E8 */ lw $t7, %lo(D_801726E8)($t7) +/* B67DE8 800F0C48 8DEF26E8 */ lw $t7, %lo(gAudioContext+0x3568)($t7) /* B67DEC 800F0C4C 3C0142C8 */ li $at, 0x42C80000 # 0.000000 /* B67DF0 800F0C50 44815000 */ mtc1 $at, $f10 /* B67DF4 800F0C54 C5E80038 */ lwc1 $f8, 0x38($t7) @@ -2873,13 +2873,13 @@ glabel L800F0CFC /* B67F1C 800F0D7C 24050003 */ li $a1, 3 /* B67F20 800F0D80 0C03ED07 */ jal GfxPrint_SetPos /* B67F24 800F0D84 24060005 */ li $a2, 5 -/* B67F28 800F0D88 3C0B8017 */ lui $t3, %hi(D_80171B44) # $t3, 0x8017 -/* B67F2C 800F0D8C 3C0E8017 */ lui $t6, %hi(D_80171B40) # $t6, 0x8017 -/* B67F30 800F0D90 8DCE1B40 */ lw $t6, %lo(D_80171B40)($t6) -/* B67F34 800F0D94 8D6B1B44 */ lw $t3, %lo(D_80171B44)($t3) +/* B67F28 800F0D88 3C0B8017 */ lui $t3, %hi(gAudioContext+0x29c4) # $t3, 0x8017 +/* B67F2C 800F0D8C 3C0E8017 */ lui $t6, %hi(gAudioContext+0x29c0) # $t6, 0x8017 +/* B67F30 800F0D90 8DCE1B40 */ lw $t6, %lo(gAudioContext+0x29c0)($t6) +/* B67F34 800F0D94 8D6B1B44 */ lw $t3, %lo(gAudioContext+0x29c4)($t3) /* B67F38 800F0D98 3C058015 */ lui $a1, %hi(D_8014A140) # $a1, 0x8015 -/* B67F3C 800F0D9C 3C078017 */ lui $a3, %hi(D_80171B48) # $a3, 0x8017 -/* B67F40 800F0DA0 8CE71B48 */ lw $a3, %lo(D_80171B48)($a3) +/* B67F3C 800F0D9C 3C078017 */ lui $a3, %hi(gAudioContext+0x29c8) # $a3, 0x8017 +/* B67F40 800F0DA0 8CE71B48 */ lw $a3, %lo(gAudioContext+0x29c8)($a3) /* B67F44 800F0DA4 24A5A140 */ addiu $a1, %lo(D_8014A140) # addiu $a1, $a1, -0x5ec0 /* B67F48 800F0DA8 8FA400B0 */ lw $a0, 0xb0($sp) /* B67F4C 800F0DAC 0C03EF2D */ jal GfxPrint_Printf @@ -2888,17 +2888,17 @@ glabel L800F0CFC /* B67F58 800F0DB8 24050003 */ li $a1, 3 /* B67F5C 800F0DBC 0C03ED07 */ jal GfxPrint_SetPos /* B67F60 800F0DC0 24060006 */ li $a2, 6 -/* B67F64 800F0DC4 3C0C8017 */ lui $t4, %hi(D_80171C8C) # $t4, 0x8017 -/* B67F68 800F0DC8 3C0D8017 */ lui $t5, %hi(D_80171C98) # $t5, 0x8017 -/* B67F6C 800F0DCC 3C188017 */ lui $t8, %hi(D_80171C80) # $t8, 0x8017 -/* B67F70 800F0DD0 8F181C80 */ lw $t8, %lo(D_80171C80)($t8) -/* B67F74 800F0DD4 8DAD1C98 */ lw $t5, %lo(D_80171C98)($t5) -/* B67F78 800F0DD8 8D8C1C8C */ lw $t4, %lo(D_80171C8C)($t4) +/* B67F64 800F0DC4 3C0C8017 */ lui $t4, %hi(gAudioContext+0x2b0c) # $t4, 0x8017 +/* B67F68 800F0DC8 3C0D8017 */ lui $t5, %hi(gAudioContext+0x2b18) # $t5, 0x8017 +/* B67F6C 800F0DCC 3C188017 */ lui $t8, %hi(gAudioContext+0x2b00) # $t8, 0x8017 +/* B67F70 800F0DD0 8F181C80 */ lw $t8, %lo(gAudioContext+0x2b00)($t8) +/* B67F74 800F0DD4 8DAD1C98 */ lw $t5, %lo(gAudioContext+0x2b18)($t5) +/* B67F78 800F0DD8 8D8C1C8C */ lw $t4, %lo(gAudioContext+0x2b0c)($t4) /* B67F7C 800F0DDC 3C058015 */ lui $a1, %hi(D_8014A154) # $a1, 0x8015 -/* B67F80 800F0DE0 3C068017 */ lui $a2, %hi(D_80171C93) # $a2, 0x8017 -/* B67F84 800F0DE4 3C078017 */ lui $a3, %hi(D_80171C9F) # $a3, 0x8017 -/* B67F88 800F0DE8 90E71C9F */ lbu $a3, %lo(D_80171C9F)($a3) -/* B67F8C 800F0DEC 90C61C93 */ lbu $a2, %lo(D_80171C93)($a2) +/* B67F80 800F0DE0 3C068017 */ lui $a2, %hi(gAudioContext+0x2b13) # $a2, 0x8017 +/* B67F84 800F0DE4 3C078017 */ lui $a3, %hi(gAudioContext+0x2b1f) # $a3, 0x8017 +/* B67F88 800F0DE8 90E71C9F */ lbu $a3, %lo(gAudioContext+0x2b1f)($a3) +/* B67F8C 800F0DEC 90C61C93 */ lbu $a2, %lo(gAudioContext+0x2b13)($a2) /* B67F90 800F0DF0 24A5A154 */ addiu $a1, %lo(D_8014A154) # addiu $a1, $a1, -0x5eac /* B67F94 800F0DF4 8FA400B0 */ lw $a0, 0xb0($sp) /* B67F98 800F0DF8 AFB80018 */ sw $t8, 0x18($sp) @@ -2909,17 +2909,17 @@ glabel L800F0CFC /* B67FAC 800F0E0C 24050003 */ li $a1, 3 /* B67FB0 800F0E10 0C03ED07 */ jal GfxPrint_SetPos /* B67FB4 800F0E14 24060007 */ li $a2, 7 -/* B67FB8 800F0E18 3C0F8017 */ lui $t7, %hi(D_80171D9C) # $t7, 0x8017 -/* B67FBC 800F0E1C 3C198017 */ lui $t9, %hi(D_80171DA8) # $t9, 0x8017 -/* B67FC0 800F0E20 3C0A8017 */ lui $t2, %hi(D_80171D90) # $t2, 0x8017 -/* B67FC4 800F0E24 8D4A1D90 */ lw $t2, %lo(D_80171D90)($t2) -/* B67FC8 800F0E28 8F391DA8 */ lw $t9, %lo(D_80171DA8)($t9) -/* B67FCC 800F0E2C 8DEF1D9C */ lw $t7, %lo(D_80171D9C)($t7) +/* B67FB8 800F0E18 3C0F8017 */ lui $t7, %hi(gAudioContext+0x2c1c) # $t7, 0x8017 +/* B67FBC 800F0E1C 3C198017 */ lui $t9, %hi(gAudioContext+0x2c28) # $t9, 0x8017 +/* B67FC0 800F0E20 3C0A8017 */ lui $t2, %hi(gAudioContext+0x2c10) # $t2, 0x8017 +/* B67FC4 800F0E24 8D4A1D90 */ lw $t2, %lo(gAudioContext+0x2c10)($t2) +/* B67FC8 800F0E28 8F391DA8 */ lw $t9, %lo(gAudioContext+0x2c28)($t9) +/* B67FCC 800F0E2C 8DEF1D9C */ lw $t7, %lo(gAudioContext+0x2c1c)($t7) /* B67FD0 800F0E30 3C058015 */ lui $a1, %hi(D_8014A178) # $a1, 0x8015 -/* B67FD4 800F0E34 3C068017 */ lui $a2, %hi(D_80171DA3) # $a2, 0x8017 -/* B67FD8 800F0E38 3C078017 */ lui $a3, %hi(D_80171DAF) # $a3, 0x8017 -/* B67FDC 800F0E3C 90E71DAF */ lbu $a3, %lo(D_80171DAF)($a3) -/* B67FE0 800F0E40 90C61DA3 */ lbu $a2, %lo(D_80171DA3)($a2) +/* B67FD4 800F0E34 3C068017 */ lui $a2, %hi(gAudioContext+0x2c23) # $a2, 0x8017 +/* B67FD8 800F0E38 3C078017 */ lui $a3, %hi(gAudioContext+0x2c2f) # $a3, 0x8017 +/* B67FDC 800F0E3C 90E71DAF */ lbu $a3, %lo(gAudioContext+0x2c2f)($a3) +/* B67FE0 800F0E40 90C61DA3 */ lbu $a2, %lo(gAudioContext+0x2c23)($a2) /* B67FE4 800F0E44 24A5A178 */ addiu $a1, %lo(D_8014A178) # addiu $a1, $a1, -0x5e88 /* B67FE8 800F0E48 8FA400B0 */ lw $a0, 0xb0($sp) /* B67FEC 800F0E4C AFAA0018 */ sw $t2, 0x18($sp) @@ -2930,22 +2930,22 @@ glabel L800F0CFC /* B68000 800F0E60 24050003 */ li $a1, 3 /* B68004 800F0E64 0C03ED07 */ jal GfxPrint_SetPos /* B68008 800F0E68 24060008 */ li $a2, 8 -/* B6800C 800F0E6C 3C0B8017 */ lui $t3, %hi(D_80171BA8) # $t3, 0x8017 -/* B68010 800F0E70 3C0E8017 */ lui $t6, %hi(D_80171BA4) # $t6, 0x8017 -/* B68014 800F0E74 3C0C8017 */ lui $t4, %hi(D_80171BAC) # $t4, 0x8017 -/* B68018 800F0E78 8D8C1BAC */ lw $t4, %lo(D_80171BAC)($t4) -/* B6801C 800F0E7C 8DCE1BA4 */ lw $t6, %lo(D_80171BA4)($t6) -/* B68020 800F0E80 8D6B1BA8 */ lw $t3, %lo(D_80171BA8)($t3) +/* B6800C 800F0E6C 3C0B8017 */ lui $t3, %hi(gAudioContext+0x2a28) # $t3, 0x8017 +/* B68010 800F0E70 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2a24) # $t6, 0x8017 +/* B68014 800F0E74 3C0C8017 */ lui $t4, %hi(gAudioContext+0x2a2c) # $t4, 0x8017 +/* B68018 800F0E78 8D8C1BAC */ lw $t4, %lo(gAudioContext+0x2a2c)($t4) +/* B6801C 800F0E7C 8DCE1BA4 */ lw $t6, %lo(gAudioContext+0x2a24)($t6) +/* B68020 800F0E80 8D6B1BA8 */ lw $t3, %lo(gAudioContext+0x2a28)($t3) /* B68024 800F0E84 3C058015 */ lui $a1, %hi(D_8014A19C) # $a1, 0x8015 -/* B68028 800F0E88 3C068017 */ lui $a2, %hi(D_80171BA0) # $a2, 0x8017 -/* B6802C 800F0E8C 8CC61BA0 */ lw $a2, %lo(D_80171BA0)($a2) +/* B68028 800F0E88 3C068017 */ lui $a2, %hi(gAudioContext+0x2a20) # $a2, 0x8017 +/* B6802C 800F0E8C 8CC61BA0 */ lw $a2, %lo(gAudioContext+0x2a20)($a2) /* B68030 800F0E90 24A5A19C */ addiu $a1, %lo(D_8014A19C) # addiu $a1, $a1, -0x5e64 /* B68034 800F0E94 8FA400B0 */ lw $a0, 0xb0($sp) /* B68038 800F0E98 AFAC0010 */ sw $t4, 0x10($sp) /* B6803C 800F0E9C 0C03EF2D */ jal GfxPrint_Printf /* B68040 800F0EA0 016E3823 */ subu $a3, $t3, $t6 -/* B68044 800F0EA4 3C0D8017 */ lui $t5, %hi(D_80171BA0) # $t5, 0x8017 -/* B68048 800F0EA8 8DAD1BA0 */ lw $t5, %lo(D_80171BA0)($t5) +/* B68044 800F0EA4 3C0D8017 */ lui $t5, %hi(gAudioContext+0x2a20) # $t5, 0x8017 +/* B68048 800F0EA8 8DAD1BA0 */ lw $t5, %lo(gAudioContext+0x2a20)($t5) /* B6804C 800F0EAC 3C108015 */ lui $s0, %hi(D_8014A1BC) # $s0, 0x8015 /* B68050 800F0EB0 2610A1BC */ addiu $s0, %lo(D_8014A1BC) # addiu $s0, $s0, -0x5e44 /* B68054 800F0EB4 11A00018 */ beqz $t5, .L800F0F18 @@ -2958,15 +2958,15 @@ glabel L800F0CFC /* B6806C 800F0ECC 0C03ED07 */ jal GfxPrint_SetPos /* B68070 800F0ED0 24060009 */ li $a2, 9 /* B68074 800F0ED4 02510019 */ multu $s2, $s1 -/* B68078 800F0ED8 3C068017 */ lui $a2, %hi(D_80171BBE) +/* B68078 800F0ED8 3C068017 */ lui $a2, %hi(gAudioContext+0x2a3e) /* B6807C 800F0EDC 8FA400B0 */ lw $a0, 0xb0($sp) /* B68080 800F0EE0 02002825 */ move $a1, $s0 /* B68084 800F0EE4 0000C012 */ mflo $t8 /* B68088 800F0EE8 00D83021 */ addu $a2, $a2, $t8 /* B6808C 800F0EEC 0C03EF2D */ jal GfxPrint_Printf -/* B68090 800F0EF0 84C61BBE */ lh $a2, %lo(D_80171BBE)($a2) -/* B68094 800F0EF4 3C0F8017 */ lui $t7, %hi(D_80171BA0) # $t7, 0x8017 -/* B68098 800F0EF8 8DEF1BA0 */ lw $t7, %lo(D_80171BA0)($t7) +/* B68090 800F0EF0 84C61BBE */ lh $a2, %lo(gAudioContext+0x2a3e)($a2) +/* B68094 800F0EF4 3C0F8017 */ lui $t7, %hi(gAudioContext+0x2a20) # $t7, 0x8017 +/* B68098 800F0EF8 8DEF1BA0 */ lw $t7, %lo(gAudioContext+0x2a20)($t7) /* B6809C 800F0EFC 26520001 */ addiu $s2, $s2, 1 /* B680A0 800F0F00 00129600 */ sll $s2, $s2, 0x18 /* B680A4 800F0F04 00129603 */ sra $s2, $s2, 0x18 @@ -2980,22 +2980,22 @@ glabel L800F0CFC /* B680C0 800F0F20 24050003 */ li $a1, 3 /* B680C4 800F0F24 0C03ED07 */ jal GfxPrint_SetPos /* B680C8 800F0F28 2406000A */ li $a2, 10 -/* B680CC 800F0F2C 3C198017 */ lui $t9, %hi(D_80171CB8) # $t9, 0x8017 -/* B680D0 800F0F30 3C0A8017 */ lui $t2, %hi(D_80171CB4) # $t2, 0x8017 -/* B680D4 800F0F34 3C0B8017 */ lui $t3, %hi(D_80171CBC) # $t3, 0x8017 -/* B680D8 800F0F38 8D6B1CBC */ lw $t3, %lo(D_80171CBC)($t3) -/* B680DC 800F0F3C 8D4A1CB4 */ lw $t2, %lo(D_80171CB4)($t2) -/* B680E0 800F0F40 8F391CB8 */ lw $t9, %lo(D_80171CB8)($t9) +/* B680CC 800F0F2C 3C198017 */ lui $t9, %hi(gAudioContext+0x2b38) # $t9, 0x8017 +/* B680D0 800F0F30 3C0A8017 */ lui $t2, %hi(gAudioContext+0x2b34) # $t2, 0x8017 +/* B680D4 800F0F34 3C0B8017 */ lui $t3, %hi(gAudioContext+0x2b3c) # $t3, 0x8017 +/* B680D8 800F0F38 8D6B1CBC */ lw $t3, %lo(gAudioContext+0x2b3c)($t3) +/* B680DC 800F0F3C 8D4A1CB4 */ lw $t2, %lo(gAudioContext+0x2b34)($t2) +/* B680E0 800F0F40 8F391CB8 */ lw $t9, %lo(gAudioContext+0x2b38)($t9) /* B680E4 800F0F44 3C058015 */ lui $a1, %hi(D_8014A1C4) # $a1, 0x8015 -/* B680E8 800F0F48 3C068017 */ lui $a2, %hi(D_80171CB0) # $a2, 0x8017 -/* B680EC 800F0F4C 8CC61CB0 */ lw $a2, %lo(D_80171CB0)($a2) +/* B680E8 800F0F48 3C068017 */ lui $a2, %hi(gAudioContext+0x2b30) # $a2, 0x8017 +/* B680EC 800F0F4C 8CC61CB0 */ lw $a2, %lo(gAudioContext+0x2b30)($a2) /* B680F0 800F0F50 24A5A1C4 */ addiu $a1, %lo(D_8014A1C4) # addiu $a1, $a1, -0x5e3c /* B680F4 800F0F54 8FA400B0 */ lw $a0, 0xb0($sp) /* B680F8 800F0F58 AFAB0010 */ sw $t3, 0x10($sp) /* B680FC 800F0F5C 0C03EF2D */ jal GfxPrint_Printf /* B68100 800F0F60 032A3823 */ subu $a3, $t9, $t2 -/* B68104 800F0F64 3C0E8017 */ lui $t6, %hi(D_80171CB0) # $t6, 0x8017 -/* B68108 800F0F68 8DCE1CB0 */ lw $t6, %lo(D_80171CB0)($t6) +/* B68104 800F0F64 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2b30) # $t6, 0x8017 +/* B68108 800F0F68 8DCE1CB0 */ lw $t6, %lo(gAudioContext+0x2b30)($t6) /* B6810C 800F0F6C 3C108015 */ lui $s0, %hi(D_8014A1E4) # $s0, 0x8015 /* B68110 800F0F70 2610A1E4 */ addiu $s0, %lo(D_8014A1E4) # addiu $s0, $s0, -0x5e1c /* B68114 800F0F74 11C00016 */ beqz $t6, .L800F0FD0 @@ -3007,15 +3007,15 @@ glabel L800F0CFC /* B68128 800F0F88 0C03ED07 */ jal GfxPrint_SetPos /* B6812C 800F0F8C 2406000B */ li $a2, 11 /* B68130 800F0F90 02510019 */ multu $s2, $s1 -/* B68134 800F0F94 3C068017 */ lui $a2, %hi(D_80171CCE) +/* B68134 800F0F94 3C068017 */ lui $a2, %hi(gAudioContext+0x2b4e) /* B68138 800F0F98 8FA400B0 */ lw $a0, 0xb0($sp) /* B6813C 800F0F9C 02002825 */ move $a1, $s0 /* B68140 800F0FA0 00006012 */ mflo $t4 /* B68144 800F0FA4 00CC3021 */ addu $a2, $a2, $t4 /* B68148 800F0FA8 0C03EF2D */ jal GfxPrint_Printf -/* B6814C 800F0FAC 84C61CCE */ lh $a2, %lo(D_80171CCE)($a2) -/* B68150 800F0FB0 3C0D8017 */ lui $t5, %hi(D_80171CB0) # $t5, 0x8017 -/* B68154 800F0FB4 8DAD1CB0 */ lw $t5, %lo(D_80171CB0)($t5) +/* B6814C 800F0FAC 84C61CCE */ lh $a2, %lo(gAudioContext+0x2b4e)($a2) +/* B68150 800F0FB0 3C0D8017 */ lui $t5, %hi(gAudioContext+0x2b30) # $t5, 0x8017 +/* B68154 800F0FB4 8DAD1CB0 */ lw $t5, %lo(gAudioContext+0x2b30)($t5) /* B68158 800F0FB8 26520001 */ addiu $s2, $s2, 1 /* B6815C 800F0FBC 00129600 */ sll $s2, $s2, 0x18 /* B68160 800F0FC0 00129603 */ sra $s2, $s2, 0x18 @@ -3027,13 +3027,13 @@ glabel L800F0CFC /* B68174 800F0FD4 24050003 */ li $a1, 3 /* B68178 800F0FD8 0C03ED07 */ jal GfxPrint_SetPos /* B6817C 800F0FDC 2406000C */ li $a2, 12 -/* B68180 800F0FE0 3C188017 */ lui $t8, %hi(D_80171ED4) # $t8, 0x8017 -/* B68184 800F0FE4 3C0F8017 */ lui $t7, %hi(D_80171ED0) # $t7, 0x8017 -/* B68188 800F0FE8 8DEF1ED0 */ lw $t7, %lo(D_80171ED0)($t7) -/* B6818C 800F0FEC 8F181ED4 */ lw $t8, %lo(D_80171ED4)($t8) +/* B68180 800F0FE0 3C188017 */ lui $t8, %hi(gAudioContext+0x2d54) # $t8, 0x8017 +/* B68184 800F0FE4 3C0F8017 */ lui $t7, %hi(gAudioContext+0x2d50) # $t7, 0x8017 +/* B68188 800F0FE8 8DEF1ED0 */ lw $t7, %lo(gAudioContext+0x2d50)($t7) +/* B6818C 800F0FEC 8F181ED4 */ lw $t8, %lo(gAudioContext+0x2d54)($t8) /* B68190 800F0FF0 3C058015 */ lui $a1, %hi(D_8014A1EC) # $a1, 0x8015 -/* B68194 800F0FF4 3C078017 */ lui $a3, %hi(D_80171ED8) # $a3, 0x8017 -/* B68198 800F0FF8 8CE71ED8 */ lw $a3, %lo(D_80171ED8)($a3) +/* B68194 800F0FF4 3C078017 */ lui $a3, %hi(gAudioContext+0x2d58) # $a3, 0x8017 +/* B68198 800F0FF8 8CE71ED8 */ lw $a3, %lo(gAudioContext+0x2d58)($a3) /* B6819C 800F0FFC 24A5A1EC */ addiu $a1, %lo(D_8014A1EC) # addiu $a1, $a1, -0x5e14 /* B681A0 800F1000 8FA400B0 */ lw $a0, 0xb0($sp) /* B681A4 800F1004 0C03EF2D */ jal GfxPrint_Printf @@ -3148,8 +3148,8 @@ glabel L800F1014 /* B68354 800F11B4 24050003 */ li $a1, 3 /* B68358 800F11B8 0C03ED07 */ jal GfxPrint_SetPos /* B6835C 800F11BC 24060007 */ li $a2, 7 -/* B68360 800F11C0 3C028017 */ lui $v0, %hi(D_8017280A) # $v0, 0x8017 -/* B68364 800F11C4 9042280A */ lbu $v0, %lo(D_8017280A)($v0) +/* B68360 800F11C0 3C028017 */ lui $v0, %hi(gAudioContext+0x368a) # $v0, 0x8017 +/* B68364 800F11C4 9042280A */ lbu $v0, %lo(gAudioContext+0x368a)($v0) /* B68368 800F11C8 3C058015 */ lui $a1, %hi(D_8014A228) # $a1, 0x8015 /* B6836C 800F11CC 24A5A228 */ addiu $a1, %lo(D_8014A228) # addiu $a1, $a1, -0x5dd8 /* B68370 800F11D0 00025040 */ sll $t2, $v0, 1 @@ -3161,8 +3161,8 @@ glabel L800F1014 /* B68388 800F11E8 24050003 */ li $a1, 3 /* B6838C 800F11EC 0C03ED07 */ jal GfxPrint_SetPos /* B68390 800F11F0 24060008 */ li $a2, 8 -/* B68394 800F11F4 3C028017 */ lui $v0, %hi(D_8017280C) # $v0, 0x8017 -/* B68398 800F11F8 9042280C */ lbu $v0, %lo(D_8017280C)($v0) +/* B68394 800F11F4 3C028017 */ lui $v0, %hi(gAudioContext+0x368c) # $v0, 0x8017 +/* B68398 800F11F8 9042280C */ lbu $v0, %lo(gAudioContext+0x368c)($v0) /* B6839C 800F11FC 3C058015 */ lui $a1, %hi(D_8014A23C) # $a1, 0x8015 /* B683A0 800F1200 24A5A23C */ addiu $a1, %lo(D_8014A23C) # addiu $a1, $a1, -0x5dc4 /* B683A4 800F1204 00025840 */ sll $t3, $v0, 1 @@ -3174,8 +3174,8 @@ glabel L800F1014 /* B683BC 800F121C 24050003 */ li $a1, 3 /* B683C0 800F1220 0C03ED07 */ jal GfxPrint_SetPos /* B683C4 800F1224 24060009 */ li $a2, 9 -/* B683C8 800F1228 3C068017 */ lui $a2, %hi(D_8017280D) # $a2, 0x8017 -/* B683CC 800F122C 80C6280D */ lb $a2, %lo(D_8017280D)($a2) +/* B683C8 800F1228 3C068017 */ lui $a2, %hi(gAudioContext+0x368d) # $a2, 0x8017 +/* B683CC 800F122C 80C6280D */ lb $a2, %lo(gAudioContext+0x368d)($a2) /* B683D0 800F1230 3C058015 */ lui $a1, %hi(D_8014A250) # $a1, 0x8015 /* B683D4 800F1234 24A5A250 */ addiu $a1, %lo(D_8014A250) # addiu $a1, $a1, -0x5db0 /* B683D8 800F1238 24C60001 */ addiu $a2, $a2, 1 diff --git a/asm/non_matchings/code/code_800EC960/func_800F3054.s b/asm/non_matchings/code/code_800EC960/func_800F3054.s index 9002f9ea3c..db22132cbb 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F3054.s +++ b/asm/non_matchings/code/code_800EC960/func_800F3054.s @@ -4,8 +4,8 @@ glabel func_800F3054 /* B6A1FC 800F305C 0C03EB4D */ jal func_800FAD34 /* B6A200 800F3060 00000000 */ nop /* B6A204 800F3064 14400030 */ bnez $v0, .L800F3128 -/* B6A208 800F3068 3C0E8017 */ lui $t6, %hi(D_80171A1C) # $t6, 0x8017 -/* B6A20C 800F306C 8DCE1A1C */ lw $t6, %lo(D_80171A1C)($t6) +/* B6A208 800F3068 3C0E8017 */ lui $t6, %hi(gAudioContext+0x289c) # $t6, 0x8017 +/* B6A20C 800F306C 8DCE1A1C */ lw $t6, %lo(gAudioContext+0x289c)($t6) /* B6A210 800F3070 3C018017 */ lui $at, %hi(D_8016BABC) # $at, 0x8017 /* B6A214 800F3074 0C001A78 */ jal osGetTime /* B6A218 800F3078 AC2EBABC */ sw $t6, %lo(D_8016BABC)($at) @@ -46,8 +46,8 @@ glabel func_800F3054 /* B6A2A0 800F3100 00000000 */ nop /* B6A2A4 800F3104 0C0396E0 */ jal func_800E5B80 /* B6A2A8 800F3108 00000000 */ nop -/* B6A2AC 800F310C 3C198017 */ lui $t9, %hi(D_80171A1C) # $t9, 0x8017 -/* B6A2B0 800F3110 8F391A1C */ lw $t9, %lo(D_80171A1C)($t9) +/* B6A2AC 800F310C 3C198017 */ lui $t9, %hi(gAudioContext+0x289c) # $t9, 0x8017 +/* B6A2B0 800F3110 8F391A1C */ lw $t9, %lo(gAudioContext+0x289c)($t9) /* B6A2B4 800F3114 3C018017 */ lui $at, %hi(D_8016BAC0) # $at, 0x8017 /* B6A2B8 800F3118 0C001A78 */ jal osGetTime /* B6A2BC 800F311C AC39BAC0 */ sw $t9, %lo(D_8016BAC0)($at) diff --git a/asm/non_matchings/code/code_800EC960/func_800F32F0.s b/asm/non_matchings/code/code_800EC960/func_800F32F0.s index aca7b31f6f..fe788a4b0b 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F32F0.s +++ b/asm/non_matchings/code/code_800EC960/func_800F32F0.s @@ -63,11 +63,11 @@ glabel func_800F32F0 /* B6A56C 800F33CC 00021603 */ sra $v0, $v0, 0x18 .L800F33D0: /* B6A570 800F33D0 00066080 */ sll $t4, $a2, 2 -/* B6A574 800F33D4 3C058017 */ lui $a1, %hi(D_801729A8) +/* B6A574 800F33D4 3C058017 */ lui $a1, %hi(gAudioContext+0x3828) /* B6A578 800F33D8 00AC2821 */ addu $a1, $a1, $t4 -/* B6A57C 800F33DC 8CA529A8 */ lw $a1, %lo(D_801729A8)($a1) -/* B6A580 800F33E0 3C0D8017 */ lui $t5, %hi(D_80174C30) # $t5, 0x8017 -/* B6A584 800F33E4 25AD4C30 */ addiu $t5, %lo(D_80174C30) # addiu $t5, $t5, 0x4c30 +/* B6A57C 800F33DC 8CA529A8 */ lw $a1, %lo(gAudioContext+0x3828)($a1) +/* B6A580 800F33E0 3C0D8017 */ lui $t5, %hi(gAudioContext+0x5AB0) # $t5, 0x8017 +/* B6A584 800F33E4 25AD4C30 */ addiu $t5, %lo(gAudioContext+0x5AB0) # addiu $t5, $t5, 0x4c30 /* B6A588 800F33E8 11A50005 */ beq $t5, $a1, .L800F3400 /* B6A58C 800F33EC 3C098013 */ lui $t1, %hi(D_80130614) # $t1, 0x8013 /* B6A590 800F33F0 80A300C5 */ lb $v1, 0xc5($a1) diff --git a/asm/non_matchings/code/code_800EC960/func_800F35EC.s b/asm/non_matchings/code/code_800EC960/func_800F35EC.s index 3afe85e4d2..967763a3b0 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F35EC.s +++ b/asm/non_matchings/code/code_800EC960/func_800F35EC.s @@ -41,8 +41,8 @@ glabel func_800F35EC /* B6A7CC 800F362C 00001025 */ move $v0, $zero /* B6A7D0 800F3630 13200010 */ beqz $t9, .L800F3674 /* B6A7D4 800F3634 46000086 */ mov.s $f2, $f0 -/* B6A7D8 800F3638 3C088017 */ lui $t0, %hi(D_80171AFC) -/* B6A7DC 800F363C 8D081AFC */ lw $t0, %lo(D_80171AFC)($t0) +/* B6A7D8 800F3638 3C088017 */ lui $t0, %hi(gAudioContext+0x297c) +/* B6A7DC 800F363C 8D081AFC */ lw $t0, %lo(gAudioContext+0x297c)($t0) /* B6A7E0 800F3640 3C014F80 */ li $at, 0x4F800000 # 0.000000 /* B6A7E4 800F3644 3109000F */ andi $t1, $t0, 0xf /* B6A7E8 800F3648 44892000 */ mtc1 $t1, $f4 @@ -87,8 +87,8 @@ glabel L800F36C0 /* B6A868 800F36C8 30D82000 */ andi $t8, $a2, 0x2000 /* B6A86C 800F36CC 30CD0800 */ andi $t5, $a2, 0x800 /* B6A870 800F36D0 15A00014 */ bnez $t5, .L800F3724 -/* B6A874 800F36D4 3C0E8017 */ lui $t6, %hi(D_80171AFC) -/* B6A878 800F36D8 8DCE1AFC */ lw $t6, %lo(D_80171AFC)($t6) +/* B6A874 800F36D4 3C0E8017 */ lui $t6, %hi(gAudioContext+0x297c) +/* B6A878 800F36D8 8DCE1AFC */ lw $t6, %lo(gAudioContext+0x297c)($t6) /* B6A87C 800F36DC 3C014F80 */ li $at, 0x4F800000 # 0.000000 /* B6A880 800F36E0 31CF000F */ andi $t7, $t6, 0xf /* B6A884 800F36E4 448F9000 */ mtc1 $t7, $f18 diff --git a/asm/non_matchings/code/code_800EC960/func_800F4010.s b/asm/non_matchings/code/code_800EC960/func_800F4010.s index 73068b4952..51d4ccf252 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F4010.s +++ b/asm/non_matchings/code/code_800EC960/func_800F4010.s @@ -49,8 +49,8 @@ glabel func_800F4010 /* B6B230 800F4090 10000007 */ b .L800F40B0 /* B6B234 800F4094 24020001 */ li $v0, 1 .L800F4098: -/* B6B238 800F4098 3C028017 */ lui $v0, %hi(D_80171AFC) # $v0, 0x8017 -/* B6B23C 800F409C 8C421AFC */ lw $v0, %lo(D_80171AFC)($v0) +/* B6B238 800F4098 3C028017 */ lui $v0, %hi(gAudioContext+0x297c) # $v0, 0x8017 +/* B6B23C 800F409C 8C421AFC */ lw $v0, %lo(gAudioContext+0x297c)($v0) /* B6B240 800F40A0 3C018015 */ lui $at, %hi(D_8014A5F0) /* B6B244 800F40A4 C420A5F0 */ lwc1 $f0, %lo(D_8014A5F0)($at) /* B6B248 800F40A8 30420001 */ andi $v0, $v0, 1 diff --git a/asm/non_matchings/code/code_800EC960/func_800F491C.s b/asm/non_matchings/code/code_800EC960/func_800F491C.s index 81be1cd892..cf1ced74cb 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F491C.s +++ b/asm/non_matchings/code/code_800EC960/func_800F491C.s @@ -34,8 +34,8 @@ glabel func_800F491C /* B6BB34 800F4994 0C03E803 */ jal Audio_SetBGM /* B6BB38 800F4998 00412025 */ or $a0, $v0, $at /* B6BB3C 800F499C 3C128017 */ lui $s2, %hi(gAudioContext) # $s2, 0x8017 -/* B6BB40 800F49A0 3C118017 */ lui $s1, %hi(D_80174C30) # $s1, 0x8017 -/* B6BB44 800F49A4 26314C30 */ addiu $s1, %lo(D_80174C30) # addiu $s1, $s1, 0x4c30 +/* B6BB40 800F49A0 3C118017 */ lui $s1, %hi(gAudioContext+0x5AB0) # $s1, 0x8017 +/* B6BB44 800F49A4 26314C30 */ addiu $s1, %lo(gAudioContext+0x5AB0) # addiu $s1, $s1, 0x4c30 /* B6BB48 800F49A8 2652F180 */ addiu $s2, %lo(gAudioContext) # addiu $s2, $s2, -0xe80 /* B6BB4C 800F49AC 00008025 */ move $s0, $zero /* B6BB50 800F49B0 3C140500 */ lui $s4, 0x500 diff --git a/asm/non_matchings/code/code_800EC960/func_800F4B58.s b/asm/non_matchings/code/code_800EC960/func_800F4B58.s index 8060ff32f0..2de9cf604a 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F4B58.s +++ b/asm/non_matchings/code/code_800EC960/func_800F4B58.s @@ -9,7 +9,7 @@ glabel func_800F4B58 /* B6BD14 800F4B74 AFA50024 */ sw $a1, 0x24($sp) /* B6BD18 800F4B78 01CFC021 */ addu $t8, $t6, $t7 /* B6BD1C 800F4B7C 93190000 */ lbu $t9, ($t8) -/* B6BD20 800F4B80 3C0A8013 */ lui $t2, %hi(D_8012F8B4) # $t2, 0x8013 +/* B6BD20 800F4B80 3C0A8013 */ lui $t2, %hi(gNoteFrequencies) # $t2, 0x8013 /* B6BD24 800F4B84 3C0B8013 */ lui $t3, %hi(D_801333E0) # $t3, 0x8013 /* B6BD28 800F4B88 3C0C8013 */ lui $t4, %hi(D_801333E8) # $t4, 0x8013 /* B6BD2C 800F4B8C 00194080 */ sll $t0, $t9, 2 @@ -17,7 +17,7 @@ glabel func_800F4B58 /* B6BD34 800F4B94 2509009C */ addiu $t1, $t0, 0x9c /* B6BD38 800F4B98 258C33E8 */ addiu $t4, %lo(D_801333E8) # addiu $t4, $t4, 0x33e8 /* B6BD3C 800F4B9C 256B33E0 */ addiu $t3, %lo(D_801333E0) # addiu $t3, $t3, 0x33e0 -/* B6BD40 800F4BA0 254AF8B4 */ addiu $t2, %lo(D_8012F8B4) # addiu $t2, $t2, -0x74c +/* B6BD40 800F4BA0 254AF8B4 */ addiu $t2, %lo(gNoteFrequencies) # addiu $t2, $t2, -0x74c /* B6BD44 800F4BA4 012A3821 */ addu $a3, $t1, $t2 /* B6BD48 800F4BA8 AFAB0010 */ sw $t3, 0x10($sp) /* B6BD4C 800F4BAC AFAC0014 */ sw $t4, 0x14($sp) diff --git a/asm/non_matchings/code/code_800EC960/func_800F4BF4.s b/asm/non_matchings/code/code_800EC960/func_800F4BF4.s index 376e541b7a..0732fa7d06 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F4BF4.s +++ b/asm/non_matchings/code/code_800EC960/func_800F4BF4.s @@ -3,7 +3,7 @@ glabel func_800F4BF4 /* B6BD98 800F4BF8 AFA60028 */ sw $a2, 0x28($sp) /* B6BD9C 800F4BFC 83AE002B */ lb $t6, 0x2b($sp) /* B6BDA0 800F4C00 AFA50024 */ sw $a1, 0x24($sp) -/* B6BDA4 800F4C04 3C198013 */ lui $t9, %hi(D_8012F8B4) # $t9, 0x8013 +/* B6BDA4 800F4C04 3C198013 */ lui $t9, %hi(gNoteFrequencies) # $t9, 0x8013 /* B6BDA8 800F4C08 3C088013 */ lui $t0, %hi(D_801333E0) # $t0, 0x8013 /* B6BDAC 800F4C0C 3C098013 */ lui $t1, %hi(D_801333E8) # $t1, 0x8013 /* B6BDB0 800F4C10 000E7880 */ sll $t7, $t6, 2 @@ -13,7 +13,7 @@ glabel func_800F4BF4 /* B6BDC0 800F4C20 25F8009C */ addiu $t8, $t7, 0x9c /* B6BDC4 800F4C24 252933E8 */ addiu $t1, %lo(D_801333E8) # addiu $t1, $t1, 0x33e8 /* B6BDC8 800F4C28 250833E0 */ addiu $t0, %lo(D_801333E0) # addiu $t0, $t0, 0x33e0 -/* B6BDCC 800F4C2C 2739F8B4 */ addiu $t9, %lo(D_8012F8B4) # addiu $t9, $t9, -0x74c +/* B6BDCC 800F4C2C 2739F8B4 */ addiu $t9, %lo(gNoteFrequencies) # addiu $t9, $t9, -0x74c /* B6BDD0 800F4C30 03193821 */ addu $a3, $t8, $t9 /* B6BDD4 800F4C34 AFA80010 */ sw $t0, 0x10($sp) /* B6BDD8 800F4C38 AFA90014 */ sw $t1, 0x14($sp) diff --git a/asm/non_matchings/code/code_800EC960/func_800F56A8.s b/asm/non_matchings/code/code_800EC960/func_800F56A8.s index bfae52bfbc..cf1b383556 100644 --- a/asm/non_matchings/code/code_800EC960/func_800F56A8.s +++ b/asm/non_matchings/code/code_800EC960/func_800F56A8.s @@ -16,10 +16,10 @@ glabel func_800F56A8 /* B6C880 800F56E0 8FBF0014 */ lw $ra, 0x14($sp) /* B6C884 800F56E4 90480000 */ lbu $t0, ($v0) /* B6C888 800F56E8 240100C0 */ li $at, 192 -/* B6C88C 800F56EC 3C098017 */ lui $t1, %hi(D_8017280B) # $t1, 0x8017 +/* B6C88C 800F56EC 3C098017 */ lui $t1, %hi(gAudioContext+0x368b) # $t1, 0x8017 /* B6C890 800F56F0 51010005 */ beql $t0, $at, .L800F5708 /* B6C894 800F56F4 A0400000 */ sb $zero, ($v0) -/* B6C898 800F56F8 8129280B */ lb $t1, %lo(D_8017280B)($t1) +/* B6C898 800F56F8 8129280B */ lb $t1, %lo(gAudioContext+0x368b)($t1) /* B6C89C 800F56FC 10000002 */ b .L800F5708 /* B6C8A0 800F5700 A0490000 */ sb $t1, ($v0) /* B6C8A4 800F5704 A0400000 */ sb $zero, ($v0) diff --git a/asm/non_matchings/code/code_800F7260/func_800F8480.s b/asm/non_matchings/code/code_800F7260/func_800F8480.s index 23d651f4ce..bb0744c39f 100644 --- a/asm/non_matchings/code/code_800F7260/func_800F8480.s +++ b/asm/non_matchings/code/code_800F7260/func_800F8480.s @@ -50,12 +50,12 @@ glabel func_800F8480 /* B6F6DC 800F853C 000F7900 */ sll $t7, $t7, 4 /* B6F6E0 800F8540 01CF8021 */ addu $s0, $t6, $t7 /* B6F6E4 800F8544 9202002A */ lbu $v0, 0x2a($s0) -/* B6F6E8 800F8548 3C048017 */ lui $a0, %hi(D_801729A8) +/* B6F6E8 800F8548 3C048017 */ lui $a0, %hi(gAudioContext+0x3828) /* B6F6EC 800F854C 0006C080 */ sll $t8, $a2, 2 /* B6F6F0 800F8550 00982021 */ addu $a0, $a0, $t8 /* B6F6F4 800F8554 24010002 */ li $at, 2 /* B6F6F8 800F8558 14410053 */ bne $v0, $at, .L800F86A8 -/* B6F6FC 800F855C 8C8429A8 */ lw $a0, %lo(D_801729A8)($a0) +/* B6F6FC 800F855C 8C8429A8 */ lw $a0, %lo(gAudioContext+0x3828)($a0) /* B6F700 800F8560 96020026 */ lhu $v0, 0x26($s0) /* B6F704 800F8564 3C198013 */ lui $t9, %hi(D_80130570) # $t9, 0x8013 /* B6F708 800F8568 27390570 */ addiu $t9, %lo(D_80130570) # addiu $t9, $t9, 0x570 diff --git a/asm/non_matchings/code/code_800F7260/func_800F8F88.s b/asm/non_matchings/code/code_800F7260/func_800F8F88.s index 339e8330e8..5fa6f113b7 100644 --- a/asm/non_matchings/code/code_800F7260/func_800F8F88.s +++ b/asm/non_matchings/code/code_800F7260/func_800F8F88.s @@ -1,9 +1,9 @@ glabel func_800F8F88 -/* B70128 800F8F88 3C0F8017 */ lui $t7, %hi(D_801729A8) # $t7, 0x8017 -/* B7012C 800F8F8C 8DEF29A8 */ lw $t7, %lo(D_801729A8)($t7) -/* B70130 800F8F90 3C0E8017 */ lui $t6, %hi(D_80174C30) # $t6, 0x8017 +/* B70128 800F8F88 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3828) # $t7, 0x8017 +/* B7012C 800F8F8C 8DEF29A8 */ lw $t7, %lo(gAudioContext+0x3828)($t7) +/* B70130 800F8F90 3C0E8017 */ lui $t6, %hi(gAudioContext+0x5AB0) # $t6, 0x8017 /* B70134 800F8F94 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B70138 800F8F98 25CE4C30 */ addiu $t6, %lo(D_80174C30) # addiu $t6, $t6, 0x4c30 +/* B70138 800F8F98 25CE4C30 */ addiu $t6, %lo(gAudioContext+0x5AB0) # addiu $t6, $t6, 0x4c30 /* B7013C 800F8F9C AFBF001C */ sw $ra, 0x1c($sp) /* B70140 800F8FA0 11CF000F */ beq $t6, $t7, .L800F8FE0 /* B70144 800F8FA4 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/code/code_800F9280/func_800F9280.s b/asm/non_matchings/code/code_800F9280/func_800F9280.s index fa93399c79..6968a30567 100644 --- a/asm/non_matchings/code/code_800F9280/func_800F9280.s +++ b/asm/non_matchings/code/code_800F9280/func_800F9280.s @@ -20,8 +20,8 @@ glabel func_800F9280 /* B70464 800F92C4 14C10019 */ bne $a2, $at, .L800F932C /* B70468 800F92C8 00C03825 */ move $a3, $a2 /* B7046C 800F92CC 97AF0046 */ lhu $t7, 0x46($sp) -/* B70470 800F92D0 3C088017 */ lui $t0, %hi(D_801719D4) # $t0, 0x8017 -/* B70474 800F92D4 850819D4 */ lh $t0, %lo(D_801719D4)($t0) +/* B70470 800F92D0 3C088017 */ lui $t0, %hi(gAudioContext+0x2854) # $t0, 0x8017 +/* B70474 800F92D4 850819D4 */ lh $t0, %lo(gAudioContext+0x2854)($t0) /* B70478 800F92D8 000FC0C3 */ sra $t8, $t7, 3 /* B7047C 800F92DC 0018C900 */ sll $t9, $t8, 4 /* B70480 800F92E0 0338C823 */ subu $t9, $t9, $t8 @@ -44,8 +44,8 @@ glabel func_800F9280 /* B704C4 800F9324 10000018 */ b .L800F9388 /* B704C8 800F9328 8FA7002C */ lw $a3, 0x2c($sp) .L800F932C: -/* B704CC 800F932C 3C088017 */ lui $t0, %hi(D_801719D4) # $t0, 0x8017 -/* B704D0 800F9330 950819D4 */ lhu $t0, %lo(D_801719D4)($t0) +/* B704CC 800F932C 3C088017 */ lui $t0, %hi(gAudioContext+0x2854) # $t0, 0x8017 +/* B704D0 800F9330 950819D4 */ lhu $t0, %lo(gAudioContext+0x2854)($t0) /* B704D4 800F9334 97B90046 */ lhu $t9, 0x46($sp) /* B704D8 800F9338 320300FF */ andi $v1, $s0, 0xff /* B704DC 800F933C 93AE003F */ lbu $t6, 0x3f($sp) diff --git a/asm/non_matchings/code/code_800F9280/func_800F9474.s b/asm/non_matchings/code/code_800F9280/func_800F9474.s index 523bdc0811..6edbb77c23 100644 --- a/asm/non_matchings/code/code_800F9280/func_800F9474.s +++ b/asm/non_matchings/code/code_800F9280/func_800F9474.s @@ -1,6 +1,6 @@ glabel func_800F9474 -/* B70614 800F9474 3C0E8017 */ lui $t6, %hi(D_801719D4) # $t6, 0x8017 -/* B70618 800F9478 95CE19D4 */ lhu $t6, %lo(D_801719D4)($t6) +/* B70614 800F9474 3C0E8017 */ lui $t6, %hi(gAudioContext+0x2854) # $t6, 0x8017 +/* B70618 800F9478 95CE19D4 */ lhu $t6, %lo(gAudioContext+0x2854)($t6) /* B7061C 800F947C 30A6FFFF */ andi $a2, $a1, 0xffff /* B70620 800F9480 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B70624 800F9484 00CE0019 */ multu $a2, $t6 diff --git a/asm/non_matchings/code/code_800F9280/func_800FA0B4.s b/asm/non_matchings/code/code_800F9280/func_800FA0B4.s index cd0e5fcf87..292e89d484 100644 --- a/asm/non_matchings/code/code_800F9280/func_800FA0B4.s +++ b/asm/non_matchings/code/code_800F9280/func_800FA0B4.s @@ -6,9 +6,9 @@ glabel func_800FA0B4 /* B71264 800FA0C4 000E7080 */ sll $t6, $t6, 2 /* B71268 800FA0C8 01C47023 */ subu $t6, $t6, $a0 /* B7126C 800FA0CC 000E7140 */ sll $t6, $t6, 5 -/* B71270 800FA0D0 3C0F8017 */ lui $t7, %hi(D_801726B0) +/* B71270 800FA0D0 3C0F8017 */ lui $t7, %hi(gAudioContext+0x3530) /* B71274 800FA0D4 01EE7821 */ addu $t7, $t7, $t6 -/* B71278 800FA0D8 8DEF26B0 */ lw $t7, %lo(D_801726B0)($t7) +/* B71278 800FA0D8 8DEF26B0 */ lw $t7, %lo(gAudioContext+0x3530)($t7) /* B7127C 800FA0DC 0004C880 */ sll $t9, $a0, 2 /* B71280 800FA0E0 0324C821 */ addu $t9, $t9, $a0 /* B71284 800FA0E4 000FC7C2 */ srl $t8, $t7, 0x1f diff --git a/asm/non_matchings/code/code_800F9280/func_800FA3DC.s b/asm/non_matchings/code/code_800F9280/func_800FA3DC.s index ebd34826b2..fc3a5904ed 100644 --- a/asm/non_matchings/code/code_800F9280/func_800FA3DC.s +++ b/asm/non_matchings/code/code_800F9280/func_800FA3DC.s @@ -453,9 +453,9 @@ glabel func_800FA3DC .L800FAA38: /* B71BD8 800FAA38 01F57823 */ subu $t7, $t7, $s5 /* B71BDC 800FAA3C 000F7940 */ sll $t7, $t7, 5 -/* B71BE0 800FAA40 3C0E8017 */ lui $t6, %hi(D_801726B0) +/* B71BE0 800FAA40 3C0E8017 */ lui $t6, %hi(gAudioContext+0x3530) /* B71BE4 800FAA44 01CF7021 */ addu $t6, $t6, $t7 -/* B71BE8 800FAA48 8DCE26B0 */ lw $t6, %lo(D_801726B0)($t6) +/* B71BE8 800FAA48 8DCE26B0 */ lw $t6, %lo(gAudioContext+0x3530)($t6) /* B71BEC 800FAA4C 000ECFC2 */ srl $t9, $t6, 0x1f /* B71BF0 800FAA50 572000A7 */ bnezl $t9, .L800FACF0 /* B71BF4 800FAA54 26B50001 */ addiu $s5, $s5, 1 diff --git a/asm/non_matchings/code/z_construct/func_801109B0.s b/asm/non_matchings/code/z_construct/func_801109B0.s deleted file mode 100644 index 2d0eb3e354..0000000000 --- a/asm/non_matchings/code/z_construct/func_801109B0.s +++ /dev/null @@ -1,506 +0,0 @@ -.rdata -glabel D_80154D50 - .asciz "常駐PARAMETERセグメント=%x\n" - .balign 4 - -glabel D_80154D78 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154D8C - .asciz "parameter->parameterSegment=%x\n" - .balign 4 - -glabel D_80154DAC - .asciz "parameter->parameterSegment != NULL" - .balign 4 - -glabel D_80154DD0 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154DE4 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154DF8 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154E0C - .asciz "DOアクション テクスチャ初期=%x\n" - .balign 4 - -glabel D_80154E30 - .asciz "parameter->do_actionSegment=%x\n" - .balign 4 - -glabel D_80154E50 - .asciz "parameter->do_actionSegment != NULL" - .balign 4 - -glabel D_80154E74 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154E88 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154E9C - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154EB0 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154EC4 - .asciz "アイコンアイテム テクスチャ初期=%x\n" - .balign 4 - -glabel D_80154EE8 - .asciz "parameter->icon_itemSegment=%x\n" - .balign 4 - -glabel D_80154F08 - .asciz "parameter->icon_itemSegment != NULL" - .balign 4 - -glabel D_80154F2C - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154F40 - .asciz "Register_Item[%x, %x, %x, %x]\n" - .balign 4 - -glabel D_80154F60 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154F74 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154F88 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154F9C - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154FB0 - .asciz "../z_construct.c" - .balign 4 - -glabel D_80154FC4 - .asciz "EVENT=%d\n" - .balign 4 - -glabel D_80154FD4 - .asciz "restart_flag=%d\n" - .balign 4 - -glabel D_80154FE8 - .asciz "タイマー停止!!!!!!!!!!!!!!!!!!!!! = %d\n" - .balign 4 - -glabel D_80155028 - .asciz "PARAMETER領域=%x\n" - .balign 4 - -.text -glabel func_801109B0 -/* B87B50 801109B0 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* B87B54 801109B4 AFB10020 */ sw $s1, 0x20($sp) -/* B87B58 801109B8 3C118016 */ lui $s1, %hi(gSaveContext) # $s1, 0x8016 -/* B87B5C 801109BC 2631E660 */ addiu $s1, %lo(gSaveContext) # addiu $s1, $s1, -0x19a0 -/* B87B60 801109C0 AFB0001C */ sw $s0, 0x1c($sp) -/* B87B64 801109C4 3C010001 */ li $at, 0x00010000 # 0.000000 -/* B87B68 801109C8 AFBF0024 */ sw $ra, 0x24($sp) -/* B87B6C 801109CC 00803025 */ move $a2, $a0 -/* B87B70 801109D0 A6201422 */ sh $zero, 0x1422($s1) -/* B87B74 801109D4 A62013EA */ sh $zero, 0x13ea($s1) -/* B87B78 801109D8 A62013E8 */ sh $zero, 0x13e8($s1) -/* B87B7C 801109DC 342104F0 */ ori $at, (0x000104F0 & 0xFFFF) # ori $at, $at, 0x4f0 -/* B87B80 801109E0 00818021 */ addu $s0, $a0, $at -/* B87B84 801109E4 8CC50000 */ lw $a1, ($a2) -/* B87B88 801109E8 AFA60058 */ sw $a2, 0x58($sp) -/* B87B8C 801109EC 0C02A89E */ jal View_Init -/* B87B90 801109F0 02002025 */ move $a0, $s0 -/* B87B94 801109F4 A60001FC */ sh $zero, 0x1fc($s0) -/* B87B98 801109F8 920201FD */ lbu $v0, 0x1fd($s0) -/* B87B9C 801109FC 44802000 */ mtc1 $zero, $f4 -/* B87BA0 80110A00 00002825 */ move $a1, $zero -/* B87BA4 80110A04 240F0010 */ li $t7, 16 -/* B87BA8 80110A08 A60501EE */ sh $a1, 0x1ee($s0) -/* B87BAC 80110A0C A60501EC */ sh $a1, 0x1ec($s0) -/* B87BB0 80110A10 A60001F0 */ sh $zero, 0x1f0($s0) -/* B87BB4 80110A14 A600022E */ sh $zero, 0x22e($s0) -/* B87BB8 80110A18 A60F0230 */ sh $t7, 0x230($s0) -/* B87BBC 80110A1C 3C188016 */ lui $t8, %hi(gGameInfo) # $t8, 0x8016 -/* B87BC0 80110A20 A2020261 */ sb $v0, 0x261($s0) -/* B87BC4 80110A24 A60201FA */ sh $v0, 0x1fa($s0) -/* B87BC8 80110A28 E60401F4 */ swc1 $f4, 0x1f4($s0) -/* B87BCC 80110A2C 8F18FA90 */ lw $t8, %lo(gGameInfo)($t8) -/* B87BD0 80110A30 3C0601AF */ lui $a2, %hi(_parameter_staticSegmentRomStart) # $a2, 0x1af -/* B87BD4 80110A34 3C0901AF */ lui $t1, %hi(_parameter_staticSegmentRomEnd) # $t1, 0x1af -/* B87BD8 80110A38 87190B52 */ lh $t9, 0xb52($t8) -/* B87BDC 80110A3C A6000252 */ sh $zero, 0x252($s0) -/* B87BE0 80110A40 86030252 */ lh $v1, 0x252($s0) -/* B87BE4 80110A44 2529FB00 */ addiu $t1, %lo(_parameter_staticSegmentRomEnd) # addiu $t1, $t1, -0x500 -/* B87BE8 80110A48 24C6C000 */ addiu $a2, %lo(_parameter_staticSegmentRomStart) # addiu $a2, $a2, -0x4000 -/* B87BEC 80110A4C A6000254 */ sh $zero, 0x254($s0) -/* B87BF0 80110A50 A2000260 */ sb $zero, 0x260($s0) -/* B87BF4 80110A54 01262823 */ subu $a1, $t1, $a2 -/* B87BF8 80110A58 3C048015 */ lui $a0, %hi(D_80154D50) # $a0, 0x8015 -/* B87BFC 80110A5C A6190228 */ sh $t9, 0x228($s0) -/* B87C00 80110A60 A6030256 */ sh $v1, 0x256($s0) -/* B87C04 80110A64 A6030250 */ sh $v1, 0x250($s0) -/* B87C08 80110A68 A603024E */ sh $v1, 0x24e($s0) -/* B87C0C 80110A6C A603024C */ sh $v1, 0x24c($s0) -/* B87C10 80110A70 A603024A */ sh $v1, 0x24a($s0) -/* B87C14 80110A74 A6030248 */ sh $v1, 0x248($s0) -/* B87C18 80110A78 A6030246 */ sh $v1, 0x246($s0) -/* B87C1C 80110A7C A6030244 */ sh $v1, 0x244($s0) -/* B87C20 80110A80 AFA60030 */ sw $a2, 0x30($sp) -/* B87C24 80110A84 AFA5002C */ sw $a1, 0x2c($sp) -/* B87C28 80110A88 0C00084C */ jal osSyncPrintf -/* B87C2C 80110A8C 24844D50 */ addiu $a0, %lo(D_80154D50) # addiu $a0, $a0, 0x4d50 -/* B87C30 80110A90 3C068015 */ lui $a2, %hi(D_80154D78) # $a2, 0x8015 -/* B87C34 80110A94 24C64D78 */ addiu $a2, %lo(D_80154D78) # addiu $a2, $a2, 0x4d78 -/* B87C38 80110A98 8FA40058 */ lw $a0, 0x58($sp) -/* B87C3C 80110A9C 8FA5002C */ lw $a1, 0x2c($sp) -/* B87C40 80110AA0 0C031521 */ jal GameState_Alloc -/* B87C44 80110AA4 2407009F */ li $a3, 159 -/* B87C48 80110AA8 3C048015 */ lui $a0, %hi(D_80154D8C) # $a0, 0x8015 -/* B87C4C 80110AAC AE020130 */ sw $v0, 0x130($s0) -/* B87C50 80110AB0 24844D8C */ addiu $a0, %lo(D_80154D8C) # addiu $a0, $a0, 0x4d8c -/* B87C54 80110AB4 0C00084C */ jal osSyncPrintf -/* B87C58 80110AB8 00402825 */ move $a1, $v0 -/* B87C5C 80110ABC 8E040130 */ lw $a0, 0x130($s0) -/* B87C60 80110AC0 14800008 */ bnez $a0, .L80110AE4 -/* B87C64 80110AC4 00000000 */ nop -/* B87C68 80110AC8 3C048015 */ lui $a0, %hi(D_80154DAC) # $a0, 0x8015 -/* B87C6C 80110ACC 3C058015 */ lui $a1, %hi(D_80154DD0) # $a1, 0x8015 -/* B87C70 80110AD0 24A54DD0 */ addiu $a1, %lo(D_80154DD0) # addiu $a1, $a1, 0x4dd0 -/* B87C74 80110AD4 24844DAC */ addiu $a0, %lo(D_80154DAC) # addiu $a0, $a0, 0x4dac -/* B87C78 80110AD8 0C0007FC */ jal __assert -/* B87C7C 80110ADC 240600A1 */ li $a2, 161 -/* B87C80 80110AE0 8E040130 */ lw $a0, 0x130($s0) -.L80110AE4: -/* B87C84 80110AE4 3C078015 */ lui $a3, %hi(D_80154DE4) # $a3, 0x8015 -/* B87C88 80110AE8 240A00A2 */ li $t2, 162 -/* B87C8C 80110AEC AFAA0010 */ sw $t2, 0x10($sp) -/* B87C90 80110AF0 24E74DE4 */ addiu $a3, %lo(D_80154DE4) # addiu $a3, $a3, 0x4de4 -/* B87C94 80110AF4 8FA50030 */ lw $a1, 0x30($sp) -/* B87C98 80110AF8 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87C9C 80110AFC 8FA6002C */ lw $a2, 0x2c($sp) -/* B87CA0 80110B00 3C068015 */ lui $a2, %hi(D_80154DF8) # $a2, 0x8015 -/* B87CA4 80110B04 24C64DF8 */ addiu $a2, %lo(D_80154DF8) # addiu $a2, $a2, 0x4df8 -/* B87CA8 80110B08 8FA40058 */ lw $a0, 0x58($sp) -/* B87CAC 80110B0C 24050480 */ li $a1, 1152 -/* B87CB0 80110B10 0C031521 */ jal GameState_Alloc -/* B87CB4 80110B14 240700A6 */ li $a3, 166 -/* B87CB8 80110B18 3C048015 */ lui $a0, %hi(D_80154E0C) # $a0, 0x8015 -/* B87CBC 80110B1C AE020134 */ sw $v0, 0x134($s0) -/* B87CC0 80110B20 24844E0C */ addiu $a0, %lo(D_80154E0C) # addiu $a0, $a0, 0x4e0c -/* B87CC4 80110B24 0C00084C */ jal osSyncPrintf -/* B87CC8 80110B28 24050480 */ li $a1, 1152 -/* B87CCC 80110B2C 3C048015 */ lui $a0, %hi(D_80154E30) # $a0, 0x8015 -/* B87CD0 80110B30 24844E30 */ addiu $a0, %lo(D_80154E30) # addiu $a0, $a0, 0x4e30 -/* B87CD4 80110B34 0C00084C */ jal osSyncPrintf -/* B87CD8 80110B38 8E050134 */ lw $a1, 0x134($s0) -/* B87CDC 80110B3C 8E040134 */ lw $a0, 0x134($s0) -/* B87CE0 80110B40 54800009 */ bnezl $a0, .L80110B68 -/* B87CE4 80110B44 92231409 */ lbu $v1, 0x1409($s1) -/* B87CE8 80110B48 3C048015 */ lui $a0, %hi(D_80154E50) # $a0, 0x8015 -/* B87CEC 80110B4C 3C058015 */ lui $a1, %hi(D_80154E74) # $a1, 0x8015 -/* B87CF0 80110B50 24A54E74 */ addiu $a1, %lo(D_80154E74) # addiu $a1, $a1, 0x4e74 -/* B87CF4 80110B54 24844E50 */ addiu $a0, %lo(D_80154E50) # addiu $a0, $a0, 0x4e50 -/* B87CF8 80110B58 0C0007FC */ jal __assert -/* B87CFC 80110B5C 240600A9 */ li $a2, 169 -/* B87D00 80110B60 8E040134 */ lw $a0, 0x134($s0) -/* B87D04 80110B64 92231409 */ lbu $v1, 0x1409($s1) -.L80110B68: -/* B87D08 80110B68 3C08008B */ lui $t0, %hi(_do_action_staticSegmentRomStart) # $t0, 0x8b -/* B87D0C 80110B6C 25081000 */ addiu $t0, %lo(_do_action_staticSegmentRomStart) # addiu $t0, $t0, 0x1000 -/* B87D10 80110B70 14600003 */ bnez $v1, .L80110B80 -/* B87D14 80110B74 24060300 */ li $a2, 768 -/* B87D18 80110B78 10000006 */ b .L80110B94 -/* B87D1C 80110B7C 00001025 */ move $v0, $zero -.L80110B80: -/* B87D20 80110B80 24010001 */ li $at, 1 -/* B87D24 80110B84 14610003 */ bne $v1, $at, .L80110B94 -/* B87D28 80110B88 24025700 */ li $v0, 22272 -/* B87D2C 80110B8C 10000001 */ b .L80110B94 -/* B87D30 80110B90 24022B80 */ li $v0, 11136 -.L80110B94: -/* B87D34 80110B94 3C078015 */ lui $a3, %hi(D_80154E88) # $a3, 0x8015 -/* B87D38 80110B98 240B00AE */ li $t3, 174 -/* B87D3C 80110B9C AFAB0010 */ sw $t3, 0x10($sp) -/* B87D40 80110BA0 24E74E88 */ addiu $a3, %lo(D_80154E88) # addiu $a3, $a3, 0x4e88 -/* B87D44 80110BA4 01022821 */ addu $a1, $t0, $v0 -/* B87D48 80110BA8 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87D4C 80110BAC AFA80028 */ sw $t0, 0x28($sp) -/* B87D50 80110BB0 92231409 */ lbu $v1, 0x1409($s1) -/* B87D54 80110BB4 8FA80028 */ lw $t0, 0x28($sp) -/* B87D58 80110BB8 24060180 */ li $a2, 384 -/* B87D5C 80110BBC 14600003 */ bnez $v1, .L80110BCC -/* B87D60 80110BC0 3C078015 */ lui $a3, %hi(D_80154E9C) # $a3, 0x8015 -/* B87D64 80110BC4 10000006 */ b .L80110BE0 -/* B87D68 80110BC8 24020480 */ li $v0, 1152 -.L80110BCC: -/* B87D6C 80110BCC 24010001 */ li $at, 1 -/* B87D70 80110BD0 14610003 */ bne $v1, $at, .L80110BE0 -/* B87D74 80110BD4 24025B80 */ li $v0, 23424 -/* B87D78 80110BD8 10000001 */ b .L80110BE0 -/* B87D7C 80110BDC 24023000 */ li $v0, 12288 -.L80110BE0: -/* B87D80 80110BE0 8E040134 */ lw $a0, 0x134($s0) -/* B87D84 80110BE4 240C00B2 */ li $t4, 178 -/* B87D88 80110BE8 AFAC0010 */ sw $t4, 0x10($sp) -/* B87D8C 80110BEC 01022821 */ addu $a1, $t0, $v0 -/* B87D90 80110BF0 24E74E9C */ addiu $a3, %lo(D_80154E9C) # addiu $a3, $a3, 0x4e9c -/* B87D94 80110BF4 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87D98 80110BF8 24840300 */ addiu $a0, $a0, 0x300 -/* B87D9C 80110BFC 3C068015 */ lui $a2, %hi(D_80154EB0) # $a2, 0x8015 -/* B87DA0 80110C00 24C64EB0 */ addiu $a2, %lo(D_80154EB0) # addiu $a2, $a2, 0x4eb0 -/* B87DA4 80110C04 8FA40058 */ lw $a0, 0x58($sp) -/* B87DA8 80110C08 24054000 */ li $a1, 16384 -/* B87DAC 80110C0C 0C031521 */ jal GameState_Alloc -/* B87DB0 80110C10 240700BE */ li $a3, 190 -/* B87DB4 80110C14 3C048015 */ lui $a0, %hi(D_80154EC4) # $a0, 0x8015 -/* B87DB8 80110C18 AE020138 */ sw $v0, 0x138($s0) -/* B87DBC 80110C1C 24844EC4 */ addiu $a0, %lo(D_80154EC4) # addiu $a0, $a0, 0x4ec4 -/* B87DC0 80110C20 0C00084C */ jal osSyncPrintf -/* B87DC4 80110C24 24054000 */ li $a1, 16384 -/* B87DC8 80110C28 3C048015 */ lui $a0, %hi(D_80154EE8) # $a0, 0x8015 -/* B87DCC 80110C2C 24844EE8 */ addiu $a0, %lo(D_80154EE8) # addiu $a0, $a0, 0x4ee8 -/* B87DD0 80110C30 0C00084C */ jal osSyncPrintf -/* B87DD4 80110C34 8E050138 */ lw $a1, 0x138($s0) -/* B87DD8 80110C38 8E0D0138 */ lw $t5, 0x138($s0) -/* B87DDC 80110C3C 15A00006 */ bnez $t5, .L80110C58 -/* B87DE0 80110C40 3C048015 */ lui $a0, %hi(D_80154F08) # $a0, 0x8015 -/* B87DE4 80110C44 3C058015 */ lui $a1, %hi(D_80154F2C) # $a1, 0x8015 -/* B87DE8 80110C48 24A54F2C */ addiu $a1, %lo(D_80154F2C) # addiu $a1, $a1, 0x4f2c -/* B87DEC 80110C4C 24844F08 */ addiu $a0, %lo(D_80154F08) # addiu $a0, $a0, 0x4f08 -/* B87DF0 80110C50 0C0007FC */ jal __assert -/* B87DF4 80110C54 240600C1 */ li $a2, 193 -.L80110C58: -/* B87DF8 80110C58 922E006B */ lbu $t6, 0x6b($s1) -/* B87DFC 80110C5C 3C048015 */ lui $a0, %hi(D_80154F40) # $a0, 0x8015 -/* B87E00 80110C60 24844F40 */ addiu $a0, %lo(D_80154F40) # addiu $a0, $a0, 0x4f40 -/* B87E04 80110C64 92250068 */ lbu $a1, 0x68($s1) -/* B87E08 80110C68 92260069 */ lbu $a2, 0x69($s1) -/* B87E0C 80110C6C 9227006A */ lbu $a3, 0x6a($s1) -/* B87E10 80110C70 0C00084C */ jal osSyncPrintf -/* B87E14 80110C74 AFAE0010 */ sw $t6, 0x10($sp) -/* B87E18 80110C78 92220068 */ lbu $v0, 0x68($s1) -/* B87E1C 80110C7C 284100F0 */ slti $at, $v0, 0xf0 -/* B87E20 80110C80 1020000D */ beqz $at, .L80110CB8 -/* B87E24 80110C84 3C180075 */ lui $t8, %hi(_icon_item_staticSegmentRomStart) # $t8, 0x75 -/* B87E28 80110C88 2718C000 */ addiu $t8, %lo(_icon_item_staticSegmentRomStart) # addiu $t8, $t8, -0x4000 -/* B87E2C 80110C8C 8E040138 */ lw $a0, 0x138($s0) -/* B87E30 80110C90 00027B00 */ sll $t7, $v0, 0xc -/* B87E34 80110C94 3C078015 */ lui $a3, %hi(D_80154F60) # $a3, 0x8015 -/* B87E38 80110C98 241900C6 */ li $t9, 198 -/* B87E3C 80110C9C AFB90010 */ sw $t9, 0x10($sp) -/* B87E40 80110CA0 24E74F60 */ addiu $a3, %lo(D_80154F60) # addiu $a3, $a3, 0x4f60 -/* B87E44 80110CA4 01F82821 */ addu $a1, $t7, $t8 -/* B87E48 80110CA8 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87E4C 80110CAC 24061000 */ li $a2, 4096 -/* B87E50 80110CB0 1000000F */ b .L80110CF0 -/* B87E54 80110CB4 92220069 */ lbu $v0, 0x69($s1) -.L80110CB8: -/* B87E58 80110CB8 240100FF */ li $at, 255 -/* B87E5C 80110CBC 1041000B */ beq $v0, $at, .L80110CEC -/* B87E60 80110CC0 00024B00 */ sll $t1, $v0, 0xc -/* B87E64 80110CC4 3C0A0075 */ lui $t2, %hi(_icon_item_staticSegmentRomStart) # $t2, 0x75 -/* B87E68 80110CC8 254AC000 */ addiu $t2, %lo(_icon_item_staticSegmentRomStart) # addiu $t2, $t2, -0x4000 -/* B87E6C 80110CCC 8E040138 */ lw $a0, 0x138($s0) -/* B87E70 80110CD0 3C078015 */ lui $a3, %hi(D_80154F74) # $a3, 0x8015 -/* B87E74 80110CD4 240B00CB */ li $t3, 203 -/* B87E78 80110CD8 AFAB0010 */ sw $t3, 0x10($sp) -/* B87E7C 80110CDC 24E74F74 */ addiu $a3, %lo(D_80154F74) # addiu $a3, $a3, 0x4f74 -/* B87E80 80110CE0 012A2821 */ addu $a1, $t1, $t2 -/* B87E84 80110CE4 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87E88 80110CE8 24061000 */ li $a2, 4096 -.L80110CEC: -/* B87E8C 80110CEC 92220069 */ lbu $v0, 0x69($s1) -.L80110CF0: -/* B87E90 80110CF0 3C0D0075 */ lui $t5, %hi(_icon_item_staticSegmentRomStart) # $t5, 0x75 -/* B87E94 80110CF4 25ADC000 */ addiu $t5, %lo(_icon_item_staticSegmentRomStart) # addiu $t5, $t5, -0x4000 -/* B87E98 80110CF8 284100F0 */ slti $at, $v0, 0xf0 -/* B87E9C 80110CFC 1020000A */ beqz $at, .L80110D28 -/* B87EA0 80110D00 00026300 */ sll $t4, $v0, 0xc -/* B87EA4 80110D04 8E040138 */ lw $a0, 0x138($s0) -/* B87EA8 80110D08 3C078015 */ lui $a3, %hi(D_80154F88) # $a3, 0x8015 -/* B87EAC 80110D0C 240E00D1 */ li $t6, 209 -/* B87EB0 80110D10 AFAE0010 */ sw $t6, 0x10($sp) -/* B87EB4 80110D14 24E74F88 */ addiu $a3, %lo(D_80154F88) # addiu $a3, $a3, 0x4f88 -/* B87EB8 80110D18 018D2821 */ addu $a1, $t4, $t5 -/* B87EBC 80110D1C 24061000 */ li $a2, 4096 -/* B87EC0 80110D20 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87EC4 80110D24 24841000 */ addiu $a0, $a0, 0x1000 -.L80110D28: -/* B87EC8 80110D28 9222006A */ lbu $v0, 0x6a($s1) -/* B87ECC 80110D2C 3C180075 */ lui $t8, %hi(_icon_item_staticSegmentRomStart) # $t8, 0x75 -/* B87ED0 80110D30 2718C000 */ addiu $t8, %lo(_icon_item_staticSegmentRomStart) # addiu $t8, $t8, -0x4000 -/* B87ED4 80110D34 284100F0 */ slti $at, $v0, 0xf0 -/* B87ED8 80110D38 1020000A */ beqz $at, .L80110D64 -/* B87EDC 80110D3C 00027B00 */ sll $t7, $v0, 0xc -/* B87EE0 80110D40 8E040138 */ lw $a0, 0x138($s0) -/* B87EE4 80110D44 3C078015 */ lui $a3, %hi(D_80154F9C) # $a3, 0x8015 -/* B87EE8 80110D48 241900D6 */ li $t9, 214 -/* B87EEC 80110D4C AFB90010 */ sw $t9, 0x10($sp) -/* B87EF0 80110D50 24E74F9C */ addiu $a3, %lo(D_80154F9C) # addiu $a3, $a3, 0x4f9c -/* B87EF4 80110D54 01F82821 */ addu $a1, $t7, $t8 -/* B87EF8 80110D58 24061000 */ li $a2, 4096 -/* B87EFC 80110D5C 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87F00 80110D60 24842000 */ addiu $a0, $a0, 0x2000 -.L80110D64: -/* B87F04 80110D64 9222006B */ lbu $v0, 0x6b($s1) -/* B87F08 80110D68 3C0A0075 */ lui $t2, %hi(_icon_item_staticSegmentRomStart) # $t2, 0x75 -/* B87F0C 80110D6C 254AC000 */ addiu $t2, %lo(_icon_item_staticSegmentRomStart) # addiu $t2, $t2, -0x4000 -/* B87F10 80110D70 284100F0 */ slti $at, $v0, 0xf0 -/* B87F14 80110D74 1020000A */ beqz $at, .L80110DA0 -/* B87F18 80110D78 00024B00 */ sll $t1, $v0, 0xc -/* B87F1C 80110D7C 8E040138 */ lw $a0, 0x138($s0) -/* B87F20 80110D80 3C078015 */ lui $a3, %hi(D_80154FB0) # $a3, 0x8015 -/* B87F24 80110D84 240B00DB */ li $t3, 219 -/* B87F28 80110D88 AFAB0010 */ sw $t3, 0x10($sp) -/* B87F2C 80110D8C 24E74FB0 */ addiu $a3, %lo(D_80154FB0) # addiu $a3, $a3, 0x4fb0 -/* B87F30 80110D90 012A2821 */ addu $a1, $t1, $t2 -/* B87F34 80110D94 24061000 */ li $a2, 4096 -/* B87F38 80110D98 0C0006A8 */ jal DmaMgr_SendRequest1 -/* B87F3C 80110D9C 24843000 */ addiu $a0, $a0, 0x3000 -.L80110DA0: -/* B87F40 80110DA0 3C048015 */ lui $a0, %hi(D_80154FC4) # $a0, 0x8015 -/* B87F44 80110DA4 24844FC4 */ addiu $a0, %lo(D_80154FC4) # addiu $a0, $a0, 0x4fc4 -/* B87F48 80110DA8 0C00084C */ jal osSyncPrintf -/* B87F4C 80110DAC 862513CE */ lh $a1, 0x13ce($s1) -/* B87F50 80110DB0 862213CE */ lh $v0, 0x13ce($s1) -/* B87F54 80110DB4 24060004 */ li $a2, 4 -/* B87F58 80110DB8 24010008 */ li $at, 8 -/* B87F5C 80110DBC 10C20009 */ beq $a2, $v0, .L80110DE4 -/* B87F60 80110DC0 3C048015 */ lui $a0, %hi(D_80154FD4) # $a0, 0x8015 -/* B87F64 80110DC4 50410008 */ beql $v0, $at, .L80110DE8 -/* B87F68 80110DC8 8E251364 */ lw $a1, 0x1364($s1) -/* B87F6C 80110DCC 862313D2 */ lh $v1, 0x13d2($s1) -/* B87F70 80110DD0 2401000A */ li $at, 10 -/* B87F74 80110DD4 50C30004 */ beql $a2, $v1, .L80110DE8 -/* B87F78 80110DD8 8E251364 */ lw $a1, 0x1364($s1) -/* B87F7C 80110DDC 5461002B */ bnel $v1, $at, .L80110E8C -/* B87F80 80110DE0 2841000B */ slti $at, $v0, 0xb -.L80110DE4: -/* B87F84 80110DE4 8E251364 */ lw $a1, 0x1364($s1) -.L80110DE8: -/* B87F88 80110DE8 0C00084C */ jal osSyncPrintf -/* B87F8C 80110DEC 24844FD4 */ addiu $a0, %lo(D_80154FD4) # addiu $a0, $a0, 0x4fd4 -/* B87F90 80110DF0 8E221364 */ lw $v0, 0x1364($s1) -/* B87F94 80110DF4 2401FFFF */ li $at, -1 -/* B87F98 80110DF8 24060004 */ li $a2, 4 -/* B87F9C 80110DFC 10410004 */ beq $v0, $at, .L80110E10 -/* B87FA0 80110E00 2419001A */ li $t9, 26 -/* B87FA4 80110E04 24010001 */ li $at, 1 -/* B87FA8 80110E08 5441000A */ bnel $v0, $at, .L80110E34 -/* B87FAC 80110E0C 862213CE */ lh $v0, 0x13ce($s1) -.L80110E10: -/* B87FB0 80110E10 862C13CE */ lh $t4, 0x13ce($s1) -/* B87FB4 80110E14 240D0001 */ li $t5, 1 -/* B87FB8 80110E18 240E008C */ li $t6, 140 -/* B87FBC 80110E1C 14CC0004 */ bne $a2, $t4, .L80110E30 -/* B87FC0 80110E20 240F0050 */ li $t7, 80 -/* B87FC4 80110E24 A62D13CE */ sh $t5, 0x13ce($s1) -/* B87FC8 80110E28 A62E13D6 */ sh $t6, 0x13d6($s1) -/* B87FCC 80110E2C A62F13DA */ sh $t7, 0x13da($s1) -.L80110E30: -/* B87FD0 80110E30 862213CE */ lh $v0, 0x13ce($s1) -.L80110E34: -/* B87FD4 80110E34 24010008 */ li $at, 8 -/* B87FD8 80110E38 240A0036 */ li $t2, 54 -/* B87FDC 80110E3C 10C20003 */ beq $a2, $v0, .L80110E4C -/* B87FE0 80110E40 240B002E */ li $t3, 46 -/* B87FE4 80110E44 54410004 */ bnel $v0, $at, .L80110E58 -/* B87FE8 80110E48 24020001 */ li $v0, 1 -.L80110E4C: -/* B87FEC 80110E4C 10000002 */ b .L80110E58 -/* B87FF0 80110E50 00001025 */ move $v0, $zero -/* B87FF4 80110E54 24020001 */ li $v0, 1 -.L80110E58: -/* B87FF8 80110E58 0002C040 */ sll $t8, $v0, 1 -/* B87FFC 80110E5C 02381821 */ addu $v1, $s1, $t8 -/* B88000 80110E60 A47913D6 */ sh $t9, 0x13d6($v1) -/* B88004 80110E64 8629002E */ lh $t1, 0x2e($s1) -/* B88008 80110E68 292100A1 */ slti $at, $t1, 0xa1 -/* B8800C 80110E6C 54200005 */ bnezl $at, .L80110E84 -/* B88010 80110E70 A46B13DA */ sh $t3, 0x13da($v1) -/* B88014 80110E74 A46A13DA */ sh $t2, 0x13da($v1) -/* B88018 80110E78 10000003 */ b .L80110E88 -/* B8801C 80110E7C 862213CE */ lh $v0, 0x13ce($s1) -/* B88020 80110E80 A46B13DA */ sh $t3, 0x13da($v1) -.L80110E84: -/* B88024 80110E84 862213CE */ lh $v0, 0x13ce($s1) -.L80110E88: -/* B88028 80110E88 2841000B */ slti $at, $v0, 0xb -.L80110E8C: -/* B8802C 80110E8C 14200007 */ bnez $at, .L80110EAC -/* B88030 80110E90 28410010 */ slti $at, $v0, 0x10 -/* B88034 80110E94 10200005 */ beqz $at, .L80110EAC -/* B88038 80110E98 3C048015 */ lui $a0, %hi(D_80154FE8) # $a0, 0x8015 -/* B8803C 80110E9C A62013CE */ sh $zero, 0x13ce($s1) -/* B88040 80110EA0 862513CE */ lh $a1, 0x13ce($s1) -/* B88044 80110EA4 0C00084C */ jal osSyncPrintf -/* B88048 80110EA8 24844FE8 */ addiu $a0, %lo(D_80154FE8) # addiu $a0, $a0, 0x4fe8 -.L80110EAC: -/* B8804C 80110EAC 8FA5002C */ lw $a1, 0x2c($sp) -/* B88050 80110EB0 3C048015 */ lui $a0, %hi(D_80155028) # $a0, 0x8015 -/* B88054 80110EB4 24845028 */ addiu $a0, %lo(D_80155028) # addiu $a0, $a0, 0x5028 -/* B88058 80110EB8 0C00084C */ jal osSyncPrintf -/* B8805C 80110EBC 24A55300 */ addiu $a1, $a1, 0x5300 -/* B88060 80110EC0 0C01E258 */ jal Health_InitData -/* B88064 80110EC4 8FA40058 */ lw $a0, 0x58($sp) -/* B88068 80110EC8 0C0203DA */ jal Map_Init -/* B8806C 80110ECC 8FA40058 */ lw $a0, 0x58($sp) -/* B88070 80110ED0 3C058016 */ lui $a1, %hi(gGameInfo) # $a1, 0x8016 -/* B88074 80110ED4 24A5FA90 */ addiu $a1, %lo(gGameInfo) # addiu $a1, $a1, -0x570 -/* B88078 80110ED8 A6000242 */ sh $zero, 0x242($s0) -/* B8807C 80110EDC A600023C */ sh $zero, 0x23c($s0) -/* B88080 80110EE0 8CAD0000 */ lw $t5, ($a1) -/* B88084 80110EE4 240200A0 */ li $v0, 160 -/* B88088 80110EE8 240E00FF */ li $t6, 255 -/* B8808C 80110EEC A5A20820 */ sh $v0, 0x820($t5) -/* B88090 80110EF0 8CAF0000 */ lw $t7, ($a1) -/* B88094 80110EF4 2403001E */ li $v1, 30 -/* B88098 80110EF8 240A00A2 */ li $t2, 162 -/* B8809C 80110EFC A5EE07EA */ sh $t6, 0x7ea($t7) -/* B880A0 80110F00 8CB80000 */ lw $t8, ($a1) -/* B880A4 80110F04 240400BA */ li $a0, 186 -/* B880A8 80110F08 240F00C8 */ li $t7, 200 -/* B880AC 80110F0C A70307EC */ sh $v1, 0x7ec($t8) -/* B880B0 80110F10 8CB90000 */ lw $t9, ($a1) -/* B880B4 80110F14 A72307EE */ sh $v1, 0x7ee($t9) -/* B880B8 80110F18 8CA90000 */ lw $t1, ($a1) -/* B880BC 80110F1C 24190032 */ li $t9, 50 -/* B880C0 80110F20 A5220838 */ sh $v0, 0x838($t1) -/* B880C4 80110F24 8CAB0000 */ lw $t3, ($a1) -/* B880C8 80110F28 A56A0F94 */ sh $t2, 0xf94($t3) -/* B880CC 80110F2C 8CAC0000 */ lw $t4, ($a1) -/* B880D0 80110F30 A5840AB6 */ sh $a0, 0xab6($t4) -/* B880D4 80110F34 8CAD0000 */ lw $t5, ($a1) -/* B880D8 80110F38 A5A40ABC */ sh $a0, 0xabc($t5) -/* B880DC 80110F3C 8CAE0000 */ lw $t6, ($a1) -/* B880E0 80110F40 A5C00AC0 */ sh $zero, 0xac0($t6) -/* B880E4 80110F44 8CB80000 */ lw $t8, ($a1) -/* B880E8 80110F48 A70F0AC2 */ sh $t7, 0xac2($t8) -/* B880EC 80110F4C 8CA90000 */ lw $t1, ($a1) -/* B880F0 80110F50 A5390AC4 */ sh $t9, 0xac4($t1) -/* B880F4 80110F54 8FBF0024 */ lw $ra, 0x24($sp) -/* B880F8 80110F58 8FB10020 */ lw $s1, 0x20($sp) -/* B880FC 80110F5C 8FB0001C */ lw $s0, 0x1c($sp) -/* B88100 80110F60 03E00008 */ jr $ra -/* B88104 80110F64 27BD0058 */ addiu $sp, $sp, 0x58 - diff --git a/asm/non_matchings/code/z_eff_spark/EffectSpark_Draw.s b/asm/non_matchings/code/z_eff_spark/EffectSpark_Draw.s deleted file mode 100644 index 9d43873951..0000000000 --- a/asm/non_matchings/code/z_eff_spark/EffectSpark_Draw.s +++ /dev/null @@ -1,1263 +0,0 @@ -.rdata -glabel D_80135548 - .asciz "../z_eff_spark.c" - .balign 4 - -glabel D_8013555C - .asciz "EffectSparkInfo_disp():メモリー確保失敗 graph_malloc\n" - # EUC-JP: メモリー確保失敗 | Memory allocation failure - .balign 4 - -glabel D_80135594 - .asciz "../z_eff_spark.c" - .balign 4 - -.text -glabel EffectSpark_Draw -/* A9C1A0 80025000 27BDFE18 */ addiu $sp, $sp, -0x1e8 -/* A9C1A4 80025004 AFBF0034 */ sw $ra, 0x34($sp) -/* A9C1A8 80025008 AFB70030 */ sw $s7, 0x30($sp) -/* A9C1AC 8002500C AFB6002C */ sw $s6, 0x2c($sp) -/* A9C1B0 80025010 00A0B025 */ move $s6, $a1 -/* A9C1B4 80025014 0080B825 */ move $s7, $a0 -/* A9C1B8 80025018 AFB50028 */ sw $s5, 0x28($sp) -/* A9C1BC 8002501C AFB40024 */ sw $s4, 0x24($sp) -/* A9C1C0 80025020 AFB30020 */ sw $s3, 0x20($sp) -/* A9C1C4 80025024 AFB2001C */ sw $s2, 0x1c($sp) -/* A9C1C8 80025028 AFB10018 */ sw $s1, 0x18($sp) -/* A9C1CC 8002502C AFB00014 */ sw $s0, 0x14($sp) -/* A9C1D0 80025030 0C009AC0 */ jal Effect_GetGlobalCtx -/* A9C1D4 80025034 AFA401E0 */ sw $a0, 0x1e0($sp) -/* A9C1D8 80025038 3C068013 */ lui $a2, %hi(D_80135548) # $a2, 0x8013 -/* A9C1DC 8002503C 00409825 */ move $s3, $v0 -/* A9C1E0 80025040 24C65548 */ addiu $a2, %lo(D_80135548) # addiu $a2, $a2, 0x5548 -/* A9C1E4 80025044 27A401AC */ addiu $a0, $sp, 0x1ac -/* A9C1E8 80025048 02C02825 */ move $a1, $s6 -/* A9C1EC 8002504C 0C031AB1 */ jal Graph_OpenDisps -/* A9C1F0 80025050 24070125 */ li $a3, 293 -/* A9C1F4 80025054 12E00464 */ beqz $s7, .L800261E8 -/* A9C1F8 80025058 3C0FDA38 */ lui $t7, (0xDA380003 >> 16) # lui $t7, 0xda38 -/* A9C1FC 8002505C 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C200 80025060 3C188013 */ lui $t8, %hi(gMtxClear) # $t8, 0x8013 -/* A9C204 80025064 2718DB20 */ addiu $t8, %lo(gMtxClear) # addiu $t8, $t8, -0x24e0 -/* A9C208 80025068 248E0008 */ addiu $t6, $a0, 8 -/* A9C20C 8002506C AECE02D0 */ sw $t6, 0x2d0($s6) -/* A9C210 80025070 35EF0003 */ ori $t7, (0xDA380003 & 0xFFFF) # ori $t7, $t7, 3 -/* A9C214 80025074 AC8F0000 */ sw $t7, ($a0) -/* A9C218 80025078 AC980004 */ sw $t8, 4($a0) -/* A9C21C 8002507C 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C220 80025080 0C024DDD */ jal Gfx_CallSetupDL -/* A9C224 80025084 24050026 */ li $a1, 38 -/* A9C228 80025088 00402025 */ move $a0, $v0 -/* A9C22C 8002508C AEC202D0 */ sw $v0, 0x2d0($s6) -/* A9C230 80025090 24990008 */ addiu $t9, $a0, 8 -/* A9C234 80025094 AED902D0 */ sw $t9, 0x2d0($s6) -/* A9C238 80025098 3C08E300 */ lui $t0, (0xE3000A01 >> 16) # lui $t0, 0xe300 -/* A9C23C 8002509C 35080A01 */ ori $t0, (0xE3000A01 & 0xFFFF) # ori $t0, $t0, 0xa01 -/* A9C240 800250A0 3C090010 */ lui $t1, 0x10 -/* A9C244 800250A4 AC490004 */ sw $t1, 4($v0) -/* A9C248 800250A8 AC480000 */ sw $t0, ($v0) -/* A9C24C 800250AC 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C250 800250B0 3C03E700 */ lui $v1, 0xe700 -/* A9C254 800250B4 3C0CD700 */ lui $t4, (0xD7000002 >> 16) # lui $t4, 0xd700 -/* A9C258 800250B8 248A0008 */ addiu $t2, $a0, 8 -/* A9C25C 800250BC AECA02D0 */ sw $t2, 0x2d0($s6) -/* A9C260 800250C0 AC800004 */ sw $zero, 4($a0) -/* A9C264 800250C4 AC830000 */ sw $v1, ($a0) -/* A9C268 800250C8 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C26C 800250CC 358C0002 */ ori $t4, (0xD7000002 & 0xFFFF) # ori $t4, $t4, 2 -/* A9C270 800250D0 240DFFFF */ li $t5, -1 -/* A9C274 800250D4 248B0008 */ addiu $t3, $a0, 8 -/* A9C278 800250D8 AECB02D0 */ sw $t3, 0x2d0($s6) -/* A9C27C 800250DC AC8D0004 */ sw $t5, 4($a0) -/* A9C280 800250E0 AC8C0000 */ sw $t4, ($a0) -/* A9C284 800250E4 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C288 800250E8 3C180404 */ lui $t8, %hi(D_04038FB0) # $t8, 0x404 -/* A9C28C 800250EC 27188FB0 */ addiu $t8, %lo(D_04038FB0) # addiu $t8, $t8, -0x7050 -/* A9C290 800250F0 248E0008 */ addiu $t6, $a0, 8 -/* A9C294 800250F4 AECE02D0 */ sw $t6, 0x2d0($s6) -/* A9C298 800250F8 3C0FFD90 */ lui $t7, 0xfd90 -/* A9C29C 800250FC AC8F0000 */ sw $t7, ($a0) -/* A9C2A0 80025100 AC980004 */ sw $t8, 4($a0) -/* A9C2A4 80025104 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C2A8 80025108 3C090701 */ lui $t1, (0x07014050 >> 16) # lui $t1, 0x701 -/* A9C2AC 8002510C 35294050 */ ori $t1, (0x07014050 & 0xFFFF) # ori $t1, $t1, 0x4050 -/* A9C2B0 80025110 24990008 */ addiu $t9, $a0, 8 -/* A9C2B4 80025114 AED902D0 */ sw $t9, 0x2d0($s6) -/* A9C2B8 80025118 3C08F590 */ lui $t0, 0xf590 -/* A9C2BC 8002511C AC880000 */ sw $t0, ($a0) -/* A9C2C0 80025120 AC890004 */ sw $t1, 4($a0) -/* A9C2C4 80025124 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C2C8 80025128 3C0BE600 */ lui $t3, 0xe600 -/* A9C2CC 8002512C 3C0E071F */ lui $t6, (0x071FF200 >> 16) # lui $t6, 0x71f -/* A9C2D0 80025130 248A0008 */ addiu $t2, $a0, 8 -/* A9C2D4 80025134 AECA02D0 */ sw $t2, 0x2d0($s6) -/* A9C2D8 80025138 AC800004 */ sw $zero, 4($a0) -/* A9C2DC 8002513C AC8B0000 */ sw $t3, ($a0) -/* A9C2E0 80025140 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C2E4 80025144 35CEF200 */ ori $t6, (0x071FF200 & 0xFFFF) # ori $t6, $t6, 0xf200 -/* A9C2E8 80025148 3C0DF300 */ lui $t5, 0xf300 -/* A9C2EC 8002514C 248C0008 */ addiu $t4, $a0, 8 -/* A9C2F0 80025150 AECC02D0 */ sw $t4, 0x2d0($s6) -/* A9C2F4 80025154 AC8E0004 */ sw $t6, 4($a0) -/* A9C2F8 80025158 AC8D0000 */ sw $t5, ($a0) -/* A9C2FC 8002515C 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C300 80025160 3C080001 */ lui $t0, (0x00014050 >> 16) # lui $t0, 1 -/* A9C304 80025164 3C19F588 */ lui $t9, (0xF5880800 >> 16) # lui $t9, 0xf588 -/* A9C308 80025168 248F0008 */ addiu $t7, $a0, 8 -/* A9C30C 8002516C AECF02D0 */ sw $t7, 0x2d0($s6) -/* A9C310 80025170 AC800004 */ sw $zero, 4($a0) -/* A9C314 80025174 AC830000 */ sw $v1, ($a0) -/* A9C318 80025178 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C31C 8002517C 37390800 */ ori $t9, (0xF5880800 & 0xFFFF) # ori $t9, $t9, 0x800 -/* A9C320 80025180 35084050 */ ori $t0, (0x00014050 & 0xFFFF) # ori $t0, $t0, 0x4050 -/* A9C324 80025184 24980008 */ addiu $t8, $a0, 8 -/* A9C328 80025188 AED802D0 */ sw $t8, 0x2d0($s6) -/* A9C32C 8002518C AC880004 */ sw $t0, 4($a0) -/* A9C330 80025190 AC990000 */ sw $t9, ($a0) -/* A9C334 80025194 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C338 80025198 3C0B0007 */ lui $t3, (0x0007C07C >> 16) # lui $t3, 7 -/* A9C33C 8002519C 356BC07C */ ori $t3, (0x0007C07C & 0xFFFF) # ori $t3, $t3, 0xc07c -/* A9C340 800251A0 24890008 */ addiu $t1, $a0, 8 -/* A9C344 800251A4 AEC902D0 */ sw $t1, 0x2d0($s6) -/* A9C348 800251A8 3C0AF200 */ lui $t2, 0xf200 -/* A9C34C 800251AC AC8A0000 */ sw $t2, ($a0) -/* A9C350 800251B0 AC8B0004 */ sw $t3, 4($a0) -/* A9C354 800251B4 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C358 800251B8 3C0DFCFF */ lui $t5, (0xFCFFFFFF >> 16) # lui $t5, 0xfcff -/* A9C35C 800251BC 3C0EFFFE */ lui $t6, (0xFFFE7238 >> 16) # lui $t6, 0xfffe -/* A9C360 800251C0 248C0008 */ addiu $t4, $a0, 8 -/* A9C364 800251C4 AECC02D0 */ sw $t4, 0x2d0($s6) -/* A9C368 800251C8 35CE7238 */ ori $t6, (0xFFFE7238 & 0xFFFF) # ori $t6, $t6, 0x7238 -/* A9C36C 800251CC 35ADFFFF */ ori $t5, (0xFCFFFFFF & 0xFFFF) # ori $t5, $t5, 0xffff -/* A9C370 800251D0 AC8D0000 */ sw $t5, ($a0) -/* A9C374 800251D4 AC8E0004 */ sw $t6, 4($a0) -/* A9C378 800251D8 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C37C 800251DC 3C190C18 */ lui $t9, (0x0C184B50 >> 16) # lui $t9, 0xc18 -/* A9C380 800251E0 3C18E200 */ lui $t8, (0xE200001C >> 16) # lui $t8, 0xe200 -/* A9C384 800251E4 248F0008 */ addiu $t7, $a0, 8 -/* A9C388 800251E8 AECF02D0 */ sw $t7, 0x2d0($s6) -/* A9C38C 800251EC 3718001C */ ori $t8, (0xE200001C & 0xFFFF) # ori $t8, $t8, 0x1c -/* A9C390 800251F0 37394B50 */ ori $t9, (0x0C184B50 & 0xFFFF) # ori $t9, $t9, 0x4b50 -/* A9C394 800251F4 AC990004 */ sw $t9, 4($a0) -/* A9C398 800251F8 AC980000 */ sw $t8, ($a0) -/* A9C39C 800251FC 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C3A0 80025200 3C09D9F0 */ lui $t1, (0xD9F0F9FF >> 16) # lui $t1, 0xd9f0 -/* A9C3A4 80025204 3529F9FF */ ori $t1, (0xD9F0F9FF & 0xFFFF) # ori $t1, $t1, 0xf9ff -/* A9C3A8 80025208 24880008 */ addiu $t0, $a0, 8 -/* A9C3AC 8002520C AEC802D0 */ sw $t0, 0x2d0($s6) -/* A9C3B0 80025210 AC800004 */ sw $zero, 4($a0) -/* A9C3B4 80025214 AC890000 */ sw $t1, ($a0) -/* A9C3B8 80025218 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C3BC 8002521C 3C0C0020 */ lui $t4, (0x00200005 >> 16) # lui $t4, 0x20 -/* A9C3C0 80025220 3C0BD9FF */ lui $t3, (0xD9FFFFFF >> 16) # lui $t3, 0xd9ff -/* A9C3C4 80025224 248A0008 */ addiu $t2, $a0, 8 -/* A9C3C8 80025228 AECA02D0 */ sw $t2, 0x2d0($s6) -/* A9C3CC 8002522C 356BFFFF */ ori $t3, (0xD9FFFFFF & 0xFFFF) # ori $t3, $t3, 0xffff -/* A9C3D0 80025230 358C0005 */ ori $t4, (0x00200005 & 0xFFFF) # ori $t4, $t4, 5 -/* A9C3D4 80025234 AC8C0004 */ sw $t4, 4($a0) -/* A9C3D8 80025238 AC8B0000 */ sw $t3, ($a0) -/* A9C3DC 8002523C 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9C3E0 80025240 248D0008 */ addiu $t5, $a0, 8 -/* A9C3E4 80025244 AECD02D0 */ sw $t5, 0x2d0($s6) -/* A9C3E8 80025248 AC800004 */ sw $zero, 4($a0) -/* A9C3EC 8002524C AC830000 */ sw $v1, ($a0) -/* A9C3F0 80025250 8EE50008 */ lw $a1, 8($s7) -/* A9C3F4 80025254 02C02025 */ move $a0, $s6 -/* A9C3F8 80025258 0C031A73 */ jal Graph_Alloc -/* A9C3FC 8002525C 00052980 */ sll $a1, $a1, 6 -/* A9C400 80025260 14400006 */ bnez $v0, .L8002527C -/* A9C404 80025264 00401825 */ move $v1, $v0 -/* A9C408 80025268 3C048013 */ lui $a0, %hi(D_8013555C) # $a0, 0x8013 -/* A9C40C 8002526C 0C00084C */ jal osSyncPrintf -/* A9C410 80025270 2484555C */ addiu $a0, %lo(D_8013555C) # addiu $a0, $a0, 0x555c -/* A9C414 80025274 100003DC */ b .L800261E8 -/* A9C418 80025278 00000000 */ nop -.L8002527C: -/* A9C41C 8002527C 8EEE04BC */ lw $t6, 0x4bc($s7) -/* A9C420 80025280 8EEF04C0 */ lw $t7, 0x4c0($s7) -/* A9C424 80025284 92F8049C */ lbu $t8, 0x49c($s7) -/* A9C428 80025288 448E2000 */ mtc1 $t6, $f4 -/* A9C42C 8002528C 448F4000 */ mtc1 $t7, $f8 -/* A9C430 80025290 00001025 */ move $v0, $zero -/* A9C434 80025294 468021A0 */ cvt.s.w $f6, $f4 -/* A9C438 80025298 44982000 */ mtc1 $t8, $f4 -/* A9C43C 8002529C 468042A0 */ cvt.s.w $f10, $f8 -/* A9C440 800252A0 468020A0 */ cvt.s.w $f2, $f4 -/* A9C444 800252A4 07010005 */ bgez $t8, .L800252BC -/* A9C448 800252A8 460A3003 */ div.s $f0, $f6, $f10 -/* A9C44C 800252AC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C450 800252B0 44814000 */ mtc1 $at, $f8 -/* A9C454 800252B4 00000000 */ nop -/* A9C458 800252B8 46081080 */ add.s $f2, $f2, $f8 -.L800252BC: -/* A9C45C 800252BC 92F904AC */ lbu $t9, 0x4ac($s7) -/* A9C460 800252C0 44993000 */ mtc1 $t9, $f6 -/* A9C464 800252C4 07210005 */ bgez $t9, .L800252DC -/* A9C468 800252C8 468032A0 */ cvt.s.w $f10, $f6 -/* A9C46C 800252CC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C470 800252D0 44812000 */ mtc1 $at, $f4 -/* A9C474 800252D4 00000000 */ nop -/* A9C478 800252D8 46045280 */ add.s $f10, $f10, $f4 -.L800252DC: -/* A9C47C 800252DC 46025201 */ sub.s $f8, $f10, $f2 -/* A9C480 800252E0 24090001 */ li $t1, 1 -/* A9C484 800252E4 46004182 */ mul.s $f6, $f8, $f0 -/* A9C488 800252E8 46023100 */ add.s $f4, $f6, $f2 -/* A9C48C 800252EC 4448F800 */ cfc1 $t0, $31 -/* A9C490 800252F0 44C9F800 */ ctc1 $t1, $31 -/* A9C494 800252F4 00000000 */ nop -/* A9C498 800252F8 460022A4 */ cvt.w.s $f10, $f4 -/* A9C49C 800252FC 4449F800 */ cfc1 $t1, $31 -/* A9C4A0 80025300 00000000 */ nop -/* A9C4A4 80025304 31290078 */ andi $t1, $t1, 0x78 -/* A9C4A8 80025308 11200012 */ beqz $t1, .L80025354 -/* A9C4AC 8002530C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C4B0 80025310 44815000 */ mtc1 $at, $f10 -/* A9C4B4 80025314 24090001 */ li $t1, 1 -/* A9C4B8 80025318 460A2281 */ sub.s $f10, $f4, $f10 -/* A9C4BC 8002531C 44C9F800 */ ctc1 $t1, $31 -/* A9C4C0 80025320 00000000 */ nop -/* A9C4C4 80025324 460052A4 */ cvt.w.s $f10, $f10 -/* A9C4C8 80025328 4449F800 */ cfc1 $t1, $31 -/* A9C4CC 8002532C 00000000 */ nop -/* A9C4D0 80025330 31290078 */ andi $t1, $t1, 0x78 -/* A9C4D4 80025334 15200005 */ bnez $t1, .L8002534C -/* A9C4D8 80025338 00000000 */ nop -/* A9C4DC 8002533C 44095000 */ mfc1 $t1, $f10 -/* A9C4E0 80025340 3C018000 */ lui $at, 0x8000 -/* A9C4E4 80025344 10000007 */ b .L80025364 -/* A9C4E8 80025348 01214825 */ or $t1, $t1, $at -.L8002534C: -/* A9C4EC 8002534C 10000005 */ b .L80025364 -/* A9C4F0 80025350 2409FFFF */ li $t1, -1 -.L80025354: -/* A9C4F4 80025354 44095000 */ mfc1 $t1, $f10 -/* A9C4F8 80025358 00000000 */ nop -/* A9C4FC 8002535C 0520FFFB */ bltz $t1, .L8002534C -/* A9C500 80025360 00000000 */ nop -.L80025364: -/* A9C504 80025364 A3A901D3 */ sb $t1, 0x1d3($sp) -/* A9C508 80025368 92EA049D */ lbu $t2, 0x49d($s7) -/* A9C50C 8002536C 44C8F800 */ ctc1 $t0, $31 -/* A9C510 80025370 448A4000 */ mtc1 $t2, $f8 -/* A9C514 80025374 05410005 */ bgez $t2, .L8002538C -/* A9C518 80025378 46804320 */ cvt.s.w $f12, $f8 -/* A9C51C 8002537C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C520 80025380 44813000 */ mtc1 $at, $f6 -/* A9C524 80025384 00000000 */ nop -/* A9C528 80025388 46066300 */ add.s $f12, $f12, $f6 -.L8002538C: -/* A9C52C 8002538C 92EB04AD */ lbu $t3, 0x4ad($s7) -/* A9C530 80025390 448B2000 */ mtc1 $t3, $f4 -/* A9C534 80025394 05610005 */ bgez $t3, .L800253AC -/* A9C538 80025398 468022A0 */ cvt.s.w $f10, $f4 -/* A9C53C 8002539C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C540 800253A0 44814000 */ mtc1 $at, $f8 -/* A9C544 800253A4 00000000 */ nop -/* A9C548 800253A8 46085280 */ add.s $f10, $f10, $f8 -.L800253AC: -/* A9C54C 800253AC 460C5181 */ sub.s $f6, $f10, $f12 -/* A9C550 800253B0 240D0001 */ li $t5, 1 -/* A9C554 800253B4 46003102 */ mul.s $f4, $f6, $f0 -/* A9C558 800253B8 460C2200 */ add.s $f8, $f4, $f12 -/* A9C55C 800253BC 444CF800 */ cfc1 $t4, $31 -/* A9C560 800253C0 44CDF800 */ ctc1 $t5, $31 -/* A9C564 800253C4 00000000 */ nop -/* A9C568 800253C8 460042A4 */ cvt.w.s $f10, $f8 -/* A9C56C 800253CC 444DF800 */ cfc1 $t5, $31 -/* A9C570 800253D0 00000000 */ nop -/* A9C574 800253D4 31AD0078 */ andi $t5, $t5, 0x78 -/* A9C578 800253D8 11A00012 */ beqz $t5, .L80025424 -/* A9C57C 800253DC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C580 800253E0 44815000 */ mtc1 $at, $f10 -/* A9C584 800253E4 240D0001 */ li $t5, 1 -/* A9C588 800253E8 460A4281 */ sub.s $f10, $f8, $f10 -/* A9C58C 800253EC 44CDF800 */ ctc1 $t5, $31 -/* A9C590 800253F0 00000000 */ nop -/* A9C594 800253F4 460052A4 */ cvt.w.s $f10, $f10 -/* A9C598 800253F8 444DF800 */ cfc1 $t5, $31 -/* A9C59C 800253FC 00000000 */ nop -/* A9C5A0 80025400 31AD0078 */ andi $t5, $t5, 0x78 -/* A9C5A4 80025404 15A00005 */ bnez $t5, .L8002541C -/* A9C5A8 80025408 00000000 */ nop -/* A9C5AC 8002540C 440D5000 */ mfc1 $t5, $f10 -/* A9C5B0 80025410 3C018000 */ lui $at, 0x8000 -/* A9C5B4 80025414 10000007 */ b .L80025434 -/* A9C5B8 80025418 01A16825 */ or $t5, $t5, $at -.L8002541C: -/* A9C5BC 8002541C 10000005 */ b .L80025434 -/* A9C5C0 80025420 240DFFFF */ li $t5, -1 -.L80025424: -/* A9C5C4 80025424 440D5000 */ mfc1 $t5, $f10 -/* A9C5C8 80025428 00000000 */ nop -/* A9C5CC 8002542C 05A0FFFB */ bltz $t5, .L8002541C -/* A9C5D0 80025430 00000000 */ nop -.L80025434: -/* A9C5D4 80025434 A3AD01D2 */ sb $t5, 0x1d2($sp) -/* A9C5D8 80025438 92EE049E */ lbu $t6, 0x49e($s7) -/* A9C5DC 8002543C 44CCF800 */ ctc1 $t4, $31 -/* A9C5E0 80025440 448E3000 */ mtc1 $t6, $f6 -/* A9C5E4 80025444 05C10005 */ bgez $t6, .L8002545C -/* A9C5E8 80025448 468033A0 */ cvt.s.w $f14, $f6 -/* A9C5EC 8002544C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C5F0 80025450 44812000 */ mtc1 $at, $f4 -/* A9C5F4 80025454 00000000 */ nop -/* A9C5F8 80025458 46047380 */ add.s $f14, $f14, $f4 -.L8002545C: -/* A9C5FC 8002545C 92EF04AE */ lbu $t7, 0x4ae($s7) -/* A9C600 80025460 448F4000 */ mtc1 $t7, $f8 -/* A9C604 80025464 05E10005 */ bgez $t7, .L8002547C -/* A9C608 80025468 468042A0 */ cvt.s.w $f10, $f8 -/* A9C60C 8002546C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C610 80025470 44813000 */ mtc1 $at, $f6 -/* A9C614 80025474 00000000 */ nop -/* A9C618 80025478 46065280 */ add.s $f10, $f10, $f6 -.L8002547C: -/* A9C61C 8002547C 460E5101 */ sub.s $f4, $f10, $f14 -/* A9C620 80025480 24190001 */ li $t9, 1 -/* A9C624 80025484 46002202 */ mul.s $f8, $f4, $f0 -/* A9C628 80025488 460E4180 */ add.s $f6, $f8, $f14 -/* A9C62C 8002548C 4458F800 */ cfc1 $t8, $31 -/* A9C630 80025490 44D9F800 */ ctc1 $t9, $31 -/* A9C634 80025494 00000000 */ nop -/* A9C638 80025498 460032A4 */ cvt.w.s $f10, $f6 -/* A9C63C 8002549C 4459F800 */ cfc1 $t9, $31 -/* A9C640 800254A0 00000000 */ nop -/* A9C644 800254A4 33390078 */ andi $t9, $t9, 0x78 -/* A9C648 800254A8 13200012 */ beqz $t9, .L800254F4 -/* A9C64C 800254AC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C650 800254B0 44815000 */ mtc1 $at, $f10 -/* A9C654 800254B4 24190001 */ li $t9, 1 -/* A9C658 800254B8 460A3281 */ sub.s $f10, $f6, $f10 -/* A9C65C 800254BC 44D9F800 */ ctc1 $t9, $31 -/* A9C660 800254C0 00000000 */ nop -/* A9C664 800254C4 460052A4 */ cvt.w.s $f10, $f10 -/* A9C668 800254C8 4459F800 */ cfc1 $t9, $31 -/* A9C66C 800254CC 00000000 */ nop -/* A9C670 800254D0 33390078 */ andi $t9, $t9, 0x78 -/* A9C674 800254D4 17200005 */ bnez $t9, .L800254EC -/* A9C678 800254D8 00000000 */ nop -/* A9C67C 800254DC 44195000 */ mfc1 $t9, $f10 -/* A9C680 800254E0 3C018000 */ lui $at, 0x8000 -/* A9C684 800254E4 10000007 */ b .L80025504 -/* A9C688 800254E8 0321C825 */ or $t9, $t9, $at -.L800254EC: -/* A9C68C 800254EC 10000005 */ b .L80025504 -/* A9C690 800254F0 2419FFFF */ li $t9, -1 -.L800254F4: -/* A9C694 800254F4 44195000 */ mfc1 $t9, $f10 -/* A9C698 800254F8 00000000 */ nop -/* A9C69C 800254FC 0720FFFB */ bltz $t9, .L800254EC -/* A9C6A0 80025500 00000000 */ nop -.L80025504: -/* A9C6A4 80025504 A3B901D1 */ sb $t9, 0x1d1($sp) -/* A9C6A8 80025508 92E8049F */ lbu $t0, 0x49f($s7) -/* A9C6AC 8002550C 44D8F800 */ ctc1 $t8, $31 -/* A9C6B0 80025510 44882000 */ mtc1 $t0, $f4 -/* A9C6B4 80025514 05010005 */ bgez $t0, .L8002552C -/* A9C6B8 80025518 46802420 */ cvt.s.w $f16, $f4 -/* A9C6BC 8002551C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C6C0 80025520 44814000 */ mtc1 $at, $f8 -/* A9C6C4 80025524 00000000 */ nop -/* A9C6C8 80025528 46088400 */ add.s $f16, $f16, $f8 -.L8002552C: -/* A9C6CC 8002552C 92E904AF */ lbu $t1, 0x4af($s7) -/* A9C6D0 80025530 44893000 */ mtc1 $t1, $f6 -/* A9C6D4 80025534 05210005 */ bgez $t1, .L8002554C -/* A9C6D8 80025538 468032A0 */ cvt.s.w $f10, $f6 -/* A9C6DC 8002553C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C6E0 80025540 44812000 */ mtc1 $at, $f4 -/* A9C6E4 80025544 00000000 */ nop -/* A9C6E8 80025548 46045280 */ add.s $f10, $f10, $f4 -.L8002554C: -/* A9C6EC 8002554C 46105201 */ sub.s $f8, $f10, $f16 -/* A9C6F0 80025550 240B0001 */ li $t3, 1 -/* A9C6F4 80025554 46004182 */ mul.s $f6, $f8, $f0 -/* A9C6F8 80025558 46103100 */ add.s $f4, $f6, $f16 -/* A9C6FC 8002555C 444AF800 */ cfc1 $t2, $31 -/* A9C700 80025560 44CBF800 */ ctc1 $t3, $31 -/* A9C704 80025564 00000000 */ nop -/* A9C708 80025568 460022A4 */ cvt.w.s $f10, $f4 -/* A9C70C 8002556C 444BF800 */ cfc1 $t3, $31 -/* A9C710 80025570 00000000 */ nop -/* A9C714 80025574 316B0078 */ andi $t3, $t3, 0x78 -/* A9C718 80025578 11600012 */ beqz $t3, .L800255C4 -/* A9C71C 8002557C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C720 80025580 44815000 */ mtc1 $at, $f10 -/* A9C724 80025584 240B0001 */ li $t3, 1 -/* A9C728 80025588 460A2281 */ sub.s $f10, $f4, $f10 -/* A9C72C 8002558C 44CBF800 */ ctc1 $t3, $31 -/* A9C730 80025590 00000000 */ nop -/* A9C734 80025594 460052A4 */ cvt.w.s $f10, $f10 -/* A9C738 80025598 444BF800 */ cfc1 $t3, $31 -/* A9C73C 8002559C 00000000 */ nop -/* A9C740 800255A0 316B0078 */ andi $t3, $t3, 0x78 -/* A9C744 800255A4 15600005 */ bnez $t3, .L800255BC -/* A9C748 800255A8 00000000 */ nop -/* A9C74C 800255AC 440B5000 */ mfc1 $t3, $f10 -/* A9C750 800255B0 3C018000 */ lui $at, 0x8000 -/* A9C754 800255B4 10000007 */ b .L800255D4 -/* A9C758 800255B8 01615825 */ or $t3, $t3, $at -.L800255BC: -/* A9C75C 800255BC 10000005 */ b .L800255D4 -/* A9C760 800255C0 240BFFFF */ li $t3, -1 -.L800255C4: -/* A9C764 800255C4 440B5000 */ mfc1 $t3, $f10 -/* A9C768 800255C8 00000000 */ nop -/* A9C76C 800255CC 0560FFFB */ bltz $t3, .L800255BC -/* A9C770 800255D0 00000000 */ nop -.L800255D4: -/* A9C774 800255D4 A3AB01D0 */ sb $t3, 0x1d0($sp) -/* A9C778 800255D8 92EC04A0 */ lbu $t4, 0x4a0($s7) -/* A9C77C 800255DC 44CAF800 */ ctc1 $t2, $31 -/* A9C780 800255E0 448C4000 */ mtc1 $t4, $f8 -/* A9C784 800255E4 05810005 */ bgez $t4, .L800255FC -/* A9C788 800255E8 468044A0 */ cvt.s.w $f18, $f8 -/* A9C78C 800255EC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C790 800255F0 44813000 */ mtc1 $at, $f6 -/* A9C794 800255F4 00000000 */ nop -/* A9C798 800255F8 46069480 */ add.s $f18, $f18, $f6 -.L800255FC: -/* A9C79C 800255FC 92ED04B0 */ lbu $t5, 0x4b0($s7) -/* A9C7A0 80025600 448D2000 */ mtc1 $t5, $f4 -/* A9C7A4 80025604 05A10005 */ bgez $t5, .L8002561C -/* A9C7A8 80025608 468022A0 */ cvt.s.w $f10, $f4 -/* A9C7AC 8002560C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C7B0 80025610 44814000 */ mtc1 $at, $f8 -/* A9C7B4 80025614 00000000 */ nop -/* A9C7B8 80025618 46085280 */ add.s $f10, $f10, $f8 -.L8002561C: -/* A9C7BC 8002561C 46125181 */ sub.s $f6, $f10, $f18 -/* A9C7C0 80025620 240F0001 */ li $t7, 1 -/* A9C7C4 80025624 46003102 */ mul.s $f4, $f6, $f0 -/* A9C7C8 80025628 46122200 */ add.s $f8, $f4, $f18 -/* A9C7CC 8002562C 444EF800 */ cfc1 $t6, $31 -/* A9C7D0 80025630 44CFF800 */ ctc1 $t7, $31 -/* A9C7D4 80025634 00000000 */ nop -/* A9C7D8 80025638 460042A4 */ cvt.w.s $f10, $f8 -/* A9C7DC 8002563C 444FF800 */ cfc1 $t7, $31 -/* A9C7E0 80025640 00000000 */ nop -/* A9C7E4 80025644 31EF0078 */ andi $t7, $t7, 0x78 -/* A9C7E8 80025648 11E00012 */ beqz $t7, .L80025694 -/* A9C7EC 8002564C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C7F0 80025650 44815000 */ mtc1 $at, $f10 -/* A9C7F4 80025654 240F0001 */ li $t7, 1 -/* A9C7F8 80025658 460A4281 */ sub.s $f10, $f8, $f10 -/* A9C7FC 8002565C 44CFF800 */ ctc1 $t7, $31 -/* A9C800 80025660 00000000 */ nop -/* A9C804 80025664 460052A4 */ cvt.w.s $f10, $f10 -/* A9C808 80025668 444FF800 */ cfc1 $t7, $31 -/* A9C80C 8002566C 00000000 */ nop -/* A9C810 80025670 31EF0078 */ andi $t7, $t7, 0x78 -/* A9C814 80025674 15E00005 */ bnez $t7, .L8002568C -/* A9C818 80025678 00000000 */ nop -/* A9C81C 8002567C 440F5000 */ mfc1 $t7, $f10 -/* A9C820 80025680 3C018000 */ lui $at, 0x8000 -/* A9C824 80025684 10000007 */ b .L800256A4 -/* A9C828 80025688 01E17825 */ or $t7, $t7, $at -.L8002568C: -/* A9C82C 8002568C 10000005 */ b .L800256A4 -/* A9C830 80025690 240FFFFF */ li $t7, -1 -.L80025694: -/* A9C834 80025694 440F5000 */ mfc1 $t7, $f10 -/* A9C838 80025698 00000000 */ nop -/* A9C83C 8002569C 05E0FFFB */ bltz $t7, .L8002568C -/* A9C840 800256A0 00000000 */ nop -.L800256A4: -/* A9C844 800256A4 A3AF01CF */ sb $t7, 0x1cf($sp) -/* A9C848 800256A8 92F804A1 */ lbu $t8, 0x4a1($s7) -/* A9C84C 800256AC 44CEF800 */ ctc1 $t6, $31 -/* A9C850 800256B0 44983000 */ mtc1 $t8, $f6 -/* A9C854 800256B4 07010005 */ bgez $t8, .L800256CC -/* A9C858 800256B8 468030A0 */ cvt.s.w $f2, $f6 -/* A9C85C 800256BC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C860 800256C0 44812000 */ mtc1 $at, $f4 -/* A9C864 800256C4 00000000 */ nop -/* A9C868 800256C8 46041080 */ add.s $f2, $f2, $f4 -.L800256CC: -/* A9C86C 800256CC 92F904B1 */ lbu $t9, 0x4b1($s7) -/* A9C870 800256D0 44994000 */ mtc1 $t9, $f8 -/* A9C874 800256D4 07210005 */ bgez $t9, .L800256EC -/* A9C878 800256D8 468042A0 */ cvt.s.w $f10, $f8 -/* A9C87C 800256DC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C880 800256E0 44813000 */ mtc1 $at, $f6 -/* A9C884 800256E4 00000000 */ nop -/* A9C888 800256E8 46065280 */ add.s $f10, $f10, $f6 -.L800256EC: -/* A9C88C 800256EC 46025101 */ sub.s $f4, $f10, $f2 -/* A9C890 800256F0 24090001 */ li $t1, 1 -/* A9C894 800256F4 46002202 */ mul.s $f8, $f4, $f0 -/* A9C898 800256F8 46024180 */ add.s $f6, $f8, $f2 -/* A9C89C 800256FC 4448F800 */ cfc1 $t0, $31 -/* A9C8A0 80025700 44C9F800 */ ctc1 $t1, $31 -/* A9C8A4 80025704 00000000 */ nop -/* A9C8A8 80025708 460032A4 */ cvt.w.s $f10, $f6 -/* A9C8AC 8002570C 4449F800 */ cfc1 $t1, $31 -/* A9C8B0 80025710 00000000 */ nop -/* A9C8B4 80025714 31290078 */ andi $t1, $t1, 0x78 -/* A9C8B8 80025718 11200012 */ beqz $t1, .L80025764 -/* A9C8BC 8002571C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C8C0 80025720 44815000 */ mtc1 $at, $f10 -/* A9C8C4 80025724 24090001 */ li $t1, 1 -/* A9C8C8 80025728 460A3281 */ sub.s $f10, $f6, $f10 -/* A9C8CC 8002572C 44C9F800 */ ctc1 $t1, $31 -/* A9C8D0 80025730 00000000 */ nop -/* A9C8D4 80025734 460052A4 */ cvt.w.s $f10, $f10 -/* A9C8D8 80025738 4449F800 */ cfc1 $t1, $31 -/* A9C8DC 8002573C 00000000 */ nop -/* A9C8E0 80025740 31290078 */ andi $t1, $t1, 0x78 -/* A9C8E4 80025744 15200005 */ bnez $t1, .L8002575C -/* A9C8E8 80025748 00000000 */ nop -/* A9C8EC 8002574C 44095000 */ mfc1 $t1, $f10 -/* A9C8F0 80025750 3C018000 */ lui $at, 0x8000 -/* A9C8F4 80025754 10000007 */ b .L80025774 -/* A9C8F8 80025758 01214825 */ or $t1, $t1, $at -.L8002575C: -/* A9C8FC 8002575C 10000005 */ b .L80025774 -/* A9C900 80025760 2409FFFF */ li $t1, -1 -.L80025764: -/* A9C904 80025764 44095000 */ mfc1 $t1, $f10 -/* A9C908 80025768 00000000 */ nop -/* A9C90C 8002576C 0520FFFB */ bltz $t1, .L8002575C -/* A9C910 80025770 00000000 */ nop -.L80025774: -/* A9C914 80025774 A3A901CE */ sb $t1, 0x1ce($sp) -/* A9C918 80025778 92EA04A2 */ lbu $t2, 0x4a2($s7) -/* A9C91C 8002577C 44C8F800 */ ctc1 $t0, $31 -/* A9C920 80025780 448A2000 */ mtc1 $t2, $f4 -/* A9C924 80025784 05410005 */ bgez $t2, .L8002579C -/* A9C928 80025788 46802320 */ cvt.s.w $f12, $f4 -/* A9C92C 8002578C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C930 80025790 44814000 */ mtc1 $at, $f8 -/* A9C934 80025794 00000000 */ nop -/* A9C938 80025798 46086300 */ add.s $f12, $f12, $f8 -.L8002579C: -/* A9C93C 8002579C 92EB04B2 */ lbu $t3, 0x4b2($s7) -/* A9C940 800257A0 448B3000 */ mtc1 $t3, $f6 -/* A9C944 800257A4 05610005 */ bgez $t3, .L800257BC -/* A9C948 800257A8 468032A0 */ cvt.s.w $f10, $f6 -/* A9C94C 800257AC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9C950 800257B0 44812000 */ mtc1 $at, $f4 -/* A9C954 800257B4 00000000 */ nop -/* A9C958 800257B8 46045280 */ add.s $f10, $f10, $f4 -.L800257BC: -/* A9C95C 800257BC 460C5201 */ sub.s $f8, $f10, $f12 -/* A9C960 800257C0 240D0001 */ li $t5, 1 -/* A9C964 800257C4 46004182 */ mul.s $f6, $f8, $f0 -/* A9C968 800257C8 460C3100 */ add.s $f4, $f6, $f12 -/* A9C96C 800257CC 444CF800 */ cfc1 $t4, $31 -/* A9C970 800257D0 44CDF800 */ ctc1 $t5, $31 -/* A9C974 800257D4 00000000 */ nop -/* A9C978 800257D8 460022A4 */ cvt.w.s $f10, $f4 -/* A9C97C 800257DC 444DF800 */ cfc1 $t5, $31 -/* A9C980 800257E0 00000000 */ nop -/* A9C984 800257E4 31AD0078 */ andi $t5, $t5, 0x78 -/* A9C988 800257E8 11A00012 */ beqz $t5, .L80025834 -/* A9C98C 800257EC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9C990 800257F0 44815000 */ mtc1 $at, $f10 -/* A9C994 800257F4 240D0001 */ li $t5, 1 -/* A9C998 800257F8 460A2281 */ sub.s $f10, $f4, $f10 -/* A9C99C 800257FC 44CDF800 */ ctc1 $t5, $31 -/* A9C9A0 80025800 00000000 */ nop -/* A9C9A4 80025804 460052A4 */ cvt.w.s $f10, $f10 -/* A9C9A8 80025808 444DF800 */ cfc1 $t5, $31 -/* A9C9AC 8002580C 00000000 */ nop -/* A9C9B0 80025810 31AD0078 */ andi $t5, $t5, 0x78 -/* A9C9B4 80025814 15A00005 */ bnez $t5, .L8002582C -/* A9C9B8 80025818 00000000 */ nop -/* A9C9BC 8002581C 440D5000 */ mfc1 $t5, $f10 -/* A9C9C0 80025820 3C018000 */ lui $at, 0x8000 -/* A9C9C4 80025824 10000007 */ b .L80025844 -/* A9C9C8 80025828 01A16825 */ or $t5, $t5, $at -.L8002582C: -/* A9C9CC 8002582C 10000005 */ b .L80025844 -/* A9C9D0 80025830 240DFFFF */ li $t5, -1 -.L80025834: -/* A9C9D4 80025834 440D5000 */ mfc1 $t5, $f10 -/* A9C9D8 80025838 00000000 */ nop -/* A9C9DC 8002583C 05A0FFFB */ bltz $t5, .L8002582C -/* A9C9E0 80025840 00000000 */ nop -.L80025844: -/* A9C9E4 80025844 A3AD01CD */ sb $t5, 0x1cd($sp) -/* A9C9E8 80025848 92EE04A3 */ lbu $t6, 0x4a3($s7) -/* A9C9EC 8002584C 44CCF800 */ ctc1 $t4, $31 -/* A9C9F0 80025850 448E4000 */ mtc1 $t6, $f8 -/* A9C9F4 80025854 05C10005 */ bgez $t6, .L8002586C -/* A9C9F8 80025858 468043A0 */ cvt.s.w $f14, $f8 -/* A9C9FC 8002585C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CA00 80025860 44813000 */ mtc1 $at, $f6 -/* A9CA04 80025864 00000000 */ nop -/* A9CA08 80025868 46067380 */ add.s $f14, $f14, $f6 -.L8002586C: -/* A9CA0C 8002586C 92EF04B3 */ lbu $t7, 0x4b3($s7) -/* A9CA10 80025870 448F2000 */ mtc1 $t7, $f4 -/* A9CA14 80025874 05E10005 */ bgez $t7, .L8002588C -/* A9CA18 80025878 468022A0 */ cvt.s.w $f10, $f4 -/* A9CA1C 8002587C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CA20 80025880 44814000 */ mtc1 $at, $f8 -/* A9CA24 80025884 00000000 */ nop -/* A9CA28 80025888 46085280 */ add.s $f10, $f10, $f8 -.L8002588C: -/* A9CA2C 8002588C 460E5181 */ sub.s $f6, $f10, $f14 -/* A9CA30 80025890 24190001 */ li $t9, 1 -/* A9CA34 80025894 46003102 */ mul.s $f4, $f6, $f0 -/* A9CA38 80025898 460E2200 */ add.s $f8, $f4, $f14 -/* A9CA3C 8002589C 4458F800 */ cfc1 $t8, $31 -/* A9CA40 800258A0 44D9F800 */ ctc1 $t9, $31 -/* A9CA44 800258A4 00000000 */ nop -/* A9CA48 800258A8 460042A4 */ cvt.w.s $f10, $f8 -/* A9CA4C 800258AC 4459F800 */ cfc1 $t9, $31 -/* A9CA50 800258B0 00000000 */ nop -/* A9CA54 800258B4 33390078 */ andi $t9, $t9, 0x78 -/* A9CA58 800258B8 13200012 */ beqz $t9, .L80025904 -/* A9CA5C 800258BC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CA60 800258C0 44815000 */ mtc1 $at, $f10 -/* A9CA64 800258C4 24190001 */ li $t9, 1 -/* A9CA68 800258C8 460A4281 */ sub.s $f10, $f8, $f10 -/* A9CA6C 800258CC 44D9F800 */ ctc1 $t9, $31 -/* A9CA70 800258D0 00000000 */ nop -/* A9CA74 800258D4 460052A4 */ cvt.w.s $f10, $f10 -/* A9CA78 800258D8 4459F800 */ cfc1 $t9, $31 -/* A9CA7C 800258DC 00000000 */ nop -/* A9CA80 800258E0 33390078 */ andi $t9, $t9, 0x78 -/* A9CA84 800258E4 17200005 */ bnez $t9, .L800258FC -/* A9CA88 800258E8 00000000 */ nop -/* A9CA8C 800258EC 44195000 */ mfc1 $t9, $f10 -/* A9CA90 800258F0 3C018000 */ lui $at, 0x8000 -/* A9CA94 800258F4 10000007 */ b .L80025914 -/* A9CA98 800258F8 0321C825 */ or $t9, $t9, $at -.L800258FC: -/* A9CA9C 800258FC 10000005 */ b .L80025914 -/* A9CAA0 80025900 2419FFFF */ li $t9, -1 -.L80025904: -/* A9CAA4 80025904 44195000 */ mfc1 $t9, $f10 -/* A9CAA8 80025908 00000000 */ nop -/* A9CAAC 8002590C 0720FFFB */ bltz $t9, .L800258FC -/* A9CAB0 80025910 00000000 */ nop -.L80025914: -/* A9CAB4 80025914 A3B901CC */ sb $t9, 0x1cc($sp) -/* A9CAB8 80025918 92E804A4 */ lbu $t0, 0x4a4($s7) -/* A9CABC 8002591C 44D8F800 */ ctc1 $t8, $31 -/* A9CAC0 80025920 44883000 */ mtc1 $t0, $f6 -/* A9CAC4 80025924 05010005 */ bgez $t0, .L8002593C -/* A9CAC8 80025928 46803420 */ cvt.s.w $f16, $f6 -/* A9CACC 8002592C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CAD0 80025930 44812000 */ mtc1 $at, $f4 -/* A9CAD4 80025934 00000000 */ nop -/* A9CAD8 80025938 46048400 */ add.s $f16, $f16, $f4 -.L8002593C: -/* A9CADC 8002593C 92E904B4 */ lbu $t1, 0x4b4($s7) -/* A9CAE0 80025940 44894000 */ mtc1 $t1, $f8 -/* A9CAE4 80025944 05210005 */ bgez $t1, .L8002595C -/* A9CAE8 80025948 468042A0 */ cvt.s.w $f10, $f8 -/* A9CAEC 8002594C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CAF0 80025950 44813000 */ mtc1 $at, $f6 -/* A9CAF4 80025954 00000000 */ nop -/* A9CAF8 80025958 46065280 */ add.s $f10, $f10, $f6 -.L8002595C: -/* A9CAFC 8002595C 46105101 */ sub.s $f4, $f10, $f16 -/* A9CB00 80025960 240B0001 */ li $t3, 1 -/* A9CB04 80025964 46002202 */ mul.s $f8, $f4, $f0 -/* A9CB08 80025968 46104180 */ add.s $f6, $f8, $f16 -/* A9CB0C 8002596C 444AF800 */ cfc1 $t2, $31 -/* A9CB10 80025970 44CBF800 */ ctc1 $t3, $31 -/* A9CB14 80025974 00000000 */ nop -/* A9CB18 80025978 460032A4 */ cvt.w.s $f10, $f6 -/* A9CB1C 8002597C 444BF800 */ cfc1 $t3, $31 -/* A9CB20 80025980 00000000 */ nop -/* A9CB24 80025984 316B0078 */ andi $t3, $t3, 0x78 -/* A9CB28 80025988 11600012 */ beqz $t3, .L800259D4 -/* A9CB2C 8002598C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CB30 80025990 44815000 */ mtc1 $at, $f10 -/* A9CB34 80025994 240B0001 */ li $t3, 1 -/* A9CB38 80025998 460A3281 */ sub.s $f10, $f6, $f10 -/* A9CB3C 8002599C 44CBF800 */ ctc1 $t3, $31 -/* A9CB40 800259A0 00000000 */ nop -/* A9CB44 800259A4 460052A4 */ cvt.w.s $f10, $f10 -/* A9CB48 800259A8 444BF800 */ cfc1 $t3, $31 -/* A9CB4C 800259AC 00000000 */ nop -/* A9CB50 800259B0 316B0078 */ andi $t3, $t3, 0x78 -/* A9CB54 800259B4 15600005 */ bnez $t3, .L800259CC -/* A9CB58 800259B8 00000000 */ nop -/* A9CB5C 800259BC 440B5000 */ mfc1 $t3, $f10 -/* A9CB60 800259C0 3C018000 */ lui $at, 0x8000 -/* A9CB64 800259C4 10000007 */ b .L800259E4 -/* A9CB68 800259C8 01615825 */ or $t3, $t3, $at -.L800259CC: -/* A9CB6C 800259CC 10000005 */ b .L800259E4 -/* A9CB70 800259D0 240BFFFF */ li $t3, -1 -.L800259D4: -/* A9CB74 800259D4 440B5000 */ mfc1 $t3, $f10 -/* A9CB78 800259D8 00000000 */ nop -/* A9CB7C 800259DC 0560FFFB */ bltz $t3, .L800259CC -/* A9CB80 800259E0 00000000 */ nop -.L800259E4: -/* A9CB84 800259E4 A3AB01CB */ sb $t3, 0x1cb($sp) -/* A9CB88 800259E8 92EC04A5 */ lbu $t4, 0x4a5($s7) -/* A9CB8C 800259EC 44CAF800 */ ctc1 $t2, $31 -/* A9CB90 800259F0 448C2000 */ mtc1 $t4, $f4 -/* A9CB94 800259F4 05810005 */ bgez $t4, .L80025A0C -/* A9CB98 800259F8 468024A0 */ cvt.s.w $f18, $f4 -/* A9CB9C 800259FC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CBA0 80025A00 44814000 */ mtc1 $at, $f8 -/* A9CBA4 80025A04 00000000 */ nop -/* A9CBA8 80025A08 46089480 */ add.s $f18, $f18, $f8 -.L80025A0C: -/* A9CBAC 80025A0C 92ED04B5 */ lbu $t5, 0x4b5($s7) -/* A9CBB0 80025A10 448D3000 */ mtc1 $t5, $f6 -/* A9CBB4 80025A14 05A10005 */ bgez $t5, .L80025A2C -/* A9CBB8 80025A18 468032A0 */ cvt.s.w $f10, $f6 -/* A9CBBC 80025A1C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CBC0 80025A20 44812000 */ mtc1 $at, $f4 -/* A9CBC4 80025A24 00000000 */ nop -/* A9CBC8 80025A28 46045280 */ add.s $f10, $f10, $f4 -.L80025A2C: -/* A9CBCC 80025A2C 46125201 */ sub.s $f8, $f10, $f18 -/* A9CBD0 80025A30 240F0001 */ li $t7, 1 -/* A9CBD4 80025A34 46004182 */ mul.s $f6, $f8, $f0 -/* A9CBD8 80025A38 46123100 */ add.s $f4, $f6, $f18 -/* A9CBDC 80025A3C 444EF800 */ cfc1 $t6, $31 -/* A9CBE0 80025A40 44CFF800 */ ctc1 $t7, $31 -/* A9CBE4 80025A44 00000000 */ nop -/* A9CBE8 80025A48 460022A4 */ cvt.w.s $f10, $f4 -/* A9CBEC 80025A4C 444FF800 */ cfc1 $t7, $31 -/* A9CBF0 80025A50 00000000 */ nop -/* A9CBF4 80025A54 31EF0078 */ andi $t7, $t7, 0x78 -/* A9CBF8 80025A58 11E00012 */ beqz $t7, .L80025AA4 -/* A9CBFC 80025A5C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CC00 80025A60 44815000 */ mtc1 $at, $f10 -/* A9CC04 80025A64 240F0001 */ li $t7, 1 -/* A9CC08 80025A68 460A2281 */ sub.s $f10, $f4, $f10 -/* A9CC0C 80025A6C 44CFF800 */ ctc1 $t7, $31 -/* A9CC10 80025A70 00000000 */ nop -/* A9CC14 80025A74 460052A4 */ cvt.w.s $f10, $f10 -/* A9CC18 80025A78 444FF800 */ cfc1 $t7, $31 -/* A9CC1C 80025A7C 00000000 */ nop -/* A9CC20 80025A80 31EF0078 */ andi $t7, $t7, 0x78 -/* A9CC24 80025A84 15E00005 */ bnez $t7, .L80025A9C -/* A9CC28 80025A88 00000000 */ nop -/* A9CC2C 80025A8C 440F5000 */ mfc1 $t7, $f10 -/* A9CC30 80025A90 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9CC34 80025A94 10000007 */ b .L80025AB4 -/* A9CC38 80025A98 01E17825 */ or $t7, $t7, $at -.L80025A9C: -/* A9CC3C 80025A9C 10000005 */ b .L80025AB4 -/* A9CC40 80025AA0 240FFFFF */ li $t7, -1 -.L80025AA4: -/* A9CC44 80025AA4 440F5000 */ mfc1 $t7, $f10 -/* A9CC48 80025AA8 00000000 */ nop -/* A9CC4C 80025AAC 05E0FFFB */ bltz $t7, .L80025A9C -/* A9CC50 80025AB0 00000000 */ nop -.L80025AB4: -/* A9CC54 80025AB4 A3AF01CA */ sb $t7, 0x1ca($sp) -/* A9CC58 80025AB8 92F804A6 */ lbu $t8, 0x4a6($s7) -/* A9CC5C 80025ABC 44CEF800 */ ctc1 $t6, $31 -/* A9CC60 80025AC0 44984000 */ mtc1 $t8, $f8 -/* A9CC64 80025AC4 07010005 */ bgez $t8, .L80025ADC -/* A9CC68 80025AC8 468040A0 */ cvt.s.w $f2, $f8 -/* A9CC6C 80025ACC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CC70 80025AD0 44813000 */ mtc1 $at, $f6 -/* A9CC74 80025AD4 00000000 */ nop -/* A9CC78 80025AD8 46061080 */ add.s $f2, $f2, $f6 -.L80025ADC: -/* A9CC7C 80025ADC 92F904B6 */ lbu $t9, 0x4b6($s7) -/* A9CC80 80025AE0 44992000 */ mtc1 $t9, $f4 -/* A9CC84 80025AE4 07210005 */ bgez $t9, .L80025AFC -/* A9CC88 80025AE8 468022A0 */ cvt.s.w $f10, $f4 -/* A9CC8C 80025AEC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CC90 80025AF0 44814000 */ mtc1 $at, $f8 -/* A9CC94 80025AF4 00000000 */ nop -/* A9CC98 80025AF8 46085280 */ add.s $f10, $f10, $f8 -.L80025AFC: -/* A9CC9C 80025AFC 46025181 */ sub.s $f6, $f10, $f2 -/* A9CCA0 80025B00 24090001 */ li $t1, 1 -/* A9CCA4 80025B04 46003102 */ mul.s $f4, $f6, $f0 -/* A9CCA8 80025B08 46022200 */ add.s $f8, $f4, $f2 -/* A9CCAC 80025B0C 4448F800 */ cfc1 $t0, $31 -/* A9CCB0 80025B10 44C9F800 */ ctc1 $t1, $31 -/* A9CCB4 80025B14 00000000 */ nop -/* A9CCB8 80025B18 460042A4 */ cvt.w.s $f10, $f8 -/* A9CCBC 80025B1C 4449F800 */ cfc1 $t1, $31 -/* A9CCC0 80025B20 00000000 */ nop -/* A9CCC4 80025B24 31290078 */ andi $t1, $t1, 0x78 -/* A9CCC8 80025B28 11200012 */ beqz $t1, .L80025B74 -/* A9CCCC 80025B2C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CCD0 80025B30 44815000 */ mtc1 $at, $f10 -/* A9CCD4 80025B34 24090001 */ li $t1, 1 -/* A9CCD8 80025B38 460A4281 */ sub.s $f10, $f8, $f10 -/* A9CCDC 80025B3C 44C9F800 */ ctc1 $t1, $31 -/* A9CCE0 80025B40 00000000 */ nop -/* A9CCE4 80025B44 460052A4 */ cvt.w.s $f10, $f10 -/* A9CCE8 80025B48 4449F800 */ cfc1 $t1, $31 -/* A9CCEC 80025B4C 00000000 */ nop -/* A9CCF0 80025B50 31290078 */ andi $t1, $t1, 0x78 -/* A9CCF4 80025B54 15200005 */ bnez $t1, .L80025B6C -/* A9CCF8 80025B58 00000000 */ nop -/* A9CCFC 80025B5C 44095000 */ mfc1 $t1, $f10 -/* A9CD00 80025B60 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9CD04 80025B64 10000007 */ b .L80025B84 -/* A9CD08 80025B68 01214825 */ or $t1, $t1, $at -.L80025B6C: -/* A9CD0C 80025B6C 10000005 */ b .L80025B84 -/* A9CD10 80025B70 2409FFFF */ li $t1, -1 -.L80025B74: -/* A9CD14 80025B74 44095000 */ mfc1 $t1, $f10 -/* A9CD18 80025B78 00000000 */ nop -/* A9CD1C 80025B7C 0520FFFB */ bltz $t1, .L80025B6C -/* A9CD20 80025B80 00000000 */ nop -.L80025B84: -/* A9CD24 80025B84 A3A901C9 */ sb $t1, 0x1c9($sp) -/* A9CD28 80025B88 92EA04A7 */ lbu $t2, 0x4a7($s7) -/* A9CD2C 80025B8C 44C8F800 */ ctc1 $t0, $31 -/* A9CD30 80025B90 448A3000 */ mtc1 $t2, $f6 -/* A9CD34 80025B94 05410005 */ bgez $t2, .L80025BAC -/* A9CD38 80025B98 46803320 */ cvt.s.w $f12, $f6 -/* A9CD3C 80025B9C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CD40 80025BA0 44812000 */ mtc1 $at, $f4 -/* A9CD44 80025BA4 00000000 */ nop -/* A9CD48 80025BA8 46046300 */ add.s $f12, $f12, $f4 -.L80025BAC: -/* A9CD4C 80025BAC 92EB04B7 */ lbu $t3, 0x4b7($s7) -/* A9CD50 80025BB0 448B4000 */ mtc1 $t3, $f8 -/* A9CD54 80025BB4 05610005 */ bgez $t3, .L80025BCC -/* A9CD58 80025BB8 468042A0 */ cvt.s.w $f10, $f8 -/* A9CD5C 80025BBC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CD60 80025BC0 44813000 */ mtc1 $at, $f6 -/* A9CD64 80025BC4 00000000 */ nop -/* A9CD68 80025BC8 46065280 */ add.s $f10, $f10, $f6 -.L80025BCC: -/* A9CD6C 80025BCC 460C5101 */ sub.s $f4, $f10, $f12 -/* A9CD70 80025BD0 240D0001 */ li $t5, 1 -/* A9CD74 80025BD4 46002202 */ mul.s $f8, $f4, $f0 -/* A9CD78 80025BD8 460C4180 */ add.s $f6, $f8, $f12 -/* A9CD7C 80025BDC 444CF800 */ cfc1 $t4, $31 -/* A9CD80 80025BE0 44CDF800 */ ctc1 $t5, $31 -/* A9CD84 80025BE4 00000000 */ nop -/* A9CD88 80025BE8 460032A4 */ cvt.w.s $f10, $f6 -/* A9CD8C 80025BEC 444DF800 */ cfc1 $t5, $31 -/* A9CD90 80025BF0 00000000 */ nop -/* A9CD94 80025BF4 31AD0078 */ andi $t5, $t5, 0x78 -/* A9CD98 80025BF8 11A00012 */ beqz $t5, .L80025C44 -/* A9CD9C 80025BFC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CDA0 80025C00 44815000 */ mtc1 $at, $f10 -/* A9CDA4 80025C04 240D0001 */ li $t5, 1 -/* A9CDA8 80025C08 460A3281 */ sub.s $f10, $f6, $f10 -/* A9CDAC 80025C0C 44CDF800 */ ctc1 $t5, $31 -/* A9CDB0 80025C10 00000000 */ nop -/* A9CDB4 80025C14 460052A4 */ cvt.w.s $f10, $f10 -/* A9CDB8 80025C18 444DF800 */ cfc1 $t5, $31 -/* A9CDBC 80025C1C 00000000 */ nop -/* A9CDC0 80025C20 31AD0078 */ andi $t5, $t5, 0x78 -/* A9CDC4 80025C24 15A00005 */ bnez $t5, .L80025C3C -/* A9CDC8 80025C28 00000000 */ nop -/* A9CDCC 80025C2C 440D5000 */ mfc1 $t5, $f10 -/* A9CDD0 80025C30 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9CDD4 80025C34 10000007 */ b .L80025C54 -/* A9CDD8 80025C38 01A16825 */ or $t5, $t5, $at -.L80025C3C: -/* A9CDDC 80025C3C 10000005 */ b .L80025C54 -/* A9CDE0 80025C40 240DFFFF */ li $t5, -1 -.L80025C44: -/* A9CDE4 80025C44 440D5000 */ mfc1 $t5, $f10 -/* A9CDE8 80025C48 00000000 */ nop -/* A9CDEC 80025C4C 05A0FFFB */ bltz $t5, .L80025C3C -/* A9CDF0 80025C50 00000000 */ nop -.L80025C54: -/* A9CDF4 80025C54 A3AD01C8 */ sb $t5, 0x1c8($sp) -/* A9CDF8 80025C58 92EE04A8 */ lbu $t6, 0x4a8($s7) -/* A9CDFC 80025C5C 44CCF800 */ ctc1 $t4, $31 -/* A9CE00 80025C60 448E2000 */ mtc1 $t6, $f4 -/* A9CE04 80025C64 05C10005 */ bgez $t6, .L80025C7C -/* A9CE08 80025C68 468023A0 */ cvt.s.w $f14, $f4 -/* A9CE0C 80025C6C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CE10 80025C70 44814000 */ mtc1 $at, $f8 -/* A9CE14 80025C74 00000000 */ nop -/* A9CE18 80025C78 46087380 */ add.s $f14, $f14, $f8 -.L80025C7C: -/* A9CE1C 80025C7C 92EF04B8 */ lbu $t7, 0x4b8($s7) -/* A9CE20 80025C80 448F3000 */ mtc1 $t7, $f6 -/* A9CE24 80025C84 05E10005 */ bgez $t7, .L80025C9C -/* A9CE28 80025C88 468032A0 */ cvt.s.w $f10, $f6 -/* A9CE2C 80025C8C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CE30 80025C90 44812000 */ mtc1 $at, $f4 -/* A9CE34 80025C94 00000000 */ nop -/* A9CE38 80025C98 46045280 */ add.s $f10, $f10, $f4 -.L80025C9C: -/* A9CE3C 80025C9C 460E5201 */ sub.s $f8, $f10, $f14 -/* A9CE40 80025CA0 24190001 */ li $t9, 1 -/* A9CE44 80025CA4 46004182 */ mul.s $f6, $f8, $f0 -/* A9CE48 80025CA8 460E3100 */ add.s $f4, $f6, $f14 -/* A9CE4C 80025CAC 4458F800 */ cfc1 $t8, $31 -/* A9CE50 80025CB0 44D9F800 */ ctc1 $t9, $31 -/* A9CE54 80025CB4 00000000 */ nop -/* A9CE58 80025CB8 460022A4 */ cvt.w.s $f10, $f4 -/* A9CE5C 80025CBC 4459F800 */ cfc1 $t9, $31 -/* A9CE60 80025CC0 00000000 */ nop -/* A9CE64 80025CC4 33390078 */ andi $t9, $t9, 0x78 -/* A9CE68 80025CC8 13200012 */ beqz $t9, .L80025D14 -/* A9CE6C 80025CCC 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CE70 80025CD0 44815000 */ mtc1 $at, $f10 -/* A9CE74 80025CD4 24190001 */ li $t9, 1 -/* A9CE78 80025CD8 460A2281 */ sub.s $f10, $f4, $f10 -/* A9CE7C 80025CDC 44D9F800 */ ctc1 $t9, $31 -/* A9CE80 80025CE0 00000000 */ nop -/* A9CE84 80025CE4 460052A4 */ cvt.w.s $f10, $f10 -/* A9CE88 80025CE8 4459F800 */ cfc1 $t9, $31 -/* A9CE8C 80025CEC 00000000 */ nop -/* A9CE90 80025CF0 33390078 */ andi $t9, $t9, 0x78 -/* A9CE94 80025CF4 17200005 */ bnez $t9, .L80025D0C -/* A9CE98 80025CF8 00000000 */ nop -/* A9CE9C 80025CFC 44195000 */ mfc1 $t9, $f10 -/* A9CEA0 80025D00 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9CEA4 80025D04 10000007 */ b .L80025D24 -/* A9CEA8 80025D08 0321C825 */ or $t9, $t9, $at -.L80025D0C: -/* A9CEAC 80025D0C 10000005 */ b .L80025D24 -/* A9CEB0 80025D10 2419FFFF */ li $t9, -1 -.L80025D14: -/* A9CEB4 80025D14 44195000 */ mfc1 $t9, $f10 -/* A9CEB8 80025D18 00000000 */ nop -/* A9CEBC 80025D1C 0720FFFB */ bltz $t9, .L80025D0C -/* A9CEC0 80025D20 00000000 */ nop -.L80025D24: -/* A9CEC4 80025D24 A3B901C7 */ sb $t9, 0x1c7($sp) -/* A9CEC8 80025D28 92E804A9 */ lbu $t0, 0x4a9($s7) -/* A9CECC 80025D2C 44D8F800 */ ctc1 $t8, $31 -/* A9CED0 80025D30 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CED4 80025D34 44884000 */ mtc1 $t0, $f8 -/* A9CED8 80025D38 05010004 */ bgez $t0, .L80025D4C -/* A9CEDC 80025D3C 46804420 */ cvt.s.w $f16, $f8 -/* A9CEE0 80025D40 44813000 */ mtc1 $at, $f6 -/* A9CEE4 80025D44 00000000 */ nop -/* A9CEE8 80025D48 46068400 */ add.s $f16, $f16, $f6 -.L80025D4C: -/* A9CEEC 80025D4C 92E904B9 */ lbu $t1, 0x4b9($s7) -/* A9CEF0 80025D50 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CEF4 80025D54 44892000 */ mtc1 $t1, $f4 -/* A9CEF8 80025D58 05210004 */ bgez $t1, .L80025D6C -/* A9CEFC 80025D5C 468022A0 */ cvt.s.w $f10, $f4 -/* A9CF00 80025D60 44814000 */ mtc1 $at, $f8 -/* A9CF04 80025D64 00000000 */ nop -/* A9CF08 80025D68 46085280 */ add.s $f10, $f10, $f8 -.L80025D6C: -/* A9CF0C 80025D6C 46105181 */ sub.s $f6, $f10, $f16 -/* A9CF10 80025D70 240B0001 */ li $t3, 1 -/* A9CF14 80025D74 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CF18 80025D78 46003102 */ mul.s $f4, $f6, $f0 -/* A9CF1C 80025D7C 46102200 */ add.s $f8, $f4, $f16 -/* A9CF20 80025D80 444AF800 */ cfc1 $t2, $31 -/* A9CF24 80025D84 44CBF800 */ ctc1 $t3, $31 -/* A9CF28 80025D88 00000000 */ nop -/* A9CF2C 80025D8C 460042A4 */ cvt.w.s $f10, $f8 -/* A9CF30 80025D90 444BF800 */ cfc1 $t3, $31 -/* A9CF34 80025D94 00000000 */ nop -/* A9CF38 80025D98 316B0078 */ andi $t3, $t3, 0x78 -/* A9CF3C 80025D9C 51600013 */ beql $t3, $zero, .L80025DEC -/* A9CF40 80025DA0 440B5000 */ mfc1 $t3, $f10 -/* A9CF44 80025DA4 44815000 */ mtc1 $at, $f10 -/* A9CF48 80025DA8 240B0001 */ li $t3, 1 -/* A9CF4C 80025DAC 460A4281 */ sub.s $f10, $f8, $f10 -/* A9CF50 80025DB0 44CBF800 */ ctc1 $t3, $31 -/* A9CF54 80025DB4 00000000 */ nop -/* A9CF58 80025DB8 460052A4 */ cvt.w.s $f10, $f10 -/* A9CF5C 80025DBC 444BF800 */ cfc1 $t3, $31 -/* A9CF60 80025DC0 00000000 */ nop -/* A9CF64 80025DC4 316B0078 */ andi $t3, $t3, 0x78 -/* A9CF68 80025DC8 15600005 */ bnez $t3, .L80025DE0 -/* A9CF6C 80025DCC 00000000 */ nop -/* A9CF70 80025DD0 440B5000 */ mfc1 $t3, $f10 -/* A9CF74 80025DD4 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9CF78 80025DD8 10000007 */ b .L80025DF8 -/* A9CF7C 80025DDC 01615825 */ or $t3, $t3, $at -.L80025DE0: -/* A9CF80 80025DE0 10000005 */ b .L80025DF8 -/* A9CF84 80025DE4 240BFFFF */ li $t3, -1 -/* A9CF88 80025DE8 440B5000 */ mfc1 $t3, $f10 -.L80025DEC: -/* A9CF8C 80025DEC 00000000 */ nop -/* A9CF90 80025DF0 0560FFFB */ bltz $t3, .L80025DE0 -/* A9CF94 80025DF4 00000000 */ nop -.L80025DF8: -/* A9CF98 80025DF8 A3AB01C6 */ sb $t3, 0x1c6($sp) -/* A9CF9C 80025DFC 92EC04AA */ lbu $t4, 0x4aa($s7) -/* A9CFA0 80025E00 44CAF800 */ ctc1 $t2, $31 -/* A9CFA4 80025E04 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CFA8 80025E08 448C3000 */ mtc1 $t4, $f6 -/* A9CFAC 80025E0C 05810004 */ bgez $t4, .L80025E20 -/* A9CFB0 80025E10 468034A0 */ cvt.s.w $f18, $f6 -/* A9CFB4 80025E14 44812000 */ mtc1 $at, $f4 -/* A9CFB8 80025E18 00000000 */ nop -/* A9CFBC 80025E1C 46049480 */ add.s $f18, $f18, $f4 -.L80025E20: -/* A9CFC0 80025E20 92ED04BA */ lbu $t5, 0x4ba($s7) -/* A9CFC4 80025E24 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9CFC8 80025E28 448D4000 */ mtc1 $t5, $f8 -/* A9CFCC 80025E2C 05A10004 */ bgez $t5, .L80025E40 -/* A9CFD0 80025E30 468042A0 */ cvt.s.w $f10, $f8 -/* A9CFD4 80025E34 44813000 */ mtc1 $at, $f6 -/* A9CFD8 80025E38 00000000 */ nop -/* A9CFDC 80025E3C 46065280 */ add.s $f10, $f10, $f6 -.L80025E40: -/* A9CFE0 80025E40 46125101 */ sub.s $f4, $f10, $f18 -/* A9CFE4 80025E44 240F0001 */ li $t7, 1 -/* A9CFE8 80025E48 00026100 */ sll $t4, $v0, 4 -/* A9CFEC 80025E4C 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9CFF0 80025E50 46002202 */ mul.s $f8, $f4, $f0 -/* A9CFF4 80025E54 006C8021 */ addu $s0, $v1, $t4 -/* A9CFF8 80025E58 02E08825 */ move $s1, $s7 -/* A9CFFC 80025E5C 24150020 */ li $s5, 32 -/* A9D000 80025E60 24140400 */ li $s4, 1024 -/* A9D004 80025E64 46124180 */ add.s $f6, $f8, $f18 -/* A9D008 80025E68 444EF800 */ cfc1 $t6, $31 -/* A9D00C 80025E6C 44CFF800 */ ctc1 $t7, $31 -/* A9D010 80025E70 00000000 */ nop -/* A9D014 80025E74 460032A4 */ cvt.w.s $f10, $f6 -/* A9D018 80025E78 444FF800 */ cfc1 $t7, $31 -/* A9D01C 80025E7C 00000000 */ nop -/* A9D020 80025E80 31EF0078 */ andi $t7, $t7, 0x78 -/* A9D024 80025E84 51E00013 */ beql $t7, $zero, .L80025ED4 -/* A9D028 80025E88 440F5000 */ mfc1 $t7, $f10 -/* A9D02C 80025E8C 44815000 */ mtc1 $at, $f10 -/* A9D030 80025E90 240F0001 */ li $t7, 1 -/* A9D034 80025E94 460A3281 */ sub.s $f10, $f6, $f10 -/* A9D038 80025E98 44CFF800 */ ctc1 $t7, $31 -/* A9D03C 80025E9C 00000000 */ nop -/* A9D040 80025EA0 460052A4 */ cvt.w.s $f10, $f10 -/* A9D044 80025EA4 444FF800 */ cfc1 $t7, $31 -/* A9D048 80025EA8 00000000 */ nop -/* A9D04C 80025EAC 31EF0078 */ andi $t7, $t7, 0x78 -/* A9D050 80025EB0 15E00005 */ bnez $t7, .L80025EC8 -/* A9D054 80025EB4 00000000 */ nop -/* A9D058 80025EB8 440F5000 */ mfc1 $t7, $f10 -/* A9D05C 80025EBC 3C018000 */ li $at, 0x80000000 # 0.000000 -/* A9D060 80025EC0 10000007 */ b .L80025EE0 -/* A9D064 80025EC4 01E17825 */ or $t7, $t7, $at -.L80025EC8: -/* A9D068 80025EC8 10000005 */ b .L80025EE0 -/* A9D06C 80025ECC 240FFFFF */ li $t7, -1 -/* A9D070 80025ED0 440F5000 */ mfc1 $t7, $f10 -.L80025ED4: -/* A9D074 80025ED4 00000000 */ nop -/* A9D078 80025ED8 05E0FFFB */ bltz $t7, .L80025EC8 -/* A9D07C 80025EDC 00000000 */ nop -.L80025EE0: -/* A9D080 80025EE0 A3AF01C5 */ sb $t7, 0x1c5($sp) -/* A9D084 80025EE4 92F804AB */ lbu $t8, 0x4ab($s7) -/* A9D088 80025EE8 44CEF800 */ ctc1 $t6, $31 -/* A9D08C 80025EEC 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9D090 80025EF0 44982000 */ mtc1 $t8, $f4 -/* A9D094 80025EF4 07010004 */ bgez $t8, .L80025F08 -/* A9D098 80025EF8 468020A0 */ cvt.s.w $f2, $f4 -/* A9D09C 80025EFC 44814000 */ mtc1 $at, $f8 -/* A9D0A0 80025F00 00000000 */ nop -/* A9D0A4 80025F04 46081080 */ add.s $f2, $f2, $f8 -.L80025F08: -/* A9D0A8 80025F08 92F904BB */ lbu $t9, 0x4bb($s7) -/* A9D0AC 80025F0C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* A9D0B0 80025F10 44993000 */ mtc1 $t9, $f6 -/* A9D0B4 80025F14 07210004 */ bgez $t9, .L80025F28 -/* A9D0B8 80025F18 468032A0 */ cvt.s.w $f10, $f6 -/* A9D0BC 80025F1C 44812000 */ mtc1 $at, $f4 -/* A9D0C0 80025F20 00000000 */ nop -/* A9D0C4 80025F24 46045280 */ add.s $f10, $f10, $f4 -.L80025F28: -/* A9D0C8 80025F28 46025201 */ sub.s $f8, $f10, $f2 -/* A9D0CC 80025F2C 24090001 */ li $t1, 1 -/* A9D0D0 80025F30 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* A9D0D4 80025F34 46004182 */ mul.s $f6, $f8, $f0 -/* A9D0D8 80025F38 46023100 */ add.s $f4, $f6, $f2 -/* A9D0DC 80025F3C 4448F800 */ cfc1 $t0, $31 -/* A9D0E0 80025F40 44C9F800 */ ctc1 $t1, $31 -/* A9D0E4 80025F44 00000000 */ nop -/* A9D0E8 80025F48 460022A4 */ cvt.w.s $f10, $f4 -/* A9D0EC 80025F4C 4449F800 */ cfc1 $t1, $31 -/* A9D0F0 80025F50 00000000 */ nop -/* A9D0F4 80025F54 31290078 */ andi $t1, $t1, 0x78 -/* A9D0F8 80025F58 51200013 */ beql $t1, $zero, .L80025FA8 -/* A9D0FC 80025F5C 44095000 */ mfc1 $t1, $f10 -/* A9D100 80025F60 44815000 */ mtc1 $at, $f10 -/* A9D104 80025F64 24090001 */ li $t1, 1 -/* A9D108 80025F68 460A2281 */ sub.s $f10, $f4, $f10 -/* A9D10C 80025F6C 44C9F800 */ ctc1 $t1, $31 -/* A9D110 80025F70 00000000 */ nop -/* A9D114 80025F74 460052A4 */ cvt.w.s $f10, $f10 -/* A9D118 80025F78 4449F800 */ cfc1 $t1, $31 -/* A9D11C 80025F7C 00000000 */ nop -/* A9D120 80025F80 31290078 */ andi $t1, $t1, 0x78 -/* A9D124 80025F84 15200005 */ bnez $t1, .L80025F9C -/* A9D128 80025F88 00000000 */ nop -/* A9D12C 80025F8C 44095000 */ mfc1 $t1, $f10 -/* A9D130 80025F90 3C018000 */ lui $at, 0x8000 -/* A9D134 80025F94 10000007 */ b .L80025FB4 -/* A9D138 80025F98 01214825 */ or $t1, $t1, $at -.L80025F9C: -/* A9D13C 80025F9C 10000005 */ b .L80025FB4 -/* A9D140 80025FA0 2409FFFF */ li $t1, -1 -/* A9D144 80025FA4 44095000 */ mfc1 $t1, $f10 -.L80025FA8: -/* A9D148 80025FA8 00000000 */ nop -/* A9D14C 80025FAC 0520FFFB */ bltz $t1, .L80025F9C -/* A9D150 80025FB0 00000000 */ nop -.L80025FB4: -/* A9D154 80025FB4 A3A901C4 */ sb $t1, 0x1c4($sp) -/* A9D158 80025FB8 8EEA0008 */ lw $t2, 8($s7) -/* A9D15C 80025FBC 44C8F800 */ ctc1 $t0, $31 -/* A9D160 80025FC0 00009025 */ move $s2, $zero -/* A9D164 80025FC4 19400082 */ blez $t2, .L800261D0 -/* A9D168 80025FC8 3C010001 */ lui $at, (0x00011DA0 >> 16) # lui $at, 1 -/* A9D16C 80025FCC 34211DA0 */ ori $at, (0x00011DA0 & 0xFFFF) # ori $at, $at, 0x1da0 -/* A9D170 80025FD0 02615821 */ addu $t3, $s3, $at -/* A9D174 80025FD4 AFAB004C */ sw $t3, 0x4c($sp) -/* A9D178 80025FD8 2413FFE0 */ li $s3, -32 -/* A9D17C 80025FDC AFA301E4 */ sw $v1, 0x1e4($sp) -/* A9D180 80025FE0 27A400EC */ addiu $a0, $sp, 0xec -.L80025FE4: -/* A9D184 80025FE4 8E250018 */ lw $a1, 0x18($s1) -/* A9D188 80025FE8 8E26001C */ lw $a2, 0x1c($s1) -/* A9D18C 80025FEC 0C029E89 */ jal SkinMatrix_SetTranslate -/* A9D190 80025FF0 8E270020 */ lw $a3, 0x20($s1) -/* A9D194 80025FF4 0C03F66B */ jal Math_Rand_ZeroOne -/* A9D198 80025FF8 00000000 */ nop -/* A9D19C 80025FFC 3C014020 */ li $at, 0x40200000 # 0.000000 -/* A9D1A0 80026000 44814000 */ mtc1 $at, $f8 -/* A9D1A4 80026004 3C013FC0 */ li $at, 0x3FC00000 # 0.000000 -/* A9D1A8 80026008 44812000 */ mtc1 $at, $f4 -/* A9D1AC 8002600C 46080182 */ mul.s $f6, $f0, $f8 -/* A9D1B0 80026010 3C013C80 */ li $at, 0x3C800000 # 0.000000 -/* A9D1B4 80026014 44814000 */ mtc1 $at, $f8 -/* A9D1B8 80026018 27A400AC */ addiu $a0, $sp, 0xac -/* A9D1BC 8002601C 3C073F80 */ lui $a3, 0x3f80 -/* A9D1C0 80026020 46043280 */ add.s $f10, $f6, $f4 -/* A9D1C4 80026024 46085082 */ mul.s $f2, $f10, $f8 -/* A9D1C8 80026028 44051000 */ mfc1 $a1, $f2 -/* A9D1CC 8002602C 44061000 */ mfc1 $a2, $f2 -/* A9D1D0 80026030 0C029DA9 */ jal SkinMatrix_SetScale -/* A9D1D4 80026034 00000000 */ nop -/* A9D1D8 80026038 27A400EC */ addiu $a0, $sp, 0xec -/* A9D1DC 8002603C 8FA5004C */ lw $a1, 0x4c($sp) -/* A9D1E0 80026040 0C029BE8 */ jal SkinMatrix_MtxFMtxFMult -/* A9D1E4 80026044 27A6006C */ addiu $a2, $sp, 0x6c -/* A9D1E8 80026048 27A4006C */ addiu $a0, $sp, 0x6c -/* A9D1EC 8002604C 27A500AC */ addiu $a1, $sp, 0xac -/* A9D1F0 80026050 0C029BE8 */ jal SkinMatrix_MtxFMtxFMult -/* A9D1F4 80026054 27A6012C */ addiu $a2, $sp, 0x12c -/* A9D1F8 80026058 A6130000 */ sh $s3, ($s0) -/* A9D1FC 8002605C A6130002 */ sh $s3, 2($s0) -/* A9D200 80026060 A6000004 */ sh $zero, 4($s0) -/* A9D204 80026064 93AD01D3 */ lbu $t5, 0x1d3($sp) -/* A9D208 80026068 26100040 */ addiu $s0, $s0, 0x40 -/* A9D20C 8002606C 02C02025 */ move $a0, $s6 -/* A9D210 80026070 A20DFFCC */ sb $t5, -0x34($s0) -/* A9D214 80026074 93AE01D2 */ lbu $t6, 0x1d2($sp) -/* A9D218 80026078 27A5012C */ addiu $a1, $sp, 0x12c -/* A9D21C 8002607C A20EFFCD */ sb $t6, -0x33($s0) -/* A9D220 80026080 93AF01D1 */ lbu $t7, 0x1d1($sp) -/* A9D224 80026084 A20FFFCE */ sb $t7, -0x32($s0) -/* A9D228 80026088 93B801D0 */ lbu $t8, 0x1d0($sp) -/* A9D22C 8002608C A600FFC8 */ sh $zero, -0x38($s0) -/* A9D230 80026090 A614FFCA */ sh $s4, -0x36($s0) -/* A9D234 80026094 A600FFC6 */ sh $zero, -0x3a($s0) -/* A9D238 80026098 A615FFD0 */ sh $s5, -0x30($s0) -/* A9D23C 8002609C A615FFD2 */ sh $s5, -0x2e($s0) -/* A9D240 800260A0 A600FFD4 */ sh $zero, -0x2c($s0) -/* A9D244 800260A4 A218FFCF */ sb $t8, -0x31($s0) -/* A9D248 800260A8 93B901CF */ lbu $t9, 0x1cf($sp) -/* A9D24C 800260AC A219FFDC */ sb $t9, -0x24($s0) -/* A9D250 800260B0 93A801CE */ lbu $t0, 0x1ce($sp) -/* A9D254 800260B4 A208FFDD */ sb $t0, -0x23($s0) -/* A9D258 800260B8 93A901CD */ lbu $t1, 0x1cd($sp) -/* A9D25C 800260BC A209FFDE */ sb $t1, -0x22($s0) -/* A9D260 800260C0 93AA01CC */ lbu $t2, 0x1cc($sp) -/* A9D264 800260C4 A614FFD8 */ sh $s4, -0x28($s0) -/* A9D268 800260C8 A600FFDA */ sh $zero, -0x26($s0) -/* A9D26C 800260CC A600FFD6 */ sh $zero, -0x2a($s0) -/* A9D270 800260D0 A613FFE0 */ sh $s3, -0x20($s0) -/* A9D274 800260D4 A615FFE2 */ sh $s5, -0x1e($s0) -/* A9D278 800260D8 A600FFE4 */ sh $zero, -0x1c($s0) -/* A9D27C 800260DC A20AFFDF */ sb $t2, -0x21($s0) -/* A9D280 800260E0 93AB01CB */ lbu $t3, 0x1cb($sp) -/* A9D284 800260E4 A20BFFEC */ sb $t3, -0x14($s0) -/* A9D288 800260E8 93AC01CA */ lbu $t4, 0x1ca($sp) -/* A9D28C 800260EC A20CFFED */ sb $t4, -0x13($s0) -/* A9D290 800260F0 93AD01C9 */ lbu $t5, 0x1c9($sp) -/* A9D294 800260F4 A20DFFEE */ sb $t5, -0x12($s0) -/* A9D298 800260F8 93AE01C8 */ lbu $t6, 0x1c8($sp) -/* A9D29C 800260FC A600FFE8 */ sh $zero, -0x18($s0) -/* A9D2A0 80026100 A600FFEA */ sh $zero, -0x16($s0) -/* A9D2A4 80026104 A600FFE6 */ sh $zero, -0x1a($s0) -/* A9D2A8 80026108 A615FFF0 */ sh $s5, -0x10($s0) -/* A9D2AC 8002610C A613FFF2 */ sh $s3, -0xe($s0) -/* A9D2B0 80026110 A600FFF4 */ sh $zero, -0xc($s0) -/* A9D2B4 80026114 A20EFFEF */ sb $t6, -0x11($s0) -/* A9D2B8 80026118 93AF01C7 */ lbu $t7, 0x1c7($sp) -/* A9D2BC 8002611C A20FFFFC */ sb $t7, -4($s0) -/* A9D2C0 80026120 93B801C6 */ lbu $t8, 0x1c6($sp) -/* A9D2C4 80026124 A218FFFD */ sb $t8, -3($s0) -/* A9D2C8 80026128 93B901C5 */ lbu $t9, 0x1c5($sp) -/* A9D2CC 8002612C A219FFFE */ sb $t9, -2($s0) -/* A9D2D0 80026130 93A801C4 */ lbu $t0, 0x1c4($sp) -/* A9D2D4 80026134 A614FFF8 */ sh $s4, -8($s0) -/* A9D2D8 80026138 A614FFFA */ sh $s4, -6($s0) -/* A9D2DC 8002613C A600FFF6 */ sh $zero, -0xa($s0) -/* A9D2E0 80026140 0C029F9C */ jal SkinMatrix_MtxFToNewMtx -/* A9D2E4 80026144 A208FFFF */ sb $t0, -1($s0) -/* A9D2E8 80026148 10400027 */ beqz $v0, .L800261E8 -/* A9D2EC 8002614C 00124980 */ sll $t1, $s2, 6 -/* A9D2F0 80026150 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9D2F4 80026154 8FAA01E4 */ lw $t2, 0x1e4($sp) -/* A9D2F8 80026158 3C0CDA38 */ lui $t4, (0xDA380003 >> 16) # lui $t4, 0xda38 -/* A9D2FC 8002615C 248B0008 */ addiu $t3, $a0, 8 -/* A9D300 80026160 AECB02D0 */ sw $t3, 0x2d0($s6) -/* A9D304 80026164 358C0003 */ ori $t4, (0xDA380003 & 0xFFFF) # ori $t4, $t4, 3 -/* A9D308 80026168 AC8C0000 */ sw $t4, ($a0) -/* A9D30C 8002616C AC820004 */ sw $v0, 4($a0) -/* A9D310 80026170 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9D314 80026174 3C0E0100 */ lui $t6, (0x01004008 >> 16) # lui $t6, 0x100 -/* A9D318 80026178 35CE4008 */ ori $t6, (0x01004008 & 0xFFFF) # ori $t6, $t6, 0x4008 -/* A9D31C 8002617C 248D0008 */ addiu $t5, $a0, 8 -/* A9D320 80026180 AECD02D0 */ sw $t5, 0x2d0($s6) -/* A9D324 80026184 012A2821 */ addu $a1, $t1, $t2 -/* A9D328 80026188 AC850004 */ sw $a1, 4($a0) -/* A9D32C 8002618C AC8E0000 */ sw $t6, ($a0) -/* A9D330 80026190 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9D334 80026194 3C180604 */ lui $t8, (0x06040006 >> 16) # lui $t8, 0x604 -/* A9D338 80026198 3C190004 */ lui $t9, (0x00040602 >> 16) # lui $t9, 4 -/* A9D33C 8002619C 248F0008 */ addiu $t7, $a0, 8 -/* A9D340 800261A0 AECF02D0 */ sw $t7, 0x2d0($s6) -/* A9D344 800261A4 37390602 */ ori $t9, (0x00040602 & 0xFFFF) # ori $t9, $t9, 0x602 -/* A9D348 800261A8 37180006 */ ori $t8, (0x06040006 & 0xFFFF) # ori $t8, $t8, 6 -/* A9D34C 800261AC AC980000 */ sw $t8, ($a0) -/* A9D350 800261B0 AC990004 */ sw $t9, 4($a0) -/* A9D354 800261B4 8FA801E0 */ lw $t0, 0x1e0($sp) -/* A9D358 800261B8 26520001 */ addiu $s2, $s2, 1 -/* A9D35C 800261BC 26310024 */ addiu $s1, $s1, 0x24 -/* A9D360 800261C0 8D090008 */ lw $t1, 8($t0) -/* A9D364 800261C4 0249082A */ slt $at, $s2, $t1 -/* A9D368 800261C8 5420FF86 */ bnezl $at, .L80025FE4 -/* A9D36C 800261CC 27A400EC */ addiu $a0, $sp, 0xec -.L800261D0: -/* A9D370 800261D0 8EC402D0 */ lw $a0, 0x2d0($s6) -/* A9D374 800261D4 3C0BE700 */ lui $t3, 0xe700 -/* A9D378 800261D8 248A0008 */ addiu $t2, $a0, 8 -/* A9D37C 800261DC AECA02D0 */ sw $t2, 0x2d0($s6) -/* A9D380 800261E0 AC800004 */ sw $zero, 4($a0) -/* A9D384 800261E4 AC8B0000 */ sw $t3, ($a0) -.L800261E8: -/* A9D388 800261E8 3C068013 */ lui $a2, %hi(D_80135594) # $a2, 0x8013 -/* A9D38C 800261EC 24C65594 */ addiu $a2, %lo(D_80135594) # addiu $a2, $a2, 0x5594 -/* A9D390 800261F0 27A401AC */ addiu $a0, $sp, 0x1ac -/* A9D394 800261F4 02C02825 */ move $a1, $s6 -/* A9D398 800261F8 0C031AD5 */ jal Graph_CloseDisps -/* A9D39C 800261FC 240701F2 */ li $a3, 498 -/* A9D3A0 80026200 8FBF0034 */ lw $ra, 0x34($sp) -/* A9D3A4 80026204 8FB00014 */ lw $s0, 0x14($sp) -/* A9D3A8 80026208 8FB10018 */ lw $s1, 0x18($sp) -/* A9D3AC 8002620C 8FB2001C */ lw $s2, 0x1c($sp) -/* A9D3B0 80026210 8FB30020 */ lw $s3, 0x20($sp) -/* A9D3B4 80026214 8FB40024 */ lw $s4, 0x24($sp) -/* A9D3B8 80026218 8FB50028 */ lw $s5, 0x28($sp) -/* A9D3BC 8002621C 8FB6002C */ lw $s6, 0x2c($sp) -/* A9D3C0 80026220 8FB70030 */ lw $s7, 0x30($sp) -/* A9D3C4 80026224 03E00008 */ jr $ra -/* A9D3C8 80026228 27BD01E8 */ addiu $sp, $sp, 0x1e8 diff --git a/asm/non_matchings/code/z_elf_message/ElfMessage_CheckCondition.s b/asm/non_matchings/code/z_elf_message/ElfMessage_CheckCondition.s deleted file mode 100644 index 28f549982f..0000000000 --- a/asm/non_matchings/code/z_elf_message/ElfMessage_CheckCondition.s +++ /dev/null @@ -1,285 +0,0 @@ -.rdata -glabel D_8013B830 - .asciz "../z_elf_message.c" - .balign 4 - -glabel D_8013B844 - .asciz "\"企画外 条件\" = %s\n" - # EUC-JP: 企画外 条件 | Unplanned conditions - .balign 4 - -glabel D_8013B858 - .asciz "企画外 条件" - # EUC-JP: 企画外 条件 | Unplanned conditions - .balign 4 - -glabel D_8013B864 - .asciz "0" - .balign 4 - -glabel D_8013B868 - .asciz "../z_elf_message.c" - .balign 4 - -.late_rodata -.late_rodata_alignment 8 -glabel jtbl_8013B8C8 - .word L8006BCFC - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BD44 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BD90 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BDD0 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE38 - .word L8006BE10 - -.text -glabel ElfMessage_CheckCondition -/* AE2D60 8006BBC0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AE2D64 8006BBC4 AFBF0014 */ sw $ra, 0x14($sp) -/* AE2D68 8006BBC8 90850000 */ lbu $a1, ($a0) -/* AE2D6C 8006BBCC 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2D70 8006BBD0 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2D74 8006BBD4 30A2001E */ andi $v0, $a1, 0x1e -/* AE2D78 8006BBD8 1040000C */ beqz $v0, .L8006BC0C -/* AE2D7C 8006BBDC 240F0001 */ li $t7, 1 -/* AE2D80 8006BBE0 24010002 */ li $at, 2 -/* AE2D84 8006BBE4 1041001A */ beq $v0, $at, .L8006BC50 -/* AE2D88 8006BBE8 3C078016 */ lui $a3, %hi(gSaveContext) -/* AE2D8C 8006BBEC 24010004 */ li $at, 4 -/* AE2D90 8006BBF0 10410028 */ beq $v0, $at, .L8006BC94 -/* AE2D94 8006BBF4 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2D98 8006BBF8 24010006 */ li $at, 6 -/* AE2D9C 8006BBFC 50410036 */ beql $v0, $at, .L8006BCD8 -/* AE2DA0 8006BC00 90830001 */ lbu $v1, 1($a0) -/* AE2DA4 8006BC04 1000008C */ b .L8006BE38 -/* AE2DA8 8006BC08 00000000 */ nop -.L8006BC0C: -/* AE2DAC 8006BC0C 90830001 */ lbu $v1, 1($a0) -/* AE2DB0 8006BC10 30B80001 */ andi $t8, $a1, 1 -/* AE2DB4 8006BC14 3B190001 */ xori $t9, $t8, 1 -/* AE2DB8 8006BC18 306800F0 */ andi $t0, $v1, 0xf0 -/* AE2DBC 8006BC1C 00084903 */ sra $t1, $t0, 4 -/* AE2DC0 8006BC20 00095040 */ sll $t2, $t1, 1 -/* AE2DC4 8006BC24 00EA5821 */ addu $t3, $a3, $t2 -/* AE2DC8 8006BC28 956C0ED4 */ lhu $t4, 0xed4($t3) -/* AE2DCC 8006BC2C 306E000F */ andi $t6, $v1, 0xf -/* AE2DD0 8006BC30 01CF3004 */ sllv $a2, $t7, $t6 -/* AE2DD4 8006BC34 30C6FFFF */ andi $a2, $a2, 0xffff -/* AE2DD8 8006BC38 01866824 */ and $t5, $t4, $a2 -/* AE2DDC 8006BC3C 000D782B */ sltu $t7, $zero, $t5 -/* AE2DE0 8006BC40 2F390001 */ sltiu $t9, $t9, 1 -/* AE2DE4 8006BC44 032F1026 */ xor $v0, $t9, $t7 -/* AE2DE8 8006BC48 1000008B */ b .L8006BE78 -/* AE2DEC 8006BC4C 2C420001 */ sltiu $v0, $v0, 1 -.L8006BC50: -/* AE2DF0 8006BC50 908E0001 */ lbu $t6, 1($a0) -/* AE2DF4 8006BC54 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2DF8 8006BC58 94E91402 */ lhu $t1, 0x1402($a3) -/* AE2DFC 8006BC5C 3C088012 */ lui $t0, %hi(gBitFlags-0x1d0) -/* AE2E00 8006BC60 000EC080 */ sll $t8, $t6, 2 -/* AE2E04 8006BC64 01184021 */ addu $t0, $t0, $t8 -/* AE2E08 8006BC68 00E95021 */ addu $t2, $a3, $t1 -/* AE2E0C 8006BC6C 914B00A8 */ lbu $t3, 0xa8($t2) -/* AE2E10 8006BC70 8D086F50 */ lw $t0, %lo(gBitFlags-0x1d0)($t0) -/* AE2E14 8006BC74 30B90001 */ andi $t9, $a1, 1 -/* AE2E18 8006BC78 3B2F0001 */ xori $t7, $t9, 1 -/* AE2E1C 8006BC7C 010B6024 */ and $t4, $t0, $t3 -/* AE2E20 8006BC80 000C682B */ sltu $t5, $zero, $t4 -/* AE2E24 8006BC84 2DEF0001 */ sltiu $t7, $t7, 1 -/* AE2E28 8006BC88 01ED1026 */ xor $v0, $t7, $t5 -/* AE2E2C 8006BC8C 1000007A */ b .L8006BE78 -/* AE2E30 8006BC90 2C420001 */ sltiu $v0, $v0, 1 -.L8006BC94: -/* AE2E34 8006BC94 90980001 */ lbu $t8, 1($a0) -/* AE2E38 8006BC98 3C098012 */ lui $t1, %hi(gItemSlots) -/* AE2E3C 8006BC9C 24E7E660 */ addiu $a3, %lo(gSaveContext) -/* AE2E40 8006BCA0 01384821 */ addu $t1, $t1, $t8 -/* AE2E44 8006BCA4 91297464 */ lbu $t1, %lo(gItemSlots)($t1) -/* AE2E48 8006BCA8 908E0003 */ lbu $t6, 3($a0) -/* AE2E4C 8006BCAC 30AC0001 */ andi $t4, $a1, 1 -/* AE2E50 8006BCB0 00E95021 */ addu $t2, $a3, $t1 -/* AE2E54 8006BCB4 91480074 */ lbu $t0, 0x74($t2) -/* AE2E58 8006BCB8 39990001 */ xori $t9, $t4, 1 -/* AE2E5C 8006BCBC 2F390001 */ sltiu $t9, $t9, 1 -/* AE2E60 8006BCC0 01C85826 */ xor $t3, $t6, $t0 -/* AE2E64 8006BCC4 2D6B0001 */ sltiu $t3, $t3, 1 -/* AE2E68 8006BCC8 032B1026 */ xor $v0, $t9, $t3 -/* AE2E6C 8006BCCC 1000006A */ b .L8006BE78 -/* AE2E70 8006BCD0 2C420001 */ sltiu $v0, $v0, 1 -/* AE2E74 8006BCD4 90830001 */ lbu $v1, 1($a0) -.L8006BCD8: -/* AE2E78 8006BCD8 306F00F0 */ andi $t7, $v1, 0xf0 -/* AE2E7C 8006BCDC 2DE10041 */ sltiu $at, $t7, 0x41 -/* AE2E80 8006BCE0 10200055 */ beqz $at, .L8006BE38 -/* AE2E84 8006BCE4 000F7880 */ sll $t7, $t7, 2 -/* AE2E88 8006BCE8 3C018014 */ lui $at, %hi(jtbl_8013B8C8) -/* AE2E8C 8006BCEC 002F0821 */ addu $at, $at, $t7 -/* AE2E90 8006BCF0 8C2FB8C8 */ lw $t7, %lo(jtbl_8013B8C8)($at) -/* AE2E94 8006BCF4 01E00008 */ jr $t7 -/* AE2E98 8006BCF8 00000000 */ nop -glabel L8006BCFC -/* AE2E9C 8006BCFC 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2EA0 8006BD00 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2EA4 8006BD04 3C188012 */ lui $t8, %hi(gUpgradeMasks+8) # $t8, 0x8012 -/* AE2EA8 8006BD08 8F1871B8 */ lw $t8, %lo(gUpgradeMasks+8)($t8) -/* AE2EAC 8006BD0C 8CED00A0 */ lw $t5, 0xa0($a3) -/* AE2EB0 8006BD10 3C0A8012 */ lui $t2, %hi(gUpgradeShifts+2) # $t2, 0x8012 -/* AE2EB4 8006BD14 914A71F6 */ lbu $t2, %lo(gUpgradeShifts+2)($t2) -/* AE2EB8 8006BD18 01B84824 */ and $t1, $t5, $t8 -/* AE2EBC 8006BD1C 3068000F */ andi $t0, $v1, 0xf -/* AE2EC0 8006BD20 30B90001 */ andi $t9, $a1, 1 -/* AE2EC4 8006BD24 01497007 */ srav $t6, $t1, $t2 -/* AE2EC8 8006BD28 010E6026 */ xor $t4, $t0, $t6 -/* AE2ECC 8006BD2C 3B2B0001 */ xori $t3, $t9, 1 -/* AE2ED0 8006BD30 2D6B0001 */ sltiu $t3, $t3, 1 -/* AE2ED4 8006BD34 2D8C0001 */ sltiu $t4, $t4, 1 -/* AE2ED8 8006BD38 016C1026 */ xor $v0, $t3, $t4 -/* AE2EDC 8006BD3C 1000004E */ b .L8006BE78 -/* AE2EE0 8006BD40 2C420001 */ sltiu $v0, $v0, 1 -glabel L8006BD44 -/* AE2EE4 8006BD44 908F0003 */ lbu $t7, 3($a0) -/* AE2EE8 8006BD48 3C188012 */ lui $t8, %hi(gBitFlags-0x110) -/* AE2EEC 8006BD4C 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2EF0 8006BD50 000F6880 */ sll $t5, $t7, 2 -/* AE2EF4 8006BD54 030DC021 */ addu $t8, $t8, $t5 -/* AE2EF8 8006BD58 3C098012 */ lui $t1, %hi(gEquipShifts+3) # $t1, 0x8012 -/* AE2EFC 8006BD5C 912971F3 */ lbu $t1, %lo(gEquipShifts+3)($t1) -/* AE2F00 8006BD60 8F187010 */ lw $t8, %lo(gBitFlags-0x110)($t8) -/* AE2F04 8006BD64 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2F08 8006BD68 94E8009C */ lhu $t0, 0x9c($a3) -/* AE2F0C 8006BD6C 30AB0001 */ andi $t3, $a1, 1 -/* AE2F10 8006BD70 01385004 */ sllv $t2, $t8, $t1 -/* AE2F14 8006BD74 396C0001 */ xori $t4, $t3, 1 -/* AE2F18 8006BD78 01487024 */ and $t6, $t2, $t0 -/* AE2F1C 8006BD7C 000EC82B */ sltu $t9, $zero, $t6 -/* AE2F20 8006BD80 2D8C0001 */ sltiu $t4, $t4, 1 -/* AE2F24 8006BD84 01991026 */ xor $v0, $t4, $t9 -/* AE2F28 8006BD88 1000003B */ b .L8006BE78 -/* AE2F2C 8006BD8C 2C420001 */ sltiu $v0, $v0, 1 -glabel L8006BD90 -/* AE2F30 8006BD90 908F0003 */ lbu $t7, 3($a0) -/* AE2F34 8006BD94 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2F38 8006BD98 3C188012 */ lui $t8, %hi(gBitFlags-0x150) -/* AE2F3C 8006BD9C 000F6880 */ sll $t5, $t7, 2 -/* AE2F40 8006BDA0 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2F44 8006BDA4 030DC021 */ addu $t8, $t8, $t5 -/* AE2F48 8006BDA8 8F186FD0 */ lw $t8, %lo(gBitFlags-0x150)($t8) -/* AE2F4C 8006BDAC 8CE900A4 */ lw $t1, 0xa4($a3) -/* AE2F50 8006BDB0 30AE0001 */ andi $t6, $a1, 1 -/* AE2F54 8006BDB4 39CB0001 */ xori $t3, $t6, 1 -/* AE2F58 8006BDB8 03095024 */ and $t2, $t8, $t1 -/* AE2F5C 8006BDBC 000A402B */ sltu $t0, $zero, $t2 -/* AE2F60 8006BDC0 2D6B0001 */ sltiu $t3, $t3, 1 -/* AE2F64 8006BDC4 01681026 */ xor $v0, $t3, $t0 -/* AE2F68 8006BDC8 1000002B */ b .L8006BE78 -/* AE2F6C 8006BDCC 2C420001 */ sltiu $v0, $v0, 1 -glabel L8006BDD0 -/* AE2F70 8006BDD0 908C0003 */ lbu $t4, 3($a0) -/* AE2F74 8006BDD4 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2F78 8006BDD8 3C0F8012 */ lui $t7, %hi(gBitFlags-0x198) -/* AE2F7C 8006BDDC 000CC880 */ sll $t9, $t4, 2 -/* AE2F80 8006BDE0 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2F84 8006BDE4 01F97821 */ addu $t7, $t7, $t9 -/* AE2F88 8006BDE8 8DEF6F88 */ lw $t7, %lo(gBitFlags-0x198)($t7) -/* AE2F8C 8006BDEC 8CED00A4 */ lw $t5, 0xa4($a3) -/* AE2F90 8006BDF0 30AA0001 */ andi $t2, $a1, 1 -/* AE2F94 8006BDF4 394E0001 */ xori $t6, $t2, 1 -/* AE2F98 8006BDF8 01EDC024 */ and $t8, $t7, $t5 -/* AE2F9C 8006BDFC 0018482B */ sltu $t1, $zero, $t8 -/* AE2FA0 8006BE00 2DCE0001 */ sltiu $t6, $t6, 1 -/* AE2FA4 8006BE04 01C91026 */ xor $v0, $t6, $t1 -/* AE2FA8 8006BE08 1000001B */ b .L8006BE78 -/* AE2FAC 8006BE0C 2C420001 */ sltiu $v0, $v0, 1 -glabel L8006BE10 -/* AE2FB0 8006BE10 3C078016 */ lui $a3, %hi(gSaveContext) # $a3, 0x8016 -/* AE2FB4 8006BE14 24E7E660 */ addiu $a3, %lo(gSaveContext) # addiu $a3, $a3, -0x19a0 -/* AE2FB8 8006BE18 90EC003A */ lbu $t4, 0x3a($a3) -/* AE2FBC 8006BE1C 30AB0001 */ andi $t3, $a1, 1 -/* AE2FC0 8006BE20 39680001 */ xori $t0, $t3, 1 -/* AE2FC4 8006BE24 2D080001 */ sltiu $t0, $t0, 1 -/* AE2FC8 8006BE28 000CC82B */ sltu $t9, $zero, $t4 -/* AE2FCC 8006BE2C 01191026 */ xor $v0, $t0, $t9 -/* AE2FD0 8006BE30 10000011 */ b .L8006BE78 -/* AE2FD4 8006BE34 2C420001 */ sltiu $v0, $v0, 1 -glabel L8006BE38 -.L8006BE38: -/* AE2FD8 8006BE38 3C048014 */ lui $a0, %hi(D_8013B830) # $a0, 0x8014 -/* AE2FDC 8006BE3C 2484B830 */ addiu $a0, %lo(D_8013B830) # addiu $a0, $a0, -0x47d0 -/* AE2FE0 8006BE40 0C000B84 */ jal LogUtils_LogThreadId -/* AE2FE4 8006BE44 2405009C */ li $a1, 156 -/* AE2FE8 8006BE48 3C048014 */ lui $a0, %hi(D_8013B844) # $a0, 0x8014 -/* AE2FEC 8006BE4C 3C058014 */ lui $a1, %hi(D_8013B858) # $a1, 0x8014 -/* AE2FF0 8006BE50 24A5B858 */ addiu $a1, %lo(D_8013B858) # addiu $a1, $a1, -0x47a8 -/* AE2FF4 8006BE54 0C00084C */ jal osSyncPrintf -/* AE2FF8 8006BE58 2484B844 */ addiu $a0, %lo(D_8013B844) # addiu $a0, $a0, -0x47bc -/* AE2FFC 8006BE5C 3C048014 */ lui $a0, %hi(D_8013B864) # $a0, 0x8014 -/* AE3000 8006BE60 3C058014 */ lui $a1, %hi(D_8013B868) # $a1, 0x8014 -/* AE3004 8006BE64 24A5B868 */ addiu $a1, %lo(D_8013B868) # addiu $a1, $a1, -0x4798 -/* AE3008 8006BE68 2484B864 */ addiu $a0, %lo(D_8013B864) # addiu $a0, $a0, -0x479c -/* AE300C 8006BE6C 0C0007FC */ jal __assert -/* AE3010 8006BE70 2406009D */ li $a2, 157 -/* AE3014 8006BE74 00001025 */ move $v0, $zero -.L8006BE78: -/* AE3018 8006BE78 8FBF0014 */ lw $ra, 0x14($sp) -/* AE301C 8006BE7C 27BD0018 */ addiu $sp, $sp, 0x18 -/* AE3020 8006BE80 03E00008 */ jr $ra -/* AE3024 8006BE84 00000000 */ nop - diff --git a/asm/non_matchings/code/z_fbdemo/TransitionUnk_InitData.s b/asm/non_matchings/code/z_fbdemo/TransitionUnk_InitData.s deleted file mode 100644 index c2e3126b2e..0000000000 --- a/asm/non_matchings/code/z_fbdemo/TransitionUnk_InitData.s +++ /dev/null @@ -1,54 +0,0 @@ -glabel TransitionUnk_InitData -/* B28E9C 800B1CFC 8C830004 */ lw $v1, 4($a0) -/* B28EA0 800B1D00 00001025 */ move $v0, $zero -/* B28EA4 800B1D04 24630001 */ addiu $v1, $v1, 1 -/* B28EA8 800B1D08 1860002A */ blez $v1, .L800B1DB4 -/* B28EAC 800B1D0C 00000000 */ nop -/* B28EB0 800B1D10 8C860000 */ lw $a2, ($a0) -/* B28EB4 800B1D14 24C60001 */ addiu $a2, $a2, 1 -.L800B1D18: -/* B28EB8 800B1D18 18C00022 */ blez $a2, .L800B1DA4 -/* B28EBC 800B1D1C 00002825 */ move $a1, $zero -/* B28EC0 800B1D20 00027140 */ sll $t6, $v0, 5 -/* B28EC4 800B1D24 448E2000 */ mtc1 $t6, $f4 -/* B28EC8 800B1D28 00001825 */ move $v1, $zero -/* B28ECC 800B1D2C 00003825 */ move $a3, $zero -/* B28ED0 800B1D30 46802020 */ cvt.s.w $f0, $f4 -.L800B1D34: -/* B28ED4 800B1D34 00460019 */ multu $v0, $a2 -/* B28ED8 800B1D38 44873000 */ mtc1 $a3, $f6 -/* B28EDC 800B1D3C 8C8F000C */ lw $t7, 0xc($a0) -/* B28EE0 800B1D40 24A50001 */ addiu $a1, $a1, 1 -/* B28EE4 800B1D44 46803220 */ cvt.s.w $f8, $f6 -/* B28EE8 800B1D48 01E3C021 */ addu $t8, $t7, $v1 -/* B28EEC 800B1D4C 24E70020 */ addiu $a3, $a3, 0x20 -/* B28EF0 800B1D50 0000C812 */ mflo $t9 -/* B28EF4 800B1D54 001940C0 */ sll $t0, $t9, 3 -/* B28EF8 800B1D58 03084821 */ addu $t1, $t8, $t0 -/* B28EFC 800B1D5C E5280000 */ swc1 $f8, ($t1) -/* B28F00 800B1D60 8C8C0000 */ lw $t4, ($a0) -/* B28F04 800B1D64 8C8A000C */ lw $t2, 0xc($a0) -/* B28F08 800B1D68 258D0001 */ addiu $t5, $t4, 1 -/* B28F0C 800B1D6C 004D0019 */ multu $v0, $t5 -/* B28F10 800B1D70 01435821 */ addu $t3, $t2, $v1 -/* B28F14 800B1D74 24630008 */ addiu $v1, $v1, 8 -/* B28F18 800B1D78 00007012 */ mflo $t6 -/* B28F1C 800B1D7C 000E78C0 */ sll $t7, $t6, 3 -/* B28F20 800B1D80 016FC821 */ addu $t9, $t3, $t7 -/* B28F24 800B1D84 E7200004 */ swc1 $f0, 4($t9) -/* B28F28 800B1D88 8C860000 */ lw $a2, ($a0) -/* B28F2C 800B1D8C 24C60001 */ addiu $a2, $a2, 1 -/* B28F30 800B1D90 00A6082A */ slt $at, $a1, $a2 -/* B28F34 800B1D94 1420FFE7 */ bnez $at, .L800B1D34 -/* B28F38 800B1D98 00000000 */ nop -/* B28F3C 800B1D9C 8C830004 */ lw $v1, 4($a0) -/* B28F40 800B1DA0 24630001 */ addiu $v1, $v1, 1 -.L800B1DA4: -/* B28F44 800B1DA4 24420001 */ addiu $v0, $v0, 1 -/* B28F48 800B1DA8 0043082A */ slt $at, $v0, $v1 -/* B28F4C 800B1DAC 1420FFDA */ bnez $at, .L800B1D18 -/* B28F50 800B1DB0 00000000 */ nop -.L800B1DB4: -/* B28F54 800B1DB4 03E00008 */ jr $ra -/* B28F58 800B1DB8 00000000 */ nop - diff --git a/asm/non_matchings/code/z_fbdemo/TransitionUnk_SetData.s b/asm/non_matchings/code/z_fbdemo/TransitionUnk_SetData.s deleted file mode 100644 index 4d95a62eb5..0000000000 --- a/asm/non_matchings/code/z_fbdemo/TransitionUnk_SetData.s +++ /dev/null @@ -1,76 +0,0 @@ -glabel TransitionUnk_SetData -/* B29214 800B2074 8C830004 */ lw $v1, 4($a0) -/* B29218 800B2078 00001025 */ move $v0, $zero -/* B2921C 800B207C 24630001 */ addiu $v1, $v1, 1 -/* B29220 800B2080 1860003F */ blez $v1, .L800B2180 -/* B29224 800B2084 00000000 */ nop -/* B29228 800B2088 8C860000 */ lw $a2, ($a0) -/* B2922C 800B208C 24C60001 */ addiu $a2, $a2, 1 -.L800B2090: -/* B29230 800B2090 18C00037 */ blez $a2, .L800B2170 -/* B29234 800B2094 00002825 */ move $a1, $zero -/* B29238 800B2098 00003825 */ move $a3, $zero -/* B2923C 800B209C 00004825 */ move $t1, $zero -/* B29240 800B20A0 8C8E0008 */ lw $t6, 8($a0) -.L800B20A4: -/* B29244 800B20A4 55C00004 */ bnezl $t6, .L800B20B8 -/* B29248 800B20A8 8C830014 */ lw $v1, 0x14($a0) -/* B2924C 800B20AC 10000002 */ b .L800B20B8 -/* B29250 800B20B0 8C830010 */ lw $v1, 0x10($a0) -/* B29254 800B20B4 8C830014 */ lw $v1, 0x14($a0) -.L800B20B8: -/* B29258 800B20B8 00460019 */ multu $v0, $a2 -/* B2925C 800B20BC 8C8F000C */ lw $t7, 0xc($a0) -/* B29260 800B20C0 00676821 */ addu $t5, $v1, $a3 -/* B29264 800B20C4 01E9C021 */ addu $t8, $t7, $t1 -/* B29268 800B20C8 00004012 */ mflo $t0 -/* B2926C 800B20CC 0008C8C0 */ sll $t9, $t0, 3 -/* B29270 800B20D0 03195021 */ addu $t2, $t8, $t9 -/* B29274 800B20D4 C5440000 */ lwc1 $f4, ($t2) -/* B29278 800B20D8 00087100 */ sll $t6, $t0, 4 -/* B2927C 800B20DC 01AE7821 */ addu $t7, $t5, $t6 -/* B29280 800B20E0 4600218D */ trunc.w.s $f6, $f4 -/* B29284 800B20E4 440C3000 */ mfc1 $t4, $f6 -/* B29288 800B20E8 00000000 */ nop -/* B2928C 800B20EC A5EC0000 */ sh $t4, ($t7) -/* B29290 800B20F0 8C980008 */ lw $t8, 8($a0) -/* B29294 800B20F4 57000004 */ bnezl $t8, .L800B2108 -/* B29298 800B20F8 8C830014 */ lw $v1, 0x14($a0) -/* B2929C 800B20FC 10000002 */ b .L800B2108 -/* B292A0 800B2100 8C830010 */ lw $v1, 0x10($a0) -/* B292A4 800B2104 8C830014 */ lw $v1, 0x14($a0) -.L800B2108: -/* B292A8 800B2108 8C990000 */ lw $t9, ($a0) -/* B292AC 800B210C 8C8B000C */ lw $t3, 0xc($a0) -/* B292B0 800B2110 24A50001 */ addiu $a1, $a1, 1 -/* B292B4 800B2114 272A0001 */ addiu $t2, $t9, 1 -/* B292B8 800B2118 004A0019 */ multu $v0, $t2 -/* B292BC 800B211C 01696821 */ addu $t5, $t3, $t1 -/* B292C0 800B2120 0067C821 */ addu $t9, $v1, $a3 -/* B292C4 800B2124 24E70010 */ addiu $a3, $a3, 0x10 -/* B292C8 800B2128 25290008 */ addiu $t1, $t1, 8 -/* B292CC 800B212C 00004012 */ mflo $t0 -/* B292D0 800B2130 000870C0 */ sll $t6, $t0, 3 -/* B292D4 800B2134 01AE6021 */ addu $t4, $t5, $t6 -/* B292D8 800B2138 C5880004 */ lwc1 $f8, 4($t4) -/* B292DC 800B213C 00085100 */ sll $t2, $t0, 4 -/* B292E0 800B2140 032A5821 */ addu $t3, $t9, $t2 -/* B292E4 800B2144 4600428D */ trunc.w.s $f10, $f8 -/* B292E8 800B2148 44185000 */ mfc1 $t8, $f10 -/* B292EC 800B214C 00000000 */ nop -/* B292F0 800B2150 A5780002 */ sh $t8, 2($t3) -/* B292F4 800B2154 8C860000 */ lw $a2, ($a0) -/* B292F8 800B2158 24C60001 */ addiu $a2, $a2, 1 -/* B292FC 800B215C 00A6082A */ slt $at, $a1, $a2 -/* B29300 800B2160 5420FFD0 */ bnezl $at, .L800B20A4 -/* B29304 800B2164 8C8E0008 */ lw $t6, 8($a0) -/* B29308 800B2168 8C830004 */ lw $v1, 4($a0) -/* B2930C 800B216C 24630001 */ addiu $v1, $v1, 1 -.L800B2170: -/* B29310 800B2170 24420001 */ addiu $v0, $v0, 1 -/* B29314 800B2174 0043082A */ slt $at, $v0, $v1 -/* B29318 800B2178 1420FFC5 */ bnez $at, .L800B2090 -/* B2931C 800B217C 00000000 */ nop -.L800B2180: -/* B29320 800B2180 03E00008 */ jr $ra -/* B29324 800B2184 00000000 */ nop diff --git a/asm/non_matchings/code/z_fbdemo/TransitionUnk_Update.s b/asm/non_matchings/code/z_fbdemo/TransitionUnk_Update.s deleted file mode 100644 index 2d5d8aa0a9..0000000000 --- a/asm/non_matchings/code/z_fbdemo/TransitionUnk_Update.s +++ /dev/null @@ -1,85 +0,0 @@ -glabel TransitionUnk_Update -/* B29454 800B22B4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B29458 800B22B8 F7B60010 */ sdc1 $f22, 0x10($sp) -/* B2945C 800B22BC F7B40008 */ sdc1 $f20, 8($sp) -/* B29460 800B22C0 8C830004 */ lw $v1, 4($a0) -/* B29464 800B22C4 00001025 */ move $v0, $zero -/* B29468 800B22C8 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B2946C 800B22CC 24630001 */ addiu $v1, $v1, 1 -/* B29470 800B22D0 58600042 */ blezl $v1, .L800B23DC -/* B29474 800B22D4 D7B40008 */ ldc1 $f20, 8($sp) -/* B29478 800B22D8 8C860000 */ lw $a2, ($a0) -/* B2947C 800B22DC 4481B000 */ mtc1 $at, $f22 -/* B29480 800B22E0 3C0142C8 */ li $at, 0x42C80000 # 0.000000 -/* B29484 800B22E4 44819000 */ mtc1 $at, $f18 -/* B29488 800B22E8 4480A000 */ mtc1 $zero, $f20 -/* B2948C 800B22EC 24C70001 */ addiu $a3, $a2, 1 -.L800B22F0: -/* B29490 800B22F0 18E00035 */ blez $a3, .L800B23C8 -/* B29494 800B22F4 00002825 */ move $a1, $zero -/* B29498 800B22F8 00004025 */ move $t0, $zero -.L800B22FC: -/* B2949C 800B22FC 00470019 */ multu $v0, $a3 -/* B294A0 800B2300 8C83000C */ lw $v1, 0xc($a0) -/* B294A4 800B2304 0006C940 */ sll $t9, $a2, 5 -/* B294A8 800B2308 24A50001 */ addiu $a1, $a1, 1 -/* B294AC 800B230C 00687021 */ addu $t6, $v1, $t0 -/* B294B0 800B2310 00795021 */ addu $t2, $v1, $t9 -/* B294B4 800B2314 C5440048 */ lwc1 $f4, 0x48($t2) -/* B294B8 800B2318 C548004C */ lwc1 $f8, 0x4c($t2) -/* B294BC 800B231C 00007812 */ mflo $t7 -/* B294C0 800B2320 000FC0C0 */ sll $t8, $t7, 3 -/* B294C4 800B2324 01D84821 */ addu $t1, $t6, $t8 -/* B294C8 800B2328 C5220000 */ lwc1 $f2, ($t1) -/* B294CC 800B232C C5260004 */ lwc1 $f6, 4($t1) -/* B294D0 800B2330 46041001 */ sub.s $f0, $f2, $f4 -/* B294D4 800B2334 46083301 */ sub.s $f12, $f6, $f8 -/* B294D8 800B2338 46000282 */ mul.s $f10, $f0, $f0 -/* B294DC 800B233C 00000000 */ nop -/* B294E0 800B2340 460C6102 */ mul.s $f4, $f12, $f12 -/* B294E4 800B2344 46045180 */ add.s $f6, $f10, $f4 -/* B294E8 800B2348 46123403 */ div.s $f16, $f6, $f18 -/* B294EC 800B234C 4610A032 */ c.eq.s $f20, $f16 -/* B294F0 800B2350 46008386 */ mov.s $f14, $f16 -/* B294F4 800B2354 45010017 */ bc1t .L800B23B4 -/* B294F8 800B2358 00000000 */ nop -/* B294FC 800B235C 4616803C */ c.lt.s $f16, $f22 -/* B29500 800B2360 00000000 */ nop -/* B29504 800B2364 45020003 */ bc1fl .L800B2374 -/* B29508 800B2368 460E0203 */ div.s $f8, $f0, $f14 -/* B2950C 800B236C 4600B386 */ mov.s $f14, $f22 -/* B29510 800B2370 460E0203 */ div.s $f8, $f0, $f14 -.L800B2374: -/* B29514 800B2374 460E6183 */ div.s $f6, $f12, $f14 -/* B29518 800B2378 46081281 */ sub.s $f10, $f2, $f8 -/* B2951C 800B237C E52A0000 */ swc1 $f10, ($t1) -/* B29520 800B2380 8C8D0000 */ lw $t5, ($a0) -/* B29524 800B2384 8C8B000C */ lw $t3, 0xc($a0) -/* B29528 800B2388 25AF0001 */ addiu $t7, $t5, 1 -/* B2952C 800B238C 004F0019 */ multu $v0, $t7 -/* B29530 800B2390 01686021 */ addu $t4, $t3, $t0 -/* B29534 800B2394 00007012 */ mflo $t6 -/* B29538 800B2398 000EC0C0 */ sll $t8, $t6, 3 -/* B2953C 800B239C 01984821 */ addu $t1, $t4, $t8 -/* B29540 800B23A0 C5240004 */ lwc1 $f4, 4($t1) -/* B29544 800B23A4 46062201 */ sub.s $f8, $f4, $f6 -/* B29548 800B23A8 E5280004 */ swc1 $f8, 4($t1) -/* B2954C 800B23AC 8C860000 */ lw $a2, ($a0) -/* B29550 800B23B0 24C70001 */ addiu $a3, $a2, 1 -.L800B23B4: -/* B29554 800B23B4 00A7082A */ slt $at, $a1, $a3 -/* B29558 800B23B8 1420FFD0 */ bnez $at, .L800B22FC -/* B2955C 800B23BC 25080008 */ addiu $t0, $t0, 8 -/* B29560 800B23C0 8C830004 */ lw $v1, 4($a0) -/* B29564 800B23C4 24630001 */ addiu $v1, $v1, 1 -.L800B23C8: -/* B29568 800B23C8 24420001 */ addiu $v0, $v0, 1 -/* B2956C 800B23CC 0043082A */ slt $at, $v0, $v1 -/* B29570 800B23D0 1420FFC7 */ bnez $at, .L800B22F0 -/* B29574 800B23D4 00000000 */ nop -/* B29578 800B23D8 D7B40008 */ ldc1 $f20, 8($sp) -.L800B23DC: -/* B2957C 800B23DC D7B60010 */ ldc1 $f22, 0x10($sp) -/* B29580 800B23E0 03E00008 */ jr $ra -/* B29584 800B23E4 27BD0018 */ addiu $sp, $sp, 0x18 - diff --git a/asm/non_matchings/code/z_horse/func_8006D684.s b/asm/non_matchings/code/z_horse/func_8006D684.s deleted file mode 100644 index 041f0218eb..0000000000 --- a/asm/non_matchings/code/z_horse/func_8006D684.s +++ /dev/null @@ -1,439 +0,0 @@ -.rdata -glabel D_8013BC40 - .asciz "player->ride.actor != NULL" - .balign 4 - -glabel D_8013BC5C - .asciz "../z_horse.c" - .balign 4 - -glabel D_8013BC6C - .asciz "player->ride.actor != NULL" - .balign 4 - -glabel D_8013BC88 - .asciz "../z_horse.c" - .balign 4 - -glabel D_8013BC98 - .asciz "player->ride.actor != NULL" - .balign 4 - -glabel D_8013BCB4 - .asciz "../z_horse.c" - .balign 4 - -glabel D_8013BCC4 - .asciz "player->ride.actor != NULL" - .balign 4 - -glabel D_8013BCE0 - .asciz "../z_horse.c" - .balign 4 - -.late_rodata -glabel D_8013BD38 - .float -2084.0 - -.text -glabel func_8006D684 -/* AE4824 8006D684 3C098016 */ lui $t1, %hi(gSaveContext) # $t1, 0x8016 -/* AE4828 8006D688 2529E660 */ addiu $t1, %lo(gSaveContext) # addiu $t1, $t1, -0x19a0 -/* AE482C 8006D68C 8D220000 */ lw $v0, ($t1) -/* AE4830 8006D690 27BDFF78 */ addiu $sp, $sp, -0x88 -/* AE4834 8006D694 AFB10030 */ sw $s1, 0x30($sp) -/* AE4838 8006D698 AFB0002C */ sw $s0, 0x2c($sp) -/* AE483C 8006D69C 2406028A */ li $a2, 650 -/* AE4840 8006D6A0 00A08025 */ move $s0, $a1 -/* AE4844 8006D6A4 00808825 */ move $s1, $a0 -/* AE4848 8006D6A8 10C20008 */ beq $a2, $v0, .L8006D6CC -/* AE484C 8006D6AC AFBF0034 */ sw $ra, 0x34($sp) -/* AE4850 8006D6B0 2401028E */ li $at, 654 -/* AE4854 8006D6B4 10410005 */ beq $v0, $at, .L8006D6CC -/* AE4858 8006D6B8 24010292 */ li $at, 658 -/* AE485C 8006D6BC 10410003 */ beq $v0, $at, .L8006D6CC -/* AE4860 8006D6C0 24010476 */ li $at, 1142 -/* AE4864 8006D6C4 54410062 */ bnel $v0, $at, .L8006D850 -/* AE4868 8006D6C8 862F00A4 */ lh $t7, 0xa4($s1) -.L8006D6CC: -/* AE486C 8006D6CC 8D2E1364 */ lw $t6, 0x1364($t1) -/* AE4870 8006D6D0 3C0F8012 */ lui $t7, %hi(D_8011F9A0) # $t7, 0x8012 -/* AE4874 8006D6D4 25EFF9A0 */ addiu $t7, %lo(D_8011F9A0) # addiu $t7, $t7, -0x660 -/* AE4878 8006D6D8 55C0005D */ bnezl $t6, .L8006D850 -/* AE487C 8006D6DC 862F00A4 */ lh $t7, 0xa4($s1) -/* AE4880 8006D6E0 8DF90000 */ lw $t9, ($t7) -/* AE4884 8006D6E4 27A30060 */ addiu $v1, $sp, 0x60 -/* AE4888 8006D6E8 AC790000 */ sw $t9, ($v1) -/* AE488C 8006D6EC 8DF80004 */ lw $t8, 4($t7) -/* AE4890 8006D6F0 AC780004 */ sw $t8, 4($v1) -/* AE4894 8006D6F4 8DF90008 */ lw $t9, 8($t7) -/* AE4898 8006D6F8 AC790008 */ sw $t9, 8($v1) -/* AE489C 8006D6FC 8DF8000C */ lw $t8, 0xc($t7) -/* AE48A0 8006D700 AC78000C */ sw $t8, 0xc($v1) -/* AE48A4 8006D704 8DF90010 */ lw $t9, 0x10($t7) -/* AE48A8 8006D708 AC790010 */ sw $t9, 0x10($v1) -/* AE48AC 8006D70C 8DF80014 */ lw $t8, 0x14($t7) -/* AE48B0 8006D710 14C20008 */ bne $a2, $v0, .L8006D734 -/* AE48B4 8006D714 AC780014 */ sw $t8, 0x14($v1) -/* AE48B8 8006D718 886C0000 */ lwl $t4, ($v1) -/* AE48BC 8006D71C 986C0003 */ lwr $t4, 3($v1) -/* AE48C0 8006D720 27AA0078 */ addiu $t2, $sp, 0x78 -/* AE48C4 8006D724 AD4C0000 */ sw $t4, ($t2) -/* AE48C8 8006D728 946C0004 */ lhu $t4, 4($v1) -/* AE48CC 8006D72C 1000001C */ b .L8006D7A0 -/* AE48D0 8006D730 A54C0004 */ sh $t4, 4($t2) -.L8006D734: -/* AE48D4 8006D734 2401028E */ li $at, 654 -/* AE48D8 8006D738 14410008 */ bne $v0, $at, .L8006D75C -/* AE48DC 8006D73C 27AE0066 */ addiu $t6, $sp, 0x66 -/* AE48E0 8006D740 89D80000 */ lwl $t8, ($t6) -/* AE48E4 8006D744 99D80003 */ lwr $t8, 3($t6) -/* AE48E8 8006D748 27AD0078 */ addiu $t5, $sp, 0x78 -/* AE48EC 8006D74C ADB80000 */ sw $t8, ($t5) -/* AE48F0 8006D750 95D80004 */ lhu $t8, 4($t6) -/* AE48F4 8006D754 10000012 */ b .L8006D7A0 -/* AE48F8 8006D758 A5B80004 */ sh $t8, 4($t5) -.L8006D75C: -/* AE48FC 8006D75C 24010292 */ li $at, 658 -/* AE4900 8006D760 14410009 */ bne $v0, $at, .L8006D788 -/* AE4904 8006D764 27AE0072 */ addiu $t6, $sp, 0x72 -/* AE4908 8006D768 27AA006C */ addiu $t2, $sp, 0x6c -/* AE490C 8006D76C 894C0000 */ lwl $t4, ($t2) -/* AE4910 8006D770 994C0003 */ lwr $t4, 3($t2) -/* AE4914 8006D774 27B90078 */ addiu $t9, $sp, 0x78 -/* AE4918 8006D778 AF2C0000 */ sw $t4, ($t9) -/* AE491C 8006D77C 954C0004 */ lhu $t4, 4($t2) -/* AE4920 8006D780 10000007 */ b .L8006D7A0 -/* AE4924 8006D784 A72C0004 */ sh $t4, 4($t9) -.L8006D788: -/* AE4928 8006D788 89D80000 */ lwl $t8, ($t6) -/* AE492C 8006D78C 99D80003 */ lwr $t8, 3($t6) -/* AE4930 8006D790 27AD0078 */ addiu $t5, $sp, 0x78 -/* AE4934 8006D794 ADB80000 */ sw $t8, ($t5) -/* AE4938 8006D798 95D80004 */ lhu $t8, 4($t6) -/* AE493C 8006D79C A5B80004 */ sh $t8, 4($t5) -.L8006D7A0: -/* AE4940 8006D7A0 87AA007A */ lh $t2, 0x7a($sp) -/* AE4944 8006D7A4 87AB007C */ lh $t3, 0x7c($sp) -/* AE4948 8006D7A8 87B90078 */ lh $t9, 0x78($sp) -/* AE494C 8006D7AC 448A3000 */ mtc1 $t2, $f6 -/* AE4950 8006D7B0 448B5000 */ mtc1 $t3, $f10 -/* AE4954 8006D7B4 44992000 */ mtc1 $t9, $f4 -/* AE4958 8006D7B8 46803220 */ cvt.s.w $f8, $f6 -/* AE495C 8006D7BC AFA00018 */ sw $zero, 0x18($sp) -/* AE4960 8006D7C0 240D0007 */ li $t5, 7 -/* AE4964 8006D7C4 26241C24 */ addiu $a0, $s1, 0x1c24 -/* AE4968 8006D7C8 02202825 */ move $a1, $s1 -/* AE496C 8006D7CC 46805420 */ cvt.s.w $f16, $f10 -/* AE4970 8006D7D0 E7A80010 */ swc1 $f8, 0x10($sp) -/* AE4974 8006D7D4 24060014 */ li $a2, 20 -/* AE4978 8006D7D8 46802120 */ cvt.s.w $f4, $f4 -/* AE497C 8006D7DC E7B00014 */ swc1 $f16, 0x14($sp) -/* AE4980 8006D7E0 860C0032 */ lh $t4, 0x32($s0) -/* AE4984 8006D7E4 AFAD0024 */ sw $t5, 0x24($sp) -/* AE4988 8006D7E8 AFA00020 */ sw $zero, 0x20($sp) -/* AE498C 8006D7EC AFAC001C */ sw $t4, 0x1c($sp) -/* AE4990 8006D7F0 44072000 */ mfc1 $a3, $f4 -/* AE4994 8006D7F4 0C00C7D4 */ jal Actor_Spawn -/* AE4998 8006D7F8 00000000 */ nop -/* AE499C 8006D7FC 14400007 */ bnez $v0, .L8006D81C -/* AE49A0 8006D800 AE020440 */ sw $v0, 0x440($s0) -/* AE49A4 8006D804 3C048014 */ lui $a0, %hi(D_8013BC40) # $a0, 0x8014 -/* AE49A8 8006D808 3C058014 */ lui $a1, %hi(D_8013BC5C) # $a1, 0x8014 -/* AE49AC 8006D80C 24A5BC5C */ addiu $a1, %lo(D_8013BC5C) # addiu $a1, $a1, -0x43a4 -/* AE49B0 8006D810 2484BC40 */ addiu $a0, %lo(D_8013BC40) # addiu $a0, $a0, -0x43c0 -/* AE49B4 8006D814 0C0007FC */ jal __assert -/* AE49B8 8006D818 24060231 */ li $a2, 561 -.L8006D81C: -/* AE49BC 8006D81C 02202025 */ move $a0, $s1 -/* AE49C0 8006D820 02002825 */ move $a1, $s0 -/* AE49C4 8006D824 0C00B7B3 */ jal func_8002DECC -/* AE49C8 8006D828 8E060440 */ lw $a2, 0x440($s0) -/* AE49CC 8006D82C 02202025 */ move $a0, $s1 -/* AE49D0 8006D830 0C00B79D */ jal func_8002DE74 -/* AE49D4 8006D834 02002825 */ move $a1, $s0 -/* AE49D8 8006D838 862E00A4 */ lh $t6, 0xa4($s1) -/* AE49DC 8006D83C 3C098016 */ lui $t1, %hi(gSaveContext) # $t1, 0x8016 -/* AE49E0 8006D840 2529E660 */ addiu $t1, %lo(gSaveContext) # addiu $t1, $t1, -0x19a0 -/* AE49E4 8006D844 10000103 */ b .L8006DC54 -/* AE49E8 8006D848 A52E1348 */ sh $t6, 0x1348($t1) -/* AE49EC 8006D84C 862F00A4 */ lh $t7, 0xa4($s1) -.L8006D850: -/* AE49F0 8006D850 24010063 */ li $at, 99 -/* AE49F4 8006D854 15E1003B */ bne $t7, $at, .L8006D944 -/* AE49F8 8006D858 00000000 */ nop -/* AE49FC 8006D85C 953813FA */ lhu $t8, 0x13fa($t1) -/* AE4A00 8006D860 24060006 */ li $a2, 6 -/* AE4A04 8006D864 3319000F */ andi $t9, $t8, 0xf -/* AE4A08 8006D868 14D90036 */ bne $a2, $t9, .L8006D944 -/* AE4A0C 8006D86C 00000000 */ nop -/* AE4A10 8006D870 0C00D6D3 */ jal Flags_GetEventChkInf -/* AE4A14 8006D874 24040018 */ li $a0, 24 -/* AE4A18 8006D878 3C098016 */ lui $t1, %hi(gSaveContext) # $t1, 0x8016 -/* AE4A1C 8006D87C 14400031 */ bnez $v0, .L8006D944 -/* AE4A20 8006D880 2529E660 */ addiu $t1, %lo(gSaveContext) # addiu $t1, $t1, -0x19a0 -/* AE4A24 8006D884 3C0A8016 */ lui $t2, %hi(gGameInfo) # $t2, 0x8016 -/* AE4A28 8006D888 8D4AFA90 */ lw $t2, %lo(gGameInfo)($t2) -/* AE4A2C 8006D88C 3C07445F */ lui $a3, (0x445F8000 >> 16) # lui $a3, 0x445f -/* AE4A30 8006D890 34E78000 */ ori $a3, (0x445F8000 & 0xFFFF) # ori $a3, $a3, 0x8000 -/* AE4A34 8006D894 854B0556 */ lh $t3, 0x556($t2) -/* AE4A38 8006D898 26241C24 */ addiu $a0, $s1, 0x1c24 -/* AE4A3C 8006D89C 02202825 */ move $a1, $s1 -/* AE4A40 8006D8A0 15600028 */ bnez $t3, .L8006D944 -/* AE4A44 8006D8A4 24060014 */ li $a2, 20 -/* AE4A48 8006D8A8 3C018014 */ lui $at, %hi(D_8013BD38) -/* AE4A4C 8006D8AC C424BD38 */ lwc1 $f4, %lo(D_8013BD38)($at) -/* AE4A50 8006D8B0 44809000 */ mtc1 $zero, $f18 -/* AE4A54 8006D8B4 240C8001 */ li $t4, -32767 -/* AE4A58 8006D8B8 240D0005 */ li $t5, 5 -/* AE4A5C 8006D8BC AFAD0024 */ sw $t5, 0x24($sp) -/* AE4A60 8006D8C0 AFAC001C */ sw $t4, 0x1c($sp) -/* AE4A64 8006D8C4 AFA00018 */ sw $zero, 0x18($sp) -/* AE4A68 8006D8C8 AFA00020 */ sw $zero, 0x20($sp) -/* AE4A6C 8006D8CC E7A40014 */ swc1 $f4, 0x14($sp) -/* AE4A70 8006D8D0 0C00C7D4 */ jal Actor_Spawn -/* AE4A74 8006D8D4 E7B20010 */ swc1 $f18, 0x10($sp) -/* AE4A78 8006D8D8 14400007 */ bnez $v0, .L8006D8F8 -/* AE4A7C 8006D8DC AE020440 */ sw $v0, 0x440($s0) -/* AE4A80 8006D8E0 3C048014 */ lui $a0, %hi(D_8013BC6C) # $a0, 0x8014 -/* AE4A84 8006D8E4 3C058014 */ lui $a1, %hi(D_8013BC88) # $a1, 0x8014 -/* AE4A88 8006D8E8 24A5BC88 */ addiu $a1, %lo(D_8013BC88) # addiu $a1, $a1, -0x4378 -/* AE4A8C 8006D8EC 2484BC6C */ addiu $a0, %lo(D_8013BC6C) # addiu $a0, $a0, -0x4394 -/* AE4A90 8006D8F0 0C0007FC */ jal __assert -/* AE4A94 8006D8F4 24060246 */ li $a2, 582 -.L8006D8F8: -/* AE4A98 8006D8F8 02202025 */ move $a0, $s1 -/* AE4A9C 8006D8FC 02002825 */ move $a1, $s0 -/* AE4AA0 8006D900 0C00B7B3 */ jal func_8002DECC -/* AE4AA4 8006D904 8E060440 */ lw $a2, 0x440($s0) -/* AE4AA8 8006D908 02202025 */ move $a0, $s1 -/* AE4AAC 8006D90C 0C00B79D */ jal func_8002DE74 -/* AE4AB0 8006D910 02002825 */ move $a1, $s0 -/* AE4AB4 8006D914 862E00A4 */ lh $t6, 0xa4($s1) -/* AE4AB8 8006D918 3C098016 */ lui $t1, %hi(gSaveContext) # $t1, 0x8016 -/* AE4ABC 8006D91C 2529E660 */ addiu $t1, %lo(gSaveContext) # addiu $t1, $t1, -0x19a0 -/* AE4AC0 8006D920 A52E1348 */ sh $t6, 0x1348($t1) -/* AE4AC4 8006D924 862F00A4 */ lh $t7, 0xa4($s1) -/* AE4AC8 8006D928 2401005D */ li $at, 93 -/* AE4ACC 8006D92C 55E100CA */ bnel $t7, $at, .L8006DC58 -/* AE4AD0 8006D930 8FBF0034 */ lw $ra, 0x34($sp) -/* AE4AD4 8006D934 8E190440 */ lw $t9, 0x440($s0) -/* AE4AD8 8006D938 2418FFFF */ li $t8, -1 -/* AE4ADC 8006D93C 100000C5 */ b .L8006DC54 -/* AE4AE0 8006D940 A3380003 */ sb $t8, 3($t9) -.L8006D944: -/* AE4AE4 8006D944 3C088012 */ lui $t0, %hi(D_8011F9B8) # $t0, 0x8012 -/* AE4AE8 8006D948 3C048012 */ lui $a0, %hi(D_8011F9B8+0xa0) # $a0, 0x8012 -/* AE4AEC 8006D94C 24060006 */ li $a2, 6 -/* AE4AF0 8006D950 2484FA58 */ addiu $a0, %lo(D_8011F9B8+0xa0) # addiu $a0, $a0, -0x5a8 -/* AE4AF4 8006D954 2508F9B8 */ addiu $t0, %lo(D_8011F9B8) # addiu $t0, $t0, -0x648 -/* AE4AF8 8006D958 862500A4 */ lh $a1, 0xa4($s1) -/* AE4AFC 8006D95C 850A0000 */ lh $t2, ($t0) -.L8006D960: -/* AE4B00 8006D960 54AA00BA */ bnel $a1, $t2, .L8006DC4C -/* AE4B04 8006D964 25080014 */ addiu $t0, $t0, 0x14 -/* AE4B08 8006D968 8D230008 */ lw $v1, 8($t1) -/* AE4B0C 8006D96C 8D0B0004 */ lw $t3, 4($t0) -/* AE4B10 8006D970 546B00B6 */ bnel $v1, $t3, .L8006DC4C -/* AE4B14 8006D974 25080014 */ addiu $t0, $t0, 0x14 -/* AE4B18 8006D978 85020010 */ lh $v0, 0x10($t0) -/* AE4B1C 8006D97C 24010007 */ li $at, 7 -/* AE4B20 8006D980 1441003C */ bne $v0, $at, .L8006DA74 -/* AE4B24 8006D984 24010063 */ li $at, 99 -/* AE4B28 8006D988 14A10013 */ bne $a1, $at, .L8006D9D8 -/* AE4B2C 8006D98C 3401FFF1 */ li $at, 65521 -/* AE4B30 8006D990 54610012 */ bnel $v1, $at, .L8006D9DC -/* AE4B34 8006D994 850B000A */ lh $t3, 0xa($t0) -/* AE4B38 8006D998 C6060024 */ lwc1 $f6, 0x24($s0) -/* AE4B3C 8006D99C 85020010 */ lh $v0, 0x10($t0) -/* AE4B40 8006D9A0 4600320D */ trunc.w.s $f8, $f6 -/* AE4B44 8006D9A4 440D4000 */ mfc1 $t5, $f8 -/* AE4B48 8006D9A8 00000000 */ nop -/* AE4B4C 8006D9AC A50D0008 */ sh $t5, 8($t0) -/* AE4B50 8006D9B0 C60A0028 */ lwc1 $f10, 0x28($s0) -/* AE4B54 8006D9B4 4600540D */ trunc.w.s $f16, $f10 -/* AE4B58 8006D9B8 440F8000 */ mfc1 $t7, $f16 -/* AE4B5C 8006D9BC 00000000 */ nop -/* AE4B60 8006D9C0 A50F000A */ sh $t7, 0xa($t0) -/* AE4B64 8006D9C4 C612002C */ lwc1 $f18, 0x2c($s0) -/* AE4B68 8006D9C8 4600910D */ trunc.w.s $f4, $f18 -/* AE4B6C 8006D9CC 44192000 */ mfc1 $t9, $f4 -/* AE4B70 8006D9D0 00000000 */ nop -/* AE4B74 8006D9D4 A519000C */ sh $t9, 0xc($t0) -.L8006D9D8: -/* AE4B78 8006D9D8 850B000A */ lh $t3, 0xa($t0) -.L8006D9DC: -/* AE4B7C 8006D9DC 850C000C */ lh $t4, 0xc($t0) -/* AE4B80 8006D9E0 850A0008 */ lh $t2, 8($t0) -/* AE4B84 8006D9E4 448B4000 */ mtc1 $t3, $f8 -/* AE4B88 8006D9E8 448C8000 */ mtc1 $t4, $f16 -/* AE4B8C 8006D9EC 448A3000 */ mtc1 $t2, $f6 -/* AE4B90 8006D9F0 468042A0 */ cvt.s.w $f10, $f8 -/* AE4B94 8006D9F4 AFA00018 */ sw $zero, 0x18($sp) -/* AE4B98 8006D9F8 26241C24 */ addiu $a0, $s1, 0x1c24 -/* AE4B9C 8006D9FC 02202825 */ move $a1, $s1 -/* AE4BA0 8006DA00 24060014 */ li $a2, 20 -/* AE4BA4 8006DA04 468084A0 */ cvt.s.w $f18, $f16 -/* AE4BA8 8006DA08 E7AA0010 */ swc1 $f10, 0x10($sp) -/* AE4BAC 8006DA0C 468031A0 */ cvt.s.w $f6, $f6 -/* AE4BB0 8006DA10 E7B20014 */ swc1 $f18, 0x14($sp) -/* AE4BB4 8006DA14 860D0032 */ lh $t5, 0x32($s0) -/* AE4BB8 8006DA18 AFA20024 */ sw $v0, 0x24($sp) -/* AE4BBC 8006DA1C AFA00020 */ sw $zero, 0x20($sp) -/* AE4BC0 8006DA20 AFAD001C */ sw $t5, 0x1c($sp) -/* AE4BC4 8006DA24 44073000 */ mfc1 $a3, $f6 -/* AE4BC8 8006DA28 0C00C7D4 */ jal Actor_Spawn -/* AE4BCC 8006DA2C 00000000 */ nop -/* AE4BD0 8006DA30 14400007 */ bnez $v0, .L8006DA50 -/* AE4BD4 8006DA34 AE020440 */ sw $v0, 0x440($s0) -/* AE4BD8 8006DA38 3C048014 */ lui $a0, %hi(D_8013BC98) # $a0, 0x8014 -/* AE4BDC 8006DA3C 3C058014 */ lui $a1, %hi(D_8013BCB4) # $a1, 0x8014 -/* AE4BE0 8006DA40 24A5BCB4 */ addiu $a1, %lo(D_8013BCB4) # addiu $a1, $a1, -0x434c -/* AE4BE4 8006DA44 2484BC98 */ addiu $a0, %lo(D_8013BC98) # addiu $a0, $a0, -0x4368 -/* AE4BE8 8006DA48 0C0007FC */ jal __assert -/* AE4BEC 8006DA4C 24060274 */ li $a2, 628 -.L8006DA50: -/* AE4BF0 8006DA50 02202025 */ move $a0, $s1 -/* AE4BF4 8006DA54 02002825 */ move $a1, $s0 -/* AE4BF8 8006DA58 0C00B7B3 */ jal func_8002DECC -/* AE4BFC 8006DA5C 8E060440 */ lw $a2, 0x440($s0) -/* AE4C00 8006DA60 02202025 */ move $a0, $s1 -/* AE4C04 8006DA64 0C00B79D */ jal func_8002DE74 -/* AE4C08 8006DA68 02002825 */ move $a1, $s0 -/* AE4C0C 8006DA6C 1000007A */ b .L8006DC58 -/* AE4C10 8006DA70 8FBF0034 */ lw $ra, 0x34($sp) -.L8006DA74: -/* AE4C14 8006DA74 24010005 */ li $at, 5 -/* AE4C18 8006DA78 50410006 */ beql $v0, $at, .L8006DA94 -/* AE4C1C 8006DA7C 952E13FA */ lhu $t6, 0x13fa($t1) -/* AE4C20 8006DA80 10C20003 */ beq $a2, $v0, .L8006DA90 -/* AE4C24 8006DA84 24010008 */ li $at, 8 -/* AE4C28 8006DA88 54410059 */ bnel $v0, $at, .L8006DBF0 -/* AE4C2C 8006DA8C 850B0008 */ lh $t3, 8($t0) -.L8006DA90: -/* AE4C30 8006DA90 952E13FA */ lhu $t6, 0x13fa($t1) -.L8006DA94: -/* AE4C34 8006DA94 00001825 */ move $v1, $zero -/* AE4C38 8006DA98 31CF0010 */ andi $t7, $t6, 0x10 -/* AE4C3C 8006DA9C 000FC103 */ sra $t8, $t7, 4 -/* AE4C40 8006DAA0 53000005 */ beql $t8, $zero, .L8006DAB8 -/* AE4C44 8006DAA4 85190008 */ lh $t9, 8($t0) -/* AE4C48 8006DAA8 54C20003 */ bnel $a2, $v0, .L8006DAB8 -/* AE4C4C 8006DAAC 85190008 */ lh $t9, 8($t0) -/* AE4C50 8006DAB0 34038000 */ li $v1, 32768 -/* AE4C54 8006DAB4 85190008 */ lh $t9, 8($t0) -.L8006DAB8: -/* AE4C58 8006DAB8 850A000A */ lh $t2, 0xa($t0) -/* AE4C5C 8006DABC 850B000C */ lh $t3, 0xc($t0) -/* AE4C60 8006DAC0 44992000 */ mtc1 $t9, $f4 -/* AE4C64 8006DAC4 448A3000 */ mtc1 $t2, $f6 -/* AE4C68 8006DAC8 448B5000 */ mtc1 $t3, $f10 -/* AE4C6C 8006DACC 46802120 */ cvt.s.w $f4, $f4 -/* AE4C70 8006DAD0 850C000E */ lh $t4, 0xe($t0) -/* AE4C74 8006DAD4 00436825 */ or $t5, $v0, $v1 -/* AE4C78 8006DAD8 AFAD0024 */ sw $t5, 0x24($sp) -/* AE4C7C 8006DADC 26241C24 */ addiu $a0, $s1, 0x1c24 -/* AE4C80 8006DAE0 46803220 */ cvt.s.w $f8, $f6 -/* AE4C84 8006DAE4 44072000 */ mfc1 $a3, $f4 -/* AE4C88 8006DAE8 02202825 */ move $a1, $s1 -/* AE4C8C 8006DAEC 24060014 */ li $a2, 20 -/* AE4C90 8006DAF0 AFA00018 */ sw $zero, 0x18($sp) -/* AE4C94 8006DAF4 46805420 */ cvt.s.w $f16, $f10 -/* AE4C98 8006DAF8 E7A80010 */ swc1 $f8, 0x10($sp) -/* AE4C9C 8006DAFC AFA00020 */ sw $zero, 0x20($sp) -/* AE4CA0 8006DB00 AFA80044 */ sw $t0, 0x44($sp) -/* AE4CA4 8006DB04 AFAC001C */ sw $t4, 0x1c($sp) -/* AE4CA8 8006DB08 0C00C7D4 */ jal Actor_Spawn -/* AE4CAC 8006DB0C E7B00014 */ swc1 $f16, 0x14($sp) -/* AE4CB0 8006DB10 8FA80044 */ lw $t0, 0x44($sp) -/* AE4CB4 8006DB14 14400009 */ bnez $v0, .L8006DB3C -/* AE4CB8 8006DB18 AE020440 */ sw $v0, 0x440($s0) -/* AE4CBC 8006DB1C 3C048014 */ lui $a0, %hi(D_8013BCC4) # $a0, 0x8014 -/* AE4CC0 8006DB20 3C058014 */ lui $a1, %hi(D_8013BCE0) # $a1, 0x8014 -/* AE4CC4 8006DB24 24A5BCE0 */ addiu $a1, %lo(D_8013BCE0) # addiu $a1, $a1, -0x4320 -/* AE4CC8 8006DB28 2484BCC4 */ addiu $a0, %lo(D_8013BCC4) # addiu $a0, $a0, -0x433c -/* AE4CCC 8006DB2C 2406029B */ li $a2, 667 -/* AE4CD0 8006DB30 0C0007FC */ jal __assert -/* AE4CD4 8006DB34 AFA80044 */ sw $t0, 0x44($sp) -/* AE4CD8 8006DB38 8FA80044 */ lw $t0, 0x44($sp) -.L8006DB3C: -/* AE4CDC 8006DB3C 850E0008 */ lh $t6, 8($t0) -/* AE4CE0 8006DB40 02202025 */ move $a0, $s1 -/* AE4CE4 8006DB44 02002825 */ move $a1, $s0 -/* AE4CE8 8006DB48 448E9000 */ mtc1 $t6, $f18 -/* AE4CEC 8006DB4C 8E060440 */ lw $a2, 0x440($s0) -/* AE4CF0 8006DB50 46809120 */ cvt.s.w $f4, $f18 -/* AE4CF4 8006DB54 E6040024 */ swc1 $f4, 0x24($s0) -/* AE4CF8 8006DB58 850F000A */ lh $t7, 0xa($t0) -/* AE4CFC 8006DB5C 448F3000 */ mtc1 $t7, $f6 -/* AE4D00 8006DB60 00000000 */ nop -/* AE4D04 8006DB64 46803220 */ cvt.s.w $f8, $f6 -/* AE4D08 8006DB68 E6080028 */ swc1 $f8, 0x28($s0) -/* AE4D0C 8006DB6C 8518000C */ lh $t8, 0xc($t0) -/* AE4D10 8006DB70 A60000B8 */ sh $zero, 0xb8($s0) -/* AE4D14 8006DB74 861900B8 */ lh $t9, 0xb8($s0) -/* AE4D18 8006DB78 44985000 */ mtc1 $t8, $f10 -/* AE4D1C 8006DB7C A61900B4 */ sh $t9, 0xb4($s0) -/* AE4D20 8006DB80 46805420 */ cvt.s.w $f16, $f10 -/* AE4D24 8006DB84 E610002C */ swc1 $f16, 0x2c($s0) -/* AE4D28 8006DB88 850A000E */ lh $t2, 0xe($t0) -/* AE4D2C 8006DB8C 0C00B7B3 */ jal func_8002DECC -/* AE4D30 8006DB90 A60A00B6 */ sh $t2, 0xb6($s0) -/* AE4D34 8006DB94 02202025 */ move $a0, $s1 -/* AE4D38 8006DB98 0C00B79D */ jal func_8002DE74 -/* AE4D3C 8006DB9C 02002825 */ move $a1, $s0 -/* AE4D40 8006DBA0 3C014348 */ li $at, 0x43480000 # 0.000000 -/* AE4D44 8006DBA4 44812000 */ mtc1 $at, $f4 -/* AE4D48 8006DBA8 C6120024 */ lwc1 $f18, 0x24($s0) -/* AE4D4C 8006DBAC 3C0142C8 */ li $at, 0x42C80000 # 0.000000 -/* AE4D50 8006DBB0 44815000 */ mtc1 $at, $f10 -/* AE4D54 8006DBB4 46049181 */ sub.s $f6, $f18, $f4 -/* AE4D58 8006DBB8 02202025 */ move $a0, $s1 -/* AE4D5C 8006DBBC 26060024 */ addiu $a2, $s0, 0x24 -/* AE4D60 8006DBC0 27A70054 */ addiu $a3, $sp, 0x54 -/* AE4D64 8006DBC4 E7A60054 */ swc1 $f6, 0x54($sp) -/* AE4D68 8006DBC8 C6080028 */ lwc1 $f8, 0x28($s0) -/* AE4D6C 8006DBCC 460A4400 */ add.s $f16, $f8, $f10 -/* AE4D70 8006DBD0 E7B00058 */ swc1 $f16, 0x58($sp) -/* AE4D74 8006DBD4 C612002C */ lwc1 $f18, 0x2c($s0) -/* AE4D78 8006DBD8 E7B2005C */ swc1 $f18, 0x5c($sp) -/* AE4D7C 8006DBDC 0C030136 */ jal func_800C04D8 -/* AE4D80 8006DBE0 862507A0 */ lh $a1, 0x7a0($s1) -/* AE4D84 8006DBE4 1000001C */ b .L8006DC58 -/* AE4D88 8006DBE8 8FBF0034 */ lw $ra, 0x34($sp) -/* AE4D8C 8006DBEC 850B0008 */ lh $t3, 8($t0) -.L8006DBF0: -/* AE4D90 8006DBF0 850C000A */ lh $t4, 0xa($t0) -/* AE4D94 8006DBF4 850D000C */ lh $t5, 0xc($t0) -/* AE4D98 8006DBF8 448B2000 */ mtc1 $t3, $f4 -/* AE4D9C 8006DBFC 448C3000 */ mtc1 $t4, $f6 -/* AE4DA0 8006DC00 448D5000 */ mtc1 $t5, $f10 -/* AE4DA4 8006DC04 46802120 */ cvt.s.w $f4, $f4 -/* AE4DA8 8006DC08 850E000E */ lh $t6, 0xe($t0) -/* AE4DAC 8006DC0C 26241C24 */ addiu $a0, $s1, 0x1c24 -/* AE4DB0 8006DC10 02202825 */ move $a1, $s1 -/* AE4DB4 8006DC14 24060014 */ li $a2, 20 -/* AE4DB8 8006DC18 46803220 */ cvt.s.w $f8, $f6 -/* AE4DBC 8006DC1C 44072000 */ mfc1 $a3, $f4 -/* AE4DC0 8006DC20 AFA00018 */ sw $zero, 0x18($sp) -/* AE4DC4 8006DC24 AFA00020 */ sw $zero, 0x20($sp) -/* AE4DC8 8006DC28 AFA20024 */ sw $v0, 0x24($sp) -/* AE4DCC 8006DC2C 46805420 */ cvt.s.w $f16, $f10 -/* AE4DD0 8006DC30 E7A80010 */ swc1 $f8, 0x10($sp) -/* AE4DD4 8006DC34 AFAE001C */ sw $t6, 0x1c($sp) -/* AE4DD8 8006DC38 0C00C7D4 */ jal Actor_Spawn -/* AE4DDC 8006DC3C E7B00014 */ swc1 $f16, 0x14($sp) -/* AE4DE0 8006DC40 10000005 */ b .L8006DC58 -/* AE4DE4 8006DC44 8FBF0034 */ lw $ra, 0x34($sp) -/* AE4DE8 8006DC48 25080014 */ addiu $t0, $t0, 0x14 -.L8006DC4C: -/* AE4DEC 8006DC4C 5504FF44 */ bnel $t0, $a0, .L8006D960 -/* AE4DF0 8006DC50 850A0000 */ lh $t2, ($t0) -.L8006DC54: -/* AE4DF4 8006DC54 8FBF0034 */ lw $ra, 0x34($sp) -.L8006DC58: -/* AE4DF8 8006DC58 8FB0002C */ lw $s0, 0x2c($sp) -/* AE4DFC 8006DC5C 8FB10030 */ lw $s1, 0x30($sp) -/* AE4E00 8006DC60 03E00008 */ jr $ra -/* AE4E04 8006DC64 27BD0088 */ addiu $sp, $sp, 0x88 - diff --git a/asm/non_matchings/code/z_map_exp/Minimap_DrawCompassIcons.s b/asm/non_matchings/code/z_map_exp/Minimap_DrawCompassIcons.s deleted file mode 100644 index 86391db6bd..0000000000 --- a/asm/non_matchings/code/z_map_exp/Minimap_DrawCompassIcons.s +++ /dev/null @@ -1,333 +0,0 @@ -.rdata -glabel D_8013D918 - .asciz "../z_map_exp.c" - .balign 4 - -glabel D_8013D928 - .asciz "../z_map_exp.c" - .balign 4 - -glabel D_8013D938 - .asciz "../z_map_exp.c" - .balign 4 - -glabel D_8013D948 - .asciz "../z_map_exp.c" - .balign 4 - -.late_rodata -glabel D_8013DC0C - .float 0.4 - -glabel D_8013DC10 - .float -1.6 - -.text -glabel Minimap_DrawCompassIcons -/* AF83E0 80081240 27BDFF90 */ addiu $sp, $sp, -0x70 -/* AF83E4 80081244 AFBF001C */ sw $ra, 0x1c($sp) -/* AF83E8 80081248 AFB00018 */ sw $s0, 0x18($sp) -/* AF83EC 8008124C AFA40070 */ sw $a0, 0x70($sp) -/* AF83F0 80081250 8C8F1C44 */ lw $t7, 0x1c44($a0) -/* AF83F4 80081254 3C068014 */ lui $a2, %hi(D_8013D918) # $a2, 0x8014 -/* AF83F8 80081258 24C6D918 */ addiu $a2, %lo(D_8013D918) # addiu $a2, $a2, -0x26e8 -/* AF83FC 8008125C AFAF0068 */ sw $t7, 0x68($sp) -/* AF8400 80081260 8C850000 */ lw $a1, ($a0) -/* AF8404 80081264 27A40050 */ addiu $a0, $sp, 0x50 -/* AF8408 80081268 24070235 */ li $a3, 565 -/* AF840C 8008126C 0C031AB1 */ jal Graph_OpenDisps -/* AF8410 80081270 00A08025 */ move $s0, $a1 -/* AF8414 80081274 8FA20070 */ lw $v0, 0x70($sp) -/* AF8418 80081278 3C180001 */ lui $t8, 1 -/* AF841C 8008127C 0302C021 */ addu $t8, $t8, $v0 -/* AF8420 80081280 97180744 */ lhu $t8, 0x744($t8) -/* AF8424 80081284 2B0100AA */ slti $at, $t8, 0xaa -/* AF8428 80081288 1420010A */ bnez $at, .L800816B4 -/* AF842C 8008128C 00000000 */ nop -/* AF8430 80081290 0C025285 */ jal func_80094A14 -/* AF8434 80081294 8C440000 */ lw $a0, ($v0) -/* AF8438 80081298 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF843C 8008129C 3C08DA38 */ lui $t0, (0xDA380003 >> 16) # lui $t0, 0xda38 -/* AF8440 800812A0 3C098013 */ lui $t1, %hi(gMtxClear) # $t1, 0x8013 -/* AF8444 800812A4 24590008 */ addiu $t9, $v0, 8 -/* AF8448 800812A8 AE1902B0 */ sw $t9, 0x2b0($s0) -/* AF844C 800812AC 2529DB20 */ addiu $t1, %lo(gMtxClear) # addiu $t1, $t1, -0x24e0 -/* AF8450 800812B0 35080003 */ ori $t0, (0xDA380003 & 0xFFFF) # ori $t0, $t0, 3 -/* AF8454 800812B4 AC480000 */ sw $t0, ($v0) -/* AF8458 800812B8 AC490004 */ sw $t1, 4($v0) -/* AF845C 800812BC 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8460 800812C0 3C0BFC30 */ lui $t3, (0xFC309661 >> 16) # lui $t3, 0xfc30 -/* AF8464 800812C4 3C0C552E */ lui $t4, (0x552EFF7F >> 16) # lui $t4, 0x552e -/* AF8468 800812C8 244A0008 */ addiu $t2, $v0, 8 -/* AF846C 800812CC AE0A02B0 */ sw $t2, 0x2b0($s0) -/* AF8470 800812D0 358CFF7F */ ori $t4, (0x552EFF7F & 0xFFFF) # ori $t4, $t4, 0xff7f -/* AF8474 800812D4 356B9661 */ ori $t3, (0xFC309661 & 0xFFFF) # ori $t3, $t3, 0x9661 -/* AF8478 800812D8 AC4B0000 */ sw $t3, ($v0) -/* AF847C 800812DC AC4C0004 */ sw $t4, 4($v0) -/* AF8480 800812E0 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8484 800812E4 3C0FFB00 */ lui $t7, 0xfb00 -/* AF8488 800812E8 240E00FF */ li $t6, 255 -/* AF848C 800812EC 244D0008 */ addiu $t5, $v0, 8 -/* AF8490 800812F0 AE0D02B0 */ sw $t5, 0x2b0($s0) -/* AF8494 800812F4 AC4E0004 */ sw $t6, 4($v0) -/* AF8498 800812F8 AC4F0000 */ sw $t7, ($v0) -/* AF849C 800812FC 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF84A0 80081300 3C08FFFD */ lui $t0, (0xFFFDF6FB >> 16) # lui $t0, 0xfffd -/* AF84A4 80081304 3C19FCFF */ lui $t9, (0xFCFFFFFF >> 16) # lui $t9, 0xfcff -/* AF84A8 80081308 24580008 */ addiu $t8, $v0, 8 -/* AF84AC 8008130C AE1802B0 */ sw $t8, 0x2b0($s0) -/* AF84B0 80081310 3739FFFF */ ori $t9, (0xFCFFFFFF & 0xFFFF) # ori $t9, $t9, 0xffff -/* AF84B4 80081314 3508F6FB */ ori $t0, (0xFFFDF6FB & 0xFFFF) # ori $t0, $t0, 0xf6fb -/* AF84B8 80081318 AC480004 */ sw $t0, 4($v0) -/* AF84BC 8008131C AC590000 */ sw $t9, ($v0) -/* AF84C0 80081320 8FA50068 */ lw $a1, 0x68($sp) -/* AF84C4 80081324 3C038016 */ lui $v1, %hi(gGameInfo) # $v1, 0x8016 -/* AF84C8 80081328 8C63FA90 */ lw $v1, %lo(gGameInfo)($v1) -/* AF84CC 8008132C C4A40024 */ lwc1 $f4, 0x24($a1) -/* AF84D0 80081330 C4A8002C */ lwc1 $f8, 0x2c($a1) -/* AF84D4 80081334 846B0F30 */ lh $t3, 0xf30($v1) -/* AF84D8 80081338 4600218D */ trunc.w.s $f6, $f4 -/* AF84DC 8008133C 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AF84E0 80081340 44810000 */ mtc1 $at, $f0 -/* AF84E4 80081344 4600428D */ trunc.w.s $f10, $f8 -/* AF84E8 80081348 44023000 */ mfc1 $v0, $f6 -/* AF84EC 8008134C 846C0F32 */ lh $t4, 0xf32($v1) -/* AF84F0 80081350 846D0F34 */ lh $t5, 0xf34($v1) -/* AF84F4 80081354 00021400 */ sll $v0, $v0, 0x10 -/* AF84F8 80081358 00021403 */ sra $v0, $v0, 0x10 -/* AF84FC 8008135C 004B001A */ div $zero, $v0, $t3 -/* AF8500 80081360 44045000 */ mfc1 $a0, $f10 -/* AF8504 80081364 846E0F36 */ lh $t6, 0xf36($v1) -/* AF8508 80081368 24060000 */ li $a2, 0 -/* AF850C 8008136C 00042400 */ sll $a0, $a0, 0x10 -/* AF8510 80081370 00042403 */ sra $a0, $a0, 0x10 -/* AF8514 80081374 15600002 */ bnez $t3, .L80081380 -/* AF8518 80081378 00000000 */ nop -/* AF851C 8008137C 0007000D */ break 7 -.L80081380: -/* AF8520 80081380 2401FFFF */ li $at, -1 -/* AF8524 80081384 15610004 */ bne $t3, $at, .L80081398 -/* AF8528 80081388 3C018000 */ lui $at, 0x8000 -/* AF852C 8008138C 14410002 */ bne $v0, $at, .L80081398 -/* AF8530 80081390 00000000 */ nop -/* AF8534 80081394 0006000D */ break 6 -.L80081398: -/* AF8538 80081398 00001012 */ mflo $v0 -/* AF853C 8008139C 00021400 */ sll $v0, $v0, 0x10 -/* AF8540 800813A0 00021403 */ sra $v0, $v0, 0x10 -/* AF8544 800813A4 008C001A */ div $zero, $a0, $t4 -/* AF8548 800813A8 15800002 */ bnez $t4, .L800813B4 -/* AF854C 800813AC 00000000 */ nop -/* AF8550 800813B0 0007000D */ break 7 -.L800813B4: -/* AF8554 800813B4 2401FFFF */ li $at, -1 -/* AF8558 800813B8 15810004 */ bne $t4, $at, .L800813CC -/* AF855C 800813BC 3C018000 */ li $at, 0x80000000 # 0.000000 -/* AF8560 800813C0 14810002 */ bne $a0, $at, .L800813CC -/* AF8564 800813C4 00000000 */ nop -/* AF8568 800813C8 0006000D */ break 6 -.L800813CC: -/* AF856C 800813CC 00002012 */ mflo $a0 -/* AF8570 800813D0 00042400 */ sll $a0, $a0, 0x10 -/* AF8574 800813D4 00042403 */ sra $a0, $a0, 0x10 -/* AF8578 800813D8 01A27821 */ addu $t7, $t5, $v0 -/* AF857C 800813DC 01C4C023 */ subu $t8, $t6, $a0 -/* AF8580 800813E0 44982000 */ mtc1 $t8, $f4 -/* AF8584 800813E4 448F8000 */ mtc1 $t7, $f16 -/* AF8588 800813E8 00003825 */ move $a3, $zero -/* AF858C 800813EC 468021A0 */ cvt.s.w $f6, $f4 -/* AF8590 800813F0 468084A0 */ cvt.s.w $f18, $f16 -/* AF8594 800813F4 46003383 */ div.s $f14, $f6, $f0 -/* AF8598 800813F8 0C034261 */ jal Matrix_Translate -/* AF859C 800813FC 46009303 */ div.s $f12, $f18, $f0 -/* AF85A0 80081400 3C018014 */ lui $at, %hi(D_8013DC0C) -/* AF85A4 80081404 C42CDC0C */ lwc1 $f12, %lo(D_8013DC0C)($at) -/* AF85A8 80081408 24070001 */ li $a3, 1 -/* AF85AC 8008140C 44066000 */ mfc1 $a2, $f12 -/* AF85B0 80081410 0C0342A3 */ jal Matrix_Scale -/* AF85B4 80081414 46006386 */ mov.s $f14, $f12 -/* AF85B8 80081418 3C018014 */ lui $at, %hi(D_8013DC10) -/* AF85BC 8008141C C42CDC10 */ lwc1 $f12, %lo(D_8013DC10)($at) -/* AF85C0 80081420 0C0342DC */ jal Matrix_RotateX -/* AF85C4 80081424 24050001 */ li $a1, 1 -/* AF85C8 80081428 8FB90068 */ lw $t9, 0x68($sp) -/* AF85CC 8008142C 24097FFF */ li $t1, 32767 -/* AF85D0 80081430 24050001 */ li $a1, 1 -/* AF85D4 80081434 872800B6 */ lh $t0, 0xb6($t9) -/* AF85D8 80081438 01281023 */ subu $v0, $t1, $t0 -/* AF85DC 8008143C 04410002 */ bgez $v0, .L80081448 -/* AF85E0 80081440 00400821 */ addu $at, $v0, $zero -/* AF85E4 80081444 244103FF */ addiu $at, $v0, 0x3ff -.L80081448: -/* AF85E8 80081448 00011283 */ sra $v0, $at, 0xa -/* AF85EC 8008144C 00021400 */ sll $v0, $v0, 0x10 -/* AF85F0 80081450 00021403 */ sra $v0, $v0, 0x10 -/* AF85F4 80081454 44824000 */ mtc1 $v0, $f8 -/* AF85F8 80081458 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AF85FC 8008145C 44818000 */ mtc1 $at, $f16 -/* AF8600 80081460 468042A0 */ cvt.s.w $f10, $f8 -/* AF8604 80081464 0C034348 */ jal Matrix_RotateY -/* AF8608 80081468 46105303 */ div.s $f12, $f10, $f16 -/* AF860C 8008146C 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8610 80081470 3C0BDA38 */ lui $t3, (0xDA380003 >> 16) # lui $t3, 0xda38 -/* AF8614 80081474 356B0003 */ ori $t3, (0xDA380003 & 0xFFFF) # ori $t3, $t3, 3 -/* AF8618 80081478 244A0008 */ addiu $t2, $v0, 8 -/* AF861C 8008147C AE0A02B0 */ sw $t2, 0x2b0($s0) -/* AF8620 80081480 AC4B0000 */ sw $t3, ($v0) -/* AF8624 80081484 8FAC0070 */ lw $t4, 0x70($sp) -/* AF8628 80081488 3C058014 */ lui $a1, %hi(D_8013D928) # $a1, 0x8014 -/* AF862C 8008148C 24A5D928 */ addiu $a1, %lo(D_8013D928) # addiu $a1, $a1, -0x26d8 -/* AF8630 80081490 8D840000 */ lw $a0, ($t4) -/* AF8634 80081494 24060249 */ li $a2, 585 -/* AF8638 80081498 0C0346A2 */ jal Matrix_NewMtx -/* AF863C 8008149C AFA2003C */ sw $v0, 0x3c($sp) -/* AF8640 800814A0 8FA3003C */ lw $v1, 0x3c($sp) -/* AF8644 800814A4 3C0EC8FF */ lui $t6, (0xC8FF00FF >> 16) # lui $t6, 0xc8ff -/* AF8648 800814A8 35CE00FF */ ori $t6, (0xC8FF00FF & 0xFFFF) # ori $t6, $t6, 0xff -/* AF864C 800814AC AC620004 */ sw $v0, 4($v1) -/* AF8650 800814B0 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8654 800814B4 3C0FFA00 */ lui $t7, 0xfa00 -/* AF8658 800814B8 3C050401 */ lui $a1, %hi(D_0400C820) # $a1, 0x401 -/* AF865C 800814BC 244D0008 */ addiu $t5, $v0, 8 -/* AF8660 800814C0 AE0D02B0 */ sw $t5, 0x2b0($s0) -/* AF8664 800814C4 AC4E0004 */ sw $t6, 4($v0) -/* AF8668 800814C8 AC4F0000 */ sw $t7, ($v0) -/* AF866C 800814CC 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8670 800814D0 24A5C820 */ addiu $a1, %lo(D_0400C820) # addiu $a1, $a1, -0x37e0 -/* AF8674 800814D4 3C19DE00 */ lui $t9, 0xde00 -/* AF8678 800814D8 24580008 */ addiu $t8, $v0, 8 -/* AF867C 800814DC AE1802B0 */ sw $t8, 0x2b0($s0) -/* AF8680 800814E0 AC450004 */ sw $a1, 4($v0) -/* AF8684 800814E4 AC590000 */ sw $t9, ($v0) -/* AF8688 800814E8 3C028012 */ lui $v0, %hi(sPlayerInitialPosX) # $v0, 0x8012 -/* AF868C 800814EC 84423A50 */ lh $v0, %lo(sPlayerInitialPosX)($v0) -/* AF8690 800814F0 3C038016 */ lui $v1, %hi(gGameInfo) # $v1, 0x8016 -/* AF8694 800814F4 8C63FA90 */ lw $v1, %lo(gGameInfo)($v1) -/* AF8698 800814F8 3C048012 */ lui $a0, %hi(sPlayerInitialPosZ) # $a0, 0x8012 -/* AF869C 800814FC 84843A54 */ lh $a0, %lo(sPlayerInitialPosZ)($a0) -/* AF86A0 80081500 84690F30 */ lh $t1, 0xf30($v1) -/* AF86A4 80081504 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AF86A8 80081508 44810000 */ mtc1 $at, $f0 -/* AF86AC 8008150C 0049001A */ div $zero, $v0, $t1 -/* AF86B0 80081510 15200002 */ bnez $t1, .L8008151C -/* AF86B4 80081514 00000000 */ nop -/* AF86B8 80081518 0007000D */ break 7 -.L8008151C: -/* AF86BC 8008151C 2401FFFF */ li $at, -1 -/* AF86C0 80081520 15210004 */ bne $t1, $at, .L80081534 -/* AF86C4 80081524 3C018000 */ lui $at, 0x8000 -/* AF86C8 80081528 14410002 */ bne $v0, $at, .L80081534 -/* AF86CC 8008152C 00000000 */ nop -/* AF86D0 80081530 0006000D */ break 6 -.L80081534: -/* AF86D4 80081534 84680F32 */ lh $t0, 0xf32($v1) -/* AF86D8 80081538 00001012 */ mflo $v0 -/* AF86DC 8008153C 846A0F34 */ lh $t2, 0xf34($v1) -/* AF86E0 80081540 846C0F36 */ lh $t4, 0xf36($v1) -/* AF86E4 80081544 0088001A */ div $zero, $a0, $t0 -/* AF86E8 80081548 00021400 */ sll $v0, $v0, 0x10 -/* AF86EC 8008154C 00021403 */ sra $v0, $v0, 0x10 -/* AF86F0 80081550 15000002 */ bnez $t0, .L8008155C -/* AF86F4 80081554 00000000 */ nop -/* AF86F8 80081558 0007000D */ break 7 -.L8008155C: -/* AF86FC 8008155C 2401FFFF */ li $at, -1 -/* AF8700 80081560 15010004 */ bne $t0, $at, .L80081574 -/* AF8704 80081564 3C018000 */ li $at, 0x80000000 # 0.000000 -/* AF8708 80081568 14810002 */ bne $a0, $at, .L80081574 -/* AF870C 8008156C 00000000 */ nop -/* AF8710 80081570 0006000D */ break 6 -.L80081574: -/* AF8714 80081574 00002012 */ mflo $a0 -/* AF8718 80081578 00042400 */ sll $a0, $a0, 0x10 -/* AF871C 8008157C 00042403 */ sra $a0, $a0, 0x10 -/* AF8720 80081580 01425821 */ addu $t3, $t2, $v0 -/* AF8724 80081584 01846823 */ subu $t5, $t4, $a0 -/* AF8728 80081588 448D3000 */ mtc1 $t5, $f6 -/* AF872C 8008158C 448B9000 */ mtc1 $t3, $f18 -/* AF8730 80081590 AFA50024 */ sw $a1, 0x24($sp) -/* AF8734 80081594 46803220 */ cvt.s.w $f8, $f6 -/* AF8738 80081598 24060000 */ li $a2, 0 -/* AF873C 8008159C 00003825 */ move $a3, $zero -/* AF8740 800815A0 46809120 */ cvt.s.w $f4, $f18 -/* AF8744 800815A4 46004383 */ div.s $f14, $f8, $f0 -/* AF8748 800815A8 0C034261 */ jal Matrix_Translate -/* AF874C 800815AC 46002303 */ div.s $f12, $f4, $f0 -/* AF8750 800815B0 3C0F8016 */ lui $t7, %hi(gGameInfo) # $t7, 0x8016 -/* AF8754 800815B4 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7) -/* AF8758 800815B8 3C0142C8 */ li $at, 0x42C80000 # 0.000000 -/* AF875C 800815BC 44819000 */ mtc1 $at, $f18 -/* AF8760 800815C0 85EE0F26 */ lh $t6, 0xf26($t7) -/* AF8764 800815C4 24070001 */ li $a3, 1 -/* AF8768 800815C8 448E5000 */ mtc1 $t6, $f10 -/* AF876C 800815CC 00000000 */ nop -/* AF8770 800815D0 46805420 */ cvt.s.w $f16, $f10 -/* AF8774 800815D4 46128303 */ div.s $f12, $f16, $f18 -/* AF8778 800815D8 44066000 */ mfc1 $a2, $f12 -/* AF877C 800815DC 0C0342A3 */ jal Matrix_Scale -/* AF8780 800815E0 46006386 */ mov.s $f14, $f12 -/* AF8784 800815E4 3C188016 */ lui $t8, %hi(gGameInfo) # $t8, 0x8016 -/* AF8788 800815E8 8F18FA90 */ lw $t8, %lo(gGameInfo)($t8) -/* AF878C 800815EC 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AF8790 800815F0 44814000 */ mtc1 $at, $f8 -/* AF8794 800815F4 87190F7C */ lh $t9, 0xf7c($t8) -/* AF8798 800815F8 24050001 */ li $a1, 1 -/* AF879C 800815FC 44992000 */ mtc1 $t9, $f4 -/* AF87A0 80081600 00000000 */ nop -/* AF87A4 80081604 468021A0 */ cvt.s.w $f6, $f4 -/* AF87A8 80081608 0C0342DC */ jal Matrix_RotateX -/* AF87AC 8008160C 46083303 */ div.s $f12, $f6, $f8 -/* AF87B0 80081610 3C098012 */ lui $t1, %hi(sPlayerInitialDirection) # $t1, 0x8012 -/* AF87B4 80081614 85293A58 */ lh $t1, %lo(sPlayerInitialDirection)($t1) -/* AF87B8 80081618 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AF87BC 8008161C 44819000 */ mtc1 $at, $f18 -/* AF87C0 80081620 44895000 */ mtc1 $t1, $f10 -/* AF87C4 80081624 24050001 */ li $a1, 1 -/* AF87C8 80081628 46805420 */ cvt.s.w $f16, $f10 -/* AF87CC 8008162C 0C034348 */ jal Matrix_RotateY -/* AF87D0 80081630 46128303 */ div.s $f12, $f16, $f18 -/* AF87D4 80081634 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF87D8 80081638 3C0ADA38 */ lui $t2, (0xDA380003 >> 16) # lui $t2, 0xda38 -/* AF87DC 8008163C 354A0003 */ ori $t2, (0xDA380003 & 0xFFFF) # ori $t2, $t2, 3 -/* AF87E0 80081640 24480008 */ addiu $t0, $v0, 8 -/* AF87E4 80081644 AE0802B0 */ sw $t0, 0x2b0($s0) -/* AF87E8 80081648 AC4A0000 */ sw $t2, ($v0) -/* AF87EC 8008164C 8FAB0070 */ lw $t3, 0x70($sp) -/* AF87F0 80081650 3C058014 */ lui $a1, %hi(D_8013D938) # $a1, 0x8014 -/* AF87F4 80081654 24A5D938 */ addiu $a1, %lo(D_8013D938) # addiu $a1, $a1, -0x26c8 -/* AF87F8 80081658 8D640000 */ lw $a0, ($t3) -/* AF87FC 8008165C 2406025B */ li $a2, 603 -/* AF8800 80081660 0C0346A2 */ jal Matrix_NewMtx -/* AF8804 80081664 AFA20030 */ sw $v0, 0x30($sp) -/* AF8808 80081668 8FA30030 */ lw $v1, 0x30($sp) -/* AF880C 8008166C 3C0DFA00 */ lui $t5, (0xFA0000FF >> 16) # lui $t5, 0xfa00 -/* AF8810 80081670 3C0FC800 */ lui $t7, (0xC80000FF >> 16) # lui $t7, 0xc800 -/* AF8814 80081674 AC620004 */ sw $v0, 4($v1) -/* AF8818 80081678 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF881C 8008167C 35EF00FF */ ori $t7, (0xC80000FF & 0xFFFF) # ori $t7, $t7, 0xff -/* AF8820 80081680 35AD00FF */ ori $t5, (0xFA0000FF & 0xFFFF) # ori $t5, $t5, 0xff -/* AF8824 80081684 244C0008 */ addiu $t4, $v0, 8 -/* AF8828 80081688 AE0C02B0 */ sw $t4, 0x2b0($s0) -/* AF882C 8008168C AC4F0004 */ sw $t7, 4($v0) -/* AF8830 80081690 AC4D0000 */ sw $t5, ($v0) -/* AF8834 80081694 8E0202B0 */ lw $v0, 0x2b0($s0) -/* AF8838 80081698 3C18DE00 */ lui $t8, 0xde00 -/* AF883C 8008169C 244E0008 */ addiu $t6, $v0, 8 -/* AF8840 800816A0 AE0E02B0 */ sw $t6, 0x2b0($s0) -/* AF8844 800816A4 AC580000 */ sw $t8, ($v0) -/* AF8848 800816A8 8FB90024 */ lw $t9, 0x24($sp) -/* AF884C 800816AC AC590004 */ sw $t9, 4($v0) -/* AF8850 800816B0 8FA20070 */ lw $v0, 0x70($sp) -.L800816B4: -/* AF8854 800816B4 3C068014 */ lui $a2, %hi(D_8013D948) # $a2, 0x8014 -/* AF8858 800816B8 24C6D948 */ addiu $a2, %lo(D_8013D948) # addiu $a2, $a2, -0x26b8 -/* AF885C 800816BC 27A40050 */ addiu $a0, $sp, 0x50 -/* AF8860 800816C0 8C450000 */ lw $a1, ($v0) -/* AF8864 800816C4 0C031AD5 */ jal Graph_CloseDisps -/* AF8868 800816C8 2407025F */ li $a3, 607 -/* AF886C 800816CC 8FBF001C */ lw $ra, 0x1c($sp) -/* AF8870 800816D0 8FB00018 */ lw $s0, 0x18($sp) -/* AF8874 800816D4 27BD0070 */ addiu $sp, $sp, 0x70 -/* AF8878 800816D8 03E00008 */ jr $ra -/* AF887C 800816DC 00000000 */ nop - diff --git a/asm/non_matchings/code/z_parameter/Interface_LoadActionLabel.s b/asm/non_matchings/code/z_parameter/Interface_LoadActionLabel.s deleted file mode 100644 index 83a39c665c..0000000000 --- a/asm/non_matchings/code/z_parameter/Interface_LoadActionLabel.s +++ /dev/null @@ -1,105 +0,0 @@ -.rdata -glabel D_8013E1A0 - .asciz "../z_parameter.c" - .balign 4 - -.text -glabel Interface_LoadActionLabel -/* AFDF30 80086D90 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* AFDF34 80086D94 30A2FFFF */ andi $v0, $a1, 0xffff -/* AFDF38 80086D98 AFB00030 */ sw $s0, 0x30($sp) -/* AFDF3C 80086D9C 2841001D */ slti $at, $v0, 0x1d -/* AFDF40 80086DA0 00808025 */ move $s0, $a0 -/* AFDF44 80086DA4 AFBF0034 */ sw $ra, 0x34($sp) -/* AFDF48 80086DA8 AFA50044 */ sw $a1, 0x44($sp) -/* AFDF4C 80086DAC 14200002 */ bnez $at, .L80086DB8 -/* AFDF50 80086DB0 AFA60048 */ sw $a2, 0x48($sp) -/* AFDF54 80086DB4 2402000A */ li $v0, 10 -.L80086DB8: -/* AFDF58 80086DB8 3C038016 */ lui $v1, %hi(gSaveContext+0x1409) # $v1, 0x8016 -/* AFDF5C 80086DBC 9063FA69 */ lbu $v1, %lo(gSaveContext+0x1409)($v1) -/* AFDF60 80086DC0 2445001D */ addiu $a1, $v0, 0x1d -/* AFDF64 80086DC4 24010002 */ li $at, 2 -/* AFDF68 80086DC8 10600002 */ beqz $v1, .L80086DD4 -/* AFDF6C 80086DCC 00000000 */ nop -/* AFDF70 80086DD0 30A2FFFF */ andi $v0, $a1, 0xffff -.L80086DD4: -/* AFDF74 80086DD4 14610002 */ bne $v1, $at, .L80086DE0 -/* AFDF78 80086DD8 2445001D */ addiu $a1, $v0, 0x1d -/* AFDF7C 80086DDC 30A2FFFF */ andi $v0, $a1, 0xffff -.L80086DE0: -/* AFDF80 80086DE0 2401000A */ li $at, 10 -/* AFDF84 80086DE4 1041002A */ beq $v0, $at, .L80086E90 -/* AFDF88 80086DE8 3C038016 */ lui $v1, %hi(gSegments) # $v1, 0x8016 -/* AFDF8C 80086DEC 24010027 */ li $at, 39 -/* AFDF90 80086DF0 10410027 */ beq $v0, $at, .L80086E90 -/* AFDF94 80086DF4 24010044 */ li $at, 68 -/* AFDF98 80086DF8 10410025 */ beq $v0, $at, .L80086E90 -/* AFDF9C 80086DFC 260401C0 */ addiu $a0, $s0, 0x1c0 -/* AFDFA0 80086E00 260501D8 */ addiu $a1, $s0, 0x1d8 -/* AFDFA4 80086E04 24060001 */ li $a2, 1 -/* AFDFA8 80086E08 AFA2003C */ sw $v0, 0x3c($sp) -/* AFDFAC 80086E0C 0C001874 */ jal osCreateMesgQueue -/* AFDFB0 80086E10 AFA40038 */ sw $a0, 0x38($sp) -/* AFDFB4 80086E14 87AF004A */ lh $t7, 0x4a($sp) -/* AFDFB8 80086E18 24030180 */ li $v1, 384 -/* AFDFBC 80086E1C 8FA2003C */ lw $v0, 0x3c($sp) -/* AFDFC0 80086E20 01E30019 */ multu $t7, $v1 -/* AFDFC4 80086E24 8E0E0134 */ lw $t6, 0x134($s0) -/* AFDFC8 80086E28 8FA90038 */ lw $t1, 0x38($sp) -/* AFDFCC 80086E2C 3C08008B */ lui $t0, %hi(_do_action_staticSegmentRomStart) # $t0, 0x8b -/* AFDFD0 80086E30 3C0A8014 */ lui $t2, %hi(D_8013E1A0) # $t2, 0x8014 -/* AFDFD4 80086E34 254AE1A0 */ addiu $t2, %lo(D_8013E1A0) # addiu $t2, $t2, -0x1e60 -/* AFDFD8 80086E38 25081000 */ addiu $t0, %lo(_do_action_staticSegmentRomStart) # addiu $t0, $t0, 0x1000 -/* AFDFDC 80086E3C 240B0861 */ li $t3, 2145 -/* AFDFE0 80086E40 AFAB0020 */ sw $t3, 0x20($sp) -/* AFDFE4 80086E44 AFAA001C */ sw $t2, 0x1c($sp) -/* AFDFE8 80086E48 0000C012 */ mflo $t8 -/* AFDFEC 80086E4C AFA00018 */ sw $zero, 0x18($sp) -/* AFDFF0 80086E50 AFA00010 */ sw $zero, 0x10($sp) -/* AFDFF4 80086E54 00430019 */ multu $v0, $v1 -/* AFDFF8 80086E58 26040160 */ addiu $a0, $s0, 0x160 -/* AFDFFC 80086E5C 24070180 */ li $a3, 384 -/* AFE000 80086E60 01D82821 */ addu $a1, $t6, $t8 -/* AFE004 80086E64 AFA90014 */ sw $t1, 0x14($sp) -/* AFE008 80086E68 0000C812 */ mflo $t9 -/* AFE00C 80086E6C 03283021 */ addu $a2, $t9, $t0 -/* AFE010 80086E70 0C000697 */ jal DmaMgr_SendRequest2 -/* AFE014 80086E74 00000000 */ nop -/* AFE018 80086E78 8FA40038 */ lw $a0, 0x38($sp) -/* AFE01C 80086E7C 00002825 */ move $a1, $zero -/* AFE020 80086E80 0C000CA0 */ jal osRecvMesg -/* AFE024 80086E84 24060001 */ li $a2, 1 -/* AFE028 80086E88 10000019 */ b .L80086EF0 -/* AFE02C 80086E8C 8FBF0034 */ lw $ra, 0x34($sp) -.L80086E90: -/* AFE030 80086E90 8E0C0134 */ lw $t4, 0x134($s0) -/* AFE034 80086E94 87AF004A */ lh $t7, 0x4a($sp) -/* AFE038 80086E98 3C018000 */ lui $at, 0x8000 -/* AFE03C 80086E9C 24636FA8 */ addiu $v1, %lo(gSegments) # addiu $v1, $v1, 0x6fa8 -/* AFE040 80086EA0 3C028012 */ lui $v0, %hi(sDoActionTextures) -/* AFE044 80086EA4 01816821 */ addu $t5, $t4, $at -/* AFE048 80086EA8 000F7080 */ sll $t6, $t7, 2 -/* AFE04C 80086EAC AC6D001C */ sw $t5, 0x1c($v1) -/* AFE050 80086EB0 004E1021 */ addu $v0, $v0, $t6 -/* AFE054 80086EB4 8C425AA8 */ lw $v0, %lo(sDoActionTextures)($v0) -/* AFE058 80086EB8 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* AFE05C 80086EBC 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* AFE060 80086EC0 0002C900 */ sll $t9, $v0, 4 -/* AFE064 80086EC4 00194702 */ srl $t0, $t9, 0x1c -/* AFE068 80086EC8 00084880 */ sll $t1, $t0, 2 -/* AFE06C 80086ECC 00695021 */ addu $t2, $v1, $t1 -/* AFE070 80086ED0 8D4B0000 */ lw $t3, ($t2) -/* AFE074 80086ED4 0041C024 */ and $t8, $v0, $at -/* AFE078 80086ED8 3C018000 */ lui $at, 0x8000 -/* AFE07C 80086EDC 030B2021 */ addu $a0, $t8, $t3 -/* AFE080 80086EE0 00812021 */ addu $a0, $a0, $at -/* AFE084 80086EE4 0C021B57 */ jal func_80086D5C -/* AFE088 80086EE8 24050060 */ li $a1, 96 -/* AFE08C 80086EEC 8FBF0034 */ lw $ra, 0x34($sp) -.L80086EF0: -/* AFE090 80086EF0 8FB00030 */ lw $s0, 0x30($sp) -/* AFE094 80086EF4 27BD0040 */ addiu $sp, $sp, 0x40 -/* AFE098 80086EF8 03E00008 */ jr $ra -/* AFE09C 80086EFC 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Bowl_Wall/func_8086F260.s b/asm/non_matchings/overlays/actors/ovl_Bg_Bowl_Wall/func_8086F260.s index 9c3110d898..150b9126bf 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Bowl_Wall/func_8086F260.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Bowl_Wall/func_8086F260.s @@ -74,7 +74,7 @@ glabel func_8086F260 /* 001EC 8086F34C 860C001C */ lh $t4, 0x001C($s0) ## 0000001C /* 001F0 8086F350 AFA30048 */ sw $v1, 0x0048($sp) /* 001F4 8086F354 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 001F8 8086F358 0C00C916 */ jal Actor_SpawnAttached +/* 001F8 8086F358 0C00C916 */ jal Actor_SpawnAsChild /* 001FC 8086F35C AFAC0028 */ sw $t4, 0x0028($sp) /* 00200 8086F360 10400032 */ beq $v0, $zero, .L8086F42C diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80873868.s b/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80873868.s index 8a973a45ad..21cee26d05 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80873868.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80873868.s @@ -123,7 +123,7 @@ glabel func_80873868 /* 011E0 80873A10 AFA0001C */ sw $zero, 0x001C($sp) /* 011E4 80873A14 AFA00020 */ sw $zero, 0x0020($sp) /* 011E8 80873A18 AFA00024 */ sw $zero, 0x0024($sp) -/* 011EC 80873A1C 0C00C916 */ jal Actor_SpawnAttached +/* 011EC 80873A1C 0C00C916 */ jal Actor_SpawnAsChild /* 011F0 80873A20 AFA20028 */ sw $v0, 0x0028($sp) /* 011F4 80873A24 AE020340 */ sw $v0, 0x0340($s0) ## 00000340 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80874304.s b/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80874304.s index a90e0bb565..90055c0a83 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80874304.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Dy_Yoseizo/func_80874304.s @@ -287,7 +287,7 @@ glabel func_80874304 /* 01ED4 80874704 02203025 */ or $a2, $s1, $zero ## $a2 = 00000000 /* 01ED8 80874708 24070168 */ addiu $a3, $zero, 0x0168 ## $a3 = 00000168 /* 01EDC 8087470C E7A00018 */ swc1 $f0, 0x0018($sp) -/* 01EE0 80874710 0C00C916 */ jal Actor_SpawnAttached +/* 01EE0 80874710 0C00C916 */ jal Actor_SpawnAsChild /* 01EE4 80874714 AFAA0028 */ sw $t2, 0x0028($sp) /* 01EE8 80874718 87A30056 */ lh $v1, 0x0056($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Init.s index 0bfae02e21..93775b9d3a 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Init.s @@ -75,7 +75,7 @@ glabel BgHakaShip_Init /* 00108 8087F208 AFA00024 */ sw $zero, 0x0024($sp) /* 0010C 8087F20C AFA00020 */ sw $zero, 0x0020($sp) /* 00110 8087F210 AFA0001C */ sw $zero, 0x001C($sp) -/* 00114 8087F214 0C00C916 */ jal Actor_SpawnAttached +/* 00114 8087F214 0C00C916 */ jal Actor_SpawnAsChild /* 00118 8087F218 E7A40018 */ swc1 $f4, 0x0018($sp) /* 0011C 8087F21C 54400004 */ bnel $v0, $zero, .L8087F230 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Hamstep/func_8088805C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Hamstep/func_8088805C.s index e2180b42e1..5598090911 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Hamstep/func_8088805C.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Hamstep/func_8088805C.s @@ -75,7 +75,7 @@ glabel func_8088805C /* 00134 80888174 AFAC0020 */ sw $t4, 0x0020($sp) /* 00138 80888178 860D0034 */ lh $t5, 0x0034($s0) ## 00000034 /* 0013C 8088817C AFA30028 */ sw $v1, 0x0028($sp) -/* 00140 80888180 0C00C916 */ jal Actor_SpawnAttached +/* 00140 80888180 0C00C916 */ jal Actor_SpawnAsChild /* 00144 80888184 AFAD0024 */ sw $t5, 0x0024($sp) /* 00148 80888188 14400003 */ bne $v0, $zero, .L80888198 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/BgHidanKowarerukabe_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/BgHidanKowarerukabe_Update.s index 15dc9757c3..df533a13e0 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/BgHidanKowarerukabe_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/BgHidanKowarerukabe_Update.s @@ -8,7 +8,7 @@ glabel BgHidanKowarerukabe_Update /* 00C24 8088AC44 26260164 */ addiu $a2, $s1, 0x0164 ## $a2 = 00000164 /* 00C28 8088AC48 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00C2C 8088AC4C 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000164 -/* 00C30 8088AC50 0C00CD90 */ jal func_80033640 +/* 00C30 8088AC50 0C00CD90 */ jal Actor_GetCollidedExplosive /* 00C34 8088AC54 AFA60024 */ sw $a2, 0x0024($sp) /* 00C38 8088AC58 1040001E */ beq $v0, $zero, .L8088ACD4 /* 00C3C 8088AC5C 8FA60024 */ lw $a2, 0x0024($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Bigmirror/func_80893750.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Bigmirror/func_80893750.s index 7ccd0af7fe..d2f625a891 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Bigmirror/func_80893750.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Bigmirror/func_80893750.s @@ -97,7 +97,7 @@ glabel func_80893750 /* 00190 80893870 AFA00024 */ sw $zero, 0x0024($sp) /* 00194 80893874 AFAB0020 */ sw $t3, 0x0020($sp) /* 00198 80893878 864C000C */ lh $t4, 0x000C($s2) ## 80893F00 -/* 0019C 8089387C 0C00C916 */ jal Actor_SpawnAttached +/* 0019C 8089387C 0C00C916 */ jal Actor_SpawnAsChild /* 001A0 80893880 AFAC0028 */ sw $t4, 0x0028($sp) /* 001A4 80893884 AE220000 */ sw $v0, 0x0000($s1) ## 0000014C diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808959C4.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808959C4.s index 73d77d4757..2b1d80e558 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808959C4.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Cobra/func_808959C4.s @@ -38,7 +38,7 @@ glabel func_808959C4 /* 0011C 80895A0C AFA00024 */ sw $zero, 0x0024($sp) /* 00120 80895A10 AFA00020 */ sw $zero, 0x0020($sp) /* 00124 80895A14 AFA0001C */ sw $zero, 0x001C($sp) -/* 00128 80895A18 0C00C916 */ jal Actor_SpawnAttached +/* 00128 80895A18 0C00C916 */ jal Actor_SpawnAsChild /* 0012C 80895A1C E7B00018 */ swc1 $f16, 0x0018($sp) /* 00130 80895A20 8FA50038 */ lw $a1, 0x0038($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Destroy.s deleted file mode 100644 index 5a9178170c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Destroy.s +++ /dev/null @@ -1,20 +0,0 @@ -glabel BgJyaMegami_Destroy -/* 00474 8089A5A4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00478 8089A5A8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0047C 8089A5AC 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00480 8089A5B0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00484 8089A5B4 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 00488 8089A5B8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0048C 8089A5BC 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 00490 8089A5C0 AFA7001C */ sw $a3, 0x001C($sp) -/* 00494 8089A5C4 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00498 8089A5C8 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 0049C 8089A5CC 8FA50018 */ lw $a1, 0x0018($sp) -/* 004A0 8089A5D0 8FA4001C */ lw $a0, 0x001C($sp) -/* 004A4 8089A5D4 0C016F32 */ jal Collider_DestroyJntSph -/* 004A8 8089A5D8 24A50168 */ addiu $a1, $a1, 0x0168 ## $a1 = 00000168 -/* 004AC 8089A5DC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 004B0 8089A5E0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 004B4 8089A5E4 03E00008 */ jr $ra -/* 004B8 8089A5E8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Draw.s deleted file mode 100644 index 676f356685..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Draw.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel BgJyaMegami_Draw -/* 00E24 8089AF54 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00E28 8089AF58 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00E2C 8089AF5C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00E30 8089AF60 AFA5001C */ sw $a1, 0x001C($sp) -/* 00E34 8089AF64 24C50168 */ addiu $a1, $a2, 0x0168 ## $a1 = 00000168 -/* 00E38 8089AF68 AFA60018 */ sw $a2, 0x0018($sp) -/* 00E3C 8089AF6C 0C018A29 */ jal func_800628A4 -/* 00E40 8089AF70 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000 -/* 00E44 8089AF74 8FA60018 */ lw $a2, 0x0018($sp) -/* 00E48 8089AF78 3C0E808A */ lui $t6, %hi(func_8089A820) ## $t6 = 808A0000 -/* 00E4C 8089AF7C 25CEA820 */ addiu $t6, $t6, %lo(func_8089A820) ## $t6 = 8089A820 -/* 00E50 8089AF80 8CCF0164 */ lw $t7, 0x0164($a2) ## 00000164 -/* 00E54 8089AF84 8FA5001C */ lw $a1, 0x001C($sp) -/* 00E58 8089AF88 15CF0005 */ bne $t6, $t7, .L8089AFA0 -/* 00E5C 8089AF8C 00000000 */ nop -/* 00E60 8089AF90 0C226B52 */ jal func_8089AD48 -/* 00E64 8089AF94 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00E68 8089AF98 10000004 */ beq $zero, $zero, .L8089AFAC -/* 00E6C 8089AF9C 8FBF0014 */ lw $ra, 0x0014($sp) -.L8089AFA0: -/* 00E70 8089AFA0 0C226AF2 */ jal func_8089ABC8 -/* 00E74 8089AFA4 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00E78 8089AFA8 8FBF0014 */ lw $ra, 0x0014($sp) -.L8089AFAC: -/* 00E7C 8089AFAC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00E80 8089AFB0 03E00008 */ jr $ra -/* 00E84 8089AFB4 00000000 */ nop -/* 00E88 8089AFB8 00000000 */ nop -/* 00E8C 8089AFBC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Init.s deleted file mode 100644 index 5f6da5b302..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Init.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel BgJyaMegami_Init -/* 003E8 8089A518 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 003EC 8089A51C AFBF001C */ sw $ra, 0x001C($sp) -/* 003F0 8089A520 AFB00018 */ sw $s0, 0x0018($sp) -/* 003F4 8089A524 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000 -/* 003F8 8089A528 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003FC 8089A52C AFA50024 */ sw $a1, 0x0024($sp) -/* 00400 8089A530 24C65C4C */ addiu $a2, $a2, 0x5C4C ## $a2 = 06005C4C -/* 00404 8089A534 0C22684C */ jal func_8089A130 -/* 00408 8089A538 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 0040C 8089A53C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00410 8089A540 0C226862 */ jal func_8089A188 -/* 00414 8089A544 8FA50024 */ lw $a1, 0x0024($sp) -/* 00418 8089A548 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 0041C 8089A54C 8FA40024 */ lw $a0, 0x0024($sp) -/* 00420 8089A550 0C00B2D0 */ jal Flags_GetSwitch - -/* 00424 8089A554 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00428 8089A558 10400005 */ beq $v0, $zero, .L8089A570 -/* 0042C 8089A55C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00430 8089A560 0C00B55C */ jal Actor_Kill - -/* 00434 8089A564 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00438 8089A568 1000000A */ beq $zero, $zero, .L8089A594 -/* 0043C 8089A56C 8FBF001C */ lw $ra, 0x001C($sp) -.L8089A570: -/* 00440 8089A570 3C05808A */ lui $a1, %hi(D_8089B190) ## $a1 = 808A0000 -/* 00444 8089A574 0C01E037 */ jal Actor_ProcessInitChain - -/* 00448 8089A578 24A5B190 */ addiu $a1, $a1, %lo(D_8089B190) ## $a1 = 8089B190 -/* 0044C 8089A57C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00450 8089A580 0C00B56E */ jal Actor_SetHeight - -/* 00454 8089A584 3C05C248 */ lui $a1, 0xC248 ## $a1 = C2480000 -/* 00458 8089A588 0C22697B */ jal func_8089A5EC -/* 0045C 8089A58C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00460 8089A590 8FBF001C */ lw $ra, 0x001C($sp) -.L8089A594: -/* 00464 8089A594 8FB00018 */ lw $s0, 0x0018($sp) -/* 00468 8089A598 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 0046C 8089A59C 03E00008 */ jr $ra -/* 00470 8089A5A0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Update.s deleted file mode 100644 index 156ddaf009..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel BgJyaMegami_Update -/* 00A74 8089ABA4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00A78 8089ABA8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00A7C 8089ABAC 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 00A80 8089ABB0 0320F809 */ jalr $ra, $t9 -/* 00A84 8089ABB4 00000000 */ nop -/* 00A88 8089ABB8 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00A8C 8089ABBC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00A90 8089ABC0 03E00008 */ jr $ra -/* 00A94 8089ABC4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A130.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A130.s deleted file mode 100644 index acb4acde7f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A130.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_8089A130 -/* 00000 8089A130 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00004 8089A134 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00008 8089A138 AFA50024 */ sw $a1, 0x0024($sp) -/* 0000C 8089A13C AFA40020 */ sw $a0, 0x0020($sp) -/* 00010 8089A140 AFA60028 */ sw $a2, 0x0028($sp) -/* 00014 8089A144 AFA00018 */ sw $zero, 0x0018($sp) -/* 00018 8089A148 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 0001C 8089A14C 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 00020 8089A150 8FA40028 */ lw $a0, 0x0028($sp) -/* 00024 8089A154 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00028 8089A158 27A50018 */ addiu $a1, $sp, 0x0018 ## $a1 = FFFFFFF8 -/* 0002C 8089A15C 8FA40024 */ lw $a0, 0x0024($sp) -/* 00030 8089A160 8FA60020 */ lw $a2, 0x0020($sp) -/* 00034 8089A164 8FA70018 */ lw $a3, 0x0018($sp) -/* 00038 8089A168 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 0003C 8089A16C 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00040 8089A170 8FAE0020 */ lw $t6, 0x0020($sp) -/* 00044 8089A174 ADC2014C */ sw $v0, 0x014C($t6) ## 0000014C -/* 00048 8089A178 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0004C 8089A17C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00050 8089A180 03E00008 */ jr $ra -/* 00054 8089A184 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A188.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A188.s deleted file mode 100644 index a14c5ab973..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A188.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel func_8089A188 -/* 00058 8089A188 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 0005C 8089A18C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00060 8089A190 AFA5002C */ sw $a1, 0x002C($sp) -/* 00064 8089A194 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00068 8089A198 AFBF001C */ sw $ra, 0x001C($sp) -/* 0006C 8089A19C 24C50168 */ addiu $a1, $a2, 0x0168 ## $a1 = 00000168 -/* 00070 8089A1A0 AFA50020 */ sw $a1, 0x0020($sp) -/* 00074 8089A1A4 0C016EFE */ jal Collider_InitJntSph -/* 00078 8089A1A8 AFA60028 */ sw $a2, 0x0028($sp) -/* 0007C 8089A1AC 8FA60028 */ lw $a2, 0x0028($sp) -/* 00080 8089A1B0 3C07808A */ lui $a3, %hi(D_8089B004) ## $a3 = 808A0000 -/* 00084 8089A1B4 8FA50020 */ lw $a1, 0x0020($sp) -/* 00088 8089A1B8 24CE0188 */ addiu $t6, $a2, 0x0188 ## $t6 = 00000188 -/* 0008C 8089A1BC AFAE0010 */ sw $t6, 0x0010($sp) -/* 00090 8089A1C0 24E7B004 */ addiu $a3, $a3, %lo(D_8089B004) ## $a3 = 8089B004 -/* 00094 8089A1C4 0C017014 */ jal Collider_SetJntSph -/* 00098 8089A1C8 8FA4002C */ lw $a0, 0x002C($sp) -/* 0009C 8089A1CC 8FBF001C */ lw $ra, 0x001C($sp) -/* 000A0 8089A1D0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 000A4 8089A1D4 03E00008 */ jr $ra -/* 000A8 8089A1D8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A1DC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A1DC.s deleted file mode 100644 index 4de4c88b06..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A1DC.s +++ /dev/null @@ -1,161 +0,0 @@ -.late_rodata -glabel D_8089B2A0 - .word 0x3EE66666 -glabel D_8089B2A4 - .float 0.7 - -.text -glabel func_8089A1DC -/* 000AC 8089A1DC 27BDFF40 */ addiu $sp, $sp, 0xFF40 ## $sp = FFFFFF40 -/* 000B0 8089A1E0 AFB50084 */ sw $s5, 0x0084($sp) -/* 000B4 8089A1E4 AFB3007C */ sw $s3, 0x007C($sp) -/* 000B8 8089A1E8 AFB20078 */ sw $s2, 0x0078($sp) -/* 000BC 8089A1EC 00A09825 */ or $s3, $a1, $zero ## $s3 = 00000000 -/* 000C0 8089A1F0 0080A825 */ or $s5, $a0, $zero ## $s5 = 00000000 -/* 000C4 8089A1F4 AFBF0094 */ sw $ra, 0x0094($sp) -/* 000C8 8089A1F8 AFBE0090 */ sw $s8, 0x0090($sp) -/* 000CC 8089A1FC AFB7008C */ sw $s7, 0x008C($sp) -/* 000D0 8089A200 AFB60088 */ sw $s6, 0x0088($sp) -/* 000D4 8089A204 AFB40080 */ sw $s4, 0x0080($sp) -/* 000D8 8089A208 AFB10074 */ sw $s1, 0x0074($sp) -/* 000DC 8089A20C AFB00070 */ sw $s0, 0x0070($sp) -/* 000E0 8089A210 F7BC0068 */ sdc1 $f28, 0x0068($sp) -/* 000E4 8089A214 F7BA0060 */ sdc1 $f26, 0x0060($sp) -/* 000E8 8089A218 F7B80058 */ sdc1 $f24, 0x0058($sp) -/* 000EC 8089A21C F7B60050 */ sdc1 $f22, 0x0050($sp) -/* 000F0 8089A220 F7B40048 */ sdc1 $f20, 0x0048($sp) -/* 000F4 8089A224 AFA600C8 */ sw $a2, 0x00C8($sp) -/* 000F8 8089A228 AFA700CC */ sw $a3, 0x00CC($sp) -/* 000FC 8089A22C 18E0006A */ blez $a3, .L8089A3D8 -/* 00100 8089A230 00009025 */ or $s2, $zero, $zero ## $s2 = 00000000 -/* 00104 8089A234 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00108 8089A238 4481E000 */ mtc1 $at, $f28 ## $f28 = 60.00 -/* 0010C 8089A23C 3C0141C8 */ lui $at, 0x41C8 ## $at = 41C80000 -/* 00110 8089A240 4481D000 */ mtc1 $at, $f26 ## $f26 = 25.00 -/* 00114 8089A244 3C01808A */ lui $at, %hi(D_8089B2A0) ## $at = 808A0000 -/* 00118 8089A248 8FAF00D0 */ lw $t7, 0x00D0($sp) -/* 0011C 8089A24C C438B2A0 */ lwc1 $f24, %lo(D_8089B2A0)($at) -/* 00120 8089A250 3C01808A */ lui $at, %hi(D_8089B2A4) ## $at = 808A0000 -/* 00124 8089A254 C436B2A4 */ lwc1 $f22, %lo(D_8089B2A4)($at) -/* 00128 8089A258 3C19808A */ lui $t9, %hi(D_8089B17C) ## $t9 = 808A0000 -/* 0012C 8089A25C 2739B17C */ addiu $t9, $t9, %lo(D_8089B17C) ## $t9 = 8089B17C -/* 00130 8089A260 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 00134 8089A264 000FC040 */ sll $t8, $t7, 1 -/* 00138 8089A268 03194021 */ addu $t0, $t8, $t9 -/* 0013C 8089A26C 3C1E808A */ lui $s8, %hi(D_8089B15C) ## $s8 = 808A0000 -/* 00140 8089A270 3C17808A */ lui $s7, %hi(D_8089B14C) ## $s7 = 808A0000 -/* 00144 8089A274 3C16808A */ lui $s6, %hi(D_8089B16C) ## $s6 = 808A0000 -/* 00148 8089A278 4481A000 */ mtc1 $at, $f20 ## $f20 = 8.00 -/* 0014C 8089A27C 26D6B16C */ addiu $s6, $s6, %lo(D_8089B16C) ## $s6 = 8089B16C -/* 00150 8089A280 26F7B14C */ addiu $s7, $s7, %lo(D_8089B14C) ## $s7 = 8089B14C -/* 00154 8089A284 27DEB15C */ addiu $s8, $s8, %lo(D_8089B15C) ## $s8 = 8089B15C -/* 00158 8089A288 AFA800A0 */ sw $t0, 0x00A0($sp) -/* 0015C 8089A28C 27B400B4 */ addiu $s4, $sp, 0x00B4 ## $s4 = FFFFFFF4 -.L8089A290: -/* 00160 8089A290 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00164 8089A294 00000000 */ nop -/* 00168 8089A298 46140102 */ mul.s $f4, $f0, $f20 -/* 0016C 8089A29C 8FA900A0 */ lw $t1, 0x00A0($sp) -/* 00170 8089A2A0 852A0000 */ lh $t2, 0x0000($t1) ## 00000000 -/* 00174 8089A2A4 4600218D */ trunc.w.s $f6, $f4 -/* 00178 8089A2A8 440C3000 */ mfc1 $t4, $f6 -/* 0017C 8089A2AC 00000000 */ nop -/* 00180 8089A2B0 000C6C00 */ sll $t5, $t4, 16 -/* 00184 8089A2B4 000D7403 */ sra $t6, $t5, 16 -/* 00188 8089A2B8 014E8824 */ and $s1, $t2, $t6 -/* 0018C 8089A2BC 2A210005 */ slti $at, $s1, 0x0005 -/* 00190 8089A2C0 5020000A */ beql $at, $zero, .L8089A2EC -/* 00194 8089A2C4 24030020 */ addiu $v1, $zero, 0x0020 ## $v1 = 00000020 -/* 00198 8089A2C8 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 0019C 8089A2CC 00000000 */ nop -/* 001A0 8089A2D0 4616003C */ c.lt.s $f0, $f22 -/* 001A4 8089A2D4 00000000 */ nop -/* 001A8 8089A2D8 45020004 */ bc1fl .L8089A2EC -/* 001AC 8089A2DC 24030020 */ addiu $v1, $zero, 0x0020 ## $v1 = 00000020 -/* 001B0 8089A2E0 10000002 */ beq $zero, $zero, .L8089A2EC -/* 001B4 8089A2E4 24030040 */ addiu $v1, $zero, 0x0040 ## $v1 = 00000040 -/* 001B8 8089A2E8 24030020 */ addiu $v1, $zero, 0x0020 ## $v1 = 00000020 -.L8089A2EC: -/* 001BC 8089A2EC 00111040 */ sll $v0, $s1, 1 -/* 001C0 8089A2F0 02C2C021 */ addu $t8, $s6, $v0 -/* 001C4 8089A2F4 87190000 */ lh $t9, 0x0000($t8) ## 00000000 -/* 001C8 8089A2F8 03C26021 */ addu $t4, $s8, $v0 -/* 001CC 8089A2FC 240FFFA6 */ addiu $t7, $zero, 0xFFA6 ## $t7 = FFFFFFA6 -/* 001D0 8089A300 858D0000 */ lh $t5, 0x0000($t4) ## 00000000 -/* 001D4 8089A304 AFAF0010 */ sw $t7, 0x0010($sp) -/* 001D8 8089A308 02E28021 */ addu $s0, $s7, $v0 -/* 001DC 8089A30C 86090000 */ lh $t1, 0x0000($s0) ## 00000000 -/* 001E0 8089A310 3C0F0601 */ lui $t7, 0x0601 ## $t7 = 06010000 -/* 001E4 8089A314 25EFB9F8 */ addiu $t7, $t7, 0xB9F8 ## $t7 = 0600B9F8 -/* 001E8 8089A318 24080004 */ addiu $t0, $zero, 0x0004 ## $t0 = 00000004 -/* 001EC 8089A31C 240B0005 */ addiu $t3, $zero, 0x0005 ## $t3 = 00000005 -/* 001F0 8089A320 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 001F4 8089A324 240E00F1 */ addiu $t6, $zero, 0x00F1 ## $t6 = 000000F1 -/* 001F8 8089A328 AFAE0038 */ sw $t6, 0x0038($sp) -/* 001FC 8089A32C AFAA0034 */ sw $t2, 0x0034($sp) -/* 00200 8089A330 AFAB002C */ sw $t3, 0x002C($sp) -/* 00204 8089A334 AFA8001C */ sw $t0, 0x001C($sp) -/* 00208 8089A338 AFAF003C */ sw $t7, 0x003C($sp) -/* 0020C 8089A33C AFA00028 */ sw $zero, 0x0028($sp) -/* 00210 8089A340 AFA00020 */ sw $zero, 0x0020($sp) -/* 00214 8089A344 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 00218 8089A348 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000 -/* 0021C 8089A34C 8FA600C8 */ lw $a2, 0x00C8($sp) -/* 00220 8089A350 02603825 */ or $a3, $s3, $zero ## $a3 = 00000000 -/* 00224 8089A354 AFA30014 */ sw $v1, 0x0014($sp) -/* 00228 8089A358 AFB90018 */ sw $t9, 0x0018($sp) -/* 0022C 8089A35C AFAD0030 */ sw $t5, 0x0030($sp) -/* 00230 8089A360 0C00A7A3 */ jal func_80029E8C - -/* 00234 8089A364 AFA90024 */ sw $t1, 0x0024($sp) -/* 00238 8089A368 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 0023C 8089A36C 00000000 */ nop -/* 00240 8089A370 4618003C */ c.lt.s $f0, $f24 -/* 00244 8089A374 02802025 */ or $a0, $s4, $zero ## $a0 = FFFFFFF4 -/* 00248 8089A378 45020014 */ bc1fl .L8089A3CC -/* 0024C 8089A37C 8FA900CC */ lw $t1, 0x00CC($sp) -/* 00250 8089A380 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 00254 8089A384 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000 -/* 00258 8089A388 C7A800BC */ lwc1 $f8, 0x00BC($sp) -/* 0025C 8089A38C 86020000 */ lh $v0, 0x0000($s0) ## 00000000 -/* 00260 8089A390 4406E000 */ mfc1 $a2, $f28 -/* 00264 8089A394 461A4280 */ add.s $f10, $f8, $f26 -/* 00268 8089A398 00021080 */ sll $v0, $v0, 2 -/* 0026C 8089A39C 24580032 */ addiu $t8, $v0, 0x0032 ## $t8 = 00000032 -/* 00270 8089A3A0 24590046 */ addiu $t9, $v0, 0x0046 ## $t9 = 00000046 -/* 00274 8089A3A4 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001 -/* 00278 8089A3A8 E7AA00BC */ swc1 $f10, 0x00BC($sp) -/* 0027C 8089A3AC AFA80018 */ sw $t0, 0x0018($sp) -/* 00280 8089A3B0 AFB90014 */ sw $t9, 0x0014($sp) -/* 00284 8089A3B4 AFB80010 */ sw $t8, 0x0010($sp) -/* 00288 8089A3B8 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 0028C 8089A3BC 02802825 */ or $a1, $s4, $zero ## $a1 = FFFFFFF4 -/* 00290 8089A3C0 0C00CD20 */ jal func_80033480 -/* 00294 8089A3C4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00298 8089A3C8 8FA900CC */ lw $t1, 0x00CC($sp) -.L8089A3CC: -/* 0029C 8089A3CC 26520001 */ addiu $s2, $s2, 0x0001 ## $s2 = 00000001 -/* 002A0 8089A3D0 1649FFAF */ bne $s2, $t1, .L8089A290 -/* 002A4 8089A3D4 00000000 */ nop -.L8089A3D8: -/* 002A8 8089A3D8 8FBF0094 */ lw $ra, 0x0094($sp) -/* 002AC 8089A3DC D7B40048 */ ldc1 $f20, 0x0048($sp) -/* 002B0 8089A3E0 D7B60050 */ ldc1 $f22, 0x0050($sp) -/* 002B4 8089A3E4 D7B80058 */ ldc1 $f24, 0x0058($sp) -/* 002B8 8089A3E8 D7BA0060 */ ldc1 $f26, 0x0060($sp) -/* 002BC 8089A3EC D7BC0068 */ ldc1 $f28, 0x0068($sp) -/* 002C0 8089A3F0 8FB00070 */ lw $s0, 0x0070($sp) -/* 002C4 8089A3F4 8FB10074 */ lw $s1, 0x0074($sp) -/* 002C8 8089A3F8 8FB20078 */ lw $s2, 0x0078($sp) -/* 002CC 8089A3FC 8FB3007C */ lw $s3, 0x007C($sp) -/* 002D0 8089A400 8FB40080 */ lw $s4, 0x0080($sp) -/* 002D4 8089A404 8FB50084 */ lw $s5, 0x0084($sp) -/* 002D8 8089A408 8FB60088 */ lw $s6, 0x0088($sp) -/* 002DC 8089A40C 8FB7008C */ lw $s7, 0x008C($sp) -/* 002E0 8089A410 8FBE0090 */ lw $s8, 0x0090($sp) -/* 002E4 8089A414 03E00008 */ jr $ra -/* 002E8 8089A418 27BD00C0 */ addiu $sp, $sp, 0x00C0 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A41C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A41C.s deleted file mode 100644 index 41ca44fef2..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A41C.s +++ /dev/null @@ -1,68 +0,0 @@ -glabel func_8089A41C -/* 002EC 8089A41C 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0 -/* 002F0 8089A420 AFB60044 */ sw $s6, 0x0044($sp) -/* 002F4 8089A424 AFB4003C */ sw $s4, 0x003C($sp) -/* 002F8 8089A428 F7B60020 */ sdc1 $f22, 0x0020($sp) -/* 002FC 8089A42C F7B40018 */ sdc1 $f20, 0x0018($sp) -/* 00300 8089A430 3C014170 */ lui $at, 0x4170 ## $at = 41700000 -/* 00304 8089A434 AFB70048 */ sw $s7, 0x0048($sp) -/* 00308 8089A438 AFB50040 */ sw $s5, 0x0040($sp) -/* 0030C 8089A43C AFB30038 */ sw $s3, 0x0038($sp) -/* 00310 8089A440 AFB20034 */ sw $s2, 0x0034($sp) -/* 00314 8089A444 AFB10030 */ sw $s1, 0x0030($sp) -/* 00318 8089A448 AFB0002C */ sw $s0, 0x002C($sp) -/* 0031C 8089A44C 3C14808A */ lui $s4, %hi(D_8089B014) ## $s4 = 808A0000 -/* 00320 8089A450 3C16808A */ lui $s6, %hi(D_8089B184) ## $s6 = 808A0000 -/* 00324 8089A454 4486A000 */ mtc1 $a2, $f20 ## $f20 = 0.00 -/* 00328 8089A458 4481B000 */ mtc1 $at, $f22 ## $f22 = 15.00 -/* 0032C 8089A45C 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000 -/* 00330 8089A460 00A09825 */ or $s3, $a1, $zero ## $s3 = 00000000 -/* 00334 8089A464 AFBF004C */ sw $ra, 0x004C($sp) -/* 00338 8089A468 26D6B184 */ addiu $s6, $s6, %lo(D_8089B184) ## $s6 = 8089B184 -/* 0033C 8089A46C 2694B014 */ addiu $s4, $s4, %lo(D_8089B014) ## $s4 = 8089B014 -/* 00340 8089A470 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -/* 00344 8089A474 27B10050 */ addiu $s1, $sp, 0x0050 ## $s1 = FFFFFFF0 -/* 00348 8089A478 24150018 */ addiu $s5, $zero, 0x0018 ## $s5 = 00000018 -/* 0034C 8089A47C 2417000D */ addiu $s7, $zero, 0x000D ## $s7 = 0000000D -.L8089A480: -/* 00350 8089A480 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00354 8089A484 00000000 */ nop -/* 00358 8089A488 4614003C */ c.lt.s $f0, $f20 -/* 0035C 8089A48C 00000000 */ nop -/* 00360 8089A490 45020012 */ bc1fl .L8089A4DC -/* 00364 8089A494 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 -/* 00368 8089A498 02150019 */ multu $s0, $s5 -/* 0036C 8089A49C 26440024 */ addiu $a0, $s2, 0x0024 ## $a0 = 00000024 -/* 00370 8089A4A0 02203025 */ or $a2, $s1, $zero ## $a2 = FFFFFFF0 -/* 00374 8089A4A4 00007012 */ mflo $t6 -/* 00378 8089A4A8 028E2821 */ addu $a1, $s4, $t6 -/* 0037C 8089A4AC 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 00380 8089A4B0 00000000 */ nop -/* 00384 8089A4B4 C7A40058 */ lwc1 $f4, 0x0058($sp) -/* 00388 8089A4B8 02602025 */ or $a0, $s3, $zero ## $a0 = 00000000 -/* 0038C 8089A4BC 02202825 */ or $a1, $s1, $zero ## $a1 = FFFFFFF0 -/* 00390 8089A4C0 46162180 */ add.s $f6, $f4, $f22 -/* 00394 8089A4C4 02C03025 */ or $a2, $s6, $zero ## $a2 = 8089B184 -/* 00398 8089A4C8 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 0039C 8089A4CC AFA00010 */ sw $zero, 0x0010($sp) -/* 003A0 8089A4D0 0C226877 */ jal func_8089A1DC -/* 003A4 8089A4D4 E7A60058 */ swc1 $f6, 0x0058($sp) -/* 003A8 8089A4D8 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000002 -.L8089A4DC: -/* 003AC 8089A4DC 1617FFE8 */ bne $s0, $s7, .L8089A480 -/* 003B0 8089A4E0 00000000 */ nop -/* 003B4 8089A4E4 8FBF004C */ lw $ra, 0x004C($sp) -/* 003B8 8089A4E8 D7B40018 */ ldc1 $f20, 0x0018($sp) -/* 003BC 8089A4EC D7B60020 */ ldc1 $f22, 0x0020($sp) -/* 003C0 8089A4F0 8FB0002C */ lw $s0, 0x002C($sp) -/* 003C4 8089A4F4 8FB10030 */ lw $s1, 0x0030($sp) -/* 003C8 8089A4F8 8FB20034 */ lw $s2, 0x0034($sp) -/* 003CC 8089A4FC 8FB30038 */ lw $s3, 0x0038($sp) -/* 003D0 8089A500 8FB4003C */ lw $s4, 0x003C($sp) -/* 003D4 8089A504 8FB50040 */ lw $s5, 0x0040($sp) -/* 003D8 8089A508 8FB60044 */ lw $s6, 0x0044($sp) -/* 003DC 8089A50C 8FB70048 */ lw $s7, 0x0048($sp) -/* 003E0 8089A510 03E00008 */ jr $ra -/* 003E4 8089A514 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A5EC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A5EC.s deleted file mode 100644 index c1d4094a17..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A5EC.s +++ /dev/null @@ -1,7 +0,0 @@ -glabel func_8089A5EC -/* 004BC 8089A5EC 3C0E808A */ lui $t6, %hi(func_8089A604) ## $t6 = 808A0000 -/* 004C0 8089A5F0 25CEA604 */ addiu $t6, $t6, %lo(func_8089A604) ## $t6 = 8089A604 -/* 004C4 8089A5F4 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 -/* 004C8 8089A5F8 A48001C8 */ sh $zero, 0x01C8($a0) ## 000001C8 -/* 004CC 8089A5FC 03E00008 */ jr $ra -/* 004D0 8089A600 A48001CC */ sh $zero, 0x01CC($a0) ## 000001CC diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A604.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A604.s deleted file mode 100644 index 29298cc51b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A604.s +++ /dev/null @@ -1,120 +0,0 @@ -.late_rodata -glabel D_8089B2A8 - .float 0.04 - -glabel D_8089B2AC - .float 0.05 - -.text -glabel func_8089A604 -/* 004D4 8089A604 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 004D8 8089A608 AFBF0024 */ sw $ra, 0x0024($sp) -/* 004DC 8089A60C AFB00020 */ sw $s0, 0x0020($sp) -/* 004E0 8089A610 AFA5002C */ sw $a1, 0x002C($sp) -/* 004E4 8089A614 90820179 */ lbu $v0, 0x0179($a0) ## 00000179 -/* 004E8 8089A618 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 004EC 8089A61C 304E0002 */ andi $t6, $v0, 0x0002 ## $t6 = 00000000 -/* 004F0 8089A620 51C00020 */ beql $t6, $zero, .L8089A6A4 -/* 004F4 8089A624 860201C8 */ lh $v0, 0x01C8($s0) ## 000001C8 -/* 004F8 8089A628 848F01C8 */ lh $t7, 0x01C8($a0) ## 000001C8 -/* 004FC 8089A62C 3059FFFD */ andi $t9, $v0, 0xFFFD ## $t9 = 00000000 -/* 00500 8089A630 A0990179 */ sb $t9, 0x0179($a0) ## 00000179 -/* 00504 8089A634 25F80001 */ addiu $t8, $t7, 0x0001 ## $t8 = 00000001 -/* 00508 8089A638 A49801C8 */ sh $t8, 0x01C8($a0) ## 000001C8 -/* 0050C 8089A63C 8FA8002C */ lw $t0, 0x002C($sp) -/* 00510 8089A640 3C090001 */ lui $t1, 0x0001 ## $t1 = 00010000 -/* 00514 8089A644 01284821 */ addu $t1, $t1, $t0 -/* 00518 8089A648 8D291DE4 */ lw $t1, 0x1DE4($t1) ## 00011DE4 -/* 0051C 8089A64C 312A0003 */ andi $t2, $t1, 0x0003 ## $t2 = 00000000 -/* 00520 8089A650 5540000F */ bnel $t2, $zero, .L8089A690 -/* 00524 8089A654 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00528 8089A658 860B01CC */ lh $t3, 0x01CC($s0) ## 000001CC -/* 0052C 8089A65C 3C01808A */ lui $at, %hi(D_8089B2A8) ## $at = 808A0000 -/* 00530 8089A660 C428B2A8 */ lwc1 $f8, %lo(D_8089B2A8)($at) -/* 00534 8089A664 448B2000 */ mtc1 $t3, $f4 ## $f4 = 0.00 -/* 00538 8089A668 3C01808A */ lui $at, %hi(D_8089B2AC) ## $at = 808A0000 -/* 0053C 8089A66C C430B2AC */ lwc1 $f16, %lo(D_8089B2AC)($at) -/* 00540 8089A670 468021A0 */ cvt.s.w $f6, $f4 -/* 00544 8089A674 01002825 */ or $a1, $t0, $zero ## $a1 = 00000000 -/* 00548 8089A678 46083282 */ mul.s $f10, $f6, $f8 -/* 0054C 8089A67C 46105480 */ add.s $f18, $f10, $f16 -/* 00550 8089A680 44069000 */ mfc1 $a2, $f18 -/* 00554 8089A684 0C226907 */ jal func_8089A41C -/* 00558 8089A688 00000000 */ nop -/* 0055C 8089A68C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L8089A690: -/* 00560 8089A690 0C00BE5D */ jal func_8002F974 -/* 00564 8089A694 240520D1 */ addiu $a1, $zero, 0x20D1 ## $a1 = 000020D1 -/* 00568 8089A698 10000006 */ beq $zero, $zero, .L8089A6B4 -/* 0056C 8089A69C 860201C8 */ lh $v0, 0x01C8($s0) ## 000001C8 -/* 00570 8089A6A0 860201C8 */ lh $v0, 0x01C8($s0) ## 000001C8 -.L8089A6A4: -/* 00574 8089A6A4 18400003 */ blez $v0, .L8089A6B4 -/* 00578 8089A6A8 244CFFFF */ addiu $t4, $v0, 0xFFFF ## $t4 = FFFFFFFF -/* 0057C 8089A6AC A60C01C8 */ sh $t4, 0x01C8($s0) ## 000001C8 -/* 00580 8089A6B0 860201C8 */ lh $v0, 0x01C8($s0) ## 000001C8 -.L8089A6B4: -/* 00584 8089A6B4 28410029 */ slti $at, $v0, 0x0029 -/* 00588 8089A6B8 14200014 */ bne $at, $zero, .L8089A70C -/* 0058C 8089A6BC 26060168 */ addiu $a2, $s0, 0x0168 ## $a2 = 00000168 -/* 00590 8089A6C0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00594 8089A6C4 8FA4002C */ lw $a0, 0x002C($sp) -/* 00598 8089A6C8 0C00B2DD */ jal Flags_SetSwitch - -/* 0059C 8089A6CC 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 005A0 8089A6D0 0C2269E3 */ jal func_8089A78C -/* 005A4 8089A6D4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005A8 8089A6D8 8FA4002C */ lw $a0, 0x002C($sp) -/* 005AC 8089A6DC 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 005B0 8089A6E0 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064 -/* 005B4 8089A6E4 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 005B8 8089A6E8 240728D0 */ addiu $a3, $zero, 0x28D0 ## $a3 = 000028D0 -/* 005BC 8089A6EC 8FA4002C */ lw $a0, 0x002C($sp) -/* 005C0 8089A6F0 24050D70 */ addiu $a1, $zero, 0x0D70 ## $a1 = 00000D70 -/* 005C4 8089A6F4 2406FF9D */ addiu $a2, $zero, 0xFF9D ## $a2 = FFFFFF9D -/* 005C8 8089A6F8 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000 -/* 005CC 8089A6FC 0C02003E */ jal func_800800F8 -/* 005D0 8089A700 AFA00010 */ sw $zero, 0x0010($sp) -/* 005D4 8089A704 1000001D */ beq $zero, $zero, .L8089A77C -/* 005D8 8089A708 8FBF0024 */ lw $ra, 0x0024($sp) -.L8089A70C: -/* 005DC 8089A70C 28410008 */ slti $at, $v0, 0x0008 -/* 005E0 8089A710 50200004 */ beql $at, $zero, .L8089A724 -/* 005E4 8089A714 28410010 */ slti $at, $v0, 0x0010 -/* 005E8 8089A718 10000012 */ beq $zero, $zero, .L8089A764 -/* 005EC 8089A71C A60001CC */ sh $zero, 0x01CC($s0) ## 000001CC -/* 005F0 8089A720 28410010 */ slti $at, $v0, 0x0010 -.L8089A724: -/* 005F4 8089A724 10200003 */ beq $at, $zero, .L8089A734 -/* 005F8 8089A728 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001 -/* 005FC 8089A72C 1000000D */ beq $zero, $zero, .L8089A764 -/* 00600 8089A730 A60D01CC */ sh $t5, 0x01CC($s0) ## 000001CC -.L8089A734: -/* 00604 8089A734 28410018 */ slti $at, $v0, 0x0018 -/* 00608 8089A738 10200003 */ beq $at, $zero, .L8089A748 -/* 0060C 8089A73C 240E0002 */ addiu $t6, $zero, 0x0002 ## $t6 = 00000002 -/* 00610 8089A740 10000008 */ beq $zero, $zero, .L8089A764 -/* 00614 8089A744 A60E01CC */ sh $t6, 0x01CC($s0) ## 000001CC -.L8089A748: -/* 00618 8089A748 28410020 */ slti $at, $v0, 0x0020 -/* 0061C 8089A74C 10200004 */ beq $at, $zero, .L8089A760 -/* 00620 8089A750 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004 -/* 00624 8089A754 240F0003 */ addiu $t7, $zero, 0x0003 ## $t7 = 00000003 -/* 00628 8089A758 10000002 */ beq $zero, $zero, .L8089A764 -/* 0062C 8089A75C A60F01CC */ sh $t7, 0x01CC($s0) ## 000001CC -.L8089A760: -/* 00630 8089A760 A61801CC */ sh $t8, 0x01CC($s0) ## 000001CC -.L8089A764: -/* 00634 8089A764 8FA4002C */ lw $a0, 0x002C($sp) -/* 00638 8089A768 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0063C 8089A76C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00640 8089A770 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 00644 8089A774 00812821 */ addu $a1, $a0, $at -/* 00648 8089A778 8FBF0024 */ lw $ra, 0x0024($sp) -.L8089A77C: -/* 0064C 8089A77C 8FB00020 */ lw $s0, 0x0020($sp) -/* 00650 8089A780 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00654 8089A784 03E00008 */ jr $ra -/* 00658 8089A788 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A78C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A78C.s deleted file mode 100644 index 4bcd67b5a1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A78C.s +++ /dev/null @@ -1,40 +0,0 @@ -glabel func_8089A78C -/* 0065C 8089A78C 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00660 8089A790 AFB40028 */ sw $s4, 0x0028($sp) -/* 00664 8089A794 AFB00018 */ sw $s0, 0x0018($sp) -/* 00668 8089A798 3C0E808A */ lui $t6, %hi(func_8089A820) ## $t6 = 808A0000 -/* 0066C 8089A79C AFBF002C */ sw $ra, 0x002C($sp) -/* 00670 8089A7A0 AFB30024 */ sw $s3, 0x0024($sp) -/* 00674 8089A7A4 AFB20020 */ sw $s2, 0x0020($sp) -/* 00678 8089A7A8 AFB1001C */ sw $s1, 0x001C($sp) -/* 0067C 8089A7AC 25CEA820 */ addiu $t6, $t6, %lo(func_8089A820) ## $t6 = 8089A820 -/* 00680 8089A7B0 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 -/* 00684 8089A7B4 3C10808A */ lui $s0, %hi(D_8089B014) ## $s0 = 808A0000 -/* 00688 8089A7B8 3C14808A */ lui $s4, %hi(D_8089B14C) ## $s4 = 808A0000 -/* 0068C 8089A7BC 2694B14C */ addiu $s4, $s4, %lo(D_8089B14C) ## $s4 = 8089B14C -/* 00690 8089A7C0 2610B014 */ addiu $s0, $s0, %lo(D_8089B014) ## $s0 = 8089B014 -/* 00694 8089A7C4 AFA40030 */ sw $a0, 0x0030($sp) -/* 00698 8089A7C8 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 0069C 8089A7CC 249201D0 */ addiu $s2, $a0, 0x01D0 ## $s2 = 000001D0 -/* 006A0 8089A7D0 24930024 */ addiu $s3, $a0, 0x0024 ## $s3 = 00000024 -.L8089A7D4: -/* 006A4 8089A7D4 02402025 */ or $a0, $s2, $zero ## $a0 = 000001D0 -/* 006A8 8089A7D8 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 006AC 8089A7DC 02602825 */ or $a1, $s3, $zero ## $a1 = 00000024 -/* 006B0 8089A7E0 C604000C */ lwc1 $f4, 0x000C($s0) ## 8089B020 -/* 006B4 8089A7E4 26100018 */ addiu $s0, $s0, 0x0018 ## $s0 = 8089B02C -/* 006B8 8089A7E8 2631001C */ addiu $s1, $s1, 0x001C ## $s1 = 0000001C -/* 006BC 8089A7EC 2652001C */ addiu $s2, $s2, 0x001C ## $s2 = 000001EC -/* 006C0 8089A7F0 1614FFF8 */ bne $s0, $s4, .L8089A7D4 -/* 006C4 8089A7F4 E62401C0 */ swc1 $f4, 0x01C0($s1) ## 000001DC -/* 006C8 8089A7F8 8FAF0030 */ lw $t7, 0x0030($sp) -/* 006CC 8089A7FC A5E001CA */ sh $zero, 0x01CA($t7) ## 000001CA -/* 006D0 8089A800 8FBF002C */ lw $ra, 0x002C($sp) -/* 006D4 8089A804 8FB40028 */ lw $s4, 0x0028($sp) -/* 006D8 8089A808 8FB30024 */ lw $s3, 0x0024($sp) -/* 006DC 8089A80C 8FB20020 */ lw $s2, 0x0020($sp) -/* 006E0 8089A810 8FB1001C */ lw $s1, 0x001C($sp) -/* 006E4 8089A814 8FB00018 */ lw $s0, 0x0018($sp) -/* 006E8 8089A818 03E00008 */ jr $ra -/* 006EC 8089A81C 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A820.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A820.s deleted file mode 100644 index 4ffbdf09ab..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A820.s +++ /dev/null @@ -1,255 +0,0 @@ -.late_rodata -glabel D_8089B2B0 - .word 0x3D89374C -glabel D_8089B2B4 - .word 0x3F7EB852 -glabel D_8089B2B8 - .float 0.6 - -.text -glabel func_8089A820 -/* 006F0 8089A820 27BDFF60 */ addiu $sp, $sp, 0xFF60 ## $sp = FFFFFF60 -/* 006F4 8089A824 AFBF0074 */ sw $ra, 0x0074($sp) -/* 006F8 8089A828 AFBE0070 */ sw $s8, 0x0070($sp) -/* 006FC 8089A82C AFB7006C */ sw $s7, 0x006C($sp) -/* 00700 8089A830 AFB60068 */ sw $s6, 0x0068($sp) -/* 00704 8089A834 AFB50064 */ sw $s5, 0x0064($sp) -/* 00708 8089A838 AFB40060 */ sw $s4, 0x0060($sp) -/* 0070C 8089A83C AFB3005C */ sw $s3, 0x005C($sp) -/* 00710 8089A840 AFB20058 */ sw $s2, 0x0058($sp) -/* 00714 8089A844 AFB10054 */ sw $s1, 0x0054($sp) -/* 00718 8089A848 AFB00050 */ sw $s0, 0x0050($sp) -/* 0071C 8089A84C F7BC0048 */ sdc1 $f28, 0x0048($sp) -/* 00720 8089A850 F7BA0040 */ sdc1 $f26, 0x0040($sp) -/* 00724 8089A854 F7B80038 */ sdc1 $f24, 0x0038($sp) -/* 00728 8089A858 F7B60030 */ sdc1 $f22, 0x0030($sp) -/* 0072C 8089A85C F7B40028 */ sdc1 $f20, 0x0028($sp) -/* 00730 8089A860 848E01CA */ lh $t6, 0x01CA($a0) ## 000001CA -/* 00734 8089A864 0080A025 */ or $s4, $a0, $zero ## $s4 = 00000000 -/* 00738 8089A868 00A0B825 */ or $s7, $a1, $zero ## $s7 = 00000000 -/* 0073C 8089A86C 25CF0001 */ addiu $t7, $t6, 0x0001 ## $t7 = 00000001 -/* 00740 8089A870 A48F01CA */ sh $t7, 0x01CA($a0) ## 000001CA -/* 00744 8089A874 848301CA */ lh $v1, 0x01CA($a0) ## 000001CA -/* 00748 8089A878 2401001E */ addiu $at, $zero, 0x001E ## $at = 0000001E -/* 0074C 8089A87C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00750 8089A880 14610005 */ bne $v1, $at, .L8089A898 -/* 00754 8089A884 26850024 */ addiu $a1, $s4, 0x0024 ## $a1 = 00000024 -/* 00758 8089A888 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064 -/* 0075C 8089A88C 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 00760 8089A890 240728CF */ addiu $a3, $zero, 0x28CF ## $a3 = 000028CF -/* 00764 8089A894 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -.L8089A898: -/* 00768 8089A898 3C01808A */ lui $at, %hi(D_8089B2B0) ## $at = 808A0000 -/* 0076C 8089A89C C43CB2B0 */ lwc1 $f28, %lo(D_8089B2B0)($at) -/* 00770 8089A8A0 3C01808A */ lui $at, %hi(D_8089B2B4) ## $at = 808A0000 -/* 00774 8089A8A4 C43AB2B4 */ lwc1 $f26, %lo(D_8089B2B4)($at) -/* 00778 8089A8A8 3C01808A */ lui $at, %hi(D_8089B2B8) ## $at = 808A0000 -/* 0077C 8089A8AC C438B2B8 */ lwc1 $f24, %lo(D_8089B2B8)($at) -/* 00780 8089A8B0 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00784 8089A8B4 4481B000 */ mtc1 $at, $f22 ## $f22 = 10.00 -/* 00788 8089A8B8 3C01C190 */ lui $at, 0xC190 ## $at = C1900000 -/* 0078C 8089A8BC 3C12808A */ lui $s2, %hi(D_8089B014) ## $s2 = 808A0000 -/* 00790 8089A8C0 4481A000 */ mtc1 $at, $f20 ## $f20 = -18.00 -/* 00794 8089A8C4 2652B014 */ addiu $s2, $s2, %lo(D_8089B014) ## $s2 = 8089B014 -/* 00798 8089A8C8 00009825 */ or $s3, $zero, $zero ## $s3 = 00000000 -/* 0079C 8089A8CC 241E000D */ addiu $s8, $zero, 0x000D ## $s8 = 0000000D -/* 007A0 8089A8D0 2416001C */ addiu $s6, $zero, 0x001C ## $s6 = 0000001C -/* 007A4 8089A8D4 27B5008C */ addiu $s5, $sp, 0x008C ## $s5 = FFFFFFEC -.L8089A8D8: -/* 007A8 8089A8D8 86420014 */ lh $v0, 0x0014($s2) ## 8089B028 -/* 007AC 8089A8DC 0043082A */ slt $at, $v0, $v1 -/* 007B0 8089A8E0 10200036 */ beq $at, $zero, .L8089A9BC -/* 007B4 8089A8E4 00000000 */ nop -/* 007B8 8089A8E8 02760019 */ multu $s3, $s6 -/* 007BC 8089A8EC 0000C012 */ mflo $t8 -/* 007C0 8089A8F0 02988021 */ addu $s0, $s4, $t8 -/* 007C4 8089A8F4 C60401E0 */ lwc1 $f4, 0x01E0($s0) ## 000001E0 -/* 007C8 8089A8F8 261001D0 */ addiu $s0, $s0, 0x01D0 ## $s0 = 000001D0 -/* 007CC 8089A8FC 46182181 */ sub.s $f6, $f4, $f24 -/* 007D0 8089A900 E6060010 */ swc1 $f6, 0x0010($s0) ## 000001E0 -/* 007D4 8089A904 C6000010 */ lwc1 $f0, 0x0010($s0) ## 000001E0 -/* 007D8 8089A908 4614003C */ c.lt.s $f0, $f20 -/* 007DC 8089A90C 00000000 */ nop -/* 007E0 8089A910 45020004 */ bc1fl .L8089A924 -/* 007E4 8089A914 C608000C */ lwc1 $f8, 0x000C($s0) ## 000001DC -/* 007E8 8089A918 E6140010 */ swc1 $f20, 0x0010($s0) ## 000001E0 -/* 007EC 8089A91C C6000010 */ lwc1 $f0, 0x0010($s0) ## 000001E0 -/* 007F0 8089A920 C608000C */ lwc1 $f8, 0x000C($s0) ## 000001DC -.L8089A924: -/* 007F4 8089A924 C6100000 */ lwc1 $f16, 0x0000($s0) ## 000001D0 -/* 007F8 8089A928 C6060004 */ lwc1 $f6, 0x0004($s0) ## 000001D4 -/* 007FC 8089A92C 461A4282 */ mul.s $f10, $f8, $f26 -/* 00800 8089A930 86190018 */ lh $t9, 0x0018($s0) ## 000001E8 -/* 00804 8089A934 46003200 */ add.s $f8, $f6, $f0 -/* 00808 8089A938 860A001A */ lh $t2, 0x001A($s0) ## 000001EA -/* 0080C 8089A93C E6080004 */ swc1 $f8, 0x0004($s0) ## 000001D4 -/* 00810 8089A940 E60A000C */ swc1 $f10, 0x000C($s0) ## 000001DC -/* 00814 8089A944 C612000C */ lwc1 $f18, 0x000C($s0) ## 000001DC -/* 00818 8089A948 46128100 */ add.s $f4, $f16, $f18 -/* 0081C 8089A94C E6040000 */ swc1 $f4, 0x0000($s0) ## 000001D0 -/* 00820 8089A950 86480010 */ lh $t0, 0x0010($s2) ## 8089B024 -/* 00824 8089A954 03284821 */ addu $t1, $t9, $t0 -/* 00828 8089A958 A6090018 */ sh $t1, 0x0018($s0) ## 000001E8 -/* 0082C 8089A95C 864B0012 */ lh $t3, 0x0012($s2) ## 8089B026 -/* 00830 8089A960 014B6021 */ addu $t4, $t2, $t3 -/* 00834 8089A964 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00838 8089A968 A60C001A */ sh $t4, 0x001A($s0) ## 000001EA -/* 0083C 8089A96C 461C003C */ c.lt.s $f0, $f28 -/* 00840 8089A970 02002025 */ or $a0, $s0, $zero ## $a0 = 000001D0 -/* 00844 8089A974 02402825 */ or $a1, $s2, $zero ## $a1 = 8089B014 -/* 00848 8089A978 02A03025 */ or $a2, $s5, $zero ## $a2 = FFFFFFEC -/* 0084C 8089A97C 4500000D */ bc1f .L8089A9B4 -/* 00850 8089A980 00000000 */ nop -/* 00854 8089A984 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 00858 8089A988 2611000C */ addiu $s1, $s0, 0x000C ## $s1 = 000001DC -/* 0085C 8089A98C C7AA0094 */ lwc1 $f10, 0x0094($sp) -/* 00860 8089A990 240D0002 */ addiu $t5, $zero, 0x0002 ## $t5 = 00000002 -/* 00864 8089A994 AFAD0010 */ sw $t5, 0x0010($sp) -/* 00868 8089A998 46165400 */ add.s $f16, $f10, $f22 -/* 0086C 8089A99C 02E02025 */ or $a0, $s7, $zero ## $a0 = 00000000 -/* 00870 8089A9A0 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFEC -/* 00874 8089A9A4 02203025 */ or $a2, $s1, $zero ## $a2 = 000001DC -/* 00878 8089A9A8 E7B00094 */ swc1 $f16, 0x0094($sp) -/* 0087C 8089A9AC 0C226877 */ jal func_8089A1DC -/* 00880 8089A9B0 24070003 */ addiu $a3, $zero, 0x0003 ## $a3 = 00000003 -.L8089A9B4: -/* 00884 8089A9B4 10000017 */ beq $zero, $zero, .L8089AA14 -/* 00888 8089A9B8 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -.L8089A9BC: -/* 0088C 8089A9BC 54430016 */ bnel $v0, $v1, .L8089AA18 -/* 00890 8089A9C0 26730001 */ addiu $s3, $s3, 0x0001 ## $s3 = 00000001 -/* 00894 8089A9C4 02760019 */ multu $s3, $s6 -/* 00898 8089A9C8 02402825 */ or $a1, $s2, $zero ## $a1 = 8089B014 -/* 0089C 8089A9CC 02A03025 */ or $a2, $s5, $zero ## $a2 = FFFFFFEC -/* 008A0 8089A9D0 00007012 */ mflo $t6 -/* 008A4 8089A9D4 028E8021 */ addu $s0, $s4, $t6 -/* 008A8 8089A9D8 261001D0 */ addiu $s0, $s0, 0x01D0 ## $s0 = 000003A0 -/* 008AC 8089A9DC 02002025 */ or $a0, $s0, $zero ## $a0 = 000003A0 -/* 008B0 8089A9E0 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 008B4 8089A9E4 2611000C */ addiu $s1, $s0, 0x000C ## $s1 = 000003AC -/* 008B8 8089A9E8 C7B20094 */ lwc1 $f18, 0x0094($sp) -/* 008BC 8089A9EC 240F0002 */ addiu $t7, $zero, 0x0002 ## $t7 = 00000002 -/* 008C0 8089A9F0 AFAF0010 */ sw $t7, 0x0010($sp) -/* 008C4 8089A9F4 46169100 */ add.s $f4, $f18, $f22 -/* 008C8 8089A9F8 02E02025 */ or $a0, $s7, $zero ## $a0 = 00000000 -/* 008CC 8089A9FC 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFEC -/* 008D0 8089AA00 02203025 */ or $a2, $s1, $zero ## $a2 = 000003AC -/* 008D4 8089AA04 E7A40094 */ swc1 $f4, 0x0094($sp) -/* 008D8 8089AA08 0C226877 */ jal func_8089A1DC -/* 008DC 8089AA0C 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 008E0 8089AA10 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -.L8089AA14: -/* 008E4 8089AA14 26730001 */ addiu $s3, $s3, 0x0001 ## $s3 = 00000002 -.L8089AA18: -/* 008E8 8089AA18 167EFFAF */ bne $s3, $s8, .L8089A8D8 -/* 008EC 8089AA1C 26520018 */ addiu $s2, $s2, 0x0018 ## $s2 = 8089B02C -/* 008F0 8089AA20 30780003 */ andi $t8, $v1, 0x0003 ## $t8 = 00000000 -/* 008F4 8089AA24 1700002C */ bne $t8, $zero, .L8089AAD8 -/* 008F8 8089AA28 2861001F */ slti $at, $v1, 0x001F -/* 008FC 8089AA2C 1420002A */ bne $at, $zero, .L8089AAD8 -/* 00900 8089AA30 28610050 */ slti $at, $v1, 0x0050 -/* 00904 8089AA34 10200028 */ beq $at, $zero, .L8089AAD8 -/* 00908 8089AA38 28610029 */ slti $at, $v1, 0x0029 -/* 0090C 8089AA3C 54200027 */ bnel $at, $zero, .L8089AADC -/* 00910 8089AA40 2861000D */ slti $at, $v1, 0x000D -/* 00914 8089AA44 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00918 8089AA48 00000000 */ nop -/* 0091C 8089AA4C 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00920 8089AA50 4481A000 */ mtc1 $at, $f20 ## $f20 = 0.50 -/* 00924 8089AA54 3C0142B4 */ lui $at, 0x42B4 ## $at = 42B40000 -/* 00928 8089AA58 44814000 */ mtc1 $at, $f8 ## $f8 = 90.00 -/* 0092C 8089AA5C 46140181 */ sub.s $f6, $f0, $f20 -/* 00930 8089AA60 C6900024 */ lwc1 $f16, 0x0024($s4) ## 00000024 -/* 00934 8089AA64 46083282 */ mul.s $f10, $f6, $f8 -/* 00938 8089AA68 46105480 */ add.s $f18, $f10, $f16 -/* 0093C 8089AA6C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00940 8089AA70 E7B2008C */ swc1 $f18, 0x008C($sp) -/* 00944 8089AA74 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000 -/* 00948 8089AA78 44813000 */ mtc1 $at, $f6 ## $f6 = 80.00 -/* 0094C 8089AA7C C6840028 */ lwc1 $f4, 0x0028($s4) ## 00000028 -/* 00950 8089AA80 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00954 8089AA84 46060202 */ mul.s $f8, $f0, $f6 -/* 00958 8089AA88 44818000 */ mtc1 $at, $f16 ## $f16 = 20.00 -/* 0095C 8089AA8C 46082281 */ sub.s $f10, $f4, $f8 -/* 00960 8089AA90 46105481 */ sub.s $f18, $f10, $f16 -/* 00964 8089AA94 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00968 8089AA98 E7B20090 */ swc1 $f18, 0x0090($sp) -/* 0096C 8089AA9C 46140181 */ sub.s $f6, $f0, $f20 -/* 00970 8089AAA0 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 00974 8089AAA4 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00 -/* 00978 8089AAA8 C68A002C */ lwc1 $f10, 0x002C($s4) ## 0000002C -/* 0097C 8089AAAC 3C06808A */ lui $a2, %hi(D_8089B1A0) ## $a2 = 808A0000 -/* 00980 8089AAB0 46043202 */ mul.s $f8, $f6, $f4 -/* 00984 8089AAB4 24C6B1A0 */ addiu $a2, $a2, %lo(D_8089B1A0) ## $a2 = 8089B1A0 -/* 00988 8089AAB8 AFA00010 */ sw $zero, 0x0010($sp) -/* 0098C 8089AABC 02E02025 */ or $a0, $s7, $zero ## $a0 = 00000000 -/* 00990 8089AAC0 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFEC -/* 00994 8089AAC4 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00998 8089AAC8 46085401 */ sub.s $f16, $f10, $f8 -/* 0099C 8089AACC 0C226877 */ jal func_8089A1DC -/* 009A0 8089AAD0 E7B00094 */ swc1 $f16, 0x0094($sp) -/* 009A4 8089AAD4 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -.L8089AAD8: -/* 009A8 8089AAD8 2861000D */ slti $at, $v1, 0x000D -.L8089AADC: -/* 009AC 8089AADC 10200015 */ beq $at, $zero, .L8089AB34 -/* 009B0 8089AAE0 02E02025 */ or $a0, $s7, $zero ## $a0 = 00000000 -/* 009B4 8089AAE4 C6920024 */ lwc1 $f18, 0x0024($s4) ## 00000024 -/* 009B8 8089AAE8 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 009BC 8089AAEC 44812000 */ mtc1 $at, $f4 ## $f4 = 60.00 -/* 009C0 8089AAF0 E7B2008C */ swc1 $f18, 0x008C($sp) -/* 009C4 8089AAF4 C6860028 */ lwc1 $f6, 0x0028($s4) ## 00000028 -/* 009C8 8089AAF8 24190096 */ addiu $t9, $zero, 0x0096 ## $t9 = 00000096 -/* 009CC 8089AAFC 24080064 */ addiu $t0, $zero, 0x0064 ## $t0 = 00000064 -/* 009D0 8089AB00 46043281 */ sub.s $f10, $f6, $f4 -/* 009D4 8089AB04 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001 -/* 009D8 8089AB08 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFEC -/* 009DC 8089AB0C 3C0642C8 */ lui $a2, 0x42C8 ## $a2 = 42C80000 -/* 009E0 8089AB10 E7AA0090 */ swc1 $f10, 0x0090($sp) -/* 009E4 8089AB14 C688002C */ lwc1 $f8, 0x002C($s4) ## 0000002C -/* 009E8 8089AB18 AFA90018 */ sw $t1, 0x0018($sp) -/* 009EC 8089AB1C AFA80014 */ sw $t0, 0x0014($sp) -/* 009F0 8089AB20 AFB90010 */ sw $t9, 0x0010($sp) -/* 009F4 8089AB24 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 009F8 8089AB28 0C00CD20 */ jal func_80033480 -/* 009FC 8089AB2C E7A80094 */ swc1 $f8, 0x0094($sp) -/* 00A00 8089AB30 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -.L8089AB34: -/* 00A04 8089AB34 2401003C */ addiu $at, $zero, 0x003C ## $at = 0000003C -/* 00A08 8089AB38 54610005 */ bnel $v1, $at, .L8089AB50 -/* 00A0C 8089AB3C 28610064 */ slti $at, $v1, 0x0064 -/* 00A10 8089AB40 0C01E221 */ jal func_80078884 -/* 00A14 8089AB44 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802 -/* 00A18 8089AB48 868301CA */ lh $v1, 0x01CA($s4) ## 000001CA -/* 00A1C 8089AB4C 28610064 */ slti $at, $v1, 0x0064 -.L8089AB50: -/* 00A20 8089AB50 54200004 */ bnel $at, $zero, .L8089AB64 -/* 00A24 8089AB54 8FBF0074 */ lw $ra, 0x0074($sp) -/* 00A28 8089AB58 0C00B55C */ jal Actor_Kill - -/* 00A2C 8089AB5C 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000 -/* 00A30 8089AB60 8FBF0074 */ lw $ra, 0x0074($sp) -.L8089AB64: -/* 00A34 8089AB64 D7B40028 */ ldc1 $f20, 0x0028($sp) -/* 00A38 8089AB68 D7B60030 */ ldc1 $f22, 0x0030($sp) -/* 00A3C 8089AB6C D7B80038 */ ldc1 $f24, 0x0038($sp) -/* 00A40 8089AB70 D7BA0040 */ ldc1 $f26, 0x0040($sp) -/* 00A44 8089AB74 D7BC0048 */ ldc1 $f28, 0x0048($sp) -/* 00A48 8089AB78 8FB00050 */ lw $s0, 0x0050($sp) -/* 00A4C 8089AB7C 8FB10054 */ lw $s1, 0x0054($sp) -/* 00A50 8089AB80 8FB20058 */ lw $s2, 0x0058($sp) -/* 00A54 8089AB84 8FB3005C */ lw $s3, 0x005C($sp) -/* 00A58 8089AB88 8FB40060 */ lw $s4, 0x0060($sp) -/* 00A5C 8089AB8C 8FB50064 */ lw $s5, 0x0064($sp) -/* 00A60 8089AB90 8FB60068 */ lw $s6, 0x0068($sp) -/* 00A64 8089AB94 8FB7006C */ lw $s7, 0x006C($sp) -/* 00A68 8089AB98 8FBE0070 */ lw $s8, 0x0070($sp) -/* 00A6C 8089AB9C 03E00008 */ jr $ra -/* 00A70 8089ABA0 27BD00A0 */ addiu $sp, $sp, 0x00A0 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089ABC8.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089ABC8.s deleted file mode 100644 index 86f7ae94bf..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089ABC8.s +++ /dev/null @@ -1,111 +0,0 @@ -.rdata -glabel D_8089B210 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -glabel D_8089B228 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -glabel D_8089B240 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -.text -glabel func_8089ABC8 -/* 00A98 8089ABC8 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 00A9C 8089ABCC AFBF001C */ sw $ra, 0x001C($sp) -/* 00AA0 8089ABD0 AFB00018 */ sw $s0, 0x0018($sp) -/* 00AA4 8089ABD4 AFA40048 */ sw $a0, 0x0048($sp) -/* 00AA8 8089ABD8 AFA5004C */ sw $a1, 0x004C($sp) -/* 00AAC 8089ABDC 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00AB0 8089ABE0 3C06808A */ lui $a2, %hi(D_8089B210) ## $a2 = 808A0000 -/* 00AB4 8089ABE4 24C6B210 */ addiu $a2, $a2, %lo(D_8089B210) ## $a2 = 8089B210 -/* 00AB8 8089ABE8 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFEC -/* 00ABC 8089ABEC 240702C2 */ addiu $a3, $zero, 0x02C2 ## $a3 = 000002C2 -/* 00AC0 8089ABF0 0C031AB1 */ jal Graph_OpenDisps -/* 00AC4 8089ABF4 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00AC8 8089ABF8 8FAF004C */ lw $t7, 0x004C($sp) -/* 00ACC 8089ABFC 0C024F46 */ jal func_80093D18 -/* 00AD0 8089AC00 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 00AD4 8089AC04 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00AD8 8089AC08 8FA80048 */ lw $t0, 0x0048($sp) -/* 00ADC 8089AC0C 3C19DB06 */ lui $t9, 0xDB06 ## $t9 = DB060000 -/* 00AE0 8089AC10 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00AE4 8089AC14 AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0 -/* 00AE8 8089AC18 37390020 */ ori $t9, $t9, 0x0020 ## $t9 = DB060020 -/* 00AEC 8089AC1C AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00AF0 8089AC20 850901CC */ lh $t1, 0x01CC($t0) ## 000001CC -/* 00AF4 8089AC24 3C04808A */ lui $a0, %hi(D_8089B1AC) ## $a0 = 808A0000 -/* 00AF8 8089AC28 3C068016 */ lui $a2, %hi(gSegments) -/* 00AFC 8089AC2C 00095080 */ sll $t2, $t1, 2 -/* 00B00 8089AC30 008A2021 */ addu $a0, $a0, $t2 -/* 00B04 8089AC34 8C84B1AC */ lw $a0, %lo(D_8089B1AC)($a0) -/* 00B08 8089AC38 24C66FA8 */ addiu $a2, %lo(gSegments) -/* 00B0C 8089AC3C 3C0500FF */ lui $a1, 0x00FF ## $a1 = 00FF0000 -/* 00B10 8089AC40 00046100 */ sll $t4, $a0, 4 -/* 00B14 8089AC44 000C6F02 */ srl $t5, $t4, 28 -/* 00B18 8089AC48 000D7080 */ sll $t6, $t5, 2 -/* 00B1C 8089AC4C 00CE7821 */ addu $t7, $a2, $t6 -/* 00B20 8089AC50 8DF80000 */ lw $t8, 0x0000($t7) ## 00000000 -/* 00B24 8089AC54 34A5FFFF */ ori $a1, $a1, 0xFFFF ## $a1 = 00FFFFFF -/* 00B28 8089AC58 00855824 */ and $t3, $a0, $a1 -/* 00B2C 8089AC5C 3C078000 */ lui $a3, 0x8000 ## $a3 = 80000000 -/* 00B30 8089AC60 0178C821 */ addu $t9, $t3, $t8 -/* 00B34 8089AC64 03274821 */ addu $t1, $t9, $a3 -/* 00B38 8089AC68 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00B3C 8089AC6C 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00B40 8089AC70 3C0CDB06 */ lui $t4, 0xDB06 ## $t4 = DB060000 -/* 00B44 8089AC74 358C0024 */ ori $t4, $t4, 0x0024 ## $t4 = DB060024 -/* 00B48 8089AC78 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00B4C 8089AC7C AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0 -/* 00B50 8089AC80 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 00B54 8089AC84 850D01CC */ lh $t5, 0x01CC($t0) ## 000001CC -/* 00B58 8089AC88 3C04808A */ lui $a0, %hi(D_8089B1C0) ## $a0 = 808A0000 -/* 00B5C 8089AC8C 000D7080 */ sll $t6, $t5, 2 -/* 00B60 8089AC90 008E2021 */ addu $a0, $a0, $t6 -/* 00B64 8089AC94 8C84B1C0 */ lw $a0, %lo(D_8089B1C0)($a0) -/* 00B68 8089AC98 00045900 */ sll $t3, $a0, 4 -/* 00B6C 8089AC9C 000BC702 */ srl $t8, $t3, 28 -/* 00B70 8089ACA0 0018C880 */ sll $t9, $t8, 2 -/* 00B74 8089ACA4 00D94821 */ addu $t1, $a2, $t9 -/* 00B78 8089ACA8 8D2A0000 */ lw $t2, 0x0000($t1) ## 00000000 -/* 00B7C 8089ACAC 00857824 */ and $t7, $a0, $a1 -/* 00B80 8089ACB0 3C0BDA38 */ lui $t3, 0xDA38 ## $t3 = DA380000 -/* 00B84 8089ACB4 01EA6021 */ addu $t4, $t7, $t2 -/* 00B88 8089ACB8 01876821 */ addu $t5, $t4, $a3 -/* 00B8C 8089ACBC AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 00B90 8089ACC0 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00B94 8089ACC4 356B0003 */ ori $t3, $t3, 0x0003 ## $t3 = DA380003 -/* 00B98 8089ACC8 3C05808A */ lui $a1, %hi(D_8089B228) ## $a1 = 808A0000 -/* 00B9C 8089ACCC 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008 -/* 00BA0 8089ACD0 AE0E02C0 */ sw $t6, 0x02C0($s0) ## 000002C0 -/* 00BA4 8089ACD4 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 00BA8 8089ACD8 8FB8004C */ lw $t8, 0x004C($sp) -/* 00BAC 8089ACDC 24A5B228 */ addiu $a1, $a1, %lo(D_8089B228) ## $a1 = 8089B228 -/* 00BB0 8089ACE0 240602CC */ addiu $a2, $zero, 0x02CC ## $a2 = 000002CC -/* 00BB4 8089ACE4 8F040000 */ lw $a0, 0x0000($t8) ## 00000008 -/* 00BB8 8089ACE8 0C0346A2 */ jal Matrix_NewMtx -/* 00BBC 8089ACEC AFA20028 */ sw $v0, 0x0028($sp) -/* 00BC0 8089ACF0 8FA30028 */ lw $v1, 0x0028($sp) -/* 00BC4 8089ACF4 3C0F0600 */ lui $t7, 0x0600 ## $t7 = 06000000 -/* 00BC8 8089ACF8 25EF5780 */ addiu $t7, $t7, 0x5780 ## $t7 = 06005780 -/* 00BCC 8089ACFC AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00BD0 8089AD00 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00BD4 8089AD04 3C09DE00 */ lui $t1, 0xDE00 ## $t1 = DE000000 -/* 00BD8 8089AD08 3C06808A */ lui $a2, %hi(D_8089B240) ## $a2 = 808A0000 -/* 00BDC 8089AD0C 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 00BE0 8089AD10 AE1902C0 */ sw $t9, 0x02C0($s0) ## 000002C0 -/* 00BE4 8089AD14 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004 -/* 00BE8 8089AD18 AC490000 */ sw $t1, 0x0000($v0) ## 00000000 -/* 00BEC 8089AD1C 8FAA004C */ lw $t2, 0x004C($sp) -/* 00BF0 8089AD20 24C6B240 */ addiu $a2, $a2, %lo(D_8089B240) ## $a2 = 8089B240 -/* 00BF4 8089AD24 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFEC -/* 00BF8 8089AD28 240702D0 */ addiu $a3, $zero, 0x02D0 ## $a3 = 000002D0 -/* 00BFC 8089AD2C 0C031AD5 */ jal Graph_CloseDisps -/* 00C00 8089AD30 8D450000 */ lw $a1, 0x0000($t2) ## 00000000 -/* 00C04 8089AD34 8FBF001C */ lw $ra, 0x001C($sp) -/* 00C08 8089AD38 8FB00018 */ lw $s0, 0x0018($sp) -/* 00C0C 8089AD3C 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 00C10 8089AD40 03E00008 */ jr $ra -/* 00C14 8089AD44 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089AD48.s b/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089AD48.s deleted file mode 100644 index e1f4fa4587..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089AD48.s +++ /dev/null @@ -1,154 +0,0 @@ -.rdata -glabel D_8089B258 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -glabel D_8089B270 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -glabel D_8089B288 - .asciz "../z_bg_jya_megami.c" - .balign 4 - -.late_rodata -glabel D_8089B2BC - .float 9.58738019108e-05 - -glabel D_8089B2C0 - .float 0.1 - -.text -glabel func_8089AD48 -/* 00C18 8089AD48 27BDFF68 */ addiu $sp, $sp, 0xFF68 ## $sp = FFFFFF68 -/* 00C1C 8089AD4C AFB60048 */ sw $s6, 0x0048($sp) -/* 00C20 8089AD50 00A0B025 */ or $s6, $a1, $zero ## $s6 = 00000000 -/* 00C24 8089AD54 AFBF0054 */ sw $ra, 0x0054($sp) -/* 00C28 8089AD58 AFBE0050 */ sw $s8, 0x0050($sp) -/* 00C2C 8089AD5C AFB7004C */ sw $s7, 0x004C($sp) -/* 00C30 8089AD60 AFB50044 */ sw $s5, 0x0044($sp) -/* 00C34 8089AD64 AFB40040 */ sw $s4, 0x0040($sp) -/* 00C38 8089AD68 AFB3003C */ sw $s3, 0x003C($sp) -/* 00C3C 8089AD6C AFB20038 */ sw $s2, 0x0038($sp) -/* 00C40 8089AD70 AFB10034 */ sw $s1, 0x0034($sp) -/* 00C44 8089AD74 AFB00030 */ sw $s0, 0x0030($sp) -/* 00C48 8089AD78 F7B80028 */ sdc1 $f24, 0x0028($sp) -/* 00C4C 8089AD7C F7B60020 */ sdc1 $f22, 0x0020($sp) -/* 00C50 8089AD80 F7B40018 */ sdc1 $f20, 0x0018($sp) -/* 00C54 8089AD84 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00C58 8089AD88 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 00C5C 8089AD8C 3C06808A */ lui $a2, %hi(D_8089B258) ## $a2 = 808A0000 -/* 00C60 8089AD90 24C6B258 */ addiu $a2, $a2, %lo(D_8089B258) ## $a2 = 8089B258 -/* 00C64 8089AD94 27A40078 */ addiu $a0, $sp, 0x0078 ## $a0 = FFFFFFE0 -/* 00C68 8089AD98 240702EA */ addiu $a3, $zero, 0x02EA ## $a3 = 000002EA -/* 00C6C 8089AD9C 0C031AB1 */ jal Graph_OpenDisps -/* 00C70 8089ADA0 00A0A825 */ or $s5, $a1, $zero ## $s5 = 00000000 -/* 00C74 8089ADA4 0C024F46 */ jal func_80093D18 -/* 00C78 8089ADA8 8EC40000 */ lw $a0, 0x0000($s6) ## 00000000 -/* 00C7C 8089ADAC 3C01808A */ lui $at, %hi(D_8089B2BC) ## $at = 808A0000 -/* 00C80 8089ADB0 C438B2BC */ lwc1 $f24, %lo(D_8089B2BC)($at) -/* 00C84 8089ADB4 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 00C88 8089ADB8 4481B000 */ mtc1 $at, $f22 ## $f22 = -10.00 -/* 00C8C 8089ADBC 3C01808A */ lui $at, %hi(D_8089B2C0) ## $at = 808A0000 -/* 00C90 8089ADC0 3C10808A */ lui $s0, %hi(D_8089B014) ## $s0 = 808A0000 -/* 00C94 8089ADC4 3C14808A */ lui $s4, %hi(D_8089B1D4) ## $s4 = 808A0000 -/* 00C98 8089ADC8 3C1E808A */ lui $s8, %hi(D_8089B270) ## $s8 = 808A0000 -/* 00C9C 8089ADCC 3C17DA38 */ lui $s7, 0xDA38 ## $s7 = DA380000 -/* 00CA0 8089ADD0 36F70003 */ ori $s7, $s7, 0x0003 ## $s7 = DA380003 -/* 00CA4 8089ADD4 27DEB270 */ addiu $s8, $s8, %lo(D_8089B270) ## $s8 = 8089B270 -/* 00CA8 8089ADD8 2694B1D4 */ addiu $s4, $s4, %lo(D_8089B1D4) ## $s4 = 8089B1D4 -/* 00CAC 8089ADDC 2610B014 */ addiu $s0, $s0, %lo(D_8089B014) ## $s0 = 8089B014 -/* 00CB0 8089ADE0 C434B2C0 */ lwc1 $f20, %lo(D_8089B2C0)($at) -/* 00CB4 8089ADE4 02209025 */ or $s2, $s1, $zero ## $s2 = 00000000 -/* 00CB8 8089ADE8 263301D0 */ addiu $s3, $s1, 0x01D0 ## $s3 = 000001D0 -.L8089ADEC: -/* 00CBC 8089ADEC C6040000 */ lwc1 $f4, 0x0000($s0) ## 8089B014 -/* 00CC0 8089ADF0 C64601D0 */ lwc1 $f6, 0x01D0($s2) ## 000001D0 -/* 00CC4 8089ADF4 C6100008 */ lwc1 $f16, 0x0008($s0) ## 8089B01C -/* 00CC8 8089ADF8 C65201D8 */ lwc1 $f18, 0x01D8($s2) ## 000001D8 -/* 00CCC 8089ADFC 46062300 */ add.s $f12, $f4, $f6 -/* 00CD0 8089AE00 C6080004 */ lwc1 $f8, 0x0004($s0) ## 8089B018 -/* 00CD4 8089AE04 C64A01D4 */ lwc1 $f10, 0x01D4($s2) ## 000001D4 -/* 00CD8 8089AE08 46128100 */ add.s $f4, $f16, $f18 -/* 00CDC 8089AE0C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00CE0 8089AE10 460A4380 */ add.s $f14, $f8, $f10 -/* 00CE4 8089AE14 44062000 */ mfc1 $a2, $f4 -/* 00CE8 8089AE18 0C034261 */ jal Matrix_Translate -/* 00CEC 8089AE1C 00000000 */ nop -/* 00CF0 8089AE20 866E001A */ lh $t6, 0x001A($s3) ## 000001EA -/* 00CF4 8089AE24 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00CF8 8089AE28 448E3000 */ mtc1 $t6, $f6 ## $f6 = 0.00 -/* 00CFC 8089AE2C 00000000 */ nop -/* 00D00 8089AE30 46803220 */ cvt.s.w $f8, $f6 -/* 00D04 8089AE34 46184302 */ mul.s $f12, $f8, $f24 -/* 00D08 8089AE38 0C034348 */ jal Matrix_RotateY -/* 00D0C 8089AE3C 00000000 */ nop -/* 00D10 8089AE40 866F0018 */ lh $t7, 0x0018($s3) ## 000001E8 -/* 00D14 8089AE44 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00D18 8089AE48 448F5000 */ mtc1 $t7, $f10 ## $f10 = 0.00 -/* 00D1C 8089AE4C 00000000 */ nop -/* 00D20 8089AE50 46805420 */ cvt.s.w $f16, $f10 -/* 00D24 8089AE54 46188302 */ mul.s $f12, $f16, $f24 -/* 00D28 8089AE58 0C0342DC */ jal Matrix_RotateX -/* 00D2C 8089AE5C 00000000 */ nop -/* 00D30 8089AE60 4406A000 */ mfc1 $a2, $f20 -/* 00D34 8089AE64 4600A306 */ mov.s $f12, $f20 -/* 00D38 8089AE68 4600A386 */ mov.s $f14, $f20 -/* 00D3C 8089AE6C 0C0342A3 */ jal Matrix_Scale -/* 00D40 8089AE70 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00D44 8089AE74 C6120000 */ lwc1 $f18, 0x0000($s0) ## 8089B014 -/* 00D48 8089AE78 C6040004 */ lwc1 $f4, 0x0004($s0) ## 8089B018 -/* 00D4C 8089AE7C C6060008 */ lwc1 $f6, 0x0008($s0) ## 8089B01C -/* 00D50 8089AE80 46169302 */ mul.s $f12, $f18, $f22 -/* 00D54 8089AE84 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00D58 8089AE88 46162382 */ mul.s $f14, $f4, $f22 -/* 00D5C 8089AE8C 00000000 */ nop -/* 00D60 8089AE90 46163202 */ mul.s $f8, $f6, $f22 -/* 00D64 8089AE94 44064000 */ mfc1 $a2, $f8 -/* 00D68 8089AE98 0C034261 */ jal Matrix_Translate -/* 00D6C 8089AE9C 00000000 */ nop -/* 00D70 8089AEA0 8EA202C0 */ lw $v0, 0x02C0($s5) ## 000002C0 -/* 00D74 8089AEA4 03C02825 */ or $a1, $s8, $zero ## $a1 = 8089B270 -/* 00D78 8089AEA8 2406030A */ addiu $a2, $zero, 0x030A ## $a2 = 0000030A -/* 00D7C 8089AEAC 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00D80 8089AEB0 AEB802C0 */ sw $t8, 0x02C0($s5) ## 000002C0 -/* 00D84 8089AEB4 AC570000 */ sw $s7, 0x0000($v0) ## 00000000 -/* 00D88 8089AEB8 8EC40000 */ lw $a0, 0x0000($s6) ## 00000000 -/* 00D8C 8089AEBC 0C0346A2 */ jal Matrix_NewMtx -/* 00D90 8089AEC0 00408825 */ or $s1, $v0, $zero ## $s1 = 00000000 -/* 00D94 8089AEC4 AE220004 */ sw $v0, 0x0004($s1) ## 00000004 -/* 00D98 8089AEC8 8EA202C0 */ lw $v0, 0x02C0($s5) ## 000002C0 -/* 00D9C 8089AECC 3C08DE00 */ lui $t0, 0xDE00 ## $t0 = DE000000 -/* 00DA0 8089AED0 3C0A808A */ lui $t2, %hi(D_8089B208) ## $t2 = 808A0000 -/* 00DA4 8089AED4 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 00DA8 8089AED8 AEB902C0 */ sw $t9, 0x02C0($s5) ## 000002C0 -/* 00DAC 8089AEDC AC480000 */ sw $t0, 0x0000($v0) ## 00000000 -/* 00DB0 8089AEE0 8E890000 */ lw $t1, 0x0000($s4) ## 8089B1D4 -/* 00DB4 8089AEE4 254AB208 */ addiu $t2, $t2, %lo(D_8089B208) ## $t2 = 8089B208 -/* 00DB8 8089AEE8 26940004 */ addiu $s4, $s4, 0x0004 ## $s4 = 8089B1D8 -/* 00DBC 8089AEEC 2652001C */ addiu $s2, $s2, 0x001C ## $s2 = 0000001C -/* 00DC0 8089AEF0 2673001C */ addiu $s3, $s3, 0x001C ## $s3 = 000001EC -/* 00DC4 8089AEF4 26100018 */ addiu $s0, $s0, 0x0018 ## $s0 = 8089B02C -/* 00DC8 8089AEF8 168AFFBC */ bne $s4, $t2, .L8089ADEC -/* 00DCC 8089AEFC AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00DD0 8089AF00 3C06808A */ lui $a2, %hi(D_8089B288) ## $a2 = 808A0000 -/* 00DD4 8089AF04 24C6B288 */ addiu $a2, $a2, %lo(D_8089B288) ## $a2 = 8089B288 -/* 00DD8 8089AF08 27A40078 */ addiu $a0, $sp, 0x0078 ## $a0 = FFFFFFE0 -/* 00DDC 8089AF0C 8EC50000 */ lw $a1, 0x0000($s6) ## 00000000 -/* 00DE0 8089AF10 0C031AD5 */ jal Graph_CloseDisps -/* 00DE4 8089AF14 2407030F */ addiu $a3, $zero, 0x030F ## $a3 = 0000030F -/* 00DE8 8089AF18 8FBF0054 */ lw $ra, 0x0054($sp) -/* 00DEC 8089AF1C D7B40018 */ ldc1 $f20, 0x0018($sp) -/* 00DF0 8089AF20 D7B60020 */ ldc1 $f22, 0x0020($sp) -/* 00DF4 8089AF24 D7B80028 */ ldc1 $f24, 0x0028($sp) -/* 00DF8 8089AF28 8FB00030 */ lw $s0, 0x0030($sp) -/* 00DFC 8089AF2C 8FB10034 */ lw $s1, 0x0034($sp) -/* 00E00 8089AF30 8FB20038 */ lw $s2, 0x0038($sp) -/* 00E04 8089AF34 8FB3003C */ lw $s3, 0x003C($sp) -/* 00E08 8089AF38 8FB40040 */ lw $s4, 0x0040($sp) -/* 00E0C 8089AF3C 8FB50044 */ lw $s5, 0x0044($sp) -/* 00E10 8089AF40 8FB60048 */ lw $s6, 0x0048($sp) -/* 00E14 8089AF44 8FB7004C */ lw $s7, 0x004C($sp) -/* 00E18 8089AF48 8FBE0050 */ lw $s8, 0x0050($sp) -/* 00E1C 8089AF4C 03E00008 */ jr $ra -/* 00E20 8089AF50 27BD0098 */ addiu $sp, $sp, 0x0098 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Movebg/BgMizuMovebg_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Movebg/BgMizuMovebg_Init.s index a4af4c4adc..26ec219398 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Movebg/BgMizuMovebg_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Movebg/BgMizuMovebg_Init.s @@ -264,7 +264,7 @@ glabel L8089DF24 /* 003F0 8089E020 AFB80020 */ sw $t8, 0x0020($sp) /* 003F4 8089E024 86190034 */ lh $t9, 0x0034($s0) ## 00000034 /* 003F8 8089E028 AFA90028 */ sw $t1, 0x0028($sp) -/* 003FC 8089E02C 0C00C916 */ jal Actor_SpawnAttached +/* 003FC 8089E02C 0C00C916 */ jal Actor_SpawnAsChild /* 00400 8089E030 AFB90024 */ sw $t9, 0x0024($sp) /* 00404 8089E034 54400004 */ bnel $v0, $zero, .L8089E048 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A0EF4.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A0EF4.s index 5384a2720c..731671d44a 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A0EF4.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A0EF4.s @@ -40,7 +40,7 @@ glabel func_808A0EF4 /* 00398 808A0F58 E7A40010 */ swc1 $f4, 0x0010($sp) /* 0039C 808A0F5C E7A60014 */ swc1 $f6, 0x0014($sp) /* 003A0 808A0F60 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 003A4 808A0F64 0C00C916 */ jal Actor_SpawnAttached +/* 003A4 808A0F64 0C00C916 */ jal Actor_SpawnAsChild /* 003A8 808A0F68 E7A80018 */ swc1 $f8, 0x0018($sp) /* 003AC 808A0F6C 10400006 */ beq $v0, $zero, .L808A0F88 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A1190.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A1190.s index 98d3438c0d..51c9e16484 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A1190.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Bigst/func_808A1190.s @@ -50,7 +50,7 @@ glabel func_808A1190 /* 0063C 808A11FC AFA00024 */ sw $zero, 0x0024($sp) /* 00640 808A1200 E7A40010 */ swc1 $f4, 0x0010($sp) /* 00644 808A1204 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 00648 808A1208 0C00C916 */ jal Actor_SpawnAttached +/* 00648 808A1208 0C00C916 */ jal Actor_SpawnAsChild /* 0064C 808A120C E7A80018 */ swc1 $f8, 0x0018($sp) /* 00650 808A1210 10400006 */ beq $v0, $zero, .L808A122C @@ -82,7 +82,7 @@ glabel func_808A1190 /* 006AC 808A126C AFA00024 */ sw $zero, 0x0024($sp) /* 006B0 808A1270 E7AA0010 */ swc1 $f10, 0x0010($sp) /* 006B4 808A1274 E7B00014 */ swc1 $f16, 0x0014($sp) -/* 006B8 808A1278 0C00C916 */ jal Actor_SpawnAttached +/* 006B8 808A1278 0C00C916 */ jal Actor_SpawnAsChild /* 006BC 808A127C E7B20018 */ swc1 $f18, 0x0018($sp) /* 006C0 808A1280 10400006 */ beq $v0, $zero, .L808A129C diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashigo/func_808A2698.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashigo/func_808A2698.s index af6db6f13c..8ddb9a600f 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashigo/func_808A2698.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashigo/func_808A2698.s @@ -47,7 +47,7 @@ glabel func_808A2698 /* 001BC 808A271C AFAF0020 */ sw $t7, 0x0020($sp) /* 001C0 808A2720 86180034 */ lh $t8, 0x0034($s0) ## 00000034 /* 001C4 808A2724 AFA00028 */ sw $zero, 0x0028($sp) -/* 001C8 808A2728 0C00C916 */ jal Actor_SpawnAttached +/* 001C8 808A2728 0C00C916 */ jal Actor_SpawnAsChild /* 001CC 808A272C AFB80024 */ sw $t8, 0x0024($sp) /* 001D0 808A2730 10400003 */ beq $v0, $zero, .L808A2740 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A6210.s b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A6210.s index 99fd9ca0e1..58f970d081 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A6210.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A6210.s @@ -176,7 +176,7 @@ glabel func_808A6210 /* 00274 808A6484 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 00278 808A6488 24070093 */ addiu $a3, $zero, 0x0093 ## $a3 = 00000093 /* 0027C 808A648C 018D7021 */ addu $t6, $t4, $t5 -/* 00280 808A6490 0C00C916 */ jal Actor_SpawnAttached +/* 00280 808A6490 0C00C916 */ jal Actor_SpawnAsChild /* 00284 808A6494 AFAE0028 */ sw $t6, 0x0028($sp) /* 00288 808A6498 54400006 */ bnel $v0, $zero, .L808A64B4 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A658C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A658C.s index 3424f9d478..bef0319366 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A658C.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Event/func_808A658C.s @@ -63,7 +63,7 @@ glabel func_808A658C /* 00454 808A6664 AFAC0024 */ sw $t4, 0x0024($sp) /* 00458 808A6668 8619001C */ lh $t9, 0x001C($s0) ## 0000001C /* 0045C 808A666C 03195021 */ addu $t2, $t8, $t9 -/* 00460 808A6670 0C00C916 */ jal Actor_SpawnAttached +/* 00460 808A6670 0C00C916 */ jal Actor_SpawnAsChild /* 00464 808A6674 AFAA0028 */ sw $t2, 0x0028($sp) /* 00468 808A6678 54400006 */ bnel $v0, $zero, .L808A6694 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s index 94e60fd6d1..56ec96f233 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s @@ -188,7 +188,7 @@ glabel BgSpot00Hanebasi_Init /* 00290 808A9A10 860900B6 */ lh $t1, 0x00B6($s0) ## 000000B6 /* 00294 808A9A14 AFA00028 */ sw $zero, 0x0028($sp) /* 00298 808A9A18 AFA00024 */ sw $zero, 0x0024($sp) -/* 0029C 808A9A1C 0C00C916 */ jal Actor_SpawnAttached +/* 0029C 808A9A1C 0C00C916 */ jal Actor_SpawnAsChild /* 002A0 808A9A20 AFA90020 */ sw $t1, 0x0020($sp) /* 002A4 808A9A24 14400003 */ bne $v0, $zero, .L808A9A34 @@ -236,7 +236,7 @@ glabel BgSpot00Hanebasi_Init /* 00338 808A9AB8 860E00B6 */ lh $t6, 0x00B6($s0) ## 000000B6 /* 0033C 808A9ABC AFAF0028 */ sw $t7, 0x0028($sp) /* 00340 808A9AC0 AFA00024 */ sw $zero, 0x0024($sp) -/* 00344 808A9AC4 0C00C916 */ jal Actor_SpawnAttached +/* 00344 808A9AC4 0C00C916 */ jal Actor_SpawnAsChild /* 00348 808A9AC8 AFAE0020 */ sw $t6, 0x0020($sp) /* 0034C 808A9ACC 14400005 */ bne $v0, $zero, .L808A9AE4 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s index cbff853bb0..5675736577 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s @@ -111,7 +111,7 @@ glabel L808AC394 /* 002F4 808AC434 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000 /* 002F8 808AC438 00084A00 */ sll $t1, $t0, 8 /* 002FC 808AC43C 252A0001 */ addiu $t2, $t1, 0x0001 ## $t2 = 00000001 -/* 00300 808AC440 0C00C916 */ jal Actor_SpawnAttached +/* 00300 808AC440 0C00C916 */ jal Actor_SpawnAsChild /* 00304 808AC444 AFAA0028 */ sw $t2, 0x0028($sp) glabel L808AC448 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B1054.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B1054.s index de7bb38347..118e82ed50 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B1054.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot08_Iceblock/func_808B1054.s @@ -41,7 +41,7 @@ glabel func_808B1054 /* 00788 808B10E8 86080018 */ lh $t0, 0x0018($s0) ## 00000018 /* 0078C 808B10EC E7AC0040 */ swc1 $f12, 0x0040($sp) /* 00790 808B10F0 AFA90028 */ sw $t1, 0x0028($sp) -/* 00794 808B10F4 0C00C916 */ jal Actor_SpawnAttached +/* 00794 808B10F4 0C00C916 */ jal Actor_SpawnAsChild /* 00798 808B10F8 AFA80024 */ sw $t0, 0x0024($sp) /* 0079C 808B10FC C7AC0040 */ lwc1 $f12, 0x0040($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s deleted file mode 100644 index ad6bd959f7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s +++ /dev/null @@ -1,21 +0,0 @@ -glabel BgSpot11Bakudankabe_Destroy -/* 00454 808B25D4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00458 808B25D8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0045C 808B25DC 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00460 808B25E0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00464 808B25E4 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 00468 808B25E8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0046C 808B25EC 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 00470 808B25F0 AFA7001C */ sw $a3, 0x001C($sp) -/* 00474 808B25F4 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00478 808B25F8 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 0047C 808B25FC 8FA50018 */ lw $a1, 0x0018($sp) -/* 00480 808B2600 8FA4001C */ lw $a0, 0x001C($sp) -/* 00484 808B2604 0C0170EB */ jal Collider_DestroyCylinder - -/* 00488 808B2608 24A50164 */ addiu $a1, $a1, 0x0164 ## $a1 = 00000164 -/* 0048C 808B260C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00490 808B2610 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00494 808B2614 03E00008 */ jr $ra -/* 00498 808B2618 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s deleted file mode 100644 index a2a8c8cfd9..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s +++ /dev/null @@ -1,13 +0,0 @@ -glabel BgSpot11Bakudankabe_Draw -/* 00534 808B26B4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00538 808B26B8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0053C 808B26BC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00540 808B26C0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00544 808B26C4 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 00548 808B26C8 0C00D498 */ jal Gfx_DrawDListOpa - -/* 0054C 808B26CC 24A51980 */ addiu $a1, $a1, 0x1980 ## $a1 = 06001980 -/* 00550 808B26D0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00554 808B26D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00558 808B26D8 03E00008 */ jr $ra -/* 0055C 808B26DC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s deleted file mode 100644 index 499deace6c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s +++ /dev/null @@ -1,58 +0,0 @@ -.rdata -glabel D_808B2750 - .asciz "(spot11 爆弾壁)(arg_data 0x%04x)\n" - .balign 4 - -.text -glabel BgSpot11Bakudankabe_Init -/* 003AC 808B252C 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 003B0 808B2530 AFBF001C */ sw $ra, 0x001C($sp) -/* 003B4 808B2534 AFB00018 */ sw $s0, 0x0018($sp) -/* 003B8 808B2538 AFA50034 */ sw $a1, 0x0034($sp) -/* 003BC 808B253C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003C0 808B2540 AFA00024 */ sw $zero, 0x0024($sp) -/* 003C4 808B2544 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 003C8 808B2548 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 003CC 808B254C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 003D0 808B2550 8FA40034 */ lw $a0, 0x0034($sp) -/* 003D4 808B2554 0C00B2D0 */ jal Flags_GetSwitch - -/* 003D8 808B2558 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 003DC 808B255C 10400005 */ beq $v0, $zero, .L808B2574 -/* 003E0 808B2560 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003E4 808B2564 0C00B55C */ jal Actor_Kill - -/* 003E8 808B2568 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003EC 808B256C 10000015 */ beq $zero, $zero, .L808B25C4 -/* 003F0 808B2570 8FBF001C */ lw $ra, 0x001C($sp) -.L808B2574: -/* 003F4 808B2574 0C22C860 */ jal func_808B2180 -/* 003F8 808B2578 8FA50034 */ lw $a1, 0x0034($sp) -/* 003FC 808B257C 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00400 808B2580 24841A58 */ addiu $a0, $a0, 0x1A58 ## $a0 = 06001A58 -/* 00404 808B2584 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00408 808B2588 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 0040C 808B258C 8FA40034 */ lw $a0, 0x0034($sp) -/* 00410 808B2590 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00414 808B2594 8FA70024 */ lw $a3, 0x0024($sp) -/* 00418 808B2598 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 0041C 808B259C 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00420 808B25A0 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00424 808B25A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00428 808B25A8 0C00B58B */ jal Actor_SetScale - -/* 0042C 808B25AC 3C053F80 */ lui $a1, 0x3F80 ## $a1 = 3F800000 -/* 00430 808B25B0 3C04808B */ lui $a0, %hi(D_808B2750) ## $a0 = 808B0000 -/* 00434 808B25B4 24842750 */ addiu $a0, $a0, %lo(D_808B2750) ## $a0 = 808B2750 -/* 00438 808B25B8 0C00084C */ jal osSyncPrintf - -/* 0043C 808B25BC 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00440 808B25C0 8FBF001C */ lw $ra, 0x001C($sp) -.L808B25C4: -/* 00444 808B25C4 8FB00018 */ lw $s0, 0x0018($sp) -/* 00448 808B25C8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 0044C 808B25CC 03E00008 */ jr $ra -/* 00450 808B25D0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s deleted file mode 100644 index fed1eded9c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s +++ /dev/null @@ -1,45 +0,0 @@ -glabel BgSpot11Bakudankabe_Update -/* 0049C 808B261C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 004A0 808B2620 AFBF001C */ sw $ra, 0x001C($sp) -/* 004A4 808B2624 AFB10018 */ sw $s1, 0x0018($sp) -/* 004A8 808B2628 AFB00014 */ sw $s0, 0x0014($sp) -/* 004AC 808B262C 908E0175 */ lbu $t6, 0x0175($a0) ## 00000175 -/* 004B0 808B2630 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 004B4 808B2634 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 004B8 808B2638 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 004BC 808B263C 11E00013 */ beq $t7, $zero, .L808B268C -/* 004C0 808B2640 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 004C4 808B2644 0C22C886 */ jal func_808B2218 -/* 004C8 808B2648 00000000 */ nop -/* 004CC 808B264C 8625001C */ lh $a1, 0x001C($s1) ## 0000001C -/* 004D0 808B2650 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004D4 808B2654 0C00B2DD */ jal Flags_SetSwitch - -/* 004D8 808B2658 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 004DC 808B265C 3C05808B */ lui $a1, %hi(D_808B2738) ## $a1 = 808B0000 -/* 004E0 808B2660 24A52738 */ addiu $a1, $a1, %lo(D_808B2738) ## $a1 = 808B2738 -/* 004E4 808B2664 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004E8 808B2668 24060028 */ addiu $a2, $zero, 0x0028 ## $a2 = 00000028 -/* 004EC 808B266C 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 004F0 808B2670 24072810 */ addiu $a3, $zero, 0x2810 ## $a3 = 00002810 -/* 004F4 808B2674 0C01E221 */ jal func_80078884 -/* 004F8 808B2678 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802 -/* 004FC 808B267C 0C00B55C */ jal Actor_Kill - -/* 00500 808B2680 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00504 808B2684 10000007 */ beq $zero, $zero, .L808B26A4 -/* 00508 808B2688 8FBF001C */ lw $ra, 0x001C($sp) -.L808B268C: -/* 0050C 808B268C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00001E60 -/* 00510 808B2690 02012821 */ addu $a1, $s0, $at -/* 00514 808B2694 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00518 808B2698 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 0051C 808B269C 26260164 */ addiu $a2, $s1, 0x0164 ## $a2 = 00000164 -/* 00520 808B26A0 8FBF001C */ lw $ra, 0x001C($sp) -.L808B26A4: -/* 00524 808B26A4 8FB00014 */ lw $s0, 0x0014($sp) -/* 00528 808B26A8 8FB10018 */ lw $s1, 0x0018($sp) -/* 0052C 808B26AC 03E00008 */ jr $ra -/* 00530 808B26B0 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s deleted file mode 100644 index bce11791b1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s +++ /dev/null @@ -1,41 +0,0 @@ -glabel func_808B2180 -/* 00000 808B2180 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00004 808B2184 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00008 808B2188 AFA50024 */ sw $a1, 0x0024($sp) -/* 0000C 808B218C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00010 808B2190 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00014 808B2194 24C50164 */ addiu $a1, $a2, 0x0164 ## $a1 = 00000164 -/* 00018 808B2198 AFA50018 */ sw $a1, 0x0018($sp) -/* 0001C 808B219C 0C0170D9 */ jal Collider_InitCylinder - -/* 00020 808B21A0 AFA60020 */ sw $a2, 0x0020($sp) -/* 00024 808B21A4 3C07808B */ lui $a3, %hi(D_808B2700) ## $a3 = 808B0000 -/* 00028 808B21A8 8FA50018 */ lw $a1, 0x0018($sp) -/* 0002C 808B21AC 8FA60020 */ lw $a2, 0x0020($sp) -/* 00030 808B21B0 24E72700 */ addiu $a3, $a3, %lo(D_808B2700) ## $a3 = 808B2700 -/* 00034 808B21B4 0C01712B */ jal Collider_SetCylinder - -/* 00038 808B21B8 8FA40024 */ lw $a0, 0x0024($sp) -/* 0003C 808B21BC 8FA60020 */ lw $a2, 0x0020($sp) -/* 00040 808B21C0 C4C40024 */ lwc1 $f4, 0x0024($a2) ## 00000024 -/* 00044 808B21C4 C4C80028 */ lwc1 $f8, 0x0028($a2) ## 00000028 -/* 00048 808B21C8 C4D0002C */ lwc1 $f16, 0x002C($a2) ## 0000002C -/* 0004C 808B21CC 4600218D */ trunc.w.s $f6, $f4 -/* 00050 808B21D0 84CE01AA */ lh $t6, 0x01AA($a2) ## 000001AA -/* 00054 808B21D4 84CA01AC */ lh $t2, 0x01AC($a2) ## 000001AC -/* 00058 808B21D8 4600428D */ trunc.w.s $f10, $f8 -/* 0005C 808B21DC 44083000 */ mfc1 $t0, $f6 -/* 00060 808B21E0 84D901AE */ lh $t9, 0x01AE($a2) ## 000001AE -/* 00064 808B21E4 4600848D */ trunc.w.s $f18, $f16 -/* 00068 808B21E8 440F5000 */ mfc1 $t7, $f10 -/* 0006C 808B21EC 01C84821 */ addu $t1, $t6, $t0 -/* 00070 808B21F0 A4C901AA */ sh $t1, 0x01AA($a2) ## 000001AA -/* 00074 808B21F4 440B9000 */ mfc1 $t3, $f18 -/* 00078 808B21F8 014FC021 */ addu $t8, $t2, $t7 -/* 0007C 808B21FC A4D801AC */ sh $t8, 0x01AC($a2) ## 000001AC -/* 00080 808B2200 032B6021 */ addu $t4, $t9, $t3 -/* 00084 808B2204 A4CC01AE */ sh $t4, 0x01AE($a2) ## 000001AE -/* 00088 808B2208 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0008C 808B220C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00090 808B2210 03E00008 */ jr $ra -/* 00094 808B2214 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s deleted file mode 100644 index 052f8f90b2..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s +++ /dev/null @@ -1,218 +0,0 @@ -.late_rodata -glabel D_808B2774 - .float 0.2 -glabel D_808B2778 - .float 0.4 - -.text -glabel func_808B2218 -/* 00098 808B2218 27BDFF28 */ addiu $sp, $sp, 0xFF28 ## $sp = FFFFFF28 -/* 0009C 808B221C F7BE0070 */ sdc1 $f30, 0x0070($sp) -/* 000A0 808B2220 3C01808B */ lui $at, %hi(D_808B2774) ## $at = 808B0000 -/* 000A4 808B2224 C43E2774 */ lwc1 $f30, %lo(D_808B2774)($at) -/* 000A8 808B2228 F7BC0068 */ sdc1 $f28, 0x0068($sp) -/* 000AC 808B222C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 000B0 808B2230 4481E000 */ mtc1 $at, $f28 ## $f28 = 20.00 -/* 000B4 808B2234 F7BA0060 */ sdc1 $f26, 0x0060($sp) -/* 000B8 808B2238 3C0140D0 */ lui $at, 0x40D0 ## $at = 40D00000 -/* 000BC 808B223C 4481D000 */ mtc1 $at, $f26 ## $f26 = 6.50 -/* 000C0 808B2240 F7B80058 */ sdc1 $f24, 0x0058($sp) -/* 000C4 808B2244 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 000C8 808B2248 4481C000 */ mtc1 $at, $f24 ## $f24 = 30.00 -/* 000CC 808B224C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 000D0 808B2250 F7B60050 */ sdc1 $f22, 0x0050($sp) -/* 000D4 808B2254 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -/* 000D8 808B2258 4481B000 */ mtc1 $at, $f22 ## $f22 = 120.00 -/* 000DC 808B225C AFB70094 */ sw $s7, 0x0094($sp) -/* 000E0 808B2260 F7B40048 */ sdc1 $f20, 0x0048($sp) -/* 000E4 808B2264 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 000E8 808B2268 AFBE0098 */ sw $s8, 0x0098($sp) -/* 000EC 808B226C AFB60090 */ sw $s6, 0x0090($sp) -/* 000F0 808B2270 AFB5008C */ sw $s5, 0x008C($sp) -/* 000F4 808B2274 AFB20080 */ sw $s2, 0x0080($sp) -/* 000F8 808B2278 AFB1007C */ sw $s1, 0x007C($sp) -/* 000FC 808B227C 3C170501 */ lui $s7, 0x0501 ## $s7 = 05010000 -/* 00100 808B2280 4481A000 */ mtc1 $at, $f20 ## $f20 = 0.50 -/* 00104 808B2284 AFBF009C */ sw $ra, 0x009C($sp) -/* 00108 808B2288 AFB40088 */ sw $s4, 0x0088($sp) -/* 0010C 808B228C AFB30084 */ sw $s3, 0x0084($sp) -/* 00110 808B2290 AFB00078 */ sw $s0, 0x0078($sp) -/* 00114 808B2294 AFA500DC */ sw $a1, 0x00DC($sp) -/* 00118 808B2298 26F7A880 */ addiu $s7, $s7, 0xA880 ## $s7 = 0500A880 -/* 0011C 808B229C 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000 -/* 00120 808B22A0 27B200C8 */ addiu $s2, $sp, 0x00C8 ## $s2 = FFFFFFF0 -/* 00124 808B22A4 24950024 */ addiu $s5, $a0, 0x0024 ## $s5 = 00000024 -/* 00128 808B22A8 27B600BC */ addiu $s6, $sp, 0x00BC ## $s6 = FFFFFFE4 -/* 0012C 808B22AC 241E0014 */ addiu $s8, $zero, 0x0014 ## $s8 = 00000014 -/* 00130 808B22B0 E7A000C4 */ swc1 $f0, 0x00C4($sp) -/* 00134 808B22B4 E7A000BC */ swc1 $f0, 0x00BC($sp) -.L808B22B8: -/* 00138 808B22B8 3C05808B */ lui $a1, %hi(D_808B272C) ## $a1 = 808B0000 -/* 0013C 808B22BC 24A5272C */ addiu $a1, $a1, %lo(D_808B272C) ## $a1 = 808B272C -/* 00140 808B22C0 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000024 -/* 00144 808B22C4 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 00148 808B22C8 02403025 */ or $a2, $s2, $zero ## $a2 = FFFFFFF0 -/* 0014C 808B22CC 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00150 808B22D0 00000000 */ nop -/* 00154 808B22D4 46140181 */ sub.s $f6, $f0, $f20 -/* 00158 808B22D8 44919000 */ mtc1 $s1, $f18 ## $f18 = 0.00 -/* 0015C 808B22DC C7A400C8 */ lwc1 $f4, 0x00C8($sp) -/* 00160 808B22E0 C7B000CC */ lwc1 $f16, 0x00CC($sp) -/* 00164 808B22E4 46163202 */ mul.s $f8, $f6, $f22 -/* 00168 808B22E8 468091A0 */ cvt.s.w $f6, $f18 -/* 0016C 808B22EC 46082280 */ add.s $f10, $f4, $f8 -/* 00170 808B22F0 461A3102 */ mul.s $f4, $f6, $f26 -/* 00174 808B22F4 E7AA00C8 */ swc1 $f10, 0x00C8($sp) -/* 00178 808B22F8 4604C200 */ add.s $f8, $f24, $f4 -/* 0017C 808B22FC 46088280 */ add.s $f10, $f16, $f8 -/* 00180 808B2300 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00184 808B2304 E7AA00CC */ swc1 $f10, 0x00CC($sp) -/* 00188 808B2308 46140181 */ sub.s $f6, $f0, $f20 -/* 0018C 808B230C C7B200D0 */ lwc1 $f18, 0x00D0($sp) -/* 00190 808B2310 461C3102 */ mul.s $f4, $f6, $f28 -/* 00194 808B2314 46049400 */ add.s $f16, $f18, $f4 -/* 00198 808B2318 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 0019C 808B231C E7B000D0 */ swc1 $f16, 0x00D0($sp) -/* 001A0 808B2320 461E0201 */ sub.s $f8, $f0, $f30 -/* 001A4 808B2324 3C014140 */ lui $at, 0x4140 ## $at = 41400000 -/* 001A8 808B2328 44815000 */ mtc1 $at, $f10 ## $f10 = 12.00 -/* 001AC 808B232C 00000000 */ nop -/* 001B0 808B2330 460A4182 */ mul.s $f6, $f8, $f10 -/* 001B4 808B2334 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 001B8 808B2338 E7A600C0 */ swc1 $f6, 0x00C0($sp) -/* 001BC 808B233C 3C01425C */ lui $at, 0x425C ## $at = 425C0000 -/* 001C0 808B2340 44819000 */ mtc1 $at, $f18 ## $f18 = 55.00 -/* 001C4 808B2344 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 001C8 808B2348 44818000 */ mtc1 $at, $f16 ## $f16 = 8.00 -/* 001CC 808B234C 46120102 */ mul.s $f4, $f0, $f18 -/* 001D0 808B2350 46102200 */ add.s $f8, $f4, $f16 -/* 001D4 808B2354 4600428D */ trunc.w.s $f10, $f8 -/* 001D8 808B2358 44025000 */ mfc1 $v0, $f10 -/* 001DC 808B235C 00000000 */ nop -/* 001E0 808B2360 00021C00 */ sll $v1, $v0, 16 -/* 001E4 808B2364 00031C03 */ sra $v1, $v1, 16 -/* 001E8 808B2368 28610014 */ slti $at, $v1, 0x0014 -/* 001EC 808B236C 00029C00 */ sll $s3, $v0, 16 -/* 001F0 808B2370 10200003 */ beq $at, $zero, .L808B2380 -/* 001F4 808B2374 00139C03 */ sra $s3, $s3, 16 -/* 001F8 808B2378 10000006 */ beq $zero, $zero, .L808B2394 -/* 001FC 808B237C 2410FED4 */ addiu $s0, $zero, 0xFED4 ## $s0 = FFFFFED4 -.L808B2380: -/* 00200 808B2380 28610023 */ slti $at, $v1, 0x0023 -/* 00204 808B2384 10200003 */ beq $at, $zero, .L808B2394 -/* 00208 808B2388 2410FE5C */ addiu $s0, $zero, 0xFE5C ## $s0 = FFFFFE5C -/* 0020C 808B238C 10000001 */ beq $zero, $zero, .L808B2394 -/* 00210 808B2390 2410FE98 */ addiu $s0, $zero, 0xFE98 ## $s0 = FFFFFE98 -.L808B2394: -/* 00214 808B2394 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00218 808B2398 00000000 */ nop -/* 0021C 808B239C 3C01808B */ lui $at, %hi(D_808B2778) ## $at = 808B0000 -/* 00220 808B23A0 C4262778 */ lwc1 $f6, %lo(D_808B2778)($at) -/* 00224 808B23A4 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00228 808B23A8 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 0022C 808B23AC 4606003C */ c.lt.s $f0, $f6 -/* 00230 808B23B0 02C03025 */ or $a2, $s6, $zero ## $a2 = FFFFFFE4 -/* 00234 808B23B4 02403825 */ or $a3, $s2, $zero ## $a3 = FFFFFFF0 -/* 00238 808B23B8 240F001E */ addiu $t7, $zero, 0x001E ## $t7 = 0000001E -/* 0023C 808B23BC 45000003 */ bc1f .L808B23CC -/* 00240 808B23C0 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004 -/* 00244 808B23C4 10000002 */ beq $zero, $zero, .L808B23D0 -/* 00248 808B23C8 24020041 */ addiu $v0, $zero, 0x0041 ## $v0 = 00000041 -.L808B23CC: -/* 0024C 808B23CC 24020021 */ addiu $v0, $zero, 0x0021 ## $v0 = 00000021 -.L808B23D0: -/* 00250 808B23D0 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 00254 808B23D4 24080003 */ addiu $t0, $zero, 0x0003 ## $t0 = 00000003 -/* 00258 808B23D8 24090050 */ addiu $t1, $zero, 0x0050 ## $t1 = 00000050 -/* 0025C 808B23DC 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 00260 808B23E0 240B0002 */ addiu $t3, $zero, 0x0002 ## $t3 = 00000002 -/* 00264 808B23E4 AFAB0038 */ sw $t3, 0x0038($sp) -/* 00268 808B23E8 AFAA0034 */ sw $t2, 0x0034($sp) -/* 0026C 808B23EC AFA90030 */ sw $t1, 0x0030($sp) -/* 00270 808B23F0 AFA8002C */ sw $t0, 0x002C($sp) -/* 00274 808B23F4 AFB90028 */ sw $t9, 0x0028($sp) -/* 00278 808B23F8 AFB00010 */ sw $s0, 0x0010($sp) -/* 0027C 808B23FC AFA20014 */ sw $v0, 0x0014($sp) -/* 00280 808B2400 AFAF0018 */ sw $t7, 0x0018($sp) -/* 00284 808B2404 AFB8001C */ sw $t8, 0x001C($sp) -/* 00288 808B2408 AFA00020 */ sw $zero, 0x0020($sp) -/* 0028C 808B240C AFB30024 */ sw $s3, 0x0024($sp) -/* 00290 808B2410 0C00A7A3 */ jal func_80029E8C - -/* 00294 808B2414 AFB7003C */ sw $s7, 0x003C($sp) -/* 00298 808B2418 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001 -/* 0029C 808B241C 163EFFA6 */ bne $s1, $s8, .L808B22B8 -/* 002A0 808B2420 00000000 */ nop -/* 002A4 808B2424 3C05808B */ lui $a1, %hi(D_808B272C) ## $a1 = 808B0000 -/* 002A8 808B2428 24A5272C */ addiu $a1, $a1, %lo(D_808B272C) ## $a1 = 808B272C -/* 002AC 808B242C 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000024 -/* 002B0 808B2430 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 002B4 808B2434 02403025 */ or $a2, $s2, $zero ## $a2 = FFFFFFF0 -/* 002B8 808B2438 3C01428C */ lui $at, 0x428C ## $at = 428C0000 -/* 002BC 808B243C 4481A000 */ mtc1 $at, $f20 ## $f20 = 70.00 -/* 002C0 808B2440 240C006E */ addiu $t4, $zero, 0x006E ## $t4 = 0000006E -/* 002C4 808B2444 240D00A0 */ addiu $t5, $zero, 0x00A0 ## $t5 = 000000A0 -/* 002C8 808B2448 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 002CC 808B244C 4406A000 */ mfc1 $a2, $f20 -/* 002D0 808B2450 AFAE0018 */ sw $t6, 0x0018($sp) -/* 002D4 808B2454 AFAD0014 */ sw $t5, 0x0014($sp) -/* 002D8 808B2458 AFAC0010 */ sw $t4, 0x0010($sp) -/* 002DC 808B245C 8FA400DC */ lw $a0, 0x00DC($sp) -/* 002E0 808B2460 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 002E4 808B2464 0C00CD20 */ jal func_80033480 -/* 002E8 808B2468 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 002EC 808B246C 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 002F0 808B2470 4481B000 */ mtc1 $at, $f22 ## $f22 = 40.00 -/* 002F4 808B2474 C7B200CC */ lwc1 $f18, 0x00CC($sp) -/* 002F8 808B2478 4406A000 */ mfc1 $a2, $f20 -/* 002FC 808B247C 240F006E */ addiu $t7, $zero, 0x006E ## $t7 = 0000006E -/* 00300 808B2480 46169100 */ add.s $f4, $f18, $f22 -/* 00304 808B2484 241800A0 */ addiu $t8, $zero, 0x00A0 ## $t8 = 000000A0 -/* 00308 808B2488 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 0030C 808B248C AFB90018 */ sw $t9, 0x0018($sp) -/* 00310 808B2490 E7A400CC */ swc1 $f4, 0x00CC($sp) -/* 00314 808B2494 AFB80014 */ sw $t8, 0x0014($sp) -/* 00318 808B2498 AFAF0010 */ sw $t7, 0x0010($sp) -/* 0031C 808B249C 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00320 808B24A0 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 00324 808B24A4 0C00CD20 */ jal func_80033480 -/* 00328 808B24A8 24070005 */ addiu $a3, $zero, 0x0005 ## $a3 = 00000005 -/* 0032C 808B24AC C7B000CC */ lwc1 $f16, 0x00CC($sp) -/* 00330 808B24B0 4406A000 */ mfc1 $a2, $f20 -/* 00334 808B24B4 2408006E */ addiu $t0, $zero, 0x006E ## $t0 = 0000006E -/* 00338 808B24B8 46168200 */ add.s $f8, $f16, $f22 -/* 0033C 808B24BC 240900A0 */ addiu $t1, $zero, 0x00A0 ## $t1 = 000000A0 -/* 00340 808B24C0 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00344 808B24C4 AFAA0018 */ sw $t2, 0x0018($sp) -/* 00348 808B24C8 E7A800CC */ swc1 $f8, 0x00CC($sp) -/* 0034C 808B24CC AFA90014 */ sw $t1, 0x0014($sp) -/* 00350 808B24D0 AFA80010 */ sw $t0, 0x0010($sp) -/* 00354 808B24D4 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00358 808B24D8 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 0035C 808B24DC 0C00CD20 */ jal func_80033480 -/* 00360 808B24E0 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 00364 808B24E4 8FBF009C */ lw $ra, 0x009C($sp) -/* 00368 808B24E8 D7B40048 */ ldc1 $f20, 0x0048($sp) -/* 0036C 808B24EC D7B60050 */ ldc1 $f22, 0x0050($sp) -/* 00370 808B24F0 D7B80058 */ ldc1 $f24, 0x0058($sp) -/* 00374 808B24F4 D7BA0060 */ ldc1 $f26, 0x0060($sp) -/* 00378 808B24F8 D7BC0068 */ ldc1 $f28, 0x0068($sp) -/* 0037C 808B24FC D7BE0070 */ ldc1 $f30, 0x0070($sp) -/* 00380 808B2500 8FB00078 */ lw $s0, 0x0078($sp) -/* 00384 808B2504 8FB1007C */ lw $s1, 0x007C($sp) -/* 00388 808B2508 8FB20080 */ lw $s2, 0x0080($sp) -/* 0038C 808B250C 8FB30084 */ lw $s3, 0x0084($sp) -/* 00390 808B2510 8FB40088 */ lw $s4, 0x0088($sp) -/* 00394 808B2514 8FB5008C */ lw $s5, 0x008C($sp) -/* 00398 808B2518 8FB60090 */ lw $s6, 0x0090($sp) -/* 0039C 808B251C 8FB70094 */ lw $s7, 0x0094($sp) -/* 003A0 808B2520 8FBE0098 */ lw $s8, 0x0098($sp) -/* 003A4 808B2524 03E00008 */ jr $ra -/* 003A8 808B2528 27BD00D8 */ addiu $sp, $sp, 0x00D8 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Destroy.s deleted file mode 100644 index f080b52d74..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel BgSpot17Bakudankabe_Destroy -/* 003C0 808B6F80 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 003C4 808B6F84 AFA40018 */ sw $a0, 0x0018($sp) -/* 003C8 808B6F88 8FAE0018 */ lw $t6, 0x0018($sp) -/* 003CC 808B6F8C AFBF0014 */ sw $ra, 0x0014($sp) -/* 003D0 808B6F90 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 003D4 808B6F94 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 003D8 808B6F98 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 003DC 808B6F9C 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 003E0 808B6FA0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003E4 808B6FA4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 003E8 808B6FA8 03E00008 */ jr $ra -/* 003EC 808B6FAC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Draw.s deleted file mode 100644 index c39c6377b0..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Draw.s +++ /dev/null @@ -1,172 +0,0 @@ -.rdata -glabel D_808B72B0 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -glabel D_808B72D0 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -glabel D_808B72F0 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -glabel D_808B7310 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -glabel D_808B7330 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -glabel D_808B7350 - .asciz "../z_bg_spot17_bakudankabe.c" - .balign 4 - -.text -glabel BgSpot17Bakudankabe_Draw -/* 00484 808B7044 27BDFF98 */ addiu $sp, $sp, 0xFF98 ## $sp = FFFFFF98 -/* 00488 808B7048 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0048C 808B704C AFBF001C */ sw $ra, 0x001C($sp) -/* 00490 808B7050 AFB00018 */ sw $s0, 0x0018($sp) -/* 00494 808B7054 AFA40068 */ sw $a0, 0x0068($sp) -/* 00498 808B7058 00A11821 */ addu $v1, $a1, $at -/* 0049C 808B705C 8C641DE4 */ lw $a0, 0x1DE4($v1) ## 00001DE4 -/* 004A0 808B7060 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 004A4 808B7064 AFA30020 */ sw $v1, 0x0020($sp) -/* 004A8 808B7068 00800821 */ addu $at, $a0, $zero -/* 004AC 808B706C 00042080 */ sll $a0, $a0, 2 -/* 004B0 808B7070 00812023 */ subu $a0, $a0, $at -/* 004B4 808B7074 00042100 */ sll $a0, $a0, 4 -/* 004B8 808B7078 00812023 */ subu $a0, $a0, $at -/* 004BC 808B707C 000420C0 */ sll $a0, $a0, 3 -/* 004C0 808B7080 00812023 */ subu $a0, $a0, $at -/* 004C4 808B7084 00042080 */ sll $a0, $a0, 2 -/* 004C8 808B7088 0C0411E0 */ jal coss - -/* 004CC 808B708C 3084FFFF */ andi $a0, $a0, 0xFFFF ## $a0 = 00000000 -/* 004D0 808B7090 8FA30020 */ lw $v1, 0x0020($sp) -/* 004D4 808B7094 00027203 */ sra $t6, $v0, 8 -/* 004D8 808B7098 A3AE0063 */ sb $t6, 0x0063($sp) -/* 004DC 808B709C 8C641DE4 */ lw $a0, 0x1DE4($v1) ## 00001DE4 -/* 004E0 808B70A0 00800821 */ addu $at, $a0, $zero -/* 004E4 808B70A4 00042080 */ sll $a0, $a0, 2 -/* 004E8 808B70A8 00812023 */ subu $a0, $a0, $at -/* 004EC 808B70AC 00042100 */ sll $a0, $a0, 4 -/* 004F0 808B70B0 00812023 */ subu $a0, $a0, $at -/* 004F4 808B70B4 000420C0 */ sll $a0, $a0, 3 -/* 004F8 808B70B8 00812023 */ subu $a0, $a0, $at -/* 004FC 808B70BC 00042080 */ sll $a0, $a0, 2 -/* 00500 808B70C0 0C0411E0 */ jal coss - -/* 00504 808B70C4 3084FFFF */ andi $a0, $a0, 0xFFFF ## $a0 = 00000000 -/* 00508 808B70C8 00027A03 */ sra $t7, $v0, 8 -/* 0050C 808B70CC A3AF0062 */ sb $t7, 0x0062($sp) -/* 00510 808B70D0 8E050000 */ lw $a1, 0x0000($s0) ## 00000000 -/* 00514 808B70D4 3C06808B */ lui $a2, %hi(D_808B72B0) ## $a2 = 808B0000 -/* 00518 808B70D8 24C672B0 */ addiu $a2, $a2, %lo(D_808B72B0) ## $a2 = 808B72B0 -/* 0051C 808B70DC 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFE4 -/* 00520 808B70E0 2407010D */ addiu $a3, $zero, 0x010D ## $a3 = 0000010D -/* 00524 808B70E4 0C031AB1 */ jal Graph_OpenDisps -/* 00528 808B70E8 AFA5005C */ sw $a1, 0x005C($sp) -/* 0052C 808B70EC 0C024F46 */ jal func_80093D18 -/* 00530 808B70F0 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 00534 808B70F4 8FA8005C */ lw $t0, 0x005C($sp) -/* 00538 808B70F8 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 0053C 808B70FC 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 00540 808B7100 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 00544 808B7104 3C05808B */ lui $a1, %hi(D_808B72D0) ## $a1 = 808B0000 -/* 00548 808B7108 24A572D0 */ addiu $a1, $a1, %lo(D_808B72D0) ## $a1 = 808B72D0 -/* 0054C 808B710C 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00550 808B7110 AD1802C0 */ sw $t8, 0x02C0($t0) ## 000002C0 -/* 00554 808B7114 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00558 808B7118 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 0055C 808B711C 24060111 */ addiu $a2, $zero, 0x0111 ## $a2 = 00000111 -/* 00560 808B7120 AFA8005C */ sw $t0, 0x005C($sp) -/* 00564 808B7124 0C0346A2 */ jal Matrix_NewMtx -/* 00568 808B7128 AFA20048 */ sw $v0, 0x0048($sp) -/* 0056C 808B712C 8FA30048 */ lw $v1, 0x0048($sp) -/* 00570 808B7130 8FA8005C */ lw $t0, 0x005C($sp) -/* 00574 808B7134 3C0AFB00 */ lui $t2, 0xFB00 ## $t2 = FB000000 -/* 00578 808B7138 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 0057C 808B713C 83A50062 */ lb $a1, 0x0062($sp) -/* 00580 808B7140 83A40063 */ lb $a0, 0x0063($sp) -/* 00584 808B7144 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 00588 808B7148 00052843 */ sra $a1, $a1, 1 -/* 0058C 808B714C 24A500C0 */ addiu $a1, $a1, 0x00C0 ## $a1 = 000000C0 -/* 00590 808B7150 00042043 */ sra $a0, $a0, 1 -/* 00594 808B7154 248400C0 */ addiu $a0, $a0, 0x00C0 ## $a0 = 000000C0 -/* 00598 808B7158 00052E00 */ sll $a1, $a1, 24 -/* 0059C 808B715C 00042600 */ sll $a0, $a0, 24 -/* 005A0 808B7160 00052E03 */ sra $a1, $a1, 24 -/* 005A4 808B7164 00045E03 */ sra $t3, $a0, 24 -/* 005A8 808B7168 30AD00FF */ andi $t5, $a1, 0x00FF ## $t5 = 000000C0 -/* 005AC 808B716C 000D7400 */ sll $t6, $t5, 16 -/* 005B0 808B7170 000B6600 */ sll $t4, $t3, 24 -/* 005B4 808B7174 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 005B8 808B7178 018EC025 */ or $t8, $t4, $t6 ## $t8 = 00000000 -/* 005BC 808B717C AD0902C0 */ sw $t1, 0x02C0($t0) ## 000002C0 -/* 005C0 808B7180 3719FF80 */ ori $t9, $t8, 0xFF80 ## $t9 = 0000FF80 -/* 005C4 808B7184 AC590004 */ sw $t9, 0x0004($v0) ## 00000004 -/* 005C8 808B7188 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 005CC 808B718C 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 005D0 808B7190 3C0B0600 */ lui $t3, 0x0600 ## $t3 = 06000000 -/* 005D4 808B7194 256B08A0 */ addiu $t3, $t3, 0x08A0 ## $t3 = 060008A0 -/* 005D8 808B7198 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 005DC 808B719C AD0902C0 */ sw $t1, 0x02C0($t0) ## 000002C0 -/* 005E0 808B71A0 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000 -/* 005E4 808B71A4 3C06808B */ lui $a2, %hi(D_808B72F0) ## $a2 = 808B0000 -/* 005E8 808B71A8 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 005EC 808B71AC AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004 -/* 005F0 808B71B0 8E050000 */ lw $a1, 0x0000($s0) ## 00000000 -/* 005F4 808B71B4 24C672F0 */ addiu $a2, $a2, %lo(D_808B72F0) ## $a2 = 808B72F0 -/* 005F8 808B71B8 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFE4 -/* 005FC 808B71BC 0C031AD5 */ jal Graph_CloseDisps -/* 00600 808B71C0 2407011B */ addiu $a3, $zero, 0x011B ## $a3 = 0000011B -/* 00604 808B71C4 8E050000 */ lw $a1, 0x0000($s0) ## 00000000 -/* 00608 808B71C8 3C06808B */ lui $a2, %hi(D_808B7310) ## $a2 = 808B0000 -/* 0060C 808B71CC 24C67310 */ addiu $a2, $a2, %lo(D_808B7310) ## $a2 = 808B7310 -/* 00610 808B71D0 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFC4 -/* 00614 808B71D4 2407011E */ addiu $a3, $zero, 0x011E ## $a3 = 0000011E -/* 00618 808B71D8 0C031AB1 */ jal Graph_OpenDisps -/* 0061C 808B71DC AFA5003C */ sw $a1, 0x003C($sp) -/* 00620 808B71E0 0C024F61 */ jal func_80093D84 -/* 00624 808B71E4 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 00628 808B71E8 8FA7003C */ lw $a3, 0x003C($sp) -/* 0062C 808B71EC 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000 -/* 00630 808B71F0 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003 -/* 00634 808B71F4 8CE202D0 */ lw $v0, 0x02D0($a3) ## 000002D0 -/* 00638 808B71F8 3C05808B */ lui $a1, %hi(D_808B7330) ## $a1 = 808B0000 -/* 0063C 808B71FC 24A57330 */ addiu $a1, $a1, %lo(D_808B7330) ## $a1 = 808B7330 -/* 00640 808B7200 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008 -/* 00644 808B7204 ACED02D0 */ sw $t5, 0x02D0($a3) ## 000002D0 -/* 00648 808B7208 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 0064C 808B720C 8E040000 */ lw $a0, 0x0000($s0) ## 00000000 -/* 00650 808B7210 24060122 */ addiu $a2, $zero, 0x0122 ## $a2 = 00000122 -/* 00654 808B7214 0C0346A2 */ jal Matrix_NewMtx -/* 00658 808B7218 AFA20028 */ sw $v0, 0x0028($sp) -/* 0065C 808B721C 8FA30028 */ lw $v1, 0x0028($sp) -/* 00660 808B7220 3C190600 */ lui $t9, 0x0600 ## $t9 = 06000000 -/* 00664 808B7224 27390960 */ addiu $t9, $t9, 0x0960 ## $t9 = 06000960 -/* 00668 808B7228 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 0066C 808B722C 8FAE003C */ lw $t6, 0x003C($sp) -/* 00670 808B7230 3C18DE00 */ lui $t8, 0xDE00 ## $t8 = DE000000 -/* 00674 808B7234 3C06808B */ lui $a2, %hi(D_808B7350) ## $a2 = 808B0000 -/* 00678 808B7238 8DC202D0 */ lw $v0, 0x02D0($t6) ## 000002D0 -/* 0067C 808B723C 24C67350 */ addiu $a2, $a2, %lo(D_808B7350) ## $a2 = 808B7350 -/* 00680 808B7240 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFC4 -/* 00684 808B7244 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 00688 808B7248 ADCF02D0 */ sw $t7, 0x02D0($t6) ## 000002D0 -/* 0068C 808B724C AC590004 */ sw $t9, 0x0004($v0) ## 00000004 -/* 00690 808B7250 AC580000 */ sw $t8, 0x0000($v0) ## 00000000 -/* 00694 808B7254 8E050000 */ lw $a1, 0x0000($s0) ## 00000000 -/* 00698 808B7258 0C031AD5 */ jal Graph_CloseDisps -/* 0069C 808B725C 24070127 */ addiu $a3, $zero, 0x0127 ## $a3 = 00000127 -/* 006A0 808B7260 8FBF001C */ lw $ra, 0x001C($sp) -/* 006A4 808B7264 8FB00018 */ lw $s0, 0x0018($sp) -/* 006A8 808B7268 27BD0068 */ addiu $sp, $sp, 0x0068 ## $sp = 00000000 -/* 006AC 808B726C 03E00008 */ jr $ra -/* 006B0 808B7270 00000000 */ nop -/* 006B4 808B7274 00000000 */ nop -/* 006B8 808B7278 00000000 */ nop -/* 006BC 808B727C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Init.s deleted file mode 100644 index b08d45c31d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Init.s +++ /dev/null @@ -1,45 +0,0 @@ -glabel BgSpot17Bakudankabe_Init -/* 00330 808B6EF0 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00334 808B6EF4 AFBF001C */ sw $ra, 0x001C($sp) -/* 00338 808B6EF8 AFB00018 */ sw $s0, 0x0018($sp) -/* 0033C 808B6EFC AFA50034 */ sw $a1, 0x0034($sp) -/* 00340 808B6F00 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00344 808B6F04 AFA00024 */ sw $zero, 0x0024($sp) -/* 00348 808B6F08 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 0034C 808B6F0C 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00350 808B6F10 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00354 808B6F14 8FA40034 */ lw $a0, 0x0034($sp) -/* 00358 808B6F18 0C00B2D0 */ jal Flags_GetSwitch - -/* 0035C 808B6F1C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00360 808B6F20 10400005 */ beq $v0, $zero, .L808B6F38 -/* 00364 808B6F24 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00368 808B6F28 0C00B55C */ jal Actor_Kill - -/* 0036C 808B6F2C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00370 808B6F30 1000000F */ beq $zero, $zero, .L808B6F70 -/* 00374 808B6F34 8FBF001C */ lw $ra, 0x001C($sp) -.L808B6F38: -/* 00378 808B6F38 24840A38 */ addiu $a0, $a0, 0x0A38 ## $a0 = 00000A38 -/* 0037C 808B6F3C 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00380 808B6F40 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 00384 808B6F44 8FA40034 */ lw $a0, 0x0034($sp) -/* 00388 808B6F48 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 0038C 808B6F4C 8FA70024 */ lw $a3, 0x0024($sp) -/* 00390 808B6F50 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00394 808B6F54 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00398 808B6F58 3C05808B */ lui $a1, %hi(D_808B72A0) ## $a1 = 808B0000 -/* 0039C 808B6F5C AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 003A0 808B6F60 24A572A0 */ addiu $a1, $a1, %lo(D_808B72A0) ## $a1 = 808B72A0 -/* 003A4 808B6F64 0C01E037 */ jal Actor_ProcessInitChain - -/* 003A8 808B6F68 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003AC 808B6F6C 8FBF001C */ lw $ra, 0x001C($sp) -.L808B6F70: -/* 003B0 808B6F70 8FB00018 */ lw $s0, 0x0018($sp) -/* 003B4 808B6F74 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 003B8 808B6F78 03E00008 */ jr $ra -/* 003BC 808B6F7C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Update.s deleted file mode 100644 index 8deb1863a7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Update.s +++ /dev/null @@ -1,48 +0,0 @@ -.late_rodata -glabel D_808B7378 - .word 0x44228000, 0x00000000 - -.text -glabel BgSpot17Bakudankabe_Update -/* 003F0 808B6FB0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 003F4 808B6FB4 AFBF001C */ sw $ra, 0x001C($sp) -/* 003F8 808B6FB8 AFB00018 */ sw $s0, 0x0018($sp) -/* 003FC 808B6FBC AFA50024 */ sw $a1, 0x0024($sp) -/* 00400 808B6FC0 3C01808B */ lui $at, %hi(D_808B7378) ## $at = 808B0000 -/* 00404 808B6FC4 C4267378 */ lwc1 $f6, %lo(D_808B7378)($at) -/* 00408 808B6FC8 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 0040C 808B6FCC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00410 808B6FD0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00414 808B6FD4 4606203C */ c.lt.s $f4, $f6 -/* 00418 808B6FD8 00000000 */ nop -/* 0041C 808B6FDC 45020015 */ bc1fl .L808B7034 -/* 00420 808B6FE0 8FBF001C */ lw $ra, 0x001C($sp) -/* 00424 808B6FE4 0C00CDA1 */ jal func_80033684 -/* 00428 808B6FE8 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 0042C 808B6FEC 10400010 */ beq $v0, $zero, .L808B7030 -/* 00430 808B6FF0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00434 808B6FF4 0C22DAF0 */ jal func_808B6BC0 -/* 00438 808B6FF8 8FA50024 */ lw $a1, 0x0024($sp) -/* 0043C 808B6FFC 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00440 808B7000 8FA40024 */ lw $a0, 0x0024($sp) -/* 00444 808B7004 0C00B2DD */ jal Flags_SetSwitch - -/* 00448 808B7008 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 0044C 808B700C 8FA40024 */ lw $a0, 0x0024($sp) -/* 00450 808B7010 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00454 808B7014 24060028 */ addiu $a2, $zero, 0x0028 ## $a2 = 00000028 -/* 00458 808B7018 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 0045C 808B701C 24072810 */ addiu $a3, $zero, 0x2810 ## $a3 = 00002810 -/* 00460 808B7020 0C01E221 */ jal func_80078884 -/* 00464 808B7024 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802 -/* 00468 808B7028 0C00B55C */ jal Actor_Kill - -/* 0046C 808B702C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L808B7030: -/* 00470 808B7030 8FBF001C */ lw $ra, 0x001C($sp) -.L808B7034: -/* 00474 808B7034 8FB00018 */ lw $s0, 0x0018($sp) -/* 00478 808B7038 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 0047C 808B703C 03E00008 */ jr $ra -/* 00480 808B7040 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/func_808B6BC0.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/func_808B6BC0.s deleted file mode 100644 index f4b36589c7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/func_808B6BC0.s +++ /dev/null @@ -1,227 +0,0 @@ -.late_rodata -glabel D_808B7370 - .float 0.2 - -glabel D_808B7374 - .float 0.4 - -.text -glabel func_808B6BC0 -/* 00000 808B6BC0 27BDFF20 */ addiu $sp, $sp, 0xFF20 ## $sp = FFFFFF20 -/* 00004 808B6BC4 AFB20080 */ sw $s2, 0x0080($sp) -/* 00008 808B6BC8 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000 -/* 0000C 808B6BCC AFBF009C */ sw $ra, 0x009C($sp) -/* 00010 808B6BD0 AFBE0098 */ sw $s8, 0x0098($sp) -/* 00014 808B6BD4 AFB70094 */ sw $s7, 0x0094($sp) -/* 00018 808B6BD8 AFB60090 */ sw $s6, 0x0090($sp) -/* 0001C 808B6BDC AFB5008C */ sw $s5, 0x008C($sp) -/* 00020 808B6BE0 AFB40088 */ sw $s4, 0x0088($sp) -/* 00024 808B6BE4 AFB30084 */ sw $s3, 0x0084($sp) -/* 00028 808B6BE8 AFB1007C */ sw $s1, 0x007C($sp) -/* 0002C 808B6BEC AFB00078 */ sw $s0, 0x0078($sp) -/* 00030 808B6BF0 F7BE0070 */ sdc1 $f30, 0x0070($sp) -/* 00034 808B6BF4 F7BC0068 */ sdc1 $f28, 0x0068($sp) -/* 00038 808B6BF8 F7BA0060 */ sdc1 $f26, 0x0060($sp) -/* 0003C 808B6BFC F7B80058 */ sdc1 $f24, 0x0058($sp) -/* 00040 808B6C00 F7B60050 */ sdc1 $f22, 0x0050($sp) -/* 00044 808B6C04 F7B40048 */ sdc1 $f20, 0x0048($sp) -/* 00048 808B6C08 00A0F025 */ or $s8, $a1, $zero ## $s8 = 00000000 -/* 0004C 808B6C0C 0C01DE1C */ jal Math_Sins - ## sins? -/* 00050 808B6C10 848400B6 */ lh $a0, 0x00B6($a0) ## 000000B6 -/* 00054 808B6C14 46000586 */ mov.s $f22, $f0 -/* 00058 808B6C18 0C01DE0D */ jal Math_Coss - ## coss? -/* 0005C 808B6C1C 864400B6 */ lh $a0, 0x00B6($s2) ## 000000B6 -/* 00060 808B6C20 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00064 808B6C24 4481F000 */ mtc1 $at, $f30 ## $f30 = 20.00 -/* 00068 808B6C28 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00 -/* 0006C 808B6C2C 3C01430C */ lui $at, 0x430C ## $at = 430C0000 -/* 00070 808B6C30 4481E000 */ mtc1 $at, $f28 ## $f28 = 140.00 -/* 00074 808B6C34 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00078 808B6C38 3C160501 */ lui $s6, 0x0501 ## $s6 = 05010000 -/* 0007C 808B6C3C 4481D000 */ mtc1 $at, $f26 ## $f26 = 0.50 -/* 00080 808B6C40 46000606 */ mov.s $f24, $f0 -/* 00084 808B6C44 26D6A880 */ addiu $s6, $s6, 0xA880 ## $s6 = 0500A880 -/* 00088 808B6C48 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000 -/* 0008C 808B6C4C 24170014 */ addiu $s7, $zero, 0x0014 ## $s7 = 00000014 -/* 00090 808B6C50 27B500BC */ addiu $s5, $sp, 0x00BC ## $s5 = FFFFFFDC -/* 00094 808B6C54 27B400C8 */ addiu $s4, $sp, 0x00C8 ## $s4 = FFFFFFE8 -/* 00098 808B6C58 E7A200C4 */ swc1 $f2, 0x00C4($sp) -/* 0009C 808B6C5C E7A200BC */ swc1 $f2, 0x00BC($sp) -.L808B6C60: -/* 000A0 808B6C60 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 000A4 808B6C64 00000000 */ nop -/* 000A8 808B6C68 461A0101 */ sub.s $f4, $f0, $f26 -/* 000AC 808B6C6C 461C2502 */ mul.s $f20, $f4, $f28 -/* 000B0 808B6C70 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 000B4 808B6C74 00000000 */ nop -/* 000B8 808B6C78 461A0181 */ sub.s $f6, $f0, $f26 -/* 000BC 808B6C7C C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024 -/* 000C0 808B6C80 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 000C4 808B6C84 461E3082 */ mul.s $f2, $f6, $f30 -/* 000C8 808B6C88 00000000 */ nop -/* 000CC 808B6C8C 46161282 */ mul.s $f10, $f2, $f22 -/* 000D0 808B6C90 460A4400 */ add.s $f16, $f8, $f10 -/* 000D4 808B6C94 4618A482 */ mul.s $f18, $f20, $f24 -/* 000D8 808B6C98 44814000 */ mtc1 $at, $f8 ## $f8 = 30.00 -/* 000DC 808B6C9C 3C0140D0 */ lui $at, 0x40D0 ## $at = 40D00000 -/* 000E0 808B6CA0 46128100 */ add.s $f4, $f16, $f18 -/* 000E4 808B6CA4 44918000 */ mtc1 $s1, $f16 ## $f16 = 0.00 -/* 000E8 808B6CA8 00000000 */ nop -/* 000EC 808B6CAC 468084A0 */ cvt.s.w $f18, $f16 -/* 000F0 808B6CB0 E7A400C8 */ swc1 $f4, 0x00C8($sp) -/* 000F4 808B6CB4 C6460028 */ lwc1 $f6, 0x0028($s2) ## 00000028 -/* 000F8 808B6CB8 44812000 */ mtc1 $at, $f4 ## $f4 = 6.50 -/* 000FC 808B6CBC 46083280 */ add.s $f10, $f6, $f8 -/* 00100 808B6CC0 46049182 */ mul.s $f6, $f18, $f4 -/* 00104 808B6CC4 46065200 */ add.s $f8, $f10, $f6 -/* 00108 808B6CC8 46181482 */ mul.s $f18, $f2, $f24 -/* 0010C 808B6CCC E7A800CC */ swc1 $f8, 0x00CC($sp) -/* 00110 808B6CD0 4616A282 */ mul.s $f10, $f20, $f22 -/* 00114 808B6CD4 C650002C */ lwc1 $f16, 0x002C($s2) ## 0000002C -/* 00118 808B6CD8 46128100 */ add.s $f4, $f16, $f18 -/* 0011C 808B6CDC 460A2181 */ sub.s $f6, $f4, $f10 -/* 00120 808B6CE0 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00124 808B6CE4 E7A600D0 */ swc1 $f6, 0x00D0($sp) -/* 00128 808B6CE8 3C01808B */ lui $at, %hi(D_808B7370) ## $at = 808B0000 -/* 0012C 808B6CEC C4287370 */ lwc1 $f8, %lo(D_808B7370)($at) -/* 00130 808B6CF0 3C014140 */ lui $at, 0x4140 ## $at = 41400000 -/* 00134 808B6CF4 44819000 */ mtc1 $at, $f18 ## $f18 = 12.00 -/* 00138 808B6CF8 46080401 */ sub.s $f16, $f0, $f8 -/* 0013C 808B6CFC 46128102 */ mul.s $f4, $f16, $f18 -/* 00140 808B6D00 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00144 808B6D04 E7A400C0 */ swc1 $f4, 0x00C0($sp) -/* 00148 808B6D08 3C01425C */ lui $at, 0x425C ## $at = 425C0000 -/* 0014C 808B6D0C 44815000 */ mtc1 $at, $f10 ## $f10 = 55.00 -/* 00150 808B6D10 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 00154 808B6D14 44814000 */ mtc1 $at, $f8 ## $f8 = 8.00 -/* 00158 808B6D18 460A0182 */ mul.s $f6, $f0, $f10 -/* 0015C 808B6D1C 46083400 */ add.s $f16, $f6, $f8 -/* 00160 808B6D20 4600848D */ trunc.w.s $f18, $f16 -/* 00164 808B6D24 44029000 */ mfc1 $v0, $f18 -/* 00168 808B6D28 00000000 */ nop -/* 0016C 808B6D2C 00021C00 */ sll $v1, $v0, 16 -/* 00170 808B6D30 00031C03 */ sra $v1, $v1, 16 -/* 00174 808B6D34 28610014 */ slti $at, $v1, 0x0014 -/* 00178 808B6D38 00029C00 */ sll $s3, $v0, 16 -/* 0017C 808B6D3C 10200003 */ beq $at, $zero, .L808B6D4C -/* 00180 808B6D40 00139C03 */ sra $s3, $s3, 16 -/* 00184 808B6D44 10000006 */ beq $zero, $zero, .L808B6D60 -/* 00188 808B6D48 2410FED4 */ addiu $s0, $zero, 0xFED4 ## $s0 = FFFFFED4 -.L808B6D4C: -/* 0018C 808B6D4C 28610023 */ slti $at, $v1, 0x0023 -/* 00190 808B6D50 10200003 */ beq $at, $zero, .L808B6D60 -/* 00194 808B6D54 2410FE5C */ addiu $s0, $zero, 0xFE5C ## $s0 = FFFFFE5C -/* 00198 808B6D58 10000001 */ beq $zero, $zero, .L808B6D60 -/* 0019C 808B6D5C 2410FE98 */ addiu $s0, $zero, 0xFE98 ## $s0 = FFFFFE98 -.L808B6D60: -/* 001A0 808B6D60 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 001A4 808B6D64 00000000 */ nop -/* 001A8 808B6D68 3C01808B */ lui $at, %hi(D_808B7374) ## $at = 808B0000 -/* 001AC 808B6D6C C4247374 */ lwc1 $f4, %lo(D_808B7374)($at) -/* 001B0 808B6D70 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 001B4 808B6D74 02802825 */ or $a1, $s4, $zero ## $a1 = FFFFFFE8 -/* 001B8 808B6D78 4604003C */ c.lt.s $f0, $f4 -/* 001BC 808B6D7C 02A03025 */ or $a2, $s5, $zero ## $a2 = FFFFFFDC -/* 001C0 808B6D80 02803825 */ or $a3, $s4, $zero ## $a3 = FFFFFFE8 -/* 001C4 808B6D84 240F001E */ addiu $t7, $zero, 0x001E ## $t7 = 0000001E -/* 001C8 808B6D88 45000003 */ bc1f .L808B6D98 -/* 001CC 808B6D8C 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004 -/* 001D0 808B6D90 10000002 */ beq $zero, $zero, .L808B6D9C -/* 001D4 808B6D94 24020041 */ addiu $v0, $zero, 0x0041 ## $v0 = 00000041 -.L808B6D98: -/* 001D8 808B6D98 24020021 */ addiu $v0, $zero, 0x0021 ## $v0 = 00000021 -.L808B6D9C: -/* 001DC 808B6D9C 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 001E0 808B6DA0 24080003 */ addiu $t0, $zero, 0x0003 ## $t0 = 00000003 -/* 001E4 808B6DA4 24090050 */ addiu $t1, $zero, 0x0050 ## $t1 = 00000050 -/* 001E8 808B6DA8 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 001EC 808B6DAC 240B0002 */ addiu $t3, $zero, 0x0002 ## $t3 = 00000002 -/* 001F0 808B6DB0 AFAB0038 */ sw $t3, 0x0038($sp) -/* 001F4 808B6DB4 AFAA0034 */ sw $t2, 0x0034($sp) -/* 001F8 808B6DB8 AFA90030 */ sw $t1, 0x0030($sp) -/* 001FC 808B6DBC AFA8002C */ sw $t0, 0x002C($sp) -/* 00200 808B6DC0 AFB90028 */ sw $t9, 0x0028($sp) -/* 00204 808B6DC4 AFB00010 */ sw $s0, 0x0010($sp) -/* 00208 808B6DC8 AFA20014 */ sw $v0, 0x0014($sp) -/* 0020C 808B6DCC AFAF0018 */ sw $t7, 0x0018($sp) -/* 00210 808B6DD0 AFB8001C */ sw $t8, 0x001C($sp) -/* 00214 808B6DD4 AFA00020 */ sw $zero, 0x0020($sp) -/* 00218 808B6DD8 AFB30024 */ sw $s3, 0x0024($sp) -/* 0021C 808B6DDC 0C00A7A3 */ jal func_80029E8C - -/* 00220 808B6DE0 AFB6003C */ sw $s6, 0x003C($sp) -/* 00224 808B6DE4 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001 -/* 00228 808B6DE8 1637FF9D */ bne $s1, $s7, .L808B6C60 -/* 0022C 808B6DEC 00000000 */ nop -/* 00230 808B6DF0 02802025 */ or $a0, $s4, $zero ## $a0 = FFFFFFE8 -/* 00234 808B6DF4 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 00238 808B6DF8 26450024 */ addiu $a1, $s2, 0x0024 ## $a1 = 00000024 -/* 0023C 808B6DFC 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00240 808B6E00 4481A000 */ mtc1 $at, $f20 ## $f20 = 60.00 -/* 00244 808B6E04 240C006E */ addiu $t4, $zero, 0x006E ## $t4 = 0000006E -/* 00248 808B6E08 240D00A0 */ addiu $t5, $zero, 0x00A0 ## $t5 = 000000A0 -/* 0024C 808B6E0C 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00250 808B6E10 4406A000 */ mfc1 $a2, $f20 -/* 00254 808B6E14 AFAE0018 */ sw $t6, 0x0018($sp) -/* 00258 808B6E18 AFAD0014 */ sw $t5, 0x0014($sp) -/* 0025C 808B6E1C AFAC0010 */ sw $t4, 0x0010($sp) -/* 00260 808B6E20 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 00264 808B6E24 02802825 */ or $a1, $s4, $zero ## $a1 = FFFFFFE8 -/* 00268 808B6E28 0C00CD20 */ jal func_80033480 -/* 0026C 808B6E2C 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 00270 808B6E30 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 00274 808B6E34 4481B000 */ mtc1 $at, $f22 ## $f22 = 40.00 -/* 00278 808B6E38 C7AA00CC */ lwc1 $f10, 0x00CC($sp) -/* 0027C 808B6E3C 4406A000 */ mfc1 $a2, $f20 -/* 00280 808B6E40 240F0078 */ addiu $t7, $zero, 0x0078 ## $t7 = 00000078 -/* 00284 808B6E44 46165180 */ add.s $f6, $f10, $f22 -/* 00288 808B6E48 241800A0 */ addiu $t8, $zero, 0x00A0 ## $t8 = 000000A0 -/* 0028C 808B6E4C 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 00290 808B6E50 AFB90018 */ sw $t9, 0x0018($sp) -/* 00294 808B6E54 E7A600CC */ swc1 $f6, 0x00CC($sp) -/* 00298 808B6E58 AFB80014 */ sw $t8, 0x0014($sp) -/* 0029C 808B6E5C AFAF0010 */ sw $t7, 0x0010($sp) -/* 002A0 808B6E60 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 002A4 808B6E64 02802825 */ or $a1, $s4, $zero ## $a1 = FFFFFFE8 -/* 002A8 808B6E68 0C00CD20 */ jal func_80033480 -/* 002AC 808B6E6C 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 002B0 808B6E70 C7A800CC */ lwc1 $f8, 0x00CC($sp) -/* 002B4 808B6E74 4406A000 */ mfc1 $a2, $f20 -/* 002B8 808B6E78 2408006E */ addiu $t0, $zero, 0x006E ## $t0 = 0000006E -/* 002BC 808B6E7C 46164400 */ add.s $f16, $f8, $f22 -/* 002C0 808B6E80 240900A0 */ addiu $t1, $zero, 0x00A0 ## $t1 = 000000A0 -/* 002C4 808B6E84 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 002C8 808B6E88 AFAA0018 */ sw $t2, 0x0018($sp) -/* 002CC 808B6E8C E7B000CC */ swc1 $f16, 0x00CC($sp) -/* 002D0 808B6E90 AFA90014 */ sw $t1, 0x0014($sp) -/* 002D4 808B6E94 AFA80010 */ sw $t0, 0x0010($sp) -/* 002D8 808B6E98 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 002DC 808B6E9C 02802825 */ or $a1, $s4, $zero ## $a1 = FFFFFFE8 -/* 002E0 808B6EA0 0C00CD20 */ jal func_80033480 -/* 002E4 808B6EA4 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 002E8 808B6EA8 8FBF009C */ lw $ra, 0x009C($sp) -/* 002EC 808B6EAC D7B40048 */ ldc1 $f20, 0x0048($sp) -/* 002F0 808B6EB0 D7B60050 */ ldc1 $f22, 0x0050($sp) -/* 002F4 808B6EB4 D7B80058 */ ldc1 $f24, 0x0058($sp) -/* 002F8 808B6EB8 D7BA0060 */ ldc1 $f26, 0x0060($sp) -/* 002FC 808B6EBC D7BC0068 */ ldc1 $f28, 0x0068($sp) -/* 00300 808B6EC0 D7BE0070 */ ldc1 $f30, 0x0070($sp) -/* 00304 808B6EC4 8FB00078 */ lw $s0, 0x0078($sp) -/* 00308 808B6EC8 8FB1007C */ lw $s1, 0x007C($sp) -/* 0030C 808B6ECC 8FB20080 */ lw $s2, 0x0080($sp) -/* 00310 808B6ED0 8FB30084 */ lw $s3, 0x0084($sp) -/* 00314 808B6ED4 8FB40088 */ lw $s4, 0x0088($sp) -/* 00318 808B6ED8 8FB5008C */ lw $s5, 0x008C($sp) -/* 0031C 808B6EDC 8FB60090 */ lw $s6, 0x0090($sp) -/* 00320 808B6EE0 8FB70094 */ lw $s7, 0x0094($sp) -/* 00324 808B6EE4 8FBE0098 */ lw $s8, 0x0098($sp) -/* 00328 808B6EE8 03E00008 */ jr $ra -/* 0032C 808B6EEC 27BD00E0 */ addiu $sp, $sp, 0x00E0 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Basket/BgSpot18Basket_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Basket/BgSpot18Basket_Init.s index eb251047f7..97109ac917 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Basket/BgSpot18Basket_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot18_Basket/BgSpot18Basket_Init.s @@ -98,7 +98,7 @@ glabel BgSpot18Basket_Init /* 00328 808B7A38 AFB80020 */ sw $t8, 0x0020($sp) /* 0032C 808B7A3C 861900B8 */ lh $t9, 0x00B8($s0) ## 000000B8 /* 00330 808B7A40 AFA80028 */ sw $t0, 0x0028($sp) -/* 00334 808B7A44 0C00C916 */ jal Actor_SpawnAttached +/* 00334 808B7A44 0C00C916 */ jal Actor_SpawnAsChild /* 00338 808B7A48 AFB90024 */ sw $t9, 0x0024($sp) /* 0033C 808B7A4C 8E09011C */ lw $t1, 0x011C($s0) ## 0000011C diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/BgYdanMaruta_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/BgYdanMaruta_Init.s deleted file mode 100644 index 65d7d32d1e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/BgYdanMaruta_Init.s +++ /dev/null @@ -1,165 +0,0 @@ -glabel BgYdanMaruta_Init -/* 00000 808BED40 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88 -/* 00004 808BED44 AFA5007C */ sw $a1, 0x007C($sp) -/* 00008 808BED48 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0000C 808BED4C AFB0001C */ sw $s0, 0x001C($sp) -/* 00010 808BED50 3C05808C */ lui $a1, %hi(D_808BF388) ## $a1 = 808C0000 -/* 00014 808BED54 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 808BED58 AFB10020 */ sw $s1, 0x0020($sp) -/* 0001C 808BED5C AFA0003C */ sw $zero, 0x003C($sp) -/* 00020 808BED60 0C01E037 */ jal Actor_ProcessInitChain - -/* 00024 808BED64 24A5F388 */ addiu $a1, $a1, %lo(D_808BF388) ## $a1 = 808BF388 -/* 00028 808BED68 2605016C */ addiu $a1, $s0, 0x016C ## $a1 = 0000016C -/* 0002C 808BED6C AFA5002C */ sw $a1, 0x002C($sp) -/* 00030 808BED70 0C0171F8 */ jal Collider_InitTris -/* 00034 808BED74 8FA4007C */ lw $a0, 0x007C($sp) -/* 00038 808BED78 3C07808C */ lui $a3, %hi(D_808BF378) ## $a3 = 808C0000 -/* 0003C 808BED7C 260E018C */ addiu $t6, $s0, 0x018C ## $t6 = 0000018C -/* 00040 808BED80 AFAE0010 */ sw $t6, 0x0010($sp) -/* 00044 808BED84 24E7F378 */ addiu $a3, $a3, %lo(D_808BF378) ## $a3 = 808BF378 -/* 00048 808BED88 8FA4007C */ lw $a0, 0x007C($sp) -/* 0004C 808BED8C 8FA5002C */ lw $a1, 0x002C($sp) -/* 00050 808BED90 0C0172EB */ jal Collider_SetTris -/* 00054 808BED94 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00058 808BED98 8619001C */ lh $t9, 0x001C($s0) ## 0000001C -/* 0005C 808BED9C 8618001C */ lh $t8, 0x001C($s0) ## 0000001C -/* 00060 808BEDA0 3C11808C */ lui $s1, %hi(D_808BF300+0x3C) ## $s1 = 808C0000 -/* 00064 808BEDA4 00194203 */ sra $t0, $t9, 8 -/* 00068 808BEDA8 310900FF */ andi $t1, $t0, 0x00FF ## $t1 = 00000000 -/* 0006C 808BEDAC A609001C */ sh $t1, 0x001C($s0) ## 0000001C -/* 00070 808BEDB0 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 00074 808BEDB4 2631F33C */ addiu $s1, $s1, %lo(D_808BF300+0x3C) ## $s1 = 808BF33C -/* 00078 808BEDB8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0007C 808BEDBC 15400007 */ bne $t2, $zero, .L808BEDDC -/* 00080 808BEDC0 A2180168 */ sb $t8, 0x0168($s0) ## 00000168 -/* 00084 808BEDC4 3C0B808C */ lui $t3, %hi(func_808BEFF4) ## $t3 = 808C0000 -/* 00088 808BEDC8 3C11808C */ lui $s1, %hi(D_808BF300) ## $s1 = 808C0000 -/* 0008C 808BEDCC 256BEFF4 */ addiu $t3, $t3, %lo(func_808BEFF4) ## $t3 = 808BEFF4 -/* 00090 808BEDD0 2631F300 */ addiu $s1, $s1, %lo(D_808BF300) ## $s1 = 808BF300 -/* 00094 808BEDD4 1000001F */ beq $zero, $zero, .L808BEE54 -/* 00098 808BEDD8 AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164 -.L808BEDDC: -/* 0009C 808BEDDC 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 000A0 808BEDE0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 000A4 808BEDE4 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 000A8 808BEDE8 248466A8 */ addiu $a0, $a0, 0x66A8 ## $a0 = 060066A8 -/* 000AC 808BEDEC 0C010620 */ jal DynaPolyInfo_Alloc - -/* 000B0 808BEDF0 27A5003C */ addiu $a1, $sp, 0x003C ## $a1 = FFFFFFC4 -/* 000B4 808BEDF4 8FA4007C */ lw $a0, 0x007C($sp) -/* 000B8 808BEDF8 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 000BC 808BEDFC 8FA7003C */ lw $a3, 0x003C($sp) -/* 000C0 808BEE00 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 000C4 808BEE04 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 000C8 808BEE08 3C01C38C */ lui $at, 0xC38C ## $at = C38C0000 -/* 000CC 808BEE0C 44813000 */ mtc1 $at, $f6 ## $f6 = -280.00 -/* 000D0 808BEE10 C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C -/* 000D4 808BEE14 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 000D8 808BEE18 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -/* 000DC 808BEE1C 46062200 */ add.s $f8, $f4, $f6 -/* 000E0 808BEE20 E608000C */ swc1 $f8, 0x000C($s0) ## 0000000C -/* 000E4 808BEE24 0C00B2D0 */ jal Flags_GetSwitch - -/* 000E8 808BEE28 8FA4007C */ lw $a0, 0x007C($sp) -/* 000EC 808BEE2C 10400007 */ beq $v0, $zero, .L808BEE4C -/* 000F0 808BEE30 3C0D808C */ lui $t5, %hi(func_808BF078) ## $t5 = 808C0000 -/* 000F4 808BEE34 C60A000C */ lwc1 $f10, 0x000C($s0) ## 0000000C -/* 000F8 808BEE38 3C0C808C */ lui $t4, %hi(BgYdanMaruta_DoNothing) ## $t4 = 808C0000 -/* 000FC 808BEE3C 258CF25C */ addiu $t4, $t4, %lo(BgYdanMaruta_DoNothing) ## $t4 = 808BF25C -/* 00100 808BEE40 AE0C0164 */ sw $t4, 0x0164($s0) ## 00000164 -/* 00104 808BEE44 10000003 */ beq $zero, $zero, .L808BEE54 -/* 00108 808BEE48 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028 -.L808BEE4C: -/* 0010C 808BEE4C 25ADF078 */ addiu $t5, $t5, %lo(func_808BF078) ## $t5 = 808BF078 -/* 00110 808BEE50 AE0D0164 */ sw $t5, 0x0164($s0) ## 00000164 -.L808BEE54: -/* 00114 808BEE54 0C01DE1C */ jal Math_Sins - ## sins? -/* 00118 808BEE58 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 0011C 808BEE5C 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 00120 808BEE60 0C01DE0D */ jal Math_Coss - ## coss? -/* 00124 808BEE64 E7A00044 */ swc1 $f0, 0x0044($sp) -/* 00128 808BEE68 C7A20044 */ lwc1 $f2, 0x0044($sp) -/* 0012C 808BEE6C 46000306 */ mov.s $f12, $f0 -/* 00130 808BEE70 27A2004C */ addiu $v0, $sp, 0x004C ## $v0 = FFFFFFD4 -/* 00134 808BEE74 02201825 */ or $v1, $s1, $zero ## $v1 = 808BF300 -/* 00138 808BEE78 27A40070 */ addiu $a0, $sp, 0x0070 ## $a0 = FFFFFFF8 -/* 0013C 808BEE7C C46A0018 */ lwc1 $f10, 0x0018($v1) ## 808BF318 -/* 00140 808BEE80 2442000C */ addiu $v0, $v0, 0x000C ## $v0 = FFFFFFE0 -/* 00144 808BEE84 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 00148 808BEE88 46005402 */ mul.s $f16, $f10, $f0 -/* 0014C 808BEE8C 50440014 */ beql $v0, $a0, .L808BEEE0 -/* 00150 808BEE90 46128380 */ add.s $f14, $f16, $f18 -/* 00154 808BEE94 46128380 */ add.s $f14, $f16, $f18 -.L808BEE98: -/* 00158 808BEE98 2442000C */ addiu $v0, $v0, 0x000C ## $v0 = FFFFFFEC -/* 0015C 808BEE9C 2463000C */ addiu $v1, $v1, 0x000C ## $v1 = 808BF30C -/* 00160 808BEEA0 E44EFFE8 */ swc1 $f14, -0x0018($v0) ## FFFFFFD4 -/* 00164 808BEEA4 C46E0010 */ lwc1 $f14, 0x0010($v1) ## 808BF31C -/* 00168 808BEEA8 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 0016C 808BEEAC 460A7280 */ add.s $f10, $f14, $f10 -/* 00170 808BEEB0 E44AFFEC */ swc1 $f10, -0x0014($v0) ## FFFFFFD8 -/* 00174 808BEEB4 C46A000C */ lwc1 $f10, 0x000C($v1) ## 808BF318 -/* 00178 808BEEB8 C60E002C */ lwc1 $f14, 0x002C($s0) ## 0000002C -/* 0017C 808BEEBC 46025282 */ mul.s $f10, $f10, $f2 -/* 00180 808BEEC0 460A7281 */ sub.s $f10, $f14, $f10 -/* 00184 808BEEC4 E44AFFF0 */ swc1 $f10, -0x0010($v0) ## FFFFFFDC -/* 00188 808BEEC8 C46A0018 */ lwc1 $f10, 0x0018($v1) ## 808BF324 -/* 0018C 808BEECC C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 00190 808BEED0 46005402 */ mul.s $f16, $f10, $f0 -/* 00194 808BEED4 5444FFF0 */ bnel $v0, $a0, .L808BEE98 -/* 00198 808BEED8 46128380 */ add.s $f14, $f16, $f18 -/* 0019C 808BEEDC 46128380 */ add.s $f14, $f16, $f18 -.L808BEEE0: -/* 001A0 808BEEE0 2463000C */ addiu $v1, $v1, 0x000C ## $v1 = 808BF318 -/* 001A4 808BEEE4 E44EFFF4 */ swc1 $f14, -0x000C($v0) ## FFFFFFE0 -/* 001A8 808BEEE8 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 001AC 808BEEEC C46E0010 */ lwc1 $f14, 0x0010($v1) ## 808BF328 -/* 001B0 808BEEF0 460A7280 */ add.s $f10, $f14, $f10 -/* 001B4 808BEEF4 E44AFFF8 */ swc1 $f10, -0x0008($v0) ## FFFFFFE4 -/* 001B8 808BEEF8 C46A000C */ lwc1 $f10, 0x000C($v1) ## 808BF324 -/* 001BC 808BEEFC C60E002C */ lwc1 $f14, 0x002C($s0) ## 0000002C -/* 001C0 808BEF00 46025282 */ mul.s $f10, $f10, $f2 -/* 001C4 808BEF04 460A7281 */ sub.s $f10, $f14, $f10 -/* 001C8 808BEF08 E44AFFFC */ swc1 $f10, -0x0004($v0) ## FFFFFFE8 -/* 001CC 808BEF0C 27AE0064 */ addiu $t6, $sp, 0x0064 ## $t6 = FFFFFFEC -/* 001D0 808BEF10 AFAE0010 */ sw $t6, 0x0010($sp) -/* 001D4 808BEF14 8FA4002C */ lw $a0, 0x002C($sp) -/* 001D8 808BEF18 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 001DC 808BEF1C 27A6004C */ addiu $a2, $sp, 0x004C ## $a2 = FFFFFFD4 -/* 001E0 808BEF20 27A70058 */ addiu $a3, $sp, 0x0058 ## $a3 = FFFFFFE0 -/* 001E4 808BEF24 E7A20044 */ swc1 $f2, 0x0044($sp) -/* 001E8 808BEF28 0C0189E8 */ jal func_800627A0 -/* 001EC 808BEF2C E7AC0040 */ swc1 $f12, 0x0040($sp) -/* 001F0 808BEF30 C7AC0040 */ lwc1 $f12, 0x0040($sp) -/* 001F4 808BEF34 C62A0030 */ lwc1 $f10, 0x0030($s1) ## 808BF330 -/* 001F8 808BEF38 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 -/* 001FC 808BEF3C C7A20044 */ lwc1 $f2, 0x0044($sp) -/* 00200 808BEF40 460C5402 */ mul.s $f16, $f10, $f12 -/* 00204 808BEF44 27AF0058 */ addiu $t7, $sp, 0x0058 ## $t7 = FFFFFFE0 -/* 00208 808BEF48 8FA4002C */ lw $a0, 0x002C($sp) -/* 0020C 808BEF4C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00210 808BEF50 27A6004C */ addiu $a2, $sp, 0x004C ## $a2 = FFFFFFD4 -/* 00214 808BEF54 27A70064 */ addiu $a3, $sp, 0x0064 ## $a3 = FFFFFFEC -/* 00218 808BEF58 46048480 */ add.s $f18, $f16, $f4 -/* 0021C 808BEF5C E7B20058 */ swc1 $f18, 0x0058($sp) -/* 00220 808BEF60 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028 -/* 00224 808BEF64 C626001C */ lwc1 $f6, 0x001C($s1) ## 808BF31C -/* 00228 808BEF68 46083280 */ add.s $f10, $f6, $f8 -/* 0022C 808BEF6C E7AA005C */ swc1 $f10, 0x005C($sp) -/* 00230 808BEF70 C6240030 */ lwc1 $f4, 0x0030($s1) ## 808BF330 -/* 00234 808BEF74 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C -/* 00238 808BEF78 AFAF0010 */ sw $t7, 0x0010($sp) -/* 0023C 808BEF7C 46022482 */ mul.s $f18, $f4, $f2 -/* 00240 808BEF80 46128181 */ sub.s $f6, $f16, $f18 -/* 00244 808BEF84 0C0189E8 */ jal func_800627A0 -/* 00248 808BEF88 E7A60060 */ swc1 $f6, 0x0060($sp) -/* 0024C 808BEF8C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00250 808BEF90 8FB0001C */ lw $s0, 0x001C($sp) -/* 00254 808BEF94 8FB10020 */ lw $s1, 0x0020($sp) -/* 00258 808BEF98 03E00008 */ jr $ra -/* 0025C 808BEF9C 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/func_808BF108.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/func_808BF108.s deleted file mode 100644 index 8688866c8b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/func_808BF108.s +++ /dev/null @@ -1,65 +0,0 @@ -glabel func_808BF108 -/* 003C8 808BF108 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 003CC 808BF10C AFBF0014 */ sw $ra, 0x0014($sp) -/* 003D0 808BF110 AFA50024 */ sw $a1, 0x0024($sp) -/* 003D4 808BF114 8483016A */ lh $v1, 0x016A($a0) ## 0000016A -/* 003D8 808BF118 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 003DC 808BF11C 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE -/* 003E0 808BF120 10600003 */ beq $v1, $zero, .L808BF130 -/* 003E4 808BF124 246EFFFF */ addiu $t6, $v1, 0xFFFF ## $t6 = FFFFFFFF -/* 003E8 808BF128 A48E016A */ sh $t6, 0x016A($a0) ## 0000016A -/* 003EC 808BF12C 8483016A */ lh $v1, 0x016A($a0) ## 0000016A -.L808BF130: -/* 003F0 808BF130 14600004 */ bne $v1, $zero, .L808BF144 -/* 003F4 808BF134 3C0F808C */ lui $t7, %hi(func_808BF1EC) ## $t7 = 808C0000 -/* 003F8 808BF138 25EFF1EC */ addiu $t7, $t7, %lo(func_808BF1EC) ## $t7 = 808BF1EC -/* 003FC 808BF13C ACCF0164 */ sw $t7, 0x0164($a2) ## 00000164 -/* 00400 808BF140 84C3016A */ lh $v1, 0x016A($a2) ## 0000016A -.L808BF144: -/* 00404 808BF144 04610004 */ bgez $v1, .L808BF158 -/* 00408 808BF148 30620003 */ andi $v0, $v1, 0x0003 ## $v0 = 00000000 -/* 0040C 808BF14C 10400002 */ beq $v0, $zero, .L808BF158 -/* 00410 808BF150 00000000 */ nop -/* 00414 808BF154 2442FFFC */ addiu $v0, $v0, 0xFFFC ## $v0 = FFFFFFFC -.L808BF158: -/* 00418 808BF158 2442FFFE */ addiu $v0, $v0, 0xFFFE ## $v0 = FFFFFFFA -/* 0041C 808BF15C 00021400 */ sll $v0, $v0, 16 -/* 00420 808BF160 00021403 */ sra $v0, $v0, 16 -/* 00424 808BF164 54410004 */ bnel $v0, $at, .L808BF178 -/* 00428 808BF168 00021040 */ sll $v0, $v0, 1 -/* 0042C 808BF16C 10000004 */ beq $zero, $zero, .L808BF180 -/* 00430 808BF170 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 00434 808BF174 00021040 */ sll $v0, $v0, 1 -.L808BF178: -/* 00438 808BF178 00021400 */ sll $v0, $v0, 16 -/* 0043C 808BF17C 00021403 */ sra $v0, $v0, 16 -.L808BF180: -/* 00440 808BF180 84C400B6 */ lh $a0, 0x00B6($a2) ## 000000B6 -/* 00444 808BF184 AFA60020 */ sw $a2, 0x0020($sp) -/* 00448 808BF188 0C01DE0D */ jal Math_Coss - ## coss? -/* 0044C 808BF18C A7A2001E */ sh $v0, 0x001E($sp) -/* 00450 808BF190 87A2001E */ lh $v0, 0x001E($sp) -/* 00454 808BF194 8FA60020 */ lw $a2, 0x0020($sp) -/* 00458 808BF198 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 0045C 808BF19C C4C80008 */ lwc1 $f8, 0x0008($a2) ## 00000008 -/* 00460 808BF1A0 84C400B6 */ lh $a0, 0x00B6($a2) ## 000000B6 -/* 00464 808BF1A4 468020A0 */ cvt.s.w $f2, $f4 -/* 00468 808BF1A8 46020182 */ mul.s $f6, $f0, $f2 -/* 0046C 808BF1AC 46083280 */ add.s $f10, $f6, $f8 -/* 00470 808BF1B0 E4CA0024 */ swc1 $f10, 0x0024($a2) ## 00000024 -/* 00474 808BF1B4 0C01DE1C */ jal Math_Sins - ## sins? -/* 00478 808BF1B8 E7A20018 */ swc1 $f2, 0x0018($sp) -/* 0047C 808BF1BC C7A20018 */ lwc1 $f2, 0x0018($sp) -/* 00480 808BF1C0 8FA40020 */ lw $a0, 0x0020($sp) -/* 00484 808BF1C4 24052058 */ addiu $a1, $zero, 0x2058 ## $a1 = 00002058 -/* 00488 808BF1C8 46020402 */ mul.s $f16, $f0, $f2 -/* 0048C 808BF1CC C4920010 */ lwc1 $f18, 0x0010($a0) ## 00000010 -/* 00490 808BF1D0 46128100 */ add.s $f4, $f16, $f18 -/* 00494 808BF1D4 0C00BE5D */ jal func_8002F974 -/* 00498 808BF1D8 E484002C */ swc1 $f4, 0x002C($a0) ## 0000002C -/* 0049C 808BF1DC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 004A0 808BF1E0 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 004A4 808BF1E4 03E00008 */ jr $ra -/* 004A8 808BF1E8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/BossDodongo_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/BossDodongo_Init.s index eeeb9c6dca..7533dc5065 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/BossDodongo_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/BossDodongo_Init.s @@ -151,7 +151,7 @@ glabel BossDodongo_Init /* 009C8 808C1B58 AFA00028 */ sw $zero, 0x0028($sp) /* 009CC 808C1B5C E7B20010 */ swc1 $f18, 0x0010($sp) /* 009D0 808C1B60 E7A40014 */ swc1 $f4, 0x0014($sp) -/* 009D4 808C1B64 0C00C916 */ jal Actor_SpawnAttached +/* 009D4 808C1B64 0C00C916 */ jal Actor_SpawnAsChild /* 009D8 808C1B68 E7A60018 */ swc1 $f6, 0x0018($sp) /* 009DC 808C1B6C 3C01808D */ lui $at, %hi(D_808CA658) ## $at = 808D0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C52E0.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C52E0.s index 9cd0486286..ffaccd3810 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C52E0.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C52E0.s @@ -22,7 +22,7 @@ glabel func_808C52E0 /* 041A0 808C5330 84AE00B6 */ lh $t6, 0x00B6($a1) ## 000000B6 /* 041A4 808C5334 AFA00024 */ sw $zero, 0x0024($sp) /* 041A8 808C5338 AFAF0028 */ sw $t7, 0x0028($sp) -/* 041AC 808C533C 0C00C916 */ jal Actor_SpawnAttached +/* 041AC 808C533C 0C00C916 */ jal Actor_SpawnAsChild /* 041B0 808C5340 AFAE0020 */ sw $t6, 0x0020($sp) /* 041B4 808C5344 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s index 5ee9c25d55..e69fdbe1f8 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C5578.s @@ -1626,7 +1626,7 @@ glabel L808C5FE4 /* 059E0 808C6B70 AFA00028 */ sw $zero, 0x0028($sp) /* 059E4 808C6B74 E7A60010 */ swc1 $f6, 0x0010($sp) /* 059E8 808C6B78 E7A80014 */ swc1 $f8, 0x0014($sp) -/* 059EC 808C6B7C 0C00C916 */ jal Actor_SpawnAttached +/* 059EC 808C6B7C 0C00C916 */ jal Actor_SpawnAsChild /* 059F0 808C6B80 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 059F4 808C6B84 8FA401A4 */ lw $a0, 0x01A4($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Init.s index e08a7663f0..907dc7e2b5 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Init.s @@ -26,7 +26,7 @@ glabel BossFd_Init /* 005A0 808CB360 AFA00024 */ sw $zero, 0x0024($sp) /* 005A4 808CB364 E7A40010 */ swc1 $f4, 0x0010($sp) /* 005A8 808CB368 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 005AC 808CB36C 0C00C916 */ jal Actor_SpawnAttached +/* 005AC 808CB36C 0C00C916 */ jal Actor_SpawnAsChild /* 005B0 808CB370 E7A80018 */ swc1 $f8, 0x0018($sp) /* 005B4 808CB374 3C05808D */ lui $a1, %hi(D_808D191C) ## $a1 = 808D0000 @@ -175,7 +175,7 @@ glabel BossFd_Init /* 007B8 808CB578 AFA00024 */ sw $zero, 0x0024($sp) /* 007BC 808CB57C E7B20014 */ swc1 $f18, 0x0014($sp) /* 007C0 808CB580 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 007C4 808CB584 0C00C916 */ jal Actor_SpawnAttached +/* 007C4 808CB584 0C00C916 */ jal Actor_SpawnAsChild /* 007C8 808CB588 E7A40018 */ swc1 $f4, 0x0018($sp) /* 007CC 808CB58C 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 @@ -211,7 +211,7 @@ glabel BossFd_Init /* 0083C 808CB5FC AFA0001C */ sw $zero, 0x001C($sp) /* 00840 808CB600 E7B20018 */ swc1 $f18, 0x0018($sp) /* 00844 808CB604 860E1402 */ lh $t6, 0x1402($s0) ## 00001402 -/* 00848 808CB608 0C00C916 */ jal Actor_SpawnAttached +/* 00848 808CB608 0C00C916 */ jal Actor_SpawnAsChild /* 0084C 808CB60C AFAE0028 */ sw $t6, 0x0028($sp) /* 00850 808CB610 8FBF003C */ lw $ra, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Update.s b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Update.s index 95bf3f26e9..55e1def730 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/BossFd_Update.s @@ -255,7 +255,7 @@ glabel BossFd_Update /* 04244 808CF004 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000 /* 04248 808CF008 240700AD */ addiu $a3, $zero, 0x00AD ## $a3 = 000000AD /* 0424C 808CF00C E7A60018 */ swc1 $f6, 0x0018($sp) -/* 04250 808CF010 0C00C916 */ jal Actor_SpawnAttached +/* 04250 808CF010 0C00C916 */ jal Actor_SpawnAsChild /* 04254 808CF014 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 /* 04258 808CF018 1040003E */ beq $v0, $zero, .L808CF114 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808D08F8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808D08F8.s index 2d06b55e66..558f4c6445 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808D08F8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808D08F8.s @@ -556,7 +556,7 @@ glabel func_808D08F8 /* 06288 808D1048 E7A40018 */ swc1 $f4, 0x0018($sp) /* 0628C 808D104C AFA9001C */ sw $t1, 0x001C($sp) /* 06290 808D1050 AFAD0020 */ sw $t5, 0x0020($sp) -/* 06294 808D1054 0C00C916 */ jal Actor_SpawnAttached +/* 06294 808D1054 0C00C916 */ jal Actor_SpawnAsChild /* 06298 808D1058 AFAE0024 */ sw $t6, 0x0024($sp) /* 0629C 808D105C C6660050 */ lwc1 $f6, 0x0050($s3) ## 00000050 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Fd2/func_808D40C8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Fd2/func_808D40C8.s index 845fbdd936..a6a67282dc 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Fd2/func_808D40C8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Fd2/func_808D40C8.s @@ -456,7 +456,7 @@ glabel L808D4594 /* 02090 808D4700 E7A00010 */ swc1 $f0, 0x0010($sp) /* 02094 808D4704 E7A00018 */ swc1 $f0, 0x0018($sp) /* 02098 808D4708 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 0209C 808D470C 0C00C916 */ jal Actor_SpawnAttached +/* 0209C 808D470C 0C00C916 */ jal Actor_SpawnAsChild /* 020A0 808D4710 E7A60014 */ swc1 $f6, 0x0014($sp) /* 020A4 808D4714 8FA40084 */ lw $a0, 0x0084($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Init.s index f0072bbcb1..b0b518d784 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Init.s @@ -149,7 +149,7 @@ glabel BossGanon_Init /* 00B04 808D7374 AFA00024 */ sw $zero, 0x0024($sp) /* 00B08 808D7378 E7A00010 */ swc1 $f0, 0x0010($sp) /* 00B0C 808D737C E7A00014 */ swc1 $f0, 0x0014($sp) -/* 00B10 808D7380 0C00C916 */ jal Actor_SpawnAttached +/* 00B10 808D7380 0C00C916 */ jal Actor_SpawnAsChild /* 00B14 808D7384 E7A00018 */ swc1 $f0, 0x0018($sp) /* 00B18 808D7388 3C018090 */ lui $at, %hi(D_808F93C0) ## $at = 80900000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Update.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Update.s index 318fdae413..c104b2de0b 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/BossGanon_Update.s @@ -1298,7 +1298,7 @@ glabel L808DE3B0 /* 07E74 808DE6E4 000D7400 */ sll $t6, $t5, 16 /* 07E78 808DE6E8 000E7C03 */ sra $t7, $t6, 16 /* 07E7C 808DE6EC 25F86000 */ addiu $t8, $t7, 0x6000 ## $t8 = 00006000 -/* 07E80 808DE6F0 0C00C916 */ jal Actor_SpawnAttached +/* 07E80 808DE6F0 0C00C916 */ jal Actor_SpawnAsChild /* 07E84 808DE6F4 AFB80020 */ sw $t8, 0x0020($sp) /* 07E88 808DE6F8 A2A00274 */ sb $zero, 0x0274($s5) ## 00000274 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D7918.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D7918.s index 1fdde04ff1..789a2c68fd 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D7918.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D7918.s @@ -208,7 +208,7 @@ glabel L808D79E8 /* 012F8 808D7B68 24070179 */ addiu $a3, $zero, 0x0179 ## $a3 = 00000179 /* 012FC 808D7B6C E7A40014 */ swc1 $f4, 0x0014($sp) /* 01300 808D7B70 E7A60018 */ swc1 $f6, 0x0018($sp) -/* 01304 808D7B74 0C00C916 */ jal Actor_SpawnAttached +/* 01304 808D7B74 0C00C916 */ jal Actor_SpawnAsChild /* 01308 808D7B78 E7B20010 */ swc1 $f18, 0x0010($sp) /* 0130C 808D7B7C 3C018090 */ lui $at, %hi(D_808F93D4) ## $at = 80900000 @@ -226,7 +226,7 @@ glabel L808D79E8 /* 01338 808D7BA8 AFA00024 */ sw $zero, 0x0024($sp) /* 0133C 808D7BAC E7A00010 */ swc1 $f0, 0x0010($sp) /* 01340 808D7BB0 E7A00014 */ swc1 $f0, 0x0014($sp) -/* 01344 808D7BB4 0C00C916 */ jal Actor_SpawnAttached +/* 01344 808D7BB4 0C00C916 */ jal Actor_SpawnAsChild /* 01348 808D7BB8 E7A00018 */ swc1 $f0, 0x0018($sp) /* 0134C 808D7BBC 3C014264 */ lui $at, 0x4264 ## $at = 42640000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D933C.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D933C.s index af1329b2d4..ed18bb66f5 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D933C.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D933C.s @@ -943,7 +943,7 @@ glabel L808D9E8C /* 036C8 808D9F38 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 /* 036CC 808D9F3C E7A00018 */ swc1 $f0, 0x0018($sp) /* 036D0 808D9F40 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 036D4 808D9F44 0C00C916 */ jal Actor_SpawnAttached +/* 036D4 808D9F44 0C00C916 */ jal Actor_SpawnAsChild /* 036D8 808D9F48 E7B00014 */ swc1 $f16, 0x0014($sp) /* 036DC 808D9F4C 3C01C3EC */ lui $at, 0xC3EC ## $at = C3EC0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DB2E8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DB2E8.s index ff05bf6cf7..eb37d89d58 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DB2E8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DB2E8.s @@ -523,7 +523,7 @@ glabel L808DB99C /* 05184 808DB9F4 862F008A */ lh $t7, 0x008A($s1) ## 0000008A /* 05188 808DB9F8 AFB80028 */ sw $t8, 0x0028($sp) /* 0518C 808DB9FC AFA00024 */ sw $zero, 0x0024($sp) -/* 05190 808DBA00 0C00C916 */ jal Actor_SpawnAttached +/* 05190 808DBA00 0C00C916 */ jal Actor_SpawnAsChild /* 05194 808DBA04 AFAF0020 */ sw $t7, 0x0020($sp) /* 05198 808DBA08 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC14C.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC14C.s index 16156bc975..496d99dd33 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC14C.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC14C.s @@ -96,7 +96,7 @@ glabel func_808DC14C /* 05A20 808DC290 AFA00020 */ sw $zero, 0x0020($sp) /* 05A24 808DC294 AFA0001C */ sw $zero, 0x001C($sp) /* 05A28 808DC298 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 05A2C 808DC29C 0C00C916 */ jal Actor_SpawnAttached +/* 05A2C 808DC29C 0C00C916 */ jal Actor_SpawnAsChild /* 05A30 808DC2A0 E7B00018 */ swc1 $f16, 0x0018($sp) /* 05A34 808DC2A4 1000002E */ beq $zero, $zero, .L808DC360 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC9B4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC9B4.s index f7eaf74d33..b028a445d1 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC9B4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808DC9B4.s @@ -94,7 +94,7 @@ glabel func_808DC9B4 /* 062A4 808DCB14 02402025 */ or $a0, $s2, $zero ## $a0 = 00001C24 /* 062A8 808DCB18 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 /* 062AC 808DCB1C 02603025 */ or $a2, $s3, $zero ## $a2 = 00000000 -/* 062B0 808DCB20 0C00C916 */ jal Actor_SpawnAttached +/* 062B0 808DCB20 0C00C916 */ jal Actor_SpawnAsChild /* 062B4 808DCB24 240700E8 */ addiu $a3, $zero, 0x00E8 ## $a3 = 000000E8 /* 062B8 808DCB28 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s index b2e2b50fa8..62fc69de7e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E1EB4.s @@ -261,7 +261,7 @@ glabel func_808E1EB4 /* 0B9D4 808E2244 02402825 */ or $a1, $s2, $zero ## $a1 = 00000000 /* 0B9D8 808E2248 240700E8 */ addiu $a3, $zero, 0x00E8 ## $a3 = 000000E8 /* 0B9DC 808E224C 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 0B9E0 808E2250 0C00C916 */ jal Actor_SpawnAttached +/* 0B9E0 808E2250 0C00C916 */ jal Actor_SpawnAsChild /* 0B9E4 808E2254 E7A80018 */ swc1 $f8, 0x0018($sp) .L808E2258: diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s index 97a2a423af..41c93fa5e0 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808E2544.s @@ -868,7 +868,7 @@ glabel L808E306C /* 0C8E8 808E3158 AFA00020 */ sw $zero, 0x0020($sp) /* 0C8EC 808E315C AFA0001C */ sw $zero, 0x001C($sp) /* 0C8F0 808E3160 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 0C8F4 808E3164 0C00C916 */ jal Actor_SpawnAttached +/* 0C8F4 808E3164 0C00C916 */ jal Actor_SpawnAsChild /* 0C8F8 808E3168 E7A60018 */ swc1 $f6, 0x0018($sp) .L808E316C: diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon2/func_808FD5F4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon2/func_808FD5F4.s index 46c7743b33..5bf54a094a 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganon2/func_808FD5F4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganon2/func_808FD5F4.s @@ -169,7 +169,7 @@ glabel L808FD644 /* 007C0 808FD700 24070179 */ addiu $a3, $zero, 0x0179 ## $a3 = 00000179 /* 007C4 808FD704 E7A40010 */ swc1 $f4, 0x0010($sp) /* 007C8 808FD708 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 007CC 808FD70C 0C00C916 */ jal Actor_SpawnAttached +/* 007CC 808FD70C 0C00C916 */ jal Actor_SpawnAsChild /* 007D0 808FD710 E7A80018 */ swc1 $f8, 0x0018($sp) /* 007D4 808FD714 3C018091 */ lui $at, %hi(D_8090EB2C) ## $at = 80910000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s index 9e3633b42c..d214212835 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s @@ -180,7 +180,7 @@ glabel BossGanondrof_Init /* 00694 80910CD4 AFA0001C */ sw $zero, 0x001C($sp) /* 00698 80910CD8 E7A40018 */ swc1 $f4, 0x0018($sp) /* 0069C 80910CDC 8619001C */ lh $t9, 0x001C($s0) ## 00001C40 -/* 006A0 80910CE0 0C00C916 */ jal Actor_SpawnAttached +/* 006A0 80910CE0 0C00C916 */ jal Actor_SpawnAsChild /* 006A4 80910CE4 AFB90028 */ sw $t9, 0x0028($sp) /* 006A8 80910CE8 8FBF003C */ lw $ra, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80910DCC.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80910DCC.s index e95fdbfa04..25f6cd4925 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80910DCC.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80910DCC.s @@ -191,7 +191,7 @@ glabel func_80910DCC /* 00A20 80911060 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000 /* 00A24 80911064 2407006D */ addiu $a3, $zero, 0x006D ## $a3 = 0000006D /* 00A28 80911068 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00A2C 8091106C 0C00C916 */ jal Actor_SpawnAttached +/* 00A2C 8091106C 0C00C916 */ jal Actor_SpawnAsChild /* 00A30 80911070 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00A34 80911074 AE70011C */ sw $s0, 0x011C($s3) ## 0000011C diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_809112D4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_809112D4.s index e044133b04..e877bd4cd8 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_809112D4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_809112D4.s @@ -70,7 +70,7 @@ glabel func_809112D4 /* 00D40 80911380 AFA00020 */ sw $zero, 0x0020($sp) /* 00D44 80911384 AFB9001C */ sw $t9, 0x001C($sp) /* 00D48 80911388 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00D4C 8091138C 0C00C916 */ jal Actor_SpawnAttached +/* 00D4C 8091138C 0C00C916 */ jal Actor_SpawnAsChild /* 00D50 80911390 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00D54 80911394 8FA90048 */ lw $t1, 0x0048($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911CB0.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911CB0.s index 44573a7cfc..5ec8610d07 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911CB0.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911CB0.s @@ -67,7 +67,7 @@ glabel func_80911CB0 /* 01750 80911D90 AFA00024 */ sw $zero, 0x0024($sp) /* 01754 80911D94 AFA00020 */ sw $zero, 0x0020($sp) /* 01758 80911D98 AFA2001C */ sw $v0, 0x001C($sp) -/* 0175C 80911D9C 0C00C916 */ jal Actor_SpawnAttached +/* 0175C 80911D9C 0C00C916 */ jal Actor_SpawnAsChild /* 01760 80911DA0 E7B20018 */ swc1 $f18, 0x0018($sp) /* 01764 80911DA4 860C01A6 */ lh $t4, 0x01A6($s0) ## 000001A6 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911DD8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911DD8.s index f9b58874b8..a9015ac965 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911DD8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80911DD8.s @@ -122,7 +122,7 @@ glabel func_80911DD8 /* 0191C 80911F5C AFAC0028 */ sw $t4, 0x0028($sp) /* 01920 80911F60 AFA00024 */ sw $zero, 0x0024($sp) /* 01924 80911F64 AFA00020 */ sw $zero, 0x0020($sp) -/* 01928 80911F68 0C00C916 */ jal Actor_SpawnAttached +/* 01928 80911F68 0C00C916 */ jal Actor_SpawnAsChild /* 0192C 80911F6C AFAB001C */ sw $t3, 0x001C($sp) /* 01930 80911F70 8FAD004C */ lw $t5, 0x004C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s index 706e0417d3..59b907d139 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912594.s @@ -491,7 +491,7 @@ glabel func_80912594 /* 02614 80912C54 AFAC0020 */ sw $t4, 0x0020($sp) /* 02618 80912C58 AFAB001C */ sw $t3, 0x001C($sp) /* 0261C 80912C5C 2407006D */ addiu $a3, $zero, 0x006D ## $a3 = 0000006D -/* 02620 80912C60 0C00C916 */ jal Actor_SpawnAttached +/* 02620 80912C60 0C00C916 */ jal Actor_SpawnAsChild /* 02624 80912C64 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 02628 80912C68 AE30011C */ sw $s0, 0x011C($s1) ## 0000011C diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912D2C.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912D2C.s index 3b68f738df..5ebb8bd15c 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912D2C.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80912D2C.s @@ -423,7 +423,7 @@ glabel L809131C4 /* 02BD0 80913210 2407006D */ addiu $a3, $zero, 0x006D ## $a3 = 0000006D /* 02BD4 80913214 E7A40010 */ swc1 $f4, 0x0010($sp) /* 02BD8 80913218 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 02BDC 8091321C 0C00C916 */ jal Actor_SpawnAttached +/* 02BDC 8091321C 0C00C916 */ jal Actor_SpawnAsChild /* 02BE0 80913220 E7A80018 */ swc1 $f8, 0x0018($sp) /* 02BE4 80913224 AE50011C */ sw $s0, 0x011C($s2) ## 0000011C diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/BossGoma_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/BossGoma_Init.s index 22620c4a31..278515b4f6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/BossGoma_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/BossGoma_Init.s @@ -91,7 +91,7 @@ glabel BossGoma_Init /* 00384 80915D94 AFA00028 */ sw $zero, 0x0028($sp) /* 00388 80915D98 E7A00010 */ swc1 $f0, 0x0010($sp) /* 0038C 80915D9C E7A00018 */ swc1 $f0, 0x0018($sp) -/* 00390 80915DA0 0C00C916 */ jal Actor_SpawnAttached +/* 00390 80915DA0 0C00C916 */ jal Actor_SpawnAsChild /* 00394 80915DA4 E7B00014 */ swc1 $f16, 0x0014($sp) /* 00398 80915DA8 3C01C420 */ lui $at, 0xC420 ## $at = C4200000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80916C9C.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80916C9C.s index 1e46925b52..45e5d4af42 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80916C9C.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80916C9C.s @@ -131,7 +131,7 @@ glabel L80916D30 /* 013D8 80916DE8 E7B00010 */ swc1 $f16, 0x0010($sp) /* 013DC 80916DEC E7B20014 */ swc1 $f18, 0x0014($sp) /* 013E0 80916DF0 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 013E4 80916DF4 0C00C916 */ jal Actor_SpawnAttached +/* 013E4 80916DF4 0C00C916 */ jal Actor_SpawnAsChild /* 013E8 80916DF8 E7A40018 */ swc1 $f4, 0x0018($sp) /* 013EC 80916DFC 100003DB */ beq $zero, $zero, .L80917D6C @@ -335,7 +335,7 @@ glabel L80916F0C /* 016D8 809170E8 AFA00024 */ sw $zero, 0x0024($sp) /* 016DC 809170EC E7A40010 */ swc1 $f4, 0x0010($sp) /* 016E0 809170F0 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 016E4 809170F4 0C00C916 */ jal Actor_SpawnAttached +/* 016E4 809170F4 0C00C916 */ jal Actor_SpawnAsChild /* 016E8 809170F8 E7A80018 */ swc1 $f8, 0x0018($sp) /* 016EC 809170FC 86030194 */ lh $v1, 0x0194($s0) ## 00000194 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s index 20bef3301f..b752add482 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80917D98.s @@ -816,7 +816,7 @@ glabel func_80917D98 /* 02E80 80918890 02603025 */ or $a2, $s3, $zero ## $a2 = 00000000 /* 02E84 80918894 2407005D */ addiu $a3, $zero, 0x005D ## $a3 = 0000005D /* 02E88 80918898 E7A40018 */ swc1 $f4, 0x0018($sp) -/* 02E8C 8091889C 0C00C916 */ jal Actor_SpawnAttached +/* 02E8C 8091889C 0C00C916 */ jal Actor_SpawnAsChild /* 02E90 809188A0 E7B20014 */ swc1 $f18, 0x0014($sp) /* 02E94 809188A4 3C050001 */ lui $a1, 0x0001 ## $a1 = 00010000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091A9E8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091A9E8.s index cc46a28331..c585ebe972 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091A9E8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091A9E8.s @@ -124,7 +124,7 @@ glabel func_8091A9E8 /* 05188 8091AB98 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 0518C 8091AB9C AFAD001C */ sw $t5, 0x001C($sp) /* 05190 8091ABA0 AFAE0020 */ sw $t6, 0x0020($sp) -/* 05194 8091ABA4 0C00C916 */ jal Actor_SpawnAttached +/* 05194 8091ABA4 0C00C916 */ jal Actor_SpawnAsChild /* 05198 8091ABA8 AFAF0024 */ sw $t7, 0x0024($sp) /* 0519C 8091ABAC 10400006 */ beq $v0, $zero, .L8091ABC8 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091ADA8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091ADA8.s index 915dbb96fd..5cac8b1679 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091ADA8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_8091ADA8.s @@ -25,7 +25,7 @@ glabel func_8091ADA8 /* 053F4 8091AE04 AFAF0020 */ sw $t7, 0x0020($sp) /* 053F8 8091AE08 AFAE0028 */ sw $t6, 0x0028($sp) /* 053FC 8091AE0C 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 05400 8091AE10 0C00C916 */ jal Actor_SpawnAttached +/* 05400 8091AE10 0C00C916 */ jal Actor_SpawnAsChild /* 05404 8091AE14 E7B00018 */ swc1 $f16, 0x0018($sp) /* 05408 8091AE18 87B90042 */ lh $t9, 0x0042($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/BossMo_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/BossMo_Init.s index e3b040f7c3..fa3dabf8cf 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/BossMo_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/BossMo_Init.s @@ -120,7 +120,7 @@ glabel BossMo_Init /* 00764 8091C264 AFA00024 */ sw $zero, 0x0024($sp) /* 00768 8091C268 E7A00010 */ swc1 $f0, 0x0010($sp) /* 0076C 8091C26C E7A00018 */ swc1 $f0, 0x0018($sp) -/* 00770 8091C270 0C00C916 */ jal Actor_SpawnAttached +/* 00770 8091C270 0C00C916 */ jal Actor_SpawnAsChild /* 00774 8091C274 E7A80014 */ swc1 $f8, 0x0014($sp) /* 00778 8091C278 3C01C38C */ lui $at, 0xC38C ## $at = C38C0000 @@ -185,7 +185,7 @@ glabel BossMo_Init /* 00850 8091C350 AFA00020 */ sw $zero, 0x0020($sp) /* 00854 8091C354 AFA0001C */ sw $zero, 0x001C($sp) /* 00858 8091C358 240700C4 */ addiu $a3, $zero, 0x00C4 ## $a3 = 000000C4 -/* 0085C 8091C35C 0C00C916 */ jal Actor_SpawnAttached +/* 0085C 8091C35C 0C00C916 */ jal Actor_SpawnAsChild /* 00860 8091C360 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 00864 8091C364 3C018092 */ lui $at, %hi(D_80925CD4) ## $at = 80920000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s index 2bf5c5bee8..41fe2f3846 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091C538.s @@ -3250,7 +3250,7 @@ glabel L8091ED18 /* 035AC 8091F0AC AFA0001C */ sw $zero, 0x001C($sp) /* 035B0 8091F0B0 02402825 */ or $a1, $s2, $zero ## $a1 = 00000000 /* 035B4 8091F0B4 2407005D */ addiu $a3, $zero, 0x005D ## $a3 = 0000005D -/* 035B8 8091F0B8 0C00C916 */ jal Actor_SpawnAttached +/* 035B8 8091F0B8 0C00C916 */ jal Actor_SpawnAsChild /* 035BC 8091F0BC E7B20018 */ swc1 $f18, 0x0018($sp) /* 035C0 8091F0C0 3C014348 */ lui $at, 0x4348 ## $at = 43480000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/BossTw_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/BossTw_Init.s index 78782a40b3..236b7ad0f9 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/BossTw_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/BossTw_Init.s @@ -455,7 +455,7 @@ glabel BossTw_Init /* 01068 80939D38 AFA00024 */ sw $zero, 0x0024($sp) /* 0106C 80939D3C E7A40010 */ swc1 $f4, 0x0010($sp) /* 01070 80939D40 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 01074 80939D44 0C00C916 */ jal Actor_SpawnAttached +/* 01074 80939D44 0C00C916 */ jal Actor_SpawnAsChild /* 01078 80939D48 E7A80018 */ swc1 $f8, 0x0018($sp) /* 0107C 80939D4C 3C014366 */ lui $at, 0x4366 ## $at = 43660000 @@ -490,7 +490,7 @@ glabel BossTw_Init /* 010E8 80939DB8 AFA00024 */ sw $zero, 0x0024($sp) /* 010EC 80939DBC AFA00020 */ sw $zero, 0x0020($sp) /* 010F0 80939DC0 AFA0001C */ sw $zero, 0x001C($sp) -/* 010F4 80939DC4 0C00C916 */ jal Actor_SpawnAttached +/* 010F4 80939DC4 0C00C916 */ jal Actor_SpawnAsChild /* 010F8 80939DC8 E7A60018 */ swc1 $f6, 0x0018($sp) /* 010FC 80939DCC 3C018095 */ lui $at, %hi(D_8094C844) ## $at = 80950000 @@ -509,7 +509,7 @@ glabel BossTw_Init /* 01130 80939E00 AFA00020 */ sw $zero, 0x0020($sp) /* 01134 80939E04 AFA0001C */ sw $zero, 0x001C($sp) /* 01138 80939E08 240700DC */ addiu $a3, $zero, 0x00DC ## $a3 = 000000DC -/* 0113C 80939E0C 0C00C916 */ jal Actor_SpawnAttached +/* 0113C 80939E0C 0C00C916 */ jal Actor_SpawnAsChild /* 01140 80939E10 E7B00018 */ swc1 $f16, 0x0018($sp) /* 01144 80939E14 3C048095 */ lui $a0, %hi(D_8094C844) ## $a0 = 80950000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A5C4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A5C4.s index a245dbc263..e512ce9b1a 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A5C4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093A5C4.s @@ -118,7 +118,7 @@ glabel func_8093A5C4 /* 01A7C 8093A74C AFA00020 */ sw $zero, 0x0020($sp) /* 01A80 8093A750 AFA0001C */ sw $zero, 0x001C($sp) /* 01A84 8093A754 240700DC */ addiu $a3, $zero, 0x00DC ## $a3 = 000000DC -/* 01A88 8093A758 0C00C916 */ jal Actor_SpawnAttached +/* 01A88 8093A758 0C00C916 */ jal Actor_SpawnAsChild /* 01A8C 8093A75C E7B20018 */ swc1 $f18, 0x0018($sp) /* 01A90 8093A760 10400067 */ beq $v0, $zero, .L8093A900 @@ -182,7 +182,7 @@ glabel func_8093A5C4 /* 01B6C 8093A83C AFA00020 */ sw $zero, 0x0020($sp) /* 01B70 8093A840 AFA0001C */ sw $zero, 0x001C($sp) /* 01B74 8093A844 240700DC */ addiu $a3, $zero, 0x00DC ## $a3 = 000000DC -/* 01B78 8093A848 0C00C916 */ jal Actor_SpawnAttached +/* 01B78 8093A848 0C00C916 */ jal Actor_SpawnAsChild /* 01B7C 8093A84C E7B20018 */ swc1 $f18, 0x0018($sp) /* 01B80 8093A850 1040002B */ beq $v0, $zero, .L8093A900 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093F9E4.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093F9E4.s index f4eadf1dcf..8d4be961e2 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093F9E4.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_8093F9E4.s @@ -245,7 +245,7 @@ glabel func_8093F9E4 /* 0705C 8093FD2C 02402825 */ or $a1, $s2, $zero ## $a1 = 00000000 /* 07060 8093FD30 02603025 */ or $a2, $s3, $zero ## $a2 = 00000000 /* 07064 8093FD34 240700DC */ addiu $a3, $zero, 0x00DC ## $a3 = 000000DC -/* 07068 8093FD38 0C00C916 */ jal Actor_SpawnAttached +/* 07068 8093FD38 0C00C916 */ jal Actor_SpawnAsChild /* 0706C 8093FD3C E7A60018 */ swc1 $f6, 0x0018($sp) /* 07070 8093FD40 C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024 @@ -262,7 +262,7 @@ glabel func_8093F9E4 /* 0709C 8093FD6C AFA00020 */ sw $zero, 0x0020($sp) /* 070A0 8093FD70 AFA0001C */ sw $zero, 0x001C($sp) /* 070A4 8093FD74 240700DC */ addiu $a3, $zero, 0x00DC ## $a3 = 000000DC -/* 070A8 8093FD78 0C00C916 */ jal Actor_SpawnAttached +/* 070A8 8093FD78 0C00C916 */ jal Actor_SpawnAsChild /* 070AC 8093FD7C E7B00018 */ swc1 $f16, 0x0018($sp) /* 070B0 8093FD80 8E4D0004 */ lw $t5, 0x0004($s2) ## 00000004 @@ -854,7 +854,7 @@ glabel L809402FC /* 07920 809405F0 AFA00024 */ sw $zero, 0x0024($sp) /* 07924 809405F4 E7A60010 */ swc1 $f6, 0x0010($sp) /* 07928 809405F8 E7AA0014 */ swc1 $f10, 0x0014($sp) -/* 0792C 809405FC 0C00C916 */ jal Actor_SpawnAttached +/* 0792C 809405FC 0C00C916 */ jal Actor_SpawnAsChild /* 07930 80940600 E7B20018 */ swc1 $f18, 0x0018($sp) /* 07934 80940604 3C014366 */ lui $at, 0x4366 ## $at = 43660000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809499AC.s b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809499AC.s index 2a243fd851..7ca8e28367 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809499AC.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_809499AC.s @@ -56,7 +56,7 @@ glabel func_809499AC /* 10DA0 80949A70 AFA00024 */ sw $zero, 0x0024($sp) /* 10DA4 80949A74 AFA00020 */ sw $zero, 0x0020($sp) /* 10DA8 80949A78 AFA0001C */ sw $zero, 0x001C($sp) -/* 10DAC 80949A7C 0C00C916 */ jal Actor_SpawnAttached +/* 10DAC 80949A7C 0C00C916 */ jal Actor_SpawnAsChild /* 10DB0 80949A80 E7A80018 */ swc1 $f8, 0x0018($sp) /* 10DB4 80949A84 10400007 */ beq $v0, $zero, .L80949AA4 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Va/BossVa_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Va/BossVa_Init.s index 8298861158..9f16a54ac6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Va/BossVa_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Va/BossVa_Init.s @@ -190,7 +190,7 @@ glabel L80950024 /* 00D9C 8095005C AFA00024 */ sw $zero, 0x0024($sp) /* 00DA0 80950060 E7A80014 */ swc1 $f8, 0x0014($sp) /* 00DA4 80950064 E7AA0018 */ swc1 $f10, 0x0018($sp) -/* 00DA8 80950068 0C00C916 */ jal Actor_SpawnAttached +/* 00DA8 80950068 0C00C916 */ jal Actor_SpawnAsChild /* 00DAC 8095006C E7A60010 */ swc1 $f6, 0x0010($sp) /* 00DB0 80950070 3C010001 */ lui $at, 0x0001 ## $at = 00010000 @@ -368,7 +368,7 @@ glabel L80950024 /* 01044 80950304 866B0034 */ lh $t3, 0x0034($s3) ## 00000034 /* 01048 80950308 AFB20028 */ sw $s2, 0x0028($sp) /* 0104C 8095030C 014B6021 */ addu $t4, $t2, $t3 -/* 01050 80950310 0C00C916 */ jal Actor_SpawnAttached +/* 01050 80950310 0C00C916 */ jal Actor_SpawnAsChild /* 01054 80950314 AFAC0024 */ sw $t4, 0x0024($sp) /* 01058 80950318 2652FFFF */ addiu $s2, $s2, 0xFFFF ## $s2 = 0000000E @@ -459,7 +459,7 @@ glabel L80950024 /* 01198 80950458 866D0034 */ lh $t5, 0x0034($s3) ## 00000034 /* 0119C 8095045C AFB20028 */ sw $s2, 0x0028($sp) /* 011A0 80950460 018D7021 */ addu $t6, $t4, $t5 -/* 011A4 80950464 0C00C916 */ jal Actor_SpawnAttached +/* 011A4 80950464 0C00C916 */ jal Actor_SpawnAsChild /* 011A8 80950468 AFAE0024 */ sw $t6, 0x0024($sp) /* 011AC 8095046C 2652FFFF */ addiu $s2, $s2, 0xFFFF ## $s2 = 00000004 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80950780.s b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80950780.s index 72a9e486af..f7fee7b158 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80950780.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80950780.s @@ -404,7 +404,7 @@ glabel L80950AC0 /* 019D0 80950C90 AFA30050 */ sw $v1, 0x0050($sp) /* 019D4 80950C94 01F8C821 */ addu $t9, $t7, $t8 /* 019D8 80950C98 AFB90024 */ sw $t9, 0x0024($sp) -/* 019DC 80950C9C 0C00C916 */ jal Actor_SpawnAttached +/* 019DC 80950C9C 0C00C916 */ jal Actor_SpawnAsChild /* 019E0 80950CA0 AFB00028 */ sw $s0, 0x0028($sp) /* 019E4 80950CA4 8FA30050 */ lw $v1, 0x0050($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80951AD8.s b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80951AD8.s index 4a86d03a7a..30b8d6ca69 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80951AD8.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_80951AD8.s @@ -51,7 +51,7 @@ glabel func_80951AD8 /* 028D8 80951B98 860D0034 */ lh $t5, 0x0034($s0) ## 00000034 /* 028DC 80951B9C AFB30028 */ sw $s3, 0x0028($sp) /* 028E0 80951BA0 018D7021 */ addu $t6, $t4, $t5 -/* 028E4 80951BA4 0C00C916 */ jal Actor_SpawnAttached +/* 028E4 80951BA4 0C00C916 */ jal Actor_SpawnAsChild /* 028E8 80951BA8 AFAE0024 */ sw $t6, 0x0024($sp) /* 028EC 80951BAC 2673FFFF */ addiu $s3, $s3, 0xFFFF ## $s3 = 00000009 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_8095213C.s b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_8095213C.s index f5c6a88322..31d8f37e67 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_8095213C.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Va/func_8095213C.s @@ -342,7 +342,7 @@ glabel func_8095213C /* 032FC 809525BC 86780034 */ lh $t8, 0x0034($s3) ## 00000034 /* 03300 809525C0 AFB20028 */ sw $s2, 0x0028($sp) /* 03304 809525C4 01F8C821 */ addu $t9, $t7, $t8 -/* 03308 809525C8 0C00C916 */ jal Actor_SpawnAttached +/* 03308 809525C8 0C00C916 */ jal Actor_SpawnAsChild /* 0330C 809525CC AFB90024 */ sw $t9, 0x0024($sp) /* 03310 809525D0 2652FFFF */ addiu $s2, $s2, 0xFFFF ## $s2 = 0000000E diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80966F84.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80966F84.s index a23dddaff2..b189a38d69 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80966F84.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80966F84.s @@ -61,7 +61,7 @@ glabel func_80966F84 /* 006FC 8096704C AFA00024 */ sw $zero, 0x0024($sp) /* 00700 80967050 AFA00020 */ sw $zero, 0x0020($sp) /* 00704 80967054 AFA0001C */ sw $zero, 0x001C($sp) -/* 00708 80967058 0C00C916 */ jal Actor_SpawnAttached +/* 00708 80967058 0C00C916 */ jal Actor_SpawnAsChild /* 0070C 8096705C E7A60018 */ swc1 $f6, 0x0018($sp) /* 00710 80967060 3C063CA3 */ lui $a2, 0x3CA3 ## $a2 = 3CA30000 diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969EDC.s b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969EDC.s index 9da851276d..44cb7c03b7 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969EDC.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969EDC.s @@ -16,7 +16,7 @@ glabel func_80969EDC /* 00444 80969F14 2407005D */ addiu $a3, $zero, 0x005D ## $a3 = 0000005D /* 00448 80969F18 E7A00010 */ swc1 $f0, 0x0010($sp) /* 0044C 80969F1C E7A20014 */ swc1 $f2, 0x0014($sp) -/* 00450 80969F20 0C00C916 */ jal Actor_SpawnAttached +/* 00450 80969F20 0C00C916 */ jal Actor_SpawnAsChild /* 00454 80969F24 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 00458 80969F28 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969F38.s b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969F38.s index 57fbbb823e..295793ef50 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969F38.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_80969F38.s @@ -21,7 +21,7 @@ glabel func_80969F38 /* 004B4 80969F84 AFA0001C */ sw $zero, 0x001C($sp) /* 004B8 80969F88 2407008B */ addiu $a3, $zero, 0x008B ## $a3 = 0000008B /* 004BC 80969F8C E7A00010 */ swc1 $f0, 0x0010($sp) -/* 004C0 80969F90 0C00C916 */ jal Actor_SpawnAttached +/* 004C0 80969F90 0C00C916 */ jal Actor_SpawnAsChild /* 004C4 80969F94 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 004C8 80969F98 8FA4003C */ lw $a0, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_8096B4A8.s b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_8096B4A8.s index a39cd46fbd..28b4e8d122 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_8096B4A8.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Du/func_8096B4A8.s @@ -25,7 +25,7 @@ glabel func_8096B4A8 /* 01A34 8096B504 AFA00024 */ sw $zero, 0x0024($sp) /* 01A38 8096B508 AFA00020 */ sw $zero, 0x0020($sp) /* 01A3C 8096B50C AFA0001C */ sw $zero, 0x001C($sp) -/* 01A40 8096B510 0C00C916 */ jal Actor_SpawnAttached +/* 01A40 8096B510 0C00C916 */ jal Actor_SpawnAsChild /* 01A44 8096B514 E7A60018 */ swc1 $f6, 0x0018($sp) /* 01A48 8096B518 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/DemoEffect_Init.s b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/DemoEffect_Init.s index 1e713b7e28..8f6fc864e0 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/DemoEffect_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/DemoEffect_Init.s @@ -463,7 +463,7 @@ glabel L809715E0 /* 00700 80971650 AFA00024 */ sw $zero, 0x0024($sp) /* 00704 80971654 AFA00020 */ sw $zero, 0x0020($sp) /* 00708 80971658 AFA0001C */ sw $zero, 0x001C($sp) -/* 0070C 8097165C 0C00C916 */ jal Actor_SpawnAttached +/* 0070C 8097165C 0C00C916 */ jal Actor_SpawnAsChild /* 00710 80971660 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00714 80971664 10400005 */ beq $v0, $zero, .L8097167C @@ -488,7 +488,7 @@ glabel L809715E0 /* 00758 809716A8 AFA00020 */ sw $zero, 0x0020($sp) /* 0075C 809716AC AFA0001C */ sw $zero, 0x001C($sp) /* 00760 809716B0 2407008B */ addiu $a3, $zero, 0x008B ## $a3 = 0000008B -/* 00764 809716B4 0C00C916 */ jal Actor_SpawnAttached +/* 00764 809716B4 0C00C916 */ jal Actor_SpawnAsChild /* 00768 809716B8 E7B20018 */ swc1 $f18, 0x0018($sp) /* 0076C 809716BC 10400085 */ beq $v0, $zero, .L809718D4 diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_80972EA8.s b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_80972EA8.s index 84bf3f4b9f..22fd530dd6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_80972EA8.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_80972EA8.s @@ -38,7 +38,7 @@ glabel func_80972EA8 /* 01FE8 80972F38 AFA00024 */ sw $zero, 0x0024($sp) /* 01FEC 80972F3C AFA00020 */ sw $zero, 0x0020($sp) /* 01FF0 80972F40 AFA0001C */ sw $zero, 0x001C($sp) -/* 01FF4 80972F44 0C00C916 */ jal Actor_SpawnAttached +/* 01FF4 80972F44 0C00C916 */ jal Actor_SpawnAsChild /* 01FF8 80972F48 E7A80018 */ swc1 $f8, 0x0018($sp) /* 01FFC 80972F4C 10400007 */ beq $v0, $zero, .L80972F6C diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_8097322C.s b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_8097322C.s index c90d196369..4fa42fab12 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_8097322C.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Effect/func_8097322C.s @@ -49,7 +49,7 @@ glabel func_8097322C /* 02378 809732C8 AFA00024 */ sw $zero, 0x0024($sp) /* 0237C 809732CC AFA00020 */ sw $zero, 0x0020($sp) /* 02380 809732D0 AFA0001C */ sw $zero, 0x001C($sp) -/* 02384 809732D4 0C00C916 */ jal Actor_SpawnAttached +/* 02384 809732D4 0C00C916 */ jal Actor_SpawnAsChild /* 02388 809732D8 E7B00018 */ swc1 $f16, 0x0018($sp) /* 0238C 809732DC 10400008 */ beq $v0, $zero, .L80973300 diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_809789A4.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_809789A4.s index 1b229ccfd4..4a3b994e04 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_809789A4.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_809789A4.s @@ -3,7 +3,7 @@ glabel func_809789A4 /* 00078 809789A8 AFA40018 */ sw $a0, 0x0018($sp) /* 0007C 809789AC AFBF0014 */ sw $ra, 0x0014($sp) /* 00080 809789B0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00084 809789B4 0C00CD90 */ jal func_80033640 +/* 00084 809789B4 0C00CD90 */ jal Actor_GetCollidedExplosive /* 00088 809789B8 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 /* 0008C 809789BC 10400003 */ beq $v0, $zero, .L809789CC /* 00090 809789C0 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Kankyo/DemoKankyo_Init.s b/asm/non_matchings/overlays/actors/ovl_Demo_Kankyo/DemoKankyo_Init.s index e5a70147cd..589683b8ce 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Kankyo/DemoKankyo_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_Kankyo/DemoKankyo_Init.s @@ -233,7 +233,7 @@ glabel L809890DC /* 002BC 8098913C AFA00024 */ sw $zero, 0x0024($sp) /* 002C0 80989140 AFA00020 */ sw $zero, 0x0020($sp) /* 002C4 80989144 AFA0001C */ sw $zero, 0x001C($sp) -/* 002C8 80989148 0C00C916 */ jal Actor_SpawnAttached +/* 002C8 80989148 0C00C916 */ jal Actor_SpawnAsChild /* 002CC 8098914C E7A80018 */ swc1 $f8, 0x0018($sp) /* 002D0 80989150 1000003D */ beq $zero, $zero, .L80989248 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s index 07bcce855d..c6d6ee87a5 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s @@ -58,7 +58,7 @@ glabel func_80995A84 .L80995B58: /* 00F08 80995B58 8FA40044 */ lw $a0, 0x0044($sp) /* 00F0C 80995B5C 26050220 */ addiu $a1, $s0, 0x0220 ## $a1 = 00000220 -/* 00F10 80995B60 0C00CD90 */ jal func_80033640 +/* 00F10 80995B60 0C00CD90 */ jal Actor_GetCollidedExplosive /* 00F14 80995B64 AFA7003C */ sw $a3, 0x003C($sp) /* 00F18 80995B68 1040000E */ beq $v0, $zero, .L80995BA4 /* 00F1C 80995B6C 8FA7003C */ lw $a3, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Arrow/EnArrow_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Arrow/EnArrow_Update.s index 3a6d3626de..fa7b1b788a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Arrow/EnArrow_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Arrow/EnArrow_Update.s @@ -61,7 +61,7 @@ glabel EnArrow_Update /* 00E64 809B4784 AFA00024 */ sw $zero, 0x0024($sp) /* 00E68 809B4788 AFA00020 */ sw $zero, 0x0020($sp) /* 00E6C 809B478C AFA0001C */ sw $zero, 0x001C($sp) -/* 00E70 809B4790 0C00C916 */ jal Actor_SpawnAttached +/* 00E70 809B4790 0C00C916 */ jal Actor_SpawnAsChild /* 00E74 809B4794 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00E78 809B4798 10000015 */ beq $zero, $zero, .L809B47F0 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809B9B64.s b/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809B9B64.s index d3d4ba86b5..33fdedfa0a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809B9B64.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809B9B64.s @@ -199,7 +199,7 @@ glabel func_809B9B64 /* 01B34 809B9E14 860E0032 */ lh $t6, 0x0032($s0) ## 00000032 /* 01B38 809B9E18 260502AC */ addiu $a1, $s0, 0x02AC ## $a1 = 000002AC /* 01B3C 809B9E1C A60E00B6 */ sh $t6, 0x00B6($s0) ## 000000B6 -/* 01B40 809B9E20 0C00CD90 */ jal func_80033640 +/* 01B40 809B9E20 0C00CD90 */ jal Actor_GetCollidedExplosive /* 01B44 809B9E24 8FA4005C */ lw $a0, 0x005C($sp) /* 01B48 809B9E28 10400003 */ beq $v0, $zero, .L809B9E38 /* 01B4C 809B9E2C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809BA628.s b/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809BA628.s index 82e842348e..088b6838cd 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809BA628.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bb/func_809BA628.s @@ -349,7 +349,7 @@ glabel func_809BA628 /* 027E0 809BAAC0 460A3480 */ add.s $f18, $f6, $f10 /* 027E4 809BAAC4 46128100 */ add.s $f4, $f16, $f18 /* 027E8 809BAAC8 E6040274 */ swc1 $f4, 0x0274($s0) ## 00000274 -/* 027EC 809BAACC 0C00CD90 */ jal func_80033640 +/* 027EC 809BAACC 0C00CD90 */ jal Actor_GetCollidedExplosive /* 027F0 809BAAD0 8FA40074 */ lw $a0, 0x0074($sp) /* 027F4 809BAAD4 54400008 */ bnel $v0, $zero, .L809BAAF8 /* 027F8 809BAAD8 860E0268 */ lh $t6, 0x0268($s0) ## 00000268 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Man/func_809C441C.s b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Man/func_809C441C.s index a4d38f52aa..48dd2aeb68 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Man/func_809C441C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Man/func_809C441C.s @@ -107,7 +107,7 @@ glabel L809C44C8 /* 00F40 809C4570 E7B20014 */ swc1 $f18, 0x0014($sp) /* 00F44 809C4574 AFA00024 */ sw $zero, 0x0024($sp) /* 00F48 809C4578 AFA0001C */ sw $zero, 0x001C($sp) -/* 00F4C 809C457C 0C00C916 */ jal Actor_SpawnAttached +/* 00F4C 809C457C 0C00C916 */ jal Actor_SpawnAsChild /* 00F50 809C4580 AFAF0020 */ sw $t7, 0x0020($sp) /* 00F54 809C4584 86190232 */ lh $t9, 0x0232($s0) ## 00000232 @@ -128,7 +128,7 @@ glabel L809C44C8 /* 00F90 809C45C0 AFA00028 */ sw $zero, 0x0028($sp) /* 00F94 809C45C4 E7B00014 */ swc1 $f16, 0x0014($sp) /* 00F98 809C45C8 E7B20018 */ swc1 $f18, 0x0018($sp) -/* 00F9C 809C45CC 0C00C916 */ jal Actor_SpawnAttached +/* 00F9C 809C45CC 0C00C916 */ jal Actor_SpawnAsChild /* 00FA0 809C45D0 E7AA0010 */ swc1 $f10, 0x0010($sp) /* 00FA4 809C45D4 10400007 */ beq $v0, $zero, .L809C45F4 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C5360.s b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C5360.s index 26b00b7ce6..2d628ce870 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C5360.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C5360.s @@ -23,7 +23,7 @@ glabel func_809C5360 /* 00574 809C53B4 24070168 */ addiu $a3, $zero, 0x0168 ## $a3 = 00000168 /* 00578 809C53B8 E7B00018 */ swc1 $f16, 0x0018($sp) /* 0057C 809C53BC 860F015A */ lh $t7, 0x015A($s0) ## 0000015A -/* 00580 809C53C0 0C00C916 */ jal Actor_SpawnAttached +/* 00580 809C53C0 0C00C916 */ jal Actor_SpawnAsChild /* 00584 809C53C4 AFAF0028 */ sw $t7, 0x0028($sp) /* 00588 809C53C8 10400004 */ beq $v0, $zero, .L809C53DC diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C55B0.s b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C55B0.s index 6fa8da6395..a48ed1d021 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C55B0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bom_Bowl_Pit/func_809C55B0.s @@ -2,7 +2,7 @@ glabel func_809C55B0 /* 00770 809C55B0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00774 809C55B4 AFBF001C */ sw $ra, 0x001C($sp) /* 00778 809C55B8 AFA50024 */ sw $a1, 0x0024($sp) -/* 0077C 809C55BC 0C00BD04 */ jal func_8002F410 +/* 0077C 809C55BC 0C00BD04 */ jal Actor_HasParent /* 00780 809C55C0 AFA40020 */ sw $a0, 0x0020($sp) /* 00784 809C55C4 10400005 */ beq $v0, $zero, .L809C55DC /* 00788 809C55C8 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5DDC.s b/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5DDC.s index ca975cfd98..5b36393f29 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5DDC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bom_Chu/func_809C5DDC.s @@ -22,7 +22,7 @@ glabel func_809C5DDC /* 005F8 809C5E28 10000042 */ beq $zero, $zero, .L809C5F34 /* 005FC 809C5E2C 8FBF002C */ lw $ra, 0x002C($sp) .L809C5E30: -/* 00600 809C5E30 0C00BD68 */ jal func_8002F5A0 +/* 00600 809C5E30 0C00BD68 */ jal Actor_HasNoParent /* 00604 809C5E34 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 00608 809C5E38 1040003D */ beq $v0, $zero, .L809C5F30 /* 0060C 809C5E3C 8FB80034 */ lw $t8, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Box/func_809C9B28.s b/asm/non_matchings/overlays/actors/ovl_En_Box/func_809C9B28.s index cd51422336..2b82619dd9 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Box/func_809C9B28.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Box/func_809C9B28.s @@ -81,7 +81,7 @@ glabel func_809C9B28 /* 00E7C 809C9C3C AFAD0020 */ sw $t5, 0x0020($sp) /* 00E80 809C9C40 860E00B8 */ lh $t6, 0x00B8($s0) ## 000000B8 /* 00E84 809C9C44 AFAF0028 */ sw $t7, 0x0028($sp) -/* 00E88 809C9C48 0C00C916 */ jal Actor_SpawnAttached +/* 00E88 809C9C48 0C00C916 */ jal Actor_SpawnAsChild /* 00E8C 809C9C4C AFAE0024 */ sw $t6, 0x0024($sp) /* 00E90 809C9C50 0C03D719 */ jal func_800F5C64 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Changer/EnChanger_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Changer/EnChanger_Init.s index 2fe49f18bd..6545904ee4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Changer/EnChanger_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Changer/EnChanger_Init.s @@ -179,7 +179,7 @@ glabel EnChanger_Init /* 0016C 809D27FC AFA0001C */ sw $zero, 0x001C($sp) /* 00170 809D2800 AFA00024 */ sw $zero, 0x0024($sp) /* 00174 809D2804 A7A30068 */ sh $v1, 0x0068($sp) -/* 00178 809D2808 0C00C916 */ jal Actor_SpawnAttached +/* 00178 809D2808 0C00C916 */ jal Actor_SpawnAsChild /* 0017C 809D280C E7A40018 */ swc1 $f4, 0x0018($sp) /* 00180 809D2810 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 @@ -344,7 +344,7 @@ glabel EnChanger_Init /* 003D4 809D2A64 E7AA0010 */ swc1 $f10, 0x0010($sp) /* 003D8 809D2A68 E7B00014 */ swc1 $f16, 0x0014($sp) /* 003DC 809D2A6C E7B20018 */ swc1 $f18, 0x0018($sp) -/* 003E0 809D2A70 0C00C916 */ jal Actor_SpawnAttached +/* 003E0 809D2A70 0C00C916 */ jal Actor_SpawnAsChild /* 003E4 809D2A74 AFB90028 */ sw $t9, 0x0028($sp) /* 003E8 809D2A78 10400036 */ beq $v0, $zero, .L809D2B54 @@ -434,7 +434,7 @@ glabel EnChanger_Init /* 00510 809D2BA0 E7A80010 */ swc1 $f8, 0x0010($sp) /* 00514 809D2BA4 E7AA0014 */ swc1 $f10, 0x0014($sp) /* 00518 809D2BA8 E7B00018 */ swc1 $f16, 0x0018($sp) -/* 0051C 809D2BAC 0C00C916 */ jal Actor_SpawnAttached +/* 0051C 809D2BAC 0C00C916 */ jal Actor_SpawnAsChild /* 00520 809D2BB0 AFAE0028 */ sw $t6, 0x0028($sp) /* 00524 809D2BB4 10400038 */ beq $v0, $zero, .L809D2C98 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dekubaba/func_809E80D8.s b/asm/non_matchings/overlays/actors/ovl_En_Dekubaba/func_809E80D8.s index a7cc148a6e..855545b247 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dekubaba/func_809E80D8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dekubaba/func_809E80D8.s @@ -8,7 +8,7 @@ glabel func_809E80D8 /* 02920 809E80F0 A48E01C6 */ sh $t6, 0x01C6($a0) ## 000001C6 .L809E80F4: /* 02924 809E80F4 8FA5001C */ lw $a1, 0x001C($sp) -/* 02928 809E80F8 0C00BD04 */ jal func_8002F410 +/* 02928 809E80F8 0C00BD04 */ jal Actor_HasParent /* 0292C 809E80FC AFA40018 */ sw $a0, 0x0018($sp) /* 02930 809E8100 14400005 */ bne $v0, $zero, .L809E8118 /* 02934 809E8104 8FA40018 */ lw $a0, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dekunuts/EnDekunuts_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Dekunuts/EnDekunuts_Init.s index e6b234ebd3..2f5456432e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dekunuts/EnDekunuts_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dekunuts/EnDekunuts_Init.s @@ -90,7 +90,7 @@ glabel EnDekunuts_Init /* 00140 809E96A0 86180032 */ lh $t8, 0x0032($s0) ## 00000032 /* 00144 809E96A4 AFB90028 */ sw $t9, 0x0028($sp) /* 00148 809E96A8 AFA00024 */ sw $zero, 0x0024($sp) -/* 0014C 809E96AC 0C00C916 */ jal Actor_SpawnAttached +/* 0014C 809E96AC 0C00C916 */ jal Actor_SpawnAsChild /* 00150 809E96B0 AFB80020 */ sw $t8, 0x0020($sp) .L809E96B4: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dh/func_809EB110.s b/asm/non_matchings/overlays/actors/ovl_En_Dh/func_809EB110.s index c592595bd9..2ec3b3cd6e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dh/func_809EB110.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dh/func_809EB110.s @@ -22,7 +22,7 @@ glabel func_809EB110 /* 00404 809EB144 24040038 */ addiu $a0, $zero, 0x0038 ## $a0 = 00000038 /* 00408 809EB148 8FA40034 */ lw $a0, 0x0034($sp) .L809EB14C: -/* 0040C 809EB14C 0C00CD90 */ jal func_80033640 +/* 0040C 809EB14C 0C00CD90 */ jal Actor_GetCollidedExplosive /* 00410 809EB150 26050260 */ addiu $a1, $s0, 0x0260 ## $a1 = 00000260 /* 00414 809EB154 10400002 */ beq $v0, $zero, .L809EB160 /* 00418 809EB158 24180005 */ addiu $t8, $zero, 0x0005 ## $t8 = 00000005 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809ED9E0.s b/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809ED9E0.s index f9259215bc..7de55bb30d 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809ED9E0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809ED9E0.s @@ -68,7 +68,7 @@ glabel func_809ED9E0 /* 00254 809EDAC4 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 00258 809EDAC8 24070131 */ addiu $a3, $zero, 0x0131 ## $a3 = 00000131 /* 0025C 809EDACC AFA90024 */ sw $t1, 0x0024($sp) -/* 00260 809EDAD0 0C00C916 */ jal Actor_SpawnAttached +/* 00260 809EDAD0 0C00C916 */ jal Actor_SpawnAsChild /* 00264 809EDAD4 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 /* 00268 809EDAD8 10400006 */ beq $v0, $zero, .L809EDAF4 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809EEA90.s b/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809EEA90.s index 9c4b067469..b56ffd5561 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809EEA90.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Diving_Game/func_809EEA90.s @@ -7,7 +7,7 @@ glabel func_809EEA90 /* 01234 809EEAA4 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C /* 01238 809EEAA8 8FA40020 */ lw $a0, 0x0020($sp) -/* 0123C 809EEAAC 0C00BD04 */ jal func_8002F410 +/* 0123C 809EEAAC 0C00BD04 */ jal Actor_HasParent /* 01240 809EEAB0 8FA50024 */ lw $a1, 0x0024($sp) /* 01244 809EEAB4 10400005 */ beq $v0, $zero, .L809EEACC /* 01248 809EEAB8 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dns/func_809EFF50.s b/asm/non_matchings/overlays/actors/ovl_En_Dns/func_809EFF50.s index 5fc574af0c..4517f16b45 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dns/func_809EFF50.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dns/func_809EFF50.s @@ -2,7 +2,7 @@ glabel func_809EFF50 /* 00C00 809EFF50 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 /* 00C04 809EFF54 AFBF0014 */ sw $ra, 0x0014($sp) /* 00C08 809EFF58 AFA5001C */ sw $a1, 0x001C($sp) -/* 00C0C 809EFF5C 0C00BD04 */ jal func_8002F410 +/* 00C0C 809EFF5C 0C00BD04 */ jal Actor_HasParent /* 00C10 809EFF60 AFA40018 */ sw $a0, 0x0018($sp) /* 00C14 809EFF64 10400006 */ beq $v0, $zero, .L809EFF80 /* 00C18 809EFF68 8FA40018 */ lw $a0, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Demo/EnDntDemo_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Demo/EnDntDemo_Init.s index 1e94e88089..85650ab719 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Demo/EnDntDemo_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Demo/EnDntDemo_Init.s @@ -76,7 +76,7 @@ glabel EnDntDemo_Init /* 000C8 809F09A8 AFA00024 */ sw $zero, 0x0024($sp) /* 000CC 809F09AC AFA00020 */ sw $zero, 0x0020($sp) /* 000D0 809F09B0 AFA0001C */ sw $zero, 0x001C($sp) -/* 000D4 809F09B4 0C00C916 */ jal Actor_SpawnAttached +/* 000D4 809F09B4 0C00C916 */ jal Actor_SpawnAsChild /* 000D8 809F09B8 E7A80018 */ swc1 $f8, 0x0018($sp) /* 000DC 809F09BC 10400004 */ beq $v0, $zero, .L809F09D0 @@ -111,7 +111,7 @@ glabel EnDntDemo_Init /* 00148 809F0A28 240701A2 */ addiu $a3, $zero, 0x01A2 ## $a3 = 000001A2 /* 0014C 809F0A2C E7A00010 */ swc1 $f0, 0x0010($sp) /* 00150 809F0A30 E7A20014 */ swc1 $f2, 0x0014($sp) -/* 00154 809F0A34 0C00C916 */ jal Actor_SpawnAttached +/* 00154 809F0A34 0C00C916 */ jal Actor_SpawnAsChild /* 00158 809F0A38 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 0015C 809F0A3C 10400005 */ beq $v0, $zero, .L809F0A54 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F26B0.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F26B0.s index 18bc4ad840..feb8e6e1d7 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F26B0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Jiji/func_809F26B0.s @@ -8,7 +8,7 @@ glabel func_809F26B0 /* 00BE8 809F26C8 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C /* 00BEC 809F26CC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00BF0 809F26D0 0C00BD04 */ jal func_8002F410 +/* 00BF0 809F26D0 0C00BD04 */ jal Actor_HasParent /* 00BF4 809F26D4 8FA5002C */ lw $a1, 0x002C($sp) /* 00BF8 809F26D8 10400005 */ beq $v0, $zero, .L809F26F0 /* 00BFC 809F26DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3F6C.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3F6C.s index cac9e9d353..ac8b556024 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3F6C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F3F6C.s @@ -36,7 +36,7 @@ glabel func_809F3F6C /* 00D30 809F3FF0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 00D34 809F3FF4 24070168 */ addiu $a3, $zero, 0x0168 ## $a3 = 00000168 /* 00D38 809F3FF8 E7A20014 */ swc1 $f2, 0x0014($sp) -/* 00D3C 809F3FFC 0C00C916 */ jal Actor_SpawnAttached +/* 00D3C 809F3FFC 0C00C916 */ jal Actor_SpawnAsChild /* 00D40 809F4000 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 00D44 809F4004 14400006 */ bne $v0, $zero, .L809F4020 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Door/EnDoor_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Door/EnDoor_Init.s index ef9c665766..7f9a6c06d2 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Door/EnDoor_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Door/EnDoor_Init.s @@ -125,7 +125,7 @@ glabel EnDoor_Init /* 001B8 809FC388 8609001C */ lh $t1, 0x001C($s0) ## 0000001C /* 001BC 809FC38C 2401FFBF */ addiu $at, $zero, 0xFFBF ## $at = FFFFFFBF /* 001C0 809FC390 01215024 */ and $t2, $t1, $at -/* 001C4 809FC394 0C00C916 */ jal Actor_SpawnAttached +/* 001C4 809FC394 0C00C916 */ jal Actor_SpawnAsChild /* 001C8 809FC398 AFAA0028 */ sw $t2, 0x0028($sp) /* 001CC 809FC39C 10400002 */ beq $v0, $zero, .L809FC3A8 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Du/func_809FEC70.s b/asm/non_matchings/overlays/actors/ovl_En_Du/func_809FEC70.s index b880423608..258c6ea77d 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Du/func_809FEC70.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Du/func_809FEC70.s @@ -2,7 +2,7 @@ glabel func_809FEC70 /* 01040 809FEC70 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 01044 809FEC74 AFBF001C */ sw $ra, 0x001C($sp) /* 01048 809FEC78 AFA50024 */ sw $a1, 0x0024($sp) -/* 0104C 809FEC7C 0C00BD04 */ jal func_8002F410 +/* 0104C 809FEC7C 0C00BD04 */ jal Actor_HasParent /* 01050 809FEC80 AFA40020 */ sw $a0, 0x0020($sp) /* 01054 809FEC84 10400007 */ beq $v0, $zero, .L809FECA4 /* 01058 809FEC88 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Destroy.s deleted file mode 100644 index f50309172f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Destroy.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel EnDyExtra_Destroy -/* 00000 809FF6F0 AFA40000 */ sw $a0, 0x0000($sp) -/* 00004 809FF6F4 03E00008 */ jr $ra -/* 00008 809FF6F8 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Draw.s deleted file mode 100644 index acb12e88c8..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Draw.s +++ /dev/null @@ -1,192 +0,0 @@ -.rdata -glabel D_809FFCA4 - .asciz "../z_en_dy_extra.c" - .balign 4 - -glabel D_809FFCB8 - .asciz "../z_en_dy_extra.c" - .balign 4 - -glabel D_809FFCCC - .asciz "../z_en_dy_extra.c" - .balign 4 - -.text -glabel EnDyExtra_Draw -/* 00274 809FF964 3C070602 */ lui $a3, 0x0602 ## $a3 = 06020000 -/* 00278 809FF968 24E7BFB0 */ addiu $a3, $a3, 0xBFB0 ## $a3 = 0601BFB0 -/* 0027C 809FF96C 00077900 */ sll $t7, $a3, 4 -/* 00280 809FF970 000FC702 */ srl $t8, $t7, 28 -/* 00284 809FF974 0018C880 */ sll $t9, $t8, 2 -/* 00288 809FF978 3C0A8016 */ lui $t2, %hi(gSegments) -/* 0028C 809FF97C 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70 -/* 00290 809FF980 01595021 */ addu $t2, $t2, $t9 -/* 00294 809FF984 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 00298 809FF988 8D4A6FA8 */ lw $t2, %lo(gSegments)($t2) -/* 0029C 809FF98C 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 002A0 809FF990 00E15824 */ and $t3, $a3, $at -/* 002A4 809FF994 AFBF003C */ sw $ra, 0x003C($sp) -/* 002A8 809FF998 AFB00038 */ sw $s0, 0x0038($sp) -/* 002AC 809FF99C AFA40090 */ sw $a0, 0x0090($sp) -/* 002B0 809FF9A0 AFA50094 */ sw $a1, 0x0094($sp) -/* 002B4 809FF9A4 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 002B8 809FF9A8 014B3021 */ addu $a2, $t2, $t3 -/* 002BC 809FF9AC 8CB00000 */ lw $s0, 0x0000($a1) ## 00000000 -/* 002C0 809FF9B0 00C13021 */ addu $a2, $a2, $at -/* 002C4 809FF9B4 A3A00078 */ sb $zero, 0x0078($sp) -/* 002C8 809FF9B8 3C014370 */ lui $at, 0x4370 ## $at = 43700000 -/* 002CC 809FF9BC 44813000 */ mtc1 $at, $f6 ## $f6 = 240.00 -/* 002D0 809FF9C0 C4840158 */ lwc1 $f4, 0x0158($a0) ## 00000158 -/* 002D4 809FF9C4 3C01437F */ lui $at, 0x437F ## $at = 437F0000 -/* 002D8 809FF9C8 44819000 */ mtc1 $at, $f18 ## $f18 = 255.00 -/* 002DC 809FF9CC 46062202 */ mul.s $f8, $f4, $f6 -/* 002E0 809FF9D0 3C0380A0 */ lui $v1, %hi(D_809FFC50) ## $v1 = 80A00000 -/* 002E4 809FF9D4 2463FC50 */ addiu $v1, $v1, %lo(D_809FFC50) ## $v1 = 809FFC50 -/* 002E8 809FF9D8 27A50078 */ addiu $a1, $sp, 0x0078 ## $a1 = FFFFFFE8 -/* 002EC 809FF9DC 2407001B */ addiu $a3, $zero, 0x001B ## $a3 = 0000001B -/* 002F0 809FF9E0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 002F4 809FF9E4 4600428D */ trunc.w.s $f10, $f8 -/* 002F8 809FF9E8 440E5000 */ mfc1 $t6, $f10 -/* 002FC 809FF9EC 00000000 */ nop -/* 00300 809FF9F0 A3AE0079 */ sb $t6, 0x0079($sp) -/* 00304 809FF9F4 C4900158 */ lwc1 $f16, 0x0158($a0) ## 00000158 -/* 00308 809FF9F8 46128102 */ mul.s $f4, $f16, $f18 -/* 0030C 809FF9FC 4600218D */ trunc.w.s $f6, $f4 -/* 00310 809FFA00 44183000 */ mfc1 $t8, $f6 -/* 00314 809FFA04 00000000 */ nop -/* 00318 809FFA08 A3B8007A */ sb $t8, 0x007A($sp) -.L809FFA0C: -/* 0031C 809FFA0C 90640000 */ lbu $a0, 0x0000($v1) ## 809FFC50 -/* 00320 809FFA10 10800005 */ beq $a0, $zero, .L809FFA28 -/* 00324 809FFA14 00A4C821 */ addu $t9, $a1, $a0 -/* 00328 809FFA18 932A0000 */ lbu $t2, 0x0000($t9) ## 00000000 -/* 0032C 809FFA1C 00025900 */ sll $t3, $v0, 4 -/* 00330 809FFA20 00CB6821 */ addu $t5, $a2, $t3 -/* 00334 809FFA24 A1AA000F */ sb $t2, 0x000F($t5) ## 0000000F -.L809FFA28: -/* 00338 809FFA28 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001 -/* 0033C 809FFA2C 1447FFF7 */ bne $v0, $a3, .L809FFA0C -/* 00340 809FFA30 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 809FFC51 -/* 00344 809FFA34 3C0680A0 */ lui $a2, %hi(D_809FFCA4) ## $a2 = 80A00000 -/* 00348 809FFA38 24C6FCA4 */ addiu $a2, $a2, %lo(D_809FFCA4) ## $a2 = 809FFCA4 -/* 0034C 809FFA3C 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFD4 -/* 00350 809FFA40 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00354 809FFA44 0C031AB1 */ jal Graph_OpenDisps -/* 00358 809FFA48 24070126 */ addiu $a3, $zero, 0x0126 ## $a3 = 00000126 -/* 0035C 809FFA4C 8FAE0094 */ lw $t6, 0x0094($sp) -/* 00360 809FFA50 0C024F61 */ jal func_80093D84 -/* 00364 809FFA54 8DC40000 */ lw $a0, 0x0000($t6) ## 00000000 -/* 00368 809FFA58 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 0036C 809FFA5C 8FA90094 */ lw $t1, 0x0094($sp) -/* 00370 809FFA60 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000 -/* 00374 809FFA64 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008 -/* 00378 809FFA68 AE0C02D0 */ sw $t4, 0x02D0($s0) ## 000002D0 -/* 0037C 809FFA6C 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020 -/* 00380 809FFA70 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00384 809FFA74 8D23009C */ lw $v1, 0x009C($t1) ## 0000009C -/* 00388 809FFA78 8D240000 */ lw $a0, 0x0000($t1) ## 00000000 -/* 0038C 809FFA7C 24180020 */ addiu $t8, $zero, 0x0020 ## $t8 = 00000020 -/* 00390 809FFA80 00030823 */ subu $at, $zero, $v1 -/* 00394 809FFA84 000150C0 */ sll $t2, $at, 3 -/* 00398 809FFA88 24190040 */ addiu $t9, $zero, 0x0040 ## $t9 = 00000040 -/* 0039C 809FFA8C 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001 -/* 003A0 809FFA90 240D0010 */ addiu $t5, $zero, 0x0010 ## $t5 = 00000010 -/* 003A4 809FFA94 240E0010 */ addiu $t6, $zero, 0x0010 ## $t6 = 00000010 -/* 003A8 809FFA98 AFAE0028 */ sw $t6, 0x0028($sp) -/* 003AC 809FFA9C AFAD0024 */ sw $t5, 0x0024($sp) -/* 003B0 809FFAA0 AFAB0018 */ sw $t3, 0x0018($sp) -/* 003B4 809FFAA4 AFB90014 */ sw $t9, 0x0014($sp) -/* 003B8 809FFAA8 AFAA0020 */ sw $t2, 0x0020($sp) -/* 003BC 809FFAAC AFB80010 */ sw $t8, 0x0010($sp) -/* 003C0 809FFAB0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 003C4 809FFAB4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 003C8 809FFAB8 AFA20060 */ sw $v0, 0x0060($sp) -/* 003CC 809FFABC AFA3001C */ sw $v1, 0x001C($sp) -/* 003D0 809FFAC0 0C0253D0 */ jal Gfx_TwoTexScroll -/* 003D4 809FFAC4 00033040 */ sll $a2, $v1, 1 -/* 003D8 809FFAC8 8FA80060 */ lw $t0, 0x0060($sp) -/* 003DC 809FFACC 3C0FE700 */ lui $t7, 0xE700 ## $t7 = E7000000 -/* 003E0 809FFAD0 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 003E4 809FFAD4 AD020004 */ sw $v0, 0x0004($t0) ## 00000004 -/* 003E8 809FFAD8 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 003EC 809FFADC 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 003F0 809FFAE0 3C0580A0 */ lui $a1, %hi(D_809FFCB8) ## $a1 = 80A00000 -/* 003F4 809FFAE4 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008 -/* 003F8 809FFAE8 AE0C02D0 */ sw $t4, 0x02D0($s0) ## 000002D0 -/* 003FC 809FFAEC AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00400 809FFAF0 AC400004 */ sw $zero, 0x0004($v0) ## 00000004 -/* 00404 809FFAF4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 00408 809FFAF8 24A5FCB8 */ addiu $a1, $a1, %lo(D_809FFCB8) ## $a1 = 809FFCB8 -/* 0040C 809FFAFC 24060133 */ addiu $a2, $zero, 0x0133 ## $a2 = 00000133 -/* 00410 809FFB00 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00414 809FFB04 AE1802D0 */ sw $t8, 0x02D0($s0) ## 000002D0 -/* 00418 809FFB08 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 0041C 809FFB0C 8FAB0094 */ lw $t3, 0x0094($sp) -/* 00420 809FFB10 8D640000 */ lw $a0, 0x0000($t3) ## 00000000 -/* 00424 809FFB14 0C0346A2 */ jal Matrix_NewMtx -/* 00428 809FFB18 AFA20058 */ sw $v0, 0x0058($sp) -/* 0042C 809FFB1C 8FA30058 */ lw $v1, 0x0058($sp) -/* 00430 809FFB20 3C0DFA00 */ lui $t5, 0xFA00 ## $t5 = FA000000 -/* 00434 809FFB24 35AD0080 */ ori $t5, $t5, 0x0080 ## $t5 = FA000080 -/* 00438 809FFB28 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 0043C 809FFB2C 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 00440 809FFB30 8FA50090 */ lw $a1, 0x0090($sp) -/* 00444 809FFB34 3C0F80A0 */ lui $t7, %hi(D_809FFC40) ## $t7 = 80A00000 -/* 00448 809FFB38 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 0044C 809FFB3C AE0A02D0 */ sw $t2, 0x02D0($s0) ## 000002D0 -/* 00450 809FFB40 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000 -/* 00454 809FFB44 84AE0150 */ lh $t6, 0x0150($a1) ## 00000150 -/* 00458 809FFB48 25EFFC40 */ addiu $t7, $t7, %lo(D_809FFC40) ## $t7 = 809FFC40 -/* 0045C 809FFB4C 3C0680A0 */ lui $a2, %hi(D_809FFCCC) ## $a2 = 80A00000 -/* 00460 809FFB50 000E6080 */ sll $t4, $t6, 2 -/* 00464 809FFB54 018F1821 */ addu $v1, $t4, $t7 -/* 00468 809FFB58 90790002 */ lbu $t9, 0x0002($v1) ## 00000002 -/* 0046C 809FFB5C 906D0000 */ lbu $t5, 0x0000($v1) ## 00000000 -/* 00470 809FFB60 90780001 */ lbu $t8, 0x0001($v1) ## 00000001 -/* 00474 809FFB64 00195A00 */ sll $t3, $t9, 8 -/* 00478 809FFB68 000D7600 */ sll $t6, $t5, 24 -/* 0047C 809FFB6C 016E6025 */ or $t4, $t3, $t6 ## $t4 = 00000000 -/* 00480 809FFB70 0018CC00 */ sll $t9, $t8, 16 -/* 00484 809FFB74 01995025 */ or $t2, $t4, $t9 ## $t2 = 00000000 -/* 00488 809FFB78 354D00FF */ ori $t5, $t2, 0x00FF ## $t5 = 000000FF -/* 0048C 809FFB7C AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 00490 809FFB80 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 00494 809FFB84 3C0EFB00 */ lui $t6, 0xFB00 ## $t6 = FB000000 -/* 00498 809FFB88 3C0C80A0 */ lui $t4, %hi(D_809FFC48) ## $t4 = 80A00000 -/* 0049C 809FFB8C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 004A0 809FFB90 AE0B02D0 */ sw $t3, 0x02D0($s0) ## 000002D0 -/* 004A4 809FFB94 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000 -/* 004A8 809FFB98 84AF0150 */ lh $t7, 0x0150($a1) ## 00000150 -/* 004AC 809FFB9C 258CFC48 */ addiu $t4, $t4, %lo(D_809FFC48) ## $t4 = 809FFC48 -/* 004B0 809FFBA0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 004B4 809FFBA4 000FC080 */ sll $t8, $t7, 2 -/* 004B8 809FFBA8 030C1821 */ addu $v1, $t8, $t4 -/* 004BC 809FFBAC 906A0002 */ lbu $t2, 0x0002($v1) ## 00000002 -/* 004C0 809FFBB0 906E0000 */ lbu $t6, 0x0000($v1) ## 00000000 -/* 004C4 809FFBB4 90790001 */ lbu $t9, 0x0001($v1) ## 00000001 -/* 004C8 809FFBB8 000A6A00 */ sll $t5, $t2, 8 -/* 004CC 809FFBBC 000E7E00 */ sll $t7, $t6, 24 -/* 004D0 809FFBC0 01AFC025 */ or $t8, $t5, $t7 ## $t8 = 809FFCFF -/* 004D4 809FFBC4 00195400 */ sll $t2, $t9, 16 -/* 004D8 809FFBC8 030A5825 */ or $t3, $t8, $t2 ## $t3 = 809FFCFF -/* 004DC 809FFBCC 356E0080 */ ori $t6, $t3, 0x0080 ## $t6 = 809FFCFF -/* 004E0 809FFBD0 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004 -/* 004E4 809FFBD4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0 -/* 004E8 809FFBD8 3C0C0602 */ lui $t4, 0x0602 ## $t4 = 06020000 -/* 004EC 809FFBDC 258CC160 */ addiu $t4, $t4, 0xC160 ## $t4 = 0601C160 -/* 004F0 809FFBE0 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008 -/* 004F4 809FFBE4 AE0D02D0 */ sw $t5, 0x02D0($s0) ## 000002D0 -/* 004F8 809FFBE8 3C0FDE00 */ lui $t7, 0xDE00 ## $t7 = DE000000 -/* 004FC 809FFBEC 24C6FCCC */ addiu $a2, $a2, %lo(D_809FFCCC) ## $a2 = 809FFCCC -/* 00500 809FFBF0 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFD4 -/* 00504 809FFBF4 24070145 */ addiu $a3, $zero, 0x0145 ## $a3 = 00000145 -/* 00508 809FFBF8 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 0050C 809FFBFC 0C031AD5 */ jal Graph_CloseDisps -/* 00510 809FFC00 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004 -/* 00514 809FFC04 8FBF003C */ lw $ra, 0x003C($sp) -/* 00518 809FFC08 8FB00038 */ lw $s0, 0x0038($sp) -/* 0051C 809FFC0C 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000 -/* 00520 809FFC10 03E00008 */ jr $ra -/* 00524 809FFC14 00000000 */ nop -/* 00528 809FFC18 00000000 */ nop -/* 0052C 809FFC1C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Init.s deleted file mode 100644 index 6fd2eddb0a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Init.s +++ /dev/null @@ -1,66 +0,0 @@ -.rdata -glabel D_809FFC70 - .asciz "\n\n" - .balign 4 - -glabel D_809FFC74 - .asciz "\x1b[33m☆☆☆☆☆ 大妖精効果 ☆☆☆☆☆ %d\n\x1b[m" - .balign 4 - -.late_rodata -glabel D_809FFCE0 - .float 0.025 - -glabel D_809FFCE4 - .word 0x3D1FBE77 -glabel D_809FFCE8 - .word 0xBE4CCCCD - -.text -glabel EnDyExtra_Init -/* 0000C 809FF6FC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00010 809FF700 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00014 809FF704 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00018 809FF708 3C0480A0 */ lui $a0, %hi(D_809FFC70) ## $a0 = 80A00000 -/* 0001C 809FF70C AFA5001C */ sw $a1, 0x001C($sp) -/* 00020 809FF710 2484FC70 */ addiu $a0, $a0, %lo(D_809FFC70) ## $a0 = 809FFC70 -/* 00024 809FF714 0C00084C */ jal osSyncPrintf - -/* 00028 809FF718 AFA60018 */ sw $a2, 0x0018($sp) -/* 0002C 809FF71C 8FA60018 */ lw $a2, 0x0018($sp) -/* 00030 809FF720 3C0480A0 */ lui $a0, %hi(D_809FFC74) ## $a0 = 80A00000 -/* 00034 809FF724 2484FC74 */ addiu $a0, $a0, %lo(D_809FFC74) ## $a0 = 809FFC74 -/* 00038 809FF728 0C00084C */ jal osSyncPrintf - -/* 0003C 809FF72C 84C5001C */ lh $a1, 0x001C($a2) ## 0000001C -/* 00040 809FF730 8FA60018 */ lw $a2, 0x0018($sp) -/* 00044 809FF734 3C0180A0 */ lui $at, %hi(D_809FFCE0) ## $at = 80A00000 -/* 00048 809FF738 C420FCE0 */ lwc1 $f0, %lo(D_809FFCE0)($at) -/* 0004C 809FF73C 84CE001C */ lh $t6, 0x001C($a2) ## 0000001C -/* 00050 809FF740 8CD80024 */ lw $t8, 0x0024($a2) ## 00000024 -/* 00054 809FF744 3C0180A0 */ lui $at, %hi(D_809FFCE4) ## $at = 80A00000 -/* 00058 809FF748 E4C0015C */ swc1 $f0, 0x015C($a2) ## 0000015C -/* 0005C 809FF74C A4CE0150 */ sh $t6, 0x0150($a2) ## 00000150 -/* 00060 809FF750 C424FCE4 */ lwc1 $f4, %lo(D_809FFCE4)($at) -/* 00064 809FF754 ACD80168 */ sw $t8, 0x0168($a2) ## 00000168 -/* 00068 809FF758 8CD8002C */ lw $t8, 0x002C($a2) ## 0000002C -/* 0006C 809FF75C 8CCF0028 */ lw $t7, 0x0028($a2) ## 00000028 -/* 00070 809FF760 3C0180A0 */ lui $at, %hi(D_809FFCE8) ## $at = 80A00000 -/* 00074 809FF764 E4C00164 */ swc1 $f0, 0x0164($a2) ## 00000164 -/* 00078 809FF768 E4C40160 */ swc1 $f4, 0x0160($a2) ## 00000160 -/* 0007C 809FF76C ACD80170 */ sw $t8, 0x0170($a2) ## 00000170 -/* 00080 809FF770 ACCF016C */ sw $t7, 0x016C($a2) ## 0000016C -/* 00084 809FF774 C426FCE8 */ lwc1 $f6, %lo(D_809FFCE8)($at) -/* 00088 809FF778 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 0008C 809FF77C 44814000 */ mtc1 $at, $f8 ## $f8 = 1.00 -/* 00090 809FF780 3C0880A0 */ lui $t0, %hi(func_809FF7AC) ## $t0 = 80A00000 -/* 00094 809FF784 2419003C */ addiu $t9, $zero, 0x003C ## $t9 = 0000003C -/* 00098 809FF788 2508F7AC */ addiu $t0, $t0, %lo(func_809FF7AC) ## $t0 = 809FF7AC -/* 0009C 809FF78C A4D90154 */ sh $t9, 0x0154($a2) ## 00000154 -/* 000A0 809FF790 ACC8014C */ sw $t0, 0x014C($a2) ## 0000014C -/* 000A4 809FF794 E4C6006C */ swc1 $f6, 0x006C($a2) ## 0000006C -/* 000A8 809FF798 E4C80158 */ swc1 $f8, 0x0158($a2) ## 00000158 -/* 000AC 809FF79C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 000B0 809FF7A0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 000B4 809FF7A4 03E00008 */ jr $ra -/* 000B8 809FF7A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Update.s deleted file mode 100644 index 8bbdbcd3c5..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Update.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel EnDyExtra_Update -/* 00208 809FF8F8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0020C 809FF8FC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00210 809FF900 AFA5001C */ sw $a1, 0x001C($sp) -/* 00214 809FF904 84820154 */ lh $v0, 0x0154($a0) ## 00000154 -/* 00218 809FF908 240500C4 */ addiu $a1, $zero, 0x00C4 ## $a1 = 000000C4 -/* 0021C 809FF90C 10400002 */ beq $v0, $zero, .L809FF918 -/* 00220 809FF910 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00224 809FF914 A48E0154 */ sh $t6, 0x0154($a0) ## 00000154 -.L809FF918: -/* 00228 809FF918 C484015C */ lwc1 $f4, 0x015C($a0) ## 0000015C -/* 0022C 809FF91C C4860160 */ lwc1 $f6, 0x0160($a0) ## 00000160 -/* 00230 809FF920 C4880164 */ lwc1 $f8, 0x0164($a0) ## 00000164 -/* 00234 809FF924 E4840050 */ swc1 $f4, 0x0050($a0) ## 00000050 -/* 00238 809FF928 E4860054 */ swc1 $f6, 0x0054($a0) ## 00000054 -/* 0023C 809FF92C E4880058 */ swc1 $f8, 0x0058($a0) ## 00000058 -/* 00240 809FF930 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00244 809FF934 AFA40018 */ sw $a0, 0x0018($sp) -/* 00248 809FF938 8FA40018 */ lw $a0, 0x0018($sp) -/* 0024C 809FF93C 8FA5001C */ lw $a1, 0x001C($sp) -/* 00250 809FF940 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C -/* 00254 809FF944 0320F809 */ jalr $ra, $t9 -/* 00258 809FF948 00000000 */ nop -/* 0025C 809FF94C 0C00B638 */ jal Actor_MoveForward - -/* 00260 809FF950 8FA40018 */ lw $a0, 0x0018($sp) -/* 00264 809FF954 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00268 809FF958 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0026C 809FF95C 03E00008 */ jr $ra -/* 00270 809FF960 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF7AC.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF7AC.s deleted file mode 100644 index ebde193528..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF7AC.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel func_809FF7AC -/* 000BC 809FF7AC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 000C0 809FF7B0 AFB00018 */ sw $s0, 0x0018($sp) -/* 000C4 809FF7B4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 000C8 809FF7B8 AFBF001C */ sw $ra, 0x001C($sp) -/* 000CC 809FF7BC AFA50024 */ sw $a1, 0x0024($sp) -/* 000D0 809FF7C0 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000 -/* 000D4 809FF7C4 3C073BA3 */ lui $a3, 0x3BA3 ## $a3 = 3BA30000 -/* 000D8 809FF7C8 34E7D70A */ ori $a3, $a3, 0xD70A ## $a3 = 3BA3D70A -/* 000DC 809FF7CC 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD -/* 000E0 809FF7D0 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 000E4 809FF7D4 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 000E8 809FF7D8 2484006C */ addiu $a0, $a0, 0x006C ## $a0 = 0000006C -/* 000EC 809FF7DC 3C01C25C */ lui $at, 0xC25C ## $at = C25C0000 -/* 000F0 809FF7E0 44813000 */ mtc1 $at, $f6 ## $f6 = -55.00 -/* 000F4 809FF7E4 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028 -/* 000F8 809FF7E8 4606203C */ c.lt.s $f4, $f6 -/* 000FC 809FF7EC 00000000 */ nop -/* 00100 809FF7F0 45020005 */ bc1fl .L809FF808 -/* 00104 809FF7F4 860E0154 */ lh $t6, 0x0154($s0) ## 00000154 -/* 00108 809FF7F8 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 -/* 0010C 809FF7FC 00000000 */ nop -/* 00110 809FF800 E6080060 */ swc1 $f8, 0x0060($s0) ## 00000060 -/* 00114 809FF804 860E0154 */ lh $t6, 0x0154($s0) ## 00000154 -.L809FF808: -/* 00118 809FF808 55C00009 */ bnel $t6, $zero, .L809FF830 -/* 0011C 809FF80C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00120 809FF810 860F0152 */ lh $t7, 0x0152($s0) ## 00000152 -/* 00124 809FF814 3C1980A0 */ lui $t9, %hi(func_809FF840) ## $t9 = 80A00000 -/* 00128 809FF818 241800C8 */ addiu $t8, $zero, 0x00C8 ## $t8 = 000000C8 -/* 0012C 809FF81C 11E00003 */ beq $t7, $zero, .L809FF82C -/* 00130 809FF820 2739F840 */ addiu $t9, $t9, %lo(func_809FF840) ## $t9 = 809FF840 -/* 00134 809FF824 A6180154 */ sh $t8, 0x0154($s0) ## 00000154 -/* 00138 809FF828 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C -.L809FF82C: -/* 0013C 809FF82C 8FBF001C */ lw $ra, 0x001C($sp) -.L809FF830: -/* 00140 809FF830 8FB00018 */ lw $s0, 0x0018($sp) -/* 00144 809FF834 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00148 809FF838 03E00008 */ jr $ra -/* 0014C 809FF83C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF840.s b/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF840.s deleted file mode 100644 index 969b1aa454..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF840.s +++ /dev/null @@ -1,58 +0,0 @@ -.late_rodata -glabel D_809FFCEC - .float 0.02 - -.text -glabel func_809FF840 -/* 00150 809FF840 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00154 809FF844 AFB00018 */ sw $s0, 0x0018($sp) -/* 00158 809FF848 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0015C 809FF84C AFBF001C */ sw $ra, 0x001C($sp) -/* 00160 809FF850 AFA50024 */ sw $a1, 0x0024($sp) -/* 00164 809FF854 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000 -/* 00168 809FF858 3C073BA3 */ lui $a3, 0x3BA3 ## $a3 = 3BA30000 -/* 0016C 809FF85C 34E7D70A */ ori $a3, $a3, 0xD70A ## $a3 = 3BA3D70A -/* 00170 809FF860 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD -/* 00174 809FF864 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 00178 809FF868 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 0017C 809FF86C 2484006C */ addiu $a0, $a0, 0x006C ## $a0 = 0000006C -/* 00180 809FF870 860E0154 */ lh $t6, 0x0154($s0) ## 00000154 -/* 00184 809FF874 3C0180A0 */ lui $at, %hi(D_809FFCEC) ## $at = 80A00000 -/* 00188 809FF878 11C0000A */ beq $t6, $zero, .L809FF8A4 -/* 0018C 809FF87C 00000000 */ nop -/* 00190 809FF880 C6040158 */ lwc1 $f4, 0x0158($s0) ## 00000158 -/* 00194 809FF884 C426FCEC */ lwc1 $f6, %lo(D_809FFCEC)($at) -/* 00198 809FF888 3C053CF5 */ lui $a1, 0x3CF5 ## $a1 = 3CF50000 -/* 0019C 809FF88C 34A5C28F */ ori $a1, $a1, 0xC28F ## $a1 = 3CF5C28F -/* 001A0 809FF890 4606203C */ c.lt.s $f4, $f6 -/* 001A4 809FF894 26040158 */ addiu $a0, $s0, 0x0158 ## $a0 = 00000158 -/* 001A8 809FF898 3C063D4C */ lui $a2, 0x3D4C ## $a2 = 3D4C0000 -/* 001AC 809FF89C 45000005 */ bc1f .L809FF8B4 -/* 001B0 809FF8A0 00000000 */ nop -.L809FF8A4: -/* 001B4 809FF8A4 0C00B55C */ jal Actor_Kill - -/* 001B8 809FF8A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001BC 809FF8AC 1000000E */ beq $zero, $zero, .L809FF8E8 -/* 001C0 809FF8B0 8FBF001C */ lw $ra, 0x001C($sp) -.L809FF8B4: -/* 001C4 809FF8B4 0C01E123 */ jal Math_SmoothDownscaleMaxF - -/* 001C8 809FF8B8 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 0000CCCD -/* 001CC 809FF8BC 3C01C25C */ lui $at, 0xC25C ## $at = C25C0000 -/* 001D0 809FF8C0 44815000 */ mtc1 $at, $f10 ## $f10 = -55.00 -/* 001D4 809FF8C4 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028 -/* 001D8 809FF8C8 460A403C */ c.lt.s $f8, $f10 -/* 001DC 809FF8CC 00000000 */ nop -/* 001E0 809FF8D0 45020005 */ bc1fl .L809FF8E8 -/* 001E4 809FF8D4 8FBF001C */ lw $ra, 0x001C($sp) -/* 001E8 809FF8D8 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00 -/* 001EC 809FF8DC 00000000 */ nop -/* 001F0 809FF8E0 E6100060 */ swc1 $f16, 0x0060($s0) ## 00000060 -/* 001F4 809FF8E4 8FBF001C */ lw $ra, 0x001C($sp) -.L809FF8E8: -/* 001F8 809FF8E8 8FB00018 */ lw $s0, 0x0018($sp) -/* 001FC 809FF8EC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00200 809FF8F0 03E00008 */ jr $ra -/* 00204 809FF8F4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Eiyer/EnEiyer_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Eiyer/EnEiyer_Init.s index 15775d1074..cc01a18802 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Eiyer/EnEiyer_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Eiyer/EnEiyer_Init.s @@ -68,7 +68,7 @@ glabel EnEiyer_Init /* 000F4 80A00094 AFA90028 */ sw $t1, 0x0028($sp) /* 000F8 80A00098 AFA00024 */ sw $zero, 0x0024($sp) /* 000FC 80A0009C 27284000 */ addiu $t0, $t9, 0x4000 ## $t0 = 00004000 -/* 00100 80A000A0 0C00C916 */ jal Actor_SpawnAttached +/* 00100 80A000A0 0C00C916 */ jal Actor_SpawnAsChild /* 00104 80A000A4 AFA80020 */ sw $t0, 0x0020($sp) /* 00108 80A000A8 54400006 */ bnel $v0, $zero, .L80A000C4 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A0329C.s b/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A0329C.s index f0fd0677e4..cdf226477e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A0329C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A0329C.s @@ -74,7 +74,7 @@ glabel func_80A0329C /* 01748 80A03378 24060010 */ addiu $a2, $zero, 0x0010 ## $a2 = 00000010 /* 0174C 80A0337C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 .L80A03380: -/* 01750 80A03380 0C00BD04 */ jal func_8002F410 +/* 01750 80A03380 0C00BD04 */ jal Actor_HasParent /* 01754 80A03384 8FA5003C */ lw $a1, 0x003C($sp) /* 01758 80A03388 10400005 */ beq $v0, $zero, .L80A033A0 /* 0175C 80A0338C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A0693C.s b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A0693C.s index 96bfb19f68..80c191cd6b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A0693C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A0693C.s @@ -176,7 +176,7 @@ glabel func_80A0693C /* 00454 80A06B74 AFA00024 */ sw $zero, 0x0024($sp) /* 00458 80A06B78 AFB20028 */ sw $s2, 0x0028($sp) /* 0045C 80A06B7C E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00460 80A06B80 0C00C916 */ jal Actor_SpawnAttached +/* 00460 80A06B80 0C00C916 */ jal Actor_SpawnAsChild /* 00464 80A06B84 E7A60018 */ swc1 $f6, 0x0018($sp) /* 00468 80A06B88 10400030 */ beq $v0, $zero, .L80A06C4C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06CD0.s b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06CD0.s index 286cbaae4e..d16bb6a1b4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06CD0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06CD0.s @@ -103,7 +103,7 @@ glabel func_80A06CD0 /* 006FC 80A06E1C AFAF0028 */ sw $t7, 0x0028($sp) /* 00700 80A06E20 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 /* 00704 80A06E24 E7A60010 */ swc1 $f6, 0x0010($sp) -/* 00708 80A06E28 0C00C916 */ jal Actor_SpawnAttached +/* 00708 80A06E28 0C00C916 */ jal Actor_SpawnAsChild /* 0070C 80A06E2C E7A80018 */ swc1 $f8, 0x0018($sp) /* 00710 80A06E30 10400008 */ beq $v0, $zero, .L80A06E54 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06E88.s b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06E88.s index 8cc7296a6c..8f37d7b519 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06E88.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Encount1/func_80A06E88.s @@ -270,7 +270,7 @@ glabel func_80A06E88 /* 00B00 80A07220 AFA80028 */ sw $t0, 0x0028($sp) /* 00B04 80A07224 E7A80010 */ swc1 $f8, 0x0010($sp) /* 00B08 80A07228 E7AA0014 */ swc1 $f10, 0x0014($sp) -/* 00B0C 80A0722C 0C00C916 */ jal Actor_SpawnAttached +/* 00B0C 80A0722C 0C00C916 */ jal Actor_SpawnAsChild /* 00B10 80A07230 E7B00018 */ swc1 $f16, 0x0018($sp) /* 00B14 80A07234 10400013 */ beq $v0, $zero, .L80A07284 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Encount2/func_80A07CA4.s b/asm/non_matchings/overlays/actors/ovl_En_Encount2/func_80A07CA4.s index bed115395b..1384a3d02e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Encount2/func_80A07CA4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Encount2/func_80A07CA4.s @@ -430,7 +430,7 @@ glabel func_80A07CA4 /* 0089C 80A0822C E7A80010 */ swc1 $f8, 0x0010($sp) /* 008A0 80A08230 E7AA0014 */ swc1 $f10, 0x0014($sp) /* 008A4 80A08234 E7A60018 */ swc1 $f6, 0x0018($sp) -/* 008A8 80A08238 0C00C916 */ jal Actor_SpawnAttached +/* 008A8 80A08238 0C00C916 */ jal Actor_SpawnAsChild /* 008AC 80A0823C AFB90028 */ sw $t9, 0x0028($sp) /* 008B0 80A08240 10400006 */ beq $v0, $zero, .L80A0825C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Item/func_80A09978.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Item/func_80A09978.s index 59823f4003..ca39b4bc25 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Item/func_80A09978.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ex_Item/func_80A09978.s @@ -2,7 +2,7 @@ glabel func_80A09978 /* 00AD8 80A09978 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00ADC 80A0997C AFBF001C */ sw $ra, 0x001C($sp) /* 00AE0 80A09980 AFA50024 */ sw $a1, 0x0024($sp) -/* 00AE4 80A09984 0C00BD04 */ jal func_8002F410 +/* 00AE4 80A09984 0C00BD04 */ jal Actor_HasParent /* 00AE8 80A09988 AFA40020 */ sw $a0, 0x0020($sp) /* 00AEC 80A0998C 10400005 */ beq $v0, $zero, .L80A099A4 /* 00AF0 80A09990 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Destroy.s deleted file mode 100644 index de06b568e9..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Destroy.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel EnExRuppy_Destroy -/* 00404 80A0A814 AFA40000 */ sw $a0, 0x0000($sp) -/* 00408 80A0A818 03E00008 */ jr $ra -/* 0040C 80A0A81C AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Draw.s deleted file mode 100644 index 31b897efa3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Draw.s +++ /dev/null @@ -1,97 +0,0 @@ -.rdata -glabel D_80A0B4D0 - .asciz "../z_en_ex_ruppy.c" - .balign 4 - -glabel D_80A0B4E4 - .asciz "../z_en_ex_ruppy.c" - .balign 4 - -glabel D_80A0B4F8 - .asciz "../z_en_ex_ruppy.c" - .balign 4 - -.text -glabel EnExRuppy_Draw -/* 00DCC 80A0B1DC 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 00DD0 80A0B1E0 AFBF001C */ sw $ra, 0x001C($sp) -/* 00DD4 80A0B1E4 AFB10018 */ sw $s1, 0x0018($sp) -/* 00DD8 80A0B1E8 AFB00014 */ sw $s0, 0x0014($sp) -/* 00DDC 80A0B1EC AFA40050 */ sw $a0, 0x0050($sp) -/* 00DE0 80A0B1F0 848F0154 */ lh $t7, 0x0154($a0) ## 00000154 -/* 00DE4 80A0B1F4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00DE8 80A0B1F8 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4 -/* 00DEC 80A0B1FC 15E00041 */ bne $t7, $zero, .L80A0B304 -/* 00DF0 80A0B200 3C0680A1 */ lui $a2, %hi(D_80A0B4D0) ## $a2 = 80A10000 -/* 00DF4 80A0B204 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00DF8 80A0B208 24C6B4D0 */ addiu $a2, $a2, %lo(D_80A0B4D0) ## $a2 = 80A0B4D0 -/* 00DFC 80A0B20C 24070306 */ addiu $a3, $zero, 0x0306 ## $a3 = 00000306 -/* 00E00 80A0B210 0C031AB1 */ jal Graph_OpenDisps -/* 00E04 80A0B214 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00E08 80A0B218 0C024F46 */ jal func_80093D18 -/* 00E0C 80A0B21C 8E240000 */ lw $a0, 0x0000($s1) ## 00000000 -/* 00E10 80A0B220 8FA40050 */ lw $a0, 0x0050($sp) -/* 00E14 80A0B224 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00E18 80A0B228 0C00BAF3 */ jal func_8002EBCC -/* 00E1C 80A0B22C 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 00E20 80A0B230 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00E24 80A0B234 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 00E28 80A0B238 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 00E2C 80A0B23C 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00E30 80A0B240 AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0 -/* 00E34 80A0B244 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00E38 80A0B248 8E240000 */ lw $a0, 0x0000($s1) ## 00000000 -/* 00E3C 80A0B24C 3C0580A1 */ lui $a1, %hi(D_80A0B4E4) ## $a1 = 80A10000 -/* 00E40 80A0B250 24A5B4E4 */ addiu $a1, $a1, %lo(D_80A0B4E4) ## $a1 = 80A0B4E4 -/* 00E44 80A0B254 2406030C */ addiu $a2, $zero, 0x030C ## $a2 = 0000030C -/* 00E48 80A0B258 0C0346A2 */ jal Matrix_NewMtx -/* 00E4C 80A0B25C AFA20030 */ sw $v0, 0x0030($sp) -/* 00E50 80A0B260 8FA30030 */ lw $v1, 0x0030($sp) -/* 00E54 80A0B264 3C09DB06 */ lui $t1, 0xDB06 ## $t1 = DB060000 -/* 00E58 80A0B268 35290020 */ ori $t1, $t1, 0x0020 ## $t1 = DB060020 -/* 00E5C 80A0B26C AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00E60 80A0B270 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00E64 80A0B274 3C0480A1 */ lui $a0, %hi(D_80A0B3B8) ## $a0 = 80A10000 -/* 00E68 80A0B278 3C198016 */ lui $t9, %hi(gSegments) -/* 00E6C 80A0B27C 24480008 */ addiu $t0, $v0, 0x0008 ## $t0 = 00000008 -/* 00E70 80A0B280 AE0802C0 */ sw $t0, 0x02C0($s0) ## 000002C0 -/* 00E74 80A0B284 AC490000 */ sw $t1, 0x0000($v0) ## 00000000 -/* 00E78 80A0B288 8FAA0050 */ lw $t2, 0x0050($sp) -/* 00E7C 80A0B28C 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 00E80 80A0B290 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 00E84 80A0B294 854B0150 */ lh $t3, 0x0150($t2) ## 00000150 -/* 00E88 80A0B298 3C0680A1 */ lui $a2, %hi(D_80A0B4F8) ## $a2 = 80A10000 -/* 00E8C 80A0B29C 24C6B4F8 */ addiu $a2, $a2, %lo(D_80A0B4F8) ## $a2 = 80A0B4F8 -/* 00E90 80A0B2A0 000B6080 */ sll $t4, $t3, 2 -/* 00E94 80A0B2A4 008C2021 */ addu $a0, $a0, $t4 -/* 00E98 80A0B2A8 8C84B3B8 */ lw $a0, %lo(D_80A0B3B8)($a0) -/* 00E9C 80A0B2AC 3C0C0404 */ lui $t4, 0x0404 ## $t4 = 04040000 -/* 00EA0 80A0B2B0 258C2440 */ addiu $t4, $t4, 0x2440 ## $t4 = 04042440 -/* 00EA4 80A0B2B4 00047100 */ sll $t6, $a0, 4 -/* 00EA8 80A0B2B8 000E7F02 */ srl $t7, $t6, 28 -/* 00EAC 80A0B2BC 000FC080 */ sll $t8, $t7, 2 -/* 00EB0 80A0B2C0 0338C821 */ addu $t9, $t9, $t8 -/* 00EB4 80A0B2C4 8F396FA8 */ lw $t9, %lo(gSegments)($t9) -/* 00EB8 80A0B2C8 00816824 */ and $t5, $a0, $at -/* 00EBC 80A0B2CC 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 00EC0 80A0B2D0 01B94021 */ addu $t0, $t5, $t9 -/* 00EC4 80A0B2D4 01014821 */ addu $t1, $t0, $at -/* 00EC8 80A0B2D8 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00ECC 80A0B2DC 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00ED0 80A0B2E0 3C0BDE00 */ lui $t3, 0xDE00 ## $t3 = DE000000 -/* 00ED4 80A0B2E4 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4 -/* 00ED8 80A0B2E8 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00EDC 80A0B2EC AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0 -/* 00EE0 80A0B2F0 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004 -/* 00EE4 80A0B2F4 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 00EE8 80A0B2F8 8E250000 */ lw $a1, 0x0000($s1) ## 00000000 -/* 00EEC 80A0B2FC 0C031AD5 */ jal Graph_CloseDisps -/* 00EF0 80A0B300 24070310 */ addiu $a3, $zero, 0x0310 ## $a3 = 00000310 -.L80A0B304: -/* 00EF4 80A0B304 8FBF001C */ lw $ra, 0x001C($sp) -/* 00EF8 80A0B308 8FB00014 */ lw $s0, 0x0014($sp) -/* 00EFC 80A0B30C 8FB10018 */ lw $s1, 0x0018($sp) -/* 00F00 80A0B310 03E00008 */ jr $ra -/* 00F04 80A0B314 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 -/* 00F08 80A0B318 00000000 */ nop -/* 00F0C 80A0B31C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Init.s deleted file mode 100644 index 17ef48dac5..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Init.s +++ /dev/null @@ -1,332 +0,0 @@ -.rdata -glabel D_80A0B3D0 - .asciz "\x1b[32m☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n\x1b[m" - .balign 4 - -glabel D_80A0B400 - .asciz "\x1b[32m☆☆☆☆☆ わーなーコイン ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -glabel D_80A0B430 - .asciz "\x1b[32m☆☆☆☆☆ ノーマルルピー ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -.late_rodata -glabel jtbl_80A0B50C -.word L80A0A478 -.word L80A0A634 -.word L80A0A634 -.word L80A0A6E0 -.word L80A0A7AC -glabel D_80A0B520 - .float 0.01 - -glabel D_80A0B524 - .word 0x4348FD71 -glabel D_80A0B528 - .float 0.02 - -glabel D_80A0B52C - .float 0.02 - -glabel D_80A0B530 - .word 0x407F5C29 -glabel D_80A0B534 - .float 0.02 - -glabel D_80A0B538 - .word 0x41F7EB85 -glabel D_80A0B53C - .float 0.01 - -.text -glabel EnExRuppy_Init -/* 00000 80A0A410 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00004 80A0A414 AFBF001C */ sw $ra, 0x001C($sp) -/* 00008 80A0A418 AFB00018 */ sw $s0, 0x0018($sp) -/* 0000C 80A0A41C AFA50024 */ sw $a1, 0x0024($sp) -/* 00010 80A0A420 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 00014 80A0A424 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 80A0A428 A48E0152 */ sh $t6, 0x0152($a0) ## 00000152 -/* 0001C 80A0A42C 3C0480A1 */ lui $a0, %hi(D_80A0B3D0) ## $a0 = 80A10000 -/* 00020 80A0A430 2484B3D0 */ addiu $a0, $a0, %lo(D_80A0B3D0) ## $a0 = 80A0B3D0 -/* 00024 80A0A434 0C00084C */ jal osSyncPrintf - -/* 00028 80A0A438 86050152 */ lh $a1, 0x0152($s0) ## 00000152 -/* 0002C 80A0A43C 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle) -/* 00030 80A0A440 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawFunc_Circle) -/* 00034 80A0A444 260400B4 */ addiu $a0, $s0, 0x00B4 ## $a0 = 000000B4 -/* 00038 80A0A448 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 0003C 80A0A44C 0C00AC78 */ jal ActorShape_Init - -/* 00040 80A0A450 3C0741C8 */ lui $a3, 0x41C8 ## $a3 = 41C80000 -/* 00044 80A0A454 86020152 */ lh $v0, 0x0152($s0) ## 00000152 -/* 00048 80A0A458 2C410005 */ sltiu $at, $v0, 0x0005 -/* 0004C 80A0A45C 102000E8 */ beq $at, $zero, .L80A0A800 -/* 00050 80A0A460 00027880 */ sll $t7, $v0, 2 -/* 00054 80A0A464 3C0180A1 */ lui $at, %hi(jtbl_80A0B50C) ## $at = 80A10000 -/* 00058 80A0A468 002F0821 */ addu $at, $at, $t7 -/* 0005C 80A0A46C 8C2FB50C */ lw $t7, %lo(jtbl_80A0B50C)($at) -/* 00060 80A0A470 01E00008 */ jr $t7 -/* 00064 80A0A474 00000000 */ nop -glabel L80A0A478 -/* 00068 80A0A478 3C0180A1 */ lui $at, %hi(D_80A0B520) ## $at = 80A10000 -/* 0006C 80A0A47C C420B520 */ lwc1 $f0, %lo(D_80A0B520)($at) -/* 00070 80A0A480 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00074 80A0A484 44050000 */ mfc1 $a1, $f0 -/* 00078 80A0A488 0C00B58B */ jal Actor_SetScale - -/* 0007C 80A0A48C E6000160 */ swc1 $f0, 0x0160($s0) ## 00000160 -/* 00080 80A0A490 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00084 80A0A494 2418FFFF */ addiu $t8, $zero, 0xFFFF ## $t8 = FFFFFFFF -/* 00088 80A0A498 A2180003 */ sb $t8, 0x0003($s0) ## 00000003 -/* 0008C 80A0A49C 3C198016 */ lui $t9, %hi(gSaveContext+0xeda) -/* 00090 80A0A4A0 E604006C */ swc1 $f4, 0x006C($s0) ## 0000006C -/* 00094 80A0A4A4 9739F53A */ lhu $t9, %lo(gSaveContext+0xeda)($t9) -/* 00098 80A0A4A8 24090005 */ addiu $t1, $zero, 0x0005 ## $t1 = 00000005 -/* 0009C 80A0A4AC 3C0180A1 */ lui $at, %hi(D_80A0B524) ## $at = 80A10000 -/* 000A0 80A0A4B0 33280100 */ andi $t0, $t9, 0x0100 ## $t0 = 00000000 -/* 000A4 80A0A4B4 15000004 */ bne $t0, $zero, .L80A0A4C8 -/* 000A8 80A0A4B8 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 000AC 80A0A4BC A6090158 */ sh $t1, 0x0158($s0) ## 00000158 -/* 000B0 80A0A4C0 10000049 */ beq $zero, $zero, .L80A0A5E8 -/* 000B4 80A0A4C4 A60A0150 */ sh $t2, 0x0150($s0) ## 00000150 -.L80A0A4C8: -/* 000B8 80A0A4C8 8E030118 */ lw $v1, 0x0118($s0) ## 00000118 -/* 000BC 80A0A4CC C422B524 */ lwc1 $f2, %lo(D_80A0B524)($at) -/* 000C0 80A0A4D0 1060000C */ beq $v1, $zero, .L80A0A504 -/* 000C4 80A0A4D4 46001306 */ mov.s $f12, $f2 -/* 000C8 80A0A4D8 8C6B0130 */ lw $t3, 0x0130($v1) ## 00000130 -/* 000CC 80A0A4DC 11600009 */ beq $t3, $zero, .L80A0A504 -/* 000D0 80A0A4E0 00000000 */ nop -/* 000D4 80A0A4E4 846C02AA */ lh $t4, 0x02AA($v1) ## 000002AA -/* 000D8 80A0A4E8 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 000DC 80A0A4EC 44815000 */ mtc1 $at, $f10 ## $f10 = 10.00 -/* 000E0 80A0A4F0 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00 -/* 000E4 80A0A4F4 00000000 */ nop -/* 000E8 80A0A4F8 46803220 */ cvt.s.w $f8, $f6 -/* 000EC 80A0A4FC 460A4002 */ mul.s $f0, $f8, $f10 -/* 000F0 80A0A500 46001300 */ add.s $f12, $f2, $f0 -.L80A0A504: -/* 000F4 80A0A504 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 000F8 80A0A508 00000000 */ nop -/* 000FC 80A0A50C 4600040D */ trunc.w.s $f16, $f0 -/* 00100 80A0A510 44028000 */ mfc1 $v0, $f16 -/* 00104 80A0A514 00000000 */ nop -/* 00108 80A0A518 00021400 */ sll $v0, $v0, 16 -/* 0010C 80A0A51C 00021403 */ sra $v0, $v0, 16 -/* 00110 80A0A520 04400006 */ bltz $v0, .L80A0A53C -/* 00114 80A0A524 28410028 */ slti $at, $v0, 0x0028 -/* 00118 80A0A528 10200004 */ beq $at, $zero, .L80A0A53C -/* 0011C 80A0A52C 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00120 80A0A530 A60E0158 */ sh $t6, 0x0158($s0) ## 00000158 -/* 00124 80A0A534 1000002C */ beq $zero, $zero, .L80A0A5E8 -/* 00128 80A0A538 A6000150 */ sh $zero, 0x0150($s0) ## 00000150 -.L80A0A53C: -/* 0012C 80A0A53C 28410028 */ slti $at, $v0, 0x0028 -/* 00130 80A0A540 14200007 */ bne $at, $zero, .L80A0A560 -/* 00134 80A0A544 284100AA */ slti $at, $v0, 0x00AA -/* 00138 80A0A548 10200005 */ beq $at, $zero, .L80A0A560 -/* 0013C 80A0A54C 240F0005 */ addiu $t7, $zero, 0x0005 ## $t7 = 00000005 -/* 00140 80A0A550 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001 -/* 00144 80A0A554 A60F0158 */ sh $t7, 0x0158($s0) ## 00000158 -/* 00148 80A0A558 10000023 */ beq $zero, $zero, .L80A0A5E8 -/* 0014C 80A0A55C A6180150 */ sh $t8, 0x0150($s0) ## 00000150 -.L80A0A560: -/* 00150 80A0A560 284100AA */ slti $at, $v0, 0x00AA -/* 00154 80A0A564 14200007 */ bne $at, $zero, .L80A0A584 -/* 00158 80A0A568 284100BE */ slti $at, $v0, 0x00BE -/* 0015C 80A0A56C 10200005 */ beq $at, $zero, .L80A0A584 -/* 00160 80A0A570 24190014 */ addiu $t9, $zero, 0x0014 ## $t9 = 00000014 -/* 00164 80A0A574 24080002 */ addiu $t0, $zero, 0x0002 ## $t0 = 00000002 -/* 00168 80A0A578 A6190158 */ sh $t9, 0x0158($s0) ## 00000158 -/* 0016C 80A0A57C 1000001A */ beq $zero, $zero, .L80A0A5E8 -/* 00170 80A0A580 A6080150 */ sh $t0, 0x0150($s0) ## 00000150 -.L80A0A584: -/* 00174 80A0A584 284100BE */ slti $at, $v0, 0x00BE -/* 00178 80A0A588 14200007 */ bne $at, $zero, .L80A0A5A8 -/* 0017C 80A0A58C 284100C8 */ slti $at, $v0, 0x00C8 -/* 00180 80A0A590 10200005 */ beq $at, $zero, .L80A0A5A8 -/* 00184 80A0A594 24090032 */ addiu $t1, $zero, 0x0032 ## $t1 = 00000032 -/* 00188 80A0A598 240A0004 */ addiu $t2, $zero, 0x0004 ## $t2 = 00000004 -/* 0018C 80A0A59C A6090158 */ sh $t1, 0x0158($s0) ## 00000158 -/* 00190 80A0A5A0 10000011 */ beq $zero, $zero, .L80A0A5E8 -/* 00194 80A0A5A4 A60A0150 */ sh $t2, 0x0150($s0) ## 00000150 -.L80A0A5A8: -/* 00198 80A0A5A8 3C0180A1 */ lui $at, %hi(D_80A0B528) ## $at = 80A10000 -/* 0019C 80A0A5AC C420B528 */ lwc1 $f0, %lo(D_80A0B528)($at) -/* 001A0 80A0A5B0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001A4 80A0A5B4 44050000 */ mfc1 $a1, $f0 -/* 001A8 80A0A5B8 0C00B58B */ jal Actor_SetScale - -/* 001AC 80A0A5BC E6000160 */ swc1 $f0, 0x0160($s0) ## 00000160 -/* 001B0 80A0A5C0 8E030118 */ lw $v1, 0x0118($s0) ## 00000118 -/* 001B4 80A0A5C4 240B01F4 */ addiu $t3, $zero, 0x01F4 ## $t3 = 000001F4 -/* 001B8 80A0A5C8 240C0003 */ addiu $t4, $zero, 0x0003 ## $t4 = 00000003 -/* 001BC 80A0A5CC A60B0158 */ sh $t3, 0x0158($s0) ## 00000158 -/* 001C0 80A0A5D0 10600005 */ beq $v1, $zero, .L80A0A5E8 -/* 001C4 80A0A5D4 A60C0150 */ sh $t4, 0x0150($s0) ## 00000150 -/* 001C8 80A0A5D8 8C6D0130 */ lw $t5, 0x0130($v1) ## 00000130 -/* 001CC 80A0A5DC 51A00003 */ beql $t5, $zero, .L80A0A5EC -/* 001D0 80A0A5E0 3C0140E0 */ lui $at, 0x40E0 ## $at = 40E00000 -/* 001D4 80A0A5E4 A46002AA */ sh $zero, 0x02AA($v1) ## 000002AA -.L80A0A5E8: -/* 001D8 80A0A5E8 3C0140E0 */ lui $at, 0x40E0 ## $at = 40E00000 -.L80A0A5EC: -/* 001DC 80A0A5EC 44819000 */ mtc1 $at, $f18 ## $f18 = 7.00 -/* 001E0 80A0A5F0 8E180004 */ lw $t8, 0x0004($s0) ## 00000004 -/* 001E4 80A0A5F4 3C01442F */ lui $at, 0x442F ## $at = 442F0000 -/* 001E8 80A0A5F8 44812000 */ mtc1 $at, $f4 ## $f4 = 700.00 -/* 001EC 80A0A5FC 860E0034 */ lh $t6, 0x0034($s0) ## 00000034 -/* 001F0 80A0A600 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE -/* 001F4 80A0A604 3C0880A1 */ lui $t0, %hi(func_80A0AA3C) ## $t0 = 80A10000 -/* 001F8 80A0A608 240F001E */ addiu $t7, $zero, 0x001E ## $t7 = 0000001E -/* 001FC 80A0A60C 2508AA3C */ addiu $t0, $t0, %lo(func_80A0AA3C) ## $t0 = 80A0AA3C -/* 00200 80A0A610 0301C824 */ and $t9, $t8, $at -/* 00204 80A0A614 A6000034 */ sh $zero, 0x0034($s0) ## 00000034 -/* 00208 80A0A618 A60F0156 */ sh $t7, 0x0156($s0) ## 00000156 -/* 0020C 80A0A61C AE190004 */ sw $t9, 0x0004($s0) ## 00000004 -/* 00210 80A0A620 AE08014C */ sw $t0, 0x014C($s0) ## 0000014C -/* 00214 80A0A624 E61200C4 */ swc1 $f18, 0x00C4($s0) ## 000000C4 -/* 00218 80A0A628 E60400BC */ swc1 $f4, 0x00BC($s0) ## 000000BC -/* 0021C 80A0A62C 10000074 */ beq $zero, $zero, .L80A0A800 -/* 00220 80A0A630 A60E015A */ sh $t6, 0x015A($s0) ## 0000015A -glabel L80A0A634 -/* 00224 80A0A634 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00228 80A0A638 14410007 */ bne $v0, $at, .L80A0A658 -/* 0022C 80A0A63C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00230 80A0A640 3C053DCC */ lui $a1, 0x3DCC ## $a1 = 3DCC0000 -/* 00234 80A0A644 0C00B58B */ jal Actor_SetScale - -/* 00238 80A0A648 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3DCCCCCD -/* 0023C 80A0A64C 24090004 */ addiu $t1, $zero, 0x0004 ## $t1 = 00000004 -/* 00240 80A0A650 1000000F */ beq $zero, $zero, .L80A0A690 -/* 00244 80A0A654 A6090150 */ sh $t1, 0x0150($s0) ## 00000150 -.L80A0A658: -/* 00248 80A0A658 3C0180A1 */ lui $at, %hi(D_80A0B52C) ## $at = 80A10000 -/* 0024C 80A0A65C C420B52C */ lwc1 $f0, %lo(D_80A0B52C)($at) -/* 00250 80A0A660 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00254 80A0A664 44050000 */ mfc1 $a1, $f0 -/* 00258 80A0A668 0C00B58B */ jal Actor_SetScale - -/* 0025C 80A0A66C 00000000 */ nop -/* 00260 80A0A670 3C0180A1 */ lui $at, %hi(D_80A0B530) ## $at = 80A10000 -/* 00264 80A0A674 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 00268 80A0A678 C42CB530 */ lwc1 $f12, %lo(D_80A0B530)($at) -/* 0026C 80A0A67C 4600018D */ trunc.w.s $f6, $f0 -/* 00270 80A0A680 440D3000 */ mfc1 $t5, $f6 -/* 00274 80A0A684 00000000 */ nop -/* 00278 80A0A688 25AE0001 */ addiu $t6, $t5, 0x0001 ## $t6 = 00000001 -/* 0027C 80A0A68C A60E0150 */ sh $t6, 0x0150($s0) ## 00000150 -.L80A0A690: -/* 00280 80A0A690 3C01C040 */ lui $at, 0xC040 ## $at = C0400000 -/* 00284 80A0A694 44814000 */ mtc1 $at, $f8 ## $f8 = -3.00 -/* 00288 80A0A698 3C0480A1 */ lui $a0, %hi(D_80A0B400) ## $a0 = 80A10000 -/* 0028C 80A0A69C 2484B400 */ addiu $a0, $a0, %lo(D_80A0B400) ## $a0 = 80A0B400 -/* 00290 80A0A6A0 0C00084C */ jal osSyncPrintf - -/* 00294 80A0A6A4 E608006C */ swc1 $f8, 0x006C($s0) ## 0000006C -/* 00298 80A0A6A8 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 0029C 80A0A6AC 44815000 */ mtc1 $at, $f10 ## $f10 = 6.00 -/* 002A0 80A0A6B0 8E0F0004 */ lw $t7, 0x0004($s0) ## 00000004 -/* 002A4 80A0A6B4 3C01442F */ lui $at, 0x442F ## $at = 442F0000 -/* 002A8 80A0A6B8 44818000 */ mtc1 $at, $f16 ## $f16 = 700.00 -/* 002AC 80A0A6BC 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE -/* 002B0 80A0A6C0 3C1980A1 */ lui $t9, %hi(func_80A0AF24) ## $t9 = 80A10000 -/* 002B4 80A0A6C4 2739AF24 */ addiu $t9, $t9, %lo(func_80A0AF24) ## $t9 = 80A0AF24 -/* 002B8 80A0A6C8 01E1C024 */ and $t8, $t7, $at -/* 002BC 80A0A6CC AE180004 */ sw $t8, 0x0004($s0) ## 00000004 -/* 002C0 80A0A6D0 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C -/* 002C4 80A0A6D4 E60A00C4 */ swc1 $f10, 0x00C4($s0) ## 000000C4 -/* 002C8 80A0A6D8 10000049 */ beq $zero, $zero, .L80A0A800 -/* 002CC 80A0A6DC E61000BC */ swc1 $f16, 0x00BC($s0) ## 000000BC -glabel L80A0A6E0 -/* 002D0 80A0A6E0 3C0180A1 */ lui $at, %hi(D_80A0B534) ## $at = 80A10000 -/* 002D4 80A0A6E4 C420B534 */ lwc1 $f0, %lo(D_80A0B534)($at) -/* 002D8 80A0A6E8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002DC 80A0A6EC 44050000 */ mfc1 $a1, $f0 -/* 002E0 80A0A6F0 0C00B58B */ jal Actor_SetScale - -/* 002E4 80A0A6F4 00000000 */ nop -/* 002E8 80A0A6F8 A6000150 */ sh $zero, 0x0150($s0) ## 00000150 -/* 002EC 80A0A6FC 3C0180A1 */ lui $at, %hi(D_80A0B538) ## $at = 80A10000 -/* 002F0 80A0A700 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 002F4 80A0A704 C42CB538 */ lwc1 $f12, %lo(D_80A0B538)($at) -/* 002F8 80A0A708 4600048D */ trunc.w.s $f18, $f0 -/* 002FC 80A0A70C 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A -/* 00300 80A0A710 24090002 */ addiu $t1, $zero, 0x0002 ## $t1 = 00000002 -/* 00304 80A0A714 3C0480A1 */ lui $a0, %hi(D_80A0B430) ## $a0 = 80A10000 -/* 00308 80A0A718 44029000 */ mfc1 $v0, $f18 -/* 0030C 80A0A71C 00000000 */ nop -/* 00310 80A0A720 00021400 */ sll $v0, $v0, 16 -/* 00314 80A0A724 00021403 */ sra $v0, $v0, 16 -/* 00318 80A0A728 1040000A */ beq $v0, $zero, .L80A0A754 -/* 0031C 80A0A72C 00000000 */ nop -/* 00320 80A0A730 1041000A */ beq $v0, $at, .L80A0A75C -/* 00324 80A0A734 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00328 80A0A738 24010014 */ addiu $at, $zero, 0x0014 ## $at = 00000014 -/* 0032C 80A0A73C 10410007 */ beq $v0, $at, .L80A0A75C -/* 00330 80A0A740 2401001E */ addiu $at, $zero, 0x001E ## $at = 0000001E -/* 00334 80A0A744 50410006 */ beql $v0, $at, .L80A0A760 -/* 00338 80A0A748 A60A0150 */ sh $t2, 0x0150($s0) ## 00000150 -/* 0033C 80A0A74C 10000005 */ beq $zero, $zero, .L80A0A764 -/* 00340 80A0A750 3C01C040 */ lui $at, 0xC040 ## $at = C0400000 -.L80A0A754: -/* 00344 80A0A754 10000002 */ beq $zero, $zero, .L80A0A760 -/* 00348 80A0A758 A6090150 */ sh $t1, 0x0150($s0) ## 00000150 -.L80A0A75C: -/* 0034C 80A0A75C A60A0150 */ sh $t2, 0x0150($s0) ## 00000150 -.L80A0A760: -/* 00350 80A0A760 3C01C040 */ lui $at, 0xC040 ## $at = C0400000 -.L80A0A764: -/* 00354 80A0A764 44812000 */ mtc1 $at, $f4 ## $f4 = -3.00 -/* 00358 80A0A768 2484B430 */ addiu $a0, $a0, %lo(D_80A0B430) ## $a0 = 80A0B430 -/* 0035C 80A0A76C 0C00084C */ jal osSyncPrintf - -/* 00360 80A0A770 E604006C */ swc1 $f4, 0x006C($s0) ## 0000006C -/* 00364 80A0A774 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 00368 80A0A778 44813000 */ mtc1 $at, $f6 ## $f6 = 6.00 -/* 0036C 80A0A77C 8E0B0004 */ lw $t3, 0x0004($s0) ## 00000004 -/* 00370 80A0A780 3C01442F */ lui $at, 0x442F ## $at = 442F0000 -/* 00374 80A0A784 44814000 */ mtc1 $at, $f8 ## $f8 = 700.00 -/* 00378 80A0A788 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE -/* 0037C 80A0A78C 3C0D80A1 */ lui $t5, %hi(func_80A0B070) ## $t5 = 80A10000 -/* 00380 80A0A790 25ADB070 */ addiu $t5, $t5, %lo(func_80A0B070) ## $t5 = 80A0B070 -/* 00384 80A0A794 01616024 */ and $t4, $t3, $at -/* 00388 80A0A798 AE0C0004 */ sw $t4, 0x0004($s0) ## 00000004 -/* 0038C 80A0A79C AE0D014C */ sw $t5, 0x014C($s0) ## 0000014C -/* 00390 80A0A7A0 E60600C4 */ swc1 $f6, 0x00C4($s0) ## 000000C4 -/* 00394 80A0A7A4 10000016 */ beq $zero, $zero, .L80A0A800 -/* 00398 80A0A7A8 E60800BC */ swc1 $f8, 0x00BC($s0) ## 000000BC -glabel L80A0A7AC -/* 0039C 80A0A7AC 3C0180A1 */ lui $at, %hi(D_80A0B53C) ## $at = 80A10000 -/* 003A0 80A0A7B0 C420B53C */ lwc1 $f0, %lo(D_80A0B53C)($at) -/* 003A4 80A0A7B4 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004 -/* 003A8 80A0A7B8 3C01C040 */ lui $at, 0xC040 ## $at = C0400000 -/* 003AC 80A0A7BC 44815000 */ mtc1 $at, $f10 ## $f10 = -3.00 -/* 003B0 80A0A7C0 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE -/* 003B4 80A0A7C4 44050000 */ mfc1 $a1, $f0 -/* 003B8 80A0A7C8 01C17824 */ and $t7, $t6, $at -/* 003BC 80A0A7CC AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004 -/* 003C0 80A0A7D0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003C4 80A0A7D4 0C00B58B */ jal Actor_SetScale - -/* 003C8 80A0A7D8 E60A006C */ swc1 $f10, 0x006C($s0) ## 0000006C -/* 003CC 80A0A7DC 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 003D0 80A0A7E0 44818000 */ mtc1 $at, $f16 ## $f16 = 6.00 -/* 003D4 80A0A7E4 3C01C42F */ lui $at, 0xC42F ## $at = C42F0000 -/* 003D8 80A0A7E8 44819000 */ mtc1 $at, $f18 ## $f18 = -700.00 -/* 003DC 80A0A7EC 3C1880A1 */ lui $t8, %hi(func_80A0B0F4) ## $t8 = 80A10000 -/* 003E0 80A0A7F0 2718B0F4 */ addiu $t8, $t8, %lo(func_80A0B0F4) ## $t8 = 80A0B0F4 -/* 003E4 80A0A7F4 AE18014C */ sw $t8, 0x014C($s0) ## 0000014C -/* 003E8 80A0A7F8 E61000C4 */ swc1 $f16, 0x00C4($s0) ## 000000C4 -/* 003EC 80A0A7FC E61200BC */ swc1 $f18, 0x00BC($s0) ## 000000BC -.L80A0A800: -/* 003F0 80A0A800 8FBF001C */ lw $ra, 0x001C($sp) -/* 003F4 80A0A804 8FB00018 */ lw $s0, 0x0018($sp) -/* 003F8 80A0A808 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 003FC 80A0A80C 03E00008 */ jr $ra -/* 00400 80A0A810 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Update.s deleted file mode 100644 index 4b98b86bd8..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Update.s +++ /dev/null @@ -1,38 +0,0 @@ -glabel EnExRuppy_Update -/* 00D40 80A0B150 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00D44 80A0B154 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00D48 80A0B158 AFB00020 */ sw $s0, 0x0020($sp) -/* 00D4C 80A0B15C AFA5002C */ sw $a1, 0x002C($sp) -/* 00D50 80A0B160 848E00B6 */ lh $t6, 0x00B6($a0) ## 000000B6 -/* 00D54 80A0B164 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00D58 80A0B168 25CF07A8 */ addiu $t7, $t6, 0x07A8 ## $t7 = 000007A8 -/* 00D5C 80A0B16C A48F00B6 */ sh $t7, 0x00B6($a0) ## 000000B6 -/* 00D60 80A0B170 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C -/* 00D64 80A0B174 8FA5002C */ lw $a1, 0x002C($sp) -/* 00D68 80A0B178 0320F809 */ jalr $ra, $t9 -/* 00D6C 80A0B17C 00000000 */ nop -/* 00D70 80A0B180 86020156 */ lh $v0, 0x0156($s0) ## 00000156 -/* 00D74 80A0B184 10400002 */ beq $v0, $zero, .L80A0B190 -/* 00D78 80A0B188 2458FFFF */ addiu $t8, $v0, 0xFFFF ## $t8 = FFFFFFFF -/* 00D7C 80A0B18C A6180156 */ sh $t8, 0x0156($s0) ## 00000156 -.L80A0B190: -/* 00D80 80A0B190 0C00B638 */ jal Actor_MoveForward - -/* 00D84 80A0B194 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00D88 80A0B198 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00D8C 80A0B19C 44810000 */ mtc1 $at, $f0 ## $f0 = 20.00 -/* 00D90 80A0B1A0 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 00D94 80A0B1A4 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00 -/* 00D98 80A0B1A8 2408001C */ addiu $t0, $zero, 0x001C ## $t0 = 0000001C -/* 00D9C 80A0B1AC 44060000 */ mfc1 $a2, $f0 -/* 00DA0 80A0B1B0 44070000 */ mfc1 $a3, $f0 -/* 00DA4 80A0B1B4 AFA80014 */ sw $t0, 0x0014($sp) -/* 00DA8 80A0B1B8 8FA4002C */ lw $a0, 0x002C($sp) -/* 00DAC 80A0B1BC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00DB0 80A0B1C0 0C00B92D */ jal func_8002E4B4 -/* 00DB4 80A0B1C4 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00DB8 80A0B1C8 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00DBC 80A0B1CC 8FB00020 */ lw $s0, 0x0020($sp) -/* 00DC0 80A0B1D0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00DC4 80A0B1D4 03E00008 */ jr $ra -/* 00DC8 80A0B1D8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0A820.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0A820.s deleted file mode 100644 index ac76c25c0f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0A820.s +++ /dev/null @@ -1,145 +0,0 @@ -glabel func_80A0A820 -/* 00410 80A0A820 27BDFF50 */ addiu $sp, $sp, 0xFF50 ## $sp = FFFFFF50 -/* 00414 80A0A824 AFBE0068 */ sw $s8, 0x0068($sp) -/* 00418 80A0A828 0006F400 */ sll $s8, $a2, 16 -/* 0041C 80A0A82C 001EF403 */ sra $s8, $s8, 16 -/* 00420 80A0A830 AFB00048 */ sw $s0, 0x0048($sp) -/* 00424 80A0A834 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00428 80A0A838 AFBF006C */ sw $ra, 0x006C($sp) -/* 0042C 80A0A83C AFB70064 */ sw $s7, 0x0064($sp) -/* 00430 80A0A840 AFB60060 */ sw $s6, 0x0060($sp) -/* 00434 80A0A844 AFB5005C */ sw $s5, 0x005C($sp) -/* 00438 80A0A848 AFB40058 */ sw $s4, 0x0058($sp) -/* 0043C 80A0A84C AFB30054 */ sw $s3, 0x0054($sp) -/* 00440 80A0A850 AFB20050 */ sw $s2, 0x0050($sp) -/* 00444 80A0A854 AFB1004C */ sw $s1, 0x004C($sp) -/* 00448 80A0A858 F7BA0040 */ sdc1 $f26, 0x0040($sp) -/* 0044C 80A0A85C F7B80038 */ sdc1 $f24, 0x0038($sp) -/* 00450 80A0A860 F7B60030 */ sdc1 $f22, 0x0030($sp) -/* 00454 80A0A864 F7B40028 */ sdc1 $f20, 0x0028($sp) -/* 00458 80A0A868 AFA500B4 */ sw $a1, 0x00B4($sp) -/* 0045C 80A0A86C 1FC00002 */ bgtz $s8, .L80A0A878 -/* 00460 80A0A870 AFA600B8 */ sw $a2, 0x00B8($sp) -/* 00464 80A0A874 241E0001 */ addiu $s8, $zero, 0x0001 ## $s8 = 00000001 -.L80A0A878: -/* 00468 80A0A878 00071080 */ sll $v0, $a3, 2 -/* 0046C 80A0A87C 00471023 */ subu $v0, $v0, $a3 -/* 00470 80A0A880 3C0A80A1 */ lui $t2, %hi(D_80A0B358) ## $t2 = 80A10000 -/* 00474 80A0A884 240E00FF */ addiu $t6, $zero, 0x00FF ## $t6 = 000000FF -/* 00478 80A0A888 240F00FF */ addiu $t7, $zero, 0x00FF ## $t7 = 000000FF -/* 0047C 80A0A88C 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF -/* 00480 80A0A890 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF -/* 00484 80A0A894 240800FF */ addiu $t0, $zero, 0x00FF ## $t0 = 000000FF -/* 00488 80A0A898 254AB358 */ addiu $t2, $t2, %lo(D_80A0B358) ## $t2 = 80A0B358 -/* 0048C 80A0A89C 00021080 */ sll $v0, $v0, 2 -/* 00490 80A0A8A0 A3AE0088 */ sb $t6, 0x0088($sp) -/* 00494 80A0A8A4 A3AF0089 */ sb $t7, 0x0089($sp) -/* 00498 80A0A8A8 A3A0008A */ sb $zero, 0x008A($sp) -/* 0049C 80A0A8AC A3B80084 */ sb $t8, 0x0084($sp) -/* 004A0 80A0A8B0 A3B90085 */ sb $t9, 0x0085($sp) -/* 004A4 80A0A8B4 A3A80086 */ sb $t0, 0x0086($sp) -/* 004A8 80A0A8B8 004A5821 */ addu $t3, $v0, $t2 -/* 004AC 80A0A8BC 8D6D0000 */ lw $t5, 0x0000($t3) ## 00000000 -/* 004B0 80A0A8C0 27A90098 */ addiu $t1, $sp, 0x0098 ## $t1 = FFFFFFE8 -/* 004B4 80A0A8C4 3C0E80A1 */ lui $t6, %hi(D_80A0B370) ## $t6 = 80A10000 -/* 004B8 80A0A8C8 AD2D0000 */ sw $t5, 0x0000($t1) ## FFFFFFE8 -/* 004BC 80A0A8CC 8D6C0004 */ lw $t4, 0x0004($t3) ## 00000004 -/* 004C0 80A0A8D0 25CEB370 */ addiu $t6, $t6, %lo(D_80A0B370) ## $t6 = 80A0B370 -/* 004C4 80A0A8D4 004E7821 */ addu $t7, $v0, $t6 -/* 004C8 80A0A8D8 AD2C0004 */ sw $t4, 0x0004($t1) ## FFFFFFEC -/* 004CC 80A0A8DC 8D6D0008 */ lw $t5, 0x0008($t3) ## 00000008 -/* 004D0 80A0A8E0 27B8008C */ addiu $t8, $sp, 0x008C ## $t8 = FFFFFFDC -/* 004D4 80A0A8E4 24120BB8 */ addiu $s2, $zero, 0x0BB8 ## $s2 = 00000BB8 -/* 004D8 80A0A8E8 AD2D0008 */ sw $t5, 0x0008($t1) ## FFFFFFF0 -/* 004DC 80A0A8EC AFAF0078 */ sw $t7, 0x0078($sp) -/* 004E0 80A0A8F0 8DEA0000 */ lw $t2, 0x0000($t7) ## 000000FF -/* 004E4 80A0A8F4 24130010 */ addiu $s3, $zero, 0x0010 ## $s3 = 00000010 -/* 004E8 80A0A8F8 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000 -/* 004EC 80A0A8FC AF0A0000 */ sw $t2, 0x0000($t8) ## FFFFFFDC -/* 004F0 80A0A900 8DE80004 */ lw $t0, 0x0004($t7) ## 00000103 -/* 004F4 80A0A904 3C014416 */ lui $at, 0x4416 ## $at = 44160000 -/* 004F8 80A0A908 27B70084 */ addiu $s7, $sp, 0x0084 ## $s7 = FFFFFFD4 -/* 004FC 80A0A90C AF080004 */ sw $t0, 0x0004($t8) ## FFFFFFE0 -/* 00500 80A0A910 8DEA0008 */ lw $t2, 0x0008($t7) ## 00000107 -/* 00504 80A0A914 27B60088 */ addiu $s6, $sp, 0x0088 ## $s6 = FFFFFFD8 -/* 00508 80A0A918 1BC00038 */ blez $s8, .L80A0A9FC -/* 0050C 80A0A91C AF0A0008 */ sw $t2, 0x0008($t8) ## FFFFFFE4 -/* 00510 80A0A920 4481D000 */ mtc1 $at, $f26 ## $f26 = 600.00 -/* 00514 80A0A924 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00518 80A0A928 4481C000 */ mtc1 $at, $f24 ## $f24 = 20.00 -/* 0051C 80A0A92C 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00520 80A0A930 4481B000 */ mtc1 $at, $f22 ## $f22 = 10.00 -/* 00524 80A0A934 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00528 80A0A938 3C1480A1 */ lui $s4, %hi(D_80A0B37C) ## $s4 = 80A10000 -/* 0052C 80A0A93C 4481A000 */ mtc1 $at, $f20 ## $f20 = 0.50 -/* 00530 80A0A940 2694B37C */ addiu $s4, $s4, %lo(D_80A0B37C) ## $s4 = 80A0B37C -/* 00534 80A0A944 27B500A4 */ addiu $s5, $sp, 0x00A4 ## $s5 = FFFFFFF4 -/* 00538 80A0A948 8FA90078 */ lw $t1, 0x0078($sp) -.L80A0A94C: -/* 0053C 80A0A94C 15340009 */ bne $t1, $s4, .L80A0A974 -/* 00540 80A0A950 00000000 */ nop -/* 00544 80A0A954 4600C306 */ mov.s $f12, $f24 -/* 00548 80A0A958 24121388 */ addiu $s2, $zero, 0x1388 ## $s2 = 00001388 -/* 0054C 80A0A95C 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 00550 80A0A960 24130014 */ addiu $s3, $zero, 0x0014 ## $s3 = 00000014 -/* 00554 80A0A964 E7A0008C */ swc1 $f0, 0x008C($sp) -/* 00558 80A0A968 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 0055C 80A0A96C 4600C306 */ mov.s $f12, $f24 -/* 00560 80A0A970 E7A00094 */ swc1 $f0, 0x0094($sp) -.L80A0A974: -/* 00564 80A0A974 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00568 80A0A978 00000000 */ nop -/* 0056C 80A0A97C 46140101 */ sub.s $f4, $f0, $f20 -/* 00570 80A0A980 C6080024 */ lwc1 $f8, 0x0024($s0) ## 00000024 -/* 00574 80A0A984 46162182 */ mul.s $f6, $f4, $f22 -/* 00578 80A0A988 46083280 */ add.s $f10, $f6, $f8 -/* 0057C 80A0A98C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00580 80A0A990 E7AA00A4 */ swc1 $f10, 0x00A4($sp) -/* 00584 80A0A994 C6120160 */ lwc1 $f18, 0x0160($s0) ## 00000160 -/* 00588 80A0A998 46140201 */ sub.s $f8, $f0, $f20 -/* 0058C 80A0A99C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028 -/* 00590 80A0A9A0 461A9102 */ mul.s $f4, $f18, $f26 -/* 00594 80A0A9A4 46048180 */ add.s $f6, $f16, $f4 -/* 00598 80A0A9A8 46164282 */ mul.s $f10, $f8, $f22 -/* 0059C 80A0A9AC 46065480 */ add.s $f18, $f10, $f6 -/* 005A0 80A0A9B0 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 005A4 80A0A9B4 E7B200A8 */ swc1 $f18, 0x00A8($sp) -/* 005A8 80A0A9B8 46140401 */ sub.s $f16, $f0, $f20 -/* 005AC 80A0A9BC C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C -/* 005B0 80A0A9C0 AFB3001C */ sw $s3, 0x001C($sp) -/* 005B4 80A0A9C4 AFB20018 */ sw $s2, 0x0018($sp) -/* 005B8 80A0A9C8 46168102 */ mul.s $f4, $f16, $f22 -/* 005BC 80A0A9CC AFB70014 */ sw $s7, 0x0014($sp) -/* 005C0 80A0A9D0 AFB60010 */ sw $s6, 0x0010($sp) -/* 005C4 80A0A9D4 8FA400B4 */ lw $a0, 0x00B4($sp) -/* 005C8 80A0A9D8 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFF4 -/* 005CC 80A0A9DC 27A60098 */ addiu $a2, $sp, 0x0098 ## $a2 = FFFFFFE8 -/* 005D0 80A0A9E0 27A7008C */ addiu $a3, $sp, 0x008C ## $a3 = FFFFFFDC -/* 005D4 80A0A9E4 46082280 */ add.s $f10, $f4, $f8 -/* 005D8 80A0A9E8 0C00A2EC */ jal func_80028BB0 -/* 005DC 80A0A9EC E7AA00AC */ swc1 $f10, 0x00AC($sp) -/* 005E0 80A0A9F0 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001 -/* 005E4 80A0A9F4 563EFFD5 */ bnel $s1, $s8, .L80A0A94C -/* 005E8 80A0A9F8 8FA90078 */ lw $t1, 0x0078($sp) -.L80A0A9FC: -/* 005EC 80A0A9FC 8FBF006C */ lw $ra, 0x006C($sp) -/* 005F0 80A0AA00 D7B40028 */ ldc1 $f20, 0x0028($sp) -/* 005F4 80A0AA04 D7B60030 */ ldc1 $f22, 0x0030($sp) -/* 005F8 80A0AA08 D7B80038 */ ldc1 $f24, 0x0038($sp) -/* 005FC 80A0AA0C D7BA0040 */ ldc1 $f26, 0x0040($sp) -/* 00600 80A0AA10 8FB00048 */ lw $s0, 0x0048($sp) -/* 00604 80A0AA14 8FB1004C */ lw $s1, 0x004C($sp) -/* 00608 80A0AA18 8FB20050 */ lw $s2, 0x0050($sp) -/* 0060C 80A0AA1C 8FB30054 */ lw $s3, 0x0054($sp) -/* 00610 80A0AA20 8FB40058 */ lw $s4, 0x0058($sp) -/* 00614 80A0AA24 8FB5005C */ lw $s5, 0x005C($sp) -/* 00618 80A0AA28 8FB60060 */ lw $s6, 0x0060($sp) -/* 0061C 80A0AA2C 8FB70064 */ lw $s7, 0x0064($sp) -/* 00620 80A0AA30 8FBE0068 */ lw $s8, 0x0068($sp) -/* 00624 80A0AA34 03E00008 */ jr $ra -/* 00628 80A0AA38 27BD00B0 */ addiu $sp, $sp, 0x00B0 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AA3C.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AA3C.s deleted file mode 100644 index 04f941b200..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AA3C.s +++ /dev/null @@ -1,60 +0,0 @@ -glabel func_80A0AA3C -/* 0062C 80A0AA3C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00630 80A0AA40 AFBF001C */ sw $ra, 0x001C($sp) -/* 00634 80A0AA44 AFB00018 */ sw $s0, 0x0018($sp) -/* 00638 80A0AA48 AFA50024 */ sw $a1, 0x0024($sp) -/* 0063C 80A0AA4C 848E00B6 */ lh $t6, 0x00B6($a0) ## 000000B6 -/* 00640 80A0AA50 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00644 80A0AA54 3C063E99 */ lui $a2, 0x3E99 ## $a2 = 3E990000 -/* 00648 80A0AA58 25CF07A8 */ addiu $t7, $t6, 0x07A8 ## $t7 = 000007A8 -/* 0064C 80A0AA5C A48F00B6 */ sh $t7, 0x00B6($a0) ## 000000B6 -/* 00650 80A0AA60 34C6999A */ ori $a2, $a2, 0x999A ## $a2 = 3E99999A -/* 00654 80A0AA64 2484006C */ addiu $a0, $a0, 0x006C ## $a0 = 0000006C -/* 00658 80A0AA68 3C05C000 */ lui $a1, 0xC000 ## $a1 = C0000000 -/* 0065C 80A0AA6C 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00660 80A0AA70 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000 -/* 00664 80A0AA74 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00668 80A0AA78 8FA50024 */ lw $a1, 0x0024($sp) -/* 0066C 80A0AA7C 24060002 */ addiu $a2, $zero, 0x0002 ## $a2 = 00000002 -/* 00670 80A0AA80 0C282A08 */ jal func_80A0A820 -/* 00674 80A0AA84 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00678 80A0AA88 0C01E221 */ jal func_80078884 -/* 0067C 80A0AA8C 240420BC */ addiu $a0, $zero, 0x20BC ## $a0 = 000020BC -/* 00680 80A0AA90 8E020118 */ lw $v0, 0x0118($s0) ## 00000118 -/* 00684 80A0AA94 5040001D */ beql $v0, $zero, .L80A0AB0C -/* 00688 80A0AA98 8FBF001C */ lw $ra, 0x001C($sp) -/* 0068C 80A0AA9C 8C580130 */ lw $t8, 0x0130($v0) ## 00000130 -/* 00690 80A0AAA0 5300001A */ beql $t8, $zero, .L80A0AB0C -/* 00694 80A0AAA4 8FBF001C */ lw $ra, 0x001C($sp) -/* 00698 80A0AAA8 84590296 */ lh $t9, 0x0296($v0) ## 00000296 -/* 0069C 80A0AAAC 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001 -/* 006A0 80A0AAB0 260400E4 */ addiu $a0, $s0, 0x00E4 ## $a0 = 000000E4 -/* 006A4 80A0AAB4 53200009 */ beql $t9, $zero, .L80A0AADC -/* 006A8 80A0AAB8 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 006AC 80A0AABC 96080088 */ lhu $t0, 0x0088($s0) ## 00000088 -/* 006B0 80A0AAC0 31090020 */ andi $t1, $t0, 0x0020 ## $t1 = 00000000 -/* 006B4 80A0AAC4 55200005 */ bnel $t1, $zero, .L80A0AADC -/* 006B8 80A0AAC8 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 006BC 80A0AACC 860A0156 */ lh $t2, 0x0156($s0) ## 00000156 -/* 006C0 80A0AAD0 5540000E */ bnel $t2, $zero, .L80A0AB0C -/* 006C4 80A0AAD4 8FBF001C */ lw $ra, 0x001C($sp) -/* 006C8 80A0AAD8 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -.L80A0AADC: -/* 006CC 80A0AADC A60B0154 */ sh $t3, 0x0154($s0) ## 00000154 -/* 006D0 80A0AAE0 24052817 */ addiu $a1, $zero, 0x2817 ## $a1 = 00002817 -/* 006D4 80A0AAE4 E6000068 */ swc1 $f0, 0x0068($s0) ## 00000068 -/* 006D8 80A0AAE8 E6000064 */ swc1 $f0, 0x0064($s0) ## 00000064 -/* 006DC 80A0AAEC E6000060 */ swc1 $f0, 0x0060($s0) ## 00000060 -/* 006E0 80A0AAF0 E600005C */ swc1 $f0, 0x005C($s0) ## 0000005C -/* 006E4 80A0AAF4 0C01E245 */ jal func_80078914 -/* 006E8 80A0AAF8 E600006C */ swc1 $f0, 0x006C($s0) ## 0000006C -/* 006EC 80A0AAFC 3C0C80A1 */ lui $t4, %hi(func_80A0AB1C) ## $t4 = 80A10000 -/* 006F0 80A0AB00 258CAB1C */ addiu $t4, $t4, %lo(func_80A0AB1C) ## $t4 = 80A0AB1C -/* 006F4 80A0AB04 AE0C014C */ sw $t4, 0x014C($s0) ## 0000014C -/* 006F8 80A0AB08 8FBF001C */ lw $ra, 0x001C($sp) -.L80A0AB0C: -/* 006FC 80A0AB0C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00700 80A0AB10 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00704 80A0AB14 03E00008 */ jr $ra -/* 00708 80A0AB18 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AB1C.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AB1C.s deleted file mode 100644 index fbcb56dfb5..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AB1C.s +++ /dev/null @@ -1,99 +0,0 @@ -glabel func_80A0AB1C -/* 0070C 80A0AB1C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00710 80A0AB20 AFBF001C */ sw $ra, 0x001C($sp) -/* 00714 80A0AB24 AFB00018 */ sw $s0, 0x0018($sp) -/* 00718 80A0AB28 AFA5002C */ sw $a1, 0x002C($sp) -/* 0071C 80A0AB2C 8C820118 */ lw $v0, 0x0118($a0) ## 00000118 -/* 00720 80A0AB30 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00724 80A0AB34 50400050 */ beql $v0, $zero, .L80A0AC78 -/* 00728 80A0AB38 8FBF001C */ lw $ra, 0x001C($sp) -/* 0072C 80A0AB3C 8C4E0130 */ lw $t6, 0x0130($v0) ## 00000130 -/* 00730 80A0AB40 51C0004D */ beql $t6, $zero, .L80A0AC78 -/* 00734 80A0AB44 8FBF001C */ lw $ra, 0x001C($sp) -/* 00738 80A0AB48 844F02A2 */ lh $t7, 0x02A2($v0) ## 000002A2 -/* 0073C 80A0AB4C 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00740 80A0AB50 55E10049 */ bnel $t7, $at, .L80A0AC78 -/* 00744 80A0AB54 8FBF001C */ lw $ra, 0x001C($sp) -/* 00748 80A0AB58 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 0074C 80A0AB5C A4800154 */ sh $zero, 0x0154($a0) ## 00000154 -/* 00750 80A0AB60 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00754 80A0AB64 44812000 */ mtc1 $at, $f4 ## $f4 = 0.50 -/* 00758 80A0AB68 3C014396 */ lui $at, 0x4396 ## $at = 43960000 -/* 0075C 80A0AB6C 44814000 */ mtc1 $at, $f8 ## $f8 = 300.00 -/* 00760 80A0AB70 46040181 */ sub.s $f6, $f0, $f4 -/* 00764 80A0AB74 3C01C382 */ lui $at, 0xC382 ## $at = C3820000 -/* 00768 80A0AB78 44818000 */ mtc1 $at, $f16 ## $f16 = -260.00 -/* 0076C 80A0AB7C 46083282 */ mul.s $f10, $f6, $f8 -/* 00770 80A0AB80 46105480 */ add.s $f18, $f10, $f16 -/* 00774 80A0AB84 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00778 80A0AB88 E6120024 */ swc1 $f18, 0x0024($s0) ## 00000024 -/* 0077C 80A0AB8C 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00780 80A0AB90 44812000 */ mtc1 $at, $f4 ## $f4 = 0.50 -/* 00784 80A0AB94 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00788 80A0AB98 44814000 */ mtc1 $at, $f8 ## $f8 = 200.00 -/* 0078C 80A0AB9C 46040181 */ sub.s $f6, $f0, $f4 -/* 00790 80A0ABA0 8618015A */ lh $t8, 0x015A($s0) ## 0000015A -/* 00794 80A0ABA4 3C0143B9 */ lui $at, 0x43B9 ## $at = 43B90000 -/* 00798 80A0ABA8 44818000 */ mtc1 $at, $f16 ## $f16 = 370.00 -/* 0079C 80A0ABAC 46083282 */ mul.s $f10, $f6, $f8 -/* 007A0 80A0ABB0 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00 -/* 007A4 80A0ABB4 3C01C248 */ lui $at, 0xC248 ## $at = C2480000 -/* 007A8 80A0ABB8 3C198016 */ lui $t9, %hi(gSaveContext+0xeda) -/* 007AC 80A0ABBC 44814000 */ mtc1 $at, $f8 ## $f8 = -50.00 -/* 007B0 80A0ABC0 3C01C396 */ lui $at, 0xC396 ## $at = C3960000 -/* 007B4 80A0ABC4 468021A0 */ cvt.s.w $f6, $f4 -/* 007B8 80A0ABC8 46105480 */ add.s $f18, $f10, $f16 -/* 007BC 80A0ABCC 46083082 */ mul.s $f2, $f6, $f8 -/* 007C0 80A0ABD0 E6120028 */ swc1 $f18, 0x0028($s0) ## 00000028 -/* 007C4 80A0ABD4 9739F53A */ lhu $t9, %lo(gSaveContext+0xeda)($t9) -/* 007C8 80A0ABD8 33280100 */ andi $t0, $t9, 0x0100 ## $t0 = 00000000 -/* 007CC 80A0ABDC 55000012 */ bnel $t0, $zero, .L80A0AC28 -/* 007D0 80A0ABE0 44815000 */ mtc1 $at, $f10 ## $f10 = -300.00 -/* 007D4 80A0ABE4 3C01C3FA */ lui $at, 0xC3FA ## $at = C3FA0000 -/* 007D8 80A0ABE8 44815000 */ mtc1 $at, $f10 ## $f10 = -500.00 -/* 007DC 80A0ABEC 00000000 */ nop -/* 007E0 80A0ABF0 460A1080 */ add.s $f2, $f2, $f10 -/* 007E4 80A0ABF4 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 007E8 80A0ABF8 E7A20020 */ swc1 $f2, 0x0020($sp) -/* 007EC 80A0ABFC 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 007F0 80A0AC00 44818000 */ mtc1 $at, $f16 ## $f16 = 0.50 -/* 007F4 80A0AC04 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000 -/* 007F8 80A0AC08 44812000 */ mtc1 $at, $f4 ## $f4 = 80.00 -/* 007FC 80A0AC0C 46100481 */ sub.s $f18, $f0, $f16 -/* 00800 80A0AC10 C7A20020 */ lwc1 $f2, 0x0020($sp) -/* 00804 80A0AC14 46049182 */ mul.s $f6, $f18, $f4 -/* 00808 80A0AC18 46023200 */ add.s $f8, $f6, $f2 -/* 0080C 80A0AC1C 1000000F */ beq $zero, $zero, .L80A0AC5C -/* 00810 80A0AC20 E608002C */ swc1 $f8, 0x002C($s0) ## 0000002C -/* 00814 80A0AC24 44815000 */ mtc1 $at, $f10 ## $f10 = 80.00 -.L80A0AC28: -/* 00818 80A0AC28 00000000 */ nop -/* 0081C 80A0AC2C 460A1080 */ add.s $f2, $f2, $f10 -/* 00820 80A0AC30 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00824 80A0AC34 E7A20020 */ swc1 $f2, 0x0020($sp) -/* 00828 80A0AC38 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 0082C 80A0AC3C 44818000 */ mtc1 $at, $f16 ## $f16 = 0.50 -/* 00830 80A0AC40 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00834 80A0AC44 44812000 */ mtc1 $at, $f4 ## $f4 = 60.00 -/* 00838 80A0AC48 46100481 */ sub.s $f18, $f0, $f16 -/* 0083C 80A0AC4C C7A20020 */ lwc1 $f2, 0x0020($sp) -/* 00840 80A0AC50 46049182 */ mul.s $f6, $f18, $f4 -/* 00844 80A0AC54 46023200 */ add.s $f8, $f6, $f2 -/* 00848 80A0AC58 E608002C */ swc1 $f8, 0x002C($s0) ## 0000002C -.L80A0AC5C: -/* 0084C 80A0AC5C 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 00850 80A0AC60 44815000 */ mtc1 $at, $f10 ## $f10 = -1.00 -/* 00854 80A0AC64 3C0980A1 */ lui $t1, %hi(func_80A0AC88) ## $t1 = 80A10000 -/* 00858 80A0AC68 2529AC88 */ addiu $t1, $t1, %lo(func_80A0AC88) ## $t1 = 80A0AC88 -/* 0085C 80A0AC6C AE09014C */ sw $t1, 0x014C($s0) ## 0000014C -/* 00860 80A0AC70 E60A006C */ swc1 $f10, 0x006C($s0) ## 0000006C -/* 00864 80A0AC74 8FBF001C */ lw $ra, 0x001C($sp) -.L80A0AC78: -/* 00868 80A0AC78 8FB00018 */ lw $s0, 0x0018($sp) -/* 0086C 80A0AC7C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00870 80A0AC80 03E00008 */ jr $ra -/* 00874 80A0AC84 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AC88.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AC88.s deleted file mode 100644 index 9e45475d66..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AC88.s +++ /dev/null @@ -1,73 +0,0 @@ -.late_rodata -glabel D_80A0B540 - .word 0xBE4CCCCD - -.text -glabel func_80A0AC88 -/* 00878 80A0AC88 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 0087C 80A0AC8C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00880 80A0AC90 AFB00020 */ sw $s0, 0x0020($sp) -/* 00884 80A0AC94 AFA50044 */ sw $a1, 0x0044($sp) -/* 00888 80A0AC98 948E0088 */ lhu $t6, 0x0088($a0) ## 00000088 -/* 0088C 80A0AC9C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00890 80A0ACA0 3C014170 */ lui $at, 0x4170 ## $at = 41700000 -/* 00894 80A0ACA4 31CF0020 */ andi $t7, $t6, 0x0020 ## $t7 = 00000000 -/* 00898 80A0ACA8 51E00026 */ beql $t7, $zero, .L80A0AD44 -/* 0089C 80A0ACAC 8E020118 */ lw $v0, 0x0118($s0) ## 00000118 -/* 008A0 80A0ACB0 44812000 */ mtc1 $at, $f4 ## $f4 = 15.00 -/* 008A4 80A0ACB4 C4860084 */ lwc1 $f6, 0x0084($a0) ## 00000084 -/* 008A8 80A0ACB8 4606203C */ c.lt.s $f4, $f6 -/* 008AC 80A0ACBC 00000000 */ nop -/* 008B0 80A0ACC0 45020020 */ bc1fl .L80A0AD44 -/* 008B4 80A0ACC4 8E020118 */ lw $v0, 0x0118($s0) ## 00000118 -/* 008B8 80A0ACC8 8C990024 */ lw $t9, 0x0024($a0) ## 00000024 -/* 008BC 80A0ACCC 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF0 -/* 008C0 80A0ACD0 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 008C4 80A0ACD4 ACB90000 */ sw $t9, 0x0000($a1) ## FFFFFFF0 -/* 008C8 80A0ACD8 8C980028 */ lw $t8, 0x0028($a0) ## 00000028 -/* 008CC 80A0ACDC 44819000 */ mtc1 $at, $f18 ## $f18 = -1.00 -/* 008D0 80A0ACE0 3C0180A1 */ lui $at, %hi(D_80A0B540) ## $at = 80A10000 -/* 008D4 80A0ACE4 ACB80004 */ sw $t8, 0x0004($a1) ## FFFFFFF4 -/* 008D8 80A0ACE8 8C99002C */ lw $t9, 0x002C($a0) ## 0000002C -/* 008DC 80A0ACEC 24080320 */ addiu $t0, $zero, 0x0320 ## $t0 = 00000320 -/* 008E0 80A0ACF0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 008E4 80A0ACF4 ACB90008 */ sw $t9, 0x0008($a1) ## FFFFFFF8 -/* 008E8 80A0ACF8 C7A80034 */ lwc1 $f8, 0x0034($sp) -/* 008EC 80A0ACFC C48A0084 */ lwc1 $f10, 0x0084($a0) ## 00000084 -/* 008F0 80A0AD00 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 008F4 80A0AD04 460A4400 */ add.s $f16, $f8, $f10 -/* 008F8 80A0AD08 E7B00034 */ swc1 $f16, 0x0034($sp) -/* 008FC 80A0AD0C E4920060 */ swc1 $f18, 0x0060($a0) ## 00000060 -/* 00900 80A0AD10 C424B540 */ lwc1 $f4, %lo(D_80A0B540)($at) -/* 00904 80A0AD14 E484006C */ swc1 $f4, 0x006C($a0) ## 0000006C -/* 00908 80A0AD18 AFA80014 */ sw $t0, 0x0014($sp) -/* 0090C 80A0AD1C AFA00010 */ sw $zero, 0x0010($sp) -/* 00910 80A0AD20 0C00A527 */ jal func_8002949C -/* 00914 80A0AD24 8FA40044 */ lw $a0, 0x0044($sp) -/* 00918 80A0AD28 260400E4 */ addiu $a0, $s0, 0x00E4 ## $a0 = 000000E4 -/* 0091C 80A0AD2C 0C01E245 */ jal func_80078914 -/* 00920 80A0AD30 24052817 */ addiu $a1, $zero, 0x2817 ## $a1 = 00002817 -/* 00924 80A0AD34 3C0980A1 */ lui $t1, %hi(func_80A0AD88) ## $t1 = 80A10000 -/* 00928 80A0AD38 2529AD88 */ addiu $t1, $t1, %lo(func_80A0AD88) ## $t1 = 80A0AD88 -/* 0092C 80A0AD3C AE09014C */ sw $t1, 0x014C($s0) ## 0000014C -/* 00930 80A0AD40 8E020118 */ lw $v0, 0x0118($s0) ## 00000118 -.L80A0AD44: -/* 00934 80A0AD44 5040000C */ beql $v0, $zero, .L80A0AD78 -/* 00938 80A0AD48 8FBF0024 */ lw $ra, 0x0024($sp) -/* 0093C 80A0AD4C 8C4A0130 */ lw $t2, 0x0130($v0) ## 00000130 -/* 00940 80A0AD50 51400009 */ beql $t2, $zero, .L80A0AD78 -/* 00944 80A0AD54 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00948 80A0AD58 844B029C */ lh $t3, 0x029C($v0) ## 0000029C -/* 0094C 80A0AD5C 3C0D80A1 */ lui $t5, %hi(func_80A0AEE0) ## $t5 = 80A10000 -/* 00950 80A0AD60 240C0014 */ addiu $t4, $zero, 0x0014 ## $t4 = 00000014 -/* 00954 80A0AD64 15600003 */ bne $t3, $zero, .L80A0AD74 -/* 00958 80A0AD68 25ADAEE0 */ addiu $t5, $t5, %lo(func_80A0AEE0) ## $t5 = 80A0AEE0 -/* 0095C 80A0AD6C A60C0156 */ sh $t4, 0x0156($s0) ## 00000156 -/* 00960 80A0AD70 AE0D014C */ sw $t5, 0x014C($s0) ## 0000014C -.L80A0AD74: -/* 00964 80A0AD74 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A0AD78: -/* 00968 80A0AD78 8FB00020 */ lw $s0, 0x0020($sp) -/* 0096C 80A0AD7C 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 00970 80A0AD80 03E00008 */ jr $ra -/* 00974 80A0AD84 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AD88.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AD88.s deleted file mode 100644 index 209881c508..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AD88.s +++ /dev/null @@ -1,103 +0,0 @@ -.late_rodata -glabel D_80A0B544 - .float 0.03 - -glabel D_80A0B548 - .word 0x3D8F5C29, 0x00000000 - -.text -glabel func_80A0AD88 -/* 00978 80A0AD88 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 0097C 80A0AD8C 3C0F80A1 */ lui $t7, %hi(D_80A0B388) ## $t7 = 80A10000 -/* 00980 80A0AD90 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00984 80A0AD94 AFB00020 */ sw $s0, 0x0020($sp) -/* 00988 80A0AD98 AFA50054 */ sw $a1, 0x0054($sp) -/* 0098C 80A0AD9C 25EFB388 */ addiu $t7, $t7, %lo(D_80A0B388) ## $t7 = 80A0B388 -/* 00990 80A0ADA0 8DF90000 */ lw $t9, 0x0000($t7) ## 80A0B388 -/* 00994 80A0ADA4 27AE0040 */ addiu $t6, $sp, 0x0040 ## $t6 = FFFFFFF0 -/* 00998 80A0ADA8 8DF80004 */ lw $t8, 0x0004($t7) ## 80A0B38C -/* 0099C 80A0ADAC ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF0 -/* 009A0 80A0ADB0 8DF90008 */ lw $t9, 0x0008($t7) ## 80A0B390 -/* 009A4 80A0ADB4 3C0980A1 */ lui $t1, %hi(D_80A0B394) ## $t1 = 80A10000 -/* 009A8 80A0ADB8 2529B394 */ addiu $t1, $t1, %lo(D_80A0B394) ## $t1 = 80A0B394 -/* 009AC 80A0ADBC ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF4 -/* 009B0 80A0ADC0 ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFF8 -/* 009B4 80A0ADC4 8D2B0000 */ lw $t3, 0x0000($t1) ## 80A0B394 -/* 009B8 80A0ADC8 27A80034 */ addiu $t0, $sp, 0x0034 ## $t0 = FFFFFFE4 -/* 009BC 80A0ADCC 8D2A0004 */ lw $t2, 0x0004($t1) ## 80A0B398 -/* 009C0 80A0ADD0 AD0B0000 */ sw $t3, 0x0000($t0) ## FFFFFFE4 -/* 009C4 80A0ADD4 8D2B0008 */ lw $t3, 0x0008($t1) ## 80A0B39C -/* 009C8 80A0ADD8 AD0A0004 */ sw $t2, 0x0004($t0) ## FFFFFFE8 -/* 009CC 80A0ADDC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 009D0 80A0ADE0 AD0B0008 */ sw $t3, 0x0008($t0) ## FFFFFFEC -/* 009D4 80A0ADE4 848C0156 */ lh $t4, 0x0156($a0) ## 00000156 -/* 009D8 80A0ADE8 240D000A */ addiu $t5, $zero, 0x000A ## $t5 = 0000000A -/* 009DC 80A0ADEC 3C0180A1 */ lui $at, %hi(D_80A0B544) ## $at = 80A10000 -/* 009E0 80A0ADF0 55800011 */ bnel $t4, $zero, .L80A0AE38 -/* 009E4 80A0ADF4 8E030118 */ lw $v1, 0x0118($s0) ## 00000118 -/* 009E8 80A0ADF8 A48D0156 */ sh $t5, 0x0156($a0) ## 00000156 -/* 009EC 80A0ADFC 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 009F0 80A0AE00 C42CB544 */ lwc1 $f12, %lo(D_80A0B544)($at) -/* 009F4 80A0AE04 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000 -/* 009F8 80A0AE08 44811000 */ mtc1 $at, $f2 ## $f2 = 5.00 -/* 009FC 80A0AE0C 3C0180A1 */ lui $at, %hi(D_80A0B548) ## $at = 80A10000 -/* 00A00 80A0AE10 C424B548 */ lwc1 $f4, %lo(D_80A0B548)($at) -/* 00A04 80A0AE14 44071000 */ mfc1 $a3, $f2 -/* 00A08 80A0AE18 8FA40054 */ lw $a0, 0x0054($sp) -/* 00A0C 80A0AE1C 46040180 */ add.s $f6, $f0, $f4 -/* 00A10 80A0AE20 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00A14 80A0AE24 24060000 */ addiu $a2, $zero, 0x0000 ## $a2 = 00000000 -/* 00A18 80A0AE28 E7A20010 */ swc1 $f2, 0x0010($sp) -/* 00A1C 80A0AE2C 0C00A4F9 */ jal func_800293E4 -/* 00A20 80A0AE30 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 00A24 80A0AE34 8E030118 */ lw $v1, 0x0118($s0) ## 00000118 -.L80A0AE38: -/* 00A28 80A0AE38 50600025 */ beql $v1, $zero, .L80A0AED0 -/* 00A2C 80A0AE3C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00A30 80A0AE40 8C6E0130 */ lw $t6, 0x0130($v1) ## 00000130 -/* 00A34 80A0AE44 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000 -/* 00A38 80A0AE48 11C0001E */ beq $t6, $zero, .L80A0AEC4 -/* 00A3C 80A0AE4C 00000000 */ nop -/* 00A40 80A0AE50 846F029C */ lh $t7, 0x029C($v1) ## 0000029C -/* 00A44 80A0AE54 24180014 */ addiu $t8, $zero, 0x0014 ## $t8 = 00000014 -/* 00A48 80A0AE58 3C1980A1 */ lui $t9, %hi(func_80A0AEE0) ## $t9 = 80A10000 -/* 00A4C 80A0AE5C 15E00005 */ bne $t7, $zero, .L80A0AE74 -/* 00A50 80A0AE60 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00A54 80A0AE64 2739AEE0 */ addiu $t9, $t9, %lo(func_80A0AEE0) ## $t9 = 80A0AEE0 -/* 00A58 80A0AE68 A6180156 */ sh $t8, 0x0156($s0) ## 00000156 -/* 00A5C 80A0AE6C 10000017 */ beq $zero, $zero, .L80A0AECC -/* 00A60 80A0AE70 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C -.L80A0AE74: -/* 00A64 80A0AE74 44810000 */ mtc1 $at, $f0 ## $f0 = 30.00 -/* 00A68 80A0AE78 C608008C */ lwc1 $f8, 0x008C($s0) ## 0000008C -/* 00A6C 80A0AE7C 46000282 */ mul.s $f10, $f0, $f0 -/* 00A70 80A0AE80 460A403C */ c.lt.s $f8, $f10 -/* 00A74 80A0AE84 00000000 */ nop -/* 00A78 80A0AE88 45020011 */ bc1fl .L80A0AED0 -/* 00A7C 80A0AE8C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00A80 80A0AE90 86040158 */ lh $a0, 0x0158($s0) ## 00000158 -/* 00A84 80A0AE94 0C021CC3 */ jal Rupees_ChangeBy -/* 00A88 80A0AE98 AFA2004C */ sw $v0, 0x004C($sp) -/* 00A8C 80A0AE9C 0C01E221 */ jal func_80078884 -/* 00A90 80A0AEA0 24044803 */ addiu $a0, $zero, 0x4803 ## $a0 = 00004803 -/* 00A94 80A0AEA4 8FA2004C */ lw $v0, 0x004C($sp) -/* 00A98 80A0AEA8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00A9C 80A0AEAC 844802A4 */ lh $t0, 0x02A4($v0) ## 000002A4 -/* 00AA0 80A0AEB0 25090001 */ addiu $t1, $t0, 0x0001 ## $t1 = 00000001 -/* 00AA4 80A0AEB4 0C00B55C */ jal Actor_Kill - -/* 00AA8 80A0AEB8 A44902A4 */ sh $t1, 0x02A4($v0) ## 000002A4 -/* 00AAC 80A0AEBC 10000004 */ beq $zero, $zero, .L80A0AED0 -/* 00AB0 80A0AEC0 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A0AEC4: -/* 00AB4 80A0AEC4 0C00B55C */ jal Actor_Kill - -/* 00AB8 80A0AEC8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80A0AECC: -/* 00ABC 80A0AECC 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A0AED0: -/* 00AC0 80A0AED0 8FB00020 */ lw $s0, 0x0020($sp) -/* 00AC4 80A0AED4 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 -/* 00AC8 80A0AED8 03E00008 */ jr $ra -/* 00ACC 80A0AEDC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AEE0.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AEE0.s deleted file mode 100644 index a9a82e6948..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AEE0.s +++ /dev/null @@ -1,20 +0,0 @@ -glabel func_80A0AEE0 -/* 00AD0 80A0AEE0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00AD4 80A0AEE4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00AD8 80A0AEE8 AFA5001C */ sw $a1, 0x001C($sp) -/* 00ADC 80A0AEEC 848E0154 */ lh $t6, 0x0154($a0) ## 00000154 -/* 00AE0 80A0AEF0 84880156 */ lh $t0, 0x0156($a0) ## 00000156 -/* 00AE4 80A0AEF4 25CF0001 */ addiu $t7, $t6, 0x0001 ## $t7 = 00000001 -/* 00AE8 80A0AEF8 A48F0154 */ sh $t7, 0x0154($a0) ## 00000154 -/* 00AEC 80A0AEFC 84980154 */ lh $t8, 0x0154($a0) ## 00000154 -/* 00AF0 80A0AF00 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 00AF4 80A0AF04 15000003 */ bne $t0, $zero, .L80A0AF14 -/* 00AF8 80A0AF08 A4990154 */ sh $t9, 0x0154($a0) ## 00000154 -/* 00AFC 80A0AF0C 0C00B55C */ jal Actor_Kill - -/* 00B00 80A0AF10 00000000 */ nop -.L80A0AF14: -/* 00B04 80A0AF14 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00B08 80A0AF18 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00B0C 80A0AF1C 03E00008 */ jr $ra -/* 00B10 80A0AF20 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AF24.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AF24.s deleted file mode 100644 index 495b6bf1b4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AF24.s +++ /dev/null @@ -1,103 +0,0 @@ -.rdata -glabel D_80A0B460 - .asciz "\x1b[32m☆☆☆☆☆ そ、そんなばかな!エラー!!!!! ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -glabel D_80A0B4A4 - .asciz "\x1b[32m☆☆☆☆☆ バカめ! ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -.text -glabel func_80A0AF24 -/* 00B14 80A0AF24 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 00B18 80A0AF28 3C0F80A1 */ lui $t7, %hi(D_80A0B3A0) ## $t7 = 80A10000 -/* 00B1C 80A0AF2C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00B20 80A0AF30 AFB00020 */ sw $s0, 0x0020($sp) -/* 00B24 80A0AF34 AFA50054 */ sw $a1, 0x0054($sp) -/* 00B28 80A0AF38 25EFB3A0 */ addiu $t7, $t7, %lo(D_80A0B3A0) ## $t7 = 80A0B3A0 -/* 00B2C 80A0AF3C 8DF90000 */ lw $t9, 0x0000($t7) ## 80A0B3A0 -/* 00B30 80A0AF40 27AE0040 */ addiu $t6, $sp, 0x0040 ## $t6 = FFFFFFF0 -/* 00B34 80A0AF44 8DF80004 */ lw $t8, 0x0004($t7) ## 80A0B3A4 -/* 00B38 80A0AF48 ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF0 -/* 00B3C 80A0AF4C 8DF90008 */ lw $t9, 0x0008($t7) ## 80A0B3A8 -/* 00B40 80A0AF50 3C0980A1 */ lui $t1, %hi(D_80A0B3AC) ## $t1 = 80A10000 -/* 00B44 80A0AF54 2529B3AC */ addiu $t1, $t1, %lo(D_80A0B3AC) ## $t1 = 80A0B3AC -/* 00B48 80A0AF58 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF4 -/* 00B4C 80A0AF5C ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFF8 -/* 00B50 80A0AF60 8D2B0000 */ lw $t3, 0x0000($t1) ## 80A0B3AC -/* 00B54 80A0AF64 27A80034 */ addiu $t0, $sp, 0x0034 ## $t0 = FFFFFFE4 -/* 00B58 80A0AF68 8D2A0004 */ lw $t2, 0x0004($t1) ## 80A0B3B0 -/* 00B5C 80A0AF6C AD0B0000 */ sw $t3, 0x0000($t0) ## FFFFFFE4 -/* 00B60 80A0AF70 8D2B0008 */ lw $t3, 0x0008($t1) ## 80A0B3B4 -/* 00B64 80A0AF74 AD0A0004 */ sw $t2, 0x0004($t0) ## FFFFFFE8 -/* 00B68 80A0AF78 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 00B6C 80A0AF7C AD0B0008 */ sw $t3, 0x0008($t0) ## FFFFFFEC -/* 00B70 80A0AF80 848C0152 */ lh $t4, 0x0152($a0) ## 00000152 -/* 00B74 80A0AF84 44810000 */ mtc1 $at, $f0 ## $f0 = 50.00 -/* 00B78 80A0AF88 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00B7C 80A0AF8C 15810004 */ bne $t4, $at, .L80A0AFA0 -/* 00B80 80A0AF90 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00B84 80A0AF94 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00B88 80A0AF98 44810000 */ mtc1 $at, $f0 ## $f0 = 30.00 -/* 00B8C 80A0AF9C 00000000 */ nop -.L80A0AFA0: -/* 00B90 80A0AFA0 46000182 */ mul.s $f6, $f0, $f0 -/* 00B94 80A0AFA4 C604008C */ lwc1 $f4, 0x008C($s0) ## 0000008C -/* 00B98 80A0AFA8 4606203C */ c.lt.s $f4, $f6 -/* 00B9C 80A0AFAC 00000000 */ nop -/* 00BA0 80A0AFB0 4502002B */ bc1fl .L80A0B060 -/* 00BA4 80A0AFB4 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00BA8 80A0AFB8 8E020118 */ lw $v0, 0x0118($s0) ## 00000118 -/* 00BAC 80A0AFBC 3C0480A1 */ lui $a0, %hi(D_80A0B460) ## $a0 = 80A10000 -/* 00BB0 80A0AFC0 10400007 */ beq $v0, $zero, .L80A0AFE0 -/* 00BB4 80A0AFC4 00000000 */ nop -/* 00BB8 80A0AFC8 8C4D0130 */ lw $t5, 0x0130($v0) ## 00000130 -/* 00BBC 80A0AFCC 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00BC0 80A0AFD0 11A00005 */ beq $t5, $zero, .L80A0AFE8 -/* 00BC4 80A0AFD4 00000000 */ nop -/* 00BC8 80A0AFD8 10000003 */ beq $zero, $zero, .L80A0AFE8 -/* 00BCC 80A0AFDC A44E0266 */ sh $t6, 0x0266($v0) ## 00000266 -.L80A0AFE0: -/* 00BD0 80A0AFE0 0C00084C */ jal osSyncPrintf - -/* 00BD4 80A0AFE4 2484B460 */ addiu $a0, $a0, %lo(D_80A0B460) ## $a0 = 80A0B460 -.L80A0AFE8: -/* 00BD8 80A0AFE8 3C0480A1 */ lui $a0, %hi(D_80A0B4A4) ## $a0 = 80A10000 -/* 00BDC 80A0AFEC 0C00084C */ jal osSyncPrintf - -/* 00BE0 80A0AFF0 2484B4A4 */ addiu $a0, $a0, %lo(D_80A0B4A4) ## $a0 = 80A0B4A4 -/* 00BE4 80A0AFF4 860F0152 */ lh $t7, 0x0152($s0) ## 00000152 -/* 00BE8 80A0AFF8 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00BEC 80A0AFFC 24020064 */ addiu $v0, $zero, 0x0064 ## $v0 = 00000064 -/* 00BF0 80A0B000 15E10003 */ bne $t7, $at, .L80A0B010 -/* 00BF4 80A0B004 2403001E */ addiu $v1, $zero, 0x001E ## $v1 = 0000001E -/* 00BF8 80A0B008 24020014 */ addiu $v0, $zero, 0x0014 ## $v0 = 00000014 -/* 00BFC 80A0B00C 24030006 */ addiu $v1, $zero, 0x0006 ## $v1 = 00000006 -.L80A0B010: -/* 00C00 80A0B010 8FA40054 */ lw $a0, 0x0054($sp) -/* 00C04 80A0B014 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00C08 80A0B018 27A60034 */ addiu $a2, $sp, 0x0034 ## $a2 = FFFFFFE4 -/* 00C0C 80A0B01C 27A70040 */ addiu $a3, $sp, 0x0040 ## $a3 = FFFFFFF0 -/* 00C10 80A0B020 AFA20010 */ sw $v0, 0x0010($sp) -/* 00C14 80A0B024 0C00A3A1 */ jal EffectSsBomb2_SpawnLayered -/* 00C18 80A0B028 AFA30014 */ sw $v1, 0x0014($sp) -/* 00C1C 80A0B02C 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 -/* 00C20 80A0B030 8607008A */ lh $a3, 0x008A($s0) ## 0000008A -/* 00C24 80A0B034 8FA40054 */ lw $a0, 0x0054($sp) -/* 00C28 80A0B038 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00C2C 80A0B03C 3C064000 */ lui $a2, 0x4000 ## $a2 = 40000000 -/* 00C30 80A0B040 0C00BDC7 */ jal func_8002F71C -/* 00C34 80A0B044 E7A80010 */ swc1 $f8, 0x0010($sp) -/* 00C38 80A0B048 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00C3C 80A0B04C 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00C40 80A0B050 2405180E */ addiu $a1, $zero, 0x180E ## $a1 = 0000180E -/* 00C44 80A0B054 0C00B55C */ jal Actor_Kill - -/* 00C48 80A0B058 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00C4C 80A0B05C 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A0B060: -/* 00C50 80A0B060 8FB00020 */ lw $s0, 0x0020($sp) -/* 00C54 80A0B064 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 -/* 00C58 80A0B068 03E00008 */ jr $ra -/* 00C5C 80A0B06C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B070.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B070.s deleted file mode 100644 index 7268679614..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B070.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_80A0B070 -/* 00C60 80A0B070 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00C64 80A0B074 44810000 */ mtc1 $at, $f0 ## $f0 = 30.00 -/* 00C68 80A0B078 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00C6C 80A0B07C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00C70 80A0B080 46000182 */ mul.s $f6, $f0, $f0 -/* 00C74 80A0B084 AFA5001C */ sw $a1, 0x001C($sp) -/* 00C78 80A0B088 C484008C */ lwc1 $f4, 0x008C($a0) ## 0000008C -/* 00C7C 80A0B08C 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00C80 80A0B090 24044803 */ addiu $a0, $zero, 0x4803 ## $a0 = 00004803 -/* 00C84 80A0B094 4606203C */ c.lt.s $f4, $f6 -/* 00C88 80A0B098 00000000 */ nop -/* 00C8C 80A0B09C 45020012 */ bc1fl .L80A0B0E8 -/* 00C90 80A0B0A0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00C94 80A0B0A4 0C01E221 */ jal func_80078884 -/* 00C98 80A0B0A8 AFA70018 */ sw $a3, 0x0018($sp) -/* 00C9C 80A0B0AC 8FA70018 */ lw $a3, 0x0018($sp) -/* 00CA0 80A0B0B0 3C0680A1 */ lui $a2, %hi(D_80A0B320) ## $a2 = 80A10000 -/* 00CA4 80A0B0B4 8FA4001C */ lw $a0, 0x001C($sp) -/* 00CA8 80A0B0B8 84EE0150 */ lh $t6, 0x0150($a3) ## 00000150 -/* 00CAC 80A0B0BC 24E50024 */ addiu $a1, $a3, 0x0024 ## $a1 = 00000024 -/* 00CB0 80A0B0C0 000E7840 */ sll $t7, $t6, 1 -/* 00CB4 80A0B0C4 00CF3021 */ addu $a2, $a2, $t7 -/* 00CB8 80A0B0C8 84C6B320 */ lh $a2, %lo(D_80A0B320)($a2) -/* 00CBC 80A0B0CC 34C68000 */ ori $a2, $a2, 0x8000 ## $a2 = 80A18000 -/* 00CC0 80A0B0D0 00063400 */ sll $a2, $a2, 16 -/* 00CC4 80A0B0D4 0C007D52 */ jal Item_DropCollectible - -/* 00CC8 80A0B0D8 00063403 */ sra $a2, $a2, 16 -/* 00CCC 80A0B0DC 0C00B55C */ jal Actor_Kill - -/* 00CD0 80A0B0E0 8FA40018 */ lw $a0, 0x0018($sp) -/* 00CD4 80A0B0E4 8FBF0014 */ lw $ra, 0x0014($sp) -.L80A0B0E8: -/* 00CD8 80A0B0E8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00CDC 80A0B0EC 03E00008 */ jr $ra -/* 00CE0 80A0B0F0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B0F4.s b/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B0F4.s deleted file mode 100644 index 82d6c40e7f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B0F4.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_80A0B0F4 -/* 00CE4 80A0B0F4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00CE8 80A0B0F8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00CEC 80A0B0FC AFA40018 */ sw $a0, 0x0018($sp) -/* 00CF0 80A0B100 AFA5001C */ sw $a1, 0x001C($sp) -/* 00CF4 80A0B104 848F015C */ lh $t7, 0x015C($a0) ## 0000015C -/* 00CF8 80A0B108 248400BC */ addiu $a0, $a0, 0x00BC ## $a0 = 000000BC -/* 00CFC 80A0B10C 3C05C42F */ lui $a1, 0xC42F ## $a1 = C42F0000 -/* 00D00 80A0B110 11E00007 */ beq $t7, $zero, .L80A0B130 -/* 00D04 80A0B114 3C063F00 */ lui $a2, 0x3F00 ## $a2 = 3F000000 -/* 00D08 80A0B118 3C05442F */ lui $a1, 0x442F ## $a1 = 442F0000 -/* 00D0C 80A0B11C 3C063F00 */ lui $a2, 0x3F00 ## $a2 = 3F000000 -/* 00D10 80A0B120 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00D14 80A0B124 3C074348 */ lui $a3, 0x4348 ## $a3 = 43480000 -/* 00D18 80A0B128 10000006 */ beq $zero, $zero, .L80A0B144 -/* 00D1C 80A0B12C 8FBF0014 */ lw $ra, 0x0014($sp) -.L80A0B130: -/* 00D20 80A0B130 8FA40018 */ lw $a0, 0x0018($sp) -/* 00D24 80A0B134 3C074348 */ lui $a3, 0x4348 ## $a3 = 43480000 -/* 00D28 80A0B138 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 00D2C 80A0B13C 248400BC */ addiu $a0, $a0, 0x00BC ## $a0 = 000000BC -/* 00D30 80A0B140 8FBF0014 */ lw $ra, 0x0014($sp) -.L80A0B144: -/* 00D34 80A0B144 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00D38 80A0B148 03E00008 */ jr $ra -/* 00D3C 80A0B14C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B6C0.s b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B6C0.s index cd8a179143..7949a51334 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B6C0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B6C0.s @@ -25,7 +25,7 @@ glabel func_80A0B6C0 /* 00058 80A0B718 AFAF0020 */ sw $t7, 0x0020($sp) /* 0005C 80A0B71C 861804BA */ lh $t8, 0x04BA($s0) ## 000004BA /* 00060 80A0B720 AFA60044 */ sw $a2, 0x0044($sp) -/* 00064 80A0B724 0C00C916 */ jal Actor_SpawnAttached +/* 00064 80A0B724 0C00C916 */ jal Actor_SpawnAsChild /* 00068 80A0B728 AFB80028 */ sw $t8, 0x0028($sp) /* 0006C 80A0B72C 54400004 */ bnel $v0, $zero, .L80A0B740 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B7B8.s b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B7B8.s index 609a6f864a..4675a8781b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B7B8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fd/func_80A0B7B8.s @@ -60,7 +60,7 @@ glabel func_80A0B7B8 /* 001C8 80A0B888 03281021 */ addu $v0, $t9, $t0 /* 001CC 80A0B88C 00021400 */ sll $v0, $v0, 16 /* 001D0 80A0B890 00021403 */ sra $v0, $v0, 16 -/* 001D4 80A0B894 0C00C916 */ jal Actor_SpawnAttached +/* 001D4 80A0B894 0C00C916 */ jal Actor_SpawnAsChild /* 001D8 80A0B898 AFA20020 */ sw $v0, 0x0020($sp) /* 001DC 80A0B89C 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s index 6e32d224d7..9352c73724 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s @@ -863,7 +863,7 @@ glabel func_80A10220 /* 01B80 80A10DE0 AFA00024 */ sw $zero, 0x0024($sp) /* 01B84 80A10DE4 AFA00020 */ sw $zero, 0x0020($sp) /* 01B88 80A10DE8 AFAD001C */ sw $t5, 0x001C($sp) -/* 01B8C 80A10DEC 0C00C916 */ jal Actor_SpawnAttached +/* 01B8C 80A10DEC 0C00C916 */ jal Actor_SpawnAsChild /* 01B90 80A10DF0 E7A40018 */ swc1 $f4, 0x0018($sp) /* 01B94 80A10DF4 8FA20050 */ lw $v0, 0x0050($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fish/func_80A16C68.s b/asm/non_matchings/overlays/actors/ovl_En_Fish/func_80A16C68.s index 48f961eeb1..a7d99ee3c2 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fish/func_80A16C68.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fish/func_80A16C68.s @@ -78,7 +78,7 @@ glabel func_80A16C68 /* 01AE4 80A16D64 00000000 */ nop /* 01AE8 80A16D68 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 01AEC 80A16D6C 0C00BD04 */ jal func_8002F410 +/* 01AEC 80A16D6C 0C00BD04 */ jal Actor_HasParent /* 01AF0 80A16D70 8FA5002C */ lw $a1, 0x002C($sp) /* 01AF4 80A16D74 1040000D */ beq $v0, $zero, .L80A16DAC /* 01AF8 80A16D78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CAAC.s b/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CAAC.s index 5899c41184..413a9647bf 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CAAC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CAAC.s @@ -2,7 +2,7 @@ glabel func_80A1CAAC /* 0210C 80A1CAAC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 02110 80A1CAB0 AFBF001C */ sw $ra, 0x001C($sp) /* 02114 80A1CAB4 AFA50024 */ sw $a1, 0x0024($sp) -/* 02118 80A1CAB8 0C00BD04 */ jal func_8002F410 +/* 02118 80A1CAB8 0C00BD04 */ jal Actor_HasParent /* 0211C 80A1CABC AFA40020 */ sw $a0, 0x0020($sp) /* 02120 80A1CAC0 10400006 */ beq $v0, $zero, .L80A1CADC /* 02124 80A1CAC4 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Gb/func_80A2FBB0.s b/asm/non_matchings/overlays/actors/ovl_En_Gb/func_80A2FBB0.s index dff1092742..543874e860 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Gb/func_80A2FBB0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Gb/func_80A2FBB0.s @@ -2,7 +2,7 @@ glabel func_80A2FBB0 /* 00A30 80A2FBB0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00A34 80A2FBB4 AFBF001C */ sw $ra, 0x001C($sp) /* 00A38 80A2FBB8 AFA50024 */ sw $a1, 0x0024($sp) -/* 00A3C 80A2FBBC 0C00BD04 */ jal func_8002F410 +/* 00A3C 80A2FBBC 0C00BD04 */ jal Actor_HasParent /* 00A40 80A2FBC0 AFA40020 */ sw $a0, 0x0020($sp) /* 00A44 80A2FBC4 10400006 */ beq $v0, $zero, .L80A2FBE0 /* 00A48 80A2FBC8 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ge1/func_80A3196C.s b/asm/non_matchings/overlays/actors/ovl_En_Ge1/func_80A3196C.s index 381eb60892..cc7f329ffc 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ge1/func_80A3196C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ge1/func_80A3196C.s @@ -2,7 +2,7 @@ glabel func_80A3196C /* 00FFC 80A3196C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 /* 01000 80A31970 AFBF001C */ sw $ra, 0x001C($sp) /* 01004 80A31974 AFA5002C */ sw $a1, 0x002C($sp) -/* 01008 80A31978 0C00BD04 */ jal func_8002F410 +/* 01008 80A31978 0C00BD04 */ jal Actor_HasParent /* 0100C 80A3197C AFA40028 */ sw $a0, 0x0028($sp) /* 01010 80A31980 10400013 */ beq $v0, $zero, .L80A319D0 /* 01014 80A31984 8FA40028 */ lw $a0, 0x0028($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ge2/func_80A33A0C.s b/asm/non_matchings/overlays/actors/ovl_En_Ge2/func_80A33A0C.s index dc9bc01128..55ae1af1b0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ge2/func_80A33A0C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ge2/func_80A33A0C.s @@ -2,7 +2,7 @@ glabel func_80A33A0C /* 00E3C 80A33A0C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00E40 80A33A10 AFBF001C */ sw $ra, 0x001C($sp) /* 00E44 80A33A14 AFA50024 */ sw $a1, 0x0024($sp) -/* 00E48 80A33A18 0C00BD04 */ jal func_8002F410 +/* 00E48 80A33A18 0C00BD04 */ jal Actor_HasParent /* 00E4C 80A33A1C AFA40020 */ sw $a0, 0x0020($sp) /* 00E50 80A33A20 10400006 */ beq $v0, $zero, .L80A33A3C /* 00E54 80A33A24 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ge3/func_80A34AA0.s b/asm/non_matchings/overlays/actors/ovl_En_Ge3/func_80A34AA0.s index a6a1c8a2ef..3f129b841a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ge3/func_80A34AA0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ge3/func_80A34AA0.s @@ -2,7 +2,7 @@ glabel func_80A34AA0 /* 00480 80A34AA0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00484 80A34AA4 AFBF001C */ sw $ra, 0x001C($sp) /* 00488 80A34AA8 AFA50024 */ sw $a1, 0x0024($sp) -/* 0048C 80A34AAC 0C00BD04 */ jal func_8002F410 +/* 0048C 80A34AAC 0C00BD04 */ jal Actor_HasParent /* 00490 80A34AB0 AFA40020 */ sw $a0, 0x0020($sp) /* 00494 80A34AB4 10400006 */ beq $v0, $zero, .L80A34AD0 /* 00498 80A34AB8 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Gm/func_80A3DF00.s b/asm/non_matchings/overlays/actors/ovl_En_Gm/func_80A3DF00.s index bdc9f93d33..ae2d49dce8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Gm/func_80A3DF00.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Gm/func_80A3DF00.s @@ -2,7 +2,7 @@ glabel func_80A3DF00 /* 00820 80A3DF00 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00824 80A3DF04 AFBF001C */ sw $ra, 0x001C($sp) /* 00828 80A3DF08 AFA50024 */ sw $a1, 0x0024($sp) -/* 0082C 80A3DF0C 0C00BD04 */ jal func_8002F410 +/* 0082C 80A3DF0C 0C00BD04 */ jal Actor_HasParent /* 00830 80A3DF10 AFA40020 */ sw $a0, 0x0020($sp) /* 00834 80A3DF14 10400006 */ beq $v0, $zero, .L80A3DF30 /* 00838 80A3DF18 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A40B74.s b/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A40B74.s index abbd9087a4..a44f37a0f4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A40B74.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Go/func_80A40B74.s @@ -2,7 +2,7 @@ glabel func_80A40B74 /* 02604 80A40B74 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 /* 02608 80A40B78 AFBF001C */ sw $ra, 0x001C($sp) /* 0260C 80A40B7C AFA50034 */ sw $a1, 0x0034($sp) -/* 02610 80A40B80 0C00BD04 */ jal func_8002F410 +/* 02610 80A40B80 0C00BD04 */ jal Actor_HasParent /* 02614 80A40B84 AFA40030 */ sw $a0, 0x0030($sp) /* 02618 80A40B88 10400009 */ beq $v0, $zero, .L80A40BB0 /* 0261C 80A40B8C 8FA40030 */ lw $a0, 0x0030($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Go2/func_80A470E8.s b/asm/non_matchings/overlays/actors/ovl_En_Go2/func_80A470E8.s index 0fef056273..f29bea3ea0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Go2/func_80A470E8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Go2/func_80A470E8.s @@ -2,7 +2,7 @@ glabel func_80A470E8 /* 043B8 80A470E8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 043BC 80A470EC AFBF001C */ sw $ra, 0x001C($sp) /* 043C0 80A470F0 AFA50024 */ sw $a1, 0x0024($sp) -/* 043C4 80A470F4 0C00BD04 */ jal func_8002F410 +/* 043C4 80A470F4 0C00BD04 */ jal Actor_HasParent /* 043C8 80A470F8 AFA40020 */ sw $a0, 0x0020($sp) /* 043CC 80A470FC 10400006 */ beq $v0, $zero, .L80A47118 /* 043D0 80A47100 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4B3F0.s b/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4B3F0.s index 3affb6e61f..5bc5fb23dc 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4B3F0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Goma/func_80A4B3F0.s @@ -81,7 +81,7 @@ glabel func_80A4B3F0 /* 02634 80A4B4F4 4612C100 */ add.s $f4, $f24, $f18 /* 02638 80A4B4F8 AFA0001C */ sw $zero, 0x001C($sp) /* 0263C 80A4B4FC AFB80020 */ sw $t8, 0x0020($sp) -/* 02640 80A4B500 0C00C916 */ jal Actor_SpawnAttached +/* 02640 80A4B500 0C00C916 */ jal Actor_SpawnAsChild /* 02644 80A4B504 E7A40018 */ swc1 $f4, 0x0018($sp) /* 02648 80A4B508 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Honotrap/func_80A5A208.s b/asm/non_matchings/overlays/actors/ovl_En_Honotrap/func_80A5A208.s index 2a04e98e14..00f38c9ed4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Honotrap/func_80A5A208.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Honotrap/func_80A5A208.s @@ -46,7 +46,7 @@ glabel func_80A5A208 /* 00680 80A5A2B0 AFA80020 */ sw $t0, 0x0020($sp) /* 00684 80A5A2B4 86090018 */ lh $t1, 0x0018($s0) ## 00000018 /* 00688 80A5A2B8 AFAA0028 */ sw $t2, 0x0028($sp) -/* 0068C 80A5A2BC 0C00C916 */ jal Actor_SpawnAttached +/* 0068C 80A5A2BC 0C00C916 */ jal Actor_SpawnAsChild /* 00690 80A5A2C0 AFA90024 */ sw $t1, 0x0024($sp) /* 00694 80A5A2C4 8FBF003C */ lw $ra, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A6304C.s b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A6304C.s index 34ca8650f2..1dceba0c1b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A6304C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Horse/func_80A6304C.s @@ -27,7 +27,7 @@ glabel func_80A6304C /* 07DB8 80A630A8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 07DBC 80A630AC 5520000E */ bnel $t1, $zero, .L80A630E8 /* 07DC0 80A630B0 8E0A020C */ lw $t2, 0x020C($s0) ## 0000020C -/* 07DC4 80A630B4 0C00BD86 */ jal func_8002F618 +/* 07DC4 80A630B4 0C00BD86 */ jal Actor_HasChild /* 07DC8 80A630B8 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 07DCC 80A630BC 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 /* 07DD0 80A630C0 14430008 */ bne $v0, $v1, .L80A630E4 @@ -46,7 +46,7 @@ glabel func_80A6304C /* 07DFC 80A630EC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 07E00 80A630F0 546A0011 */ bnel $v1, $t2, .L80A63138 /* 07E04 80A630F4 8FBF001C */ lw $ra, 0x001C($sp) -/* 07E08 80A630F8 0C00BD9D */ jal func_8002F674 +/* 07E08 80A630F8 0C00BD9D */ jal Actor_HasNoChild /* 07E0C 80A630FC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 07E10 80A63100 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 /* 07E14 80A63104 1443000B */ bne $v0, $v1, .L80A63134 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Hs/func_80A6E740.s b/asm/non_matchings/overlays/actors/ovl_En_Hs/func_80A6E740.s index 7d9e383d08..06fe4ce838 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Hs/func_80A6E740.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Hs/func_80A6E740.s @@ -3,7 +3,7 @@ glabel func_80A6E740 /* 003A4 80A6E744 AFBF0024 */ sw $ra, 0x0024($sp) /* 003A8 80A6E748 AFB00020 */ sw $s0, 0x0020($sp) /* 003AC 80A6E74C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003B0 80A6E750 0C00BD04 */ jal func_8002F410 +/* 003B0 80A6E750 0C00BD04 */ jal Actor_HasParent /* 003B4 80A6E754 AFA5002C */ sw $a1, 0x002C($sp) /* 003B8 80A6E758 10400008 */ beq $v0, $zero, .L80A6E77C /* 003BC 80A6E75C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Hy/func_80A714C4.s b/asm/non_matchings/overlays/actors/ovl_En_Hy/func_80A714C4.s index 62e870b4e3..d09f432908 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Hy/func_80A714C4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Hy/func_80A714C4.s @@ -2,7 +2,7 @@ glabel func_80A714C4 /* 01F14 80A714C4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 01F18 80A714C8 AFBF001C */ sw $ra, 0x001C($sp) /* 01F1C 80A714CC AFA50024 */ sw $a1, 0x0024($sp) -/* 01F20 80A714D0 0C00BD04 */ jal func_8002F410 +/* 01F20 80A714D0 0C00BD04 */ jal Actor_HasParent /* 01F24 80A714D4 AFA40020 */ sw $a0, 0x0020($sp) /* 01F28 80A714D8 10400005 */ beq $v0, $zero, .L80A714F0 /* 01F2C 80A714DC 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/func_80A734F8.s b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/func_80A734F8.s index ccdb2241e9..038f30e311 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/func_80A734F8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/func_80A734F8.s @@ -4,7 +4,7 @@ glabel func_80A734F8 /* 00510 80A73500 AFB10020 */ sw $s1, 0x0020($sp) /* 00514 80A73504 AFB0001C */ sw $s0, 0x001C($sp) /* 00518 80A73508 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0051C 80A7350C 0C00BD04 */ jal func_8002F410 +/* 0051C 80A7350C 0C00BD04 */ jal Actor_HasParent /* 00520 80A73510 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 /* 00524 80A73514 10400003 */ beq $v0, $zero, .L80A73524 /* 00528 80A73518 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F0A8.s b/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F0A8.s index 825fdc49ea..4a340b8a59 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F0A8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F0A8.s @@ -7,7 +7,7 @@ glabel func_80A7F0A8 /* 00C5C 80A7F0BC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 /* 00C60 80A7F0C0 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 /* 00C64 80A7F0C4 31CF0001 */ andi $t7, $t6, 0x0001 ## $t7 = 00000000 -/* 00C68 80A7F0C8 0C00BD04 */ jal func_8002F410 +/* 00C68 80A7F0C8 0C00BD04 */ jal Actor_HasParent /* 00C6C 80A7F0CC A7AF0032 */ sh $t7, 0x0032($sp) /* 00C70 80A7F0D0 50400017 */ beql $v0, $zero, .L80A7F130 /* 00C74 80A7F0D4 920B0161 */ lbu $t3, 0x0161($s0) ## 00000161 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F31C.s b/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F31C.s index 5205a9f7a5..c12214bdb8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F31C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ishi/func_80A7F31C.s @@ -3,7 +3,7 @@ glabel func_80A7F31C /* 00EC0 80A7F320 AFBF0024 */ sw $ra, 0x0024($sp) /* 00EC4 80A7F324 AFB00020 */ sw $s0, 0x0020($sp) /* 00EC8 80A7F328 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00ECC 80A7F32C 0C00BD68 */ jal func_8002F5A0 +/* 00ECC 80A7F32C 0C00BD68 */ jal Actor_HasNoParent /* 00ED0 80A7F330 AFA5002C */ sw $a1, 0x002C($sp) /* 00ED4 80A7F334 10400027 */ beq $v0, $zero, .L80A7F3D4 /* 00ED8 80A7F338 8FAE002C */ lw $t6, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Jj/EnJj_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Jj/EnJj_Init.s index 5c2c172373..c18f300efe 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Jj/EnJj_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Jj/EnJj_Init.s @@ -86,7 +86,7 @@ glabel EnJj_Init /* 00144 80A87944 86090032 */ lh $t1, 0x0032($s0) ## 00000032 /* 00148 80A87948 AFA00028 */ sw $zero, 0x0028($sp) /* 0014C 80A8794C AFA00024 */ sw $zero, 0x0024($sp) -/* 00150 80A87950 0C00C916 */ jal Actor_SpawnAttached +/* 00150 80A87950 0C00C916 */ jal Actor_SpawnAsChild /* 00154 80A87954 AFA90020 */ sw $t1, 0x0020($sp) /* 00158 80A87958 AE020300 */ sw $v0, 0x0300($s0) ## 00000300 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Jj/func_80A87D94.s b/asm/non_matchings/overlays/actors/ovl_En_Jj/func_80A87D94.s index 461c8a48ca..440c807330 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Jj/func_80A87D94.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Jj/func_80A87D94.s @@ -60,7 +60,7 @@ glabel func_80A87D94 /* 0065C 80A87E5C AFA00028 */ sw $zero, 0x0028($sp) /* 00660 80A87E60 E7A40010 */ swc1 $f4, 0x0010($sp) /* 00664 80A87E64 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 00668 80A87E68 0C00C916 */ jal Actor_SpawnAttached +/* 00668 80A87E68 0C00C916 */ jal Actor_SpawnAsChild /* 0066C 80A87E6C E7A80018 */ swc1 $f8, 0x0018($sp) /* 00670 80A87E70 960B030A */ lhu $t3, 0x030A($s0) ## 0000030A diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s index e165f0fc4e..07c058d569 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s @@ -141,7 +141,7 @@ glabel L80A922CC /* 003E8 80A92388 AFAC0020 */ sw $t4, 0x0020($sp) /* 003EC 80A9238C 862D00B8 */ lh $t5, 0x00B8($s1) ## 000000B8 /* 003F0 80A92390 AFAE0028 */ sw $t6, 0x0028($sp) -/* 003F4 80A92394 0C00C916 */ jal Actor_SpawnAttached +/* 003F4 80A92394 0C00C916 */ jal Actor_SpawnAsChild /* 003F8 80A92398 AFAD0024 */ sw $t5, 0x0024($sp) /* 003FC 80A9239C 10400161 */ beq $v0, $zero, .L80A92924 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Karebaba/func_80A96048.s b/asm/non_matchings/overlays/actors/ovl_En_Karebaba/func_80A96048.s index a5397cad35..abe7eb599a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Karebaba/func_80A96048.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Karebaba/func_80A96048.s @@ -8,7 +8,7 @@ glabel func_80A96048 /* 00D10 80A96060 A48E001C */ sh $t6, 0x001C($a0) ## 0000001C .L80A96064: /* 00D14 80A96064 8FA5001C */ lw $a1, 0x001C($sp) -/* 00D18 80A96068 0C00BD04 */ jal func_8002F410 +/* 00D18 80A96068 0C00BD04 */ jal Actor_HasParent /* 00D1C 80A9606C AFA40018 */ sw $a0, 0x0018($sp) /* 00D20 80A96070 14400005 */ bne $v0, $zero, .L80A96088 /* 00D24 80A96074 8FA40018 */ lw $a0, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99048.s b/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99048.s index e785a0736c..2e57355e3c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99048.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99048.s @@ -192,7 +192,7 @@ glabel func_80A99048 /* 0254C 80A992FC AFA0001C */ sw $zero, 0x001C($sp) /* 02550 80A99300 02203025 */ or $a2, $s1, $zero ## $a2 = 00000000 /* 02554 80A99304 24070018 */ addiu $a3, $zero, 0x0018 ## $a3 = 00000018 -/* 02558 80A99308 0C00C916 */ jal Actor_SpawnAttached +/* 02558 80A99308 0C00C916 */ jal Actor_SpawnAsChild /* 0255C 80A9930C E7AA0018 */ swc1 $f10, 0x0018($sp) /* 02560 80A99310 860D001C */ lh $t5, 0x001C($s0) ## 0000001C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99504.s b/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99504.s index b6561d2273..85653111e7 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99504.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ko/func_80A99504.s @@ -2,7 +2,7 @@ glabel func_80A99504 /* 02754 80A99504 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 02758 80A99508 AFBF001C */ sw $ra, 0x001C($sp) /* 0275C 80A9950C AFA50024 */ sw $a1, 0x0024($sp) -/* 02760 80A99510 0C00BD04 */ jal func_8002F410 +/* 02760 80A99510 0C00BD04 */ jal Actor_HasParent /* 02764 80A99514 AFA40020 */ sw $a0, 0x0020($sp) /* 02768 80A99518 10400006 */ beq $v0, $zero, .L80A99534 /* 0276C 80A9951C 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9B8D8.s b/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9B8D8.s index 4da61ea306..dda005b5e0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9B8D8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9B8D8.s @@ -4,7 +4,7 @@ glabel func_80A9B8D8 /* 00940 80A9B8E0 AFB10018 */ sw $s1, 0x0018($sp) /* 00944 80A9B8E4 AFB00014 */ sw $s0, 0x0014($sp) /* 00948 80A9B8E8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0094C 80A9B8EC 0C00BD04 */ jal func_8002F410 +/* 0094C 80A9B8EC 0C00BD04 */ jal Actor_HasParent /* 00950 80A9B8F0 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 /* 00954 80A9B8F4 5040000B */ beql $v0, $zero, .L80A9B924 /* 00958 80A9B8F8 92020161 */ lbu $v0, 0x0161($s0) ## 00000161 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9BAD8.s b/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9BAD8.s index 6f7b038b2c..232524d614 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9BAD8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Kusa/func_80A9BAD8.s @@ -10,7 +10,7 @@ glabel func_80A9BAD8 /* 00B3C 80A9BADC AFBF0024 */ sw $ra, 0x0024($sp) /* 00B40 80A9BAE0 AFB00020 */ sw $s0, 0x0020($sp) /* 00B44 80A9BAE4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00B48 80A9BAE8 0C00BD68 */ jal func_8002F5A0 +/* 00B48 80A9BAE8 0C00BD68 */ jal Actor_HasNoParent /* 00B4C 80A9BAEC AFA5002C */ sw $a1, 0x002C($sp) /* 00B50 80A9BAF0 1040002A */ beq $v0, $zero, .L80A9BB9C /* 00B54 80A9BAF4 8FAE002C */ lw $t6, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/func_80A9F408.s b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/func_80A9F408.s index a0b3c172fe..51b049e24f 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/func_80A9F408.s +++ b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/func_80A9F408.s @@ -301,7 +301,7 @@ glabel func_80A9F408 /* 00804 80A9F7E4 921901C7 */ lbu $t9, 0x01C7($s0) ## 000001C7 /* 00808 80A9F7E8 AFA3004C */ sw $v1, 0x004C($sp) /* 0080C 80A9F7EC 27290002 */ addiu $t1, $t9, 0x0002 ## $t1 = 00000002 -/* 00810 80A9F7F0 0C00C916 */ jal Actor_SpawnAttached +/* 00810 80A9F7F0 0C00C916 */ jal Actor_SpawnAsChild /* 00814 80A9F7F4 AFA90028 */ sw $t1, 0x0028($sp) /* 00818 80A9F7F8 3C0180AA */ lui $at, %hi(D_80AA04F8) ## $at = 80AA0000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACA94.s b/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACA94.s index a6feda66c6..0b20ac6ac1 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACA94.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACA94.s @@ -2,7 +2,7 @@ glabel func_80AACA94 /* 00194 80AACA94 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00198 80AACA98 AFBF001C */ sw $ra, 0x001C($sp) /* 0019C 80AACA9C AFA40020 */ sw $a0, 0x0020($sp) -/* 001A0 80AACAA0 0C00BD04 */ jal func_8002F410 +/* 001A0 80AACAA0 0C00BD04 */ jal Actor_HasParent /* 001A4 80AACAA4 AFA50024 */ sw $a1, 0x0024($sp) /* 001A8 80AACAA8 1040000D */ beq $v0, $zero, .L80AACAE0 /* 001AC 80AACAAC 3C0E80AB */ lui $t6, %hi(func_80AACA40) ## $t6 = 80AB0000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACFA0.s b/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACFA0.s index 39339bd681..373d383e71 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACFA0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Mk/func_80AACFA0.s @@ -2,7 +2,7 @@ glabel func_80AACFA0 /* 006A0 80AACFA0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 006A4 80AACFA4 AFBF001C */ sw $ra, 0x001C($sp) /* 006A8 80AACFA8 AFA50024 */ sw $a1, 0x0024($sp) -/* 006AC 80AACFAC 0C00BD04 */ jal func_8002F410 +/* 006AC 80AACFAC 0C00BD04 */ jal Actor_HasParent /* 006B0 80AACFB0 AFA40020 */ sw $a0, 0x0020($sp) /* 006B4 80AACFB4 1040000B */ beq $v0, $zero, .L80AACFE4 /* 006B8 80AACFB8 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1578.s b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1578.s index 1db7b0ef19..a9751c2ece 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1578.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1578.s @@ -16,7 +16,7 @@ glabel func_80AB1578 /* 00820 80AB15B0 2407005D */ addiu $a3, $zero, 0x005D ## $a3 = 0000005D /* 00824 80AB15B4 E7A00010 */ swc1 $f0, 0x0010($sp) /* 00828 80AB15B8 E7A20014 */ swc1 $f2, 0x0014($sp) -/* 0082C 80AB15BC 0C00C916 */ jal Actor_SpawnAttached +/* 0082C 80AB15BC 0C00C916 */ jal Actor_SpawnAsChild /* 00830 80AB15C0 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 00834 80AB15C4 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB15D4.s b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB15D4.s index 3cadf080de..ea1447564e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB15D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB15D4.s @@ -21,7 +21,7 @@ glabel func_80AB15D4 /* 00890 80AB1620 AFA0001C */ sw $zero, 0x001C($sp) /* 00894 80AB1624 2407008B */ addiu $a3, $zero, 0x008B ## $a3 = 0000008B /* 00898 80AB1628 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 0089C 80AB162C 0C00C916 */ jal Actor_SpawnAttached +/* 0089C 80AB162C 0C00C916 */ jal Actor_SpawnAsChild /* 008A0 80AB1630 E7AC0018 */ swc1 $f12, 0x0018($sp) /* 008A4 80AB1634 8FA4003C */ lw $a0, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1A94.s b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1A94.s index 6c49e78cd7..11bdad7024 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1A94.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Nb/func_80AB1A94.s @@ -25,7 +25,7 @@ glabel func_80AB1A94 /* 00D60 80AB1AF0 AFA00024 */ sw $zero, 0x0024($sp) /* 00D64 80AB1AF4 AFA00020 */ sw $zero, 0x0020($sp) /* 00D68 80AB1AF8 AFA0001C */ sw $zero, 0x001C($sp) -/* 00D6C 80AB1AFC 0C00C916 */ jal Actor_SpawnAttached +/* 00D6C 80AB1AFC 0C00C916 */ jal Actor_SpawnAsChild /* 00D70 80AB1B00 E7A60018 */ swc1 $f6, 0x0018($sp) /* 00D74 80AB1B04 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB5FA0.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB5FA0.s index 3447462cb1..82b26aaf16 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB5FA0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB5FA0.s @@ -84,7 +84,7 @@ glabel func_80AB5FA0 /* 00924 80AB60A4 24070144 */ addiu $a3, $zero, 0x0144 ## $a3 = 00000144 /* 00928 80AB60A8 E7A40014 */ swc1 $f4, 0x0014($sp) /* 0092C 80AB60AC E7B00010 */ swc1 $f16, 0x0010($sp) -/* 00930 80AB60B0 0C00C916 */ jal Actor_SpawnAttached +/* 00930 80AB60B0 0C00C916 */ jal Actor_SpawnAsChild /* 00934 80AB60B4 E7A20018 */ swc1 $f2, 0x0018($sp) /* 00938 80AB60B8 10400007 */ beq $v0, $zero, .L80AB60D8 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6450.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6450.s index ccfbe15a17..fc84450505 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6450.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6450.s @@ -32,7 +32,7 @@ glabel func_80AB6450 /* 00D48 80AB64C8 E492006C */ swc1 $f18, 0x006C($a0) ## 0000006C /* 00D4C 80AB64CC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 .L80AB64D0: -/* 00D50 80AB64D0 0C00BD04 */ jal func_8002F410 +/* 00D50 80AB64D0 0C00BD04 */ jal Actor_HasParent /* 00D54 80AB64D4 AFA5002C */ sw $a1, 0x002C($sp) /* 00D58 80AB64D8 10400015 */ beq $v0, $zero, .L80AB6530 /* 00D5C 80AB64DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s index 6fb7a959cd..b9659df94e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6570.s @@ -35,7 +35,7 @@ glabel func_80AB6570 /* 00E34 80AB65B4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 00E38 80AB65B8 8FA50044 */ lw $a1, 0x0044($sp) /* 00E3C 80AB65BC E7A20034 */ swc1 $f2, 0x0034($sp) -/* 00E40 80AB65C0 0C00BD04 */ jal func_8002F410 +/* 00E40 80AB65C0 0C00BD04 */ jal Actor_HasParent /* 00E44 80AB65C4 E7AE0030 */ swc1 $f14, 0x0030($sp) /* 00E48 80AB65C8 C7A20034 */ lwc1 $f2, 0x0034($sp) /* 00E4C 80AB65CC 10400012 */ beq $v0, $zero, .L80AB6618 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6BF8.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6BF8.s index 5d94531d10..2a7e3698ff 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6BF8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6BF8.s @@ -47,7 +47,7 @@ glabel func_80AB6BF8 /* 014F0 80AB6C70 440C4000 */ mfc1 $t4, $f8 /* 014F4 80AB6C74 00000000 */ nop /* 014F8 80AB6C78 A60C00B8 */ sh $t4, 0x00B8($s0) ## 000000B8 -/* 014FC 80AB6C7C 0C00BD68 */ jal func_8002F5A0 +/* 014FC 80AB6C7C 0C00BD68 */ jal Actor_HasNoParent /* 01500 80AB6C80 8FA50024 */ lw $a1, 0x0024($sp) /* 01504 80AB6C84 10400018 */ beq $v0, $zero, .L80AB6CE8 /* 01508 80AB6C88 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6D08.s b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6D08.s index 64fddcbf2f..98daf50722 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6D08.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw/func_80AB6D08.s @@ -75,7 +75,7 @@ glabel func_80AB6D08 .L80AB6E20: /* 016A0 80AB6E20 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 .L80AB6E24: -/* 016A4 80AB6E24 0C00BD04 */ jal func_8002F410 +/* 016A4 80AB6E24 0C00BD04 */ jal Actor_HasParent /* 016A8 80AB6E28 8FA50024 */ lw $a1, 0x0024($sp) /* 016AC 80AB6E2C 10400011 */ beq $v0, $zero, .L80AB6E74 /* 016B0 80AB6E30 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Niw_Lady/func_80ABAC00.s b/asm/non_matchings/overlays/actors/ovl_En_Niw_Lady/func_80ABAC00.s index 4f40eae18d..052f613b05 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Niw_Lady/func_80ABAC00.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Niw_Lady/func_80ABAC00.s @@ -2,7 +2,7 @@ glabel func_80ABAC00 /* 00FC0 80ABAC00 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00FC4 80ABAC04 AFBF001C */ sw $ra, 0x001C($sp) /* 00FC8 80ABAC08 AFA50024 */ sw $a1, 0x0024($sp) -/* 00FCC 80ABAC0C 0C00BD04 */ jal func_8002F410 +/* 00FCC 80ABAC0C 0C00BD04 */ jal Actor_HasParent /* 00FD0 80ABAC10 AFA40020 */ sw $a0, 0x0020($sp) /* 00FD4 80ABAC14 10400005 */ beq $v0, $zero, .L80ABAC2C /* 00FD8 80ABAC18 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC5D40.s b/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC5D40.s index 65a3578eec..a9725d1b86 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC5D40.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC5D40.s @@ -3,7 +3,7 @@ glabel func_80AC5D40 /* 030A4 80AC5D44 AFBF001C */ sw $ra, 0x001C($sp) /* 030A8 80AC5D48 AFA50024 */ sw $a1, 0x0024($sp) /* 030AC 80AC5D4C AFA60028 */ sw $a2, 0x0028($sp) -/* 030B0 80AC5D50 0C00BD04 */ jal func_8002F410 +/* 030B0 80AC5D50 0C00BD04 */ jal Actor_HasParent /* 030B4 80AC5D54 AFA40020 */ sw $a0, 0x0020($sp) /* 030B8 80AC5D58 10400005 */ beq $v0, $zero, .L80AC5D70 /* 030BC 80AC5D5C 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC6B3C.s b/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC6B3C.s index c02336cc85..0a596194fd 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC6B3C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ossan/func_80AC6B3C.s @@ -64,7 +64,7 @@ glabel func_80AC6B3C /* 03F8C 80AC6C2C AFA0001C */ sw $zero, 0x001C($sp) /* 03F90 80AC6C30 24070018 */ addiu $a3, $zero, 0x0018 ## $a3 = 00000018 /* 03F94 80AC6C34 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 03F98 80AC6C38 0C00C916 */ jal Actor_SpawnAttached +/* 03F98 80AC6C38 0C00C916 */ jal Actor_SpawnAsChild /* 03F9C 80AC6C3C E7B00018 */ swc1 $f16, 0x0018($sp) /* 03FA0 80AC6C40 8FBF003C */ lw $ra, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACF920.s b/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACF920.s index 2af3b51d75..2f703c6f90 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACF920.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACF920.s @@ -108,7 +108,7 @@ glabel func_80ACF920 /* 005F4 80ACFA94 46080280 */ add.s $f10, $f0, $f8 /* 005F8 80ACFA98 AFA00020 */ sw $zero, 0x0020($sp) /* 005FC 80ACFA9C AFA0001C */ sw $zero, 0x001C($sp) -/* 00600 80ACFAA0 0C00C916 */ jal Actor_SpawnAttached +/* 00600 80ACFAA0 0C00C916 */ jal Actor_SpawnAsChild /* 00604 80ACFAA4 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 00608 80ACFAA8 1040000C */ beq $v0, $zero, .L80ACFADC diff --git a/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACFEF8.s b/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACFEF8.s index 4b920b9a43..fa43e6bdcf 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACFEF8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Peehat/func_80ACFEF8.s @@ -80,7 +80,7 @@ glabel func_80ACFEF8 /* 00B60 80AD0000 46080280 */ add.s $f10, $f0, $f8 /* 00B64 80AD0004 AFA00020 */ sw $zero, 0x0020($sp) /* 00B68 80AD0008 AFA0001C */ sw $zero, 0x001C($sp) -/* 00B6C 80AD000C 0C00C916 */ jal Actor_SpawnAttached +/* 00B6C 80AD000C 0C00C916 */ jal Actor_SpawnAsChild /* 00B70 80AD0010 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 00B74 80AD0014 1040000D */ beq $v0, $zero, .L80AD004C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Rl/func_80AE78D4.s b/asm/non_matchings/overlays/actors/ovl_En_Rl/func_80AE78D4.s index eda49b8d01..bc9f97766e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Rl/func_80AE78D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Rl/func_80AE78D4.s @@ -25,7 +25,7 @@ glabel func_80AE78D4 /* 00680 80AE7930 AFA00024 */ sw $zero, 0x0024($sp) /* 00684 80AE7934 AFA00020 */ sw $zero, 0x0020($sp) /* 00688 80AE7938 AFA0001C */ sw $zero, 0x001C($sp) -/* 0068C 80AE793C 0C00C916 */ jal Actor_SpawnAttached +/* 0068C 80AE793C 0C00C916 */ jal Actor_SpawnAsChild /* 00690 80AE7940 E7A60018 */ swc1 $f6, 0x0018($sp) /* 00694 80AE7944 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Sa/EnSa_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Sa/EnSa_Init.s index 2b53e4bdbf..d7c3a3c603 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Sa/EnSa_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Sa/EnSa_Init.s @@ -170,7 +170,7 @@ glabel L80AF637C /* 00E98 80AF63F8 AFA00024 */ sw $zero, 0x0024($sp) /* 00E9C 80AF63FC AFA00020 */ sw $zero, 0x0020($sp) /* 00EA0 80AF6400 AFA0001C */ sw $zero, 0x001C($sp) -/* 00EA4 80AF6404 0C00C916 */ jal Actor_SpawnAttached +/* 00EA4 80AF6404 0C00C916 */ jal Actor_SpawnAsChild /* 00EA8 80AF6408 E7B20018 */ swc1 $f18, 0x0018($sp) /* 00EAC 80AF640C 8FBF003C */ lw $ra, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80AFFE44.s b/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80AFFE44.s index 7397b6e1cb..139d44bfa0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80AFFE44.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80AFFE44.s @@ -3,7 +3,7 @@ glabel func_80AFFE44 /* 01B98 80AFFE48 AFBF0024 */ sw $ra, 0x0024($sp) /* 01B9C 80AFFE4C AFB00020 */ sw $s0, 0x0020($sp) /* 01BA0 80AFFE50 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 01BA4 80AFFE54 0C00BD04 */ jal func_8002F410 +/* 01BA4 80AFFE54 0C00BD04 */ jal Actor_HasParent /* 01BA8 80AFFE58 AFA50034 */ sw $a1, 0x0034($sp) /* 01BAC 80AFFE5C 10400005 */ beq $v0, $zero, .L80AFFE74 /* 01BB0 80AFFE60 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80B010C4.s b/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80B010C4.s index b1cd7eef1c..7cd7c8f54e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80B010C4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Skj/func_80B010C4.s @@ -2,7 +2,7 @@ glabel func_80B010C4 /* 02E14 80B010C4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 02E18 80B010C8 AFBF001C */ sw $ra, 0x001C($sp) /* 02E1C 80B010CC AFA50024 */ sw $a1, 0x0024($sp) -/* 02E20 80B010D0 0C00BD04 */ jal func_8002F410 +/* 02E20 80B010D0 0C00BD04 */ jal Actor_HasParent /* 02E24 80B010D4 AFA40020 */ sw $a0, 0x0020($sp) /* 02E28 80B010D8 10400006 */ beq $v0, $zero, .L80B010F4 /* 02E2C 80B010DC 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Sth/func_80B07C88.s b/asm/non_matchings/overlays/actors/ovl_En_Sth/func_80B07C88.s index c5fb92bf08..28bd5a18fa 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Sth/func_80B07C88.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Sth/func_80B07C88.s @@ -3,7 +3,7 @@ glabel func_80B07C88 /* 0074C 80B07C8C AFBF001C */ sw $ra, 0x001C($sp) /* 00750 80B07C90 AFB00018 */ sw $s0, 0x0018($sp) /* 00754 80B07C94 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00758 80B07C98 0C00BD04 */ jal func_8002F410 +/* 00758 80B07C98 0C00BD04 */ jal Actor_HasParent /* 0075C 80B07C9C AFA50024 */ sw $a1, 0x0024($sp) /* 00760 80B07CA0 1040000C */ beq $v0, $zero, .L80B07CD4 /* 00764 80B07CA4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0D878.s b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0D878.s index bac66894ec..79a14cbf93 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0D878.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Sw/func_80B0D878.s @@ -72,7 +72,7 @@ glabel func_80B0D878 /* 01BD8 80B0D988 AFA0001C */ sw $zero, 0x001C($sp) /* 01BDC 80B0D98C E7A80018 */ swc1 $f8, 0x0018($sp) /* 01BE0 80B0D990 860C001C */ lh $t4, 0x001C($s0) ## 0000001C -/* 01BE4 80B0D994 0C00C916 */ jal Actor_SpawnAttached +/* 01BE4 80B0D994 0C00C916 */ jal Actor_SpawnAsChild /* 01BE8 80B0D998 AFAC0028 */ sw $t4, 0x0028($sp) /* 01BEC 80B0D99C 10400002 */ beq $v0, $zero, .L80B0D9A8 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/EnSyatekiItm_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/EnSyatekiItm_Init.s index 09b99441aa..1f87f3496b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/EnSyatekiItm_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/EnSyatekiItm_Init.s @@ -38,7 +38,7 @@ glabel EnSyatekiItm_Init /* 00068 80B0F718 240700C1 */ addiu $a3, $zero, 0x00C1 ## $a3 = 000000C1 /* 0006C 80B0F71C E7A40010 */ swc1 $f4, 0x0010($sp) /* 00070 80B0F720 E7A80018 */ swc1 $f8, 0x0018($sp) -/* 00074 80B0F724 0C00C916 */ jal Actor_SpawnAttached +/* 00074 80B0F724 0C00C916 */ jal Actor_SpawnAsChild /* 00078 80B0F728 E7A60014 */ swc1 $f6, 0x0014($sp) /* 0007C 80B0F72C 14400008 */ bne $v0, $zero, .L80B0F750 @@ -75,7 +75,7 @@ glabel EnSyatekiItm_Init /* 000E8 80B0F798 AFA00024 */ sw $zero, 0x0024($sp) /* 000EC 80B0F79C E7AA0010 */ swc1 $f10, 0x0010($sp) /* 000F0 80B0F7A0 E7B00014 */ swc1 $f16, 0x0014($sp) -/* 000F4 80B0F7A4 0C00C916 */ jal Actor_SpawnAttached +/* 000F4 80B0F7A4 0C00C916 */ jal Actor_SpawnAsChild /* 000F8 80B0F7A8 E7B20018 */ swc1 $f18, 0x0018($sp) /* 000FC 80B0F7AC 14400008 */ bne $v0, $zero, .L80B0F7D0 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/func_80B0FABC.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/func_80B0FABC.s index 8ffd79af7b..09286e63bd 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/func_80B0FABC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Itm/func_80B0FABC.s @@ -253,7 +253,7 @@ glabel L80B0FD40 /* 00738 80B0FDE8 AFA00020 */ sw $zero, 0x0020($sp) /* 0073C 80B0FDEC AFA0001C */ sw $zero, 0x001C($sp) /* 00740 80B0FDF0 24070117 */ addiu $a3, $zero, 0x0117 ## $a3 = 00000117 -/* 00744 80B0FDF4 0C00C916 */ jal Actor_SpawnAttached +/* 00744 80B0FDF4 0C00C916 */ jal Actor_SpawnAsChild /* 00748 80B0FDF8 E7A80018 */ swc1 $f8, 0x0018($sp) /* 0074C 80B0FDFC 14400008 */ bne $v0, $zero, .L80B0FE20 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Man/func_80B11164.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Man/func_80B11164.s index 21a3046282..0408d739c7 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Man/func_80B11164.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Man/func_80B11164.s @@ -8,7 +8,7 @@ glabel func_80B11164 /* 0090C 80B1117C 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C /* 00910 80B11180 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00914 80B11184 0C00BD04 */ jal func_8002F410 +/* 00914 80B11184 0C00BD04 */ jal Actor_HasParent /* 00918 80B11188 8FA5002C */ lw $a1, 0x002C($sp) /* 0091C 80B1118C 10400005 */ beq $v0, $zero, .L80B111A4 /* 00920 80B11190 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/EnSyatekiNiw_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/EnSyatekiNiw_Update.s deleted file mode 100644 index 24c69fc4dd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/EnSyatekiNiw_Update.s +++ /dev/null @@ -1,252 +0,0 @@ -.late_rodata -glabel D_80B1382C - .word 0xBE19999A - -.text -glabel EnSyatekiNiw_Update -/* 01384 80B12C74 27BDFF58 */ addiu $sp, $sp, 0xFF58 ## $sp = FFFFFF58 -/* 01388 80B12C78 3C0F80B1 */ lui $t7, %hi(D_80B136B8) ## $t7 = 80B10000 -/* 0138C 80B12C7C AFBF004C */ sw $ra, 0x004C($sp) -/* 01390 80B12C80 AFB10048 */ sw $s1, 0x0048($sp) -/* 01394 80B12C84 AFB00044 */ sw $s0, 0x0044($sp) -/* 01398 80B12C88 F7BC0038 */ sdc1 $f28, 0x0038($sp) -/* 0139C 80B12C8C F7BA0030 */ sdc1 $f26, 0x0030($sp) -/* 013A0 80B12C90 F7B80028 */ sdc1 $f24, 0x0028($sp) -/* 013A4 80B12C94 F7B60020 */ sdc1 $f22, 0x0020($sp) -/* 013A8 80B12C98 F7B40018 */ sdc1 $f20, 0x0018($sp) -/* 013AC 80B12C9C AFA500AC */ sw $a1, 0x00AC($sp) -/* 013B0 80B12CA0 25EF36B8 */ addiu $t7, $t7, %lo(D_80B136B8) ## $t7 = 80B136B8 -/* 013B4 80B12CA4 8DF90000 */ lw $t9, 0x0000($t7) ## 80B136B8 -/* 013B8 80B12CA8 27AE0090 */ addiu $t6, $sp, 0x0090 ## $t6 = FFFFFFE8 -/* 013BC 80B12CAC 8DF80004 */ lw $t8, 0x0004($t7) ## 80B136BC -/* 013C0 80B12CB0 ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFE8 -/* 013C4 80B12CB4 8DF90008 */ lw $t9, 0x0008($t7) ## 80B136C0 -/* 013C8 80B12CB8 3C0980B1 */ lui $t1, %hi(D_80B136C4) ## $t1 = 80B10000 -/* 013CC 80B12CBC 252936C4 */ addiu $t1, $t1, %lo(D_80B136C4) ## $t1 = 80B136C4 -/* 013D0 80B12CC0 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFEC -/* 013D4 80B12CC4 ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFF0 -/* 013D8 80B12CC8 8D2B0000 */ lw $t3, 0x0000($t1) ## 80B136C4 -/* 013DC 80B12CCC 27A80084 */ addiu $t0, $sp, 0x0084 ## $t0 = FFFFFFDC -/* 013E0 80B12CD0 8D2A0004 */ lw $t2, 0x0004($t1) ## 80B136C8 -/* 013E4 80B12CD4 AD0B0000 */ sw $t3, 0x0000($t0) ## FFFFFFDC -/* 013E8 80B12CD8 8D2B0008 */ lw $t3, 0x0008($t1) ## 80B136CC -/* 013EC 80B12CDC AD0A0004 */ sw $t2, 0x0004($t0) ## FFFFFFE0 -/* 013F0 80B12CE0 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 013F4 80B12CE4 AD0B0008 */ sw $t3, 0x0008($t0) ## FFFFFFE4 -/* 013F8 80B12CE8 0C2C4CAA */ jal func_80B132A8 -/* 013FC 80B12CEC 8FA500AC */ lw $a1, 0x00AC($sp) -/* 01400 80B12CF0 862C028C */ lh $t4, 0x028C($s1) ## 0000028C -/* 01404 80B12CF4 86220254 */ lh $v0, 0x0254($s1) ## 00000254 -/* 01408 80B12CF8 3C014170 */ lui $at, 0x4170 ## $at = 41700000 -/* 0140C 80B12CFC 258D0001 */ addiu $t5, $t4, 0x0001 ## $t5 = 00000001 -/* 01410 80B12D00 10400003 */ beq $v0, $zero, .L80B12D10 -/* 01414 80B12D04 A62D028C */ sh $t5, 0x028C($s1) ## 0000028C -/* 01418 80B12D08 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 0141C 80B12D0C A62E0254 */ sh $t6, 0x0254($s1) ## 00000254 -.L80B12D10: -/* 01420 80B12D10 86220258 */ lh $v0, 0x0258($s1) ## 00000258 -/* 01424 80B12D14 10400002 */ beq $v0, $zero, .L80B12D20 -/* 01428 80B12D18 244FFFFF */ addiu $t7, $v0, 0xFFFF ## $t7 = FFFFFFFF -/* 0142C 80B12D1C A62F0258 */ sh $t7, 0x0258($s1) ## 00000258 -.L80B12D20: -/* 01430 80B12D20 8622025A */ lh $v0, 0x025A($s1) ## 0000025A -/* 01434 80B12D24 10400002 */ beq $v0, $zero, .L80B12D30 -/* 01438 80B12D28 2458FFFF */ addiu $t8, $v0, 0xFFFF ## $t8 = FFFFFFFF -/* 0143C 80B12D2C A638025A */ sh $t8, 0x025A($s1) ## 0000025A -.L80B12D30: -/* 01440 80B12D30 8622025C */ lh $v0, 0x025C($s1) ## 0000025C -/* 01444 80B12D34 10400002 */ beq $v0, $zero, .L80B12D40 -/* 01448 80B12D38 2459FFFF */ addiu $t9, $v0, 0xFFFF ## $t9 = FFFFFFFF -/* 0144C 80B12D3C A639025C */ sh $t9, 0x025C($s1) ## 0000025C -.L80B12D40: -/* 01450 80B12D40 8622025E */ lh $v0, 0x025E($s1) ## 0000025E -/* 01454 80B12D44 10400002 */ beq $v0, $zero, .L80B12D50 -/* 01458 80B12D48 2448FFFF */ addiu $t0, $v0, 0xFFFF ## $t0 = FFFFFFFF -/* 0145C 80B12D4C A628025E */ sh $t0, 0x025E($s1) ## 0000025E -.L80B12D50: -/* 01460 80B12D50 86220262 */ lh $v0, 0x0262($s1) ## 00000262 -/* 01464 80B12D54 10400002 */ beq $v0, $zero, .L80B12D60 -/* 01468 80B12D58 2449FFFF */ addiu $t1, $v0, 0xFFFF ## $t1 = FFFFFFFF -/* 0146C 80B12D5C A6290262 */ sh $t1, 0x0262($s1) ## 00000262 -.L80B12D60: -/* 01470 80B12D60 86220260 */ lh $v0, 0x0260($s1) ## 00000260 -/* 01474 80B12D64 10400002 */ beq $v0, $zero, .L80B12D70 -/* 01478 80B12D68 244AFFFF */ addiu $t2, $v0, 0xFFFF ## $t2 = FFFFFFFF -/* 0147C 80B12D6C A62A0260 */ sh $t2, 0x0260($s1) ## 00000260 -.L80B12D70: -/* 01480 80B12D70 8A2C0030 */ lwl $t4, 0x0030($s1) ## 00000030 -/* 01484 80B12D74 9A2C0033 */ lwr $t4, 0x0033($s1) ## 00000033 -/* 01488 80B12D78 44812000 */ mtc1 $at, $f4 ## $f4 = 15.00 -/* 0148C 80B12D7C 8E390250 */ lw $t9, 0x0250($s1) ## 00000250 -/* 01490 80B12D80 AA2C00B4 */ swl $t4, 0x00B4($s1) ## 000000B4 -/* 01494 80B12D84 BA2C00B7 */ swr $t4, 0x00B7($s1) ## 000000B7 -/* 01498 80B12D88 962C0034 */ lhu $t4, 0x0034($s1) ## 00000034 -/* 0149C 80B12D8C E62400C4 */ swc1 $f4, 0x00C4($s1) ## 000000C4 -/* 014A0 80B12D90 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 014A4 80B12D94 A62C00B8 */ sh $t4, 0x00B8($s1) ## 000000B8 -/* 014A8 80B12D98 0320F809 */ jalr $ra, $t9 -/* 014AC 80B12D9C 8FA500AC */ lw $a1, 0x00AC($sp) -/* 014B0 80B12DA0 0C00B638 */ jal Actor_MoveForward - -/* 014B4 80B12DA4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 014B8 80B12DA8 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 014BC 80B12DAC 44810000 */ mtc1 $at, $f0 ## $f0 = 20.00 -/* 014C0 80B12DB0 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 014C4 80B12DB4 44813000 */ mtc1 $at, $f6 ## $f6 = 60.00 -/* 014C8 80B12DB8 240D001D */ addiu $t5, $zero, 0x001D ## $t5 = 0000001D -/* 014CC 80B12DBC 44060000 */ mfc1 $a2, $f0 -/* 014D0 80B12DC0 44070000 */ mfc1 $a3, $f0 -/* 014D4 80B12DC4 AFAD0014 */ sw $t5, 0x0014($sp) -/* 014D8 80B12DC8 8FA400AC */ lw $a0, 0x00AC($sp) -/* 014DC 80B12DCC 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 014E0 80B12DD0 0C00B92D */ jal func_8002E4B4 -/* 014E4 80B12DD4 E7A60010 */ swc1 $f6, 0x0010($sp) -/* 014E8 80B12DD8 862E02A0 */ lh $t6, 0x02A0($s1) ## 000002A0 -/* 014EC 80B12DDC 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 014F0 80B12DE0 51C0003F */ beql $t6, $zero, .L80B12EE0 -/* 014F4 80B12DE4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 014F8 80B12DE8 4481E000 */ mtc1 $at, $f28 ## $f28 = 8.00 -/* 014FC 80B12DEC 3C014000 */ lui $at, 0x4000 ## $at = 40000000 -/* 01500 80B12DF0 4481C000 */ mtc1 $at, $f24 ## $f24 = 2.00 -/* 01504 80B12DF4 3C014040 */ lui $at, 0x4040 ## $at = 40400000 -/* 01508 80B12DF8 4481B000 */ mtc1 $at, $f22 ## $f22 = 3.00 -/* 0150C 80B12DFC 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 01510 80B12E00 4481A000 */ mtc1 $at, $f20 ## $f20 = 10.00 -/* 01514 80B12E04 4480D000 */ mtc1 $zero, $f26 ## $f26 = 0.00 -/* 01518 80B12E08 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -.L80B12E0C: -/* 0151C 80B12E0C 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 01520 80B12E10 4600A306 */ mov.s $f12, $f20 -/* 01524 80B12E14 C6280024 */ lwc1 $f8, 0x0024($s1) ## 00000024 -/* 01528 80B12E18 4600A306 */ mov.s $f12, $f20 -/* 0152C 80B12E1C 46080280 */ add.s $f10, $f0, $f8 -/* 01530 80B12E20 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 01534 80B12E24 E7AA0078 */ swc1 $f10, 0x0078($sp) -/* 01538 80B12E28 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 0153C 80B12E2C 44819000 */ mtc1 $at, $f18 ## $f18 = 20.00 -/* 01540 80B12E30 C6300028 */ lwc1 $f16, 0x0028($s1) ## 00000028 -/* 01544 80B12E34 4600A306 */ mov.s $f12, $f20 -/* 01548 80B12E38 46128100 */ add.s $f4, $f16, $f18 -/* 0154C 80B12E3C 46040180 */ add.s $f6, $f0, $f4 -/* 01550 80B12E40 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 01554 80B12E44 E7A6007C */ swc1 $f6, 0x007C($sp) -/* 01558 80B12E48 C628002C */ lwc1 $f8, 0x002C($s1) ## 0000002C -/* 0155C 80B12E4C 4600B306 */ mov.s $f12, $f22 -/* 01560 80B12E50 46080280 */ add.s $f10, $f0, $f8 -/* 01564 80B12E54 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 01568 80B12E58 E7AA0080 */ swc1 $f10, 0x0080($sp) -/* 0156C 80B12E5C E7A0006C */ swc1 $f0, 0x006C($sp) -/* 01570 80B12E60 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 01574 80B12E64 4600C306 */ mov.s $f12, $f24 -/* 01578 80B12E68 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 0157C 80B12E6C 44818000 */ mtc1 $at, $f16 ## $f16 = 0.50 -/* 01580 80B12E70 4600B306 */ mov.s $f12, $f22 -/* 01584 80B12E74 46100482 */ mul.s $f18, $f0, $f16 -/* 01588 80B12E78 46189100 */ add.s $f4, $f18, $f24 -/* 0158C 80B12E7C 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 01590 80B12E80 E7A40070 */ swc1 $f4, 0x0070($sp) -/* 01594 80B12E84 3C0180B1 */ lui $at, %hi(D_80B1382C) ## $at = 80B10000 -/* 01598 80B12E88 C426382C */ lwc1 $f6, %lo(D_80B1382C)($at) -/* 0159C 80B12E8C E7A00074 */ swc1 $f0, 0x0074($sp) -/* 015A0 80B12E90 E7BA0060 */ swc1 $f26, 0x0060($sp) -/* 015A4 80B12E94 E7BA0068 */ swc1 $f26, 0x0068($sp) -/* 015A8 80B12E98 4600E306 */ mov.s $f12, $f28 -/* 015AC 80B12E9C 0C00CFBE */ jal Math_Rand_ZeroFloat - -/* 015B0 80B12EA0 E7A60064 */ swc1 $f6, 0x0064($sp) -/* 015B4 80B12EA4 461C0200 */ add.s $f8, $f0, $f28 -/* 015B8 80B12EA8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 015BC 80B12EAC 27A50078 */ addiu $a1, $sp, 0x0078 ## $a1 = FFFFFFD0 -/* 015C0 80B12EB0 27A6006C */ addiu $a2, $sp, 0x006C ## $a2 = FFFFFFC4 -/* 015C4 80B12EB4 E7A80010 */ swc1 $f8, 0x0010($sp) -/* 015C8 80B12EB8 0C2C4C6E */ jal func_80B131B8 -/* 015CC 80B12EBC 27A70060 */ addiu $a3, $sp, 0x0060 ## $a3 = FFFFFFB8 -/* 015D0 80B12EC0 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 -/* 015D4 80B12EC4 00108400 */ sll $s0, $s0, 16 -/* 015D8 80B12EC8 00108403 */ sra $s0, $s0, 16 -/* 015DC 80B12ECC 2A010014 */ slti $at, $s0, 0x0014 -/* 015E0 80B12ED0 1420FFCE */ bne $at, $zero, .L80B12E0C -/* 015E4 80B12ED4 00000000 */ nop -/* 015E8 80B12ED8 A62002A0 */ sh $zero, 0x02A0($s1) ## 000002A0 -/* 015EC 80B12EDC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -.L80B12EE0: -/* 015F0 80B12EE0 0C2C4AE9 */ jal func_80B12BA4 -/* 015F4 80B12EE4 8FA500AC */ lw $a1, 0x00AC($sp) -/* 015F8 80B12EE8 862F0262 */ lh $t7, 0x0262($s1) ## 00000262 -/* 015FC 80B12EEC 55E00012 */ bnel $t7, $zero, .L80B12F38 -/* 01600 80B12EF0 8622029E */ lh $v0, 0x029E($s1) ## 0000029E -/* 01604 80B12EF4 8E280250 */ lw $t0, 0x0250($s1) ## 00000250 -/* 01608 80B12EF8 3C1880B1 */ lui $t8, %hi(func_80B11E78) ## $t8 = 80B10000 -/* 0160C 80B12EFC 27181E78 */ addiu $t8, $t8, %lo(func_80B11E78) ## $t8 = 80B11E78 -/* 01610 80B12F00 17080008 */ bne $t8, $t0, .L80B12F24 -/* 01614 80B12F04 240A001E */ addiu $t2, $zero, 0x001E ## $t2 = 0000001E -/* 01618 80B12F08 2409012C */ addiu $t1, $zero, 0x012C ## $t1 = 0000012C -/* 0161C 80B12F0C A6290262 */ sh $t1, 0x0262($s1) ## 00000262 -/* 01620 80B12F10 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 01624 80B12F14 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 01628 80B12F18 24052811 */ addiu $a1, $zero, 0x2811 ## $a1 = 00002811 -/* 0162C 80B12F1C 10000006 */ beq $zero, $zero, .L80B12F38 -/* 01630 80B12F20 8622029E */ lh $v0, 0x029E($s1) ## 0000029E -.L80B12F24: -/* 01634 80B12F24 A62A0262 */ sh $t2, 0x0262($s1) ## 00000262 -/* 01638 80B12F28 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0163C 80B12F2C 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 01640 80B12F30 24052812 */ addiu $a1, $zero, 0x2812 ## $a1 = 00002812 -/* 01644 80B12F34 8622029E */ lh $v0, 0x029E($s1) ## 0000029E -.L80B12F38: -/* 01648 80B12F38 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -/* 0164C 80B12F3C 8FAB00AC */ lw $t3, 0x00AC($sp) -/* 01650 80B12F40 10400006 */ beq $v0, $zero, .L80B12F5C -/* 01654 80B12F44 3C0C0001 */ lui $t4, 0x0001 ## $t4 = 00010000 -/* 01658 80B12F48 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0165C 80B12F4C 5041000A */ beql $v0, $at, .L80B12F78 -/* 01660 80B12F50 24100001 */ addiu $s0, $zero, 0x0001 ## $s0 = 00000001 -/* 01664 80B12F54 10000008 */ beq $zero, $zero, .L80B12F78 -/* 01668 80B12F58 00000000 */ nop -.L80B12F5C: -/* 0166C 80B12F5C 018B6021 */ addu $t4, $t4, $t3 -/* 01670 80B12F60 818C1E5C */ lb $t4, 0x1E5C($t4) ## 00011E5C -/* 01674 80B12F64 11800004 */ beq $t4, $zero, .L80B12F78 -/* 01678 80B12F68 00000000 */ nop -/* 0167C 80B12F6C 10000002 */ beq $zero, $zero, .L80B12F78 -/* 01680 80B12F70 24100001 */ addiu $s0, $zero, 0x0001 ## $s0 = 00000001 -/* 01684 80B12F74 24100001 */ addiu $s0, $zero, 0x0001 ## $s0 = 00000001 -.L80B12F78: -/* 01688 80B12F78 1200000F */ beq $s0, $zero, .L80B12FB8 -/* 0168C 80B12F7C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 01690 80B12F80 263002FC */ addiu $s0, $s1, 0x02FC ## $s0 = 000002FC -/* 01694 80B12F84 0C0189B7 */ jal Collider_CylinderUpdate - -/* 01698 80B12F88 02002825 */ or $a1, $s0, $zero ## $a1 = 000002FC -/* 0169C 80B12F8C 8FA400AC */ lw $a0, 0x00AC($sp) -/* 016A0 80B12F90 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 016A4 80B12F94 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 016A8 80B12F98 00812821 */ addu $a1, $a0, $at -/* 016AC 80B12F9C AFA50054 */ sw $a1, 0x0054($sp) -/* 016B0 80B12FA0 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 016B4 80B12FA4 02003025 */ or $a2, $s0, $zero ## $a2 = 000002FC -/* 016B8 80B12FA8 8FA50054 */ lw $a1, 0x0054($sp) -/* 016BC 80B12FAC 8FA400AC */ lw $a0, 0x00AC($sp) -/* 016C0 80B12FB0 0C017713 */ jal CollisionCheck_SetOC - ## CollisionCheck_setOT -/* 016C4 80B12FB4 02003025 */ or $a2, $s0, $zero ## $a2 = 000002FC -.L80B12FB8: -/* 016C8 80B12FB8 8FBF004C */ lw $ra, 0x004C($sp) -/* 016CC 80B12FBC D7B40018 */ ldc1 $f20, 0x0018($sp) -/* 016D0 80B12FC0 D7B60020 */ ldc1 $f22, 0x0020($sp) -/* 016D4 80B12FC4 D7B80028 */ ldc1 $f24, 0x0028($sp) -/* 016D8 80B12FC8 D7BA0030 */ ldc1 $f26, 0x0030($sp) -/* 016DC 80B12FCC D7BC0038 */ ldc1 $f28, 0x0038($sp) -/* 016E0 80B12FD0 8FB00044 */ lw $s0, 0x0044($sp) -/* 016E4 80B12FD4 8FB10048 */ lw $s1, 0x0048($sp) -/* 016E8 80B12FD8 03E00008 */ jr $ra -/* 016EC 80B12FDC 27BD00A8 */ addiu $sp, $sp, 0x00A8 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ta/func_80B15E80.s b/asm/non_matchings/overlays/actors/ovl_En_Ta/func_80B15E80.s index 9c70d05d23..38aeef7a8f 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ta/func_80B15E80.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ta/func_80B15E80.s @@ -3,7 +3,7 @@ glabel func_80B15E80 /* 023E4 80B15E84 AFBF0024 */ sw $ra, 0x0024($sp) /* 023E8 80B15E88 AFB00020 */ sw $s0, 0x0020($sp) /* 023EC 80B15E8C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 023F0 80B15E90 0C00BD04 */ jal func_8002F410 +/* 023F0 80B15E90 0C00BD04 */ jal Actor_HasParent /* 023F4 80B15E94 AFA5002C */ sw $a1, 0x002C($sp) /* 023F8 80B15E98 10400011 */ beq $v0, $zero, .L80B15EE0 /* 023FC 80B15E9C 8FA5002C */ lw $a1, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Takara_Man/func_80B17A6C.s b/asm/non_matchings/overlays/actors/ovl_En_Takara_Man/func_80B17A6C.s index a81efe7cee..9416a8f0d5 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Takara_Man/func_80B17A6C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Takara_Man/func_80B17A6C.s @@ -2,7 +2,7 @@ glabel func_80B17A6C /* 0050C 80B17A6C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 00510 80B17A70 AFBF001C */ sw $ra, 0x001C($sp) /* 00514 80B17A74 AFA50024 */ sw $a1, 0x0024($sp) -/* 00518 80B17A78 0C00BD04 */ jal func_8002F410 +/* 00518 80B17A78 0C00BD04 */ jal Actor_HasParent /* 0051C 80B17A7C AFA40020 */ sw $a0, 0x0020($sp) /* 00520 80B17A80 10400005 */ beq $v0, $zero, .L80B17A98 /* 00524 80B17A84 8FA40020 */ lw $a0, 0x0020($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Toryo/func_80B20768.s b/asm/non_matchings/overlays/actors/ovl_En_Toryo/func_80B20768.s index 052bb0f4a5..e6e36c6320 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Toryo/func_80B20768.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Toryo/func_80B20768.s @@ -46,7 +46,7 @@ glabel func_80B20768 /* 00698 80B20808 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 /* 0069C 80B2080C 14610012 */ bne $v1, $at, .L80B20858 /* 006A0 80B20810 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 006A4 80B20814 0C00BD04 */ jal func_8002F410 +/* 006A4 80B20814 0C00BD04 */ jal Actor_HasParent /* 006A8 80B20818 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 /* 006AC 80B2081C 10400005 */ beq $v0, $zero, .L80B20834 /* 006B0 80B20820 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Tr/func_80B22F28.s b/asm/non_matchings/overlays/actors/ovl_En_Tr/func_80B22F28.s index ef1135d633..ef5e8451dd 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Tr/func_80B22F28.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Tr/func_80B22F28.s @@ -92,7 +92,7 @@ glabel func_80B22F28 /* 00388 80B23078 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 0038C 80B2307C 02203025 */ or $a2, $s1, $zero ## $a2 = 00000000 /* 00390 80B23080 240700F5 */ addiu $a3, $zero, 0x00F5 ## $a3 = 000000F5 -/* 00394 80B23084 0C00C916 */ jal Actor_SpawnAttached +/* 00394 80B23084 0C00C916 */ jal Actor_SpawnAsChild /* 00398 80B23088 E7B20018 */ swc1 $f18, 0x0018($sp) /* 0039C 80B2308C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s index 70716ff9f0..ef04f8361b 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s @@ -207,7 +207,7 @@ glabel EnVbBall_Update /* 008E0 80B29880 AFAB0024 */ sw $t3, 0x0024($sp) /* 008E4 80B29884 8628001C */ lh $t0, 0x001C($s1) ## 0000001C /* 008E8 80B29888 250C0001 */ addiu $t4, $t0, 0x0001 ## $t4 = 00000001 -/* 008EC 80B2988C 0C00C916 */ jal Actor_SpawnAttached +/* 008EC 80B2988C 0C00C916 */ jal Actor_SpawnAsChild /* 008F0 80B29890 AFAC0028 */ sw $t4, 0x0028($sp) /* 008F4 80B29894 10400031 */ beq $v0, $zero, .L80B2995C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Viewer/EnViewer_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Viewer/EnViewer_Init.s index 3d635e0317..4abc6bedfb 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Viewer/EnViewer_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Viewer/EnViewer_Init.s @@ -44,7 +44,7 @@ glabel EnViewer_Init /* 000A8 80B2A2A8 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 /* 000AC 80B2A2AC E7A00010 */ swc1 $f0, 0x0010($sp) /* 000B0 80B2A2B0 E7A00014 */ swc1 $f0, 0x0014($sp) -/* 000B4 80B2A2B4 0C00C916 */ jal Actor_SpawnAttached +/* 000B4 80B2A2B4 0C00C916 */ jal Actor_SpawnAsChild /* 000B8 80B2A2B8 E7A00018 */ swc1 $f0, 0x0018($sp) /* 000BC 80B2A2BC 3C0180B3 */ lui $at, %hi(D_80B2D440) ## $at = 80B30000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Viewer/func_80B2A75C.s b/asm/non_matchings/overlays/actors/ovl_En_Viewer/func_80B2A75C.s index 6f4195c067..7da93ce2a0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Viewer/func_80B2A75C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Viewer/func_80B2A75C.s @@ -157,7 +157,7 @@ glabel func_80B2A75C /* 00740 80B2A940 AFA00024 */ sw $zero, 0x0024($sp) /* 00744 80B2A944 E7A40010 */ swc1 $f4, 0x0010($sp) /* 00748 80B2A948 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 0074C 80B2A94C 0C00C916 */ jal Actor_SpawnAttached +/* 0074C 80B2A94C 0C00C916 */ jal Actor_SpawnAsChild /* 00750 80B2A950 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00754 80B2A954 8FA6005C */ lw $a2, 0x005C($sp) @@ -488,7 +488,7 @@ glabel L80B2AD44 /* 00BDC 80B2ADDC AFA00028 */ sw $zero, 0x0028($sp) /* 00BE0 80B2ADE0 E7B20010 */ swc1 $f18, 0x0010($sp) /* 00BE4 80B2ADE4 E7A40014 */ swc1 $f4, 0x0014($sp) -/* 00BE8 80B2ADE8 0C00C916 */ jal Actor_SpawnAttached +/* 00BE8 80B2ADE8 0C00C916 */ jal Actor_SpawnAsChild /* 00BEC 80B2ADEC E7A60018 */ swc1 $f6, 0x0018($sp) /* 00BF0 80B2ADF0 8FA6005C */ lw $a2, 0x005C($sp) @@ -513,7 +513,7 @@ glabel L80B2AD44 /* 00C38 80B2AE38 AFA80028 */ sw $t0, 0x0028($sp) /* 00C3C 80B2AE3C E7A80010 */ swc1 $f8, 0x0010($sp) /* 00C40 80B2AE40 E7AA0014 */ swc1 $f10, 0x0014($sp) -/* 00C44 80B2AE44 0C00C916 */ jal Actor_SpawnAttached +/* 00C44 80B2AE44 0C00C916 */ jal Actor_SpawnAsChild /* 00C48 80B2AE48 E7B00018 */ swc1 $f16, 0x0018($sp) /* 00C4C 80B2AE4C 8FA6005C */ lw $a2, 0x005C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Vm/func_80B2E034.s b/asm/non_matchings/overlays/actors/ovl_En_Vm/func_80B2E034.s index 89585fd9aa..95cfd72586 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Vm/func_80B2E034.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Vm/func_80B2E034.s @@ -11,7 +11,7 @@ glabel func_80B2E034 /* 00BE0 80B2E040 AFBF0034 */ sw $ra, 0x0034($sp) /* 00BE4 80B2E044 AFA5003C */ sw $a1, 0x003C($sp) /* 00BE8 80B2E048 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00BEC 80B2E04C 0C00CD90 */ jal func_80033640 +/* 00BEC 80B2E04C 0C00CD90 */ jal Actor_GetCollidedExplosive /* 00BF0 80B2E050 26050268 */ addiu $a1, $s0, 0x0268 ## $a1 = 00000268 /* 00BF4 80B2E054 5040000B */ beql $v0, $zero, .L80B2E084 /* 00BF8 80B2E058 92020345 */ lbu $v0, 0x0345($s0) ## 00000345 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Wood02/func_80B3B094.s b/asm/non_matchings/overlays/actors/ovl_En_Wood02/func_80B3B094.s index d468ab74a6..a3c0cd6a20 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Wood02/func_80B3B094.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Wood02/func_80B3B094.s @@ -106,7 +106,7 @@ glabel func_80B3B094 /* 002AC 80B3B21C AFA20028 */ sw $v0, 0x0028($sp) /* 002B0 80B3B220 AFA00024 */ sw $zero, 0x0024($sp) /* 002B4 80B3B224 AFAE001C */ sw $t6, 0x001C($sp) -/* 002B8 80B3B228 0C00C916 */ jal Actor_SpawnAttached +/* 002B8 80B3B228 0C00C916 */ jal Actor_SpawnAsChild /* 002BC 80B3B22C AFAF0020 */ sw $t7, 0x0020($sp) /* 002C0 80B3B230 5040000D */ beql $v0, $zero, .L80B3B268 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B54F18.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B54F18.s index af35578cda..dbe9b2ffc4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B54F18.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B54F18.s @@ -29,7 +29,7 @@ glabel func_80B54F18 /* 01BD4 80B54F84 46105080 */ add.s $f2, $f10, $f16 /* 01BD8 80B54F88 E7A00010 */ swc1 $f0, 0x0010($sp) /* 01BDC 80B54F8C E7AC0018 */ swc1 $f12, 0x0018($sp) -/* 01BE0 80B54F90 0C00C916 */ jal Actor_SpawnAttached +/* 01BE0 80B54F90 0C00C916 */ jal Actor_SpawnAsChild /* 01BE4 80B54F94 E7A20014 */ swc1 $f2, 0x0014($sp) /* 01BE8 80B54F98 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl4/func_80B5DAD8.s b/asm/non_matchings/overlays/actors/ovl_En_Zl4/func_80B5DAD8.s index 0831f7607c..3cdf270cec 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl4/func_80B5DAD8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Zl4/func_80B5DAD8.s @@ -196,7 +196,7 @@ glabel L80B5DCB4 /* 025C8 80B5DD78 92030208 */ lbu $v1, 0x0208($s0) ## 00000208 glabel L80B5DD7C /* 025CC 80B5DD7C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 025D0 80B5DD80 0C00BD04 */ jal func_8002F410 +/* 025D0 80B5DD80 0C00BD04 */ jal Actor_HasParent /* 025D4 80B5DD84 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 /* 025D8 80B5DD88 1040000A */ beq $v0, $zero, .L80B5DDB4 /* 025DC 80B5DD8C 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C diff --git a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B62B6C.s b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B62B6C.s index fc9ee664e6..ea1e9ba871 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B62B6C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B62B6C.s @@ -171,7 +171,7 @@ glabel L80B62CA4 /* 00340 80B62D00 AFA00024 */ sw $zero, 0x0024($sp) /* 00344 80B62D04 E7A20010 */ swc1 $f2, 0x0010($sp) /* 00348 80B62D08 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 0034C 80B62D0C 0C00C916 */ jal Actor_SpawnAttached +/* 0034C 80B62D0C 0C00C916 */ jal Actor_SpawnAsChild /* 00350 80B62D10 E7A80018 */ swc1 $f8, 0x0018($sp) /* 00354 80B62D14 860301D4 */ lh $v1, 0x01D4($s0) ## 000001D4 @@ -290,7 +290,7 @@ glabel L80B62E10 /* 004F4 80B62EB4 AFA00020 */ sw $zero, 0x0020($sp) /* 004F8 80B62EB8 AFA00024 */ sw $zero, 0x0024($sp) /* 004FC 80B62EBC E7AA0014 */ swc1 $f10, 0x0014($sp) -/* 00500 80B62EC0 0C00C916 */ jal Actor_SpawnAttached +/* 00500 80B62EC0 0C00C916 */ jal Actor_SpawnAsChild /* 00504 80B62EC4 E7B20018 */ swc1 $f18, 0x0018($sp) /* 00508 80B62EC8 860301D4 */ lh $v1, 0x01D4($s0) ## 000001D4 @@ -1175,7 +1175,7 @@ glabel L80B63988 /* 01170 80B63B30 AFA00024 */ sw $zero, 0x0024($sp) /* 01174 80B63B34 2407006D */ addiu $a3, $zero, 0x006D ## $a3 = 0000006D /* 01178 80B63B38 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 3E4C1C24 -/* 0117C 80B63B3C 0C00C916 */ jal Actor_SpawnAttached +/* 0117C 80B63B3C 0C00C916 */ jal Actor_SpawnAsChild /* 01180 80B63B40 AFB90020 */ sw $t9, 0x0020($sp) /* 01184 80B63B44 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001 diff --git a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6404C.s b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6404C.s index 9f078047ff..fcf9701b22 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6404C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6404C.s @@ -148,7 +148,7 @@ glabel func_80B6404C /* 01860 80B64220 AFB80028 */ sw $t8, 0x0028($sp) /* 01864 80B64224 AFA00024 */ sw $zero, 0x0024($sp) /* 01868 80B64228 01C17821 */ addu $t7, $t6, $at -/* 0186C 80B6422C 0C00C916 */ jal Actor_SpawnAttached +/* 0186C 80B6422C 0C00C916 */ jal Actor_SpawnAsChild /* 01870 80B64230 AFAF0020 */ sw $t7, 0x0020($sp) /* 01874 80B64234 A200014F */ sb $zero, 0x014F($s0) ## 0000014F diff --git a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6424C.s b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6424C.s index 7820d8e976..149542fe34 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6424C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6424C.s @@ -179,7 +179,7 @@ glabel func_80B6424C /* 01AAC 80B6446C AFA00024 */ sw $zero, 0x0024($sp) /* 01AB0 80B64470 AFA00020 */ sw $zero, 0x0020($sp) /* 01AB4 80B64474 AFA0001C */ sw $zero, 0x001C($sp) -/* 01AB8 80B64478 0C00C916 */ jal Actor_SpawnAttached +/* 01AB8 80B64478 0C00C916 */ jal Actor_SpawnAsChild /* 01ABC 80B6447C E7A40018 */ swc1 $f4, 0x0018($sp) /* 01AC0 80B64480 860301D6 */ lh $v1, 0x01D6($s0) ## 000001D6 @@ -323,7 +323,7 @@ glabel func_80B6424C /* 01CB0 80B64670 E7A20054 */ swc1 $f2, 0x0054($sp) /* 01CB4 80B64674 AFA90028 */ sw $t1, 0x0028($sp) /* 01CB8 80B64678 AFA00024 */ sw $zero, 0x0024($sp) -/* 01CBC 80B6467C 0C00C916 */ jal Actor_SpawnAttached +/* 01CBC 80B6467C 0C00C916 */ jal Actor_SpawnAsChild /* 01CC0 80B64680 AFA80020 */ sw $t0, 0x0020($sp) /* 01CC4 80B64684 C7A20054 */ lwc1 $f2, 0x0054($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6476C.s b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6476C.s index afab12aa13..df591b0a53 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6476C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B6476C.s @@ -202,7 +202,7 @@ glabel func_80B6476C /* 02050 80B64A10 AFA00024 */ sw $zero, 0x0024($sp) /* 02054 80B64A14 01215021 */ addu $t2, $t1, $at /* 02058 80B64A18 AFAA0020 */ sw $t2, 0x0020($sp) -/* 0205C 80B64A1C 0C00C916 */ jal Actor_SpawnAttached +/* 0205C 80B64A1C 0C00C916 */ jal Actor_SpawnAsChild /* 02060 80B64A20 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 .L80B64A24: diff --git a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B64AA8.s b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B64AA8.s index aeb33e2023..20870f038c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B64AA8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_fHG/func_80B64AA8.s @@ -166,7 +166,7 @@ glabel func_80B64AA8 /* 022F8 80B64CB8 AFA00020 */ sw $zero, 0x0020($sp) /* 022FC 80B64CBC AFA0001C */ sw $zero, 0x001C($sp) /* 02300 80B64CC0 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 02304 80B64CC4 0C00C916 */ jal Actor_SpawnAttached +/* 02304 80B64CC4 0C00C916 */ jal Actor_SpawnAsChild /* 02308 80B64CC8 E7AA0018 */ swc1 $f10, 0x0018($sp) /* 0230C 80B64CCC 3C0480B6 */ lui $a0, %hi(D_80B6533C) ## $a0 = 80B60000 diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s index 863c34d5ba..f549d5050e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s @@ -443,7 +443,7 @@ glabel Fishing_Init /* 0118C 80B6AB2C AFA00024 */ sw $zero, 0x0024($sp) /* 01190 80B6AB30 E7B00010 */ swc1 $f16, 0x0010($sp) /* 01194 80B6AB34 E7B20014 */ swc1 $f18, 0x0014($sp) -/* 01198 80B6AB38 0C00C916 */ jal Actor_SpawnAttached +/* 01198 80B6AB38 0C00C916 */ jal Actor_SpawnAsChild /* 0119C 80B6AB3C E7A40018 */ swc1 $f4, 0x0018($sp) /* 011A0 80B6AB40 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B77404.s b/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B77404.s index 51a7741c08..b77e23aa10 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B77404.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/func_80B77404.s @@ -988,7 +988,7 @@ glabel L80B7819C /* 0E7FC 80B7819C 3C0180B8 */ lui $at, %hi(D_80B7A674) ## $at = 80B80000 /* 0E800 80B781A0 A020A674 */ sb $zero, %lo(D_80B7A674)($at) /* 0E804 80B781A4 8FA40038 */ lw $a0, 0x0038($sp) -/* 0E808 80B781A8 0C00BD04 */ jal func_8002F410 +/* 0E808 80B781A8 0C00BD04 */ jal Actor_HasParent /* 0E80C 80B781AC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 /* 0E810 80B781B0 10400005 */ beq $v0, $zero, .L80B781C8 /* 0E814 80B781B4 8FA40038 */ lw $a0, 0x0038($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Destroy.s deleted file mode 100644 index b0c47da123..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Destroy.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel ItemOcarina_Destroy -/* 001B0 80B862E0 AFA40000 */ sw $a0, 0x0000($sp) -/* 001B4 80B862E4 03E00008 */ jr $ra -/* 001B8 80B862E8 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Draw.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Draw.s deleted file mode 100644 index 6793e01c66..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Draw.s +++ /dev/null @@ -1,18 +0,0 @@ -glabel ItemOcarina_Draw -/* 0067C 80B867AC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00680 80B867B0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00684 80B867B4 AFA40018 */ sw $a0, 0x0018($sp) -/* 00688 80B867B8 AFA5001C */ sw $a1, 0x001C($sp) -/* 0068C 80B867BC 0C00BAF3 */ jal func_8002EBCC -/* 00690 80B867C0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 00694 80B867C4 8FA40018 */ lw $a0, 0x0018($sp) -/* 00698 80B867C8 8FA5001C */ lw $a1, 0x001C($sp) -/* 0069C 80B867CC 0C00BB60 */ jal func_8002ED80 -/* 006A0 80B867D0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 006A4 80B867D4 8FA4001C */ lw $a0, 0x001C($sp) -/* 006A8 80B867D8 0C01A528 */ jal func_800694A0 -/* 006AC 80B867DC 2405002E */ addiu $a1, $zero, 0x002E ## $a1 = 0000002E -/* 006B0 80B867E0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006B4 80B867E4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 006B8 80B867E8 03E00008 */ jr $ra -/* 006BC 80B867EC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Init.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Init.s deleted file mode 100644 index 77ae68b980..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Init.s +++ /dev/null @@ -1,134 +0,0 @@ -.rdata -glabel D_80B86810 - .asciz "../z_item_ocarina.c" - .balign 4 - -glabel D_80B86824 - .asciz "no = %d\n" - .balign 4 - -.text -glabel ItemOcarina_Init -/* 00008 80B86138 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 0000C 80B8613C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00010 80B86140 AFBF0034 */ sw $ra, 0x0034($sp) -/* 00014 80B86144 AFB00030 */ sw $s0, 0x0030($sp) -/* 00018 80B86148 AFA50044 */ sw $a1, 0x0044($sp) -/* 0001C 80B8614C 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 00020 80B86150 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00024 80B86154 44050000 */ mfc1 $a1, $f0 -/* 00028 80B86158 44070000 */ mfc1 $a3, $f0 -/* 0002C 80B8615C 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4 -/* 00030 80B86160 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 00034 80B86164 0C00AC78 */ jal ActorShape_Init - -/* 00038 80B86168 AFAE0038 */ sw $t6, 0x0038($sp) -/* 0003C 80B8616C 3C053DCC */ lui $a1, 0x3DCC ## $a1 = 3DCC0000 -/* 00040 80B86170 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3DCCCCCD -/* 00044 80B86174 0C00B58B */ jal Actor_SetScale - -/* 00048 80B86178 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0004C 80B8617C 8FA20038 */ lw $v0, 0x0038($sp) -/* 00050 80B86180 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00054 80B86184 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00058 80B86188 1040000B */ beq $v0, $zero, .L80B861B8 -/* 0005C 80B8618C 3C0580B8 */ lui $a1, %hi(func_80B86494) ## $a1 = 80B80000 -/* 00060 80B86190 1041000D */ beq $v0, $at, .L80B861C8 -/* 00064 80B86194 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00068 80B86198 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 0006C 80B8619C 1041000F */ beq $v0, $at, .L80B861DC -/* 00070 80B861A0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00074 80B861A4 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 00078 80B861A8 10410011 */ beq $v0, $at, .L80B861F0 -/* 0007C 80B861AC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00080 80B861B0 10000038 */ beq $zero, $zero, .L80B86294 -/* 00084 80B861B4 00000000 */ nop -.L80B861B8: -/* 00088 80B861B8 0C2E184C */ jal func_80B86130 -/* 0008C 80B861BC 24A56494 */ addiu $a1, $a1, %lo(func_80B86494) ## $a1 = 80B86494 -/* 00090 80B861C0 10000038 */ beq $zero, $zero, .L80B862A4 -/* 00094 80B861C4 00000000 */ nop -.L80B861C8: -/* 00098 80B861C8 3C0580B8 */ lui $a1, %hi(func_80B865E0) ## $a1 = 80B80000 -/* 0009C 80B861CC 0C2E184C */ jal func_80B86130 -/* 000A0 80B861D0 24A565E0 */ addiu $a1, $a1, %lo(func_80B865E0) ## $a1 = 80B865E0 -/* 000A4 80B861D4 10000033 */ beq $zero, $zero, .L80B862A4 -/* 000A8 80B861D8 00000000 */ nop -.L80B861DC: -/* 000AC 80B861DC 3C0580B8 */ lui $a1, %hi(func_80B86640) ## $a1 = 80B80000 -/* 000B0 80B861E0 0C2E184C */ jal func_80B86130 -/* 000B4 80B861E4 24A56640 */ addiu $a1, $a1, %lo(func_80B86640) ## $a1 = 80B86640 -/* 000B8 80B861E8 1000002E */ beq $zero, $zero, .L80B862A4 -/* 000BC 80B861EC 00000000 */ nop -.L80B861F0: -/* 000C0 80B861F0 3C0580B8 */ lui $a1, %hi(func_80B866BC) ## $a1 = 80B80000 -/* 000C4 80B861F4 0C2E184C */ jal func_80B86130 -/* 000C8 80B861F8 24A566BC */ addiu $a1, $a1, %lo(func_80B866BC) ## $a1 = 80B866BC -/* 000CC 80B861FC 3C028016 */ lui $v0, %hi(gSaveContext) -/* 000D0 80B86200 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 000D4 80B86204 944F0EE4 */ lhu $t7, 0x0EE4($v0) ## 8015F544 -/* 000D8 80B86208 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 -/* 000DC 80B8620C 13000007 */ beq $t8, $zero, .L80B8622C -/* 000E0 80B86210 00000000 */ nop -/* 000E4 80B86214 94590EDC */ lhu $t9, 0x0EDC($v0) ## 8015F53C -/* 000E8 80B86218 8FA50044 */ lw $a1, 0x0044($sp) -/* 000EC 80B8621C 24060173 */ addiu $a2, $zero, 0x0173 ## $a2 = 00000173 -/* 000F0 80B86220 33280008 */ andi $t0, $t9, 0x0008 ## $t0 = 00000000 -/* 000F4 80B86224 11000005 */ beq $t0, $zero, .L80B8623C -/* 000F8 80B86228 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24 -.L80B8622C: -/* 000FC 80B8622C 0C00B55C */ jal Actor_Kill - -/* 00100 80B86230 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00104 80B86234 10000026 */ beq $zero, $zero, .L80B862D0 -/* 00108 80B86238 8FBF0034 */ lw $ra, 0x0034($sp) -.L80B8623C: -/* 0010C 80B8623C 3C01C30C */ lui $at, 0xC30C ## $at = C30C0000 -/* 00110 80B86240 44812000 */ mtc1 $at, $f4 ## $f4 = -140.00 -/* 00114 80B86244 3C01445D */ lui $at, 0x445D ## $at = 445D0000 -/* 00118 80B86248 44813000 */ mtc1 $at, $f6 ## $f6 = 884.00 -/* 0011C 80B8624C 3C074395 */ lui $a3, 0x4395 ## $a3 = 43950000 -/* 00120 80B86250 24090004 */ addiu $t1, $zero, 0x0004 ## $t1 = 00000004 -/* 00124 80B86254 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00128 80B86258 240B3800 */ addiu $t3, $zero, 0x3800 ## $t3 = 00003800 -/* 0012C 80B8625C AFAB0024 */ sw $t3, 0x0024($sp) -/* 00130 80B86260 AFAA0020 */ sw $t2, 0x0020($sp) -/* 00134 80B86264 AFA9001C */ sw $t1, 0x001C($sp) -/* 00138 80B86268 34E78000 */ ori $a3, $a3, 0x8000 ## $a3 = 43958000 -/* 0013C 80B8626C AFA00018 */ sw $zero, 0x0018($sp) -/* 00140 80B86270 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00144 80B86274 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 00148 80B86278 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 0014C 80B8627C 3C053E4C */ lui $a1, 0x3E4C ## $a1 = 3E4C0000 -/* 00150 80B86280 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3E4CCCCD -/* 00154 80B86284 0C00B58B */ jal Actor_SetScale - -/* 00158 80B86288 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0015C 80B8628C 10000005 */ beq $zero, $zero, .L80B862A4 -/* 00160 80B86290 00000000 */ nop -.L80B86294: -/* 00164 80B86294 0C00B55C */ jal Actor_Kill - -/* 00168 80B86298 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0016C 80B8629C 1000000C */ beq $zero, $zero, .L80B862D0 -/* 00170 80B862A0 8FBF0034 */ lw $ra, 0x0034($sp) -.L80B862A4: -/* 00174 80B862A4 3C0480B8 */ lui $a0, %hi(D_80B86810) ## $a0 = 80B80000 -/* 00178 80B862A8 24846810 */ addiu $a0, $a0, %lo(D_80B86810) ## $a0 = 80B86810 -/* 0017C 80B862AC 0C000B84 */ jal LogUtils_LogThreadId - -/* 00180 80B862B0 240500D2 */ addiu $a1, $zero, 0x00D2 ## $a1 = 000000D2 -/* 00184 80B862B4 3C0480B8 */ lui $a0, %hi(D_80B86824) ## $a0 = 80B80000 -/* 00188 80B862B8 24846824 */ addiu $a0, $a0, %lo(D_80B86824) ## $a0 = 80B86824 -/* 0018C 80B862BC 0C00084C */ jal osSyncPrintf - -/* 00190 80B862C0 8FA50038 */ lw $a1, 0x0038($sp) -/* 00194 80B862C4 240C0400 */ addiu $t4, $zero, 0x0400 ## $t4 = 00000400 -/* 00198 80B862C8 A60C0150 */ sh $t4, 0x0150($s0) ## 00000150 -/* 0019C 80B862CC 8FBF0034 */ lw $ra, 0x0034($sp) -.L80B862D0: -/* 001A0 80B862D0 8FB00030 */ lw $s0, 0x0030($sp) -/* 001A4 80B862D4 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 001A8 80B862D8 03E00008 */ jr $ra -/* 001AC 80B862DC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Update.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Update.s deleted file mode 100644 index 6ded2c2901..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel ItemOcarina_Update -/* 00658 80B86788 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0065C 80B8678C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00660 80B86790 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C -/* 00664 80B86794 0320F809 */ jalr $ra, $t9 -/* 00668 80B86798 00000000 */ nop -/* 0066C 80B8679C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00670 80B867A0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00674 80B867A4 03E00008 */ jr $ra -/* 00678 80B867A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86130.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86130.s deleted file mode 100644 index 0e246779b1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86130.s +++ /dev/null @@ -1,3 +0,0 @@ -glabel func_80B86130 -/* 00000 80B86130 03E00008 */ jr $ra -/* 00004 80B86134 AC85014C */ sw $a1, 0x014C($a0) ## 0000014C diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B862EC.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B862EC.s deleted file mode 100644 index 0062f1a026..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B862EC.s +++ /dev/null @@ -1,122 +0,0 @@ -.late_rodata -glabel D_80B86830 - .word 0x44866000 -glabel D_80B86834 - .word 0xBDCCCCCD -glabel D_80B86838 - .word 0x4462C000 - -.text -glabel func_80B862EC -/* 001BC 80B862EC 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 001C0 80B862F0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 001C4 80B862F4 AFB10020 */ sw $s1, 0x0020($sp) -/* 001C8 80B862F8 AFB0001C */ sw $s0, 0x001C($sp) -/* 001CC 80B862FC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 001D0 80B86300 0C00B5FB */ jal func_8002D7EC -/* 001D4 80B86304 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 001D8 80B86308 86020150 */ lh $v0, 0x0150($s0) ## 00000150 -/* 001DC 80B8630C C6000070 */ lwc1 $f0, 0x0070($s0) ## 00000070 -/* 001E0 80B86310 C6020060 */ lwc1 $f2, 0x0060($s0) ## 00000060 -/* 001E4 80B86314 860E00B4 */ lh $t6, 0x00B4($s0) ## 000000B4 -/* 001E8 80B86318 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6 -/* 001EC 80B8631C 4602003C */ c.lt.s $f0, $f2 -/* 001F0 80B86320 00024080 */ sll $t0, $v0, 2 -/* 001F4 80B86324 00027840 */ sll $t7, $v0, 1 -/* 001F8 80B86328 01024023 */ subu $t0, $t0, $v0 -/* 001FC 80B8632C 01CFC021 */ addu $t8, $t6, $t7 -/* 00200 80B86330 03284821 */ addu $t1, $t9, $t0 -/* 00204 80B86334 A61800B4 */ sh $t8, 0x00B4($s0) ## 000000B4 -/* 00208 80B86338 4500000A */ bc1f .L80B86364 -/* 0020C 80B8633C A60900B6 */ sh $t1, 0x00B6($s0) ## 000000B6 -/* 00210 80B86340 C604006C */ lwc1 $f4, 0x006C($s0) ## 0000006C -/* 00214 80B86344 46041180 */ add.s $f6, $f2, $f4 -/* 00218 80B86348 E6060060 */ swc1 $f6, 0x0060($s0) ## 00000060 -/* 0021C 80B8634C C6080060 */ lwc1 $f8, 0x0060($s0) ## 00000060 -/* 00220 80B86350 4600403C */ c.lt.s $f8, $f0 -/* 00224 80B86354 00000000 */ nop -/* 00228 80B86358 45020003 */ bc1fl .L80B86368 -/* 0022C 80B8635C 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74 -/* 00230 80B86360 E6000060 */ swc1 $f0, 0x0060($s0) ## 00000060 -.L80B86364: -/* 00234 80B86364 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74 -.L80B86368: -/* 00238 80B86368 24010371 */ addiu $at, $zero, 0x0371 ## $at = 00000371 -/* 0023C 80B8636C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00240 80B86370 14410014 */ bne $v0, $at, .L80B863C4 -/* 00244 80B86374 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00248 80B86378 3C01437A */ lui $at, 0x437A ## $at = 437A0000 -/* 0024C 80B8637C 44815000 */ mtc1 $at, $f10 ## $f10 = 250.00 -/* 00250 80B86380 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00254 80B86384 44818000 */ mtc1 $at, $f16 ## $f16 = 60.00 -/* 00258 80B86388 3C0180B8 */ lui $at, %hi(D_80B86830) ## $at = 80B80000 -/* 0025C 80B8638C E60A0024 */ swc1 $f10, 0x0024($s0) ## 00000024 -/* 00260 80B86390 E6100028 */ swc1 $f16, 0x0028($s0) ## 00000028 -/* 00264 80B86394 C4326830 */ lwc1 $f18, %lo(D_80B86830)($at) -/* 00268 80B86398 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 0026C 80B8639C 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00 -/* 00270 80B863A0 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000 -/* 00274 80B863A4 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00 -/* 00278 80B863A8 3C01C0E0 */ lui $at, 0xC0E0 ## $at = C0E00000 -/* 0027C 80B863AC 44814000 */ mtc1 $at, $f8 ## $f8 = -7.00 -/* 00280 80B863B0 E612002C */ swc1 $f18, 0x002C($s0) ## 0000002C -/* 00284 80B863B4 E604005C */ swc1 $f4, 0x005C($s0) ## 0000005C -/* 00288 80B863B8 E6060060 */ swc1 $f6, 0x0060($s0) ## 00000060 -/* 0028C 80B863BC E6080064 */ swc1 $f8, 0x0064($s0) ## 00000064 -/* 00290 80B863C0 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74 -.L80B863C4: -/* 00294 80B863C4 24010381 */ addiu $at, $zero, 0x0381 ## $at = 00000381 -/* 00298 80B863C8 1441001C */ bne $v0, $at, .L80B8643C -/* 0029C 80B863CC 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064 -/* 002A0 80B863D0 240701F4 */ addiu $a3, $zero, 0x01F4 ## $a3 = 000001F4 -/* 002A4 80B863D4 AFA00010 */ sw $zero, 0x0010($sp) -/* 002A8 80B863D8 0C00A511 */ jal func_80029444 -/* 002AC 80B863DC AFA50030 */ sw $a1, 0x0030($sp) -/* 002B0 80B863E0 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 002B4 80B863E4 8FA50030 */ lw $a1, 0x0030($sp) -/* 002B8 80B863E8 AFAA0010 */ sw $t2, 0x0010($sp) -/* 002BC 80B863EC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 002C0 80B863F0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 002C4 80B863F4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 002C8 80B863F8 0C00A527 */ jal func_8002949C -/* 002CC 80B863FC AFA00014 */ sw $zero, 0x0014($sp) -/* 002D0 80B86400 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 002D4 80B86404 3C0180B8 */ lui $at, %hi(D_80B86834) ## $at = 80B80000 -/* 002D8 80B86408 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002DC 80B8640C E600005C */ swc1 $f0, 0x005C($s0) ## 0000005C -/* 002E0 80B86410 E6000060 */ swc1 $f0, 0x0060($s0) ## 00000060 -/* 002E4 80B86414 E6000064 */ swc1 $f0, 0x0064($s0) ## 00000064 -/* 002E8 80B86418 C42A6834 */ lwc1 $f10, %lo(D_80B86834)($at) -/* 002EC 80B8641C 3C01BF00 */ lui $at, 0xBF00 ## $at = BF000000 -/* 002F0 80B86420 44818000 */ mtc1 $at, $f16 ## $f16 = -0.50 -/* 002F4 80B86424 A6000150 */ sh $zero, 0x0150($s0) ## 00000150 -/* 002F8 80B86428 24052817 */ addiu $a1, $zero, 0x2817 ## $a1 = 00002817 -/* 002FC 80B8642C E60A006C */ swc1 $f10, 0x006C($s0) ## 0000006C -/* 00300 80B86430 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00304 80B86434 E6100070 */ swc1 $f16, 0x0070($s0) ## 00000070 -/* 00308 80B86438 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74 -.L80B8643C: -/* 0030C 80B8643C 2401038A */ addiu $at, $zero, 0x038A ## $at = 0000038A -/* 00310 80B86440 1441000F */ bne $v0, $at, .L80B86480 -/* 00314 80B86444 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00318 80B86448 3C014389 */ lui $at, 0x4389 ## $at = 43890000 -/* 0031C 80B8644C 44819000 */ mtc1 $at, $f18 ## $f18 = 274.00 -/* 00320 80B86450 3C01C270 */ lui $at, 0xC270 ## $at = C2700000 -/* 00324 80B86454 44812000 */ mtc1 $at, $f4 ## $f4 = -60.00 -/* 00328 80B86458 3C0180B8 */ lui $at, %hi(D_80B86838) ## $at = 80B80000 -/* 0032C 80B8645C C4266838 */ lwc1 $f6, %lo(D_80B86838)($at) -/* 00330 80B86460 27A50034 */ addiu $a1, $sp, 0x0034 ## $a1 = FFFFFFF4 -/* 00334 80B86464 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064 -/* 00338 80B86468 240701F4 */ addiu $a3, $zero, 0x01F4 ## $a3 = 000001F4 -/* 0033C 80B8646C AFA00010 */ sw $zero, 0x0010($sp) -/* 00340 80B86470 E7B20034 */ swc1 $f18, 0x0034($sp) -/* 00344 80B86474 E7A40038 */ swc1 $f4, 0x0038($sp) -/* 00348 80B86478 0C00A511 */ jal func_80029444 -/* 0034C 80B8647C E7A6003C */ swc1 $f6, 0x003C($sp) -.L80B86480: -/* 00350 80B86480 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00354 80B86484 8FB0001C */ lw $s0, 0x001C($sp) -/* 00358 80B86488 8FB10020 */ lw $s1, 0x0020($sp) -/* 0035C 80B8648C 03E00008 */ jr $ra -/* 00360 80B86490 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86494.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86494.s deleted file mode 100644 index 869c16312d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86494.s +++ /dev/null @@ -1,28 +0,0 @@ -.late_rodata -glabel D_80B8683C - .word 0xBE99999A - -.text -glabel func_80B86494 -/* 00364 80B86494 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00368 80B86498 3C0180B8 */ lui $at, %hi(D_80B8683C) ## $at = 80B80000 -/* 0036C 80B8649C C424683C */ lwc1 $f4, %lo(D_80B8683C)($at) -/* 00370 80B864A0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00374 80B864A4 AFA5001C */ sw $a1, 0x001C($sp) -/* 00378 80B864A8 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000 -/* 0037C 80B864AC 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00 -/* 00380 80B864B0 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00384 80B864B4 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 00388 80B864B8 44814000 */ mtc1 $at, $f8 ## $f8 = 6.00 -/* 0038C 80B864BC 3C0580B8 */ lui $a1, %hi(func_80B862EC) ## $a1 = 80B80000 -/* 00390 80B864C0 24A562EC */ addiu $a1, $a1, %lo(func_80B862EC) ## $a1 = 80B862EC -/* 00394 80B864C4 E484006C */ swc1 $f4, 0x006C($a0) ## 0000006C -/* 00398 80B864C8 E4860070 */ swc1 $f6, 0x0070($a0) ## 00000070 -/* 0039C 80B864CC E480005C */ swc1 $f0, 0x005C($a0) ## 0000005C -/* 003A0 80B864D0 E4800064 */ swc1 $f0, 0x0064($a0) ## 00000064 -/* 003A4 80B864D4 0C2E184C */ jal func_80B86130 -/* 003A8 80B864D8 E4880060 */ swc1 $f8, 0x0060($a0) ## 00000060 -/* 003AC 80B864DC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003B0 80B864E0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 003B4 80B864E4 03E00008 */ jr $ra -/* 003B8 80B864E8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B864EC.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B864EC.s deleted file mode 100644 index 1550dbb731..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B864EC.s +++ /dev/null @@ -1,72 +0,0 @@ -.late_rodata -glabel D_80B86840 - .word 0x44D2C000 -glabel D_80B86844 - .word 0xBE19999A - -.text -glabel func_80B864EC -/* 003BC 80B864EC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 003C0 80B864F0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 003C4 80B864F4 AFA5001C */ sw $a1, 0x001C($sp) -/* 003C8 80B864F8 0C00B5FB */ jal func_8002D7EC -/* 003CC 80B864FC AFA40018 */ sw $a0, 0x0018($sp) -/* 003D0 80B86500 8FA40018 */ lw $a0, 0x0018($sp) -/* 003D4 80B86504 84820150 */ lh $v0, 0x0150($a0) ## 00000150 -/* 003D8 80B86508 C4800070 */ lwc1 $f0, 0x0070($a0) ## 00000070 -/* 003DC 80B8650C C4820060 */ lwc1 $f2, 0x0060($a0) ## 00000060 -/* 003E0 80B86510 848E00B4 */ lh $t6, 0x00B4($a0) ## 000000B4 -/* 003E4 80B86514 849900B6 */ lh $t9, 0x00B6($a0) ## 000000B6 -/* 003E8 80B86518 4602003C */ c.lt.s $f0, $f2 -/* 003EC 80B8651C 00024080 */ sll $t0, $v0, 2 -/* 003F0 80B86520 00027840 */ sll $t7, $v0, 1 -/* 003F4 80B86524 01024023 */ subu $t0, $t0, $v0 -/* 003F8 80B86528 01CFC021 */ addu $t8, $t6, $t7 -/* 003FC 80B8652C 03284821 */ addu $t1, $t9, $t0 -/* 00400 80B86530 A49800B4 */ sh $t8, 0x00B4($a0) ## 000000B4 -/* 00404 80B86534 4500000A */ bc1f .L80B86560 -/* 00408 80B86538 A48900B6 */ sh $t1, 0x00B6($a0) ## 000000B6 -/* 0040C 80B8653C C484006C */ lwc1 $f4, 0x006C($a0) ## 0000006C -/* 00410 80B86540 46041180 */ add.s $f6, $f2, $f4 -/* 00414 80B86544 E4860060 */ swc1 $f6, 0x0060($a0) ## 00000060 -/* 00418 80B86548 C4880060 */ lwc1 $f8, 0x0060($a0) ## 00000060 -/* 0041C 80B8654C 4600403C */ c.lt.s $f8, $f0 -/* 00420 80B86550 00000000 */ nop -/* 00424 80B86554 45020003 */ bc1fl .L80B86564 -/* 00428 80B86558 8FAA001C */ lw $t2, 0x001C($sp) -/* 0042C 80B8655C E4800060 */ swc1 $f0, 0x0060($a0) ## 00000060 -.L80B86560: -/* 00430 80B86560 8FAA001C */ lw $t2, 0x001C($sp) -.L80B86564: -/* 00434 80B86564 240100DC */ addiu $at, $zero, 0x00DC ## $at = 000000DC -/* 00438 80B86568 954B1D74 */ lhu $t3, 0x1D74($t2) ## 00001D74 -/* 0043C 80B8656C 15610018 */ bne $t3, $at, .L80B865D0 -/* 00440 80B86570 3C014310 */ lui $at, 0x4310 ## $at = 43100000 -/* 00444 80B86574 44815000 */ mtc1 $at, $f10 ## $f10 = 144.00 -/* 00448 80B86578 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000 -/* 0044C 80B8657C 44818000 */ mtc1 $at, $f16 ## $f16 = 80.00 -/* 00450 80B86580 3C0180B8 */ lui $at, %hi(D_80B86840) ## $at = 80B80000 -/* 00454 80B86584 E48A0024 */ swc1 $f10, 0x0024($a0) ## 00000024 -/* 00458 80B86588 E4900028 */ swc1 $f16, 0x0028($a0) ## 00000028 -/* 0045C 80B8658C C4326840 */ lwc1 $f18, %lo(D_80B86840)($at) -/* 00460 80B86590 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 00464 80B86594 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00 -/* 00468 80B86598 3C014000 */ lui $at, 0x4000 ## $at = 40000000 -/* 0046C 80B8659C 44813000 */ mtc1 $at, $f6 ## $f6 = 2.00 -/* 00470 80B865A0 3C01C0E0 */ lui $at, 0xC0E0 ## $at = C0E00000 -/* 00474 80B865A4 44814000 */ mtc1 $at, $f8 ## $f8 = -7.00 -/* 00478 80B865A8 3C0180B8 */ lui $at, %hi(D_80B86844) ## $at = 80B80000 -/* 0047C 80B865AC E492002C */ swc1 $f18, 0x002C($a0) ## 0000002C -/* 00480 80B865B0 E484005C */ swc1 $f4, 0x005C($a0) ## 0000005C -/* 00484 80B865B4 E4860060 */ swc1 $f6, 0x0060($a0) ## 00000060 -/* 00488 80B865B8 E4880064 */ swc1 $f8, 0x0064($a0) ## 00000064 -/* 0048C 80B865BC C42A6844 */ lwc1 $f10, %lo(D_80B86844)($at) -/* 00490 80B865C0 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000 -/* 00494 80B865C4 44818000 */ mtc1 $at, $f16 ## $f16 = -5.00 -/* 00498 80B865C8 E48A006C */ swc1 $f10, 0x006C($a0) ## 0000006C -/* 0049C 80B865CC E4900070 */ swc1 $f16, 0x0070($a0) ## 00000070 -.L80B865D0: -/* 004A0 80B865D0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 004A4 80B865D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 004A8 80B865D8 03E00008 */ jr $ra -/* 004AC 80B865DC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B865E0.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B865E0.s deleted file mode 100644 index 28bbc6d140..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B865E0.s +++ /dev/null @@ -1,30 +0,0 @@ -.late_rodata -glabel D_80B86848 - .word 0xBE99999A - -.text -glabel func_80B865E0 -/* 004B0 80B865E0 3C0180B8 */ lui $at, %hi(D_80B86848) ## $at = 80B80000 -/* 004B4 80B865E4 C4246848 */ lwc1 $f4, %lo(D_80B86848)($at) -/* 004B8 80B865E8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 004BC 80B865EC 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000 -/* 004C0 80B865F0 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00 -/* 004C4 80B865F4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 004C8 80B865F8 AFA5001C */ sw $a1, 0x001C($sp) -/* 004CC 80B865FC 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 004D0 80B86600 44815000 */ mtc1 $at, $f10 ## $f10 = 4.00 -/* 004D4 80B86604 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 004D8 80B86608 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 -/* 004DC 80B8660C 44818000 */ mtc1 $at, $f16 ## $f16 = 6.00 -/* 004E0 80B86610 3C0580B8 */ lui $a1, %hi(func_80B864EC) ## $a1 = 80B80000 -/* 004E4 80B86614 24A564EC */ addiu $a1, $a1, %lo(func_80B864EC) ## $a1 = 80B864EC -/* 004E8 80B86618 E484006C */ swc1 $f4, 0x006C($a0) ## 0000006C -/* 004EC 80B8661C E4860070 */ swc1 $f6, 0x0070($a0) ## 00000070 -/* 004F0 80B86620 E48A0060 */ swc1 $f10, 0x0060($a0) ## 00000060 -/* 004F4 80B86624 E488005C */ swc1 $f8, 0x005C($a0) ## 0000005C -/* 004F8 80B86628 0C2E184C */ jal func_80B86130 -/* 004FC 80B8662C E4900064 */ swc1 $f16, 0x0064($a0) ## 00000064 -/* 00500 80B86630 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00504 80B86634 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00508 80B86638 03E00008 */ jr $ra -/* 0050C 80B8663C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86640.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86640.s deleted file mode 100644 index 5e8071c615..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86640.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel func_80B86640 -/* 00510 80B86640 AFA40000 */ sw $a0, 0x0000($sp) -/* 00514 80B86644 03E00008 */ jr $ra -/* 00518 80B86648 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B8664C.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B8664C.s deleted file mode 100644 index 992b982a02..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B8664C.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel func_80B8664C -/* 0051C 80B8664C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00520 80B86650 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00524 80B86654 0C00BCCD */ jal func_8002F334 -/* 00528 80B86658 AFA5001C */ sw $a1, 0x001C($sp) -/* 0052C 80B8665C 10400013 */ beq $v0, $zero, .L80B866AC -/* 00530 80B86660 3C198016 */ lui $t9, %hi(gSegments) -/* 00534 80B86664 3C020201 */ lui $v0, 0x0201 ## $v0 = 02010000 -/* 00538 80B86668 2442F870 */ addiu $v0, $v0, 0xF870 ## $v0 = 0200F870 -/* 0053C 80B8666C 00027100 */ sll $t6, $v0, 4 -/* 00540 80B86670 000E7F02 */ srl $t7, $t6, 28 -/* 00544 80B86674 000FC080 */ sll $t8, $t7, 2 -/* 00548 80B86678 0338C821 */ addu $t9, $t9, $t8 -/* 0054C 80B8667C 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 00550 80B86680 8F396FA8 */ lw $t9, %lo(gSegments)($t9) -/* 00554 80B86684 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 00558 80B86688 00414024 */ and $t0, $v0, $at -/* 0055C 80B8668C 8FAB001C */ lw $t3, 0x001C($sp) -/* 00560 80B86690 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 00564 80B86694 03284821 */ addu $t1, $t9, $t0 -/* 00568 80B86698 01215021 */ addu $t2, $t1, $at -/* 0056C 80B8669C 3C018016 */ lui $at, %hi(gSaveContext+0x1414) -/* 00570 80B866A0 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001 -/* 00574 80B866A4 AD6A1D68 */ sw $t2, 0x1D68($t3) ## 00001D68 -/* 00578 80B866A8 A02CFA74 */ sb $t4, %lo(gSaveContext+0x1414)($at) -.L80B866AC: -/* 0057C 80B866AC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00580 80B866B0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00584 80B866B4 03E00008 */ jr $ra -/* 00588 80B866B8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B866BC.s b/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B866BC.s deleted file mode 100644 index ccd1a7fc54..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B866BC.s +++ /dev/null @@ -1,60 +0,0 @@ -.late_rodata -glabel D_80B8684C - .word 0x3E051EB8 - -.text -glabel func_80B866BC -/* 0058C 80B866BC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00590 80B866C0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00594 80B866C4 AFB10020 */ sw $s1, 0x0020($sp) -/* 00598 80B866C8 AFB0001C */ sw $s0, 0x001C($sp) -/* 0059C 80B866CC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 005A0 80B866D0 0C00BD04 */ jal func_8002F410 -/* 005A4 80B866D4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 005A8 80B866D8 1040000E */ beq $v0, $zero, .L80B86714 -/* 005AC 80B866DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005B0 80B866E0 3C028016 */ lui $v0, %hi(gSaveContext) -/* 005B4 80B866E4 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 005B8 80B866E8 944E0EDC */ lhu $t6, 0x0EDC($v0) ## 8015F53C -/* 005BC 80B866EC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 005C0 80B866F0 24050003 */ addiu $a1, $zero, 0x0003 ## $a1 = 00000003 -/* 005C4 80B866F4 35CF0008 */ ori $t7, $t6, 0x0008 ## $t7 = 00000008 -/* 005C8 80B866F8 0C00B2DD */ jal Flags_SetSwitch - -/* 005CC 80B866FC A44F0EDC */ sh $t7, 0x0EDC($v0) ## 8015F53C -/* 005D0 80B86700 3C1880B8 */ lui $t8, %hi(func_80B8664C) ## $t8 = 80B80000 -/* 005D4 80B86704 2718664C */ addiu $t8, $t8, %lo(func_80B8664C) ## $t8 = 80B8664C -/* 005D8 80B86708 AE18014C */ sw $t8, 0x014C($s0) ## 0000014C -/* 005DC 80B8670C 10000019 */ beq $zero, $zero, .L80B86774 -/* 005E0 80B86710 AE000134 */ sw $zero, 0x0134($s0) ## 00000134 -.L80B86714: -/* 005E4 80B86714 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 005E8 80B86718 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00 -/* 005EC 80B8671C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 005F0 80B86720 2406000C */ addiu $a2, $zero, 0x000C ## $a2 = 0000000C -/* 005F4 80B86724 3C0741F0 */ lui $a3, 0x41F0 ## $a3 = 41F00000 -/* 005F8 80B86728 0C00BD0D */ jal func_8002F434 -/* 005FC 80B8672C E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00600 80B86730 3C190001 */ lui $t9, 0x0001 ## $t9 = 00010000 -/* 00604 80B86734 0331C821 */ addu $t9, $t9, $s1 -/* 00608 80B86738 8F391DE4 */ lw $t9, 0x1DE4($t9) ## 00011DE4 -/* 0060C 80B8673C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00610 80B86740 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00614 80B86744 3328000D */ andi $t0, $t9, 0x000D ## $t0 = 00000000 -/* 00618 80B86748 1500000A */ bne $t0, $zero, .L80B86774 -/* 0061C 80B8674C 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00620 80B86750 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00624 80B86754 44813000 */ mtc1 $at, $f6 ## $f6 = 10.00 -/* 00628 80B86758 3C0180B8 */ lui $at, %hi(D_80B8684C) ## $at = 80B80000 -/* 0062C 80B8675C C428684C */ lwc1 $f8, %lo(D_80B8684C)($at) -/* 00630 80B86760 44060000 */ mfc1 $a2, $f0 -/* 00634 80B86764 44070000 */ mfc1 $a3, $f0 -/* 00638 80B86768 E7A60010 */ swc1 $f6, 0x0010($sp) -/* 0063C 80B8676C 0C00A4F9 */ jal func_800293E4 -/* 00640 80B86770 E7A80014 */ swc1 $f8, 0x0014($sp) -.L80B86774: -/* 00644 80B86774 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00648 80B86778 8FB0001C */ lw $s0, 0x001C($sp) -/* 0064C 80B8677C 8FB10020 */ lw $s1, 0x0020($sp) -/* 00650 80B86780 03E00008 */ jr $ra -/* 00654 80B86784 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86AC8.s b/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86AC8.s index 1e9f0b0c63..a18359428d 100644 --- a/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86AC8.s +++ b/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86AC8.s @@ -7,7 +7,7 @@ glabel func_80B86AC8 /* 001BC 80B86ADC AFA5002C */ sw $a1, 0x002C($sp) /* 001C0 80B86AE0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001C4 80B86AE4 0C00BD04 */ jal func_8002F410 +/* 001C4 80B86AE4 0C00BD04 */ jal Actor_HasParent /* 001C8 80B86AE8 8FA5002C */ lw $a1, 0x002C($sp) /* 001CC 80B86AEC 10400005 */ beq $v0, $zero, .L80B86B04 /* 001D0 80B86AF0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86BC8.s b/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86BC8.s index 8c218dbe96..c1f30774df 100644 --- a/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86BC8.s +++ b/asm/non_matchings/overlays/actors/ovl_Item_Shield/func_80B86BC8.s @@ -8,7 +8,7 @@ glabel func_80B86BC8 /* 002AC 80B86BCC AFBF0024 */ sw $ra, 0x0024($sp) /* 002B0 80B86BD0 AFB00020 */ sw $s0, 0x0020($sp) /* 002B4 80B86BD4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 002B8 80B86BD8 0C00BD04 */ jal func_8002F410 +/* 002B8 80B86BD8 0C00BD04 */ jal Actor_HasParent /* 002BC 80B86BDC AFA50034 */ sw $a1, 0x0034($sp) /* 002C0 80B86BE0 10400005 */ beq $v0, $zero, .L80B86BF8 /* 002C4 80B86BE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Destroy.s deleted file mode 100644 index 834b6e216f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel ObjHsblock_Destroy -/* 00200 80B93D60 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00204 80B93D64 AFA40018 */ sw $a0, 0x0018($sp) -/* 00208 80B93D68 8FAE0018 */ lw $t6, 0x0018($sp) -/* 0020C 80B93D6C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00210 80B93D70 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00214 80B93D74 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00218 80B93D78 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 0021C 80B93D7C 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 00220 80B93D80 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00224 80B93D84 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00228 80B93D88 03E00008 */ jr $ra -/* 0022C 80B93D8C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Draw.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Draw.s deleted file mode 100644 index 4638751461..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Draw.s +++ /dev/null @@ -1,101 +0,0 @@ -.rdata -glabel D_80B94154 - .asciz "../z_obj_hsblock.c" - .balign 4 - -glabel D_80B94168 - .asciz "../z_obj_hsblock.c" - .balign 4 - -glabel D_80B9417C - .asciz "../z_obj_hsblock.c" - .balign 4 - -.text -glabel ObjHsblock_Draw -/* 003F0 80B93F50 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 003F4 80B93F54 AFB10018 */ sw $s1, 0x0018($sp) -/* 003F8 80B93F58 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 003FC 80B93F5C AFBF001C */ sw $ra, 0x001C($sp) -/* 00400 80B93F60 AFB00014 */ sw $s0, 0x0014($sp) -/* 00404 80B93F64 AFA40050 */ sw $a0, 0x0050($sp) -/* 00408 80B93F68 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 0040C 80B93F6C 3C0680B9 */ lui $a2, %hi(D_80B94154) ## $a2 = 80B90000 -/* 00410 80B93F70 24C64154 */ addiu $a2, $a2, %lo(D_80B94154) ## $a2 = 80B94154 -/* 00414 80B93F74 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4 -/* 00418 80B93F78 2407016D */ addiu $a3, $zero, 0x016D ## $a3 = 0000016D -/* 0041C 80B93F7C 0C031AB1 */ jal Graph_OpenDisps -/* 00420 80B93F80 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00424 80B93F84 0C024F46 */ jal func_80093D18 -/* 00428 80B93F88 8E240000 */ lw $a0, 0x0000($s1) ## 00000000 -/* 0042C 80B93F8C 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00430 80B93F90 3C0FDA38 */ lui $t7, 0xDA38 ## $t7 = DA380000 -/* 00434 80B93F94 35EF0003 */ ori $t7, $t7, 0x0003 ## $t7 = DA380003 -/* 00438 80B93F98 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008 -/* 0043C 80B93F9C AE0E02C0 */ sw $t6, 0x02C0($s0) ## 000002C0 -/* 00440 80B93FA0 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00444 80B93FA4 8E240000 */ lw $a0, 0x0000($s1) ## 00000000 -/* 00448 80B93FA8 3C0580B9 */ lui $a1, %hi(D_80B94168) ## $a1 = 80B90000 -/* 0044C 80B93FAC 24A54168 */ addiu $a1, $a1, %lo(D_80B94168) ## $a1 = 80B94168 -/* 00450 80B93FB0 24060171 */ addiu $a2, $zero, 0x0171 ## $a2 = 00000171 -/* 00454 80B93FB4 0C0346A2 */ jal Matrix_NewMtx -/* 00458 80B93FB8 AFA20030 */ sw $v0, 0x0030($sp) -/* 0045C 80B93FBC 8FA30030 */ lw $v1, 0x0030($sp) -/* 00460 80B93FC0 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00464 80B93FC4 3C0480B9 */ lui $a0, %hi(D_80B940E8) ## $a0 = 80B90000 -/* 00468 80B93FC8 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 0046C 80B93FCC 863800A4 */ lh $t8, 0x00A4($s1) ## 000000A4 -/* 00470 80B93FD0 3C028016 */ lui $v0, %hi(gGameInfo) -/* 00474 80B93FD4 17010003 */ bne $t8, $at, .L80B93FE4 -/* 00478 80B93FD8 00000000 */ nop -/* 0047C 80B93FDC 10000009 */ beq $zero, $zero, .L80B94004 -/* 00480 80B93FE0 248440E8 */ addiu $a0, $a0, %lo(D_80B940E8) ## $a0 = 80B940E8 -.L80B93FE4: -/* 00484 80B93FE4 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0) -/* 00488 80B93FE8 27A40048 */ addiu $a0, $sp, 0x0048 ## $a0 = FFFFFFF8 -/* 0048C 80B93FEC 8459116E */ lh $t9, 0x116E($v0) ## 8016116E -/* 00490 80B93FF0 A3B90048 */ sb $t9, 0x0048($sp) -/* 00494 80B93FF4 84481170 */ lh $t0, 0x1170($v0) ## 80161170 -/* 00498 80B93FF8 A3A80049 */ sb $t0, 0x0049($sp) -/* 0049C 80B93FFC 84491172 */ lh $t1, 0x1172($v0) ## 80161172 -/* 004A0 80B94000 A3A9004A */ sb $t1, 0x004A($sp) -.L80B94004: -/* 004A4 80B94004 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 004A8 80B94008 3C0BFB00 */ lui $t3, 0xFB00 ## $t3 = FB000000 -/* 004AC 80B9400C 3C0680B9 */ lui $a2, %hi(D_80B9417C) ## $a2 = 80B90000 -/* 004B0 80B94010 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 80160008 -/* 004B4 80B94014 AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0 -/* 004B8 80B94018 AC4B0000 */ sw $t3, 0x0000($v0) ## 80160000 -/* 004BC 80B9401C 90980001 */ lbu $t8, 0x0001($a0) ## FFFFFFF9 -/* 004C0 80B94020 908D0000 */ lbu $t5, 0x0000($a0) ## FFFFFFF8 -/* 004C4 80B94024 908A0002 */ lbu $t2, 0x0002($a0) ## FFFFFFFA -/* 004C8 80B94028 0018CC00 */ sll $t9, $t8, 16 -/* 004CC 80B9402C 000D7600 */ sll $t6, $t5, 24 -/* 004D0 80B94030 01D94025 */ or $t0, $t6, $t9 ## $t0 = 00000000 -/* 004D4 80B94034 000A5A00 */ sll $t3, $t2, 8 -/* 004D8 80B94038 010B6025 */ or $t4, $t0, $t3 ## $t4 = FB000000 -/* 004DC 80B9403C 358D00FF */ ori $t5, $t4, 0x00FF ## $t5 = FB0000FF -/* 004E0 80B94040 AC4D0004 */ sw $t5, 0x0004($v0) ## 80160004 -/* 004E4 80B94044 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 004E8 80B94048 3C18DE00 */ lui $t8, 0xDE00 ## $t8 = DE000000 -/* 004EC 80B9404C 3C0880B9 */ lui $t0, %hi(D_80B940EC) ## $t0 = 80B90000 -/* 004F0 80B94050 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 80160008 -/* 004F4 80B94054 AE0F02C0 */ sw $t7, 0x02C0($s0) ## 000002C0 -/* 004F8 80B94058 AC580000 */ sw $t8, 0x0000($v0) ## 80160000 -/* 004FC 80B9405C 8FAE0050 */ lw $t6, 0x0050($sp) -/* 00500 80B94060 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4 -/* 00504 80B94064 24C6417C */ addiu $a2, $a2, %lo(D_80B9417C) ## $a2 = 80B9417C -/* 00508 80B94068 85D9001C */ lh $t9, 0x001C($t6) ## 0000001C -/* 0050C 80B9406C 2407018F */ addiu $a3, $zero, 0x018F ## $a3 = 0000018F -/* 00510 80B94070 33290003 */ andi $t1, $t9, 0x0003 ## $t1 = 00000000 -/* 00514 80B94074 00095080 */ sll $t2, $t1, 2 -/* 00518 80B94078 010A4021 */ addu $t0, $t0, $t2 -/* 0051C 80B9407C 8D0840EC */ lw $t0, %lo(D_80B940EC)($t0) -/* 00520 80B94080 AC480004 */ sw $t0, 0x0004($v0) ## 80160004 -/* 00524 80B94084 0C031AD5 */ jal Graph_CloseDisps -/* 00528 80B94088 8E250000 */ lw $a1, 0x0000($s1) ## 00000000 -/* 0052C 80B9408C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00530 80B94090 8FB00014 */ lw $s0, 0x0014($sp) -/* 00534 80B94094 8FB10018 */ lw $s1, 0x0018($sp) -/* 00538 80B94098 03E00008 */ jr $ra -/* 0053C 80B9409C 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Init.s deleted file mode 100644 index 60b388ee56..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Init.s +++ /dev/null @@ -1,66 +0,0 @@ -glabel ObjHsblock_Init -/* 00114 80B93C74 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00118 80B93C78 AFB00018 */ sw $s0, 0x0018($sp) -/* 0011C 80B93C7C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00120 80B93C80 AFBF001C */ sw $ra, 0x001C($sp) -/* 00124 80B93C84 AFA50024 */ sw $a1, 0x0024($sp) -/* 00128 80B93C88 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 0012C 80B93C8C 3C0680B9 */ lui $a2, %hi(D_80B940DC) ## $a2 = 80B90000 -/* 00130 80B93C90 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00134 80B93C94 31CF0003 */ andi $t7, $t6, 0x0003 ## $t7 = 00000000 -/* 00138 80B93C98 000FC080 */ sll $t8, $t7, 2 -/* 0013C 80B93C9C 00D83021 */ addu $a2, $a2, $t8 -/* 00140 80B93CA0 0C2E4EDA */ jal func_80B93B68 -/* 00144 80B93CA4 8CC640DC */ lw $a2, %lo(D_80B940DC)($a2) -/* 00148 80B93CA8 3C0580B9 */ lui $a1, %hi(D_80B940CC) ## $a1 = 80B90000 -/* 0014C 80B93CAC 24A540CC */ addiu $a1, $a1, %lo(D_80B940CC) ## $a1 = 80B940CC -/* 00150 80B93CB0 0C01E037 */ jal Actor_ProcessInitChain - -/* 00154 80B93CB4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00158 80B93CB8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0015C 80B93CBC 0C2E4EFC */ jal func_80B93BF0 -/* 00160 80B93CC0 8FA50024 */ lw $a1, 0x0024($sp) -/* 00164 80B93CC4 8603001C */ lh $v1, 0x001C($s0) ## 0000001C -/* 00168 80B93CC8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0016C 80B93CCC 30620003 */ andi $v0, $v1, 0x0003 ## $v0 = 00000000 -/* 00170 80B93CD0 10400006 */ beq $v0, $zero, .L80B93CEC -/* 00174 80B93CD4 00000000 */ nop -/* 00178 80B93CD8 10410008 */ beq $v0, $at, .L80B93CFC -/* 0017C 80B93CDC 8FA40024 */ lw $a0, 0x0024($sp) -/* 00180 80B93CE0 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00184 80B93CE4 14410010 */ bne $v0, $at, .L80B93D28 -/* 00188 80B93CE8 00000000 */ nop -.L80B93CEC: -/* 0018C 80B93CEC 0C2E4F64 */ jal func_80B93D90 -/* 00190 80B93CF0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00194 80B93CF4 1000000C */ beq $zero, $zero, .L80B93D28 -/* 00198 80B93CF8 00000000 */ nop -.L80B93CFC: -/* 0019C 80B93CFC 00032A03 */ sra $a1, $v1, 8 -/* 001A0 80B93D00 0C00B2D0 */ jal Flags_GetSwitch - -/* 001A4 80B93D04 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 001A8 80B93D08 10400005 */ beq $v0, $zero, .L80B93D20 -/* 001AC 80B93D0C 00000000 */ nop -/* 001B0 80B93D10 0C2E4F64 */ jal func_80B93D90 -/* 001B4 80B93D14 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001B8 80B93D18 10000003 */ beq $zero, $zero, .L80B93D28 -/* 001BC 80B93D1C 00000000 */ nop -.L80B93D20: -/* 001C0 80B93D20 0C2E4F6C */ jal func_80B93DB0 -/* 001C4 80B93D24 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80B93D28: -/* 001C8 80B93D28 3C028016 */ lui $v0, %hi(gGameInfo) -/* 001CC 80B93D2C 2442FA90 */ addiu $v0, %lo(gGameInfo) -/* 001D0 80B93D30 8C590000 */ lw $t9, 0x0000($v0) ## 8015FA90 -/* 001D4 80B93D34 240300FF */ addiu $v1, $zero, 0x00FF ## $v1 = 000000FF -/* 001D8 80B93D38 A723116E */ sh $v1, 0x116E($t9) ## 0000116E -/* 001DC 80B93D3C 8C480000 */ lw $t0, 0x0000($v0) ## 8015FA90 -/* 001E0 80B93D40 A5031170 */ sh $v1, 0x1170($t0) ## 00001170 -/* 001E4 80B93D44 8C490000 */ lw $t1, 0x0000($v0) ## 8015FA90 -/* 001E8 80B93D48 A5231172 */ sh $v1, 0x1172($t1) ## 00001172 -/* 001EC 80B93D4C 8FBF001C */ lw $ra, 0x001C($sp) -/* 001F0 80B93D50 8FB00018 */ lw $s0, 0x0018($sp) -/* 001F4 80B93D54 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 001F8 80B93D58 03E00008 */ jr $ra -/* 001FC 80B93D5C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Update.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Update.s deleted file mode 100644 index faff3c5f1f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Update.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel ObjHsblock_Update -/* 003A4 80B93F04 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 003A8 80B93F08 AFBF0014 */ sw $ra, 0x0014($sp) -/* 003AC 80B93F0C 8C820164 */ lw $v0, 0x0164($a0) ## 00000164 -/* 003B0 80B93F10 50400005 */ beql $v0, $zero, .L80B93F28 -/* 003B4 80B93F14 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 003B8 80B93F18 0040F809 */ jalr $ra, $v0 -/* 003BC 80B93F1C AFA40018 */ sw $a0, 0x0018($sp) -/* 003C0 80B93F20 8FA40018 */ lw $a0, 0x0018($sp) -/* 003C4 80B93F24 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -.L80B93F28: -/* 003C8 80B93F28 3C0580B9 */ lui $a1, %hi(D_80B940C0) ## $a1 = 80B90000 -/* 003CC 80B93F2C 31CF0003 */ andi $t7, $t6, 0x0003 ## $t7 = 00000000 -/* 003D0 80B93F30 000FC080 */ sll $t8, $t7, 2 -/* 003D4 80B93F34 00B82821 */ addu $a1, $a1, $t8 -/* 003D8 80B93F38 0C00B56E */ jal Actor_SetHeight - -/* 003DC 80B93F3C 8CA540C0 */ lw $a1, %lo(D_80B940C0)($a1) -/* 003E0 80B93F40 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003E4 80B93F44 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 003E8 80B93F48 03E00008 */ jr $ra -/* 003EC 80B93F4C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B60.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B60.s deleted file mode 100644 index 0f0ed0a915..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B60.s +++ /dev/null @@ -1,3 +0,0 @@ -glabel func_80B93B60 -/* 00000 80B93B60 03E00008 */ jr $ra -/* 00004 80B93B64 AC850164 */ sw $a1, 0x0164($a0) ## 00000164 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B68.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B68.s deleted file mode 100644 index 4321d6bfda..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B68.s +++ /dev/null @@ -1,50 +0,0 @@ -.rdata -glabel D_80B94100 - .asciz "Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n" - .balign 4 - -glabel D_80B94140 - .asciz "../z_obj_hsblock.c" - .balign 4 - -.text -glabel func_80B93B68 -/* 00008 80B93B68 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 0000C 80B93B6C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00010 80B93B70 AFB00020 */ sw $s0, 0x0020($sp) -/* 00014 80B93B74 AFA5003C */ sw $a1, 0x003C($sp) -/* 00018 80B93B78 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0001C 80B93B7C AFA60040 */ sw $a2, 0x0040($sp) -/* 00020 80B93B80 AFA00030 */ sw $zero, 0x0030($sp) -/* 00024 80B93B84 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 00028 80B93B88 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 0002C 80B93B8C 8FA40040 */ lw $a0, 0x0040($sp) -/* 00030 80B93B90 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00034 80B93B94 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF8 -/* 00038 80B93B98 8FA4003C */ lw $a0, 0x003C($sp) -/* 0003C 80B93B9C 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00040 80B93BA0 8FA70030 */ lw $a3, 0x0030($sp) -/* 00044 80B93BA4 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00048 80B93BA8 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 0004C 80B93BAC 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032 -/* 00050 80B93BB0 1441000A */ bne $v0, $at, .L80B93BDC -/* 00054 80B93BB4 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00058 80B93BB8 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 0005C 80B93BBC 3C0480B9 */ lui $a0, %hi(D_80B94100) ## $a0 = 80B90000 -/* 00060 80B93BC0 3C0580B9 */ lui $a1, %hi(D_80B94140) ## $a1 = 80B90000 -/* 00064 80B93BC4 86070000 */ lh $a3, 0x0000($s0) ## 00000000 -/* 00068 80B93BC8 24A54140 */ addiu $a1, $a1, %lo(D_80B94140) ## $a1 = 80B94140 -/* 0006C 80B93BCC 24844100 */ addiu $a0, $a0, %lo(D_80B94100) ## $a0 = 80B94100 -/* 00070 80B93BD0 240600A3 */ addiu $a2, $zero, 0x00A3 ## $a2 = 000000A3 -/* 00074 80B93BD4 0C00084C */ jal osSyncPrintf - -/* 00078 80B93BD8 AFAE0010 */ sw $t6, 0x0010($sp) -.L80B93BDC: -/* 0007C 80B93BDC 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00080 80B93BE0 8FB00020 */ lw $s0, 0x0020($sp) -/* 00084 80B93BE4 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 -/* 00088 80B93BE8 03E00008 */ jr $ra -/* 0008C 80B93BEC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93BF0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93BF0.s deleted file mode 100644 index bd7e264e69..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93BF0.s +++ /dev/null @@ -1,36 +0,0 @@ -glabel func_80B93BF0 -/* 00090 80B93BF0 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00094 80B93BF4 AFBF003C */ sw $ra, 0x003C($sp) -/* 00098 80B93BF8 AFB00038 */ sw $s0, 0x0038($sp) -/* 0009C 80B93BFC 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 000A0 80B93C00 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 000A4 80B93C04 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000 -/* 000A8 80B93C08 000E7943 */ sra $t7, $t6, 5 -/* 000AC 80B93C0C 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 -/* 000B0 80B93C10 53000014 */ beql $t8, $zero, .L80B93C64 -/* 000B4 80B93C14 8FBF003C */ lw $ra, 0x003C($sp) -/* 000B8 80B93C18 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 -/* 000BC 80B93C1C 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24 -/* 000C0 80B93C20 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 000C4 80B93C24 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 000C8 80B93C28 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028 -/* 000CC 80B93C2C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 000D0 80B93C30 2407011E */ addiu $a3, $zero, 0x011E ## $a3 = 0000011E -/* 000D4 80B93C34 E7A60014 */ swc1 $f6, 0x0014($sp) -/* 000D8 80B93C38 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C -/* 000DC 80B93C3C E7A80018 */ swc1 $f8, 0x0018($sp) -/* 000E0 80B93C40 86190030 */ lh $t9, 0x0030($s0) ## 00000030 -/* 000E4 80B93C44 AFB9001C */ sw $t9, 0x001C($sp) -/* 000E8 80B93C48 86080032 */ lh $t0, 0x0032($s0) ## 00000032 -/* 000EC 80B93C4C AFA80020 */ sw $t0, 0x0020($sp) -/* 000F0 80B93C50 86090034 */ lh $t1, 0x0034($s0) ## 00000034 -/* 000F4 80B93C54 AFAA0028 */ sw $t2, 0x0028($sp) -/* 000F8 80B93C58 0C00C916 */ jal Actor_SpawnAttached - -/* 000FC 80B93C5C AFA90024 */ sw $t1, 0x0024($sp) -/* 00100 80B93C60 8FBF003C */ lw $ra, 0x003C($sp) -.L80B93C64: -/* 00104 80B93C64 8FB00038 */ lw $s0, 0x0038($sp) -/* 00108 80B93C68 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 0010C 80B93C6C 03E00008 */ jr $ra -/* 00110 80B93C70 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93D90.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93D90.s deleted file mode 100644 index 9857fda184..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93D90.s +++ /dev/null @@ -1,9 +0,0 @@ -glabel func_80B93D90 -/* 00230 80B93D90 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00234 80B93D94 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00238 80B93D98 0C2E4ED8 */ jal func_80B93B60 -/* 0023C 80B93D9C 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00240 80B93DA0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00244 80B93DA4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00248 80B93DA8 03E00008 */ jr $ra -/* 0024C 80B93DAC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DB0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DB0.s deleted file mode 100644 index c567d6834f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DB0.s +++ /dev/null @@ -1,18 +0,0 @@ -glabel func_80B93DB0 -/* 00250 80B93DB0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00254 80B93DB4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00258 80B93DB8 3C0142D2 */ lui $at, 0x42D2 ## $at = 42D20000 -/* 0025C 80B93DBC 44813000 */ mtc1 $at, $f6 ## $f6 = 105.00 -/* 00260 80B93DC0 C484000C */ lwc1 $f4, 0x000C($a0) ## 0000000C -/* 00264 80B93DC4 8C8E0004 */ lw $t6, 0x0004($a0) ## 00000004 -/* 00268 80B93DC8 3C0580B9 */ lui $a1, %hi(func_80B93DF4) ## $a1 = 80B90000 -/* 0026C 80B93DCC 46062201 */ sub.s $f8, $f4, $f6 -/* 00270 80B93DD0 35CF0010 */ ori $t7, $t6, 0x0010 ## $t7 = 00000010 -/* 00274 80B93DD4 AC8F0004 */ sw $t7, 0x0004($a0) ## 00000004 -/* 00278 80B93DD8 24A53DF4 */ addiu $a1, $a1, %lo(func_80B93DF4) ## $a1 = 80B93DF4 -/* 0027C 80B93DDC 0C2E4ED8 */ jal func_80B93B60 -/* 00280 80B93DE0 E4880028 */ swc1 $f8, 0x0028($a0) ## 00000028 -/* 00284 80B93DE4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00288 80B93DE8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0028C 80B93DEC 03E00008 */ jr $ra -/* 00290 80B93DF0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DF4.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DF4.s deleted file mode 100644 index 683f85778a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DF4.s +++ /dev/null @@ -1,20 +0,0 @@ -glabel func_80B93DF4 -/* 00294 80B93DF4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00298 80B93DF8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0029C 80B93DFC 8FAE0018 */ lw $t6, 0x0018($sp) -/* 002A0 80B93E00 AFBF0014 */ sw $ra, 0x0014($sp) -/* 002A4 80B93E04 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 002A8 80B93E08 85C5001C */ lh $a1, 0x001C($t6) ## 0000001C -/* 002AC 80B93E0C 00052A03 */ sra $a1, $a1, 8 -/* 002B0 80B93E10 0C00B2D0 */ jal Flags_GetSwitch - -/* 002B4 80B93E14 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 002B8 80B93E18 50400004 */ beql $v0, $zero, .L80B93E2C -/* 002BC 80B93E1C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 002C0 80B93E20 0C2E4F8E */ jal func_80B93E38 -/* 002C4 80B93E24 8FA40018 */ lw $a0, 0x0018($sp) -/* 002C8 80B93E28 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B93E2C: -/* 002CC 80B93E2C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 002D0 80B93E30 03E00008 */ jr $ra -/* 002D4 80B93E34 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E38.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E38.s deleted file mode 100644 index 1365927931..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E38.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel func_80B93E38 -/* 002D8 80B93E38 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 002DC 80B93E3C AFBF0014 */ sw $ra, 0x0014($sp) -/* 002E0 80B93E40 3C0580B9 */ lui $a1, %hi(func_80B93E5C) ## $a1 = 80B90000 -/* 002E4 80B93E44 0C2E4ED8 */ jal func_80B93B60 -/* 002E8 80B93E48 24A53E5C */ addiu $a1, $a1, %lo(func_80B93E5C) ## $a1 = 80B93E5C -/* 002EC 80B93E4C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 002F0 80B93E50 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 002F4 80B93E54 03E00008 */ jr $ra -/* 002F8 80B93E58 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E5C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E5C.s deleted file mode 100644 index e15c555316..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E5C.s +++ /dev/null @@ -1,54 +0,0 @@ -.late_rodata -glabel D_80B94190 - .float 0.3 - -glabel D_80B94194 - .float 0.001 - -.text -glabel func_80B93E5C -/* 002FC 80B93E5C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00300 80B93E60 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00304 80B93E64 AFB00020 */ sw $s0, 0x0020($sp) -/* 00308 80B93E68 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0030C 80B93E6C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00310 80B93E70 AFA5002C */ sw $a1, 0x002C($sp) -/* 00314 80B93E74 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000 -/* 00318 80B93E78 3C073F4C */ lui $a3, 0x3F4C ## $a3 = 3F4C0000 -/* 0031C 80B93E7C 34E7CCCD */ ori $a3, $a3, 0xCCCD ## $a3 = 3F4CCCCD -/* 00320 80B93E80 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD -/* 00324 80B93E84 3C054180 */ lui $a1, 0x4180 ## $a1 = 41800000 -/* 00328 80B93E88 24840060 */ addiu $a0, $a0, 0x0060 ## $a0 = 00000060 -/* 0032C 80B93E8C 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 00330 80B93E90 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00334 80B93E94 3C0180B9 */ lui $at, %hi(D_80B94190) ## $at = 80B90000 -/* 00338 80B93E98 C4224190 */ lwc1 $f2, %lo(D_80B94190)($at) -/* 0033C 80B93E9C 8E05000C */ lw $a1, 0x000C($s0) ## 0000000C -/* 00340 80B93EA0 8E070060 */ lw $a3, 0x0060($s0) ## 00000060 -/* 00344 80B93EA4 44061000 */ mfc1 $a2, $f2 -/* 00348 80B93EA8 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028 -/* 0034C 80B93EAC 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 00350 80B93EB0 E7A20010 */ swc1 $f2, 0x0010($sp) -/* 00354 80B93EB4 3C0180B9 */ lui $at, %hi(D_80B94194) ## $at = 80B90000 -/* 00358 80B93EB8 C4264194 */ lwc1 $f6, %lo(D_80B94194)($at) -/* 0035C 80B93EBC 46000005 */ abs.s $f0, $f0 -/* 00360 80B93EC0 4606003C */ c.lt.s $f0, $f6 -/* 00364 80B93EC4 00000000 */ nop -/* 00368 80B93EC8 4502000A */ bc1fl .L80B93EF4 -/* 0036C 80B93ECC 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00370 80B93ED0 C608000C */ lwc1 $f8, 0x000C($s0) ## 0000000C -/* 00374 80B93ED4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00378 80B93ED8 0C2E4F64 */ jal func_80B93D90 -/* 0037C 80B93EDC E6080028 */ swc1 $f8, 0x0028($s0) ## 00000028 -/* 00380 80B93EE0 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004 -/* 00384 80B93EE4 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF -/* 00388 80B93EE8 01C17824 */ and $t7, $t6, $at -/* 0038C 80B93EEC AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004 -/* 00390 80B93EF0 8FBF0024 */ lw $ra, 0x0024($sp) -.L80B93EF4: -/* 00394 80B93EF4 8FB00020 */ lw $s0, 0x0020($sp) -/* 00398 80B93EF8 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 0039C 80B93EFC 03E00008 */ jr $ra -/* 003A0 80B93F00 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B9534C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B9534C.s index 66f39f91f9..a208555c74 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B9534C.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B9534C.s @@ -4,7 +4,7 @@ glabel func_80B9534C /* 006B4 80B95354 AFB10020 */ sw $s1, 0x0020($sp) /* 006B8 80B95358 AFB0001C */ sw $s0, 0x001C($sp) /* 006BC 80B9535C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 006C0 80B95360 0C00BD04 */ jal func_8002F410 +/* 006C0 80B95360 0C00BD04 */ jal Actor_HasParent /* 006C4 80B95364 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 /* 006C8 80B95368 50400006 */ beql $v0, $zero, .L80B95384 /* 006CC 80B9536C 960E0088 */ lhu $t6, 0x0088($s0) ## 00000088 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B95574.s b/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B95574.s index e36776169a..7af9358413 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B95574.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Kibako/func_80B95574.s @@ -8,7 +8,7 @@ glabel func_80B95574 /* 008D8 80B95578 AFBF0024 */ sw $ra, 0x0024($sp) /* 008DC 80B9557C AFB00020 */ sw $s0, 0x0020($sp) /* 008E0 80B95580 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 008E4 80B95584 0C00BD68 */ jal func_8002F5A0 +/* 008E4 80B95584 0C00BD68 */ jal Actor_HasNoParent /* 008E8 80B95588 AFA5002C */ sw $a1, 0x002C($sp) /* 008EC 80B9558C 10400025 */ beq $v0, $zero, .L80B95624 /* 008F0 80B95590 8FAE002C */ lw $t6, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s index 4722aab1da..c6ea64474e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s @@ -108,7 +108,7 @@ glabel ObjLightswitch_Init /* 00534 80B970D4 AFAE0028 */ sw $t6, 0x0028($sp) /* 00538 80B970D8 AFA00024 */ sw $zero, 0x0024($sp) /* 0053C 80B970DC 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00540 80B970E0 0C00C916 */ jal Actor_SpawnAttached +/* 00540 80B970E0 0C00C916 */ jal Actor_SpawnAsChild /* 00544 80B970E4 AFAD0020 */ sw $t5, 0x0020($sp) /* 00548 80B970E8 1440000F */ bne $v0, $zero, .L80B97128 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Mure/func_80B9910C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Mure/func_80B9910C.s index 56c21485cb..9303996f4b 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Mure/func_80B9910C.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Mure/func_80B9910C.s @@ -43,7 +43,7 @@ glabel func_80B9910C .L80B991A0: /* 00700 80B991A0 5080000B */ beql $a0, $zero, .L80B991D0 /* 00704 80B991A4 26100004 */ addiu $s0, $s0, 0x0004 ## $s0 = 00000008 -/* 00708 80B991A8 0C00BD04 */ jal func_8002F410 +/* 00708 80B991A8 0C00BD04 */ jal Actor_HasParent /* 0070C 80B991AC 02C02825 */ or $a1, $s6, $zero ## $a1 = 00000000 /* 00710 80B991B0 10400003 */ beq $v0, $zero, .L80B991C0 /* 00714 80B991B4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Mure2/func_80B9A438.s b/asm/non_matchings/overlays/actors/ovl_Obj_Mure2/func_80B9A438.s index 304247a70b..fa97bb0a8b 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Mure2/func_80B9A438.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Mure2/func_80B9A438.s @@ -25,7 +25,7 @@ glabel func_80B9A438 /* 00550 80B9A490 8E040150 */ lw $a0, 0x0150($s0) ## 00000150 /* 00554 80B9A494 5080001D */ beql $a0, $zero, .L80B9A50C /* 00558 80B9A498 26520001 */ addiu $s2, $s2, 0x0001 ## $s2 = 00000001 -/* 0055C 80B9A49C 0C00BD04 */ jal func_8002F410 +/* 0055C 80B9A49C 0C00BD04 */ jal Actor_HasParent /* 00560 80B9A4A0 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000 /* 00564 80B9A4A4 10400007 */ beq $v0, $zero, .L80B9A4C4 /* 00568 80B9A4A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ACE4.s b/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ACE4.s index 723161e506..beb8736b0e 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ACE4.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ACE4.s @@ -29,7 +29,7 @@ glabel func_80B9ACE4 /* 0037C 80B9AD4C 8E240000 */ lw $a0, 0x0000($s1) ## 00000150 /* 00380 80B9AD50 50800012 */ beql $a0, $zero, .L80B9AD9C /* 00384 80B9AD54 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000002 -/* 00388 80B9AD58 0C00BD04 */ jal func_8002F410 +/* 00388 80B9AD58 0C00BD04 */ jal Actor_HasParent /* 0038C 80B9AD5C 02A02825 */ or $a1, $s5, $zero ## $a1 = 00000000 /* 00390 80B9AD60 54400006 */ bnel $v0, $zero, .L80B9AD7C /* 00394 80B9AD64 964C016C */ lhu $t4, 0x016C($s2) ## 0000016C diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ADCC.s b/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ADCC.s index 1dee3287e6..eaaa65db38 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ADCC.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ADCC.s @@ -30,7 +30,7 @@ glabel func_80B9ADCC /* 00468 80B9AE38 314B0001 */ andi $t3, $t2, 0x0001 ## $t3 = 00000000 /* 0046C 80B9AE3C 55600014 */ bnel $t3, $zero, .L80B9AE90 /* 00470 80B9AE40 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002 -/* 00474 80B9AE44 0C00BD04 */ jal func_8002F410 +/* 00474 80B9AE44 0C00BD04 */ jal Actor_HasParent /* 00478 80B9AE48 8E040000 */ lw $a0, 0x0000($s0) ## 00000150 /* 0047C 80B9AE4C 50400006 */ beql $v0, $zero, .L80B9AE68 /* 00480 80B9AE50 8E0C0000 */ lw $t4, 0x0000($s0) ## 00000150 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Switch/func_80B9D4D8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Switch/func_80B9D4D8.s index 7ef153cbfa..d64dc8bc2d 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Switch/func_80B9D4D8.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Switch/func_80B9D4D8.s @@ -22,7 +22,7 @@ glabel func_80B9D4D8 /* 00318 80B9D528 00194203 */ sra $t0, $t9, 8 /* 0031C 80B9D52C 3109003F */ andi $t1, $t0, 0x003F ## $t1 = 00000000 /* 00320 80B9D530 00095200 */ sll $t2, $t1, 8 -/* 00324 80B9D534 0C00C916 */ jal Actor_SpawnAttached +/* 00324 80B9D534 0C00C916 */ jal Actor_SpawnAsChild /* 00328 80B9D538 AFAA0028 */ sw $t2, 0x0028($sp) /* 0032C 80B9D53C 8FBF0034 */ lw $ra, 0x0034($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA15BC.s b/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA15BC.s index 925e423eb9..586747c093 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA15BC.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA15BC.s @@ -4,7 +4,7 @@ glabel func_80BA15BC /* 00864 80BA15C4 AFB10020 */ sw $s1, 0x0020($sp) /* 00868 80BA15C8 AFB0001C */ sw $s0, 0x001C($sp) /* 0086C 80BA15CC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00870 80BA15D0 0C00BD04 */ jal func_8002F410 +/* 00870 80BA15D0 0C00BD04 */ jal Actor_HasParent /* 00874 80BA15D4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 /* 00878 80BA15D8 50400006 */ beql $v0, $zero, .L80BA15F4 /* 0087C 80BA15DC 960E0088 */ lhu $t6, 0x0088($s0) ## 00000088 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA180C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA180C.s index 23ccd196c3..559850d2ee 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA180C.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Tsubo/func_80BA180C.s @@ -3,7 +3,7 @@ glabel func_80BA180C /* 00AB0 80BA1810 AFBF0024 */ sw $ra, 0x0024($sp) /* 00AB4 80BA1814 AFB00020 */ sw $s0, 0x0020($sp) /* 00AB8 80BA1818 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00ABC 80BA181C 0C00BD68 */ jal func_8002F5A0 +/* 00ABC 80BA181C 0C00BD68 */ jal Actor_HasNoParent /* 00AC0 80BA1820 AFA5002C */ sw $a1, 0x002C($sp) /* 00AC4 80BA1824 10400014 */ beq $v0, $zero, .L80BA1878 /* 00AC8 80BA1828 8FAE002C */ lw $t6, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_player_actor/func_808337D4.s b/asm/non_matchings/overlays/actors/ovl_player_actor/func_808337D4.s index a9527b4d78..44314fc53e 100644 --- a/asm/non_matchings/overlays/actors/ovl_player_actor/func_808337D4.s +++ b/asm/non_matchings/overlays/actors/ovl_player_actor/func_808337D4.s @@ -36,7 +36,7 @@ glabel func_808337D4 /* 01648 80833858 860800B6 */ lh $t0, 0x00B6($s0) ## 000000B6 /* 0164C 8083385C AFA00028 */ sw $zero, 0x0028($sp) /* 01650 80833860 AFA00024 */ sw $zero, 0x0024($sp) -/* 01654 80833864 0C00C916 */ jal Actor_SpawnAttached +/* 01654 80833864 0C00C916 */ jal Actor_SpawnAsChild /* 01658 80833868 AFA80020 */ sw $t0, 0x0020($sp) /* 0165C 8083386C 8FA60050 */ lw $a2, 0x0050($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_player_actor/func_80833910.s b/asm/non_matchings/overlays/actors/ovl_player_actor/func_80833910.s index f5a1734b69..4ca2c21712 100644 --- a/asm/non_matchings/overlays/actors/ovl_player_actor/func_80833910.s +++ b/asm/non_matchings/overlays/actors/ovl_player_actor/func_80833910.s @@ -20,7 +20,7 @@ glabel func_80833910 /* 01748 80833958 AFA5003C */ sw $a1, 0x003C($sp) /* 0174C 8083395C AFA00028 */ sw $zero, 0x0028($sp) /* 01750 80833960 AFA00024 */ sw $zero, 0x0024($sp) -/* 01754 80833964 0C00C916 */ jal Actor_SpawnAttached +/* 01754 80833964 0C00C916 */ jal Actor_SpawnAsChild /* 01758 80833968 AFB90020 */ sw $t9, 0x0020($sp) /* 0175C 8083396C 8FA5003C */ lw $a1, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_player_actor/func_8083442C.s b/asm/non_matchings/overlays/actors/ovl_player_actor/func_8083442C.s index fe1a81ba8d..c76d943a65 100644 --- a/asm/non_matchings/overlays/actors/ovl_player_actor/func_8083442C.s +++ b/asm/non_matchings/overlays/actors/ovl_player_actor/func_8083442C.s @@ -83,7 +83,7 @@ glabel func_8083442C /* 02350 80834560 860C00B6 */ lh $t4, 0x00B6($s0) ## 000000B6 /* 02354 80834564 AFA00024 */ sw $zero, 0x0024($sp) /* 02358 80834568 AFAD0028 */ sw $t5, 0x0028($sp) -/* 0235C 8083456C 0C00C916 */ jal Actor_SpawnAttached +/* 0235C 8083456C 0C00C916 */ jal Actor_SpawnAsChild /* 02360 80834570 AFAC0020 */ sw $t4, 0x0020($sp) /* 02364 80834574 AE0203AC */ sw $v0, 0x03AC($s0) ## 000003AC diff --git a/data/code_800DACC0.bss.s b/data/code_800DACC0.bss.s index da5a7979b9..75ed35dba6 100644 --- a/data/code_800DACC0.bss.s +++ b/data/code_800DACC0.bss.s @@ -262,376 +262,7 @@ glabel D_8016EE8B .space 0x2F5 glabel gAudioContext - .space 0x1 - -glabel D_8016F181 - .space 0x5 - -glabel D_8016F186 - .space 0x2 - -glabel D_8016F188 - .space 0x4 - -glabel D_8016F18C - .space 0x4 - -glabel D_8016F190 - .space 0x8 - -glabel D_8016F198 - .space 0x18 - -glabel D_8016F1B0 - .space 0x50 - -glabel D_8016F200 - .space 0x48 - -glabel D_8016F248 - .space 0x38 - -glabel D_8016F280 - .space 0x1A0 - -glabel D_8016F420 - .space 0x10 - -glabel D_8016F430 - .space 0x2D0 - -glabel D_8016F700 - .space 0x5A0 - -glabel D_8016FCA0 - .space 0xC4C - -glabel D_801708EC - .space 0x584 - -glabel D_80170E70 - .space 0x58 - -glabel D_80170EC8 - .space 0xD8 - -glabel D_80170FA0 - .space 0x18 - -glabel D_80170FB8 - .space 0x40 - -glabel D_80170FF8 - .space 0x18 - -glabel D_80171010 - .space 0x40 - -glabel D_80171050 - .space 0x18 - -glabel D_80171068 - .space 0x118 - -glabel D_80171180 - .space 0x5E8 - -glabel D_80171768 - .space 0x18 - -glabel D_80171780 - .space 0x4 - -glabel D_80171784 - .space 0x22C - -glabel D_801719B0 - .space 0x4 - -glabel D_801719B4 - .space 0x4 - -glabel D_801719B8 - .space 0x4 - -glabel D_801719BC - .space 0x4 - -glabel D_801719C0 - .space 0x4 - -glabel D_801719C4 - .space 0x4 - -glabel D_801719C8 - .space 0xC - -glabel D_801719D4 - .space 0x8 - -glabel D_801719DC - .space 0x8 - -glabel D_801719E4 - .space 0x4 - -glabel D_801719E8 - .space 0x4 - -glabel D_801719EC - .space 0x28 - -glabel D_80171A14 - .space 0x4 - -glabel D_80171A18 - .space 0x2 - -glabel gSoundMode - .space 0x2 - -glabel D_80171A1C - .space 0xE0 - -glabel D_80171AFC - .space 0x14 - -glabel D_80171B10 - .space 0x10 - -glabel D_80171B20 - .space 0x10 - -glabel D_80171B30 - .space 0x10 - -glabel D_80171B40 - .space 0x4 - -glabel D_80171B44 - .space 0x4 - -glabel D_80171B48 - .space 0x28 - -glabel D_80171B70 - .space 0x10 - -glabel D_80171B80 - .space 0x10 - -glabel D_80171B90 - .space 0x10 - -glabel D_80171BA0 - .space 0x4 - -glabel D_80171BA4 - .space 0x4 - -glabel D_80171BA8 - .space 0x4 - -glabel D_80171BAC - .space 0x12 - -glabel D_80171BBE - .space 0xB6 - -glabel D_80171C74 - .space 0x4 - -glabel D_80171C78 - .space 0x8 - -glabel D_80171C80 - .space 0xC - -glabel D_80171C8C - .space 0x7 - -glabel D_80171C93 - .space 0x5 - -glabel D_80171C98 - .space 0x7 - -glabel D_80171C9F - .space 0x11 - -glabel D_80171CB0 - .space 0x4 - -glabel D_80171CB4 - .space 0x4 - -glabel D_80171CB8 - .space 0x4 - -glabel D_80171CBC - .space 0x12 - -glabel D_80171CCE - .space 0xB6 - -glabel D_80171D84 - .space 0x4 - -glabel D_80171D88 - .space 0x8 - -glabel D_80171D90 - .space 0xC - -glabel D_80171D9C - .space 0x6 - -glabel D_80171DA2 - .space 0x1 - -glabel D_80171DA3 - .space 0x5 - -glabel D_80171DA8 - .space 0x6 - -glabel D_80171DAE - .space 0x1 - -glabel D_80171DAF - .space 0x11 - -glabel D_80171DC0 - .space 0x4 - -glabel D_80171DC4 - .space 0xD0 - -glabel D_80171E94 - .space 0x4 - -glabel D_80171E98 - .space 0x1A - -glabel D_80171EB2 - .space 0xC - -glabel D_80171EBE - .space 0x12 - -glabel D_80171ED0 - .space 0x4 - -glabel D_80171ED4 - .space 0x4 - -glabel D_80171ED8 - .space 0x4 - -glabel D_80171EDC - .space 0x184 - -glabel D_80172060 - .space 0x8 - -glabel D_80172068 - .space 0x8 - -glabel D_80172070 - .space 0x280 - -glabel D_801722F0 - .space 0x4 - -glabel D_801722F4 - .space 0x4 - -glabel D_801722F8 - .space 0xC - -glabel D_80172304 - .space 0x280 - -glabel D_80172584 - .space 0x4 - -glabel D_80172588 - .space 0xC - -glabel D_80172594 - .space 0x4 - -glabel D_80172598 - .space 0x8 - -glabel D_801725A0 - .space 0xC - -glabel D_801725AC - .space 0xC - -glabel D_801725B8 - .space 0x30 - -glabel D_801725E8 - .space 0x30 - -glabel D_80172618 - .space 0x81 - -glabel D_80172699 - .space 0x7 - -glabel D_801726A0 - .space 0x4 - -glabel D_801726A4 - .space 0x8 - -glabel D_801726AC - .space 0x4 - -glabel D_801726B0 - .space 0x38 - -glabel D_801726E8 - .space 0x120 - -glabel D_80172808 - .space 0x2 - -glabel D_8017280A - .space 0x1 - -glabel D_8017280B - .space 0x1 - -glabel D_8017280C - .space 0x1 - -glabel D_8017280D - .space 0x87 - -glabel D_80172894 - .space 0x114 - -glabel D_801729A8 - .space 0x288 - -glabel D_80172C30 - .space 0x70 - -glabel D_80172CA0 - .space 0x1F90 - -glabel D_80174C30 - .space 0x70 - -glabel D_80174CA0 - .space 0x68 - -glabel D_80174D08 - .space 0x10 + .space 0x5b98 glabel gNoteFreeLists .space 0x10 diff --git a/data/code_800DACC0.data.s b/data/code_800DACC0.data.s index 09b265a8ba..22bae93b12 100644 --- a/data/code_800DACC0.data.s +++ b/data/code_800DACC0.data.s @@ -53,16 +53,16 @@ glabel D_8012F4B4 glabel D_8012F6B4 .incbin "baserom.z64", 0xBA6854, 0x200 -glabel D_8012F8B4 +glabel gNoteFrequencies .incbin "baserom.z64", 0xBA6A54, 0x200 -glabel D_8012FAB4 +glabel gDefaultShortNoteVelocityTable .incbin "baserom.z64", 0xBA6C54, 0x10 -glabel D_8012FAC4 +glabel gDefaultShortNoteDurationTable .incbin "baserom.z64", 0xBA6C64, 0x10 -glabel D_8012FAD4 +glabel gDefaultEnvelope .incbin "baserom.z64", 0xBA6C74, 0x10 glabel gZeroNoteSub diff --git a/data/overlays/actors/z_bg_jya_megami.data.s b/data/overlays/actors/z_bg_jya_megami.data.s deleted file mode 100644 index 9f048c6147..0000000000 --- a/data/overlays/actors/z_bg_jya_megami.data.s +++ /dev/null @@ -1,47 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel Bg_Jya_Megami_InitVars - .word 0x01560100, 0x00000000, 0x00F10000, 0x0000033C -.word BgJyaMegami_Init -.word BgJyaMegami_Destroy -.word BgJyaMegami_Update -.word BgJyaMegami_Draw -glabel D_8089AFE0 - .word 0x00000000, 0x00000000, 0x00000000, 0x00200000, 0x00000000, 0x00010000, 0x00000000, 0xFDA8FF38, 0x003C0064 -glabel D_8089B004 - .word 0x0A000900, 0x00000000, 0x00000001 -.word D_8089AFE0 -glabel D_8089B014 - .word 0xC2480000, 0xC1AA3D71, 0xC21BAE14, 0xBFCCCCCD, 0xFED4FE70, 0x00280000, 0xC08A3D71, 0xC1570A3D, 0xC15C28F6, 0x00000000, 0x04B00190, 0x002A0000, 0x41F75C29, 0xC1A3D70B, 0xC1E6B852, 0x3FCCCCCD, 0xFCE00320, 0x002C0000, 0xC1C0A3D7, 0xC223D70B, 0xC1AAE147, 0xBF800000, 0xFD4401F4, 0x00240000, 0xC2333333, 0xC293D70A, 0xC2470A3D, 0xC04CCCCD, 0x03E8FF38, 0x001E0000, 0xC1100000, 0xC298F5C2, 0xC153D70A, 0xBF800000, 0xFC180258, 0x001A0000, 0xC123D70B, 0xC2523D71, 0xC1566667, 0x3FCCCCCD, 0x0258FE70, 0x00220000, 0x420828F6, 0xC276E148, 0xC21428F6, 0x3FC00000, 0x02580258, 0x001C0000, 0x426DEB85, 0xC2199999, 0xC245999A, 0x3FE66666, 0x01F40000, 0x00260000, 0xC19851EC, 0xC2E07AE1, 0xC20C7AE2, 0xBFCCCCCD, 0x012C0320, 0x00160000, 0x4143D70A, 0xC2C6147B, 0xC1FD1EB8, 0x3FE66666, 0xFC18FE70, 0x00180000, 0x4244A3D7, 0xC2A27AE1, 0xC25E147B, 0x4019999A, 0x02BC012C, 0x00200000, 0x416C28F5, 0xC2FB999A, 0xC230A3D7, 0x3E4CCCCD, 0x03200258, 0x00140000 -glabel D_8089B14C - .word 0x00050008, 0x000B000E, 0x00110014, 0x0017001A -glabel D_8089B15C - .word 0x0012001A, 0x0022002A, 0x0032003C, 0x00460050 -glabel D_8089B16C - .word 0x0030002A, 0x00240020, 0x001C0018, 0x00140010 -glabel D_8089B17C - .word 0x00010003, 0x00070000 -glabel D_8089B184 - .word 0x00000000, 0x00000000, 0x3F4CCCCD -glabel D_8089B190 - .word 0xC8500064, 0xB0F404B0, 0xB0F80320, 0x30FC04B0 -glabel D_8089B1A0 - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_8089B1AC - .word 0x06000D00, 0x06001D00, 0x06002500, 0x06002D00, 0x06004D00 -glabel D_8089B1C0 - .word 0x06001500, 0x06003500, 0x06003D00, 0x06004500, 0x06000500 -glabel D_8089B1D4 - .word 0x06009928, 0x06009AC0, 0x06009C80, 0x06009DE8, 0x06009F60, 0x0600A0A8, 0x0600A278, 0x0600A418, 0x0600A568, 0x0600A6A0, 0x0600A7E0, 0x0600A978, 0x0600AAC8 -glabel D_8089B208 - .word 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_jya_megami.reloc.s b/data/overlays/actors/z_bg_jya_megami.reloc.s deleted file mode 100644 index a4dee2e813..0000000000 --- a/data/overlays/actors/z_bg_jya_megami.reloc.s +++ /dev/null @@ -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_8089B2D0 - .incbin "baserom/ovl_Bg_Jya_Megami", 0x11A0, 0x00000170 diff --git a/data/overlays/actors/z_bg_spot11_bakudankabe.data.s b/data/overlays/actors/z_bg_spot11_bakudankabe.data.s deleted file mode 100644 index 94e56ecfaa..0000000000 --- a/data/overlays/actors/z_bg_spot11_bakudankabe.data.s +++ /dev/null @@ -1,24 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel Bg_Spot11_Bakudankabe_InitVars - .word 0x019F0100, 0x00000030, 0x016F0000, 0x000001B0 -.word BgSpot11Bakudankabe_Init -.word BgSpot11Bakudankabe_Destroy -.word BgSpot11Bakudankabe_Update -.word BgSpot11Bakudankabe_Draw -glabel D_808B2700 - .word 0x0A000900, 0x20010000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000000, 0x00010000, 0x00280050, 0x000008D3, 0x006CF9D4 -glabel D_808B272C - .word 0x450D3000, 0x42D80000, 0xC4C1C000 -glabel D_808B2738 - .word 0x450D3000, 0x42D80000, 0xC4C1C000, 0x00000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s b/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s deleted file mode 100644 index 9205222923..0000000000 --- a/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s +++ /dev/null @@ -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_808B2780 - .incbin "baserom/ovl_Bg_Spot11_Bakudankabe", 0x600, 0x00000070 diff --git a/data/overlays/actors/z_bg_spot17_bakudankabe.data.s b/data/overlays/actors/z_bg_spot17_bakudankabe.data.s deleted file mode 100644 index fb9f510ca7..0000000000 --- a/data/overlays/actors/z_bg_spot17_bakudankabe.data.s +++ /dev/null @@ -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 Bg_Spot17_Bakudankabe_InitVars - .word 0x01A90100, 0x00000000, 0x00B10000, 0x00000164 -.word BgSpot17Bakudankabe_Init -.word BgSpot17Bakudankabe_Destroy -.word BgSpot17Bakudankabe_Update -.word BgSpot17Bakudankabe_Draw -glabel D_808B72A0 - .word 0xC8500064, 0xB0F40BB8, 0xB0F801F4, 0x30FC03E8 - diff --git a/data/overlays/actors/z_bg_spot17_bakudankabe.reloc.s b/data/overlays/actors/z_bg_spot17_bakudankabe.reloc.s deleted file mode 100644 index 1c9d94aed4..0000000000 --- a/data/overlays/actors/z_bg_spot17_bakudankabe.reloc.s +++ /dev/null @@ -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_808B7380 - .incbin "baserom/ovl_Bg_Spot17_Bakudankabe", 0x7C0, 0x00000080 diff --git a/data/overlays/actors/z_bg_ydan_maruta.reloc.s b/data/overlays/actors/z_bg_ydan_maruta.reloc.s deleted file mode 100644 index c9b5242c8a..0000000000 --- a/data/overlays/actors/z_bg_ydan_maruta.reloc.s +++ /dev/null @@ -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_808BF390 - .incbin "baserom/ovl_Bg_Ydan_Maruta", 0x650, 0x00000080 diff --git a/data/overlays/actors/z_en_dy_extra.data.s b/data/overlays/actors/z_en_dy_extra.data.s deleted file mode 100644 index 3d7c68b6c1..0000000000 --- a/data/overlays/actors/z_en_dy_extra.data.s +++ /dev/null @@ -1,24 +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_Dy_Extra_InitVars - .word 0x01840600, 0x00000030, 0x000A0000, 0x00000174 -.word EnDyExtra_Init -.word EnDyExtra_Destroy -.word EnDyExtra_Update -.word EnDyExtra_Draw -glabel D_809FFC40 - .word 0xFFFFAAFF, 0xFFFFAAFF -glabel D_809FFC48 - .word 0xFF64FFFF, 0x64FFFFFF -glabel D_809FFC50 - .word 0x02010102, 0x00000201, 0x00020100, 0x02010002, 0x01000201, 0x00020100, 0x01020000, 0x00000000 - diff --git a/data/overlays/actors/z_en_dy_extra.reloc.s b/data/overlays/actors/z_en_dy_extra.reloc.s deleted file mode 100644 index 0a9d1e120a..0000000000 --- a/data/overlays/actors/z_en_dy_extra.reloc.s +++ /dev/null @@ -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_809FFCF0 - .incbin "baserom/ovl_En_Dy_Extra", 0x600, 0x000000A0 diff --git a/data/overlays/actors/z_en_ex_ruppy.data.s b/data/overlays/actors/z_en_ex_ruppy.data.s deleted file mode 100644 index b1b2891c5a..0000000000 --- a/data/overlays/actors/z_en_ex_ruppy.data.s +++ /dev/null @@ -1,36 +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_80A0B320 - .word 0x00000001, 0x00020013, 0x00140000, 0x00010005, 0x001401F4, 0x00320000 -glabel En_Ex_Ruppy_InitVars - .word 0x01310600, 0x00000010, 0x00010000, 0x00000164 -.word EnExRuppy_Init -.word EnExRuppy_Destroy -.word EnExRuppy_Update -.word EnExRuppy_Draw -glabel D_80A0B358 - .word 0x00000000, 0x3DCCCCCD, 0x00000000, 0x00000000, 0x00000000, 0x00000000 -glabel D_80A0B370 - .word 0x00000000, 0x3C23D70A, 0x00000000 -glabel D_80A0B37C - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_80A0B388 - .word 0x00000000, 0x3DCCCCCD, 0x00000000 -glabel D_80A0B394 - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_80A0B3A0 - .word 0x00000000, 0x3DCCCCCD, 0x00000000 -glabel D_80A0B3AC - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_80A0B3B8 - .word 0x04042140, 0x04042160, 0x04042180, 0x040421C0, 0x040421A0, 0x00000000 - diff --git a/data/overlays/actors/z_en_ex_ruppy.reloc.s b/data/overlays/actors/z_en_ex_ruppy.reloc.s deleted file mode 100644 index d23cbbe9c6..0000000000 --- a/data/overlays/actors/z_en_ex_ruppy.reloc.s +++ /dev/null @@ -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_80A0B550 - .incbin "baserom/ovl_En_Ex_Ruppy", 0x1140, 0x00000170 diff --git a/data/overlays/actors/z_en_syateki_niw.reloc.s b/data/overlays/actors/z_en_syateki_niw.reloc.s deleted file mode 100644 index a790c4b58e..0000000000 --- a/data/overlays/actors/z_en_syateki_niw.reloc.s +++ /dev/null @@ -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_80B13840 - .incbin "baserom/ovl_En_Syateki_Niw", 0x1F50, 0x00000260 diff --git a/data/overlays/actors/z_item_ocarina.data.s b/data/overlays/actors/z_item_ocarina.data.s deleted file mode 100644 index a8763f708d..0000000000 --- a/data/overlays/actors/z_item_ocarina.data.s +++ /dev/null @@ -1,18 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel Item_Ocarina_InitVars - .word 0x00F10700, 0x00000010, 0x00DE0000, 0x00000154 -.word ItemOcarina_Init -.word ItemOcarina_Destroy -.word ItemOcarina_Update -.word ItemOcarina_Draw - diff --git a/data/overlays/actors/z_item_ocarina.reloc.s b/data/overlays/actors/z_item_ocarina.reloc.s deleted file mode 100644 index f119fd3584..0000000000 --- a/data/overlays/actors/z_item_ocarina.reloc.s +++ /dev/null @@ -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_80B86850 - .incbin "baserom/ovl_Item_Ocarina", 0x720, 0x000000D0 diff --git a/data/overlays/actors/z_obj_hsblock.data.s b/data/overlays/actors/z_obj_hsblock.data.s deleted file mode 100644 index 6ace7c5a83..0000000000 --- a/data/overlays/actors/z_obj_hsblock.data.s +++ /dev/null @@ -1,28 +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 Obj_Hsblock_InitVars - .word 0x012D0100, 0x00000000, 0x011C0000, 0x00000168 -.word ObjHsblock_Init -.word ObjHsblock_Destroy -.word ObjHsblock_Update -.word ObjHsblock_Draw -glabel D_80B940C0 - .word 0x42AA0000, 0x42AA0000, 0x00000000 -glabel D_80B940CC - .word 0xC8500064, 0xB0F407D0, 0xB0F80190, 0x30FC07D0 -glabel D_80B940DC - .word 0x06000730, 0x06000730, 0x06000578 -glabel D_80B940E8 - .word 0xA57D3700 -glabel D_80B940EC - .word 0x06000210, 0x06000210, 0x06000470, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_obj_hsblock.reloc.s b/data/overlays/actors/z_obj_hsblock.reloc.s deleted file mode 100644 index 88f61f96f3..0000000000 --- a/data/overlays/actors/z_obj_hsblock.reloc.s +++ /dev/null @@ -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_80B941A0 - .incbin "baserom/ovl_Obj_Hsblock", 0x640, 0x000000C0 diff --git a/include/functions.h b/include/functions.h index 7ae762405c..b78584d8f1 100644 --- a/include/functions.h +++ b/include/functions.h @@ -237,9 +237,9 @@ void func_800292DC(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* ve Color_RGBA8* envColor, Color_RGBA8* primColor); // ? func_80029320(?); // ? func_800293A0(?); -void func_800293E4(GlobalContext*, Vec3f* pos, f32, f32, f32, f32); -// ? func_80029444(?); -// ? func_8002949C(?); +void func_800293E4(GlobalContext* globalCtx, Vec3f* pos, f32, f32, f32, f32); +void func_80029444(GlobalContext* globalCtx, Vec3f* pos, u32, u32, u32); +void func_8002949C(GlobalContext* globalCtx, Vec3f* pos, u32, u32, u32, u32); // ? func_80029530(?); // ? func_80029568(?); // ? func_800295A0(?); @@ -370,16 +370,16 @@ s32 func_8002F2F4(Actor* actor, GlobalContext* globalCtx); u32 func_8002F334(Actor* actor, GlobalContext* globalCtx); s8 func_8002F368(GlobalContext* globalCtx); void func_8002F374(GlobalContext* globalCtx, Actor* actor, s16* arg2, s16* arg3); -u32 func_8002F410(Actor* actor, GlobalContext* globalCtx); +u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx); s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange); void func_8002F554(Actor* actor, GlobalContext* globalCtx, s32 getItemId); void func_8002F580(Actor* actor, GlobalContext* globalCtx); -u32 func_8002F5A0(Actor* actor, GlobalContext* globalCtx); +u32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx); void func_8002F5C4(Actor* actorA, Actor* actorB, GlobalContext* globalCtx); void func_8002F5F0(Actor* actor, GlobalContext* globalCtx); -u32 func_8002F618(GlobalContext* globalCtx, Actor* actor); +u32 Actor_HasChild(GlobalContext* globalCtx, Actor* actor); u32 func_8002F63C(GlobalContext* globalCtx, Actor* actor, s32 arg2); -u32 func_8002F674(GlobalContext* globalCtx, Actor* actor); +u32 Actor_HasNoChild(GlobalContext* globalCtx, Actor* actor); void func_8002F698(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6); void func_8002F6D4(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5); void func_8002F71C(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4); @@ -402,8 +402,8 @@ void func_80031B14(GlobalContext* globalCtx, ActorContext* actorCtx); void func_80031C3C(ActorContext* actorCtx, GlobalContext* globalCtx); Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params); -Actor* Actor_SpawnAttached(ActorContext* actorCtx, Actor* attachedTo, GlobalContext* globalCtx, s16 actorId, f32 posX, - f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params); +Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 actorId, f32 posX, + f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params); void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx); Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, GlobalContext* globalCtx); Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalCtx); @@ -414,7 +414,7 @@ void func_80032E24(struct_80032E24* arg0, s32 arg1, GlobalContext* globalCtx); void func_80033260(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, f32 arg3, s32 arg4, f32 arg5, s16 arg6, s16 arg7, u8 arg8); void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s16 arg4, s16 arg5, u8 arg6); -Actor* func_80033640(GlobalContext* globalCtx, Collider* collider); +Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider); Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor); void Actor_ChangeType(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorType); void Actor_SetTextWithPrefix(GlobalContext* globalCtx, Actor* actor, s16 textIdLower); @@ -1925,20 +1925,20 @@ void FaultDrawer_SetDefault(); // ? func_800DE238(?); // ? func_800DE258(?); // ? func_800DE2B0(?); -void* Audio_SoundAlloc(SoundAllocPool* pool, u32 size); +void* Audio_AllocDmaMemory(SoundAllocPool* pool, u32 size); // ? func_800DE344(?); -// ? func_800DE380(?); -// ? func_800DE3DC(?); -// ? func_800DE434(?); -// ? func_800DE45C(?); -// ? func_800DE470(?); -// ? func_800DE4B0(?); -// ? func_800DE5F0(?); -// ? func_800DE650(?); -// ? func_800DE6D4(?); -// ? func_800DE758(?); -// ? func_800DE81C(?); -// ? func_800DE8E0(?); +void* Audio_AllocZeroed(SoundAllocPool* pool, u32 size); +void* Audio_Alloc(SoundAllocPool* pool, u32 size); +void Audio_SoundAllocPoolInit(SoundAllocPool* pool, void* memAddr, u32 size); +void Audio_PersistentPoolClear(PersistentPool* persistent); +void Audio_TemporaryPoolClear(TemporaryPool* temporary); +void func_800DE4B0(SoundAllocPool* pool); +void Audio_InitMainPools(s32 sizeForAudioInitPool); +// void Audio_SessionPoolsInit(?); +// void Audio_SeqAndBankPoolInit(?); +// void Audio_PersistentPoolsInit(?); +// void Audio_TemporaryPoolsInit(?); +// void* Audio_AllocBankOrSeq(?); // ? func_800DF074(?); // ? func_800DF0CC(?); // ? func_800DF5DC(?); @@ -1968,10 +1968,10 @@ void* Audio_SoundAlloc(SoundAllocPool* pool, u32 size); // ? func_800E11F0(?); // ? func_800E12DC(?); // ? func_800E1618(?); -s32 func_800E18B0(s32); -// ? func_800E1928(?); -// ? func_800E1A18(?); -// ? func_800E1A48(?); +s32 Audio_IsBankLoadComplete(s32 bankId); +s32 Audio_IsSeqLoadComplete(s32 seqId); +void Audio_SetBankLoadStatus(s32 bankId, u8 status); +void Audio_SetSeqLoadStatus(s32 seqId, u8 status); // ? func_800E1A78(?); // ? func_800E1AD8(?); // ? func_800E1B08(?); @@ -2104,42 +2104,16 @@ void Audio_NoteVibratoInit(Note* note); void Audio_NotePortamentoInit(Note* note); void Audio_AdsrInit(AdsrState* adsr, AdsrEnvelope* envelope, s16* volOut); f32 Audio_AdsrUpdate(AdsrState* adsr); -// ? func_800E9340(?); -// ? func_800E93A8(?); -// ? func_800E9584(?); -// ? func_800E96D8(?); -// ? func_800E97FC(?); -// ? func_800E9878(?); void Audio_SequenceChannelDisable(SequenceChannel* seqChannel); -// ? func_800E9934(?); -// ? func_800E9A2C(?); -// ? func_800E9AAC(?); -// ? func_800E9B44(?); +void Audio_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer); void Audio_SequencePlayerDisable(SequencePlayer* seqPlayer); void Audio_AudioListPushBack(AudioListItem* list, AudioListItem* item); void* Audio_AudioListPopBack(AudioListItem* list); -// ? func_800E9CA8(?); -// ? func_800E9D48(?); -// ? func_800E9D5C(?); -// ? func_800E9D94(?); -// ? func_800E9DD4(?); -// ? func_800E9ED8(?); -// ? func_800E9F64(?); -// ? func_800EA0C0(?); -// ? func_800EA440(?); -// ? func_800EAAE0(?); -// ? func_800EAEF4(?); -// ? func_800EAF24(?); -// ? func_800EAF98(?); -// ? func_800EB044(?); -// ? func_800EB068(?); -// ? func_800EBD58(?); -// ? func_800EC564(?); -// ? func_800EC618(?); -// ? func_800EC668(?); -// ? func_800EC734(?); -// ? func_800EC80C(?); -// ? func_800EC8DC(?); +void Audio_ProcessSequences(s32 arg0); +void Audio_ProcessSequence(SequencePlayer* seqPlayer); +void Audio_ResetSequencePlayer(SequencePlayer* seqPlayer); +void func_800EC734(s32 seqPlayerIdx); +void Audio_InitSequencePlayers(void); // ? func_800ECA00(?); // ? func_800ECA60(?); // ? func_800ECAF0(?); diff --git a/include/macros.h b/include/macros.h index a21374b15b..1f3edf3c7c 100644 --- a/include/macros.h +++ b/include/macros.h @@ -4,9 +4,9 @@ #define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0])) -#define PHYSICAL_TO_VIRTUAL(addr) ((u32)(addr) + 0x80000000) -#define PHYSICAL_TO_VIRTUAL2(addr) ((u32)(addr) - 0x80000000) -#define SEGMENTED_TO_VIRTUAL(addr) (void*)(PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)]) + SEGMENT_OFFSET(addr)) +#define PHYSICAL_TO_VIRTUAL(addr) (void*)((u32)(addr) + 0x80000000) +#define VIRTUAL_TO_PHYSICAL(addr) (u32)((u8*)(addr) - 0x80000000) +#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr)) #define ALIGN16(val) (((val) + 0xF) & ~0xF) @@ -45,9 +45,7 @@ #define CHECK_QUEST_ITEM(item) (gBitFlags[item] & gSaveContext.questItems) -#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \ - (curState)->init = newInit; \ - (curState)->size = sizeof(newStruct); +#define CHECK_PAD(state, combo) (~(state.in.button | ~(combo)) == 0) #define LOG(exp, value, format, file, line) \ do { \ @@ -61,7 +59,36 @@ #define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line) #define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line) -/* +#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \ + (curState)->init = newInit; \ + (curState)->size = sizeof(newStruct) + +#define SET_FULLSCREEN_VIEWPORT(view) \ + { \ + Viewport viewport; \ + viewport.bottomY = SCREEN_HEIGHT; \ + viewport.rightX = SCREEN_WIDTH; \ + viewport.topY = 0; \ + viewport.leftX = 0; \ + View_SetViewport(view, &viewport); \ + } \ + (void)0 + +extern GraphicsContext* oGfxCtx; + +#define OPEN_DISPS(gfxCtx, file, line) \ + { \ + GraphicsContext* oGfxCtx; \ + Gfx* dispRefs[4]; \ + oGfxCtx = gfxCtx; \ + Graph_OpenDisps(dispRefs, gfxCtx, file, line) + +#define CLOSE_DISPS(gfxCtx, file, line) \ + Graph_CloseDisps(dispRefs, gfxCtx, file, line); \ + } \ + (void)0 + +/** * `x` vertex x * `y` vertex y * `z` vertex z @@ -76,16 +103,4 @@ #define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } } -#define SET_FULLSCREEN_VIEWPORT(view) \ - { \ - Viewport viewport; \ - viewport.bottomY = SCREEN_HEIGHT; \ - viewport.rightX = SCREEN_WIDTH; \ - viewport.topY = 0; \ - viewport.leftX = 0; \ - View_SetViewport(view, &viewport); \ - } - -#define CHECK_PAD(state, combo) (~(state.in.button | ~(combo)) == 0) - #endif diff --git a/include/ultra64/gbi.h b/include/ultra64/gbi.h index 9e821d6d9a..5f58904002 100644 --- a/include/ultra64/gbi.h +++ b/include/ultra64/gbi.h @@ -2634,7 +2634,7 @@ _DW({ \ * Macros to turn texture on/off */ # define gSPTexture(pkt, s, t, level, tile, on) \ -{ \ +_DW({ \ Gfx *_g = (Gfx *)(pkt); \ \ _g->words.w0 = (_SHIFTL(G_TEXTURE,24,8) | \ @@ -2642,7 +2642,7 @@ _DW({ \ _SHIFTL((level),11,3) | _SHIFTL((tile),8,3) | \ _SHIFTL((on),1,7)); \ _g->words.w1 = (_SHIFTL((s),16,16) | _SHIFTL((t),0,16)); \ -} +}) # define gsSPTexture(s, t, level, tile, on) \ { \ (_SHIFTL(G_TEXTURE,24,8) | _SHIFTL(BOWTIE_VAL,16,8) | \ diff --git a/include/ultra64/mbi.h b/include/ultra64/mbi.h index 00b113595f..f0e0029504 100644 --- a/include/ultra64/mbi.h +++ b/include/ultra64/mbi.h @@ -49,8 +49,6 @@ #define _SHIFTR(v, s, w) \ ((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1))) -#define _SHIFT _SHIFTL /* old, for compatibility only */ - #define G_ON (1) #define G_OFF (0) diff --git a/include/variables.h b/include/variables.h index af9edc5a2f..326e167b13 100644 --- a/include/variables.h +++ b/include/variables.h @@ -48,7 +48,7 @@ extern u32 D_0403B030; extern u32 D_0403BBA0; extern u32 D_0403BCD8; extern u32 D_0403F070; -extern u32 D_04042440; +extern Gfx D_04042440[]; //extern ? D_04048160; extern u32 D_04048180; extern Gfx D_04049210[]; @@ -621,10 +621,11 @@ extern s16* gWaveSamples[6]; extern f32 gPitchBendFrequencyScale[256]; //extern ? D_8012F098; //extern ? D_8012F0B0; -//extern ? D_8012F8B4; -//extern ? D_8012FAB4; -//extern ? D_8012FAC4; -//extern ? D_8012FAD4; +extern f32 D_8012F4B4[256]; +extern f32 gNoteFrequencies[]; +extern u8 gDefaultShortNoteVelocityTable[16]; +extern u8 gDefaultShortNoteDurationTable[16]; +extern AdsrEnvelope gDefaultEnvelope[3]; extern NoteSubEu gZeroNoteSub; extern NoteSubEu gDefaultNoteSub; extern u16 gHeadsetPanQuantization[0x10]; @@ -3595,123 +3596,8 @@ extern FaultThreadStruct gFaultStruct; //extern ? D_8016E750; //extern ? D_8016E9A4; //extern ? D_8016EE8B; -extern AudioContext gAudioContext; -//extern ? D_8016F181; -//extern ? D_8016F186; -//extern ? D_8016F188; -//extern ? D_8016F18C; -//extern ? D_8016F190; -//extern ? D_8016F198; -//extern ? D_8016F1B0; -//extern ? D_8016F200; -//extern ? D_8016F248; -//extern ? D_8016F280; -//extern ? D_8016F420; -//extern ? D_8016F430; -//extern ? D_8016F700; -//extern ? D_8016FCA0; -//extern ? D_80170001; -//extern ? D_801708EC; -//extern ? D_80170E70; -//extern ? D_80170EC8; -//extern ? D_80170FA0; -//extern ? D_80170FB8; -//extern ? D_80170FF8; -//extern ? D_80171010; -//extern ? D_80171050; -//extern ? D_80171068; -//extern ? D_80171180; -//extern ? D_80171768; -//extern ? D_80171780; -//extern ? D_80171784; -//extern ? D_801719B8; -//extern ? D_801719BC; -//extern ? D_801719C0; -//extern ? D_801719C4; -//extern ? D_801719C8; -//extern ? D_801719D4; -//extern ? D_801719DC; -extern f32 D_801719EC; -//extern ? D_80171A14; -//extern ? D_80171A18; -extern s8 gSoundMode; -//extern ? D_80171A1C; -//extern ? D_80171AFC; -//extern ? D_80171B10; -//extern ? D_80171B20; -//extern ? D_80171B30; -//extern ? D_80171B40; -//extern ? D_80171B44; -//extern ? D_80171B48; -//extern ? D_80171B70; -//extern ? D_80171B80; -//extern ? D_80171B90; -//extern ? D_80171BA0; -//extern ? D_80171BA4; -//extern ? D_80171BA8; -//extern ? D_80171BAC; -//extern ? D_80171C74; -//extern ? D_80171C78; -//extern ? D_80171C80; -//extern ? D_80171C8C; -//extern ? D_80171C93; -//extern ? D_80171C98; -//extern ? D_80171C9F; -//extern ? D_80171CB0; -//extern ? D_80171CB4; -//extern ? D_80171CB8; -//extern ? D_80171CBC; -//extern ? D_80171D84; -//extern ? D_80171D88; -//extern ? D_80171D90; -//extern ? D_80171D9C; -//extern ? D_80171DA2; -//extern ? D_80171DA3; -//extern ? D_80171DA8; -//extern ? D_80171DAE; -//extern ? D_80171DAF; -//extern ? D_80171DC0; -//extern ? D_80171DC4; -//extern ? D_80171E94; -//extern ? D_80171E98; -//extern ? D_80171EB2; -//extern ? D_80171EBE; -//extern ? D_80171ED0; -//extern ? D_80171ED4; -//extern ? D_80171ED8; -//extern ? D_80171EDC; -//extern ? D_80172060; -//extern ? D_80172068; -//extern ? D_80172070; -//extern ? D_801722F0; -//extern ? D_801722F4; -//extern ? D_801722F8; -//extern ? D_80172304; -//extern ? D_80172584; -//extern ? D_80172588; -//extern ? D_80172594; -//extern ? D_80172598; -//extern ? D_801725A0; -//extern ? D_801725AC; -//extern ? D_801725B8; -//extern ? D_801725E8; -//extern ? D_80172618; -//extern ? D_80172699; -extern f32* D_801726A0; -//extern ? D_801726A4; -//extern ? D_801726AC; -//extern ? D_801726B0; -//extern ? D_8017280A; -//extern ? D_8017280B; -//extern ? D_8017280C; -//extern ? D_8017280D; -//extern ? D_801729A8; -//extern ? D_80172C30; -//extern ? D_80172CA0; -//extern ? D_80174C30; -//extern ? D_80174CA0; -//extern ? D_80174D08; -extern NotePool gNoteFreeLists; +extern AudioContext gAudioContext; // at 0x8016f180 +extern NotePool gNoteFreeLists; // probably includes this and further members, too //extern ? D_80174D28; //extern ? D_80174D38; //extern ? D_80174D48; diff --git a/include/z64.h b/include/z64.h index 836518fe34..d7ee81021d 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1208,7 +1208,8 @@ typedef struct GlobalContext { /* 0x000B0 */ void* sceneSegment; /* 0x000B4 */ char unk_B4[0x4]; /* 0x000B8 */ View view; - /* 0x001E0 */ Camera cameras[4]; + /* 0x001E0 */ Camera mainCamera; + /* 0x001E0 */ Camera subCameras[3]; /* 0x00790 */ Camera* cameraPtrs[4]; /* 0x007A0 */ s16 activeCamera; /* 0x007A2 */ s16 nextCamera; diff --git a/include/z64actor.h b/include/z64actor.h index 938bb4a9dc..c96431d61e 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -152,8 +152,8 @@ typedef struct Actor { /* 0x115 */ u8 isDrawn; // Indicates whether the actor is currently being drawn (but not seen through lens) /* 0x116 */ u8 unk_116; /* 0x117 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF - /* 0x118 */ struct Actor* attachedA; // Attached By? - /* 0x11C */ struct Actor* attachedB; // Attached To? + /* 0x118 */ struct Actor* parent; + /* 0x11C */ struct Actor* child; /* 0x120 */ struct Actor* prev; // Previous Actor of this type /* 0x124 */ struct Actor* next; // Next Actor of this type /* 0x128 */ ActorFunc init; // Initialization Routine. Called by Actor_Init or Actor_UpdateAll diff --git a/include/z64audio.h b/include/z64audio.h index 610f9f828a..2561891cd6 100644 --- a/include/z64audio.h +++ b/include/z64audio.h @@ -3,501 +3,16 @@ /** * Structs in this repository have primarily been imported from the SM64 Decompilation. - * Many things likely still need shifted around and structs need adjusted. - * Take sizes and locations of structs as very volatile. - * The symbol '!' next to an offset means the member is confirmed. + * Many struct members are wrong; the symbol '?' next to an offset means the member is a guess. */ -struct Note; -struct NotePool; -struct SequenceChannel; -struct SequenceChannelLayer; - -typedef struct AudioListItem { - // A node in a circularly linked list. Each node is either a head or an item: - // - Items can be either detached (prev = NULL), or attached to a list. - // 'value' points to something of interest. - // - List heads are always attached; if a list is empty, its head points - // to itself. 'count' contains the size of the list. - // If the list holds notes, 'pool' points back to the pool where it lives. - // Otherwise, that member is NULL. - /*!0x00 */ struct AudioListItem* prev; - /*!0x04 */ struct AudioListItem* next; - /*!0x08 */ union { - void* value; // either Note* or SequenceChannelLayer* - s32 count; - } u; - /*!0x0C */ struct NotePool* pool; -} AudioListItem; // size = 0x10 - -typedef struct NotePool { - /*!0x00 */ AudioListItem disabled; - /*!0x10 */ AudioListItem decaying; - /*!0x20 */ AudioListItem releasing; - /*!0x30 */ AudioListItem active; -} NotePool; - -// Pitch sliding by up to one octave in the positive direction. Negative -// direction is "supported" by setting extent to be negative. The code -// exterpolates exponentially in the wrong direction in that case, but that -// doesn't prevent seqplayer from doing it, AFAICT. -typedef struct { - /*!0x00 */ u8 mode; // bit 0x80 denotes something; the rest are an index 0-5 - /*!0x02 */ u16 cur; - /*!0x04 */ u16 speed; - /*!0x08 */ f32 extent; -} Portamento; // size = 0xC - -typedef struct { - s16 delay; - s16 arg; -} AdsrEnvelope; // size = 0x4 - -typedef struct { - u32 start; - u32 end; - u32 count; - char unk_0C[0x4]; - s16 state[16]; // only exists if count != 0. 8-byte aligned -} AdpcmLoop; - -typedef struct { - s32 order; - s32 npredictors; - s16 book[1]; // size 8 * order * npredictors. 8-byte aligned -} AdpcmBook; - -typedef struct { - u8 unused; - u8 loaded; - u8* sampleAddr; - AdpcmLoop* loop; - AdpcmBook* book; - u32 sampleSize; // never read. either 0 or 1 mod 9, depending on padding -} AudioBankSample; - -typedef struct { - AudioBankSample* sample; - f32 tuning; // frequency scale factor -} AudioBankSound; // size = 0x8 - -// UNCHANGED -typedef struct { - /* 0x00 */ u8 loaded; - /* 0x01 */ u8 normalRangeLo; - /* 0x02 */ u8 normalRangeHi; - /* 0x03 */ u8 releaseRate; - /* 0x04 */ AdsrEnvelope* envelope; - /* 0x08 */ AudioBankSound lowNotesSound; - /* 0x10 */ AudioBankSound normalNotesSound; - /* 0x18 */ AudioBankSound highNotesSound; -} Instrument; // size >= 0x20 - -typedef struct { - u8 releaseRate; - u8 pan; - u8 loaded; - AudioBankSound sound; - AdsrEnvelope *envelope; -} Drum; // TODO figure out what is still used. - -typedef struct { - u32 unk_0; - u32 unk_4; -} UnkInstrument; // size = 0x8, new struct to OOT - -typedef struct { - /* 0x00 */ u8 numInstruments; - /* 0x01 */ u8 numDrums; - /* 0x02 */ char unk_02[0x02]; - /* 0x04 */ u16 numUnkInstruments; - /* 0x08 */ Instrument** instruments; - /* 0x0C */ Drum** drums; - /* 0x10 */ UnkInstrument* unkInstruments; -} CtlEntry; // size = 0x14 - -typedef struct { - u8* pc; - u8* stack[4]; - u8 remLoopIters[4]; - u8 depth; -} M64ScriptState; // size = 0x1C - -typedef struct { - /* 0x000 */ u8 enabled : 1; - /* 0x000 */ u8 finished : 1; // never read - /*!0x000 */ u8 muted : 1; - /* 0x000 */ u8 seqDmaInProgress : 1; - /* 0x000 */ u8 bankDmaInProgress : 1; - /* 0x000 */ u8 recalculateVolume : 1; - /* 0x000 */ u8 pad_0b2 : 1; - /* 0x000 */ u8 unk_0b1 : 1; - /* 0x001 */ u8 state; - /* 0x002 */ u8 noteAllocPolicy; - /* 0x003 */ u8 muteBehavior; - /* 0x004 */ u8 seqId; - /* 0x005 */ u8 defaultBank[1]; // must be an array to get a comparison - // to match; other u8's might also be part of that array - /* 0x006 */ u8 loadingBankId; - /* 0x007 */ s8 seqVariationEu[1]; - /* 0x008 */ u16 tempo; // beats per minute in JP, tatums per minute in US/EU - /* 0x00A */ u16 tempoAcc; - /* 0x00C */ s16 transposition; - /* 0x00E */ u16 delay; - /* 0x010 */ char pad_010[0x2]; - /* 0x012 */ u16 fadeTimer; - /* 0x014 */ u16 fadeTimerUnkEu; - /* 0x016 */ char pad_016[0x2]; - /* 0x018 */ u8* seqData; - /*!0x01C */ f32 fadeVolume; - /*!0x020 */ f32 fadeVelocity; - /* 0x024 */ f32 volume; - /*!0x028 */ f32 muteVolumeScale; - /*!0x02C */ f32 fadeVolumeScale; - /*!0x030 */ f32 appliedFadeVolume; - /* 0x034 */ f32 unk_34; - /*!0x038 */ struct SequenceChannel* channels[16]; - /* 0x078 */ M64ScriptState scriptState; - /* 0x094 */ u8* shortNoteVelocityTable; - /* 0x098 */ u8* shortNoteDurationTable; - /*!0x09C */ NotePool notePool; - /* 0x0DC */ OSMesgQueue seqDmaMesgQueue; - /* 0x0F4 */ OSMesg seqDmaMesg; - /* 0x0F8 */ OSIoMesg seqDmaIoMesg; - /* 0x110 */ OSMesgQueue bankDmaMesgQueue; - /* 0x128 */ OSMesg bankDmaMesg; - /* 0x12C */ OSIoMesg bankDmaIoMesg; - /* 0x144 */ u8* bankDmaCurrMemAddr; - /* 0x148 */ u32 bankDmaCurrDevAddr; - /* 0x14C */ s32 bankDmaRemaining; -} SequencePlayer; - -typedef struct { - u8 releaseRate; - u8 sustain; - AdsrEnvelope* envelope; -} AdsrSettings; // size = 0x8 - -typedef struct { - /*!0x00 */ union { - struct A { - /* 0x00 */ u8 unk_0b80 : 1; - /*!0x00 */ u8 hang : 1; - /*!0x00 */ u8 decay : 1; - /*!0x00 */ u8 release : 1; - /*!0x00 */ u8 state : 4; - } s; - /*!0x00 */ u8 asByte; - } action; - /*!0x01 */ u8 envIndex; - /*!0x02 */ s16 delay; - /*!0x04 */ f32 sustain; - /*!0x08 */ f32 velocity; - /*!0x0C */ f32 fadeOutVel; - /*!0x10 */ f32 current; - /*!0x14 */ f32 target; - /* */ char pad18[4]; - /*!0x1C */ AdsrEnvelope *envelope; -} AdsrState; - -typedef struct { - u8 bit0 : 1; - u8 bit1 : 1; - u8 bit2 : 2; - u8 strongRight : 1; - u8 strongLeft : 1; - u8 stereoHeadsetEffects : 1; - u8 usesHeadsetPanEffects : 1; -} ReverbBitsData; - -typedef union { - /* 0x00 */ ReverbBitsData s; - /* 0x00 */ u8 asByte; -} ReverbBits; - -typedef struct { - /*!0x00 */ u8 reverb; - /*!0x01 */ u8 unk_1; - /*!0x02 */ u8 pan; - /*!0x03 */ ReverbBits reverbBits; - /*!0x04 */ u8 unk_4; - /*!0x06 */ u16 unk_6; - /*!0x08 */ f32 freqScale; - /*!0x0C */ f32 velocity; - /*!0x10 */ s16* unk_10; - /*!0x14 */ s16 unk_14[8]; -} NoteAttributes; // size = 0x24 - -typedef struct SequenceChannel { - /* 0x00 */ u8 enabled : 1; - /* 0x00 */ u8 finished : 1; - /* 0x00 */ u8 stopScript : 1; - /* 0x00 */ u8 stopSomething2 : 1; // sets SequenceChannelLayer.stopSomething - /* 0x00 */ u8 hasInstrument : 1; - /*!0x00 */ u8 stereoHeadsetEffects : 1; - /* 0x00 */ u8 largeNotes : 1; // notes specify duration and velocity - /* 0x00 */ u8 unused : 1; // never read, set to 0 - union { - struct { - /*!0x01 */ u8 freqScale : 1; - /*!0x01 */ u8 volume : 1; - /*!0x01 */ u8 pan : 1; - } s; - /*!0x01 */ u8 asByte; - } changes; - /*!0x02 */ u8 noteAllocPolicy; - /*!0x03 */ u8 muteBehavior; - /*!0x04 */ u8 reverb; // or dry/wet mix - /*!0x05 */ u8 notePriority; // 0-3 - /* 0x06 */ u8 someOtherPriority; - /*!0x07 */ u8 bankId; - /*!0x08 */ u8 reverbIndex; - /*!0x09 */ u8 bookOffset; - /*!0x0A */ u8 newPan; - /*!0x0B */ u8 panChannelWeight; // proportion of pan that comes from the channel (0..128) - /* 0x0C */ u8 unk_0C; - /* 0x0D */ u8 padD[2]; - /* 0x0F */ u8 unk_0F; - /*!0x10 */ u16 vibratoRateStart; - /*!0x12 */ u16 vibratoExtentStart; - /*!0x14 */ u16 vibratoRateTarget; - /*!0x16 */ u16 vibratoExtentTarget; - /*!0x18 */ u16 vibratoRateChangeDelay; - /*!0x1A */ u16 vibratoExtentChangeDelay; - /*!0x1C */ u16 vibratoDelay; - /* 0x1E */ u16 delay; - /* 0x20 */ u16 unk_20; - /* 0x22 */ u16 pad22; - /*!0x24 */ s16 instOrWave; // either 0 (none), instrument index + 1, or - // 0x80..0x83 for sawtooth/triangle/sine/square waves. - /* 0x26 */ s16 transposition; - /*!0x28 */ f32 volumeScale; - /*!0x2C */ f32 volume; - /*!0x30 */ s32 pan; - /*!0x34 */ f32 appliedVolume; - /* 0x38 */ f32 freqScale; - /* 0x3C */ u8 (*dynTable)[][2]; - /* 0x40 */ struct Note* noteUnused; // never read - /* 0x44 */ struct SequenceChannelLayer* layerUnused; // never read - /* 0x48 */ Instrument* instrument; - /*!0x4C */ SequencePlayer* seqPlayer; - /*!0x54 */ struct SequenceChannelLayer* layers[4]; - /* 0x64 */ M64ScriptState scriptState; - /* */ AdsrSettings adsr; - /*!0x84 */ NotePool notePool; - /* 0xC4 */ s8 soundScriptIO[8]; // bridge between sound script and audio lib - /* 0xCC */ s16* unk_CC; - /* 0xD0 */ ReverbBits reverbBits; - /* 0xD1 */ char unk_D1[0x3]; -} SequenceChannel; - -// Maybe SequenceTrack? -typedef struct SequenceChannelLayer { - /* 0x00 */ u8 enabled : 1; - /* 0x00 */ u8 finished : 1; - /* 0x00 */ u8 stopSomething : 1; // ? - /* 0x00 */ u8 continuousNotes : 1; // keep the same note for consecutive notes with the same sound - /* 0x00 */ u8 unusedEu0b8 : 1; - /* 0x00 */ u8 bit2 : 1; - /* 0x00 */ u8 ignoreDrumPan : 1; // (wrong) - /* 0x00 */ u8 notePropertiesNeedInit : 1; - /*!0x01 */ ReverbBits reverbBits; - /* 0x02 */ u8 instOrWave; - /* 0x03 */ u8 status; - /* 0x04 */ u8 noteDuration; // set to 0x80 - /* 0x05 */ u8 portamentoTargetNote; - /*!0x06 */ u8 pan; // 0..128 - /*!0x07 */ u8 notePan; - /* 0x08 */ u16 portamentoTime; - /* 0x0A */ s16 transposition; // #semitones added to play commands - // (m64 instruction encoding only allows referring to the limited range - // 0..0x3f; this makes 0x40..0x7f accessible as well) - /* 0x0C */ f32 unk0C; - /* 0x10 */ s16 delay; // (wrong) - /* 0x12 */ s16 duration; // (wrong) - /* 0x14 */ f32 unk14; - /* 0x18 */ AdsrSettings adsr; - /*!0x20 */ Portamento portamento; - /*!0x2C */ struct Note* note; - /*!0x30 */ f32 freqScale; - /* 0x34 */ s16 shortNoteDefaultPlayPercentage; - /* 0x36 */ s16 playPercentage; // it's not really a percentage... - /*!0x38 */ f32 velocitySquare; - /* 0x3C */ s16 delayUnused; // set to 'delay', never read - /*!0x40 */ f32 noteVelocity; - /*!0x44 */ f32 noteFreqScale; - /* 0x48 */ Instrument* instrument; - /*!0x4C */ AudioBankSound* sound; - /*!0x50 */ SequenceChannel* seqChannel; - /* 0x54 */ M64ScriptState scriptState; - /* 0x70 */ AudioListItem listItem; - /* 0x80 */ char unk_80[0x10]; -} SequenceChannelLayer; - -typedef struct { - s16 adpcmdecState[0x10]; - s16 finalResampleState[0x10]; - s16 mixEnvelopeState[0x28]; - s16 panResampleState[0x10]; - s16 panSamplesBuffer[0x20]; - s16 dummyResampleState[0x10]; -} NoteSynthesisBuffers; - -typedef struct { - /* 0x00 */ u8 restart; - /* 0x01 */ u8 sampleDmaIndex; - /* 0x02 */ u8 prevHeadsetPanRight; - /* 0x03 */ u8 prevHeadsetPanLeft; - /* 0x04 */ u16 samplePosFrac; - /* 0x08 */ s32 samplePosInt; - /* 0x0C */ NoteSynthesisBuffers* synthesisBuffers; - /* 0x10 */ s16 curVolLeft; - /* 0x12 */ s16 curVolRight; -} NoteSynthesisState; - -typedef struct { - /*!0x00 */ struct SequenceChannel* seqChannel; // unless this changed to a layer...? - /*!0x04 */ u32 time; - /*!0x08 */ s16* curve; - /*!0x0C */ f32 extent; - /*!0x10 */ f32 rate; - /*!0x14 */ u8 active; - /*!0x16 */ u16 rateChangeTimer; - /*!0x18 */ u16 extentChangeTimer; - /*!0x1A */ u16 delay; -} VibratoState; // size = 0x1C - -typedef struct { - /*!0x00 */ u8 priority; - /*!0x01 */ u8 waveId; - /*!0x02 */ u8 sampleCountIndex; - /* 0x03 */ u8 bankId; - /* 0x04 */ u8 unk_04; - /* 0x05 */ u8 stereoHeadsetEffects; - /* 0x06 */ s16 adsrVolScale; - /*!0x08 */ f32 portamentoFreqScale; - /*!0x0C */ f32 vibratoFreqScale; - /* 0x10 */ SequenceChannelLayer* prevParentLayer; - /*!0x14 */ SequenceChannelLayer* parentLayer; - /*!0x18 */ SequenceChannelLayer* wantedParentLayer; - /*!0x1C */ NoteAttributes attributes; - /*!0x40 */ AdsrState adsr; - // may contain portamento, vibratoState, if those are not part of Note itself -} NotePlaybackState; - -typedef struct { - // (This might be a ReverbBits, and asByte might not exist) - union { - struct { - /* 0x00 */ volatile u8 enabled : 1; - /* 0x00 */ u8 needsInit : 1; - /* 0x00 */ u8 finished : 1; - /* 0x00 */ u8 envMixerNeedsInit : 1; - /*!0x00 */ u8 stereoStrongRight : 1; - /*!0x00 */ u8 stereoStrongLeft : 1; - /* 0x00 */ u8 stereoHeadsetEffects : 1; - /* 0x00 */ u8 usesHeadsetPanEffects : 1; - } s; - /* 0x00 */ u8 asByte; - } bitField0; - union { - struct { - /* 0x01 */ u8 reverbIndex : 3; - /*!0x01 */ u8 bookOffset : 2; - /* 0x01 */ u8 bit2 : 1; - /* 0x01 */ u8 isSyntheticWave : 1; - /* 0x01 */ u8 hasTwoAdpcmParts : 1; - } s; - /* 0x01 */ u8 asByte; - } bitField1; - /* 0x02 */ u8 unk_2; - /* 0x03 */ u8 headsetPanRight; - /* 0x04 */ u8 headsetPanLeft; - /* 0x05 */ u8 reverbVol; - /* 0x06 */ u8 unk_06; // sound shifted by 4. - /* 0x07 */ u8 unk_07; // sound shifted by 4. - /*!0x08 */ u16 targetVolLeft; - /*!0x0A */ u16 targetVolRight; - /* 0x0C */ u16 resamplingRateFixedPoint; // stored as signed but loaded as u16 - /* 0x0E */ s16 unk_10; - /*!0x10 */ union { - s16* samples; - AudioBankSound* audioBankSound; - } sound; - /* 0x14 */ s16* unk_14; - /* 0x18 */ char pad_18[0x8]; -} NoteSubEu; // size = 0x20 - -typedef struct Note { - /*!0x00 */ AudioListItem listItem; - /* 0x10 */ NoteSynthesisState synthesisState; - /* 0x24 */ char pad_24[0xC]; - /*!0x30 */ NotePlaybackState playbackState; - /*!0x90 */ Portamento portamento; - /*!0x9C */ VibratoState vibratoState; // size 0x1C - /* 0xB8 */ char pad_B8[0x4]; - /* 0xBC */ u32 unk_BC; - /*!0xC0 */ NoteSubEu noteSubEu; -} Note; // size = 0xE0 - -typedef struct { - /* 0x00 */ s16 presetUnk4; // audio frames per vsync? - /* 0x02 */ u16 frequency; - /* 0x04 */ u16 aiFrequency; // ?16 - /* 0x06 */ s16 samplesPerFrameTarget; - /* 0x08 */ s16 maxAiBufferLength; - /* 0x0A */ s16 minAiBufferLength; - /* 0x0C */ s16 updatesPerFrame; - /* 0x0E */ s16 samplesPerUpdate; - /* 0x10 */ s16 samplesPerUpdateMax; - /* 0x12 */ s16 samplesPerUpdateMin; - /* 0x14 */ f32 resampleRate; // contains 32000.0f / frequency - /* 0x18 */ f32 updatesPerFrameInv; // 1.0f / updatesPerFrame - /* 0x1C */ f32 unkUpdatesPerFrameScaled; // 3.0f / (1280.0f * updatesPerFrame) -} AudioBufferParametersEU; - -typedef struct { - u8* start; - u8* cur; - u32 size; - s32 unused; // set to 0, never read -} SoundAllocPool; - -typedef struct { - /* 0x0000 */ char unk_0000[0x14]; - /* 0x0014 */ NoteSubEu* gNoteSubsEu; - /* 0x0018 */ char unk_0014[0x282C]; - /* 0x2844 */ CtlEntry* gCtlEntries; - /* 0x2848 */ char unk_2848[0x4]; - /* 0x284C */ AudioBufferParametersEU gAudioBufferParameters; - /* 0x286C */ char unk_286C[0x28]; - /* 0x2894 */ s32 gMaxSimultaneousNotes; - /* 0x2898 */ char unk_2898[0xE8]; - /* 0x2980 */ s32 gAudioErrorFlags; - /* 0x2984 */ char unk_2984[0x3C]; - /* 0x29C0 */ SoundAllocPool gNotesAndBuffersPool; - /* 0x29D0 */ char unk_29D0[0x0B5C]; - /* 0x352C */ Note* gNotes; - /* 0x3530 */ char unk_3530[0x2654]; - /* 0x5B84 */ s32 gNoteSubEuOffset; -} AudioContext; - -typedef struct { - /*!0x00 */ u8 reverb; // volume - /* 0x01 */ u8 unk_1; - /*!0x02 */ u8 pan; - /*!0x03 */ ReverbBits reverbBits; - /*!0x04 */ f32 frequency; - /*!0x08 */ f32 velocity; - /* 0x0C */ char unk_0C[0x4]; - /* 0x10 */ s16* unk_10; - /* 0x14 */ u8 unk_14; - /* 0x16 */ u16 unk_16; -} Reverb; // size = 0x1C (May be longer) - #define NO_LAYER ((SequenceChannelLayer*)(-1)) #define NO_CHANNEL ((SequenceChannel*)(-1)) +#define TATUMS_PER_BEAT 48 + +#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((u32)(ptr) != (u32)&gAudioContext.gSequenceChannelNone) + #define ADSR_STATE_DISABLED 0 #define ADSR_STATE_INITIAL 1 #define ADSR_STATE_START_LOOP 2 @@ -513,4 +28,552 @@ typedef struct { #define ADSR_GOTO -2 #define ADSR_RESTART -3 +struct Note; +struct NotePool; +struct SequenceChannel; +struct SequenceChannelLayer; + +typedef struct AudioListItem { + // A node in a circularly linked list. Each node is either a head or an item: + // - Items can be either detached (prev = NULL), or attached to a list. + // 'value' points to something of interest. + // - List heads are always attached; if a list is empty, its head points + // to itself. 'count' contains the size of the list. + // If the list holds notes, 'pool' points back to the pool where it lives. + // Otherwise, that member is NULL. + /* 0x00 */ struct AudioListItem* prev; + /* 0x04 */ struct AudioListItem* next; + /* 0x08 */ union { + void* value; // either Note* or SequenceChannelLayer* + s32 count; + } u; + /* 0x0C */ struct NotePool* pool; +} AudioListItem; // size = 0x10 + +typedef struct NotePool { + /* 0x00 */ AudioListItem disabled; + /* 0x10 */ AudioListItem decaying; + /* 0x20 */ AudioListItem releasing; + /* 0x30 */ AudioListItem active; +} NotePool; + +// Pitch sliding by up to one octave in the positive direction. Negative +// direction is "supported" by setting extent to be negative. The code +// exterpolates exponentially in the wrong direction in that case, but that +// doesn't prevent seqplayer from doing it, AFAICT. +typedef struct { + /* 0x00 */ u8 mode; // bit 0x80 denotes something; the rest are an index 0-5 + /* 0x02 */ u16 cur; + /* 0x04 */ u16 speed; + /* 0x08 */ f32 extent; +} Portamento; // size = 0xC + +typedef struct { + /*?0x0 */ s16 delay; + /*?0x2 */ s16 arg; +} AdsrEnvelope; // size = 0x4? + +typedef struct { + /*?0x00 */ u32 start; + /* 0x04 */ u32 end; + /*?0x08 */ u32 count; + /*?0x0C */ char unk_0C[0x4]; + /*?0x10 */ s16 state[16]; // only exists if count != 0. 8-byte aligned +} AdpcmLoop; + +typedef struct { + /*?0x00 */ s32 order; + /*?0x04 */ s32 npredictors; + /*?0x08 */ s16 book[1]; // size 8 * order * npredictors. 8-byte aligned +} AdpcmBook; + +typedef struct { + /* 0x00 */ u8 bits4 : 4; + /* 0x00 */ u8 bits2 : 2; + /*?0x01 */ u8 loaded; + /*?0x04 */ u8* sampleAddr; + /* 0x08 */ AdpcmLoop* loop; + /*?0x0C */ AdpcmBook* book; + /*?0x10 */ u32 sampleSize; // never read. either 0 or 1 mod 9, depending on padding +} AudioBankSample; + +typedef struct { + /* 0x00 */ AudioBankSample* sample; + /* 0x04 */ f32 tuning; // frequency scale factor +} AudioBankSound; // size = 0x8 + +typedef struct { + // contained within a larger struct, struct might not start at offset zero + /* 0x00 */ AudioBankSound sound; // offset might be wrong + /* 0x10 */ u8 pad[0x2c0]; +} LargeSound; // size = 0x2C8 + +typedef struct { + /*?0x00 */ u8 loaded; + /* 0x01 */ u8 normalRangeLo; + /* 0x02 */ u8 normalRangeHi; + /* 0x03 */ u8 releaseRate; + /* 0x04 */ AdsrEnvelope* envelope; + /* 0x08 */ AudioBankSound lowNotesSound; + /* 0x10 */ AudioBankSound normalNotesSound; + /* 0x18 */ AudioBankSound highNotesSound; +} Instrument; // size >= 0x20 + +typedef struct { + /* 0x00 */ u8 releaseRate; + /* 0x01 */ u8 pan; + /*?0x02 */ u8 loaded; + /* 0x04 */ AudioBankSound sound; + /* 0x14 */ AdsrEnvelope *envelope; +} Drum; // size >= 0x14 + +typedef struct { + u32 unk_0; + u32 unk_4; +} UnkInstrument; // TODO: probably the same as AudioBankSound + +typedef struct { + /* 0x00 */ u8 numInstruments; + /* 0x01 */ u8 numDrums; + /* 0x02 */ char unk_02[0x02]; + /* 0x04 */ u16 numUnkInstruments; + /* 0x08 */ Instrument** instruments; + /* 0x0C */ Drum** drums; + /* 0x10 */ UnkInstrument* unkInstruments; +} CtlEntry; // size = 0x14 + +typedef struct { + /* 0x00 */ u8* pc; + /* 0x04 */ u8* stack[4]; + /* 0x14 */ u8 remLoopIters[4]; + /* 0x18 */ u8 depth; + /* 0x19 */ s8 value; +} M64ScriptState; // size = 0x1C + +// Also known as a Group, according to sm64 debug strings. +typedef struct { + /* 0x000 */ u8 enabled : 1; + /*?0x000 */ u8 finished : 1; + /* 0x000 */ u8 muted : 1; + /* 0x000 */ u8 seqDmaInProgress : 1; + /* 0x000 */ u8 bankDmaInProgress : 1; + /*?0x000 */ u8 recalculateVolume : 1; + /* 0x000 */ u8 unk_0b2 : 1; + /* 0x000 */ u8 unk_0b1 : 1; + /* 0x001 */ u8 state; + /* 0x002 */ u8 noteAllocPolicy; + /* 0x003 */ u8 muteBehavior; + /* 0x004 */ u8 seqId; + /* 0x005 */ u8 defaultBank; + /*?0x006 */ u8 loadingBankId; + /*?0x007 */ s8 seqVariationEu[1]; + /* 0x008 */ u16 tempo; // tatums per minute + /* 0x00A */ u16 tempoAcc; + /* 0x00C */ u16 unk_0C; + /* 0x00E */ s16 transposition; + /* 0x010 */ u16 delay; + /* 0x012 */ u16 fadeTimer; + /* 0x014 */ u16 fadeTimerUnkEu; + /* 0x016 */ char pad_16[0x2]; + /* 0x018 */ u8* seqData; + /* 0x01C */ f32 fadeVolume; + /* 0x020 */ f32 fadeVelocity; + /* 0x024 */ f32 volume; + /* 0x028 */ f32 muteVolumeScale; + /* 0x02C */ f32 fadeVolumeScale; + /* 0x030 */ f32 appliedFadeVolume; + /* 0x034 */ f32 unk_34; + /* 0x038 */ struct SequenceChannel* channels[16]; + /*?0x078 */ M64ScriptState scriptState; + /* 0x094 */ u8* shortNoteVelocityTable; + /* 0x098 */ u8* shortNoteDurationTable; + /* 0x09C */ NotePool notePool; + /* 0x0DC */ s32 unk_DC; + /* 0x0D0 */ u32 unk_E0; + /* 0x0E4 */ u8 pad_E4[0x10]; // OSMesgQueue seqDmaMesgQueue; + /*?0x0F4 */ OSMesg seqDmaMesg; + /*?0x0F8 */ OSIoMesg seqDmaIoMesg; + /*?0x110 */ OSMesgQueue bankDmaMesgQueue; + /*?0x128 */ OSMesg bankDmaMesg; + /*?0x12C */ OSIoMesg bankDmaIoMesg; + /*?0x144 */ u8* bankDmaCurrMemAddr; + /*?0x148 */ u32 bankDmaCurrDevAddr; + /*?0x14C */ s32 bankDmaRemaining; + /* */ u8 pad_150[8]; + /* 0x158 */ s8 unk_158[8]; // seqVariationEu? soundScriptIO? +} SequencePlayer; // size = 0x160 + +typedef struct { + /* 0x0 */ u8 releaseRate; + /* 0x1 */ u8 sustain; + /* 0x4 */ AdsrEnvelope* envelope; +} AdsrSettings; // size = 0x8 + +typedef struct { + /* 0x00 */ union { + struct A { + /* 0x00 */ u8 unk_0b80 : 1; + /* 0x00 */ u8 hang : 1; + /* 0x00 */ u8 decay : 1; + /* 0x00 */ u8 release : 1; + /* 0x00 */ u8 state : 4; + } s; + /* 0x00 */ u8 asByte; + } action; + /* 0x01 */ u8 envIndex; + /* 0x02 */ s16 delay; + /* 0x04 */ f32 sustain; + /* 0x08 */ f32 velocity; + /* 0x0C */ f32 fadeOutVel; + /* 0x10 */ f32 current; + /* 0x14 */ f32 target; + /* */ char pad_18[4]; + /* 0x1C */ AdsrEnvelope *envelope; +} AdsrState; + +typedef struct { + /* 0x00 */ u8 bit0 : 1; + /* 0x00 */ u8 bit1 : 1; + /* 0x00 */ u8 bit2 : 2; + /* 0x00 */ u8 strongRight : 1; + /* 0x00 */ u8 strongLeft : 1; + /* 0x00 */ u8 stereoHeadsetEffects : 1; + /* 0x00 */ u8 usesHeadsetPanEffects : 1; +} ReverbBitsData; + +typedef union { + /* 0x00 */ ReverbBitsData s; + /* 0x00 */ u8 asByte; +} ReverbBits; + +typedef struct { + /* 0x00 */ u8 reverb; + /* 0x01 */ u8 unk_1; + /* 0x02 */ u8 pan; + /* 0x03 */ ReverbBits reverbBits; + /* 0x04 */ u8 unk_4; + /* 0x06 */ u16 unk_6; + /* 0x08 */ f32 freqScale; + /* 0x0C */ f32 velocity; + /* 0x10 */ s16* unk_10; + /* 0x14 */ s16 unk_14[8]; +} NoteAttributes; // size = 0x24 + +// Also known as a SubTrack, according to sm64 debug strings. +// Confusingly, a SubTrack is a container of Tracks. +typedef struct SequenceChannel { + /* 0x00 */ u8 enabled : 1; + /* 0x00 */ u8 finished : 1; + /* 0x00 */ u8 stopScript : 1; + /* 0x00 */ u8 stopSomething2 : 1; // sets SequenceChannelLayer.stopSomething + /* 0x00 */ u8 hasInstrument : 1; + /* 0x00 */ u8 stereoHeadsetEffects : 1; + /* 0x00 */ u8 largeNotes : 1; // notes specify duration and velocity + /* 0x00 */ u8 unused : 1; // still unused? + union { + struct { + /* 0x01 */ u8 freqScale : 1; + /* 0x01 */ u8 volume : 1; + /* 0x01 */ u8 pan : 1; + } s; + /* 0x01 */ u8 asByte; + } changes; + /* 0x02 */ u8 noteAllocPolicy; + /* 0x03 */ u8 muteBehavior; + /* 0x04 */ u8 reverb; // or dry/wet mix + /* 0x05 */ u8 notePriority; // 0-3 + /* 0x06 */ u8 someOtherPriority; + /* 0x07 */ u8 bankId; + /* 0x08 */ u8 reverbIndex; + /* 0x09 */ u8 bookOffset; + /* 0x0A */ u8 newPan; + /* 0x0B */ u8 panChannelWeight; // proportion of pan that comes from the channel (0..128) + /* 0x0C */ u8 unk_0C; + /* 0x0D */ u8 velocityRandomVariance; + /* 0x0E */ u8 durationRandomVariance; + /* 0x0F */ u8 unk_0F; + /* 0x10 */ u16 vibratoRateStart; + /* 0x12 */ u16 vibratoExtentStart; + /* 0x14 */ u16 vibratoRateTarget; + /* 0x16 */ u16 vibratoExtentTarget; + /* 0x18 */ u16 vibratoRateChangeDelay; + /* 0x1A */ u16 vibratoExtentChangeDelay; + /* 0x1C */ u16 vibratoDelay; + /* 0x1E */ u16 delay; + /* 0x20 */ u16 unk_20; + /* 0x22 */ u16 pad_22; + /* 0x24 */ s16 instOrWave; // either 0 (none), instrument index + 1, or + // 0x80..0x83 for sawtooth/triangle/sine/square waves. + /* 0x26 */ s16 transposition; + /* 0x28 */ f32 volumeScale; + /* 0x2C */ f32 volume; + /* 0x30 */ s32 pan; + /* 0x34 */ f32 appliedVolume; + /* 0x38 */ f32 freqScale; + /*?0x3C */ u8 (*dynTable)[][2]; + /* 0x40 */ struct Note* noteUnused; // still unused? + /*?0x44 */ struct SequenceChannelLayer* layerUnused; // still unused? + /* 0x48 */ Instrument* instrument; + /* 0x4C */ SequencePlayer* seqPlayer; + /* 0x50 */ struct SequenceChannelLayer* layers[4]; + /* 0x60 */ M64ScriptState scriptState; + /* 0x7C */ AdsrSettings adsr; + /* 0x84 */ NotePool notePool; + /* 0xC4 */ s8 soundScriptIO[8]; // bridge between sound script and audio lib + /* 0xCC */ s16* unk_CC; + /* 0xD0 */ ReverbBits reverbBits; +} SequenceChannel; // size = 0xD4 + +// Also known as a Track, according to sm64 debug strings. +typedef struct SequenceChannelLayer { + /* 0x00 */ u8 enabled : 1; + /* 0x00 */ u8 finished : 1; + /* 0x00 */ u8 stopSomething : 1; + /* 0x00 */ u8 continuousNotes : 1; // keep the same note for consecutive notes with the same sound + /* 0x00 */ u8 bit3 : 1; // "loaded"? + /* 0x00 */ u8 ignoreDrumPan : 1; + /* 0x00 */ u8 bit1 : 1; // "has initialized continuous notes"? + /* 0x00 */ u8 notePropertiesNeedInit : 1; + /* 0x01 */ ReverbBits reverbBits; + /* 0x02 */ u8 instOrWave; + /* 0x03 */ u8 noteDuration; + /* 0x04 */ u8 semitone; + /* 0x05 */ u8 portamentoTargetNote; + /* 0x06 */ u8 pan; // 0..128 + /* 0x07 */ u8 notePan; + /* 0x08 */ s16 delay; + /* 0x0A */ s16 duration; + /* 0x0C */ s16 delay2; + /* 0x0E */ u16 portamentoTime; + /* 0x10 */ s16 transposition; // #semitones added to play commands + // (m64 instruction encoding only allows referring to the limited range + // 0..0x3f; this makes 0x40..0x7f accessible as well) + /* 0x12 */ s16 shortNoteDefaultPlayPercentage; + /* 0x14 */ s16 playPercentage; + /* 0x18 */ AdsrSettings adsr; + /* 0x20 */ Portamento portamento; + /* 0x2C */ struct Note* note; + /* 0x30 */ f32 freqScale; + /* 0x34 */ f32 unk_34; + /* 0x38 */ f32 velocitySquare2; + /* 0x3C */ f32 velocitySquare; // not sure which one of those corresponds to the sm64 original + /* 0x40 */ f32 noteVelocity; + /* 0x44 */ f32 noteFreqScale; + /* 0x48 */ Instrument* instrument; + /* 0x4C */ AudioBankSound* sound; + /* 0x50 */ SequenceChannel* seqChannel; + /* 0x54 */ M64ScriptState scriptState; + /* 0x70 */ AudioListItem listItem; +} SequenceChannelLayer; // size = 0x80 + +typedef struct { + /*?00 */ s16 adpcmdecState[0x10]; + /*?00 */ s16 finalResampleState[0x10]; + /*?00 */ s16 mixEnvelopeState[0x28]; + /*?00 */ s16 panResampleState[0x10]; + /*?00 */ s16 panSamplesBuffer[0x20]; + /*?00 */ s16 dummyResampleState[0x10]; +} NoteSynthesisBuffers; + +typedef struct { + /*?0x00 */ u8 restart; + /*?0x01 */ u8 sampleDmaIndex; + /*?0x02 */ u8 prevHeadsetPanRight; + /*?0x03 */ u8 prevHeadsetPanLeft; + /*?0x04 */ u16 samplePosFrac; + /*?0x08 */ s32 samplePosInt; + /* 0x0C */ NoteSynthesisBuffers* synthesisBuffers; + /*?0x10 */ s16 curVolLeft; + /*?0x12 */ s16 curVolRight; +} NoteSynthesisState; + +typedef struct { + /* 0x00 */ struct SequenceChannel* seqChannel; + /* 0x04 */ u32 time; + /* 0x08 */ s16* curve; + /* 0x0C */ f32 extent; + /* 0x10 */ f32 rate; + /* 0x14 */ u8 active; + /*!0x16 */ u16 rateChangeTimer; + /* 0x18 */ u16 extentChangeTimer; + /* 0x1A */ u16 delay; +} VibratoState; // size = 0x1C + +typedef struct { + /* 0x00 */ u8 priority; + /* 0x01 */ u8 waveId; + /* 0x02 */ u8 sampleCountIndex; + /* 0x03 */ u8 bankId; + /* 0x04 */ u8 unk_04; + /* 0x05 */ u8 stereoHeadsetEffects; + /* 0x06 */ s16 adsrVolScale; // unused? + /* 0x08 */ f32 portamentoFreqScale; + /* 0x0C */ f32 vibratoFreqScale; + /*?0x10 */ SequenceChannelLayer* prevParentLayer; + /* 0x14 */ SequenceChannelLayer* parentLayer; + /* 0x18 */ SequenceChannelLayer* wantedParentLayer; + /* 0x1C */ NoteAttributes attributes; + /* 0x40 */ AdsrState adsr; + // may contain portamento, vibratoState, if those are not part of Note itself +} NotePlaybackState; + +typedef struct { + // these bitfields should perhaps be merged into a single struct + union { + struct { + /*?0x00 */ volatile u8 enabled : 1; + /* 0x00 */ u8 needsInit : 1; + /*?0x00 */ u8 finished : 1; + /*?0x00 */ u8 envMixerNeedsInit : 1; + /* 0x00 */ u8 stereoStrongRight : 1; + /* 0x00 */ u8 stereoStrongLeft : 1; + /* 0x00 */ u8 stereoHeadsetEffects : 1; + /* 0x00 */ u8 usesHeadsetPanEffects : 1; + } s; + /*?0x00 */ u8 asByte; + } bitField0; + union { + struct { + /*?0x01 */ u8 reverbIndex : 3; + /* 0x01 */ u8 bookOffset : 2; + /*?0x01 */ u8 bit2 : 1; + /*?0x01 */ u8 isSyntheticWave : 1; + /*?0x01 */ u8 hasTwoAdpcmParts : 1; + } s; + /*?0x01 */ u8 asByte; + } bitField1; + /* 0x02 */ u8 unk_2; + /*?0x03 */ u8 headsetPanRight; + /*?0x04 */ u8 headsetPanLeft; + /*?0x05 */ u8 reverbVol; + /* 0x06 */ u8 unk_06; + /* 0x07 */ u8 unk_07; + /* 0x08 */ u16 targetVolLeft; + /* 0x0A */ u16 targetVolRight; + /*?0x0C */ u16 resamplingRateFixedPoint; // stored as signed but loaded as u16 + /* 0x0E */ s16 unk_10; + /* 0x10 */ union { + s16* samples; + AudioBankSound* audioBankSound; + } sound; // not sure if actually a union + /* 0x14 */ s16* unk_14; + /* 0x18 */ char pad_18[0x8]; +} NoteSubEu; // size = 0x20 + +typedef struct Note { + /* 0x00 */ AudioListItem listItem; + /*?0x10 */ NoteSynthesisState synthesisState; + /* 0x24 */ char pad_24[0xC]; + /* 0x30 */ NotePlaybackState playbackState; + /* 0x90 */ Portamento portamento; + /* 0x9C */ VibratoState vibratoState; + /* 0xB8 */ char pad_B8[0x4]; + /* 0xBC */ u32 unk_BC; + /* 0xC0 */ NoteSubEu noteSubEu; +} Note; // size = 0xE0 + +typedef struct { + // everything here is wildly wrong, and the struct might not start at + // zero (it's embedded into another struct) + /*?0x00 */ s16 presetUnk4; // audio frames per vsync? + /*?0x02 */ u16 frequency; + /*?0x04 */ u16 aiFrequency; // ?16 + /*?0x06 */ s16 samplesPerFrameTarget; + /* 0x08 */ s16 unk_08; // maxAiBufferLength; + /*?0x0A */ s16 minAiBufferLength; + /*?0x0C */ s16 updatesPerFrame; + /*?0x0E */ s16 samplesPerUpdate; + /* 0x10 */ s16 unk_10; // samplesPerUpdateMax; + /*?0x12 */ s16 samplesPerUpdateMin; + /* 0x14 */ f32 resampleRate; // contains 32000.0f / frequency + /* 0x18 */ f32 updatesPerFrameInv; // 1.0f / updatesPerFrame + /*?0x1C */ f32 unkUpdatesPerFrameScaled; // 3.0f / (1280.0f * updatesPerFrame) +} AudioBufferParametersEU; + +typedef struct { + /* 0x0 */ u8* start; + /* 0x4 */ u8* cur; + /* 0x8 */ u32 size; + /* 0xC */ s32 unused; // set to 0, never read +} SoundAllocPool; // size = 0x10 + +typedef struct { + /* 0x0 */ u8 *ptr; + /*?0x4 */ u32 size; + /* */ u16 pad; + /* 0xA */ s16 id; // seqId or bankId +} SeqOrBankEntry; // size = 0xC + +typedef struct +{ + /* 0x00*/ u32 numEntries; + /* 0x04*/ SoundAllocPool pool; + /*?0x14*/ SeqOrBankEntry entries[16]; +} PersistentPool; // size = 0xD4 + +typedef struct +{ + /* 0x00*/ u32 nextSide; + /* 0x04*/ SoundAllocPool pool; + /* 0x14*/ SeqOrBankEntry entries[2]; +} TemporaryPool; // size = 0x3C + +typedef struct +{ + /* 0x000*/ PersistentPool persistent; + /* 0x0D4*/ TemporaryPool temporary; + /* 0x100*/ u8 pad[0x10]; +} SoundMultiPool; // size = 0x110 + +typedef struct { + /* 0x0000 */ char unk_0000[0x14]; + /* 0x0014 */ NoteSubEu* gNoteSubsEu; + /* 0x0018 */ char unk_0018[0x280]; + /*?0x0298 */ LargeSound largeSounds[1]; // size <= 14, offset might be wrong + /* 0x0560 */ char unk_0560[0x22E4]; + /* 0x2844 */ CtlEntry* gCtlEntries; + /* 0x2848 */ char unk_2848[0x4]; + /*?0x284C */ AudioBufferParametersEU gAudioBufferParameters; // offset might be wrong + /* 0x286C */ f32 unk_286C; + /* 0x2870 */ f32 unk_2870; + /* 0x2874 */ char unk_2874[0x20]; + /* 0x2894 */ s32 gMaxSimultaneousNotes; // (bad name) + /* 0x2898 */ s16 unk_2898; + /* 0x289A */ s8 gSoundMode; + /* 0x289B */ char unk_289B[0xE1]; + /* 0x297C */ u32 gAudioRandom; + /* 0x2980 */ s32 gAudioErrorFlags; + /* 0x2984 */ char unk_2984[0x3C]; + /* 0x29C0 */ SoundAllocPool gNotesAndBuffersPool; + /* 0x29D0 */ char unk_29D0[0x20]; // probably two unused pools + /* 0x29F0 */ SoundAllocPool gSeqAndBankPool; + /* 0x2A00 */ SoundAllocPool gTemporaryCommonPool; + /* 0x2A10 */ SoundAllocPool gPersistentCommonPool; + /* 0x2A20 */ SoundMultiPool gSeqLoadedPool; + /* 0x2B30 */ SoundMultiPool gBankLoadedPool; + /* 0x2C40 */ SoundMultiPool gUnusedLoadedPool; + /* 0x2D50 */ char unk_2D50[0x7D0]; + /* 0x3520 */ f32* unk_3520; + /* 0x3524 */ char unk_3524[8]; + /* 0x352C */ Note* gNotes; + /* 0x3530 */ SequencePlayer gSequencePlayers[4]; + /* 0x3AB0 */ SequenceChannelLayer gSequenceLayers[64]; + /* 0x5AB0 */ SequenceChannel gSequenceChannelNone; + /* 0x5B84 */ s32 gNoteSubEuOffset; + /* 0x5B88 */ AudioListItem gLayerFreeList; +} AudioContext; // might be bigger + +typedef struct { + /* 0x00 */ u8 reverb; // i.e. volume + /* 0x01 */ u8 unk_1; + /* 0x02 */ u8 pan; + /* 0x03 */ ReverbBits reverbBits; + /* 0x04 */ f32 frequency; + /* 0x08 */ f32 velocity; + /* 0x0C */ char unk_0C[0x4]; + /* 0x10 */ s16* unk_10; + /* 0x14 */ u8 unk_14; + /* 0x16 */ u16 unk_16; +} Reverb; // size >= 0x18 + #endif diff --git a/include/z64transition.h b/include/z64transition.h index aa0c3779ad..45b9b12b14 100644 --- a/include/z64transition.h +++ b/include/z64transition.h @@ -4,11 +4,16 @@ #include #include +typedef struct { + f32 unk_0; + f32 unk_4; +} TransitionUnkData; + typedef struct { /* 0x00 */ s32 row; /* 0x04 */ s32 col; /* 0x08 */ s32 frame; - /* 0x0C */ f32* unk_0C; + /* 0x0C */ TransitionUnkData* unk_0C; /* 0x10 */ Vtx* vtxFrame1; /* 0x14 */ Vtx* vtxFrame2; /* 0x18 */ Mtx projection; diff --git a/spec b/spec index 572d24f748..0d1dd451fb 100644 --- a/spec +++ b/spec @@ -1035,8 +1035,7 @@ endseg beginseg name "ovl_Bg_Jya_Megami" include "build/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.o" - include "build/data/overlays/actors/z_bg_jya_megami.data.o" - include "build/data/overlays/actors/z_bg_jya_megami.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Jya_Megami/ovl_Bg_Jya_Megami_reloc.o" endseg beginseg @@ -1291,8 +1290,7 @@ endseg beginseg name "ovl_Bg_Spot11_Bakudankabe" include "build/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o" - include "build/data/overlays/actors/z_bg_spot11_bakudankabe.data.o" - include "build/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o" endseg beginseg @@ -1343,8 +1341,7 @@ endseg beginseg name "ovl_Bg_Spot17_Bakudankabe" include "build/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.o" - include "build/data/overlays/actors/z_bg_spot17_bakudankabe.data.o" - include "build/data/overlays/actors/z_bg_spot17_bakudankabe.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/ovl_Bg_Spot17_Bakudankabe_reloc.o" endseg beginseg @@ -1430,11 +1427,7 @@ endseg beginseg name "ovl_Bg_Ydan_Maruta" include "build/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_Bg_Ydan_Maruta/ovl_Bg_Ydan_Maruta_reloc.o" -#else - include "build/data/overlays/actors/z_bg_ydan_maruta.reloc.o" -#endif endseg beginseg @@ -2291,8 +2284,7 @@ endseg beginseg name "ovl_En_Dy_Extra" include "build/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o" - include "build/data/overlays/actors/z_en_dy_extra.data.o" - include "build/data/overlays/actors/z_en_dy_extra.reloc.o" + include "build/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o" endseg beginseg @@ -2339,8 +2331,7 @@ endseg beginseg name "ovl_En_Ex_Ruppy" include "build/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.o" - include "build/data/overlays/actors/z_en_ex_ruppy.data.o" - include "build/data/overlays/actors/z_en_ex_ruppy.reloc.o" + include "build/src/overlays/actors/ovl_En_Ex_Ruppy/ovl_En_Ex_Ruppy_reloc.o" endseg beginseg @@ -3171,11 +3162,7 @@ endseg beginseg name "ovl_En_Syateki_Niw" include "build/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_En_Syateki_Niw/ovl_En_Syateki_Niw_reloc.o" -#else - include "build/data/overlays/actors/z_en_syateki_niw.reloc.o" -#endif endseg beginseg @@ -3470,8 +3457,7 @@ endseg beginseg name "ovl_Item_Ocarina" include "build/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o" - include "build/data/overlays/actors/z_item_ocarina.data.o" - include "build/data/overlays/actors/z_item_ocarina.reloc.o" + include "build/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o" endseg beginseg @@ -3562,8 +3548,7 @@ endseg beginseg name "ovl_Obj_Hsblock" include "build/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o" - include "build/data/overlays/actors/z_obj_hsblock.data.o" - include "build/data/overlays/actors/z_obj_hsblock.reloc.o" + include "build/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o" endseg beginseg diff --git a/src/code/audio_effects.c b/src/code/audio_effects.c index dac0aa48a7..180f80abaf 100644 --- a/src/code/audio_effects.c +++ b/src/code/audio_effects.c @@ -29,7 +29,7 @@ void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalcul if (layer != NULL && layer->enabled && layer->note != NULL) { if (layer->notePropertiesNeedInit) { layer->noteFreqScale = layer->freqScale * chanFreqScale; - layer->noteVelocity = layer->velocitySquare * seqChannel->appliedVolume; + layer->noteVelocity = layer->velocitySquare2 * seqChannel->appliedVolume; layer->notePan = (seqChannel->pan + layer->pan * (0x80 - seqChannel->panChannelWeight)) >> 7; layer->notePropertiesNeedInit = 0; } else { @@ -37,7 +37,7 @@ void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalcul layer->noteFreqScale = layer->freqScale * chanFreqScale; } if (seqChannel->changes.s.volume || recalculateVolume) { - layer->noteVelocity = layer->velocitySquare * seqChannel->appliedVolume; + layer->noteVelocity = layer->velocitySquare2 * seqChannel->appliedVolume; } if (seqChannel->changes.s.pan) { layer->notePan = (seqChannel->pan + layer->pan * (0x80 - seqChannel->panChannelWeight)) >> 7; @@ -258,7 +258,7 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { break; default: - adsr->delay *= D_801719EC; + adsr->delay *= gAudioContext.unk_286C; if (adsr->delay == 0) { adsr->delay = 1; } diff --git a/src/code/audio_heap.c b/src/code/audio_heap.c index 2d04112445..04d4ae7f68 100644 --- a/src/code/audio_heap.c +++ b/src/code/audio_heap.c @@ -19,35 +19,35 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE2B0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_SoundAlloc.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_AllocDmaMemory.s") #pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE344.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE380.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_AllocZeroed.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE3DC.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_Alloc.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE434.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_SoundAllocPoolInit.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE45C.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_PersistentPoolClear.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE470.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_TemporaryPoolClear.s") #pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE4A0.s") #pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE4B0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE5F0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_InitMainPools.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE650.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_SessionPoolsInit.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE6D4.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_SeqAndBankPoolInit.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE758.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_PersistentPoolsInit.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE81C.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_TemporaryPoolsInit.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DE8E0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/Audio_AllocBankOrSeq.s") #pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DF074.s") diff --git a/src/code/audio_playback.c b/src/code/audio_playback.c index 790a5ecd09..08e3b2ca77 100644 --- a/src/code/audio_playback.c +++ b/src/code/audio_playback.c @@ -31,7 +31,7 @@ void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb) { sub->bitField0.s.stereoStrongLeft = 0; sub->bitField0.s.stereoHeadsetEffects = sp24.stereoHeadsetEffects; sub->bitField0.s.usesHeadsetPanEffects = sp24.usesHeadsetPanEffects; - if (stereoHeadsetEffects && gSoundMode == 1) { + if (stereoHeadsetEffects && gAudioContext.gSoundMode == 1) { smallPanIndex = pan >> 1; if (smallPanIndex > 0x3f) { smallPanIndex = 0x3f; @@ -43,7 +43,7 @@ void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb) { volLeft = gHeadsetPanVolume[pan]; volRight = gHeadsetPanVolume[0x7f - pan]; - } else if (stereoHeadsetEffects && gSoundMode == 0) { + } else if (stereoHeadsetEffects && gAudioContext.gSoundMode == 0) { strongLeft = strongRight = 0; sub->headsetPanRight = 0; sub->headsetPanLeft = 0; @@ -77,7 +77,7 @@ void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb) { break; } - } else if (gSoundMode == 3) { + } else if (gAudioContext.gSoundMode == 3) { sub->bitField0.s.stereoHeadsetEffects = 0; sub->bitField0.s.usesHeadsetPanEffects = 0; volLeft = 0.707f; @@ -229,7 +229,7 @@ void Audio_ProcessNotes(void) { } } else { if (playbackState->parentLayer != NO_LAYER) { - playbackState->parentLayer->ignoreDrumPan = 1; // wrong field name + playbackState->parentLayer->bit1 = 1; } Audio_NoteDisable(note); Audio_AudioListRemove(¬e->listItem); @@ -239,7 +239,7 @@ void Audio_ProcessNotes(void) { } } else if (playbackState->adsr.action.s.state == ADSR_STATE_DISABLED) { if (playbackState->parentLayer != NO_LAYER) { - playbackState->parentLayer->ignoreDrumPan = 1; // wrong field name + playbackState->parentLayer->bit1 = 1; } Audio_NoteDisable(note); Audio_AudioListRemove(¬e->listItem); @@ -315,7 +315,7 @@ Instrument* Audio_GetInstrumentInner(s32 bankId, s32 instId) { return NULL; } - if (func_800E18B0(bankId) == 0) { + if (!Audio_IsBankLoadComplete(bankId)) { gAudioContext.gAudioErrorFlags = bankId + 0x10000000; return NULL; } @@ -341,7 +341,7 @@ Drum* Audio_GetDrum(s32 bankId, s32 drumId) { return NULL; } - if (func_800E18B0(bankId) == 0) { + if (!Audio_IsBankLoadComplete(bankId)) { gAudioContext.gAudioErrorFlags = bankId + 0x10000000; return NULL; } @@ -369,7 +369,7 @@ UnkInstrument* Audio_GetUnkInstrument(s32 bankId, s32 unkInstrumentId) { return NULL; } - if (func_800E18B0(bankId) == 0) { + if (!Audio_IsBankLoadComplete(bankId)) { gAudioContext.gAudioErrorFlags = bankId + 0x10000000; return NULL; } @@ -401,27 +401,27 @@ s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, UnkInstrument* arg3) { return -1; } - if (func_800E18B0(bankId) == 0) { + if (!Audio_IsBankLoadComplete(bankId)) { return -2; } switch (instrument) { case 0: - if (instId >= (gAudioContext.gCtlEntries[bankId].numDrums)) { + if (instId >= gAudioContext.gCtlEntries[bankId].numDrums) { return -3; } gAudioContext.gCtlEntries[bankId].drums[instId] = (void*)arg3; break; case 1: - if (instId >= (gAudioContext.gCtlEntries[bankId].numUnkInstruments)) { + if (instId >= gAudioContext.gCtlEntries[bankId].numUnkInstruments) { return -3; } gAudioContext.gCtlEntries[bankId].unkInstruments[instId] = *arg3; break; default: - if (instId >= (gAudioContext.gCtlEntries[bankId].numInstruments)) { + if (instId >= gAudioContext.gCtlEntries[bankId].numInstruments) { return -3; } gAudioContext.gCtlEntries[bankId].instruments[instId] = (void*)arg3; @@ -441,7 +441,7 @@ void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target) return; } - seqLayer->unusedEu0b8 = 0; + seqLayer->bit3 = 0; if (seqLayer->note == NULL) { return; @@ -508,9 +508,9 @@ void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target) note->playbackState.unk_04 = 1; note->playbackState.adsr.action.s.decay = 1; if (seqLayer->adsr.releaseRate == 0) { - note->playbackState.adsr.fadeOutVel = D_801726A0[seqLayer->seqChannel->adsr.releaseRate]; + note->playbackState.adsr.fadeOutVel = gAudioContext.unk_3520[seqLayer->seqChannel->adsr.releaseRate]; } else { - note->playbackState.adsr.fadeOutVel = D_801726A0[seqLayer->adsr.releaseRate]; + note->playbackState.adsr.fadeOutVel = gAudioContext.unk_3520[seqLayer->adsr.releaseRate]; } note->playbackState.adsr.sustain = ((f32)(s32)(seqLayer->seqChannel->adsr.sustain) * note->playbackState.adsr.current) / 256.0f; @@ -754,7 +754,7 @@ void Audio_NoteInitForLayer(Note* note, SequenceChannelLayer* seqLayer) { note->playbackState.parentLayer = seqLayer; playback->priority = seqLayer->seqChannel->notePriority; seqLayer->notePropertiesNeedInit = 1; - seqLayer->unusedEu0b8 = 1; + seqLayer->bit3 = 1; seqLayer->note = note; seqLayer->seqChannel->noteUnused = note; seqLayer->seqChannel->layerUnused = seqLayer; @@ -906,7 +906,7 @@ Note* Audio_AllocNote(SequenceChannelLayer* seqLayer) { return ret; null_return: - seqLayer->unusedEu0b8 = 1; + seqLayer->bit3 = 1; return NULL; } @@ -931,6 +931,6 @@ void Audio_NoteInitAll(void) { note->portamento.speed = 0; note->playbackState.stereoHeadsetEffects = 0; note->unk_BC = 0; - note->synthesisState.synthesisBuffers = Audio_SoundAlloc(&gAudioContext.gNotesAndBuffersPool, 0x1E0); + note->synthesisState.synthesisBuffers = Audio_AllocDmaMemory(&gAudioContext.gNotesAndBuffersPool, 0x1E0); } } diff --git a/src/code/audio_seqplayer.c b/src/code/audio_seqplayer.c index 2cc3d6e9c6..da5a2ff5c9 100644 --- a/src/code/audio_seqplayer.c +++ b/src/code/audio_seqplayer.c @@ -1,74 +1,1076 @@ #include #include -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9340.s") +#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80) +#define PORTAMENTO_MODE(x) ((x).mode & ~0x80) +#define PORTAMENTO_MODE_1 1 +#define PORTAMENTO_MODE_2 2 +#define PORTAMENTO_MODE_3 3 +#define PORTAMENTO_MODE_4 4 +#define PORTAMENTO_MODE_5 5 -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E93A8.s") +extern u8 D_80130470[]; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9584.s") +u8 Audio_M64ReadU8(M64ScriptState* state); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E96D8.s") +s16 Audio_M64ReadS16(M64ScriptState* state); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E97FC.s") +u16 Audio_M64ReadCompressedU16(M64ScriptState* state); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9878.s") +u8 Audio_GetInstrument(SequenceChannel* seqChannel, u8 instId, Instrument** instOut, AdsrSettings* adsr); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelDisable.s") +u16 Audio_GetScriptControlFlowArgument(M64ScriptState* state, u8 arg1) { + u8 temp_v0 = D_80130470[arg1]; + u8 loBits = temp_v0 & 3; + u16 ret = 0; + if (loBits == 1) { + if ((temp_v0 & 0x80) == 0) { + ret = Audio_M64ReadU8(state); + } else { + ret = Audio_M64ReadS16(state); + } + } + return ret; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9934.s") +s32 Audio_HandleScriptFlowControl(SequencePlayer* seqPlayer, M64ScriptState* state, s32 cmd, s32 arg) { + switch (cmd) { + case 0xFF: + if (state->depth == 0) { + return -1; + } + state->pc = state->stack[--state->depth]; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9A2C.s") + case 0xFD: + return Audio_M64ReadCompressedU16(state); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9AAC.s") + case 0xFE: + return 1; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9B44.s") + case 0xFC: + state->stack[state->depth++] = state->pc; + state->pc = seqPlayer->seqData + (u16)arg; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerDisable.s") + case 0xF8: + state->remLoopIters[state->depth] = arg; + state->stack[state->depth++] = state->pc; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_AudioListPushBack.s") + case 0xF7: + state->remLoopIters[state->depth - 1]--; + if (state->remLoopIters[state->depth - 1] != 0) { + state->pc = state->stack[state->depth - 1]; + } else { + state->depth--; + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_AudioListPopBack.s") + case 0xF6: + state->depth--; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9CA8.s") + case 0xF5: + case 0xF9: + case 0xFA: + case 0xFB: + if (cmd == 0xFA && state->value != 0) { + break; + } + if (cmd == 0xF9 && state->value >= 0) { + break; + } + if (cmd == 0xF5 && state->value < 0) { + break; + } + state->pc = seqPlayer->seqData + (u16)arg; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9D48.s") + case 0xF2: + case 0xF3: + case 0xF4: + if (cmd == 0xF3 && state->value != 0) { + break; + } + if (cmd == 0xF2 && state->value >= 0) { + break; + } + state->pc += (s8)(arg & 0xFF); + break; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9D5C.s") + return 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9D94.s") +void Audio_SequenceChannelInit(SequenceChannel* seqChannel) { + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9DD4.s") + if (seqChannel == &gAudioContext.gSequenceChannelNone) { + return; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9ED8.s") + seqChannel->enabled = 0; + seqChannel->finished = 0; + seqChannel->stopScript = 0; + seqChannel->stopSomething2 = 0; + seqChannel->hasInstrument = 0; + seqChannel->stereoHeadsetEffects = 0; + seqChannel->transposition = 0; + seqChannel->largeNotes = 0; + seqChannel->bookOffset = 0; + seqChannel->reverbBits.asByte = 0; + seqChannel->changes.asByte = 0xff; + seqChannel->scriptState.depth = 0; + seqChannel->newPan = 0x40; + seqChannel->panChannelWeight = 0x80; + seqChannel->velocityRandomVariance = 0; + seqChannel->durationRandomVariance = 0; + seqChannel->noteUnused = NULL; + seqChannel->reverbIndex = 0; + seqChannel->reverb = 0; + seqChannel->unk_0C = 0; + seqChannel->notePriority = 3; + seqChannel->someOtherPriority = 1; + seqChannel->delay = 0; + seqChannel->adsr.envelope = gDefaultEnvelope; + seqChannel->adsr.releaseRate = 0xf0; + seqChannel->adsr.sustain = 0; + seqChannel->vibratoRateTarget = 0x800; + seqChannel->vibratoRateStart = 0x800; + seqChannel->vibratoExtentTarget = 0; + seqChannel->vibratoExtentStart = 0; + seqChannel->vibratoRateChangeDelay = 0; + seqChannel->vibratoExtentChangeDelay = 0; + seqChannel->vibratoDelay = 0; + seqChannel->unk_CC = NULL; + seqChannel->unk_20 = 0; + seqChannel->unk_0F = 0; + seqChannel->volume = 1.0f; + seqChannel->volumeScale = 1.0f; + seqChannel->freqScale = 1.0f; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800E9F64.s") + for (i = 0; i < 8; i++) { + seqChannel->soundScriptIO[i] = -1; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EA0C0.s") + seqChannel->unused = 0; + Audio_InitNoteLists(&seqChannel->notePool); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EA440.s") +s32 Audio_SeqChannelSetLayer(SequenceChannel* seqChannel, s32 layerIdx) { + SequenceChannelLayer* layer; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EAAE0.s") + if (seqChannel->layers[layerIdx] == NULL) { + SequenceChannelLayer* layer; + layer = Audio_AudioListPopBack(&gAudioContext.gLayerFreeList); + seqChannel->layers[layerIdx] = layer; + if (layer == NULL) { + seqChannel->layers[layerIdx] = NULL; + return -1; + } + } else { + Audio_SeqChanLayerNoteDecay(seqChannel->layers[layerIdx]); + } -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EAEF4.s") + layer = seqChannel->layers[layerIdx]; + layer->seqChannel = seqChannel; + layer->adsr = seqChannel->adsr; + layer->adsr.releaseRate = 0; + layer->enabled = 1; + layer->finished = 0; + layer->stopSomething = 0; + layer->continuousNotes = 0; + layer->bit3 = 0; + layer->ignoreDrumPan = 0; + layer->bit1 = 0; + layer->notePropertiesNeedInit = 0; + layer->reverbBits.asByte = 0; + layer->portamento.mode = 0; + layer->scriptState.depth = 0; + layer->noteDuration = 0x80; + layer->pan = 0x40; + layer->transposition = 0; + layer->delay = 0; + layer->duration = 0; + layer->delay2 = 0; + layer->note = NULL; + layer->instrument = NULL; + layer->freqScale = 1.0f; + layer->unk_34 = 1.0f; + layer->velocitySquare2 = 0.0f; + layer->instOrWave = 0xff; + return 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EAF24.s") +void Audio_SeqChannelLayerDisable(SequenceChannelLayer* layer) { + if (layer != NULL) { + if (layer->seqChannel != &gAudioContext.gSequenceChannelNone && layer->seqChannel->seqPlayer->finished == 1) { + Audio_SeqChanLayerNoteRelease(layer); + } else { + Audio_SeqChanLayerNoteDecay(layer); + } + layer->enabled = 0; + layer->finished = 1; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EAF98.s") +void Audio_SeqChannelLayerFree(SequenceChannel* seqChannel, s32 layerIdx) { + SequenceChannelLayer* layer = seqChannel->layers[layerIdx]; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EB044.s") + if (layer != NULL) { + Audio_AudioListPushBack(&gAudioContext.gLayerFreeList, &layer->listItem); + Audio_SeqChannelLayerDisable(layer); + seqChannel->layers[layerIdx] = NULL; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EB068.s") +void Audio_SequenceChannelDisable(SequenceChannel* seqChannel) { + s32 i; + for (i = 0; i < 4; i++) { + Audio_SeqChannelLayerFree(seqChannel, i); + } -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EBD58.s") + Audio_NotePoolClear(&seqChannel->notePool); + seqChannel->enabled = 0; + seqChannel->finished = 1; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC564.s") +void Audio_SequencePlayerInitChannels(SequencePlayer* seqPlayer, u16 channelBits) { + SequenceChannel* seqChannel; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC618.s") + for (i = 0; i < 0x10; i++) { + if (channelBits & 1) { + seqChannel = seqPlayer->channels[i]; + seqChannel->bankId = seqPlayer->defaultBank; + seqChannel->muteBehavior = seqPlayer->muteBehavior; + seqChannel->noteAllocPolicy = seqPlayer->noteAllocPolicy; + } + channelBits = channelBits >> 1; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC668.s") +void Audio_SequencePlayerDisableChannels(SequencePlayer* seqPlayer, u16 channelBitsUnused) { + SequenceChannel* seqChannel; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC734.s") + for (i = 0; i < 0x10; i++) { + seqChannel = seqPlayer->channels[i]; + if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == 1) { + Audio_SequenceChannelDisable(seqChannel); + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC80C.s") +void Audio_SequenceChannelEnable(SequencePlayer* seqPlayer, u8 channelIdx, void* script) { + SequenceChannel* seqChannel = seqPlayer->channels[channelIdx]; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/func_800EC8DC.s") + seqChannel->enabled = 1; + seqChannel->finished = 0; + seqChannel->scriptState.depth = 0; + seqChannel->scriptState.pc = script; + seqChannel->delay = 0; + for (i = 0; i < 4; i++) { + if (seqChannel->layers[i] != NULL) { + Audio_SeqChannelLayerFree(seqChannel, i); + } + } +} + +void Audio_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) { + seqPlayer->finished = 1; + Audio_SequencePlayerDisable(seqPlayer); +} + +void Audio_SequencePlayerDisable(SequencePlayer* seqPlayer) { + Audio_SequencePlayerDisableChannels(seqPlayer, 0xffff); + Audio_NotePoolClear(&seqPlayer->notePool); + if (!seqPlayer->enabled) { + return; + } + seqPlayer->enabled = 0; + seqPlayer->finished = 1; + + if (Audio_IsSeqLoadComplete(seqPlayer->seqId)) { + Audio_SetSeqLoadStatus(seqPlayer->seqId, 3); + } + if (Audio_IsBankLoadComplete(seqPlayer->defaultBank)) { + Audio_SetBankLoadStatus(seqPlayer->defaultBank, 4); + } + + if (seqPlayer->defaultBank == gAudioContext.gBankLoadedPool.temporary.entries[0].id) { + gAudioContext.gBankLoadedPool.temporary.nextSide = 0; + } else if (seqPlayer->defaultBank == gAudioContext.gBankLoadedPool.temporary.entries[1].id) { + gAudioContext.gBankLoadedPool.temporary.nextSide = 1; + } +} + +void Audio_AudioListPushBack(AudioListItem* list, AudioListItem* item) { + if (item->prev == NULL) { + list->prev->next = item; + item->prev = list->prev; + item->next = list; + list->prev = item; + list->u.count++; + item->pool = list->pool; + } +} + +void* Audio_AudioListPopBack(AudioListItem* list) { + AudioListItem* item = list->prev; + if (item == list) { + return NULL; + } + item->prev->next = list; + list->prev = item->prev; + item->prev = NULL; + list->u.count--; + return item->u.value; +} + +void Audio_InitLayerFreelist(void) { + s32 i; + + gAudioContext.gLayerFreeList.prev = &gAudioContext.gLayerFreeList; + gAudioContext.gLayerFreeList.next = &gAudioContext.gLayerFreeList; + gAudioContext.gLayerFreeList.u.count = 0; + gAudioContext.gLayerFreeList.pool = NULL; + + for (i = 0; i < ARRAY_COUNT(gAudioContext.gSequenceLayers); i++) { + gAudioContext.gSequenceLayers[i].listItem.u.value = &gAudioContext.gSequenceLayers[i]; + gAudioContext.gSequenceLayers[i].listItem.prev = NULL; + Audio_AudioListPushBack(&gAudioContext.gLayerFreeList, &gAudioContext.gSequenceLayers[i].listItem); + } +} + +u8 Audio_M64ReadU8(M64ScriptState* state) { + return *(state->pc++); +} + +s16 Audio_M64ReadS16(M64ScriptState* state) { + s16 ret = *(state->pc++) << 8; + ret = *(state->pc++) | ret; + return ret; +} + +u16 Audio_M64ReadCompressedU16(M64ScriptState* state) { + u16 ret = *(state->pc++); + if (ret & 0x80) { + ret = (ret << 8) & 0x7f00; + ret = *(state->pc++) | ret; + } + return ret; +} + +void func_800E9ED8(SequenceChannelLayer* layer); +s32 func_800E9F64(SequenceChannelLayer* layer, s32 arg1); +s32 func_800EA0C0(SequenceChannelLayer* layer); +s32 func_800EA440(SequenceChannelLayer* layer, s32 arg1); +s32 func_800EAAE0(SequenceChannelLayer* layer, s32 arg1); + +void Audio_SeqChannelLayerProcessScript(SequenceChannelLayer* layer) { + s32 val; + + if (layer->enabled == 0) { + return; + } + + if (layer->delay > 1) { + layer->delay--; + if (!layer->stopSomething && layer->delay <= layer->duration) { + Audio_SeqChanLayerNoteDecay(layer); + layer->stopSomething = 1; + } + return; + } + + func_800E9ED8(layer); + val = func_800EA0C0(layer); + if (val == -1) { + return; + } + + val = func_800EAAE0(layer, val); + if (val != -1) { + val = func_800EA440(layer, val); + } + if (val != -1) { + func_800E9F64(layer, val); + } + + if (layer->stopSomething == 1) { + if ((layer->note != NULL) || layer->continuousNotes) { + Audio_SeqChanLayerNoteDecay(layer); + } + } +} + +void func_800E9ED8(SequenceChannelLayer* layer) { + if (!layer->continuousNotes) { + Audio_SeqChanLayerNoteDecay(layer); + } else if (layer->note != NULL && layer->note->playbackState.wantedParentLayer == layer) { + Audio_SeqChanLayerNoteDecay(layer); + } + + if (PORTAMENTO_MODE(layer->portamento) == PORTAMENTO_MODE_1 || + PORTAMENTO_MODE(layer->portamento) == PORTAMENTO_MODE_2) { + layer->portamento.mode = 0; + } + layer->notePropertiesNeedInit = 1; +} + +s32 func_800E9F64(SequenceChannelLayer* layer, s32 arg1) { + if (!layer->stopSomething && layer->sound != NULL && layer->sound->sample->bits4 == 2 && + layer->sound->sample->bits2 != 0) { + layer->stopSomething = 1; + return -1; + } + + if (layer->continuousNotes == 1 && layer->bit1 == 1) { + return 0; + } + + if (layer->continuousNotes == 1 && layer->note != NULL && layer->bit3 && arg1 == 1 && + layer->note->playbackState.parentLayer == layer) { + if (layer->sound == NULL) { + Audio_InitSyntheticWave(layer->note, layer); + } + } else { + if (arg1 == 0) { + Audio_SeqChanLayerNoteDecay(layer); + } + layer->note = Audio_AllocNote(layer); + if (layer->note != NULL && layer->note->playbackState.parentLayer == layer) { + Audio_NoteVibratoInit(layer->note); + } + } + + if (layer->note != NULL && layer->note->playbackState.parentLayer == layer) { + Note* note = layer->note; + Audio_NotePortamentoInit(note); + } + return 0; +} + +s32 func_800EA0C0(SequenceChannelLayer* layer) { + SequenceChannel* seqChannel = layer->seqChannel; + M64ScriptState* state = &layer->scriptState; + SequencePlayer* seqPlayer = seqChannel->seqPlayer; + u16 sp3A; + u8 cmd; + + for (;;) { + cmd = Audio_M64ReadU8(state); + if (cmd < 0xC1) { + return cmd; + } + if (cmd >= 0xF2) { + u16 arg = Audio_GetScriptControlFlowArgument(state, cmd); + if (Audio_HandleScriptFlowControl(seqPlayer, state, cmd, arg) == 0) { + continue; + } + Audio_SeqChannelLayerDisable(layer); + return -1; + } + + switch (cmd) { + case 0xC1: // layer_setshortnotevelocity + case 0xCA: // layer_setpan + { + u8 tempByte = *(state->pc++); + if (cmd == 0xC1) { + layer->velocitySquare = (f32)(tempByte * tempByte) / 16129.0f; + } else { + layer->pan = tempByte; + } + break; + } + + case 0xC9: // layer_setshortnoteduration + case 0xC2: // layer_transpose; set transposition in semitones + { + u8 tempByte = *(state->pc++); + if (cmd == 0xC9) { + layer->noteDuration = tempByte; + } else { + layer->transposition = tempByte; + } + break; + } + + case 0xC4: // layer_continuousnoteson + case 0xC5: // layer_continuousnotesoff + if (cmd == 0xC4) { + layer->continuousNotes = 1; + } else { + layer->continuousNotes = 0; + } + layer->bit1 = 0; + Audio_SeqChanLayerNoteDecay(layer); + break; + + case 0xC3: // layer_setshortnotedefaultplaypercentage + sp3A = Audio_M64ReadCompressedU16(state); + layer->shortNoteDefaultPlayPercentage = sp3A; + break; + + case 0xC6: // layer_setinstr + cmd = Audio_M64ReadU8(state); + if (cmd >= 0x7E) { + if (cmd == 0x7E) { + layer->instOrWave = 1; + } else if (cmd == 0x7F) { + layer->instOrWave = 0; + } else { + layer->instOrWave = cmd; + layer->instrument = NULL; + } + + if (cmd == 0xFF) { + layer->adsr.releaseRate = 0; + } + + break; + } + + if ((layer->instOrWave = Audio_GetInstrument(seqChannel, cmd, &layer->instrument, &layer->adsr)) == 0) { + layer->instOrWave = 0xFF; + } + break; + + case 0xC7: // layer_portamento + layer->portamento.mode = Audio_M64ReadU8(state); + + cmd = Audio_M64ReadU8(state); + cmd += seqChannel->transposition; + cmd += layer->transposition; + cmd += seqPlayer->transposition; + + if (cmd >= 0x80) { + cmd = 0; + } + + layer->portamentoTargetNote = cmd; + + // If special, the next param is u8 instead of var + if (PORTAMENTO_IS_SPECIAL(layer->portamento)) { + layer->portamentoTime = *(state->pc++); + break; + } + + sp3A = Audio_M64ReadCompressedU16(state); + layer->portamentoTime = sp3A; + break; + + case 0xC8: // layer_disableportamento + layer->portamento.mode = 0; + break; + + case 0xCB: + sp3A = Audio_M64ReadS16(state); + layer->adsr.envelope = (AdsrEnvelope*)(seqPlayer->seqData + sp3A); + // fallthrough + + case 0xCF: + layer->adsr.releaseRate = Audio_M64ReadU8(state); + break; + + case 0xCC: + layer->ignoreDrumPan = 1; + break; + + case 0xCD: + layer->reverbBits.asByte = Audio_M64ReadU8(state); + break; + + case 0xCE: { + u8 tempByte = Audio_M64ReadU8(state); + layer->unk_34 = D_8012F4B4[(tempByte + 0x80) & 0xFF]; + break; + } + + default: + switch (cmd & 0xF0) { + case 0xD0: // layer_setshortnotevelocityfromtable + sp3A = seqPlayer->shortNoteVelocityTable[cmd & 0xF]; + layer->velocitySquare = (f32)(sp3A * sp3A) / 16129.0f; + break; + case 0xE0: // layer_setshortnotedurationfromtable + layer->noteDuration = (u8)seqPlayer->shortNoteDurationTable[cmd & 0xF]; + break; + } + } + } +} + +s32 func_800EA440(SequenceChannelLayer* layer, s32 arg1) { + s32 sameSound; + s32 instOrWave; + s32 speed; + f32 temp_f14; + f32 temp_f2; + Portamento* portamento; + f32 freqScale; + f32 freqScale2; + AudioBankSound* sound; + Instrument* instrument; + Drum* drum; + AudioBankSound* unkInstrument; + SequenceChannel* seqChannel; + SequencePlayer* seqPlayer; + u8 cmd; + u16 unkInstrumentId; + s32 cmd2; + s32 vel; + f32 time; + f32 tuning; + + sameSound = 1; + cmd = arg1; + + instOrWave = layer->instOrWave; + seqChannel = layer->seqChannel; + seqPlayer = seqChannel->seqPlayer; + + if (instOrWave == 0xFF) { + if (!seqChannel->hasInstrument) { + return -1; + } + instOrWave = seqChannel->instOrWave; + } + + switch (instOrWave) { + case 0: + cmd += seqChannel->transposition + layer->transposition; + layer->semitone = cmd; + drum = Audio_GetDrum(seqChannel->bankId, cmd); + if (drum == NULL) { + layer->stopSomething = 1; + layer->delay2 = layer->delay; + return -1; + } + sound = &drum->sound; + layer->adsr.envelope = (AdsrEnvelope*)drum->envelope; + layer->adsr.releaseRate = (u8)drum->releaseRate; + if (!layer->ignoreDrumPan) { + layer->pan = drum->pan; + } + layer->sound = sound; + layer->freqScale = sound->tuning; + break; + + case 1: + layer->semitone = cmd; + unkInstrumentId = (layer->transposition << 6) + cmd; + sound = (AudioBankSound*)Audio_GetUnkInstrument(seqChannel->bankId, unkInstrumentId); + if (sound == NULL) { + layer->stopSomething = 1; + layer->delay2 = layer->delay + 1; + return -1; + } + layer->sound = sound; + layer->freqScale = sound->tuning; + break; + + default: + cmd += seqPlayer->transposition + seqChannel->transposition + layer->transposition; + cmd2 = cmd; + layer->semitone = cmd; + if (cmd >= 0x80) { + layer->stopSomething = 1; + return -1; + } + if (layer->instOrWave == 0xFF) { + instrument = seqChannel->instrument; + } else { + instrument = layer->instrument; + } + + if (layer->portamento.mode != 0) { + portamento = &layer->portamento; + vel = (cmd > layer->portamentoTargetNote) ? cmd : layer->portamentoTargetNote; + + if (instrument != NULL) { + sound = Audio_InstrumentGetAudioBankSound(instrument, vel); + sameSound = (layer->sound == sound); + layer->sound = sound; + tuning = sound->tuning; + } else { + layer->sound = NULL; + tuning = 1.0f; + if (instOrWave >= 0xC0) { + layer->sound = &gAudioContext.largeSounds[instOrWave - 0xC0].sound; + } + } + + temp_f2 = gNoteFrequencies[cmd2] * tuning; + temp_f14 = gNoteFrequencies[layer->portamentoTargetNote] * tuning; + + switch (PORTAMENTO_MODE(*portamento)) { + case PORTAMENTO_MODE_1: + case PORTAMENTO_MODE_3: + case PORTAMENTO_MODE_5: + freqScale2 = temp_f2; + freqScale = temp_f14; + break; + case PORTAMENTO_MODE_2: + case PORTAMENTO_MODE_4: + freqScale = temp_f2; + freqScale2 = temp_f14; + break; + default: + freqScale = temp_f2; + freqScale2 = temp_f2; + break; + } + + portamento->extent = (freqScale2 / freqScale) - 1.0f; + + if (PORTAMENTO_IS_SPECIAL(*portamento)) { + speed = seqPlayer->tempo * 0x8000 / gAudioContext.unk_2898; + if (layer->delay != 0) { + speed = speed * 0x100 / (layer->delay * layer->portamentoTime); + } + } else { + speed = 0x20000 / (layer->portamentoTime * gAudioContext.gAudioBufferParameters.unk_08); + } + + if (speed >= 0x7FFF) { + speed = 0x7FFF; + } else if (speed < 1) { + speed = 1; + } + + portamento->speed = speed; + portamento->cur = 0; + layer->freqScale = freqScale; + if (PORTAMENTO_MODE(*portamento) == PORTAMENTO_MODE_5) { + layer->portamentoTargetNote = cmd; + } + break; + } + + if (instrument != NULL) { + sound = Audio_InstrumentGetAudioBankSound(instrument, cmd); + sameSound = (sound == layer->sound); + layer->sound = sound; + layer->freqScale = gNoteFrequencies[cmd2] * sound->tuning; + } else { + layer->sound = NULL; + layer->freqScale = gNoteFrequencies[cmd2]; + if (instOrWave >= 0xC0) { + layer->sound = &gAudioContext.largeSounds[instOrWave - 0xC0].sound; + } + } + break; + } + + layer->delay2 = layer->delay; + layer->freqScale *= layer->unk_34; + if (layer->delay == 0) { + if (layer->sound != NULL) { + time = (f32)layer->sound->sample->loop->end; + } else { + time = 0.0f; + } + time *= seqPlayer->tempo; + time *= gAudioContext.unk_2870; + time /= layer->freqScale; + if (time > 32766.0f) { + time = 32766.0f; + } + layer->duration = 0; + layer->delay = (u16)(s32)time + 1; + if (layer->portamento.mode != 0) { + // (It's a bit unclear if 'portamento' has actually always been + // set when this is reached...) + if (PORTAMENTO_IS_SPECIAL(*portamento)) { + s32 speed2; + speed2 = seqPlayer->tempo * 0x8000 / gAudioContext.unk_2898; + speed2 = speed2 * 0x100 / (layer->delay * layer->portamentoTime); + if (speed2 >= 0x7FFF) { + speed2 = 0x7FFF; + } else if (speed2 < 1) { + speed2 = 1; + } + portamento->speed = speed2; + } + } + } + return sameSound; +} + +s32 func_800EAAE0(SequenceChannelLayer* layer, s32 arg1) { + M64ScriptState* state; + u16 playPercentage; + s32 velocity; + SequenceChannel* seqChannel; + SequencePlayer* seqPlayer; + s32 intDelta; + f32 floatDelta; + + state = &layer->scriptState; + seqChannel = layer->seqChannel; + seqPlayer = seqChannel->seqPlayer; + + if (arg1 == 0xC0) { + layer->delay = Audio_M64ReadCompressedU16(state); + layer->stopSomething = 1; + layer->bit1 = 0; + return -1; + } + + layer->stopSomething = 0; + if (seqChannel->largeNotes == 1) { + switch (arg1 & 0xC0) { + case 0: + playPercentage = Audio_M64ReadCompressedU16(state); + velocity = *(state->pc++); + layer->noteDuration = *(state->pc++); + layer->playPercentage = playPercentage; + break; + + case 0x40: + playPercentage = Audio_M64ReadCompressedU16(state); + velocity = *(state->pc++); + layer->noteDuration = 0; + layer->playPercentage = playPercentage; + break; + + case 0x80: + playPercentage = layer->playPercentage; + velocity = *(state->pc++); + layer->noteDuration = *(state->pc++); + break; + } + + if (velocity > 0x7F || velocity < 0) { + velocity = 0x7F; + } + layer->velocitySquare = (f32)velocity * (f32)velocity / 16129.0f; + arg1 -= (arg1 & 0xC0); + } else { + switch (arg1 & 0xC0) { + case 0: + playPercentage = Audio_M64ReadCompressedU16(state); + layer->playPercentage = playPercentage; + break; + + case 0x40: + playPercentage = layer->shortNoteDefaultPlayPercentage; + break; + + case 0x80: + playPercentage = layer->playPercentage; + break; + } + arg1 -= (arg1 & 0xC0); + } + + if (seqChannel->velocityRandomVariance != 0) { + floatDelta = + layer->velocitySquare * (f32)(gAudioContext.gAudioRandom % seqChannel->velocityRandomVariance) / 100.0f; + if ((gAudioContext.gAudioRandom & 0x8000) != 0) { + floatDelta = -floatDelta; + } + layer->velocitySquare2 = layer->velocitySquare + floatDelta; + if (layer->velocitySquare2 < 0.0f) { + layer->velocitySquare2 = 0.0f; + } else if (layer->velocitySquare2 > 1.0f) { + layer->velocitySquare2 = 1.0f; + } + } else { + layer->velocitySquare2 = layer->velocitySquare; + } + + layer->delay = playPercentage; + layer->duration = (layer->noteDuration * playPercentage) >> 8; + if (seqChannel->durationRandomVariance != 0) { + // @bug should probably be durationRandomVariance + intDelta = (layer->duration * (gAudioContext.gAudioRandom % seqChannel->velocityRandomVariance)) / 100; + if ((gAudioContext.gAudioRandom & 0x4000) != 0) { + intDelta = -intDelta; + } + layer->duration += intDelta; + if (layer->duration < 0) { + layer->duration = 0; + } else if (layer->duration > layer->delay) { + layer->duration = layer->delay; + } + } + + if ((seqPlayer->muted && (seqChannel->muteBehavior & (0x40 | 0x10)) != 0) || seqChannel->stopSomething2) { + layer->stopSomething = 1; + return -1; + } + if (seqPlayer->unk_DC != 0) { + layer->stopSomething = 1; + return -1; + } + return arg1; +} + +void func_800EAEF4(SequenceChannel* seqChannel, u8 arg1) { + if ((arg1 & 0xF) != 0) { + seqChannel->notePriority = arg1 & 0xF; + } + arg1 = arg1 >> 4; + if (arg1 != 0) { + seqChannel->someOtherPriority = arg1; + } +} + +u8 Audio_GetInstrument(SequenceChannel* seqChannel, u8 instId, Instrument** instOut, AdsrSettings* adsr) { + Instrument* inst = Audio_GetInstrumentInner(seqChannel->bankId, instId); + if (inst == NULL) { + *instOut = NULL; + return 0; + } + adsr->envelope = inst->envelope; + adsr->releaseRate = inst->releaseRate; + *instOut = inst; + instId += 2; + return instId; +} + +void Audio_SetInstrument(SequenceChannel* seqChannel, u8 instId) { + if (instId >= 0x80) { + seqChannel->instOrWave = instId; + seqChannel->instrument = NULL; + } else if (instId == 0x7F) { + seqChannel->instOrWave = 0; + seqChannel->instrument = (Instrument*)1; + } else if (instId == 0x7E) { + seqChannel->instOrWave = 1; + seqChannel->instrument = (Instrument*)2; + } else if ((seqChannel->instOrWave = + Audio_GetInstrument(seqChannel, instId, &seqChannel->instrument, &seqChannel->adsr)) == 0) { + seqChannel->hasInstrument = 0; + return; + } + seqChannel->hasInstrument = 1; +} + +void Audio_SequenceChannelSetVolume(SequenceChannel* seqChannel, u8 volume) { + seqChannel->volume = (f32)(s32)volume / 127.0f; +} + +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s") + +void Audio_SequenceChannelProcessScript(SequenceChannel* seqChannel); + +#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s") + +void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer); + +void Audio_ProcessSequences(s32 arg0) { + SequencePlayer* seqPlayer; + u32 i; + + gAudioContext.gNoteSubEuOffset = + (gAudioContext.gAudioBufferParameters.unk_08 - arg0 - 1) * gAudioContext.gMaxSimultaneousNotes; + for (i = 0; i < (u32)gAudioContext.gAudioBufferParameters.unk_10; i++) { + seqPlayer = &gAudioContext.gSequencePlayers[i]; + if (seqPlayer->enabled == 1) { + Audio_SequencePlayerProcessSequence(seqPlayer); + Audio_SequencePlayerProcessSound(seqPlayer); + } + } + Audio_ProcessNotes(); +} + +void Audio_ProcessSequence(SequencePlayer* seqPlayer) { + while (seqPlayer->unk_DC > 0) { + Audio_SequencePlayerProcessSequence(seqPlayer); + Audio_SequencePlayerProcessSound(seqPlayer); + seqPlayer->unk_DC--; + } +} + +void Audio_ResetSequencePlayer(SequencePlayer* seqPlayer) { + s32 i; + + Audio_SequencePlayerDisable(seqPlayer); + seqPlayer->unk_0b2 = 0; + seqPlayer->delay = 0; + seqPlayer->state = 1; + seqPlayer->fadeTimer = 0; + seqPlayer->fadeTimerUnkEu = 0; + seqPlayer->tempoAcc = 0; + seqPlayer->tempo = 120 * TATUMS_PER_BEAT; // 120 BPM + seqPlayer->unk_0C = 0; + seqPlayer->transposition = 0; + seqPlayer->noteAllocPolicy = 0; + seqPlayer->shortNoteVelocityTable = gDefaultShortNoteVelocityTable; + seqPlayer->shortNoteDurationTable = gDefaultShortNoteDurationTable; + seqPlayer->unk_E0 = 0; + seqPlayer->fadeVolume = 1.0f; + seqPlayer->fadeVelocity = 0.0f; + seqPlayer->volume = 0.0f; + seqPlayer->muteVolumeScale = 0.5f; + + for (i = 0; i < 0x10; i++) { + Audio_SequenceChannelInit(seqPlayer->channels[i]); + } +} + +void func_800EC734(s32 seqPlayerIdx) { + SequenceChannel* seqChannel; + SequencePlayer* seqPlayer; + s32 i, j; + + seqPlayer = &gAudioContext.gSequencePlayers[seqPlayerIdx]; + for (i = 0; i < 0x10; i++) { + seqPlayer->channels[i] = Audio_AllocZeroed(&gAudioContext.gNotesAndBuffersPool, sizeof(SequenceChannel)); + if (seqPlayer->channels[i] == NULL) { + seqPlayer->channels[i] = &gAudioContext.gSequenceChannelNone; + } else { + seqChannel = seqPlayer->channels[i]; + seqChannel->seqPlayer = seqPlayer; + seqChannel->enabled = 0; + for (j = 0; j < 4; j++) { + seqChannel->layers[j] = NULL; + } + } + Audio_SequenceChannelInit(seqPlayer->channels[i]); + } +} + +void Audio_InitSequencePlayer(SequencePlayer* seqPlayer) { + s32 i, j; + + for (i = 0; i < 0x10; i++) { + seqPlayer->channels[i] = &gAudioContext.gSequenceChannelNone; + } + + seqPlayer->enabled = 0; + seqPlayer->muted = 0; + seqPlayer->bankDmaInProgress = 0; + seqPlayer->seqDmaInProgress = 0; + seqPlayer->unk_0b1 = 0; + + for (j = 0; j < 8; j++) { + seqPlayer->unk_158[j] = -1; + } + seqPlayer->muteBehavior = 0x40 | 0x20; + seqPlayer->fadeVolumeScale = 1.0f; + seqPlayer->unk_34 = 1.0f; + Audio_InitNoteLists(&seqPlayer->notePool); + Audio_ResetSequencePlayer(seqPlayer); +} + +void Audio_InitSequencePlayers(void) { + s32 i; + + Audio_InitLayerFreelist(); + for (i = 0; i < 64; i++) { + gAudioContext.gSequenceLayers[i].seqChannel = NULL; + gAudioContext.gSequenceLayers[i].enabled = 0; + } + + for (i = 0; i < 4; i++) { + Audio_InitSequencePlayer(&gAudioContext.gSequencePlayers[i]); + } +} diff --git a/src/code/code_800E11F0.c b/src/code/code_800E11F0.c index d89413ed5b..0cf0be4fac 100644 --- a/src/code/code_800E11F0.c +++ b/src/code/code_800E11F0.c @@ -9,15 +9,15 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E1618.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E18B0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/Audio_IsBankLoadComplete.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E1928.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/Audio_IsSeqLoadComplete.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E19A0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E1A18.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/Audio_SetBankLoadStatus.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E1A48.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/Audio_SetSeqLoadStatus.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_800E11F0/func_800E1A78.s") diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 9f277f3ebe..966c39ba2d 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -36,115 +36,118 @@ void FlagSet_Update(GlobalContext* globalCtx) { { &gSaveContext.eventInf[2], "event_inf[2]" }, { &gSaveContext.eventInf[3], "event_inf[3]" }, }; - GraphicsContext* gfxCtx; - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + Input* input = &globalCtx->state.input[0]; Gfx* gfx; Gfx* polyOpa; - Gfx* dispRefs[5]; - GfxPrint printer; - Input* input = &globalCtx->state.input[0]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../flg_set.c", 131); - polyOpa = gfxCtx->polyOpa.p; - gfx = Graph_GfxPlusOne(polyOpa); - gSPDisplayList(gfxCtx->overlay.p++, gfx); + OPEN_DISPS(gfxCtx, "../flg_set.c", 131); - GfxPrint_Init(&printer); - GfxPrint_Open(&printer, gfx); - GfxPrint_SetColor(&printer, 250, 50, 50, 255); - GfxPrint_SetPos(&printer, 4, 13); - GfxPrint_Printf(&printer, entries[entryIdx].name); - GfxPrint_SetPos(&printer, 4, 15); + { + GfxPrint printer; + s32 pad; - for (bitIdx = 15; bitIdx >= 0; bitIdx--) { - if (bitIdx == curBit) { - GfxPrint_SetColor(&printer, 200, 200, 200, 255); - } else { - GfxPrint_SetColor(&printer, 100, 100, 100, 255); + polyOpa = oGfxCtx->polyOpa.p; + gfx = Graph_GfxPlusOne(polyOpa); + gSPDisplayList(oGfxCtx->overlay.p++, gfx); + + GfxPrint_Init(&printer); + GfxPrint_Open(&printer, gfx); + GfxPrint_SetColor(&printer, 250, 50, 50, 255); + GfxPrint_SetPos(&printer, 4, 13); + GfxPrint_Printf(&printer, entries[entryIdx].name); + GfxPrint_SetPos(&printer, 4, 15); + + for (bitIdx = 15; bitIdx >= 0; bitIdx--) { + if (bitIdx == curBit) { + GfxPrint_SetColor(&printer, 200, 200, 200, 255); + } else { + GfxPrint_SetColor(&printer, 100, 100, 100, 255); + } + + if (*entries[entryIdx].value & (1 << bitIdx)) { + GfxPrint_Printf(&printer, "1"); + } else { + GfxPrint_Printf(&printer, "0"); + } + + if ((bitIdx % 4) == 0) { + GfxPrint_Printf(&printer, " "); + } } - if (*entries[entryIdx].value & (1 << bitIdx)) { - GfxPrint_Printf(&printer, "1"); - } else { - GfxPrint_Printf(&printer, "0"); - } - - if ((bitIdx % 4) == 0) { - GfxPrint_Printf(&printer, " "); - } - } - - if (CHECK_PAD(input->press, L_JPAD)) { - timer = 10; - curBit++; - } - if (CHECK_PAD(input->press, R_JPAD)) { - curBit--; - timer = 10; - } - - if (timer == 0) { - if (CHECK_PAD(input->cur, L_JPAD)) { + if (CHECK_PAD(input->press, L_JPAD)) { + timer = 10; curBit++; - timer = 2; } - if (CHECK_PAD(input->cur, R_JPAD)) { + if (CHECK_PAD(input->press, R_JPAD)) { curBit--; - timer = 2; + timer = 10; } - } - curBit %= 16; - if (CHECK_PAD(input->press, U_JPAD)) { - entryIdx--; - if (entryIdx < 0) { - entryIdx = 0; + if (timer == 0) { + if (CHECK_PAD(input->cur, L_JPAD)) { + curBit++; + timer = 2; + } + if (CHECK_PAD(input->cur, R_JPAD)) { + curBit--; + timer = 2; + } } - timer = 10; - } - if (CHECK_PAD(input->press, D_JPAD)) { - timer = 10; - entryIdx++; - if (!entries[entryIdx].value) { - entryIdx--; - } - } - if (timer == 0) { - if (CHECK_PAD(input->cur, U_JPAD)) { + curBit %= 16; + if (CHECK_PAD(input->press, U_JPAD)) { entryIdx--; - timer = 2; if (entryIdx < 0) { entryIdx = 0; } + timer = 10; } - if (CHECK_PAD(input->cur, D_JPAD)) { - timer = 2; + if (CHECK_PAD(input->press, D_JPAD)) { + timer = 10; entryIdx++; if (!entries[entryIdx].value) { entryIdx--; } } - } - if (CHECK_PAD(input->press, A_BUTTON)) { - *entries[entryIdx].value ^= (1 << curBit); - } + if (timer == 0) { + if (CHECK_PAD(input->cur, U_JPAD)) { + entryIdx--; + timer = 2; + if (entryIdx < 0) { + entryIdx = 0; + } + } + if (CHECK_PAD(input->cur, D_JPAD)) { + timer = 2; + entryIdx++; + if (!entries[entryIdx].value) { + entryIdx--; + } + } + } - if (timer != 0) { - timer--; - } + if (CHECK_PAD(input->press, A_BUTTON)) { + *entries[entryIdx].value ^= (1 << curBit); + } - gfx = GfxPrint_Close(&printer); - GfxPrint_Destroy(&printer); - gSPEndDisplayList(gfx++); - Graph_BranchDlist(polyOpa, gfx); - gfxCtx->polyOpa.p = gfx; + if (timer != 0) { + timer--; + } + + gfx = GfxPrint_Close(&printer); + GfxPrint_Destroy(&printer); + + gSPEndDisplayList(gfx++); + Graph_BranchDlist(polyOpa, gfx); + oGfxCtx->polyOpa.p = gfx; + } if (CHECK_PAD(input->press, L_TRIG)) { globalCtx->pauseCtx.flag = 0; } - Graph_CloseDisps(dispRefs, gfxCtx, "../flg_set.c", 241); + CLOSE_DISPS(gfxCtx, "../flg_set.c", 241); } diff --git a/src/code/game.c b/src/code/game.c index 218672a838..8b53efabf6 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -148,13 +148,11 @@ void GameState_DrawInputDisplay(u16 input, Gfx** gfx) { void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { Gfx* newDList; Gfx* polyOpaP; - Gfx* dispRefs[5]; - char pad[0x8]; - GfxPrint printChars; - Graph_OpenDisps(dispRefs, gfxCtx, "../game.c", 746); - newDList = Graph_GfxPlusOne(polyOpaP = gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, newDList); + OPEN_DISPS(gfxCtx, "../game.c", 746); + + newDList = Graph_GfxPlusOne(polyOpaP = oGfxCtx->polyOpa.p); + gSPDisplayList(oGfxCtx->overlay.p++, newDList); if (R_ENABLE_FB_FILTER == 1) { GameState_SetFBFilter(&newDList); @@ -166,14 +164,19 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { } if (R_ENABLE_AUDIO_DBG & 1) { - GfxPrint_Init(&printChars); - GfxPrint_Open(&printChars, newDList); - func_800EEA50(&printChars); - newDList = GfxPrint_Close(&printChars); - GfxPrint_Destroy(&printChars); + s32 pad; + GfxPrint printer; + + GfxPrint_Init(&printer); + GfxPrint_Open(&printer, newDList); + func_800EEA50(&printer); + newDList = GfxPrint_Close(&printer); + GfxPrint_Destroy(&printer); } if (R_ENABLE_ARENA_DBG < 0) { + s32 pad; + DebugArena_Display(); SystemArena_Display(); //% 08x bytes left until the death of Hyrule (game_alloc) @@ -181,13 +184,13 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { R_ENABLE_ARENA_DBG = 0; } - if (1) { - gSPEndDisplayList(newDList++); - Graph_BranchDlist(polyOpaP, newDList); - gfxCtx->polyOpa.p = newDList; - } + gSPEndDisplayList(newDList++); + Graph_BranchDlist(polyOpaP, newDList); + oGfxCtx->polyOpa.p = newDList; - Graph_CloseDisps(dispRefs, gfxCtx, "../game.c", 800); + if (1) {} + + CLOSE_DISPS(gfxCtx, "../game.c", 800); func_80063D7C(gfxCtx); @@ -198,41 +201,37 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { } void GameState_SetFrameBuffer(GraphicsContext* gfxCtx) { - Gfx* dispRef[5]; + OPEN_DISPS(gfxCtx, "../game.c", 814); - Graph_OpenDisps(dispRef, gfxCtx, "../game.c", 814); + gSPSegment(oGfxCtx->polyOpa.p++, 0, 0); + gSPSegment(oGfxCtx->polyOpa.p++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(oGfxCtx->polyOpa.p++, 0xE, gZBuffer); + gSPSegment(oGfxCtx->polyXlu.p++, 0, 0); + gSPSegment(oGfxCtx->polyXlu.p++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(oGfxCtx->polyXlu.p++, 0xE, gZBuffer); + gSPSegment(oGfxCtx->overlay.p++, 0, 0); + gSPSegment(oGfxCtx->overlay.p++, 0xF, gfxCtx->curFrameBuffer); + gSPSegment(oGfxCtx->overlay.p++, 0xE, gZBuffer); - gSPSegment(gfxCtx->polyOpa.p++, 0, 0); - gSPSegment(gfxCtx->polyOpa.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(gfxCtx->polyOpa.p++, 0xE, gZBuffer); - gSPSegment(gfxCtx->polyXlu.p++, 0, 0); - gSPSegment(gfxCtx->polyXlu.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(gfxCtx->polyXlu.p++, 0xE, gZBuffer); - gSPSegment(gfxCtx->overlay.p++, 0, 0); - gSPSegment(gfxCtx->overlay.p++, 0xF, gfxCtx->curFrameBuffer); - gSPSegment(gfxCtx->overlay.p++, 0xE, gZBuffer); - - Graph_CloseDisps(dispRef, gfxCtx, "../game.c", 838); + CLOSE_DISPS(gfxCtx, "../game.c", 838); } void func_800C49F4(GraphicsContext* gfxCtx) { Gfx* newDlist; Gfx* polyOpaP; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../game.c", 846); + OPEN_DISPS(gfxCtx, "../game.c", 846); - newDlist = Graph_GfxPlusOne(polyOpaP = gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, newDlist); + newDlist = Graph_GfxPlusOne(polyOpaP = oGfxCtx->polyOpa.p); + gSPDisplayList(oGfxCtx->overlay.p++, newDlist); - // necessary to match - if (1) { - gSPEndDisplayList(newDlist++); - Graph_BranchDlist(polyOpaP, newDlist); - gfxCtx->polyOpa.p = newDlist; - } + gSPEndDisplayList(newDlist++); + Graph_BranchDlist(polyOpaP, newDlist); + oGfxCtx->polyOpa.p = newDlist; - Graph_CloseDisps(dispRefs, gfxCtx, "../game.c", 865); + if (1) {} + + CLOSE_DISPS(gfxCtx, "../game.c", 865); } void GameState_ReqPadData(GameState* gameState) { diff --git a/src/code/graph.c b/src/code/graph.c index 0af06f1165..dc958ff005 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -221,12 +221,9 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) { task->output_buff_size = (u64*)((u8*)gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer)); task->data_ptr = (u64*)gfxCtx->workBuffer; - { - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 828); - task->data_size = (u32)gfxCtx->work.p - (u32)gfxCtx->workBuffer; - Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 830); - } + OPEN_DISPS(gfxCtx, "../graph.c", 828); + task->data_size = (u32)oGfxCtx->work.p - (u32)gfxCtx->workBuffer; + CLOSE_DISPS(gfxCtx, "../graph.c", 830); { s32 pad2; } // Necessary to match stack usage @@ -271,46 +268,37 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gameState->unk_A0 = 0; Graph_InitTHGA(gfxCtx); - { - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 966); + OPEN_DISPS(gfxCtx, "../graph.c", 966); - gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 開始", 0); - gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0); - gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0); - gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0); + gDPNoOpString(oGfxCtx->work.p++, "WORK_DISP 開始", 0); + gDPNoOpString(oGfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0); + gDPNoOpString(oGfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0); + gDPNoOpString(oGfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0); - Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 975); - } + CLOSE_DISPS(gfxCtx, "../graph.c", 975); GameState_ReqPadData(gameState); GameState_Update(gameState); - { - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 987); + OPEN_DISPS(gfxCtx, "../graph.c", 987); - gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 終了", 0); - gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0); - gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0); - gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0); + gDPNoOpString(oGfxCtx->work.p++, "WORK_DISP 終了", 0); + gDPNoOpString(oGfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0); + gDPNoOpString(oGfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0); + gDPNoOpString(oGfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0); - Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 996); - } + CLOSE_DISPS(gfxCtx, "../graph.c", 996); - { - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 999); + OPEN_DISPS(gfxCtx, "../graph.c", 999); - gSPBranchList(gfxCtx->work.p++, gfxCtx->polyOpaBuffer); - gSPBranchList(gfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer); - gSPBranchList(gfxCtx->polyXlu.p++, gfxCtx->overlayBuffer); - gDPPipeSync(gfxCtx->overlay.p++); - gDPFullSync(gfxCtx->overlay.p++); - gSPEndDisplayList(gfxCtx->overlay.p++); + gSPBranchList(oGfxCtx->work.p++, gfxCtx->polyOpaBuffer); + gSPBranchList(oGfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer); + gSPBranchList(oGfxCtx->polyXlu.p++, gfxCtx->overlayBuffer); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPFullSync(oGfxCtx->overlay.p++); + gSPEndDisplayList(oGfxCtx->overlay.p++); - Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 1028); - } + CLOSE_DISPS(gfxCtx, "../graph.c", 1028); if (HREG(80) == 10 && HREG(93) == 2) { HREG(80) = 7; diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index 18672eb77b..24b4e8d651 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -52,14 +52,13 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { View view; u32 pad2[3]; Gfx* gfx; - Gfx* dispRefs[5]; uly = this->y; lry = this->y + 2; - Graph_OpenDisps(dispRefs, gfxCtx, "../speed_meter.c", 225); + OPEN_DISPS(gfxCtx, "../speed_meter.c", 225); - /*! @bug if gIrqMgrRetraceTime is 0, the function won't call Graph_CloseDisps */ + /*! @bug if gIrqMgrRetraceTime is 0, CLOSE_DISPS will never be reached */ if (gIrqMgrRetraceTime == 0) { return; } @@ -76,7 +75,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { SET_FULLSCREEN_VIEWPORT(&view); - gfx = gfxCtx->overlay.p; + gfx = oGfxCtx->overlay.p; func_800AB9EC(&view, 0xF, &gfx); gDPPipeSync(gfx++); @@ -98,8 +97,9 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { } gDPPipeSync(gfx++); - gfxCtx->overlay.p = gfx; - Graph_CloseDisps(dispRefs, gfxCtx, "../speed_meter.c", 276); + oGfxCtx->overlay.p = gfx; + + CLOSE_DISPS(gfxCtx, "../speed_meter.c", 276); } void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* this, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx, @@ -118,21 +118,20 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC s32 usedOff; View view; Gfx* gfx; - Gfx* dispRefs[5]; if (this->maxval == 0) { osSyncPrintf(VT_FGCOL(RED)); LOG_NUM("this->maxval", this->maxval, "../speed_meter.c", 313); osSyncPrintf(VT_RST); } else { - Graph_OpenDisps(dispRefs, gfxCtx, "../speed_meter.c", 318); + OPEN_DISPS(gfxCtx, "../speed_meter.c", 318); View_Init(&view, gfxCtx); view.flags = 0xA; SET_FULLSCREEN_VIEWPORT(&view); - gfx = gfxCtx->overlay.p; + gfx = oGfxCtx->overlay.p; func_800AB9EC(&view, 0xF, &gfx); gDPPipeSync(gfx++); @@ -147,8 +146,8 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC gDPPipeSync(gfx++); - gfxCtx->overlay.p = gfx; - Graph_CloseDisps(dispRefs, gfxCtx, "../speed_meter.c", 339); + oGfxCtx->overlay.p = gfx; + CLOSE_DISPS(gfxCtx, "../speed_meter.c", 339); } } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index d111a02528..4f51d9485b 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -16,29 +16,26 @@ void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* global f32 temp1; f32 temp2; MtxF sp60; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (actor->floorPoly != NULL) { temp1 = actor->posRot.pos.y - actor->groundY; if (temp1 >= -50.0f && temp1 < 500.0f) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1553); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1553); - gfxCtx->polyOpa.p = Gfx_CallSetupDL(gfxCtx->polyOpa.p, 0x2C); + oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); - gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, - 0, COMBINED); + gDPSetCombineLERP(oGfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, + 0, 0, COMBINED); temp1 = (temp1 < 0.0f) ? 0.0f : ((temp1 > 150.0f) ? 150.0f : temp1); temp2 = 1.0f - (temp1 * (1.f / 350)); if (color != NULL) { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, color->r, color->g, color->b, + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, color->r, color->g, color->b, (u32)(actor->shape.unk_14 * temp2) & 0xFF); } else { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(actor->shape.unk_14 * temp2) & 0xFF); } func_80038A28(actor->floorPoly, actor->posRot.pos.x, actor->groundY, actor->posRot.pos.z, &sp60); @@ -51,11 +48,11 @@ void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* global temp2 = (1.0f - (temp1 * (1.f / 350))) * actor->shape.unk_10; Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dlist); + gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1594); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1594); } } } @@ -75,13 +72,13 @@ void ActorShadow_DrawFunc_Squiggly(Actor* actor, LightMapper* lightMapper, Globa } void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + s32 pad1; f32 sp58; - Gfx* dispRefs[7]; + s32 pad2[2]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1661); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1661); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, (u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF); sp58 = Math_atan2f(light->l.dir[0], light->l.dir[2]); @@ -91,22 +88,20 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, Matrix_RotateY(sp58, MTXMODE_APPLY); Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_04048180); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04048180); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1693); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1693); } #ifdef NON_MATCHING // saved register, stack usage and minor ordering differences void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; MtxF spE8; f32 spE0[2]; s32 i; f32* spAC; - Gfx* dispRefs[4]; f32 temp_10; u8 temp_14; f32 temp_f0; @@ -141,10 +136,9 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa temp_s6 = lightMapper->numLights; temp_s6 -= 2; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1741); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1741); - gfxCtx->polyOpa.p = Gfx_CallSetupDL(gfxCtx->polyOpa.p, 0x2C); + oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); actor->shape.unk_15 = 0; for (i = 0; i < 2; i++) { @@ -212,7 +206,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa actor->shape.unk_15 = ((spE0[0] + temp_f0) < (spE0[1] - temp_f0)) ? 2 : 1; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 1831); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1831); } } #else @@ -309,24 +303,23 @@ void func_8002C0C0(TargetContext* targetCtx, Actor* actor, GlobalContext* global void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Actor* actor = targetCtx->targetedActor; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Player* player; - TargetContextEntry* entry; - s16 spCE; - f32 temp1; - Vec3f spBC; - s32 spB8; - f32 spB4; - s32 spB0; - s32 spAC; - f32 var1; - f32 var2; - s32 i; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 2029); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2029); if (targetCtx->unk_48 != 0) { + TargetContextEntry* entry; + Player* player; + s16 spCE; + f32 temp1; + Vec3f spBC; + s32 spB8; + f32 spB4; + s32 spB0; + s32 spAC; + f32 var1; + f32 var2; + s32 i; + player = PLAYER; spCE = 0xFF; @@ -367,7 +360,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) { - gfxCtx->overlay.p = Gfx_CallSetupDL(gfxCtx->overlay.p, 0x39); + oGfxCtx->overlay.p = Gfx_CallSetupDL(oGfxCtx->overlay.p, 0x39); for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { entry = &targetCtx->arr_50[spAC]; @@ -382,7 +375,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_Translate(entry->pos.x, entry->pos.y, 0.0f, MTXMODE_NEW); Matrix_Scale(var2, 0.15f, 1.0f, MTXMODE_APPLY); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, entry->color.r, entry->color.g, entry->color.b, + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, entry->color.r, entry->color.g, entry->color.b, (u8)spCE); Matrix_RotateZ((targetCtx->unk_4B & 0x7F) * (M_PI / 64), MTXMODE_APPLY); @@ -391,9 +384,9 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY); Matrix_Push(); Matrix_Translate(entry->unk_0C, entry->unk_0C, 0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116), + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->overlay.p++, D_0404D450); + gSPDisplayList(oGfxCtx->overlay.p++, D_0404D450); Matrix_Pull(); } } @@ -410,20 +403,20 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { if ((actor != NULL) && !(actor->flags & 0x8000000)) { NaviColor* naviColor = &sNaviColorList[actor->type]; - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x7); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x7); Matrix_Translate(actor->posRot2.pos.x, actor->posRot2.pos.y + (actor->unk_4C * actor->scale.y) + 17.0f, actor->posRot2.pos.z, MTXMODE_NEW); Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_0400CB70); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0400CB70); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 2158); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158); } void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, GlobalContext* globalCtx) { @@ -724,8 +717,6 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { s32 spB8; s32 spB4; s32 spB0; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (titleCtx->unk_C != 0) { spCC = titleCtx->unk_8; @@ -734,8 +725,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { spB8 = (titleCtx->unk_6 * 4) - (spC8 * 2); sp38 = spCC * 2; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 2824); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2824); spB0 = spCC * spC8 * gSaveContext.language; spC8 = (spCC * spC8 > 0x1000) ? 0x1000 / spCC : spC8; @@ -743,30 +733,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { if (1) {} // Necessary to match - gfxCtx->overlay.p = func_80093808(gfxCtx->overlay.p); + oGfxCtx->overlay.p = func_80093808(oGfxCtx->overlay.p); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_E, (u8)titleCtx->unk_C); - gDPLoadTextureBlock(gfxCtx->overlay.p++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1, + gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (spC8 * 4) - 1, G_TX_RENDERTILE, 0, 0, 1024, 1024); spC8 = titleCtx->unk_9 - spC8; if (spC8 > 0) { - gDPLoadTextureBlock(gfxCtx->overlay.p++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, titleCtx->texture + spB0 + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, spCC, spC8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1, + gSPTextureRectangle(oGfxCtx->overlay.p++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1, G_TX_RENDERTILE, 0, 0, 1024, 1024); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 2880); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880); } } @@ -815,7 +805,7 @@ void Actor_SetScale(Actor* actor, f32 scale) { } void Actor_SetObjectDependency(GlobalContext* globalCtx, Actor* actor) { - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[actor->objBankIndex].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[actor->objBankIndex].segment); } void Actor_Init(Actor* actor, GlobalContext* globalCtx) { @@ -1028,7 +1018,7 @@ void func_8002DE74(GlobalContext* globalCtx, Player* player) { void func_8002DECC(GlobalContext* globalCtx, Player* player, Actor* actor) { player->rideActor = actor; player->stateFlags1 |= 0x800000; - actor->attachedB = &player->actor; + actor->child = &player->actor; } s32 func_8002DEEC(Player* player) { @@ -1311,22 +1301,24 @@ Gfx* func_8002E830(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx) { Hilite* hilite; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_actor.c", 4306); - gfxCtx->polyOpa.p = func_8002E830(object, eye, lightDir, gfxCtx, gfxCtx->polyOpa.p, &hilite); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_actor.c", 4313); + OPEN_DISPS(gfxCtx, "../z_actor.c", 4306); + + oGfxCtx->polyOpa.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyOpa.p, &hilite); + + CLOSE_DISPS(gfxCtx, "../z_actor.c", 4313); return hilite; } Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx) { Hilite* hilite; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_actor.c", 4332); - gfxCtx->polyXlu.p = func_8002E830(object, eye, lightDir, gfxCtx, gfxCtx->polyXlu.p, &hilite); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_actor.c", 4339); + OPEN_DISPS(gfxCtx, "../z_actor.c", 4332); + + oGfxCtx->polyXlu.p = func_8002E830(object, eye, lightDir, gfxCtx, oGfxCtx->polyXlu.p, &hilite); + + CLOSE_DISPS(gfxCtx, "../z_actor.c", 4339); return hilite; } @@ -1336,8 +1328,6 @@ void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag) { Vec3f lightDir; Gfx* displayListHead; Gfx* displayList; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; lightDir.x = globalCtx->envCtx.unk_2A; lightDir.y = globalCtx->envCtx.unk_2B; @@ -1354,14 +1344,13 @@ void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag) { displayList = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Gfx)); displayListHead = displayList; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 4384); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4384); gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); gSPEndDisplayList(displayListHead); - gSPSegment(gfxCtx->polyOpa.p++, 0x07, displayList); + gSPSegment(oGfxCtx->polyOpa.p++, 0x07, displayList); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 4394); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4394); } } @@ -1370,8 +1359,6 @@ void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag) { Vec3f lightDir; Gfx* displayListHead; Gfx* displayList; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; lightDir.x = globalCtx->envCtx.unk_2A; lightDir.y = globalCtx->envCtx.unk_2B; @@ -1383,14 +1370,13 @@ void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag) { displayList = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Gfx)); displayListHead = displayList; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 4429); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4429); gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); gSPEndDisplayList(displayListHead); - gSPSegment(gfxCtx->polyXlu.p++, 0x07, displayList); + gSPSegment(oGfxCtx->polyXlu.p++, 0x07, displayList); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 4439); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4439); } } @@ -1542,11 +1528,11 @@ void func_8002F374(GlobalContext* globalCtx, Actor* actor, s16* arg2, s16* arg3) *arg3 = sp1C.y * sp18 * -120.0f + 120.0f; } -u32 func_8002F410(Actor* actor, GlobalContext* globalCtx) { - if (actor->attachedA != NULL) { - return 1; +u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) { + if (actor->parent != NULL) { + return true; } else { - return 0; + return false; } } @@ -1583,26 +1569,26 @@ void func_8002F580(Actor* actor, GlobalContext* globalCtx) { func_8002F554(actor, globalCtx, 0); } -u32 func_8002F5A0(Actor* actor, GlobalContext* globalCtx) { - if (actor->attachedA == NULL) { - return 1; +u32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx) { + if (actor->parent == NULL) { + return true; } else { - return 0; + return false; } } void func_8002F5C4(Actor* actorA, Actor* actorB, GlobalContext* globalCtx) { - Actor* actorAttachedA = actorA->attachedA; + Actor* parent = actorA->parent; - if (actorAttachedA->id == ACTOR_PLAYER) { - Player* player = (Player*)actorAttachedA; + if (parent->id == ACTOR_PLAYER) { + Player* player = (Player*)parent; player->heldActor = actorB; player->interactRangeActor = actorB; } - actorAttachedA->attachedB = actorB; - actorB->attachedA = actorAttachedA; - actorA->attachedA = NULL; + parent->child = actorB; + actorB->parent = parent; + actorA->parent = NULL; } void func_8002F5F0(Actor* actor, GlobalContext* globalCtx) { @@ -1613,11 +1599,11 @@ void func_8002F5F0(Actor* actor, GlobalContext* globalCtx) { } } -u32 func_8002F618(GlobalContext* globalCtx, Actor* actor) { - if (actor->attachedB != NULL) { - return 1; +u32 Actor_HasChild(GlobalContext* globalCtx, Actor* actor) { + if (actor->child != NULL) { + return true; } else { - return 0; + return false; } } @@ -1633,11 +1619,11 @@ u32 func_8002F63C(GlobalContext* globalCtx, Actor* actor, s32 arg2) { return 0; } -u32 func_8002F674(GlobalContext* globalCtx, Actor* actor) { - if (actor->attachedB == NULL) { - return 1; +u32 Actor_HasNoChild(GlobalContext* globalCtx, Actor* actor) { + if (actor->child == NULL) { + return true; } else { - return 0; + return false; } } @@ -1784,8 +1770,6 @@ Color_RGB8 D_80116064 = { 100, 200, 0 }; // saved register, stack usage and minor ordering differences // this also doesn't generate a few useless struct copies void func_8002FBAC(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[6]; Vec3f lightPos; f32 spD8; f32 spD4; @@ -1806,9 +1790,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { f32 phi_f10; f32 phi_f6; - gfxCtx = globalCtx->state.gfxCtx; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 5308); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 5308); if (gSaveContext.respawn[RESPAWN_MODE_TOP].data != 0) { if (LINK_IS_ADULT) { @@ -1904,7 +1886,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { if ((globalCtx->csCtx.state == 0) && (gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) && (globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) { - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x19); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x19); Matrix_Translate(gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + spD8, @@ -1913,24 +1895,24 @@ void func_8002FBAC(GlobalContext* globalCtx) { Matrix_Mult(&globalCtx->mf_11D60, MTXMODE_APPLY); Matrix_Push(); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, spD0); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 200, 0, 255); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, spD0); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 200, 0, 255); phi_f10 = (globalCtx->gameplayFrames * 1500) & 0xFFFF; Matrix_RotateZ((phi_f10 * M_PI) / 32768.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_04010130); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130); Matrix_Pull(); phi_f6 = ~((globalCtx->gameplayFrames * 1200) & 0xFFFF); Matrix_RotateZ((phi_f6 * M_PI) / 32768.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_04010130); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04010130); } lightPos.x = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x; @@ -1940,7 +1922,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { Lights_InitType0PositionalLight(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, 500.0f * spD4); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 5474); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 5474); } } #else @@ -2073,7 +2055,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) { actor = actor->next; } else if ((unkFlag && !(actor->flags & unkFlag)) || (!unkFlag && unkCondition && (sp74 != actor) && (actor != player->navi) && - (actor != player->heldActor) && (&player->actor != actor->attachedA))) { + (actor != player->heldActor) && (&player->actor != actor->parent))) { func_80061E8C(&actor->colChkInfo); actor = actor->next; } else if (actor->update == NULL) { @@ -2169,15 +2151,10 @@ void Actor_FaultPrint(Actor* actor, char* command) { void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { FaultClient faultClient; LightMapper* lightMapper; - GraphicsContext* gfxCtx; - Camera* camera; - Gfx* dispRefs[3]; Fault_AddClient(&faultClient, Actor_FaultPrint, actor, "Actor_draw"); - gfxCtx = globalCtx->state.gfxCtx; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 6035); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6035); lightMapper = Lights_CreateMapper(&globalCtx->lightCtx, globalCtx->state.gfxCtx); @@ -2185,10 +2162,10 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { func_80079EFC(lightMapper, globalCtx->state.gfxCtx); if (actor->flags & 0x1000) { - camera = &globalCtx->cameras[0]; - func_800D1694(actor->posRot.pos.x + camera->unk_80.x, - actor->posRot.pos.y + (f32)((actor->shape.unk_08 * actor->scale.y) + camera->unk_80.y), - actor->posRot.pos.z + camera->unk_80.z, &actor->shape.rot); + func_800D1694(actor->posRot.pos.x + globalCtx->mainCamera.unk_80.x, + actor->posRot.pos.y + + (f32)((actor->shape.unk_08 * actor->scale.y) + globalCtx->mainCamera.unk_80.y), + actor->posRot.pos.z + globalCtx->mainCamera.unk_80.z, &actor->shape.rot); } else { func_800D1694(actor->posRot.pos.x, actor->posRot.pos.y + (actor->shape.unk_08 * actor->scale.y), actor->posRot.pos.z, &actor->shape.rot); @@ -2197,8 +2174,8 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { Matrix_Scale(actor->scale.x, actor->scale.y, actor->scale.z, MTXMODE_APPLY); Actor_SetObjectDependency(globalCtx, actor); - gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); - gSPSegment(gfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment); if (actor->dmgEffectTimer != 0) { // Must be inline data to match @@ -2232,7 +2209,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { actor->shape.shadowDrawFunc(actor, lightMapper, globalCtx); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 6119); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6119); Fault_RemoveClient(&faultClient); } @@ -2252,94 +2229,91 @@ void func_80030ED8(Actor* actor) { } void func_80030FA8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_actor.c", 6161); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_actor.c", 6161); - - gDPLoadTextureBlock(gfxCtx->polyXlu.p++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP, + gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, &D_0401E370, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->polyXlu.p++, G_TX_RENDERTILE, 384, 224, 892, 732); - gSPTextureRectangle(gfxCtx->polyXlu.p++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPSetTileSize(oGfxCtx->polyXlu.p++, G_TX_RENDERTILE, 384, 224, 892, 732); + gSPTextureRectangle(oGfxCtx->polyXlu.p++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); + gDPPipeSync(oGfxCtx->polyXlu.p++); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_actor.c", 6183); + CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183); } void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invisibleActors) { Actor** invisibleActor; GraphicsContext* gfxCtx; s32 i; - Gfx* dispRefs[5]; gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_actor.c", 6197); + OPEN_DISPS(gfxCtx, "../z_actor.c", 6197); // Translates to: "MAGIC LENS START" - gDPNoOpString(gfxCtx->polyOpa.p++, "魔法のメガネ START", 0); + gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ START", 0); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); if (globalCtx->roomCtx.curRoom.showInvisActors == 0) { - gDPSetOtherMode(gfxCtx->polyXlu.p++, + gDPSetOtherMode(oGfxCtx->polyXlu.p++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | G_RM_CLD_SURF | G_RM_CLD_SURF2); - gDPSetCombineMode(gfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); + gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); } else { - gDPSetOtherMode(gfxCtx->polyXlu.p++, + gDPSetOtherMode(oGfxCtx->polyXlu.p++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA) | GBL_c2(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA)); - gDPSetCombineLERP(gfxCtx->polyXlu.p++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, - PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0xFF, 74, 74, 74, 74); + gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, + 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0xFF, 74, 74, 74, 74); } - gDPSetPrimDepth(gfxCtx->polyXlu.p++, 0, 0); + gDPSetPrimDepth(oGfxCtx->polyXlu.p++, 0, 0); func_80030FA8(gfxCtx); // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START" - gDPNoOpString(gfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 START", nbInvisibleActors); + gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 START", nbInvisibleActors); invisibleActor = &invisibleActors[0]; for (i = 0; i < nbInvisibleActors; i++) { // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY" - gDPNoOpString(gfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示", i); + gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示", i); Actor_Draw(globalCtx, *(invisibleActor++)); } // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END" - gDPNoOpString(gfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 END", nbInvisibleActors); + gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ 見えないActor表示 END", nbInvisibleActors); if (globalCtx->roomCtx.curRoom.showInvisActors != 0) { // Translates to: "BLUE SPECTACLES (EXTERIOR)" - gDPNoOpString(gfxCtx->polyOpa.p++, "青い眼鏡(外側)", 0); + gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 0); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetOtherMode(gfxCtx->polyXlu.p++, + gDPSetOtherMode(oGfxCtx->polyXlu.p++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2); - gDPSetCombineMode(gfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); + gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); func_80030FA8(gfxCtx); // Translates to: "BLUE SPECTACLES (EXTERIOR)" - gDPNoOpString(gfxCtx->polyOpa.p++, "青い眼鏡(外側)", 1); + gDPNoOpString(oGfxCtx->polyOpa.p++, "青い眼鏡(外側)", 1); } // Translates to: "MAGIC LENS END" - gDPNoOpString(gfxCtx->polyOpa.p++, "魔法のメガネ END", 0); + gDPNoOpString(oGfxCtx->polyOpa.p++, "魔法のメガネ END", 0); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_actor.c", 6284); + CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284); } s32 func_800314B0(GlobalContext* globalCtx, Actor* actor) { @@ -2366,28 +2340,24 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { s32 invisibleActorCounter; Actor* invisibleActors[INVISIBLE_ACTOR_MAX]; ActorListEntry* actorListEntry; - GraphicsContext* gfxCtx; - s32 i; - Gfx* dispRefs[5]; Actor* actor; - ActorOverlay* overlayEntry; - char* actorName; + s32 i; - gfxCtx = globalCtx->state.gfxCtx; invisibleActorCounter = 0; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 6336); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6336); actorListEntry = &actorCtx->actorList[0]; for (i = 0; i < ARRAY_COUNT(actorCtx->actorList); i++, actorListEntry++) { actor = actorListEntry->first; - while (actor != NULL) { - overlayEntry = actor->overlayEntry; - actorName = overlayEntry->name != NULL ? overlayEntry->name : ""; - gDPNoOpString(gfxCtx->polyOpa.p++, actorName, i); - gDPNoOpString(gfxCtx->polyXlu.p++, actorName, i); + while (actor != NULL) { + ActorOverlay* overlayEntry = actor->overlayEntry; + char* actorName = overlayEntry->name != NULL ? overlayEntry->name : ""; + + gDPNoOpString(oGfxCtx->polyOpa.p++, actorName, i); + gDPNoOpString(oGfxCtx->polyXlu.p++, actorName, i); HREG(66) = i; @@ -2466,7 +2436,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { CollisionCheck_Draw(globalCtx, &globalCtx->colChkCtx); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 6563); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6563); } void func_80031A28(GlobalContext* globalCtx, ActorContext* actorCtx) { @@ -2804,18 +2774,18 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId return actor; } -Actor* Actor_SpawnAttached(ActorContext* actorCtx, Actor* attachedTo, GlobalContext* globalCtx, s16 actorId, f32 posX, - f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) { +Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 actorId, f32 posX, + f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) { Actor* spawnedActor = Actor_Spawn(actorCtx, globalCtx, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); if (spawnedActor == NULL) { return NULL; } - attachedTo->attachedB = spawnedActor; - spawnedActor->attachedA = attachedTo; + parent->child = spawnedActor; + spawnedActor->parent = parent; if (spawnedActor->room >= 0) { - spawnedActor->room = attachedTo->room; + spawnedActor->room = parent->room; } return spawnedActor; @@ -3147,8 +3117,8 @@ s32 func_8003305C(Actor* actor, struct_80032E24* arg1, GlobalContext* globalCtx, } mtx = &arg1->unk_00[arg1->unk_08]; - spawnedEnPart = (EnPart*)Actor_SpawnAttached(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, mtx->wx, - mtx->wy, mtx->wz, 0, 0, objBankIndex, params); + spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, mtx->wx, + mtx->wy, mtx->wz, 0, 0, objBankIndex, params); if (spawnedEnPart != NULL) { func_800D20CC(&arg1->unk_00[arg1->unk_08], &spawnedEnPart->actor.shape.rot, 0); spawnedEnPart->unk_150 = arg1->unk_0C[arg1->unk_08]; @@ -3220,7 +3190,7 @@ void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s1 } } -Actor* func_80033640(GlobalContext* globalCtx, Collider* collider) { +Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider) { if ((collider->acFlags & 0x2) && (collider->ac->type == ACTORTYPE_EXPLOSIVES)) { collider->acFlags &= ~0x2; return collider->ac; @@ -3444,16 +3414,14 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx) f32 var; Vec3f sp50; CollisionPoly* sp4C; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8120); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8120); if (0) {} // Necessary to match - gfxCtx->polyOpa.p = Gfx_CallSetupDL(gfxCtx->polyOpa.p, 0x2C); + oGfxCtx->polyOpa.p = Gfx_CallSetupDL(oGfxCtx->polyOpa.p, 0x2C); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, alpha); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, alpha); sp50.x = arg0->x; sp50.y = arg0->y + 1.0f; @@ -3470,22 +3438,22 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx) Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_04049210); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04049210); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8155); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8155); } void func_80033DB8(GlobalContext* globalCtx, s16 arg1, s16 arg2) { - s16 var = Quake_Add(&globalCtx->cameras[0], 3); + s16 var = Quake_Add(&globalCtx->mainCamera, 3); Quake_SetSpeed(var, 20000); Quake_SetQuakeValues(var, arg1, 0, 0, 0); Quake_SetCountdown(var, arg2); } void func_80033E1C(GlobalContext* globalCtx, s16 arg1, s16 arg2, s16 arg3) { - s16 var = Quake_Add(&globalCtx->cameras[0], 3); + s16 var = Quake_Add(&globalCtx->mainCamera, 3); Quake_SetSpeed(var, arg3); Quake_SetQuakeValues(var, arg1, 0, 0, 0); Quake_SetCountdown(var, arg2); @@ -3533,14 +3501,11 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) { f32 temp1; f32 temp2; f32 temp3; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; entry = &D_801160DC[arg2]; var = entry->unk_10; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8265); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8265); Matrix_Translate(0.0f, entry->unk_08, 500.0f, MTXMODE_APPLY); Matrix_Get(&spB0); @@ -3557,9 +3522,9 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) { Matrix_Scale(entry->unk_0C, entry->unk_0C, entry->unk_0C, MTXMODE_APPLY); } - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, entry->unk_14); + gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_14); if (i % 2) { temp3 = entry->unk_00 + entry->unk_00; @@ -3573,11 +3538,11 @@ void func_80033F54(GlobalContext* globalCtx, s32 arg1, s32 arg2) { Matrix_Put(&spB0); Matrix_Scale(arg1 * 0.1f, arg1 * 0.1f, arg1 * 0.1f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, entry->unk_18); + gSPDisplayList(oGfxCtx->polyOpa.p++, entry->unk_18); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8319); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8319); } void func_8003424C(GlobalContext* globalCtx, Vec3f* arg1) { @@ -3825,41 +3790,37 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx) { void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8831); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8831); func_80093D18(globalCtx->state.gfxCtx); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, alpha); - gDPPipeSync(gfxCtx->polyOpa.p++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, alpha); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - overrideLimbDraw, postLimbDraw, actor, gfxCtx->polyOpa.p); + oGfxCtx->polyOpa.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyOpa.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8860); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8860); } void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8876); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8876); func_80093D84(globalCtx->state.gfxCtx); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, alpha); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, alpha); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - overrideLimbDraw, postLimbDraw, actor, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + overrideLimbDraw, postLimbDraw, actor, oGfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8904); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8904); } s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) { @@ -3916,7 +3877,7 @@ s32 func_80035124(Actor* actor, GlobalContext* globalCtx) { switch (actor->params) { case 0: - if (func_8002F410(actor, globalCtx)) { + if (Actor_HasParent(actor, globalCtx)) { actor->params = 1; } else if (!(actor->bgCheckFlags & 1)) { Actor_MoveForward(actor); @@ -3929,7 +3890,7 @@ s32 func_80035124(Actor* actor, GlobalContext* globalCtx) { } break; case 1: - if (func_8002F5A0(actor, globalCtx)) { + if (Actor_HasNoParent(actor, globalCtx)) { actor->params = 0; } break; @@ -4109,15 +4070,15 @@ void func_80035844(Vec3f* arg0, Vec3f* arg1, s16* arg2, s32 arg3) { } /** - * Spawns En_Part (Dissipating Flames) actor attached to the given actor. + * Spawns En_Part (Dissipating Flames) actor as a child of the given actor. */ EnPart* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, Vec3f* arg3, s32 arg4, s32 unused, GlobalContext* globalCtx, s16 params, s32 arg8) { EnPart* spawnedEnPart; spawnedEnPart = - (EnPart*)Actor_SpawnAttached(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, spawnPos->x, spawnPos->y, - spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params); + (EnPart*)Actor_SpawnAsChild(&globalCtx->actorCtx, actor, globalCtx, ACTOR_EN_PART, spawnPos->x, spawnPos->y, + spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params); if (spawnedEnPart != NULL) { spawnedEnPart->actor.scale = actor->scale; spawnedEnPart->actor.speedXZ = arg3->x; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 5c16693431..a2da2a2ec7 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -3175,7 +3175,7 @@ void func_80057C6C(Camera* camera, View* view, CollisionContext* colCtx, GlobalC s32 func_8005AD40(Camera* camera, Actor* doorActor, s16 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6); void func_80057FC4(Camera* camera) { - if (camera != &camera->globalCtx->cameras[0]) { + if (camera != &camera->globalCtx->mainCamera) { camera->unk_154 = camera->setting = CAM_SET_FREE0; camera->unk_14C &= ~0x4; } else if (camera->globalCtx->roomCtx.curRoom.mesh->polygon.type != 1) { @@ -3246,7 +3246,7 @@ void func_80058148(Camera* camera, Player* player) { camera->unk_118 = -1; camera->unk_11C = -1; camera->unk_14C |= 4; - if (camera == &camera->globalCtx->cameras[0]) { + if (camera == &camera->globalCtx->mainCamera) { D_8011D3A0.w = 0xB200; } else { D_8011D3A0.w = 0; diff --git a/src/code/z_cheap_proc.c b/src/code/z_cheap_proc.c index f899bab69d..518b2d359f 100644 --- a/src/code/z_cheap_proc.c +++ b/src/code/z_cheap_proc.c @@ -2,29 +2,23 @@ #include void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_cheap_proc.c", 214); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 214); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 216), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 216), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dlist); + gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_cheap_proc.c", 219); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 219); } void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_cheap_proc.c", 228); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 228); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 230), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 230), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, dlist); + gSPDisplayList(oGfxCtx->polyXlu.p++, dlist); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_cheap_proc.c", 233); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_cheap_proc.c", 233); } diff --git a/src/code/z_construct.c b/src/code/z_construct.c index 42f2789771..f7970ac19b 100644 --- a/src/code/z_construct.c +++ b/src/code/z_construct.c @@ -5,25 +5,19 @@ void func_80110990(GlobalContext* globalCtx) { Map_Destroy(globalCtx); } -#ifdef NON_MATCHING -// regalloc, stack usage and minor ordering differences void func_801109B0(GlobalContext* globalCtx) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; - s32 parameterStart; - s32 parameterSize; - s32 do_actionStart; - s32 do_actionOffset; - s32 temp; + u32 parameterSize; + u16 do_actionOffset; + u8 temp; gSaveContext.unk_1422 = 0; - gSaveContext.unk_13EA = 0; - gSaveContext.unk_13E8 = 0; + gSaveContext.unk_13E8 = gSaveContext.unk_13EA = 0; View_Init(&interfaceCtx->view, globalCtx->state.gfxCtx); - interfaceCtx->unk_1EC = interfaceCtx->unk_1EE = 0; interfaceCtx->unk_1FA = interfaceCtx->unk_261 = interfaceCtx->unk_1FC = 0; - interfaceCtx->unk_1F0 = 0; + interfaceCtx->unk_1EC = interfaceCtx->unk_1EE = interfaceCtx->unk_1F0 = 0; interfaceCtx->unk_22E = 0; interfaceCtx->unk_230 = 16; interfaceCtx->unk_1F4 = 0.0f; @@ -34,34 +28,32 @@ void func_801109B0(GlobalContext* globalCtx) { interfaceCtx->cDownAlpha = interfaceCtx->cRightAlpha = interfaceCtx->healthAlpha = interfaceCtx->startAlpha = interfaceCtx->magicAlpha = 0; - parameterStart = _parameter_staticSegmentRomStart; - parameterSize = _parameter_staticSegmentRomEnd - parameterStart; + parameterSize = (u32)_parameter_staticSegmentRomEnd - (u32)_parameter_staticSegmentRomStart; // Translates to: "Permanent PARAMETER Segment = %x" osSyncPrintf("常駐PARAMETERセグメント=%x\n", parameterSize); interfaceCtx->parameterSegment = GameState_Alloc(&globalCtx->state, parameterSize, "../z_construct.c", 159); - osSyncPrintf("parameter->parameterSegment=%x", interfaceCtx->parameterSegment); + osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment); if (interfaceCtx->parameterSegment == NULL) { __assert("parameter->parameterSegment != NULL", "../z_construct.c", 161); } - DmaMgr_SendRequest1(interfaceCtx->parameterSegment, parameterStart, parameterSize, "../z_construct.c", 162); + DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (u32)_parameter_staticSegmentRomStart, parameterSize, + "../z_construct.c", 162); interfaceCtx->do_actionSegment = GameState_Alloc(&globalCtx->state, 0x480, "../z_construct.c", 166); // Translates to: "DO Action Texture Initialization" osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); - osSyncPrintf("parameter->do_actionSegment=%x", interfaceCtx->do_actionSegment); + osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->do_actionSegment); if (interfaceCtx->do_actionSegment == NULL) { __assert("parameter->do_actionSegment != NULL", "../z_construct.c", 169); } - do_actionStart = _do_action_staticSegmentRomStart; - if (gSaveContext.language == 0) { do_actionOffset = 0; } else if (gSaveContext.language == 1) { @@ -70,8 +62,8 @@ void func_801109B0(GlobalContext* globalCtx) { do_actionOffset = 0x5700; } - DmaMgr_SendRequest1(interfaceCtx->do_actionSegment, do_actionStart + do_actionOffset, 0x300, "../z_construct.c", - 174); + DmaMgr_SendRequest1(interfaceCtx->do_actionSegment, (u32)_do_action_staticSegmentRomStart + do_actionOffset, 0x300, + "../z_construct.c", 174); if (gSaveContext.language == 0) { do_actionOffset = 0x480; @@ -81,8 +73,8 @@ void func_801109B0(GlobalContext* globalCtx) { do_actionOffset = 0x5B80; } - DmaMgr_SendRequest1((void*)((u32)interfaceCtx->do_actionSegment + 0x300), do_actionStart + do_actionOffset, 0x180, - "../z_construct.c", 178); + DmaMgr_SendRequest1((void*)((u32)interfaceCtx->do_actionSegment + 0x300), + (u32)_do_action_staticSegmentRomStart + do_actionOffset, 0x180, "../z_construct.c", 178); interfaceCtx->icon_itemSegment = GameState_Alloc(&globalCtx->state, 0x4000, "../z_construct.c", 190); @@ -126,11 +118,11 @@ void func_801109B0(GlobalContext* globalCtx) { "../z_construct.c", 219); } - osSyncPrintf("EVENT=%d\n", gSaveContext.timer1State); + osSyncPrintf("EVENT=%d\n", ((void)0, gSaveContext.timer1State)); if ((gSaveContext.timer1State == 4) || (gSaveContext.timer1State == 8) || (gSaveContext.timer2State == 4) || (gSaveContext.timer2State == 10)) { - osSyncPrintf("restart_flag=%d\n", gSaveContext.respawnFlag); + osSyncPrintf("restart_flag=%d\n", ((void)0, gSaveContext.respawnFlag)); if ((gSaveContext.respawnFlag == -1) || (gSaveContext.respawnFlag == 1)) { if (gSaveContext.timer1State == 4) { @@ -167,8 +159,7 @@ void func_801109B0(GlobalContext* globalCtx) { Health_InitData(globalCtx); Map_Init(globalCtx); - interfaceCtx->unk_242 = 0; - interfaceCtx->unk_23C = 0; + interfaceCtx->unk_23C = interfaceCtx->unk_242 = 0; R_ITEM_BTN_X(0) = 160; R_B_BTN_COLOR(0) = 255; @@ -182,9 +173,6 @@ void func_801109B0(GlobalContext* globalCtx) { R_A_BTN_COLOR(1) = 200; R_A_BTN_COLOR(2) = 50; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_construct/func_801109B0.s") -#endif void func_80110F68(GlobalContext* globalCtx) { MessageContext* msgCtx = &globalCtx->msgCtx; diff --git a/src/code/z_debug.c b/src/code/z_debug.c index 48caa825dd..41f63005c7 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -220,14 +220,13 @@ void func_80063D7C(GraphicsContext* gfxCtx) { Gfx* sp78; GfxPrint gfxPrint; Gfx* tempRet; - s32 pad; - Gfx* dispRefs[4]; // stores state of GfxCtx next ptrs - Graph_OpenDisps(dispRefs, gfxCtx, "../z_debug.c", 628); + OPEN_DISPS(gfxCtx, "../z_debug.c", 628); + GfxPrint_Init(&gfxPrint); - sp78 = gfxCtx->polyOpa.p; - tempRet = Graph_GfxPlusOne(gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, tempRet); + sp78 = oGfxCtx->polyOpa.p; + tempRet = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); + gSPDisplayList(oGfxCtx->overlay.p++, tempRet); GfxPrint_Open(&gfxPrint, tempRet); if ((OREG(0) == 1) || (OREG(0) == 8)) { @@ -242,8 +241,11 @@ void func_80063D7C(GraphicsContext* gfxCtx) { sp7C = GfxPrint_Close(&gfxPrint); gSPEndDisplayList(sp7C++); Graph_BranchDlist(sp78, sp7C); - gfxCtx->polyOpa.p = sp7C; + oGfxCtx->polyOpa.p = sp7C; + if (0) {} - Graph_CloseDisps(dispRefs, gfxCtx, "../z_debug.c", 664); + + CLOSE_DISPS(gfxCtx, "../z_debug.c", 664); + GfxPrint_Destroy(&gfxPrint); } diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c index 399e96d408..d029d25568 100644 --- a/src/code/z_debug_display.c +++ b/src/code/z_debug_display.c @@ -71,47 +71,42 @@ void DebugDisplay_DrawObjects(GlobalContext* globalCtx) { } void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_debug_display.c", 169); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 169); func_80094678(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); Matrix_Translate(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW); Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY); Matrix_RotateRPY(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY); - gDPLoadTextureBlock(gfxCtx->polyXlu.p++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 189), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 189), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_04004298); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04004298); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_debug_display.c", 192); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 192); } void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, u32 dlist, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 211); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_debug_display.c", 211); func_8009435C(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); - gSPSetLights1(gfxCtx->polyXlu.p++, sDebugObjectLights); + gSPSetLights1(oGfxCtx->polyXlu.p++, sDebugObjectLights); func_800D1694(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, &dispObj->rot); Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 228), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 228), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, dlist); + gSPDisplayList(oGfxCtx->polyXlu.p++, dlist); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_debug_display.c", 231); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 231); } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 8bbc1d9b52..8fe0c4689f 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1852,8 +1852,6 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx, void func_80068C3C(GlobalContext* globalCtx, CutsceneContext* csCtx) { Gfx* displayList; Gfx* prevDisplayList; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (0) {} // Necessary to match @@ -1861,18 +1859,17 @@ void func_80068C3C(GlobalContext* globalCtx, CutsceneContext* csCtx) { if (0) {} // Also necessary to match if (BREG(0) != 0) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo.c", 4101); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo.c", 4101); - prevDisplayList = gfxCtx->polyOpa.p; - displayList = Graph_GfxPlusOne(gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, displayList); + prevDisplayList = oGfxCtx->polyOpa.p; + displayList = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); + gSPDisplayList(oGfxCtx->overlay.p++, displayList); Cutscene_DrawDebugInfo(globalCtx, &displayList, csCtx); gSPEndDisplayList(displayList++); Graph_BranchDlist(prevDisplayList, displayList); - gfxCtx->polyOpa.p = displayList; + oGfxCtx->polyOpa.p = displayList; - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo.c", 4108); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo.c", 4108); } csCtx->frames++; diff --git a/src/code/z_draw.c b/src/code/z_draw.c index 12a04eeb33..83f13ce076 100644 --- a/src/code/z_draw.c +++ b/src/code/z_draw.c @@ -167,527 +167,502 @@ void func_800694A0(GlobalContext* globalCtx, s16 drawId) { // All remaining functions in this file are draw functions referenced in the table and called by the function above void func_800694E4(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 556); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 556); func_80093BA8(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 560), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 560), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 565); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 565); } void func_800695C0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 572); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 572); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 5); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 576), + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 5); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 576), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 581); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 581); } void func_8006969C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 588); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 588); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 592), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 592), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 16, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 8), 16, 32)); Matrix_Push(); Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 615), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 615), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 621); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 621); } void func_80069880(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 628); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 628); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 632), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 632), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 641), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 641), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 16, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 6), 16, 32)); Matrix_Push(); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 656), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 656), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 663); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 663); } void func_80069AC8(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 670); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 670); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 674), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 674), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 683), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 683), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 32, 32, 1, 1 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 6), 32, 32)); Matrix_Push(); func_800D1FD4(&globalCtx->mf_11DA0); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 698), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 698), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 704); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 704); } void func_80069CF0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 712); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 712); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0) % 256, 1 * (globalCtx->state.frames * 2) % 256, 64, 64, 1, 0 * (globalCtx->state.frames * 0) % 128, 1 * (globalCtx->state.frames * 1) % 128, 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 723), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 723), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 730), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 730), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 735); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 735); } void func_80069EB0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 742); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 742); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 746), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 746), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 1 * -(globalCtx->state.frames * 5), 32, 32, 1, 0 * (globalCtx->state.frames * 0), 0 * (globalCtx->state.frames * 0), 32, 64)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 760), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 760), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 765); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 765); } void func_8006A060(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 772); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 772); func_80093BA8(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 776), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 776), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 783); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 783); } void func_8006A158(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 811); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 811); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 815), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 815), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 5); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 822), + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 5); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 822), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 827); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 827); } void func_8006A2A0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 834); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 834); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -1 * (globalCtx->state.frames * 1), 1 * (globalCtx->state.frames * 1), 32, 32, 1, -1 * (globalCtx->state.frames * 1), 1 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 845), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 845), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 855), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 855), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[5]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[5]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 861); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 861); } void func_8006A4B0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 868); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 868); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 1), 0 * (globalCtx->state.frames * 1), 32, 32, 1, 0 * (globalCtx->state.frames * 1), 0 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 878), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 878), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 883); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 883); } void func_8006A5F0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 890); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 890); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 6), 1 * (globalCtx->state.frames * 6), 32, 32, 1, 1 * (globalCtx->state.frames * 6), 1 * (globalCtx->state.frames * 6), 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 901), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 901), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 906); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 906); } void func_8006A73C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 913); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 913); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 3), 32, 32, 1, 0 * (globalCtx->state.frames * 1), 1 * -(globalCtx->state.frames * 2), 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 924), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 924), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 929); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 929); } void func_8006A88C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 936); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 936); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 * (globalCtx->state.frames * 0), 1 * (globalCtx->state.frames * 1), 32, 32, 1, 0 * (globalCtx->state.frames * 0), 1 * (globalCtx->state.frames * 1), 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 947), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 947), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 952); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 952); } void func_8006A9CC(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 959); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 959); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 963), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 963), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 968); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 968); } void func_8006AAA8(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 975); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 975); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 979), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 979), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 986), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 986), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 991); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 991); } void func_8006ABEC(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 998); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 998); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1002), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1002), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1008); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1008); } void func_8006ACE4(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1015); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1015); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1019), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1019), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1027), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1027), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1032); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1032); } void func_8006AE40(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1039); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1039); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1043), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1043), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1050), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1050), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1056); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1056); } void func_8006AF9C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1063); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1063); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 2), 1 * -(globalCtx->state.frames * 6), 32, 32, 1, 1 * (globalCtx->state.frames * 1), -1 * (globalCtx->state.frames * 2), 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1074), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1074), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1081); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1081); } void func_8006B124(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1088); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1088); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1092), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1092), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1100); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1100); } void func_8006B24C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1108); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1108); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1112), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1112), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1120), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1120), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1126); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1126); } void func_8006B3C0(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1133); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1133); Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1140), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1140), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1148), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1148), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1154); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1154); } void func_8006B54C(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1162); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1162); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 1 * (globalCtx->state.frames * 2), -1 * (globalCtx->state.frames * 2), 64, 64, 1, 1 * (globalCtx->state.frames * 4), 1 * -(globalCtx->state.frames * 4), 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1173), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1173), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[0]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1181); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1181); } void func_8006B6E4(GlobalContext* globalCtx, s16 drawId) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1188); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1188); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1192), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1192), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1200), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1200), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDrawItemTable[drawId].dlists[4]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1207); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1207); } void func_8006B870(GlobalContext* globalCtx, s16 drawId) { s32 pad; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1214); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1214); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1218), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 1218), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[4]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[5]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[6]); - gSPDisplayList(gfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[7]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[1]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[0]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[2]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[3]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[4]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[5]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[6]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDrawItemTable[drawId].dlists[7]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_draw.c", 1230); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_draw.c", 1230); } diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index 4555e9e038..af4df1dad2 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -398,13 +398,11 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 #endif void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 809); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 809); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 813); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 813); } // original name: "SQ_NoInterpolate_disp" @@ -420,9 +418,8 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement* Vec3f sp6C; Vec3f sp60; Vec3f sp54; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 838); + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 838); Math_Vec3s_ToVec3f(&sp6C, &this->elements[0].p2); @@ -498,11 +495,11 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement* vtx[3].v.cn[2] = sp78.b; vtx[3].v.cn[3] = sp78.a; - gSPVertex(gfxCtx->polyXlu.p++, vtx, 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 2, 3, 0); + gSPVertex(oGfxCtx->polyXlu.p++, vtx, 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 2, 3, 0); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 932); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 932); } // original name: "SQ_HermiteInterpolate_disp" @@ -533,17 +530,8 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem Color_RGBA8 sp148; Color_RGBA8 sp144; Vec3f sp138; - Gfx* dispRefs[5]; - Vec3f sp118; - Vec3f sp10C; - Vec3f sp100; - Vec3f spF4; - s32 j1; - s32 j2; - Vec3f spE0; - s32 i; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 971); + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 971); Math_Vec3s_ToVec3f(&sp138, &this->elements[0].p2); @@ -561,6 +549,9 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem Math_Vec3f_Diff(&sp18C, &sp1CC, &sp1B4); Math_Vec3f_Diff(&sp180, &sp1C0, &sp1A8); } else { + Vec3f sp118; + Vec3f sp10C; + if (index - 1 < 0) { __assert("index - 1 >= 0", "../z_eff_blure.c", 1005); } @@ -580,6 +571,9 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem Math_Vec3f_Diff(&sp18C, &sp1CC, &sp174); Math_Vec3f_Diff(&sp180, &sp1C0, &sp168); } else { + Vec3f sp100; + Vec3f spF4; + if (index + 2 >= this->numElements) { __assert("index + 2 < this2->now_edge_num", "../z_eff_blure.c", 1032); } @@ -600,6 +594,11 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem // Translates to: "Vertices cannot be secured." osSyncPrintf("z_eff_blure.c::SQ_HermiteInterpolate_disp() 頂点確保できず。\n"); } else { + s32 j1; + s32 j2; + Vec3f spE0; + s32 i; + Math_Vec3f_Diff(&sp1CC, &sp138, &sp158); Math_Vec3f_Scale(&sp158, 10.0f); Math_Vec3f_Diff(&sp1C0, &sp138, &sp14C); @@ -670,17 +669,17 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem vtx[j2].v.cn[3] = func_80027E84(sp1A0.a, sp198.a, temp_f28); } - gSPVertex(gfxCtx->polyXlu.p++, vtx, 16, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 2, 3, 5, 0, 2, 5, 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 4, 5, 7, 0, 4, 7, 6, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 6, 7, 9, 0, 6, 9, 8, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 8, 9, 11, 0, 8, 11, 10, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 10, 11, 13, 0, 10, 13, 12, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 12, 13, 15, 0, 12, 15, 14, 0); + gSPVertex(oGfxCtx->polyXlu.p++, vtx, 16, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 2, 3, 5, 0, 2, 5, 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 4, 5, 7, 0, 4, 7, 6, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 6, 7, 9, 0, 6, 9, 8, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 8, 9, 11, 0, 8, 11, 10, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 10, 11, 13, 0, 10, 13, 12, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 12, 13, 15, 0, 12, 15, 14, 0); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1184); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1184); } #else Vtx D_80115770 = VTX(0, 0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); @@ -696,9 +695,8 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { MtxF sp9C; MtxF sp5C; Mtx* mtx; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1201); + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1201); if (this->numElements < 2) { return; @@ -724,7 +722,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { return; } - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); for (i = 0, elem = &this->elements[0]; elem < &this->elements[this->numElements - 1]; elem++, i++) { if ((elem->state == 0) || ((elem + 1)->state == 0)) { @@ -741,49 +739,44 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1263); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1263); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_blure/EffectBlure_DrawSmooth.s") #endif -// EffectBlure_SetupSimple void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1280); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1280); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1285); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1285); } void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1294); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1294); + gDPPipeSync(oGfxCtx->polyXlu.p++); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); - gDPPipeSync(gfxCtx->polyXlu.p++); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26); + gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); + gDPSetTextureLUT(oGfxCtx->polyXlu.p++, G_TT_NONE); + gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPSetCycleType(gfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPSetTextureLUT(gfxCtx->polyXlu.p++, G_TT_NONE); - gSPTexture(gfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04006020, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPLoadTextureBlock(gfxCtx->polyXlu.p++, D_04006020, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, - G_TX_NOMIRROR | G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD); + gDPSetCombineLERP(oGfxCtx->polyXlu.p++, TEXEL0, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, + PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED); + gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); + gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gDPPipeSync(oGfxCtx->polyXlu.p++); - gDPSetCombineLERP(gfxCtx->polyXlu.p++, TEXEL0, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, - ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED); - gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(gfxCtx->polyXlu.p++, G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(gfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); - gDPPipeSync(gfxCtx->polyXlu.p++); - - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->altEnvColor.r, this->altEnvColor.g, this->altEnvColor.b, + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->altEnvColor.r, this->altEnvColor.g, this->altEnvColor.b, this->altEnvColor.a); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1329); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1329); } void (*sSetupHandlers[])(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) = { @@ -795,79 +788,81 @@ s32 D_80115788 = 0; // unused // original name: "EffectBlureInfo2_disp_makeDisplayList" void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { - f32 alphaRatio; - Gfx* dispRefs[5]; - f32 scale; - Vec3f sp1B0; - Vec3f sp1A4; - Vec3f sp198; Mtx* mtx; - MtxF sp154; - MtxF sp114; - MtxF spD4; - MtxF sp94; - s32 i; - s32 j; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1356); + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1356); sSetupHandlers[this->drawMode](gfxCtx, this, vtx); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); - j = 0; + { + Vec3f sp1B0; + Vec3f sp1A4; + Vec3f sp198; + f32 alphaRatio; + MtxF sp154; + MtxF sp114; + MtxF spD4; + MtxF sp94; + f32 scale; + s32 i; + s32 j; - for (i = 0; i < this->numElements - 1; i++) { - if (this->drawMode == 1) { - alphaRatio = (f32)this->elements[i].timer / (f32)this->elemDuration; - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g, - this->altPrimColor.b, this->altPrimColor.a * (1.0f - alphaRatio)); - gDPPipeSync(gfxCtx->polyXlu.p++); - } + j = 0; - if (1) {} // Necessary to match - - gSPVertex(gfxCtx->polyXlu.p++, &vtx[j], 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); - - if (this->flags & 4) { - sp1B0.x = ((f32)vtx[4 * i + 0].v.ob[0] + (f32)vtx[4 * i + 1].v.ob[0]) * 0.5f; - sp1B0.y = ((f32)vtx[4 * i + 0].v.ob[1] + (f32)vtx[4 * i + 1].v.ob[1]) * 0.5f; - sp1B0.z = ((f32)vtx[4 * i + 0].v.ob[2] + (f32)vtx[4 * i + 1].v.ob[2]) * 0.5f; - sp1A4.x = ((f32)vtx[4 * i + 2].v.ob[0] + (f32)vtx[4 * i + 3].v.ob[0]) * 0.5f; - sp1A4.y = ((f32)vtx[4 * i + 2].v.ob[1] + (f32)vtx[4 * i + 3].v.ob[1]) * 0.5f; - sp1A4.z = ((f32)vtx[4 * i + 2].v.ob[2] + (f32)vtx[4 * i + 3].v.ob[2]) * 0.5f; - - Math_Vec3f_Diff(&sp1A4, &sp1B0, &sp198); - scale = sqrtf(SQ(sp198.x) + SQ(sp198.y) + SQ(sp198.z)); - - if (fabsf(scale) > 0.0005f) { - scale = 1.0f / scale; - Math_Vec3f_Scale(&sp198, scale); - - SkinMatrix_SetTranslate(&sp154, sp1B0.x, sp1B0.y, sp1B0.z); - func_800A7EC0(&sp114, 0x3FFF, sp198.x, sp198.y, sp198.z); - SkinMatrix_MtxFMtxFMult(&sp154, &sp114, &spD4); - SkinMatrix_SetTranslate(&sp154, -sp1B0.x, -sp1B0.y, -sp1B0.z); - SkinMatrix_MtxFMtxFMult(&spD4, &sp154, &sp94); - - mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp94); - if (mtx == NULL) { - // Translates to: "Forced termination because a matrix cannot be taken" - osSyncPrintf("EffectBlureInfo2_disp_makeDisplayList()マトリックス取れないので,強制終了\n"); - break; - } - - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(gfxCtx->polyXlu.p++, &vtx[j], 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + for (i = 0; i < this->numElements - 1; i++) { + if (this->drawMode == 1) { + alphaRatio = (f32)this->elements[i].timer / (f32)this->elemDuration; + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g, + this->altPrimColor.b, this->altPrimColor.a * (1.0f - alphaRatio)); + gDPPipeSync(oGfxCtx->polyXlu.p++); } - } - j += 4; + if (1) {} // Necessary to match + + gSPVertex(oGfxCtx->polyXlu.p++, &vtx[j], 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); + + if (this->flags & 4) { + sp1B0.x = ((f32)vtx[4 * i + 0].v.ob[0] + (f32)vtx[4 * i + 1].v.ob[0]) * 0.5f; + sp1B0.y = ((f32)vtx[4 * i + 0].v.ob[1] + (f32)vtx[4 * i + 1].v.ob[1]) * 0.5f; + sp1B0.z = ((f32)vtx[4 * i + 0].v.ob[2] + (f32)vtx[4 * i + 1].v.ob[2]) * 0.5f; + sp1A4.x = ((f32)vtx[4 * i + 2].v.ob[0] + (f32)vtx[4 * i + 3].v.ob[0]) * 0.5f; + sp1A4.y = ((f32)vtx[4 * i + 2].v.ob[1] + (f32)vtx[4 * i + 3].v.ob[1]) * 0.5f; + sp1A4.z = ((f32)vtx[4 * i + 2].v.ob[2] + (f32)vtx[4 * i + 3].v.ob[2]) * 0.5f; + + Math_Vec3f_Diff(&sp1A4, &sp1B0, &sp198); + scale = sqrtf(SQ(sp198.x) + SQ(sp198.y) + SQ(sp198.z)); + + if (fabsf(scale) > 0.0005f) { + scale = 1.0f / scale; + Math_Vec3f_Scale(&sp198, scale); + + SkinMatrix_SetTranslate(&sp154, sp1B0.x, sp1B0.y, sp1B0.z); + func_800A7EC0(&sp114, 0x3FFF, sp198.x, sp198.y, sp198.z); + SkinMatrix_MtxFMtxFMult(&sp154, &sp114, &spD4); + SkinMatrix_SetTranslate(&sp154, -sp1B0.x, -sp1B0.y, -sp1B0.z); + SkinMatrix_MtxFMtxFMult(&spD4, &sp154, &sp94); + + mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp94); + if (mtx == NULL) { + // Translates to: "Forced termination because a matrix cannot be taken" + osSyncPrintf("EffectBlureInfo2_disp_makeDisplayList()マトリックス取れないので,強制終了\n"); + break; + } + + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(oGfxCtx->polyXlu.p++, &vtx[j], 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 3, 0, 0, 3, 2, 0); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + } + } + + j += 4; + } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_blure.c", 1452); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1452); } Vtx_t D_8011578C[] = { @@ -996,17 +991,15 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { s32 i; s32 j; s32 phi_t2; - Gfx* sp74[5]; - f32 ratio; - Graph_OpenDisps(sp74, gfxCtx, "../z_eff_blure.c", 1596); + OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1596); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->numElements != 0) { if (this->flags == 0) { func_800942F0(gfxCtx); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32])); if (vtx == NULL) { @@ -1018,7 +1011,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { elem = &this->elements[i]; if (elem->state == 1) { - ratio = (f32)elem->timer / (f32)this->elemDuration; + f32 ratio = (f32)elem->timer / (f32)this->elemDuration; switch (this->calcMode) { case 1: @@ -1080,7 +1073,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { j = 0; - gSPVertex(gfxCtx->polyXlu.p++, vtx, 32, 0); + gSPVertex(oGfxCtx->polyXlu.p++, vtx, 32, 0); phi_t2 = 0; for (i = 0; i < this->numElements; i++) { @@ -1092,7 +1085,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { if (phi_t2 == 0) { phi_t2 = 1; } else { - gSP1Quadrangle(gfxCtx->polyXlu.p++, j - 2, j - 1, j + 1, j, 0); + gSP1Quadrangle(oGfxCtx->polyXlu.p++, j - 2, j - 1, j + 1, j, 0); if (1) {} // Necessary to match @@ -1111,5 +1104,5 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { } } - Graph_CloseDisps(sp74, gfxCtx, "../z_eff_blure.c", 1823); + CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1823); } diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c index efdc19eec9..46a0b9502d 100644 --- a/src/code/z_eff_shield_particle.c +++ b/src/code/z_eff_shield_particle.c @@ -154,37 +154,36 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { EffectShieldParticleElement* elem; Color_RGBA8_n primColor; Color_RGBA8_n envColor; - Gfx* dispRefs[5]; - Mtx* mtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_shield_particle.c", 272); + OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272); if (this != NULL) { - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); - gDPSetCycleType(gfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPTexture(gfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPLoadTextureBlock(gfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); if (1) {} // Necessary to match - gDPSetCombineLERP(gfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, + gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(gfxCtx->polyXlu.p++, + gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(gfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); EffectShieldParticle_GetColors(this, &primColor, &envColor); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a); - gDPSetEnvColor(gfxCtx->polyXlu.p++, envColor.r, envColor.g, envColor.b, envColor.a); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColor.r, envColor.g, envColor.b, envColor.a); + gDPPipeSync(oGfxCtx->polyXlu.p++); for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) { + Mtx* mtx; MtxF sp104; MtxF spC4; MtxF sp84; @@ -215,11 +214,11 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { break; } - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(gfxCtx->polyXlu.p++, sVertices, 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 3, 1, 0); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(oGfxCtx->polyXlu.p++, sVertices, 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 0, 1, 2, 0, 0, 3, 1, 0); } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_shield_particle.c", 359); + CLOSE_DISPS(gfxCtx, "../z_eff_shield_particle.c", 359); } diff --git a/src/code/z_eff_spark.c b/src/code/z_eff_spark.c index 6c3a659bb3..77b7e3f2ba 100644 --- a/src/code/z_eff_spark.c +++ b/src/code/z_eff_spark.c @@ -129,14 +129,12 @@ s32 EffectSpark_Update(void* thisx) { } // original name: "EffectSparkInfo_disp" -#ifdef NON_MATCHING -// minor ordering and saved register usage differences void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { Vtx* vertices; - EffectSpark* this = (EffectSpark*)thisx; // sp1E0 - EffectSparkElement* elem; + EffectSpark* this = (EffectSpark*)thisx; GlobalContext* globalCtx; - f32 ratio; + s32 i; + s32 j; u8 sp1D3; u8 sp1D2; u8 sp1D1; @@ -153,36 +151,37 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { u8 sp1C6; u8 sp1C5; u8 sp1C4; - s32 i; - s32 j; - Gfx* dispRefs[4]; // sp1AC + f32 ratio; globalCtx = Effect_GetGlobalCtx(); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_spark.c", 293); + + if (1) {} + + OPEN_DISPS(gfxCtx, "../z_eff_spark.c", 293); if (this != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x26); - gDPSetCycleType(gfxCtx->polyXlu.p++, G_CYC_2CYCLE); - gDPPipeSync(gfxCtx->polyXlu.p++); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x26); + gDPSetCycleType(oGfxCtx->polyXlu.p++, G_CYC_2CYCLE); + gDPPipeSync(oGfxCtx->polyXlu.p++); - gSPTexture(gfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPLoadTextureBlock(gfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gSPTexture(oGfxCtx->polyXlu.p++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gDPLoadTextureBlock(oGfxCtx->polyXlu.p++, D_04038FB0, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPSetCombineMode(gfxCtx->polyXlu.p++, G_CC_SHADEDECALA, G_CC_PASS2); - gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(gfxCtx->polyXlu.p++, + gDPSetCombineMode(oGfxCtx->polyXlu.p++, G_CC_SHADEDECALA, G_CC_PASS2); + gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - gSPSetGeometryMode(gfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); - gDPPipeSync(gfxCtx->polyXlu.p++); + gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); + gDPPipeSync(oGfxCtx->polyXlu.p++); vertices = Graph_Alloc(gfxCtx, this->numElements * sizeof(Vtx[4])); if (vertices == NULL) { // Translates to: "Memory Allocation Failure graph_malloc" osSyncPrintf("EffectSparkInfo_disp():メモリー確保失敗 graph_malloc\n"); - return; + goto end; } j = 0; @@ -210,6 +209,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { MtxF spEC; MtxF spAC; MtxF sp6C; + EffectSparkElement* elem; Mtx* mtx; f32 temp; @@ -267,23 +267,19 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { j += 4; - if (this) {} - mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp12C); if (mtx == NULL) { - break; + goto end; } - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPVertex(gfxCtx->polyXlu.p++, &vertices[4 * i], 4, 0); - gSP2Triangles(gfxCtx->polyXlu.p++, 2, 0, 3, 0, 2, 3, 1, 0); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPVertex(oGfxCtx->polyXlu.p++, &vertices[4 * i], 4, 0); + gSP2Triangles(oGfxCtx->polyXlu.p++, 2, 0, 3, 0, 2, 3, 1, 0); } - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_spark.c", 498); +end: + CLOSE_DISPS(gfxCtx, "../z_eff_spark.c", 498); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_spark/EffectSpark_Draw.s") -#endif diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index 885e94b143..5ac7774bc2 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -5,13 +5,10 @@ void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a f32 cos; Gfx* displayListHead; f32 absCos; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 113); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 113); - displayListHead = gfxCtx->polyOpa.p; + displayListHead = oGfxCtx->polyOpa.p; cos = Math_Coss((0x8000 / arg3) * arg2); absCos = ABS(cos); @@ -25,63 +22,54 @@ void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500); - gfxCtx->polyOpa.p = displayListHead; + oGfxCtx->polyOpa.p = displayListHead; if (1) {} // Necessary to match - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 129); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 129); } void func_80026400(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) { Gfx* displayListHead; f32 cos; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (arg3 != 0) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 141); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 141); cos = Math_Coss((0x4000 / arg3) * arg2); - displayListHead = gfxCtx->polyOpa.p; + displayListHead = oGfxCtx->polyOpa.p; gDPPipeSync(displayListHead++); gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); - gfxCtx->polyOpa.p = displayListHead; + oGfxCtx->polyOpa.p = displayListHead; if (1) {} // Necessary to match - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 153); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 153); } } void func_80026608(GlobalContext* globalCtx) { s32 pad; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 159); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 159); - gDPPipeSync(gfxCtx->polyOpa.p++); - gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p); + gDPPipeSync(oGfxCtx->polyOpa.p++); + oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 164); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 164); } void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) { f32 cos; Gfx* displayListHead; f32 absCos; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 178); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 178); - displayListHead = gfxCtx->polyXlu.p; + displayListHead = oGfxCtx->polyXlu.p; cos = Math_Coss((0x8000 / arg3) * arg2); absCos = ABS(cos); @@ -95,46 +83,40 @@ void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500); - gfxCtx->polyXlu.p = displayListHead; + oGfxCtx->polyXlu.p = displayListHead; if (1) {} // Necessary to match - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 194); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 194); } void func_80026860(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) { f32 cos; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 201); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 201); - displayListHead = gfxCtx->polyXlu.p; + displayListHead = oGfxCtx->polyXlu.p; cos = Math_Coss((0x4000 / arg3) * arg2); gDPPipeSync(displayListHead++); gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); - gfxCtx->polyXlu.p = displayListHead; + oGfxCtx->polyXlu.p = displayListHead; if (1) {} // Necessary to match - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 212); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 212); } void func_80026A6C(GlobalContext* globalCtx) { s32 pad; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 217); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 217); - gDPPipeSync(gfxCtx->polyXlu.p++); - gfxCtx->polyXlu.p = func_800BC8A0(globalCtx, gfxCtx->polyXlu.p); + gDPPipeSync(oGfxCtx->polyXlu.p++); + oGfxCtx->polyXlu.p = func_800BC8A0(globalCtx, oGfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 222); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead.c", 222); } diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c index 0342e84683..e188e1947e 100644 --- a/src/code/z_elf_message.c +++ b/src/code/z_elf_message.c @@ -14,18 +14,17 @@ ElfMessage sAdultSariaMsgs[] = { { 0x06, 0x30, 0x6C, 0x69 }, { 0x06, 0x30, 0x6C, 0x6A }, { 0xE0, 0x00, 0x6D, 0x00 }, }; -#ifdef NON_MATCHING -// minor ordering and regalloc differences u32 ElfMessage_CheckCondition(ElfMessage* msg) { - u16 temp; + s32 type = msg->byte0 & 0x1E; + u16 flag; - switch (msg->byte0 & 0x1E) { + switch (type) { case 0: - temp = 1 << (msg->byte1 & 0x0F); - return ((msg->byte0 & 1) == 1) == !!(gSaveContext.eventChkInf[(msg->byte1 & 0xF0) >> 4] & temp); + flag = 1 << (msg->byte1 & 0x0F); + return ((msg->byte0 & 1) == 1) == ((flag & gSaveContext.eventChkInf[(msg->byte1 & 0xF0) >> 4]) != 0); case 2: return ((msg->byte0 & 1) == 1) == - !!(gBitFlags[msg->byte1 - ITEM_KEY_BOSS] & gSaveContext.dungeonItems[gSaveContext.mapIndex]); + ((gSaveContext.dungeonItems[gSaveContext.mapIndex] & gBitFlags[msg->byte1 - ITEM_KEY_BOSS]) != 0); case 4: return ((msg->byte0 & 1) == 1) == (msg->byte3 == INV_CONTENT(msg->byte1)); case 6: @@ -34,16 +33,16 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) { return ((msg->byte0 & 1) == 1) == ((msg->byte1 & 0x0F) == CUR_UPG_VALUE(UPG_STRENGTH)); case 0x10: return ((msg->byte0 & 1) == 1) == - !!((gBitFlags[msg->byte3 - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) & - gSaveContext.equipment); + (((gBitFlags[msg->byte3 - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) & + gSaveContext.equipment) != 0); case 0x20: return ((msg->byte0 & 1) == 1) == - !!(CHECK_QUEST_ITEM(msg->byte3 - ITEM_SONG_MINUET + QUEST_SONG_MINUET)); + ((CHECK_QUEST_ITEM(msg->byte3 - ITEM_SONG_MINUET + QUEST_SONG_MINUET)) != 0); case 0x30: return ((msg->byte0 & 1) == 1) == - !!(CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST)); + ((CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST)) != 0); case 0x40: - return ((msg->byte0 & 1) == 1) == !!gSaveContext.magicAcquired; + return ((msg->byte0 & 1) == 1) == (((void)0, gSaveContext.magicAcquired) != 0); } } @@ -53,10 +52,6 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) { return false; } -#else -u32 ElfMessage_CheckCondition(ElfMessage* msg); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_elf_message/ElfMessage_CheckCondition.s") -#endif u32 func_8006BE88(ElfMessage** msgp) { u32 temp = true; diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index a7b7fba35a..0847ad682d 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -319,10 +319,8 @@ void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) { void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 type = thisx->params; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_a_keep.c", 701); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 701); func_80093D18(globalCtx->state.gfxCtx); @@ -331,12 +329,12 @@ void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) { } if (thisx->params == A_OBJ_KNOB) { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 1, 60, 60, 60, 50); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 1, 60, 60, 60, 50); } - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 712), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 712), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, D_80115484[type]); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_80115484[type]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_a_keep.c", 715); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 715); } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 2e14720d91..22436eace8 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -264,7 +264,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { break; } - if ((getItemId != 0) && !func_8002F410(&this->actor, globalCtx)) { + if ((getItemId != 0) && !Actor_HasParent(&this->actor, globalCtx)) { func_8002F554(&this->actor, globalCtx, getItemId); } @@ -409,7 +409,7 @@ void func_8001E5C8(EnItem00* this, GlobalContext* globalCtx) { Player* player = PLAYER; if (this->unk_152 != 0) { - if (!func_8002F410(&this->actor, globalCtx)) { + if (!Actor_HasParent(&this->actor, globalCtx)) { func_8002F434(&this->actor, globalCtx, this->unk_152, 50.0f, 80.0f); this->unk_15A++; } else { @@ -520,7 +520,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { if (!((this->actor.xzDistFromLink <= 30.0f) && (this->actor.yDistFromLink >= -50.0f) && (this->actor.yDistFromLink <= 50.0f))) { - if (!func_8002F410(&this->actor, globalCtx)) { + if (!Actor_HasParent(&this->actor, globalCtx)) { return; } } @@ -609,7 +609,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { params = &this->actor.params; - if ((getItemId != 0) && !func_8002F410(&this->actor, globalCtx)) { + if ((getItemId != 0) && !Actor_HasParent(&this->actor, globalCtx)) { func_8002F554(&this->actor, globalCtx, getItemId); } @@ -621,7 +621,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { case ITEM00_SHIELD_HYLIAN: case ITEM00_TUNIC_ZORA: case ITEM00_TUNIC_GORON: - if (func_8002F410(&this->actor, globalCtx)) { + if (Actor_HasParent(&this->actor, globalCtx)) { Flags_SetCollectible(globalCtx, this->collectibleFlag); Actor_Kill(&this->actor); } @@ -631,7 +631,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) { Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } else if (getItemId != 0) { - if (func_8002F410(&this->actor, globalCtx)) { + if (Actor_HasParent(&this->actor, globalCtx)) { Flags_SetCollectible(globalCtx, this->collectibleFlag); Actor_Kill(&this->actor); } @@ -733,11 +733,10 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { * Draw Function used for Rupee types of En_Item00. */ void func_8001EF30(EnItem00* this, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + s32 pad; s32 iconNb; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1546); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1546); func_80093D18(globalCtx->state.gfxCtx); func_8002EBCC(&this->actor, globalCtx, 0); @@ -750,14 +749,14 @@ void func_8001EF30(EnItem00* this, GlobalContext* globalCtx) { } } - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1562), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1562), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115530[iconNb])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115530[iconNb])); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_04042440); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_04042440); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1568); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1568); } /** @@ -765,14 +764,12 @@ void func_8001EF30(EnItem00* this, GlobalContext* globalCtx) { */ void func_8001F080(EnItem00* this, GlobalContext* globalCtx) { s32 iconNb; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; iconNb = this->actor.params - 3; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1594); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1594); - gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p); + oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); if (this->actor.params == ITEM00_BOMBS_SPECIAL) { iconNb = 1; @@ -780,57 +777,55 @@ void func_8001F080(EnItem00* this, GlobalContext* globalCtx) { iconNb -= 3; } - gfxCtx->polyOpa.p = func_800946E4(gfxCtx->polyOpa.p); + oGfxCtx->polyOpa.p = func_800946E4(oGfxCtx->polyOpa.p); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115544[iconNb])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80115544[iconNb])); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1607), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1607), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_0403F070); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0403F070); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1611); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1611); } /** * Draw Function used for the Heart Container type of En_Item00. */ void func_8001F1F4(EnItem00* this, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1623); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1623); func_80093D18(globalCtx->state.gfxCtx); func_8002EBCC(&this->actor, globalCtx, 0); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1634), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1634), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_0403BBA0); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0403BBA0); func_80093D84(globalCtx->state.gfxCtx); func_8002ED80(&this->actor, globalCtx, 0); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1644), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1644), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_0403BCD8); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0403BCD8); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1647); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1647); } /** * Draw Function used for the Piece of Heart type of En_Item00. */ void func_8001F334(EnItem00* this, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1658); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1658); func_80093D84(globalCtx->state.gfxCtx); func_8002ED80(&this->actor, globalCtx, 0); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1670), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1670), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_0403B030); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_0403B030); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_item00.c", 1673); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1673); } /** diff --git a/src/code/z_fbdemo.c b/src/code/z_fbdemo.c index 1b7aa46176..f8409a7edb 100644 --- a/src/code/z_fbdemo.c +++ b/src/code/z_fbdemo.c @@ -26,9 +26,83 @@ Gfx D_8012B000[] = { gsSPEndDisplayList(), }; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_InitGraphics.s") +#ifdef NON_EQUIVALENT +// The general control flow is correct and nothing is especially out of order but there are +// many small reoderings and regalloc all over so functional equivalence cannot be verified +void TransitionUnk_InitGraphics(TransitionUnk* this) { + Vtx* vtx2; + s32 frame; + s32 rowTex; + s32 row; + Gfx* gfx; + Vtx* vtx; + s32 col; + s32 colTex; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_InitData.s") + guMtxIdent(&this->modelView); + guMtxIdent(&this->unk_98); + guOrtho(&this->projection, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f, 1.0f); + + for (frame = 0; frame < 2; frame++) { + this->frame = frame; + vtx = (frame == 0) ? this->vtxFrame1 : this->vtxFrame2; + for (col = 0, colTex = 0; col < this->col + 1; col++, colTex += 0x20) { + for (row = 0, rowTex = 0; row < this->row + 1; row++, rowTex += 0x20) { + vtx2 = vtx; + vtx2->v.tc[0] = rowTex * 0x40; + vtx2->v.ob[0] = rowTex; + vtx2->v.ob[1] = col * 0x20; + vtx2->v.ob[2] = -5; + vtx2->v.flag = 0; + vtx2->v.tc[1] = colTex * 0x40; + vtx2->v.cn[0] = 0; + vtx2->v.cn[1] = 0; + vtx2->v.cn[2] = 120; + vtx2->v.cn[3] = 255; + vtx++; + } + } + } + + gfx = this->gfx; + for (col = 0, colTex = 0; col < this->col; col++, colTex += 0x20) { + gSPVertex(gfx++, SEGMENT_ADDR(0xA, col * (this->row + 1) * sizeof(Vtx)), this->row + 1, 0); + for (row = 0, rowTex = 0; row < this->row; row++, rowTex += 0x20) { + gDPPipeSync(gfx++); + gDPSetTextureImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SEGMENT_ADDR(0xB, 0)); + gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 9, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gfx++); + gDPLoadTile(gfx++, G_TX_LOADTILE, rowTex, colTex, rowTex + 0x20, colTex + 0x20); + gDPPipeSync(gfx++); + gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 9, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPSetTileSize(gfx++, G_TX_RENDERTILE, rowTex, colTex, rowTex + 0x20, colTex + 0x20); + gSP1Quadrangle(gfx++, row, row + 1, row + this->row, row + this->row + 1, 0); + } + } + gDPPipeSync(gfx++); + gSPEndDisplayList(gfx++); + + LOG("this->col * (1 + this->row * (1 + 7 + 1)) + 1 + 1", this->col * (1 + this->row * 9) + 2, "%d", "../z_fbdemo.c", + 144); + LOG("gp - this->gfxtbl", gfx - this->gfx, "%d", "../z_fbdemo.c", 145); +} +#else +#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_InitGraphics.s") +#endif + +void TransitionUnk_InitData(TransitionUnk* this) { + s32 col; + s32 row; + + for (col = 0; col < this->col + 1; col++) { + for (row = 0; row < this->row + 1; row++) { + (this->unk_0C + row + col * (this->row + 1))->unk_0 = row * 32; + (this->unk_0C + row + col * (this->row + 1))->unk_4 = col * 32; + } + } +} void TransitionUnk_Destroy(TransitionUnk* this) { osSyncPrintf("fbdemo_cleanup(%08x)\n", this); @@ -58,10 +132,10 @@ TransitionUnk* TransitionUnk_Init(TransitionUnk* this, s32 row, s32 col) { this->frame = 0; this->row = row; this->col = col; - this->unk_0C = SystemArena_MallocDebug(((row * 8) + 8) * (col + 1), "../z_fbdemo.c", 195); + this->unk_0C = SystemArena_MallocDebug((row + 1) * sizeof(TransitionUnkData) * (col + 1), "../z_fbdemo.c", 195); this->vtxFrame1 = SystemArena_MallocDebug((row + 1) * sizeof(Vtx) * (col + 1), "../z_fbdemo.c", 196); this->vtxFrame2 = SystemArena_MallocDebug((row + 1) * sizeof(Vtx) * (col + 1), "../z_fbdemo.c", 197); - this->gfx = SystemArena_MallocDebug(((this->col * ((this->row * 9) + 1)) + 2) * sizeof(Gfx), "../z_fbdemo.c", 198); + this->gfx = SystemArena_MallocDebug((this->col * (1 + this->row * 9) + 2) * sizeof(Gfx), "../z_fbdemo.c", 198); if (this->unk_0C == NULL || this->vtxFrame1 == NULL || this->vtxFrame2 == NULL || this->gfx == NULL) { osSyncPrintf("fbdemo_init allocation error\n"); if (this->unk_0C != NULL) { @@ -88,7 +162,20 @@ TransitionUnk* TransitionUnk_Init(TransitionUnk* this, s32 row, s32 col) { return this; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_SetData.s") +void TransitionUnk_SetData(TransitionUnk* this) { + s32 col; + Vtx* vtx; + s32 row; + + for (col = 0; col < this->col + 1; col++) { + for (row = 0; row < this->row + 1; row++) { + vtx = (this->frame == 0) ? this->vtxFrame1 : this->vtxFrame2; + (vtx + row + col * (this->row + 1))->v.ob[0] = (this->unk_0C + row + col * (this->row + 1))->unk_0; + vtx = (this->frame == 0) ? this->vtxFrame1 : this->vtxFrame2; + (vtx + row + col * (this->row + 1))->v.ob[1] = (this->unk_0C + row + col * (this->row + 1))->unk_4; + } + } +} void TransitionUnk_Draw(TransitionUnk* this, Gfx** gfxP) { Gfx* gfx = *gfxP; @@ -97,8 +184,8 @@ void TransitionUnk_Draw(TransitionUnk* this, Gfx** gfxP) { TransitionUnk_SetData(this); gSPMatrix(gfx++, &this->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gfx++, &this->modelView, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfx++, 10, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2); - gSPSegment(gfx++, 11, this->zBuffer); + gSPSegment(gfx++, 0xA, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2); + gSPSegment(gfx++, 0xB, this->zBuffer); gSPDisplayList(gfx++, D_8012B000); gSPDisplayList(gfx++, this->gfx); gDPPipeSync(gfx++); @@ -106,7 +193,30 @@ void TransitionUnk_Draw(TransitionUnk* this, Gfx** gfxP) { *gfxP = gfx; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Update.s") +void TransitionUnk_Update(TransitionUnk* this) { + f32 temp_f00; + f32 temp_f12; + s32 col; + f32 phi_f14; + s32 row; + + for (col = 0; col < this->col + 1; col++) { + for (row = 0; row < this->row + 1; row++) { + temp_f00 = + (this->unk_0C + row + col * (this->row + 1))->unk_0 - (this->unk_0C + 5 + 4 * (this->row + 1))->unk_0; + temp_f12 = + (this->unk_0C + row + col * (this->row + 1))->unk_4 - (this->unk_0C + 5 + 4 * (this->row + 1))->unk_4; + phi_f14 = (SQ(temp_f00) + SQ(temp_f12)) / 100.0f; + if (phi_f14 != 0.0f) { + if (phi_f14 < 1.0f) { + phi_f14 = 1.0f; + } + (this->unk_0C + row + col * (this->row + 1))->unk_0 -= temp_f00 / phi_f14; + (this->unk_0C + row + col * (this->row + 1))->unk_4 -= temp_f12 / phi_f14; + } + } + } +} void func_800B23E8(TransitionUnk* this) { } diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c index 043452aa20..f93719f20e 100644 --- a/src/code/z_fbdemo_fade.c +++ b/src/code/z_fbdemo_fade.c @@ -36,10 +36,10 @@ void TransitionFade_Destroy(TransitionFade* this) { } #ifdef NON_MATCHING +// Ordering differences around alpha temp void TransitionFade_Update(TransitionFade* this, s32 updateRate) { - char pad[2]; - s16 newAlpha; s32 alpha; + s16 newAlpha; switch (this->fadeType) { case 0: @@ -50,22 +50,22 @@ void TransitionFade_Update(TransitionFade* this, s32 updateRate) { this->fadeTimer = gSaveContext.fadeDuration; this->isDone = 1; } - if (gSaveContext.fadeDuration == 0) { + if (!gSaveContext.fadeDuration) { // Divide by 0! Zero is included in ZCommonGet fade_speed osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST); } alpha = (this->fadeTimer * 255.0f) / gSaveContext.fadeDuration; - this->fadeColor.a = this->fadeDirection != 0 ? 0xFF - alpha : alpha; + this->fadeColor.a = (this->fadeDirection != 0) ? 255 - alpha : alpha; break; case 2: newAlpha = this->fadeColor.a; if (iREG(50) != 0) { if (iREG(50) < 0) { - if (Math_ApproxS(&newAlpha, 0xFF, 0xFF) != 0) { - iREG(50) = 0x96; + if (Math_ApproxS(&newAlpha, 255, 255) != 0) { + iREG(50) = 150; } } else { - Math_ApproxS(&iREG(50), 0x14, 0x3C); + Math_ApproxS(&iREG(50), 20, 60); if (Math_ApproxS(&newAlpha, 0, iREG(50)) != 0) { iREG(50) = 0; this->isDone = 1; diff --git a/src/code/z_fcurve_data_skelanime.c b/src/code/z_fcurve_data_skelanime.c index 5aabe18f8b..7e3500fc17 100644 --- a/src/code/z_fcurve_data_skelanime.c +++ b/src/code/z_fcurve_data_skelanime.c @@ -102,10 +102,8 @@ s32 SkelCurve_Update(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve) { void SkelCurve_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, SkelAnimeCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, Actor* actor) { SkelCurveLimb* limb = SEGMENTED_TO_VIRTUAL(skelCurve->limbList[limbIndex]); - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 279); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 279); Matrix_Push(); @@ -138,27 +136,27 @@ void SkelCurve_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, SkelAnimeCurve* dList = limb->dList[0]; if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 321), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } } else if (lod == 1) { s32 pad2; dList = limb->dList[0]; if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 332), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } dList = limb->dList[1]; if (dList != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 338), G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, dList); + gSPDisplayList(oGfxCtx->polyXlu.p++, dList); } } else { // FcSkeletonInfo_draw_child (): Not supported @@ -180,7 +178,7 @@ void SkelCurve_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, SkelAnimeCurve* SkelCurve_DrawLimb(globalCtx, limb->nextLimbIdx, skelCurve, overrideLimbDraw, postLimbDraw, lod, actor); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 371); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_fcurve_data_skelanime.c", 371); } void SkelCurve_Draw(Actor* actor, GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, diff --git a/src/code/z_horse.c b/src/code/z_horse.c index 4f6b8d5faf..3764530dd3 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -142,8 +142,6 @@ typedef struct { /* 0x10 */ s16 type; } struct_8011F9B8; -#ifdef NON_MATCHING -// regalloc differences void func_8006D684(GlobalContext* globalCtx, Player* player) { s32 pad; s32 i; @@ -203,9 +201,9 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) { if ((globalCtx->sceneNum == D_8011F9B8[i].scene) && - (gSaveContext.cutsceneIndex == D_8011F9B8[i].cutsceneIndex)) { + (((void)0, gSaveContext.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) { if (D_8011F9B8[i].type == 7) { - if ((globalCtx->sceneNum == 99) && (gSaveContext.cutsceneIndex == 0xFFF1)) { + if ((globalCtx->sceneNum == 99) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) { D_8011F9B8[i].pos.x = player->actor.posRot.pos.x; D_8011F9B8[i].pos.y = player->actor.posRot.pos.y; D_8011F9B8[i].pos.z = player->actor.posRot.pos.z; @@ -223,7 +221,6 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { } else if ((D_8011F9B8[i].type == 5) || (D_8011F9B8[i].type == 6) || (D_8011F9B8[i].type == 8)) { Vec3f sp54; s32 temp; - s32 pad2; temp = 0; if (((gSaveContext.eventInf[0] & 0x10) >> 4) && D_8011F9B8[i].type == 6) { @@ -261,21 +258,6 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { } } } -#else -Vec3s D_8011F9A0[] = { - { 0xF46F, 0x0139, 0x1E14 }, - { 0xF894, 0x0139, 0x1B67 }, - { 0xF035, 0x0139, 0x1B15 }, - { 0xF6F7, 0x0139, 0x1766 }, -}; -struct_8011F9B8 D_8011F9B8[] = { - { 93, 0xFFF0, 0x0E10, 0x0585, 0x0168, 0x8001, 8 }, { 99, 0xFFF0, 0xFF06, 0x0001, 0xF9D4, 0x4000, 6 }, - { 99, 0xFFF1, 0x0000, 0x0000, 0x0000, 0x0000, 5 }, { 99, 0xFFF5, 0x0000, 0x0000, 0x0000, 0x0000, 7 }, - { 81, 0xFFF3, 0xF46F, 0x0139, 0x1E14, 0x0000, 7 }, { 81, 0xFFF4, 0xF894, 0x0139, 0x1B67, 0x0000, 7 }, - { 81, 0xFFF5, 0xF035, 0x0139, 0x1B15, 0x0000, 7 }, { 81, 0xFFF6, 0xF035, 0x0139, 0x1B15, 0x0000, 7 }, -}; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_horse/func_8006D684.s") -#endif void func_8006DC68(GlobalContext* globalCtx, Player* player) { if (LINK_IS_ADULT) { diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 883c7a5492..ce770af1b9 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -206,9 +206,8 @@ void Health_Draw(GlobalContext* globalCtx) { s32 curCombineModeSet = 0; u8* curBgImgLoaded = NULL; s32 ddHeartCountMinusOne = gSaveContext.defenseHearts - 1; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_lifemeter.c", 353); + OPEN_DISPS(gfxCtx, "../z_lifemeter.c", 353); if (!(gSaveContext.health % 0x10)) { fullHeartCount--; @@ -223,37 +222,37 @@ void Health_Draw(GlobalContext* globalCtx) { if (i < fullHeartCount) { if (curColorSet != 0) { curColorSet = 0; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], interfaceCtx->unk_20E[4], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], + gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], interfaceCtx->unk_21A[4], 0xFF); } } else if (i == fullHeartCount) { if (curColorSet != 1) { curColorSet = 1; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_202[0], interfaceCtx->unk_202[1], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_202[0], interfaceCtx->unk_202[1], interfaceCtx->unk_202[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, interfaceCtx->unk_208[0], interfaceCtx->unk_208[1], + gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_208[0], interfaceCtx->unk_208[1], interfaceCtx->unk_208[2], 0xFF); } } else if (i > fullHeartCount) { if (curColorSet != 2) { curColorSet = 2; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[0], interfaceCtx->unk_20E[2], interfaceCtx->unk_20E[4], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], + gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[0], interfaceCtx->unk_21A[2], interfaceCtx->unk_21A[4], 0xFF); } } else { if (curColorSet != 3) { curColorSet = 3; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[1], interfaceCtx->unk_20E[3], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, interfaceCtx->unk_20E[1], interfaceCtx->unk_20E[3], interfaceCtx->unk_20E[5], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, interfaceCtx->unk_21A[1], interfaceCtx->unk_21A[3], + gDPSetEnvColor(oGfxCtx->overlay.p++, interfaceCtx->unk_21A[1], interfaceCtx->unk_21A[3], interfaceCtx->unk_21A[5], 0xFF); } } @@ -269,34 +268,34 @@ void Health_Draw(GlobalContext* globalCtx) { if (i < fullHeartCount) { if (curColorSet != 4) { curColorSet = 4; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); + gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); } } else if (i == fullHeartCount) { if (curColorSet != 5) { curColorSet = 5; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, D_8015FDC0[0], D_8015FDC0[1], D_8015FDC0[2], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDC0[0], D_8015FDC0[1], D_8015FDC0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, D_8015FDC8[0], D_8015FDC8[1], D_8015FDC8[2], 0xFF); + gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDC8[0], D_8015FDC8[1], D_8015FDC8[2], 0xFF); } } else if (i > fullHeartCount) { if (curColorSet != 6) { curColorSet = 6; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[0], D_8015FDD0[1], D_8015FDD0[2], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); + gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[0], D_8015FDE0[1], D_8015FDE0[2], 0xFF); } } else { if (curColorSet != 7) { curColorSet = 7; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, D_8015FDD0[3], D_8015FDD0[4], D_8015FDD0[5], + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, D_8015FDD0[3], D_8015FDD0[4], D_8015FDD0[5], interfaceCtx->healthAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, D_8015FDE0[3], D_8015FDE0[4], D_8015FDE0[5], 0xFF); + gDPSetEnvColor(oGfxCtx->overlay.p++, D_8015FDE0[3], D_8015FDE0[4], D_8015FDE0[5], 0xFF); } } @@ -311,7 +310,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curBgImgLoaded != heartBgImg) { curBgImgLoaded = heartBgImg; - gDPLoadTextureBlock(gfxCtx->overlay.p++, heartBgImg, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, heartBgImg, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } @@ -321,7 +320,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 1) { curCombineModeSet = 1; func_80094520(gfxCtx); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } @@ -329,7 +328,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 3) { curCombineModeSet = 3; func_80094520(gfxCtx); - gDPSetCombineLERP(gfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, + gDPSetCombineLERP(oGfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } } @@ -341,7 +340,7 @@ void Health_Draw(GlobalContext* globalCtx) { temp4 *= 1024.0f; temp1 = 8.0f; temp1 *= 0.68f; - gSPTextureRectangle(gfxCtx->overlay.p++, (s32)((temp2 - temp1) * 4), (s32)((temp3 - temp1) * 4), + gSPTextureRectangle(oGfxCtx->overlay.p++, (s32)((temp2 - temp1) * 4), (s32)((temp3 - temp1) * 4), (s32)((temp2 + temp1) * 4), (s32)((temp3 + temp1) * 4), G_TX_RENDERTILE, 0, 0, (s32)temp4, (s32)temp4); } else { @@ -349,7 +348,7 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 2) { curCombineModeSet = 2; func_80094A14(gfxCtx); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } @@ -357,18 +356,18 @@ void Health_Draw(GlobalContext* globalCtx) { if (curCombineModeSet != 4) { curCombineModeSet = 4; func_80094A14(gfxCtx); - gDPSetCombineLERP(gfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, + gDPSetCombineLERP(oGfxCtx->overlay.p++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); } } - if (1) { + { Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); func_800D2CEC(matrix, 1.0f - (0.32f * sp144), 1.0f - (0.32f * sp144), 1.0f - (0.32f * sp144), -130.0f + offsetX, 94.5f - offsetY, 0.0f); - gSPMatrix(gfxCtx->overlay.p++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(gfxCtx->overlay.p++, sp154, 4, 0); - gSP1Quadrangle(gfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSPMatrix(oGfxCtx->overlay.p++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPVertex(oGfxCtx->overlay.p++, sp154, 4, 0); + gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); } } @@ -379,7 +378,7 @@ void Health_Draw(GlobalContext* globalCtx) { } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_lifemeter.c", 606); + CLOSE_DISPS(gfxCtx, "../z_lifemeter.c", 606); } u32 Health_IsCritical(void); diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 301bda17b9..9336c8a85a 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -311,25 +311,21 @@ void Map_Init(GlobalContext* globalCtx) { } } -#ifdef NON_MATCHING -// regalloc and minor ordering differences void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; + s32 pad; Player* player = PLAYER; - s16 tempX, tempY, tempZ; - Gfx* dispRefs[4]; + s16 tempX, tempZ; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_exp.c", 565); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 565); if (globalCtx->interfaceCtx.minimapAlpha >= 0xAA) { func_80094A14(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->overlay.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gSPMatrix(oGfxCtx->overlay.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); tempX = player->actor.posRot.pos.x; tempZ = player->actor.posRot.pos.z; @@ -338,13 +334,13 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { Matrix_Translate((R_COMPASS_OFFSET_X + tempX) / 10.0f, (R_COMPASS_OFFSET_Y - tempZ) / 10.0f, 0.0f, MTXMODE_NEW); Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY); Matrix_RotateX(-1.6f, MTXMODE_APPLY); - tempY = (0x7FFF - player->actor.shape.rot.y) / 0x400; - Matrix_RotateY(tempY / 10.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 585), + tempX = (0x7FFF - player->actor.shape.rot.y) / 0x400; + Matrix_RotateY(tempX / 10.0f, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 585), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 255, 0, 255); - gSPDisplayList(gfxCtx->overlay.p++, D_0400C820); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 255, 0, 255); + gSPDisplayList(oGfxCtx->overlay.p++, D_0400C820); tempX = sPlayerInitialPosX; tempZ = sPlayerInitialPosZ; @@ -354,27 +350,22 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { Matrix_Scale(VREG(9) / 100.0f, VREG(9) / 100.0f, VREG(9) / 100.0f, MTXMODE_APPLY); Matrix_RotateX(VREG(52) / 10.0f, MTXMODE_APPLY); Matrix_RotateY(sPlayerInitialDirection / 10.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 603), + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 603), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0xFF, 200, 0, 0, 255); - gSPDisplayList(gfxCtx->overlay.p++, D_0400C820); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0xFF, 200, 0, 0, 255); + gSPDisplayList(oGfxCtx->overlay.p++, D_0400C820); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_exp.c", 607); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 607); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_map_exp/Minimap_DrawCompassIcons.s") -#endif void Minimap_Draw(GlobalContext* globalCtx) { s32 pad[2]; InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; s32 mapIndex = gSaveContext.mapIndex; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_exp.c", 626); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 626); if (globalCtx->pauseCtx.state < 4) { switch (globalCtx->sceneNum) { @@ -390,17 +381,17 @@ void Minimap_Draw(GlobalContext* globalCtx) { case SCENE_ICE_DOUKUTO: if (!R_MINIMAP_TOGGLED) { func_80094520(globalCtx->state.gfxCtx); - gDPSetCombineLERP(gfxCtx->overlay.p++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, - 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(oGfxCtx->overlay.p++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, + PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0); if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); - gDPLoadTextureBlock_4b(gfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0, + gDPLoadTextureBlock_4b(oGfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, R_DGN_MINIMAP_X << 2, R_DGN_MINIMAP_Y << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_DGN_MINIMAP_X << 2, R_DGN_MINIMAP_Y << 2, (R_DGN_MINIMAP_X + 96) << 2, (R_DGN_MINIMAP_Y + 85) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -447,16 +438,16 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (!R_MINIMAP_TOGGLED) { func_80094520(globalCtx->state.gfxCtx); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), R_MINIMAP_COLOR(2), interfaceCtx->minimapAlpha); - gDPLoadTextureBlock_4b(gfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_IA, + gDPLoadTextureBlock_4b(oGfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_IA, gMapData->owMinimapWidth[mapIndex], gMapData->owMinimapHeight[mapIndex], 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, R_OW_MINIMAP_X << 2, R_OW_MINIMAP_Y << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_OW_MINIMAP_X << 2, R_OW_MINIMAP_Y << 2, (R_OW_MINIMAP_X + gMapData->owMinimapWidth[mapIndex]) << 2, (R_OW_MINIMAP_Y + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); @@ -468,11 +459,11 @@ void Minimap_Draw(GlobalContext* globalCtx) { ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { - gDPLoadTextureBlock(gfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, + gSPTextureRectangle(oGfxCtx->overlay.p++, gMapData->owEntranceIconPosX[sEntranceIconMapIndex] << 2, gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2, (gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + 8) << 2, @@ -482,11 +473,11 @@ void Minimap_Draw(GlobalContext* globalCtx) { } if ((globalCtx->sceneNum == SCENE_SPOT08) && (gSaveContext.infTable[26] & gBitFlags[9])) { - gDPLoadTextureBlock(gfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, D_02002500, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, 1080, 616, 1112, 648, G_TX_RENDERTILE, 0, 0, 1024, + gSPTextureRectangle(oGfxCtx->overlay.p++, 1080, 616, 1112, 648, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -507,7 +498,7 @@ void Minimap_Draw(GlobalContext* globalCtx) { } } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_exp.c", 782); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 782); } s16 Map_GetFloorTextIndexOffset(s32 mapIndex, s32 floor) { diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index 52836d8ec6..5597c77114 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -83,8 +83,6 @@ void MapMark_Draw(GlobalContext* globalCtx) { s32 i; s32 rectLeft; s32 rectTop; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; dungeon = gSaveContext.mapIndex; interfaceCtx = &globalCtx->interfaceCtx; @@ -98,32 +96,31 @@ void MapMark_Draw(GlobalContext* globalCtx) { mapMarkData = &sLoadedMarkDataTable[dungeon][interfaceCtx->mapRoomNum][0]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_mark.c", 303); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_map_mark.c", 303); while (1) { if (mapMarkData->markType == -1) { break; } - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTextureLUT(gfxCtx->overlay.p++, G_TT_NONE); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, interfaceCtx->minimapAlpha); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTextureLUT(oGfxCtx->overlay.p++, G_TT_NONE); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, interfaceCtx->minimapAlpha); markPoint = &mapMarkData->points[0]; for (i = 0; i < mapMarkData->count; i++) { if ((mapMarkData->markType != 0) || !Flags_GetTreasure(globalCtx, markPoint->chestFlag)) { markInfo = &sMapMarkInfoTable[mapMarkData->markType]; - gDPPipeSync(gfxCtx->overlay.p++); - gDPLoadTextureBlock(gfxCtx->overlay.p++, markInfo->texture, markInfo->imageFormat, G_IM_SIZ_MARK, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPLoadTextureBlock(oGfxCtx->overlay.p++, markInfo->texture, markInfo->imageFormat, G_IM_SIZ_MARK, markInfo->textureWidth, markInfo->textureHeight, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); rectLeft = (GREG(94) + markPoint->x + 204) << 2; rectTop = (GREG(95) + markPoint->y + 140) << 2; - gSPTextureRectangle(gfxCtx->overlay.p++, rectLeft, rectTop, markInfo->rectWidth + rectLeft, + gSPTextureRectangle(oGfxCtx->overlay.p++, rectLeft, rectTop, markInfo->rectWidth + rectLeft, rectTop + markInfo->rectHeight, G_TX_RENDERTILE, 0, 0, markInfo->dsdx, markInfo->dtdy); } @@ -132,7 +129,7 @@ void MapMark_Draw(GlobalContext* globalCtx) { mapMarkData++; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_map_mark.c", 339); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_map_mark.c", 339); } void MapMark_DrawConditionally(GlobalContext* globalCtx) { diff --git a/src/code/z_moji.c b/src/code/z_moji.c index d7366ceb93..16649a22dc 100644 --- a/src/code/z_moji.c +++ b/src/code/z_moji.c @@ -37,48 +37,47 @@ void func_8007B934(s32 arg0, s32 arg1) { } void func_8007B9A4(GraphicsContext* gfxCtx, u8 arg1) { - Gfx* dispRefs[7]; + s32 pad[2]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_moji.c", 86); + OPEN_DISPS(gfxCtx, "../z_moji.c", 86); if ((u32)gLetterTLUT & 0xF) { osSyncPrintf("moji_tlut --> %X\n", gLetterTLUT); } if (D_8015FFC0 != (arg1 & 3)) { - gDPLoadTLUT(gfxCtx->polyOpa.p++, 16, 256, &gLetterTLUT[arg1 & 3]); + gDPLoadTLUT(oGfxCtx->polyOpa.p++, 16, 256, &gLetterTLUT[arg1 & 3]); D_8015FFC0 = arg1 & 3; } - gSPTextureRectangle(gfxCtx->polyOpa.p++, D_80120120 << 2, D_80120124 << 2, (D_80120120 + 8) << 2, + gSPTextureRectangle(oGfxCtx->polyOpa.p++, D_80120120 << 2, D_80120124 << 2, (D_80120120 + 8) << 2, (D_80120124 + 8) << 2, G_TX_RENDERTILE, (u16)(arg1 & 4) * 64, (u16)(arg1 >> 3) * 256, 1024, 1024); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_moji.c", 123); + CLOSE_DISPS(gfxCtx, "../z_moji.c", 123); } void func_8007BBA8(GraphicsContext* gfxCtx, u8* arg1) { s32 i; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_moji.c", 137); + OPEN_DISPS(gfxCtx, "../z_moji.c", 137); if ((u32)gFontFF & 0xF) { osSyncPrintf("font_ff --> %X\n", gFontFF); } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, sFontColorRed, sFontColorGreen, sFontColorBlue, sFontColorAlpha); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, sFontColorRed, sFontColorGreen, sFontColorBlue, sFontColorAlpha); - gDPSetTextureImage(gfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 1, (s32)gFontFF); - gDPSetTile(gfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 1, (s32)gFontFF); + gDPSetTile(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->polyOpa.p++); - gDPLoadBlock(gfxCtx->polyOpa.p++, G_TX_LOADTILE, 0, 0, 511, 2048); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetTile(gfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(oGfxCtx->polyOpa.p++); + gDPLoadBlock(oGfxCtx->polyOpa.p++, G_TX_LOADTILE, 0, 0, 511, 2048); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetTile(oGfxCtx->polyOpa.p++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->polyOpa.p++, G_TX_RENDERTILE, 0, 0, 60, 508); + gDPSetTileSize(oGfxCtx->polyOpa.p++, G_TX_RENDERTILE, 0, 0, 60, 508); D_8015FFC0 = -1; @@ -108,5 +107,5 @@ void func_8007BBA8(GraphicsContext* gfxCtx, u8* arg1) { } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_moji.c", 181); + CLOSE_DISPS(gfxCtx, "../z_moji.c", 181); } diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index d5c48350e0..51e802fafd 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2055,8 +2055,6 @@ void func_80086D5C(s32* buf, u16 size) { u32 sDoActionTextures[] = { 0x07000000, 0x07000180 }; -#ifdef NON_MATCHING -// 0x80000000 is reused in the 2 *_TO_VIRTUAL macros when it shouldn't void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 arg2) { if (action >= 0x1D) { action = 0x0A; @@ -2077,14 +2075,10 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 a &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 2145); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); } else { - gSegments[7] = PHYSICAL_TO_VIRTUAL(interfaceCtx->do_actionSegment); + gSegments[7] = VIRTUAL_TO_PHYSICAL(interfaceCtx->do_actionSegment); func_80086D5C(SEGMENTED_TO_VIRTUAL(sDoActionTextures[arg2]), 0x180 / 4); } } -#else -void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 arg2); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_LoadActionLabel.s") -#endif void Interface_SetDoAction(GlobalContext* globalCtx, u16 action) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; @@ -2557,11 +2551,8 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx); void Interface_DrawMagicBar(GlobalContext* globalCtx) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; s16 magicBarY; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 2650); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 2650); if (gSaveContext.magicLevel != 0) { if (gSaveContext.healthCapacity > 0xA0) { @@ -2572,71 +2563,71 @@ void Interface_DrawMagicBar(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 100, 50, 50, 255); + gDPSetEnvColor(oGfxCtx->overlay.p++, 100, 50, 50, 255); - gfxCtx->overlay.p = - Gfx_TextureIA8(gfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024); + oGfxCtx->overlay.p = + Gfx_TextureIA8(oGfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024); - gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY, - gSaveContext.unk_13F4, 16, 1024, 1024); + oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02003940, 24, 16, R_MAGIC_BAR_X + 8, magicBarY, + gSaveContext.unk_13F4, 16, 1024, 1024); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_020038C0); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_020038C0); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 3, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 2048); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 2048); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 3, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 28, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 28, 60); - gSPTextureRectangle(gfxCtx->overlay.p++, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 8) << 2, magicBarY << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 8) << 2, magicBarY << 2, ((R_MAGIC_BAR_X + gSaveContext.unk_13F4) + 16) << 2, (magicBarY + 16) << 2, G_TX_RENDERTILE, 256, 0, 1024, 1024); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); if (gSaveContext.unk_13F0 == 4) { // Yellow part of the bar being used when casting a spell - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(gfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(oGfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.magic) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); // Fill the rest of the bar with the normal magic color - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), R_MAGIC_FILL_COLOR(2), interfaceCtx->magicAlpha); - gSPTextureRectangle(gfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.unk_13F8) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } else { // Fill the whole bar with the normal magic color - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), R_MAGIC_FILL_COLOR(2), interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(gfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(oGfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_MAGIC_FILL_X << 2, (magicBarY + 3) << 2, (R_MAGIC_FILL_X + gSaveContext.magic) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 2731); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 2731); } void func_80088AA0(s16 arg0) { @@ -2676,23 +2667,21 @@ void func_80088B34(s16 arg0) { } void Interface_DrawActionLabel(GraphicsContext* gfxCtx, void* texture) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_parameter.c", 2820); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_parameter.c", 2820); - - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, texture); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, texture); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); - gSP1Quadrangle(gfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_parameter.c", 2829); + CLOSE_DISPS(gfxCtx, "../z_parameter.c", 2829); } u8* sCUpLabelTextures[] = { D_02002FC0, D_02002FC0, D_02002FC0 }; @@ -2708,75 +2697,71 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { s16 i; // sp+0x14A s16 cUpAlpha; s32 pad; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 2900); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 2900); // B Button Color & Texture // Also loads the Item Button Texture reused by other buttons afterwards - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), interfaceCtx->bAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); - gfxCtx->overlay.p = - Gfx_TextureIA8(gfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), R_ITEM_BTN_WIDTH(0), - R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 255); + oGfxCtx->overlay.p = + Gfx_TextureIA8(oGfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), + R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2); // C-Left Button Color & Texture - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cLeftAlpha); - gSPTextureRectangle(gfxCtx->overlay.p++, R_ITEM_BTN_X(1) << 2, R_ITEM_BTN_Y(1) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(1) << 2, R_ITEM_BTN_Y(1) << 2, (R_ITEM_BTN_X(1) + R_ITEM_BTN_WIDTH(1)) << 2, (R_ITEM_BTN_Y(1) + R_ITEM_BTN_WIDTH(1)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(1) * 2, R_ITEM_BTN_DD(1) * 2); // C-Down Button Color & Texture - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cDownAlpha); - gSPTextureRectangle(gfxCtx->overlay.p++, R_ITEM_BTN_X(2) << 2, R_ITEM_BTN_Y(2) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(2) << 2, R_ITEM_BTN_Y(2) << 2, (R_ITEM_BTN_X(2) + R_ITEM_BTN_WIDTH(2)) << 2, (R_ITEM_BTN_Y(2) + R_ITEM_BTN_WIDTH(2)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(2) * 2, R_ITEM_BTN_DD(2) * 2); // C-Right Button Color & Texture - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cRightAlpha); - gSPTextureRectangle(gfxCtx->overlay.p++, R_ITEM_BTN_X(3) << 2, R_ITEM_BTN_Y(3) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_BTN_X(3) << 2, R_ITEM_BTN_Y(3) << 2, (R_ITEM_BTN_X(3) + R_ITEM_BTN_WIDTH(3)) << 2, (R_ITEM_BTN_Y(3) + R_ITEM_BTN_WIDTH(3)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(3) * 2, R_ITEM_BTN_DD(3) * 2); if ((globalCtx->pauseCtx.state < 8) || (globalCtx->pauseCtx.state >= 18)) { if ((globalCtx->pauseCtx.state != 0) || (globalCtx->pauseCtx.flag != 0)) { // Start Button Texture, Color & Label - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); - gSPTextureRectangle(gfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 68, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); + gSPTextureRectangle(oGfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 68, (sStartButtonLeftPos[gSaveContext.language] + 22) << 2, 156, G_TX_RENDERTILE, 0, 0, 1462, 1462); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (u32)interfaceCtx->do_actionSegment + 0x300); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); temp = R_START_LABEL_DD(gSaveContext.language) / 100.0f; - gSPTextureRectangle(gfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2, R_START_LABEL_Y(gSaveContext.language) << 2, (R_START_LABEL_X(gSaveContext.language) + (s16)(16.0f / temp)) << 2, (R_START_LABEL_Y(gSaveContext.language) + (s16)(48.0f / temp)) << 2, G_TX_RENDERTILE, 0, @@ -2788,7 +2773,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { (globalCtx->csCtx.state == 0)) { if (!sCUpInvisible) { // C-Up Button Texture, Color & Label (Navi Text) - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) { cUpAlpha = 0; @@ -2799,30 +2784,30 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { cUpAlpha = interfaceCtx->healthAlpha; } - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), cUpAlpha); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gSPTextureRectangle(gfxCtx->overlay.p++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2, + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), cUpAlpha); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gSPTextureRectangle(oGfxCtx->overlay.p++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2, (R_C_UP_BTN_Y + 16) << 2, G_TX_RENDERTILE, 0, 0, 2048, 2048); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, cUpAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, cUpAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, sCUpLabelTextures[gSaveContext.language]); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 1024); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 2, 0, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 63, 1024); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 2, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 28); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 28); - gSPTextureRectangle(gfxCtx->overlay.p++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2, (R_C_UP_ICON_Y + 8) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } @@ -2833,29 +2818,29 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { } } - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); // Empty C Button Arrows for (i = 1; i < 4; i++) { if (gSaveContext.equips.buttonItems[i] > 0xF0) { if (i == 1) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cLeftAlpha); } else if (i == 2) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cDownAlpha); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cRightAlpha); } - gfxCtx->overlay.p = - Gfx_TextureIA8(gfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i), + oGfxCtx->overlay.p = + Gfx_TextureIA8(oGfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i), R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_DD(i) * 2, R_ITEM_BTN_DD(i) * 2); } } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3071); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3071); } #else void Interface_DrawItemButtons(GlobalContext* globalCtx); @@ -2863,45 +2848,39 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx); #endif void Interface_DrawItemIconTexture(GlobalContext* globalCtx, void* texture, s16 button) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3079); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3079); + gDPLoadTextureBlock(oGfxCtx->overlay.p++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); - gDPLoadTextureBlock(gfxCtx->overlay.p++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - - gSPTextureRectangle(gfxCtx->overlay.p++, R_ITEM_ICON_X(button) << 2, R_ITEM_ICON_Y(button) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_ITEM_ICON_X(button) << 2, R_ITEM_ICON_Y(button) << 2, (R_ITEM_ICON_X(button) + R_ITEM_ICON_WIDTH(button)) << 2, (R_ITEM_ICON_Y(button) + R_ITEM_ICON_WIDTH(button)) << 2, G_TX_RENDERTILE, 0, 0, R_ITEM_ICON_DD(button) * 2, R_ITEM_ICON_DD(button) * 2); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3094); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3094); } void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { - s16 item; - s16 ammo; - GraphicsContext* gfxCtx; s16 i; - Gfx* dispRefs[3]; + s16 ammo; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3105); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3105); - item = gSaveContext.equips.buttonItems[button]; + i = gSaveContext.equips.buttonItems[button]; - if ((item == ITEM_STICK) || (item == ITEM_NUT) || (item == ITEM_BOMB) || (item == ITEM_BOW) || - ((item >= ITEM_BOW_ARROW_FIRE) && (item <= ITEM_BOW_ARROW_LIGHT)) || (item == ITEM_SLINGSHOT) || - (item == ITEM_BOMBCHU) || (item == ITEM_BEAN)) { - if ((item >= ITEM_BOW_ARROW_FIRE) && (item <= ITEM_BOW_ARROW_LIGHT)) { - item = ITEM_BOW; + if ((i == ITEM_STICK) || (i == ITEM_NUT) || (i == ITEM_BOMB) || (i == ITEM_BOW) || + ((i >= ITEM_BOW_ARROW_FIRE) && (i <= ITEM_BOW_ARROW_LIGHT)) || (i == ITEM_SLINGSHOT) || (i == ITEM_BOMBCHU) || + (i == ITEM_BEAN)) { + + if ((i >= ITEM_BOW_ARROW_FIRE) && (i <= ITEM_BOW_ARROW_LIGHT)) { + i = ITEM_BOW; } - ammo = AMMO(item); + ammo = AMMO(i); - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); if ((button == 0) && (gSaveContext.minigameState == 1)) { ammo = globalCtx->interfaceCtx.hbaAmmo; @@ -2912,17 +2891,17 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { if (ammo < 0) { ammo = 0; } - } else if (((item == ITEM_BOW) && (AMMO(item) == CUR_CAPACITY(UPG_QUIVER))) || - ((item == ITEM_BOMB) && (AMMO(item) == CUR_CAPACITY(UPG_BOMB_BAG))) || - ((item == ITEM_SLINGSHOT) && (AMMO(item) == CUR_CAPACITY(UPG_BULLET_BAG))) || - ((item == ITEM_STICK) && (AMMO(item) == CUR_CAPACITY(UPG_STICKS))) || - ((item == ITEM_NUT) && (AMMO(item) == CUR_CAPACITY(UPG_NUTS))) || - ((item == ITEM_BOMBCHU) && (ammo == 50)) || ((item == ITEM_BEAN) && (ammo == 15))) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 255, 0, alpha); + } else if (((i == ITEM_BOW) && (AMMO(i) == CUR_CAPACITY(UPG_QUIVER))) || + ((i == ITEM_BOMB) && (AMMO(i) == CUR_CAPACITY(UPG_BOMB_BAG))) || + ((i == ITEM_SLINGSHOT) && (AMMO(i) == CUR_CAPACITY(UPG_BULLET_BAG))) || + ((i == ITEM_STICK) && (AMMO(i) == CUR_CAPACITY(UPG_STICKS))) || + ((i == ITEM_NUT) && (AMMO(i) == CUR_CAPACITY(UPG_NUTS))) || ((i == ITEM_BOMBCHU) && (ammo == 50)) || + ((i == ITEM_BEAN) && (ammo == 15))) { + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 255, 0, alpha); } if (ammo == 0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 100, 100, alpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 100, 100, alpha); } for (i = 0; ammo >= 10; i++) { @@ -2930,24 +2909,21 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { } if (i != 0) { - gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button), - R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); + oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, &D_020035C0[i], 8, 8, R_ITEM_AMMO_X(button), + R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); } - gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6, - R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); + oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, &D_020035C0[ammo], 8, 8, R_ITEM_AMMO_X(button) + 6, + R_ITEM_AMMO_Y(button), 8, 8, 1024, 1024); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3158); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3158); } void Interface_DrawActionButton(GlobalContext* globalCtx) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3172); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3172); Matrix_Translate(0.0f, 0.0f, XREG(18) / 10.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -2955,17 +2931,17 @@ void Interface_DrawActionButton(GlobalContext* globalCtx) { if (1) {} // Necessary to match - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3177), + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3177), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(gfxCtx->overlay.p++, interfaceCtx->vtx_128, 4, 0); + gSPVertex(oGfxCtx->overlay.p++, interfaceCtx->vtx_128, 4, 0); - gDPLoadTextureBlock(gfxCtx->overlay.p++, &D_02000A00[0], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadTextureBlock(oGfxCtx->overlay.p++, &D_02000A00[0], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSP1Quadrangle(gfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3187); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3187); } void Interface_InitVertices(GlobalContext* globalCtx) { @@ -3115,17 +3091,13 @@ void Interface_Draw(GlobalContext* globalCtx) { s16 phi_s1; s16 phi_s0; s16 sp274; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 3405); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3405); - gSPSegment(gfxCtx->overlay.p++, 0x02, interfaceCtx->parameterSegment); - gSPSegment(gfxCtx->overlay.p++, 0x07, interfaceCtx->do_actionSegment); - gSPSegment(gfxCtx->overlay.p++, 0x08, interfaceCtx->icon_itemSegment); - gSPSegment(gfxCtx->overlay.p++, 0x0B, interfaceCtx->mapSegment); + gSPSegment(oGfxCtx->overlay.p++, 0x02, interfaceCtx->parameterSegment); + gSPSegment(oGfxCtx->overlay.p++, 0x07, interfaceCtx->do_actionSegment); + gSPSegment(oGfxCtx->overlay.p++, 0x08, interfaceCtx->icon_itemSegment); + gSPSegment(oGfxCtx->overlay.p++, 0x0B, interfaceCtx->mapSegment); if (pauseCtx->flag == 0) { Interface_InitVertices(globalCtx); @@ -3135,9 +3107,9 @@ void Interface_Draw(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); // Rupee Icon - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 80, 0, 255); - gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 80, 0, 255); + oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024); switch (globalCtx->sceneNum) { case SCENE_BMORI1: @@ -3156,16 +3128,16 @@ void Interface_Draw(GlobalContext* globalCtx) { case SCENE_TAKARAYA: if (gSaveContext.dungeonKeys[gSaveContext.mapIndex] >= 0) { // Small Key Icon - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 20, 255); - gfxCtx->overlay.p = - Gfx_TextureIA8(gfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 20, 255); + oGfxCtx->overlay.p = + Gfx_TextureIA8(oGfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024); // Small Key Counter - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); - gDPSetCombineLERP(gfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + gDPSetCombineLERP(oGfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); interfaceCtx->counterDigits[2] = 0; @@ -3178,14 +3150,14 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s2 = 42; if (interfaceCtx->counterDigits[2] != 0) { - gfxCtx->overlay.p = - Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16, phi_s2, - 190, 8, 16, 1024, 1024); + oGfxCtx->overlay.p = + Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[2]], 8, 16, + phi_s2, 190, 8, 16, 1024, 1024); phi_s2 = 50; } - gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[3]], 8, - 16, phi_s2, 190, 8, 16, 1024, 1024); + oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[3]], + 8, 16, phi_s2, 190, 8, 16, 1024, 1024); } phi_s2 = 42; @@ -3198,17 +3170,17 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s2 = 42; // Rupee Counter - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); } else if (gSaveContext.rupees != 0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); } - gDPSetCombineLERP(gfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, + gDPSetCombineLERP(oGfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); interfaceCtx->counterDigits[0] = interfaceCtx->counterDigits[1] = 0; @@ -3232,8 +3204,8 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s1 = sRupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)]; for (phi_s3 = 0; phi_s3 < phi_s1; phi_s3++, phi_s0++, phi_s2 += 8) { - gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8, - 16, phi_s2, 206, 8, 16, 1024, 1024); + oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[interfaceCtx->counterDigits[phi_s0]], 8, + 16, phi_s2, 206, 8, 16, 1024, 1024); } Interface_DrawMagicBar(globalCtx); @@ -3247,9 +3219,9 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawItemButtons(globalCtx); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (interfaceCtx->unk_1FA == 0) { // B Button Icon & possibly Ammo Count @@ -3258,8 +3230,8 @@ void Interface_Draw(GlobalContext* globalCtx) { if ((player->stateFlags1 & 0x00800000) || (globalCtx->unk_11E5C >= 2) || ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 0, interfaceCtx->bAlpha); @@ -3267,91 +3239,91 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { // B Button Do Action Label - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (u32)interfaceCtx->do_actionSegment + 0x180); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 191, 683); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60); R_B_LABEL_DD = 1024.0f / (WREG(37 + gSaveContext.language) / 100.0f); - gSPTextureRectangle(gfxCtx->overlay.p++, R_B_LABEL_X(gSaveContext.language) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, R_B_LABEL_X(gSaveContext.language) << 2, R_B_LABEL_Y(gSaveContext.language) << 2, (R_B_LABEL_X(gSaveContext.language) + 48) << 2, (R_B_LABEL_Y(gSaveContext.language) + 16) << 2, G_TX_RENDERTILE, 0, 0, R_B_LABEL_DD, R_B_LABEL_DD); } - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); // C-Left Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[1] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x1000), 1); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 1, interfaceCtx->cLeftAlpha); } - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); // C-Down Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[2] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x2000), 2); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 2, interfaceCtx->cDownAlpha); } - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); // C-Right Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[3] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x3000), 3); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, - PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, + 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); Interface_DrawAmmoCount(globalCtx, 3, interfaceCtx->cRightAlpha); } // A Button func_80094A14(globalCtx->state.gfxCtx); func_8008A8B8(globalCtx, R_A_BTN_Y, R_A_BTN_Y + 45, R_A_BTN_X, R_A_BTN_X + 45); - gSPClearGeometryMode(gfxCtx->overlay.p++, G_CULL_BOTH); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2), + gSPClearGeometryMode(oGfxCtx->overlay.p++, G_CULL_BOTH); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2), interfaceCtx->aAlpha); Interface_DrawActionButton(globalCtx); - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); func_8008A8B8(globalCtx, R_A_ICON_Y, R_A_ICON_Y + 45, R_A_ICON_X, R_A_ICON_X + 45); - gSPSetGeometryMode(gfxCtx->overlay.p++, G_CULL_BACK); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gSPSetGeometryMode(oGfxCtx->overlay.p++, G_CULL_BACK); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); Matrix_Translate(0.0f, 0.0f, WREG(46 + gSaveContext.language) / 10.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); Matrix_RotateX(interfaceCtx->unk_1F4 / 10000.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3701), + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_parameter.c", 3701), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPVertex(gfxCtx->overlay.p++, &interfaceCtx->vtx_128[4], 4, 0); + gSPVertex(oGfxCtx->overlay.p++, &interfaceCtx->vtx_128[4], 4, 0); if ((interfaceCtx->unk_1EC < 2) || (interfaceCtx->unk_1EC == 3)) { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)(u32)interfaceCtx->do_actionSegment); @@ -3359,16 +3331,16 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)((u32)interfaceCtx->do_actionSegment + 0x180)); } - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); func_8008A994(interfaceCtx); if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) { // Inventory Equip Effects - gSPSegment(gfxCtx->overlay.p++, 0x08, pauseCtx->unk_128); + gSPSegment(oGfxCtx->overlay.p++, 0x08, pauseCtx->unk_128); func_80094A14(globalCtx->state.gfxCtx); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gSPMatrix(gfxCtx->overlay.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gSPMatrix(oGfxCtx->overlay.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); pauseCtx->vtx_168[16].v.ob[0] = pauseCtx->vtx_168[18].v.ob[0] = pauseCtx->unk_254 / 10; pauseCtx->vtx_168[17].v.ob[0] = pauseCtx->vtx_168[19].v.ob[0] = @@ -3379,25 +3351,25 @@ void Interface_Draw(GlobalContext* globalCtx) { if (pauseCtx->unk_24E < 0xBF) { // Normal Equip (icon goes from the inventory slot to the C button when equipping it) - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, pauseCtx->unk_258); - gSPVertex(gfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, pauseCtx->unk_258); + gSPVertex(oGfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, gItemIcons[pauseCtx->unk_24E]); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, gItemIcons[pauseCtx->unk_24E]); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 1023, 128); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 1023, 128); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); } else { // Magic Arrow Equip Effect phi_s3_2 = pauseCtx->unk_24E - 0xBF; - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, sMagicArrowEffectsR[phi_s3_2], sMagicArrowEffectsG[phi_s3_2], - sMagicArrowEffectsB[phi_s3_2], pauseCtx->unk_258); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, sMagicArrowEffectsR[phi_s3_2], + sMagicArrowEffectsG[phi_s3_2], sMagicArrowEffectsB[phi_s3_2], pauseCtx->unk_258); if ((pauseCtx->unk_258 > 0) && (pauseCtx->unk_258 < 0xFF)) { phi_s3_2 = (pauseCtx->unk_258 / 8) / 2; @@ -3411,21 +3383,21 @@ void Interface_Draw(GlobalContext* globalCtx) { pauseCtx->vtx_168[16].v.ob[1] - phi_s3_2 * 2 - 32; } - gSPVertex(gfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_080895C0); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gSPVertex(oGfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_080895C0); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 511, 512); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 511, 512); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 124); } - gSP1Quadrangle(gfxCtx->overlay.p++, 0, 2, 3, 1, 0); + gSP1Quadrangle(oGfxCtx->overlay.p++, 0, 2, 3, 1, 0); } func_80094520(globalCtx->state.gfxCtx); @@ -3435,29 +3407,29 @@ void Interface_Draw(GlobalContext* globalCtx) { // Carrots rendering if the action corresponds to riding a horse if (interfaceCtx->unk_1EE == 8) { // Load Carrot Icon - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, &D_02002100); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, &D_02002100); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 255, 256); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 255, 256); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 60, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 60, 60); // Draw 6 carrots phi_s1 = ZREG(14); for (phi_s3 = 1; phi_s3 < 7; phi_s3++) { // Carrot Color (based on availability) if ((interfaceCtx->unk_23A == 0) || (interfaceCtx->unk_23A < phi_s3)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); } - gSPTextureRectangle(gfxCtx->overlay.p++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, (ZREG(15) + 16) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); phi_s1 += 16; @@ -3465,42 +3437,42 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { // Score for the Horseback Archery - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); // Target Icon - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_02002600); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_02002600); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadBlock(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 383, 342); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 6, 0x0000, G_TX_RENDERTILE, 0, + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadBlock(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, 383, 342); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 6, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 92, 60); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 92, 60); - gSPTextureRectangle(gfxCtx->overlay.p++, (WREG(32) + 28) << 2, ZREG(15) << 2, (WREG(32) + 52) << 2, + gSPTextureRectangle(oGfxCtx->overlay.p++, (WREG(32) + 28) << 2, ZREG(15) << 2, (WREG(32) + 52) << 2, (ZREG(15) + 16) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); // Score Counter - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); phi_s0 = 0; phi_s1 = WREG(32) + 6 * 9; for (phi_s3 = 0; phi_s3 < 4; phi_s3++) { if (sHBAScoreDigits[phi_s3] != 0 || (phi_s0 != 0) || (phi_s3 >= 3)) { - gfxCtx->overlay.p = - Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1, + oGfxCtx->overlay.p = + Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[sHBAScoreDigits[phi_s3]], 8, 16, phi_s1, ZREG(15) - 2, sDigitWidth[0], VREG(42), VREG(43) * 2, VREG(43) * 2); phi_s1 += 9; phi_s0++; } } - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); } } @@ -3881,35 +3853,35 @@ void Interface_Draw(GlobalContext* globalCtx) { } // Clock Icon - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); - gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); - gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timerX[sp274], - gSaveContext.timerY[sp274] + 2, 16, 16, 1024, 1024); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); + gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0); + oGfxCtx->overlay.p = Gfx_TextureIA8(oGfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timerX[sp274], + gSaveContext.timerY[sp274] + 2, 16, 16, 1024, 1024); // Timer Counter - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (gSaveContext.timer1State != 0) { if ((gSaveContext.timer1Value < 10) && (gSaveContext.timer1State < 11)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); } } else { if ((gSaveContext.timer2Value < 10) && (gSaveContext.timer2State < 6)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 0, 255); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 0, 255); } } for (phi_s3 = 0; phi_s3 < 5; phi_s3++) { - gfxCtx->overlay.p = Gfx_TextureI8(gfxCtx->overlay.p, &D_02003040[sTimerDigits[phi_s3]], 8, 16, - gSaveContext.timerX[sp274] + sTimerDigitLeftPos[phi_s3], - gSaveContext.timerY[sp274], sDigitWidth[phi_s3], VREG(42), - VREG(43) * 2, VREG(43) * 2); + oGfxCtx->overlay.p = Gfx_TextureI8(oGfxCtx->overlay.p, &D_02003040[sTimerDigits[phi_s3]], 8, 16, + gSaveContext.timerX[sp274] + sTimerDigitLeftPos[phi_s3], + gSaveContext.timerY[sp274], sDigitWidth[phi_s3], VREG(42), + VREG(43) * 2, VREG(43) * 2); } } } @@ -3920,13 +3892,13 @@ void Interface_Draw(GlobalContext* globalCtx) { } if (interfaceCtx->unk_244 != 0) { - gDPPipeSync(gfxCtx->overlay.p++); - gSPDisplayList(gfxCtx->overlay.p++, sSetupDL_80125A60); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0, 0, 0, interfaceCtx->unk_244); - gDPFillRectangle(gfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, gScreenHeight - 1); + gDPPipeSync(oGfxCtx->overlay.p++); + gSPDisplayList(oGfxCtx->overlay.p++, sSetupDL_80125A60); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 0, 0, 0, interfaceCtx->unk_244); + gDPFillRectangle(oGfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, gScreenHeight - 1); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_parameter.c", 4269); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 4269); } #else s16 D_8015FFE0; diff --git a/src/code/z_play.c b/src/code/z_play.c index 5e40fce7ba..1a1b8431a1 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -223,18 +223,18 @@ void Gameplay_Init(GlobalContext* globalCtx) { globalCtx->cameraPtrs[i] = NULL; } - func_80057C6C(&globalCtx->cameras[0], &globalCtx->view, &globalCtx->colCtx, globalCtx); - Camera_ChangeStatus(&globalCtx->cameras[0], 7); + func_80057C6C(&globalCtx->mainCamera, &globalCtx->view, &globalCtx->colCtx, globalCtx); + Camera_ChangeStatus(&globalCtx->mainCamera, 7); for (i = 0; i < 3; i++) { - func_80057C6C(&globalCtx->cameras[i + 1], &globalCtx->view, &globalCtx->colCtx, globalCtx); - Camera_ChangeStatus(&globalCtx->cameras[i + 1], 0x100); + func_80057C6C(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); + Camera_ChangeStatus(&globalCtx->subCameras[i], 0x100); } - globalCtx->cameraPtrs[0] = &globalCtx->cameras[0]; + globalCtx->cameraPtrs[0] = &globalCtx->mainCamera; globalCtx->cameraPtrs[0]->uid = 0; globalCtx->activeCamera = 0; - func_8005AC48(&globalCtx->cameras[0], 0xFF); + func_8005AC48(&globalCtx->mainCamera, 0xFF); func_800A9D28(globalCtx, &globalCtx->sub_1F74); func_80112098(globalCtx); func_80110F68(globalCtx); @@ -385,13 +385,13 @@ void Gameplay_Init(GlobalContext* globalCtx) { } player = PLAYER; - func_80058148(&globalCtx->cameras[0], player); - func_8005A444(&globalCtx->cameras[0], 0); + func_80058148(&globalCtx->mainCamera, player); + func_8005A444(&globalCtx->mainCamera, 0); playerStartCamId = player->actor.params & 0xFF; if (playerStartCamId != 0xFF) { osSyncPrintf("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartCamId); - func_8005A7A8(&globalCtx->cameras[0], playerStartCamId); + func_8005A7A8(&globalCtx->mainCamera, playerStartCamId); } if (YREG(15) == 0x20) { @@ -453,9 +453,9 @@ void Gameplay_Update(GlobalContext* globalCtx) { ActorOverlayTable_LogPrint(); } - gSegments[4] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSegments[5] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSegments[2] = PHYSICAL_TO_VIRTUAL(globalCtx->sceneSegment); + gSegments[4] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSegments[5] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); if (func_8008E6AC(&globalCtx->sub_7B8, &input[1]) != 0) { if ((globalCtx->transitionMode == 0) && (globalCtx->sceneLoadFlag != 0)) { @@ -1070,39 +1070,37 @@ void Gameplay_DrawOverlayElements(GlobalContext* globalCtx) { #ifdef NON_MATCHING // regalloc, stack usage and minor ordering differences void Gameplay_Draw(GlobalContext* globalCtx) { + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; LightMapper* sp228; Vec3f sp21C; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; // 0x208 - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_play.c", 3907); + OPEN_DISPS(gfxCtx, "../z_play.c", 3907); - gSegments[4] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSegments[5] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSegments[2] = PHYSICAL_TO_VIRTUAL(globalCtx->sceneSegment); + gSegments[4] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSegments[5] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); - gSPSegment(gfxCtx->polyXlu.p++, 0x00, NULL); - gSPSegment(gfxCtx->overlay.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyXlu.p++, 0x00, NULL); + gSPSegment(oGfxCtx->overlay.p++, 0x00, NULL); - gSPSegment(gfxCtx->polyOpa.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(gfxCtx->polyXlu.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(gfxCtx->overlay.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); + gSPSegment(oGfxCtx->overlay.p++, 0x04, globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment); - gSPSegment(gfxCtx->polyOpa.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(gfxCtx->polyXlu.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(gfxCtx->overlay.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSPSegment(oGfxCtx->overlay.p++, 0x05, globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); - gSPSegment(gfxCtx->polyOpa.p++, 0x02, globalCtx->sceneSegment); - gSPSegment(gfxCtx->polyXlu.p++, 0x02, globalCtx->sceneSegment); - gSPSegment(gfxCtx->overlay.p++, 0x02, globalCtx->sceneSegment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x02, globalCtx->sceneSegment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x02, globalCtx->sceneSegment); + gSPSegment(oGfxCtx->overlay.p++, 0x02, globalCtx->sceneSegment); func_80095248(gfxCtx, 0, 0, 0); if ((HREG(80) != 10) || (HREG(82) != 0)) { - gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p); - gfxCtx->polyXlu.p = func_800BC8A0(globalCtx, gfxCtx->polyXlu.p); + oGfxCtx->polyOpa.p = func_800BC8A0(globalCtx, oGfxCtx->polyOpa.p); + oGfxCtx->polyXlu.p = func_800BC8A0(globalCtx, oGfxCtx->polyXlu.p); func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.zNear, globalCtx->lightCtx.unk_0C); func_800AAA50(&globalCtx->view, 15); @@ -1122,12 +1120,12 @@ void Gameplay_Draw(GlobalContext* globalCtx) { globalCtx->unk_11DE0 = Matrix_MtxFToMtx(Matrix_CheckFloats(&globalCtx->mf_11DA0, "../z_play.c", 4005), Graph_Alloc(gfxCtx, sizeof(Mtx))); - gSPSegment(gfxCtx->polyOpa.p++, 0x01, globalCtx->unk_11DE0); + gSPSegment(oGfxCtx->polyOpa.p++, 0x01, globalCtx->unk_11DE0); if ((HREG(80) != 10) || (HREG(92) != 0)) { - Gfx* sp1CC = gfxCtx->polyOpa.p; - Gfx* gfxP = Graph_GfxPlusOne(gfxCtx->polyOpa.p); - gSPDisplayList(gfxCtx->overlay.p++, gfxP); + Gfx* sp1CC = oGfxCtx->polyOpa.p; + Gfx* gfxP = Graph_GfxPlusOne(oGfxCtx->polyOpa.p); + gSPDisplayList(oGfxCtx->overlay.p++, gfxP); if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) || (globalCtx->transitionCtx.transitionType >= 56)) { @@ -1151,13 +1149,13 @@ void Gameplay_Draw(GlobalContext* globalCtx) { gSPEndDisplayList(gfxP++); Graph_BranchDlist(sp1CC, gfxP); - gfxCtx->polyOpa.p = gfxP; + oGfxCtx->polyOpa.p = gfxP; } if (gTrnsnUnkState == 3) { - Gfx* sp88 = gfxCtx->polyOpa.p; + Gfx* sp88 = oGfxCtx->polyOpa.p; TransitionUnk_Draw(&sTrnsnUnk, &sp88); - gfxCtx->polyOpa.p = sp88; + oGfxCtx->polyOpa.p = sp88; goto Gameplay_Draw_DrawOverlayElements; } else { func_800C0ED8(&globalCtx->preRenderCtx, 0x140, 0xF0, gfxCtx->curFrameBuffer, gZBuffer); @@ -1171,9 +1169,9 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } if (R_PAUSE_MENU_MODE == 3) { - Gfx* sp84 = gfxCtx->polyOpa.p; + Gfx* sp84 = oGfxCtx->polyOpa.p; func_800C24BC(&globalCtx->preRenderCtx, &sp84); - gfxCtx->polyOpa.p = sp84; + oGfxCtx->polyOpa.p = sp84; goto Gameplay_Draw_DrawOverlayElements; } else { s32 sp80; @@ -1288,7 +1286,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } if ((R_PAUSE_MENU_MODE == 1) || (gTrnsnUnkState == 1)) { - Gfx* sp70 = gfxCtx->overlay.p; + Gfx* sp70 = oGfxCtx->overlay.p; globalCtx->preRenderCtx.unk_10 = gfxCtx->curFrameBuffer; globalCtx->preRenderCtx.unk_14 = gZBuffer; func_800C1F20(&globalCtx->preRenderCtx, &sp70); @@ -1299,7 +1297,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } else { gTrnsnUnkState = 2; } - gfxCtx->overlay.p = sp70; + oGfxCtx->overlay.p = sp70; globalCtx->preRenderCtx.unk_A3 = 2; SREG(33) |= 1; } else { @@ -1325,7 +1323,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { func_80059EC8(ACTIVE_CAM); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_play.c", 4508); + CLOSE_DISPS(gfxCtx, "../z_play.c", 4508); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Gameplay_Draw.s") @@ -1493,7 +1491,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) { if (globalCtx->sceneSegment == NULL) { __assert("this->sceneSegment != NULL", "../z_play.c", 4960); } - gSegments[2] = PHYSICAL_TO_VIRTUAL(globalCtx->sceneSegment); + gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); Gameplay_InitScene(globalCtx, spawn); @@ -1531,7 +1529,7 @@ s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) { CYAN) " " VT_RST "\n", i); - globalCtx->cameraPtrs[i] = &globalCtx->cameras[i]; + globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - 1]; func_80057C6C(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); globalCtx->cameraPtrs[i]->unk_164 = i; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 1b11906294..ea71bae7aa 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -506,23 +506,20 @@ void func_800906D4(GlobalContext* globalCtx, Player* player, ColliderTrisItemDim void func_800907E4(GlobalContext* globalCtx, Player* player, Vec3f* arg2, s32 arg3) { f32 sp4C; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; sp4C = (player->exchangeItemId != 0) ? 6.0f : 14.0f; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_player_lib.c", 0x961); - gSegments[6] = PHYSICAL_TO_VIRTUAL(player->getItemModel); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 0x961); + gSegments[6] = VIRTUAL_TO_PHYSICAL(player->getItemModel); - gSPSegment(gfxCtx->polyOpa.p++, 0x06, player->getItemModel); - gSPSegment(gfxCtx->polyXlu.p++, 0x06, player->getItemModel); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, player->getItemModel); + gSPSegment(oGfxCtx->polyXlu.p++, 0x06, player->getItemModel); Matrix_Translate(arg2->x + (Math_Sins(player->actor.shape.rot.y) * 3.3f), arg2->y + sp4C, arg2->z + ((3.3f + (IREG(90) / 10.0f)) * Math_Coss(player->actor.shape.rot.y)), MTXMODE_NEW); Matrix_RotateRPY(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY); Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY); func_800694A0(globalCtx, arg3 - 1); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_player_lib.c", 0x975); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 0x975); } void func_800909B4(GlobalContext* globalCtx, Player* player) { @@ -558,8 +555,6 @@ void func_80090AFC(GlobalContext* globalCtx, Player* player, f32 arg2) { Vec3f sp68; f32 sp64; f32 sp60; - Gfx* dispRefs[5]; // TODO confirm size - GraphicsContext* gfxCtx; D_801260D0 = 0.0f; Matrix_MultVec3f(&D_801260C8, &sp8C); @@ -567,10 +562,9 @@ void func_80090AFC(GlobalContext* globalCtx, Player* player, f32 arg2) { Matrix_MultVec3f(&D_801260C8, &sp80); if (func_8003E188(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98) != 0) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_player_lib.c", 0xA0C); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 0xA0C); - gfxCtx->overlay.p = Gfx_CallSetupDL(gfxCtx->overlay.p, 7); + oGfxCtx->overlay.p = Gfx_CallSetupDL(oGfxCtx->overlay.p, 7); SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp74, &sp68, &sp64); @@ -579,12 +573,12 @@ void func_80090AFC(GlobalContext* globalCtx, Player* player, f32 arg2) { Matrix_Translate(sp74.x, sp74.y, sp74.z, MTXMODE_NEW); Matrix_Scale(sp60, sp60, sp60, MTXMODE_APPLY); - gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(gfxCtx, "../z_player_lib.c", 0xA1B), + gSPMatrix(oGfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 0xA1B), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->overlay.p++, 0x06, globalCtx->objectCtx.status[player->actor.objBankIndex].segment); - gSPDisplayList(gfxCtx->overlay.p++, &D_0602CB48); + gSPSegment(oGfxCtx->overlay.p++, 0x06, globalCtx->objectCtx.status[player->actor.objBankIndex].segment); + gSPDisplayList(oGfxCtx->overlay.p++, &D_0602CB48); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_player_lib.c", 0xA20); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 0xA20); } } #else diff --git a/src/code/z_prenmi.c b/src/code/z_prenmi.c index c897083e5a..eeae441cea 100644 --- a/src/code/z_prenmi.c +++ b/src/code/z_prenmi.c @@ -26,19 +26,18 @@ void PreNMI_Update(PreNMIContext* prenmiCtx) { void PreNMI_Draw(PreNMIContext* prenmiCtx) { GraphicsContext* gfxCtx = prenmiCtx->state.gfxCtx; - Gfx* dispRefs[5]; osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_draw\n" VT_RST); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_prenmi.c", 96); + OPEN_DISPS(gfxCtx, "../z_prenmi.c", 96); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); func_800940B0(gfxCtx); - gDPSetFillColor(gfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); - gDPFillRectangle(gfxCtx->polyOpa.p++, 0, prenmiCtx->timer + 100, SCREEN_WIDTH - 1, prenmiCtx->timer + 100); + gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); + gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, prenmiCtx->timer + 100, SCREEN_WIDTH - 1, prenmiCtx->timer + 100); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_prenmi.c", 112); + CLOSE_DISPS(gfxCtx, "../z_prenmi.c", 112); } void PreNMI_Main(PreNMIContext* prenmiCtx) { diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 63c2d93820..4adc982fc3 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -857,169 +857,137 @@ Gfx* func_80093808(Gfx* gfx) { } void func_80093848(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1293); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1293); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3A]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3A]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1297); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1297); } void func_800938B4(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1309); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1309); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x39]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x39]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1313); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1313); } void func_80093920(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1325); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1325); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x32]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x32]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1329); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1329); } void func_8009398C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1341); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1341); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x33]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x33]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1345); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1345); } void func_800939F8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1357); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1357); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x34]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x34]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1361); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1361); } void func_80093A64(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1373); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1373); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x35]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x35]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1377); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1377); } void func_80093AD0(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1389); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1389); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x36]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x36]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1393); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1393); } void func_80093B3C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1405); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1405); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x37]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x37]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1409); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1409); } void func_80093BA8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1421); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1421); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1A]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1A]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1425); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1425); } void func_80093C14(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1439); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1439); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1443); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1443); } void func_80093C80(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - gfxCtx = globalCtx->state.gfxCtx; func_80093D18(gfxCtx); if (globalCtx->roomCtx.curRoom.unk_03 == 3) { - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1460); + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1460); - gDPSetColorDither(gfxCtx->polyOpa.p++, G_CD_DISABLE); + gDPSetColorDither(oGfxCtx->polyOpa.p++, G_CD_DISABLE); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1462); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1462); } } void func_80093D18(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1475); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1475); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x19]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x19]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1479); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1479); } void func_80093D84(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1491); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1491); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x19]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1495); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1495); } void func_80093DF0(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1507); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1507); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1F]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1F]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1511); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1511); } void func_80093E5C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1523); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1523); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x20]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x20]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1527); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1527); } void func_80093EC8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1539); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1539); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x21]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x21]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1543); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1543); } Gfx* func_80093F34(Gfx* gfx) { @@ -1033,43 +1001,35 @@ Gfx* func_80093F58(Gfx* gfx) { } void func_80093F7C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1569); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1569); + oGfxCtx->polyOpa.p = func_80093F58(oGfxCtx->polyOpa.p); - gfxCtx->polyOpa.p = func_80093F58(gfxCtx->polyOpa.p); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1573); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1573); } void func_80093FD8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1585); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1585); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x23]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x23]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1589); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1589); } void func_80094044(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1601); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1601); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2C]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2C]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1605); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1605); } void func_800940B0(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1617); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1617); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x24]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x24]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1621); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1621); } Gfx* func_8009411C(Gfx* gfx) { @@ -1078,83 +1038,67 @@ Gfx* func_8009411C(Gfx* gfx) { } void func_80094140(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1640); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1640); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1C]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x1C]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1644); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1644); } void func_800941AC(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1651); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1651); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2B]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2B]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1655); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1655); } void func_80094218(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1670); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1670); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2D]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2D]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1674); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1674); } void func_80094284(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1681); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1681); + gSPDisplayList(oGfxCtx->overlay.p++, &sSetupDL[6 * 0x2E]); - gSPDisplayList(gfxCtx->overlay.p++, &sSetupDL[6 * 0x2E]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1685); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1685); } void func_800942F0(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1700); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1700); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x26]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x26]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1704); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1704); } void func_8009435C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1722); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1722); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x04]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x04]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1726); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1726); } void func_800943C8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1758); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1758); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x25]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x25]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1762); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1762); } void func_80094434(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1775); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1775); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x02]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x02]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1779); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1779); } Gfx* func_800944A0(Gfx* gfx) { @@ -1163,23 +1107,19 @@ Gfx* func_800944A0(Gfx* gfx) { } void func_800944C4(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1799); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1799); + oGfxCtx->polyOpa.p = func_800944A0(oGfxCtx->polyOpa.p); - gfxCtx->polyOpa.p = func_800944A0(gfxCtx->polyOpa.p); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1801); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1801); } void func_80094520(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1809); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1809); + oGfxCtx->overlay.p = func_800944A0(oGfxCtx->overlay.p); - gfxCtx->overlay.p = func_800944A0(gfxCtx->overlay.p); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1811); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1811); } void func_8009457C(Gfx** gfxp) { @@ -1189,33 +1129,27 @@ void func_8009457C(Gfx** gfxp) { } void func_800945A0(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1837); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1837); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x28]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x28]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1841); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1841); } void func_8009460C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1853); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1853); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x29]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x29]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1857); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1857); } void func_80094678(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1869); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1869); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2F]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x2F]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1873); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1873); } Gfx* func_800946E4(Gfx* gfx) { @@ -1275,84 +1209,68 @@ Gfx* func_80094968(Gfx* gfx) { } void func_800949A8(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1953); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1953); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2A]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x2A]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1957); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1957); } void func_80094A14(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1964); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1964); + gSPDisplayList(oGfxCtx->overlay.p++, &sSetupDL[6 * 0x2A]); - gSPDisplayList(gfxCtx->overlay.p++, &sSetupDL[6 * 0x2A]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1968); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1968); } void func_80094A80(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 1992); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 1992); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x30]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x30]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 1996); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 1996); } void func_80094AEC(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2008); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2008); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x31]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x31]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2012); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2012); } void func_80094B58(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2024); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2024); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x1B]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x1B]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2028); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2028); } void func_80094BC4(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2040); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2040); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3C]); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3C]); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2043); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2043); } void func_80094C50(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2056); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2056); + gSPDisplayList(oGfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3D]); - gSPDisplayList(gfxCtx->polyXlu.p++, &sSetupDL[6 * 0x3D]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2058); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2058); } void func_80094CBC(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2086); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2086); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x38]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x38]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2090); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2090); } void func_80094D28(Gfx** gfxp) { @@ -1362,13 +1280,11 @@ void func_80094D28(Gfx** gfxp) { } void func_80094D4C(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2112); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2112); + gSPDisplayList(oGfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3B]); - gSPDisplayList(gfxCtx->polyOpa.p++, &sSetupDL[6 * 0x3B]); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2116); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2116); } Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height) { @@ -1448,30 +1364,27 @@ Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a) { } void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { - Gfx* dispRefs[5]; - s32 ret; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2386); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2386); + gSPDisplayList(oGfxCtx->polyOpa.p++, sFillSetupDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, sFillSetupDL); + gSPDisplayList(oGfxCtx->overlay.p++, sFillSetupDL); - gSPDisplayList(gfxCtx->polyOpa.p++, sFillSetupDL); - gSPDisplayList(gfxCtx->polyXlu.p++, sFillSetupDL); - gSPDisplayList(gfxCtx->overlay.p++, sFillSetupDL); + gDPSetScissorFrac(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetScissorFrac(oGfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetScissorFrac(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetScissorFrac(gfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetScissorFrac(gfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetScissorFrac(gfxCtx->overlay.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(oGfxCtx->polyXlu.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetColorImage(oGfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(gfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(gfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(gfxCtx->polyXlu.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetColorImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - - gDPSetDepthImage(gfxCtx->polyOpa.p++, gZBuffer); - gDPSetDepthImage(gfxCtx->polyXlu.p++, gZBuffer); - gDPSetDepthImage(gfxCtx->overlay.p++, gZBuffer); + gDPSetDepthImage(oGfxCtx->polyOpa.p++, gZBuffer); + gDPSetDepthImage(oGfxCtx->polyXlu.p++, gZBuffer); + gDPSetDepthImage(oGfxCtx->overlay.p++, gZBuffer); if ((R_PAUSE_MENU_MODE < 2) && (gTrnsnUnkState < 2)) { - ret = ShrinkWindow_GetCurrentVal(); + s32 ret = ShrinkWindow_GetCurrentVal(); if (HREG(80) == 16) { if (HREG(95) != 16) { @@ -1513,44 +1426,42 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { } } - gDPSetColorImage(gfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gZBuffer); - gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(gfxCtx->polyOpa.p++, + gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gZBuffer); + gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); + gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)); - gDPFillRectangle(gfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); - gDPPipeSync(gfxCtx->polyOpa.p++); + gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); + gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPSetColorImage(gfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_FILL); - gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(gfxCtx->polyOpa.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); - gDPFillRectangle(gfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); - gDPPipeSync(gfxCtx->polyOpa.p++); + gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); + gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_FILL); + gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); + gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); + gDPPipeSync(oGfxCtx->polyOpa.p++); if (ret > 0) { - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetCycleType(gfxCtx->overlay.p++, G_CYC_FILL); - gDPSetRenderMode(gfxCtx->overlay.p++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(gfxCtx->overlay.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); - gDPFillRectangle(gfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, ret - 1); - gDPFillRectangle(gfxCtx->overlay.p++, 0, gScreenHeight - ret, gScreenWidth - 1, gScreenHeight - 1); - gDPPipeSync(gfxCtx->overlay.p++); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetCycleType(oGfxCtx->overlay.p++, G_CYC_FILL); + gDPSetRenderMode(oGfxCtx->overlay.p++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(oGfxCtx->overlay.p++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1)); + gDPFillRectangle(oGfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, ret - 1); + gDPFillRectangle(oGfxCtx->overlay.p++, 0, gScreenHeight - ret, gScreenWidth - 1, gScreenHeight - 1); + gDPPipeSync(oGfxCtx->overlay.p++); } } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2497); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2497); } void func_80095974(GraphicsContext* gfxCtx) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_rcp.c", 2503); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_rcp.c", 2503); + gSPDisplayList(oGfxCtx->polyOpa.p++, sFillSetupDL); + gDPSetScissorFrac(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); + gDPSetDepthImage(oGfxCtx->polyOpa.p++, gZBuffer); + gDPSetColorImage(oGfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - gSPDisplayList(gfxCtx->polyOpa.p++, sFillSetupDL); - gDPSetScissorFrac(gfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, 0, 0, gScreenWidth * 4.0f, gScreenHeight * 4.0f); - gDPSetDepthImage(gfxCtx->polyOpa.p++, gZBuffer); - gDPSetColorImage(gfxCtx->polyOpa.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gfxCtx->curFrameBuffer); - - Graph_CloseDisps(dispRefs, gfxCtx, "../z_rcp.c", 2513); + CLOSE_DISPS(gfxCtx, "../z_rcp.c", 2513); } diff --git a/src/code/z_room.c b/src/code/z_room.c index 898fd57a1e..7a25609d48 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -37,41 +37,38 @@ void func_80095AB4(GlobalContext* globalCtx, Room* room, u32 flags) { s32 i; PolygonType0* polygon0; PolygonDlist* polygonDlist; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 193); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 193); if (flags & 1) { func_800342EC(&D_801270A0, globalCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); func_80093C80(globalCtx); - gSPMatrix(gfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } if (flags & 2) { func_8003435C(&D_801270A0, globalCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } polygon0 = &room->mesh->polygon0; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon0->start); for (i = 0; i < polygon0->num; i++) { if ((flags & 1) && (polygonDlist->opa != NULL)) { - gSPDisplayList(gfxCtx->polyOpa.p++, polygonDlist->opa); + gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); } if ((flags & 2) && (polygonDlist->xlu != NULL)) { - gSPDisplayList(gfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); } polygonDlist++; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 239); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 239); } #define SHAPE_SORT_MAX 64 @@ -104,26 +101,24 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { PolygonDlist2* sp78; f32 temp_f0; f32 temp_f2; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; spB0 = NULL; spB4 = NULL; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 287); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 287); if (flags & 1) { func_800342EC(&D_801270A0, globalCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); func_80093C80(globalCtx); - gSPMatrix(gfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } if (flags & 2) { func_8003435C(&D_801270A0, globalCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } spA4 = &spB8[0]; @@ -199,20 +194,20 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { if (((iREG(86) == 1) && (iREG(89) > sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(gfxCtx->polyOpa.p++, phi_s0->opa); + gSPDisplayList(oGfxCtx->polyOpa.p++, phi_s0->opa); } if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(gfxCtx->polyXlu.p++, phi_s0->xlu); + gSPDisplayList(oGfxCtx->polyXlu.p++, phi_s0->xlu); } } } else { if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(gfxCtx->polyOpa.p++, phi_s0->opa); + gSPDisplayList(oGfxCtx->polyOpa.p++, phi_s0->opa); } if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(gfxCtx->polyXlu.p++, phi_s0->xlu); + gSPDisplayList(oGfxCtx->polyXlu.p++, phi_s0->xlu); } } @@ -222,7 +217,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { iREG(88) = sp9C - 1; - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 430); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 430); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_room/func_80095D04.s") @@ -337,11 +332,8 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { u32 sp98; u32 sp94; u32 sp90; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 628); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628); camera = ACTIVE_CAM; sp9C = (camera->setting == 25); @@ -352,42 +344,42 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { sp90 = (flags & 2) && polygonDlist->xlu && !(SREG(25) & 4); if (sp94 || sp98) { - gSPSegment(gfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); if (sp94) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, polygonDlist->opa); + gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); } if (sp98) { - // gSPLoadUcodeL(gfxCtx->polyOpa.p++, rspS2DEX)? - gSPLoadUcodeEx(gfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); + // gSPLoadUcodeL(oGfxCtx->polyOpa.p++, rspS2DEX)? + gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); - if (1) { + { Vec3f sp60; - spA8 = gfxCtx->polyOpa.p; + spA8 = oGfxCtx->polyOpa.p; func_8005AFB4(&sp60, camera); func_8009638C(&spA8, polygon1->single.source, polygon1->single.tlut, polygon1->single.width, polygon1->single.height, polygon1->single.fmt, polygon1->single.siz, polygon1->single.mode0, polygon1->single.tlutCount, (sp60.x + sp60.z) * 1.2f + sp60.y * 0.6f, sp60.y * 2.4f + (sp60.x + sp60.z) * 0.3f); - gfxCtx->polyOpa.p = spA8; + oGfxCtx->polyOpa.p = spA8; } - // gSPLoadUcode(gfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? - gSPLoadUcodeEx(gfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); + // gSPLoadUcode(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? + gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); } } if (sp90) { - gSPSegment(gfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 691); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 691); } BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) { @@ -434,11 +426,8 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) { u32 sp94; u32 sp90; u32 sp8C; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 752); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752); camera = ACTIVE_CAM; sp98 = (camera->setting == 25); @@ -450,41 +439,41 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) { sp8C = (flags & 2) && polygonDlist->xlu && !(SREG(25) & 4); if (sp90 || sp94) { - gSPSegment(gfxCtx->polyOpa.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x03, room->segment); if (sp90) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, polygonDlist->opa); + gSPMatrix(oGfxCtx->polyOpa.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, polygonDlist->opa); } if (sp94) { - // gSPLoadUcodeL(gfxCtx->polyOpa.p++, rspS2DEX)? - gSPLoadUcodeEx(gfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); + // gSPLoadUcodeL(oGfxCtx->polyOpa.p++, rspS2DEX)? + gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800); - if (1) { + { Vec3f sp5C; - spA8 = gfxCtx->polyOpa.p; + spA8 = oGfxCtx->polyOpa.p; func_8005AFB4(&sp5C, camera); func_8009638C(&spA8, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, bgImage->fmt, bgImage->siz, bgImage->mode0, bgImage->tlutCount, (sp5C.x + sp5C.z) * 1.2f + sp5C.y * 0.6f, sp5C.y * 2.4f + (sp5C.x + sp5C.z) * 0.3f); - gfxCtx->polyOpa.p = spA8; + oGfxCtx->polyOpa.p = spA8; } - // gSPLoadUcode(gfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? - gSPLoadUcodeEx(gfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); + // gSPLoadUcode(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData())? + gSPLoadUcodeEx(oGfxCtx->polyOpa.p++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800); } } if (sp8C) { - gSPSegment(gfxCtx->polyXlu.p++, 0x03, room->segment); + gSPSegment(oGfxCtx->polyXlu.p++, 0x03, room->segment); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, polygonDlist->xlu); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyXlu.p++, polygonDlist->xlu); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_room.c", 819); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 819); } // Room Draw Polygon Type 1 @@ -607,7 +596,7 @@ s32 func_800973FC(GlobalContext* globalCtx, RoomContext* roomCtx) { if (!osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK)) { roomCtx->status = 0; roomCtx->curRoom.segment = roomCtx->unk_34; - gSegments[3] = PHYSICAL_TO_VIRTUAL2(roomCtx->unk_34); + gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->unk_34); Scene_ExecuteCommands(globalCtx, roomCtx->curRoom.segment); func_8008E750(globalCtx, PLAYER); @@ -624,7 +613,7 @@ s32 func_800973FC(GlobalContext* globalCtx, RoomContext* roomCtx) { void Room_Draw(GlobalContext* globalCtx, Room* room, u32 flags) { if (room->segment != NULL) { - gSegments[3] = PHYSICAL_TO_VIRTUAL(room->segment); + gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment); if (room->mesh->polygon.type >= ARRAY_COUNTU(sRoomDrawHandlers)) { __assert("this->ground_shape->polygon.type < number(Room_Draw_Proc)", "../z_room.c", 1125); } diff --git a/src/code/z_sample.c b/src/code/z_sample.c index 6bd1e95203..59ad5a59b3 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -12,33 +12,32 @@ void Sample_HandleStateChange(SampleContext* this) { void Sample_Draw(SampleContext* this) { GraphicsContext* gfxCtx = this->state.gfxCtx; View* view = &this->view; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_sample.c", 62); + OPEN_DISPS(gfxCtx, "../z_sample.c", 62); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); - gSPSegment(gfxCtx->polyOpa.p++, 0x01, this->staticSegment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x01, this->staticSegment); func_80095248(gfxCtx, 0, 0, 0); view->flags = 1 | 2 | 4; func_800AAA50(view, 15); - if (1) { + { Mtx* mtx = Graph_Alloc(gfxCtx, sizeof(Mtx)); guPosition(mtx, SREG(37), SREG(38), SREG(39), 1.0f, SREG(40), SREG(41), SREG(42)); - gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); } - gfxCtx->polyOpa.p = Gfx_SetFog2(gfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0); + oGfxCtx->polyOpa.p = Gfx_SetFog2(oGfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0); func_80093D18(gfxCtx); - gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE); - gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - gDPSetCombineMode(gfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0); + gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_1CYCLE); + gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + gDPSetCombineMode(oGfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_sample.c", 111); + CLOSE_DISPS(gfxCtx, "../z_sample.c", 111); } void Sample_Main(SampleContext* this) { diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 23ef3a5100..436fc72c60 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -76,7 +76,7 @@ void Object_InitBank(GlobalContext* globalCtx, ObjectContext* objectCtx) { objectCtx->spaceEnd = (void*)((s32)objectCtx->spaceStart + spaceSize); objectCtx->mainKeepIndex = Object_Spawn(objectCtx, OBJECT_GAMEPLAY_KEEP); - gSegments[4] = PHYSICAL_TO_VIRTUAL(objectCtx->status[objectCtx->mainKeepIndex].segment); + gSegments[4] = VIRTUAL_TO_PHYSICAL(objectCtx->status[objectCtx->mainKeepIndex].segment); } void Object_UpdateBank(ObjectContext* objectCtx) { @@ -255,7 +255,7 @@ void func_800987F8(GlobalContext* globalCtx, SceneCmd* cmd) { void func_8009883C(GlobalContext* globalCtx, SceneCmd* cmd) { if (cmd->specialFiles.keepObjectId != 0) { globalCtx->objectCtx.subKeepIndex = Object_Spawn(&globalCtx->objectCtx, cmd->specialFiles.keepObjectId); - gSegments[5] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); + gSegments[5] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment); } if (cmd->specialFiles.cUpElfMsgNum != 0) { diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 9d2ed095d0..4473697d32 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -946,15 +946,12 @@ void func_800994A0(GlobalContext* globalCtx) { // Scene Draw Config 0 void func_80099550(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4725); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4725); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDefaultDisplayList); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDefaultDisplayList); - gSPDisplayList(gfxCtx->polyOpa.p++, sDefaultDisplayList); - gSPDisplayList(gfxCtx->polyXlu.p++, sDefaultDisplayList); - - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4735); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4735); } u32 D_8012A2F8[] = { 0x0200BA18, 0x0200CA18 }; @@ -962,46 +959,40 @@ u32 D_8012A2F8[] = { 0x0200BA18, 0x0200CA18 }; // Scene Draw Config 19 void func_800995DC(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; gameplayFrames = globalCtx->gameplayFrames; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4763); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4763); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - { s32 pad; } // Necessary to match stack usage + { s32 pad; } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[gSaveContext.nightFlag])); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4783); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4783); } // Scene Draw Config 28 void func_80099760(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4845); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4845); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 2) % 128, 64, 32)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4859); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4859); } u32 D_8012A300[] = { 0x02012378, 0x02013378 }; @@ -1012,99 +1003,93 @@ void func_80099878(GlobalContext* globalCtx) { u32 gameplayFrames; s32 pad; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; displayListHead = Graph_Alloc(globalCtx->state.gfxCtx, 6 * sizeof(Gfx)); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4905); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4905); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A300[gSaveContext.nightFlag])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A308[(s32)(gameplayFrames & 14) >> 1])); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A300[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A308[(s32)(gameplayFrames & 14) >> 1])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 1) % 128, 64, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); - { s32 pad2[2]; } // Necessary to match stack usage + { s32 pad2[2]; } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[1]); gSPEndDisplayList(displayListHead); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4956); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4956); } // Scene Draw Config 30 void func_80099BD8(GlobalContext* globalCtx) { f32 temp; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; displayListHead = Graph_Alloc(globalCtx->state.gfxCtx, 18 * sizeof(Gfx)); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5069); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5069); temp = globalCtx->unk_11D30[0] / 255.0f; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, displayListHead); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 255 - (u8)(185.0f * temp), 255 - (u8)(145.0f * temp), 255 - (u8)(105.0f * temp), 255); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, displayListHead); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 76 + (u8)(6.0f * temp), 76 + (u8)(34.0f * temp), 76 + (u8)(74.0f * temp), 255); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, displayListHead); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); - gSPSegment(gfxCtx->polyXlu.p++, 0x0B, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, displayListHead); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, displayListHead); gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyOpa.p++, 0x0D, displayListHead); - gSPSegment(gfxCtx->polyXlu.p++, 0x0D, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[1]); gSPEndDisplayList(displayListHead); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5145); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5145); if (gSaveContext.sceneSetupIndex == 5) { D_8015FCF0 = 1; @@ -1120,169 +1105,151 @@ void func_80099BD8(GlobalContext* globalCtx) { // Scene Draw Config 31 void func_8009A45C(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5171); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5171); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gSPSegment( - gfxCtx->polyOpa.p++, 0x0A, + oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0, (gameplayFrames * 60) % 2048, 8, 512)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0D, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5212); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5212); } // Scene Draw Config 32 void func_8009A798(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5226); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5226); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5264); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5264); } // Scene Draw Config 33 void func_8009A9DC(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5278); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5278); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64, 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5301); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5301); } // Scene Draw Config 48 void func_8009AB98(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5317); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5317); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5330); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5330); } // Scene Draw Config 39 void func_8009ACA8(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5346); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5346); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5367); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5367); } // Scene Draw Config 24 void func_8009AE30(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5384); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5384); gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_HAKADAN_BS) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } else { - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5416); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5416); } u32 D_8012A328[] = { 0x0200BD20, 0x0200B920 }; @@ -1290,21 +1257,18 @@ u32 D_8012A328[] = { 0x0200BD20, 0x0200B920 }; // Scene Draw Config 40 void func_8009AFE0(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5490); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5490); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A328[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A328[gSaveContext.nightFlag])); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5507); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5507); } u32 D_8012A330[] = { 0x02014C30, 0x02015830 }; @@ -1314,11 +1278,8 @@ void func_8009B0FC(GlobalContext* globalCtx) { u32 gameplayFrames; s32 spB0; s32 spAC; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5535); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5535); if (1) {} // Necessary to match @@ -1326,172 +1287,160 @@ void func_8009B0FC(GlobalContext* globalCtx) { spAC = globalCtx->unk_11D30[1] & 0xFF; gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag])); if (spB0 == 1) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, spAC)); } else if (spB0 < 1) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 255)); } else { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); } if (spB0 == 2) { - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, spAC)); } else if (spB0 < 2) { - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 255)); } else { - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); } if (spB0 != 0) { - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 180)); } else { - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f))); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f))); } - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0D, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128)); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5644); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5644); } // Scene Draw Config 29 void func_8009B86C(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5791); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5791); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, globalCtx->unk_11D30[0]); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, globalCtx->unk_11D30[0]); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 145); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 145); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5808); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5808); } // Scene Draw Config 34 void func_8009B9BC(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5822); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5822); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5836); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5836); } // Scene Draw Config 35 void func_8009BAA4(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5850); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5850); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); if (globalCtx->sceneNum == SCENE_HAIRAL_NIWA) { - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64)); } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5876); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5876); } // Scene Draw Config 36 void func_8009BC44(GlobalContext* globalCtx) { u32 gameplayFrames; s8 sp83; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (1) {} // Necessary to match sp83 = coss((globalCtx->gameplayFrames * 1500) & 0xFFFF) >> 8; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5894); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5894); gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_GANON_TOU) { - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64)); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, 0, (gameplayFrames * 1) % 256, 64, 64)); } - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32, 1, (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); sp83 = (sp83 >> 1) + 192; - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp83, sp83, sp83, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp83, sp83, sp83, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5930); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5930); } // Screen Shake for Ganon's Tower Collapse @@ -1517,38 +1466,35 @@ void func_8009BEEC(GlobalContext* globalCtx) { void func_8009C0AC(GlobalContext* globalCtx) { u32 gameplayFrames; s8 sp7B; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (1) {} // Necessary to match sp7B = coss((globalCtx->gameplayFrames * 1500) & 0xFFFF) >> 8; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5968); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5968); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, 511 - (gameplayFrames * 1) % 512, 64, 128)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, 255 - (gameplayFrames * 1) % 256, 32, 64)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, (gameplayFrames * 30) % 2048, 16, 512)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); sp7B = (sp7B >> 1) + 192; - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp7B, sp7B, sp7B, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp7B, sp7B, sp7B, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6004); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6004); if (Flags_GetSwitch(globalCtx, 0x37)) { if ((globalCtx->sceneNum == SCENE_GANON_DEMO) || (globalCtx->sceneNum == SCENE_GANON_FINAL) || @@ -1563,113 +1509,101 @@ u32 D_8012A338[] = { 0x0200FAC0, 0x0200F8C0 }; // Scene Draw Config 37 void func_8009C3EC(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (0) {} // Necessary to match - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6042); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6042); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A338[gSaveContext.nightFlag])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A338[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6076); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6076); } // Scene Draw Config 42 void func_8009C608(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6151); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6151); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, (gameplayFrames * 50) % 2048, 8, 512)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, (gameplayFrames * 1) % 128, 0, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0B, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6187); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6187); } // Scene Draw Config 43 void func_8009C8B8(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6201); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6201); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6232); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6232); } // Scene Draw Config 47 void func_8009CAC0(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6249); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6249); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6264); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6264); } u32 D_8012A340[] = { 0x0200F8C0, 0x020100C0 }; @@ -1677,32 +1611,29 @@ u32 D_8012A340[] = { 0x0200F8C0, 0x020100C0 }; // Scene Draw Config 27 void func_8009CC00(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (0) {} // Necessary to match - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6290); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6290); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A340[gSaveContext.nightFlag])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A340[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6320); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6320); } Gfx* Gfx_TwoTexScrollPrimColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, @@ -1727,76 +1658,68 @@ Gfx* Gfx_TwoTexScrollPrimColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y // Scene Draw Config 50 void func_8009CF84(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6433); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6433); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 255, 255, 255, globalCtx->unk_11D30[0] + 127)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6449); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6449); } // Scene Draw Config 41 void func_8009D0E8(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6463); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6463); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16)); gSPSegment( - gfxCtx->polyXlu.p++, 0x0B, + oGfxCtx->polyXlu.p++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6491); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6491); } u32 D_8012A348[] = { 0x02005210, 0x02005010 }; // Scene Draw Config 44 void func_8009D31C(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad[2]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6515); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6515); + { s32 pad[2]; } - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6528); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6528); } u32 D_8012A350[] = { 0x02006550, 0x02003550 }; @@ -1805,11 +1728,8 @@ u32 D_8012A358[] = { 0x02002350, 0x02001350 }; // Scene Draw Config 45 void func_8009D438(GlobalContext* globalCtx) { s32 var; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6560); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6560); if (LINK_IS_ADULT) { var = 1; @@ -1817,41 +1737,38 @@ void func_8009D438(GlobalContext* globalCtx) { var = gSaveContext.nightFlag; } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A358[var])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A358[var])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6581); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6581); } // Scene Draw Config 46 void func_8009D5B4(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6595); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6595); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6615); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6615); } u32 D_8012A360[] = { 0x02014D90, 0x02014590 }; @@ -1859,77 +1776,68 @@ u32 D_8012A360[] = { 0x02014D90, 0x02014590 }; // Scene Draw Config 22 void func_8009D758(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (0) {} // Necessary to match - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6640); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6640); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A360[gSaveContext.nightFlag])); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A360[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6671); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6671); } u32 D_8012A368[] = { 0x02018920, 0x02018020 }; // Scene Draw Config 25 void func_8009D974(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad[2]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6752); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6752); + { s32 pad[2]; } - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A368[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A368[gSaveContext.nightFlag])); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6762); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6762); } // Scene Draw Config 1 void func_8009DA30(GlobalContext* globalCtx) { u32 gameplayFrames; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; displayListHead = Graph_Alloc(globalCtx->state.gfxCtx, 3 * sizeof(Gfx)); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6814); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6814); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, displayListHead); if ((gSaveContext.dayTime >= 0x4AAC) && (gSaveContext.dayTime <= 0xC555)) { gSPEndDisplayList(displayListHead); @@ -1949,58 +1857,52 @@ void func_8009DA30(GlobalContext* globalCtx) { gSPEndDisplayList(displayListHead); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6866); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6866); } u32 D_8012A370[] = { 0x02015B50, 0x02016B50 }; // Scene Draw Config 2 void func_8009DD5C(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad[2]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6890); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6890); + { s32 pad[2]; } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6903); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6903); } // Scene Draw Config 3 void func_8009DE78(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6917); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6917); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6948); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6948); } // Scene Draw Config 4 @@ -2009,30 +1911,29 @@ void func_8009E0B8(GlobalContext* globalCtx) { u8 spA3; u16 spA0; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; spA3 = 128; spA0 = 500; - gfxCtx = globalCtx->state.gfxCtx; displayListHead = Graph_Alloc(globalCtx->state.gfxCtx, 6 * sizeof(Gfx)); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6965); + if (1) {} + if (1) {} + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6965); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); if (gSaveContext.sceneSetupIndex == 4) { spA3 = 255 - (u8)globalCtx->unk_11D30[0]; @@ -2042,49 +1943,46 @@ void func_8009E0B8(GlobalContext* globalCtx) { spA0 = 2150; } - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 128, 128, 128, spA3); gSPEndDisplayList(displayListHead++); - gSPSegment(gfxCtx->polyXlu.p++, 0x0B, displayListHead); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 128, 128, 128, spA0 * 0.1f); gSPEndDisplayList(displayListHead); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16, 1, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16)); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7044); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7044); } // Scene Draw Config 5 void func_8009E54C(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7058); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7058); if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) { globalCtx->unk_11D30[0] = 87; } gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, 16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 255, 255, 255, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 255, 255, 255, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7097); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7097); } u32 D_8012A378[] = { 0x02008F98, 0x02008FD8 }; @@ -2093,120 +1991,108 @@ u32 D_8012A378[] = { 0x02008F98, 0x02008FD8 }; void func_8009E730(GlobalContext* globalCtx) { u32 gameplayFrames; u32 var; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7123); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7123); gameplayFrames = globalCtx->gameplayFrames; var = 127 - (gameplayFrames * 1) % 128; if (LINK_IS_ADULT) { var = 0; } - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 64, 32, 1, 0, var, 64, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7147); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7147); } // Scene Draw Config 7 void func_8009E8C0(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7161); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7161); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, 255 - (gameplayFrames * 2) % 256, 64, 64)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7192); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7192); } // Scene Draw Config 8 void func_8009EAD8(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7206); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7206); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, (gameplayFrames * 3) % 1024, 32, 256)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, (gameplayFrames * 1) % 256, 64, 64)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); gSPSegment( - gfxCtx->polyOpa.p++, 0x0B, + oGfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0D, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, (gameplayFrames * 1) % 64, 16, 16)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7260); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7260); } // Scene Draw Config 9 void func_8009EE44(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (0) {} // Necessary to match - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7274); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7274); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0, 32, 16)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, gameplayFrames % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); if ((globalCtx->unk_11D30[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) { if (globalCtx->unk_11D30[1] == 50) { @@ -2216,111 +2102,96 @@ void func_8009EE44(GlobalContext* globalCtx) { globalCtx->unk_11D30[1]++; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7309); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7309); } // Scene Draw Config 10 void func_8009F074(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7323); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7323); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7339); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7339); } u32 D_8012A380[] = { 0x02009678, 0x0200DE78 }; // Scene Draw Config 11 void func_8009F1B4(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad[2]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7363); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7363); + { s32 pad[2]; } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[gSaveContext.nightFlag])); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7371); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7371); } // Scene Draw Config 12 void func_8009F270(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7385); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7385); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7409); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7409); } // Scene Draw Config 13 void func_8009F40C(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7423); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7423); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7443); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7443); } // Scene Draw Config 14 void func_8009F5D4(GlobalContext* globalCtx) { Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; displayListHead = Graph_Alloc(globalCtx->state.gfxCtx, 3 * sizeof(Gfx)); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7461); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7461); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, displayListHead); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, displayListHead); if ((gSaveContext.dayTime >= 0x4AAC) && (gSaveContext.dayTime <= 0xC000)) { gSPEndDisplayList(displayListHead); @@ -2340,13 +2211,13 @@ void func_8009F5D4(GlobalContext* globalCtx) { gSPEndDisplayList(displayListHead); } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7495); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7495); } // Scene Draw Config 15 @@ -2354,30 +2225,27 @@ void func_8009F7D4(GlobalContext* globalCtx) { s8 sp6F; s8 sp6E; u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; sp6F = coss((globalCtx->gameplayFrames * 1500) & 0xFFFF) >> 8; sp6E = coss((globalCtx->gameplayFrames * 1500) & 0xFFFF) >> 8; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7512); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7512); gameplayFrames = globalCtx->gameplayFrames; sp6F = (sp6F >> 1) + 192; sp6E = (sp6E >> 1) + 192; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp6F, sp6E, 255, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, sp6F, sp6E, 255, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7530); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7530); } u32 D_8012A388[] = { 0x02009808, 0x02008FC8 }; @@ -2385,77 +2253,68 @@ u32 D_8012A388[] = { 0x02009808, 0x02008FC8 }; // Scene Draw Config 16 void func_8009F9D0(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7555); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7555); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, 0, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); - { s32 pad[2]; } // Necessary to match stack usage + { s32 pad[2]; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7578); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7578); } u32 D_8012A390[] = { 0x020081E0, 0x0200FBE0 }; // Scene Draw Config 17 void func_8009FB74(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - s32 pad[2]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7602); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7602); + { s32 pad[2]; } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7615); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7615); } // Scene Draw Config 18 void func_8009FC90(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7630); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7630); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, 127 - gameplayFrames % 128, 0, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 127 - (gameplayFrames * 6) % 128, 32, 32, 1, (gameplayFrames * 6) % 128, 127 - (gameplayFrames * 3) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 64); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 64); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 64); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 64); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7653); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7653); } f32 D_8012A398 = 0.0f; @@ -2468,31 +2327,28 @@ void func_8009FE58(GlobalContext* globalCtx) { static s16 D_8012A3A0 = 4272; u32 gameplayFrames; f32 temp; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7712); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7712); gameplayFrames = globalCtx->gameplayFrames; if (globalCtx->sceneNum == SCENE_BDAN) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1, 127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, 0, 255 - (gameplayFrames * 4) % 256, 32, 64)); } else { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, 32, 32)); } - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); if (func_800C0D28(globalCtx) != 1) { D_8012A39C += 1820; @@ -2535,9 +2391,9 @@ void func_8009FE58(GlobalContext* globalCtx) { Matrix_Scale(1.005f, sinf(D_8012A398) * 0.8f, 1.005f, MTXMODE_NEW); } - gSPSegment(gfxCtx->polyOpa.p++, 0x0D, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_scene_table.c", 7809)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_scene_table.c", 7809)); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7811); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7811); } #else s16 D_8012A39C = 538; @@ -2549,30 +2405,27 @@ void func_8009FE58(GlobalContext* globalCtx); // Scene Draw Config 26 void func_800A0334(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7825); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7825); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128, 1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7852); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7852); } // Scene Draw Config 52 @@ -2588,25 +2441,22 @@ void func_800A057C(GlobalContext* globalCtx) { // Scene Draw Config 49 void func_800A059C(GlobalContext* globalCtx) { u32 gameplayFrames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7893); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7893); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128)); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, 128); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 128, 128, 128, 128); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7910); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7910); } void (*sSceneDrawHandlers[])(GlobalContext*) = { @@ -2621,9 +2471,6 @@ void (*sSceneDrawHandlers[])(GlobalContext*) = { }; void Scene_Draw(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - if (HREG(80) == 17) { if (HREG(95) != 17) { HREG(95) = 17; @@ -2642,15 +2489,14 @@ void Scene_Draw(GlobalContext* globalCtx) { HREG(94) = 0; } - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 8104); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 8104); if (HREG(81) == 1) { - gSPDisplayList(gfxCtx->polyOpa.p++, sDefaultDisplayList); - gSPDisplayList(gfxCtx->polyXlu.p++, sDefaultDisplayList); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDefaultDisplayList); + gSPDisplayList(oGfxCtx->polyXlu.p++, sDefaultDisplayList); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 8109); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 8109); if (HREG(82) == 1) { sSceneDrawHandlers[globalCtx->sceneConfig](globalCtx); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 486358b392..2bccd4db10 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -34,11 +34,9 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk Gfx* dList; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 773); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 773); + Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; @@ -52,17 +50,15 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - do { - if (1) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 805), - G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 805), + G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); - } - } while (0); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } } + if (1) {} + if (postLimbDraw != NULL) { postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor); } @@ -79,7 +75,7 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk postLimbDraw, actor, dListIndex); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 821); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 821); } /* @@ -92,8 +88,6 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb Gfx* dList; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); @@ -101,8 +95,9 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb osSyncPrintf(VT_RST); return; } - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 849); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 849); + Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); @@ -116,9 +111,10 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), G_MTX_LOAD); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), + G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } } if (postLimbDraw != NULL) { @@ -131,7 +127,8 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb } Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 894); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 894); } /* @@ -145,8 +142,6 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* Gfx* dList[2]; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; Matrix_Push(); @@ -166,11 +161,10 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 946); - gSPMatrix(gfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 949); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 946); + gSPMatrix(oGfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 949); (*mtx)++; } else if (dList[0] != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 954); @@ -206,8 +200,6 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li Vec3f pos; Vec3s rot; Mtx* mtx; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(Mtx)); @@ -217,9 +209,10 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li osSyncPrintf(VT_RST); return; } - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1000); - gSPSegment(gfxCtx->polyOpa.p++, 0xD, mtx); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1000); + + gSPSegment(oGfxCtx->polyOpa.p++, 0xD, mtx); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); @@ -236,8 +229,8 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); - gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); mtx++; } else if (dList[0] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); @@ -255,7 +248,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* li Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1053); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1053); } /* @@ -267,12 +260,9 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele Gfx* dList; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1076); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1076); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); @@ -286,16 +276,14 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - do { - if (1) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), - G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); - } - } while (0); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), + G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } } + if (1) {} + if (postLimbDraw != NULL) { postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor); } @@ -312,7 +300,7 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele actor); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, @@ -322,8 +310,6 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDra Gfx* dList; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); @@ -332,9 +318,8 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDra return; } - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1148); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1148); Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); @@ -348,9 +333,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDra if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_JointPosition(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList); } } @@ -365,7 +350,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDra Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1190); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1190); } void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, @@ -375,11 +360,9 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske Gfx* dList[2]; Vec3f pos; Vec3s rot; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1214); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1214); + Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); @@ -397,8 +380,8 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242); - gSPMatrix(gfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(oGfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); (*limbMatricies)++; } else if (dList[0] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249); @@ -422,7 +405,7 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske postLimbDraw, actor, limbMatricies); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); } void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, @@ -433,8 +416,6 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD Vec3f pos; Vec3s rot; Mtx* mtx; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(Mtx)); @@ -445,11 +426,9 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD return; } - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1294); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1294); - - gSPSegment(gfxCtx->polyOpa.p++, 0xD, mtx); + gSPSegment(oGfxCtx->polyOpa.p++, 0xD, mtx); Matrix_Push(); @@ -468,8 +447,8 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD Matrix_JointPosition(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1327); - gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, dList[1]); mtx++; } else { if (dList[0] != NULL) { @@ -489,7 +468,7 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbD } Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1347); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1347); } /* diff --git a/src/code/z_view.c b/src/code/z_view.c index 9ab4db07ee..5ef8808dee 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -134,7 +134,6 @@ void func_800AA550(View* view) { s32 lrx; s32 lry; GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; gfxCtx = view->gfxCtx; @@ -174,14 +173,14 @@ void func_800AA550(View* view) { __assert("lry <= SCREEN_HT", "../z_view.c", 457); } - Graph_OpenDisps(dispRefs, gfxCtx, "../z_view.c", 459); + OPEN_DISPS(gfxCtx, "../z_view.c", 459); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetScissor(gfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetScissor(gfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetScissor(oGfxCtx->polyOpa.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetScissor(oGfxCtx->polyXlu.p++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_view.c", 472); + CLOSE_DISPS(gfxCtx, "../z_view.c", 472); } void func_800AA76C(View* view, f32 x, f32 y, f32 z) { @@ -279,10 +278,10 @@ s32 func_800AAA9C(View* view) { Mtx* projection; Mtx* viewing; GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; gfxCtx = view->gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_view.c", 596); + + OPEN_DISPS(gfxCtx, "../z_view.c", 596); vp = Graph_Alloc(gfxCtx, sizeof(Vp)); LogUtils_CheckNullPointer("vp", vp, "../z_view.c", 601); @@ -291,8 +290,8 @@ s32 func_800AAA9C(View* view) { func_800AA550(view); - gSPViewport(gfxCtx->polyOpa.p++, vp); - gSPViewport(gfxCtx->polyXlu.p++, vp); + gSPViewport(oGfxCtx->polyOpa.p++, vp); + gSPViewport(oGfxCtx->polyXlu.p++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 616); @@ -335,10 +334,10 @@ s32 func_800AAA9C(View* view) { func_800AA890(view, projection); - gSPPerspNormalize(gfxCtx->polyOpa.p++, view->normal); - gSPMatrix(gfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPPerspNormalize(gfxCtx->polyXlu.p++, view->normal); - gSPMatrix(gfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(oGfxCtx->polyOpa.p++, view->normal); + gSPMatrix(oGfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(oGfxCtx->polyXlu.p++, view->normal); + gSPMatrix(oGfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 667); @@ -368,10 +367,10 @@ s32 func_800AAA9C(View* view) { osSyncPrintf("\n"); } - gSPMatrix(gfxCtx->polyOpa.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - gSPMatrix(gfxCtx->polyXlu.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->polyOpa.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->polyXlu.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_view.c", 711); + CLOSE_DISPS(gfxCtx, "../z_view.c", 711); return 1; } @@ -380,10 +379,10 @@ s32 func_800AB0A8(View* view) { Vp* vp; Mtx* projection; GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; gfxCtx = view->gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_view.c", 726); + + OPEN_DISPS(gfxCtx, "../z_view.c", 726); vp = Graph_Alloc(gfxCtx, sizeof(Vp)); LogUtils_CheckNullPointer("vp", vp, "../z_view.c", 730); @@ -392,9 +391,9 @@ s32 func_800AB0A8(View* view) { func_800AA550(view); - gSPViewport(gfxCtx->polyOpa.p++, vp); - gSPViewport(gfxCtx->polyXlu.p++, vp); - gSPViewport(gfxCtx->overlay.p++, vp); + gSPViewport(oGfxCtx->polyOpa.p++, vp); + gSPViewport(oGfxCtx->polyXlu.p++, vp); + gSPViewport(oGfxCtx->overlay.p++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 744); @@ -405,10 +404,10 @@ s32 func_800AB0A8(View* view) { view->projection = *projection; - gSPMatrix(gfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->polyOpa.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->polyXlu.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_view.c", 762); + CLOSE_DISPS(gfxCtx, "../z_view.c", 762); return 1; } @@ -417,22 +416,22 @@ s32 func_800AB2C4(View* view) { Vp* vp; Mtx* projection; GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; if (1) {} // Necessary to match gfxCtx = view->gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_view.c", 777); + + OPEN_DISPS(gfxCtx, "../z_view.c", 777); vp = Graph_Alloc(gfxCtx, sizeof(Vp)); LogUtils_CheckNullPointer("vp", vp, "../z_view.c", 781); View_ViewportToVp(vp, &view->viewport); view->vp = *vp; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetScissor(gfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetScissor(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, view->viewport.rightX, view->viewport.bottomY); - gSPViewport(gfxCtx->overlay.p++, vp); + gSPViewport(oGfxCtx->overlay.p++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 791); @@ -443,9 +442,9 @@ s32 func_800AB2C4(View* view) { view->projection = *projection; - gSPMatrix(gfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_view.c", 801); + CLOSE_DISPS(gfxCtx, "../z_view.c", 801); return 1; } @@ -459,20 +458,20 @@ s32 func_800AB560(View* view) { Mtx* projection; Mtx* viewing; GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; gfxCtx = view->gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_view.c", 816); + + OPEN_DISPS(gfxCtx, "../z_view.c", 816); vp = Graph_Alloc(gfxCtx, sizeof(Vp)); LogUtils_CheckNullPointer("vp", vp, "../z_view.c", 821); View_ViewportToVp(vp, &view->viewport); view->vp = *vp; - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetScissor(gfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetScissor(oGfxCtx->overlay.p++, G_SC_NON_INTERLACE, view->viewport.leftX, view->viewport.topY, view->viewport.rightX, view->viewport.bottomY); - gSPViewport(gfxCtx->overlay.p++, vp); + gSPViewport(oGfxCtx->overlay.p++, vp); projection = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("projection", projection, "../z_view.c", 833); @@ -486,8 +485,8 @@ s32 func_800AB560(View* view) { view->projection = *projection; - gSPPerspNormalize(gfxCtx->overlay.p++, view->normal); - gSPMatrix(gfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPPerspNormalize(oGfxCtx->overlay.p++, view->normal); + gSPMatrix(oGfxCtx->overlay.p++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 848); @@ -505,23 +504,21 @@ s32 func_800AB560(View* view) { view->viewing = *viewing; - gSPMatrix(gfxCtx->overlay.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(oGfxCtx->overlay.p++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_view.c", 871); + CLOSE_DISPS(gfxCtx, "../z_view.c", 871); return 1; } s32 func_800AB944(View* view) { - Gfx* dispRefs[5]; - - Graph_OpenDisps(dispRefs, view->gfxCtx, "../z_view.c", 878); + OPEN_DISPS(view->gfxCtx, "../z_view.c", 878); func_800ABE74(view->eye.x, view->eye.y, view->eye.z); guLookAt(view->viewingPtr, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, view->up.x, view->up.y, view->up.z); - Graph_CloseDisps(dispRefs, view->gfxCtx, "../z_view.c", 886); + CLOSE_DISPS(view->gfxCtx, "../z_view.c", 886); return 1; } diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c index b961271d15..b8cd7f3367 100644 --- a/src/code/z_vr_box_draw.c +++ b/src/code/z_vr_box_draw.c @@ -12,19 +12,18 @@ Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { } void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 alpha, f32 x, f32 y, f32 z) { - Gfx* dispRefs[5]; + OPEN_DISPS(gfxCtx, "../z_vr_box_draw.c", 52); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_vr_box_draw.c", 52); func_800945A0(gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 7, skyboxCtx->staticSegments[0]); - gSPSegment(gfxCtx->polyOpa.p++, 8, skyboxCtx->staticSegments[1]); - gSPSegment(gfxCtx->polyOpa.p++, 9, skyboxCtx->staticSegments[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 7, skyboxCtx->staticSegments[0]); + gSPSegment(oGfxCtx->polyOpa.p++, 8, skyboxCtx->staticSegments[1]); + gSPSegment(oGfxCtx->polyOpa.p++, 9, skyboxCtx->staticSegments[2]); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0, 0, 0, alpha); - gSPTexture(gfxCtx->polyOpa.p++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON) + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0x00, 0x00, 0, 0, 0, alpha); + gSPTexture(oGfxCtx->polyOpa.p++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON); - sSkyboxDrawMatrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); + sSkyboxDrawMatrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); Matrix_Translate(x, y, z, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -32,54 +31,55 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb Matrix_RotateY(skyboxCtx->rot.y, MTXMODE_APPLY); Matrix_RotateZ(skyboxCtx->rot.z, MTXMODE_APPLY); Matrix_ToMtx(sSkyboxDrawMatrix, "../z_vr_box_draw.c", 76); - gSPMatrix(gfxCtx->polyOpa.p++, sSkyboxDrawMatrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyOpa.p++, sSkyboxDrawMatrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetColorDither(gfxCtx->polyOpa.p++, G_CD_MAGICSQ); - gDPSetTextureFilter(gfxCtx->polyOpa.p++, G_TF_BILERP); + gDPSetColorDither(oGfxCtx->polyOpa.p++, G_CD_MAGICSQ); + gDPSetTextureFilter(oGfxCtx->polyOpa.p++, G_TF_BILERP); - gDPLoadTLUT_pal256(gfxCtx->polyOpa.p++, skyboxCtx->staticSegments[2]); - gDPSetTextureLUT(gfxCtx->polyOpa.p++, G_TT_RGBA16); - gDPSetTextureConvert(gfxCtx->polyOpa.p++, G_TC_FILT); + gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, skyboxCtx->staticSegments[2]); + gDPSetTextureLUT(oGfxCtx->polyOpa.p++, G_TT_RGBA16); + gDPSetTextureConvert(oGfxCtx->polyOpa.p++, G_TC_FILT); if (skyboxCtx->unk_140) { - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 1); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 1); - gDPPipeSync(gfxCtx->polyOpa.p++); + gDPPipeSync(oGfxCtx->polyOpa.p++); - gDPLoadTLUT_pal256(gfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 1); + gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 1); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 3); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 3); if (skyboxId != 2) { if (skyboxId <= 0x10 || skyboxId >= 0x19) { - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPLoadTLUT_pal256(gfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 2); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 5); - gDPPipeSync(gfxCtx->polyOpa.p++); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 2); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 5); + gDPPipeSync(oGfxCtx->polyOpa.p++); if (skyboxCtx->unk_140 != 2) { - gDPLoadTLUT_pal256(gfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 3); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 7); + gDPLoadTLUT_pal256(oGfxCtx->polyOpa.p++, (u16*)skyboxCtx->staticSegments[2] + 256 * 3); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 7); } } } } else { - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 8); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 2); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 4); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 6); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 8); if (skyboxId == 5) { - gSPDisplayList(gfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 10); + gSPDisplayList(oGfxCtx->polyOpa.p++, skyboxCtx->dpList + 150 * 10); } } - gDPPipeSync(gfxCtx->polyOpa.p++); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_vr_box_draw.c", 125); + gDPPipeSync(oGfxCtx->polyOpa.p++); + + CLOSE_DISPS(gfxCtx, "../z_vr_box_draw.c", 125); } void SkyboxDraw_Update(SkyboxContext* skyboxCtx) { diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 6a42782443..d1fa131e1b 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -74,29 +74,29 @@ void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) { Player* player; s32 length; - if (this->actor.attachedA == NULL) { + if (this->actor.parent == NULL) { player = PLAYER; // get correct timer length for hookshot or longshot length = (player->heldItemActionParam == 0x10) ? 13 : 26; ArmsHook_SetupAction(this, ArmsHook_Shoot); func_8002D9A4(&this->actor, 20.0f); - this->actor.attachedA = &PLAYER->actor; + this->actor.parent = &PLAYER->actor; this->timer = length; } } void func_80865044(ArmsHook* this) { - this->actor.attachedB = this->actor.attachedA; - this->actor.attachedA->attachedA = &this->actor; + this->actor.child = this->actor.parent; + this->actor.parent->parent = &this->actor; } s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) { - player->actor.attachedB = &this->actor; + player->actor.child = &this->actor; player->heldActor = &this->actor; - if (this->actor.attachedB != NULL) { - player->actor.attachedA = NULL; - this->actor.attachedB = NULL; + if (this->actor.child != NULL) { + player->actor.parent = NULL; + this->actor.child = NULL; return 1; } return 0; @@ -110,7 +110,7 @@ void ArmsHook_DetachHookFromActor(ArmsHook* this) { } s32 ArmsHook_CheckForCancel(ArmsHook* this) { - Player* player = (Player*)this->actor.attachedA; + Player* player = (Player*)this->actor.parent; if (func_8008F104(player)) { if ((player->unk_154 != player->heldItemActionParam) || ((player->actor.flags & 0x100)) || ((player->stateFlags1 & 0x4000080))) { @@ -151,7 +151,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { f32 velocity; s32 pad1; - if ((this->actor.attachedA == NULL) || (!func_8008F104(player))) { + if ((this->actor.parent == NULL) || (!func_8008F104(player))) { ArmsHook_DetachHookFromActor(this); Actor_Kill(&this->actor); return; @@ -185,7 +185,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { grabbed = NULL; this->grabbed = NULL; } else { - if (this->actor.attachedB != NULL) { + if (this->actor.child != NULL) { sp94 = func_8002DB48(this, grabbed); sp90 = sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z)); @@ -203,7 +203,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { velocity = 0.0f; phi_f16 = 0.0f; } else { - if (this->actor.attachedB != NULL) { + if (this->actor.child != NULL) { velocity = 30.0f; } else { if (grabbed != NULL) { @@ -223,7 +223,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { newPos.y = bodyDistDiffVec.y * velocity; newPos.z = bodyDistDiffVec.z * velocity; - if (this->actor.attachedB == NULL) { + if (this->actor.child == NULL) { if ((grabbed != NULL) && (grabbed->id == ACTOR_BG_SPOT06_OBJECTS)) { Math_Vec3f_Diff(&grabbed->posRot.pos, &this->grabbedDistDiff, &this->actor.posRot.pos); phi_f16 = 1.0f; @@ -308,13 +308,10 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { Vec3f sp60; f32 sp5C; f32 sp58; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (player->actor.draw != NULL) { if (player->unk_15D == 0xF) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arms_hook.c", 850); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 850); if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) { Matrix_MultVec3f(&D_80865B70, &this->unk_1E8); @@ -329,9 +326,9 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80090480(globalCtx, &this->collider.base, &this->unk_1CC, &sp6C, &sp60); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_0602B288); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602B288); Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW); Math_Vec3f_Diff(&player->unk_3C8, &this->actor.posRot.pos, &sp78); sp58 = SQ(sp78.x) + SQ(sp78.z); @@ -339,11 +336,11 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateY(Math_atan2f(sp78.x, sp78.z), MTXMODE_APPLY); Matrix_RotateX(Math_atan2f(-sp78.y, sp5C), MTXMODE_APPLY); Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_0602AFF0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_0602AFF0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arms_hook.c", 913); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913); } } } diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 0b709b98cc..375acb4ec1 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -1,7 +1,7 @@ /* * File: z_arrow_fire.c * Overlay: ovl_Arrow_Fire - * Description: Fire Arrow. Spawned by and attached to a normal arrow. + * Description: Fire Arrow. Spawned as a child of a normal arrow. */ #include "z_arrow_fire.h" @@ -64,7 +64,7 @@ void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) { EnArrow* arrow; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; @@ -73,14 +73,14 @@ void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) { if (this->radius < 10) { this->radius += 1; } - // copy position and rotation from the attached arrow + // copy position and rotation from arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG); - // If arrow's attached is null, Link has fired the arrow - if (arrow->actor.attachedA == NULL) { + // if arrow has no parent, player has fired the arrow + if (arrow->actor.parent == NULL) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowFire_SetupAction(this, ArrowFire_Fly); @@ -151,12 +151,12 @@ void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) { f32 distanceScaled; s32 pad; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; } - // copy position and rotation from the attached arrow + // copy position and rotation from arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * (1.0f / 24.0f); @@ -194,21 +194,19 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { ArrowFire* this = THIS; s32 pad; u32 stateFrames; - GraphicsContext* gfxCtx; - Actor* tranform; EnArrow* arrow; - Gfx* dispRefs[4]; + Actor* tranform; stateFrames = globalCtx->state.frames; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if (1) {} if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { if (1) {} tranform = (arrow->hitWall & 2) ? &this->actor : &arrow->actor; - // clang-format off - gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618); - // clang-format on + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618); + Matrix_Translate(tranform->posRot.pos.x, tranform->posRot.pos.y, tranform->posRot.pos.z, MTXMODE_NEW); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); @@ -217,18 +215,18 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw red effect over the screen when arrow hits if (this->unk_15C > 0) { - gfxCtx->polyXlu.p = func_800937C0(gfxCtx->polyXlu.p); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, + oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, (s32)(150.0f * this->unk_15C) & 0xFF); - gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(gfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); + gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw fire on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 200, 0, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 128); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 200, 0, this->alpha); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -237,13 +235,14 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 666), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 666), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); - gSPDisplayList(gfxCtx->polyXlu.p++, sVertexDL); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_fire.c", 682); + gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 682); } } diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index d1e8506b3f..78ab62bacd 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -1,7 +1,7 @@ /* * File: z_arrow_ice.c * Overlay: ovl_Arrow_Ice - * Description: Ice Arrow. Spawned by and attached to a normal arrow. + * Description: Ice Arrow. Spawned as a child of a normal arrow. */ #include "z_arrow_ice.h" @@ -65,7 +65,7 @@ void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx) { void ArrowIce_Charge(ArrowIce* this, GlobalContext* globalCtx) { EnArrow* arrow; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; @@ -74,14 +74,14 @@ void ArrowIce_Charge(ArrowIce* this, GlobalContext* globalCtx) { if (this->radius < 10) { this->radius += 1; } - // copy position and rotation from the attached arrow + // copy position and rotation from arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE - SFX_FLAG); - // If arrow's attached is null, Link has fired the arrow - if (arrow->actor.attachedA == NULL) { + // if arrow has no parent, player has fired the arrow + if (arrow->actor.parent == NULL) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowIce_SetupAction(this, ArrowIce_Fly); @@ -152,12 +152,12 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) { f32 distanceScaled; s32 pad; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; } - // copy position and rotation from the attached arrow + // copy position and rotation from arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * (1.0f / 24.0f); @@ -196,20 +196,18 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; Actor* tranform; u32 stateFrames; - GraphicsContext* gfxCtx; EnArrow* arrow; - Gfx* dispRefs[4]; stateFrames = globalCtx->state.frames; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if (1) {} if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { if (1) {} tranform = (arrow->hitWall & 2) ? &this->actor : &arrow->actor; - // clang-format off - gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610); - // clang-format on + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610); + Matrix_Translate(tranform->posRot.pos.x, tranform->posRot.pos.y, tranform->posRot.pos.z, MTXMODE_NEW); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); @@ -218,18 +216,18 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw blue effect over the screen when arrow hits if (this->unk_164 > 0) { - gfxCtx->polyXlu.p = func_800937C0(gfxCtx->polyXlu.p); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, + oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF, (s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(gfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); + gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw ice on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 170, 255, 255, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 255, 128); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 170, 255, 255, this->alpha); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -238,13 +236,14 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 660), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 660), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); - gSPDisplayList(gfxCtx->polyXlu.p++, sVertexDL); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_ice.c", 676); + gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 676); } } diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index c1c85ce2d5..1e59f5eb7d 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -1,7 +1,7 @@ /* * File: z_arrow_light.c * Overlay: ovl_Arrow_Light - * Description: Light Arrow. Spawned by and attached to a normal arrow. + * Description: Light Arrow. Spawned as a child of a normal arrow. */ #include "z_arrow_light.h" @@ -65,7 +65,7 @@ void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx) { void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) { EnArrow* arrow; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; @@ -74,14 +74,14 @@ void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) { if (this->radius < 10) { this->radius += 1; } - // copy position and rotation from the attached arrow + // copy position and rotation from arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG); - // If arrow's attached is null, Link has fired the arrow - if (arrow->actor.attachedA == NULL) { + // if arrow has no parent, player has fired the arrow + if (arrow->actor.parent == NULL) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowLight_SetupAction(this, ArrowLight_Fly); @@ -152,12 +152,12 @@ void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) { f32 distanceScaled; s32 pad; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { Actor_Kill(&this->actor); return; } - // copy position and rotation from the attached arrow + // copy position and rotation from parent arrow this->actor.posRot.pos = arrow->actor.posRot.pos; this->actor.shape.rot = arrow->actor.shape.rot; distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * (1.0f / 24.0f); @@ -195,21 +195,19 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { ArrowLight* this = THIS; s32 pad; u32 stateFrames; - GraphicsContext* gfxCtx; - Actor* tranform; EnArrow* arrow; - Gfx* dispRefs[4]; + Actor* tranform; stateFrames = globalCtx->state.frames; - arrow = (EnArrow*)this->actor.attachedA; + arrow = (EnArrow*)this->actor.parent; if (1) {} if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) { if (1) {} tranform = (arrow->hitWall & 2) ? &this->actor : &arrow->actor; - // clang-format off - gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_light.c", 598); - // clang-format on + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 598); + Matrix_Translate(tranform->posRot.pos.x, tranform->posRot.pos.y, tranform->posRot.pos.z, MTXMODE_NEW); Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY); @@ -218,18 +216,18 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw yellow effect over the screen when arrow hits if (this->unk_164 > 0) { - gfxCtx->polyXlu.p = func_800937C0(gfxCtx->polyXlu.p); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, + oGfxCtx->polyXlu.p = func_800937C0(oGfxCtx->polyXlu.p); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, (s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF); - gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_DISABLE); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE); - gDPFillRectangle(gfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_DISABLE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_DISABLE); + gDPFillRectangle(oGfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); } // Draw light on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 170, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 0, 128); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 170, this->alpha); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); @@ -238,13 +236,14 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY); Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_light.c", 648), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); - gSPDisplayList(gfxCtx->polyXlu.p++, sVertexDL); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arrow_light.c", 664); + gSPDisplayList(oGfxCtx->polyXlu.p++, sVertexDL); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 664); } } diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 02c0d6edf3..5c2fadc328 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -121,10 +121,10 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = func_8086C6EC; } else { if (BgBdanObjects_GetContactRu1(this, 4)) { - if (Actor_SpawnAttached(&globalCtx->actorCtx, this, globalCtx, ACTOR_EN_BIGOKUTA, - thisx->initPosRot.pos.x, thisx->initPosRot.pos.y, thisx->initPosRot.pos.z, 0, - thisx->shape.rot.y + 0x8000, 0, 3) != NULL) { - thisx->attachedB->posRot.pos.z = thisx->attachedB->initPosRot.pos.z + 263.0f; + if (Actor_SpawnAsChild(&globalCtx->actorCtx, this, globalCtx, ACTOR_EN_BIGOKUTA, + thisx->initPosRot.pos.x, thisx->initPosRot.pos.y, thisx->initPosRot.pos.z, 0, + thisx->shape.rot.y + 0x8000, 0, 3) != NULL) { + thisx->child->posRot.pos.z = thisx->child->initPosRot.pos.z + 263.0f; } thisx->posRot.rot.y = 0; this->actionFunc = func_8086C618; @@ -228,9 +228,9 @@ void func_8086C29C(BgBdanObjects* this, GlobalContext* globalCtx) { } if (BgBdanObjects_GetContactRu1(this, 3)) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_BIGOKUTA, - this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.y + 140.0f, - this->dyna.actor.posRot.pos.z, 0, this->dyna.actor.shape.rot.y + 0x8000, 0, 0); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_BIGOKUTA, + this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.y + 140.0f, + this->dyna.actor.posRot.pos.z, 0, this->dyna.actor.shape.rot.y + 0x8000, 0, 0); BgBdanObjects_SetContactRu1(this, 4); this->unk_16A = 0xA; this->actionFunc = func_8086C55C; @@ -247,9 +247,9 @@ void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) { this->dyna.actor.posRot.rot.y = 0; this->unk_16A = 0x3C; Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U); - this->dyna.actor.attachedB->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f; + this->dyna.actor.child->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f; this->actionFunc = func_8086C5BC; - func_800800F8(globalCtx, 0xC08, -0x63, this->dyna.actor.attachedB, 0); + func_800800F8(globalCtx, 0xC08, -0x63, this->dyna.actor.child, 0); player->actor.posRot.pos.x = -1130.0f; player->actor.posRot.pos.y = -1025.0f; player->actor.posRot.pos.z = -3500.0f; @@ -265,8 +265,8 @@ void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) { func_800AA000(0.0f, 0x78, 0x14, 0xA); this->unk_16A = 0xB; } - if (this->dyna.actor.attachedB != NULL) { - this->dyna.actor.attachedB->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f; + if (this->dyna.actor.child != NULL) { + this->dyna.actor.child->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f; } } } @@ -287,11 +287,11 @@ void func_8086C5BC(BgBdanObjects* this, GlobalContext* globalCtx) { this->unk_16A -= 1; } if (this->unk_16A == 0) { - if (this->dyna.actor.attachedB != NULL) { - if (this->dyna.actor.attachedB->params == 2) { + if (this->dyna.actor.child != NULL) { + if (this->dyna.actor.child->params == 2) { this->actionFunc = func_8086C618; - } else if (this->dyna.actor.attachedB->params == 0) { - this->dyna.actor.attachedB->params = 1; + } else if (this->dyna.actor.child->params == 0) { + this->dyna.actor.child->params = 1; } } } diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index 6a84dadbc3..c7e6a52aa0 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -60,7 +60,7 @@ void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; s32 sp24 = 0; - this->previousCollidingExplosion = NULL; + this->prevExplosive = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyInfo_SetActorMove(&this->dyna.actor, 1); @@ -86,26 +86,25 @@ void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) { - Actor* currentCollidingExplosion; + Actor* explosive; - currentCollidingExplosion = func_80033640(globalCtx, &this->collider); - if (currentCollidingExplosion != NULL) { + explosive = Actor_GetCollidedExplosive(globalCtx, &this->collider); + if (explosive != NULL) { osSyncPrintf("dam %d\n", this->dyna.actor.colChkInfo.damage); - currentCollidingExplosion->params = 2; + explosive->params = 2; } - if ((currentCollidingExplosion != NULL) && (this->previousCollidingExplosion != NULL) && - (currentCollidingExplosion != this->previousCollidingExplosion) && - (Math_Vec3f_DistXZ(&this->previousCollidingExplosionPos, ¤tCollidingExplosion->posRot.pos) > 80.0f)) { + if ((explosive != NULL) && (this->prevExplosive != NULL) && (explosive != this->prevExplosive) && + (Math_Vec3f_DistXZ(&this->prevExplosivePos, &explosive->posRot.pos) > 80.0f)) { BgDdanKd_SetupAction(this, BgDdanKd_LowerStairs); func_800800F8(globalCtx, 0xBEA, 0x3E7, this, 0); } else { if (this->timer != 0) { this->timer -= 1; } else { - this->previousCollidingExplosion = currentCollidingExplosion; - if (currentCollidingExplosion != NULL) { + this->prevExplosive = explosive; + if (explosive != NULL) { this->timer = 13; - this->previousCollidingExplosionPos = currentCollidingExplosion->posRot.pos; + this->prevExplosivePos = explosive->posRot.pos; } } Collider_CylinderUpdate(&this->dyna.actor, &this->collider); @@ -160,7 +159,7 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) { func_80033480(globalCtx, &sp5C, 20.0f, 1, sp4C * 135.0f, 60, 1); func_8003555C(globalCtx, &sp5C, &D_808718FC, &D_80871908); } - func_8005AA1C(&globalCtx->cameras, 0, sp4C * 0.6f, 3); + func_8005AA1C(&globalCtx->mainCamera, 0, sp4C * 0.6f, 3); Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); } diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h index 902f1cec5a..7dd699f0a1 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h +++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h @@ -10,9 +10,9 @@ typedef void (*BgDdanKdActionFunc)(struct BgDdanKd*, GlobalContext*); typedef struct BgDdanKd { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ Actor* previousCollidingExplosion; + /* 0x0164 */ Actor* prevExplosive; /* 0x0168 */ s16 timer; - /* 0x016C */ Vec3f previousCollidingExplosionPos; + /* 0x016C */ Vec3f prevExplosivePos; /* 0x0178 */ ColliderCylinder collider; /* 0x01C4 */ BgDdanKdActionFunc actionFunc; } BgDdanKd; // size = 0x01C8 diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index 2fbc875250..bc3a537f5a 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -45,7 +45,7 @@ static ColliderCylinderInit sColCylinderInit1 = { { 50, 60, 280, { 0, 0, 0 } }, }; -s16 slsAttached = false; +s16 sHasParent = false; Color_RGBA8_n D_8087259C = { 100, 100, 100, 0 }; Color_RGBA8_n D_808725A0 = { 40, 40, 40, 0 }; @@ -122,13 +122,12 @@ void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) { - Actor* attachedActor = func_80033640(globalCtx, &this->colliders[0].base); + Actor* explosive = Actor_GetCollidedExplosive(globalCtx, &this->colliders[0].base); - if (attachedActor != NULL) { + if (explosive != NULL) { this->unk_164 = - (Math_Vec3f_Yaw(&this->dyna.actor.posRot.pos, &attachedActor->posRot.pos) >= this->dyna.actor.shape.rot.y) - ? 1 - : 0; + (Math_Vec3f_Yaw(&this->dyna.actor.posRot.pos, &explosive->posRot.pos) >= this->dyna.actor.shape.rot.y) ? 1 + : 0; if (((globalCtx->unk_11D30[0] == 0xFF) && (this->unk_164 == 1)) || ((globalCtx->unk_11D30[1] == 0xFF) && (this->unk_164 == 0))) { @@ -148,9 +147,9 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) { return; } - if (!slsAttached) { - this->dyna.actor.attachedA = attachedActor; - slsAttached = true; + if (!sHasParent) { + this->dyna.actor.parent = explosive; + sHasParent = true; D_80872824 = 0x32; } } else { @@ -219,9 +218,11 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) { if (Math_SmoothScaleMaxMinS(&this->dyna.actor.shape.rot.x, 0x1333, 0x6E - this->unk_164, 0x3E8, 0x32) == 0) { BgDodoago_SetupAction(this, func_8087227C); - Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0, + &D_801333E8); } else { - Audio_PlaySoundGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0, + &D_801333E0, &D_801333E8); } } @@ -240,8 +241,8 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { BgDodoago* this = THIS; EnBom* bomb; - if (this->dyna.actor.attachedA == NULL) { - if ((s32)(this->colliders[1].base.maskA & 2) || (this->colliders[2].base.maskA & 2)) { + if (this->dyna.actor.parent == NULL) { + if ((s32)(this->colliders[1].base.maskA & 2) || (this->colliders[2].base.maskA & 2)) { if ((s32)(this->colliders[1].base.maskA & 2)) { bomb = (EnBom*)this->colliders[1].base.oc; @@ -251,7 +252,7 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { this->colliders[1].base.maskA &= ~2; this->colliders[2].base.maskA &= ~2; if (bomb->actor.type == ACTORTYPE_EXPLOSIVES && bomb->actor.id == ACTOR_EN_BOM && bomb->actor.params == 0) { - this->dyna.actor.attachedA = &bomb->actor; + this->dyna.actor.parent = &bomb->actor; bomb->timer = 50; bomb->actor.speedXZ = 0.0f; D_80872824 = 0; @@ -264,7 +265,7 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { D_808727C0[0]++; } else { - this->dyna.actor.attachedA = NULL; + this->dyna.actor.parent = NULL; } } } @@ -272,15 +273,14 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 672); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 672); if (Flags_GetEventChkInf(0xB0)) { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_60013500); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_60013500); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 681); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 681); } diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index 97962d4ccf..eb7349eea6 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -127,15 +127,13 @@ void BgGateShutter_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgGateShutter_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 323); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 323); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 328), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 328), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001CD0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001CD0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 333); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gate_shutter.c", 333); } diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 114fb009c6..dfd138731c 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -102,26 +102,23 @@ void BgGjyoBridge_Update(Actor* thisx, GlobalContext* globalCtx) { void BgGjyoBridge_Draw(Actor* thisx, GlobalContext* globalCtx) { BgGjyoBridge* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 260); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 260); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 8, + gSPSegment(oGfxCtx->polyXlu.p++, 8, Gfx_TexScroll(globalCtx->state.gfxCtx, globalCtx->gameplayFrames & 127, globalCtx->gameplayFrames * -3 & 127, 32, 32)); - gSPSegment(gfxCtx->polyXlu.p++, 9, + gSPSegment(oGfxCtx->polyXlu.p++, 9, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, -globalCtx->gameplayFrames & 127, 32, 32, 1, 0, globalCtx->gameplayFrames & 127, 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 281), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 281), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06000600); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000600); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 285); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 285); } diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 5584a75e19..efd5baf7cb 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -152,20 +152,18 @@ void BgHaka_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHaka_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka.c", 401); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_haka.c", 401); func_80093D18(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 406), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 406), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_060001B0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060001B0); Matrix_Translate(0.0f, 0.0f, thisx->minVelocityY * 10.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 416), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka.c", 416), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_060002A8); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060002A8); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_haka.c", 421); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka.c", 421); } diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index 96b39a0ab3..38c1edd8cc 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -196,24 +196,25 @@ void BgHakaTubo_Update(Actor* thisx, GlobalContext* globalCtx) { void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) { s32 pad; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 476); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 476); + func_80093D84(globalCtx->state.gfxCtx); Matrix_Translate(this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.y + 235.0f, this->dyna.actor.posRot.pos.z, MTXMODE_NEW); Matrix_RotateY(this->dyna.actor.shape.rot.y * 0.0000958738f, MTXMODE_APPLY); Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY); if (1) {} - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0, 170, 255, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 0, 170, 255, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->fireScroll & 127, 0, 32, 64, 1, 0, (this->fireScroll * -15) & 0xFF, 32, 64)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 497), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 497), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_040184B0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 501); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_040184B0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_tubo.c", 501); } void BgHakaTubo_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index dba3c6abcf..7ff3e58ca3 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -323,8 +323,8 @@ void BgHeavyBlock_SpawnPieces(BgHeavyBlock* this, GlobalContext* globalCtx) { void BgHeavyBlock_Wait(BgHeavyBlock* this, GlobalContext* globalCtx) { s32 quakeIndex; - // if attached A is set, start onepointdemo (cutscene) and quake - if (func_8002F410(&this->dyna.actor, globalCtx)) { + // if block has a parent link has lifted it, start onepointdemo (cutscene) and quake + if (Actor_HasParent(&this->dyna.actor, globalCtx)) { this->timer = 0; switch (this->dyna.actor.params & 0xFF) { @@ -376,8 +376,8 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, GlobalContext* globalCtx) { func_8002DF54(globalCtx, player, 8); - // if attachedA is NULL, link threw it - if (func_8002F5A0(&this->dyna.actor, globalCtx)) { + // if parent is NULL, link threw it + if (Actor_HasNoParent(&this->dyna.actor, globalCtx)) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HEAVY_THROW); this->actionFunc = BgHeavyBlock_Fly; } @@ -495,11 +495,8 @@ void BgHeavyBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHeavyBlock* this = THIS; s32 pad; Player* player = PLAYER; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 904); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 904); if (BgHeavyBlock_LiftedUp == this->actionFunc) { func_800D1694(player->unk_3B0.x, player->unk_3B0.y, player->unk_3B0.z, &thisx->shape.rot); @@ -513,11 +510,11 @@ void BgHeavyBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_MultVec3f(&D_80884ED4, &thisx->initPosRot); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 931), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 931), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_060013C0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060013C0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 935); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 935); } void BgHeavyBlock_DrawPiece(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index bdbd71149f..0d4273c77e 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -192,20 +192,17 @@ void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) { void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHidanFirewall* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 448); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 448); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x14); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x14); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0x01, 255, 255, 0, 150); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 255); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x01, 255, 255, 0, 150); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 255); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0600DA80); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600DA80); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 463); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 463); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index e76bc4ce21..c00c6a07aa 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -51,8 +51,8 @@ void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx) { DynaPolyInfo_SetActorMove(thisx, 1); DynaPolyInfo_Alloc(&D_0600E1E8, &local_c); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); - if (Actor_SpawnAttached(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_HSBLOCK, thisx->posRot.pos.x, - thisx->posRot.pos.y + 40.0f, thisx->posRot.pos.z + -28.0f, 0, 0, 0, 2) == NULL) { + if (Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_HSBLOCK, thisx->posRot.pos.x, + thisx->posRot.pos.y + 40.0f, thisx->posRot.pos.z + -28.0f, 0, 0, 0, 2) == NULL) { Actor_Kill(thisx); return; } @@ -62,13 +62,13 @@ void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx) { void func_80886F24(BgHidanFslift* this) { Actor* thisx = &this->dyna.actor; - if (thisx->attachedB != NULL && thisx->attachedB->update != NULL) { - thisx->attachedB->posRot.pos.x = thisx->posRot.pos.x; - thisx->attachedB->posRot.pos.y = thisx->posRot.pos.y + 40.0f; - thisx->attachedB->posRot.pos.z = thisx->posRot.pos.z + -28.0f; + if (thisx->child != NULL && thisx->child->update != NULL) { + thisx->child->posRot.pos.x = thisx->posRot.pos.x; + thisx->child->posRot.pos.y = thisx->posRot.pos.y + 40.0f; + thisx->child->posRot.pos.z = thisx->posRot.pos.z + -28.0f; return; } - thisx->attachedB = NULL; + thisx->child = NULL; } void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 81a8e13b9f..d499a18df4 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -152,15 +152,13 @@ void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 350); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 350); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_80889E84[thisx->params & 0xFF]); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_80889E84[thisx->params & 0xFF]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 359); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 359); } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index b5f18dbb47..1a7e37485e 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -177,36 +177,35 @@ void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 i; s32 pad; MtxF mf; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 564); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 564); + func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_0600AD00); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_0600AD00); Matrix_MtxFCopy(&mf, &gMtxFClear); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x14); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0x14); if ((s16)((func_8005A9F4(ACTIVE_CAM) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0) { for (i = 3; i >= 0; i--) { - gfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, oGfxCtx->polyXlu.p); } for (i = 0; i < 4; i++) { - gfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, oGfxCtx->polyXlu.p); } } else { for (i = 3; i >= 0; i--) { - gfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 1, oGfxCtx->polyXlu.p); } for (i = 0; i < 4; i++) { - gfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, oGfxCtx->polyXlu.p); } } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 600); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 600); } diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 853a67bf3a..5492efb411 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -107,16 +107,14 @@ void BgIngate_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgIngate_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_ingate.c", 240); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 240); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 245), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 245), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001040); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_ingate.c", 250); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001040); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ingate.c", 250); } diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c index 1231ab962e..4469ad10a0 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c +++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c @@ -68,17 +68,15 @@ void BgJyaBlock_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 145); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 145); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_05004350)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 153), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_05004350)); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 153), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 232, 210, 176, 255); - gSPDisplayList(gfxCtx->polyOpa.p++, D_05004CD0); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 232, 210, 176, 255); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_05004CD0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 158); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_block.c", 158); } diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index 1cdd8d362f..b90f4f7d58 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -9,7 +9,23 @@ void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void BgJyaMegami_SetupDetectLight(BgJyaMegami* this); +void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx); +void BgJyaMegami_SetupExplode(BgJyaMegami* this); +void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx); + +extern Gfx D_06005780[]; +extern UNK_TYPE D_06005C4C; +extern Gfx D_0600B9F8[]; + +typedef struct { + /* 0x00 */ Vec3f unk_00; + /* 0x0C */ f32 velX; + /* 0x10 */ s16 rotVelX; + /* 0x12 */ s16 rotVelY; + /* 0x14 */ s16 delay; +} BgJyaMegamiPieceInit; // size = 0x18 + const ActorInit Bg_Jya_Megami_InitVars = { ACTOR_BG_JYA_MEGAMI, ACTORTYPE_BG, @@ -21,31 +37,306 @@ const ActorInit Bg_Jya_Megami_InitVars = { (ActorFunc)BgJyaMegami_Update, (ActorFunc)BgJyaMegami_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A130.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A188.s") +static ColliderJntSphItemInit sJntSphItemsInit[] = { + { + { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00200000, 0x00, 0x00 }, 0x00, 0x01, 0x00 }, + { 0x00, { { 0x0000, 0xFDA8, 0xFF38 }, 0x003C }, 0x0064 }, + }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A1DC.s") +static ColliderJntSphInit sJntSphInit = { + { COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_JNTSPH }, + 1, + sJntSphItemsInit, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A41C.s") +static BgJyaMegamiPieceInit sPiecesInit[] = { + { { -50.0f, -21.28f, -38.92f }, -1.6f, 0xFED4, 0xFE70, 40 }, + { { -4.32f, -13.44f, -13.76f }, 0.0f, 0x04B0, 0x0190, 42 }, + { { 30.92f, -20.480001f, -28.84f }, 1.6f, 0xFCE0, 0x0320, 44 }, + { { -24.08f, -40.960003f, -21.359999f }, -1.0f, 0xFD44, 0x01F4, 36 }, + { { -44.8f, -73.92f, -49.76f }, -3.2f, 0x03E8, 0xFF38, 30 }, + { { -9.0f, -76.479996f, -13.24f }, -1.0f, 0xFC18, 0x0258, 26 }, + { { -10.240001f, -52.56f, -13.400001f }, 1.6f, 0x0258, 0xFE70, 34 }, + { { 34.04f, -61.72f, -37.04f }, 1.5f, 0x0258, 0x0258, 28 }, + { { 59.48f, -38.399998f, -49.4f }, 1.8f, 0x01F4, 0x0000, 38 }, + { { -19.04f, -112.24f, -35.120003f }, -1.6f, 0x012C, 0x0320, 22 }, + { { 12.24f, -99.04f, -31.64f }, 1.8f, 0xFC18, 0xFE70, 24 }, + { { 49.16f, -81.24f, -55.52f }, 2.4f, 0x02BC, 0x012C, 32 }, + { { 14.759999f, -125.8f, -44.16f }, 0.2f, 0x0320, 0x0258, 20 }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Init.s") +s16 D_8089B14C[] = { + 0x0005, 0x0008, 0x000B, 0x000E, 0x0011, 0x0014, 0x0017, 0x001A, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Destroy.s") +s16 D_8089B15C[] = { + 0x0012, 0x001A, 0x0022, 0x002A, 0x0032, 0x003C, 0x0046, 0x0050, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A5EC.s") +s16 D_8089B16C[] = { + 0x0030, 0x002A, 0x0024, 0x0020, 0x001C, 0x0018, 0x0014, 0x0010, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A604.s") +s16 D_8089B17C[] = { + 0x0001, + 0x0003, + 0x0007, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A78C.s") +static Vec3f D_8089B184 = { 0.0f, 0.0f, 0.8f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089A820.s") +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Update.s") +static Vec3f sVec = { 0.0f, 0.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089ABC8.s") +static UNK_PTR sRightSideCrumbles[] = { + 0x06000D00, 0x06001D00, 0x06002500, 0x06002D00, 0x06004D00, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/func_8089AD48.s") +static UNK_PTR sLeftSideCrumbles[] = { + 0x06001500, 0x06003500, 0x06003D00, 0x06004500, 0x06000500, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Megami/BgJyaMegami_Draw.s") +static Gfx* sDLists[] = { + 0x06009928, 0x06009AC0, 0x06009C80, 0x06009DE8, 0x06009F60, 0x0600A0A8, 0x0600A278, + 0x0600A418, 0x0600A568, 0x0600A6A0, 0x0600A7E0, 0x0600A978, 0x0600AAC8, +}; + +void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, void* collision, DynaPolyMoveFlag flags) { + s32 pad; + u32 temp; + + temp = 0; + DynaPolyInfo_SetActorMove(&this->dyna, flags); + DynaPolyInfo_Alloc(collision, &temp); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, temp); +} + +void BgJyaMegami_InitCollider(BgJyaMegami* this, GlobalContext* globalCtx) { + s32 pad; + + Collider_InitJntSph(globalCtx, &this->collider); + Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colliderItem); +} + +void func_8089A1DC(GlobalContext* globalCtx, Vec3f* burstOrigin, Vec3f* burstDepthX, s32 num, s32 arg4) { + Vec3f spB4; + s32 i; + + for (i = 0; i < num; i++) { + s32 idx = ((s16)(Math_Rand_ZeroOne() * 8.0f)) & D_8089B17C[arg4]; + s16 u0 = ((idx < 5) && (Math_Rand_ZeroOne() < 0.7f)) ? 0x40 : 0x20; + func_80029E8C(globalCtx, burstOrigin, burstDepthX, burstOrigin, -90, u0, D_8089B16C[idx], 4, 0, D_8089B14C[idx], + 0, 5, D_8089B15C[idx], -1, OBJECT_JYA_OBJ, D_0600B9F8); + if (Math_Rand_ZeroOne() < 0.45f) { + Math_Vec3f_Copy(&spB4, burstOrigin); + spB4.z += 25.0f; + func_80033480(globalCtx, &spB4, 60.0f, 0, D_8089B14C[idx] * 4 + 50, D_8089B14C[idx] * 4 + 70, 1); + } + } +} + +void func_8089A41C(BgJyaMegami* this, GlobalContext* globalCtx, f32 arg2) { + s32 i; + Vec3f sp50; + + for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { + if (Math_Rand_ZeroOne() < arg2) { + Math_Vec3f_Sum(&this->dyna.actor.posRot.pos, &sPiecesInit[i].unk_00, &sp50); + sp50.z += 15.0f; + func_8089A1DC(globalCtx, &sp50, &D_8089B184, 1, 0); + } + } +} + +void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) { + BgJyaMegami* this = THIS; + + BgJyaMegami_InitDynaPoly(this, globalCtx, &D_06005C4C, 0); + BgJyaMegami_InitCollider(this, globalCtx); + if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { + Actor_Kill(&this->dyna.actor); + } else { + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); + Actor_SetHeight(&this->dyna.actor, -50.0f); + BgJyaMegami_SetupDetectLight(this); + } +} + +void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgJyaMegami* this = THIS; + + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + Collider_DestroyJntSph(globalCtx, &this->collider); +} + +void BgJyaMegami_SetupDetectLight(BgJyaMegami* this) { + this->actionFunc = BgJyaMegami_DetectLight; + this->lightTimer = 0; + this->crumbleIndex = 0; +} + +void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) { + if (this->collider.base.acFlags & 0x2) { + this->lightTimer++; + this->collider.base.acFlags &= ~0x2; + if (globalCtx->gameplayFrames % 4 == 0) { + func_8089A41C(this, globalCtx, (this->crumbleIndex * 0.04f) + 0.05f); + } + func_8002F974(&this->dyna.actor, NA_SE_EV_FACE_CRUMBLE_SLOW - SFX_FLAG); + } else if (this->lightTimer > 0) { + this->lightTimer--; + } + if (this->lightTimer > 40) { + Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F); + BgJyaMegami_SetupExplode(this); + Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 100, NA_SE_EV_FACE_EXPLOSION); + func_800800F8(globalCtx, 0xD70, -0x63, &this->dyna.actor, 0); + } else { + if (this->lightTimer < 8) { + this->crumbleIndex = 0; + } else if (this->lightTimer < 16) { + this->crumbleIndex = 1; + } else if (this->lightTimer < 24) { + this->crumbleIndex = 2; + } else if (this->lightTimer < 32) { + this->crumbleIndex = 3; + } else { + this->crumbleIndex = 4; + } + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); + } +} + +void BgJyaMegami_SetupExplode(BgJyaMegami* this) { + u32 i; + + this->actionFunc = BgJyaMegami_Explode; + for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { + Math_Vec3f_Copy(&this->pieces[i].pos, &this->dyna.actor.posRot.pos); + this->pieces[i].vel.x = sPiecesInit[i].velX; + } + this->explosionTimer = 0; +} + +void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) { + BgJyaMegamiPiece* temp; + u32 i; + Vec3f sp8C; + BgJyaMegamiPieceInit* temp2; + s32 pad; + + this->explosionTimer++; + if (this->explosionTimer == 30) { + Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 100, NA_SE_EV_FACE_BREAKDOWN); + } + + for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { + temp = &this->pieces[i]; + temp2 = &sPiecesInit[i]; + if (this->explosionTimer > temp2->delay) { + temp->vel.y -= 0.6f; + if (temp->vel.y < -18.0f) { + temp->vel.y = -18.0f; + } + temp->vel.x *= 0.995f; + temp->pos.x += temp->vel.x; + temp->pos.y += temp->vel.y; + temp->rotVelX += temp2->rotVelX; + temp->rotVelY += temp2->rotVelY; + if (Math_Rand_ZeroOne() < 0.067f) { + Math_Vec3f_Sum(&temp->pos, &temp2->unk_00, &sp8C); + sp8C.z += 10.0f; + func_8089A1DC(globalCtx, &sp8C, &temp->vel, 3, 2); + } + } else if (this->explosionTimer == temp2->delay) { + Math_Vec3f_Sum(&temp->pos, &temp2->unk_00, &sp8C); + sp8C.z += 10.0f; + func_8089A1DC(globalCtx, &sp8C, &temp->vel, 4, 2); + } + } + + if ((this->explosionTimer % 4 == 0) && (this->explosionTimer > 30) && (this->explosionTimer < 80) && + (this->explosionTimer > 40)) { + sp8C.x = ((Math_Rand_ZeroOne() - 0.5f) * 90.0f) + this->dyna.actor.posRot.pos.x; + sp8C.y = (this->dyna.actor.posRot.pos.y - (Math_Rand_ZeroOne() * 80.0f)) - 20.0f; + sp8C.z = this->dyna.actor.posRot.pos.z - ((Math_Rand_ZeroOne() - 0.5f) * 50.0f); + func_8089A1DC(globalCtx, &sp8C, &sVec, 1, 0); + } + if (this->explosionTimer < ARRAY_COUNT(this->pieces)) { + sp8C.x = this->dyna.actor.posRot.pos.x; + sp8C.y = this->dyna.actor.posRot.pos.y - 60.0f; + sp8C.z = this->dyna.actor.posRot.pos.z; + func_80033480(globalCtx, &sp8C, 100.0f, 1, 150, 100, 1); + } + if (this->explosionTimer == 60) { + func_80078884(NA_SE_SY_CORRECT_CHIME); + } + if (this->explosionTimer >= 100) { + Actor_Kill(&this->dyna.actor); + } +} + +void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx) { + BgJyaMegami* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void BgJyaMegami_DrawFace(BgJyaMegami* this, GlobalContext* globalCtx) { + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 706); + + func_80093D18(globalCtx->state.gfxCtx); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sRightSideCrumbles[this->crumbleIndex])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex])); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 716), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06005780); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 720); +} + +void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) { + s32 pad; + BgJyaMegamiPiece* piece; + u32 i; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 746); + + func_80093D18(globalCtx->state.gfxCtx); + + for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { + piece = &this->pieces[i]; + Matrix_Translate(piece->pos.x + sPiecesInit[i].unk_00.x, piece->pos.y + sPiecesInit[i].unk_00.y, + piece->pos.z + sPiecesInit[i].unk_00.z, MTXMODE_NEW); + Matrix_RotateY(piece->rotVelY * 0.0000958738f, MTXMODE_APPLY); + Matrix_RotateX(piece->rotVelX * 0.0000958738f, MTXMODE_APPLY); + Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); + Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f, + sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY); + + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 778), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[i]); + } + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 783); +} + +void BgJyaMegami_Draw(Actor* thisx, GlobalContext* globalCtx) { + BgJyaMegami* this = THIS; + + func_800628A4(0, &this->collider); + if (this->actionFunc == BgJyaMegami_Explode) { + BgJyaMegami_DrawExplode(this, globalCtx); + } else { + BgJyaMegami_DrawFace(this, globalCtx); + } +} diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h index 5c461a309d..f5ec4e6f2b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h @@ -6,9 +6,24 @@ struct BgJyaMegami; +typedef void (*BgJyaMegamiActionFunc)(struct BgJyaMegami*, GlobalContext*); + +typedef struct { + /* 0x00 */ Vec3f pos; + /* 0x0C */ Vec3f vel; + /* 0x18 */ s16 rotVelX; + /* 0x1A */ s16 rotVelY; +} BgJyaMegamiPiece; // size = 0x1C + typedef struct BgJyaMegami { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x1F0]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ BgJyaMegamiActionFunc actionFunc; + /* 0x0168 */ ColliderJntSph collider; + /* 0x0188 */ ColliderJntSphItem colliderItem; + /* 0x01C8 */ s16 lightTimer; + /* 0x01CA */ s16 explosionTimer; + /* 0x01CC */ s16 crumbleIndex; + /* 0x01D0 */ BgJyaMegamiPiece pieces[13]; } BgJyaMegami; // size = 0x033C extern const ActorInit Bg_Jya_Megami_InitVars; diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index 2e933d9f7c..c7b424313b 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -101,24 +101,23 @@ void BgMjin_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx) { BgMjin* this = THIS; u32 dlist; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - s32 objBankIndex; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_mjin.c", 250); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 250); + if (thisx->params != 0) { - objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIDs[thisx->params - 1]); + s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIDs[thisx->params - 1]); if (objBankIndex >= 0) { - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment); } - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000)); dlist = D_06000330; } else { dlist = D_06000140; } func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 285), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 285), G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dlist); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_mjin.c", 288); + gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 288); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index d01a69fb4a..508ddaf87b 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -256,15 +256,14 @@ void BgMoriElevator_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriElevator_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; BgMoriElevator* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 575); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 575); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 580), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 580), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06002AD0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 584); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06002AD0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 584); } diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 6a41b5438d..4fd3f2ce12 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -228,19 +228,17 @@ void BgMoriHineri_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { - BgMoriHineri* this = THIS; s8 objIndex; MtxF mtx; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(&dispRefs, globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 611); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 611); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIdx].segment); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 618), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIdx].segment); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 618), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, sDLists[this->dyna.actor.params]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[this->dyna.actor.params]); if (this->boxObjIdx > 0) { Matrix_Get(&mtx); } @@ -253,21 +251,21 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { } Matrix_RotateRPY(0, -0x8000, this->dyna.actor.shape.rot.z, MTXMODE_APPLY); Matrix_Translate(0.0f, -50.0f, 0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 652), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 652), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_04049FE0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_04049FE0); } if ((this->boxObjIdx > 0) && ((this->boxObjIdx = Object_GetIndex(&globalCtx->objectCtx, OBJECT_BOX)) > 0) && (Object_IsLoaded(&globalCtx->objectCtx, this->boxObjIdx))) { - gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->boxObjIdx].segment); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->boxObjIdx].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, &D_80116280[2]); Matrix_Put(&mtx); Matrix_Translate(147.0f, -245.0f, -453.0f, MTXMODE_APPLY); Matrix_RotateY(1.5707964f, MTXMODE_APPLY); Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000AE8); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000AE8); Matrix_Put(&mtx); Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY); if (Flags_GetTreasure(globalCtx, 0xE)) { @@ -276,9 +274,10 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(M_PI, MTXMODE_APPLY); } Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 703), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 703), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001678); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001678); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 709); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 709); } diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c index 9aceee02ad..ed101fd6d6 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -79,13 +79,14 @@ void BgPushbox_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgPushbox_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 263); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 263); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269), G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06000000); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 272); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06000000); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 272); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index 5d43f4c73d..cf08b33ebf 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -78,15 +78,13 @@ void BgSpot01Fusya_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot01Fusya_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 210); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 210); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 214), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 214), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000100); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000100); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 219); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_fusya.c", 219); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index c9cf0d1a81..3e16fabfd7 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -324,18 +324,17 @@ void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) { void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) { GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx; - GraphicsContext* gfxCtx = localGfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, localGfxCtx, "../z_bg_spot01_idohashira.c", 689); + OPEN_DISPS(localGfxCtx, "../z_bg_spot01_idohashira.c", 689); + func_80093D18(localGfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_spot01_idohashira.c", 699), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_spot01_idohashira.c", 699), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_808AAF34(this, globalCtx); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000420); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000420); - Graph_CloseDisps(dispRefs, localGfxCtx, "../z_bg_spot01_idohashira.c", 708); + CLOSE_DISPS(localGfxCtx, "../z_bg_spot01_idohashira.c", 708); } void BgSpot01Idohashira_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 0cc5df6c4a..7d424c55c8 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -71,21 +71,20 @@ void BgSpot01Idomizu_Update(Actor* thisx, GlobalContext* globalCtx) { void BgSpot01Idomizu_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 frames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 228); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 228); + func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 232), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 232), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); frames = globalCtx->state.frames; - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - frames % 128, frames & 0x7F, 32, 32, 1, frames % 128, frames & 0x7F, 32, 32)); - gSPDisplayList(gfxCtx->polyXlu.p++, D_060007D0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 244); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060007D0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idomizu.c", 244); } diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index c958ef4231..5b584161ef 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -74,15 +74,13 @@ void BgSpot01Idosoko_Update(Actor* thisx, GlobalContext* globalCtx) { extern u32 D_06003B20; void BgSpot01Idosoko_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 162); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 162); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 166), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 166), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06003B20); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06003B20); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 171); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot01_idosoko.c", 171); } diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index d6555d3a89..60623e86da 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -167,20 +167,17 @@ void BgSpot09Obj_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot09Obj_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot09Obj* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[3]; - Gfx_DrawDListOpa(globalCtx, sDLists[thisx->params]); + if (thisx->params == 3) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388); + func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06008010); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06008010); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 396); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 396); } } diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index 02ad575b3f..5667ea1773 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -15,7 +15,6 @@ void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx); -/* const ActorInit Bg_Spot11_Bakudankabe_InitVars = { ACTOR_BG_SPOT11_BAKUDANKABE, ACTORTYPE_BG, @@ -27,15 +26,117 @@ const ActorInit Bg_Spot11_Bakudankabe_InitVars = { (ActorFunc)BgSpot11Bakudankabe_Update, (ActorFunc)BgSpot11Bakudankabe_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s") +static ColliderCylinderInit sCylinderInit = { + { COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER }, + { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 }, + { 40, 80, 0, { 2259, 108, -1580 } }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s") +Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; +Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s") +extern UNK_TYPE D_06001A58; +extern Gfx D_06001980[]; +extern Gfx D_0500A880[]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s") +void func_808B2180(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) { + s32 pad; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s") + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); + this->collider.dim.pos.x += (s16)this->dyna.actor.posRot.pos.x; + this->collider.dim.pos.y += (s16)this->dyna.actor.posRot.pos.y; + this->collider.dim.pos.z += (s16)this->dyna.actor.posRot.pos.z; +} + +void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + Vec3f burstDepthY; + Vec3f burstDepthX; + s32 i; + + burstDepthX.z = 0; + burstDepthX.x = 0; + + for (i = 0; i < 20; i++) { + s16 scale; + s32 gravityInfluence; + s32 rotationSpeed; + + Math_Vec3f_Sum(&thisx->posRot.pos, &D_808B272C, &burstDepthY); + + burstDepthY.x += (Math_Rand_ZeroOne() - 0.5f) * 120.0f; + burstDepthY.y += (30.0f + (i * 6.5f)); + burstDepthY.z += (Math_Rand_ZeroOne() - 0.5f) * 20.0f; + + burstDepthX.y = (Math_Rand_ZeroOne() - 0.2f) * 12.0f; + scale = (Math_Rand_ZeroOne() * 55.0f) + 8.0f; + + if (scale < 20) { + gravityInfluence = -300; + } else if (scale < 35) { + gravityInfluence = -360; + } else { + gravityInfluence = -420; + } + if (Math_Rand_ZeroOne() < 0.4f) { + rotationSpeed = 65; + } else { + rotationSpeed = 33; + } + func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0, + scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880); + } + Math_Vec3f_Sum(&thisx->posRot.pos, &D_808B272C, &burstDepthY); + func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1); + burstDepthY.y += 40; + func_80033480(globalCtx, &burstDepthY, 70, 5, 110, 160, 1); + burstDepthY.y += 40; + func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1); +} + +void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + s32 pad; + s32 sp24; + + sp24 = 0; + DynaPolyInfo_SetActorMove(&this->dyna, 0); + if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) { + Actor_Kill(&this->dyna.actor); + return; + } + func_808B2180(this, globalCtx); + DynaPolyInfo_Alloc(&D_06001A58, &sp24); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24); + Actor_SetScale(&this->dyna.actor, 1.0f); + osSyncPrintf("(spot11 爆弾壁)(arg_data 0x%04x)\n", this->dyna.actor.params); +} + +void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + Collider_DestroyCylinder(globalCtx, &this->collider); +} + +void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + if (this->collider.base.acFlags & 2) { + func_808B2218(this, globalCtx); + Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F)); + Audio_PlaySoundAtPosition(globalCtx, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN); + func_80078884(NA_SE_SY_CORRECT_CHIME); + Actor_Kill(&this->dyna.actor); + return; + } + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); +} + +void BgSpot11Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + Gfx_DrawDListOpa(globalCtx, D_06001980); +} diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h index ba28475249..579a801476 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h @@ -7,8 +7,8 @@ struct BgSpot11Bakudankabe; typedef struct BgSpot11Bakudankabe { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x64]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ ColliderCylinder collider; } BgSpot11Bakudankabe; // size = 0x01B0 extern const ActorInit Bg_Spot11_Bakudankabe_InitVars; diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index e29637ec8b..cc81638051 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -95,15 +95,13 @@ void BgSpot15Saku_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot15Saku_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 259); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 259); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 263), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 263), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_060003C0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060003C0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 268); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot15_saku.c", 268); } diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index baf45c7019..2cf5dc520d 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -122,44 +122,45 @@ void BgSpot16Doughnut_UpdateExpanding(Actor* thisx, GlobalContext* globalCtx) { void BgSpot16Doughnut_Draw(Actor* thisx, GlobalContext* globalCtx) { BgSpot16Doughnut* this = THIS; - u32 scroll; - GraphicsContext* gfxCtx; - Gfx* dispRefs[5]; + u32 scroll = globalCtx->gameplayFrames & 0xFFFF; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 210); - scroll = globalCtx->gameplayFrames & 0xFFFF; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 210); func_80093D84(globalCtx->state.gfxCtx); + if (1) {} - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 213), + + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 213), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->fireFlag & 1) { gSPSegment( - gfxCtx->polyXlu.p++, 0x08, + oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * (-1), 0, 16, 32, 1, scroll, scroll * (-2), 16, 32)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, this->envColorAlpha); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06000660); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, this->envColorAlpha); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000660); } else { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06000FC0); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000FC0); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 238); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 238); } // Draw function for outwardly expanding and dissipating void BgSpot16Doughnut_DrawExpanding(Actor* thisx, GlobalContext* globalCtx) { BgSpot16Doughnut* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 245); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 245); + func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 248), + + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 248), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06000FC0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 256); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000FC0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 256); } diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 956e2d202b..0709472f49 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -1,3 +1,9 @@ +/* + * File: z_bg_spot17_bakudankabe.c + * Overlay: ovl_Bg_Spot17_Bakudankabe + * Description: Death Mountain Crater Bombable Wall + */ + #include "z_bg_spot17_bakudankabe.h" #define FLAGS 0x00000000 @@ -9,7 +15,6 @@ void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx); -/* const ActorInit Bg_Spot17_Bakudankabe_InitVars = { ACTOR_BG_SPOT17_BAKUDANKABE, ACTORTYPE_BG, @@ -21,13 +26,133 @@ const ActorInit Bg_Spot17_Bakudankabe_InitVars = { (ActorFunc)BgSpot17Bakudankabe_Update, (ActorFunc)BgSpot17Bakudankabe_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/func_808B6BC0.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Init.s") +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Destroy.s") +extern UNK_TYPE D_06000A38; +extern Gfx D_060008A0[]; +extern Gfx D_06000960[]; +extern Gfx D_0500A880[]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Update.s") +void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) { + s32 pad[2]; + s32 i; + Vec3f burstDepthY; + Vec3f burstDepthX; + f32 sinY; + f32 cosY; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Bakudankabe/BgSpot17Bakudankabe_Draw.s") + sinY = Math_Sins(this->dyna.actor.shape.rot.y); + cosY = Math_Coss(this->dyna.actor.shape.rot.y); + + burstDepthX.z = 0.0f; + burstDepthX.x = 0.0f; + + for (i = 0; i < 20; i++) { + s16 gravityInfluence; + s16 scale; + f32 temp1; + f32 temp2; + s32 rotationSpeed; + + temp1 = (Math_Rand_ZeroOne() - 0.5f) * 140.0f; + temp2 = (Math_Rand_ZeroOne() - 0.5f) * 20.0f; + + burstDepthY.x = this->dyna.actor.posRot.pos.x + temp2 * sinY + (temp1 * cosY); + burstDepthY.y = this->dyna.actor.posRot.pos.y + 30.0f + (i * 6.5f); + burstDepthY.z = this->dyna.actor.posRot.pos.z + temp2 * cosY - (temp1 * sinY); + + burstDepthX.y = (Math_Rand_ZeroOne() - 0.2f) * 12.0f; + scale = Math_Rand_ZeroOne() * 55.0f + 8.0f; + + if (scale < 20) { + gravityInfluence = -300; + } else if (scale < 35) { + gravityInfluence = -360; + } else { + gravityInfluence = -420; + } + + if (Math_Rand_ZeroOne() < 0.4f) { + rotationSpeed = 65; + } else { + rotationSpeed = 33; + } + func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0, + scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880); + } + Math_Vec3f_Copy(&burstDepthY, &this->dyna.actor.posRot.pos); + func_80033480(globalCtx, &burstDepthY, 60.0f, 4, 110, 160, 1); + burstDepthY.y += 40.0f; + func_80033480(globalCtx, &burstDepthY, 60.0f, 4, 120, 160, 1); + burstDepthY.y += 40.0f; + func_80033480(globalCtx, &burstDepthY, 60.0f, 4, 110, 160, 1); +} + +void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { + BgSpot17Bakudankabe* this = THIS; + s32 pad; + s32 sp24 = 0; + + DynaPolyInfo_SetActorMove(&this->dyna.actor, 0); + if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) { + Actor_Kill(&this->dyna.actor); + return; + } + DynaPolyInfo_Alloc(&D_06000A38, &sp24); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24); + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); +} + +void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgSpot17Bakudankabe* this = THIS; + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} + +void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { + BgSpot17Bakudankabe* this = THIS; + if (this->dyna.actor.xzDistFromLink < 650.0f && func_80033684(globalCtx, &this->dyna.actor) != NULL) { + func_808B6BC0(this, globalCtx); + Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F)); + Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 40, NA_SE_EV_WALL_BROKEN); + func_80078884(NA_SE_SY_CORRECT_CHIME); + Actor_Kill(&this->dyna.actor); + } +} + +void BgSpot17Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { + s32 pad; + s8 r = coss(globalCtx->gameplayFrames * 1500) >> 8; + s8 g = coss(globalCtx->gameplayFrames * 1500) >> 8; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 269); + + func_80093D18(globalCtx->state.gfxCtx); + + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 273), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + r = (r >> 1) + 0xC0; + g = (g >> 1) + 0xC0; + + gDPSetEnvColor(oGfxCtx->polyOpa.p++, r, g, 255, 128); + + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060008A0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 283); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 286); + + func_80093D84(globalCtx->state.gfxCtx); + + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 290), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000960); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_bakudankabe.c", 295); +} diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h index 20086b5836..2fd606a370 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h @@ -7,8 +7,7 @@ struct BgSpot17Bakudankabe; typedef struct BgSpot17Bakudankabe { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x18]; + /* 0x0000 */ DynaPolyActor dyna; } BgSpot17Bakudankabe; // size = 0x0164 extern const ActorInit Bg_Spot17_Bakudankabe_InitVars; diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index f6e9580d3e..c6cc434fb3 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -55,21 +55,21 @@ void func_808B746C(Actor* thisx, GlobalContext* globalCtx) { } void func_808B7478(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 153); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 153); func_80093D84(globalCtx->state.gfxCtx); Matrix_RotateY((s16)(func_8005A9F4(ACTIVE_CAM) - thisx->shape.rot.y + 0x8000) * 9.58738019108e-05f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20, 1, 0, (0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20)); - do { - gSPDisplayList(gfxCtx->polyXlu.p++, D_06000B40); - } while (0); // necessary to match + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000B40); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 176); + if (1) {} + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 176); } diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c index 18d7eee03f..0150303393 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c @@ -58,7 +58,7 @@ void BgSpot18Futa_Update(Actor* thisx, GlobalContext* globalCtx) { BgSpot18Futa* this = THIS; s32 iVar1; - if (this->actor.attachedA == NULL) { + if (this->actor.parent == NULL) { iVar1 = Math_ApproxF(&this->actor.scale.x, 0, 0.005); if (iVar1 != 0) { diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index abd9b8135b..fe33a54894 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -94,7 +94,7 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { gSaveContext.cutsceneTrigger = 1; } if (LINK_IS_CHILD || ((gSaveContext.eventChkInf[5] & 0x20))) { - if (func_8002F410(&this->actor, globalCtx) != 0) { + if (Actor_HasParent(&this->actor, globalCtx)) { if (LINK_IS_CHILD) { Item_Give(globalCtx, ITEM_SWORD_MASTER); globalCtx->csCtx.segment = D_808BB2F0; @@ -104,7 +104,7 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { Audio_SetBGM(NA_BGM_STOP); Audio_SetBGM(0x53); gSaveContext.cutsceneTrigger = 1; - this->actor.attachedA = NULL; + this->actor.parent = NULL; BgTokiSwd_SetupAction(this, func_808BB0AC); } else { if (func_8002E084(&this->actor, 0x2000) != 0) { @@ -124,8 +124,8 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) { void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) { Player* player; - // if attached is set, sword has been pulled/placed from the pedestal - if (func_8002F410(&this->actor, globalCtx) != 0) { + // if sword has a parent it has been pulled/placed from the pedestal + if (Actor_HasParent(&this->actor, globalCtx)) { if (LINK_IS_CHILD) { Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_PUTAWAY_STN); this->actor.draw = NULL; // sword has been pulled, dont draw sword @@ -153,25 +153,21 @@ void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx) { + GlobalContext* globalCtx2 = globalCtx; BgTokiSwd* this = THIS; s32 pad[3]; - GameState* state; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - state = &globalCtx->state; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 727); - Graph_OpenDisps(dispRefs, state->gfxCtx, "../z_bg_toki_swd.c", 727); - func_80093D18(globalCtx->state.gfxCtx); + func_80093D18(globalCtx2->state.gfxCtx); - func_8002EBCC(&this->actor, globalCtx, 0); + func_8002EBCC(&this->actor, globalCtx2, 0); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, - Gfx_TexScroll(globalCtx->state.gfxCtx, 0, -(globalCtx->gameplayFrames % 0x80), 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 742), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, + Gfx_TexScroll(globalCtx2->state.gfxCtx, 0, -(globalCtx2->gameplayFrames % 0x80), 32, 32)); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 742), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001BD0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001BD0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 776); + CLOSE_DISPS(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 776); } diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index 925570980d..580aeb3a79 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -226,10 +226,9 @@ void BgTreemouth_Update(Actor* thisx, GlobalContext* globalCtx) { void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; u16 alpha = 500; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 893); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 893); + func_80093D18(globalCtx->state.gfxCtx); if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) { @@ -243,10 +242,10 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { alpha = (globalCtx->unk_11D30[0] + 0x1F4); } - gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, alpha * 0.1f); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 932), + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 128, 128, 128, alpha * 0.1f); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 932), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_060009D0); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_060009D0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 937); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 937); } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index caa10e3bb5..c970724bed 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -189,22 +189,22 @@ void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) { void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) { BgYdanHasi* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) { Gfx_DrawDListOpa(globalCtx, D_808BEC24[this->dyna.actor.params]); return; } - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577); + func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (0 - globalCtx->gameplayFrames & 0x7F), globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1, globalCtx->gameplayFrames & 0x7F, globalCtx->gameplayFrames & 0x7F, 0x20, 0x20)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_06005DE0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_06005DE0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597); } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 3013d66145..1e47b1a7a3 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -19,6 +19,7 @@ void func_808BEFF4(BgYdanMaruta* this, GlobalContext* globalCtx); void BgYdanMaruta_DoNothing(BgYdanMaruta* this, GlobalContext* globalCtx); void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx); void func_808BF108(BgYdanMaruta* this, GlobalContext* globalCtx); +void func_808BF1EC(BgYdanMaruta* this, GlobalContext* globalCtx); const ActorInit Bg_Ydan_Maruta_InitVars = { ACTOR_BG_YDAN_MARUTA, @@ -57,13 +58,11 @@ extern UNK_TYPE D_060066A8; extern Gfx D_06008D88[]; extern Gfx D_06006570[]; -#ifdef NON_MATCHING -// Register issues void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { - s32 i; + s32 pad; BgYdanMaruta* this = THIS; Vec3f sp4C[3]; - s32 pad; + s32 i; f32 sinRotY; f32 cosRotY; s32 localConst = 0; @@ -72,13 +71,15 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(thisx, D_808BF388); Collider_InitTris(globalCtx, &this->collider); Collider_SetTris(globalCtx, &this->collider, thisx, &D_808BF378, &this->colliderItems); - this->unk_168 = thisx->params; - thisx->params = ((thisx->params >> 8) & 0xFF) & 0xFF; - items = &D_808BF300[1]; + + this->unk_168 = thisx->params & 0xFFFF; + thisx->params = (thisx->params >> 8) & 0xFF; + if (thisx->params == 0) { items = &D_808BF300[0]; this->actionFunc = func_808BEFF4; } else { + items = &D_808BF300[1]; DynaPolyInfo_SetActorMove(&this->dyna, 0); DynaPolyInfo_Alloc(&D_060066A8, &localConst); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localConst); @@ -90,22 +91,24 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = func_808BF078; } } + sinRotY = Math_Sins(thisx->shape.rot.y); cosRotY = Math_Coss(thisx->shape.rot.y); + for (i = 0; i < 3; i++) { sp4C[i].x = (items->dim.vtx[i].x * cosRotY) + thisx->posRot.pos.x; sp4C[i].y = items->dim.vtx[i].y + thisx->posRot.pos.y; sp4C[i].z = thisx->posRot.pos.z - (items->dim.vtx[i].x * sinRotY); } + func_800627A0(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]); + sp4C[1].x = (items->dim.vtx[2].x * cosRotY) + thisx->posRot.pos.x; sp4C[1].y = items->dim.vtx[0].y + thisx->posRot.pos.y; sp4C[1].z = thisx->posRot.pos.z - (items->dim.vtx[2].x * sinRotY); + func_800627A0(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/BgYdanMaruta_Init.s") -#endif void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx) { BgYdanMaruta* this = THIS; @@ -137,10 +140,8 @@ void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx) { } } -#ifdef NON_EQUIVALENT -// Casting issues and a branch issue void func_808BF108(BgYdanMaruta* this, GlobalContext* globalCtx) { - s16 phi_v0; + s16 temp; if (this->unk_16A != 0) { this->unk_16A--; @@ -148,25 +149,23 @@ void func_808BF108(BgYdanMaruta* this, GlobalContext* globalCtx) { if (this->unk_16A == 0) { this->actionFunc = func_808BF1EC; } - phi_v0 = this->unk_16A; - if ((phi_v0 < 0) && ((phi_v0 % 4) != 0)) { - phi_v0 -= 4; - } - phi_v0 -= 2; - if (phi_v0 == -2) { - phi_v0 = 0; + + if (1) {} + + temp = (this->unk_16A % 4) - 2; + if (temp == -2) { + temp = 0; } else { - phi_v0 *= 2; + temp *= 2; } + this->dyna.actor.posRot.pos.x = - (Math_Coss(this->dyna.actor.shape.rot.y) * phi_v0) + this->dyna.actor.initPosRot.pos.x; + (Math_Coss(this->dyna.actor.shape.rot.y) * temp) + this->dyna.actor.initPosRot.pos.x; this->dyna.actor.posRot.pos.z = - (Math_Sins(this->dyna.actor.shape.rot.y) * phi_v0) + this->dyna.actor.initPosRot.pos.z; + (Math_Sins(this->dyna.actor.shape.rot.y) * temp) + this->dyna.actor.initPosRot.pos.z; + func_8002F974(&this->dyna.actor, NA_SE_EV_TRAP_OBJ_SLIDE - SFX_FLAG); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Maruta/func_808BF108.s") -#endif void func_808BF1EC(BgYdanMaruta* this, GlobalContext* globalCtx) { this->dyna.actor.velocity.y += 1.0f; diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 4fe09f5a24..b7e1570283 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -128,17 +128,15 @@ void BgZg_Init(Actor* thisx, GlobalContext* globalCtx) { void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx; - GraphicsContext* gfxCtx = localGfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, localGfxCtx, "../z_bg_zg.c", 311); + OPEN_DISPS(localGfxCtx, "../z_bg_zg.c", 311); func_80093D18(localGfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_zg.c", 315), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_zg.c", 315), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001080); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001080); - Graph_CloseDisps(dispRefs, localGfxCtx, "../z_bg_zg.c", 320); + CLOSE_DISPS(localGfxCtx, "../z_bg_zg.c", 320); } void BgZg_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index d3b2b487c1..1d1a13ca59 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -75,34 +75,33 @@ void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx) { void func_80977EA8(GlobalContext* globalCtx, Gfx* dlist) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 181); + OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 181); + func_80093D18(gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_demo_geff.c", 183), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, dlist); - gSPPopMatrix(gfxCtx->polyOpa.p++, G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyOpa.p++, dlist); + gSPPopMatrix(oGfxCtx->polyOpa.p++, G_MTX_MODELVIEW); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 188); + CLOSE_DISPS(gfxCtx, "../z_demo_geff.c", 188); } void func_80977F80(DemoGeff* this, GlobalContext* globalCtx) { s32 pad[2]; s32 objBankIndex = this->objBankIndex; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 204); + OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204); - gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[objBankIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[objBankIndex].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment); // Necessary to match if (!globalCtx) {} - Graph_CloseDisps(dispRefs, gfxCtx, "../z_demo_geff.c", 212); + CLOSE_DISPS(gfxCtx, "../z_demo_geff.c", 212); } void func_80978030(DemoGeff* this, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 869b833650..ef55f10c0e 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -335,19 +335,17 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { SkelAnime* skelAnime = &this->skelAnime; void* srcSegment8 = D_8097D440[temp]; void* srcSegment9 = &D_0600E680; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_go.c", 732); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_go.c", 732); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_go.c", 746); } void DemoGo_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 164667de17..e0a893f5de 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -310,7 +310,7 @@ void func_80985358(DemoIm* this, GlobalContext* globalCtx) { f32 posY = this->actor.posRot.pos.y; f32 posZ = this->actor.posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); } void func_809853B4(DemoIm* this, GlobalContext* globalCtx) { @@ -319,8 +319,8 @@ void func_809853B4(DemoIm* this, GlobalContext* globalCtx) { f32 playerY = player->actor.posRot.pos.y + 80.0f; f32 playerZ = player->actor.posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, playerX, playerY, playerZ, 0, - 0, 0, 0xD); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, playerX, playerY, playerZ, 0, + 0, 0, 0xD); Item_Give(globalCtx, GI_BOMBCHUS_5); } @@ -440,8 +440,8 @@ void func_809858A8(void) { } void func_809858C8(DemoIm* this, GlobalContext* globalCtx) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, - (kREG(17) + 24.0f) + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 6); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, + (kREG(17) + 24.0f) + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 6); } void func_80985948(DemoIm* this, GlobalContext* globalCtx) { @@ -526,20 +526,20 @@ void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) { s16 unk_25C = this->unk_25C; UNK_PTR sp68 = D_80987830[unk_25C]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 281); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 281); + func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->unk_26C); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->unk_26C); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - NULL, NULL, NULL, gfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 308); + oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 308); } void func_80985E60(DemoIm* this, GlobalContext* globalCtx) { @@ -1188,20 +1188,20 @@ void func_80987658(DemoIm* this, GlobalContext* globalCtx) { s16 unk_25C = this->unk_25C; UNK_PTR sp68 = D_80987830[unk_25C]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_im.c", 904); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 904); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp68)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp68)); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, func_80987514, func_809875C0, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_im.c", 925); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 925); } void DemoIm_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index efcde8f5c8..97f8be83d3 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -223,7 +223,7 @@ void func_8098E86C(DemoSa* this, GlobalContext* globalCtx) { f32 posY = posRot->y; f32 posZ = posRot->z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); } void func_8098E8C8(DemoSa* this, GlobalContext* globalCtx) { @@ -232,8 +232,8 @@ void func_8098E8C8(DemoSa* this, GlobalContext* globalCtx) { f32 posY = player->actor.posRot.pos.y + 80.0f; f32 posZ = player->actor.posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, - 0xB); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, + 0xB); Item_Give(globalCtx, ITEM_MEDALLION_FOREST); } @@ -371,8 +371,8 @@ void func_8098EE08(void) { } void func_8098EE28(DemoSa* this, GlobalContext* globalCtx) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, - (kREG(23) + 25.0f) + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 4); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, + (kREG(23) + 25.0f) + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 4); } void func_8098EEA8(DemoSa* this, GlobalContext* globalCtx) { @@ -457,21 +457,21 @@ void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx) { s32 pad2; UNK_PTR sp6C = D_809900F4[unk_194]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296); + func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, D_80116280); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, D_80116280); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - NULL, NULL, NULL, gfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 325); + oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 325); } void func_8098F390(DemoSa* this, GlobalContext* globalCtx) { @@ -604,8 +604,8 @@ void func_8098F83C(DemoSa* this, GlobalContext* globalCtx) { Vec3f* thisPos = &this->actor.posRot.pos; SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600B1A0, &D_0601113C, NULL, NULL, 0); - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, thisPos->x, thisPos->y, thisPos->z, - 0, 0, 0, 3); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, thisPos->x, thisPos->y, thisPos->z, + 0, 0, 0, 3); this->action = 16; this->drawConfig = 0; this->actor.shape.unk_14 = 0; @@ -796,21 +796,21 @@ void func_8098FEB4(DemoSa* this, GlobalContext* globalCtx) { s16 unk_194 = this->unk_194; UNK_PTR sp64 = D_809900F4[unk_194]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(&dispRefs, globalCtx->state.gfxCtx, "../z_demo_sa.c", 602); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa.c", 602); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, DemoSa_OverrideLimbDraw, NULL, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_sa.c", 626); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa.c", 626); } void DemoSa_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index 99ef9cc3dd..65c00ca567 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -161,13 +161,12 @@ void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) { } void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_ana.c", 440); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_door_ana.c", 440); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_ana.c", 446), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_ana.c", 446), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_05001390); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_door_ana.c", 449); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_05001390); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_door_ana.c", 449); } diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 28d5813308..aeecac36ac 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -150,20 +150,18 @@ void DoorGerudo_Update(Actor* thisx, GlobalContext* globalCtx) { void DoorGerudo_Draw(Actor* thisx, GlobalContext* globalCtx) { DoorGerudo* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 361); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_door_gerudo.c", 361); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 365), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 365), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000040); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000040); if (this->unk_166 != 0) { Matrix_Scale(0.01f, 0.01f, 0.025f, MTXMODE_APPLY); func_80033F54(globalCtx, this->unk_166, 0); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_door_gerudo.c", 377); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 377); } diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index b3e33f3295..b3d4ae76be 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -219,29 +219,28 @@ void ElfMsg_Update(Actor* thisx, GlobalContext* globalCtx) { } void ElfMsg_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg.c", 436); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_elf_msg.c", 436); if (R_NAVI_MSG_REGION_ALPHA == 0) { return; } + func_80093D18(globalCtx->state.gfxCtx); if (thisx->params & 0x8000) { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 100, 100, R_NAVI_MSG_REGION_ALPHA); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 100, 100, R_NAVI_MSG_REGION_ALPHA); } else { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, R_NAVI_MSG_REGION_ALPHA); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, R_NAVI_MSG_REGION_ALPHA); } - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg.c", 448), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg.c", 448), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_809AD278); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD278); if (thisx->params & 0x4000) { - gSPDisplayList(gfxCtx->polyXlu.p++, D_809AD4B8); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD4B8); } else { - gSPDisplayList(gfxCtx->polyXlu.p++, D_809AD3B8); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_809AD3B8); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_elf_msg.c", 457); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg.c", 457); } diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 618cf9e19f..33f130f6c0 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -180,19 +180,18 @@ void ElfMsg2_Update(Actor* thisx, GlobalContext* globalCtx) { } void ElfMsg2_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 355); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_elf_msg2.c", 355); if (R_NAVI_MSG_REGION_ALPHA == 0) { return; } + func_80093D18(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 100, 100, 255, R_NAVI_MSG_REGION_ALPHA); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 362), + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 100, 100, 255, R_NAVI_MSG_REGION_ALPHA); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 362), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_809ADC38); - gSPDisplayList(gfxCtx->polyXlu.p++, D_809ADCF8); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_elf_msg2.c", 367); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_809ADC38); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_809ADCF8); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 367); } diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index a6dbf29fb3..0ce750ef04 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -116,8 +116,8 @@ void func_809B0524(EnAni* this, GlobalContext* globalCtx) { } void func_809B0558(EnAni* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; if (LINK_IS_CHILD) { EnAni_SetupAction(this, func_809B04F0); } else { @@ -314,17 +314,15 @@ void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) { EnAni* this = THIS; s32 pad; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ani.c", 719); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ani.c", 719); func_800943C8(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B0F80[this->unk_2AC])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B0F80[this->unk_2AC])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ani.c", 736); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ani.c", 736); } diff --git a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c index 7a2a267ff9..4dcbc8a58a 100644 --- a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c +++ b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c @@ -52,8 +52,8 @@ void EnAnubiceTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnAnubiceTag_SpawnAnubis(EnAnubiceTag* this, GlobalContext* globalCtx) { this->anubis = - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ANUBICE, this->actor.posRot.pos.x, - this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.yawTowardsLink, 0, 0); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ANUBICE, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.yawTowardsLink, 0, 0); if (this->anubis != NULL) { this->actionFunc = EnAnubiceTag_ManageAnubis; diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index aebcb23626..3bc61b9aae 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -65,9 +65,9 @@ void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx) { void EnAttackNiw_Destroy(Actor* thisx, GlobalContext* globalCtx) { EnAttackNiw* this = THIS; - EnNiw* cucco = (EnNiw*)this->actor.attachedA; + EnNiw* cucco = (EnNiw*)this->actor.parent; - if (this->actor.attachedA != NULL) { + if (this->actor.parent != NULL) { if ((cucco->actor.update != NULL) && (cucco->unk_296 > 0)) { cucco->unk_296--; } @@ -356,8 +356,8 @@ void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx) { tmpf1 = 20.0f; if (this->actor.xyzDistFromLinkSq < SQ(tmpf1)) { - cucco = (EnNiw*)this->actor.attachedA; - if ((this->actor.attachedA->update != NULL) && (this->actor.attachedA != NULL) && (cucco != NULL) && + cucco = (EnNiw*)this->actor.parent; + if ((this->actor.parent->update != NULL) && (this->actor.parent != NULL) && (cucco != NULL) && (cucco->unk_26A == 0) && (player->invincibilityTimer == 0)) { func_8002F6D4(globalCtx, &this->actor, 2.0f, this->actor.posRot.rot.y, 0.0f, 0x10); cucco->unk_26A = 0x46; diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 2927bc6784..05358b8e36 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -135,10 +135,8 @@ void EnBlkobj_Update(Actor* thisx, GlobalContext* globalCtx) { void func_809C2324(GlobalContext* globalCtx, Gfx* dList, s32 alpha) { Gfx* segment; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 322); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 322); if (alpha == 255) { segment = D_809C2590; @@ -146,28 +144,28 @@ void func_809C2324(GlobalContext* globalCtx, Gfx* dList, s32 alpha) { segment = D_809C25A0; } - gSPSegment(gfxCtx->polyXlu.p++, 0x08, segment); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, alpha); - gSPDisplayList(gfxCtx->polyXlu.p++, dList); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, segment); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, alpha); + gSPDisplayList(oGfxCtx->polyXlu.p++, dList); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 330); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 330); } void EnBlkobj_Draw(Actor* thisx, GlobalContext* globalCtx) { EnBlkobj* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + s32 pad; s32 temp_a3; u32 gameplayFrames; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 349); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 349); + func_80093D84(globalCtx->state.gfxCtx); gameplayFrames = globalCtx->gameplayFrames % 128; - gSPSegment(gfxCtx->polyXlu.p++, 0x0D, + gSPSegment(oGfxCtx->polyXlu.p++, 0x0D, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames, 0, 32, 32, 1, gameplayFrames, 0, 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 363), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 363), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->unk_164 != 0) { @@ -178,5 +176,5 @@ void EnBlkobj_Draw(Actor* thisx, GlobalContext* globalCtx) { func_809C2324(globalCtx, D_060053D0, temp_a3); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 375); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 375); } diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 450f73998a..ea2b01072b 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -94,8 +94,8 @@ void EnBom_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnBom_Move(EnBom* this, GlobalContext* globalCtx) { - // if attached A is not null, the bomb hasnt been released yet - if (func_8002F410(&this->actor, globalCtx)) { + // if bomb has a parent actor, the bomb hasnt been released yet + if (Actor_HasParent(&this->actor, globalCtx)) { EnBom_SetupAction(this, EnBom_WaitForRelease); this->actor.room = -1; return; @@ -134,8 +134,8 @@ void EnBom_Move(EnBom* this, GlobalContext* globalCtx) { } void EnBom_WaitForRelease(EnBom* this, GlobalContext* globalCtx) { - // if attachedA is NULL bomb has been released - if (func_8002F5A0(&this->actor, globalCtx)) { + // if parent is NULL bomb has been released + if (Actor_HasNoParent(&this->actor, globalCtx)) { EnBom_SetupAction(this, EnBom_Move); EnBom_Move(this, globalCtx); } @@ -183,7 +183,7 @@ void EnBom_Explode(EnBom* this, GlobalContext* globalCtx) { player = PLAYER; if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) { - player->actor.attachedB = NULL; + player->actor.child = NULL; player->heldActor = NULL; player->interactRangeActor = NULL; player->stateFlags1 &= ~0x800; @@ -275,7 +275,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { effPos = thisx->posRot.pos; effPos.y += 10.0f; - if (func_8002F410(thisx, globalCtx)) { + if (Actor_HasParent(thisx, globalCtx)) { effPos.y += 30.0f; } @@ -291,7 +291,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { if (globalCtx) {}; globalCtx->envCtx.unk_8C[1][0] = globalCtx->envCtx.unk_8C[1][1] = globalCtx->envCtx.unk_8C[1][2] = 0xFA; globalCtx->envCtx.unk_8C[0][0] = globalCtx->envCtx.unk_8C[0][1] = globalCtx->envCtx.unk_8C[0][2] = 0xFA; - func_8005AA1C(&globalCtx->cameras[0], 2, 0xB, 8); + func_8005AA1C(&globalCtx->mainCamera, 2, 0xB, 8); thisx->params = BOMB_EXPLOSION; this->timer = 10; thisx->flags |= 0x20; @@ -305,7 +305,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { Collider_CylinderUpdate(thisx, &this->bombCollider); // if link is not holding the bomb anymore and bump conditions are met, subscribe to OC - if (!func_8002F410(thisx, globalCtx) && this->bumpOn) { + if (!Actor_HasParent(thisx, globalCtx) && this->bumpOn) { CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bombCollider.base); } @@ -328,30 +328,28 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EnBom* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (1) {} - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bom.c", 913); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bom.c", 913); if (thisx->params == BOMB_BODY) { func_80093D18(globalCtx->state.gfxCtx); func_800D1FD4(&globalCtx->mf_11DA0); func_8002EBCC(thisx, globalCtx, 0); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 928), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 928), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_04007A50); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_04007A50); Matrix_RotateRPY(0x4000, 0, 0, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 934), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 934), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, (s16)this->flashIntensity, 0, 40, 255); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, (s16)this->flashIntensity, 0, 40, 255); - gSPDisplayList(gfxCtx->polyOpa.p++, D_04007860); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, (s16)this->flashIntensity, 0, 40, 255); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, (s16)this->flashIntensity, 0, 40, 255); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_04007860); func_800628A4(0, &this->explosionCollider); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bom.c", 951); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bom.c", 951); } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 4b8a1032f9..617987e671 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -125,7 +125,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { s32 pad2; if (this->flowerBombScale >= 1.0f) { - if (func_8002F410(&this->actor, globalCtx)) { + if (Actor_HasParent(&this->actor, globalCtx)) { bombFlower = (EnBombf*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BOMBF, this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 0); @@ -136,10 +136,10 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_PL_PULL_UP_ROCK); this->actor.flags &= ~1; } else { - player->actor.attachedB = NULL; + player->actor.child = NULL; player->heldActor = NULL; player->interactRangeActor = NULL; - this->actor.attachedA = NULL; + this->actor.parent = NULL; player->stateFlags1 &= ~0x800; } } else if (this->bombCollider.base.acFlags & 2) { @@ -169,13 +169,13 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { this->flowerBombScale = 0.0f; } } else { - if (!func_8002F410(&this->actor, globalCtx)) { + if (!Actor_HasParent(&this->actor, globalCtx)) { func_8002F580(&this->actor, globalCtx); } else { - player->actor.attachedB = NULL; + player->actor.child = NULL; player->heldActor = NULL; player->interactRangeActor = NULL; - this->actor.attachedA = NULL; + this->actor.parent = NULL; player->stateFlags1 &= ~0x800; this->actor.posRot.pos = this->actor.initPosRot.pos; } @@ -189,11 +189,11 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { } } - if (func_8002F410(&this->actor, globalCtx)) { - player->actor.attachedB = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + player->actor.child = NULL; player->heldActor = NULL; player->interactRangeActor = NULL; - this->actor.attachedA = NULL; + this->actor.parent = NULL; player->stateFlags1 &= ~0x800; this->actor.posRot.pos = this->actor.initPosRot.pos; } @@ -201,7 +201,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { } void EnBombf_Move(EnBombf* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx)) { + if (Actor_HasParent(&this->actor, globalCtx)) { // setting flowerBombScale does not do anything in the context of a bomb that link picks up // this and the assignment below are probably left overs this->flowerBombScale = 0.0f; @@ -226,8 +226,8 @@ void EnBombf_Move(EnBombf* this, GlobalContext* globalCtx) { } void EnBombf_WaitForRelease(EnBombf* this, GlobalContext* globalCtx) { - // if attachedA is NULL bomb has been released - if (func_8002F5A0(&this->actor, globalCtx)) { + // if parent is NULL bomb has been released + if (Actor_HasNoParent(&this->actor, globalCtx)) { EnBombf_SetupAction(this, EnBombf_Move); EnBombf_Move(this, globalCtx); } else { @@ -278,7 +278,7 @@ void EnBombf_Explode(EnBombf* this, GlobalContext* globalCtx) { player = PLAYER; if ((player->stateFlags1 & 0x800) && (player->heldActor == &this->actor)) { - player->actor.attachedB = NULL; + player->actor.child = NULL; player->heldActor = NULL; player->interactRangeActor = NULL; player->stateFlags1 &= ~0x800; @@ -302,7 +302,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) { this->timer--; } - if ((!this->bumpOn) && (!func_8002F410(thisx, globalCtx)) && + if ((!this->bumpOn) && (!Actor_HasParent(thisx, globalCtx)) && ((thisx->xzDistFromLink >= 20.0f) || (ABS(thisx->yDistFromLink) >= 80.0f))) { this->bumpOn = true; } @@ -387,7 +387,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) { effPos.y += 10.0f; - if (func_8002F410(thisx, globalCtx)) { + if (Actor_HasParent(thisx, globalCtx)) { effPos.y += 30.0f; } @@ -401,7 +401,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) { Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_EXPLOSION); globalCtx->envCtx.unk_8C[1][0] = globalCtx->envCtx.unk_8C[1][1] = globalCtx->envCtx.unk_8C[1][2] = 0xFA; globalCtx->envCtx.unk_8C[0][0] = globalCtx->envCtx.unk_8C[0][1] = globalCtx->envCtx.unk_8C[0][2] = 0xFA; - func_8005AA1C(&globalCtx->cameras[0], 2, 0xB, 8); + func_8005AA1C(&globalCtx->mainCamera, 2, 0xB, 8); thisx->params = BOMBFLOWER_EXPLOSION; this->timer = 10; thisx->flags |= 0x20; @@ -453,37 +453,35 @@ Gfx* EnBombf_NewMtxDList(GraphicsContext* gfxCtx, GlobalContext* globalCtx) { void EnBombf_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EnBombf* this = THIS; - GraphicsContext* gfxCtx; - Gfx* disRefs[4]; if (1) {} - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&disRefs, globalCtx->state.gfxCtx, "../z_en_bombf.c", 1034); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1034); if (thisx->params <= BOMBFLOWER_BODY) { func_80093D18(globalCtx->state.gfxCtx); if (thisx->params != BOMBFLOWER_BODY) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1041), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1041), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000340); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000530); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000340); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000530); Matrix_Translate(0.0f, 1000.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(this->flowerBombScale, this->flowerBombScale, this->flowerBombScale, MTXMODE_APPLY); } - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 200, 255, 200, 255); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, (s16)this->flashIntensity, 20, 10, 0); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1054), + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 200, 255, 200, 255); + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, (s16)this->flashIntensity, 20, 10, 0); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1054), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(EnBombf_NewMtxDList(globalCtx->state.gfxCtx, globalCtx))); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000408); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000408); } else { func_800628A4(0, &this->explosionCollider); } - Graph_CloseDisps(&disRefs, globalCtx->state.gfxCtx, "../z_en_bombf.c", 1063); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1063); } diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index e1ce985bca..1ec3056e8e 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -242,11 +242,9 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) { EnBoom* this = THIS; Vec3f vec1; Vec3f vec2; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_boom.c", 567); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_boom.c", 567); + Matrix_RotateY(this->actor.posRot.rot.y * 0.0000958738f, MTXMODE_APPLY); Matrix_RotateZ(0.7669904f, MTXMODE_APPLY); Matrix_RotateX(this->actor.posRot.rot.x * 0.0000958738f, MTXMODE_APPLY); @@ -260,9 +258,9 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); Matrix_RotateY((this->activeTimer * 12000) * 0.0000958738f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_0400C808); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_0400C808); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_boom.c", 604); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_boom.c", 604); } diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index 4626c87c5d..d5fb040f9f 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -184,53 +184,45 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) { void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) { EnBx* this = THIS; + s32 pad; Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx)); - f32 tmpf1; - f32 tmpf2; + s16 i; - { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - s16 i; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bx.c", 464); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bx.c", 464); - func_80093D18(globalCtx->state.gfxCtx); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, mtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, - Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, - (globalCtx->gameplayFrames * -10) % 128, 32, 32)); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bx.c", 478), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, mtx); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, + Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (globalCtx->gameplayFrames * -10) % 128, + 32, 32)); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bx.c", 478), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (this->actor.params & 0x80) { - func_809D1D0C(&this->actor, globalCtx); - } - - this->unk_14E -= 0xBB8; - tmpf1 = (Math_Coss(this->unk_14E) * 0.0075f) + 0.015f; - thisx->scale.x = tmpf1; - thisx->scale.z = tmpf1; - - for (i = 3; i >= 0; i--) { - s16 off = (0x2000 * i); - tmpf2 = (Math_Coss(this->unk_14E + off) * 0.0075f) + 0.015f; - this->unk_184[i].x = tmpf2; - this->unk_184[i].z = tmpf2; - this->unk_1B4[i].x = thisx->shape.rot.x; - this->unk_1B4[i].y = thisx->shape.rot.y; - this->unk_1B4[i].z = thisx->shape.rot.z; - } - - for (i = 0; i < 4; i++, mtx++) { - Matrix_Translate(this->unk_154[i].x, this->unk_154[i].y, this->unk_154[i].z, MTXMODE_NEW); - Matrix_RotateRPY(this->unk_1B4[i].x, this->unk_1B4[i].y, this->unk_1B4[i].z, MTXMODE_APPLY); - Matrix_Scale(this->unk_184[i].x, this->unk_184[i].y, this->unk_184[i].z, MTXMODE_APPLY); - Matrix_ToMtx(mtx, "../z_en_bx.c", 507); - } - - gSPDisplayList(gfxCtx->polyOpa.p++, D_060022F0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bx.c", 511); + if (this->actor.params & 0x80) { + func_809D1D0C(&this->actor, globalCtx); } + + this->unk_14E -= 0xBB8; + thisx->scale.z = thisx->scale.x = (Math_Coss(this->unk_14E) * 0.0075f) + 0.015f; + + for (i = 3; i >= 0; i--) { + s16 off = (0x2000 * i); + this->unk_184[i].z = this->unk_184[i].x = (Math_Coss(this->unk_14E + off) * 0.0075f) + 0.015f; + this->unk_1B4[i].x = thisx->shape.rot.x; + this->unk_1B4[i].y = thisx->shape.rot.y; + this->unk_1B4[i].z = thisx->shape.rot.z; + } + + for (i = 0; i < 4; i++, mtx++) { + Matrix_Translate(this->unk_154[i].x, this->unk_154[i].y, this->unk_154[i].z, MTXMODE_NEW); + Matrix_RotateRPY(this->unk_1B4[i].x, this->unk_1B4[i].y, this->unk_1B4[i].z, MTXMODE_APPLY); + Matrix_Scale(this->unk_184[i].x, this->unk_184[i].y, this->unk_184[i].z, MTXMODE_APPLY); + Matrix_ToMtx(mtx, "../z_en_bx.c", 507); + } + + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060022F0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bx.c", 511); } diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index d167ecf116..64d8893109 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -121,8 +121,8 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) { return; } } - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_COW, this->actor.posRot.pos.x, - this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.shape.rot.y, 0, 1); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_COW, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.shape.rot.y, 0, 1); this->unk_278 = Math_Rand_ZeroFloat(1000.0f) + 40.0f; this->unk_27A = 0; this->actor.unk_1F = 6; @@ -205,8 +205,8 @@ void func_809DF730(EnCow* this, GlobalContext* globalCtx) { } void func_809DF778(EnCow* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx)) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; this->actionFunc = func_809DF730; } else { func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f); diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 92cc4177c9..ae96c3ca4d 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -149,8 +149,8 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) { if (globalCtx->unk_11D4C(globalCtx, player) != 0) { this->unk_1CA = 0; this->unk_1CC++; - if (this->actor.attachedA != NULL) { - this->actor.attachedA->params = 1; + if (this->actor.parent != NULL) { + this->actor.parent->params = 1; } Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_GRIP); } @@ -171,9 +171,9 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) { this->unk_1D0.z = (((this->unk_1D0.z - this->actor.shape.rot.x) - this->unk_1CE) - this->unk_1D0.x); } else { if (player->stateFlags2 & 0x80) { - if (&this->actor == player->actor.attachedA) { + if (&this->actor == player->actor.parent) { player->stateFlags2 &= ~0x80; - player->actor.attachedA = NULL; + player->actor.parent = NULL; player->unk_850 = 200; } } @@ -209,9 +209,9 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) { } else { unkVar = ~0x80; if (player->stateFlags2 & 0x80) { - if (&this->actor == player->actor.attachedA) { + if (&this->actor == player->actor.parent) { player->stateFlags2 &= unkVar; - player->actor.attachedA = NULL; + player->actor.parent = NULL; player->unk_850 = 200; } } @@ -231,9 +231,9 @@ void func_809ECF8C(EnDha* this, GlobalContext* globalCtx) { Player* player = PLAYER; if (player->stateFlags2 & 0x80) { - if (&this->actor == player->actor.attachedA) { + if (&this->actor == player->actor.parent) { player->stateFlags2 &= ~0x80; - player->actor.attachedA = NULL; + player->actor.parent = NULL; player->unk_850 = 200; } } @@ -251,12 +251,12 @@ void EnDha_SetupDeath(EnDha* this) { this->unk_1C0 = 8; this->unk_1C8 = 300; - if (this->actor.attachedA != NULL) { - if (this->actor.attachedA->params != 0xA) { + if (this->actor.parent != NULL) { + if (this->actor.parent->params != 0xA) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HAND_DEAD); } - if (this->actor.attachedA->params <= 0) { - this->actor.attachedA->params--; + if (this->actor.parent->params <= 0) { + this->actor.parent->params--; } } EnDha_SetupAction(this, EnDha_Die); @@ -268,9 +268,9 @@ void EnDha_Die(EnDha* this, GlobalContext* globalCtx) { Player* player = PLAYER; if (player->stateFlags2 & 0x80) { - if (&this->actor == player->actor.attachedA) { + if (&this->actor == player->actor.parent) { player->stateFlags2 &= ~0x80; - player->actor.attachedA = NULL; + player->actor.parent = NULL; player->unk_850 = 200; } } @@ -287,8 +287,8 @@ void EnDha_Die(EnDha* this, GlobalContext* globalCtx) { return; } this->unk_1C8--; - if (this->actor.attachedA != 0) { - if (this->actor.attachedA->params == 0xA) { + if (this->actor.parent != 0) { + if (this->actor.parent->params == 0xA) { Actor_Kill(&this->actor); return; } @@ -321,8 +321,8 @@ void EnDha_UpdateHealth(EnDha* this, GlobalContext* globalCtx) { } } } - if (this->actor.attachedA != NULL) { - if (this->actor.attachedA->params == 0xA) { + if (this->actor.parent != NULL) { + if (this->actor.parent->params == 0xA) { EnDha_SetupDeath(this); } } @@ -334,8 +334,8 @@ void EnDha_Update(Actor* thisx, GlobalContext* globalCtx) { colChkCtx = &globalCtx->colChkCtx; - if (this->actor.attachedA == NULL) { - this->actor.attachedA = Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_DH, ACTORTYPE_ENEMY, 10000.0f); + if (this->actor.parent == NULL) { + this->actor.parent = Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_DH, ACTORTYPE_ENEMY, 10000.0f); } EnDha_UpdateHealth(this, globalCtx); this->actionFunc(this, globalCtx); diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h index 1a05e6ec2b..74f89ae22e 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h @@ -6,9 +6,59 @@ struct EnDivingGame; +typedef void (*EnDivingGameActionFunc)(struct EnDivingGame*, GlobalContext*); + typedef struct EnDivingGame { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x24C]; + /* 0x014C */ SkelAnime skelAnime; + /* 0x0190 */ Vec3s limbDrawTable[20]; + /* 0x0208 */ Vec3s transitionDrawTable[20]; + /* 0x0280 */ EnDivingGameActionFunc actionFunc; + /* 0x0284 */ Vec3s vec_284; + /* 0x028A */ Vec3s vec_28A; + /* 0x0290 */ s16 unk_290; + /* 0x0292 */ s16 unk_292; + /* 0x0294 */ s16 unk_294; + /* 0x0296 */ s16 unk_296; + /* 0x0298 */ s16 unk_298; + /* 0x029A */ s16 unk_29A; + /* 0x029C */ s16 unk_29C; + /* 0x029E */ s16 unk_29E; + /* 0x02A0 */ s16 camId; + /* 0x02A2 */ s16 unk_2A2; + /* 0x02A4 */ s16 unk_2A4; + /* 0x02A6 */ s16 unk_2A6; + /* 0x02A8 */ s16 unk_2A8; + /* 0x02AA */ s16 unk_2AA; + /* 0x02AC */ char unk_2AC[0xC]; + /* 0x02B8 */ Vec3f vec_2B8; + /* 0x02C4 */ Vec3f vec_2C4; + /* 0x02D0 */ f32 unk_2D0; + /* 0x02D4 */ f32 unk_2D4; + /* 0x02D8 */ f32 unk_2D8; + /* 0x02DC */ f32 unk_2DC; + /* 0x02E0 */ f32 unk_2E0; + /* 0x02E4 */ f32 unk_2E4; + /* 0x02E8 */ f32 unk_2E8; + /* 0x02EC */ f32 unk_2EC; + /* 0x02F0 */ f32 unk_2F0; + /* 0x02F4 */ f32 unk_2F4; + /* 0x02F8 */ f32 unk_2F8; + /* 0x02FC */ f32 unk_2FC; + /* 0x0300 */ f32 unk_300; + /* 0x0304 */ f32 unk_304; + /* 0x0308 */ f32 unk_308; + /* 0x030C */ f32 unk_30C; + /* 0x0310 */ f32 unk_310; + /* 0x0314 */ f32 unk_314; + /* 0x0318 */ f32 unk_318; + /* 0x031C */ char unk_31C; + /* 0x031D */ u8 unk_31D; + /* 0x031E */ char unk_31E; + /* 0x031F */ u8 unk_31F; + /* 0x0320 */ char unk_320[0x4]; + /* 0x0324 */ struct_80034A14_arg1 unk_324; + /* 0x034C */ ColliderCylinder collider; } EnDivingGame; // size = 0x0398 extern const ActorInit En_Diving_Game_InitVars; diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 34c41e498d..ddae36cb9b 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -451,18 +451,17 @@ void EnDog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnDog_Draw(Actor* thisx, GlobalContext* globalCtx) { EnDog* this = THIS; Color_RGBA8 colors[] = { { 255, 255, 200, 0 }, { 150, 100, 50, 0 } }; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_dog.c", 972); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dog.c", 972); + func_80093D18(globalCtx->state.gfxCtx); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_dog.c", 994); } diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index c9c3551ea2..9c13f555e3 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -88,8 +88,8 @@ void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) { } void EnDs_GiveOddPotion(EnDs* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; this->actionFunc = EnDs_DisplayOddPotionText; gSaveContext.timer2State = 0; } else { @@ -169,8 +169,8 @@ int EnDs_CheckRupeesAndBottle() { } void EnDs_GiveBluePotion(EnDs* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; this->actionFunc = EnDs_Talk; } else { func_8002F434(&this->actor, globalCtx, GI_POTION_BLUE, 10000.0f, 50.0f); diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 64436f7c9f..746f183c60 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -1,4 +1,11 @@ +/* + * File: z_en_dy_extra.c + * Overlay: ovl_En_Dy_Extra + * Description: Spiral Beams (Great Fairy Fountains) + */ + #include "z_en_dy_extra.h" +#include "vt.h" #define FLAGS 0x00000030 @@ -9,7 +16,9 @@ void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx); void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void func_809FF7AC(EnDyExtra* this, GlobalContext* globalCtx); +void func_809FF840(EnDyExtra* this, GlobalContext* globalCtx); + const ActorInit En_Dy_Extra_InitVars = { ACTOR_EN_DY_EXTRA, ACTORTYPE_PROP, @@ -21,15 +30,101 @@ const ActorInit En_Dy_Extra_InitVars = { (ActorFunc)EnDyExtra_Update, (ActorFunc)EnDyExtra_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Destroy.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Init.s") +extern Vtx D_0601BFB0[]; +extern Gfx D_0601C160[]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF7AC.s") +void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/func_809FF840.s") +void EnDyExtra_Init(Actor* thisx, GlobalContext* globalCtx) { + EnDyExtra* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Update.s") + osSyncPrintf("\n\n"); + // "Big fairy effect" + osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 大妖精効果 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params); + this->type = this->actor.params; + this->unk_15C.x = 0.025f; + this->unk_15C.y = 0.039f; + this->unk_15C.z = 0.025f; + this->unk_168 = this->actor.posRot.pos; + this->actor.gravity = -0.2f; + this->unk_158 = 1.0f; + this->unk_154 = 0x3C; + this->actionFunc = func_809FF7AC; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Dy_Extra/EnDyExtra_Draw.s") +void func_809FF7AC(EnDyExtra* this, GlobalContext* globalCtx) { + Math_SmoothScaleMaxF(&this->actor.gravity, 0.0f, 0.1f, 0.005f); + if (this->actor.posRot.pos.y < -55.0f) { + this->actor.velocity.y = 0.0f; + } + if (this->unk_154 == 0 && this->unk_152 != 0) { + this->unk_154 = 0xC8; + this->actionFunc = func_809FF840; + } +} + +void func_809FF840(EnDyExtra* this, GlobalContext* globalCtx) { + Math_SmoothScaleMaxF(&this->actor.gravity, 0.0f, 0.1f, 0.005f); + if (this->unk_154 == 0 || this->unk_158 < 0.02f) { + Actor_Kill(&this->actor); + return; + } + Math_SmoothDownscaleMaxF(&this->unk_158, 0.03f, 0.05f); + if (this->actor.posRot.pos.y < -55.0f) { + this->actor.velocity.y = 0.0f; + } +} + +void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx) { + EnDyExtra* this = THIS; + + DECR(this->unk_154); + this->actor.scale.x = this->unk_15C.x; + this->actor.scale.y = this->unk_15C.y; + this->actor.scale.z = this->unk_15C.z; + Audio_PlayActorSound2(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG); + this->actionFunc(this, globalCtx); + Actor_MoveForward(&this->actor); +} + +void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) { + static Color_RGBA8_n primColors[] = { { 255, 255, 170, 255 }, { 255, 255, 170, 255 } }; + static Color_RGBA8_n envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } }; + static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, + 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02 }; + EnDyExtra* this = THIS; + s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + Vtx* vertices = SEGMENTED_TO_VIRTUAL(D_0601BFB0); + s32 i; + u8 unk[3]; + + unk[0] = 0.0f; + unk[1] = (s8)(this->unk_158 * 240.0f); + unk[2] = (s8)(this->unk_158 * 255.0f); + + for (i = 0; i < 27; i++) { + if (D_809FFC50[i]) { + vertices[i].v.cn[3] = unk[D_809FFC50[i]]; + } + } + + OPEN_DISPS(gfxCtx, "../z_en_dy_extra.c", 294); + + func_80093D84(globalCtx->state.gfxCtx); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, + Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->state.frames * 2, 0, 0x20, 0x40, 1, + globalCtx->state.frames, globalCtx->state.frames * -8, 0x10, 0x10)); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_dy_extra.c", 307), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0x80, primColors[this->type].r, primColors[this->type].g, + primColors[this->type].b, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b, + 128); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0601C160); + + CLOSE_DISPS(gfxCtx, "../z_en_dy_extra.c", 325); +} diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h index cb1662f0d9..b07de73e88 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h @@ -6,9 +6,17 @@ struct EnDyExtra; +typedef void (*EnDyExtraActionFunc)(struct EnDyExtra*, GlobalContext*); + typedef struct EnDyExtra { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x28]; + /* 0x014C */ EnDyExtraActionFunc actionFunc; + /* 0x0150 */ s16 type; + /* 0x0152 */ s16 unk_152; + /* 0x0154 */ s16 unk_154; + /* 0x0158 */ f32 unk_158; + /* 0x015C */ Vec3f unk_15C; + /* 0x0168 */ Vec3f unk_168; } EnDyExtra; // size = 0x0174 extern const ActorInit En_Dy_Extra_InitVars; diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index eb94403223..c1a0d55773 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -1,4 +1,6 @@ #include "z_en_ex_ruppy.h" +#include "vt.h" +#include "../ovl_En_Diving_Game/z_en_diving_game.h" #define FLAGS 0x00000010 @@ -9,7 +11,23 @@ void EnExRuppy_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx); void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void EnExRuppy_DropIntoWater(EnExRuppy* this, GlobalContext* globalCtx); +void EnExRuppy_WaitToBlowUp(EnExRuppy* this, GlobalContext* globalCtx); +void EnExRuppy_WaitAsCollectible(EnExRuppy* this, GlobalContext* globalCtx); +void func_80A0B0F4(EnExRuppy* this, GlobalContext* globalCtx); +void EnExRuppy_EnterWater(EnExRuppy* this, GlobalContext* globalCtx); +void EnExRuppy_Sink(EnExRuppy* this, GlobalContext* globalCtx); +void func_80A0AD88(EnExRuppy* this, GlobalContext* globalCtx); +void func_80A0AEE0(EnExRuppy* this, GlobalContext* globalCtx); + +static s16 sEnExRuppyCollectibleTypes[] = { + ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_ORANGE, ITEM00_RUPEE_PURPLE, +}; + +static s16 D_80A0B32B[] = { + 1, 5, 20, 500, 50, +}; + const ActorInit En_Ex_Ruppy_InitVars = { ACTOR_EN_EX_RUPPY, ACTORTYPE_PROP, @@ -21,29 +39,348 @@ const ActorInit En_Ex_Ruppy_InitVars = { (ActorFunc)EnExRuppy_Update, (ActorFunc)EnExRuppy_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Destroy.s") +static Vec3f D_80A0B358[] = { { 0.0f, 0.1f, 0.0f }, { 0.0f, 0.0f, 0.0f } }; +static Vec3f D_80A0B370[] = { { 0.0f, 0.01f, 0.0f }, { 0.0f, 0.0f, 0.0f } }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0A820.s") +void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) { + EnExRuppy* this = THIS; + EnDivingGame* divingGame; + f32 temp1; + f32 temp2; + s16 temp3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AA3C.s") + this->unk_152 = this->actor.params; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AB1C.s") + osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n" VT_RST, this->unk_152); // "Index" + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 25.0f); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AC88.s") + switch (this->unk_152) { + case 0: + this->unk_160 = 0.01f; + Actor_SetScale(&this->actor, this->unk_160); + this->actor.room = -1; + this->actor.gravity = 0.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AD88.s") + // If you haven't won the diving game before, you will always get 5 rupees + if (!(gSaveContext.eventChkInf[3] & 0x100)) { + this->rupeeValue = 5; + this->unk_150 = 1; + } else { + temp1 = 200.99f; + if (this->actor.parent != NULL) { + divingGame = (EnDivingGame*)this->actor.parent; + if (divingGame->actor.update != NULL) { + temp2 = divingGame->unk_2AA * 10.0f; + temp1 += temp2; + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AEE0.s") + temp3 = Math_Rand_ZeroFloat(temp1); + if ((temp3 >= 0) && (temp3 < 40)) { + this->rupeeValue = 1; + this->unk_150 = 0; + } else if ((temp3 >= 40) && (temp3 < 170)) { + this->rupeeValue = 5; + this->unk_150 = 1; + } else if ((temp3 >= 170) && (temp3 < 190)) { + this->rupeeValue = 20; + this->unk_150 = 2; + } else if ((temp3 >= 190) && (temp3 < 200)) { + this->rupeeValue = 50; + this->unk_150 = 4; + } else { + this->unk_160 = 0.02f; + Actor_SetScale(&this->actor, this->unk_160); + this->rupeeValue = 500; + this->unk_150 = 3; + if (this->actor.parent != NULL) { + divingGame = (EnDivingGame*)this->actor.parent; + if (divingGame->actor.update != NULL) { + divingGame->unk_2AA = 0; + } + } + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0AF24.s") + this->actor.shape.unk_10 = 7.0f; + this->actor.shape.unk_08 = 700.0f; + this->unk_15A = this->actor.posRot.rot.z; + this->actor.posRot.rot.z = 0; + this->timer = 30; + this->actor.flags &= ~1; + this->actionFunc = EnExRuppy_DropIntoWater; + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B070.s") + case 1: + case 2: // Giant pink ruppe that explodes when you touch it + if (this->unk_152 == 1) { + Actor_SetScale(&this->actor, 0.1f); + this->unk_150 = 4; + } else { + Actor_SetScale(thisx, 0.02f); + this->unk_150 = (s16)Math_Rand_ZeroFloat(3.99f) + 1; + } + this->actor.gravity = -3.0f; + osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ わーなーコイン ☆☆☆☆☆ \n" VT_RST); // "Wow Coin" + this->actor.shape.unk_10 = 6.0f; + this->actor.shape.unk_08 = 700.0f; + this->actor.flags &= ~1; + this->actionFunc = EnExRuppy_WaitToBlowUp; + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/func_80A0B0F4.s") + case 3: // Spawned by the guard in Hyrule courtyard + Actor_SetScale(&this->actor, 0.02f); + this->unk_150 = 0; + switch ((s16)Math_Rand_ZeroFloat(30.99f)) { + case 0: + this->unk_150 = 2; + break; + case 10: + case 20: + case 30: + this->unk_150 = 1; + break; + } + this->actor.gravity = -3.0f; + osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ ノーマルルピー ☆☆☆☆☆ \n" VT_RST); // "Normal rupee" + this->actor.shape.unk_10 = 6.0f; + this->actor.shape.unk_08 = 700.0f; + this->actor.flags &= ~1; + this->actionFunc = EnExRuppy_WaitAsCollectible; + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Update.s") + case 4: + this->actor.gravity = -3.0f; + this->actor.flags &= ~1; + Actor_SetScale(&this->actor, 0.01f); + this->actor.shape.unk_10 = 6.0f; + this->actor.shape.unk_08 = -700.0f; + this->actionFunc = func_80A0B0F4; + break; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ex_Ruppy/EnExRuppy_Draw.s") +void EnExRuppy_Destroy(Actor* thisx, GlobalContext* globalCtx) { +} + +void EnExRuppy_SpawnSparkles(EnExRuppy* this, GlobalContext* globalCtx, s16 arg2, s32 arg3) { + Vec3f sparklePos; + Vec3f sparkleVelocity; + Vec3f sparkleAccel; + Color_RGBA8_n primColor; + Color_RGBA8_n envColor; + s32 i; + s16 sparkleScale; + s16 sparkleLife; + + if (arg2 <= 0) { + arg2 = 1; + } + primColor.r = 255; + primColor.g = 255; + primColor.b = 0; + envColor.r = 255; + envColor.g = 255; + envColor.b = 255; + sparkleVelocity = D_80A0B358[arg3]; + sparkleAccel = D_80A0B370[arg3]; + sparkleScale = 3000; + sparkleLife = 16; + for (i = 0; i < arg2; i++) { + if (arg3 == 1) { + sparkleAccel.x = Math_Rand_CenteredFloat(20.0f); + sparkleAccel.z = Math_Rand_CenteredFloat(20.0f); + sparkleScale = 5000; + sparkleLife = 20; + } + sparklePos.x = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.x; + sparklePos.y = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + (this->actor.posRot.pos.y + this->unk_160 * 600.0f); + sparklePos.z = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.z; + func_80028BB0(globalCtx, &sparklePos, &sparkleVelocity, &sparkleAccel, &primColor, &envColor, sparkleScale, + sparkleLife); + } +} + +void EnExRuppy_DropIntoWater(EnExRuppy* this, GlobalContext* globalCtx) { + this->actor.shape.rot.y = (this->actor.shape.rot.y + 1960); + Math_SmoothScaleMaxF(&this->actor.gravity, -2.0f, 0.3f, 1.0f); + EnExRuppy_SpawnSparkles(this, globalCtx, 2, 0); + func_80078884(NA_SE_EV_RAINBOW_SHOWER - SFX_FLAG); + if ((this->actor.parent != NULL) && (this->actor.parent->update != NULL) && + (((((EnDivingGame*)this->actor.parent)->unk_296 == 0) || (this->actor.bgCheckFlags & 0x20)) || + (this->timer == 0))) { + this->isFalling = 1; + this->actor.speedXZ = 0.0f; + this->actor.velocity.z = 0.0f; + this->actor.velocity.y = 0.0f; + this->actor.velocity.x = 0.0f; + this->actor.gravity = 0.0f; + func_80078914(&this->actor.projectedPos, NA_SE_EV_BOMB_DROP_WATER); + this->actionFunc = EnExRuppy_EnterWater; + } +} + +void EnExRuppy_EnterWater(EnExRuppy* this, GlobalContext* globalCtx) { + s32 pad; + f32 temp_f2; + + if (((this->actor.parent != NULL) && (this->actor.parent->update != NULL)) && + (((EnDivingGame*)this->actor.parent)->unk_2A2 == 2)) { + this->isFalling = 0; + this->actor.posRot.pos.x = ((Math_Rand_ZeroOne() - 0.5f) * 300.0f) + -260.0f; + this->actor.posRot.pos.y = ((Math_Rand_ZeroOne() - 0.5f) * 200.0f) + 370.0f; + temp_f2 = this->unk_15A * -50.0f; + if (!(gSaveContext.eventChkInf[3] & 0x100)) { + temp_f2 += -500.0f; + this->actor.posRot.pos.z = ((Math_Rand_ZeroOne() - 0.5f) * 80.0f) + temp_f2; + } else { + temp_f2 += -300.0f; + this->actor.posRot.pos.z = ((Math_Rand_ZeroOne() - 0.5f) * 60.0f) + temp_f2; + } + this->actionFunc = EnExRuppy_Sink; + this->actor.gravity = -1.0f; + } +} + +void EnExRuppy_Sink(EnExRuppy* this, GlobalContext* globalCtx) { + s32 pad; + Vec3f pos; + + if ((this->actor.bgCheckFlags & 0x20) && (15.0f < this->actor.waterY)) { + pos = this->actor.posRot.pos; + pos.y += this->actor.waterY; + this->actor.velocity.y = -1.0f; + this->actor.gravity = -0.2f; + func_8002949C(globalCtx, &pos, 0, 0, 0, 800); + func_80078914(&this->actor.projectedPos, NA_SE_EV_BOMB_DROP_WATER); + this->actionFunc = func_80A0AD88; + } + if (((this->actor.parent != NULL) && (this->actor.parent->update != NULL) && + ((EnDivingGame*)this->actor.parent)->unk_29C == 0)) { + this->timer = 20; + this->actionFunc = func_80A0AEE0; + } +} + +void func_80A0AD88(EnExRuppy* this, GlobalContext* globalCtx) { + EnDivingGame* divingGame; + Vec3f D_80A0B388 = { 0.0f, 0.1f, 0.0f }; + Vec3f D_80A0B394 = { 0.0f, 0.0f, 0.0f }; + f32 localConst = 30.0f; + + if (this->timer == 0) { + this->timer = 10; + func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 5.0f, 5.0f, Math_Rand_ZeroFloat(0.03f) + 0.07f); + } + if (this->actor.parent != NULL) { + divingGame = (EnDivingGame*)this->actor.parent; + if (divingGame->actor.update != NULL) { + if (divingGame->unk_29C == 0) { + this->timer = 20; + this->actionFunc = func_80A0AEE0; + return; + } + if (this->actor.xyzDistFromLinkSq < SQ(localConst)) { + Rupees_ChangeBy(this->rupeeValue); + func_80078884(NA_SE_SY_GET_RUPY); + divingGame->unk_2A4++; + Actor_Kill(&this->actor); + } + } else { + Actor_Kill(&this->actor); + } + } +} + +void func_80A0AEE0(EnExRuppy* this, GlobalContext* globalCtx) { + this->isFalling += 1; + this->isFalling &= 1; + if (this->timer == 0) { + Actor_Kill(&this->actor); + } +} + +void EnExRuppy_WaitToBlowUp(EnExRuppy* this, GlobalContext* globalCtx) { + f32 distToBlowUp; + Vec3f point1Vec = { 0.0f, 0.1f, 0.0f }; + Vec3f zeroVector = { 0.0f, 0.0f, 0.0f }; + s16 explosionScale; + s16 explosionScaleStep; + distToBlowUp = 50.0f; + if (this->unk_152 == 2) { + distToBlowUp = 30.0f; + } + if (this->actor.xyzDistFromLinkSq < SQ(distToBlowUp)) { + if (this->actor.parent != NULL) { + if (this->actor.parent->update != NULL) { + ((EnDivingGame*)this->actor.parent)->transitionDrawTable[15].z = 1; + } + } else { + // "That idiot! error" + osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ そ、そんなばかな!エラー!!!!! ☆☆☆☆☆ \n" VT_RST); + } + + osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ バカめ! ☆☆☆☆☆ \n" VT_RST); // "Stupid!" + explosionScale = 100; + explosionScaleStep = 30; + if (this->unk_152 == 2) { + explosionScale = 20; + explosionScaleStep = 6; + } + EffectSsBomb2_SpawnLayered(globalCtx, &this->actor.posRot.pos, &zeroVector, &point1Vec, explosionScale, + explosionScaleStep); + func_8002F71C(globalCtx, &this->actor, 2.0f, this->actor.yawTowardsLink, 0.0f); + Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION); + Actor_Kill(&this->actor); + } +} + +void EnExRuppy_WaitAsCollectible(EnExRuppy* this, GlobalContext* globalCtx) { + f32 localConst = 30.0f; + if (this->actor.xyzDistFromLinkSq < SQ(localConst)) { + func_80078884(NA_SE_SY_GET_RUPY); + Item_DropCollectible(globalCtx, &this->actor.posRot.pos, (sEnExRuppyCollectibleTypes[this->unk_150] | 0x8000)); + Actor_Kill(&this->actor); + } +} + +void func_80A0B0F4(EnExRuppy* this, GlobalContext* globalCtx) { + if (this->unk_15C != 0) { + Math_SmoothScaleMaxF(&this->actor.shape.unk_08, 700.0f, 0.5f, 200.0f); + } else { + Math_SmoothScaleMaxF(&this->actor.shape.unk_08, -700.0f, 0.5f, 200.0f); + } +} + +void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx) { + EnExRuppy* this = THIS; + + this->actor.shape.rot.y += 1960; + this->actionFunc(this, globalCtx); + if (this->timer != 0) { + this->timer--; + } + Actor_MoveForward(&this->actor); + func_8002E4B4(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C); +} + +UNK_PTR D_80A0B3B8[] = { 0x04042140, 0x04042160, 0x04042180, 0x040421C0, 0x040421A0 }; + +void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) { + EnExRuppy* this = THIS; + s32 pad; + + if (this->isFalling == 0) { + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 774); + + func_80093D18(globalCtx->state.gfxCtx); + func_8002EBCC(thisx, globalCtx, 0); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A0B3B8[this->unk_150])); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_04042440); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 784); + } +} diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h index 3924ddfcf7..74c8170b55 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h @@ -6,9 +6,19 @@ struct EnExRuppy; +typedef void (*EnExRuppyActionFunc)(struct EnExRuppy*, GlobalContext*); + typedef struct EnExRuppy { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x18]; + /* 0x014C */ EnExRuppyActionFunc actionFunc; + /* 0x0150 */ s16 unk_150; + /* 0x0152 */ s16 unk_152; + /* 0x0154 */ s16 isFalling; + /* 0x0156 */ s16 timer; + /* 0x0158 */ s16 rupeeValue; + /* 0x015A */ s16 unk_15A; + /* 0x015C */ s16 unk_15C; + /* 0x0160 */ f32 unk_160; } EnExRuppy; // size = 0x0164 extern const ActorInit En_Ex_Ruppy_InitVars; diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index 850b63c72c..ca087cd740 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -188,9 +188,9 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) { this->unk_150.x = 0x25; this->actor.posRot.pos.y -= 200.0f; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, - this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 500, - 0, 0, 0x24); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, + this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 500, 0, + 0, 0x24); tmpVec = D_80A117BC; @@ -216,15 +216,15 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) { randY = (Math_Rand_ZeroOne() < 0.5f) ? 0x1000 : 0; for (i = 0; i < 8; i++) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, - this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, - (i * 8192) + randY, 0x4000, i + 0x64); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, + this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, + (i * 8192) + randY, 0x4000, i + 0x64); } for (i = 0; i < 8; i++) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, - this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, - (i * 8192) + randY, 0, 0x23); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, + this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, + (i * 8192) + randY, 0, 0x23); } } @@ -374,7 +374,7 @@ void func_80A10008(EnFhgFire* this, GlobalContext* globalCtx) { Vec3f sp54; osSyncPrintf("yari hikari 1\n"); - horse = (EnfHG*)this->actor.attachedA; + horse = (EnfHG*)this->actor.parent; if ((this->unk_156 % 2) != 0) { Actor_SetScale(&this->actor, 6.0f); } else { @@ -408,7 +408,7 @@ void func_80A10008(EnFhgFire* this, GlobalContext* globalCtx) { #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s") void func_80A10F18(EnFhgFire* this, GlobalContext* globalCtx) { - EnfHG* horse = (EnfHG*)this->actor.attachedA; + EnfHG* horse = (EnfHG*)this->actor.parent; f32 phi_f0; s32 tmp; @@ -465,58 +465,56 @@ void EnFhgFire_Update(Actor* thisx, GlobalContext* globalCtx) { void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { EnFhgFire* this = THIS; s32 pad; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1723); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1723); if (thisx->params == 0x24) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 165, 255, 75, 0); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1745), + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 165, 255, 75, 0); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1745), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_0600FCF8)); + gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_0600FCF8)); } else if ((thisx->params == 0x26) || (thisx->params == 0x32)) { osSyncPrintf("yari hikari draw 1\n"); func_800D1FD4(&globalCtx->mf_11DA0); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); if (this->fireMode > 0) { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 255, 255, 0); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 255, 0); } else { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 165, 255, 75, 0); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 165, 255, 75, 0); } - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); Matrix_RotateZ((thisx->shape.rot.z / 32768.0f) * 3.1416f, 1); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1801), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1801), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06012160); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06012160); } else if ((thisx->params == 0x27) || (thisx->params == 0x28) || (thisx->params == 0x29)) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, (u8)this->unk_188); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 90, 50, 95, (s8)(this->unk_188 * 0.5f)); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1833), + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, (u8)this->unk_188); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 90, 50, 95, (s8)(this->unk_188 * 0.5f)); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1833), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (s16)this->unk_174, (s16)this->unk_178, 0x40, 0x40, 1, (s16)this->unk_17C, (s16)this->unk_180, 0x40, 0x40)); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0600FAA0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600FAA0); } else { osSyncPrintf("FF DRAW 1\n"); Matrix_Translate(0.0f, -100.0f, 0.0f, 1); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 255, 30, 0); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1892), + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s8)this->unk_160); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 255, 30, 0); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1892), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_060105E0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060105E0); osSyncPrintf("FF DRAW 2\n"); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1900); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1900); } diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 21ead1029d..39e93759ea 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -93,7 +93,7 @@ extern AnimationHeader D_06009244; void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) { EnFloormas* this = THIS; - GlobalContext* gctx = globalCtx; + GlobalContext* globalCtx2 = globalCtx; s32 invisble; s32 pad; @@ -120,28 +120,28 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = EnFloormas_SmWait; } else { // spawn first small floormaster - this->actor.attachedA = - Actor_Spawn(&gctx->actorCtx, gctx, ACTOR_EN_FLOORMAS, this->actor.posRot.pos.x, this->actor.posRot.pos.y, - this->actor.posRot.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); - if (this->actor.attachedA == NULL) { + this->actor.parent = + Actor_Spawn(&globalCtx2->actorCtx, globalCtx2, ACTOR_EN_FLOORMAS, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); + if (this->actor.parent == NULL) { Actor_Kill(&this->actor); return; } // spawn 2nd small floormaster - this->actor.attachedB = - Actor_Spawn(&gctx->actorCtx, gctx, ACTOR_EN_FLOORMAS, this->actor.posRot.pos.x, this->actor.posRot.pos.y, - this->actor.posRot.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); - if (this->actor.attachedB == NULL) { - Actor_Kill(this->actor.attachedA); + this->actor.child = + Actor_Spawn(&globalCtx2->actorCtx, globalCtx2, ACTOR_EN_FLOORMAS, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, invisble + SPAWN_SMALL); + if (this->actor.child == NULL) { + Actor_Kill(this->actor.parent); Actor_Kill(&this->actor); return; } // link floormasters together - this->actor.attachedA->attachedB = &this->actor; - this->actor.attachedA->attachedA = this->actor.attachedB; - this->actor.attachedB->attachedA = &this->actor; - this->actor.attachedB->attachedB = this->actor.attachedA; + this->actor.parent->child = &this->actor; + this->actor.parent->parent = this->actor.child; + this->actor.child->parent = &this->actor; + this->actor.child->child = this->actor.parent; EnFloormas_SetupBigDecideAction(this); } } @@ -256,8 +256,8 @@ void EnFloormas_SetupSplit(EnFloormas* this) { } else { this->actor.draw = EnFloormas_Draw; } - this->actor.shape.rot.y = this->actor.attachedA->shape.rot.y + 0x5555; - this->actor.posRot.pos = this->actor.attachedA->posRot.pos; + this->actor.shape.rot.y = this->actor.parent->shape.rot.y + 0x5555; + this->actor.posRot.pos = this->actor.parent->posRot.pos; this->actor.params = 0x10; SkelAnime_ChangeAnim(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, SkelAnime_GetFrameCount(&D_060019CC), 2, 0.0f); this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f; @@ -342,13 +342,13 @@ void EnFloormas_SetupMerge(EnFloormas* this) { } void EnFloormas_SetupSmWait(EnFloormas* this) { - EnFloormas* attachedA = (EnFloormas*)this->actor.attachedA; - EnFloormas* attachedB = (EnFloormas*)this->actor.attachedB; + EnFloormas* parent = (EnFloormas*)this->actor.parent; + EnFloormas* child = (EnFloormas*)this->actor.child; // if this is the last remaining small floor master, kill all. - if ((attachedA->actionFunc == EnFloormas_SmWait) && (attachedB->actionFunc == EnFloormas_SmWait)) { - Actor_Kill(&attachedA->actor); - Actor_Kill(&attachedB->actor); + if ((parent->actionFunc == EnFloormas_SmWait) && (child->actionFunc == EnFloormas_SmWait)) { + Actor_Kill(&parent->actor); + Actor_Kill(&child->actor); Actor_Kill(&this->actor); return; } @@ -398,8 +398,8 @@ void EnFloormas_Die(EnFloormas* this, GlobalContext* globalCtx) { if (this->actor.scale.x > 0.004f) { // split this->actor.shape.rot.y = this->actor.yawTowardsLink + 0x8000; - EnFloormas_SetupSplit((EnFloormas*)this->actor.attachedB); - EnFloormas_SetupSplit((EnFloormas*)this->actor.attachedA); + EnFloormas_SetupSplit((EnFloormas*)this->actor.child); + EnFloormas_SetupSplit((EnFloormas*)this->actor.parent); EnFloormas_SetupSplit(this); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SPLIT); } else { @@ -678,10 +678,10 @@ void EnFloormas_SmDecideAction(EnFloormas* this, GlobalContext* globalCtx) { } if (this->actor.params == MERGE_SLAVE) { - if (this->actor.attachedA->params == MERGE_MASTER) { - primaryFloormas = this->actor.attachedA; - } else if (this->actor.attachedB->params == MERGE_MASTER) { - primaryFloormas = this->actor.attachedB; + if (this->actor.parent->params == MERGE_MASTER) { + primaryFloormas = this->actor.parent; + } else if (this->actor.child->params == MERGE_MASTER) { + primaryFloormas = this->actor.child; } else { this->actor.params = 0x10; return; @@ -730,8 +730,8 @@ void EnFloormas_JumpAtLink(EnFloormas* this, GlobalContext* globalCtx) { void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) { Player* player = PLAYER; - EnFloormas* attachedA; - EnFloormas* attachedB; + EnFloormas* parent; + EnFloormas* child; f32 yDelta; f32 xzDelta; @@ -761,14 +761,14 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) { // let go if (!(player->stateFlags2 & 0x80) || (player->invincibilityTimer < 0)) { - attachedA = this->actor.attachedA; - attachedB = this->actor.attachedB; + parent = this->actor.parent; + child = this->actor.child; - if (((attachedA->actionFunc == EnFloormas_GrabLink) || attachedA->actionFunc == EnFloormas_SmWait) && - (attachedB->actionFunc == EnFloormas_GrabLink || attachedB->actionFunc == EnFloormas_SmWait)) { + if (((parent->actionFunc == EnFloormas_GrabLink) || parent->actionFunc == EnFloormas_SmWait) && + (child->actionFunc == EnFloormas_GrabLink || child->actionFunc == EnFloormas_SmWait)) { - attachedA->actor.params = MERGE_SLAVE; - attachedB->actor.params = MERGE_SLAVE; + parent->actor.params = MERGE_SLAVE; + child->actor.params = MERGE_SLAVE; this->actor.params = MERGE_MASTER; } @@ -796,10 +796,10 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, GlobalContext* globalCtx) Actor* primFloormas; SkelAnime_FrameUpdateMatrix(&this->skelAnime); - if (this->actor.attachedA->params == MERGE_MASTER) { - primFloormas = this->actor.attachedA; - } else if (this->actor.attachedB->params == MERGE_MASTER) { - primFloormas = this->actor.attachedB; + if (this->actor.parent->params == MERGE_MASTER) { + primFloormas = this->actor.parent; + } else if (this->actor.child->params == MERGE_MASTER) { + primFloormas = this->actor.child; } else { if (this->actor.bgCheckFlags & 2) { this->actor.params = 0x10; @@ -830,8 +830,8 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, GlobalContext* globalCtx) } void EnFloormas_Merge(EnFloormas* this, GlobalContext* globalCtx) { - EnFloormas* attachedA; - EnFloormas* attachedB; + EnFloormas* parent; + EnFloormas* child; s32 mergeCnt; f32 prevScale; f32 curScale; @@ -840,23 +840,23 @@ void EnFloormas_Merge(EnFloormas* this, GlobalContext* globalCtx) { DECR(this->smActionTimer); - attachedA = this->actor.attachedA; - attachedB = this->actor.attachedB; + parent = this->actor.parent; + child = this->actor.child; if (this->smActionTimer == 0) { - if (attachedA->actionFunc != EnFloormas_SmWait) { - EnFloormas_SetupSmShrink(attachedA, globalCtx); + if (parent->actionFunc != EnFloormas_SmWait) { + EnFloormas_SetupSmShrink(parent, globalCtx); } - if (attachedB->actionFunc != EnFloormas_SmWait) { - EnFloormas_SetupSmShrink(attachedB, globalCtx); + if (child->actionFunc != EnFloormas_SmWait) { + EnFloormas_SetupSmShrink(child, globalCtx); } } else { - if ((attachedA->actionFunc != EnFloormas_SmWait) && (attachedA->actionFunc != EnFloormas_SmShrink)) { + if ((parent->actionFunc != EnFloormas_SmWait) && (parent->actionFunc != EnFloormas_SmShrink)) { mergeCnt++; } - if ((attachedB->actionFunc != EnFloormas_SmWait) && (attachedB->actionFunc != EnFloormas_SmShrink)) { + if ((child->actionFunc != EnFloormas_SmWait) && (child->actionFunc != EnFloormas_SmShrink)) { mergeCnt++; } } @@ -1075,40 +1075,39 @@ static Color_RGBA8 sMergeColor = { 0x00, 0xFF, 0x00, 0x00 }; void EnFloormas_Draw(Actor* thisx, GlobalContext* globalCtx) { EnFloormas* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* gfx[4]; - s32 pad; - Graph_OpenDisps(gfx, globalCtx->state.gfxCtx, "../z_en_floormas.c", 2318); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2318); + func_80093D18(globalCtx->state.gfxCtx); if (this->collider.base.type == COLTYPE_UNK12) { func_80026230(globalCtx, &sMergeColor, this->actionTarget % 0x28, 0x28); } - gfxCtx->polyOpa.p = + oGfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, - EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, gfxCtx->polyOpa.p); + EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); if (this->collider.base.type == COLTYPE_UNK12) { func_80026608(globalCtx); } - Graph_CloseDisps(gfx, globalCtx->state.gfxCtx, "../z_en_floormas.c", 2340); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2340); } void EnFloormas_DrawHighlighted(Actor* thisx, GlobalContext* globalCtx) { EnFloormas* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* gfx[4]; - Graph_OpenDisps(gfx, globalCtx->state.gfxCtx, "../z_en_floormas.c", 2352); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2352); + func_80093D84(globalCtx->state.gfxCtx); if (this->collider.base.type == COLTYPE_UNK12) { func_80026690(globalCtx, &sMergeColor, this->actionTarget % 0x28, 0x28); } - gfxCtx->polyXlu.p = + oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, - EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, gfxCtx->polyXlu.p); + EnFloormas_OverrideLimbDraw, EnFloormas_PostLimbDraw, &this->actor, oGfxCtx->polyXlu.p); if (this->collider.base.type == COLTYPE_UNK12) { func_80026A6C(globalCtx); } - Graph_CloseDisps(gfx, globalCtx->state.gfxCtx, "../z_en_floormas.c", 2374); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2374); } diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 0dc5b7e350..7eba25741c 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -298,15 +298,14 @@ void EnFu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnFu_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EnFu* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_fu.c", 773); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fu.c", 773); + func_800943C8(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression])); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression])); SkelAnime_DrawSV(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, this->skelanime.dListCount, EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_fu.c", 791); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_fu.c", 791); } diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index 9d9bc86c53..657ddb2f0b 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -43,7 +43,7 @@ void EnGanonOrgan_Update(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("ORGAN MOVE 1\n"); if (thisx->params == 1) { - dorf = (BossGanon*)thisx->attachedA; + dorf = (BossGanon*)thisx->parent; if (dorf->organFadeTimer == 0) { Actor_Kill(thisx); } @@ -93,28 +93,26 @@ Gfx* func_80A28148(GraphicsContext* gfxCtx, BossGanon* dorf) { } void EnGanonOrgan_Draw(Actor* thisx, GlobalContext* globalCtx) { - BossGanon* dorf; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + BossGanon* dorf = (BossGanon*)thisx->parent; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 205); - dorf = (BossGanon*)thisx->attachedA; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 205); osSyncPrintf("ORGAN DRAW 1\n"); func_80093D18(globalCtx->state.gfxCtx); if ((thisx->params == 1) && (dorf->organFadeTimer != 0xff)) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, func_80A280BC(globalCtx->state.gfxCtx, dorf)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, func_80A28148(globalCtx->state.gfxCtx, dorf)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A280BC(globalCtx->state.gfxCtx, dorf)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A28148(globalCtx->state.gfxCtx, dorf)); } else { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, EnGanonOrgan_EmptyDList(globalCtx->state.gfxCtx)); } Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_NEW); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 221), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 221), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_80A2CCA8); - gSPDisplayList(gfxCtx->polyOpa.p++, D_80A2EAB0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_80A2CCA8); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_80A2EAB0); osSyncPrintf("ORGAN DRAW 2\n"); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 230); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ganon_organ.c", 230); } diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 40b5037545..08c73c387e 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -524,12 +524,10 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { EnGs* this = THIS; s32 tmp; u32 frames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (!(this->unk_19E & 8)) { - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1046); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_gs.c", 1046); + frames = globalCtx->gameplayFrames; func_80093D18(globalCtx->state.gfxCtx); Matrix_Push(); @@ -543,19 +541,19 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(this->unk_1A0[1].z * 0.0000958738f, MTXMODE_APPLY); } - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000950); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000950); if (this->unk_19E & 4) { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b, + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b, this->flashColor.a); } else { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255); } - gSPDisplayList(gfxCtx->polyOpa.p++, D_060009D0); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000A60); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060009D0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000A60); Matrix_Pull(); if (this->unk_19E & 2) { @@ -563,15 +561,16 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Scale(0.05f, -0.05f, 1.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment( - gfxCtx->polyXlu.p++, 0x08, + oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80)); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 0); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0404D4E0); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0404D4E0); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1101); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_gs.c", 1101); } } diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index ca2004c83c..dcee678078 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -86,7 +86,7 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) { SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, NULL, this->limbDrawTable, this->transitionDrawTable, 16); - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment); SkelAnime_ChangeAnim(&this->skelAnime, &D_060042AC, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060042AC.genericHeader), 0, 0.0f); @@ -166,7 +166,7 @@ void func_80A505CC(Actor* thisx, GlobalContext* globalCtx) { func_80034F54(globalCtx, this->unk_2CC, this->unk_2EC, 16); - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment); SkelAnime_FrameUpdateMatrix(&this->skelAnime); Actor_SetHeight(&this->actor, 60.0f); @@ -189,9 +189,8 @@ s32 EnGuest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis Actor* thisx) { EnGuest* this = THIS; Vec3s sp3C; - Gfx* dispRefs[5]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_guest.c", 352); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 352); if (limbIndex == 15) { *dList = D_060059B0; @@ -213,24 +212,25 @@ s32 EnGuest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis rot->z += Math_Coss(this->unk_2EC[limbIndex]) * 200.0f; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_guest.c", 388); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 388); return 0; } void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) { EnGuest* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 404); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_guest.c", 404); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, func_80A50708(globalCtx->state.gfxCtx, 0xFF, 0xFF, 0xFF, 0xFF)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, func_80A50708(globalCtx->state.gfxCtx, 0xA0, 0x3C, 0xDC, 0xFF)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A50708(globalCtx->state.gfxCtx, 0xFF, 0xFF, 0xFF, 0xFF)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A50708(globalCtx->state.gfxCtx, 0xA0, 0x3C, 0xDC, 0xFF)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnGuest_OverrideLimbDraw, NULL, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_guest.c", 421); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 421); } diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 2f5db00f38..7b7668e01c 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -116,8 +116,8 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) { if (this->path == 3) { for (i = 0; i < ARRAY_COUNT(sRupeePositions); i++) { rupeePos = sRupeePositions[i]; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_EX_RUPPY, rupeePos.x, - rupeePos.y, rupeePos.z, 0, 0, 0, 3); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_EX_RUPPY, rupeePos.x, rupeePos.y, + rupeePos.z, 0, 0, 0, 3); } } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index c65c8cd875..738ba28273 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -289,7 +289,7 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) { if (ACTOR_BG_SPOT15_SAKU != actor->dyna.actor.id) { actor = (BgSpot15Saku*)(actor->dyna.actor.next); } else { - this->attachedGate = actor; + this->gate = actor; actor->unk_168 = 1; break; } @@ -325,7 +325,7 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) { SkelAnime_FrameUpdateMatrix(&this->skelAnime); func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C); - gate = (BgSpot15Saku*)this->attachedGate; + gate = (BgSpot15Saku*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) { Gameplay_ClearCamera(globalCtx, this->cameraId); Gameplay_ChangeCameraStatus(globalCtx, 0, 7); @@ -453,10 +453,10 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) { } if (this->unk_2EC <= frameCount) { while (gate != NULL) { - if (ACTOR_BG_GATE_SHUTTER != gate->dyna.actor.id) { + if (gate->dyna.actor.id != ACTOR_BG_GATE_SHUTTER) { gate = (BgGateShutter*)gate->dyna.actor.next; } else { - this->attachedGate = gate; + this->gate = gate; gate->openingState = 1; break; } @@ -496,7 +496,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) { SkelAnime_FrameUpdateMatrix(&this->skelAnime); func_800C04D8(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C); - gate = (BgGateShutter*)this->attachedGate; + gate = (BgGateShutter*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) { Gameplay_ClearCamera(globalCtx, this->cameraId); Gameplay_ChangeCameraStatus(globalCtx, 0, 7); @@ -619,7 +619,7 @@ void func_80A543A0(EnHeishi2* this, GlobalContext* globalCtx) { if (ACTOR_BG_GATE_SHUTTER != gate->dyna.actor.id) { gate = (BgGateShutter*)(gate->dyna.actor.next); } else { - this->attachedGate = gate; + this->gate = gate; if (this->unk_30A != 2) { gate->openingState = -1; break; @@ -830,28 +830,24 @@ void EnHeishi2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void func_80A54C6C(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1772); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1772); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1774), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1774), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06002C10); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1777); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06002C10); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1777); } void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi2* this; - GraphicsContext* gfxCtx; - s32 linkObjBankIndex; + EnHeishi2* this = THIS; Mtx* mtx; - Gfx* dispRefs[4]; + s32 linkObjBankIndex; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1792); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1792); func_80093D18(globalCtx->state.gfxCtx); - this = THIS; + SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnHeishi2_OverrideLimbDraw, EnHeishi2_PostLimbDraw, &this->actor); if ((this->initParams == 5) && (gSaveContext.infTable[7] & 0x80)) { @@ -862,11 +858,12 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateZ(DEGTORAD(70.0), MTXMODE_APPLY); mtx = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1820) - 7; - gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[linkObjBankIndex].segment); - gSPSegment(gfxCtx->polyOpa.p++, 0x0D, mtx); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_0602B060); - gSPSegment(gfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[linkObjBankIndex].segment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, mtx); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_0602B060); + gSPSegment(oGfxCtx->polyOpa.p++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); } } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1834); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1834); } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h index 6cdfc2e06c..fbb32cdc4f 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h @@ -43,7 +43,7 @@ typedef struct EnHeishi2 { /* 0x030D */ char unk_30D; /* 0x030E */ s16 unk_30E; /* 0x0310 */ s16 cameraId; - /* 0x0314 */ Actor* attachedGate; + /* 0x0314 */ Actor* gate; // first BgGateShutter that can be found in the actor list /* 0x0318 */ char unk_318[0x18]; /* 0x0330 */ MtxF mtxf_330; /* 0x0370 */ char unk_370[0x28]; diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 2cea6c8558..badb4460ce 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -98,8 +98,8 @@ void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx) { } } EnHintnuts_SetupWait(this); - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_HINTNUTS, this->actor.posRot.pos.x, - this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.posRot.rot.y, 0, 0xA); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_HINTNUTS, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.posRot.rot.y, 0, 0xA); } } @@ -443,8 +443,8 @@ void EnHintnuts_Leave(EnHintnuts* this, GlobalContext* globalCtx) { Flags_SetClear(globalCtx, this->actor.room); sPuzzleCounter = 3; } - if (this->actor.attachedB != NULL) { - Actor_ChangeType(globalCtx, &globalCtx->actorCtx, this->actor.attachedB, ACTORTYPE_PROP); + if (this->actor.child != NULL) { + Actor_ChangeType(globalCtx, &globalCtx->actorCtx, this->actor.child, ACTORTYPE_PROP); } Actor_Kill(&this->actor); } @@ -458,8 +458,8 @@ void EnHintnuts_Freeze(EnHintnuts* this, GlobalContext* globalCtx) { } if (this->animFlagAndTimer == 0) { if (sPuzzleCounter == 3) { - if (this->actor.attachedB != NULL) { - Actor_ChangeType(globalCtx, &globalCtx->actorCtx, this->actor.attachedB, ACTORTYPE_PROP); + if (this->actor.child != NULL) { + Actor_ChangeType(globalCtx, &globalCtx->actorCtx, this->actor.child, ACTORTYPE_PROP); } this->animFlagAndTimer = 1; } else if (sPuzzleCounter == -4) { diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index a6565eecd8..f23e916672 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -275,9 +275,9 @@ void func_80A7C5EC(EnInsect* this, GlobalContext* globalCtx) { (this->unk_31A < 4)) { Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos), 2000); - } else if (this->actor.attachedB != NULL && &this->actor != this->actor.attachedB) { + } else if (this->actor.child != NULL && &this->actor != this->actor.child) { Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, - Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.attachedB->posRot.pos), 2000); + Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.child->posRot.pos), 2000); } this->actor.shape.rot.y = this->actor.posRot.rot.y; @@ -713,10 +713,10 @@ void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx) { EnInsect* this = THIS; s32 phi_v0; - if (this->actor.attachedB != NULL) { - if (this->actor.attachedB->update == NULL) { - if (&this->actor != this->actor.attachedB) { - this->actor.attachedB = NULL; + if (this->actor.child != NULL) { + if (this->actor.child->update == NULL) { + if (&this->actor != this->actor.child) { + this->actor.child = NULL; } } } @@ -758,8 +758,8 @@ void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx) { func_8002E4B4(globalCtx, &this->actor, 8.0f, 5.0f, 0.0f, phi_v0); } - if (func_8002F410(&this->actor, globalCtx) != 0) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; phi_v0 = this->actor.params & 3; if (phi_v0 == 2 || phi_v0 == 3) { diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 25ebcdafbf..6d7585dbae 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -58,8 +58,8 @@ void EnJs_Init(Actor* thisx, GlobalContext* globalCtx) { En_Js_SetupAction(this, func_80A89304); this->unk_284 = 0; this->actor.gravity = -1.0f; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_JSJUTAN, this->actor.posRot.pos.x, - this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 0); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_JSJUTAN, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 0); } void EnJs_Destroy(Actor* thisx, GlobalContext* globalCtx) { @@ -115,8 +115,8 @@ void func_80A8910C(EnJs* this, GlobalContext* globalCtx) { } void func_80A89160(EnJs* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx)) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; En_Js_SetupAction(this, func_80A8910C); } else { func_8002F434(&this->actor, globalCtx, GI_BOMBCHUS_10, 10000.0f, 50.0f); diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 19b4d83dd0..93b8c81df0 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -318,9 +318,9 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) { if (LINK_IS_ADULT) { if (!(gSaveContext.infTable[19] & 0x100)) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BG_ICE_SHELTER, - this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, - 0x04FF); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BG_ICE_SHELTER, + this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, + 0x04FF); } this->actionFunc = EnKz_Wait; } else { @@ -409,8 +409,8 @@ void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) { f32 xzRange; f32 yRange; - if (func_8002F410(this, globalCtx)) { - this->actor.attachedA = NULL; + if (Actor_HasParent(this, globalCtx)) { + this->actor.parent = NULL; this->unk_1E0.unk_00 = 1; this->actionFunc = EnKz_StartTimer; } else { @@ -476,14 +476,13 @@ void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) { 0x06001C70, }; EnKz* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_kz.c", 1259); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeSegments[this->eyeIdx])); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_kz.c", 1259); + + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeSegments[this->eyeIdx])); func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawSV(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, this->skelanime.dListCount, EnKz_OverrideLimbDraw, EnKz_PostLimbDraw, &this->actor); - Graph_CloseDisps(&dispRefs, globalCtx->state.gfxCtx, "../z_en_kz.c", 1281); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_kz.c", 1281); } diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index c4055b0948..0de705e354 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -84,8 +84,8 @@ void EnLight_UpdatePosRot(EnLight* this, GlobalContext* globalCtx) { // update yaw for billboard effect this->actor.shape.rot.y = func_8005A9F4(ACTIVE_CAM) + 0x8000; - if (this->actor.attachedA != NULL) { - Math_Vec3f_Copy(&this->actor.posRot.pos, &(this->actor.attachedA)->posRot.pos); + if (this->actor.parent != NULL) { + Math_Vec3f_Copy(&this->actor.posRot.pos, &(this->actor.parent)->posRot.pos); this->actor.posRot.pos.y += 17.0f; } @@ -159,36 +159,33 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; FlameParams* flameParams; Gfx* dList; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (1) {} flameParams = &D_80A9E840[this->actor.params & 0xF]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_light.c", 441); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_light.c", 441); func_80093D84(globalCtx->state.gfxCtx); if (this->actor.params >= 0) { gSPSegment( - gfxCtx->polyXlu.p++, 0x08, + oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, 32, 128)); dList = D_0404D4E0; - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, flameParams->primColor.b, flameParams->primColor.a); - gDPSetEnvColor(gfxCtx->polyXlu.p++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, + gDPSetEnvColor(oGfxCtx->polyXlu.p++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, 0); } else { - gSPSegment(gfxCtx->polyXlu.p++, 0x08, + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63), (this->timer * -6) & 127 * 1, 16, 32)); dList = D_05000440; - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0xC0, 0xC0, 255, 200, 0, 0); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 0); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0xC0, 0xC0, 255, 200, 0, 0); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 0, 0, 0); } Matrix_RotateY((s16)((func_8005A9F4(ACTIVE_CAM) - this->actor.shape.rot.y) + 0x8000) * (M_PI / 32768.0f), @@ -199,9 +196,9 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) { } Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_light.c", 488), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_light.c", 488), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, dList); + gSPDisplayList(oGfxCtx->polyXlu.p++, dList); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_light.c", 491); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_light.c", 491); } diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index 1dfcdfe6e3..ed170c4180 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -73,11 +73,11 @@ void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx) { EnLightbox* this = THIS; if (this->dyna.unk_162 != 0) { - if (func_8002F5A0(thisx, globalCtx)) { + if (Actor_HasNoParent(thisx, globalCtx)) { this->dyna.unk_162 = 0; } } else { - if (func_8002F410(thisx, globalCtx)) { + if (Actor_HasParent(thisx, globalCtx)) { this->dyna.unk_162++; } else { if (thisx->speedXZ) { diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 134567adc3..e70c062146 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -303,8 +303,8 @@ void func_80AA0D88(EnMa1* this, GlobalContext* globalCtx) { } void func_80AA0EA0(EnMa1* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx)) { - this->actor.attachedA = NULL; + if (Actor_HasParent(&this->actor, globalCtx)) { + this->actor.parent = NULL; this->actionFunc = func_80AA0EFC; } else { func_8002F434(&this->actor, globalCtx, GI_WEIRD_EGG, 120.0f, 10.0f); @@ -432,19 +432,20 @@ void EnMa1_Draw(Actor* thisx, GlobalContext* globalCtx) { EnMa1* this = THIS; Camera* camera; f32 someFloat; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma1.c", 1226); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma1.c", 1226); camera = ACTIVE_CAM; someFloat = Math_Vec3f_DistXZ(&this->actor.posRot.pos, &camera->eye); func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA16C4[this->unk_1E6])); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA16D0[this->unk_1E4])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA16C4[this->unk_1E6])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA16D0[this->unk_1E4])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa1_OverrideLimbDraw, EnMa1_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma1.c", 1261); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma1.c", 1261); } diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 3e76df129c..134eff97c4 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -351,38 +351,37 @@ s32 EnMa2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnMa2* this = THIS; Vec3f vec = D_80AA28A8; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma2.c", 904); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 904); if (limbIndex == 18) { Matrix_MultVec3f(&vec, &this->actor.posRot2.pos); } if ((limbIndex == 14) && (this->skelAnime.animCurrentSeg == &D_060093BC)) { - gSPDisplayList(gfxCtx->polyOpa.p++, D_06005420); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06005420); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma2.c", 927); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 927); } void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) { EnMa2* this = THIS; Camera* camera; f32 someFloat; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 955); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma2.c", 955); camera = ACTIVE_CAM; someFloat = Math_Vec3f_DistXZ(&this->actor.posRot.pos, &camera->eye); func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA28B4[this->unk_210])); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA28C0[this->unk_20E])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA28B4[this->unk_210])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA28C0[this->unk_20E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa2_OverrideLimbDraw, EnMa2_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma2.c", 990); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 990); } diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index cbec2f1f46..2b9998f894 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -331,38 +331,37 @@ s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnMa3* this = THIS; Vec3f vec = D_80AA3898; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma3.c", 927); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927); if (limbIndex == 18) { Matrix_MultVec3f(&vec, &thisx->posRot2.pos); } if ((limbIndex == 14) && (this->skelAnime.animCurrentSeg == &D_060093BC)) { - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06005420); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06005420); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma3.c", 950); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 950); } void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) { EnMa3* this = THIS; Camera* camera; f32 someFloat; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 978); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma3.c", 978); camera = globalCtx->cameraPtrs[globalCtx->activeCamera]; someFloat = Math_Vec3f_DistXZ(&this->actor.posRot.pos, &camera->eye); func_800F6268(someFloat, 0x2F); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA38A4[this->unk_210])); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA38B0[this->unk_20E])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA38A4[this->unk_210])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA38B0[this->unk_20E])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ma3.c", 1013); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 1013); } diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index fbe67d63a1..7c87510274 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -601,8 +601,8 @@ void EnMd_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, 0.01f); this->actor.unk_1F = 6; this->alpha = 255; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, this->actor.posRot.pos.x, - this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 3); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, this->actor.posRot.pos.x, + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 3); if (((globalCtx->sceneNum == SCENE_SPOT04) && !(gSaveContext.eventChkInf[0] & 0x10)) || ((globalCtx->sceneNum == SCENE_SPOT04) && (gSaveContext.eventChkInf[0] & 0x10) && @@ -807,18 +807,16 @@ void EnMd_Draw(Actor* thisx, GlobalContext* globalCtx) { 0x06005D30, }; EnMd* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_md.c", 1280); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_md.c", 1280); + if (this->alpha == 255) { - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); func_80034BA0(globalCtx, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha); } else if (this->alpha != 0) { - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); func_80034CC4(globalCtx, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_md.c", 1317); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_md.c", 1317); } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 60a3038052..494eac4e8d 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -142,9 +142,9 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) { } void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { // if attached is set + if (Actor_HasParent(&this->actor, globalCtx)) { Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]); - this->actor.attachedA = NULL; + this->actor.parent = NULL; this->actionFunc = EnMs_TalkAfterPurchase; return; } diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 3d1abb4efc..26e9118b0d 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -68,7 +68,7 @@ void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx) { vec1.x = vec1.y = 0.0f; vec1.z = 50.0; Matrix_MultVec3f(&vec1, &vec2); - this->chasedEnNiw = (EnNiw*)Actor_SpawnAttached( + this->chasedEnNiw = (EnNiw*)Actor_SpawnAsChild( &globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_NIW, this->actor.posRot.pos.x + vec2.x, this->actor.posRot.pos.y + vec2.y, this->actor.posRot.pos.z + vec2.z, 0, this->actor.posRot.rot.y, 0, 0xA); if (this->chasedEnNiw != NULL) { @@ -240,14 +240,14 @@ void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) { EnNiwGirl* this = THIS; s32 pad; Vec3f sp4C = sConstVec3f; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 573); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 573); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AB99D8[this->unk_272])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AB99D8[this->unk_272])); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnNiwGirlOverrideLimbDraw, 0, &this->actor); func_80033C30(&this->actor.posRot.pos, &sp4C, 255, globalCtx); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 592); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 592); } diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index d79c303035..1100e2f41e 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -139,17 +139,16 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnNutsball_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_nutsball.c", 327); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 327); func_80093D18(globalCtx->state.gfxCtx); Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY); Matrix_RotateZ(thisx->initPosRot.rot.z * 9.58738e-05f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333), G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, sDLists[thisx->params]); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[thisx->params]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_nutsball.c", 337); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 337); } diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index ebe12c074e..ba13ce69f8 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -1028,8 +1028,8 @@ void func_80AECCB0(EnRu1* this, GlobalContext* globalCtx) { spawnX = ((kREG(1) + 12.0f) * Math_Sins(yawTowardsLink)) + pos->x; spawnY = pos->y; spawnZ = ((kREG(1) + 12.0f) * Math_Coss(yawTowardsLink)) + pos->z; - this->unk_278 = Actor_SpawnAttached(&globalCtx->actorCtx, this, globalCtx, ACTOR_DOOR_WARP1, spawnX, spawnY, spawnZ, - 0, yawTowardsLink, 0, 5); + this->unk_278 = Actor_SpawnAsChild(&globalCtx->actorCtx, this, globalCtx, ACTOR_DOOR_WARP1, spawnX, spawnY, spawnZ, + 0, yawTowardsLink, 0, 5); } void func_80AECDA0(EnRu1* this, GlobalContext* globalCtx) { @@ -1595,7 +1595,7 @@ void func_80AEE488(EnRu1* this, GlobalContext* globalCtx) { Actor* thisx = &this->actor; s8 curRoomNum; - if (func_8002F410(thisx, globalCtx)) { + if (Actor_HasParent(thisx, globalCtx)) { curRoomNum = globalCtx->roomCtx.curRoom.num; this->roomNum3 = curRoomNum; this->action = 31; @@ -1663,7 +1663,7 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) { Player* player; f32* unk_370 = &this->unk_370; - if (func_8002F5A0(this, globalCtx)) { + if (Actor_HasNoParent(this, globalCtx)) { frameCount = SkelAnime_GetFrameCount(&D_06006B9C.genericHeader); SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f); func_80AED6DC(this, globalCtx); @@ -2358,22 +2358,23 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) { s16 temp2 = this->unk_260; SkelAnime* skelAnime = &this->skelAnime; s32 addr2 = D_80AF0870[temp2]; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad1; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1282); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1282); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, gfxCtx->polyOpa.p); + oGfxCtx->polyOpa.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309); } void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) { @@ -2383,22 +2384,23 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) { s16 temp2 = this->unk_260; SkelAnime* skelAnime = &this->skelAnime; s32 addr2 = D_80AF0870[temp2]; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad1; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1324); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1324); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->unk_2A8); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->unk_2A8); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnRu1_OverrideLimbDraw, NULL, &this->actor, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + EnRu1_OverrideLimbDraw, NULL, &this->actor, oGfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353); } void EnRu1_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 323750c31b..1403bc1983 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -252,7 +252,7 @@ void func_80AF29DC(EnRu2* this, GlobalContext* globalCtx) { f32 posY = thisx->posRot.pos.y; f32 posZ = thisx->posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2); } void func_80AF2A38(EnRu2* this, GlobalContext* globalCtx) { @@ -261,8 +261,7 @@ void func_80AF2A38(EnRu2* this, GlobalContext* globalCtx) { f32 posY = player->actor.posRot.pos.y + 50.0f; f32 posZ = player->actor.posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, - 10); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 10); Item_Give(globalCtx, ITEM_MEDALLION_WATER); } @@ -391,8 +390,8 @@ void func_80AF2E64() { } void func_80AF2E84(EnRu2* this, GlobalContext* globalCtx) { - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, - kREG(19) + 24.0f + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 8); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x, + kREG(19) + 24.0f + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 8); } void func_80AF2F04(EnRu2* this, GlobalContext* globalCtx) { @@ -476,21 +475,20 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) { s16 temp = this->unk_2A4; UNK_PTR addr = D_80AF410C[temp]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264); + func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - NULL, NULL, NULL, gfxCtx->polyXlu.p); + oGfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, + skelAnime->dListCount, NULL, NULL, NULL, oGfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291); } void func_80AF3394(EnRu2* this, GlobalContext* globalCtx) { @@ -802,20 +800,20 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { s16 temp = this->unk_2A4; UNK_PTR addr = D_80AF410C[temp]; SkelAnime* skelAnime = &this->skelAnime; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2.c", 642); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2.c", 642); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2.c", 663); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2.c", 663); } void EnRu2_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c index 98255e1c44..48b1f362d9 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c @@ -56,18 +56,15 @@ void EnSceneChange_Draw(Actor* thisx, GlobalContext* globalCtx) { Gfx* displayList; s32 pad2[2]; Gfx* displayListHead; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; displayList = Graph_Alloc(globalCtx->state.gfxCtx, 0x3C0); - gfxCtx = globalCtx->state.gfxCtx; - - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_scene_change.c", 290); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_scene_change.c", 290); displayListHead = displayList; - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, displayListHead); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, displayListHead); func_80093D18(globalCtx->state.gfxCtx); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_scene_change.c", 386); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_scene_change.c", 386); } diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index f37235e2e7..e83fa7527d 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -89,13 +89,14 @@ void EnSkjneedle_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnSkjneedle_Draw(Actor* thisx, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 200); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 200); func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 205), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 205), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06000EB0); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 210); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_06000EB0); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_skj_needle.c", 210); } diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 6aafc5ff07..b52254e32e 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -564,18 +564,20 @@ void func_80B12BA4(EnSyatekiNiw* this, GlobalContext* globalCtx) { } } -#ifdef NON_MATCHING -// Regalloc in the switch, tmp in v1 rather than s0 void EnSyatekiNiw_Update(Actor* thisx, GlobalContext* globalCtx) { - s16 i; - s32 tmp; EnSyatekiNiw* this = THIS; + s32 pad; + s16 i; Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; Vec3f sp84 = { 0.0f, 0.0f, 0.0f }; Vec3f sp78; Vec3f sp6C; Vec3f sp60; + if (1) {} + if (1) {} + if (1) {} + func_80B132A8(this, globalCtx); this->unk_28C++; if (this->unk_254 != 0) { @@ -640,30 +642,25 @@ void EnSyatekiNiw_Update(Actor* thisx, GlobalContext* globalCtx) { } } - tmp = 0; + i = 0; switch (this->unk_29E) { case 0: if (globalCtx->unk_11E5C != 0) { - tmp = 1; + i = 1; } break; case 1: - tmp = 1; + i = 1; break; } - if (tmp) { + if (i != 0) { Collider_CylinderUpdate(&this->actor, &this->collider); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } } -#else -Vec3f D_80B136B8 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_80B136C4 = { 0.0f, 0.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Syateki_Niw/EnSyatekiNiw_Update.s") -#endif s32 SyatekiNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { @@ -756,37 +753,33 @@ void func_80B132A8(EnSyatekiNiw* this, GlobalContext* globalCtx) { } void func_80B13464(EnSyatekiNiw* this, GlobalContext* globalCtx) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; s16 i; EnSyatekiNiw_1* ptr = &this->unk_348[0]; u8 flag = 0; - { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(gfxCtx, "../z_en_syateki_niw.c", 1234); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_en_syateki_niw.c", 1234); - func_80093D84(globalCtx->state.gfxCtx); + func_80093D84(globalCtx->state.gfxCtx); - for (i = 0; i < 5; i++, ptr++) { - if (ptr->unk_00 == 1) { - if (flag == 0) { - gSPDisplayList(gfxCtx->polyXlu.p++, D_060023B0); - flag++; - } - - Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW); - func_800D1FD4(&globalCtx->mf_11DA0); - Matrix_Scale(ptr->unk_2C, ptr->unk_2C, 1.0f, MTXMODE_APPLY); - Matrix_RotateZ(ptr->unk_30, MTXMODE_APPLY); - Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY); - - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_en_syateki_niw.c", 1251), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06002428); + for (i = 0; i < 5; i++, ptr++) { + if (ptr->unk_00 == 1) { + if (flag == 0) { + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060023B0); + flag++; } - } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_en_syateki_niw.c", 1257); + Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW); + func_800D1FD4(&globalCtx->mf_11DA0); + Matrix_Scale(ptr->unk_2C, ptr->unk_2C, 1.0f, MTXMODE_APPLY); + Matrix_RotateZ(ptr->unk_30, MTXMODE_APPLY); + Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY); + + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_en_syateki_niw.c", 1251), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06002428); + } } + + CLOSE_DISPS(gfxCtx, "../z_en_syateki_niw.c", 1257); } diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index 29a3ea00c0..c10f1f7752 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -68,29 +68,27 @@ void EnTana_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80B17FC4(Actor* thisx, GlobalContext* globalCtx) { EnTana* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tana.c", 148); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 148); + func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, sDLists1[thisx->params]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tana.c", 157); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists1[thisx->params]); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 157); } void func_80B1809C(Actor* thisx, GlobalContext* globalCtx) { EnTana* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tana.c", 163); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 163); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sUnkSegments[thisx->params])); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sUnkSegments[thisx->params])); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, sDLists1[thisx->params]); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tana.c", 174); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists1[thisx->params]); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 174); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 75b804ebef..89428b04dd 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -101,61 +101,47 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { }; EnTkEff* eff = this->eff; - GraphicsContext* gfxCtx; - s16 gfxSetup; - s16 i; - s16 alpha; s16 imageIdx; - Gfx* dispRefs[4]; + s16 gfxSetup; + s16 alpha; + s16 i; - /* - * This assignment always occurs before a call to Graph_OpenDisps which - * makes me suspect that they're inside a macro where the function call - * is present only for debug builds. Same for Graph_CloseDisps most likely. - */ - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 114); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 114); gfxSetup = 0; - /* - * Same code is generated without the if, - * but that would make the do...while redundant so there's probably an if. - */ - do { - if (1) { - func_80093D84(globalCtx->state.gfxCtx); - } - } while (0); + func_80093D84(globalCtx->state.gfxCtx); + + if (1) {} for (i = 0; i < ARRAY_COUNT(this->eff); i++) { if (eff->active != 0) { if (gfxSetup == 0) { - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BC90); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 60, 20, 0); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600BC90); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 60, 20, 0); gfxSetup = 1; } alpha = eff->timeLeft * (255.f / eff->timeTotal); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 170, 130, 90, alpha); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 170, 130, 90, alpha); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPPipeSync(oGfxCtx->polyXlu.p++); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Scale(eff->size, eff->size, 1.f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(images) / eff->timeTotal); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx])); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx])); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BCA0); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0600BCA0); } eff++; } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 154); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 154); } s32 EnTkEff_CreateDflt(EnTk* this, Vec3f* pos, u8 duration, f32 size, f32 growth, f32 yAccelMax) { @@ -695,15 +681,11 @@ void EnTk_Update(Actor* thisx, GlobalContext* globalCtx) { } void func_80B1D200(GlobalContext* globalCtx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1188); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1188); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_0600ACE0); - gSPDisplayList(gfxCtx->polyOpa.p++, D_0600ACE0); - - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1190); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1190); } s32 EnTk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { @@ -748,22 +730,19 @@ void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) { 0x06004B40, }; EnTk* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; Matrix_Push(); EnTkEff_Draw(this, globalCtx); Matrix_Pull(); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1294); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1294); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeImageIdx])); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeImageIdx])); SkelAnime_DrawSV(globalCtx, this->skelAnim.skeleton, this->skelAnim.limbDrawTbl, this->skelAnim.dListCount, EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); } diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index b036a525b0..0b3313ad48 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -553,22 +553,18 @@ void EnWallmas_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { - char pad[8]; - MtxF mf; - GraphicsContext* gfxCtx; + s32 pad; f32 xzScale; - Gfx* dispRefs[3]; + MtxF mf; if ((this->actor.floorPoly == NULL) || ((this->timer >= 0x51) && (this->actionFunc != EnWallmas_Stun))) { return; } - // clang-format off - gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1386); - // clang-format on + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1386); func_80094044(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255); func_80038A28(this->actor.floorPoly, this->actor.posRot.pos.x, this->actor.groundY, this->actor.posRot.pos.z, &mf); Matrix_Mult(&mf, MTXMODE_NEW); @@ -581,9 +577,10 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { } Matrix_Scale(xzScale, 1.0f, xzScale, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_04049210); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1421), G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyXlu.p++, &D_04049210); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426); } s32 EnWallMas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, @@ -602,24 +599,21 @@ s32 EnWallMas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL } void EnWallMas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - if (limbIndex == 2) { - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478); Matrix_Push(); Matrix_Translate(1600.0f, -700.0f, -1700.0f, MTXMODE_APPLY); Matrix_RotateY(DEGREE_60_RAD, MTXMODE_APPLY); Matrix_RotateZ(DEGREE_15_RAD, MTXMODE_APPLY); Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06008688); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06008688); Matrix_Pull(); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495); } } diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 6f2a0e2e23..8792814d5e 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -134,14 +134,14 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) { void EnYukabyun_Draw(Actor* thisx, GlobalContext* globalCtx) { EnYukabyun* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 366); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 366); + func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80B43F64[this->unk_152])); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 373), + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80B43F64[this->unk_152])); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 373), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06000970); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 378); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000970); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 378); } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 9db3499921..877a209fdc 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -513,11 +513,11 @@ void func_80B4BF2C(EnZl1* this, GlobalContext* globalCtx) { break; } case 2: - if (func_8002F410(this, globalCtx) != 0) { + if (Actor_HasParent(this, globalCtx)) { func_800C078C(globalCtx, 0, this->unk_1E8); Gameplay_ChangeCameraStatus(globalCtx, 0, 7); Gameplay_ClearCamera(globalCtx, this->unk_1E8); - this->actor.attachedA = NULL; + this->actor.parent = NULL; this->unk_1E2 += 1; } else { func_8002F434(this, globalCtx, GI_LETTER_ZELDA, 120.0f, 10.0f); @@ -609,17 +609,16 @@ void func_80B4C400(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* void EnZl1_Draw(Actor* thisx, GlobalContext* globalCtx) { EnZl1* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_girlB.c", 2011); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_girlB.c", 2011); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(this->unk_1F4)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(this->unk_1F8)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(this->unk_1F4)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(this->unk_1F8)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC)); func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, func_80B4C340, func_80B4C400, &this->actor); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_girlB.c", 2046); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_girlB.c", 2046); } diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index d86adb5539..b07cbd09f8 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -608,7 +608,7 @@ void EnZl2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void func_80B4FCCC(EnZl2* this, GlobalContext* globalCtx) { s32 unk_274 = this->unk_274; - gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[unk_274].segment); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[unk_274].segment); } void func_80B4FD00(EnZl2* this, AnimationHeader* animation, u8 arg2, f32 transitionRate, s32 arg4) { @@ -709,19 +709,19 @@ void func_80B4FFF0(EnZl2* this, GlobalContext* globalCtx) { posY = this->actor.posRot.pos.y + (kREG(5) + -26.0f); posZ = this->actor.posRot.pos.z; - Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, - 0x4000, 0, 3); + Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0x4000, + 0, 3); this->unk_248 = 1; } } void func_80B5008C(EnZl2* this) { - Actor* attachedB = this->actor.attachedB; + Actor* child = this->actor.child; - if (attachedB != NULL) { - attachedB->posRot.pos.x = this->actor.posRot.pos.x; - attachedB->posRot.pos.y = this->actor.posRot.pos.y + (kREG(5) + -26.0f); - attachedB->posRot.pos.z = this->actor.posRot.pos.z; + if (child != NULL) { + child->posRot.pos.x = this->actor.posRot.pos.x; + child->posRot.pos.y = this->actor.posRot.pos.y + (kREG(5) + -26.0f); + child->posRot.pos.z = this->actor.posRot.pos.z; } } @@ -751,8 +751,8 @@ void func_80B500E0(EnZl2* this, GlobalContext* globalCtx) { } void func_80B501C4(EnZl2* this, s32 alpha) { - if (this->actor.attachedB != NULL) { - ((DoorWarp1*)this->actor.attachedB)->alpha = alpha; + if (this->actor.child != NULL) { + ((DoorWarp1*)this->actor.child)->alpha = alpha; } } @@ -1200,12 +1200,12 @@ void func_80B512B8(EnZl2* this, GlobalContext* globalCtx) { } void func_80B51310(EnZl2* this, GlobalContext* globalCtx) { - Actor* attachedB; + Actor* child; if (EnZl2_GetNpcAction(globalCtx, 0) == NULL) { - attachedB = this->actor.attachedB; - if (attachedB != NULL) { - Actor_Kill(attachedB); + child = this->actor.child; + if (child != NULL) { + Actor_Kill(child); } Actor_Kill(&this->actor); } @@ -1682,21 +1682,23 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) { SkelAnime* skelAnime = &this->skelAnime; s16 unk_198 = this->unk_198; u32 sp64 = D_80B52834[unk_198]; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad1; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1623); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_zl2.c", 1623); func_80093D18(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp74)); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); - gSPSegment(gfxCtx->polyOpa.p++, 0x0B, &D_80116280[2]); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp74)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 0, 255); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0B, &D_80116280[2]); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, gfxCtx->polyOpa.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_zl2.c", 1648); + oGfxCtx->polyOpa.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, oGfxCtx->polyOpa.p); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1648); } void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { @@ -1706,21 +1708,23 @@ void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { s16 unk_198 = this->unk_198; SkelAnime* skelAnime = &this->skelAnime; u32 sp6C = D_80B52834[unk_198]; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[5]; + s32 pad1; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1663); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_zl2.c", 1663); func_80093D84(globalCtx->state.gfxCtx); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); - gSPSegment(gfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); - gSPSegment(gfxCtx->polyXlu.p++, 0x0B, &D_80116280[0]); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); + gSPSegment(oGfxCtx->polyXlu.p++, 0x0B, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, - EnZl2_OverrideLimbDraw, NULL, &this->actor, gfxCtx->polyXlu.p); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_zl2.c", 1692); + oGfxCtx->polyXlu.p = + SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + EnZl2_OverrideLimbDraw, NULL, &this->actor, oGfxCtx->polyXlu.p); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1692); } void EnZl2_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index 632a5ddaf7..62990363d9 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -54,114 +54,102 @@ void EndTitle_Draw(Actor* thisx, GlobalContext* globalCtx) { Player* player = PLAYER; mf = &player->mf_9E0; - // Draws the Triforce on Link's left hand - { + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 403); - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 403); - func_80093D84(globalCtx->state.gfxCtx); - Matrix_Mult(mf, MTXMODE_NEW); - Matrix_Translate(0.0f, 150.0f, 170.0f, MTXMODE_APPLY); - Matrix_Scale(0.13f, 0.13f, 0.13f, MTXMODE_APPLY); - Matrix_RotateX(0.287621408700943f, MTXMODE_APPLY); - Matrix_RotateY(0.0f, MTXMODE_APPLY); - Matrix_RotateZ(0.0f, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyXlu.p++, sTriforceDList); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 417); - } + // Draw the Triforce on Link's left hand + func_80093D84(globalCtx->state.gfxCtx); + Matrix_Mult(mf, MTXMODE_NEW); + Matrix_Translate(0.0f, 150.0f, 170.0f, MTXMODE_APPLY); + Matrix_Scale(0.13f, 0.13f, 0.13f, MTXMODE_APPLY); + Matrix_RotateX(0.287621408700943f, MTXMODE_APPLY); + Matrix_RotateY(0.0f, MTXMODE_APPLY); + Matrix_RotateZ(0.0f, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTriforceDList); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 417); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 419); // Draw title cards on the screen - { - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 419); - - if ((frameCount >= 891) && (this->endAlpha < 200)) { - this->endAlpha += 7; - } - if ((frameCount >= 811) && (this->tlozAlpha < 200)) { - this->tlozAlpha += 15; - } - if ((frameCount >= 851) && (this->ootAlpha < 200)) { - this->ootAlpha += 15; - } - gfxCtx->overlay.p = func_80093F34(gfxCtx->overlay.p); - gDPSetTextureLUT(gfxCtx->overlay.p++, G_TT_NONE); - gDPSetEnvColor(gfxCtx->overlay.p++, 255, 120, 30, 0); - gDPSetRenderMode(gfxCtx->overlay.p++, G_RM_PASS, G_RM_XLU_SURF2); - gSPClearGeometryMode(gfxCtx->overlay.p++, G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | - G_TEXTURE_GEN_LINEAR); - gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, - 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPSetPrimColor(gfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->endAlpha); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 80, D_80B670E0); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadTile(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (80 << 2), (24 << 2)); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (80 << 2), (24 << 2)); - gSPTextureRectangle(gfxCtx->overlay.p++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0, - (32 << 5), (32 << 5)); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 120, D_80B65EA0); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadTile(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (120 << 2), (24 << 2)); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (120 << 2), (24 << 2)); - gSPTextureRectangle(gfxCtx->overlay.p++, (100 << 2), (160 << 2), (220 << 2), (183 << 2), G_TX_RENDERTILE, 0, 0, - (32 << 5), (32 << 5)); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->ootAlpha); - gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 112, D_80B669E0); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPLoadSync(gfxCtx->overlay.p++); - gDPLoadTile(gfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (112 << 2), (16 << 2)); - gDPPipeSync(gfxCtx->overlay.p++); - gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0, - G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); - gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (112 << 2), (16 << 2)); - gSPTextureRectangle(gfxCtx->overlay.p++, (104 << 2), (177 << 2), (216 << 2), (192 << 2), G_TX_RENDERTILE, 0, 0, - (32 << 5), (32 << 5)); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 515); + if ((frameCount >= 891) && (this->endAlpha < 200)) { + this->endAlpha += 7; } + if ((frameCount >= 811) && (this->tlozAlpha < 200)) { + this->tlozAlpha += 15; + } + if ((frameCount >= 851) && (this->ootAlpha < 200)) { + this->ootAlpha += 15; + } + + oGfxCtx->overlay.p = func_80093F34(oGfxCtx->overlay.p); + gDPSetTextureLUT(oGfxCtx->overlay.p++, G_TT_NONE); + gDPSetEnvColor(oGfxCtx->overlay.p++, 255, 120, 30, 0); + gDPSetRenderMode(oGfxCtx->overlay.p++, G_RM_PASS, G_RM_XLU_SURF2); + gSPClearGeometryMode(oGfxCtx->overlay.p++, + G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); + gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, + 0, COMBINED, 0, 0, 0, COMBINED); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->endAlpha); + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 80, D_80B670E0); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (80 << 2), (24 << 2)); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0, + G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (80 << 2), (24 << 2)); + gSPTextureRectangle(oGfxCtx->overlay.p++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0, + (32 << 5), (32 << 5)); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha); + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 120, D_80B65EA0); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (120 << 2), (24 << 2)); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0, + G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (120 << 2), (24 << 2)); + gSPTextureRectangle(oGfxCtx->overlay.p++, (100 << 2), (160 << 2), (220 << 2), (183 << 2), G_TX_RENDERTILE, 0, 0, + (32 << 5), (32 << 5)); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0x00, 0x80, 0, 0, 0, this->ootAlpha); + gDPSetTextureImage(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 112, D_80B669E0); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, + 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPLoadSync(oGfxCtx->overlay.p++); + gDPLoadTile(oGfxCtx->overlay.p++, G_TX_LOADTILE, 0, 0, (112 << 2), (16 << 2)); + gDPPipeSync(oGfxCtx->overlay.p++); + gDPSetTile(oGfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0, + G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0); + gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, (112 << 2), (16 << 2)); + gSPTextureRectangle(oGfxCtx->overlay.p++, (104 << 2), (177 << 2), (216 << 2), (192 << 2), G_TX_RENDERTILE, 0, 0, + (32 << 5), (32 << 5)); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 515); } -/* - This function is never executed in normal gameplay because actor params are never set to 1 - Produces the same results as the main draw function, except without the title cards on the - end screen -*/ +/** + * This function is never executed in normal gameplay because actor params are never set to 1 + * Produces the same results as the main draw function, except without the title cards on the end screen + */ void func_80B65DA8(Actor* thisx, GlobalContext* globalCtx) { EndTitle* this = THIS; s32 pad; - s32 frames; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + s32 frames = globalCtx->csCtx.frames; - frames = globalCtx->csCtx.frames; if ((frames >= 1101) && (this->endAlpha < 255)) { this->endAlpha += 3; } - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 594); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 594); - gfxCtx->overlay.p = func_80093F34(gfxCtx->overlay.p); + oGfxCtx->overlay.p = func_80093F34(oGfxCtx->overlay.p); + gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0x80, 0, 0, 0, this->endAlpha); + gSPDisplayList(oGfxCtx->overlay.p++, dList_80B69720); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0x80, 0, 0, 0, this->endAlpha); - gSPDisplayList(gfxCtx->overlay.p++, dList_80B69720); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_end_title.c", 600); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 600); } diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index a03be28746..2c8f807c80 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -58,7 +58,7 @@ void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx) { func_80B85264(this, globalCtx); func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4); - if (func_8002F410(&this->actor, globalCtx)) { + if (Actor_HasParent(&this->actor, globalCtx)) { Flags_SetCollectible(globalCtx, 0x1F); Actor_Kill(&this->actor); } else { @@ -83,10 +83,8 @@ void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) { ItemBHeart* this = THIS; Actor* actorIt; u8 flag = 0; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_item_b_heart.c", 506); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 506); actorIt = globalCtx->actorCtx.actorList[ACTORTYPE_ITEMACTION].first; @@ -101,17 +99,17 @@ void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) { if (flag) { func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 551), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 551), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06001290); - gSPDisplayList(gfxCtx->polyXlu.p++, D_06001470); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06001290); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06001470); } else { func_80093D18(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 557), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 557), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001290); - gSPDisplayList(gfxCtx->polyOpa.p++, D_06001470); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001290); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06001470); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_item_b_heart.c", 561); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_item_b_heart.c", 561); } diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index 3ccf73f320..cef3268d68 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -117,7 +117,7 @@ void func_80B857D0(ItemEtcetera* this, GlobalContext* globalCtx) { } void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { + if (Actor_HasParent(&this->actor, globalCtx)) { if ((this->actor.params & 0xFF) == 1) { gSaveContext.eventChkInf[3] |= 2; Flags_SetSwitch(globalCtx, 0xB); @@ -129,7 +129,7 @@ void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) { } void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) { - if (func_8002F410(&this->actor, globalCtx) != 0) { + if (Actor_HasParent(&this->actor, globalCtx)) { if ((this->actor.params & 0xFF) == 1) { gSaveContext.eventChkInf[3] |= 2; Flags_SetSwitch(globalCtx, 0xB); diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 016de0127d..e1d18e55af 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -15,7 +15,14 @@ void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx); void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void ItemOcarina_GetThrown(ItemOcarina* this, GlobalContext* globalCtx); +void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx); +void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx); +void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx); +void func_80B864EC(ItemOcarina* this, GlobalContext* globalCtx); +void func_80B865E0(ItemOcarina* this, GlobalContext* globalCtx); +void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx); + const ActorInit Item_Ocarina_InitVars = { ACTOR_ITEM_OCARINA, ACTORTYPE_ITEMACTION, @@ -27,27 +34,173 @@ const ActorInit Item_Ocarina_InitVars = { (ActorFunc)ItemOcarina_Update, (ActorFunc)ItemOcarina_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86130.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Init.s") +extern CutsceneData D_0200F870[]; // song of time cutscene -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Destroy.s") +void ItemOcarina_SetupAction(ItemOcarina* this, ItemOcarinaActionFunc actionFunc) { + this->actionFunc = actionFunc; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B862EC.s") +void ItemOcarina_Init(Actor* thisx, GlobalContext* globalCtx) { + ItemOcarina* this = THIS; + s32 params = thisx->params; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86494.s") + ActorShape_Init(&this->actor.shape, 0, 0, 0); + Actor_SetScale(&this->actor, 0.1f); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B864EC.s") + switch (params) { + case 0: + ItemOcarina_SetupAction(this, ItemOcarina_GetThrown); + break; + case 1: + ItemOcarina_SetupAction(this, func_80B865E0); + break; + case 2: + ItemOcarina_SetupAction(this, ItemOcarina_DoNothing); + break; + case 3: + ItemOcarina_SetupAction(this, ItemOcarina_WaitInWater); + if (!(gSaveContext.eventChkInf[8] & 1) || (gSaveContext.eventChkInf[4] & 8)) { + Actor_Kill(thisx); + return; + } + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ELF_MSG2, 299.0f, -140.0f, 884.0f, 0, 4, 1, 0x3800); + Actor_SetScale(thisx, 0.2f); + break; + default: + Actor_Kill(thisx); + return; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B865E0.s") + LOG_NUM("no", params, "../z_item_ocarina.c", 210); + this->spinRotOffset = 0x400; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86640.s") +void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B8664C.s") +void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx) { + Vec3f ripplePos; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B866BC.s") + func_8002D7EC(&this->actor); + this->actor.shape.rot.x += this->spinRotOffset * 2; + this->actor.shape.rot.y += this->spinRotOffset * 3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Update.s") + if (this->actor.minVelocityY < this->actor.velocity.y) { + this->actor.velocity.y += this->actor.gravity; + if (this->actor.velocity.y < this->actor.minVelocityY) { + this->actor.velocity.y = this->actor.minVelocityY; + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Draw.s") + if (globalCtx->csCtx.frames == 881) { + this->actor.posRot.pos.x = 250.0f; + this->actor.posRot.pos.y = 60.0f; + this->actor.posRot.pos.z = 1075.0f; + this->actor.velocity.x = 1.0f; + this->actor.velocity.y = -5.0f; + this->actor.velocity.z = -7.0f; + } + + if (globalCtx->csCtx.frames == 897) { + func_80029444(globalCtx, &this->actor.posRot.pos, 100, 500, 0); + func_8002949C(globalCtx, &this->actor.posRot.pos, 0, 0, 1, 0); + this->actor.velocity.x = 0.0f; + this->actor.velocity.y = 0.0f; + this->actor.velocity.z = 0.0f; + this->actor.gravity = -0.1f; + this->actor.minVelocityY = -0.5f; + this->spinRotOffset = 0; + Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_DROP_WATER); + } + + // landed in water + if (globalCtx->csCtx.frames == 906) { + ripplePos.x = 274.0f; + ripplePos.y = -60.0f; + ripplePos.z = 907.0f; + func_80029444(globalCtx, &ripplePos, 100, 500, 0); + } +} + +void ItemOcarina_GetThrown(ItemOcarina* this, GlobalContext* globalCtx) { + this->actor.gravity = -0.3f; + this->actor.minVelocityY = -5.0f; + this->actor.velocity.x = 0.0f; + this->actor.velocity.y = 6.0f; + this->actor.velocity.z = 0.0f; + ItemOcarina_SetupAction(this, ItemOcarina_Fly); +} + +void func_80B864EC(ItemOcarina* this, GlobalContext* globalCtx) { + func_8002D7EC(&this->actor); + this->actor.shape.rot.x += this->spinRotOffset * 2; + this->actor.shape.rot.y += this->spinRotOffset * 3; + + if (this->actor.minVelocityY < this->actor.velocity.y) { + this->actor.velocity.y += this->actor.gravity; + + if (this->actor.velocity.y < this->actor.minVelocityY) { + this->actor.velocity.y = this->actor.minVelocityY; + } + } + + if (globalCtx->csCtx.frames == 220) { + this->actor.posRot.pos.x = 144.0f; + this->actor.posRot.pos.y = 80.0f; + this->actor.posRot.pos.z = 1686.0f; + this->actor.velocity.x = 1.0f; + this->actor.velocity.y = 2.0f; + this->actor.velocity.z = -7.0f; + this->actor.gravity = -0.15f; + this->actor.minVelocityY = -5.0f; + } +} + +void func_80B865E0(ItemOcarina* this, GlobalContext* globalCtx) { + this->actor.gravity = -0.3f; + this->actor.minVelocityY = -5.0f; + this->actor.velocity.x = 0.0f; + this->actor.velocity.y = 4.0f; + this->actor.velocity.z = 6.0f; + ItemOcarina_SetupAction(this, func_80B864EC); +} + +void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx) { +} + +void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx) { + if (func_8002F334(&this->actor, globalCtx)) { + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_0200F870); + gSaveContext.cutsceneTrigger = 1; + } +} + +void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) { + if (Actor_HasParent(&this->actor, globalCtx)) { + gSaveContext.eventChkInf[4] |= 8; + Flags_SetSwitch(globalCtx, 3); + this->actionFunc = ItemOcarina_StartSoTCutscene; + this->actor.draw = NULL; + } else { + func_8002F434(&this->actor, globalCtx, GI_OCARINA_OOT, 30.0f, 50.0f); + + if ((globalCtx->gameplayFrames & 13) == 0) { + func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f); + } + } +} + +void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx) { + ItemOcarina* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx) { + ItemOcarina* this = THIS; + + func_8002EBCC(thisx, globalCtx, 0); + func_8002ED80(thisx, globalCtx, 0); + func_800694A0(globalCtx, 0x2E); +} diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h index d7f52f2051..a67e73cf3d 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h @@ -6,9 +6,12 @@ struct ItemOcarina; +typedef void (*ItemOcarinaActionFunc)(struct ItemOcarina*, GlobalContext*); + typedef struct ItemOcarina { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x8]; + /* 0x014C */ ItemOcarinaActionFunc actionFunc; + /* 0x0150 */ s16 spinRotOffset; } ItemOcarina; // size = 0x0154 extern const ActorInit Item_Ocarina_InitVars; diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index 473ea95db4..256568bb2e 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -226,39 +226,39 @@ void MagicWind_Update(Actor* thisx, GlobalContext* globalCtx) { s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, Actor* thisx) { MagicWind* this = THIS; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_magic_wind.c", 615); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_wind.c", 615); + if (limbIndex == 1) { - gSPSegment(gfxCtx->polyXlu.p++, 8, + gSPSegment(oGfxCtx->polyXlu.p++, 8, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (globalCtx->state.frames * 9) & 0xFF, 0xFF - ((globalCtx->state.frames * 0xF) & 0xFF), 0x40, 0x40, 1, (globalCtx->state.frames * 0xF) & 0xFF, 0xFF - ((globalCtx->state.frames * 0x1E) & 0xFF), 0x40, 0x40)); } else if (limbIndex == 2) { - gSPSegment(gfxCtx->polyXlu.p++, 9, + gSPSegment(oGfxCtx->polyXlu.p++, 9, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (globalCtx->state.frames * 3) & 0xFF, 0xFF - ((globalCtx->state.frames * 5) & 0xFF), 0x40, 0x40, 1, (globalCtx->state.frames * 6) & 0xFF, 0xFF - ((globalCtx->state.frames * 0xA) & 0xFF), 0x40, 0x40)); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_magic_wind.c", 646); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_magic_wind.c", 646); + return 1; } void MagicWind_Draw(Actor* thisx, GlobalContext* globalCtx) { - s32 pad; - MagicWind* this = THIS; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; + MagicWind* this = THIS; + + OPEN_DISPS(gfxCtx, "../z_magic_wind.c", 661); - Graph_OpenDisps(dispRefs, gfxCtx, "../z_magic_wind.c", 661); if (this->actionFunc != MagicWind_WaitForTimer) { - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 25); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 25); SkelCurve_Draw(thisx, globalCtx, &this->skelCurve, MagicWind_OverrideLimbDraw, NULL, 1, NULL); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_magic_wind.c", 673); + + CLOSE_DISPS(gfxCtx, "../z_magic_wind.c", 673); } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 1dd68ea38f..65288d6943 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -186,12 +186,9 @@ void ObjComb_Update(Actor* thisx, GlobalContext* globalCtx) { void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) { ObjComb* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_comb.c", 369); - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_obj_comb.c", 369); func_80093D18(globalCtx->state.gfxCtx); Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y + (118.0f * this->actor.scale.y), @@ -202,11 +199,12 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_050095B0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_050095B0); func_800628A4(0, &this->collider); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_obj_comb.c", 402); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_comb.c", 402); } diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 465227206c..9cde524913 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -146,23 +146,23 @@ void ObjDekujr_Update(Actor* thisx, GlobalContext* globalCtx) { void ObjDekujr_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 frameCount; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 370); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 370); + func_80093D18(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 379), + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 379), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyOpa.p++, D_060030D0); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_060030D0); frameCount = globalCtx->state.frames; gSPSegment( - gfxCtx->polyXlu.p++, 0x08, + oGfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, frameCount % 128, 0, 32, 32, 1, frameCount % 128, 0, 32, 32)); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 399), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 399), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_060032D8); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 409); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_060032D8); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_dekujr.c", 409); } diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index bb20cf0de2..ac6411614f 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -15,7 +15,13 @@ void ObjHsblock_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjHsblock_Update(Actor* thisx, GlobalContext* globalCtx); void ObjHsblock_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void func_80B93DF4(ObjHsblock* this, GlobalContext* globalCtx); +void func_80B93E5C(ObjHsblock* this, GlobalContext* globalCtx); + +void func_80B93D90(ObjHsblock* this); +void func_80B93DB0(ObjHsblock* this); +void func_80B93E38(ObjHsblock* this); + const ActorInit Obj_Hsblock_InitVars = { ACTOR_OBJ_HSBLOCK, ACTORTYPE_BG, @@ -27,27 +33,140 @@ const ActorInit Obj_Hsblock_InitVars = { (ActorFunc)ObjHsblock_Update, (ActorFunc)ObjHsblock_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B60.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93B68.s") +f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93BF0.s") +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Init.s") +UNK_TYPE D_80B940DC[] = { 0x06000730, 0x06000730, 0x06000578 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Destroy.s") +static Color_RGB8 sFireTempleColor = { 165, 125, 55 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93D90.s") +static Gfx* sDLists[] = { 0x06000210, 0x06000210, 0x06000470 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DB0.s") +void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) { + this->actionFunc = actionFunc; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93DF4.s") +void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, UNK_TYPE arg2, DynaPolyMoveFlag moveFlags) { + s32 pad; + s32 localC = 0; + s32 pad2[2]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E38.s") + DynaPolyInfo_SetActorMove(&this->dyna, moveFlags); + DynaPolyInfo_Alloc(arg2, &localC); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC); + if (this->dyna.dynaPolyId == 0x32) { + osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_hsblock.c", 163, + this->dyna.actor.id, this->dyna.actor.params); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/func_80B93E5C.s") +void func_80B93BF0(ObjHsblock* this, GlobalContext* globalCtx) { + if ((this->dyna.actor.params >> 5) & 1) { + Actor_SpawnAsChild(&globalCtx->actorCtx, this, globalCtx, ACTOR_OBJ_ICE_POLY, this->dyna.actor.posRot.pos.x, + this->dyna.actor.posRot.pos.y, this->dyna.actor.posRot.pos.z, this->dyna.actor.posRot.rot.x, + this->dyna.actor.posRot.rot.y, this->dyna.actor.posRot.rot.z, 1); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Update.s") +void ObjHsblock_Init(Actor* thisx, GlobalContext* globalCtx) { + ObjHsblock* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Hsblock/ObjHsblock_Draw.s") + func_80B93B68(this, globalCtx, D_80B940DC[thisx->params & 3], 0); + Actor_ProcessInitChain(thisx, sInitChain); + func_80B93BF0(this, globalCtx); + + switch (thisx->params & 3) { + case 0: + case 2: + func_80B93D90(this); + break; + case 1: + if (Flags_GetSwitch(globalCtx, (thisx->params >> 8) & 0x3F)) { + func_80B93D90(this); + } else { + func_80B93DB0(this); + } + } + + mREG(13) = 255; + mREG(14) = 255; + mREG(15) = 255; +} + +void ObjHsblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { + ObjHsblock* this = THIS; + + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} + +void func_80B93D90(ObjHsblock* this) { + ObjHsblock_SetupAction(this, NULL); +} + +void func_80B93DB0(ObjHsblock* this) { + this->dyna.actor.flags |= 0x10; + this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y - 105.0f; + ObjHsblock_SetupAction(this, func_80B93DF4); +} + +void func_80B93DF4(ObjHsblock* this, GlobalContext* globalCtx) { + if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) { + func_80B93E38(this); + } +} + +void func_80B93E38(ObjHsblock* this) { + ObjHsblock_SetupAction(this, func_80B93E5C); +} + +void func_80B93E5C(ObjHsblock* this, GlobalContext* globalCtx) { + Math_SmoothScaleMaxMinF(&this->dyna.actor.velocity.y, 16.0f, 0.1f, 0.8f, 0.0f); + if (fabsf(Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y, 0.3f, + this->dyna.actor.velocity.y, 0.3f)) < 0.001f) { + this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y; + func_80B93D90(this); + this->dyna.actor.flags &= ~0x10; + } +} + +void ObjHsblock_Update(Actor* thisx, GlobalContext* globalCtx) { + ObjHsblock* this = THIS; + + if (this->actionFunc != NULL) { + this->actionFunc(this, globalCtx); + } + Actor_SetHeight(thisx, D_80B940C0[thisx->params & 3]); +} + +void ObjHsblock_Draw(Actor* thisx, GlobalContext* globalCtx) { + Color_RGB8* color; + Color_RGB8 defaultColor; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 365); + + func_80093D18(globalCtx->state.gfxCtx); + + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 369), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + if (globalCtx->sceneNum == SCENE_HIDAN) { + color = &sFireTempleColor; + } else { + defaultColor.r = mREG(13); + defaultColor.g = mREG(14); + defaultColor.b = mREG(15); + color = &defaultColor; + } + + gDPSetEnvColor(oGfxCtx->polyOpa.p++, color->r, color->g, color->b, 255); + gSPDisplayList(oGfxCtx->polyOpa.p++, sDLists[thisx->params & 3]); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_hsblock.c", 399); +} diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h index d66da24f2e..36d614e849 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h @@ -6,9 +6,11 @@ struct ObjHsblock; +typedef void (*ObjHsblockActionFunc)(struct ObjHsblock*, GlobalContext*); + typedef struct ObjHsblock { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ char unk_164[0x4]; + /* 0x0164 */ ObjHsblockActionFunc actionFunc; } ObjHsblock; // size = 0x0168 extern const ActorInit Obj_Hsblock_InitVars; diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index 6449f640d5..ba07ee8888 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -67,9 +67,9 @@ void ObjMakeoshihiki_Init(Actor* thisx, GlobalContext* globalCtx) { spawnPos = &block->posVecs[typeIdx]; - if (Actor_SpawnAttached(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_OSHIHIKI, spawnPos->x, spawnPos->y, - spawnPos->z, 0, block->rotY, 0, - ((block->paramVal1 << 6) & 0xC0) | (block->paramVal2 & 0xF) | 0xFF00) == NULL) { + if (Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_OSHIHIKI, spawnPos->x, spawnPos->y, + spawnPos->z, 0, block->rotY, 0, + ((block->paramVal1 << 6) & 0xC0) | (block->paramVal2 & 0xF) | 0xFF00) == NULL) { // Push-pull block failure osSyncPrintf(VT_COL(RED, WHITE)); osSyncPrintf("Error : 押し引きブロック発生失敗(%s %d)\n", "../z_obj_makeoshihiki.c", 194); @@ -78,7 +78,7 @@ void ObjMakeoshihiki_Init(Actor* thisx, GlobalContext* globalCtx) { return; } if (block->unk_24[typeIdx] & 2) { - ((ObjOshihiki*)thisx->attachedB)->unk_1BE = 1; + ((ObjOshihiki*)thisx->child)->unk_1BE = 1; } thisx->posRot.rot.z = thisx->shape.rot.z = 0; osSyncPrintf("(%s)(arg_data %04xF)(angleZ %d)\n", "../z_obj_makeoshihiki.c", thisx->params, @@ -94,7 +94,7 @@ void ObjMakeoshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 cond2; for (i = 0; i < 3; i++) { - if (Math3D_Vec3fDistSq(&thisx->attachedB->posRot.pos, &block->posVecs[i]) < 0.001f) { + if (Math3D_Vec3fDistSq(&thisx->child->posRot.pos, &block->posVecs[i]) < 0.001f) { if (block->unk_24[i] & 1) { if ((thisx->params >> 6) & 1) { sfxCond1 = false; @@ -127,7 +127,7 @@ void ObjMakeoshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) { sFlagSwitchFuncs[sFlags[i][1]](globalCtx, (thisx->params >> 8) & 0x3F); if (block->unk_24[i] & 2) { - ((ObjOshihiki*)thisx->attachedB)->unk_1BE = 1; + ((ObjOshihiki*)thisx->child)->unk_1BE = 1; } break; diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 32b6c03250..d3f1ccce29 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -149,21 +149,18 @@ void OceffSpot_Update(Actor* thisx, GlobalContext* globalCtx) { void OceffSpot_Draw(Actor* thisx, GlobalContext* globalCtx) { OceffSpot* this = THIS; - u32 scroll; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + u32 scroll = globalCtx->state.frames & 0xFFFF; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 466); - scroll = globalCtx->state.frames & 0xFFFF; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_spot.c", 466); func_80093D84(globalCtx->state.gfxCtx); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 469), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 469), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, - 1, 0, scroll * (-8), 32, 32)); - gSPDisplayList(gfxCtx->polyXlu.p++, sCylinderDl); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, + 1, 0, scroll * (-8), 32, 32)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_spot.c", 485); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 485); } diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 43b98c7850..f9b5cd2a66 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -125,61 +125,54 @@ void OceffStorm_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffStorm_Draw2(Actor* thisx, GlobalContext* globalCtx) { - u32 scroll; + u32 scroll = globalCtx->state.frames & 0xFFF; OceffStorm* this = THIS; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - scroll = globalCtx->state.frames & 0xFFF; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_storm.c", 449); - gDPPipeSync(gfxCtx->polyXlu.p++); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 449); + + gDPPipeSync(oGfxCtx->polyXlu.p++); + if (1) {} - gfxCtx->polyXlu.p = func_80093F34(gfxCtx->polyXlu.p); - gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_NOISE); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, - scroll * 4, scroll * 4, 64, 64)); - gSPTextureRectangle(gfxCtx->polyXlu.p++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, + + oGfxCtx->polyXlu.p = func_80093F34(oGfxCtx->polyXlu.p); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_NOISE); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, + scroll * 4, scroll * 4, 64, 64)); + gSPTextureRectangle(oGfxCtx->polyXlu.p++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, 140, (1 << 15) | (31 << 10) | 884); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_storm.c", 477); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 477); } void OceffStorm_Draw(Actor* thisx, GlobalContext* globalCtx) { - u32 scroll; - OceffStorm* this; - GraphicsContext* gfxCtx; - Vtx* vtxPtr; - Gfx* dispRefs[4]; + u32 scroll = globalCtx->state.frames & 0xFFF; + OceffStorm* this = THIS; + Vtx* vtxPtr = vertices; - this = THIS; - vtxPtr = vertices; - scroll = globalCtx->state.frames & 0xFFF; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_storm.c", 486); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 486); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 150, 150, 0, 128); - gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_NOISE); - gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_NOISE); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 150, 150, 0, 128); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_NOISE); vtxPtr[0].v.cn[3] = vtxPtr[6].v.cn[3] = vtxPtr[16].v.cn[3] = vtxPtr[25].v.cn[3] = this->vtxAlpha >> 1; vtxPtr[10].v.cn[3] = vtxPtr[22].v.cn[3] = this->vtxAlpha; - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 498), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 498), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, sCylinderTexDl); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, - 32, 1, scroll * 8, (0 - scroll) * 12, 32, 32)); - gSPDisplayList(gfxCtx->polyXlu.p++, sCylinderDl); + gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderTexDl); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, + 32, 1, scroll * 8, (0 - scroll) * 12, 32, 32)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sCylinderDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_storm.c", 512); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 512); OceffStorm_Draw2(&this->actor, globalCtx); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 61c7bd7d95..26fa5b95de 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -64,23 +64,21 @@ void OceffWipe_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { - u32 scroll; + u32 scroll = globalCtx->state.frames & 0xFF; OceffWipe* this = THIS; f32 z; - GraphicsContext* gfxCtx; + s32 pad; u8 alphaTable[3]; s32 i; Vec3f eye; Vtx(*vtxPtr)[2]; Vec3f vec; - Gfx* dispRefs[5]; - - scroll = globalCtx->state.frames & 0xFF; eye = ACTIVE_CAM->eye; func_8005AFB4(&vec, ACTIVE_CAM); - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 346); + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 346); + if (this->counter < 32) { z = Math_Sins(this->counter << 9) * 1400; } else { @@ -110,21 +108,21 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params) { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 170, 255, 255, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 150, 255, 128); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 170, 255, 255, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 0, 150, 255, 128); } else { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 200, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 0, 255, 128); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 200, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 0, 255, 128); } - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, - 1, 0 - scroll, scroll * (-2), 32, 32)); - gSPDisplayList(gfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, + 1, 0 - scroll, scroll * (-2), 32, 32)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 398); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 398); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 7b5d4d52e0..a39642bbe0 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -59,18 +59,14 @@ void OceffWipe2_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { - u32 scroll; - OceffWipe2* this; + u32 scroll = globalCtx->state.frames & 0xFF; + OceffWipe2* this = THIS; f32 z; - GraphicsContext* gfxCtx; u8 alpha; - u32 pad1; + s32 pad[2]; Vec3f eye; Vtx* vtxPtr; Vec3f vec; - Gfx* dispRefs[5]; - this = THIS; - scroll = globalCtx->state.frames & 0xFF; eye = ACTIVE_CAM->eye; func_8005AFB4(&vec, ACTIVE_CAM); @@ -91,8 +87,7 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { vtxPtr[11].v.cn[3] = vtxPtr[13].v.cn[3] = vtxPtr[15].v.cn[3] = vtxPtr[16].v.cn[3] = vtxPtr[18].v.cn[3] = vtxPtr[20].v.cn[3] = alpha; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 390); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 390); func_80093D84(globalCtx->state.gfxCtx); @@ -101,15 +96,15 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 100, 0, 128); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, - 1, scroll * (-6), 0, 64, 64)); - gSPDisplayList(gfxCtx->polyXlu.p++, sFrustrumDl); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 255, 100, 0, 128); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, + 1, scroll * (-6), 0, 64, 64)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index c7b4127a96..4757518c9f 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -60,19 +60,14 @@ void OceffWipe3_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { - - u32 scroll; - OceffWipe3* this; + u32 scroll = globalCtx->state.frames & 0xFFF; + OceffWipe3* this = THIS; f32 z; - GraphicsContext* gfxCtx; u8 alpha; - u32 pad1; + s32 pad[2]; Vec3f eye; Vtx* vtxPtr; Vec3f vec; - Gfx* dispRefs[5]; - this = THIS; - scroll = globalCtx->state.frames & 0xFFF; eye = ACTIVE_CAM->eye; func_8005AFB4(&vec, ACTIVE_CAM); @@ -93,8 +88,7 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { vtxPtr[11].v.cn[3] = vtxPtr[13].v.cn[3] = vtxPtr[15].v.cn[3] = vtxPtr[17].v.cn[3] = vtxPtr[19].v.cn[3] = vtxPtr[21].v.cn[3] = alpha; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 343); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 343); func_80093D84(globalCtx->state.gfxCtx); @@ -103,15 +97,15 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 200, 0, 128); - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, - 64, 1, scroll * 8, scroll * (-8), 64, 64)); - gSPDisplayList(gfxCtx->polyXlu.p++, sFrustrumDl); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(oGfxCtx->polyXlu.p++, 100, 200, 0, 128); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, + 64, 1, scroll * 8, scroll * (-8), 64, 64)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 370); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 370); } diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 726fb7b706..e45621deea 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -54,19 +54,14 @@ void OceffWipe4_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { - - u32 scroll; - OceffWipe4* this; + u32 scroll = globalCtx->state.frames & 0xFFF; + OceffWipe4* this = THIS; f32 z; - GraphicsContext* gfxCtx; u8 alpha; - u32 pad1; + s32 pad[2]; Vec3f eye; Vtx* vtxPtr; Vec3f vec; - Gfx* dispRefs[5]; - this = THIS; - scroll = globalCtx->state.frames & 0xFFF; eye = ACTIVE_CAM->eye; func_8005AFB4(&vec, ACTIVE_CAM); @@ -87,8 +82,7 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { vtxPtr[11].v.cn[3] = vtxPtr[13].v.cn[3] = vtxPtr[15].v.cn[3] = vtxPtr[17].v.cn[3] = vtxPtr[19].v.cn[3] = vtxPtr[21].v.cn[3] = alpha; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 314); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 314); func_80093D84(globalCtx->state.gfxCtx); @@ -97,19 +91,19 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { func_800D1FD4(&globalCtx->mf_11DA0); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params == 1) { - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL1); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL1); } else { - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL0); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL0); } - gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL2); - gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, - 1, scroll * (-1), scroll, 32, 32)); - gSPDisplayList(gfxCtx->polyXlu.p++, sFrustrumDl); + gSPDisplayList(oGfxCtx->polyXlu.p++, sTextureDL2); + gSPDisplayList(oGfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, + 1, scroll * (-1), scroll, 32, 32)); + gSPDisplayList(oGfxCtx->polyXlu.p++, sFrustrumDl); - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 344); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 344); } diff --git a/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c index aeb64b782c..f5d105f823 100644 --- a/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -44,21 +44,19 @@ void KaleidoScope_Draw(GlobalContext* globalCtx) { Input* input = &globalCtx->state.input[0]; PauseContext* pauseCtx = &globalCtx->pauseCtx; InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* dispRefs[4]; - Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3188); + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3188); pauseCtx->inputX = input->rel.in.x; pauseCtx->inputY = input->rel.in.y; - gSPSegment(gfxCtx->polyOpa.p++, 0x02, interfaceCtx->parameterSegment); - gSPSegment(gfxCtx->polyOpa.p++, 0x07, pauseCtx->unk_13C); - gSPSegment(gfxCtx->polyOpa.p++, 0x08, pauseCtx->unk_128); - gSPSegment(gfxCtx->polyOpa.p++, 0x09, pauseCtx->unk_12C); - gSPSegment(gfxCtx->polyOpa.p++, 0x0A, pauseCtx->unk_138); - gSPSegment(gfxCtx->polyOpa.p++, 0x0C, pauseCtx->unk_130); - gSPSegment(gfxCtx->polyOpa.p++, 0x0D, pauseCtx->unk_134); + gSPSegment(oGfxCtx->polyOpa.p++, 0x02, interfaceCtx->parameterSegment); + gSPSegment(oGfxCtx->polyOpa.p++, 0x07, pauseCtx->unk_13C); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, pauseCtx->unk_128); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, pauseCtx->unk_12C); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, pauseCtx->unk_138); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0C, pauseCtx->unk_130); + gSPSegment(oGfxCtx->polyOpa.p++, 0x0D, pauseCtx->unk_134); if (pauseCtx->flag == 0) { func_80823994(pauseCtx, pauseCtx->eye.x, pauseCtx->eye.y, pauseCtx->eye.z); @@ -67,7 +65,7 @@ void KaleidoScope_Draw(GlobalContext* globalCtx) { func_80820434(globalCtx, globalCtx->state.gfxCtx); func_800949A8(globalCtx->state.gfxCtx); - gDPSetCombineLERP(gfxCtx->polyOpa.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + gDPSetCombineLERP(oGfxCtx->polyOpa.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); func_80823994(pauseCtx, 0.0f, 0.0f, 64.0f); @@ -82,7 +80,7 @@ void KaleidoScope_Draw(GlobalContext* globalCtx) { func_808161AC(globalCtx); } - Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3254); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3254); } #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_kaleido_scope/func_8082650C.s") diff --git a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c index cbb4a5c42b..8175c1208b 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c +++ b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c @@ -59,30 +59,27 @@ u32 EffectSsBlast_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void } void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF mtx; - s32 pad1; + s32 pad; f32 scale; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_blast.c", 170); + OPEN_DISPS(gfxCtx, "../z_eff_ss_blast.c", 170); scale = this->regs[SS_BLAST_RADIUS] * 0.0025f; func_80093D84(globalCtx->state.gfxCtx); - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BLAST_PRIM_R], this->regs[SS_BLAST_PRIM_G], + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->regs[SS_BLAST_PRIM_R], this->regs[SS_BLAST_PRIM_G], this->regs[SS_BLAST_PRIM_B], this->regs[SS_BLAST_PRIM_A]); func_800BFCB8(globalCtx, &mtx, &this->pos); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BLAST_ENV_R], this->regs[SS_BLAST_ENV_G], + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BLAST_ENV_R], this->regs[SS_BLAST_ENV_G], this->regs[SS_BLAST_ENV_B], this->regs[SS_BLAST_ENV_A]); Matrix_Put(&mtx); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList); - Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_blast.c", 204); + gSPDisplayList(oGfxCtx->polyXlu.p++, this->displayList); + CLOSE_DISPS(gfxCtx, "../z_eff_ss_blast.c", 204); } void EffectSsBlast_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c index 0f8c21c689..84245841f9 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c @@ -46,22 +46,19 @@ u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* } void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF sp12C; MtxF spEC; MtxF spAC; MtxF sp6C; Mtx* mtx; - s32 pad2; + s32 pad; f32 scale; s16 color; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; if (1) {} - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb.c", 168); + OPEN_DISPS(gfxCtx, "../z_eff_ss_bomb.c", 168); scale = this->regs[SS_BOMB_SCALE] / 100.0f; @@ -70,23 +67,23 @@ void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { SkinMatrix_MtxFMtxFMult(&sp12C, &globalCtx->mf_11DA0, &sp6C); SkinMatrix_MtxFMtxFMult(&sp6C, &spEC, &spAC); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &spAC); if (mtx != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099F588[this->regs[SS_BOMB_TEX_IDX]])); - gDPPipeSync(gfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099F588[this->regs[SS_BOMB_TEX_IDX]])); + gDPPipeSync(oGfxCtx->polyXlu.p++); func_80094C50(gfxCtx); color = this->life * 12.75f; - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, color, color, color, color); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList); - gDPPipeSync(gfxCtx->polyXlu.p++); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, color, color, color, color); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPDisplayList(oGfxCtx->polyXlu.p++, this->displayList); + gDPPipeSync(oGfxCtx->polyXlu.p++); } - Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb.c", 214); + CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb.c", 214); } void EffectSsBomb_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c index 4e509d7709..a1ce614ec3 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c +++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c @@ -72,19 +72,16 @@ u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void // unused in the original game. looks like EffectSsBomb but with color void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF sp11C; MtxF spDC; MtxF sp9C; MtxF sp5C; Mtx* mtx; - s32 pad2; + s32 pad; f32 scale; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 298); + OPEN_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 298); scale = this->regs[SS_BOMB2_SCALE] * 0.01f; SkinMatrix_SetTranslate(&sp11C, this->pos.x, this->pos.y, this->pos.z); @@ -95,23 +92,23 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp9C); if (mtx != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); func_80094BC4(gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G], + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G], this->regs[SS_BOMB2_PRIM_B], this->regs[SS_BOMB2_PRIM_A]); - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G], + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G], this->regs[SS_BOMB2_ENV_B], 0); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FEE0[this->regs[SS_BOMB2_TEX_IDX]])); - gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FEE0[this->regs[SS_BOMB2_TEX_IDX]])); + gSPDisplayList(oGfxCtx->polyXlu.p++, this->displayList); if (1) {} if (1) {} } - Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 345); + CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 345); } void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad1; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF sp1B4; MtxF sp174; MtxF sp134; @@ -119,18 +116,13 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th MtxF spB4; Mtx* mtx2; Mtx* mtx; - s32 pad; - s32 pad2; - s32 pad3; + s32 pad[3]; f32 scale; f32 temp_f24; f32 mtxScale = 0.925f; s32 i; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 386); + OPEN_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 386); temp_f24 = this->regs[SS_BOMB2_A]; scale = this->regs[SS_BOMB2_SCALE] * 0.01f; @@ -141,18 +133,18 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp134); if (mtx != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx2 = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp134); if (mtx2 != NULL) { func_80094BC4(gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G], + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G], this->regs[SS_BOMB2_PRIM_B], this->regs[SS_BOMB2_PRIM_A]); - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G], + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G], this->regs[SS_BOMB2_ENV_B], 0); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FF00[this->regs[SS_BOMB2_TEX_IDX]])); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0400BFE8); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0400C040); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FF00[this->regs[SS_BOMB2_TEX_IDX]])); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400BFE8); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400C040); Matrix_MtxToMtxF(mtx2, &spB4); Matrix_Put(&spB4); @@ -160,9 +152,9 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th Matrix_Translate(0.0f, 0.0f, temp_f24, MTXMODE_APPLY); Matrix_RotateZ((this->life * 0.02f) + 180.0f, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448), + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(gfxCtx->polyXlu.p++, D_0400C040); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_0400C040); mtxScale -= 0.15f; } } @@ -170,7 +162,7 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th if (1) {} if (1) {} } - Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 456); + CLOSE_DISPS(gfxCtx, "../z_eff_ss_bomb2.c", 456); } void EffectSsBomb2_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { diff --git a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c index b9c7e604c0..8f8cf06dba 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c @@ -80,19 +80,16 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* } void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF sp144; MtxF sp104; MtxF spC4; MtxF sp84; - s32 pad1; + s32 pad; Mtx* mtx; f32 scale; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_eff_ss_dust.c", 321); + OPEN_DISPS(gfxCtx, "../z_eff_ss_dust.c", 321); scale = this->regs[SS_DUST_SCALE] * 0.0025f; @@ -101,37 +98,37 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { SkinMatrix_MtxFMtxFMult(&sp144, &globalCtx->mf_11DA0, &sp84); SkinMatrix_MtxFMtxFMult(&sp84, &sp104, &spC4); - gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(oGfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &spC4); if (mtx != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPPipeSync(gfxCtx->polyXlu.p++); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A2A50[this->regs[SS_DUST_TEX_IDX]])); - gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0); - gDPPipeSync(gfxCtx->polyXlu.p++); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPPipeSync(oGfxCtx->polyXlu.p++); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A2A50[this->regs[SS_DUST_TEX_IDX]])); + oGfxCtx->polyXlu.p = Gfx_CallSetupDL(oGfxCtx->polyXlu.p, 0); + gDPPipeSync(oGfxCtx->polyXlu.p++); if (this->regs[SS_DUST_DRAW_FLAGS] & 1) { - gDPSetCombineLERP(gfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, - COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED); - gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2); - gSPSetGeometryMode(gfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); + gDPSetCombineLERP(oGfxCtx->polyXlu.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, + 0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED); + gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2); + gSPSetGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); } else if (this->regs[SS_DUST_DRAW_FLAGS] & 2) { - gDPSetRenderMode(gfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); - gSPClearGeometryMode(gfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); + gDPSetRenderMode(oGfxCtx->polyXlu.p++, G_RM_PASS, G_RM_ZB_CLD_SURF2); + gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_FOG | G_LIGHTING); } else { - gSPClearGeometryMode(gfxCtx->polyXlu.p++, G_LIGHTING); + gSPClearGeometryMode(oGfxCtx->polyXlu.p++, G_LIGHTING); } - gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_DUST_PRIM_R], this->regs[SS_DUST_PRIM_G], + gDPPipeSync(oGfxCtx->polyXlu.p++); + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->regs[SS_DUST_PRIM_R], this->regs[SS_DUST_PRIM_G], this->regs[SS_DUST_PRIM_B], 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_DUST_ENV_R], this->regs[SS_DUST_ENV_G], + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->regs[SS_DUST_ENV_R], this->regs[SS_DUST_ENV_G], this->regs[SS_DUST_ENV_B], this->regs[SS_DUST_ENV_A]); - gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList); + gSPDisplayList(oGfxCtx->polyXlu.p++, this->displayList); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_ss_dust.c", 389); + CLOSE_DISPS(gfxCtx, "../z_eff_ss_dust.c", 389); } void EffectSsDust_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c index 03de4adf79..d3173c3c43 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c @@ -78,19 +78,16 @@ u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* } void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { - s32 pad; + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; MtxF sp11C; MtxF spDC; MtxF sp9C; MtxF sp5C; Mtx* mtx; f32 scale; - s32 pad1; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + s32 pad; - gfxCtx = globalCtx->state.gfxCtx; - Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_g_spk.c", 208); + OPEN_DISPS(gfxCtx, "../z_eff_ss_g_spk.c", 208); scale = this->regs[SS_G_SPK_SCALE] * 0.0025f; @@ -102,20 +99,22 @@ void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp9C); if (mtx != NULL) { - gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A7498[this->regs[SS_G_SPK_TEX_IDX]])); + gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A7498[this->regs[SS_G_SPK_TEX_IDX]])); func_80094BC4(gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_G_SPK_PRIM_R], this->regs[SS_G_SPK_PRIM_G], + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->regs[SS_G_SPK_PRIM_R], this->regs[SS_G_SPK_PRIM_G], this->regs[SS_G_SPK_PRIM_B], 255); - gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_G_SPK_ENV_R], this->regs[SS_G_SPK_ENV_G], + gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->regs[SS_G_SPK_ENV_R], this->regs[SS_G_SPK_ENV_G], this->regs[SS_G_SPK_ENV_B], this->regs[SS_G_SPK_ENV_A]); - gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList); + gSPDisplayList(oGfxCtx->polyXlu.p++, this->displayList); } + if (1) {} if (1) {} - Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_g_spk.c", 255); + + CLOSE_DISPS(gfxCtx, "../z_eff_ss_g_spk.c", 255); } void EffectSsGSpk_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index d9e8ff2580..fb9fb1b8ca 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -40,7 +40,7 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) { gSaveContext.unk_13C7 = 1; D_8011FB30 = 0; this->state.running = false; - SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext) + SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext); } static SceneSelectEntry sScenes[] = { @@ -503,68 +503,57 @@ void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csI } void Select_DrawMenu(SelectContext* this) { - s32 arg; + GraphicsContext* gfxCtx = this->state.gfxCtx; GfxPrint* printer; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = this->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 930); + OPEN_DISPS(gfxCtx, "../z_select.c", 930); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); - SET_FULLSCREEN_VIEWPORT(&this->view) + SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); func_80094140(gfxCtx); printer = alloca(sizeof(GfxPrint)); GfxPrint_Init(printer); - GfxPrint_Open(printer, gfxCtx->polyOpa.p); + GfxPrint_Open(printer, oGfxCtx->polyOpa.p); Select_PrintMenu(this, printer); - arg = gSaveContext.linkAge; - Select_PrintAgeSetting(this, printer, arg); - arg = gSaveContext.cutsceneIndex; - Select_PrintCutsceneSetting(this, printer, arg); - gfxCtx->polyOpa.p = GfxPrint_Close(printer); + Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge)); + Select_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex)); + oGfxCtx->polyOpa.p = GfxPrint_Close(printer); GfxPrint_Destroy(printer); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 966); + CLOSE_DISPS(gfxCtx, "../z_select.c", 966); } void Select_DrawLoadingScreen(SelectContext* this) { - s32 pad; + GraphicsContext* gfxCtx = this->state.gfxCtx; GfxPrint* printer; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; - gfxCtx = this->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 977); + OPEN_DISPS(gfxCtx, "../z_select.c", 977); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); - SET_FULLSCREEN_VIEWPORT(&this->view) + SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); func_80094140(gfxCtx); printer = alloca(sizeof(GfxPrint)); GfxPrint_Init(printer); - GfxPrint_Open(printer, gfxCtx->polyOpa.p); + GfxPrint_Open(printer, oGfxCtx->polyOpa.p); Select_PrintLoadingMessage(this, printer); - gfxCtx->polyOpa.p = GfxPrint_Close(printer); + oGfxCtx->polyOpa.p = GfxPrint_Close(printer); GfxPrint_Destroy(printer); - Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1006); + CLOSE_DISPS(gfxCtx, "../z_select.c", 1006); } void Select_Draw(SelectContext* this) { - s32 pad; - GraphicsContext* gfxCtx; - Gfx* dispRefs[4]; + GraphicsContext* gfxCtx = this->state.gfxCtx; - gfxCtx = this->state.gfxCtx; - Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 1013); + OPEN_DISPS(gfxCtx, "../z_select.c", 1013); - gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); - SET_FULLSCREEN_VIEWPORT(&this->view) + SET_FULLSCREEN_VIEWPORT(&this->view); func_800AAA50(&this->view, 0xF); if (!this->state.running) { @@ -573,7 +562,7 @@ void Select_Draw(SelectContext* this) { Select_DrawMenu(this); } - Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1037); + CLOSE_DISPS(gfxCtx, "../z_select.c", 1037); } void Select_Main(SelectContext* this) { diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 1b5b3f6b10..41cc66f636 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -69,15 +69,13 @@ void Title_Draw(TitleContext* this) { u16 y; u16 idx; - char pad1[0x4]; + s32 pad1; Vec3f v3; Vec3f v1; Vec3f v2; - char pad2[0x8]; - GraphicsContext* gfxCtx = this->state.gfxCtx; - Gfx* dispRefs[4]; + s32 pad2[2]; - Graph_OpenDisps(dispRefs, this->state.gfxCtx, "../z_title.c", 395); + OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 395); v3.x = 69; v3.y = 69; @@ -90,61 +88,62 @@ void Title_Draw(TitleContext* this) { v2.z = 1119.0837; func_8002EABC(&v1, &v2, &v3, this->state.gfxCtx); - gSPSetLights1(gfxCtx->polyOpa.p++, sTitleLights); + gSPSetLights1(oGfxCtx->polyOpa.p++, sTitleLights); Title_SetupView(this, 0, 150.0, 300.0); func_80093D18(this->state.gfxCtx); Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW); Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY); Matrix_RotateRPY(0, sTitleRotY, 0, MTXMODE_APPLY); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_01002720); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); + gSPDisplayList(oGfxCtx->polyOpa.p++, &D_01002720); func_800944C4(this->state.gfxCtx); - gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_2CYCLE); - gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP); - gDPSetCombineLERP(gfxCtx->polyOpa.p++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, + gDPPipeSync(oGfxCtx->polyOpa.p++); + gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_2CYCLE); + gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP); + gDPSetCombineLERP(oGfxCtx->polyOpa.p++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 170, 255, 255, 255); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 255, 128); + gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 170, 255, 255, 255); + gDPSetEnvColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 128); - gDPLoadMultiBlock(gfxCtx->polyOpa.p++, &D_01001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadMultiBlock(oGfxCtx->polyOpa.p++, &D_01001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 11); for (idx = 0, y = 94; idx < 16; idx++, y += 2) { - gDPLoadTextureBlock(gfxCtx->polyOpa.p++, &D_01000000[0x180 * idx], G_IM_FMT_I, G_IM_SIZ_8b, 192, 2, 0, + gDPLoadTextureBlock(oGfxCtx->polyOpa.p++, &D_01000000[0x180 * idx], G_IM_FMT_I, G_IM_SIZ_8b, 192, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->polyOpa.p++, 1, this->uls, (this->ult & 0x7F) - idx * 4, 0, 0); - gSPTextureRectangle(gfxCtx->polyOpa.p++, 388, y << 2, 1156, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); + gDPSetTileSize(oGfxCtx->polyOpa.p++, 1, this->uls, (this->ult & 0x7F) - idx * 4, 0, 0); + gSPTextureRectangle(oGfxCtx->polyOpa.p++, 388, y << 2, 1156, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); } func_8007672C(this->state.gfxCtx, 0, 0, 0, (s16)this->coverAlpha, 2); sTitleRotY += 300; - Graph_CloseDisps(dispRefs, this->state.gfxCtx, "../z_title.c", 483); + CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 483); } void Title_Main(TitleContext* this) { - GraphicsContext* gfxCtx = this->state.gfxCtx; - Gfx* dispRefs[5]; - s32 pad[2]; - Gfx* gfx; + s32 pad; - Graph_OpenDisps(dispRefs, this->state.gfxCtx, "../z_title.c", 494); + OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 494); - gSPSegment(gfxCtx->polyOpa.p++, 0, NULL); - gSPSegment(gfxCtx->polyOpa.p++, 1, this->staticSegment); + gSPSegment(oGfxCtx->polyOpa.p++, 0, NULL); + gSPSegment(oGfxCtx->polyOpa.p++, 1, this->staticSegment); func_80095248(this->state.gfxCtx, 0, 0, 0); Title_Calc(this); Title_Draw(this); + if (D_8012DBC0) { - gfx = gfxCtx->polyOpa.p; + Gfx* gfx = oGfxCtx->polyOpa.p; + s32 pad; + Title_PrintBuildInfo(&gfx); - gfxCtx->polyOpa.p = gfx; + oGfxCtx->polyOpa.p = gfx; } + if (this->exit) { gSaveContext.seqIndex = 0xFF; gSaveContext.nightSeqIndex = 0xFF; @@ -153,7 +152,7 @@ void Title_Main(TitleContext* this) { SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext); } - Graph_CloseDisps(dispRefs, this->state.gfxCtx, "../z_title.c", 541); + CLOSE_DISPS(this->state.gfxCtx, "../z_title.c", 541); } void Title_Destroy(TitleContext* this) { diff --git a/tools/m2ctx.py b/tools/m2ctx.py index 279209c709..7a35c0434c 100755 --- a/tools/m2ctx.py +++ b/tools/m2ctx.py @@ -25,7 +25,7 @@ def get_c_file(directory): def import_c_file(in_file): in_file = os.path.relpath(in_file, root_dir) - cpp_command = ["cpp", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C", + cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", in_file] try: return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") diff --git a/tools/permuter_settings.toml b/tools/permuter_settings.toml index b56a217cc5..e3ea3594fc 100644 --- a/tools/permuter_settings.toml +++ b/tools/permuter_settings.toml @@ -1,7 +1,11 @@ [preserve_macros] "g[DS]P.*" = "void" "gDma.*" = "void" +"G_IM_SIZ_.*" = "int" +"G_[AC]CMUX.*" = "int" LOG = "void" SET_FULLSCREEN_VIEWPORT = "void" +OPEN_DISPS = "void" +CLOSE_DISPS = "void" ABS = "int" SQ = "int" diff --git a/undefined_syms.txt b/undefined_syms.txt index 32b6982281..c302bae50e 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -165,6 +165,11 @@ D_060007D0 = 0x060007D0; // z_bg_spot09_obj D_06008010 = 0x06008010; +// z_bg_spot11_bakudankabe +D_06001A58 = 0x06001A58; +D_06001980 = 0x06001980; +D_0500A880 = 0x0500A880; + // z_bg_spot12_gate D_06001080 = 0x06001080; D_060011EC = 0x060011EC; @@ -302,6 +307,12 @@ D_060143A8 = 0x060143A8; // z_bg_spot17_funen D_06000B40 = 0x06000B40; +// z_bg_spot17_bakudankabe +D_06000A38 = 0x06000A38; +D_060008A0 = 0x060008A0; +D_06000960 = 0x06000960; +D_0500A880 = 0x0500A880; + // z_bg_spot00_break D_06000908 = 0x06000908; D_06000AF0 = 0x06000AF0; @@ -843,6 +854,11 @@ D_02003C80 = 0x02003C80; D_02005020 = 0x02005020; D_020024A0 = 0x020024A0; +// z_bg_jya_megami +D_06005C4C = 0x06005C4C; +D_06005780 = 0x06005780; +D_0600B9F8 = 0x0600B9F8; + // z_bg_mori_hineri D_060054B8 = 0x060054B8; D_06003490 = 0x06003490; @@ -858,6 +874,9 @@ D_0600FE40 = 0x0600FE40; D_0400CD80 = 0x0400CD80; D_040184B0 = 0x040184B0; +// z_item_ocarina +D_0200F870 = 0x0200F870; + // z_bg_ingate D_060011B8 = 0x060011B8; D_06001040 = 0x06001040; @@ -873,3 +892,7 @@ D_060006B0 = 0x060006B0; D_0600045C = 0x0600045C; D_06005EA0 = 0x06005EA0; D_0600018C = 0x0600018C; + +// z_en_dy_extra +D_0601BFB0 = 0x0601BFB0; +D_0601C160 = 0x0601C160;