Merge branch 'master' into maps

This commit is contained in:
Ethan Roseman 2020-10-31 11:44:54 -04:00
commit 54cd46a228
34 changed files with 394 additions and 587 deletions

View File

@ -1,33 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8004DA0C
/* 28E0C 8004DA0C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 28E10 8004DA10 AFB10014 */ sw $s1, 0x14($sp)
/* 28E14 8004DA14 0080882D */ daddu $s1, $a0, $zero
/* 28E18 8004DA18 AFB00010 */ sw $s0, 0x10($sp)
/* 28E1C 8004DA1C 0000802D */ daddu $s0, $zero, $zero
/* 28E20 8004DA20 1220000D */ beqz $s1, .L8004DA58
/* 28E24 8004DA24 AFBF0018 */ sw $ra, 0x18($sp)
/* 28E28 8004DA28 0C0135E5 */ jal func_8004D794
/* 28E2C 8004DA2C 00000000 */ nop
/* 28E30 8004DA30 0040202D */ daddu $a0, $v0, $zero
/* 28E34 8004DA34 50800009 */ beql $a0, $zero, .L8004DA5C
/* 28E38 8004DA38 24100002 */ addiu $s0, $zero, 2
/* 28E3C 8004DA3C 8C82001C */ lw $v0, 0x1c($a0)
/* 28E40 8004DA40 16220007 */ bne $s1, $v0, .L8004DA60
/* 28E44 8004DA44 0200102D */ daddu $v0, $s0, $zero
/* 28E48 8004DA48 0C0136AA */ jal func_8004DAA8
/* 28E4C 8004DA4C 00000000 */ nop
/* 28E50 8004DA50 08013698 */ j .L8004DA60
/* 28E54 8004DA54 0200102D */ daddu $v0, $s0, $zero
.L8004DA58:
/* 28E58 8004DA58 24100003 */ addiu $s0, $zero, 3
.L8004DA5C:
/* 28E5C 8004DA5C 0200102D */ daddu $v0, $s0, $zero
.L8004DA60:
/* 28E60 8004DA60 8FBF0018 */ lw $ra, 0x18($sp)
/* 28E64 8004DA64 8FB10014 */ lw $s1, 0x14($sp)
/* 28E68 8004DA68 8FB00010 */ lw $s0, 0x10($sp)
/* 28E6C 8004DA6C 03E00008 */ jr $ra
/* 28E70 8004DA70 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8004DAA8
/* 28EA8 8004DAA8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 28EAC 8004DAAC AFBF0010 */ sw $ra, 0x10($sp)
/* 28EB0 8004DAB0 90820221 */ lbu $v0, 0x221($a0)
/* 28EB4 8004DAB4 10400007 */ beqz $v0, .L8004DAD4
/* 28EB8 8004DAB8 24020004 */ addiu $v0, $zero, 4
/* 28EBC 8004DABC A0820221 */ sb $v0, 0x221($a0)
/* 28EC0 8004DAC0 24020001 */ addiu $v0, $zero, 1
/* 28EC4 8004DAC4 AC820010 */ sw $v0, 0x10($a0)
/* 28EC8 8004DAC8 AC820008 */ sw $v0, 8($a0)
/* 28ECC 8004DACC 0C014E86 */ jal func_80053A18
/* 28ED0 8004DAD0 2484002C */ addiu $a0, $a0, 0x2c
.L8004DAD4:
/* 28ED4 8004DAD4 8FBF0010 */ lw $ra, 0x10($sp)
/* 28ED8 8004DAD8 03E00008 */ jr $ra
/* 28EDC 8004DADC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80053A18
/* 2EE18 80053A18 A480000A */ sh $zero, 0xa($a0)
/* 2EE1C 80053A1C AC800004 */ sw $zero, 4($a0)
/* 2EE20 80053A20 03E00008 */ jr $ra
/* 2EE24 80053A24 AC80000C */ sw $zero, 0xc($a0)

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800559C4
/* 30DC4 800559C4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 30DC8 800559C8 AFBF0010 */ sw $ra, 0x10($sp)
/* 30DCC 800559CC 0C013683 */ jal func_8004DA0C
/* 30DD0 800559D0 00000000 */ nop
/* 30DD4 800559D4 8FBF0010 */ lw $ra, 0x10($sp)
/* 30DD8 800559D8 03E00008 */ jr $ra
/* 30DDC 800559DC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,88 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel _set_music_track
/* E0EE0 8014A7E0 27BDFFD0 */ addiu $sp, $sp, -0x30
/* E0EE4 8014A7E4 AFB20018 */ sw $s2, 0x18($sp)
/* E0EE8 8014A7E8 00A0902D */ daddu $s2, $a1, $zero
/* E0EEC 8014A7EC 3C058007 */ lui $a1, %hi(gGameStatusPtr)
/* E0EF0 8014A7F0 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1)
/* E0EF4 8014A7F4 AFB3001C */ sw $s3, 0x1c($sp)
/* E0EF8 8014A7F8 8FB30040 */ lw $s3, 0x40($sp)
/* E0EFC 8014A7FC AFB10014 */ sw $s1, 0x14($sp)
/* E0F00 8014A800 00C0882D */ daddu $s1, $a2, $zero
/* E0F04 8014A804 AFB50024 */ sw $s5, 0x24($sp)
/* E0F08 8014A808 00E0A82D */ daddu $s5, $a3, $zero
/* E0F0C 8014A80C AFBF0028 */ sw $ra, 0x28($sp)
/* E0F10 8014A810 AFB40020 */ sw $s4, 0x20($sp)
/* E0F14 8014A814 AFB00010 */ sw $s0, 0x10($sp)
/* E0F18 8014A818 80A20071 */ lb $v0, 0x71($a1)
/* E0F1C 8014A81C 10400003 */ beqz $v0, .L8014A82C
/* E0F20 8014A820 0260A02D */ daddu $s4, $s3, $zero
/* E0F24 8014A824 08052A3D */ j .L8014A8F4
/* E0F28 8014A828 24020001 */ addiu $v0, $zero, 1
.L8014A82C:
/* E0F2C 8014A82C 3C028016 */ lui $v0, 0x8016
/* E0F30 8014A830 24429AF0 */ addiu $v0, $v0, -0x6510
/* E0F34 8014A834 00041840 */ sll $v1, $a0, 1
/* E0F38 8014A838 00641821 */ addu $v1, $v1, $a0
/* E0F3C 8014A83C 00031900 */ sll $v1, $v1, 4
/* E0F40 8014A840 80A4007A */ lb $a0, 0x7a($a1)
/* E0F44 8014A844 14800008 */ bnez $a0, .L8014A868
/* E0F48 8014A848 00628021 */ addu $s0, $v1, $v0
/* E0F4C 8014A84C 8E040018 */ lw $a0, 0x18($s0)
/* E0F50 8014A850 0C015671 */ jal func_800559C4
/* E0F54 8014A854 00000000 */ nop
/* E0F58 8014A858 96030000 */ lhu $v1, ($s0)
/* E0F5C 8014A85C 24020001 */ addiu $v0, $zero, 1
/* E0F60 8014A860 08052A3C */ j .L8014A8F0
/* E0F64 8014A864 3063FFFE */ andi $v1, $v1, 0xfffe
.L8014A868:
/* E0F68 8014A868 0C05290C */ jal get_default_variation_for_song
/* E0F6C 8014A86C 0240202D */ daddu $a0, $s2, $zero
/* E0F70 8014A870 04430001 */ bgezl $v0, .L8014A878
/* E0F74 8014A874 0040882D */ daddu $s1, $v0, $zero
.L8014A878:
/* E0F78 8014A878 8E020010 */ lw $v0, 0x10($s0)
/* E0F7C 8014A87C 14520013 */ bne $v0, $s2, .L8014A8CC
/* E0F80 8014A880 24020001 */ addiu $v0, $zero, 1
/* E0F84 8014A884 8E020014 */ lw $v0, 0x14($s0)
/* E0F88 8014A888 14510010 */ bne $v0, $s1, .L8014A8CC
/* E0F8C 8014A88C 24020001 */ addiu $v0, $zero, 1
/* E0F90 8014A890 00132400 */ sll $a0, $s3, 0x10
/* E0F94 8014A894 0C052B21 */ jal func_8014AC84
/* E0F98 8014A898 00042403 */ sra $a0, $a0, 0x10
/* E0F9C 8014A89C 96020000 */ lhu $v0, ($s0)
/* E0FA0 8014A8A0 30420004 */ andi $v0, $v0, 4
/* E0FA4 8014A8A4 50400013 */ beql $v0, $zero, .L8014A8F4
/* E0FA8 8014A8A8 24020002 */ addiu $v0, $zero, 2
/* E0FAC 8014A8AC 8E040018 */ lw $a0, 0x18($s0)
/* E0FB0 8014A8B0 0C0156E0 */ jal func_80055B80
/* E0FB4 8014A8B4 00000000 */ nop
/* E0FB8 8014A8B8 96020000 */ lhu $v0, ($s0)
/* E0FBC 8014A8BC 3042FFFB */ andi $v0, $v0, 0xfffb
/* E0FC0 8014A8C0 A6020000 */ sh $v0, ($s0)
/* E0FC4 8014A8C4 08052A3D */ j .L8014A8F4
/* E0FC8 8014A8C8 24020002 */ addiu $v0, $zero, 2
.L8014A8CC:
/* E0FCC 8014A8CC 96030000 */ lhu $v1, ($s0)
/* E0FD0 8014A8D0 0040202D */ daddu $a0, $v0, $zero
/* E0FD4 8014A8D4 3C018016 */ lui $at, 0x8016
/* E0FD8 8014A8D8 A4349AE0 */ sh $s4, -0x6520($at)
/* E0FDC 8014A8DC AE120010 */ sw $s2, 0x10($s0)
/* E0FE0 8014A8E0 AE110014 */ sw $s1, 0x14($s0)
/* E0FE4 8014A8E4 AE150004 */ sw $s5, 4($s0)
/* E0FE8 8014A8E8 A6040002 */ sh $a0, 2($s0)
/* E0FEC 8014A8EC 3063FFFD */ andi $v1, $v1, 0xfffd
.L8014A8F0:
/* E0FF0 8014A8F0 A6030000 */ sh $v1, ($s0)
.L8014A8F4:
/* E0FF4 8014A8F4 8FBF0028 */ lw $ra, 0x28($sp)
/* E0FF8 8014A8F8 8FB50024 */ lw $s5, 0x24($sp)
/* E0FFC 8014A8FC 8FB40020 */ lw $s4, 0x20($sp)
/* E1000 8014A900 8FB3001C */ lw $s3, 0x1c($sp)
/* E1004 8014A904 8FB20018 */ lw $s2, 0x18($sp)
/* E1008 8014A908 8FB10014 */ lw $s1, 0x14($sp)
/* E100C 8014A90C 8FB00010 */ lw $s0, 0x10($sp)
/* E1010 8014A910 03E00008 */ jr $ra
/* E1014 8014A914 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,43 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014A498
/* E0B98 8014A498 27BDFFE8 */ addiu $sp, $sp, -0x18
/* E0B9C 8014A49C AFBF0010 */ sw $ra, 0x10($sp)
/* E0BA0 8014A4A0 0000282D */ daddu $a1, $zero, $zero
/* E0BA4 8014A4A4 3C068015 */ lui $a2, 0x8015
/* E0BA8 8014A4A8 24C6F6F0 */ addiu $a2, $a2, -0x910
/* E0BAC 8014A4AC 24C70030 */ addiu $a3, $a2, 0x30
/* E0BB0 8014A4B0 3C048016 */ lui $a0, 0x8016
/* E0BB4 8014A4B4 24849AF0 */ addiu $a0, $a0, -0x6510
.L8014A4B8:
/* E0BB8 8014A4B8 0080182D */ daddu $v1, $a0, $zero
/* E0BBC 8014A4BC 00C0102D */ daddu $v0, $a2, $zero
.L8014A4C0:
/* E0BC0 8014A4C0 8C480000 */ lw $t0, ($v0)
/* E0BC4 8014A4C4 8C490004 */ lw $t1, 4($v0)
/* E0BC8 8014A4C8 8C4A0008 */ lw $t2, 8($v0)
/* E0BCC 8014A4CC 8C4B000C */ lw $t3, 0xc($v0)
/* E0BD0 8014A4D0 AC680000 */ sw $t0, ($v1)
/* E0BD4 8014A4D4 AC690004 */ sw $t1, 4($v1)
/* E0BD8 8014A4D8 AC6A0008 */ sw $t2, 8($v1)
/* E0BDC 8014A4DC AC6B000C */ sw $t3, 0xc($v1)
/* E0BE0 8014A4E0 24420010 */ addiu $v0, $v0, 0x10
/* E0BE4 8014A4E4 1447FFF6 */ bne $v0, $a3, .L8014A4C0
/* E0BE8 8014A4E8 24630010 */ addiu $v1, $v1, 0x10
/* E0BEC 8014A4EC 24A50001 */ addiu $a1, $a1, 1
/* E0BF0 8014A4F0 28A20002 */ slti $v0, $a1, 2
/* E0BF4 8014A4F4 1440FFF0 */ bnez $v0, .L8014A4B8
/* E0BF8 8014A4F8 24840030 */ addiu $a0, $a0, 0x30
/* E0BFC 8014A4FC 24020008 */ addiu $v0, $zero, 8
/* E0C00 8014A500 3C018016 */ lui $at, %hi(D_80159AE2)
/* E0C04 8014A504 A4229AE2 */ sh $v0, %lo(D_80159AE2)($at)
/* E0C08 8014A508 3C018016 */ lui $at, %hi(D_80159AE4)
/* E0C0C 8014A50C A4229AE4 */ sh $v0, %lo(D_80159AE4)($at)
/* E0C10 8014A510 3C018016 */ lui $at, 0x8016
/* E0C14 8014A514 A4229AE6 */ sh $v0, -0x651a($at)
/* E0C18 8014A518 0C015869 */ jal func_800561A4
/* E0C1C 8014A51C 24040008 */ addiu $a0, $zero, 8
/* E0C20 8014A520 8FBF0010 */ lw $ra, 0x10($sp)
/* E0C24 8014A524 03E00008 */ jr $ra
/* E0C28 8014A528 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -27,7 +27,7 @@ glabel func_8014A548
/* E0C9C 8014A59C 00220821 */ addu $at, $at, $v0
/* E0CA0 8014A5A0 8C221290 */ lw $v0, 0x1290($at)
/* E0CA4 8014A5A4 00400008 */ jr $v0
/* E0CA8 8014A5A8 00000000 */ nop
/* E0CA8 8014A5A8 00000000 */ nop
/* E0CAC 8014A5AC 96230000 */ lhu $v1, ($s1)
/* E0CB0 8014A5B0 30620001 */ andi $v0, $v1, 1
/* E0CB4 8014A5B4 1040001D */ beqz $v0, .L8014A62C
@ -37,24 +37,24 @@ glabel func_8014A548
/* E0CC4 8014A5C4 1040000B */ beqz $v0, .L8014A5F4
/* E0CC8 8014A5C8 30620004 */ andi $v0, $v1, 4
/* E0CCC 8014A5CC 14400005 */ bnez $v0, .L8014A5E4
/* E0CD0 8014A5D0 00000000 */ nop
/* E0CD0 8014A5D0 00000000 */ nop
/* E0CD4 8014A5D4 0C015671 */ jal func_800559C4
/* E0CD8 8014A5D8 8E040016 */ lw $a0, 0x16($s0)
/* E0CDC 8014A5DC 08052987 */ j .L8014A61C
/* E0CE0 8014A5E0 00000000 */ nop
/* E0CE0 8014A5E0 00000000 */ nop
.L8014A5E4:
/* E0CE4 8014A5E4 0C0156BC */ jal func_80055AF0
/* E0CE8 8014A5E8 8E040016 */ lw $a0, 0x16($s0)
/* E0CEC 8014A5EC 08052987 */ j .L8014A61C
/* E0CF0 8014A5F0 00000000 */ nop
/* E0CF0 8014A5F0 00000000 */ nop
.L8014A5F4:
/* E0CF4 8014A5F4 14400006 */ bnez $v0, .L8014A610
/* E0CF8 8014A5F8 00000000 */ nop
/* E0CF8 8014A5F8 00000000 */ nop
/* E0CFC 8014A5FC 8E040016 */ lw $a0, 0x16($s0)
/* E0D00 8014A600 0C0156AF */ jal func_80055ABC
/* E0D04 8014A604 0000302D */ daddu $a2, $zero, $zero
/* E0D08 8014A608 08052987 */ j .L8014A61C
/* E0D0C 8014A60C 00000000 */ nop
/* E0D0C 8014A60C 00000000 */ nop
.L8014A610:
/* E0D10 8014A610 8E040016 */ lw $a0, 0x16($s0)
/* E0D14 8014A614 0C0156EE */ jal func_80055BB8
@ -82,7 +82,7 @@ glabel func_8014A548
/* E0D5C 8014A65C A6220000 */ sh $v0, ($s1)
/* E0D60 8014A660 8E040016 */ lw $a0, 0x16($s0)
/* E0D64 8014A664 0C01567F */ jal func_800559FC
/* E0D68 8014A668 00000000 */ nop
/* E0D68 8014A668 00000000 */ nop
/* E0D6C 8014A66C 5440004D */ bnel $v0, $zero, .L8014A7A4
/* E0D70 8014A670 26520001 */ addiu $s2, $s2, 1
/* E0D74 8014A674 96220000 */ lhu $v0, ($s1)
@ -100,7 +100,7 @@ glabel func_8014A548
/* E0DA4 8014A6A4 30620010 */ andi $v0, $v1, 0x10
/* E0DA8 8014A6A8 8E04000E */ lw $a0, 0xe($s0)
/* E0DAC 8014A6AC 04810003 */ bgez $a0, .L8014A6BC
/* E0DB0 8014A6B0 00000000 */ nop
/* E0DB0 8014A6B0 00000000 */ nop
/* E0DB4 8014A6B4 080529E8 */ j .L8014A7A0
/* E0DB8 8014A6B8 A6000000 */ sh $zero, ($s0)
.L8014A6BC:
@ -113,7 +113,7 @@ glabel func_8014A548
/* E0DD4 8014A6D4 96220000 */ lhu $v0, ($s1)
/* E0DD8 8014A6D8 30420020 */ andi $v0, $v0, 0x20
/* E0DDC 8014A6DC 1040000C */ beqz $v0, .L8014A710
/* E0DE0 8014A6E0 00000000 */ nop
/* E0DE0 8014A6E0 00000000 */ nop
/* E0DE4 8014A6E4 8602000C */ lh $v0, 0xc($s0)
/* E0DE8 8014A6E8 8607000A */ lh $a3, 0xa($s0)
/* E0DEC 8014A6EC AFA20010 */ sw $v0, 0x10($sp)
@ -128,8 +128,8 @@ glabel func_8014A548
.L8014A710:
/* E0E10 8014A710 3C048016 */ lui $a0, 0x8016
/* E0E14 8014A714 84849AE0 */ lh $a0, -0x6520($a0)
/* E0E18 8014A718 0C052B21 */ jal func_8014AC84
/* E0E1C 8014A71C 00000000 */ nop
/* E0E18 8014A718 0C052B21 */ jal transition_music_volume_to
/* E0E1C 8014A71C 00000000 */ nop
.L8014A720:
/* E0E20 8014A720 8E040016 */ lw $a0, 0x16($s0)
/* E0E24 8014A724 0C01565C */ jal func_80055970
@ -143,7 +143,7 @@ glabel func_8014A548
/* E0E44 8014A744 A6000000 */ sh $zero, ($s0)
.L8014A748:
/* E0E48 8014A748 10400005 */ beqz $v0, .L8014A760
/* E0E4C 8014A74C 00000000 */ nop
/* E0E4C 8014A74C 00000000 */ nop
/* E0E50 8014A750 A6000000 */ sh $zero, ($s0)
/* E0E54 8014A754 96220000 */ lhu $v0, ($s1)
/* E0E58 8014A758 080529E7 */ j .L8014A79C
@ -151,7 +151,7 @@ glabel func_8014A548
.L8014A760:
/* E0E60 8014A760 8E04002A */ lw $a0, 0x2a($s0)
/* E0E64 8014A764 0C0156CA */ jal func_80055B28
/* E0E68 8014A768 00000000 */ nop
/* E0E68 8014A768 00000000 */ nop
/* E0E6C 8014A76C 5440000D */ bnel $v0, $zero, .L8014A7A4
/* E0E70 8014A770 26520001 */ addiu $s2, $s2, 1
/* E0E74 8014A774 8E020022 */ lw $v0, 0x22($s0)
@ -174,7 +174,7 @@ glabel func_8014A548
/* E0EAC 8014A7AC 1440FF75 */ bnez $v0, .L8014A584
/* E0EB0 8014A7B0 26310030 */ addiu $s1, $s1, 0x30
/* E0EB4 8014A7B4 0C052B25 */ jal func_8014AC94
/* E0EB8 8014A7B8 00000000 */ nop
/* E0EB8 8014A7B8 00000000 */ nop
/* E0EBC 8014A7BC 8FBF0030 */ lw $ra, 0x30($sp)
/* E0EC0 8014A7C0 8FB5002C */ lw $s5, 0x2c($sp)
/* E0EC4 8014A7C4 8FB40028 */ lw $s4, 0x28($sp)

View File

@ -1,69 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014A964
/* E1064 8014A964 27BDFFD0 */ addiu $sp, $sp, -0x30
/* E1068 8014A968 AFB40020 */ sw $s4, 0x20($sp)
/* E106C 8014A96C 00A0A02D */ daddu $s4, $a1, $zero
/* E1070 8014A970 3C058007 */ lui $a1, %hi(gGameStatusPtr)
/* E1074 8014A974 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1)
/* E1078 8014A978 AFB3001C */ sw $s3, 0x1c($sp)
/* E107C 8014A97C 8FB30040 */ lw $s3, 0x40($sp)
/* E1080 8014A980 AFB10014 */ sw $s1, 0x14($sp)
/* E1084 8014A984 00C0882D */ daddu $s1, $a2, $zero
/* E1088 8014A988 AFB50024 */ sw $s5, 0x24($sp)
/* E108C 8014A98C AFBF0028 */ sw $ra, 0x28($sp)
/* E1090 8014A990 AFB20018 */ sw $s2, 0x18($sp)
/* E1094 8014A994 AFB00010 */ sw $s0, 0x10($sp)
/* E1098 8014A998 80A20071 */ lb $v0, 0x71($a1)
/* E109C 8014A99C 8FB20044 */ lw $s2, 0x44($sp)
/* E10A0 8014A9A0 10400003 */ beqz $v0, .L8014A9B0
/* E10A4 8014A9A4 00E0A82D */ daddu $s5, $a3, $zero
/* E10A8 8014A9A8 08052A8C */ j .L8014AA30
/* E10AC 8014A9AC 24020001 */ addiu $v0, $zero, 1
.L8014A9B0:
/* E10B0 8014A9B0 3C028016 */ lui $v0, 0x8016
/* E10B4 8014A9B4 24429AF0 */ addiu $v0, $v0, -0x6510
/* E10B8 8014A9B8 00041840 */ sll $v1, $a0, 1
/* E10BC 8014A9BC 00641821 */ addu $v1, $v1, $a0
/* E10C0 8014A9C0 00031900 */ sll $v1, $v1, 4
/* E10C4 8014A9C4 80A4007A */ lb $a0, 0x7a($a1)
/* E10C8 8014A9C8 14800008 */ bnez $a0, .L8014A9EC
/* E10CC 8014A9CC 00628021 */ addu $s0, $v1, $v0
/* E10D0 8014A9D0 8E040018 */ lw $a0, 0x18($s0)
/* E10D4 8014A9D4 0C015671 */ jal func_800559C4
/* E10D8 8014A9D8 00000000 */ nop
/* E10DC 8014A9DC 96030000 */ lhu $v1, ($s0)
/* E10E0 8014A9E0 24020001 */ addiu $v0, $zero, 1
/* E10E4 8014A9E4 08052A8B */ j .L8014AA2C
/* E10E8 8014A9E8 3063FFFE */ andi $v1, $v1, 0xfffe
.L8014A9EC:
/* E10EC 8014A9EC 0C05290C */ jal get_default_variation_for_song
/* E10F0 8014A9F0 0280202D */ daddu $a0, $s4, $zero
/* E10F4 8014A9F4 04430001 */ bgezl $v0, .L8014A9FC
/* E10F8 8014A9F8 0040882D */ daddu $s1, $v0, $zero
.L8014A9FC:
/* E10FC 8014A9FC 24020001 */ addiu $v0, $zero, 1
/* E1100 8014AA00 96030000 */ lhu $v1, ($s0)
/* E1104 8014AA04 0040202D */ daddu $a0, $v0, $zero
/* E1108 8014AA08 AE150008 */ sw $s5, 8($s0)
/* E110C 8014AA0C A613000C */ sh $s3, 0xc($s0)
/* E1110 8014AA10 A612000E */ sh $s2, 0xe($s0)
/* E1114 8014AA14 AE140010 */ sw $s4, 0x10($s0)
/* E1118 8014AA18 AE110014 */ sw $s1, 0x14($s0)
/* E111C 8014AA1C A6040002 */ sh $a0, 2($s0)
/* E1120 8014AA20 34630020 */ ori $v1, $v1, 0x20
/* E1124 8014AA24 A6030000 */ sh $v1, ($s0)
/* E1128 8014AA28 3063FFFD */ andi $v1, $v1, 0xfffd
.L8014AA2C:
/* E112C 8014AA2C A6030000 */ sh $v1, ($s0)
.L8014AA30:
/* E1130 8014AA30 8FBF0028 */ lw $ra, 0x28($sp)
/* E1134 8014AA34 8FB50024 */ lw $s5, 0x24($sp)
/* E1138 8014AA38 8FB40020 */ lw $s4, 0x20($sp)
/* E113C 8014AA3C 8FB3001C */ lw $s3, 0x1c($sp)
/* E1140 8014AA40 8FB20018 */ lw $s2, 0x18($sp)
/* E1144 8014AA44 8FB10014 */ lw $s1, 0x14($sp)
/* E1148 8014AA48 8FB00010 */ lw $s0, 0x10($sp)
/* E114C 8014AA4C 03E00008 */ jr $ra
/* E1150 8014AA50 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,57 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AA54
/* E1154 8014AA54 27BDFFE8 */ addiu $sp, $sp, -0x18
/* E1158 8014AA58 3C028016 */ lui $v0, 0x8016
/* E115C 8014AA5C 24429AF0 */ addiu $v0, $v0, -0x6510
/* E1160 8014AA60 00041840 */ sll $v1, $a0, 1
/* E1164 8014AA64 00641821 */ addu $v1, $v1, $a0
/* E1168 8014AA68 00031900 */ sll $v1, $v1, 4
/* E116C 8014AA6C 00621821 */ addu $v1, $v1, $v0
/* E1170 8014AA70 AFBF0010 */ sw $ra, 0x10($sp)
/* E1174 8014AA74 94640000 */ lhu $a0, ($v1)
/* E1178 8014AA78 30820001 */ andi $v0, $a0, 1
/* E117C 8014AA7C 10400003 */ beqz $v0, .L8014AA8C
/* E1180 8014AA80 30820002 */ andi $v0, $a0, 2
/* E1184 8014AA84 14400003 */ bnez $v0, .L8014AA94
/* E1188 8014AA88 00061400 */ sll $v0, $a2, 0x10
.L8014AA8C:
/* E118C 8014AA8C 08052AC0 */ j .L8014AB00
/* E1190 8014AA90 0000102D */ daddu $v0, $zero, $zero
.L8014AA94:
/* E1194 8014AA94 00022403 */ sra $a0, $v0, 0x10
/* E1198 8014AA98 24020001 */ addiu $v0, $zero, 1
/* E119C 8014AA9C 1082000F */ beq $a0, $v0, .L8014AADC
/* E11A0 8014AAA0 28820002 */ slti $v0, $a0, 2
/* E11A4 8014AAA4 10400005 */ beqz $v0, .L8014AABC
/* E11A8 8014AAA8 24020002 */ addiu $v0, $zero, 2
/* E11AC 8014AAAC 10800007 */ beqz $a0, .L8014AACC
/* E11B0 8014AAB0 24020001 */ addiu $v0, $zero, 1
/* E11B4 8014AAB4 08052AC0 */ j .L8014AB00
/* E11B8 8014AAB8 00000000 */ nop
.L8014AABC:
/* E11BC 8014AABC 1082000C */ beq $a0, $v0, .L8014AAF0
/* E11C0 8014AAC0 24020001 */ addiu $v0, $zero, 1
/* E11C4 8014AAC4 08052AC0 */ j .L8014AB00
/* E11C8 8014AAC8 00000000 */ nop
.L8014AACC:
/* E11CC 8014AACC 0C01580A */ jal func_80056028
/* E11D0 8014AAD0 8C640018 */ lw $a0, 0x18($v1)
/* E11D4 8014AAD4 08052AC0 */ j .L8014AB00
/* E11D8 8014AAD8 24020001 */ addiu $v0, $zero, 1
.L8014AADC:
/* E11DC 8014AADC 8C640018 */ lw $a0, 0x18($v1)
/* E11E0 8014AAE0 0C015811 */ jal func_80056044
/* E11E4 8014AAE4 00000000 */ nop
/* E11E8 8014AAE8 08052AC0 */ j .L8014AB00
/* E11EC 8014AAEC 24020001 */ addiu $v0, $zero, 1
.L8014AAF0:
/* E11F0 8014AAF0 8C640018 */ lw $a0, 0x18($v1)
/* E11F4 8014AAF4 0C01581A */ jal func_80056068
/* E11F8 8014AAF8 00000000 */ nop
/* E11FC 8014AAFC 24020001 */ addiu $v0, $zero, 1
.L8014AB00:
/* E1200 8014AB00 8FBF0010 */ lw $ra, 0x10($sp)
/* E1204 8014AB04 03E00008 */ jr $ra
/* E1208 8014AB08 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,27 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AB0C
/* E120C 8014AB0C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* E1210 8014AB10 3C028016 */ lui $v0, 0x8016
/* E1214 8014AB14 24429AF0 */ addiu $v0, $v0, -0x6510
/* E1218 8014AB18 00041840 */ sll $v1, $a0, 1
/* E121C 8014AB1C 00641821 */ addu $v1, $v1, $a0
/* E1220 8014AB20 00031900 */ sll $v1, $v1, 4
/* E1224 8014AB24 00621821 */ addu $v1, $v1, $v0
/* E1228 8014AB28 AFBF0010 */ sw $ra, 0x10($sp)
/* E122C 8014AB2C 94620000 */ lhu $v0, ($v1)
/* E1230 8014AB30 30420001 */ andi $v0, $v0, 1
/* E1234 8014AB34 10400006 */ beqz $v0, .L8014AB50
/* E1238 8014AB38 00052C00 */ sll $a1, $a1, 0x10
/* E123C 8014AB3C 8C640018 */ lw $a0, 0x18($v1)
/* E1240 8014AB40 0C015777 */ jal func_80055DDC
/* E1244 8014AB44 00052C03 */ sra $a1, $a1, 0x10
/* E1248 8014AB48 08052AD5 */ j .L8014AB54
/* E124C 8014AB4C 00000000 */ nop
.L8014AB50:
/* E1250 8014AB50 0000102D */ daddu $v0, $zero, $zero
.L8014AB54:
/* E1254 8014AB54 8FBF0010 */ lw $ra, 0x10($sp)
/* E1258 8014AB58 03E00008 */ jr $ra
/* E125C 8014AB5C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,27 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AB60
/* E1260 8014AB60 27BDFFE8 */ addiu $sp, $sp, -0x18
/* E1264 8014AB64 3C028016 */ lui $v0, 0x8016
/* E1268 8014AB68 24429AF0 */ addiu $v0, $v0, -0x6510
/* E126C 8014AB6C 00041840 */ sll $v1, $a0, 1
/* E1270 8014AB70 00641821 */ addu $v1, $v1, $a0
/* E1274 8014AB74 00031900 */ sll $v1, $v1, 4
/* E1278 8014AB78 00621821 */ addu $v1, $v1, $v0
/* E127C 8014AB7C AFBF0010 */ sw $ra, 0x10($sp)
/* E1280 8014AB80 94620000 */ lhu $v0, ($v1)
/* E1284 8014AB84 30420001 */ andi $v0, $v0, 1
/* E1288 8014AB88 10400006 */ beqz $v0, .L8014ABA4
/* E128C 8014AB8C 00052C00 */ sll $a1, $a1, 0x10
/* E1290 8014AB90 8C640018 */ lw $a0, 0x18($v1)
/* E1294 8014AB94 0C015792 */ jal func_80055E48
/* E1298 8014AB98 00052C03 */ sra $a1, $a1, 0x10
/* E129C 8014AB9C 08052AEA */ j .L8014ABA8
/* E12A0 8014ABA0 00000000 */ nop
.L8014ABA4:
/* E12A4 8014ABA4 0000102D */ daddu $v0, $zero, $zero
.L8014ABA8:
/* E12A8 8014ABA8 8FBF0010 */ lw $ra, 0x10($sp)
/* E12AC 8014ABAC 03E00008 */ jr $ra
/* E12B0 8014ABB0 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,27 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014ABB4
/* E12B4 8014ABB4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* E12B8 8014ABB8 3C028016 */ lui $v0, 0x8016
/* E12BC 8014ABBC 24429AF0 */ addiu $v0, $v0, -0x6510
/* E12C0 8014ABC0 00041840 */ sll $v1, $a0, 1
/* E12C4 8014ABC4 00641821 */ addu $v1, $v1, $a0
/* E12C8 8014ABC8 00031900 */ sll $v1, $v1, 4
/* E12CC 8014ABCC 00621821 */ addu $v1, $v1, $v0
/* E12D0 8014ABD0 AFBF0010 */ sw $ra, 0x10($sp)
/* E12D4 8014ABD4 94620000 */ lhu $v0, ($v1)
/* E12D8 8014ABD8 30420001 */ andi $v0, $v0, 1
/* E12DC 8014ABDC 10400006 */ beqz $v0, .L8014ABF8
/* E12E0 8014ABE0 00052C00 */ sll $a1, $a1, 0x10
/* E12E4 8014ABE4 8C640018 */ lw $a0, 0x18($v1)
/* E12E8 8014ABE8 0C015731 */ jal func_80055CC4
/* E12EC 8014ABEC 00052C03 */ sra $a1, $a1, 0x10
/* E12F0 8014ABF0 08052AFF */ j .L8014ABFC
/* E12F4 8014ABF4 00000000 */ nop
.L8014ABF8:
/* E12F8 8014ABF8 0000102D */ daddu $v0, $zero, $zero
.L8014ABFC:
/* E12FC 8014ABFC 8FBF0010 */ lw $ra, 0x10($sp)
/* E1300 8014AC00 03E00008 */ jr $ra
/* E1304 8014AC04 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,25 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AC08
/* E1308 8014AC08 27BDFFE0 */ addiu $sp, $sp, -0x20
/* E130C 8014AC0C 0000202D */ daddu $a0, $zero, $zero
/* E1310 8014AC10 2405FFFF */ addiu $a1, $zero, -1
/* E1314 8014AC14 0080302D */ daddu $a2, $a0, $zero
/* E1318 8014AC18 240700FA */ addiu $a3, $zero, 0xfa
/* E131C 8014AC1C AFB00018 */ sw $s0, 0x18($sp)
/* E1320 8014AC20 24100008 */ addiu $s0, $zero, 8
/* E1324 8014AC24 AFBF001C */ sw $ra, 0x1c($sp)
/* E1328 8014AC28 0C052A46 */ jal set_music_track
/* E132C 8014AC2C AFB00010 */ sw $s0, 0x10($sp)
/* E1330 8014AC30 24040001 */ addiu $a0, $zero, 1
/* E1334 8014AC34 2405FFFF */ addiu $a1, $zero, -1
/* E1338 8014AC38 0000302D */ daddu $a2, $zero, $zero
/* E133C 8014AC3C 240700FA */ addiu $a3, $zero, 0xfa
/* E1340 8014AC40 0C052A46 */ jal set_music_track
/* E1344 8014AC44 AFB00010 */ sw $s0, 0x10($sp)
/* E1348 8014AC48 8FBF001C */ lw $ra, 0x1c($sp)
/* E134C 8014AC4C 8FB00018 */ lw $s0, 0x18($sp)
/* E1350 8014AC50 24020001 */ addiu $v0, $zero, 1
/* E1354 8014AC54 03E00008 */ jr $ra
/* E1358 8014AC58 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,9 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AC5C
/* E135C 8014AC5C 24020004 */ addiu $v0, $zero, 4
/* E1360 8014AC60 3C018016 */ lui $at, %hi(D_80159AE4)
/* E1364 8014AC64 A4229AE4 */ sh $v0, %lo(D_80159AE4)($at)
/* E1368 8014AC68 03E00008 */ jr $ra
/* E136C 8014AC6C 00000000 */ nop

View File

@ -1,9 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AC70
/* E1370 8014AC70 24020008 */ addiu $v0, $zero, 8
/* E1374 8014AC74 3C018016 */ lui $at, %hi(D_80159AE4)
/* E1378 8014AC78 A4229AE4 */ sh $v0, %lo(D_80159AE4)($at)
/* E137C 8014AC7C 03E00008 */ jr $ra
/* E1380 8014AC80 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AC84
/* E1384 8014AC84 3C018016 */ lui $at, %hi(D_80159AE2)
/* E1388 8014AC88 A4249AE2 */ sh $a0, %lo(D_80159AE2)($at)
/* E138C 8014AC8C 03E00008 */ jr $ra
/* E1390 8014AC90 00000000 */ nop

View File

@ -13,15 +13,15 @@ glabel func_8014AC94
/* E13B4 8014ACB4 08052B4D */ j .L8014AD34
/* E13B8 8014ACB8 A4820000 */ sh $v0, ($a0)
.L8014ACBC:
/* E13BC 8014ACBC 3C038016 */ lui $v1, %hi(D_80159AE2)
/* E13C0 8014ACC0 84639AE2 */ lh $v1, %lo(D_80159AE2)($v1)
/* E13C4 8014ACC4 3C028016 */ lui $v0, %hi(D_80159AE4)
/* E13C8 8014ACC8 84429AE4 */ lh $v0, %lo(D_80159AE4)($v0)
/* E13CC 8014ACCC 3C048016 */ lui $a0, %hi(D_80159AE2)
/* E13D0 8014ACD0 94849AE2 */ lhu $a0, %lo(D_80159AE2)($a0)
/* E13BC 8014ACBC 3C038016 */ lui $v1, %hi(gMusicTargetVolume)
/* E13C0 8014ACC0 84639AE2 */ lh $v1, %lo(gMusicTargetVolume)($v1)
/* E13C4 8014ACC4 3C028016 */ lui $v0, %hi(gMusicUnkVolume2)
/* E13C8 8014ACC8 84429AE4 */ lh $v0, %lo(gMusicUnkVolume2)($v0)
/* E13CC 8014ACCC 3C048016 */ lui $a0, %hi(gMusicTargetVolume)
/* E13D0 8014ACD0 94849AE2 */ lhu $a0, %lo(gMusicTargetVolume)($a0)
/* E13D4 8014ACD4 0043102A */ slt $v0, $v0, $v1
/* E13D8 8014ACD8 3C038016 */ lui $v1, %hi(D_80159AE4)
/* E13DC 8014ACDC 94639AE4 */ lhu $v1, %lo(D_80159AE4)($v1)
/* E13D8 8014ACD8 3C038016 */ lui $v1, %hi(gMusicUnkVolume2)
/* E13DC 8014ACDC 94639AE4 */ lhu $v1, %lo(gMusicUnkVolume2)($v1)
/* E13E0 8014ACE0 54400001 */ bnel $v0, $zero, .L8014ACE8
/* E13E4 8014ACE4 0060202D */ daddu $a0, $v1, $zero
.L8014ACE8:
@ -41,7 +41,7 @@ glabel func_8014AC94
/* E1418 8014AD18 3C048016 */ lui $a0, 0x8016
/* E141C 8014AD1C 84849AE6 */ lh $a0, -0x651a($a0)
/* E1420 8014AD20 0C015869 */ jal func_800561A4
/* E1424 8014AD24 00000000 */ nop
/* E1424 8014AD24 00000000 */ nop
/* E1428 8014AD28 24020003 */ addiu $v0, $zero, 3
/* E142C 8014AD2C 3C018015 */ lui $at, 0x8015
/* E1430 8014AD30 A422F738 */ sh $v0, -0x8c8($at)

View File

@ -1,9 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8014AF8C
/* E168C 8014AF8C 3C028016 */ lui $v0, 0x8016
/* E1690 8014AF90 24429AF0 */ addiu $v0, $v0, -0x6510
/* E1694 8014AF94 AC44001C */ sw $a0, 0x1c($v0)
/* E1698 8014AF98 03E00008 */ jr $ra
/* E169C 8014AF9C AC450020 */ sw $a1, 0x20($v0)

View File

@ -1,32 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_default_variation_for_song
/* E0B30 8014A430 0000302D */ daddu $a2, $zero, $zero
/* E0B34 8014A434 3C078009 */ lui $a3, 0x8009
/* E0B38 8014A438 24E734F0 */ addiu $a3, $a3, 0x34f0
/* E0B3C 8014A43C 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* E0B40 8014A440 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr)
/* E0B44 8014A444 3C058015 */ lui $a1, 0x8015
/* E0B48 8014A448 24A5F720 */ addiu $a1, $a1, -0x8e0
.L8014A44C:
/* E0B4C 8014A44C 8CA20000 */ lw $v0, ($a1)
/* E0B50 8014A450 1444000C */ bne $v0, $a0, .L8014A484
/* E0B54 8014A454 24C60001 */ addiu $a2, $a2, 1
/* E0B58 8014A458 8C630000 */ lw $v1, ($v1)
/* E0B5C 8014A45C 84620086 */ lh $v0, 0x86($v1)
/* E0B60 8014A460 8463008C */ lh $v1, 0x8c($v1)
/* E0B64 8014A464 00021100 */ sll $v0, $v0, 4
/* E0B68 8014A468 00471021 */ addu $v0, $v0, $a3
/* E0B6C 8014A46C 8C420004 */ lw $v0, 4($v0)
/* E0B70 8014A470 00031940 */ sll $v1, $v1, 5
/* E0B74 8014A474 00431021 */ addu $v0, $v0, $v1
/* E0B78 8014A478 9042001E */ lbu $v0, 0x1e($v0)
/* E0B7C 8014A47C 03E00008 */ jr $ra
/* E0B80 8014A480 30420001 */ andi $v0, $v0, 1
.L8014A484:
/* E0B84 8014A484 2CC20006 */ sltiu $v0, $a2, 6
/* E0B88 8014A488 1440FFF0 */ bnez $v0, .L8014A44C
/* E0B8C 8014A48C 24A50004 */ addiu $a1, $a1, 4
/* E0B90 8014A490 03E00008 */ jr $ra
/* E0B94 8014A494 2402FFFF */ addiu $v0, $zero, -1

View File

@ -1,23 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_music_track
/* E1018 8014A918 27BDFFE0 */ addiu $sp, $sp, -0x20
/* E101C 8014A91C 3C038016 */ lui $v1, 0x8016
/* E1020 8014A920 24639AF0 */ addiu $v1, $v1, -0x6510
/* E1024 8014A924 00041040 */ sll $v0, $a0, 1
/* E1028 8014A928 00441021 */ addu $v0, $v0, $a0
/* E102C 8014A92C 00021100 */ sll $v0, $v0, 4
/* E1030 8014A930 00431021 */ addu $v0, $v0, $v1
/* E1034 8014A934 AFBF0018 */ sw $ra, 0x18($sp)
/* E1038 8014A938 94430000 */ lhu $v1, ($v0)
/* E103C 8014A93C 8FA80030 */ lw $t0, 0x30($sp)
/* E1040 8014A940 3063FFF7 */ andi $v1, $v1, 0xfff7
/* E1044 8014A944 00084400 */ sll $t0, $t0, 0x10
/* E1048 8014A948 00084403 */ sra $t0, $t0, 0x10
/* E104C 8014A94C A4430000 */ sh $v1, ($v0)
/* E1050 8014A950 0C0529F8 */ jal _set_music_track
/* E1054 8014A954 AFA80010 */ sw $t0, 0x10($sp)
/* E1058 8014A958 8FBF0018 */ lw $ra, 0x18($sp)
/* E105C 8014A95C 03E00008 */ jr $ra
/* E1060 8014A960 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -307,14 +307,18 @@ typedef struct StaticEntityData {
} StaticEntityData; // size = 0x24
typedef struct MusicPlayer {
/* 0x00 */ s16 unkFlags;
/* 0x02 */ char unk_02[2];
/* 0x00 */ u16 flags;
/* 0x02 */ u16 unk_02;
/* 0x04 */ s32 fadeOutTime;
/* 0x08 */ s32 fadeInTime;
/* 0x0C */ char unk_0C[4];
/* 0x0C */ s16 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x10 */ s32 songID;
/* 0x14 */ s32 variation;
/* 0x18 */ char unk_18[24];
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ char unk_24[12];
} MusicPlayer; // size = 0x30
typedef struct MenuIcon {

View File

@ -260,7 +260,7 @@ typedef UNK_TYPE SpriteId;
#define SpriteId_PARADE_TWINK 0x000000E8
#define SpriteId_LEAF 0x000000E9
typedef UNK_TYPE Song;
typedef s32 SongID;
#define Song_TOAD_TOWN 0x00000000
#define Song_NORMAL_BATTLE 0x00000002
#define Song_SPECIAL_BATTLE 0x00000003

View File

@ -117,7 +117,7 @@ f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta);
s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
s32 set_music_track(s32 musicPlayer, s32 songID, s32 variation, s32 unk, s32 volume);
s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
ScriptInstance* get_script_by_index(s32 index);

View File

@ -13,12 +13,19 @@
typedef Vec4f EntryList[];
/// Fields other than main, entryList, entryCount, background, and tattle are initialised when the map loads.
typedef struct MapConfig {
/* 0x00 */ char unk_00[0x10];
/* 0x00 */ ModelNode* modelTreeRoot;
/* 0x04 */ UNK_PTR collision;
/* 0x08 */ char unk_08[8];
/* 0x10 */ Script* main;
/* 0x14 */ EntryList* entryList;
/* 0x18 */ s32 entryCount;
/* 0x1C */ char unk_1C[0x1C];
/* 0x1C */ char unk_1C[12];
/* 0x28 */ char** modelNameList;
/* 0x2C */ char** colliderNameList;
/* 0x30 */ char** zoneNameList;
/* 0x34 */ char unk_34[4];
/* 0x38 */ BackgroundHeader* background;
/* 0x3C */ union {
MessageID msgID;
@ -26,6 +33,26 @@ typedef struct MapConfig {
} tattle;
} MapConfig; // size = 0x40
#define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator.
typedef struct Map {
/* 0x00 */ char* id; ///< @see MAP_ID_MAX_LEN
/* 0x04 */ MapConfig* config;
/* 0x08 */ void* dmaStart;
/* 0x0C */ void* dmaEnd;
/* 0x10 */ void* dmaDest;
/* 0x14 */ char* bgName;
/* 0x18 */ s32(*init)(void); ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading.
/* 0x1C */ s16 flags1;
/* 0x1E */ s8 flags2;
/* 0x1F */ s8 flags3;
} Map; // size = 0x20
typedef struct Area {
/* 0x00 */ s32 mapCount;
/* 0x04 */ Map* maps;
/* 0x08 */ char* id; ///< "area_xxx"
/* 0x0C */ char* name; ///< JP debug name.
} Area; // size = 0x10
typedef struct NpcAISettings {
/* 0x00 */ f32 moveSpeed;
/* 0x04 */ s32 moveTime;
@ -218,4 +245,11 @@ typedef struct {
Enemy* get_enemy(NpcId npcId);
/// Zero-terminated.
extern Area gAreas[];
/// Lists the songs that are forced to use the variation determined by `map.flags2 & 1`.
/// @see get_song_variation_override_for_cur_map
extern SongID gSongsUsingVariationFlag[6];
#endif

View File

@ -80,8 +80,6 @@ extern s32 D_8010CD20;
extern s32 D_8010EF08;
extern s32 D_8010F094; // player shadow index?
extern s32 D_801595A0;
extern s16 D_80159AE2;
extern s16 D_80159AE4;
extern BackgroundHeader gBackgroundImage;
extern PrintContext* gCurrentPrintContext;
@ -166,4 +164,11 @@ extern Bytecode* ShakeCam1;
extern Bytecode* ShakeCamX;
extern Bytecode* D_802D9D50;
extern s16 gMusicUnkVolume;
extern s16 gMusicUnkVolume2;
extern s16 gMusicCurrentVolume;
extern s16 gMusicTargetVolume;
extern MusicPlayer gMusicPlayers[4];
extern MusicPlayer D_8014F6F0;
#endif

View File

@ -4,7 +4,7 @@
if command -v apt &> /dev/null; then
echo "Installing packages for Ubuntu (apt)"
sudo apt install -y git python3 python3-pip build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1
sudo apt install -y git python3 python3-pip python3-setuptools build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1
python3 -m pip install -U -r requirements.txt
if [[ $1 == "--extra" ]]; then
@ -25,7 +25,7 @@ if command -v pacman &> /dev/null; then
sudo pacman -Syu || exit 1
# Install dependencies
sudo pacman -S --noconfirm --needed git python python-pip base-devel zlib libyaml || exit 1
sudo pacman -S --noconfirm --needed git python python-pip python-setuptools base-devel zlib libyaml || exit 1
python3 -m pip install -U -r requirements.txt
# Install binutils if required
@ -62,7 +62,7 @@ fi
if command -v zypper &> /dev/null; then
echo "Installing packages for openSUSE (zypper)"
sudo zypper -n install git python3 python3-devel python3-pip gcc gcc-c++ glibc-devel make cross-mips-binutils zlib-devel libyaml-devel
sudo zypper -n install git python3 python3-devel python3-pip python3-setuptools gcc gcc-c++ glibc-devel make cross-mips-binutils zlib-devel libyaml-devel
# Link the openSUSE locations for binutils tools to their usual GNU locations
sudo ln -s /usr/bin/mips-suse-linux-addr2line /usr/bin/mips-linux-gnu-addr2line

View File

@ -1,4 +1,4 @@
#include "common.h"
#include "code_28910_len_5090.h"
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D510);
@ -6,11 +6,41 @@ INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D794);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D7E0);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA0C);
s32 func_8004DA0C(UNK_TYPE arg0) {
s32 ret = 0;
if (arg0 != 0) {
UnkStructFor8004DAA8* unknown;
do {
unknown = func_8004D794();
} while (0);
do {
if (unknown == NULL) {
ret = 2;
} else if (arg0 == unknown->unk_01C) {
func_8004DAA8(unknown);
ret = 0;
}
} while (0);
} else {
ret = 3;
}
return ret;
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DAA8);
void func_8004DAA8(UnkStructFor8004DAA8* arg0) {
if (arg0->unk_221 != 0) {
arg0->unk_221 = 4;
arg0->unk_010 = 1;
arg0->unk_008 = 1;
func_80053A18(&arg0->unk_02C);
}
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DAE0);

22
src/code_28910_len_5090.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef _CODE_28910_LEN_5090_H_
#define _CODE_28910_LEN_5090_H_
#include "common.h"
#include "code_2e230_len_2190.h"
typedef struct {
/* 0x000 */ char unk_000[8];
/* 0x008 */ s32 unk_008;
/* 0x00C */ char unk_00C[4];
/* 0x010 */ s32 unk_010;
/* 0x014 */ char unk_014[8];
/* 0x01C */ UNK_TYPE unk_01C;
/* 0x020 */ char unk_020[0xC];
/* 0x02C */ UnkStructFor80053A18 unk_02C;
/* 0x03C */ char unk_03C[0x1E5];
/* 0x221 */ u8 unk_221;
} UnkStructFor8004DAA8; // size unknown
void func_8004DAA8(UnkStructFor8004DAA8* arg0);
#endif

View File

@ -1,4 +1,4 @@
#include "common.h"
#include "code_2e230_len_2190.h"
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80052E30);
@ -24,7 +24,11 @@ INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053974);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053A18);
void func_80053A18(UnkStructFor80053A18* arg0) {
arg0->unk_0A = 0;
arg0->unk_04 = 0;
arg0->unk_0C = 0;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053A28);

17
src/code_2e230_len_2190.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef _CODE_2E230_LEN_2190_H_
#define _CODE_2E230_LEN_2190_H_
#include "common.h"
// Probably some libultra audio thing
typedef struct UnkStructFor80053A18 {
/* 0x00 */ UNK_TYPE unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ char unk_08[2];
/* 0x0A */ u16 unk_0A;
/* 0x0C */ s32 unk_0C;
} UnkStructFor80053A18; // size unknown
void func_80053A18(UnkStructFor80053A18* arg0);
#endif

View File

@ -1,10 +1,22 @@
#include "common.h"
// TODO: rodata
extern s32 D_80078DB0;
extern u16 D_80078DB4;
INCLUDE_ASM(s32, "code_303c0_len_3e10", al_LoadBKHeaders);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055050);
#ifdef NON_MATCHING
// Delay slot (probably needs rodata)
void func_80055050(void) {
D_80078DB4 = 1;
D_80078DB0 = 0;
}
#else
INCLUDE_ASM(void, "code_303c0_len_3e10", func_80055050, void);
#endif
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055068);
INCLUDE_ASM(void, "code_303c0_len_3e10", func_80055068, u32 arg0);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055110);
@ -58,7 +70,9 @@ INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005591C);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055970);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800559C4);
s32 func_800559C4(UNK_TYPE arg0) {
return func_8004DA0C(arg0);
}
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800559E0);

View File

@ -1,38 +1,215 @@
#include "common.h"
#include "map.h"
INCLUDE_ASM(s32, "code_e0b30_len_b80", get_default_variation_for_song);
void transition_music_volume_to(s16 volume);
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498);
/// If the given song ID is present in gSongsUsingVariationFlag, returns the current
/// map's `flags2 & 1` value. Otherwise, returns -1.
///
/// @see gSongsUsingVariationFlag
/// @returns -1: no override; 0: override to variation 0; 1 override to variation 1
s32 get_song_variation_override_for_cur_map(SongID songID) {
u32 i = 0;
Area* areas = gAreas;
SongID* allowed = gSongsUsingVariationFlag;
for (i = 0; i < ARRAY_COUNT(gSongsUsingVariationFlag); i++) {
if (allowed[i] == songID) {
Map* map = &areas[GAME_STATUS->areaID].maps[GAME_STATUS->mapID];
return map->flags2 & 1;
}
}
return -1;
}
void func_8014A498(void) {
MusicPlayer* src; // TODO: remove this temp when .data section for this file (incl. D_8014F6F0) is set up
s32 i;
for (i = 0; i < 2; i++) {
MusicPlayer* musicPlayers = gMusicPlayers;
musicPlayers[i] = *(src = &D_8014F6F0);
}
gMusicTargetVolume = 8;
gMusicUnkVolume2 = 8;
gMusicCurrentVolume = 8;
func_800561A4(8);
}
void func_8014A52C(void) {
D_80159AE2 = 0x08;
D_80159AE4 = 0x08;
gMusicTargetVolume = 8;
gMusicUnkVolume2 = 8;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548);
INCLUDE_ASM(s32, "code_e0b30_len_b80", _set_music_track);
s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
GameStatus* gameStatus = GAME_STATUS;
INCLUDE_ASM(s32, "code_e0b30_len_b80", set_music_track, s32 musicPlayer, s32 songID, s32 variation, s32 unk,
s32 volume);
if (gameStatus->demoState != 0) {
return 1;
} else {
// TODO: these two lines likely a MUSIC_PLAYER(idx) macro
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A964);
if (!gameStatus->musicEnabled) {
func_800559C4(musicPlayer->unk_18);
musicPlayer->flags &= ~1;
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AA54);
return 1;
} else {
s32 override = get_song_variation_override_for_cur_map(songID);
if (override >= 0) {
variation = override;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AB0C);
if (musicPlayer->songID == songID && musicPlayer->variation == variation) {
transition_music_volume_to(volume);
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AB60);
if (musicPlayer->flags & 4) {
func_80055B80(musicPlayer->unk_18);
musicPlayer->flags &= ~4;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014ABB4);
return 2;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC08);
gMusicUnkVolume = volume;
musicPlayer->songID = songID;
musicPlayer->variation = variation;
musicPlayer->fadeOutTime = fadeOutTime;
musicPlayer->unk_02 = 1;
musicPlayer->flags &= ~2;
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC5C);
return 1;
}
}
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC70);
s32 set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
MusicPlayer* musicPlayers = gMusicPlayers;
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC84);
musicPlayers[playerIndex].flags &= ~8;
return _set_music_track(playerIndex, songID, variation, fadeOutTime, volume);
}
s32 func_8014A964(s32 playerIndex, SongID songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5) {
GameStatus* gameStatus = GAME_STATUS;
if (gameStatus->demoState != 0) {
return 1;
} else {
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
if (!gameStatus->musicEnabled) {
func_800559C4(musicPlayer->unk_18);
musicPlayer->flags &= ~1;
return 1;
} else {
s32 defaultVariation = get_song_variation_override_for_cur_map(songID);
if (defaultVariation >= 0) {
variation = defaultVariation;
}
musicPlayer->fadeInTime = fadeInTime;
musicPlayer->unk_0C = arg4;
musicPlayer->unk_0E = arg5;
musicPlayer->songID = songID;
musicPlayer->variation = variation;
musicPlayer->flags |= 0x20;
musicPlayer->unk_02 = 1;
musicPlayer->flags &= ~2;
return 1;
}
}
}
s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) {
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
if (!(musicPlayer->flags & 1)) {
return 0;
}
if (!(musicPlayer->flags & 2)) {
return 0;
}
switch (arg2) {
case 0:
func_80056028(musicPlayer->unk_18, arg1);
break;
case 1:
func_80056044(musicPlayer->unk_18, arg1);
break;
case 2:
func_80056068(musicPlayer->unk_18, arg1);
break;
}
return 1;
}
s32 func_8014AB0C(s32 playerIndex, s16 arg1) {
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
if (!(musicPlayer->flags & 1)) {
return 0;
}
return func_80055DDC(musicPlayer->unk_18, arg1);
}
s32 func_8014AB60(s32 playerIndex, s16 arg1) {
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
if (!(musicPlayer->flags & 1)) {
return 0;
}
return func_80055E48(musicPlayer->unk_18, arg1);
}
s32 func_8014ABB4(s32 playerIndex, s16 arg1) {
MusicPlayer* musicPlayers = gMusicPlayers;
MusicPlayer* musicPlayer = &musicPlayers[playerIndex];
if (!(musicPlayer->flags & 1)) {
return 0;
}
return func_80055CC4(musicPlayer->unk_18, arg1);
}
s32 func_8014AC08(void) {
set_music_track(0, -1, 0, 250, 8);
set_music_track(1, -1, 0, 250, 8);
return 1;
}
void func_8014AC5C(void) {
gMusicUnkVolume2 = 4;
}
void func_8014AC70(void) {
gMusicUnkVolume2 = 8;
}
void transition_music_volume_to(s16 volume) {
gMusicTargetVolume = volume;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94);
@ -46,7 +223,11 @@ INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AE6C);
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AEF8);
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AF8C);
void func_8014AF8C(s32 arg0, s32 arg1) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
musicPlayer->unk_1C = arg0;
musicPlayer->unk_20 = arg1;
}
void func_8014AFA0(void) {
}

View File

@ -1897,4 +1897,13 @@ gSpeakingActorPart;0x8029FA78
EnterWalk;0x80285960
EnemyNpcHit;0x80077F70
EnemyNpcDefeat;0x8007809C
D_80078DB0;0x80078DB0
D_80078DB4;0x80078DB4
gMusicPlayers;0x80159AF0
gMusicUnkVolume;0x80159AE0
gMusicUnkVolume2;0x80159AE4
gMusicTargetVolume;0x80159AE2
gMusicCurrentVolume;0x80159AE6
gAreas;0x800934F0
gSongArray;0x8014F720
D_802D9D50;0x802D9D50

View File

@ -179,8 +179,13 @@ gTriggerList2 = 0x80159290;
gCurrentTriggerListPtr = 0x80159390;
D_801595A0 = 0x801595A0;
D_80159AE2 = 0x80159AE2;
D_80159AE4 = 0x80159AE4;
gMusicUnkVolume = 0x80159AE0;
gMusicTargetVolume = 0x80159AE2;
gMusicUnkVolume2 = 0x80159AE4;
gMusicCurrentVolume = 0x80159AE6;
gMusicPlayers = 0x80159AF0;
D_8014F6F0 = 0x8014F6F0;
gCollisionStatus = 0x8015A550;
D_8015C7C0 = 0x8015C7C0;
gLastCreatedEntityIndex = 0x801512EC;
@ -262,3 +267,9 @@ ShakeCamX = 0x802D9CE8;
EnemyNpcHit = 0x80077F70;
EnemyNpcDefeat = 0x8007809C;
D_80078DB0 = 0x80078DB0;
D_80078DB4 = 0x80078DB4;
gAreas = 0x800934F0;
gSongsUsingVariationFlag = 0x8014F720;