From 5514a51133b11fffc07bf02d3c761364dff6dda9 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 17:27:34 -0500 Subject: [PATCH] Moved rodata from C to GLOBAL_ASM in unknown_032760 --- .../unknown_032760/func_80033F60.s | 9 ++ .../unknown_032760/func_80034860.s | 7 ++ .../unknown_032760/func_80034E9C.s | 7 ++ .../unknown_032760/func_80035260.s | 9 ++ .../unknown_032760/func_800361E0.s | 11 ++ .../unknown_032760/func_80036C30.s | 5 + .../unknown_032760/func_800389B8.s | 5 + .../unknown_032760/func_80038AD4.s | 5 + .../unknown_032760/func_80039330.s | 45 +++++++- .../unknown_032760/func_8003B4BC.s | 5 + .../unknown_032760/func_8003B988.s | 7 ++ .../unknown_032760/func_8003CA68.s | 5 + .../unknown_032760/func_8003D058.s | 5 + .../unknown_032760/func_8003D2B8.s | 5 + .../unknown_032760/func_8003D5A0.s | 9 ++ .../unknown_032760/func_8003E140.s | 10 ++ .../unknown_032760/func_8003E630.s | 12 ++- .../unknown_032760/func_8003E694.s | 5 + .../unknown_032760/func_8003EDD8.s | 5 + .../unknown_032760/func_8003F2E8.s | 13 +++ .../unknown_032760/func_800409C8.s | 5 + .../unknown_032760/func_80040C54.s | 27 ++++- .../unknown_032760/func_800422F0.s | 24 ++++- src/unknown_032760.c | 100 ------------------ 24 files changed, 230 insertions(+), 110 deletions(-) diff --git a/asm/non_matchings/unknown_032760/func_80033F60.s b/asm/non_matchings/unknown_032760/func_80033F60.s index ea9afef2..6a16baf0 100644 --- a/asm/non_matchings/unknown_032760/func_80033F60.s +++ b/asm/non_matchings/unknown_032760/func_80033F60.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5FE0 +.double 1.2 +glabel D_800E5FE8 +.double 0.1 +glabel D_800E5FF0 +.double 0.9 + +.text glabel func_80033F60 /* 034B60 80033F60 27BDFF78 */ addiu $sp, $sp, -0x88 /* 034B64 80033F64 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_80034860.s b/asm/non_matchings/unknown_032760/func_80034860.s index 4a346fdb..7ef7f2fd 100644 --- a/asm/non_matchings/unknown_032760/func_80034860.s +++ b/asm/non_matchings/unknown_032760/func_80034860.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5FF8 +.double 1.2 +glabel D_800E6000 +.float 0.2 + +.text glabel func_80034860 /* 035460 80034860 44852000 */ mtc1 $a1, $f4 /* 035464 80034864 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80034E9C.s b/asm/non_matchings/unknown_032760/func_80034E9C.s index 29754dbe..e5327d21 100644 --- a/asm/non_matchings/unknown_032760/func_80034E9C.s +++ b/asm/non_matchings/unknown_032760/func_80034E9C.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6004 +.float 0.612 +glabel D_800E6008 +.float 0.552 + +.text glabel func_80034E9C /* 035A9C 80034E9C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035AA0 80034EA0 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035260.s b/asm/non_matchings/unknown_032760/func_80035260.s index 56fa4148..9eef6a6b 100644 --- a/asm/non_matchings/unknown_032760/func_80035260.s +++ b/asm/non_matchings/unknown_032760/func_80035260.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6010 +.double 1.2 +glabel D_800E6018 +.double 0.98 +glabel D_800E6020 +.double 0.95 + +.text glabel func_80035260 /* 035E60 80035260 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035E64 80035264 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800361E0.s b/asm/non_matchings/unknown_032760/func_800361E0.s index 1b4b3523..d4d9789e 100644 --- a/asm/non_matchings/unknown_032760/func_800361E0.s +++ b/asm/non_matchings/unknown_032760/func_800361E0.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6028 +.double 1.2 +glabel D_800E6030 +.double 300.0 +glabel D_800E6038 +.double 0.05 +glabel D_800E6040 +.double 0.05 + +.text glabel func_800361E0 /* 036DE0 800361E0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 036DE4 800361E4 44853000 */ mtc1 $a1, $f6 diff --git a/asm/non_matchings/unknown_032760/func_80036C30.s b/asm/non_matchings/unknown_032760/func_80036C30.s index 3f841729..795ea304 100644 --- a/asm/non_matchings/unknown_032760/func_80036C30.s +++ b/asm/non_matchings/unknown_032760/func_80036C30.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6048 +.float 0.01 + +.text glabel func_80036C30 /* 037830 80036C30 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 037834 80036C34 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_800389B8.s b/asm/non_matchings/unknown_032760/func_800389B8.s index de3ae2ad..f33667dc 100644 --- a/asm/non_matchings/unknown_032760/func_800389B8.s +++ b/asm/non_matchings/unknown_032760/func_800389B8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6050 +.double 1.2 + +.text glabel func_800389B8 /* 0395B8 800389B8 44852000 */ mtc1 $a1, $f4 /* 0395BC 800389BC 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80038AD4.s b/asm/non_matchings/unknown_032760/func_80038AD4.s index 33b14047..1e4562ef 100644 --- a/asm/non_matchings/unknown_032760/func_80038AD4.s +++ b/asm/non_matchings/unknown_032760/func_80038AD4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6058 +.double 1.2 + +.text glabel func_80038AD4 /* 0396D4 80038AD4 44852000 */ mtc1 $a1, $f4 /* 0396D8 80038AD8 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/func_80039330.s index d042346e..a44839ef 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/func_80039330.s @@ -1,3 +1,24 @@ +.late_rodata +glabel D_800E6060 +.double 1.2 +glabel D_800E6068 +.double 300.0 +glabel jpt_800E6070 +.word L80039758, L80039758, L80039758, L80039758, L80039768, L80039768, L80039758, L80039768, L80039768, L80039758, L80039758, L80039768, L80039768, L80039768, L80039758, L80039768, L80039768, L80039768, L80039768, L80039758, L80039758 +glabel jpt_800E60C4 +.word L800397BC, L80039978, L80039AE0, L80039BB8, L80039DC4, L80039ED8, L80039FDC, L80039FDC, L8003A5AC, L8003A0CC, L8003A1E8, L8003A5AC, L8003A5AC, L8003A5AC, L8003A268, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A3FC, L8003A4F4, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A574 +.word 0 # Padding +glabel D_800E6140 +.double 77.0 +glabel D_800E6148 +.float 0.1 +.word 0 # Padding +glabel D_800E6150 +.double 1.1 +glabel D_800E6158 +.double 2.2 + +.text glabel func_80039330 /* 039F30 80039330 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 039F34 80039334 44853000 */ mtc1 $a1, $f6 @@ -280,17 +301,19 @@ glabel func_80039330 /* 03A334 80039734 2DA10015 */ sltiu $at, $t5, 0x15 /* 03A338 80039738 1020000B */ beqz $at, .L80039768 /* 03A33C 8003973C 000D6880 */ sll $t5, $t5, 2 -/* 03A340 80039740 3C01800E */ lui $at, %hi(D_800E6070) # $at, 0x800e +/* 03A340 80039740 3C01800E */ lui $at, %hi(jpt_800E6070) # $at, 0x800e /* 03A344 80039744 002D0821 */ addu $at, $at, $t5 -/* 03A348 80039748 8C2D6070 */ lw $t5, %lo(D_800E6070)($at) +/* 03A348 80039748 8C2D6070 */ lw $t5, %lo(jpt_800E6070)($at) /* 03A34C 8003974C 00000000 */ nop /* 03A350 80039750 01A00008 */ jr $t5 /* 03A354 80039754 00000000 */ nop +glabel L80039758 /* 03A358 80039758 0C01BCE2 */ jal func_8006F388 /* 03A35C 8003975C 24040001 */ li $a0, 1 /* 03A360 80039760 8E020078 */ lw $v0, 0x78($s0) /* 03A364 80039764 24070003 */ li $a3, 3 .L80039768: +glabel L80039768 /* 03A368 80039768 1040000A */ beqz $v0, .L80039794 /* 03A36C 8003976C 244FFFFF */ addiu $t7, $v0, -1 /* 03A370 80039770 8FAE007C */ lw $t6, 0x7c($sp) @@ -307,12 +330,13 @@ glabel func_80039330 /* 03A398 80039798 10200384 */ beqz $at, .L8003A5AC /* 03A39C 8003979C 24030004 */ li $v1, 4 /* 03A3A0 800397A0 000F7880 */ sll $t7, $t7, 2 -/* 03A3A4 800397A4 3C01800E */ lui $at, %hi(D_800E60C4) # $at, 0x800e +/* 03A3A4 800397A4 3C01800E */ lui $at, %hi(jpt_800E60C4) # $at, 0x800e /* 03A3A8 800397A8 002F0821 */ addu $at, $at, $t7 -/* 03A3AC 800397AC 8C2F60C4 */ lw $t7, %lo(D_800E60C4)($at) +/* 03A3AC 800397AC 8C2F60C4 */ lw $t7, %lo(jpt_800E60C4)($at) /* 03A3B0 800397B0 00000000 */ nop /* 03A3B4 800397B4 01E00008 */ jr $t7 /* 03A3B8 800397B8 00000000 */ nop +glabel L800397BC /* 03A3BC 800397BC C7A2009C */ lwc1 $f2, 0x9c($sp) /* 03A3C0 800397C0 3C014059 */ li $at, 0x40590000 # 3.390625 /* 03A3C4 800397C4 44813800 */ mtc1 $at, $f7 @@ -433,6 +457,7 @@ glabel func_80039330 /* 03A56C 8003996C 00000000 */ nop /* 03A570 80039970 10000464 */ b .L8003AB04 /* 03A574 80039974 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039978 /* 03A578 80039978 0C0168F0 */ jal func_8005A3C0 /* 03A57C 8003997C 00000000 */ nop /* 03A580 80039980 C7AE00AC */ lwc1 $f14, 0xac($sp) @@ -528,6 +553,7 @@ glabel func_80039330 /* 03A6D4 80039AD4 00000000 */ nop /* 03A6D8 80039AD8 1000040A */ b .L8003AB04 /* 03A6DC 80039ADC C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039AE0 /* 03A6E0 80039AE0 24190001 */ li $t9, 1 /* 03A6E4 80039AE4 44805000 */ mtc1 $zero, $f10 /* 03A6E8 80039AE8 A219003B */ sb $t9, 0x3b($s0) @@ -587,6 +613,7 @@ glabel func_80039330 /* 03A7AC 80039BAC A60C0000 */ sh $t4, ($s0) /* 03A7B0 80039BB0 100003D4 */ b .L8003AB04 /* 03A7B4 80039BB4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039BB8 /* 03A7B8 80039BB8 A203003B */ sb $v1, 0x3b($s0) /* 03A7BC 80039BBC C62A0004 */ lwc1 $f10, 4($s1) /* 03A7C0 80039BC0 C7B200AC */ lwc1 $f18, 0xac($sp) @@ -726,6 +753,7 @@ glabel func_80039330 .L80039DBC: /* 03A9BC 80039DBC 10000351 */ b .L8003AB04 /* 03A9C0 80039DC0 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039DC4 /* 03A9C4 80039DC4 240A0005 */ li $t2, 5 /* 03A9C8 80039DC8 0C0168F0 */ jal func_8005A3C0 /* 03A9CC 80039DCC A20A003B */ sb $t2, 0x3b($s0) @@ -799,6 +827,7 @@ glabel func_80039330 .L80039ED0: /* 03AAD0 80039ED0 1000030C */ b .L8003AB04 /* 03AAD4 80039ED4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039ED8 /* 03AAD8 80039ED8 0C0168F0 */ jal func_8005A3C0 /* 03AADC 80039EDC 00000000 */ nop /* 03AAE0 80039EE0 8FB80090 */ lw $t8, 0x90($sp) @@ -869,6 +898,7 @@ glabel func_80039330 .L80039FD4: /* 03ABD4 80039FD4 100002CB */ b .L8003AB04 /* 03ABD8 80039FD8 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039FDC /* 03ABDC 80039FDC C62C0004 */ lwc1 $f12, 4($s1) /* 03ABE0 80039FE0 44800800 */ mtc1 $zero, $f1 /* 03ABE4 80039FE4 44800000 */ mtc1 $zero, $f0 @@ -931,6 +961,7 @@ glabel func_80039330 /* 03ACC0 8003A0C0 8FAB0070 */ lw $t3, 0x70($sp) /* 03ACC4 8003A0C4 1000028E */ b .L8003AB00 /* 03ACC8 8003A0C8 AD620118 */ sw $v0, 0x118($t3) +glabel L8003A0CC /* 03ACCC 8003A0CC 44805000 */ mtc1 $zero, $f10 /* 03ACD0 8003A0D0 A207003B */ sb $a3, 0x3b($s0) /* 03ACD4 8003A0D4 240C00FF */ li $t4, 255 @@ -1005,6 +1036,7 @@ glabel func_80039330 /* 03ADDC 8003A1DC A6090000 */ sh $t1, ($s0) /* 03ADE0 8003A1E0 10000248 */ b .L8003AB04 /* 03ADE4 8003A1E4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A1E8 /* 03ADE8 8003A1E8 A207003B */ sb $a3, 0x3b($s0) /* 03ADEC 8003A1EC C7A600AC */ lwc1 $f6, 0xac($sp) /* 03ADF0 8003A1F0 C6300004 */ lwc1 $f16, 4($s1) @@ -1039,6 +1071,7 @@ glabel func_80039330 /* 03AE5C 8003A25C AE0F0078 */ sw $t7, 0x78($s0) /* 03AE60 8003A260 10000228 */ b .L8003AB04 /* 03AE64 8003A264 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A268 /* 03AE68 8003A268 44808000 */ mtc1 $zero, $f16 /* 03AE6C 8003A26C A207003B */ sb $a3, 0x3b($s0) /* 03AE70 8003A270 241800FF */ li $t8, 255 @@ -1144,6 +1177,7 @@ glabel func_80039330 /* 03AFF0 8003A3F0 AE0B0078 */ sw $t3, 0x78($s0) /* 03AFF4 8003A3F4 100001C3 */ b .L8003AB04 /* 03AFF8 8003A3F8 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A3FC /* 03AFFC 8003A3FC 44809000 */ mtc1 $zero, $f18 /* 03B000 8003A400 A207003B */ sb $a3, 0x3b($s0) /* 03B004 8003A404 240C00FF */ li $t4, 255 @@ -1210,6 +1244,7 @@ glabel func_80039330 .L8003A4EC: /* 03B0EC 8003A4EC 10000185 */ b .L8003AB04 /* 03B0F0 8003A4F0 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A4F4 /* 03B0F4 8003A4F4 A207003B */ sb $a3, 0x3b($s0) /* 03B0F8 8003A4F8 C7AA00AC */ lwc1 $f10, 0xac($sp) /* 03B0FC 8003A4FC C6240004 */ lwc1 $f4, 4($s1) @@ -1244,6 +1279,7 @@ glabel func_80039330 /* 03B168 8003A568 AE000078 */ sw $zero, 0x78($s0) /* 03B16C 8003A56C 10000165 */ b .L8003AB04 /* 03B170 8003A570 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A574 /* 03B174 8003A574 8E0F004C */ lw $t7, 0x4c($s0) /* 03B178 8003A578 24180006 */ li $t8, 6 /* 03B17C 8003A57C A5E00014 */ sh $zero, 0x14($t7) @@ -1259,6 +1295,7 @@ glabel func_80039330 /* 03B1A4 8003A5A4 10000156 */ b .L8003AB00 /* 03B1A8 8003A5A8 E62A0004 */ swc1 $f10, 4($s1) .L8003A5AC: +glabel L8003A5AC /* 03B1AC 8003A5AC A200003B */ sb $zero, 0x3b($s0) /* 03B1B0 8003A5B0 44802000 */ mtc1 $zero, $f4 /* 03B1B4 8003A5B4 9228000D */ lbu $t0, 0xd($s1) diff --git a/asm/non_matchings/unknown_032760/func_8003B4BC.s b/asm/non_matchings/unknown_032760/func_8003B4BC.s index 52767314..4ca2c046 100644 --- a/asm/non_matchings/unknown_032760/func_8003B4BC.s +++ b/asm/non_matchings/unknown_032760/func_8003B4BC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6160 +.double 1.2 + +.text glabel func_8003B4BC /* 03C0BC 8003B4BC 44852000 */ mtc1 $a1, $f4 /* 03C0C0 8003B4C0 27BDFFB0 */ addiu $sp, $sp, -0x50 diff --git a/asm/non_matchings/unknown_032760/func_8003B988.s b/asm/non_matchings/unknown_032760/func_8003B988.s index 12f0c521..3fe49df6 100644 --- a/asm/non_matchings/unknown_032760/func_8003B988.s +++ b/asm/non_matchings/unknown_032760/func_8003B988.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6168 +.double 1.2 +glabel D_800E6170 +.double 130.0 + +.text glabel func_8003B988 /* 03C588 8003B988 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 03C58C 8003B98C 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003CA68.s b/asm/non_matchings/unknown_032760/func_8003CA68.s index 53c5e200..7204ae6d 100644 --- a/asm/non_matchings/unknown_032760/func_8003CA68.s +++ b/asm/non_matchings/unknown_032760/func_8003CA68.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6178 +.double 1.2 + +.text glabel func_8003CA68 /* 03D668 8003CA68 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03D66C 8003CA6C 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003D058.s b/asm/non_matchings/unknown_032760/func_8003D058.s index 85848c8c..cccee6a1 100644 --- a/asm/non_matchings/unknown_032760/func_8003D058.s +++ b/asm/non_matchings/unknown_032760/func_8003D058.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6180 +.float 50625.0 + +.text glabel func_8003D058 /* 03DC58 8003D058 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 03DC5C 8003D05C AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D2B8.s b/asm/non_matchings/unknown_032760/func_8003D2B8.s index 539890a0..cbc7533b 100644 --- a/asm/non_matchings/unknown_032760/func_8003D2B8.s +++ b/asm/non_matchings/unknown_032760/func_8003D2B8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6188 +.double 1.2 + +.text glabel func_8003D2B8 /* 03DEB8 8003D2B8 44852000 */ mtc1 $a1, $f4 /* 03DEBC 8003D2BC 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003D5A0.s b/asm/non_matchings/unknown_032760/func_8003D5A0.s index c89376bd..108cf425 100644 --- a/asm/non_matchings/unknown_032760/func_8003D5A0.s +++ b/asm/non_matchings/unknown_032760/func_8003D5A0.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6190 +.double 1.2 +glabel D_800E6198 +.double 0.95 +glabel D_800E61A0 +.float -10000.0 + +.text glabel func_8003D5A0 /* 03E1A0 8003D5A0 44852000 */ mtc1 $a1, $f4 /* 03E1A4 8003D5A4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003E140.s b/asm/non_matchings/unknown_032760/func_8003E140.s index c071cd5c..043f429c 100644 --- a/asm/non_matchings/unknown_032760/func_8003E140.s +++ b/asm/non_matchings/unknown_032760/func_8003E140.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E61A8 +.double 0.001 +glabel D_800E61B0 +.float 0.001 +.word 0 # Padding +glabel D_800E61B8 +.double 0.1 + +.text glabel func_8003E140 /* 03ED40 8003E140 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03ED44 8003E144 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003E630.s b/asm/non_matchings/unknown_032760/func_8003E630.s index a686c27c..41cf28a5 100644 --- a/asm/non_matchings/unknown_032760/func_8003E630.s +++ b/asm/non_matchings/unknown_032760/func_8003E630.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E61C0 +.word L8003E66C, L8003E66C, L8003E67C, L8003E67C, L8003E684, L8003E684, L8003E684, L8003E684, L8003E684, L8003E684, L8003E67C, L8003E67C + +.text glabel func_8003E630 /* 03F230 8003E630 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 03F234 8003E634 AFBF0014 */ sw $ra, 0x14($sp) @@ -8,19 +13,22 @@ glabel func_8003E630 /* 03F248 8003E648 2DC1000C */ sltiu $at, $t6, 0xc /* 03F24C 8003E64C 1020000D */ beqz $at, .L8003E684 /* 03F250 8003E650 000E7080 */ sll $t6, $t6, 2 -/* 03F254 8003E654 3C01800E */ lui $at, %hi(D_800E61C0) # $at, 0x800e +/* 03F254 8003E654 3C01800E */ lui $at, %hi(jpt_800E61C0) # $at, 0x800e /* 03F258 8003E658 002E0821 */ addu $at, $at, $t6 -/* 03F25C 8003E65C 8C2E61C0 */ lw $t6, %lo(D_800E61C0)($at) +/* 03F25C 8003E65C 8C2E61C0 */ lw $t6, %lo(jpt_800E61C0)($at) /* 03F260 8003E660 00000000 */ nop /* 03F264 8003E664 01C00008 */ jr $t6 /* 03F268 8003E668 00000000 */ nop +glabel L8003E66C /* 03F26C 8003E66C 0C00F9A5 */ jal func_8003E694 /* 03F270 8003E670 00000000 */ nop /* 03F274 8003E674 10000004 */ b .L8003E688 /* 03F278 8003E678 8FBF0014 */ lw $ra, 0x14($sp) +glabel L8003E67C /* 03F27C 8003E67C 0C00FCBA */ jal func_8003F2E8 /* 03F280 8003E680 00000000 */ nop .L8003E684: +glabel L8003E684 /* 03F284 8003E684 8FBF0014 */ lw $ra, 0x14($sp) .L8003E688: /* 03F288 8003E688 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_032760/func_8003E694.s b/asm/non_matchings/unknown_032760/func_8003E694.s index 91817585..87bd5787 100644 --- a/asm/non_matchings/unknown_032760/func_8003E694.s +++ b/asm/non_matchings/unknown_032760/func_8003E694.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E61F0 +.double 1.2 + +.text glabel func_8003E694 /* 03F294 8003E694 27BDFF18 */ addiu $sp, $sp, -0xe8 /* 03F298 8003E698 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003EDD8.s b/asm/non_matchings/unknown_032760/func_8003EDD8.s index e28f1ffd..08e1871b 100644 --- a/asm/non_matchings/unknown_032760/func_8003EDD8.s +++ b/asm/non_matchings/unknown_032760/func_8003EDD8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E61F8 +.double 10000.0 + +.text glabel func_8003EDD8 /* 03F9D8 8003EDD8 27BDFF88 */ addiu $sp, $sp, -0x78 /* 03F9DC 8003EDDC AFBF0034 */ sw $ra, 0x34($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003F2E8.s b/asm/non_matchings/unknown_032760/func_8003F2E8.s index 3b307b61..a54a1930 100644 --- a/asm/non_matchings/unknown_032760/func_8003F2E8.s +++ b/asm/non_matchings/unknown_032760/func_8003F2E8.s @@ -1,3 +1,16 @@ +.late_rodata +glabel D_800E6200 +.double 1.2 +glabel D_800E6208 +.float -10000.0 +glabel D_800E620C +.float 0.6 +glabel D_800E6210 +.float 0.6 +glabel D_800E6214 +.float 0.075 + +.text glabel func_8003F2E8 /* 03FEE8 8003F2E8 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03FEEC 8003F2EC AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_800409C8.s b/asm/non_matchings/unknown_032760/func_800409C8.s index 7a1c1c7f..a50b41c4 100644 --- a/asm/non_matchings/unknown_032760/func_800409C8.s +++ b/asm/non_matchings/unknown_032760/func_800409C8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6218 +.float 0.01 + +.text glabel func_800409C8 /* 0415C8 800409C8 AFA50004 */ sw $a1, 4($sp) /* 0415CC 800409CC 8C820064 */ lw $v0, 0x64($a0) diff --git a/asm/non_matchings/unknown_032760/func_80040C54.s b/asm/non_matchings/unknown_032760/func_80040C54.s index 121ccd18..288c77aa 100644 --- a/asm/non_matchings/unknown_032760/func_80040C54.s +++ b/asm/non_matchings/unknown_032760/func_80040C54.s @@ -1,3 +1,22 @@ +.late_rodata +glabel D_800E621C +.float 0.1 +glabel D_800E6220 +.float 1.6 +glabel D_800E6224 +.float 1.6 +glabel jpt_800E6228 +.word L80040D30, L80040E54, L80040E54, L800411E4, L8004153C +glabel D_800E623C +.float 22500.0 +glabel D_800E6240 +.float 1.2 +glabel D_800E6244 +.float 1.6 +glabel D_800E6248 +.float 1.6 + +.text glabel func_80040C54 /* 041854 80040C54 27BDFF68 */ addiu $sp, $sp, -0x98 /* 041858 80040C58 AFBF0024 */ sw $ra, 0x24($sp) @@ -51,12 +70,13 @@ glabel func_80040C54 /* 04190C 80040D0C 2C410005 */ sltiu $at, $v0, 5 /* 041910 80040D10 102002C9 */ beqz $at, .L80041838 /* 041914 80040D14 0002C880 */ sll $t9, $v0, 2 -/* 041918 80040D18 3C01800E */ lui $at, %hi(D_800E6228) # $at, 0x800e +/* 041918 80040D18 3C01800E */ lui $at, %hi(jpt_800E6228) # $at, 0x800e /* 04191C 80040D1C 00390821 */ addu $at, $at, $t9 -/* 041920 80040D20 8C396228 */ lw $t9, %lo(D_800E6228)($at) +/* 041920 80040D20 8C396228 */ lw $t9, %lo(jpt_800E6228)($at) /* 041924 80040D24 00000000 */ nop /* 041928 80040D28 03200008 */ jr $t9 /* 04192C 80040D2C 00000000 */ nop +glabel L80040D30 /* 041930 80040D30 44807000 */ mtc1 $zero, $f14 /* 041934 80040D34 240E0001 */ li $t6, 1 /* 041938 80040D38 E50E0108 */ swc1 $f14, 0x108($t0) @@ -134,6 +154,7 @@ glabel func_80040C54 /* 041A48 80040E48 910200FD */ lbu $v0, 0xfd($t0) /* 041A4C 80040E4C 1000027A */ b .L80041838 /* 041A50 80040E50 00000000 */ nop +glabel L80040E54 /* 041A54 80040E54 28610480 */ slti $at, $v1, 0x480 /* 041A58 80040E58 1020000C */ beqz $at, .L80040E8C /* 041A5C 80040E5C 00000000 */ nop @@ -374,6 +395,7 @@ glabel func_80040C54 /* 041DD8 800411D8 910200FD */ lbu $v0, 0xfd($t0) /* 041DDC 800411DC 10000196 */ b .L80041838 /* 041DE0 800411E0 00000000 */ nop +glabel L800411E4 /* 041DE4 800411E4 28610480 */ slti $at, $v1, 0x480 /* 041DE8 800411E8 1020000C */ beqz $at, .L8004121C /* 041DEC 800411EC 00000000 */ nop @@ -600,6 +622,7 @@ glabel func_80040C54 /* 042130 80041530 910200FD */ lbu $v0, 0xfd($t0) /* 042134 80041534 100000C0 */ b .L80041838 /* 042138 80041538 00000000 */ nop +glabel L8004153C /* 04213C 8004153C 28610181 */ slti $at, $v1, 0x181 /* 042140 80041540 1420000C */ bnez $at, .L80041574 /* 042144 80041544 00000000 */ nop diff --git a/asm/non_matchings/unknown_032760/func_800422F0.s b/asm/non_matchings/unknown_032760/func_800422F0.s index deb0f56c..ef6064ee 100644 --- a/asm/non_matchings/unknown_032760/func_800422F0.s +++ b/asm/non_matchings/unknown_032760/func_800422F0.s @@ -1,3 +1,18 @@ +.late_rodata +glabel D_800E6250 +.double 1.2 +glabel jpt_800E6258 +.word L80042378, L800426B8, L80042898, L800428E8, L8004292C +glabel D_800E626C +.float 1.34 +glabel D_800E6270 +.float 0.05 +glabel D_800E6274 +.float 0.15 +glabel D_800E6278 +.float 0.15 + +.text glabel func_800422F0 /* 042EF0 800422F0 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 042EF4 800422F4 44852000 */ mtc1 $a1, $f4 @@ -28,12 +43,13 @@ glabel func_800422F0 /* 042F54 80042354 2DE10005 */ sltiu $at, $t7, 5 /* 042F58 80042358 10200186 */ beqz $at, .L80042974 /* 042F5C 8004235C 000F7880 */ sll $t7, $t7, 2 -/* 042F60 80042360 3C01800E */ lui $at, %hi(D_800E6258) # $at, 0x800e +/* 042F60 80042360 3C01800E */ lui $at, %hi(jpt_800E6258) # $at, 0x800e /* 042F64 80042364 002F0821 */ addu $at, $at, $t7 -/* 042F68 80042368 8C2F6258 */ lw $t7, %lo(D_800E6258)($at) +/* 042F68 80042368 8C2F6258 */ lw $t7, %lo(jpt_800E6258)($at) /* 042F6C 8004236C 00000000 */ nop /* 042F70 80042370 01E00008 */ jr $t7 /* 042F74 80042374 00000000 */ nop +glabel L80042378 /* 042F78 80042378 AFA00104 */ sw $zero, 0x104($sp) /* 042F7C 8004237C 82020019 */ lb $v0, 0x19($s0) /* 042F80 80042380 3C0742C0 */ lui $a3, 0x42c0 @@ -256,6 +272,7 @@ glabel func_800422F0 /* 0432AC 800426AC E6060024 */ swc1 $f6, 0x24($s0) /* 0432B0 800426B0 100000B0 */ b .L80042974 /* 0432B4 800426B4 A62D0000 */ sh $t5, ($s1) +glabel L800426B8 /* 0432B8 800426B8 820E0018 */ lb $t6, 0x18($s0) /* 0432BC 800426BC 82020019 */ lb $v0, 0x19($s0) /* 0432C0 800426C0 01C57823 */ subu $t7, $t6, $a1 @@ -381,6 +398,7 @@ glabel func_800422F0 /* 04348C 8004288C AFA00014 */ sw $zero, 0x14($sp) /* 043490 80042890 10000039 */ b .L80042978 /* 043494 80042894 8FBF0034 */ lw $ra, 0x34($sp) +glabel L80042898 /* 043498 80042898 3C01800E */ lui $at, %hi(D_800E6270) # $at, 0x800e /* 04349C 8004289C C4206270 */ lwc1 $f0, %lo(D_800E6270)($at) /* 0434A0 800428A0 3C01800E */ lui $at, %hi(D_800E6274) # $at, 0x800e @@ -401,6 +419,7 @@ glabel func_800422F0 /* 0434DC 800428DC A20A0014 */ sb $t2, 0x14($s0) /* 0434E0 800428E0 10000024 */ b .L80042974 /* 0434E4 800428E4 A60B0016 */ sh $t3, 0x16($s0) +glabel L800428E8 /* 0434E8 800428E8 860C0016 */ lh $t4, 0x16($s0) /* 0434EC 800428EC 240F0004 */ li $t7, 4 /* 0434F0 800428F0 01856823 */ subu $t5, $t4, $a1 @@ -418,6 +437,7 @@ glabel func_800422F0 /* 043520 80042920 AFB80010 */ sw $t8, 0x10($sp) /* 043524 80042924 10000014 */ b .L80042978 /* 043528 80042928 8FBF0034 */ lw $ra, 0x34($sp) +glabel L8004292C /* 04352C 8004292C 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 043530 80042930 44816000 */ mtc1 $at, $f12 /* 043534 80042934 C6000030 */ lwc1 $f0, 0x30($s0) diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 2b9d05b3..3f8d3ddc 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -125,106 +125,6 @@ const char D_800E5FA0[] = "Illegal door no!!!\n"; const char D_800E5FB4[] = "Illegal door no!!!\n"; const char D_800E5FC8[] = "Illegal door no!!!\n"; -const DoubleLiteral D_800E5FE0 = { 1.2 }; -const DoubleLiteral D_800E5FE8 = { 0.1 }; -const DoubleLiteral D_800E5FF0 = { 0.9 }; -const DoubleLiteral D_800E5FF8 = { 1.2 }; -const FloatLiteral D_800E6000 = { 0.2f }; -const FloatLiteral D_800E6004 = { 0.612f }; -const FloatLiteral D_800E6008 = { 0.552f }; -const DoubleLiteral D_800E6010 = { 1.2 }; -const DoubleLiteral D_800E6018 = { 0.98 }; -const DoubleLiteral D_800E6020 = { 0.95 }; -const DoubleLiteral D_800E6028 = { 1.2 }; -const DoubleLiteral D_800E6030 = { 300.0 }; -const DoubleLiteral D_800E6038 = { 0.05 }; -const DoubleLiteral D_800E6040 = { 0.05 }; -const FloatLiteral D_800E6048 = { 0.01f }; -const DoubleLiteral D_800E6050 = { 1.2 }; -const DoubleLiteral D_800E6058 = { 1.2 }; -const DoubleLiteral D_800E6060 = { 1.2 }; -const DoubleLiteral D_800E6068 = { 300.0 }; - -// Jump table in func_80039330 -const u32 D_800E6070[] = { - 0x80039758, 0x80039758, 0x80039758, 0x80039758, - 0x80039768, 0x80039768, 0x80039758, 0x80039768, - 0x80039768, 0x80039758, 0x80039758, 0x80039768, - 0x80039768, 0x80039768, 0x80039758, 0x80039768, - 0x80039768, 0x80039768, 0x80039768, 0x80039758, - 0x80039758 -}; - -// Jump table in func_80039330 -const u32 D_800E60C4[] = { - 0x800397BC, 0x80039978, 0x80039AE0, 0x80039BB8, - 0x80039DC4, 0x80039ED8, 0x80039FDC, 0x80039FDC, - 0x8003A5AC, 0x8003A0CC, 0x8003A1E8, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A268, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A3FC, - 0x8003A4F4, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, - 0x8003A5AC, 0x8003A574 -}; - -const DoubleLiteral D_800E6140 = { 77.0 }; -const FloatLiteral D_800E6148 = { 0.1f }; -const DoubleLiteral D_800E6150 = { 1.1 }; -const DoubleLiteral D_800E6158 = { 2.2 }; -const DoubleLiteral D_800E6160 = { 1.2 }; -const DoubleLiteral D_800E6168 = { 1.2 }; -const DoubleLiteral D_800E6170 = { 130.0 }; -const DoubleLiteral D_800E6178 = { 1.2 }; -const FloatLiteral D_800E6180 = { 50625.0f }; -const DoubleLiteral D_800E6188 = { 1.2 }; -const DoubleLiteral D_800E6190 = { 1.2 }; -const DoubleLiteral D_800E6198 = { 0.95 }; -const FloatLiteral D_800E61A0 = { -10000.0f }; -const DoubleLiteral D_800E61A8 = { 0.001 }; -const FloatLiteral D_800E61B0 = { 0.001f }; -const DoubleLiteral D_800E61B8 = { 0.1 }; - -// Jump table in func_8003E630 -const u32 D_800E61C0[] = { - 0x8003E66C, 0x8003E66C, 0x8003E67C, 0x8003E67C, - 0x8003E684, 0x8003E684, 0x8003E684, 0x8003E684, - 0x8003E684, 0x8003E684, 0x8003E67C, 0x8003E67C -}; - -const DoubleLiteral D_800E61F0 = { 1.2 }; -const DoubleLiteral D_800E61F8 = { 10000.0 }; -const DoubleLiteral D_800E6200 = { 1.2 }; -const FloatLiteral D_800E6208 = { -10000.0f }; -const FloatLiteral D_800E620C = { 0.6f }; -const FloatLiteral D_800E6210 = { 0.6f }; -const FloatLiteral D_800E6214 = { 0.075f }; -const FloatLiteral D_800E6218 = { 0.01f }; -const FloatLiteral D_800E621C = { 0.1f }; -const FloatLiteral D_800E6220 = { 1.6f }; -const FloatLiteral D_800E6224 = { 1.6f }; - -// Jump table in func_80040C54 -const u32 D_800E6228[] = { - 0x80040D30, 0x80040E54, 0x80040E54, 0x800411E4, - 0x8004153C -}; - -const FloatLiteral D_800E623C = { 22500.0f }; -const FloatLiteral D_800E6240 = { 1.2f }; -const FloatLiteral D_800E6244 = { 1.6f }; -const FloatLiteral D_800E6248 = { 1.6f }; -const DoubleLiteral D_800E6250 = { 1.2 }; - -// Jump table in func_800422F0 -const u32 D_800E6258[] = { - 0x80042378, 0x800426B8, 0x80042898, 0x800428E8, - 0x8004292C -}; - -const FloatLiteral D_800E626C = { 1.34f }; -const FloatLiteral D_800E6270 = { 0.05f }; -const FloatLiteral D_800E6274 = { 0.15f }; -const FloatLiteral D_800E6278 = { 0.15f }; /*********************************/