diff --git a/asm/non_matchings/unknown_00BC20/func_8000C844.s b/asm/non_matchings/unknown_00BC20/func_8000C844.s deleted file mode 100644 index 2b9faea5..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8000C844.s +++ /dev/null @@ -1,32 +0,0 @@ -glabel func_8000C844 -/* 00D444 8000C844 3C068012 */ lui $a2, %hi(D_8011AE4C) # $a2, 0x8012 -/* 00D448 8000C848 24C6AE4C */ addiu $a2, %lo(D_8011AE4C) # addiu $a2, $a2, -0x51b4 -/* 00D44C 8000C84C 8CCE0000 */ lw $t6, ($a2) -/* 00D450 8000C850 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 00D454 8000C854 AFBF0014 */ sw $ra, 0x14($sp) -/* 00D458 8000C858 01C41021 */ addu $v0, $t6, $a0 -/* 00D45C 8000C85C 90430000 */ lbu $v1, ($v0) -/* 00D460 8000C860 00000000 */ nop -/* 00D464 8000C864 1060000F */ beqz $v1, .L8000C8A4 -/* 00D468 8000C868 246FFFFF */ addiu $t7, $v1, -1 -/* 00D46C 8000C86C A04F0000 */ sb $t7, ($v0) -/* 00D470 8000C870 8CD80000 */ lw $t8, ($a2) -/* 00D474 8000C874 3C098012 */ lui $t1, %hi(D_8011AE48) # $t1, 0x8012 -/* 00D478 8000C878 0304C821 */ addu $t9, $t8, $a0 -/* 00D47C 8000C87C 93280000 */ lbu $t0, ($t9) -/* 00D480 8000C880 00000000 */ nop -/* 00D484 8000C884 15000008 */ bnez $t0, .L8000C8A8 -/* 00D488 8000C888 8FBF0014 */ lw $ra, 0x14($sp) -/* 00D48C 8000C88C 8D29AE48 */ lw $t1, %lo(D_8011AE48)($t1) -/* 00D490 8000C890 00045080 */ sll $t2, $a0, 2 -/* 00D494 8000C894 012A5821 */ addu $t3, $t1, $t2 -/* 00D498 8000C898 8D640000 */ lw $a0, ($t3) -/* 00D49C 8000C89C 0C01C450 */ jal func_80071140 -/* 00D4A0 8000C8A0 00000000 */ nop -.L8000C8A4: -/* 00D4A4 8000C8A4 8FBF0014 */ lw $ra, 0x14($sp) -.L8000C8A8: -/* 00D4A8 8000C8A8 27BD0018 */ addiu $sp, $sp, 0x18 -/* 00D4AC 8000C8AC 03E00008 */ jr $ra -/* 00D4B0 8000C8B0 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8000E988.s b/asm/non_matchings/unknown_00BC20/func_8000E988.s deleted file mode 100644 index 38f21924..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8000E988.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel func_8000E988 -/* 00F588 8000E988 3C0E8012 */ lui $t6, %hi(D_8011AE60) # $t6, 0x8012 -/* 00F58C 8000E98C 8DCEAE60 */ lw $t6, %lo(D_8011AE60)($t6) -/* 00F590 8000E990 3C0F8012 */ lui $t7, %hi(D_8011AE5C) # $t7, 0x8012 -/* 00F594 8000E994 AC8E0000 */ sw $t6, ($a0) -/* 00F598 8000E998 8DEFAE5C */ lw $t7, %lo(D_8011AE5C)($t7) -/* 00F59C 8000E99C 3C028012 */ lui $v0, %hi(D_8011AE58) # $v0, 0x8012 -/* 00F5A0 8000E9A0 ACAF0000 */ sw $t7, ($a1) -/* 00F5A4 8000E9A4 8C42AE58 */ lw $v0, %lo(D_8011AE58)($v0) -/* 00F5A8 8000E9A8 03E00008 */ jr $ra -/* 00F5AC 8000E9AC 00000000 */ nop - -/* 00F5B0 8000E9B0 3C028012 */ lui $v0, %hi(D_8011AE5C) # $v0, 0x8012 -/* 00F5B4 8000E9B4 8C42AE5C */ lw $v0, %lo(D_8011AE5C)($v0) -/* 00F5B8 8000E9B8 03E00008 */ jr $ra -/* 00F5BC 8000E9BC 00000000 */ nop - -/* 00F5C0 8000E9C0 3C028012 */ lui $v0, %hi(D_8011AE64) # $v0, 0x8012 -/* 00F5C4 8000E9C4 8C42AE64 */ lw $v0, %lo(D_8011AE64)($v0) -/* 00F5C8 8000E9C8 03E00008 */ jr $ra -/* 00F5CC 8000E9CC 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_80012C98.s b/asm/non_matchings/unknown_00BC20/func_80012C98.s deleted file mode 100644 index a6ea3c32..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80012C98.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80012C98 -/* 013898 80012C98 3C058012 */ lui $a1, %hi(D_8011ADA4) # $a1, 0x8012 -/* 01389C 80012C9C 24A5ADA4 */ addiu $a1, %lo(D_8011ADA4) # addiu $a1, $a1, -0x525c -/* 0138A0 80012CA0 84AE0000 */ lh $t6, ($a1) -/* 0138A4 80012CA4 00000000 */ nop -/* 0138A8 80012CA8 29C10009 */ slti $at, $t6, 9 -/* 0138AC 80012CAC 1020000C */ beqz $at, .L80012CE0 -/* 0138B0 80012CB0 00000000 */ nop -/* 0138B4 80012CB4 8C830000 */ lw $v1, ($a0) -/* 0138B8 80012CB8 3C018012 */ lui $at, 0x8012 -/* 0138BC 80012CBC 246F0008 */ addiu $t7, $v1, 8 -/* 0138C0 80012CC0 AC8F0000 */ sw $t7, ($a0) -/* 0138C4 80012CC4 AC600004 */ sw $zero, 4($v1) -/* 0138C8 80012CC8 AC600000 */ sw $zero, ($v1) -/* 0138CC 80012CCC 84B90000 */ lh $t9, ($a1) -/* 0138D0 80012CD0 8C980000 */ lw $t8, ($a0) -/* 0138D4 80012CD4 00194080 */ sll $t0, $t9, 2 -/* 0138D8 80012CD8 00280821 */ addu $at, $at, $t0 -/* 0138DC 80012CDC AC38AD78 */ sw $t8, -0x5288($at) -.L80012CE0: -/* 0138E0 80012CE0 03E00008 */ jr $ra -/* 0138E4 80012CE4 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_80012CE8.s b/asm/non_matchings/unknown_00BC20/func_80012CE8.s deleted file mode 100644 index 2f97b066..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80012CE8.s +++ /dev/null @@ -1,32 +0,0 @@ -glabel func_80012CE8 -/* 0138E8 80012CE8 3C068012 */ lui $a2, %hi(D_8011ADA4) # $a2, 0x8012 -/* 0138EC 80012CEC 24C6ADA4 */ addiu $a2, %lo(D_8011ADA4) # addiu $a2, $a2, -0x525c -/* 0138F0 80012CF0 84CE0000 */ lh $t6, ($a2) -/* 0138F4 80012CF4 00000000 */ nop -/* 0138F8 80012CF8 29C10009 */ slti $at, $t6, 9 -/* 0138FC 80012CFC 10200015 */ beqz $at, .L80012D54 -/* 013900 80012D00 00000000 */ nop -/* 013904 80012D04 8C830000 */ lw $v1, ($a0) -/* 013908 80012D08 3C18B800 */ lui $t8, 0xb800 -/* 01390C 80012D0C 246F0008 */ addiu $t7, $v1, 8 -/* 013910 80012D10 AC8F0000 */ sw $t7, ($a0) -/* 013914 80012D14 AC600004 */ sw $zero, 4($v1) -/* 013918 80012D18 AC780000 */ sw $t8, ($v1) -/* 01391C 80012D1C 84D90000 */ lh $t9, ($a2) -/* 013920 80012D20 3C058012 */ lui $a1, 0x8012 -/* 013924 80012D24 00194080 */ sll $t0, $t9, 2 -/* 013928 80012D28 00A82821 */ addu $a1, $a1, $t0 -/* 01392C 80012D2C 8CA5AD78 */ lw $a1, -0x5288($a1) -/* 013930 80012D30 3C090601 */ lui $t1, 0x601 -/* 013934 80012D34 ACA9FFF8 */ sw $t1, -8($a1) -/* 013938 80012D38 8C8A0000 */ lw $t2, ($a0) -/* 01393C 80012D3C 24A5FFF8 */ addiu $a1, $a1, -8 -/* 013940 80012D40 ACAA0004 */ sw $t2, 4($a1) -/* 013944 80012D44 84CB0000 */ lh $t3, ($a2) -/* 013948 80012D48 00000000 */ nop -/* 01394C 80012D4C 256C0001 */ addiu $t4, $t3, 1 -/* 013950 80012D50 A4CC0000 */ sh $t4, ($a2) -.L80012D54: -/* 013954 80012D54 03E00008 */ jr $ra -/* 013958 80012D58 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_80012F30.s b/asm/non_matchings/unknown_00BC20/func_80012F30.s deleted file mode 100644 index e4a8e58d..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80012F30.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_80012F30 -/* 013B30 80012F30 848E0048 */ lh $t6, 0x48($a0) -/* 013B34 80012F34 24010001 */ li $at, 1 -/* 013B38 80012F38 15C10014 */ bne $t6, $at, .L80012F8C -/* 013B3C 80012F3C 00000000 */ nop -/* 013B40 80012F40 8C820064 */ lw $v0, 0x64($a0) -/* 013B44 80012F44 848F0000 */ lh $t7, ($a0) -/* 013B48 80012F48 84580160 */ lh $t8, 0x160($v0) -/* 013B4C 80012F4C 84880002 */ lh $t0, 2($a0) -/* 013B50 80012F50 01F8C823 */ subu $t9, $t7, $t8 -/* 013B54 80012F54 A4990000 */ sh $t9, ($a0) -/* 013B58 80012F58 84490162 */ lh $t1, 0x162($v0) -/* 013B5C 80012F5C 848B0004 */ lh $t3, 4($a0) -/* 013B60 80012F60 01095023 */ subu $t2, $t0, $t1 -/* 013B64 80012F64 A48A0002 */ sh $t2, 2($a0) -/* 013B68 80012F68 844C0164 */ lh $t4, 0x164($v0) -/* 013B6C 80012F6C 3C018012 */ lui $at, %hi(D_8011ADD0) # $at, 0x8012 -/* 013B70 80012F70 016C6823 */ subu $t5, $t3, $t4 -/* 013B74 80012F74 A48D0004 */ sh $t5, 4($a0) -/* 013B78 80012F78 C426ADD0 */ lwc1 $f6, %lo(D_8011ADD0)($at) -/* 013B7C 80012F7C C4840010 */ lwc1 $f4, 0x10($a0) -/* 013B80 80012F80 00000000 */ nop -/* 013B84 80012F84 46062201 */ sub.s $f8, $f4, $f6 -/* 013B88 80012F88 E4880010 */ swc1 $f8, 0x10($a0) -.L80012F8C: -/* 013B8C 80012F8C 03E00008 */ jr $ra -/* 013B90 80012F90 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_80013548.s b/asm/non_matchings/unknown_00BC20/func_80013548.s deleted file mode 100644 index 66b0dd1b..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80013548.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80013548 -/* 014148 80013548 848E0006 */ lh $t6, 6($a0) -/* 01414C 8001354C 00000000 */ nop -/* 014150 80013550 31CF8000 */ andi $t7, $t6, 0x8000 -/* 014154 80013554 15E00016 */ bnez $t7, .L800135B0 -/* 014158 80013558 00000000 */ nop -/* 01415C 8001355C 8C980040 */ lw $t8, 0x40($a0) -/* 014160 80013560 24010001 */ li $at, 1 -/* 014164 80013564 83190054 */ lb $t9, 0x54($t8) -/* 014168 80013568 00000000 */ nop -/* 01416C 8001356C 17210010 */ bne $t9, $at, .L800135B0 -/* 014170 80013570 00000000 */ nop -/* 014174 80013574 8C820064 */ lw $v0, 0x64($a0) -/* 014178 80013578 C484000C */ lwc1 $f4, 0xc($a0) -/* 01417C 8001357C C4460078 */ lwc1 $f6, 0x78($v0) -/* 014180 80013580 C48A0010 */ lwc1 $f10, 0x10($a0) -/* 014184 80013584 46062201 */ sub.s $f8, $f4, $f6 -/* 014188 80013588 C4840014 */ lwc1 $f4, 0x14($a0) -/* 01418C 8001358C E488000C */ swc1 $f8, 0xc($a0) -/* 014190 80013590 C450007C */ lwc1 $f16, 0x7c($v0) -/* 014194 80013594 00000000 */ nop -/* 014198 80013598 46105481 */ sub.s $f18, $f10, $f16 -/* 01419C 8001359C E4920010 */ swc1 $f18, 0x10($a0) -/* 0141A0 800135A0 C4460080 */ lwc1 $f6, 0x80($v0) -/* 0141A4 800135A4 00000000 */ nop -/* 0141A8 800135A8 46062201 */ sub.s $f8, $f4, $f6 -/* 0141AC 800135AC E4880014 */ swc1 $f8, 0x14($a0) -.L800135B0: -/* 0141B0 800135B0 03E00008 */ jr $ra -/* 0141B4 800135B4 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001B288.s b/asm/non_matchings/unknown_00BC20/func_8001B288.s deleted file mode 100644 index 6fcb6d7b..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001B288.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_8001B288 -/* 01BE88 8001B288 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 01BE8C 8001B28C AFBF0014 */ sw $ra, 0x14($sp) -/* 01BE90 8001B290 0C01666A */ jal func_800599A8 -/* 01BE94 8001B294 00000000 */ nop -/* 01BE98 8001B298 0C01AF62 */ jal func_8006BD88 -/* 01BE9C 8001B29C AFA2001C */ sw $v0, 0x1c($sp) -/* 01BEA0 8001B2A0 8FAE001C */ lw $t6, 0x1c($sp) -/* 01BEA4 8001B2A4 8FBF0014 */ lw $ra, 0x14($sp) -/* 01BEA8 8001B2A8 104E0003 */ beq $v0, $t6, .L8001B2B8 -/* 01BEAC 8001B2AC 3C0F8012 */ lui $t7, %hi(D_8011AE82) # $t7, 0x8012 -/* 01BEB0 8001B2B0 10000009 */ b .L8001B2D8 -/* 01BEB4 8001B2B4 00001025 */ move $v0, $zero -.L8001B2B8: -/* 01BEB8 8001B2B8 3C18800E */ lui $t8, %hi(D_800DC728) # $t8, 0x800e -/* 01BEBC 8001B2BC 8718C728 */ lh $t8, %lo(D_800DC728)($t8) -/* 01BEC0 8001B2C0 85EFAE82 */ lh $t7, %lo(D_8011AE82)($t7) -/* 01BEC4 8001B2C4 24020001 */ li $v0, 1 -/* 01BEC8 8001B2C8 11F80003 */ beq $t7, $t8, .L8001B2D8 -/* 01BECC 8001B2CC 00000000 */ nop -/* 01BED0 8001B2D0 10000001 */ b .L8001B2D8 -/* 01BED4 8001B2D4 00001025 */ move $v0, $zero -.L8001B2D8: -/* 01BED8 8001B2D8 03E00008 */ jr $ra -/* 01BEDC 8001B2DC 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/unknown_00BC20/func_8001B738.s b/asm/non_matchings/unknown_00BC20/func_8001B738.s deleted file mode 100644 index 301fabb1..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001B738.s +++ /dev/null @@ -1,20 +0,0 @@ -glabel func_8001B738 -/* 01C338 8001B738 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 01C33C 8001B73C AFBF001C */ sw $ra, 0x1c($sp) -/* 01C340 8001B740 0C01666A */ jal func_800599A8 -/* 01C344 8001B744 AFA40020 */ sw $a0, 0x20($sp) -/* 01C348 8001B748 3C0E800E */ lui $t6, %hi(D_800DC724) # $t6, 0x800e -/* 01C34C 8001B74C 85CEC724 */ lh $t6, %lo(D_800DC724)($t6) -/* 01C350 8001B750 3C06800E */ lui $a2, %hi(D_800DC728) # $a2, 0x800e -/* 01C354 8001B754 3C07800E */ lui $a3, %hi(D_800DC72C) # $a3, 0x800e -/* 01C358 8001B758 84E7C72C */ lh $a3, %lo(D_800DC72C)($a3) -/* 01C35C 8001B75C 84C6C728 */ lh $a2, %lo(D_800DC728)($a2) -/* 01C360 8001B760 8FA40020 */ lw $a0, 0x20($sp) -/* 01C364 8001B764 00402825 */ move $a1, $v0 -/* 01C368 8001B768 0C0166DF */ jal func_80059B7C -/* 01C36C 8001B76C AFAE0010 */ sw $t6, 0x10($sp) -/* 01C370 8001B770 8FBF001C */ lw $ra, 0x1c($sp) -/* 01C374 8001B774 27BD0020 */ addiu $sp, $sp, 0x20 -/* 01C378 8001B778 03E00008 */ jr $ra -/* 01C37C 8001B77C 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001BAC8.s b/asm/non_matchings/unknown_00BC20/func_8001BAC8.s deleted file mode 100644 index e51c01d8..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001BAC8.s +++ /dev/null @@ -1,27 +0,0 @@ -glabel func_8001BAC8 -/* 01C6C8 8001BAC8 3C028012 */ lui $v0, %hi(D_8011AEF0) # $v0, 0x8012 -/* 01C6CC 8001BACC 8C42AEF0 */ lw $v0, %lo(D_8011AEF0)($v0) -/* 01C6D0 8001BAD0 00000000 */ nop -/* 01C6D4 8001BAD4 14400003 */ bnez $v0, .L8001BAE4 -/* 01C6D8 8001BAD8 00000000 */ nop -/* 01C6DC 8001BADC 03E00008 */ jr $ra -/* 01C6E0 8001BAE0 00001025 */ move $v0, $zero - -.L8001BAE4: -/* 01C6E4 8001BAE4 04800003 */ bltz $a0, .L8001BAF4 -/* 01C6E8 8001BAE8 0082082A */ slt $at, $a0, $v0 -/* 01C6EC 8001BAEC 14200003 */ bnez $at, .L8001BAFC -/* 01C6F0 8001BAF0 3C0E8012 */ lui $t6, 0x8012 -.L8001BAF4: -/* 01C6F4 8001BAF4 03E00008 */ jr $ra -/* 01C6F8 8001BAF8 00001025 */ move $v0, $zero - -.L8001BAFC: -/* 01C6FC 8001BAFC 8DCEAEE4 */ lw $t6, -0x511c($t6) -/* 01C700 8001BB00 00047880 */ sll $t7, $a0, 2 -/* 01C704 8001BB04 01CFC021 */ addu $t8, $t6, $t7 -/* 01C708 8001BB08 8F020000 */ lw $v0, ($t8) -/* 01C70C 8001BB0C 00000000 */ nop -/* 01C710 8001BB10 03E00008 */ jr $ra -/* 01C714 8001BB14 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001D1BC.s b/asm/non_matchings/unknown_00BC20/func_8001D1BC.s deleted file mode 100644 index 97abfecd..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001D1BC.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_8001D1BC -/* 01DDBC 8001D1BC 3C038012 */ lui $v1, %hi(D_8011AF08) # $v1, 0x8012 -/* 01DDC0 8001D1C0 2463AF08 */ addiu $v1, %lo(D_8011AF08) # addiu $v1, $v1, -0x50f8 -/* 01DDC4 8001D1C4 8C620000 */ lw $v0, ($v1) -/* 01DDC8 8001D1C8 00000000 */ nop -/* 01DDCC 8001D1CC 10820003 */ beq $a0, $v0, .L8001D1DC -/* 01DDD0 8001D1D0 00000000 */ nop -/* 01DDD4 8001D1D4 AC620004 */ sw $v0, 4($v1) -/* 01DDD8 8001D1D8 AC640000 */ sw $a0, ($v1) -.L8001D1DC: -/* 01DDDC 8001D1DC 03E00008 */ jr $ra -/* 01DDE0 8001D1E0 00000000 */ nop - -/* 01DDE4 8001D1E4 3C038012 */ lui $v1, %hi(D_8011AF08) # $v1, 0x8012 -/* 01DDE8 8001D1E8 2463AF08 */ addiu $v1, %lo(D_8011AF08) # addiu $v1, $v1, -0x50f8 -/* 01DDEC 8001D1EC 8C6E0004 */ lw $t6, 4($v1) -/* 01DDF0 8001D1F0 3C0F8012 */ lui $t7, %hi(D_8011AF04) # $t7, 0x8012 -/* 01DDF4 8001D1F4 AC8E0000 */ sw $t6, ($a0) -/* 01DDF8 8001D1F8 8C780004 */ lw $t8, 4($v1) -/* 01DDFC 8001D1FC 8DEFAF04 */ lw $t7, %lo(D_8011AF04)($t7) -/* 01DE00 8001D200 0018C880 */ sll $t9, $t8, 2 -/* 01DE04 8001D204 01F94021 */ addu $t0, $t7, $t9 -/* 01DE08 8001D208 8D020000 */ lw $v0, ($t0) -/* 01DE0C 8001D20C 03E00008 */ jr $ra -/* 01DE10 8001D210 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001E29C.s b/asm/non_matchings/unknown_00BC20/func_8001E29C.s deleted file mode 100644 index a7b62abb..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001E29C.s +++ /dev/null @@ -1,25 +0,0 @@ -glabel func_8001E29C -/* 01EE9C 8001E29C 04800006 */ bltz $a0, .L8001E2B8 -/* 01EEA0 8001E2A0 3C0E8012 */ lui $t6, %hi(D_8011ADA0) # $t6, 0x8012 -/* 01EEA4 8001E2A4 8DCEADA0 */ lw $t6, %lo(D_8011ADA0)($t6) -/* 01EEA8 8001E2A8 3C0F8012 */ lui $t7, 0x8012 -/* 01EEAC 8001E2AC 008E082A */ slt $at, $a0, $t6 -/* 01EEB0 8001E2B0 14200005 */ bnez $at, .L8001E2C8 -/* 01EEB4 8001E2B4 0004C080 */ sll $t8, $a0, 2 -.L8001E2B8: -/* 01EEB8 8001E2B8 3C028012 */ lui $v0, %hi(D_8011AD6C) # $v0, 0x8012 -/* 01EEBC 8001E2BC 8C42AD6C */ lw $v0, %lo(D_8011AD6C)($v0) -/* 01EEC0 8001E2C0 03E00008 */ jr $ra -/* 01EEC4 8001E2C4 00000000 */ nop - -.L8001E2C8: -/* 01EEC8 8001E2C8 8DEFAD70 */ lw $t7, -0x5290($t7) -/* 01EECC 8001E2CC 3C0A8012 */ lui $t2, %hi(D_8011AD6C) # $t2, 0x8012 -/* 01EED0 8001E2D0 01F8C821 */ addu $t9, $t7, $t8 -/* 01EED4 8001E2D4 8F280000 */ lw $t0, ($t9) -/* 01EED8 8001E2D8 8D4AAD6C */ lw $t2, %lo(D_8011AD6C)($t2) -/* 01EEDC 8001E2DC 00084880 */ sll $t1, $t0, 2 -/* 01EEE0 8001E2E0 012A1021 */ addu $v0, $t1, $t2 -/* 01EEE4 8001E2E4 03E00008 */ jr $ra -/* 01EEE8 8001E2E8 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001E2EC.s b/asm/non_matchings/unknown_00BC20/func_8001E2EC.s deleted file mode 100644 index 7320bb8a..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001E2EC.s +++ /dev/null @@ -1,27 +0,0 @@ -glabel func_8001E2EC -/* 01EEEC 8001E2EC 04800012 */ bltz $a0, .L8001E338 -/* 01EEF0 8001E2F0 28810008 */ slti $at, $a0, 8 -/* 01EEF4 8001E2F4 10200010 */ beqz $at, .L8001E338 -/* 01EEF8 8001E2F8 3C0E8012 */ lui $t6, %hi(D_8011ADCC) # $t6, 0x8012 -/* 01EEFC 8001E2FC 8DCEADCC */ lw $t6, %lo(D_8011ADCC)($t6) -/* 01EF00 8001E300 3C188012 */ lui $t8, %hi(D_8011ADCC) # $t8, 0x8012 -/* 01EF04 8001E304 01C41021 */ addu $v0, $t6, $a0 -/* 01EF08 8001E308 80430000 */ lb $v1, ($v0) -/* 01EF0C 8001E30C 00000000 */ nop -/* 01EF10 8001E310 18600007 */ blez $v1, .L8001E330 -/* 01EF14 8001E314 246FFFFF */ addiu $t7, $v1, -1 -/* 01EF18 8001E318 A04F0000 */ sb $t7, ($v0) -/* 01EF1C 8001E31C 8F18ADCC */ lw $t8, %lo(D_8011ADCC)($t8) -/* 01EF20 8001E320 00000000 */ nop -/* 01EF24 8001E324 0304C821 */ addu $t9, $t8, $a0 -/* 01EF28 8001E328 83230000 */ lb $v1, ($t9) -/* 01EF2C 8001E32C 00000000 */ nop -.L8001E330: -/* 01EF30 8001E330 03E00008 */ jr $ra -/* 01EF34 8001E334 00601025 */ move $v0, $v1 - -.L8001E338: -/* 01EF38 8001E338 00001025 */ move $v0, $zero -/* 01EF3C 8001E33C 03E00008 */ jr $ra -/* 01EF40 8001E340 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_8001E45C.s b/asm/non_matchings/unknown_00BC20/func_8001E45C.s deleted file mode 100644 index 124a6894..00000000 --- a/asm/non_matchings/unknown_00BC20/func_8001E45C.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_8001E45C -/* 01F05C 8001E45C 3C028012 */ lui $v0, %hi(D_8011AE7A) # $v0, 0x8012 -/* 01F060 8001E460 2442AE7A */ addiu $v0, %lo(D_8011AE7A) # addiu $v0, $v0, -0x5186 -/* 01F064 8001E464 844E0000 */ lh $t6, ($v0) -/* 01F068 8001E468 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 01F06C 8001E46C 108E000D */ beq $a0, $t6, .L8001E4A4 -/* 01F070 8001E470 AFBF0014 */ sw $ra, 0x14($sp) -/* 01F074 8001E474 A4440000 */ sh $a0, ($v0) -/* 01F078 8001E478 3C018012 */ lui $at, %hi(D_8011ADAC) # $at, 0x8012 -/* 01F07C 8001E47C AC20ADAC */ sw $zero, %lo(D_8011ADAC)($at) -/* 01F080 8001E480 3C018012 */ lui $at, %hi(D_8011AE7E) # $at, 0x8012 -/* 01F084 8001E484 240F0001 */ li $t7, 1 -/* 01F088 8001E488 0C01B683 */ jal func_8006DA0C -/* 01F08C 8001E48C A02FAE7E */ sb $t7, %lo(D_8011AE7E)($at) -/* 01F090 8001E490 24010001 */ li $at, 1 -/* 01F094 8001E494 14410004 */ bne $v0, $at, .L8001E4A8 -/* 01F098 8001E498 8FBF0014 */ lw $ra, 0x14($sp) -/* 01F09C 8001E49C 0C01BD0B */ jal func_8006F42C -/* 01F0A0 8001E4A0 00000000 */ nop -.L8001E4A4: -/* 01F0A4 8001E4A4 8FBF0014 */ lw $ra, 0x14($sp) -.L8001E4A8: -/* 01F0A8 8001E4A8 27BD0018 */ addiu $sp, $sp, 0x18 -/* 01F0AC 8001E4AC 03E00008 */ jr $ra -/* 01F0B0 8001E4B0 00000000 */ nop - -/* 01F0B4 8001E4B4 3C028012 */ lui $v0, %hi(D_8011AE60) # $v0, 0x8012 -/* 01F0B8 8001E4B8 8C42AE60 */ lw $v0, %lo(D_8011AE60)($v0) -/* 01F0BC 8001E4BC 03E00008 */ jr $ra -/* 01F0C0 8001E4C0 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_800214C4.s b/asm/non_matchings/unknown_00BC20/func_800214C4.s deleted file mode 100644 index b82c1621..00000000 --- a/asm/non_matchings/unknown_00BC20/func_800214C4.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel func_800214C4 -/* 0220C4 800214C4 3C0E8012 */ lui $t6, %hi(D_8011AD21) # $t6, 0x8012 -/* 0220C8 800214C8 81CEAD21 */ lb $t6, %lo(D_8011AD21)($t6) -/* 0220CC 800214CC 3C028012 */ lui $v0, 0x8012 -/* 0220D0 800214D0 000E7823 */ negu $t7, $t6 -/* 0220D4 800214D4 004F1021 */ addu $v0, $v0, $t7 -/* 0220D8 800214D8 8042AD23 */ lb $v0, -0x52dd($v0) -/* 0220DC 800214DC 03E00008 */ jr $ra -/* 0220E0 800214E0 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_800228B0.s b/asm/non_matchings/unknown_00BC20/func_800228B0.s index 66557ada..f68b5b4a 100644 --- a/asm/non_matchings/unknown_00BC20/func_800228B0.s +++ b/asm/non_matchings/unknown_00BC20/func_800228B0.s @@ -10,9 +10,3 @@ glabel func_800228B0 /* 0234D0 800228D0 E4E20000 */ swc1 $f2, ($a3) /* 0234D4 800228D4 03E00008 */ jr $ra /* 0234D8 800228D8 46086000 */ add.s $f0, $f12, $f8 - -/* 0234DC 800228DC AFA40000 */ sw $a0, ($sp) -/* 0234E0 800228E0 AFA50004 */ sw $a1, 4($sp) -/* 0234E4 800228E4 03E00008 */ jr $ra -/* 0234E8 800228E8 AFA60008 */ sw $a2, 8($sp) - diff --git a/asm/non_matchings/unknown_00BC20/func_800228EC.s b/asm/non_matchings/unknown_00BC20/func_800228EC.s deleted file mode 100644 index 7cba00a9..00000000 --- a/asm/non_matchings/unknown_00BC20/func_800228EC.s +++ /dev/null @@ -1,25 +0,0 @@ -glabel func_800228EC -/* 0234EC 800228EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0234F0 800228F0 AFBF0014 */ sw $ra, 0x14($sp) -/* 0234F4 800228F4 AFA40018 */ sw $a0, 0x18($sp) -/* 0234F8 800228F8 240E0003 */ li $t6, 3 -/* 0234FC 800228FC 3C018012 */ lui $at, %hi(D_8011AEF7) # $at, 0x8012 -/* 023500 80022900 A02EAEF7 */ sb $t6, %lo(D_8011AEF7)($at) -/* 023504 80022904 0C006EB2 */ jal func_8001BAC8 -/* 023508 80022908 00002025 */ move $a0, $zero -/* 02350C 8002290C 8C430064 */ lw $v1, 0x64($v0) -/* 023510 80022910 00000000 */ nop -/* 023514 80022914 A4600190 */ sh $zero, 0x190($v1) -/* 023518 80022918 A0600192 */ sb $zero, 0x192($v1) -/* 02351C 8002291C A0600193 */ sb $zero, 0x193($v1) -/* 023520 80022920 A46001BA */ sh $zero, 0x1ba($v1) -/* 023524 80022924 8FA40018 */ lw $a0, 0x18($sp) -/* 023528 80022928 0C005F9D */ jal func_80017E74 -/* 02352C 8002292C 00000000 */ nop -/* 023530 80022930 0C01BCE2 */ jal func_8006F388 -/* 023534 80022934 2404000A */ li $a0, 10 -/* 023538 80022938 8FBF0014 */ lw $ra, 0x14($sp) -/* 02353C 8002293C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 023540 80022940 03E00008 */ jr $ra -/* 023544 80022944 00000000 */ nop - diff --git a/asm/non_matchings/unknown_00BC20/func_80023568.s b/asm/non_matchings/unknown_00BC20/func_80023568.s deleted file mode 100644 index 7309694e..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80023568.s +++ /dev/null @@ -1,27 +0,0 @@ -glabel func_80023568 -/* 024168 80023568 3C0E8012 */ lui $t6, %hi(D_8011AD3C) # $t6, 0x8012 -/* 02416C 8002356C 81CEAD3C */ lb $t6, %lo(D_8011AD3C)($t6) -/* 024170 80023570 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 024174 80023574 11C00005 */ beqz $t6, .L8002358C -/* 024178 80023578 AFBF0014 */ sw $ra, 0x14($sp) -/* 02417C 8002357C 3C028012 */ lui $v0, %hi(D_80120001) # $v0, 0x8012 -/* 024180 80023580 8042AD25 */ lb $v0, %lo(D_8011AD25)($v0) -/* 024184 80023584 1000000A */ b .L800235B0 -/* 024188 80023588 24420001 */ addiu $v0, %lo(D_80120001) # addiu $v0, $v0, 1 -.L8002358C: -/* 02418C 8002358C 0C01AF66 */ jal func_8006BD98 -/* 024190 80023590 00000000 */ nop -/* 024194 80023594 24010008 */ li $at, 8 -/* 024198 80023598 14410004 */ bne $v0, $at, .L800235AC -/* 02419C 8002359C 3C028012 */ lui $v0, %hi(D_80120001) # $v0, 0x8012 -/* 0241A0 800235A0 8042AD25 */ lb $v0, %lo(D_8011AD25)($v0) -/* 0241A4 800235A4 10000002 */ b .L800235B0 -/* 0241A8 800235A8 24420001 */ addiu $v0, %lo(D_80120001) # addiu $v0, $v0, 1 -.L800235AC: -/* 0241AC 800235AC 00001025 */ move $v0, $zero -.L800235B0: -/* 0241B0 800235B0 8FBF0014 */ lw $ra, 0x14($sp) -/* 0241B4 800235B4 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0241B8 800235B8 03E00008 */ jr $ra -/* 0241BC 800235BC 00000000 */ nop - diff --git a/include/structs.h b/include/structs.h index 2053af0d..6a4b3ddd 100644 --- a/include/structs.h +++ b/include/structs.h @@ -172,7 +172,8 @@ typedef struct Player_3C { typedef struct Player_40 { u8 pad0[0xC]; f32 unkC; - u8 pad10[0x45]; + u8 pad10[0x44]; + s8 unk54; s8 unk55; } Player_40; @@ -207,14 +208,28 @@ typedef struct Player_64 { s32 unk30; s16 unk34; s8 unk36; + u8 pad37[0x41]; + f32 unk78; + f32 unk7C; + f32 unk80; + u8 pad84[0xDC]; + s16 unk160; + s16 unk162; + s16 unk164; + u8 pad166[0x2A]; + u16 unk190; + u8 unk192; + u8 unk193; + u8 pad194[0x26]; + u16 unk1BA; } Player_64; /* Size: 0x0630 bytes */ typedef struct Player { - /* 0x0000 */ u16 y_rotation; - /* 0x0002 */ u16 x_rotation; - /* 0x0004 */ u16 z_rotation; - /* 0x0006 */ u16 unk6; + /* 0x0000 */ s16 y_rotation; + /* 0x0002 */ s16 x_rotation; + /* 0x0004 */ s16 z_rotation; + /* 0x0006 */ s16 unk6; /* 0x0008 */ f32 scale; /* 0x000C */ f32 x_position; /* 0x0010 */ f32 y_position; @@ -226,7 +241,7 @@ typedef struct Player { /* 0x0024 */ f32 z_velocity; /* 0x0028 */ u32 unk28; - /* 0x002C */ u16 unk2C; + /* 0x002C */ s16 unk2C; /* 0x002E */ s16 unk2E; /* 0x0030 */ f32 unk30; @@ -240,7 +255,7 @@ typedef struct Player { /* 0x0040 */ Player_40 *descriptor_ptr; /* 0x0044 */ void *unk44; - /* 0x0048 */ u16 unk48; + /* 0x0048 */ s16 unk48; /* 0x004A */ u16 unk4A; /* 0x004C */ Player_4C *unk4C; //player + 0x318 /* 0x0050 */ void *unk50; //player + 0x2F4 diff --git a/src/mips1/unknown_00BC20.c b/src/mips1/unknown_00BC20.c index a7dd8ff8..40c056cb 100644 --- a/src/mips1/unknown_00BC20.c +++ b/src/mips1/unknown_00BC20.c @@ -3,11 +3,16 @@ #include "types.h" #include "macros.h" +#include "structs.h" +#include "fast3d.h" extern s32 D_800DC700; extern s16 D_800DC708; extern s32 D_800DC718; extern s8 D_800DC71C; +extern s16 D_800DC724; +extern s16 D_800DC728; +extern s16 D_800DC72C; extern u8 D_800DC730; extern u8 D_800DC738; extern s8 D_800DC73C; @@ -18,32 +23,45 @@ extern s8 D_800DC848; extern s16 D_8011AC20[12]; extern s16 D_8011AD4E; -extern s8 D_8011AD20; +extern s8 D_8011AD20[4]; extern s8 D_8011AD21; extern s8 D_8011AD22; -extern s8 D_8011AD23; +extern s8 D_8011AD25; extern s32 D_8011AD34; +extern s8 D_8011AD3C; extern s8 D_8011AD3D; extern s8 D_8011AD50; extern s8 D_8011AD51; extern s8 D_8011AD52; extern s8 D_8011AD53; +extern s32 *D_8011AD6C; +extern s32 *D_8011AD70; +extern Gfx *D_8011AD78[9]; +extern s32 D_8011ADA0; extern s16 D_8011ADA4; extern s32 D_8011ADAC; extern s32 D_8011ADB0; extern s32 D_8011ADB8; extern s32 D_8011ADBC; extern s32 D_8011ADC8; -extern u8* D_8011ADCC[8]; +extern s8 *D_8011ADCC[8]; +extern f32 D_8011ADD0; extern s8 D_8011ADD4; extern s8 D_8011ADD5; extern s8 D_8011AE02; extern s8 D_8011AE03; -u32* D_8011AE08[16]; -extern u32* D_8011AE58[64]; // Not sure about the number of elements +u32 *D_8011AE08[16]; +extern s32 (*D_8011AE48)[8]; // Unknown number of entries. +extern u8 (*D_8011AE4C)[8]; // Unknown number of entries. +extern u32 *D_8011AE58[64]; // Not sure about the number of elements extern s32 D_8011AE5C; +extern s32 D_8011AE60; +extern s32 D_8011AE64; extern s16 D_8011AE78; extern s16 D_8011AE7A; +extern u8 D_8011AE7E; +extern s16 D_8011AE82; +extern u8 D_8011AEF7; /* Size: 0x3C bytes */ typedef struct unknown8011AECC { @@ -55,15 +73,16 @@ extern unknown8011AECC* D_8011AECC; // Array of structs, unknown number of membe extern s32 D_8011AED0; extern s16 D_8011AED8; -extern u32* D_8011AEDC[64]; // Not sure about the number of elements +extern u32 *D_8011AEDC[64]; // Not sure about the number of elements extern s32 D_8011AEE0; -extern s32 D_8011AEE4; +extern Player *(*D_8011AEE4)[8]; extern s32 D_8011AEE8; extern s32 D_8011AEEC; extern s32 D_8011AEF0; extern u8 D_8011AEF4; extern u8 D_8011AEF6; extern u32* D_8011AF04[64]; // Not sure about the number of elements +extern s32 D_8011AF08[2]; extern s32 D_8011AF10; /* Size: 0x40 bytes */ @@ -110,7 +129,15 @@ GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000C2D8.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000C460.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000C604.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000C718.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000C844.s") + +void func_8000C844(s32 arg0) { + if ((*D_8011AE4C)[arg0] != 0) { + (*D_8011AE4C)[arg0]--; + if ((*D_8011AE4C)[arg0] == 0) { + func_80071140((*D_8011AE48)[arg0]); + } + } +} s32 func_8000C8B4(s32 arg0) { if (osTvType != 0 || arg0 < 0) { @@ -131,7 +158,21 @@ void func_8000CBC0(void) { } } +#if 1 GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000CBF0.s") +#else +void func_8000CBF0(u32 *arg0, s32 arg1) { + u32 **temp = &D_8011AE08[arg1]; + u32 *temp2; + temp2 = *temp; + if (temp2 != NULL) { + return; + } + D_8011AE08[arg1] = arg0; + return; // I can't get this second return to appear. +} +#endif + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000CC20.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000CC7C.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000E0B0.s") @@ -141,7 +182,7 @@ void func_8000E128(void) { } s8 func_8000E138() { - return D_8011AD20; + return D_8011AD20[0]; } s8 func_8000E148() { @@ -199,8 +240,24 @@ u32 func_8000E948(s32 arg0) { return D_8011AE58[0][arg0]; } -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000E988.s") +u32 *func_8000E988(s32 *arg0, s32 *arg1) { + *arg0 = D_8011AE60; + *arg1 = D_8011AE5C; + return D_8011AE58[0]; +} + +// Unused? +s32 func_8000E9B0(void) { + return D_8011AE5C; +} + +// Unused? +s32 func_8000E9C0(void) { + return D_8011AE64; +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000E9D0.s") + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000EA54.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000F648.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8000F758.s") @@ -281,14 +338,46 @@ void func_80012C30(void) { } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012C3C.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012C98.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012CE8.s") + +void func_80012C98(Gfx **dlist) { + if (D_8011ADA4 < 9) { + fast3d_cmd((*dlist)++, 0x00000000, 0x00000000); // Fast3D NOP + D_8011AD78[D_8011ADA4] = *dlist; + } +} + +void func_80012CE8(Gfx **dlist) { + if (D_8011ADA4 < 9) { + fast3d_cmd((*dlist)++, 0xB8000000, 0x00000000); // End display list + fast3d_cmd(D_8011AD78[D_8011ADA4] - 1, 0x6010000, (u32)*dlist); // Jump to display list + D_8011ADA4++; + } +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012D5C.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012E28.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012F30.s") + +void func_80012F30(Player *arg0) { + if (arg0->unk48 == 1) { + Player_64 *player_64 = arg0->unk64; + arg0->y_rotation -= player_64->unk160; + arg0->x_rotation -= player_64->unk162; + arg0->z_rotation -= player_64->unk164; + arg0->y_position -= D_8011ADD0; + } +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80012F94.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001348C.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80013548.s") + +void func_80013548(Player *arg0) { + if ((arg0->unk6 & 0x8000) == 0 && arg0->descriptor_ptr->unk54 == 1) { + arg0->x_position -= arg0->unk64->unk78; + arg0->y_position -= arg0->unk64->unk7C; + arg0->z_position -= arg0->unk64->unk80; + } +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800135B8.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800138A8.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80013A0C.s") @@ -309,10 +398,9 @@ GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80016DE8.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001709C.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80017248.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001790C.s") + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80017978.s") - -//GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800179D0.s") u32 func_800179D0(void) { s16 i = 0; while(i < 16) { @@ -335,7 +423,6 @@ s16 func_80017E88(void) { return D_8011AED8; } - GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80017E98.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800185E4.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80018C6C.s") @@ -361,7 +448,19 @@ s32 func_8001AE54() { } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001AE64.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001B288.s") + +s32 func_8001B288(void) { + if (func_800599A8() != func_8006BD88()) { + return 0; + } else { + if (D_800DC728 != D_8011AE82) { + return 0; + } else { + return 1; + } + } +} + s32 func_8001B2E0() { return D_8011AD34; @@ -385,7 +484,10 @@ s32 func_8001B650(void) { } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001B668.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001B738.s") + +void func_8001B738(s32 arg0) { + func_80059B7C(arg0, func_800599A8(), D_800DC728, D_800DC72C, D_800DC724); +} u8 func_8001B780() { return D_800DC730; @@ -416,9 +518,9 @@ s32 func_8001BA64() { return D_8011AED0; } -s32 func_8001BA74(s32 *arg0) { +Player **func_8001BA74(s32 *arg0) { *arg0 = D_8011AEF0; - return D_8011AEE4; + return *D_8011AEE4; } s32 func_8001BA90(s32 *arg0) { @@ -431,7 +533,16 @@ s32 func_8001BAAC(s32 *arg0) { return D_8011AEE8; } -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001BAC8.s") +Player *func_8001BAC8(s32 arg0) { + if (D_8011AEF0 == 0) { + return NULL; + } + if(arg0 < 0 || arg0 >= D_8011AEF0) { + return NULL; + } + return (*D_8011AEE4)[arg0]; +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001BB18.s") void func_8001BC40(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { @@ -460,7 +571,17 @@ void func_8001D1AC(void) { D_8011AF10 = 1; } -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001D1BC.s") +void func_8001D1BC(s32 arg0) { + if (arg0 != D_8011AF08[0]) { + D_8011AF08[1] = D_8011AF08[0]; + D_8011AF08[0] = arg0; + } +} + +u32 func_8001D1E4(s32 *arg0) { + *arg0 = D_8011AF08[1]; + return D_8011AF04[0][D_8011AF08[1]]; +} u32 func_8001D214(s32 arg0) { if (arg0 >= 0 && arg0 < 0x80) { @@ -479,8 +600,23 @@ GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001D5E0.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001D6E4.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001D80C.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001DD54.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E29C.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E2EC.s") + +s32 *func_8001E29C(s32 arg0) { + if (arg0 < 0 || arg0 >= D_8011ADA0) { + return D_8011AD6C; + } + return (s32*)&D_8011AD6C[D_8011AD70[arg0]]; +} + +s32 func_8001E2EC(s32 arg0) { + if (arg0 >= 0 && arg0 < 8) { + if (D_8011ADCC[0][arg0] > 0) { + D_8011ADCC[0][arg0]--; + } + return D_8011ADCC[0][arg0]; + } + return 0; +} void func_8001E344(s32 arg0) { s32 temp = 8; @@ -499,7 +635,22 @@ void func_8001E450(s32 arg0) { D_8011AE7A = arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E45C.s") +void func_8001E45C(s32 arg0) { + if (arg0 != D_8011AE7A) { + D_8011AE7A = arg0; + D_8011ADAC = 0; + D_8011AE7E = (u8)1; + if (func_8006DA0C() == 1) { + func_8006F42C(); + } + } +} + +// Unused? +s32 func_8001E4B4(void) { + return D_8011AE60; +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E4C4.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E6EC.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001E89C.s") @@ -538,7 +689,11 @@ s32 func_800210CC(s8 arg0) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80021104.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8002125C.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80021400.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800214C4.s") + +s8 func_800214C4(void) { + return D_8011AD20[3 - D_8011AD21]; +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800214E4.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80021600.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80022540.s") @@ -552,7 +707,24 @@ f32 func_80022888(f32 *arg0, u32 arg1, f32 arg2) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800228B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800228EC.s") +// Unused? +void func_800228DC(s32 arg0, s32 arg1, s32 arg2) { + +} + +void func_800228EC(s32 arg0) { + Player_64 *player_64; + + D_8011AEF7 = 3; + player_64 = func_8001BAC8(0)->unk64; + player_64->unk190 = 0; + player_64->unk192 = 0; + player_64->unk193 = 0; + player_64->unk1BA = 0; + func_80017E74(arg0); + func_8006F388(10); +} + GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80022948.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80022CFC.s") GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80022E18.s") @@ -563,7 +735,17 @@ s8 func_8002341C(void) { } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8002342C.s") -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80023568.s") + +//GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80023568.s") + +s32 func_80023568(void) { + if (D_8011AD3C != 0) { + return D_8011AD25 + 1; + } else if (func_8006BD98() == 8) { + return D_8011AD25 + 1; + } + return 0; +} s8 func_800235C0(void) { return D_8011ADD5;