diff --git a/asm/data/code_102c80.rodata.s b/asm/data/code_102c80.rodata.s new file mode 100644 index 0000000000..d939295bae --- /dev/null +++ b/asm/data/code_102c80.rodata.s @@ -0,0 +1,117 @@ +.include "macro.inc" + +.section .rodata + +glabel D_802EB000 +.double 1.8625 + +glabel D_802EB008 +.double 1.8625 + +glabel jtbl_802EB010_10C890 +.word L802E17EC_10306C, L802E1894_103114, L802E1938_1031B8, L802E19E0_103260, L802E1A84_103304, L802E1B18_103398 + +glabel D_802EB028 +.double 0.3 + +glabel D_802EB030 +.double 0.01 + +glabel D_802EB038 +.double -0.2 + +glabel D_802EB040 +.double -0.01 + +glabel D_802EB048 +.double 0.15 + +glabel D_802EB050 +.double 0.01 + +glabel D_802EB058 +.double -0.1 + +glabel D_802EB060 +.double -0.01 + +glabel D_802EB068 +.double 0.01 + +glabel jtbl_802EB070_10C8F0 +.word L802E1B48_1033C8, L802E1BF0_103470, L802E1C94_103514, L802E1D38_1035B8, L802E1DDC_10365C, L802E1E6C_1036EC + +glabel D_802EB088 +.double -0.01 + +glabel D_802EB090 +.double 0.1 + +glabel D_802EB098 +.double 0.01 + +glabel D_802EB0A0 +.double -0.3 + +glabel D_802EB0A8 +.double -0.01 + +glabel D_802EB0B0 +.double 0.01 + +glabel D_802EB0B8 +.double -0.01 + +glabel jtbl_802EB0C0_10C940 +.word L802E1F20_1037A0, L802E1FBC_10383C, L802E1FD0_103850, L802E206C_1038EC, L802E211C_10399C, 0 + +glabel D_802EB0D8 +.double 0.3 + +glabel D_802EB0E0 +.double 0.01 + +glabel D_802EB0E8 +.double -0.2 + +glabel D_802EB0F0 +.double 0.15 + +glabel D_802EB0F8 +.double 0.01 + +glabel D_802EB100 +.double -0.1 + +glabel D_802EB108 +.double -0.01 + +glabel D_802EB110 +.double 0.1 + +glabel D_802EB118 +.double 0.01 + +glabel D_802EB120 +.double -0.3 + +glabel D_802EB128 +.double -0.01 + +glabel D_802EB130 +.double 2.7 + +glabel D_802EB138 +.double 360.0 + +glabel D_802EB140 +.double 0.3 + +glabel D_802EB148 +.double 1.2 + +glabel D_802EB150 +.double -12.2 + +glabel D_802EB158 +.double 6.283180236816406 diff --git a/asm/data/code_104940_len_dc0.rodata.s b/asm/data/code_104940_len_dc0.rodata.s new file mode 100644 index 0000000000..b1e3998c59 --- /dev/null +++ b/asm/data/code_104940_len_dc0.rodata.s @@ -0,0 +1,30 @@ +.include "macro.inc" + +.section .rodata + +glabel D_802EB1D0 +.double 0.09 + +glabel D_802EB1D8 +.double 0.045 + +glabel D_802EB1E0 +.double 0.18 + +glabel D_802EB1E8 +.double 0.09 + +glabel D_802EB1F0 +.double 1.2 + +glabel D_802EB1F8 +.double 0.3 + +glabel D_802EB200 +.double 1.2 + +glabel D_802EB208 +.double 0.3 + +glabel jtbl_802EB210_10CA90 +.word L802E3DCC_10564C, L802E3DDC_10565C, L802E3C34_1054B4, L802E3C34_1054B4, L802E3C34_1054B4, L802E3C34_1054B4, L802E3C34_1054B4, L802E3C34_1054B4, L802E3DE4_105664, L802E3C34_1054B4, L802E3CD8_105558, L802E3D2C_1055AC, L802E3D84_105604, L802E3CD8_105558, L802E3D2C_1055AC, L802E3D84_105604, L802E3DCC_10564C, L802E3DCC_10564C, L802E3DCC_10564C, L802E3DCC_10564C, L802E3DCC_10564C, 0, 0, 0 diff --git a/asm/nonmatchings/code_102610_len_2330/create_shadow_callback.s b/asm/nonmatchings/code_102610_len_2330/create_shadow_callback.s deleted file mode 100644 index bd2b09445a..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/create_shadow_callback.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_shadow_callback -/* 102610 802E0D90 3C013DCC */ lui $at, 0x3dcc -/* 102614 802E0D94 3421CCCD */ ori $at, $at, 0xcccd -/* 102618 802E0D98 44810000 */ mtc1 $at, $f0 -/* 10261C 802E0D9C 00000000 */ nop -/* 102620 802E0DA0 E480001C */ swc1 $f0, 0x1c($a0) -/* 102624 802E0DA4 E4800020 */ swc1 $f0, 0x20($a0) -/* 102628 802E0DA8 03E00008 */ jr $ra -/* 10262C 802E0DAC E4800024 */ swc1 $f0, 0x24($a0) diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E0DB0.s b/asm/nonmatchings/code_102610_len_2330/func_802E0DB0.s deleted file mode 100644 index 7942e8d633..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E0DB0.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E0DB0 -/* 102630 802E0DB0 90820006 */ lbu $v0, 6($a0) -/* 102634 802E0DB4 30420004 */ andi $v0, $v0, 4 -/* 102638 802E0DB8 10400007 */ beqz $v0, .L802E0DD8 -/* 10263C 802E0DBC 0000102D */ daddu $v0, $zero, $zero -/* 102640 802E0DC0 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 102644 802E0DC4 8C63EFC8 */ lw $v1, %lo(gPlayerStatus)($v1) -/* 102648 802E0DC8 30630002 */ andi $v1, $v1, 2 -/* 10264C 802E0DCC 14600002 */ bnez $v1, .L802E0DD8 -/* 102650 802E0DD0 24020001 */ addiu $v0, $zero, 1 -/* 102654 802E0DD4 0000102D */ daddu $v0, $zero, $zero -.L802E0DD8: -/* 102658 802E0DD8 03E00008 */ jr $ra -/* 10265C 802E0DDC 00000000 */ nop diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E10F4.s b/asm/nonmatchings/code_102610_len_2330/func_802E10F4.s deleted file mode 100644 index e9495f3ac3..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E10F4.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E10F4 -/* 102974 802E10F4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 102978 802E10F8 AFB10014 */ sw $s1, 0x14($sp) -/* 10297C 802E10FC 0080882D */ daddu $s1, $a0, $zero -/* 102980 802E1100 AFBF0018 */ sw $ra, 0x18($sp) -/* 102984 802E1104 AFB00010 */ sw $s0, 0x10($sp) -/* 102988 802E1108 8E300040 */ lw $s0, 0x40($s1) -/* 10298C 802E110C 86020004 */ lh $v0, 4($s0) -/* 102990 802E1110 24420006 */ addiu $v0, $v0, 6 -/* 102994 802E1114 44826000 */ mtc1 $v0, $f12 -/* 102998 802E1118 00000000 */ nop -/* 10299C 802E111C 0C00A6C9 */ jal clamp_angle -/* 1029A0 802E1120 46806320 */ cvt.s.w $f12, $f12 -/* 1029A4 802E1124 4600008D */ trunc.w.s $f2, $f0 -/* 1029A8 802E1128 44021000 */ mfc1 $v0, $f2 -/* 1029AC 802E112C 0220202D */ daddu $a0, $s1, $zero -/* 1029B0 802E1130 0C0B8D94 */ jal func_802E3650 -/* 1029B4 802E1134 A6020004 */ sh $v0, 4($s0) -/* 1029B8 802E1138 8FBF0018 */ lw $ra, 0x18($sp) -/* 1029BC 802E113C 8FB10014 */ lw $s1, 0x14($sp) -/* 1029C0 802E1140 8FB00010 */ lw $s0, 0x10($sp) -/* 1029C4 802E1144 03E00008 */ jr $ra -/* 1029C8 802E1148 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E114C.s b/asm/nonmatchings/code_102610_len_2330/func_802E114C.s deleted file mode 100644 index 0e73d5f4b5..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E114C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E114C -/* 1029CC 802E114C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1029D0 802E1150 AFBF0010 */ sw $ra, 0x10($sp) -/* 1029D4 802E1154 0C009C22 */ jal func_80027088 -/* 1029D8 802E1158 24040001 */ addiu $a0, $zero, 1 -/* 1029DC 802E115C 0C03805E */ jal disable_player_input -/* 1029E0 802E1160 00000000 */ nop -/* 1029E4 802E1164 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* 1029E8 802E1168 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* 1029EC 802E116C AC400054 */ sw $zero, 0x54($v0) -/* 1029F0 802E1170 8FBF0010 */ lw $ra, 0x10($sp) -/* 1029F4 802E1174 03E00008 */ jr $ra -/* 1029F8 802E1178 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E117C.s b/asm/nonmatchings/code_102610_len_2330/func_802E117C.s deleted file mode 100644 index 3157c53805..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E117C.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E117C -/* 1029FC 802E117C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102A00 802E1180 AFBF0010 */ sw $ra, 0x10($sp) -/* 102A04 802E1184 0C009C22 */ jal func_80027088 -/* 102A08 802E1188 0000202D */ daddu $a0, $zero, $zero -/* 102A0C 802E118C 0C038069 */ jal enable_player_input -/* 102A10 802E1190 00000000 */ nop -/* 102A14 802E1194 8FBF0010 */ lw $ra, 0x10($sp) -/* 102A18 802E1198 03E00008 */ jr $ra -/* 102A1C 802E119C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E1204.s b/asm/nonmatchings/code_102610_len_2330/func_802E1204.s deleted file mode 100644 index dca5976d4a..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E1204.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1204 -/* 102A84 802E1204 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102A88 802E1208 AFB00010 */ sw $s0, 0x10($sp) -/* 102A8C 802E120C 0080802D */ daddu $s0, $a0, $zero -/* 102A90 802E1210 3C04F840 */ lui $a0, 0xf840 -/* 102A94 802E1214 AFBF0014 */ sw $ra, 0x14($sp) -/* 102A98 802E1218 0C05152F */ jal get_global_flag -/* 102A9C 802E121C 34845BDF */ ori $a0, $a0, 0x5bdf -/* 102AA0 802E1220 1440000B */ bnez $v0, .L802E1250 -/* 102AA4 802E1224 00000000 */ nop -/* 102AA8 802E1228 3C05802F */ lui $a1, %hi(D_802EB390) -/* 102AAC 802E122C 24A5B390 */ addiu $a1, $a1, %lo(D_802EB390) -/* 102AB0 802E1230 ACA00000 */ sw $zero, ($a1) -/* 102AB4 802E1234 0C049640 */ jal load_string -/* 102AB8 802E1238 3C04001D */ lui $a0, 0x1d -/* 102ABC 802E123C 3C04F840 */ lui $a0, 0xf840 -/* 102AC0 802E1240 0C051514 */ jal set_global_flag -/* 102AC4 802E1244 34845BDF */ ori $a0, $a0, 0x5bdf -/* 102AC8 802E1248 080B8498 */ j .L802E1260 -/* 102ACC 802E124C 00000000 */ nop -.L802E1250: -/* 102AD0 802E1250 0C043F5A */ jal func_8010FD68 -/* 102AD4 802E1254 0200202D */ daddu $a0, $s0, $zero -/* 102AD8 802E1258 0C043F5A */ jal func_8010FD68 -/* 102ADC 802E125C 0200202D */ daddu $a0, $s0, $zero -.L802E1260: -/* 102AE0 802E1260 8FBF0014 */ lw $ra, 0x14($sp) -/* 102AE4 802E1264 8FB00010 */ lw $s0, 0x10($sp) -/* 102AE8 802E1268 03E00008 */ jr $ra -/* 102AEC 802E126C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E1270.s b/asm/nonmatchings/code_102610_len_2330/func_802E1270.s deleted file mode 100644 index 8b73896643..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E1270.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1270 -/* 102AF0 802E1270 3C02802F */ lui $v0, %hi(D_802EB390) -/* 102AF4 802E1274 8C42B390 */ lw $v0, %lo(D_802EB390)($v0) -/* 102AF8 802E1278 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102AFC 802E127C 10400003 */ beqz $v0, .L802E128C -/* 102B00 802E1280 AFBF0010 */ sw $ra, 0x10($sp) -/* 102B04 802E1284 0C043F5A */ jal func_8010FD68 -/* 102B08 802E1288 00000000 */ nop -.L802E128C: -/* 102B0C 802E128C 8FBF0010 */ lw $ra, 0x10($sp) -/* 102B10 802E1290 03E00008 */ jr $ra -/* 102B14 802E1294 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E1298.s b/asm/nonmatchings/code_102610_len_2330/func_802E1298.s deleted file mode 100644 index efac3f7fa9..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E1298.s +++ /dev/null @@ -1,28 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1298 -/* 102B18 802E1298 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102B1C 802E129C 3C04001D */ lui $a0, 0x1d -/* 102B20 802E12A0 34840004 */ ori $a0, $a0, 4 -/* 102B24 802E12A4 3C05802F */ lui $a1, %hi(D_802EB394) -/* 102B28 802E12A8 24A5B394 */ addiu $a1, $a1, %lo(D_802EB394) -/* 102B2C 802E12AC AFB00010 */ sw $s0, 0x10($sp) -/* 102B30 802E12B0 3C10802F */ lui $s0, %hi(D_802EB390) -/* 102B34 802E12B4 2610B390 */ addiu $s0, $s0, %lo(D_802EB390) -/* 102B38 802E12B8 AFBF0014 */ sw $ra, 0x14($sp) -/* 102B3C 802E12BC AE000000 */ sw $zero, ($s0) -/* 102B40 802E12C0 0C049640 */ jal load_string -/* 102B44 802E12C4 ACA00000 */ sw $zero, ($a1) -/* 102B48 802E12C8 3C04001E */ lui $a0, 0x1e -/* 102B4C 802E12CC 3484000A */ ori $a0, $a0, 0xa -/* 102B50 802E12D0 3C01802F */ lui $at, %hi(D_802EB39C) -/* 102B54 802E12D4 AC22B39C */ sw $v0, %lo(D_802EB39C)($at) -/* 102B58 802E12D8 0C049640 */ jal load_string -/* 102B5C 802E12DC 0200282D */ daddu $a1, $s0, $zero -/* 102B60 802E12E0 8FBF0014 */ lw $ra, 0x14($sp) -/* 102B64 802E12E4 8FB00010 */ lw $s0, 0x10($sp) -/* 102B68 802E12E8 3C01802F */ lui $at, %hi(D_802EB398) -/* 102B6C 802E12EC AC22B398 */ sw $v0, %lo(D_802EB398)($at) -/* 102B70 802E12F0 03E00008 */ jr $ra -/* 102B74 802E12F4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E12F8.s b/asm/nonmatchings/code_102610_len_2330/func_802E12F8.s deleted file mode 100644 index dff7609b72..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E12F8.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E12F8 -/* 102B78 802E12F8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102B7C 802E12FC 3C04001D */ lui $a0, 0x1d -/* 102B80 802E1300 3C05802F */ lui $a1, %hi(D_802EB39C) -/* 102B84 802E1304 8CA5B39C */ lw $a1, %lo(D_802EB39C)($a1) -/* 102B88 802E1308 AFBF0010 */ sw $ra, 0x10($sp) -/* 102B8C 802E130C 0C04969A */ jal load_message_to_printer -/* 102B90 802E1310 34840005 */ ori $a0, $a0, 5 -/* 102B94 802E1314 0C05272D */ jal play_sound -/* 102B98 802E1318 24040010 */ addiu $a0, $zero, 0x10 -/* 102B9C 802E131C 8FBF0010 */ lw $ra, 0x10($sp) -/* 102BA0 802E1320 03E00008 */ jr $ra -/* 102BA4 802E1324 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E1328.s b/asm/nonmatchings/code_102610_len_2330/func_802E1328.s deleted file mode 100644 index 53e9e45649..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E1328.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1328 -/* 102BA8 802E1328 3C02802F */ lui $v0, %hi(D_802EB394) -/* 102BAC 802E132C 8C42B394 */ lw $v0, %lo(D_802EB394)($v0) -/* 102BB0 802E1330 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102BB4 802E1334 10400003 */ beqz $v0, .L802E1344 -/* 102BB8 802E1338 AFBF0010 */ sw $ra, 0x10($sp) -/* 102BBC 802E133C 0C043F5A */ jal func_8010FD68 -/* 102BC0 802E1340 00000000 */ nop -.L802E1344: -/* 102BC4 802E1344 8FBF0010 */ lw $ra, 0x10($sp) -/* 102BC8 802E1348 03E00008 */ jr $ra -/* 102BCC 802E134C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E1350.s b/asm/nonmatchings/code_102610_len_2330/func_802E1350.s deleted file mode 100644 index a8ad20ff3b..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E1350.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1350 -/* 102BD0 802E1350 3C02802F */ lui $v0, %hi(D_802EB390) -/* 102BD4 802E1354 8C42B390 */ lw $v0, %lo(D_802EB390)($v0) -/* 102BD8 802E1358 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102BDC 802E135C 10400013 */ beqz $v0, .L802E13AC -/* 102BE0 802E1360 AFBF0010 */ sw $ra, 0x10($sp) -/* 102BE4 802E1364 3C02802F */ lui $v0, %hi(D_802EB398) -/* 102BE8 802E1368 8C42B398 */ lw $v0, %lo(D_802EB398)($v0) -/* 102BEC 802E136C 904304E8 */ lbu $v1, 0x4e8($v0) -/* 102BF0 802E1370 24020001 */ addiu $v0, $zero, 1 -/* 102BF4 802E1374 14620007 */ bne $v1, $v0, .L802E1394 -/* 102BF8 802E1378 00000000 */ nop -/* 102BFC 802E137C 3C05802F */ lui $a1, %hi(D_802E99DC) -/* 102C00 802E1380 24A599DC */ addiu $a1, $a1, %lo(D_802E99DC) -/* 102C04 802E1384 0C043EF0 */ jal func_8010FBC0 -/* 102C08 802E1388 00000000 */ nop -/* 102C0C 802E138C 080B84E7 */ j .L802E139C -/* 102C10 802E1390 00000000 */ nop -.L802E1394: -/* 102C14 802E1394 0C043F5A */ jal func_8010FD68 -/* 102C18 802E1398 00000000 */ nop -.L802E139C: -/* 102C1C 802E139C 3C04802F */ lui $a0, %hi(D_802EB39C) -/* 102C20 802E13A0 8C84B39C */ lw $a0, %lo(D_802EB39C)($a0) -/* 102C24 802E13A4 0C04971C */ jal close_message -/* 102C28 802E13A8 00000000 */ nop -.L802E13AC: -/* 102C2C 802E13AC 8FBF0010 */ lw $ra, 0x10($sp) -/* 102C30 802E13B0 03E00008 */ jr $ra -/* 102C34 802E13B4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102610_len_2330/func_802E13B8.s b/asm/nonmatchings/code_102610_len_2330/func_802E13B8.s deleted file mode 100644 index c8680b4091..0000000000 --- a/asm/nonmatchings/code_102610_len_2330/func_802E13B8.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E13B8 -/* 102C38 802E13B8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 102C3C 802E13BC AFB00010 */ sw $s0, 0x10($sp) -/* 102C40 802E13C0 0080802D */ daddu $s0, $a0, $zero -/* 102C44 802E13C4 AFBF0018 */ sw $ra, 0x18($sp) -/* 102C48 802E13C8 AFB10014 */ sw $s1, 0x14($sp) -/* 102C4C 802E13CC 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 102C50 802E13D0 8E110040 */ lw $s1, 0x40($s0) -/* 102C54 802E13D4 3C02802E */ lui $v0, %hi(func_802E0DE0) -/* 102C58 802E13D8 24420DE0 */ addiu $v0, $v0, %lo(func_802E0DE0) -/* 102C5C 802E13DC AE02003C */ sw $v0, 0x3c($s0) -/* 102C60 802E13E0 24020008 */ addiu $v0, $zero, 8 -/* 102C64 802E13E4 A6220004 */ sh $v0, 4($s1) -/* 102C68 802E13E8 8FBF0018 */ lw $ra, 0x18($sp) -/* 102C6C 802E13EC 8FB10014 */ lw $s1, 0x14($sp) -/* 102C70 802E13F0 8FB00010 */ lw $s0, 0x10($sp) -/* 102C74 802E13F4 03E00008 */ jr $ra -/* 102C78 802E13F8 27BD0020 */ addiu $sp, $sp, 0x20 -/* 102C7C 802E13FC 00000000 */ nop diff --git a/asm/nonmatchings/code_102C80/entity_init_BlueSwitch.s b/asm/nonmatchings/code_102C80/entity_init_BlueSwitch.s deleted file mode 100644 index e57c0616db..0000000000 --- a/asm/nonmatchings/code_102C80/entity_init_BlueSwitch.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_init_BlueSwitch -/* 103C00 802E2380 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 103C04 802E2384 AFB00010 */ sw $s0, 0x10($sp) -/* 103C08 802E2388 0080802D */ daddu $s0, $a0, $zero -/* 103C0C 802E238C AFBF0018 */ sw $ra, 0x18($sp) -/* 103C10 802E2390 AFB10014 */ sw $s1, 0x14($sp) -/* 103C14 802E2394 0C0B88D3 */ jal func_802E234C -/* 103C18 802E2398 8E110040 */ lw $s1, 0x40($s0) -/* 103C1C 802E239C 3C038016 */ lui $v1, %hi(D_8015C7D0) -/* 103C20 802E23A0 8C63C7D0 */ lw $v1, %lo(D_8015C7D0)($v1) -/* 103C24 802E23A4 24020002 */ addiu $v0, $zero, 2 -/* 103C28 802E23A8 14620005 */ bne $v1, $v0, .L802E23C0 -/* 103C2C 802E23AC 24020001 */ addiu $v0, $zero, 1 -/* 103C30 802E23B0 3C01802F */ lui $at, %hi(D_802EB3A0) -/* 103C34 802E23B4 AC30B3A0 */ sw $s0, %lo(D_802EB3A0)($at) -/* 103C38 802E23B8 080B88FD */ j .L802E23F4 -/* 103C3C 802E23BC 00000000 */ nop -.L802E23C0: -/* 103C40 802E23C0 1462000A */ bne $v1, $v0, .L802E23EC -/* 103C44 802E23C4 00000000 */ nop -/* 103C48 802E23C8 3C02802F */ lui $v0, %hi(D_802EB3A0) -/* 103C4C 802E23CC 8C42B3A0 */ lw $v0, %lo(D_802EB3A0)($v0) -/* 103C50 802E23D0 10400008 */ beqz $v0, .L802E23F4 -/* 103C54 802E23D4 00000000 */ nop -/* 103C58 802E23D8 AE220028 */ sw $v0, 0x28($s1) -/* 103C5C 802E23DC 8E020000 */ lw $v0, ($s0) -/* 103C60 802E23E0 34420001 */ ori $v0, $v0, 1 -/* 103C64 802E23E4 080B88FD */ j .L802E23F4 -/* 103C68 802E23E8 AE020000 */ sw $v0, ($s0) -.L802E23EC: -/* 103C6C 802E23EC 3C01802F */ lui $at, %hi(D_802EB3A0) -/* 103C70 802E23F0 AC20B3A0 */ sw $zero, %lo(D_802EB3A0)($at) -.L802E23F4: -/* 103C74 802E23F4 8FBF0018 */ lw $ra, 0x18($sp) -/* 103C78 802E23F8 8FB10014 */ lw $s1, 0x14($sp) -/* 103C7C 802E23FC 8FB00010 */ lw $s0, 0x10($sp) -/* 103C80 802E2400 03E00008 */ jr $ra -/* 103C84 802E2404 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_102C80/entity_init_HugeBlueSwitch.s b/asm/nonmatchings/code_102C80/entity_init_HugeBlueSwitch.s deleted file mode 100644 index 8b73518de6..0000000000 --- a/asm/nonmatchings/code_102C80/entity_init_HugeBlueSwitch.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_init_HugeBlueSwitch -/* 103C88 802E2408 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 103C8C 802E240C AFB00010 */ sw $s0, 0x10($sp) -/* 103C90 802E2410 AFBF0014 */ sw $ra, 0x14($sp) -/* 103C94 802E2414 0C0B88D3 */ jal func_802E234C -/* 103C98 802E2418 0080802D */ daddu $s0, $a0, $zero -/* 103C9C 802E241C 3C014040 */ lui $at, 0x4040 -/* 103CA0 802E2420 44810000 */ mtc1 $at, $f0 -/* 103CA4 802E2424 8E020040 */ lw $v0, 0x40($s0) -/* 103CA8 802E2428 E6000054 */ swc1 $f0, 0x54($s0) -/* 103CAC 802E242C E6000058 */ swc1 $f0, 0x58($s0) -/* 103CB0 802E2430 E600005C */ swc1 $f0, 0x5c($s0) -/* 103CB4 802E2434 E4400014 */ swc1 $f0, 0x14($v0) -/* 103CB8 802E2438 E4400018 */ swc1 $f0, 0x18($v0) -/* 103CBC 802E243C E440001C */ swc1 $f0, 0x1c($v0) -/* 103CC0 802E2440 8FBF0014 */ lw $ra, 0x14($sp) -/* 103CC4 802E2444 8FB00010 */ lw $s0, 0x10($sp) -/* 103CC8 802E2448 03E00008 */ jr $ra -/* 103CCC 802E244C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E1400.s b/asm/nonmatchings/code_102C80/func_802E1400.s deleted file mode 100644 index 595763abe1..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1400.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1400 -/* 102C80 802E1400 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102C84 802E1404 AFBF0014 */ sw $ra, 0x14($sp) -/* 102C88 802E1408 AFB00010 */ sw $s0, 0x10($sp) -/* 102C8C 802E140C 90820006 */ lbu $v0, 6($a0) -/* 102C90 802E1410 8C900040 */ lw $s0, 0x40($a0) -/* 102C94 802E1414 30420001 */ andi $v0, $v0, 1 -/* 102C98 802E1418 1040000D */ beqz $v0, .L802E1450 -/* 102C9C 802E141C 00000000 */ nop -/* 102CA0 802E1420 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 102CA4 802E1424 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 102CA8 802E1428 804300B4 */ lb $v1, 0xb4($v0) -/* 102CAC 802E142C 2402000E */ addiu $v0, $zero, 0xe -/* 102CB0 802E1430 10620003 */ beq $v1, $v0, .L802E1440 -/* 102CB4 802E1434 24020010 */ addiu $v0, $zero, 0x10 -/* 102CB8 802E1438 14620005 */ bne $v1, $v0, .L802E1450 -/* 102CBC 802E143C 00000000 */ nop -.L802E1440: -/* 102CC0 802E1440 0C043F5A */ jal func_8010FD68 -/* 102CC4 802E1444 00000000 */ nop -/* 102CC8 802E1448 24020008 */ addiu $v0, $zero, 8 -/* 102CCC 802E144C A6020022 */ sh $v0, 0x22($s0) -.L802E1450: -/* 102CD0 802E1450 8FBF0014 */ lw $ra, 0x14($sp) -/* 102CD4 802E1454 8FB00010 */ lw $s0, 0x10($sp) -/* 102CD8 802E1458 03E00008 */ jr $ra -/* 102CDC 802E145C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E1460.s b/asm/nonmatchings/code_102C80/func_802E1460.s deleted file mode 100644 index 47dde6b4bf..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1460.s +++ /dev/null @@ -1,36 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1460 -/* 102CE0 802E1460 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 102CE4 802E1464 AFB10014 */ sw $s1, 0x14($sp) -/* 102CE8 802E1468 0080882D */ daddu $s1, $a0, $zero -/* 102CEC 802E146C AFBF0018 */ sw $ra, 0x18($sp) -/* 102CF0 802E1470 AFB00010 */ sw $s0, 0x10($sp) -/* 102CF4 802E1474 8E300040 */ lw $s0, 0x40($s1) -/* 102CF8 802E1478 96020022 */ lhu $v0, 0x22($s0) -/* 102CFC 802E147C 2443FFFF */ addiu $v1, $v0, -1 -/* 102D00 802E1480 3042FFFF */ andi $v0, $v0, 0xffff -/* 102D04 802E1484 10400009 */ beqz $v0, .L802E14AC -/* 102D08 802E1488 A6030022 */ sh $v1, 0x22($s0) -/* 102D0C 802E148C C620004C */ lwc1 $f0, 0x4c($s1) -/* 102D10 802E1490 3C01802F */ lui $at, %hi(D_802EB000) -/* 102D14 802E1494 D422B000 */ ldc1 $f2, %lo(D_802EB000)($at) -/* 102D18 802E1498 46000021 */ cvt.d.s $f0, $f0 -/* 102D1C 802E149C 46220001 */ sub.d $f0, $f0, $f2 -/* 102D20 802E14A0 46200020 */ cvt.s.d $f0, $f0 -/* 102D24 802E14A4 080B8531 */ j .L802E14C4 -/* 102D28 802E14A8 E620004C */ swc1 $f0, 0x4c($s1) -.L802E14AC: -/* 102D2C 802E14AC 0C04419E */ jal func_80110678 -/* 102D30 802E14B0 0220202D */ daddu $a0, $s1, $zero -/* 102D34 802E14B4 0C043F5A */ jal func_8010FD68 -/* 102D38 802E14B8 0220202D */ daddu $a0, $s1, $zero -/* 102D3C 802E14BC 24020008 */ addiu $v0, $zero, 8 -/* 102D40 802E14C0 A6020022 */ sh $v0, 0x22($s0) -.L802E14C4: -/* 102D44 802E14C4 8FBF0018 */ lw $ra, 0x18($sp) -/* 102D48 802E14C8 8FB10014 */ lw $s1, 0x14($sp) -/* 102D4C 802E14CC 8FB00010 */ lw $s0, 0x10($sp) -/* 102D50 802E14D0 03E00008 */ jr $ra -/* 102D54 802E14D4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_102C80/func_802E14D8.s b/asm/nonmatchings/code_102C80/func_802E14D8.s deleted file mode 100644 index 692eca97a4..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E14D8.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E14D8 -/* 102D58 802E14D8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102D5C 802E14DC AFBF0014 */ sw $ra, 0x14($sp) -/* 102D60 802E14E0 AFB00010 */ sw $s0, 0x10($sp) -/* 102D64 802E14E4 8C900040 */ lw $s0, 0x40($a0) -/* 102D68 802E14E8 96020022 */ lhu $v0, 0x22($s0) -/* 102D6C 802E14EC 2443FFFF */ addiu $v1, $v0, -1 -/* 102D70 802E14F0 3042FFFF */ andi $v0, $v0, 0xffff -/* 102D74 802E14F4 10400009 */ beqz $v0, .L802E151C -/* 102D78 802E14F8 A6030022 */ sh $v1, 0x22($s0) -/* 102D7C 802E14FC C480004C */ lwc1 $f0, 0x4c($a0) -/* 102D80 802E1500 3C01802F */ lui $at, %hi(D_802EB008) -/* 102D84 802E1504 D422B008 */ ldc1 $f2, %lo(D_802EB008)($at) -/* 102D88 802E1508 46000021 */ cvt.d.s $f0, $f0 -/* 102D8C 802E150C 46220000 */ add.d $f0, $f0, $f2 -/* 102D90 802E1510 46200020 */ cvt.s.d $f0, $f0 -/* 102D94 802E1514 080B854B */ j .L802E152C -/* 102D98 802E1518 E480004C */ swc1 $f0, 0x4c($a0) -.L802E151C: -/* 102D9C 802E151C 0C043F5A */ jal func_8010FD68 -/* 102DA0 802E1520 00000000 */ nop -/* 102DA4 802E1524 24020008 */ addiu $v0, $zero, 8 -/* 102DA8 802E1528 A6020022 */ sh $v0, 0x22($s0) -.L802E152C: -/* 102DAC 802E152C 8FBF0014 */ lw $ra, 0x14($sp) -/* 102DB0 802E1530 8FB00010 */ lw $s0, 0x10($sp) -/* 102DB4 802E1534 03E00008 */ jr $ra -/* 102DB8 802E1538 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E1614.s b/asm/nonmatchings/code_102C80/func_802E1614.s deleted file mode 100644 index 6516709140..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1614.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1614 -/* 102E94 802E1614 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102E98 802E1618 AFBF0010 */ sw $ra, 0x10($sp) -/* 102E9C 802E161C 90820006 */ lbu $v0, 6($a0) -/* 102EA0 802E1620 30420001 */ andi $v0, $v0, 1 -/* 102EA4 802E1624 1040000B */ beqz $v0, .L802E1654 -/* 102EA8 802E1628 00000000 */ nop -/* 102EAC 802E162C 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 102EB0 802E1630 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 102EB4 802E1634 804300B4 */ lb $v1, 0xb4($v0) -/* 102EB8 802E1638 2402000E */ addiu $v0, $zero, 0xe -/* 102EBC 802E163C 10620003 */ beq $v1, $v0, .L802E164C -/* 102EC0 802E1640 24020010 */ addiu $v0, $zero, 0x10 -/* 102EC4 802E1644 14620003 */ bne $v1, $v0, .L802E1654 -/* 102EC8 802E1648 00000000 */ nop -.L802E164C: -/* 102ECC 802E164C 0C043F5A */ jal func_8010FD68 -/* 102ED0 802E1650 00000000 */ nop -.L802E1654: -/* 102ED4 802E1654 8FBF0010 */ lw $ra, 0x10($sp) -/* 102ED8 802E1658 03E00008 */ jr $ra -/* 102EDC 802E165C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E1660.s b/asm/nonmatchings/code_102C80/func_802E1660.s deleted file mode 100644 index 7beb687c43..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1660.s +++ /dev/null @@ -1,65 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1660 -/* 102EE0 802E1660 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 102EE4 802E1664 AFB00010 */ sw $s0, 0x10($sp) -/* 102EE8 802E1668 0080802D */ daddu $s0, $a0, $zero -/* 102EEC 802E166C AFBF0020 */ sw $ra, 0x20($sp) -/* 102EF0 802E1670 AFB3001C */ sw $s3, 0x1c($sp) -/* 102EF4 802E1674 AFB20018 */ sw $s2, 0x18($sp) -/* 102EF8 802E1678 AFB10014 */ sw $s1, 0x14($sp) -/* 102EFC 802E167C 0C0B854F */ jal func_802E153C -/* 102F00 802E1680 8E130040 */ lw $s3, 0x40($s0) -/* 102F04 802E1684 3C118011 */ lui $s1, %hi(gPlayerStatus) -/* 102F08 802E1688 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) -/* 102F0C 802E168C 92020006 */ lbu $v0, 6($s0) -/* 102F10 802E1690 3C128011 */ lui $s2, %hi(D_8010EBB0) -/* 102F14 802E1694 2652EBB0 */ addiu $s2, $s2, %lo(D_8010EBB0) -/* 102F18 802E1698 30420040 */ andi $v0, $v0, 0x40 -/* 102F1C 802E169C 1040000A */ beqz $v0, .L802E16C8 -/* 102F20 802E16A0 24020012 */ addiu $v0, $zero, 0x12 -/* 102F24 802E16A4 822300B4 */ lb $v1, 0xb4($s1) -/* 102F28 802E16A8 14620009 */ bne $v1, $v0, .L802E16D0 -/* 102F2C 802E16AC 2402000D */ addiu $v0, $zero, 0xd -/* 102F30 802E16B0 3C028011 */ lui $v0, %hi(gPlayerData+0x1) -/* 102F34 802E16B4 8042F291 */ lb $v0, %lo(gPlayerData+0x1)($v0) -/* 102F38 802E16B8 0440001A */ bltz $v0, .L802E1724 -/* 102F3C 802E16BC 00000000 */ nop -/* 102F40 802E16C0 080B85C2 */ j .L802E1708 -/* 102F44 802E16C4 00000000 */ nop -.L802E16C8: -/* 102F48 802E16C8 822300B4 */ lb $v1, 0xb4($s1) -/* 102F4C 802E16CC 2402000D */ addiu $v0, $zero, 0xd -.L802E16D0: -/* 102F50 802E16D0 10620014 */ beq $v1, $v0, .L802E1724 -/* 102F54 802E16D4 24020004 */ addiu $v0, $zero, 4 -/* 102F58 802E16D8 82430003 */ lb $v1, 3($s2) -/* 102F5C 802E16DC 14620004 */ bne $v1, $v0, .L802E16F0 -/* 102F60 802E16E0 00000000 */ nop -/* 102F64 802E16E4 82420000 */ lb $v0, ($s2) -/* 102F68 802E16E8 1440000E */ bnez $v0, .L802E1724 -/* 102F6C 802E16EC 00000000 */ nop -.L802E16F0: -/* 102F70 802E16F0 92030006 */ lbu $v1, 6($s0) -/* 102F74 802E16F4 30620001 */ andi $v0, $v1, 1 -/* 102F78 802E16F8 14400003 */ bnez $v0, .L802E1708 -/* 102F7C 802E16FC 30620080 */ andi $v0, $v1, 0x80 -/* 102F80 802E1700 10400008 */ beqz $v0, .L802E1724 -/* 102F84 802E1704 00000000 */ nop -.L802E1708: -/* 102F88 802E1708 0C043F5A */ jal func_8010FD68 -/* 102F8C 802E170C 0200202D */ daddu $a0, $s0, $zero -/* 102F90 802E1710 8E640028 */ lw $a0, 0x28($s3) -/* 102F94 802E1714 10800003 */ beqz $a0, .L802E1724 -/* 102F98 802E1718 00000000 */ nop -/* 102F9C 802E171C 0C043F5A */ jal func_8010FD68 -/* 102FA0 802E1720 00000000 */ nop -.L802E1724: -/* 102FA4 802E1724 8FBF0020 */ lw $ra, 0x20($sp) -/* 102FA8 802E1728 8FB3001C */ lw $s3, 0x1c($sp) -/* 102FAC 802E172C 8FB20018 */ lw $s2, 0x18($sp) -/* 102FB0 802E1730 8FB10014 */ lw $s1, 0x14($sp) -/* 102FB4 802E1734 8FB00010 */ lw $s0, 0x10($sp) -/* 102FB8 802E1738 03E00008 */ jr $ra -/* 102FBC 802E173C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_102C80/func_802E1740.s b/asm/nonmatchings/code_102C80/func_802E1740.s deleted file mode 100644 index c019e8b7b6..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1740.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1740 -/* 102FC0 802E1740 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 102FC4 802E1744 AFBF0010 */ sw $ra, 0x10($sp) -/* 102FC8 802E1748 90820006 */ lbu $v0, 6($a0) -/* 102FCC 802E174C 30420001 */ andi $v0, $v0, 1 -/* 102FD0 802E1750 14400003 */ bnez $v0, .L802E1760 -/* 102FD4 802E1754 00000000 */ nop -/* 102FD8 802E1758 0C043F5A */ jal func_8010FD68 -/* 102FDC 802E175C 00000000 */ nop -.L802E1760: -/* 102FE0 802E1760 8FBF0010 */ lw $ra, 0x10($sp) -/* 102FE4 802E1764 03E00008 */ jr $ra -/* 102FE8 802E1768 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E176C.s b/asm/nonmatchings/code_102C80/func_802E176C.s deleted file mode 100644 index af4e668ec1..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E176C.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E176C -/* 102FEC 802E176C 8C820040 */ lw $v0, 0x40($a0) -/* 102FF0 802E1770 3C013F80 */ lui $at, 0x3f80 -/* 102FF4 802E1774 44810000 */ mtc1 $at, $f0 -/* 102FF8 802E1778 3C013DCC */ lui $at, 0x3dcc -/* 102FFC 802E177C 3421CCCD */ ori $at, $at, 0xcccd -/* 103000 802E1780 44811000 */ mtc1 $at, $f2 -/* 103004 802E1784 3C01BDCC */ lui $at, 0xbdcc -/* 103008 802E1788 3421CCCD */ ori $at, $at, 0xcccd -/* 10300C 802E178C 44812000 */ mtc1 $at, $f4 -/* 103010 802E1790 E4400000 */ swc1 $f0, ($v0) -/* 103014 802E1794 E4420004 */ swc1 $f2, 4($v0) -/* 103018 802E1798 E4440008 */ swc1 $f4, 8($v0) -/* 10301C 802E179C A0400010 */ sb $zero, 0x10($v0) -/* 103020 802E17A0 03E00008 */ jr $ra -/* 103024 802E17A4 A0400011 */ sb $zero, 0x11($v0) diff --git a/asm/nonmatchings/code_102C80/func_802E17A8.s b/asm/nonmatchings/code_102C80/func_802E17A8.s index a874295f92..dd7eeb4ca7 100644 --- a/asm/nonmatchings/code_102C80/func_802E17A8.s +++ b/asm/nonmatchings/code_102C80/func_802E17A8.s @@ -14,11 +14,12 @@ glabel func_802E17A8 /* 10304C 802E17CC 104000D3 */ beqz $v0, .L802E1B1C /* 103050 802E17D0 0000902D */ daddu $s2, $zero, $zero /* 103054 802E17D4 00031080 */ sll $v0, $v1, 2 -/* 103058 802E17D8 3C01802F */ lui $at, %hi(D_802EB010) +/* 103058 802E17D8 3C01802F */ lui $at, %hi(jtbl_802EB010_10C890) /* 10305C 802E17DC 00220821 */ addu $at, $at, $v0 -/* 103060 802E17E0 8C22B010 */ lw $v0, %lo(D_802EB010)($at) +/* 103060 802E17E0 8C22B010 */ lw $v0, %lo(jtbl_802EB010_10C890)($at) /* 103064 802E17E4 00400008 */ jr $v0 /* 103068 802E17E8 00000000 */ nop +glabel L802E17EC_10306C /* 10306C 802E17EC C602001C */ lwc1 $f2, 0x1c($s0) /* 103070 802E17F0 3C01802F */ lui $at, %hi(D_802EB028) /* 103074 802E17F4 D420B028 */ ldc1 $f0, %lo(D_802EB028)($at) @@ -62,6 +63,7 @@ glabel func_802E17A8 /* 103108 802E1888 00000000 */ nop /* 10310C 802E188C 080B86C1 */ j .L802E1B04 /* 103110 802E1890 00000000 */ nop +glabel L802E1894_103114 /* 103114 802E1894 C602001C */ lwc1 $f2, 0x1c($s0) /* 103118 802E1898 3C01802F */ lui $at, %hi(D_802EB038) /* 10311C 802E189C D420B038 */ ldc1 $f0, %lo(D_802EB038)($at) @@ -104,6 +106,7 @@ glabel func_802E17A8 /* 1031AC 802E192C 00000000 */ nop /* 1031B0 802E1930 080B86C1 */ j .L802E1B04 /* 1031B4 802E1934 00000000 */ nop +glabel L802E1938_1031B8 /* 1031B8 802E1938 C602001C */ lwc1 $f2, 0x1c($s0) /* 1031BC 802E193C 3C01802F */ lui $at, %hi(D_802EB048) /* 1031C0 802E1940 D420B048 */ ldc1 $f0, %lo(D_802EB048)($at) @@ -147,6 +150,7 @@ glabel func_802E17A8 /* 103254 802E19D4 00000000 */ nop /* 103258 802E19D8 080B86C1 */ j .L802E1B04 /* 10325C 802E19DC 00000000 */ nop +glabel L802E19E0_103260 /* 103260 802E19E0 C602001C */ lwc1 $f2, 0x1c($s0) /* 103264 802E19E4 3C01802F */ lui $at, %hi(D_802EB058) /* 103268 802E19E8 D420B058 */ ldc1 $f0, %lo(D_802EB058)($at) @@ -189,6 +193,7 @@ glabel func_802E17A8 /* 1032F8 802E1A78 00000000 */ nop /* 1032FC 802E1A7C 080B86C1 */ j .L802E1B04 /* 103300 802E1A80 00000000 */ nop +glabel L802E1A84_103304 /* 103304 802E1A84 C6000014 */ lwc1 $f0, 0x14($s0) /* 103308 802E1A88 C6220054 */ lwc1 $f2, 0x54($s1) /* 10330C 802E1A8C 46020001 */ sub.s $f0, $f0, $f2 @@ -228,6 +233,7 @@ glabel func_802E17A8 /* 10338C 802E1B0C 24420001 */ addiu $v0, $v0, 1 /* 103390 802E1B10 080B86C7 */ j .L802E1B1C /* 103394 802E1B14 A2020010 */ sb $v0, 0x10($s0) +glabel L802E1B18_103398 /* 103398 802E1B18 26520001 */ addiu $s2, $s2, 1 .L802E1B1C: /* 10339C 802E1B1C C6200054 */ lwc1 $f0, 0x54($s1) @@ -236,11 +242,12 @@ glabel func_802E17A8 /* 1033A8 802E1B28 2C620006 */ sltiu $v0, $v1, 6 /* 1033AC 802E1B2C 104000D0 */ beqz $v0, .L802E1E70 /* 1033B0 802E1B30 00031080 */ sll $v0, $v1, 2 -/* 1033B4 802E1B34 3C01802F */ lui $at, %hi(D_802EB070) +/* 1033B4 802E1B34 3C01802F */ lui $at, %hi(jtbl_802EB070_10C8F0) /* 1033B8 802E1B38 00220821 */ addu $at, $at, $v0 -/* 1033BC 802E1B3C 8C22B070 */ lw $v0, %lo(D_802EB070)($at) +/* 1033BC 802E1B3C 8C22B070 */ lw $v0, %lo(jtbl_802EB070_10C8F0)($at) /* 1033C0 802E1B40 00400008 */ jr $v0 /* 1033C4 802E1B44 00000000 */ nop +glabel L802E1B48_1033C8 /* 1033C8 802E1B48 C602001C */ lwc1 $f2, 0x1c($s0) /* 1033CC 802E1B4C 3C01BFE0 */ lui $at, 0xbfe0 /* 1033D0 802E1B50 44810800 */ mtc1 $at, $f1 @@ -284,6 +291,7 @@ glabel func_802E17A8 /* 103464 802E1BE4 00000000 */ nop /* 103468 802E1BE8 080B8796 */ j .L802E1E58 /* 10346C 802E1BEC 00000000 */ nop +glabel L802E1BF0_103470 /* 103470 802E1BF0 C602001C */ lwc1 $f2, 0x1c($s0) /* 103474 802E1BF4 3C01802F */ lui $at, %hi(D_802EB090) /* 103478 802E1BF8 D420B090 */ ldc1 $f0, %lo(D_802EB090)($at) @@ -326,6 +334,7 @@ glabel func_802E17A8 /* 103508 802E1C88 00000000 */ nop /* 10350C 802E1C8C 080B8796 */ j .L802E1E58 /* 103510 802E1C90 00000000 */ nop +glabel L802E1C94_103514 /* 103514 802E1C94 C602001C */ lwc1 $f2, 0x1c($s0) /* 103518 802E1C98 3C01802F */ lui $at, %hi(D_802EB0A0) /* 10351C 802E1C9C D420B0A0 */ ldc1 $f0, %lo(D_802EB0A0)($at) @@ -368,6 +377,7 @@ glabel func_802E17A8 /* 1035AC 802E1D2C 00000000 */ nop /* 1035B0 802E1D30 080B8796 */ j .L802E1E58 /* 1035B4 802E1D34 00000000 */ nop +glabel L802E1D38_1035B8 /* 1035B8 802E1D38 C602001C */ lwc1 $f2, 0x1c($s0) /* 1035BC 802E1D3C 44800000 */ mtc1 $zero, $f0 /* 1035C0 802E1D40 44800800 */ mtc1 $zero, $f1 @@ -410,6 +420,7 @@ glabel func_802E17A8 /* 103650 802E1DD0 00000000 */ nop /* 103654 802E1DD4 080B8796 */ j .L802E1E58 /* 103658 802E1DD8 00000000 */ nop +glabel L802E1DDC_10365C /* 10365C 802E1DDC C6000018 */ lwc1 $f0, 0x18($s0) /* 103660 802E1DE0 C6220058 */ lwc1 $f2, 0x58($s1) /* 103664 802E1DE4 46020001 */ sub.s $f0, $f0, $f2 @@ -448,6 +459,7 @@ glabel func_802E17A8 /* 1036E0 802E1E60 24420001 */ addiu $v0, $v0, 1 /* 1036E4 802E1E64 080B879C */ j .L802E1E70 /* 1036E8 802E1E68 A2020011 */ sb $v0, 0x11($s0) +glabel L802E1E6C_1036EC /* 1036EC 802E1E6C 26520001 */ addiu $s2, $s2, 1 .L802E1E70: /* 1036F0 802E1E70 0C0B854F */ jal func_802E153C diff --git a/asm/nonmatchings/code_102C80/func_802E1EA8.s b/asm/nonmatchings/code_102C80/func_802E1EA8.s deleted file mode 100644 index 2dcf9992a0..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E1EA8.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E1EA8 -/* 103728 802E1EA8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10372C 802E1EAC AFB00010 */ sw $s0, 0x10($sp) -/* 103730 802E1EB0 0080802D */ daddu $s0, $a0, $zero -/* 103734 802E1EB4 AFBF0014 */ sw $ra, 0x14($sp) -/* 103738 802E1EB8 8E020040 */ lw $v0, 0x40($s0) -/* 10373C 802E1EBC 0C051568 */ jal set_area_flag -/* 103740 802E1EC0 94440020 */ lhu $a0, 0x20($v0) -/* 103744 802E1EC4 0C04419E */ jal func_80110678 -/* 103748 802E1EC8 0200202D */ daddu $a0, $s0, $zero -/* 10374C 802E1ECC 8FBF0014 */ lw $ra, 0x14($sp) -/* 103750 802E1ED0 8FB00010 */ lw $s0, 0x10($sp) -/* 103754 802E1ED4 03E00008 */ jr $ra -/* 103758 802E1ED8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_102C80/func_802E1EDC.s b/asm/nonmatchings/code_102C80/func_802E1EDC.s index 3098cf311a..36958b7d05 100644 --- a/asm/nonmatchings/code_102C80/func_802E1EDC.s +++ b/asm/nonmatchings/code_102C80/func_802E1EDC.s @@ -14,11 +14,12 @@ glabel func_802E1EDC /* 103780 802E1F00 10400087 */ beqz $v0, .L802E2120 /* 103784 802E1F04 0000902D */ daddu $s2, $zero, $zero /* 103788 802E1F08 00031080 */ sll $v0, $v1, 2 -/* 10378C 802E1F0C 3C01802F */ lui $at, %hi(D_802EB0C0) +/* 10378C 802E1F0C 3C01802F */ lui $at, %hi(jtbl_802EB0C0_10C940) /* 103790 802E1F10 00220821 */ addu $at, $at, $v0 -/* 103794 802E1F14 8C22B0C0 */ lw $v0, %lo(D_802EB0C0)($at) +/* 103794 802E1F14 8C22B0C0 */ lw $v0, %lo(jtbl_802EB0C0_10C940)($at) /* 103798 802E1F18 00400008 */ jr $v0 /* 10379C 802E1F1C 00000000 */ nop +glabel L802E1F20_1037A0 /* 1037A0 802E1F20 C602001C */ lwc1 $f2, 0x1c($s0) /* 1037A4 802E1F24 3C01802F */ lui $at, %hi(D_802EB0D8) /* 1037A8 802E1F28 D420B0D8 */ ldc1 $f0, %lo(D_802EB0D8)($at) @@ -59,11 +60,13 @@ glabel func_802E1EDC /* 103830 802E1FB0 4602003E */ c.le.s $f0, $f2 /* 103834 802E1FB4 080B8840 */ j .L802E2100 /* 103838 802E1FB8 00000000 */ nop +glabel L802E1FBC_10383C /* 10383C 802E1FBC C602001C */ lwc1 $f2, 0x1c($s0) /* 103840 802E1FC0 3C01802F */ lui $at, %hi(D_802EB0E8) /* 103844 802E1FC4 D420B0E8 */ ldc1 $f0, %lo(D_802EB0E8)($at) /* 103848 802E1FC8 080B881F */ j .L802E207C /* 10384C 802E1FCC 460010A1 */ cvt.d.s $f2, $f2 +glabel L802E1FD0_103850 /* 103850 802E1FD0 C602001C */ lwc1 $f2, 0x1c($s0) /* 103854 802E1FD4 3C01802F */ lui $at, %hi(D_802EB0F0) /* 103858 802E1FD8 D420B0F0 */ ldc1 $f0, %lo(D_802EB0F0)($at) @@ -104,6 +107,7 @@ glabel func_802E1EDC /* 1038E0 802E2060 4602003E */ c.le.s $f0, $f2 /* 1038E4 802E2064 080B8840 */ j .L802E2100 /* 1038E8 802E2068 00000000 */ nop +glabel L802E206C_1038EC /* 1038EC 802E206C C602001C */ lwc1 $f2, 0x1c($s0) /* 1038F0 802E2070 3C01802F */ lui $at, %hi(D_802EB100) /* 1038F4 802E2074 D420B100 */ ldc1 $f0, %lo(D_802EB100)($at) @@ -151,6 +155,7 @@ glabel func_802E1EDC /* 103990 802E2110 24420001 */ addiu $v0, $v0, 1 /* 103994 802E2114 080B8848 */ j .L802E2120 /* 103998 802E2118 A2020010 */ sb $v0, 0x10($s0) +glabel L802E211C_10399C /* 10399C 802E211C 26520001 */ addiu $s2, $s2, 1 .L802E2120: /* 1039A0 802E2120 C6200054 */ lwc1 $f0, 0x54($s1) diff --git a/asm/nonmatchings/code_102C80/func_802E234C.s b/asm/nonmatchings/code_102C80/func_802E234C.s deleted file mode 100644 index 2449513be7..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E234C.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E234C -/* 103BCC 802E234C 3C058011 */ lui $a1, %hi(gPlayerStatus) -/* 103BD0 802E2350 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) -/* 103BD4 802E2354 3C060100 */ lui $a2, 0x100 -/* 103BD8 802E2358 8C830040 */ lw $v1, 0x40($a0) -/* 103BDC 802E235C 8CA20004 */ lw $v0, 4($a1) -/* 103BE0 802E2360 3C013F80 */ lui $at, 0x3f80 -/* 103BE4 802E2364 44810000 */ mtc1 $at, $f0 -/* 103BE8 802E2368 00461025 */ or $v0, $v0, $a2 -/* 103BEC 802E236C ACA20004 */ sw $v0, 4($a1) -/* 103BF0 802E2370 E4600014 */ swc1 $f0, 0x14($v1) -/* 103BF4 802E2374 E4600018 */ swc1 $f0, 0x18($v1) -/* 103BF8 802E2378 03E00008 */ jr $ra -/* 103BFC 802E237C E460001C */ swc1 $f0, 0x1c($v1) diff --git a/asm/nonmatchings/code_102C80/func_802E2450.s b/asm/nonmatchings/code_102C80/func_802E2450.s deleted file mode 100644 index 88e270f22b..0000000000 --- a/asm/nonmatchings/code_102C80/func_802E2450.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E2450 -/* 103CD0 802E2450 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 103CD4 802E2454 AFBF0010 */ sw $ra, 0x10($sp) -/* 103CD8 802E2458 0C0B8D94 */ jal func_802E3650 -/* 103CDC 802E245C 00000000 */ nop -/* 103CE0 802E2460 8FBF0010 */ lw $ra, 0x10($sp) -/* 103CE4 802E2464 03E00008 */ jr $ra -/* 103CE8 802E2468 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_104730/func_802E2EB0.s b/asm/nonmatchings/code_104730/func_802E2EB0.s deleted file mode 100644 index a04b486d95..0000000000 --- a/asm/nonmatchings/code_104730/func_802E2EB0.s +++ /dev/null @@ -1,79 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E2EB0 -/* 104730 802E2EB0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 104734 802E2EB4 AFB1001C */ sw $s1, 0x1c($sp) -/* 104738 802E2EB8 0080882D */ daddu $s1, $a0, $zero -/* 10473C 802E2EBC AFBF0024 */ sw $ra, 0x24($sp) -/* 104740 802E2EC0 AFB20020 */ sw $s2, 0x20($sp) -/* 104744 802E2EC4 AFB00018 */ sw $s0, 0x18($sp) -/* 104748 802E2EC8 8E220040 */ lw $v0, 0x40($s1) -/* 10474C 802E2ECC C620004C */ lwc1 $f0, 0x4c($s1) -/* 104750 802E2ED0 0000802D */ daddu $s0, $zero, $zero -/* 104754 802E2ED4 E4400038 */ swc1 $f0, 0x38($v0) -/* 104758 802E2ED8 92240004 */ lbu $a0, 4($s1) -/* 10475C 802E2EDC 0C0441A9 */ jal get_entity_type -/* 104760 802E2EE0 0200902D */ daddu $s2, $s0, $zero -/* 104764 802E2EE4 0040182D */ daddu $v1, $v0, $zero -/* 104768 802E2EE8 2462FFE8 */ addiu $v0, $v1, -0x18 -/* 10476C 802E2EEC 2C420003 */ sltiu $v0, $v0, 3 -/* 104770 802E2EF0 10400007 */ beqz $v0, .L802E2F10 -/* 104774 802E2EF4 2463FFF3 */ addiu $v1, $v1, -0xd -/* 104778 802E2EF8 3C013F00 */ lui $at, 0x3f00 -/* 10477C 802E2EFC 44810000 */ mtc1 $at, $f0 -/* 104780 802E2F00 00000000 */ nop -/* 104784 802E2F04 E6200054 */ swc1 $f0, 0x54($s1) -/* 104788 802E2F08 E6200058 */ swc1 $f0, 0x58($s1) -/* 10478C 802E2F0C E620005C */ swc1 $f0, 0x5c($s1) -.L802E2F10: -/* 104790 802E2F10 2C62000E */ sltiu $v0, $v1, 0xe -/* 104794 802E2F14 10400023 */ beqz $v0, .L802E2FA4 -/* 104798 802E2F18 00031080 */ sll $v0, $v1, 2 -/* 10479C 802E2F1C 3C01802F */ lui $at, %hi(D_802EB160) -/* 1047A0 802E2F20 00220821 */ addu $at, $at, $v0 -/* 1047A4 802E2F24 8C22B160 */ lw $v0, %lo(D_802EB160)($at) -/* 1047A8 802E2F28 00400008 */ jr $v0 -/* 1047AC 802E2F2C 00000000 */ nop -/* 1047B0 802E2F30 3C120A00 */ lui $s2, 0xa00 -/* 1047B4 802E2F34 265231E0 */ addiu $s2, $s2, 0x31e0 -/* 1047B8 802E2F38 3C100A00 */ lui $s0, 0xa00 -/* 1047BC 802E2F3C 26101508 */ addiu $s0, $s0, 0x1508 -/* 1047C0 802E2F40 080B8BE9 */ j .L802E2FA4 -/* 1047C4 802E2F44 00000000 */ nop -/* 1047C8 802E2F48 3C120A00 */ lui $s2, 0xa00 -/* 1047CC 802E2F4C 265231B0 */ addiu $s2, $s2, 0x31b0 -/* 1047D0 802E2F50 3C100A00 */ lui $s0, 0xa00 -/* 1047D4 802E2F54 261014D8 */ addiu $s0, $s0, 0x14d8 -/* 1047D8 802E2F58 080B8BE9 */ j .L802E2FA4 -/* 1047DC 802E2F5C 00000000 */ nop -/* 1047E0 802E2F60 3C120A00 */ lui $s2, 0xa00 -/* 1047E4 802E2F64 26522F78 */ addiu $s2, $s2, 0x2f78 -/* 1047E8 802E2F68 3C100A00 */ lui $s0, 0xa00 -/* 1047EC 802E2F6C 26101218 */ addiu $s0, $s0, 0x1218 -/* 1047F0 802E2F70 080B8BE9 */ j .L802E2FA4 -/* 1047F4 802E2F74 00000000 */ nop -/* 1047F8 802E2F78 24040158 */ addiu $a0, $zero, 0x158 -/* 1047FC 802E2F7C C6200050 */ lwc1 $f0, 0x50($s1) -/* 104800 802E2F80 3C120A00 */ lui $s2, 0xa00 -/* 104804 802E2F84 26523F70 */ addiu $s2, $s2, 0x3f70 -/* 104808 802E2F88 E7A00010 */ swc1 $f0, 0x10($sp) -/* 10480C 802E2F8C 8E260048 */ lw $a2, 0x48($s1) -/* 104810 802E2F90 8E27004C */ lw $a3, 0x4c($s1) -/* 104814 802E2F94 3C100A00 */ lui $s0, 0xa00 -/* 104818 802E2F98 26102318 */ addiu $s0, $s0, 0x2318 -/* 10481C 802E2F9C 0C052757 */ jal play_sound_at_position -/* 104820 802E2FA0 0000282D */ daddu $a1, $zero, $zero -.L802E2FA4: -/* 104824 802E2FA4 12000004 */ beqz $s0, .L802E2FB8 -/* 104828 802E2FA8 0220202D */ daddu $a0, $s1, $zero -/* 10482C 802E2FAC 0240282D */ daddu $a1, $s2, $zero -/* 104830 802E2FB0 0C0B891B */ jal func_802E246C -/* 104834 802E2FB4 0200302D */ daddu $a2, $s0, $zero -.L802E2FB8: -/* 104838 802E2FB8 8FBF0024 */ lw $ra, 0x24($sp) -/* 10483C 802E2FBC 8FB20020 */ lw $s2, 0x20($sp) -/* 104840 802E2FC0 8FB1001C */ lw $s1, 0x1c($sp) -/* 104844 802E2FC4 8FB00018 */ lw $s0, 0x18($sp) -/* 104848 802E2FC8 03E00008 */ jr $ra -/* 10484C 802E2FCC 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_104730/func_802E2FD0.s b/asm/nonmatchings/code_104730/func_802E2FD0.s deleted file mode 100644 index af26f64ddc..0000000000 --- a/asm/nonmatchings/code_104730/func_802E2FD0.s +++ /dev/null @@ -1,66 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E2FD0 -/* 104850 802E2FD0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 104854 802E2FD4 AFB1001C */ sw $s1, 0x1c($sp) -/* 104858 802E2FD8 0080882D */ daddu $s1, $a0, $zero -/* 10485C 802E2FDC AFBF0020 */ sw $ra, 0x20($sp) -/* 104860 802E2FE0 AFB00018 */ sw $s0, 0x18($sp) -/* 104864 802E2FE4 92240004 */ lbu $a0, 4($s1) -/* 104868 802E2FE8 0C0441A9 */ jal get_entity_type -/* 10486C 802E2FEC 0000802D */ daddu $s0, $zero, $zero -/* 104870 802E2FF0 2443FFF3 */ addiu $v1, $v0, -0xd -/* 104874 802E2FF4 2C62000E */ sltiu $v0, $v1, 0xe -/* 104878 802E2FF8 1040001A */ beqz $v0, .L802E3064 -/* 10487C 802E2FFC 00031080 */ sll $v0, $v1, 2 -/* 104880 802E3000 3C01802F */ lui $at, %hi(D_802EB198) -/* 104884 802E3004 00220821 */ addu $at, $at, $v0 -/* 104888 802E3008 8C22B198 */ lw $v0, %lo(D_802EB198)($at) -/* 10488C 802E300C 00400008 */ jr $v0 -/* 104890 802E3010 00000000 */ nop -/* 104894 802E3014 3C10802F */ lui $s0, %hi(D_802E9C8C) -/* 104898 802E3018 080B8C19 */ j .L802E3064 -/* 10489C 802E301C 26109C8C */ addiu $s0, $s0, %lo(D_802E9C8C) -/* 1048A0 802E3020 3C10802F */ lui $s0, %hi(D_802E9CF8) -/* 1048A4 802E3024 080B8C19 */ j .L802E3064 -/* 1048A8 802E3028 26109CF8 */ addiu $s0, $s0, %lo(D_802E9CF8) -/* 1048AC 802E302C 3C10802F */ lui $s0, %hi(D_802E9CB0) -/* 1048B0 802E3030 080B8C19 */ j .L802E3064 -/* 1048B4 802E3034 26109CB0 */ addiu $s0, $s0, %lo(D_802E9CB0) -/* 1048B8 802E3038 3C10802F */ lui $s0, %hi(D_802E9D1C) -/* 1048BC 802E303C 080B8C19 */ j .L802E3064 -/* 1048C0 802E3040 26109D1C */ addiu $s0, $s0, %lo(D_802E9D1C) -/* 1048C4 802E3044 3C10802F */ lui $s0, %hi(D_802E9CD4) -/* 1048C8 802E3048 080B8C19 */ j .L802E3064 -/* 1048CC 802E304C 26109CD4 */ addiu $s0, $s0, %lo(D_802E9CD4) -/* 1048D0 802E3050 3C10802F */ lui $s0, %hi(D_802E9D40) -/* 1048D4 802E3054 080B8C19 */ j .L802E3064 -/* 1048D8 802E3058 26109D40 */ addiu $s0, $s0, %lo(D_802E9D40) -/* 1048DC 802E305C 3C10802F */ lui $s0, %hi(D_802E9D64) -/* 1048E0 802E3060 26109D64 */ addiu $s0, $s0, %lo(D_802E9D64) -.L802E3064: -/* 1048E4 802E3064 1200000E */ beqz $s0, .L802E30A0 -/* 1048E8 802E3068 0200202D */ daddu $a0, $s0, $zero -/* 1048EC 802E306C C6200048 */ lwc1 $f0, 0x48($s1) -/* 1048F0 802E3070 C622004C */ lwc1 $f2, 0x4c($s1) -/* 1048F4 802E3074 C6240050 */ lwc1 $f4, 0x50($s1) -/* 1048F8 802E3078 3C028000 */ lui $v0, 0x8000 -/* 1048FC 802E307C AFA00010 */ sw $zero, 0x10($sp) -/* 104900 802E3080 4600018D */ trunc.w.s $f6, $f0 -/* 104904 802E3084 44053000 */ mfc1 $a1, $f6 -/* 104908 802E3088 4600118D */ trunc.w.s $f6, $f2 -/* 10490C 802E308C 44063000 */ mfc1 $a2, $f6 -/* 104910 802E3090 4600218D */ trunc.w.s $f6, $f4 -/* 104914 802E3094 44073000 */ mfc1 $a3, $f6 -/* 104918 802E3098 0C044631 */ jal create_entity -/* 10491C 802E309C AFA20014 */ sw $v0, 0x14($sp) -.L802E30A0: -/* 104920 802E30A0 8FBF0020 */ lw $ra, 0x20($sp) -/* 104924 802E30A4 8FB1001C */ lw $s1, 0x1c($sp) -/* 104928 802E30A8 8FB00018 */ lw $s0, 0x18($sp) -/* 10492C 802E30AC 03E00008 */ jr $ra -/* 104930 802E30B0 27BD0028 */ addiu $sp, $sp, 0x28 -/* 104934 802E30B4 00000000 */ nop -/* 104938 802E30B8 00000000 */ nop -/* 10493C 802E30BC 00000000 */ nop diff --git a/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer1Block_normal.s b/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer1Block_normal.s deleted file mode 100644 index de9560ccdd..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer1Block_normal.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_init_Hammer1Block_normal -/* 105680 802E3E00 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105684 802E3E04 AFB00010 */ sw $s0, 0x10($sp) -/* 105688 802E3E08 AFBF0014 */ sw $ra, 0x14($sp) -/* 10568C 802E3E0C 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 105690 802E3E10 0080802D */ daddu $s0, $a0, $zero -/* 105694 802E3E14 3C02802E */ lui $v0, %hi(func_802E30C0) -/* 105698 802E3E18 244230C0 */ addiu $v0, $v0, %lo(func_802E30C0) -/* 10569C 802E3E1C AE02003C */ sw $v0, 0x3c($s0) -/* 1056A0 802E3E20 8FBF0014 */ lw $ra, 0x14($sp) -/* 1056A4 802E3E24 8FB00010 */ lw $s0, 0x10($sp) -/* 1056A8 802E3E28 03E00008 */ jr $ra -/* 1056AC 802E3E2C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer23Block_normal.s b/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer23Block_normal.s deleted file mode 100644 index f5db5eaf71..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/entity_init_Hammer23Block_normal.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_init_Hammer23Block_normal -/* 104F64 802E36E4 8C820040 */ lw $v0, 0x40($a0) -/* 104F68 802E36E8 2403FFFF */ addiu $v1, $zero, -1 -/* 104F6C 802E36EC A4430010 */ sh $v1, 0x10($v0) -/* 104F70 802E36F0 C480004C */ lwc1 $f0, 0x4c($a0) -/* 104F74 802E36F4 3C05FFDF */ lui $a1, 0xffdf -/* 104F78 802E36F8 A443000E */ sh $v1, 0xe($v0) -/* 104F7C 802E36FC E4400014 */ swc1 $f0, 0x14($v0) -/* 104F80 802E3700 8C820000 */ lw $v0, ($a0) -/* 104F84 802E3704 34A5FFFF */ ori $a1, $a1, 0xffff -/* 104F88 802E3708 00451024 */ and $v0, $v0, $a1 -/* 104F8C 802E370C 03E00008 */ jr $ra -/* 104F90 802E3710 AC820000 */ sw $v0, ($a0) diff --git a/asm/nonmatchings/code_104940_len_dc0/entity_init_HammerBlock_small.s b/asm/nonmatchings/code_104940_len_dc0/entity_init_HammerBlock_small.s deleted file mode 100644 index 92f930c759..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/entity_init_HammerBlock_small.s +++ /dev/null @@ -1,24 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_init_HammerBlock_small -/* 1056B0 802E3E30 2403FFFF */ addiu $v1, $zero, -1 -/* 1056B4 802E3E34 8C820040 */ lw $v0, 0x40($a0) -/* 1056B8 802E3E38 3C05FFDF */ lui $a1, 0xffdf -/* 1056BC 802E3E3C A4430010 */ sh $v1, 0x10($v0) -/* 1056C0 802E3E40 C480004C */ lwc1 $f0, 0x4c($a0) -/* 1056C4 802E3E44 34A5FFFF */ ori $a1, $a1, 0xffff -/* 1056C8 802E3E48 A443000E */ sh $v1, 0xe($v0) -/* 1056CC 802E3E4C E4400014 */ swc1 $f0, 0x14($v0) -/* 1056D0 802E3E50 8C820000 */ lw $v0, ($a0) -/* 1056D4 802E3E54 3C013F00 */ lui $at, 0x3f00 -/* 1056D8 802E3E58 44810000 */ mtc1 $at, $f0 -/* 1056DC 802E3E5C 00451024 */ and $v0, $v0, $a1 -/* 1056E0 802E3E60 E4800054 */ swc1 $f0, 0x54($a0) -/* 1056E4 802E3E64 E4800058 */ swc1 $f0, 0x58($a0) -/* 1056E8 802E3E68 E480005C */ swc1 $f0, 0x5c($a0) -/* 1056EC 802E3E6C 03E00008 */ jr $ra -/* 1056F0 802E3E70 AC820000 */ sw $v0, ($a0) -/* 1056F4 802E3E74 00000000 */ nop -/* 1056F8 802E3E78 00000000 */ nop -/* 1056FC 802E3E7C 00000000 */ nop diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E31B0.s b/asm/nonmatchings/code_104940_len_dc0/func_802E31B0.s deleted file mode 100644 index 89bb671f69..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E31B0.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E31B0 -/* 104A30 802E31B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 104A34 802E31B4 3C013F80 */ lui $at, 0x3f80 -/* 104A38 802E31B8 44810000 */ mtc1 $at, $f0 -/* 104A3C 802E31BC 2402003C */ addiu $v0, $zero, 0x3c -/* 104A40 802E31C0 AFBF0018 */ sw $ra, 0x18($sp) -/* 104A44 802E31C4 AFA20014 */ sw $v0, 0x14($sp) -/* 104A48 802E31C8 E7A00010 */ swc1 $f0, 0x10($sp) -/* 104A4C 802E31CC 8C850048 */ lw $a1, 0x48($a0) -/* 104A50 802E31D0 8C86004C */ lw $a2, 0x4c($a0) -/* 104A54 802E31D4 8C870050 */ lw $a3, 0x50($a0) -/* 104A58 802E31D8 0C01C88C */ jal func_80072230 -/* 104A5C 802E31DC 0000202D */ daddu $a0, $zero, $zero -/* 104A60 802E31E0 8FBF0018 */ lw $ra, 0x18($sp) -/* 104A64 802E31E4 03E00008 */ jr $ra -/* 104A68 802E31E8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E31EC.s b/asm/nonmatchings/code_104940_len_dc0/func_802E31EC.s deleted file mode 100644 index 6d035d0cf1..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E31EC.s +++ /dev/null @@ -1,46 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E31EC -/* 104A6C 802E31EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 104A70 802E31F0 AFB00010 */ sw $s0, 0x10($sp) -/* 104A74 802E31F4 0080802D */ daddu $s0, $a0, $zero -/* 104A78 802E31F8 AFBF0014 */ sw $ra, 0x14($sp) -/* 104A7C 802E31FC 0C0441A9 */ jal get_entity_type -/* 104A80 802E3200 92040004 */ lbu $a0, 4($s0) -/* 104A84 802E3204 2442FFE8 */ addiu $v0, $v0, -0x18 -/* 104A88 802E3208 2C420003 */ sltiu $v0, $v0, 3 -/* 104A8C 802E320C 1040000D */ beqz $v0, .L802E3244 -/* 104A90 802E3210 00000000 */ nop -/* 104A94 802E3214 3C013E6B */ lui $at, 0x3e6b -/* 104A98 802E3218 3421851F */ ori $at, $at, 0x851f -/* 104A9C 802E321C 44810000 */ mtc1 $at, $f0 -/* 104AA0 802E3220 3C014190 */ lui $at, 0x4190 -/* 104AA4 802E3224 44811000 */ mtc1 $at, $f2 -/* 104AA8 802E3228 E6000058 */ swc1 $f0, 0x58($s0) -/* 104AAC 802E322C C600004C */ lwc1 $f0, 0x4c($s0) -/* 104AB0 802E3230 3C013F85 */ lui $at, 0x3f85 -/* 104AB4 802E3234 34211EB8 */ ori $at, $at, 0x1eb8 -/* 104AB8 802E3238 44812000 */ mtc1 $at, $f4 -/* 104ABC 802E323C 080B8C9C */ j .L802E3270 -/* 104AC0 802E3240 46020000 */ add.s $f0, $f0, $f2 -.L802E3244: -/* 104AC4 802E3244 3C013EEB */ lui $at, 0x3eeb -/* 104AC8 802E3248 3421851F */ ori $at, $at, 0x851f -/* 104ACC 802E324C 44810000 */ mtc1 $at, $f0 -/* 104AD0 802E3250 3C014190 */ lui $at, 0x4190 -/* 104AD4 802E3254 44811000 */ mtc1 $at, $f2 -/* 104AD8 802E3258 E6000058 */ swc1 $f0, 0x58($s0) -/* 104ADC 802E325C C600004C */ lwc1 $f0, 0x4c($s0) -/* 104AE0 802E3260 3C014005 */ lui $at, 0x4005 -/* 104AE4 802E3264 34211EB8 */ ori $at, $at, 0x1eb8 -/* 104AE8 802E3268 44812000 */ mtc1 $at, $f4 -/* 104AEC 802E326C 46020000 */ add.s $f0, $f0, $f2 -.L802E3270: -/* 104AF0 802E3270 E6040054 */ swc1 $f4, 0x54($s0) -/* 104AF4 802E3274 E604005C */ swc1 $f4, 0x5c($s0) -/* 104AF8 802E3278 E600004C */ swc1 $f0, 0x4c($s0) -/* 104AFC 802E327C 8FBF0014 */ lw $ra, 0x14($sp) -/* 104B00 802E3280 8FB00010 */ lw $s0, 0x10($sp) -/* 104B04 802E3284 03E00008 */ jr $ra -/* 104B08 802E3288 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E328C.s b/asm/nonmatchings/code_104940_len_dc0/func_802E328C.s deleted file mode 100644 index 37644ff04a..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E328C.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E328C -/* 104B0C 802E328C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 104B10 802E3290 AFB00010 */ sw $s0, 0x10($sp) -/* 104B14 802E3294 0080802D */ daddu $s0, $a0, $zero -/* 104B18 802E3298 AFBF0014 */ sw $ra, 0x14($sp) -/* 104B1C 802E329C 0C0441A9 */ jal get_entity_type -/* 104B20 802E32A0 92040004 */ lbu $a0, 4($s0) -/* 104B24 802E32A4 2442FFE8 */ addiu $v0, $v0, -0x18 -/* 104B28 802E32A8 2C420003 */ sltiu $v0, $v0, 3 -/* 104B2C 802E32AC 10400012 */ beqz $v0, .L802E32F8 -/* 104B30 802E32B0 00000000 */ nop -/* 104B34 802E32B4 C6000054 */ lwc1 $f0, 0x54($s0) -/* 104B38 802E32B8 3C01802F */ lui $at, %hi(D_802EB1D0) -/* 104B3C 802E32BC D424B1D0 */ ldc1 $f4, %lo(D_802EB1D0)($at) -/* 104B40 802E32C0 C602005C */ lwc1 $f2, 0x5c($s0) -/* 104B44 802E32C4 46000021 */ cvt.d.s $f0, $f0 -/* 104B48 802E32C8 46240001 */ sub.d $f0, $f0, $f4 -/* 104B4C 802E32CC 3C014040 */ lui $at, 0x4040 -/* 104B50 802E32D0 44813000 */ mtc1 $at, $f6 -/* 104B54 802E32D4 460010A1 */ cvt.d.s $f2, $f2 -/* 104B58 802E32D8 46241081 */ sub.d $f2, $f2, $f4 -/* 104B5C 802E32DC 46200020 */ cvt.s.d $f0, $f0 -/* 104B60 802E32E0 E6000054 */ swc1 $f0, 0x54($s0) -/* 104B64 802E32E4 C6000058 */ lwc1 $f0, 0x58($s0) -/* 104B68 802E32E8 3C01802F */ lui $at, %hi(D_802EB1D8) -/* 104B6C 802E32EC D424B1D8 */ ldc1 $f4, %lo(D_802EB1D8)($at) -/* 104B70 802E32F0 080B8CCE */ j .L802E3338 -/* 104B74 802E32F4 46000021 */ cvt.d.s $f0, $f0 -.L802E32F8: -/* 104B78 802E32F8 C6000054 */ lwc1 $f0, 0x54($s0) -/* 104B7C 802E32FC 3C01802F */ lui $at, %hi(D_802EB1E0) -/* 104B80 802E3300 D424B1E0 */ ldc1 $f4, %lo(D_802EB1E0)($at) -/* 104B84 802E3304 C602005C */ lwc1 $f2, 0x5c($s0) -/* 104B88 802E3308 46000021 */ cvt.d.s $f0, $f0 -/* 104B8C 802E330C 46240001 */ sub.d $f0, $f0, $f4 -/* 104B90 802E3310 3C014040 */ lui $at, 0x4040 -/* 104B94 802E3314 44813000 */ mtc1 $at, $f6 -/* 104B98 802E3318 460010A1 */ cvt.d.s $f2, $f2 -/* 104B9C 802E331C 46241081 */ sub.d $f2, $f2, $f4 -/* 104BA0 802E3320 46200020 */ cvt.s.d $f0, $f0 -/* 104BA4 802E3324 E6000054 */ swc1 $f0, 0x54($s0) -/* 104BA8 802E3328 C6000058 */ lwc1 $f0, 0x58($s0) -/* 104BAC 802E332C 3C01802F */ lui $at, %hi(D_802EB1E8) -/* 104BB0 802E3330 D424B1E8 */ ldc1 $f4, %lo(D_802EB1E8)($at) -/* 104BB4 802E3334 46000021 */ cvt.d.s $f0, $f0 -.L802E3338: -/* 104BB8 802E3338 46240000 */ add.d $f0, $f0, $f4 -/* 104BBC 802E333C C604004C */ lwc1 $f4, 0x4c($s0) -/* 104BC0 802E3340 462010A0 */ cvt.s.d $f2, $f2 -/* 104BC4 802E3344 E602005C */ swc1 $f2, 0x5c($s0) -/* 104BC8 802E3348 46062101 */ sub.s $f4, $f4, $f6 -/* 104BCC 802E334C 46200020 */ cvt.s.d $f0, $f0 -/* 104BD0 802E3350 E6000058 */ swc1 $f0, 0x58($s0) -/* 104BD4 802E3354 E604004C */ swc1 $f4, 0x4c($s0) -/* 104BD8 802E3358 0C0B8D94 */ jal func_802E3650 -/* 104BDC 802E335C 0200202D */ daddu $a0, $s0, $zero -/* 104BE0 802E3360 8FBF0014 */ lw $ra, 0x14($sp) -/* 104BE4 802E3364 8FB00010 */ lw $s0, 0x10($sp) -/* 104BE8 802E3368 03E00008 */ jr $ra -/* 104BEC 802E336C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3650.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3650.s deleted file mode 100644 index 92d98129a7..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3650.s +++ /dev/null @@ -1,43 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3650 -/* 104ED0 802E3650 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 104ED4 802E3654 AFB00010 */ sw $s0, 0x10($sp) -/* 104ED8 802E3658 0080802D */ daddu $s0, $a0, $zero -/* 104EDC 802E365C AFB20018 */ sw $s2, 0x18($sp) -/* 104EE0 802E3660 AFBF001C */ sw $ra, 0x1c($sp) -/* 104EE4 802E3664 AFB10014 */ sw $s1, 0x14($sp) -/* 104EE8 802E3668 8E110040 */ lw $s1, 0x40($s0) -/* 104EEC 802E366C 0C044AC8 */ jal func_80112B20 -/* 104EF0 802E3670 0000902D */ daddu $s2, $zero, $zero -/* 104EF4 802E3674 10400014 */ beqz $v0, .L802E36C8 -/* 104EF8 802E3678 3C030020 */ lui $v1, 0x20 -/* 104EFC 802E367C 8E020000 */ lw $v0, ($s0) -/* 104F00 802E3680 00431024 */ and $v0, $v0, $v1 -/* 104F04 802E3684 10400011 */ beqz $v0, .L802E36CC -/* 104F08 802E3688 0240102D */ daddu $v0, $s2, $zero -/* 104F0C 802E368C 24120001 */ addiu $s2, $zero, 1 -/* 104F10 802E3690 0C0B8CDC */ jal func_802E3370 -/* 104F14 802E3694 0200202D */ daddu $a0, $s0, $zero -/* 104F18 802E3698 86240010 */ lh $a0, 0x10($s1) -/* 104F1C 802E369C 2402FFFF */ addiu $v0, $zero, -1 -/* 104F20 802E36A0 1082000A */ beq $a0, $v0, .L802E36CC -/* 104F24 802E36A4 0240102D */ daddu $v0, $s2, $zero -/* 104F28 802E36A8 0C04C3D6 */ jal get_item_entity -/* 104F2C 802E36AC 00000000 */ nop -/* 104F30 802E36B0 C600004C */ lwc1 $f0, 0x4c($s0) -/* 104F34 802E36B4 3C014080 */ lui $at, 0x4080 -/* 104F38 802E36B8 44811000 */ mtc1 $at, $f2 -/* 104F3C 802E36BC 00000000 */ nop -/* 104F40 802E36C0 46020000 */ add.s $f0, $f0, $f2 -/* 104F44 802E36C4 E440000C */ swc1 $f0, 0xc($v0) -.L802E36C8: -/* 104F48 802E36C8 0240102D */ daddu $v0, $s2, $zero -.L802E36CC: -/* 104F4C 802E36CC 8FBF001C */ lw $ra, 0x1c($sp) -/* 104F50 802E36D0 8FB20018 */ lw $s2, 0x18($sp) -/* 104F54 802E36D4 8FB10014 */ lw $s1, 0x14($sp) -/* 104F58 802E36D8 8FB00010 */ lw $s0, 0x10($sp) -/* 104F5C 802E36DC 03E00008 */ jr $ra -/* 104F60 802E36E0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3714.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3714.s deleted file mode 100644 index d600c866b6..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3714.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3714 -/* 104F94 802E3714 8C820040 */ lw $v0, 0x40($a0) -/* 104F98 802E3718 3C0142B4 */ lui $at, 0x42b4 -/* 104F9C 802E371C 44810000 */ mtc1 $at, $f0 -/* 104FA0 802E3720 03E00008 */ jr $ra -/* 104FA4 802E3724 E4400018 */ swc1 $f0, 0x18($v0) diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3728.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3728.s deleted file mode 100644 index 5994386aec..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3728.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3728 -/* 104FA8 802E3728 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 104FAC 802E372C AFB10014 */ sw $s1, 0x14($sp) -/* 104FB0 802E3730 0080882D */ daddu $s1, $a0, $zero -/* 104FB4 802E3734 AFBF0018 */ sw $ra, 0x18($sp) -/* 104FB8 802E3738 AFB00010 */ sw $s0, 0x10($sp) -/* 104FBC 802E373C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 104FC0 802E3740 0C0B8E80 */ jal func_802E3A00 -/* 104FC4 802E3744 8E300040 */ lw $s0, 0x40($s1) -/* 104FC8 802E3748 3C0140C9 */ lui $at, 0x40c9 -/* 104FCC 802E374C 34210FD0 */ ori $at, $at, 0xfd0 -/* 104FD0 802E3750 44810000 */ mtc1 $at, $f0 -/* 104FD4 802E3754 C60C0018 */ lwc1 $f12, 0x18($s0) -/* 104FD8 802E3758 46006302 */ mul.s $f12, $f12, $f0 -/* 104FDC 802E375C 00000000 */ nop -/* 104FE0 802E3760 C634004C */ lwc1 $f20, 0x4c($s1) -/* 104FE4 802E3764 3C0143B4 */ lui $at, 0x43b4 -/* 104FE8 802E3768 44810000 */ mtc1 $at, $f0 -/* 104FEC 802E376C 4600A521 */ cvt.d.s $f20, $f20 -/* 104FF0 802E3770 0C00A85B */ jal sin_rad -/* 104FF4 802E3774 46006303 */ div.s $f12, $f12, $f0 -/* 104FF8 802E3778 46000021 */ cvt.d.s $f0, $f0 -/* 104FFC 802E377C 46200000 */ add.d $f0, $f0, $f0 -/* 105000 802E3780 4620A500 */ add.d $f20, $f20, $f0 -/* 105004 802E3784 3C014270 */ lui $at, 0x4270 -/* 105008 802E3788 44810000 */ mtc1 $at, $f0 -/* 10500C 802E378C 4620A520 */ cvt.s.d $f20, $f20 -/* 105010 802E3790 E634004C */ swc1 $f20, 0x4c($s1) -/* 105014 802E3794 C6020018 */ lwc1 $f2, 0x18($s0) -/* 105018 802E3798 46001300 */ add.s $f12, $f2, $f0 -/* 10501C 802E379C 3C0143E1 */ lui $at, 0x43e1 -/* 105020 802E37A0 44810000 */ mtc1 $at, $f0 -/* 105024 802E37A4 00000000 */ nop -/* 105028 802E37A8 460C003C */ c.lt.s $f0, $f12 -/* 10502C 802E37AC 00000000 */ nop -/* 105030 802E37B0 45000006 */ bc1f .L802E37CC -/* 105034 802E37B4 E60C0018 */ swc1 $f12, 0x18($s0) -/* 105038 802E37B8 0C00A6C9 */ jal clamp_angle -/* 10503C 802E37BC 00000000 */ nop -/* 105040 802E37C0 E6000018 */ swc1 $f0, 0x18($s0) -/* 105044 802E37C4 0C043F5A */ jal func_8010FD68 -/* 105048 802E37C8 0220202D */ daddu $a0, $s1, $zero -.L802E37CC: -/* 10504C 802E37CC 8FBF0018 */ lw $ra, 0x18($sp) -/* 105050 802E37D0 8FB10014 */ lw $s1, 0x14($sp) -/* 105054 802E37D4 8FB00010 */ lw $s0, 0x10($sp) -/* 105058 802E37D8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 10505C 802E37DC 03E00008 */ jr $ra -/* 105060 802E37E0 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E37E4.s b/asm/nonmatchings/code_104940_len_dc0/func_802E37E4.s deleted file mode 100644 index 8a45518bb5..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E37E4.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E37E4 -/* 105064 802E37E4 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 105068 802E37E8 AFB10014 */ sw $s1, 0x14($sp) -/* 10506C 802E37EC 0080882D */ daddu $s1, $a0, $zero -/* 105070 802E37F0 AFBF0018 */ sw $ra, 0x18($sp) -/* 105074 802E37F4 AFB00010 */ sw $s0, 0x10($sp) -/* 105078 802E37F8 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 10507C 802E37FC F7B40020 */ sdc1 $f20, 0x20($sp) -/* 105080 802E3800 0C0B8E80 */ jal func_802E3A00 -/* 105084 802E3804 8E300040 */ lw $s0, 0x40($s1) -/* 105088 802E3808 3C0140C9 */ lui $at, 0x40c9 -/* 10508C 802E380C 34210FD0 */ ori $at, $at, 0xfd0 -/* 105090 802E3810 44810000 */ mtc1 $at, $f0 -/* 105094 802E3814 C60C0018 */ lwc1 $f12, 0x18($s0) -/* 105098 802E3818 46006302 */ mul.s $f12, $f12, $f0 -/* 10509C 802E381C 00000000 */ nop -/* 1050A0 802E3820 C634004C */ lwc1 $f20, 0x4c($s1) -/* 1050A4 802E3824 3C0143B4 */ lui $at, 0x43b4 -/* 1050A8 802E3828 4481B000 */ mtc1 $at, $f22 -/* 1050AC 802E382C 4600A521 */ cvt.d.s $f20, $f20 -/* 1050B0 802E3830 0C00A85B */ jal sin_rad -/* 1050B4 802E3834 46166303 */ div.s $f12, $f12, $f22 -/* 1050B8 802E3838 46000021 */ cvt.d.s $f0, $f0 -/* 1050BC 802E383C 4620A500 */ add.d $f20, $f20, $f0 -/* 1050C0 802E3840 3C014270 */ lui $at, 0x4270 -/* 1050C4 802E3844 44811000 */ mtc1 $at, $f2 -/* 1050C8 802E3848 4620A520 */ cvt.s.d $f20, $f20 -/* 1050CC 802E384C E634004C */ swc1 $f20, 0x4c($s1) -/* 1050D0 802E3850 C6000018 */ lwc1 $f0, 0x18($s0) -/* 1050D4 802E3854 46020000 */ add.s $f0, $f0, $f2 -/* 1050D8 802E3858 4600B03E */ c.le.s $f22, $f0 -/* 1050DC 802E385C 00000000 */ nop -/* 1050E0 802E3860 45000006 */ bc1f .L802E387C -/* 1050E4 802E3864 E6000018 */ swc1 $f0, 0x18($s0) -/* 1050E8 802E3868 C6000014 */ lwc1 $f0, 0x14($s0) -/* 1050EC 802E386C 0220202D */ daddu $a0, $s1, $zero -/* 1050F0 802E3870 AE000018 */ sw $zero, 0x18($s0) -/* 1050F4 802E3874 0C043F5A */ jal func_8010FD68 -/* 1050F8 802E3878 E480004C */ swc1 $f0, 0x4c($a0) -.L802E387C: -/* 1050FC 802E387C 8FBF0018 */ lw $ra, 0x18($sp) -/* 105100 802E3880 8FB10014 */ lw $s1, 0x14($sp) -/* 105104 802E3884 8FB00010 */ lw $s0, 0x10($sp) -/* 105108 802E3888 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 10510C 802E388C D7B40020 */ ldc1 $f20, 0x20($sp) -/* 105110 802E3890 03E00008 */ jr $ra -/* 105114 802E3894 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3898.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3898.s deleted file mode 100644 index 4856a66e69..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3898.s +++ /dev/null @@ -1,20 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3898 -/* 105118 802E3898 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10511C 802E389C AFB00010 */ sw $s0, 0x10($sp) -/* 105120 802E38A0 AFBF0014 */ sw $ra, 0x14($sp) -/* 105124 802E38A4 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 105128 802E38A8 0080802D */ daddu $s0, $a0, $zero -/* 10512C 802E38AC 8E030040 */ lw $v1, 0x40($s0) -/* 105130 802E38B0 2402000A */ addiu $v0, $zero, 0xa -/* 105134 802E38B4 A4620004 */ sh $v0, 4($v1) -/* 105138 802E38B8 2402007B */ addiu $v0, $zero, 0x7b -/* 10513C 802E38BC A4620006 */ sh $v0, 6($v1) -/* 105140 802E38C0 3402FFFF */ ori $v0, $zero, 0xffff -/* 105144 802E38C4 A462000A */ sh $v0, 0xa($v1) -/* 105148 802E38C8 8FBF0014 */ lw $ra, 0x14($sp) -/* 10514C 802E38CC 8FB00010 */ lw $s0, 0x10($sp) -/* 105150 802E38D0 03E00008 */ jr $ra -/* 105154 802E38D4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E38D8.s b/asm/nonmatchings/code_104940_len_dc0/func_802E38D8.s deleted file mode 100644 index 572a534dcc..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E38D8.s +++ /dev/null @@ -1,83 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E38D8 -/* 105158 802E38D8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 10515C 802E38DC AFB1001C */ sw $s1, 0x1c($sp) -/* 105160 802E38E0 0080882D */ daddu $s1, $a0, $zero -/* 105164 802E38E4 AFBF0020 */ sw $ra, 0x20($sp) -/* 105168 802E38E8 AFB00018 */ sw $s0, 0x18($sp) -/* 10516C 802E38EC 8E300040 */ lw $s0, 0x40($s1) -/* 105170 802E38F0 86030004 */ lh $v1, 4($s0) -/* 105174 802E38F4 18600018 */ blez $v1, .L802E3958 -/* 105178 802E38F8 2402000A */ addiu $v0, $zero, 0xa -/* 10517C 802E38FC 14620004 */ bne $v1, $v0, .L802E3910 -/* 105180 802E3900 24030014 */ addiu $v1, $zero, 0x14 -/* 105184 802E3904 9602000A */ lhu $v0, 0xa($s0) -/* 105188 802E3908 080B8E45 */ j .L802E3914 -/* 10518C 802E390C 24030015 */ addiu $v1, $zero, 0x15 -.L802E3910: -/* 105190 802E3910 0000102D */ daddu $v0, $zero, $zero -.L802E3914: -/* 105194 802E3914 C620004C */ lwc1 $f0, 0x4c($s1) -/* 105198 802E3918 3C01403C */ lui $at, 0x403c -/* 10519C 802E391C 44811800 */ mtc1 $at, $f3 -/* 1051A0 802E3920 44801000 */ mtc1 $zero, $f2 -/* 1051A4 802E3924 AFA30010 */ sw $v1, 0x10($sp) -/* 1051A8 802E3928 AFA20014 */ sw $v0, 0x14($sp) -/* 1051AC 802E392C 46000021 */ cvt.d.s $f0, $f0 -/* 1051B0 802E3930 46220000 */ add.d $f0, $f0, $f2 -/* 1051B4 802E3934 8E250048 */ lw $a1, 0x48($s1) -/* 1051B8 802E3938 8E270050 */ lw $a3, 0x50($s1) -/* 1051BC 802E393C 46200020 */ cvt.s.d $f0, $f0 -/* 1051C0 802E3940 44060000 */ mfc1 $a2, $f0 -/* 1051C4 802E3944 0C04C6A5 */ jal make_item_entity_nodelay -/* 1051C8 802E3948 24040157 */ addiu $a0, $zero, 0x157 -/* 1051CC 802E394C 96020004 */ lhu $v0, 4($s0) -/* 1051D0 802E3950 2442FFFF */ addiu $v0, $v0, -1 -/* 1051D4 802E3954 A6020004 */ sh $v0, 4($s0) -.L802E3958: -/* 1051D8 802E3958 86020004 */ lh $v0, 4($s0) -/* 1051DC 802E395C 10400004 */ beqz $v0, .L802E3970 -/* 1051E0 802E3960 00000000 */ nop -/* 1051E4 802E3964 86020006 */ lh $v0, 6($s0) -/* 1051E8 802E3968 14400020 */ bnez $v0, .L802E39EC -/* 1051EC 802E396C 00000000 */ nop -.L802E3970: -/* 1051F0 802E3970 3C04802F */ lui $a0, %hi(D_802EA07C) -/* 1051F4 802E3974 2484A07C */ addiu $a0, $a0, %lo(D_802EA07C) -/* 1051F8 802E3978 24020001 */ addiu $v0, $zero, 1 -/* 1051FC 802E397C A2020003 */ sb $v0, 3($s0) -/* 105200 802E3980 C6220048 */ lwc1 $f2, 0x48($s1) -/* 105204 802E3984 C624004C */ lwc1 $f4, 0x4c($s1) -/* 105208 802E3988 C6260050 */ lwc1 $f6, 0x50($s1) -/* 10520C 802E398C C6200064 */ lwc1 $f0, 0x64($s1) -/* 105210 802E3990 3C028000 */ lui $v0, 0x8000 -/* 105214 802E3994 AFA20014 */ sw $v0, 0x14($sp) -/* 105218 802E3998 4600020D */ trunc.w.s $f8, $f0 -/* 10521C 802E399C E7A80010 */ swc1 $f8, 0x10($sp) -/* 105220 802E39A0 4600120D */ trunc.w.s $f8, $f2 -/* 105224 802E39A4 44054000 */ mfc1 $a1, $f8 -/* 105228 802E39A8 4600220D */ trunc.w.s $f8, $f4 -/* 10522C 802E39AC 44064000 */ mfc1 $a2, $f8 -/* 105230 802E39B0 4600320D */ trunc.w.s $f8, $f6 -/* 105234 802E39B4 44074000 */ mfc1 $a3, $f8 -/* 105238 802E39B8 0C044631 */ jal create_entity -/* 10523C 802E39BC 00000000 */ nop -/* 105240 802E39C0 0C04417A */ jal get_entity_by_index -/* 105244 802E39C4 0040202D */ daddu $a0, $v0, $zero -/* 105248 802E39C8 3C05802F */ lui $a1, %hi(D_802E9E54) -/* 10524C 802E39CC 24A59E54 */ addiu $a1, $a1, %lo(D_802E9E54) -/* 105250 802E39D0 0C043EF0 */ jal func_8010FBC0 -/* 105254 802E39D4 0040202D */ daddu $a0, $v0, $zero -/* 105258 802E39D8 3C032000 */ lui $v1, 0x2000 -/* 10525C 802E39DC 8E220000 */ lw $v0, ($s1) -/* 105260 802E39E0 34630020 */ ori $v1, $v1, 0x20 -/* 105264 802E39E4 00431025 */ or $v0, $v0, $v1 -/* 105268 802E39E8 AE220000 */ sw $v0, ($s1) -.L802E39EC: -/* 10526C 802E39EC 8FBF0020 */ lw $ra, 0x20($sp) -/* 105270 802E39F0 8FB1001C */ lw $s1, 0x1c($sp) -/* 105274 802E39F4 8FB00018 */ lw $s0, 0x18($sp) -/* 105278 802E39F8 03E00008 */ jr $ra -/* 10527C 802E39FC 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3A00.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3A00.s deleted file mode 100644 index f10e044435..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3A00.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3A00 -/* 105280 802E3A00 2403000E */ addiu $v1, $zero, 0xe -/* 105284 802E3A04 9082000A */ lbu $v0, 0xa($a0) -/* 105288 802E3A08 8C840040 */ lw $a0, 0x40($a0) -/* 10528C 802E3A0C 1443000C */ bne $v0, $v1, .L802E3A40 -/* 105290 802E3A10 2402000A */ addiu $v0, $zero, 0xa -/* 105294 802E3A14 84830004 */ lh $v1, 4($a0) -/* 105298 802E3A18 10620009 */ beq $v1, $v0, .L802E3A40 -/* 10529C 802E3A1C 00000000 */ nop -/* 1052A0 802E3A20 94820006 */ lhu $v0, 6($a0) -/* 1052A4 802E3A24 2442FFFF */ addiu $v0, $v0, -1 -/* 1052A8 802E3A28 A4820006 */ sh $v0, 6($a0) -/* 1052AC 802E3A2C 00021400 */ sll $v0, $v0, 0x10 -/* 1052B0 802E3A30 04410003 */ bgez $v0, .L802E3A40 -/* 1052B4 802E3A34 24020001 */ addiu $v0, $zero, 1 -/* 1052B8 802E3A38 A4800006 */ sh $zero, 6($a0) -/* 1052BC 802E3A3C A4820004 */ sh $v0, 4($a0) -.L802E3A40: -/* 1052C0 802E3A40 03E00008 */ jr $ra -/* 1052C4 802E3A44 00000000 */ nop diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3A48.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3A48.s deleted file mode 100644 index d045aee7d4..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3A48.s +++ /dev/null @@ -1,54 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3A48 -/* 1052C8 802E3A48 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1052CC 802E3A4C AFB00018 */ sw $s0, 0x18($sp) -/* 1052D0 802E3A50 0080802D */ daddu $s0, $a0, $zero -/* 1052D4 802E3A54 AFBF0020 */ sw $ra, 0x20($sp) -/* 1052D8 802E3A58 AFB1001C */ sw $s1, 0x1c($sp) -/* 1052DC 802E3A5C 92020006 */ lbu $v0, 6($s0) -/* 1052E0 802E3A60 8E110040 */ lw $s1, 0x40($s0) -/* 1052E4 802E3A64 30420080 */ andi $v0, $v0, 0x80 -/* 1052E8 802E3A68 10400005 */ beqz $v0, .L802E3A80 -/* 1052EC 802E3A6C 00000000 */ nop -/* 1052F0 802E3A70 0C043F5A */ jal func_8010FD68 -/* 1052F4 802E3A74 00000000 */ nop -/* 1052F8 802E3A78 080B8EBD */ j .L802E3AF4 -/* 1052FC 802E3A7C 00000000 */ nop -.L802E3A80: -/* 105300 802E3A80 0C0B8E80 */ jal func_802E3A00 -/* 105304 802E3A84 0200202D */ daddu $a0, $s0, $zero -/* 105308 802E3A88 0C0B8D94 */ jal func_802E3650 -/* 10530C 802E3A8C 0200202D */ daddu $a0, $s0, $zero -/* 105310 802E3A90 82220003 */ lb $v0, 3($s1) -/* 105314 802E3A94 10400017 */ beqz $v0, .L802E3AF4 -/* 105318 802E3A98 3C028000 */ lui $v0, 0x8000 -/* 10531C 802E3A9C 3C04802F */ lui $a0, %hi(D_802EA07C) -/* 105320 802E3AA0 2484A07C */ addiu $a0, $a0, %lo(D_802EA07C) -/* 105324 802E3AA4 C6020048 */ lwc1 $f2, 0x48($s0) -/* 105328 802E3AA8 C604004C */ lwc1 $f4, 0x4c($s0) -/* 10532C 802E3AAC C6060050 */ lwc1 $f6, 0x50($s0) -/* 105330 802E3AB0 C6000064 */ lwc1 $f0, 0x64($s0) -/* 105334 802E3AB4 AFA20014 */ sw $v0, 0x14($sp) -/* 105338 802E3AB8 4600020D */ trunc.w.s $f8, $f0 -/* 10533C 802E3ABC E7A80010 */ swc1 $f8, 0x10($sp) -/* 105340 802E3AC0 4600120D */ trunc.w.s $f8, $f2 -/* 105344 802E3AC4 44054000 */ mfc1 $a1, $f8 -/* 105348 802E3AC8 4600220D */ trunc.w.s $f8, $f4 -/* 10534C 802E3ACC 44064000 */ mfc1 $a2, $f8 -/* 105350 802E3AD0 4600320D */ trunc.w.s $f8, $f6 -/* 105354 802E3AD4 44074000 */ mfc1 $a3, $f8 -/* 105358 802E3AD8 0C044631 */ jal create_entity -/* 10535C 802E3ADC 00000000 */ nop -/* 105360 802E3AE0 3C032000 */ lui $v1, 0x2000 -/* 105364 802E3AE4 8E020000 */ lw $v0, ($s0) -/* 105368 802E3AE8 34630020 */ ori $v1, $v1, 0x20 -/* 10536C 802E3AEC 00431025 */ or $v0, $v0, $v1 -/* 105370 802E3AF0 AE020000 */ sw $v0, ($s0) -.L802E3AF4: -/* 105374 802E3AF4 8FBF0020 */ lw $ra, 0x20($sp) -/* 105378 802E3AF8 8FB1001C */ lw $s1, 0x1c($sp) -/* 10537C 802E3AFC 8FB00018 */ lw $s0, 0x18($sp) -/* 105380 802E3B00 03E00008 */ jr $ra -/* 105384 802E3B04 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3B08.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3B08.s deleted file mode 100644 index 4d0ae4b943..0000000000 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3B08.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3B08 -/* 105388 802E3B08 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 10538C 802E3B0C AFB00018 */ sw $s0, 0x18($sp) -/* 105390 802E3B10 0080802D */ daddu $s0, $a0, $zero -/* 105394 802E3B14 AFBF001C */ sw $ra, 0x1c($sp) -/* 105398 802E3B18 8E040040 */ lw $a0, 0x40($s0) -/* 10539C 802E3B1C 9483000A */ lhu $v1, 0xa($a0) -/* 1053A0 802E3B20 3402FFFF */ ori $v0, $zero, 0xffff -/* 1053A4 802E3B24 1062001B */ beq $v1, $v0, .L802E3B94 -/* 1053A8 802E3B28 00000000 */ nop -/* 1053AC 802E3B2C 0C05152F */ jal get_global_flag -/* 1053B0 802E3B30 0060202D */ daddu $a0, $v1, $zero -/* 1053B4 802E3B34 10400017 */ beqz $v0, .L802E3B94 -/* 1053B8 802E3B38 3C028000 */ lui $v0, 0x8000 -/* 1053BC 802E3B3C 3C04802F */ lui $a0, %hi(D_802EA07C) -/* 1053C0 802E3B40 2484A07C */ addiu $a0, $a0, %lo(D_802EA07C) -/* 1053C4 802E3B44 C6020048 */ lwc1 $f2, 0x48($s0) -/* 1053C8 802E3B48 C604004C */ lwc1 $f4, 0x4c($s0) -/* 1053CC 802E3B4C C6060050 */ lwc1 $f6, 0x50($s0) -/* 1053D0 802E3B50 C6000064 */ lwc1 $f0, 0x64($s0) -/* 1053D4 802E3B54 AFA20014 */ sw $v0, 0x14($sp) -/* 1053D8 802E3B58 4600020D */ trunc.w.s $f8, $f0 -/* 1053DC 802E3B5C E7A80010 */ swc1 $f8, 0x10($sp) -/* 1053E0 802E3B60 4600120D */ trunc.w.s $f8, $f2 -/* 1053E4 802E3B64 44054000 */ mfc1 $a1, $f8 -/* 1053E8 802E3B68 4600220D */ trunc.w.s $f8, $f4 -/* 1053EC 802E3B6C 44064000 */ mfc1 $a2, $f8 -/* 1053F0 802E3B70 4600320D */ trunc.w.s $f8, $f6 -/* 1053F4 802E3B74 44074000 */ mfc1 $a3, $f8 -/* 1053F8 802E3B78 0C044631 */ jal create_entity -/* 1053FC 802E3B7C 00000000 */ nop -/* 105400 802E3B80 3C032000 */ lui $v1, 0x2000 -/* 105404 802E3B84 8E020000 */ lw $v0, ($s0) -/* 105408 802E3B88 34630020 */ ori $v1, $v1, 0x20 -/* 10540C 802E3B8C 00431025 */ or $v0, $v0, $v1 -/* 105410 802E3B90 AE020000 */ sw $v0, ($s0) -.L802E3B94: -/* 105414 802E3B94 8FBF001C */ lw $ra, 0x1c($sp) -/* 105418 802E3B98 8FB00018 */ lw $s0, 0x18($sp) -/* 10541C 802E3B9C 03E00008 */ jr $ra -/* 105420 802E3BA0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_104940_len_dc0/func_802E3BA4.s b/asm/nonmatchings/code_104940_len_dc0/func_802E3BA4.s index c8b69f6df0..7dc7f727bb 100644 --- a/asm/nonmatchings/code_104940_len_dc0/func_802E3BA4.s +++ b/asm/nonmatchings/code_104940_len_dc0/func_802E3BA4.s @@ -41,6 +41,7 @@ glabel func_802E3BA4 /* 1054AC 802E3C2C 1040006E */ beqz $v0, .L802E3DE8 /* 1054B0 802E3C30 24020001 */ addiu $v0, $zero, 1 .L802E3C34: +glabel L802E3C34_1054B4 /* 1054B4 802E3C34 0C043F5A */ jal func_8010FD68 /* 1054B8 802E3C38 0220202D */ daddu $a0, $s1, $zero /* 1054BC 802E3C3C 080B8F7A */ j .L802E3DE8 @@ -83,11 +84,12 @@ glabel func_802E3BA4 /* 105538 802E3CB8 2C620015 */ sltiu $v0, $v1, 0x15 /* 10553C 802E3CBC 10400049 */ beqz $v0, .L802E3DE4 /* 105540 802E3CC0 00031080 */ sll $v0, $v1, 2 -/* 105544 802E3CC4 3C01802F */ lui $at, %hi(D_802EB210) +/* 105544 802E3CC4 3C01802F */ lui $at, %hi(jtbl_802EB210_10CA90) /* 105548 802E3CC8 00220821 */ addu $at, $at, $v0 -/* 10554C 802E3CCC 8C22B210 */ lw $v0, %lo(D_802EB210)($at) +/* 10554C 802E3CCC 8C22B210 */ lw $v0, %lo(jtbl_802EB210_10CA90)($at) /* 105550 802E3CD0 00400008 */ jr $v0 /* 105554 802E3CD4 00000000 */ nop +glabel L802E3CD8_105558 /* 105558 802E3CD8 12000007 */ beqz $s0, .L802E3CF8 /* 10555C 802E3CDC 00000000 */ nop /* 105560 802E3CE0 3C028011 */ lui $v0, %hi(gPlayerData) @@ -111,6 +113,7 @@ glabel func_802E3BA4 /* 1055A0 802E3D20 C6200050 */ lwc1 $f0, 0x50($s1) /* 1055A4 802E3D24 080B8F6C */ j .L802E3DB0 /* 1055A8 802E3D28 2404014F */ addiu $a0, $zero, 0x14f +glabel L802E3D2C_1055AC /* 1055AC 802E3D2C 12000008 */ beqz $s0, .L802E3D50 /* 1055B0 802E3D30 00000000 */ nop /* 1055B4 802E3D34 3C028011 */ lui $v0, %hi(gPlayerData) @@ -135,6 +138,7 @@ glabel func_802E3BA4 /* 1055F8 802E3D78 C6200050 */ lwc1 $f0, 0x50($s1) /* 1055FC 802E3D7C 080B8F6C */ j .L802E3DB0 /* 105600 802E3D80 24040150 */ addiu $a0, $zero, 0x150 +glabel L802E3D84_105604 /* 105604 802E3D84 3C028011 */ lui $v0, %hi(gPlayerData+0x1) /* 105608 802E3D88 8042F291 */ lb $v0, %lo(gPlayerData+0x1)($v0) /* 10560C 802E3D8C 28420002 */ slti $v0, $v0, 2 @@ -154,13 +158,16 @@ glabel func_802E3BA4 /* 105640 802E3DC0 0000282D */ daddu $a1, $zero, $zero /* 105644 802E3DC4 080B8F7A */ j .L802E3DE8 /* 105648 802E3DC8 24020001 */ addiu $v0, $zero, 1 +glabel L802E3DCC_10564C /* 10564C 802E3DCC 0C04419E */ jal func_80110678 /* 105650 802E3DD0 0220202D */ daddu $a0, $s1, $zero /* 105654 802E3DD4 080B8F0D */ j .L802E3C34 /* 105658 802E3DD8 00000000 */ nop +glabel L802E3DDC_10565C /* 10565C 802E3DDC 0C04419E */ jal func_80110678 /* 105660 802E3DE0 0220202D */ daddu $a0, $s1, $zero .L802E3DE4: +glabel L802E3DE4_105664 /* 105664 802E3DE4 24020001 */ addiu $v0, $zero, 1 .L802E3DE8: /* 105668 802E3DE8 8FBF0024 */ lw $ra, 0x24($sp) diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E3E80.s b/asm/nonmatchings/code_105700_len_2130/func_802E3E80.s deleted file mode 100644 index 53553bb535..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E3E80.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3E80 -/* 105700 802E3E80 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105704 802E3E84 AFBF0010 */ sw $ra, 0x10($sp) -/* 105708 802E3E88 0C0B8D94 */ jal func_802E3650 -/* 10570C 802E3E8C 00000000 */ nop -/* 105710 802E3E90 8FBF0010 */ lw $ra, 0x10($sp) -/* 105714 802E3E94 03E00008 */ jr $ra -/* 105718 802E3E98 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E3E9C.s b/asm/nonmatchings/code_105700_len_2130/func_802E3E9C.s deleted file mode 100644 index 41bfdf02df..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E3E9C.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E3E9C -/* 10571C 802E3E9C 3C028011 */ lui $v0, %hi(gPlayerStatus+0x4) -/* 105720 802E3EA0 8C42EFCC */ lw $v0, %lo(gPlayerStatus+0x4)($v0) -/* 105724 802E3EA4 9083000B */ lbu $v1, 0xb($a0) -/* 105728 802E3EA8 30420001 */ andi $v0, $v0, 1 -/* 10572C 802E3EAC 50400007 */ beql $v0, $zero, .L802E3ECC -/* 105730 802E3EB0 2463FFE0 */ addiu $v1, $v1, -0x20 -/* 105734 802E3EB4 24630020 */ addiu $v1, $v1, 0x20 -/* 105738 802E3EB8 286200C1 */ slti $v0, $v1, 0xc1 -/* 10573C 802E3EBC 50400005 */ beql $v0, $zero, .L802E3ED4 -/* 105740 802E3EC0 240300C0 */ addiu $v1, $zero, 0xc0 -/* 105744 802E3EC4 03E00008 */ jr $ra -/* 105748 802E3EC8 A083000B */ sb $v1, 0xb($a0) -.L802E3ECC: -/* 10574C 802E3ECC 58600001 */ blezl $v1, .L802E3ED4 -/* 105750 802E3ED0 0000182D */ daddu $v1, $zero, $zero -.L802E3ED4: -/* 105754 802E3ED4 A083000B */ sb $v1, 0xb($a0) -/* 105758 802E3ED8 03E00008 */ jr $ra -/* 10575C 802E3EDC 00000000 */ nop diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4040.s b/asm/nonmatchings/code_105700_len_2130/func_802E4040.s deleted file mode 100644 index 1168e9bf4f..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4040.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4040 -/* 1058C0 802E4040 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1058C4 802E4044 AFBF0010 */ sw $ra, 0x10($sp) -/* 1058C8 802E4048 0C04419E */ jal func_80110678 -/* 1058CC 802E404C 00000000 */ nop -/* 1058D0 802E4050 8FBF0010 */ lw $ra, 0x10($sp) -/* 1058D4 802E4054 03E00008 */ jr $ra -/* 1058D8 802E4058 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E405C.s b/asm/nonmatchings/code_105700_len_2130/func_802E405C.s deleted file mode 100644 index 1dfc738a92..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E405C.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E405C -/* 1058DC 802E405C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1058E0 802E4060 3C013F80 */ lui $at, 0x3f80 -/* 1058E4 802E4064 44810000 */ mtc1 $at, $f0 -/* 1058E8 802E4068 2402003C */ addiu $v0, $zero, 0x3c -/* 1058EC 802E406C AFBF0018 */ sw $ra, 0x18($sp) -/* 1058F0 802E4070 AFA20014 */ sw $v0, 0x14($sp) -/* 1058F4 802E4074 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1058F8 802E4078 8C850048 */ lw $a1, 0x48($a0) -/* 1058FC 802E407C 8C86004C */ lw $a2, 0x4c($a0) -/* 105900 802E4080 8C870050 */ lw $a3, 0x50($a0) -/* 105904 802E4084 0C01C88C */ jal func_80072230 -/* 105908 802E4088 0000202D */ daddu $a0, $zero, $zero -/* 10590C 802E408C 8FBF0018 */ lw $ra, 0x18($sp) -/* 105910 802E4090 3C01802F */ lui $at, %hi(D_802EB3B0) -/* 105914 802E4094 AC22B3B0 */ sw $v0, %lo(D_802EB3B0)($at) -/* 105918 802E4098 03E00008 */ jr $ra -/* 10591C 802E409C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E40A0.s b/asm/nonmatchings/code_105700_len_2130/func_802E40A0.s deleted file mode 100644 index 4185824e66..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E40A0.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E40A0 -/* 105920 802E40A0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105924 802E40A4 AFB00010 */ sw $s0, 0x10($sp) -/* 105928 802E40A8 0080802D */ daddu $s0, $a0, $zero -/* 10592C 802E40AC AFBF0014 */ sw $ra, 0x14($sp) -/* 105930 802E40B0 0C0441A9 */ jal get_entity_type -/* 105934 802E40B4 92040004 */ lbu $a0, 4($s0) -/* 105938 802E40B8 0040182D */ daddu $v1, $v0, $zero -/* 10593C 802E40BC 24020012 */ addiu $v0, $zero, 0x12 -/* 105940 802E40C0 10620003 */ beq $v1, $v0, .L802E40D0 -/* 105944 802E40C4 24020014 */ addiu $v0, $zero, 0x14 -/* 105948 802E40C8 14620006 */ bne $v1, $v0, .L802E40E4 -/* 10594C 802E40CC 00000000 */ nop -.L802E40D0: -/* 105950 802E40D0 86040014 */ lh $a0, 0x14($s0) -/* 105954 802E40D4 3C050000 */ lui $a1, 0 -/* 105958 802E40D8 24A50094 */ addiu $a1, $a1, 0x94 -/* 10595C 802E40DC 080B903C */ j .L802E40F0 -/* 105960 802E40E0 00000000 */ nop -.L802E40E4: -/* 105964 802E40E4 86040014 */ lh $a0, 0x14($s0) -/* 105968 802E40E8 3C050000 */ lui $a1, 0 -/* 10596C 802E40EC 24A50094 */ addiu $a1, $a1, 0x94 -.L802E40F0: -/* 105970 802E40F0 0C048052 */ jal play_model_animation -/* 105974 802E40F4 00000000 */ nop -/* 105978 802E40F8 8FBF0014 */ lw $ra, 0x14($sp) -/* 10597C 802E40FC 8FB00010 */ lw $s0, 0x10($sp) -/* 105980 802E4100 03E00008 */ jr $ra -/* 105984 802E4104 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4108.s b/asm/nonmatchings/code_105700_len_2130/func_802E4108.s deleted file mode 100644 index aecb8c427b..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4108.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4108 -/* 105988 802E4108 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10598C 802E410C AFBF0014 */ sw $ra, 0x14($sp) -/* 105990 802E4110 AFB00010 */ sw $s0, 0x10($sp) -/* 105994 802E4114 8C820040 */ lw $v0, 0x40($a0) -/* 105998 802E4118 84440012 */ lh $a0, 0x12($v0) -/* 10599C 802E411C 0C04417A */ jal get_entity_by_index -/* 1059A0 802E4120 2410FFFE */ addiu $s0, $zero, -2 -/* 1059A4 802E4124 8C430000 */ lw $v1, ($v0) -/* 1059A8 802E4128 84440016 */ lh $a0, 0x16($v0) -/* 1059AC 802E412C 00701824 */ and $v1, $v1, $s0 -/* 1059B0 802E4130 0C044181 */ jal get_shadow_by_index -/* 1059B4 802E4134 AC430000 */ sw $v1, ($v0) -/* 1059B8 802E4138 8C430000 */ lw $v1, ($v0) -/* 1059BC 802E413C 00701824 */ and $v1, $v1, $s0 -/* 1059C0 802E4140 AC430000 */ sw $v1, ($v0) -/* 1059C4 802E4144 8FBF0014 */ lw $ra, 0x14($sp) -/* 1059C8 802E4148 8FB00010 */ lw $s0, 0x10($sp) -/* 1059CC 802E414C 03E00008 */ jr $ra -/* 1059D0 802E4150 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4154.s b/asm/nonmatchings/code_105700_len_2130/func_802E4154.s deleted file mode 100644 index 41d9a4445e..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4154.s +++ /dev/null @@ -1,57 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4154 -/* 1059D4 802E4154 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1059D8 802E4158 AFB00018 */ sw $s0, 0x18($sp) -/* 1059DC 802E415C 0080802D */ daddu $s0, $a0, $zero -/* 1059E0 802E4160 AFBF001C */ sw $ra, 0x1c($sp) -/* 1059E4 802E4164 8E040040 */ lw $a0, 0x40($s0) -/* 1059E8 802E4168 9483000A */ lhu $v1, 0xa($a0) -/* 1059EC 802E416C 3402FFFF */ ori $v0, $zero, 0xffff -/* 1059F0 802E4170 10620024 */ beq $v1, $v0, .L802E4204 -/* 1059F4 802E4174 00000000 */ nop -/* 1059F8 802E4178 0C05152F */ jal get_global_flag -/* 1059FC 802E417C 0060202D */ daddu $a0, $v1, $zero -/* 105A00 802E4180 10400020 */ beqz $v0, .L802E4204 -/* 105A04 802E4184 00000000 */ nop -/* 105A08 802E4188 0C0441A9 */ jal get_entity_type -/* 105A0C 802E418C 92040004 */ lbu $a0, 4($s0) -/* 105A10 802E4190 3C04802F */ lui $a0, %hi(D_802EA0A0) -/* 105A14 802E4194 2484A0A0 */ addiu $a0, $a0, %lo(D_802EA0A0) -/* 105A18 802E4198 24030014 */ addiu $v1, $zero, 0x14 -/* 105A1C 802E419C 10430003 */ beq $v0, $v1, .L802E41AC -/* 105A20 802E41A0 00000000 */ nop -/* 105A24 802E41A4 3C04802F */ lui $a0, %hi(D_802EA07C) -/* 105A28 802E41A8 2484A07C */ addiu $a0, $a0, %lo(D_802EA07C) -.L802E41AC: -/* 105A2C 802E41AC C6020048 */ lwc1 $f2, 0x48($s0) -/* 105A30 802E41B0 C604004C */ lwc1 $f4, 0x4c($s0) -/* 105A34 802E41B4 C6060050 */ lwc1 $f6, 0x50($s0) -/* 105A38 802E41B8 C6000064 */ lwc1 $f0, 0x64($s0) -/* 105A3C 802E41BC 3C028000 */ lui $v0, 0x8000 -/* 105A40 802E41C0 AFA20014 */ sw $v0, 0x14($sp) -/* 105A44 802E41C4 4600020D */ trunc.w.s $f8, $f0 -/* 105A48 802E41C8 E7A80010 */ swc1 $f8, 0x10($sp) -/* 105A4C 802E41CC 4600120D */ trunc.w.s $f8, $f2 -/* 105A50 802E41D0 44054000 */ mfc1 $a1, $f8 -/* 105A54 802E41D4 4600220D */ trunc.w.s $f8, $f4 -/* 105A58 802E41D8 44064000 */ mfc1 $a2, $f8 -/* 105A5C 802E41DC 4600320D */ trunc.w.s $f8, $f6 -/* 105A60 802E41E0 44074000 */ mfc1 $a3, $f8 -/* 105A64 802E41E4 0C044631 */ jal create_entity -/* 105A68 802E41E8 00000000 */ nop -/* 105A6C 802E41EC 3C05802F */ lui $a1, %hi(D_802EA310) -/* 105A70 802E41F0 24A5A310 */ addiu $a1, $a1, %lo(D_802EA310) -/* 105A74 802E41F4 0C043EF0 */ jal func_8010FBC0 -/* 105A78 802E41F8 0200202D */ daddu $a0, $s0, $zero -/* 105A7C 802E41FC 080B9083 */ j .L802E420C -/* 105A80 802E4200 00000000 */ nop -.L802E4204: -/* 105A84 802E4204 0C043F5A */ jal func_8010FD68 -/* 105A88 802E4208 0200202D */ daddu $a0, $s0, $zero -.L802E420C: -/* 105A8C 802E420C 8FBF001C */ lw $ra, 0x1c($sp) -/* 105A90 802E4210 8FB00018 */ lw $s0, 0x18($sp) -/* 105A94 802E4214 03E00008 */ jr $ra -/* 105A98 802E4218 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E421C.s b/asm/nonmatchings/code_105700_len_2130/func_802E421C.s deleted file mode 100644 index 2cd3493c6b..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E421C.s +++ /dev/null @@ -1,168 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E421C -/* 105A9C 802E421C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 105AA0 802E4220 AFB1001C */ sw $s1, 0x1c($sp) -/* 105AA4 802E4224 0080882D */ daddu $s1, $a0, $zero -/* 105AA8 802E4228 AFBF0024 */ sw $ra, 0x24($sp) -/* 105AAC 802E422C AFB20020 */ sw $s2, 0x20($sp) -/* 105AB0 802E4230 AFB00018 */ sw $s0, 0x18($sp) -/* 105AB4 802E4234 0C0441A9 */ jal get_entity_type -/* 105AB8 802E4238 92240004 */ lbu $a0, 4($s1) -/* 105ABC 802E423C 3C04802F */ lui $a0, %hi(D_802EA07C) -/* 105AC0 802E4240 2484A07C */ addiu $a0, $a0, %lo(D_802EA07C) -/* 105AC4 802E4244 0040182D */ daddu $v1, $v0, $zero -/* 105AC8 802E4248 28620015 */ slti $v0, $v1, 0x15 -/* 105ACC 802E424C 10400005 */ beqz $v0, .L802E4264 -/* 105AD0 802E4250 28620012 */ slti $v0, $v1, 0x12 -/* 105AD4 802E4254 14400003 */ bnez $v0, .L802E4264 -/* 105AD8 802E4258 00000000 */ nop -/* 105ADC 802E425C 3C04802F */ lui $a0, %hi(D_802EA0A0) -/* 105AE0 802E4260 2484A0A0 */ addiu $a0, $a0, %lo(D_802EA0A0) -.L802E4264: -/* 105AE4 802E4264 C6220048 */ lwc1 $f2, 0x48($s1) -/* 105AE8 802E4268 C624004C */ lwc1 $f4, 0x4c($s1) -/* 105AEC 802E426C C6260050 */ lwc1 $f6, 0x50($s1) -/* 105AF0 802E4270 C6200064 */ lwc1 $f0, 0x64($s1) -/* 105AF4 802E4274 3C028000 */ lui $v0, 0x8000 -/* 105AF8 802E4278 AFA20014 */ sw $v0, 0x14($sp) -/* 105AFC 802E427C 4600020D */ trunc.w.s $f8, $f0 -/* 105B00 802E4280 E7A80010 */ swc1 $f8, 0x10($sp) -/* 105B04 802E4284 4600120D */ trunc.w.s $f8, $f2 -/* 105B08 802E4288 44054000 */ mfc1 $a1, $f8 -/* 105B0C 802E428C 4600220D */ trunc.w.s $f8, $f4 -/* 105B10 802E4290 44064000 */ mfc1 $a2, $f8 -/* 105B14 802E4294 4600320D */ trunc.w.s $f8, $f6 -/* 105B18 802E4298 44074000 */ mfc1 $a3, $f8 -/* 105B1C 802E429C 0C044631 */ jal create_entity -/* 105B20 802E42A0 00000000 */ nop -/* 105B24 802E42A4 0040902D */ daddu $s2, $v0, $zero -/* 105B28 802E42A8 0C04417A */ jal get_entity_by_index -/* 105B2C 802E42AC 0240202D */ daddu $a0, $s2, $zero -/* 105B30 802E42B0 0040802D */ daddu $s0, $v0, $zero -/* 105B34 802E42B4 8E020000 */ lw $v0, ($s0) -/* 105B38 802E42B8 34430001 */ ori $v1, $v0, 1 -/* 105B3C 802E42BC AE030000 */ sw $v1, ($s0) -/* 105B40 802E42C0 8E220000 */ lw $v0, ($s1) -/* 105B44 802E42C4 3C040004 */ lui $a0, 4 -/* 105B48 802E42C8 00441024 */ and $v0, $v0, $a0 -/* 105B4C 802E42CC 10400002 */ beqz $v0, .L802E42D8 -/* 105B50 802E42D0 00641025 */ or $v0, $v1, $a0 -/* 105B54 802E42D4 AE020000 */ sw $v0, ($s0) -.L802E42D8: -/* 105B58 802E42D8 8E220000 */ lw $v0, ($s1) -/* 105B5C 802E42DC 30420004 */ andi $v0, $v0, 4 -/* 105B60 802E42E0 10400004 */ beqz $v0, .L802E42F4 -/* 105B64 802E42E4 00000000 */ nop -/* 105B68 802E42E8 8E020000 */ lw $v0, ($s0) -/* 105B6C 802E42EC 34420004 */ ori $v0, $v0, 4 -/* 105B70 802E42F0 AE020000 */ sw $v0, ($s0) -.L802E42F4: -/* 105B74 802E42F4 0C044181 */ jal get_shadow_by_index -/* 105B78 802E42F8 86040016 */ lh $a0, 0x16($s0) -/* 105B7C 802E42FC 0040282D */ daddu $a1, $v0, $zero -/* 105B80 802E4300 3C020040 */ lui $v0, 0x40 -/* 105B84 802E4304 34420001 */ ori $v0, $v0, 1 -/* 105B88 802E4308 8CA30000 */ lw $v1, ($a1) -/* 105B8C 802E430C 0220202D */ daddu $a0, $s1, $zero -/* 105B90 802E4310 00621825 */ or $v1, $v1, $v0 -/* 105B94 802E4314 0C044AC8 */ jal func_80112B20 -/* 105B98 802E4318 ACA30000 */ sw $v1, ($a1) -/* 105B9C 802E431C 92240004 */ lbu $a0, 4($s1) -/* 105BA0 802E4320 0C0441A9 */ jal get_entity_type -/* 105BA4 802E4324 0040802D */ daddu $s0, $v0, $zero -/* 105BA8 802E4328 0040182D */ daddu $v1, $v0, $zero -/* 105BAC 802E432C 24020012 */ addiu $v0, $zero, 0x12 -/* 105BB0 802E4330 10620003 */ beq $v1, $v0, .L802E4340 -/* 105BB4 802E4334 24020014 */ addiu $v0, $zero, 0x14 -/* 105BB8 802E4338 14620005 */ bne $v1, $v0, .L802E4350 -/* 105BBC 802E433C 00000000 */ nop -.L802E4340: -/* 105BC0 802E4340 3C04802F */ lui $a0, %hi(D_802EA660) -/* 105BC4 802E4344 2484A660 */ addiu $a0, $a0, %lo(D_802EA660) -/* 105BC8 802E4348 080B90DA */ j .L802E4368 -/* 105BCC 802E434C 00000000 */ nop -.L802E4350: -/* 105BD0 802E4350 3C04802F */ lui $a0, %hi(D_802EA63C) -/* 105BD4 802E4354 2484A63C */ addiu $a0, $a0, %lo(D_802EA63C) -/* 105BD8 802E4358 12000003 */ beqz $s0, .L802E4368 -/* 105BDC 802E435C 00000000 */ nop -/* 105BE0 802E4360 3C04802F */ lui $a0, %hi(D_802EA618) -/* 105BE4 802E4364 2484A618 */ addiu $a0, $a0, %lo(D_802EA618) -.L802E4368: -/* 105BE8 802E4368 C6220048 */ lwc1 $f2, 0x48($s1) -/* 105BEC 802E436C C624004C */ lwc1 $f4, 0x4c($s1) -/* 105BF0 802E4370 C6260050 */ lwc1 $f6, 0x50($s1) -/* 105BF4 802E4374 C6200064 */ lwc1 $f0, 0x64($s1) -/* 105BF8 802E4378 3C028000 */ lui $v0, 0x8000 -/* 105BFC 802E437C AFA20014 */ sw $v0, 0x14($sp) -/* 105C00 802E4380 4600020D */ trunc.w.s $f8, $f0 -/* 105C04 802E4384 E7A80010 */ swc1 $f8, 0x10($sp) -/* 105C08 802E4388 4600120D */ trunc.w.s $f8, $f2 -/* 105C0C 802E438C 44054000 */ mfc1 $a1, $f8 -/* 105C10 802E4390 4600220D */ trunc.w.s $f8, $f4 -/* 105C14 802E4394 44064000 */ mfc1 $a2, $f8 -/* 105C18 802E4398 4600320D */ trunc.w.s $f8, $f6 -/* 105C1C 802E439C 44074000 */ mfc1 $a3, $f8 -/* 105C20 802E43A0 0C044631 */ jal create_entity -/* 105C24 802E43A4 00000000 */ nop -/* 105C28 802E43A8 0C04417A */ jal get_entity_by_index -/* 105C2C 802E43AC 0040202D */ daddu $a0, $v0, $zero -/* 105C30 802E43B0 9223000B */ lbu $v1, 0xb($s1) -/* 105C34 802E43B4 0040802D */ daddu $s0, $v0, $zero -/* 105C38 802E43B8 A203000B */ sb $v1, 0xb($s0) -/* 105C3C 802E43BC 8E220000 */ lw $v0, ($s1) -/* 105C40 802E43C0 30420001 */ andi $v0, $v0, 1 -/* 105C44 802E43C4 14400005 */ bnez $v0, .L802E43DC -/* 105C48 802E43C8 24020020 */ addiu $v0, $zero, 0x20 -/* 105C4C 802E43CC 9222000B */ lbu $v0, 0xb($s1) -/* 105C50 802E43D0 2C4200FF */ sltiu $v0, $v0, 0xff -/* 105C54 802E43D4 10400002 */ beqz $v0, .L802E43E0 -/* 105C58 802E43D8 24020020 */ addiu $v0, $zero, 0x20 -.L802E43DC: -/* 105C5C 802E43DC A202000B */ sb $v0, 0xb($s0) -.L802E43E0: -/* 105C60 802E43E0 8E220000 */ lw $v0, ($s1) -/* 105C64 802E43E4 3C030004 */ lui $v1, 4 -/* 105C68 802E43E8 00431024 */ and $v0, $v0, $v1 -/* 105C6C 802E43EC 10400004 */ beqz $v0, .L802E4400 -/* 105C70 802E43F0 00000000 */ nop -/* 105C74 802E43F4 8E020000 */ lw $v0, ($s0) -/* 105C78 802E43F8 00431025 */ or $v0, $v0, $v1 -/* 105C7C 802E43FC AE020000 */ sw $v0, ($s0) -.L802E4400: -/* 105C80 802E4400 8E020040 */ lw $v0, 0x40($s0) -/* 105C84 802E4404 A4520012 */ sh $s2, 0x12($v0) -/* 105C88 802E4408 8E220000 */ lw $v0, ($s1) -/* 105C8C 802E440C 30420004 */ andi $v0, $v0, 4 -/* 105C90 802E4410 10400004 */ beqz $v0, .L802E4424 -/* 105C94 802E4414 2403FEFF */ addiu $v1, $zero, -0x101 -/* 105C98 802E4418 8E020000 */ lw $v0, ($s0) -/* 105C9C 802E441C 34420004 */ ori $v0, $v0, 4 -/* 105CA0 802E4420 AE020000 */ sw $v0, ($s0) -.L802E4424: -/* 105CA4 802E4424 8E220000 */ lw $v0, ($s1) -/* 105CA8 802E4428 86240016 */ lh $a0, 0x16($s1) -/* 105CAC 802E442C 00431024 */ and $v0, $v0, $v1 -/* 105CB0 802E4430 0C044181 */ jal get_shadow_by_index -/* 105CB4 802E4434 AE220000 */ sw $v0, ($s1) -/* 105CB8 802E4438 0040282D */ daddu $a1, $v0, $zero -/* 105CBC 802E443C 3C031000 */ lui $v1, 0x1000 -/* 105CC0 802E4440 8CA20000 */ lw $v0, ($a1) -/* 105CC4 802E4444 34630001 */ ori $v1, $v1, 1 -/* 105CC8 802E4448 00431025 */ or $v0, $v0, $v1 -/* 105CCC 802E444C ACA20000 */ sw $v0, ($a1) -/* 105CD0 802E4450 0C044181 */ jal get_shadow_by_index -/* 105CD4 802E4454 86040016 */ lh $a0, 0x16($s0) -/* 105CD8 802E4458 0040282D */ daddu $a1, $v0, $zero -/* 105CDC 802E445C 8CA20000 */ lw $v0, ($a1) -/* 105CE0 802E4460 3C030040 */ lui $v1, 0x40 -/* 105CE4 802E4464 00431025 */ or $v0, $v0, $v1 -/* 105CE8 802E4468 ACA20000 */ sw $v0, ($a1) -/* 105CEC 802E446C 8FBF0024 */ lw $ra, 0x24($sp) -/* 105CF0 802E4470 8FB20020 */ lw $s2, 0x20($sp) -/* 105CF4 802E4474 8FB1001C */ lw $s1, 0x1c($sp) -/* 105CF8 802E4478 8FB00018 */ lw $s0, 0x18($sp) -/* 105CFC 802E447C 03E00008 */ jr $ra -/* 105D00 802E4480 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4484.s b/asm/nonmatchings/code_105700_len_2130/func_802E4484.s deleted file mode 100644 index 2ae8baa247..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4484.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4484 -/* 105D04 802E4484 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105D08 802E4488 0080182D */ daddu $v1, $a0, $zero -/* 105D0C 802E448C 2405FEFF */ addiu $a1, $zero, -0x101 -/* 105D10 802E4490 AFBF0010 */ sw $ra, 0x10($sp) -/* 105D14 802E4494 8C620000 */ lw $v0, ($v1) -/* 105D18 802E4498 84640016 */ lh $a0, 0x16($v1) -/* 105D1C 802E449C 34420001 */ ori $v0, $v0, 1 -/* 105D20 802E44A0 00451024 */ and $v0, $v0, $a1 -/* 105D24 802E44A4 0C044181 */ jal get_shadow_by_index -/* 105D28 802E44A8 AC620000 */ sw $v0, ($v1) -/* 105D2C 802E44AC 3C041000 */ lui $a0, 0x1000 -/* 105D30 802E44B0 8C430000 */ lw $v1, ($v0) -/* 105D34 802E44B4 34840001 */ ori $a0, $a0, 1 -/* 105D38 802E44B8 00641825 */ or $v1, $v1, $a0 -/* 105D3C 802E44BC AC430000 */ sw $v1, ($v0) -/* 105D40 802E44C0 8FBF0010 */ lw $ra, 0x10($sp) -/* 105D44 802E44C4 03E00008 */ jr $ra -/* 105D48 802E44C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E44CC.s b/asm/nonmatchings/code_105700_len_2130/func_802E44CC.s deleted file mode 100644 index afaf12811d..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E44CC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E44CC -/* 105D4C 802E44CC 0080282D */ daddu $a1, $a0, $zero -/* 105D50 802E44D0 8CA20028 */ lw $v0, 0x28($a1) -/* 105D54 802E44D4 14400003 */ bnez $v0, .L802E44E4 -/* 105D58 802E44D8 24020001 */ addiu $v0, $zero, 1 -/* 105D5C 802E44DC 03E00008 */ jr $ra -/* 105D60 802E44E0 0000102D */ daddu $v0, $zero, $zero -.L802E44E4: -/* 105D64 802E44E4 8CA30000 */ lw $v1, ($a1) -/* 105D68 802E44E8 3C040100 */ lui $a0, 0x100 -/* 105D6C 802E44EC 00641825 */ or $v1, $v1, $a0 -/* 105D70 802E44F0 03E00008 */ jr $ra -/* 105D74 802E44F4 ACA30000 */ sw $v1, ($a1) diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E44F8.s b/asm/nonmatchings/code_105700_len_2130/func_802E44F8.s deleted file mode 100644 index d19ea14c91..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E44F8.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E44F8 -/* 105D78 802E44F8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105D7C 802E44FC AFBF0010 */ sw $ra, 0x10($sp) -/* 105D80 802E4500 0C03805E */ jal disable_player_input -/* 105D84 802E4504 00000000 */ nop -/* 105D88 802E4508 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 105D8C 802E450C 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 105D90 802E4510 8C430000 */ lw $v1, ($v0) -/* 105D94 802E4514 3C040080 */ lui $a0, 0x80 -/* 105D98 802E4518 AC400054 */ sw $zero, 0x54($v0) -/* 105D9C 802E451C 00641825 */ or $v1, $v1, $a0 -/* 105DA0 802E4520 24040008 */ addiu $a0, $zero, 8 -/* 105DA4 802E4524 0C039769 */ jal set_action_state -/* 105DA8 802E4528 AC430000 */ sw $v1, ($v0) -/* 105DAC 802E452C 0C038C1B */ jal gravity_use_fall_parms -/* 105DB0 802E4530 00000000 */ nop -/* 105DB4 802E4534 8FBF0010 */ lw $ra, 0x10($sp) -/* 105DB8 802E4538 03E00008 */ jr $ra -/* 105DBC 802E453C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4540.s b/asm/nonmatchings/code_105700_len_2130/func_802E4540.s deleted file mode 100644 index fd61af9abc..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4540.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4540 -/* 105DC0 802E4540 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105DC4 802E4544 AFBF0010 */ sw $ra, 0x10($sp) -/* 105DC8 802E4548 0C038069 */ jal enable_player_input -/* 105DCC 802E454C 00000000 */ nop -/* 105DD0 802E4550 8FBF0010 */ lw $ra, 0x10($sp) -/* 105DD4 802E4554 03E00008 */ jr $ra -/* 105DD8 802E4558 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E464C.s b/asm/nonmatchings/code_105700_len_2130/func_802E464C.s deleted file mode 100644 index ecd7ae8386..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E464C.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E464C -/* 105ECC 802E464C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105ED0 802E4650 AFB00010 */ sw $s0, 0x10($sp) -/* 105ED4 802E4654 AFBF0014 */ sw $ra, 0x14($sp) -/* 105ED8 802E4658 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 105EDC 802E465C 0080802D */ daddu $s0, $a0, $zero -/* 105EE0 802E4660 8E030040 */ lw $v1, 0x40($s0) -/* 105EE4 802E4664 3C028016 */ lui $v0, %hi(D_8015C7D2) -/* 105EE8 802E4668 9442C7D2 */ lhu $v0, %lo(D_8015C7D2)($v0) -/* 105EEC 802E466C A4620010 */ sh $v0, 0x10($v1) -/* 105EF0 802E4670 3402FFFF */ ori $v0, $zero, 0xffff -/* 105EF4 802E4674 A462000A */ sh $v0, 0xa($v1) -/* 105EF8 802E4678 3C02802E */ lui $v0, %hi(func_802E455C) -/* 105EFC 802E467C 2442455C */ addiu $v0, $v0, %lo(func_802E455C) -/* 105F00 802E4680 AE02003C */ sw $v0, 0x3c($s0) -/* 105F04 802E4684 8FBF0014 */ lw $ra, 0x14($sp) -/* 105F08 802E4688 8FB00010 */ lw $s0, 0x10($sp) -/* 105F0C 802E468C 03E00008 */ jr $ra -/* 105F10 802E4690 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E4694.s b/asm/nonmatchings/code_105700_len_2130/func_802E4694.s deleted file mode 100644 index b685cac019..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E4694.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4694 -/* 105F14 802E4694 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105F18 802E4698 AFB00010 */ sw $s0, 0x10($sp) -/* 105F1C 802E469C AFBF0014 */ sw $ra, 0x14($sp) -/* 105F20 802E46A0 0C0B9193 */ jal func_802E464C -/* 105F24 802E46A4 0080802D */ daddu $s0, $a0, $zero -/* 105F28 802E46A8 A200000B */ sb $zero, 0xb($s0) -/* 105F2C 802E46AC 8FBF0014 */ lw $ra, 0x14($sp) -/* 105F30 802E46B0 8FB00010 */ lw $s0, 0x10($sp) -/* 105F34 802E46B4 03E00008 */ jr $ra -/* 105F38 802E46B8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s b/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s deleted file mode 100644 index 6c5180bf1a..0000000000 --- a/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E46BC -/* 105F3C 802E46BC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 105F40 802E46C0 AFB00010 */ sw $s0, 0x10($sp) -/* 105F44 802E46C4 AFBF0014 */ sw $ra, 0x14($sp) -/* 105F48 802E46C8 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 105F4C 802E46CC 0080802D */ daddu $s0, $a0, $zero -/* 105F50 802E46D0 86040014 */ lh $a0, 0x14($s0) -/* 105F54 802E46D4 3C02802E */ lui $v0, %hi(func_802E455C) -/* 105F58 802E46D8 2442455C */ addiu $v0, $v0, %lo(func_802E455C) -/* 105F5C 802E46DC 0C047FF8 */ jal get_anim_mesh -/* 105F60 802E46E0 AE02003C */ sw $v0, 0x3c($s0) -/* 105F64 802E46E4 24030011 */ addiu $v1, $zero, 0x11 -/* 105F68 802E46E8 A0430004 */ sb $v1, 4($v0) -/* 105F6C 802E46EC 8C430000 */ lw $v1, ($v0) -/* 105F70 802E46F0 3C040001 */ lui $a0, 1 -/* 105F74 802E46F4 00641825 */ or $v1, $v1, $a0 -/* 105F78 802E46F8 AC430000 */ sw $v1, ($v0) -/* 105F7C 802E46FC 8FBF0014 */ lw $ra, 0x14($sp) -/* 105F80 802E4700 8FB00010 */ lw $s0, 0x10($sp) -/* 105F84 802E4704 03E00008 */ jr $ra -/* 105F88 802E4708 27BD0018 */ addiu $sp, $sp, 0x18 -/* 105F8C 802E470C 00000000 */ nop diff --git a/asm/nonmatchings/code_105F90/func_802E4AEC.s b/asm/nonmatchings/code_105F90/func_802E4AEC.s deleted file mode 100644 index 060743d457..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E4AEC.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4AEC -/* 10636C 802E4AEC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106370 802E4AF0 3C050A00 */ lui $a1, 0xa00 -/* 106374 802E4AF4 24A50808 */ addiu $a1, $a1, 0x808 -/* 106378 802E4AF8 AFBF0010 */ sw $ra, 0x10($sp) -/* 10637C 802E4AFC 0C0B91CC */ jal func_802E4730 -/* 106380 802E4B00 00000000 */ nop -/* 106384 802E4B04 8FBF0010 */ lw $ra, 0x10($sp) -/* 106388 802E4B08 03E00008 */ jr $ra -/* 10638C 802E4B0C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E4B10.s b/asm/nonmatchings/code_105F90/func_802E4B10.s deleted file mode 100644 index c2f8f08de0..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E4B10.s +++ /dev/null @@ -1,24 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4B10 -/* 106390 802E4B10 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106394 802E4B14 AFB00010 */ sw $s0, 0x10($sp) -/* 106398 802E4B18 0080802D */ daddu $s0, $a0, $zero -/* 10639C 802E4B1C AFBF0014 */ sw $ra, 0x14($sp) -/* 1063A0 802E4B20 8E020040 */ lw $v0, 0x40($s0) -/* 1063A4 802E4B24 0C04417A */ jal get_entity_by_index -/* 1063A8 802E4B28 90440000 */ lbu $a0, ($v0) -/* 1063AC 802E4B2C C4400048 */ lwc1 $f0, 0x48($v0) -/* 1063B0 802E4B30 3C014160 */ lui $at, 0x4160 -/* 1063B4 802E4B34 44811000 */ mtc1 $at, $f2 -/* 1063B8 802E4B38 E6000048 */ swc1 $f0, 0x48($s0) -/* 1063BC 802E4B3C C440004C */ lwc1 $f0, 0x4c($v0) -/* 1063C0 802E4B40 46020000 */ add.s $f0, $f0, $f2 -/* 1063C4 802E4B44 E600004C */ swc1 $f0, 0x4c($s0) -/* 1063C8 802E4B48 C4400050 */ lwc1 $f0, 0x50($v0) -/* 1063CC 802E4B4C E6000050 */ swc1 $f0, 0x50($s0) -/* 1063D0 802E4B50 8FBF0014 */ lw $ra, 0x14($sp) -/* 1063D4 802E4B54 8FB00010 */ lw $s0, 0x10($sp) -/* 1063D8 802E4B58 03E00008 */ jr $ra -/* 1063DC 802E4B5C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E4B60.s b/asm/nonmatchings/code_105F90/func_802E4B60.s deleted file mode 100644 index 6793c597cf..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E4B60.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4B60 -/* 1063E0 802E4B60 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1063E4 802E4B64 AFB10014 */ sw $s1, 0x14($sp) -/* 1063E8 802E4B68 0080882D */ daddu $s1, $a0, $zero -/* 1063EC 802E4B6C 3C02802E */ lui $v0, %hi(func_802E4AEC) -/* 1063F0 802E4B70 24424AEC */ addiu $v0, $v0, %lo(func_802E4AEC) -/* 1063F4 802E4B74 AFBF0018 */ sw $ra, 0x18($sp) -/* 1063F8 802E4B78 AFB00010 */ sw $s0, 0x10($sp) -/* 1063FC 802E4B7C AE22003C */ sw $v0, 0x3c($s1) -/* 106400 802E4B80 240200FF */ addiu $v0, $zero, 0xff -/* 106404 802E4B84 A222000B */ sb $v0, 0xb($s1) -/* 106408 802E4B88 8E220000 */ lw $v0, ($s1) -/* 10640C 802E4B8C 8E300040 */ lw $s0, 0x40($s1) -/* 106410 802E4B90 34422000 */ ori $v0, $v0, 0x2000 -/* 106414 802E4B94 AE220000 */ sw $v0, ($s1) -/* 106418 802E4B98 0C04417A */ jal get_entity_by_index -/* 10641C 802E4B9C 92040000 */ lbu $a0, ($s0) -/* 106420 802E4BA0 92020009 */ lbu $v0, 9($s0) -/* 106424 802E4BA4 54400009 */ bnel $v0, $zero, .L802E4BCC -/* 106428 802E4BA8 A2000001 */ sb $zero, 1($s0) -/* 10642C 802E4BAC 3C013F80 */ lui $at, 0x3f80 -/* 106430 802E4BB0 44810000 */ mtc1 $at, $f0 -/* 106434 802E4BB4 24020001 */ addiu $v0, $zero, 1 -/* 106438 802E4BB8 A2020009 */ sb $v0, 9($s0) -/* 10643C 802E4BBC 24020002 */ addiu $v0, $zero, 2 -/* 106440 802E4BC0 A2020001 */ sb $v0, 1($s0) -/* 106444 802E4BC4 080B92F4 */ j .L802E4BD0 -/* 106448 802E4BC8 E6200054 */ swc1 $f0, 0x54($s1) -.L802E4BCC: -/* 10644C 802E4BCC AE200054 */ sw $zero, 0x54($s1) -.L802E4BD0: -/* 106450 802E4BD0 AE00000C */ sw $zero, 0xc($s0) -/* 106454 802E4BD4 AE000010 */ sw $zero, 0x10($s0) -/* 106458 802E4BD8 C6200054 */ lwc1 $f0, 0x54($s1) -/* 10645C 802E4BDC 0220202D */ daddu $a0, $s1, $zero -/* 106460 802E4BE0 AC800060 */ sw $zero, 0x60($a0) -/* 106464 802E4BE4 AC800064 */ sw $zero, 0x64($a0) -/* 106468 802E4BE8 AC800068 */ sw $zero, 0x68($a0) -/* 10646C 802E4BEC 46000086 */ mov.s $f2, $f0 -/* 106470 802E4BF0 E4800058 */ swc1 $f0, 0x58($a0) -/* 106474 802E4BF4 0C0B92C4 */ jal func_802E4B10 -/* 106478 802E4BF8 E482005C */ swc1 $f2, 0x5c($a0) -/* 10647C 802E4BFC 8FBF0018 */ lw $ra, 0x18($sp) -/* 106480 802E4C00 8FB10014 */ lw $s1, 0x14($sp) -/* 106484 802E4C04 8FB00010 */ lw $s0, 0x10($sp) -/* 106488 802E4C08 03E00008 */ jr $ra -/* 10648C 802E4C0C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_105F90/func_802E4DE0.s b/asm/nonmatchings/code_105F90/func_802E4DE0.s deleted file mode 100644 index 3087cfa1dd..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E4DE0.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E4DE0 -/* 106660 802E4DE0 8C820040 */ lw $v0, 0x40($a0) -/* 106664 802E4DE4 3C013F80 */ lui $at, 0x3f80 -/* 106668 802E4DE8 44810000 */ mtc1 $at, $f0 -/* 10666C 802E4DEC A0400001 */ sb $zero, 1($v0) -/* 106670 802E4DF0 E4800054 */ swc1 $f0, 0x54($a0) -/* 106674 802E4DF4 E4800058 */ swc1 $f0, 0x58($a0) -/* 106678 802E4DF8 E480005C */ swc1 $f0, 0x5c($a0) -/* 10667C 802E4DFC 03E00008 */ jr $ra -/* 106680 802E4E00 AC800068 */ sw $zero, 0x68($a0) diff --git a/asm/nonmatchings/code_105F90/func_802E5308.s b/asm/nonmatchings/code_105F90/func_802E5308.s deleted file mode 100644 index a435f68927..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E5308.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5308 -/* 106B88 802E5308 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106B8C 802E530C AFBF0010 */ sw $ra, 0x10($sp) -/* 106B90 802E5310 0C0B8D94 */ jal func_802E3650 -/* 106B94 802E5314 00000000 */ nop -/* 106B98 802E5318 8FBF0010 */ lw $ra, 0x10($sp) -/* 106B9C 802E531C 03E00008 */ jr $ra -/* 106BA0 802E5320 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E540C.s b/asm/nonmatchings/code_105F90/func_802E540C.s deleted file mode 100644 index c9a7f02a25..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E540C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E540C -/* 106C8C 802E540C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106C90 802E5410 AFBF0010 */ sw $ra, 0x10($sp) -/* 106C94 802E5414 0C0B92C4 */ jal func_802E4B10 -/* 106C98 802E5418 00000000 */ nop -/* 106C9C 802E541C 8FBF0010 */ lw $ra, 0x10($sp) -/* 106CA0 802E5420 03E00008 */ jr $ra -/* 106CA4 802E5424 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E5428.s b/asm/nonmatchings/code_105F90/func_802E5428.s deleted file mode 100644 index d12127acef..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E5428.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5428 -/* 106CA8 802E5428 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106CAC 802E542C AFB00010 */ sw $s0, 0x10($sp) -/* 106CB0 802E5430 AFBF0014 */ sw $ra, 0x14($sp) -/* 106CB4 802E5434 0C0B92D8 */ jal func_802E4B60 -/* 106CB8 802E5438 0080802D */ daddu $s0, $a0, $zero -/* 106CBC 802E543C 3C05802F */ lui $a1, %hi(D_802EA728) -/* 106CC0 802E5440 24A5A728 */ addiu $a1, $a1, %lo(D_802EA728) -/* 106CC4 802E5444 0C0442F3 */ jal func_80110BCC -/* 106CC8 802E5448 0200202D */ daddu $a0, $s0, $zero -/* 106CCC 802E544C 8FBF0014 */ lw $ra, 0x14($sp) -/* 106CD0 802E5450 8FB00010 */ lw $s0, 0x10($sp) -/* 106CD4 802E5454 03E00008 */ jr $ra -/* 106CD8 802E5458 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E545C.s b/asm/nonmatchings/code_105F90/func_802E545C.s deleted file mode 100644 index 6dd157daf3..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E545C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E545C -/* 106CDC 802E545C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106CE0 802E5460 AFB00010 */ sw $s0, 0x10($sp) -/* 106CE4 802E5464 0080802D */ daddu $s0, $a0, $zero -/* 106CE8 802E5468 AFBF0014 */ sw $ra, 0x14($sp) -/* 106CEC 802E546C 0C0B9304 */ jal func_802E4C10 -/* 106CF0 802E5470 0000282D */ daddu $a1, $zero, $zero -/* 106CF4 802E5474 0C0B94C9 */ jal func_802E5324 -/* 106CF8 802E5478 0200202D */ daddu $a0, $s0, $zero -/* 106CFC 802E547C 8FBF0014 */ lw $ra, 0x14($sp) -/* 106D00 802E5480 8FB00010 */ lw $s0, 0x10($sp) -/* 106D04 802E5484 03E00008 */ jr $ra -/* 106D08 802E5488 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E548C.s b/asm/nonmatchings/code_105F90/func_802E548C.s deleted file mode 100644 index c1bf15287b..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E548C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E548C -/* 106D0C 802E548C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106D10 802E5490 AFBF0010 */ sw $ra, 0x10($sp) -/* 106D14 802E5494 0C0B9381 */ jal func_802E4E04 -/* 106D18 802E5498 0000282D */ daddu $a1, $zero, $zero -/* 106D1C 802E549C 8FBF0010 */ lw $ra, 0x10($sp) -/* 106D20 802E54A0 03E00008 */ jr $ra -/* 106D24 802E54A4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E54A8.s b/asm/nonmatchings/code_105F90/func_802E54A8.s deleted file mode 100644 index cff23839c9..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E54A8.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E54A8 -/* 106D28 802E54A8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106D2C 802E54AC 3C05802F */ lui $a1, %hi(D_802EA760) -/* 106D30 802E54B0 24A5A760 */ addiu $a1, $a1, %lo(D_802EA760) -/* 106D34 802E54B4 AFBF0010 */ sw $ra, 0x10($sp) -/* 106D38 802E54B8 0C0442F3 */ jal func_80110BCC -/* 106D3C 802E54BC 00000000 */ nop -/* 106D40 802E54C0 8FBF0010 */ lw $ra, 0x10($sp) -/* 106D44 802E54C4 03E00008 */ jr $ra -/* 106D48 802E54C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E54CC.s b/asm/nonmatchings/code_105F90/func_802E54CC.s deleted file mode 100644 index fa64b9dc23..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E54CC.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E54CC -/* 106D4C 802E54CC 3C028011 */ lui $v0, %hi(gPlayerData+0x1C) -/* 106D50 802E54D0 9042F2AC */ lbu $v0, %lo(gPlayerData+0x1C)($v0) -/* 106D54 802E54D4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106D58 802E54D8 AFB00010 */ sw $s0, 0x10($sp) -/* 106D5C 802E54DC 0080802D */ daddu $s0, $a0, $zero -/* 106D60 802E54E0 14400018 */ bnez $v0, .L802E5544 -/* 106D64 802E54E4 AFBF0014 */ sw $ra, 0x14($sp) -/* 106D68 802E54E8 3C04F840 */ lui $a0, 0xf840 -/* 106D6C 802E54EC 0C05152F */ jal get_global_flag -/* 106D70 802E54F0 34845BE0 */ ori $a0, $a0, 0x5be0 -/* 106D74 802E54F4 14400013 */ bnez $v0, .L802E5544 -/* 106D78 802E54F8 3C04001D */ lui $a0, 0x1d -/* 106D7C 802E54FC 34840001 */ ori $a0, $a0, 1 -/* 106D80 802E5500 3C05802F */ lui $a1, %hi(D_802EB3C0) -/* 106D84 802E5504 24A5B3C0 */ addiu $a1, $a1, %lo(D_802EB3C0) -/* 106D88 802E5508 0C049640 */ jal load_string -/* 106D8C 802E550C ACA00000 */ sw $zero, ($a1) -/* 106D90 802E5510 0C009C22 */ jal func_80027088 -/* 106D94 802E5514 24040001 */ addiu $a0, $zero, 1 -/* 106D98 802E5518 3C03800A */ lui $v1, %hi(D_8009A650) -/* 106D9C 802E551C 2463A650 */ addiu $v1, $v1, %lo(D_8009A650) -/* 106DA0 802E5520 8C620000 */ lw $v0, ($v1) -/* 106DA4 802E5524 34420040 */ ori $v0, $v0, 0x40 -/* 106DA8 802E5528 0C03805E */ jal disable_player_input -/* 106DAC 802E552C AC620000 */ sw $v0, ($v1) -/* 106DB0 802E5530 3C04F840 */ lui $a0, 0xf840 -/* 106DB4 802E5534 0C051514 */ jal set_global_flag -/* 106DB8 802E5538 34845BE0 */ ori $a0, $a0, 0x5be0 -/* 106DBC 802E553C 080B9553 */ j .L802E554C -/* 106DC0 802E5540 00000000 */ nop -.L802E5544: -/* 106DC4 802E5544 0C043F5A */ jal func_8010FD68 -/* 106DC8 802E5548 0200202D */ daddu $a0, $s0, $zero -.L802E554C: -/* 106DCC 802E554C 8FBF0014 */ lw $ra, 0x14($sp) -/* 106DD0 802E5550 8FB00010 */ lw $s0, 0x10($sp) -/* 106DD4 802E5554 03E00008 */ jr $ra -/* 106DD8 802E5558 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E555C.s b/asm/nonmatchings/code_105F90/func_802E555C.s deleted file mode 100644 index 5189c5a036..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E555C.s +++ /dev/null @@ -1,24 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E555C -/* 106DDC 802E555C 3C02802F */ lui $v0, %hi(D_802EB3C0) -/* 106DE0 802E5560 8C42B3C0 */ lw $v0, %lo(D_802EB3C0)($v0) -/* 106DE4 802E5564 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106DE8 802E5568 1040000C */ beqz $v0, .L802E559C -/* 106DEC 802E556C AFBF0010 */ sw $ra, 0x10($sp) -/* 106DF0 802E5570 0C043F5A */ jal func_8010FD68 -/* 106DF4 802E5574 00000000 */ nop -/* 106DF8 802E5578 0C009C22 */ jal func_80027088 -/* 106DFC 802E557C 0000202D */ daddu $a0, $zero, $zero -/* 106E00 802E5580 3C02800A */ lui $v0, %hi(D_8009A650) -/* 106E04 802E5584 2442A650 */ addiu $v0, $v0, %lo(D_8009A650) -/* 106E08 802E5588 8C430000 */ lw $v1, ($v0) -/* 106E0C 802E558C 2404FFBF */ addiu $a0, $zero, -0x41 -/* 106E10 802E5590 00641824 */ and $v1, $v1, $a0 -/* 106E14 802E5594 0C038069 */ jal enable_player_input -/* 106E18 802E5598 AC430000 */ sw $v1, ($v0) -.L802E559C: -/* 106E1C 802E559C 8FBF0010 */ lw $ra, 0x10($sp) -/* 106E20 802E55A0 03E00008 */ jr $ra -/* 106E24 802E55A4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_105F90/func_802E55A8.s b/asm/nonmatchings/code_105F90/func_802E55A8.s deleted file mode 100644 index 55682ea61a..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E55A8.s +++ /dev/null @@ -1,46 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E55A8 -/* 106E28 802E55A8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 106E2C 802E55AC AFB00018 */ sw $s0, 0x18($sp) -/* 106E30 802E55B0 0080802D */ daddu $s0, $a0, $zero -/* 106E34 802E55B4 AFB1001C */ sw $s1, 0x1c($sp) -/* 106E38 802E55B8 AFB20020 */ sw $s2, 0x20($sp) -/* 106E3C 802E55BC 3C128016 */ lui $s2, %hi(D_8015C7D0) -/* 106E40 802E55C0 8E52C7D0 */ lw $s2, %lo(D_8015C7D0)($s2) -/* 106E44 802E55C4 AFBF0024 */ sw $ra, 0x24($sp) -/* 106E48 802E55C8 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 106E4C 802E55CC 00A0882D */ daddu $s1, $a1, $zero -/* 106E50 802E55D0 0220202D */ daddu $a0, $s1, $zero -/* 106E54 802E55D4 C6000048 */ lwc1 $f0, 0x48($s0) -/* 106E58 802E55D8 C602004C */ lwc1 $f2, 0x4c($s0) -/* 106E5C 802E55DC C6040050 */ lwc1 $f4, 0x50($s0) -/* 106E60 802E55E0 3C028000 */ lui $v0, 0x8000 -/* 106E64 802E55E4 AFA00010 */ sw $zero, 0x10($sp) -/* 106E68 802E55E8 4600018D */ trunc.w.s $f6, $f0 -/* 106E6C 802E55EC 44053000 */ mfc1 $a1, $f6 -/* 106E70 802E55F0 4600118D */ trunc.w.s $f6, $f2 -/* 106E74 802E55F4 44063000 */ mfc1 $a2, $f6 -/* 106E78 802E55F8 4600218D */ trunc.w.s $f6, $f4 -/* 106E7C 802E55FC 44073000 */ mfc1 $a3, $f6 -/* 106E80 802E5600 0C044631 */ jal create_entity -/* 106E84 802E5604 AFA20014 */ sw $v0, 0x14($sp) -/* 106E88 802E5608 0C04417A */ jal get_entity_by_index -/* 106E8C 802E560C 0040202D */ daddu $a0, $v0, $zero -/* 106E90 802E5610 8C430040 */ lw $v1, 0x40($v0) -/* 106E94 802E5614 92020004 */ lbu $v0, 4($s0) -/* 106E98 802E5618 16400003 */ bnez $s2, .L802E5628 -/* 106E9C 802E561C A0620000 */ sb $v0, ($v1) -/* 106EA0 802E5620 080B958B */ j .L802E562C -/* 106EA4 802E5624 24020003 */ addiu $v0, $zero, 3 -.L802E5628: -/* 106EA8 802E5628 24020006 */ addiu $v0, $zero, 6 -.L802E562C: -/* 106EAC 802E562C A062000A */ sb $v0, 0xa($v1) -/* 106EB0 802E5630 8FBF0024 */ lw $ra, 0x24($sp) -/* 106EB4 802E5634 8FB20020 */ lw $s2, 0x20($sp) -/* 106EB8 802E5638 8FB1001C */ lw $s1, 0x1c($sp) -/* 106EBC 802E563C 8FB00018 */ lw $s0, 0x18($sp) -/* 106EC0 802E5640 03E00008 */ jr $ra -/* 106EC4 802E5644 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_105F90/func_802E5648.s b/asm/nonmatchings/code_105F90/func_802E5648.s deleted file mode 100644 index fa007fbc1f..0000000000 --- a/asm/nonmatchings/code_105F90/func_802E5648.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5648 -/* 106EC8 802E5648 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106ECC 802E564C 3C05802F */ lui $a1, %hi(D_802EA7BC) -/* 106ED0 802E5650 24A5A7BC */ addiu $a1, $a1, %lo(D_802EA7BC) -/* 106ED4 802E5654 AFBF0010 */ sw $ra, 0x10($sp) -/* 106ED8 802E5658 0C0B956A */ jal func_802E55A8 -/* 106EDC 802E565C 00000000 */ nop -/* 106EE0 802E5660 8FBF0010 */ lw $ra, 0x10($sp) -/* 106EE4 802E5664 03E00008 */ jr $ra -/* 106EE8 802E5668 27BD0018 */ addiu $sp, $sp, 0x18 -/* 106EEC 802E566C 00000000 */ nop diff --git a/asm/nonmatchings/code_1060_len_310/func_80025CC0.s b/asm/nonmatchings/code_1060_len_310/func_80025CC0.s deleted file mode 100644 index 3936f75df9..0000000000 --- a/asm/nonmatchings/code_1060_len_310/func_80025CC0.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80025CC0 -/* 10C0 80025CC0 AFA40000 */ sw $a0, ($sp) -/* 10C4 80025CC4 AFA50004 */ sw $a1, 4($sp) -/* 10C8 80025CC8 AFA60008 */ sw $a2, 8($sp) -/* 10CC 80025CCC AFA7000C */ sw $a3, 0xc($sp) -/* 10D0 80025CD0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10D4 80025CD4 0080302D */ daddu $a2, $a0, $zero -/* 10D8 80025CD8 3C048002 */ lui $a0, %hi(func_80025D74) -/* 10DC 80025CDC 24845D74 */ addiu $a0, $a0, %lo(func_80025D74) -/* 10E0 80025CE0 0000282D */ daddu $a1, $zero, $zero -/* 10E4 80025CE4 AFBF0010 */ sw $ra, 0x10($sp) -/* 10E8 80025CE8 0C0192A8 */ jal _Printf -/* 10EC 80025CEC 27A7001C */ addiu $a3, $sp, 0x1c -/* 10F0 80025CF0 8FBF0010 */ lw $ra, 0x10($sp) -/* 10F4 80025CF4 03E00008 */ jr $ra -/* 10F8 80025CF8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1060_len_310/func_80025CFC.s b/asm/nonmatchings/code_1060_len_310/func_80025CFC.s deleted file mode 100644 index a01264ce6d..0000000000 --- a/asm/nonmatchings/code_1060_len_310/func_80025CFC.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80025CFC -/* 10FC 80025CFC AFA40000 */ sw $a0, ($sp) -/* 1100 80025D00 AFA50004 */ sw $a1, 4($sp) -/* 1104 80025D04 AFA60008 */ sw $a2, 8($sp) -/* 1108 80025D08 AFA7000C */ sw $a3, 0xc($sp) -/* 110C 80025D0C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1110 80025D10 0080302D */ daddu $a2, $a0, $zero -/* 1114 80025D14 3C048002 */ lui $a0, %hi(func_80025D74) -/* 1118 80025D18 24845D74 */ addiu $a0, $a0, %lo(func_80025D74) -/* 111C 80025D1C 0000282D */ daddu $a1, $zero, $zero -/* 1120 80025D20 AFBF0010 */ sw $ra, 0x10($sp) -/* 1124 80025D24 0C0192A8 */ jal _Printf -/* 1128 80025D28 27A7001C */ addiu $a3, $sp, 0x1c -/* 112C 80025D2C 8FBF0010 */ lw $ra, 0x10($sp) -/* 1130 80025D30 03E00008 */ jr $ra -/* 1134 80025D34 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1060_len_310/func_80025D38.s b/asm/nonmatchings/code_1060_len_310/func_80025D38.s deleted file mode 100644 index 81be205538..0000000000 --- a/asm/nonmatchings/code_1060_len_310/func_80025D38.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80025D38 -/* 1138 80025D38 AFA40000 */ sw $a0, ($sp) -/* 113C 80025D3C AFA50004 */ sw $a1, 4($sp) -/* 1140 80025D40 AFA60008 */ sw $a2, 8($sp) -/* 1144 80025D44 AFA7000C */ sw $a3, 0xc($sp) -/* 1148 80025D48 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 114C 80025D4C 0080302D */ daddu $a2, $a0, $zero -/* 1150 80025D50 3C048002 */ lui $a0, %hi(func_80025D74) -/* 1154 80025D54 24845D74 */ addiu $a0, $a0, %lo(func_80025D74) -/* 1158 80025D58 0000282D */ daddu $a1, $zero, $zero -/* 115C 80025D5C AFBF0010 */ sw $ra, 0x10($sp) -/* 1160 80025D60 0C0192A8 */ jal _Printf -/* 1164 80025D64 27A7001C */ addiu $a3, $sp, 0x1c -/* 1168 80025D68 8FBF0010 */ lw $ra, 0x10($sp) -/* 116C 80025D6C 03E00008 */ jr $ra -/* 1170 80025D70 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1060_len_310/func_80025D74.s b/asm/nonmatchings/code_1060_len_310/func_80025D74.s deleted file mode 100644 index ac017a4851..0000000000 --- a/asm/nonmatchings/code_1060_len_310/func_80025D74.s +++ /dev/null @@ -1,126 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80025D74 -/* 1174 80025D74 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 1178 80025D78 AFB30024 */ sw $s3, 0x24($sp) -/* 117C 80025D7C 00A0982D */ daddu $s3, $a1, $zero -/* 1180 80025D80 AFB40028 */ sw $s4, 0x28($sp) -/* 1184 80025D84 00C0A02D */ daddu $s4, $a2, $zero -/* 1188 80025D88 3C05B3FF */ lui $a1, 0xb3ff -/* 118C 80025D8C AFB1001C */ sw $s1, 0x1c($sp) -/* 1190 80025D90 3C11800A */ lui $s1, %hi(carthandle) -/* 1194 80025D94 2631A638 */ addiu $s1, $s1, %lo(carthandle) -/* 1198 80025D98 AFB00018 */ sw $s0, 0x18($sp) -/* 119C 80025D9C 27B00010 */ addiu $s0, $sp, 0x10 -/* 11A0 80025DA0 AFBF003C */ sw $ra, 0x3c($sp) -/* 11A4 80025DA4 AFBE0038 */ sw $fp, 0x38($sp) -/* 11A8 80025DA8 AFB70034 */ sw $s7, 0x34($sp) -/* 11AC 80025DAC AFB60030 */ sw $s6, 0x30($sp) -/* 11B0 80025DB0 AFB5002C */ sw $s5, 0x2c($sp) -/* 11B4 80025DB4 AFB20020 */ sw $s2, 0x20($sp) -/* 11B8 80025DB8 8E240000 */ lw $a0, ($s1) -/* 11BC 80025DBC 0C018370 */ jal osEPiReadIo -/* 11C0 80025DC0 0200302D */ daddu $a2, $s0, $zero -/* 11C4 80025DC4 3C034953 */ lui $v1, 0x4953 -/* 11C8 80025DC8 8FA20010 */ lw $v0, 0x10($sp) -/* 11CC 80025DCC 34633634 */ ori $v1, $v1, 0x3634 -/* 11D0 80025DD0 14430050 */ bne $v0, $v1, .L80025F14 -/* 11D4 80025DD4 24020001 */ addiu $v0, $zero, 1 -/* 11D8 80025DD8 3C05B3FF */ lui $a1, 0xb3ff -/* 11DC 80025DDC 34A50004 */ ori $a1, $a1, 4 -/* 11E0 80025DE0 8E240000 */ lw $a0, ($s1) -/* 11E4 80025DE4 0C018370 */ jal osEPiReadIo -/* 11E8 80025DE8 0200302D */ daddu $a2, $s0, $zero -/* 11EC 80025DEC 3C05B3FF */ lui $a1, 0xb3ff -/* 11F0 80025DF0 0200302D */ daddu $a2, $s0, $zero -/* 11F4 80025DF4 8E240000 */ lw $a0, ($s1) -/* 11F8 80025DF8 8FB00010 */ lw $s0, 0x10($sp) -/* 11FC 80025DFC 0C018370 */ jal osEPiReadIo -/* 1200 80025E00 34A50014 */ ori $a1, $a1, 0x14 -/* 1204 80025E04 8FB20010 */ lw $s2, 0x10($sp) -/* 1208 80025E08 3402FFDF */ ori $v0, $zero, 0xffdf -/* 120C 80025E0C 02541821 */ addu $v1, $s2, $s4 -/* 1210 80025E10 0043102A */ slt $v0, $v0, $v1 -/* 1214 80025E14 1040000B */ beqz $v0, .L80025E44 -/* 1218 80025E18 3C02FFFF */ lui $v0, 0xffff -/* 121C 80025E1C 34420020 */ ori $v0, $v0, 0x20 -/* 1220 80025E20 00621821 */ addu $v1, $v1, $v0 -/* 1224 80025E24 0203102A */ slt $v0, $s0, $v1 -/* 1228 80025E28 1440003A */ bnez $v0, .L80025F14 -/* 122C 80025E2C 24020001 */ addiu $v0, $zero, 1 -/* 1230 80025E30 0250102A */ slt $v0, $s2, $s0 -/* 1234 80025E34 10400008 */ beqz $v0, .L80025E58 -/* 1238 80025E38 24020001 */ addiu $v0, $zero, 1 -/* 123C 80025E3C 080097C5 */ j .L80025F14 -/* 1240 80025E40 00000000 */ nop -.L80025E44: -/* 1244 80025E44 0250102A */ slt $v0, $s2, $s0 -/* 1248 80025E48 10400003 */ beqz $v0, .L80025E58 -/* 124C 80025E4C 0203102A */ slt $v0, $s0, $v1 -/* 1250 80025E50 14400030 */ bnez $v0, .L80025F14 -/* 1254 80025E54 24020001 */ addiu $v0, $zero, 1 -.L80025E58: -/* 1258 80025E58 12800027 */ beqz $s4, .L80025EF8 -/* 125C 80025E5C 3C1E0FFF */ lui $fp, 0xfff -/* 1260 80025E60 37DEFFFC */ ori $fp, $fp, 0xfffc -/* 1264 80025E64 3C17B3FF */ lui $s7, 0xb3ff -/* 1268 80025E68 36F70020 */ ori $s7, $s7, 0x20 -/* 126C 80025E6C 3C15800A */ lui $s5, %hi(carthandle) -/* 1270 80025E70 26B5A638 */ addiu $s5, $s5, %lo(carthandle) -/* 1274 80025E74 3C16FFFF */ lui $s6, 0xffff -/* 1278 80025E78 36D60020 */ ori $s6, $s6, 0x20 -.L80025E7C: -/* 127C 80025E7C 92620000 */ lbu $v0, ($s3) -/* 1280 80025E80 1040001A */ beqz $v0, .L80025EEC -/* 1284 80025E84 025E8824 */ and $s1, $s2, $fp -/* 1288 80025E88 02378821 */ addu $s1, $s1, $s7 -/* 128C 80025E8C 0220282D */ daddu $a1, $s1, $zero -/* 1290 80025E90 27A60010 */ addiu $a2, $sp, 0x10 -/* 1294 80025E94 32500003 */ andi $s0, $s2, 3 -/* 1298 80025E98 26520001 */ addiu $s2, $s2, 1 -/* 129C 80025E9C 24070003 */ addiu $a3, $zero, 3 -/* 12A0 80025EA0 00F08023 */ subu $s0, $a3, $s0 -/* 12A4 80025EA4 8EA40000 */ lw $a0, ($s5) -/* 12A8 80025EA8 0C018370 */ jal osEPiReadIo -/* 12AC 80025EAC 00F08004 */ sllv $s0, $s0, $a3 -/* 12B0 80025EB0 0220282D */ daddu $a1, $s1, $zero -/* 12B4 80025EB4 240700FF */ addiu $a3, $zero, 0xff -/* 12B8 80025EB8 02071004 */ sllv $v0, $a3, $s0 -/* 12BC 80025EBC 00021027 */ nor $v0, $zero, $v0 -/* 12C0 80025EC0 8EA40000 */ lw $a0, ($s5) -/* 12C4 80025EC4 8FA30010 */ lw $v1, 0x10($sp) -/* 12C8 80025EC8 92660000 */ lbu $a2, ($s3) -/* 12CC 80025ECC 00621824 */ and $v1, $v1, $v0 -/* 12D0 80025ED0 02063004 */ sllv $a2, $a2, $s0 -/* 12D4 80025ED4 0C018358 */ jal osEPiWriteIo -/* 12D8 80025ED8 00663025 */ or $a2, $v1, $a2 -/* 12DC 80025EDC 3407FFDF */ ori $a3, $zero, 0xffdf -/* 12E0 80025EE0 00F2102A */ slt $v0, $a3, $s2 -/* 12E4 80025EE4 54400001 */ bnel $v0, $zero, .L80025EEC -/* 12E8 80025EE8 02569021 */ addu $s2, $s2, $s6 -.L80025EEC: -/* 12EC 80025EEC 2694FFFF */ addiu $s4, $s4, -1 -/* 12F0 80025EF0 1680FFE2 */ bnez $s4, .L80025E7C -/* 12F4 80025EF4 26730001 */ addiu $s3, $s3, 1 -.L80025EF8: -/* 12F8 80025EF8 3C04800A */ lui $a0, %hi(carthandle) -/* 12FC 80025EFC 8C84A638 */ lw $a0, %lo(carthandle)($a0) -/* 1300 80025F00 3C05B3FF */ lui $a1, 0xb3ff -/* 1304 80025F04 34A50014 */ ori $a1, $a1, 0x14 -/* 1308 80025F08 0C018358 */ jal osEPiWriteIo -/* 130C 80025F0C 0240302D */ daddu $a2, $s2, $zero -/* 1310 80025F10 24020001 */ addiu $v0, $zero, 1 -.L80025F14: -/* 1314 80025F14 8FBF003C */ lw $ra, 0x3c($sp) -/* 1318 80025F18 8FBE0038 */ lw $fp, 0x38($sp) -/* 131C 80025F1C 8FB70034 */ lw $s7, 0x34($sp) -/* 1320 80025F20 8FB60030 */ lw $s6, 0x30($sp) -/* 1324 80025F24 8FB5002C */ lw $s5, 0x2c($sp) -/* 1328 80025F28 8FB40028 */ lw $s4, 0x28($sp) -/* 132C 80025F2C 8FB30024 */ lw $s3, 0x24($sp) -/* 1330 80025F30 8FB20020 */ lw $s2, 0x20($sp) -/* 1334 80025F34 8FB1001C */ lw $s1, 0x1c($sp) -/* 1338 80025F38 8FB00018 */ lw $s0, 0x18($sp) -/* 133C 80025F3C 03E00008 */ jr $ra -/* 1340 80025F40 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/nonmatchings/code_1060_len_310/func_80025F44.s b/asm/nonmatchings/code_1060_len_310/func_80025F44.s deleted file mode 100644 index b51f3b3b1a..0000000000 --- a/asm/nonmatchings/code_1060_len_310/func_80025F44.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80025F44 -/* 1344 80025F44 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1348 80025F48 AFBF0010 */ sw $ra, 0x10($sp) -/* 134C 80025F4C 0080382D */ daddu $a3, $a0, $zero -/* 1350 80025F50 3C048009 */ lui $a0, %hi(D_80097D30) -/* 1354 80025F54 24847D30 */ addiu $a0, $a0, %lo(D_80097D30) -/* 1358 80025F58 0C00973F */ jal func_80025CFC -/* 135C 80025F5C 00000000 */ nop -.L80025F60: -/* 1360 80025F60 080097D8 */ j .L80025F60 -/* 1364 80025F64 00000000 */ nop -/* 1368 80025F68 00000000 */ nop -/* 136C 80025F6C 00000000 */ nop diff --git a/asm/nonmatchings/code_106EF0/func_802E5670.s b/asm/nonmatchings/code_106EF0/func_802E5670.s deleted file mode 100644 index 617a71094f..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5670.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5670 -/* 106EF0 802E5670 948200D0 */ lhu $v0, 0xd0($a0) -/* 106EF4 802E5674 00451023 */ subu $v0, $v0, $a1 -/* 106EF8 802E5678 04420001 */ bltzl $v0, .L802E5680 -/* 106EFC 802E567C 24420014 */ addiu $v0, $v0, 0x14 -.L802E5680: -/* 106F00 802E5680 00021080 */ sll $v0, $v0, 2 -/* 106F04 802E5684 00821021 */ addu $v0, $a0, $v0 -/* 106F08 802E5688 03E00008 */ jr $ra -/* 106F0C 802E568C C44000D4 */ lwc1 $f0, 0xd4($v0) diff --git a/asm/nonmatchings/code_106EF0/func_802E5690.s b/asm/nonmatchings/code_106EF0/func_802E5690.s deleted file mode 100644 index 22aaf5c254..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5690.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5690 -/* 106F10 802E5690 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106F14 802E5694 AFBF0010 */ sw $ra, 0x10($sp) -/* 106F18 802E5698 0C04417A */ jal get_entity_by_index -/* 106F1C 802E569C 00000000 */ nop -/* 106F20 802E56A0 8C420040 */ lw $v0, 0x40($v0) -/* 106F24 802E56A4 84440012 */ lh $a0, 0x12($v0) -/* 106F28 802E56A8 04800006 */ bltz $a0, .L802E56C4 -/* 106F2C 802E56AC 00000000 */ nop -/* 106F30 802E56B0 0C04417A */ jal get_entity_by_index -/* 106F34 802E56B4 00000000 */ nop -/* 106F38 802E56B8 8C430040 */ lw $v1, 0x40($v0) -/* 106F3C 802E56BC 24020001 */ addiu $v0, $zero, 1 -/* 106F40 802E56C0 A062000A */ sb $v0, 0xa($v1) -.L802E56C4: -/* 106F44 802E56C4 8FBF0010 */ lw $ra, 0x10($sp) -/* 106F48 802E56C8 03E00008 */ jr $ra -/* 106F4C 802E56CC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_106EF0/func_802E56D0.s b/asm/nonmatchings/code_106EF0/func_802E56D0.s deleted file mode 100644 index 1beb1d1f3c..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E56D0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E56D0 -/* 106F50 802E56D0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 106F54 802E56D4 AFBF0010 */ sw $ra, 0x10($sp) -/* 106F58 802E56D8 0C0B8D94 */ jal func_802E3650 -/* 106F5C 802E56DC 00000000 */ nop -/* 106F60 802E56E0 8FBF0010 */ lw $ra, 0x10($sp) -/* 106F64 802E56E4 03E00008 */ jr $ra -/* 106F68 802E56E8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_106EF0/func_802E56EC.s b/asm/nonmatchings/code_106EF0/func_802E56EC.s deleted file mode 100644 index bdf1994fbc..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E56EC.s +++ /dev/null @@ -1,45 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E56EC -/* 106F6C 802E56EC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 106F70 802E56F0 AFB1001C */ sw $s1, 0x1c($sp) -/* 106F74 802E56F4 0080882D */ daddu $s1, $a0, $zero -/* 106F78 802E56F8 AFBF0020 */ sw $ra, 0x20($sp) -/* 106F7C 802E56FC AFB00018 */ sw $s0, 0x18($sp) -/* 106F80 802E5700 8E300040 */ lw $s0, 0x40($s1) -/* 106F84 802E5704 9603000A */ lhu $v1, 0xa($s0) -/* 106F88 802E5708 3402FFFF */ ori $v0, $zero, 0xffff -/* 106F8C 802E570C 1062001A */ beq $v1, $v0, .L802E5778 -/* 106F90 802E5710 00000000 */ nop -/* 106F94 802E5714 0C05152F */ jal get_global_flag -/* 106F98 802E5718 0060202D */ daddu $a0, $v1, $zero -/* 106F9C 802E571C 14400016 */ bnez $v0, .L802E5778 -/* 106FA0 802E5720 3C028000 */ lui $v0, 0x8000 -/* 106FA4 802E5724 3C04802F */ lui $a0, %hi(D_802EA934) -/* 106FA8 802E5728 2484A934 */ addiu $a0, $a0, %lo(D_802EA934) -/* 106FAC 802E572C C6200048 */ lwc1 $f0, 0x48($s1) -/* 106FB0 802E5730 C622004C */ lwc1 $f2, 0x4c($s1) -/* 106FB4 802E5734 C6240050 */ lwc1 $f4, 0x50($s1) -/* 106FB8 802E5738 AFA00010 */ sw $zero, 0x10($sp) -/* 106FBC 802E573C 4600018D */ trunc.w.s $f6, $f0 -/* 106FC0 802E5740 44053000 */ mfc1 $a1, $f6 -/* 106FC4 802E5744 4600118D */ trunc.w.s $f6, $f2 -/* 106FC8 802E5748 44063000 */ mfc1 $a2, $f6 -/* 106FCC 802E574C 4600218D */ trunc.w.s $f6, $f4 -/* 106FD0 802E5750 44073000 */ mfc1 $a3, $f6 -/* 106FD4 802E5754 0C044631 */ jal create_entity -/* 106FD8 802E5758 AFA20014 */ sw $v0, 0x14($sp) -/* 106FDC 802E575C 00022400 */ sll $a0, $v0, 0x10 -/* 106FE0 802E5760 00042403 */ sra $a0, $a0, 0x10 -/* 106FE4 802E5764 0C04417A */ jal get_entity_by_index -/* 106FE8 802E5768 A6020012 */ sh $v0, 0x12($s0) -/* 106FEC 802E576C 8C430040 */ lw $v1, 0x40($v0) -/* 106FF0 802E5770 92220004 */ lbu $v0, 4($s1) -/* 106FF4 802E5774 A0620000 */ sb $v0, ($v1) -.L802E5778: -/* 106FF8 802E5778 8FBF0020 */ lw $ra, 0x20($sp) -/* 106FFC 802E577C 8FB1001C */ lw $s1, 0x1c($sp) -/* 107000 802E5780 8FB00018 */ lw $s0, 0x18($sp) -/* 107004 802E5784 03E00008 */ jr $ra -/* 107008 802E5788 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_106EF0/func_802E578C.s b/asm/nonmatchings/code_106EF0/func_802E578C.s deleted file mode 100644 index 0a51cbb207..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E578C.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E578C -/* 10700C 802E578C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 107010 802E5790 AFB00010 */ sw $s0, 0x10($sp) -/* 107014 802E5794 0080802D */ daddu $s0, $a0, $zero -/* 107018 802E5798 AFBF0018 */ sw $ra, 0x18($sp) -/* 10701C 802E579C AFB10014 */ sw $s1, 0x14($sp) -/* 107020 802E57A0 0C0B8DB9 */ jal entity_init_Hammer23Block_normal -/* 107024 802E57A4 8E110040 */ lw $s1, 0x40($s0) -/* 107028 802E57A8 C6000064 */ lwc1 $f0, 0x64($s0) -/* 10702C 802E57AC 3C014334 */ lui $at, 0x4334 -/* 107030 802E57B0 44811000 */ mtc1 $at, $f2 -/* 107034 802E57B4 00000000 */ nop -/* 107038 802E57B8 46020000 */ add.s $f0, $f0, $f2 -/* 10703C 802E57BC 3402FFFF */ ori $v0, $zero, 0xffff -/* 107040 802E57C0 E6000064 */ swc1 $f0, 0x64($s0) -/* 107044 802E57C4 A622000A */ sh $v0, 0xa($s1) -/* 107048 802E57C8 2402FFFF */ addiu $v0, $zero, -1 -/* 10704C 802E57CC A6220012 */ sh $v0, 0x12($s1) -/* 107050 802E57D0 8FBF0018 */ lw $ra, 0x18($sp) -/* 107054 802E57D4 8FB10014 */ lw $s1, 0x14($sp) -/* 107058 802E57D8 8FB00010 */ lw $s0, 0x10($sp) -/* 10705C 802E57DC 03E00008 */ jr $ra -/* 107060 802E57E0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_106EF0/func_802E57E4.s b/asm/nonmatchings/code_106EF0/func_802E57E4.s deleted file mode 100644 index 572ad6328e..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E57E4.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E57E4 -/* 107064 802E57E4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 107068 802E57E8 AFBF0010 */ sw $ra, 0x10($sp) -/* 10706C 802E57EC 0C0B95E3 */ jal func_802E578C -/* 107070 802E57F0 00000000 */ nop -/* 107074 802E57F4 8FBF0010 */ lw $ra, 0x10($sp) -/* 107078 802E57F8 03E00008 */ jr $ra -/* 10707C 802E57FC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_106EF0/func_802E5800.s b/asm/nonmatchings/code_106EF0/func_802E5800.s deleted file mode 100644 index d308b3cf3b..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5800.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5800 -/* 107080 802E5800 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 107084 802E5804 AFBF0010 */ sw $ra, 0x10($sp) -/* 107088 802E5808 0C0B95E3 */ jal func_802E578C -/* 10708C 802E580C 00000000 */ nop -/* 107090 802E5810 8FBF0010 */ lw $ra, 0x10($sp) -/* 107094 802E5814 03E00008 */ jr $ra -/* 107098 802E5818 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_106EF0/func_802E581C.s b/asm/nonmatchings/code_106EF0/func_802E581C.s deleted file mode 100644 index 739c0c178a..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E581C.s +++ /dev/null @@ -1,24 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E581C -/* 10709C 802E581C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1070A0 802E5820 AFB00010 */ sw $s0, 0x10($sp) -/* 1070A4 802E5824 0080802D */ daddu $s0, $a0, $zero -/* 1070A8 802E5828 AFBF0014 */ sw $ra, 0x14($sp) -/* 1070AC 802E582C 8E020040 */ lw $v0, 0x40($s0) -/* 1070B0 802E5830 0C04417A */ jal get_entity_by_index -/* 1070B4 802E5834 90440000 */ lbu $a0, ($v0) -/* 1070B8 802E5838 C4400048 */ lwc1 $f0, 0x48($v0) -/* 1070BC 802E583C 3C014160 */ lui $at, 0x4160 -/* 1070C0 802E5840 44811000 */ mtc1 $at, $f2 -/* 1070C4 802E5844 E6000048 */ swc1 $f0, 0x48($s0) -/* 1070C8 802E5848 C440004C */ lwc1 $f0, 0x4c($v0) -/* 1070CC 802E584C 46020000 */ add.s $f0, $f0, $f2 -/* 1070D0 802E5850 E600004C */ swc1 $f0, 0x4c($s0) -/* 1070D4 802E5854 C4400050 */ lwc1 $f0, 0x50($v0) -/* 1070D8 802E5858 E6000050 */ swc1 $f0, 0x50($s0) -/* 1070DC 802E585C 8FBF0014 */ lw $ra, 0x14($sp) -/* 1070E0 802E5860 8FB00010 */ lw $s0, 0x10($sp) -/* 1070E4 802E5864 03E00008 */ jr $ra -/* 1070E8 802E5868 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_106EF0/func_802E5E50.s b/asm/nonmatchings/code_106EF0/func_802E5E50.s deleted file mode 100644 index 19243ca3aa..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5E50.s +++ /dev/null @@ -1,71 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5E50 -/* 1076D0 802E5E50 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 1076D4 802E5E54 AFB10024 */ sw $s1, 0x24($sp) -/* 1076D8 802E5E58 0080882D */ daddu $s1, $a0, $zero -/* 1076DC 802E5E5C AFBF0028 */ sw $ra, 0x28($sp) -/* 1076E0 802E5E60 AFB00020 */ sw $s0, 0x20($sp) -/* 1076E4 802E5E64 0C0B9607 */ jal func_802E581C -/* 1076E8 802E5E68 8E300040 */ lw $s0, 0x40($s1) -/* 1076EC 802E5E6C 9202000A */ lbu $v0, 0xa($s0) -/* 1076F0 802E5E70 54400001 */ bnel $v0, $zero, .L802E5E78 -/* 1076F4 802E5E74 AE20003C */ sw $zero, 0x3c($s1) -.L802E5E78: -/* 1076F8 802E5E78 C62C0064 */ lwc1 $f12, 0x64($s1) -/* 1076FC 802E5E7C 3C014008 */ lui $at, 0x4008 -/* 107700 802E5E80 44810800 */ mtc1 $at, $f1 -/* 107704 802E5E84 44800000 */ mtc1 $zero, $f0 -/* 107708 802E5E88 46006321 */ cvt.d.s $f12, $f12 -/* 10770C 802E5E8C 46206300 */ add.d $f12, $f12, $f0 -/* 107710 802E5E90 0C00A6C9 */ jal clamp_angle -/* 107714 802E5E94 46206320 */ cvt.s.d $f12, $f12 -/* 107718 802E5E98 E6200064 */ swc1 $f0, 0x64($s1) -/* 10771C 802E5E9C 960200D0 */ lhu $v0, 0xd0($s0) -/* 107720 802E5EA0 00021080 */ sll $v0, $v0, 2 -/* 107724 802E5EA4 02021021 */ addu $v0, $s0, $v0 -/* 107728 802E5EA8 E44000D4 */ swc1 $f0, 0xd4($v0) -/* 10772C 802E5EAC 960200D0 */ lhu $v0, 0xd0($s0) -/* 107730 802E5EB0 24420001 */ addiu $v0, $v0, 1 -/* 107734 802E5EB4 A60200D0 */ sh $v0, 0xd0($s0) -/* 107738 802E5EB8 3042FFFF */ andi $v0, $v0, 0xffff -/* 10773C 802E5EBC 2C420015 */ sltiu $v0, $v0, 0x15 -/* 107740 802E5EC0 50400001 */ beql $v0, $zero, .L802E5EC8 -/* 107744 802E5EC4 A60000D0 */ sh $zero, 0xd0($s0) -.L802E5EC8: -/* 107748 802E5EC8 9202000A */ lbu $v0, 0xa($s0) -/* 10774C 802E5ECC 1440001B */ bnez $v0, .L802E5F3C -/* 107750 802E5ED0 00000000 */ nop -/* 107754 802E5ED4 3C02800A */ lui $v0, %hi(D_8009A650) -/* 107758 802E5ED8 8C42A650 */ lw $v0, %lo(D_8009A650)($v0) -/* 10775C 802E5EDC 14400017 */ bnez $v0, .L802E5F3C -/* 107760 802E5EE0 00000000 */ nop -/* 107764 802E5EE4 92020002 */ lbu $v0, 2($s0) -/* 107768 802E5EE8 2442FFFF */ addiu $v0, $v0, -1 -/* 10776C 802E5EEC A2020002 */ sb $v0, 2($s0) -/* 107770 802E5EF0 00021600 */ sll $v0, $v0, 0x18 -/* 107774 802E5EF4 1C400011 */ bgtz $v0, .L802E5F3C -/* 107778 802E5EF8 24020032 */ addiu $v0, $zero, 0x32 -/* 10777C 802E5EFC 3C0141B0 */ lui $at, 0x41b0 -/* 107780 802E5F00 44810000 */ mtc1 $at, $f0 -/* 107784 802E5F04 3C014100 */ lui $at, 0x4100 -/* 107788 802E5F08 44811000 */ mtc1 $at, $f2 -/* 10778C 802E5F0C A2020002 */ sb $v0, 2($s0) -/* 107790 802E5F10 24020004 */ addiu $v0, $zero, 4 -/* 107794 802E5F14 AFA20018 */ sw $v0, 0x18($sp) -/* 107798 802E5F18 24020014 */ addiu $v0, $zero, 0x14 -/* 10779C 802E5F1C AFA2001C */ sw $v0, 0x1c($sp) -/* 1077A0 802E5F20 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1077A4 802E5F24 E7A20014 */ swc1 $f2, 0x14($sp) -/* 1077A8 802E5F28 8E250048 */ lw $a1, 0x48($s1) -/* 1077AC 802E5F2C 8E26004C */ lw $a2, 0x4c($s1) -/* 1077B0 802E5F30 8E270050 */ lw $a3, 0x50($s1) -/* 1077B4 802E5F34 0C01C154 */ jal func_80070550 -/* 1077B8 802E5F38 24040003 */ addiu $a0, $zero, 3 -.L802E5F3C: -/* 1077BC 802E5F3C 8FBF0028 */ lw $ra, 0x28($sp) -/* 1077C0 802E5F40 8FB10024 */ lw $s1, 0x24($sp) -/* 1077C4 802E5F44 8FB00020 */ lw $s0, 0x20($sp) -/* 1077C8 802E5F48 03E00008 */ jr $ra -/* 1077CC 802E5F4C 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_106EF0/func_802E5F50.s b/asm/nonmatchings/code_106EF0/func_802E5F50.s deleted file mode 100644 index 51a8a6dea5..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5F50.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5F50 -/* 1077D0 802E5F50 8C830040 */ lw $v1, 0x40($a0) -/* 1077D4 802E5F54 3C020A00 */ lui $v0, 0xa00 -/* 1077D8 802E5F58 24420328 */ addiu $v0, $v0, 0x328 -/* 1077DC 802E5F5C AC620128 */ sw $v0, 0x128($v1) -/* 1077E0 802E5F60 3C020A00 */ lui $v0, 0xa00 -/* 1077E4 802E5F64 24420380 */ addiu $v0, $v0, 0x380 -/* 1077E8 802E5F68 AC62012C */ sw $v0, 0x12c($v1) -/* 1077EC 802E5F6C 3C02802E */ lui $v0, %hi(func_802E586C) -/* 1077F0 802E5F70 2442586C */ addiu $v0, $v0, %lo(func_802E586C) -/* 1077F4 802E5F74 03E00008 */ jr $ra -/* 1077F8 802E5F78 AC82003C */ sw $v0, 0x3c($a0) diff --git a/asm/nonmatchings/code_106EF0/func_802E5F7C.s b/asm/nonmatchings/code_106EF0/func_802E5F7C.s deleted file mode 100644 index 1c73fddfd4..0000000000 --- a/asm/nonmatchings/code_106EF0/func_802E5F7C.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E5F7C -/* 1077FC 802E5F7C 8C830040 */ lw $v1, 0x40($a0) -/* 107800 802E5F80 3C020A00 */ lui $v0, 0xa00 -/* 107804 802E5F84 24420800 */ addiu $v0, $v0, 0x800 -/* 107808 802E5F88 AC620128 */ sw $v0, 0x128($v1) -/* 10780C 802E5F8C 3C020A00 */ lui $v0, 0xa00 -/* 107810 802E5F90 24420750 */ addiu $v0, $v0, 0x750 -/* 107814 802E5F94 AC62012C */ sw $v0, 0x12c($v1) -/* 107818 802E5F98 3C02802E */ lui $v0, %hi(func_802E586C) -/* 10781C 802E5F9C 2442586C */ addiu $v0, $v0, %lo(func_802E586C) -/* 107820 802E5FA0 03E00008 */ jr $ra -/* 107824 802E5FA4 AC82003C */ sw $v0, 0x3c($a0) -/* 107828 802E5FA8 00000000 */ nop -/* 10782C 802E5FAC 00000000 */ nop diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E7F40.s b/asm/nonmatchings/code_109660_len_1270/func_802E7F40.s deleted file mode 100644 index 92959bc80b..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E7F40.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E7F40 -/* 1097C0 802E7F40 3C013F5B */ lui $at, 0x3f5b -/* 1097C4 802E7F44 34216DB7 */ ori $at, $at, 0x6db7 -/* 1097C8 802E7F48 44810000 */ mtc1 $at, $f0 -/* 1097CC 802E7F4C 8C830040 */ lw $v1, 0x40($a0) -/* 1097D0 802E7F50 E4800058 */ swc1 $f0, 0x58($a0) -/* 1097D4 802E7F54 3C048016 */ lui $a0, %hi(D_8015C7D0) -/* 1097D8 802E7F58 8C84C7D0 */ lw $a0, %lo(D_8015C7D0)($a0) -/* 1097DC 802E7F5C 3402FFFF */ ori $v0, $zero, 0xffff -/* 1097E0 802E7F60 A4620004 */ sh $v0, 4($v1) -/* 1097E4 802E7F64 03E00008 */ jr $ra -/* 1097E8 802E7F68 AC640000 */ sw $a0, ($v1) diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E7F6C.s b/asm/nonmatchings/code_109660_len_1270/func_802E7F6C.s deleted file mode 100644 index 3aae55ef8e..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E7F6C.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E7F6C -/* 1097EC 802E7F6C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1097F0 802E7F70 3C050A00 */ lui $a1, 0xa00 -/* 1097F4 802E7F74 24A54350 */ addiu $a1, $a1, 0x4350 -/* 1097F8 802E7F78 AFBF0010 */ sw $ra, 0x10($sp) -/* 1097FC 802E7F7C 8C820040 */ lw $v0, 0x40($a0) -/* 109800 802E7F80 C480004C */ lwc1 $f0, 0x4c($a0) -/* 109804 802E7F84 3C060A00 */ lui $a2, 0xa00 -/* 109808 802E7F88 24C626F0 */ addiu $a2, $a2, 0x26f0 -/* 10980C 802E7F8C 0C0B9F78 */ jal func_802E7DE0 -/* 109810 802E7F90 E440000C */ swc1 $f0, 0xc($v0) -/* 109814 802E7F94 8FBF0010 */ lw $ra, 0x10($sp) -/* 109818 802E7F98 03E00008 */ jr $ra -/* 10981C 802E7F9C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8858.s b/asm/nonmatchings/code_109660_len_1270/func_802E8858.s deleted file mode 100644 index 95d89c9ed4..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8858.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E8858 -/* 10A0D8 802E8858 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10A0DC 802E885C AFB00010 */ sw $s0, 0x10($sp) -/* 10A0E0 802E8860 0080802D */ daddu $s0, $a0, $zero -/* 10A0E4 802E8864 AFBF0014 */ sw $ra, 0x14($sp) -/* 10A0E8 802E8868 92020006 */ lbu $v0, 6($s0) -/* 10A0EC 802E886C 30420001 */ andi $v0, $v0, 1 -/* 10A0F0 802E8870 1040000C */ beqz $v0, .L802E88A4 -/* 10A0F4 802E8874 0000202D */ daddu $a0, $zero, $zero -/* 10A0F8 802E8878 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 10A0FC 802E887C 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 10A100 802E8880 804300B4 */ lb $v1, 0xb4($v0) -/* 10A104 802E8884 2402000E */ addiu $v0, $zero, 0xe -/* 10A108 802E8888 10620003 */ beq $v1, $v0, .L802E8898 -/* 10A10C 802E888C 24020010 */ addiu $v0, $zero, 0x10 -/* 10A110 802E8890 14620004 */ bne $v1, $v0, .L802E88A4 -/* 10A114 802E8894 00000000 */ nop -.L802E8898: -/* 10A118 802E8898 0C039769 */ jal set_action_state -/* 10A11C 802E889C 24040008 */ addiu $a0, $zero, 8 -/* 10A120 802E88A0 24040001 */ addiu $a0, $zero, 1 -.L802E88A4: -/* 10A124 802E88A4 1080000D */ beqz $a0, .L802E88DC -/* 10A128 802E88A8 00000000 */ nop -/* 10A12C 802E88AC 0C0B9FDB */ jal func_802E7F6C -/* 10A130 802E88B0 0200202D */ daddu $a0, $s0, $zero -/* 10A134 802E88B4 3C05802F */ lui $a1, %hi(D_802EAE7C) -/* 10A138 802E88B8 24A5AE7C */ addiu $a1, $a1, %lo(D_802EAE7C) -/* 10A13C 802E88BC 0C0442F3 */ jal func_80110BCC -/* 10A140 802E88C0 0200202D */ daddu $a0, $s0, $zero -/* 10A144 802E88C4 0C04419E */ jal func_80110678 -/* 10A148 802E88C8 0200202D */ daddu $a0, $s0, $zero -/* 10A14C 802E88CC 0C043F5A */ jal func_8010FD68 -/* 10A150 802E88D0 0200202D */ daddu $a0, $s0, $zero -/* 10A154 802E88D4 0C05272D */ jal play_sound -/* 10A158 802E88D8 240420AE */ addiu $a0, $zero, 0x20ae -.L802E88DC: -/* 10A15C 802E88DC 8FBF0014 */ lw $ra, 0x14($sp) -/* 10A160 802E88E0 8FB00010 */ lw $s0, 0x10($sp) -/* 10A164 802E88E4 03E00008 */ jr $ra -/* 10A168 802E88E8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E88EC.s b/asm/nonmatchings/code_109660_len_1270/func_802E88EC.s deleted file mode 100644 index 0c0e355f78..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E88EC.s +++ /dev/null @@ -1,56 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E88EC -/* 10A16C 802E88EC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 10A170 802E88F0 AFB20028 */ sw $s2, 0x28($sp) -/* 10A174 802E88F4 0080902D */ daddu $s2, $a0, $zero -/* 10A178 802E88F8 AFBF002C */ sw $ra, 0x2c($sp) -/* 10A17C 802E88FC AFB10024 */ sw $s1, 0x24($sp) -/* 10A180 802E8900 AFB00020 */ sw $s0, 0x20($sp) -/* 10A184 802E8904 8E510040 */ lw $s1, 0x40($s2) -/* 10A188 802E8908 8E230000 */ lw $v1, ($s1) -/* 10A18C 802E890C 2402FFFF */ addiu $v0, $zero, -1 -/* 10A190 802E8910 10620021 */ beq $v1, $v0, .L802E8998 -/* 10A194 802E8914 3402FFFF */ ori $v0, $zero, 0xffff -/* 10A198 802E8918 96230004 */ lhu $v1, 4($s1) -/* 10A19C 802E891C 10620006 */ beq $v1, $v0, .L802E8938 -/* 10A1A0 802E8920 0000802D */ daddu $s0, $zero, $zero -/* 10A1A4 802E8924 96240004 */ lhu $a0, 4($s1) -/* 10A1A8 802E8928 0C05152F */ jal get_global_flag -/* 10A1AC 802E892C 00000000 */ nop -/* 10A1B0 802E8930 14400002 */ bnez $v0, .L802E893C -/* 10A1B4 802E8934 00000000 */ nop -.L802E8938: -/* 10A1B8 802E8938 24100001 */ addiu $s0, $zero, 1 -.L802E893C: -/* 10A1BC 802E893C 12000016 */ beqz $s0, .L802E8998 -/* 10A1C0 802E8940 00000000 */ nop -/* 10A1C4 802E8944 0C03951B */ jal func_800E546C -/* 10A1C8 802E8948 00000000 */ nop -/* 10A1CC 802E894C C642004C */ lwc1 $f2, 0x4c($s2) -/* 10A1D0 802E8950 4600010D */ trunc.w.s $f4, $f0 -/* 10A1D4 802E8954 E7A40018 */ swc1 $f4, 0x18($sp) -/* 10A1D8 802E8958 2402000A */ addiu $v0, $zero, 0xa -/* 10A1DC 802E895C AFA20010 */ sw $v0, 0x10($sp) -/* 10A1E0 802E8960 AFA00014 */ sw $zero, 0x14($sp) -/* 10A1E4 802E8964 96220004 */ lhu $v0, 4($s1) -/* 10A1E8 802E8968 3C01802F */ lui $at, %hi(D_802EB370) -/* 10A1EC 802E896C D420B370 */ ldc1 $f0, %lo(D_802EB370)($at) -/* 10A1F0 802E8970 460010A1 */ cvt.d.s $f2, $f2 -/* 10A1F4 802E8974 46201080 */ add.d $f2, $f2, $f0 -/* 10A1F8 802E8978 AFA2001C */ sw $v0, 0x1c($sp) -/* 10A1FC 802E897C 8E240000 */ lw $a0, ($s1) -/* 10A200 802E8980 8E450048 */ lw $a1, 0x48($s2) -/* 10A204 802E8984 8E470050 */ lw $a3, 0x50($s2) -/* 10A208 802E8988 462010A0 */ cvt.s.d $f2, $f2 -/* 10A20C 802E898C 44061000 */ mfc1 $a2, $f2 -/* 10A210 802E8990 0C04C4FD */ jal make_item_entity -/* 10A214 802E8994 00000000 */ nop -.L802E8998: -/* 10A218 802E8998 8FBF002C */ lw $ra, 0x2c($sp) -/* 10A21C 802E899C 8FB20028 */ lw $s2, 0x28($sp) -/* 10A220 802E89A0 8FB10024 */ lw $s1, 0x24($sp) -/* 10A224 802E89A4 8FB00020 */ lw $s0, 0x20($sp) -/* 10A228 802E89A8 03E00008 */ jr $ra -/* 10A22C 802E89AC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E89B0.s b/asm/nonmatchings/code_109660_len_1270/func_802E89B0.s deleted file mode 100644 index 083da214f5..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E89B0.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E89B0 -/* 10A230 802E89B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 10A234 802E89B4 AFB10014 */ sw $s1, 0x14($sp) -/* 10A238 802E89B8 0080882D */ daddu $s1, $a0, $zero -/* 10A23C 802E89BC AFBF0018 */ sw $ra, 0x18($sp) -/* 10A240 802E89C0 AFB00010 */ sw $s0, 0x10($sp) -/* 10A244 802E89C4 8E300040 */ lw $s0, 0x40($s1) -/* 10A248 802E89C8 0C05152F */ jal get_global_flag -/* 10A24C 802E89CC 8E040014 */ lw $a0, 0x14($s0) -/* 10A250 802E89D0 10400004 */ beqz $v0, .L802E89E4 -/* 10A254 802E89D4 24020010 */ addiu $v0, $zero, 0x10 -/* 10A258 802E89D8 AE020004 */ sw $v0, 4($s0) -/* 10A25C 802E89DC 0C043F5A */ jal func_8010FD68 -/* 10A260 802E89E0 0220202D */ daddu $a0, $s1, $zero -.L802E89E4: -/* 10A264 802E89E4 8FBF0018 */ lw $ra, 0x18($sp) -/* 10A268 802E89E8 8FB10014 */ lw $s1, 0x14($sp) -/* 10A26C 802E89EC 8FB00010 */ lw $s0, 0x10($sp) -/* 10A270 802E89F0 03E00008 */ jr $ra -/* 10A274 802E89F4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E89F8.s b/asm/nonmatchings/code_109660_len_1270/func_802E89F8.s deleted file mode 100644 index 7bc5e34925..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E89F8.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E89F8 -/* 10A278 802E89F8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10A27C 802E89FC AFBF0010 */ sw $ra, 0x10($sp) -/* 10A280 802E8A00 8C850040 */ lw $a1, 0x40($a0) -/* 10A284 802E8A04 8CA20004 */ lw $v0, 4($a1) -/* 10A288 802E8A08 2403FFFF */ addiu $v1, $zero, -1 -/* 10A28C 802E8A0C 2442FFFF */ addiu $v0, $v0, -1 -/* 10A290 802E8A10 1043000C */ beq $v0, $v1, .L802E8A44 -/* 10A294 802E8A14 ACA20004 */ sw $v0, 4($a1) -/* 10A298 802E8A18 8CA20008 */ lw $v0, 8($a1) -/* 10A29C 802E8A1C 14400009 */ bnez $v0, .L802E8A44 -/* 10A2A0 802E8A20 00000000 */ nop -/* 10A2A4 802E8A24 C480004C */ lwc1 $f0, 0x4c($a0) -/* 10A2A8 802E8A28 3C01802F */ lui $at, %hi(D_802EB380) -/* 10A2AC 802E8A2C D422B380 */ ldc1 $f2, %lo(D_802EB380)($at) -/* 10A2B0 802E8A30 46000021 */ cvt.d.s $f0, $f0 -/* 10A2B4 802E8A34 46220000 */ add.d $f0, $f0, $f2 -/* 10A2B8 802E8A38 46200020 */ cvt.s.d $f0, $f0 -/* 10A2BC 802E8A3C 080BA293 */ j .L802E8A4C -/* 10A2C0 802E8A40 E480004C */ swc1 $f0, 0x4c($a0) -.L802E8A44: -/* 10A2C4 802E8A44 0C043F5A */ jal func_8010FD68 -/* 10A2C8 802E8A48 ACA00004 */ sw $zero, 4($a1) -.L802E8A4C: -/* 10A2CC 802E8A4C 8FBF0010 */ lw $ra, 0x10($sp) -/* 10A2D0 802E8A50 03E00008 */ jr $ra -/* 10A2D4 802E8A54 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s b/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s deleted file mode 100644 index c3977801a6..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E8A58 -/* 10A2D8 802E8A58 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 10A2DC 802E8A5C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 10A2E0 802E8A60 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10A2E4 802E8A64 AFBF0010 */ sw $ra, 0x10($sp) -/* 10A2E8 802E8A68 8C850040 */ lw $a1, 0x40($a0) -/* 10A2EC 802E8A6C 8443008E */ lh $v1, 0x8e($v0) -/* 10A2F0 802E8A70 8CA2000C */ lw $v0, 0xc($a1) -/* 10A2F4 802E8A74 14430014 */ bne $v0, $v1, .L802E8AC8 -/* 10A2F8 802E8A78 00000000 */ nop -/* 10A2FC 802E8A7C 8CA30004 */ lw $v1, 4($a1) -/* 10A300 802E8A80 10600005 */ beqz $v1, .L802E8A98 -/* 10A304 802E8A84 24020001 */ addiu $v0, $zero, 1 -/* 10A308 802E8A88 10620009 */ beq $v1, $v0, .L802E8AB0 -/* 10A30C 802E8A8C 00000000 */ nop -/* 10A310 802E8A90 080BA2B2 */ j .L802E8AC8 -/* 10A314 802E8A94 00000000 */ nop -.L802E8A98: -/* 10A318 802E8A98 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) -/* 10A31C 802E8A9C 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) -/* 10A320 802E8AA0 1840000B */ blez $v0, .L802E8AD0 -/* 10A324 802E8AA4 24020001 */ addiu $v0, $zero, 1 -/* 10A328 802E8AA8 080BA2B4 */ j .L802E8AD0 -/* 10A32C 802E8AAC ACA20004 */ sw $v0, 4($a1) -.L802E8AB0: -/* 10A330 802E8AB0 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) -/* 10A334 802E8AB4 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) -/* 10A338 802E8AB8 04410005 */ bgez $v0, .L802E8AD0 -/* 10A33C 802E8ABC 24020002 */ addiu $v0, $zero, 2 -/* 10A340 802E8AC0 080BA2B4 */ j .L802E8AD0 -/* 10A344 802E8AC4 ACA20004 */ sw $v0, 4($a1) -.L802E8AC8: -/* 10A348 802E8AC8 0C043F5A */ jal func_8010FD68 -/* 10A34C 802E8ACC 00000000 */ nop -.L802E8AD0: -/* 10A350 802E8AD0 8FBF0010 */ lw $ra, 0x10($sp) -/* 10A354 802E8AD4 03E00008 */ jr $ra -/* 10A358 802E8AD8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8BC0.s b/asm/nonmatchings/code_109660_len_1270/func_802E8BC0.s deleted file mode 100644 index cd420350b8..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8BC0.s +++ /dev/null @@ -1,58 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E8BC0 -/* 10A440 802E8BC0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 10A444 802E8BC4 AFBF001C */ sw $ra, 0x1c($sp) -/* 10A448 802E8BC8 AFB20018 */ sw $s2, 0x18($sp) -/* 10A44C 802E8BCC AFB10014 */ sw $s1, 0x14($sp) -/* 10A450 802E8BD0 AFB00010 */ sw $s0, 0x10($sp) -/* 10A454 802E8BD4 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 10A458 802E8BD8 0C016AFA */ jal get_current_map_header -/* 10A45C 802E8BDC 8C900040 */ lw $s0, 0x40($a0) -/* 10A460 802E8BE0 0040902D */ daddu $s2, $v0, $zero -/* 10A464 802E8BE4 8E02000C */ lw $v0, 0xc($s0) -/* 10A468 802E8BE8 8E430014 */ lw $v1, 0x14($s2) -/* 10A46C 802E8BEC 00021100 */ sll $v0, $v0, 4 -/* 10A470 802E8BF0 00431021 */ addu $v0, $v0, $v1 -/* 10A474 802E8BF4 C44C0000 */ lwc1 $f12, ($v0) -/* 10A478 802E8BF8 0C038022 */ jal func_800E0088 -/* 10A47C 802E8BFC C44E0008 */ lwc1 $f14, 8($v0) -/* 10A480 802E8C00 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 10A484 802E8C04 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 10A488 802E8C08 C462005C */ lwc1 $f2, 0x5c($v1) -/* 10A48C 802E8C0C 0060882D */ daddu $s1, $v1, $zero -/* 10A490 802E8C10 46020003 */ div.s $f0, $f0, $f2 -/* 10A494 802E8C14 4600010D */ trunc.w.s $f4, $f0 -/* 10A498 802E8C18 44022000 */ mfc1 $v0, $f4 -/* 10A49C 802E8C1C 00000000 */ nop -/* 10A4A0 802E8C20 14400003 */ bnez $v0, .L802E8C30 -/* 10A4A4 802E8C24 AE020004 */ sw $v0, 4($s0) -/* 10A4A8 802E8C28 24020001 */ addiu $v0, $zero, 1 -/* 10A4AC 802E8C2C AE020004 */ sw $v0, 4($s0) -.L802E8C30: -/* 10A4B0 802E8C30 C62C0028 */ lwc1 $f12, 0x28($s1) -/* 10A4B4 802E8C34 C62E0030 */ lwc1 $f14, 0x30($s1) -/* 10A4B8 802E8C38 8E02000C */ lw $v0, 0xc($s0) -/* 10A4BC 802E8C3C 8E430014 */ lw $v1, 0x14($s2) -/* 10A4C0 802E8C40 00021100 */ sll $v0, $v0, 4 -/* 10A4C4 802E8C44 00431021 */ addu $v0, $v0, $v1 -/* 10A4C8 802E8C48 8C460000 */ lw $a2, ($v0) -/* 10A4CC 802E8C4C 0C00A720 */ jal atan2 -/* 10A4D0 802E8C50 8C470008 */ lw $a3, 8($v0) -/* 10A4D4 802E8C54 0C03805E */ jal disable_player_input -/* 10A4D8 802E8C58 46000506 */ mov.s $f20, $f0 -/* 10A4DC 802E8C5C 0C038045 */ jal disable_player_static_collisions -/* 10A4E0 802E8C60 00000000 */ nop -/* 10A4E4 802E8C64 8E26005C */ lw $a2, 0x5c($s1) -/* 10A4E8 802E8C68 8E040004 */ lw $a0, 4($s0) -/* 10A4EC 802E8C6C 4405A000 */ mfc1 $a1, $f20 -/* 10A4F0 802E8C70 0C0389DE */ jal move_player -/* 10A4F4 802E8C74 00000000 */ nop -/* 10A4F8 802E8C78 8FBF001C */ lw $ra, 0x1c($sp) -/* 10A4FC 802E8C7C 8FB20018 */ lw $s2, 0x18($sp) -/* 10A500 802E8C80 8FB10014 */ lw $s1, 0x14($sp) -/* 10A504 802E8C84 8FB00010 */ lw $s0, 0x10($sp) -/* 10A508 802E8C88 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 10A50C 802E8C8C 03E00008 */ jr $ra -/* 10A510 802E8C90 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8C94.s b/asm/nonmatchings/code_109660_len_1270/func_802E8C94.s deleted file mode 100644 index 11cb38c00f..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8C94.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E8C94 -/* 10A514 802E8C94 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 10A518 802E8C98 AFBF0010 */ sw $ra, 0x10($sp) -/* 10A51C 802E8C9C 8C820040 */ lw $v0, 0x40($a0) -/* 10A520 802E8CA0 8C430004 */ lw $v1, 4($v0) -/* 10A524 802E8CA4 2463FFFF */ addiu $v1, $v1, -1 -/* 10A528 802E8CA8 AC430004 */ sw $v1, 4($v0) -/* 10A52C 802E8CAC 2402FFFF */ addiu $v0, $zero, -1 -/* 10A530 802E8CB0 14620003 */ bne $v1, $v0, .L802E8CC0 -/* 10A534 802E8CB4 00000000 */ nop -/* 10A538 802E8CB8 0C043F5A */ jal func_8010FD68 -/* 10A53C 802E8CBC 00000000 */ nop -.L802E8CC0: -/* 10A540 802E8CC0 8FBF0010 */ lw $ra, 0x10($sp) -/* 10A544 802E8CC4 03E00008 */ jr $ra -/* 10A548 802E8CC8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8F94.s b/asm/nonmatchings/code_109660_len_1270/func_802E8F94.s deleted file mode 100644 index 74a19aeab7..0000000000 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8F94.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E8F94 -/* 10A814 802E8F94 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 10A818 802E8F98 AFB10014 */ sw $s1, 0x14($sp) -/* 10A81C 802E8F9C 0080882D */ daddu $s1, $a0, $zero -/* 10A820 802E8FA0 3C028016 */ lui $v0, %hi(D_8015C7D0) -/* 10A824 802E8FA4 2442C7D0 */ addiu $v0, $v0, %lo(D_8015C7D0) -/* 10A828 802E8FA8 AFBF001C */ sw $ra, 0x1c($sp) -/* 10A82C 802E8FAC AFB20018 */ sw $s2, 0x18($sp) -/* 10A830 802E8FB0 AFB00010 */ sw $s0, 0x10($sp) -/* 10A834 802E8FB4 8C430000 */ lw $v1, ($v0) -/* 10A838 802E8FB8 8C440004 */ lw $a0, 4($v0) -/* 10A83C 802E8FBC 8C450008 */ lw $a1, 8($v0) -/* 10A840 802E8FC0 3C02802F */ lui $v0, %hi(push_entity_matrix) -/* 10A844 802E8FC4 24428E4C */ addiu $v0, $v0, %lo(push_entity_matrix) -/* 10A848 802E8FC8 8E300040 */ lw $s0, 0x40($s1) -/* 10A84C 802E8FCC 2632004C */ addiu $s2, $s1, 0x4c -/* 10A850 802E8FD0 AE22003C */ sw $v0, 0x3c($s1) -/* 10A854 802E8FD4 AE03000C */ sw $v1, 0xc($s0) -/* 10A858 802E8FD8 AE040010 */ sw $a0, 0x10($s0) -/* 10A85C 802E8FDC AE050014 */ sw $a1, 0x14($s0) -/* 10A860 802E8FE0 C620004C */ lwc1 $f0, 0x4c($s1) -/* 10A864 802E8FE4 00A0202D */ daddu $a0, $a1, $zero -/* 10A868 802E8FE8 0C05152F */ jal get_global_flag -/* 10A86C 802E8FEC E6000018 */ swc1 $f0, 0x18($s0) -/* 10A870 802E8FF0 AE020008 */ sw $v0, 8($s0) -/* 10A874 802E8FF4 C620004C */ lwc1 $f0, 0x4c($s1) -/* 10A878 802E8FF8 460000A1 */ cvt.d.s $f2, $f0 -/* 10A87C 802E8FFC 3C01404A */ lui $at, 0x404a -/* 10A880 802E9000 44810800 */ mtc1 $at, $f1 -/* 10A884 802E9004 44800000 */ mtc1 $zero, $f0 -/* 10A888 802E9008 50400006 */ beql $v0, $zero, .L802E9024 -/* 10A88C 802E900C 46201001 */ sub.d $f0, $f2, $f0 -/* 10A890 802E9010 3C01402E */ lui $at, 0x402e -/* 10A894 802E9014 44810800 */ mtc1 $at, $f1 -/* 10A898 802E9018 44800000 */ mtc1 $zero, $f0 -/* 10A89C 802E901C 00000000 */ nop -/* 10A8A0 802E9020 46201001 */ sub.d $f0, $f2, $f0 -.L802E9024: -/* 10A8A4 802E9024 46200020 */ cvt.s.d $f0, $f0 -/* 10A8A8 802E9028 E6400000 */ swc1 $f0, ($s2) -/* 10A8AC 802E902C 8FBF001C */ lw $ra, 0x1c($sp) -/* 10A8B0 802E9030 8FB20018 */ lw $s2, 0x18($sp) -/* 10A8B4 802E9034 8FB10014 */ lw $s1, 0x14($sp) -/* 10A8B8 802E9038 8FB00010 */ lw $s0, 0x10($sp) -/* 10A8BC 802E903C 03E00008 */ jr $ra -/* 10A8C0 802E9040 27BD0020 */ addiu $sp, $sp, 0x20 -/* 10A8C4 802E9044 00000000 */ nop -/* 10A8C8 802E9048 00000000 */ nop -/* 10A8CC 802E904C 00000000 */ nop diff --git a/asm/nonmatchings/world/world/func_80058DD0.s b/asm/nonmatchings/code_341d0/func_80058DD0.s similarity index 100% rename from asm/nonmatchings/world/world/func_80058DD0.s rename to asm/nonmatchings/code_341d0/func_80058DD0.s diff --git a/asm/nonmatchings/world/world/func_80058E84.s b/asm/nonmatchings/code_341d0/func_80058E84.s similarity index 100% rename from asm/nonmatchings/world/world/func_80058E84.s rename to asm/nonmatchings/code_341d0/func_80058E84.s diff --git a/asm/nonmatchings/world/world/func_80058F88.s b/asm/nonmatchings/code_341d0/func_80058F88.s similarity index 100% rename from asm/nonmatchings/world/world/func_80058F88.s rename to asm/nonmatchings/code_341d0/func_80058F88.s diff --git a/asm/nonmatchings/world/world/func_80059008.s b/asm/nonmatchings/code_341d0/func_80059008.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059008.s rename to asm/nonmatchings/code_341d0/func_80059008.s diff --git a/asm/nonmatchings/world/world/func_8005904C.s b/asm/nonmatchings/code_341d0/func_8005904C.s similarity index 100% rename from asm/nonmatchings/world/world/func_8005904C.s rename to asm/nonmatchings/code_341d0/func_8005904C.s diff --git a/asm/nonmatchings/world/world/func_80059310.s b/asm/nonmatchings/code_341d0/func_80059310.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059310.s rename to asm/nonmatchings/code_341d0/func_80059310.s diff --git a/asm/nonmatchings/world/world/func_800598A0.s b/asm/nonmatchings/code_341d0/func_800598A0.s similarity index 100% rename from asm/nonmatchings/world/world/func_800598A0.s rename to asm/nonmatchings/code_341d0/func_800598A0.s diff --git a/asm/nonmatchings/world/world/func_80059AB8.s b/asm/nonmatchings/code_341d0/func_80059AB8.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059AB8.s rename to asm/nonmatchings/code_341d0/func_80059AB8.s diff --git a/asm/nonmatchings/world/world/func_80059BD4.s b/asm/nonmatchings/code_341d0/func_80059BD4.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059BD4.s rename to asm/nonmatchings/code_341d0/func_80059BD4.s diff --git a/asm/nonmatchings/world/world/func_80059C88.s b/asm/nonmatchings/code_341d0/func_80059C88.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059C88.s rename to asm/nonmatchings/code_341d0/func_80059C88.s diff --git a/asm/nonmatchings/world/world/func_80059C9C.s b/asm/nonmatchings/code_341d0/func_80059C9C.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059C9C.s rename to asm/nonmatchings/code_341d0/func_80059C9C.s diff --git a/asm/nonmatchings/world/world/func_80059D50.s b/asm/nonmatchings/code_341d0/func_80059D50.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059D50.s rename to asm/nonmatchings/code_341d0/func_80059D50.s diff --git a/asm/nonmatchings/world/world/func_80059F94.s b/asm/nonmatchings/code_341d0/func_80059F94.s similarity index 100% rename from asm/nonmatchings/world/world/func_80059F94.s rename to asm/nonmatchings/code_341d0/func_80059F94.s diff --git a/asm/nonmatchings/world/world/func_8005A2BC.s b/asm/nonmatchings/world/world/func_8005A2BC.s deleted file mode 100644 index 99f72c0fe9..0000000000 --- a/asm/nonmatchings/world/world/func_8005A2BC.s +++ /dev/null @@ -1,122 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8005A2BC -/* 356BC 8005A2BC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 356C0 8005A2C0 AFB20018 */ sw $s2, 0x18($sp) -/* 356C4 8005A2C4 0080902D */ daddu $s2, $a0, $zero -/* 356C8 8005A2C8 AFB00010 */ sw $s0, 0x10($sp) -/* 356CC 8005A2CC 0000802D */ daddu $s0, $zero, $zero -/* 356D0 8005A2D0 3C03800B */ lui $v1, %hi(D_800B4398) -/* 356D4 8005A2D4 24634398 */ addiu $v1, $v1, %lo(D_800B4398) -/* 356D8 8005A2D8 AFBF001C */ sw $ra, 0x1c($sp) -/* 356DC 8005A2DC AFB10014 */ sw $s1, 0x14($sp) -.L8005A2E0: -/* 356E0 8005A2E0 8C620000 */ lw $v0, ($v1) -/* 356E4 8005A2E4 10400006 */ beqz $v0, .L8005A300 -/* 356E8 8005A2E8 2A020060 */ slti $v0, $s0, 0x60 -/* 356EC 8005A2EC 26100001 */ addiu $s0, $s0, 1 -/* 356F0 8005A2F0 2A020060 */ slti $v0, $s0, 0x60 -/* 356F4 8005A2F4 1440FFFA */ bnez $v0, .L8005A2E0 -/* 356F8 8005A2F8 24630004 */ addiu $v1, $v1, 4 -/* 356FC 8005A2FC 2A020060 */ slti $v0, $s0, 0x60 -.L8005A300: -/* 35700 8005A300 14400003 */ bnez $v0, .L8005A310 -/* 35704 8005A304 00000000 */ nop -.L8005A308: -/* 35708 8005A308 080168C2 */ j .L8005A308 -/* 3570C 8005A30C 00000000 */ nop -.L8005A310: -/* 35710 8005A310 0C00AB0A */ jal general_heap_malloc -/* 35714 8005A314 24040014 */ addiu $a0, $zero, 0x14 -/* 35718 8005A318 00101880 */ sll $v1, $s0, 2 -/* 3571C 8005A31C 0040882D */ daddu $s1, $v0, $zero -/* 35720 8005A320 3C01800B */ lui $at, %hi(D_800B4398) -/* 35724 8005A324 00230821 */ addu $at, $at, $v1 -/* 35728 8005A328 AC314398 */ sw $s1, %lo(D_800B4398)($at) -/* 3572C 8005A32C 16200003 */ bnez $s1, .L8005A33C -/* 35730 8005A330 0000802D */ daddu $s0, $zero, $zero -.L8005A334: -/* 35734 8005A334 080168CD */ j .L8005A334 -/* 35738 8005A338 00000000 */ nop -.L8005A33C: -/* 3573C 8005A33C 3C04800A */ lui $a0, %hi(D_800A4000) -/* 35740 8005A340 24844000 */ addiu $a0, $a0, %lo(D_800A4000) -/* 35744 8005A344 8E430004 */ lw $v1, 4($s2) -/* 35748 8005A348 24020001 */ addiu $v0, $zero, 1 -/* 3574C 8005A34C AE220000 */ sw $v0, ($s1) -/* 35750 8005A350 AE230004 */ sw $v1, 4($s1) -.L8005A354: -/* 35754 8005A354 8C820000 */ lw $v0, ($a0) -/* 35758 8005A358 30420001 */ andi $v0, $v0, 1 -/* 3575C 8005A35C 50400006 */ beql $v0, $zero, .L8005A378 -/* 35760 8005A360 26100001 */ addiu $s0, $s0, 1 -/* 35764 8005A364 8C830004 */ lw $v1, 4($a0) -/* 35768 8005A368 8E420004 */ lw $v0, 4($s2) -/* 3576C 8005A36C 10620006 */ beq $v1, $v0, .L8005A388 -/* 35770 8005A370 2A02000F */ slti $v0, $s0, 0xf -/* 35774 8005A374 26100001 */ addiu $s0, $s0, 1 -.L8005A378: -/* 35778 8005A378 2A02000F */ slti $v0, $s0, 0xf -/* 3577C 8005A37C 1440FFF5 */ bnez $v0, .L8005A354 -/* 35780 8005A380 24840020 */ addiu $a0, $a0, 0x20 -/* 35784 8005A384 2A02000F */ slti $v0, $s0, 0xf -.L8005A388: -/* 35788 8005A388 14400003 */ bnez $v0, .L8005A398 -/* 3578C 8005A38C 00000000 */ nop -.L8005A390: -/* 35790 8005A390 080168E4 */ j .L8005A390 -/* 35794 8005A394 00000000 */ nop -.L8005A398: -/* 35798 8005A398 8C820008 */ lw $v0, 8($a0) -/* 3579C 8005A39C 14400016 */ bnez $v0, .L8005A3F8 -/* 357A0 8005A3A0 24420001 */ addiu $v0, $v0, 1 -/* 357A4 8005A3A4 8E42000C */ lw $v0, 0xc($s2) -/* 357A8 8005A3A8 14400004 */ bnez $v0, .L8005A3BC -/* 357AC 8005A3AC AC820010 */ sw $v0, 0x10($a0) -/* 357B0 8005A3B0 3C028006 */ lui $v0, %hi(func_80059C80) -/* 357B4 8005A3B4 24429C80 */ addiu $v0, $v0, %lo(func_80059C80) -/* 357B8 8005A3B8 AC820014 */ sw $v0, 0x14($a0) -.L8005A3BC: -/* 357BC 8005A3BC 8E420010 */ lw $v0, 0x10($s2) -/* 357C0 8005A3C0 8C830018 */ lw $v1, 0x18($a0) -/* 357C4 8005A3C4 14600004 */ bnez $v1, .L8005A3D8 -/* 357C8 8005A3C8 AC820014 */ sw $v0, 0x14($a0) -/* 357CC 8005A3CC 3C028006 */ lui $v0, %hi(func_80059C80) -/* 357D0 8005A3D0 24429C80 */ addiu $v0, $v0, %lo(func_80059C80) -/* 357D4 8005A3D4 AC820018 */ sw $v0, 0x18($a0) -.L8005A3D8: -/* 357D8 8005A3D8 8E420014 */ lw $v0, 0x14($s2) -/* 357DC 8005A3DC 14400004 */ bnez $v0, .L8005A3F0 -/* 357E0 8005A3E0 AC820018 */ sw $v0, 0x18($a0) -/* 357E4 8005A3E4 3C028006 */ lui $v0, %hi(func_80059C80) -/* 357E8 8005A3E8 24429C80 */ addiu $v0, $v0, %lo(func_80059C80) -/* 357EC 8005A3EC AC820018 */ sw $v0, 0x18($a0) -.L8005A3F0: -/* 357F0 8005A3F0 8C820008 */ lw $v0, 8($a0) -/* 357F4 8005A3F4 24420001 */ addiu $v0, $v0, 1 -.L8005A3F8: -/* 357F8 8005A3F8 AC820008 */ sw $v0, 8($a0) -/* 357FC 8005A3FC AE240010 */ sw $a0, 0x10($s1) -/* 35800 8005A400 8E420008 */ lw $v0, 8($s2) -/* 35804 8005A404 10400003 */ beqz $v0, .L8005A414 -/* 35808 8005A408 00000000 */ nop -/* 3580C 8005A40C 0040F809 */ jalr $v0 -/* 35810 8005A410 0220202D */ daddu $a0, $s1, $zero -.L8005A414: -/* 35814 8005A414 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 35818 8005A418 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 3581C 8005A41C 80420070 */ lb $v0, 0x70($v0) -/* 35820 8005A420 10400005 */ beqz $v0, .L8005A438 -/* 35824 8005A424 0220102D */ daddu $v0, $s1, $zero -/* 35828 8005A428 8E220000 */ lw $v0, ($s1) -/* 3582C 8005A42C 34420004 */ ori $v0, $v0, 4 -/* 35830 8005A430 AE220000 */ sw $v0, ($s1) -/* 35834 8005A434 0220102D */ daddu $v0, $s1, $zero -.L8005A438: -/* 35838 8005A438 8FBF001C */ lw $ra, 0x1c($sp) -/* 3583C 8005A43C 8FB20018 */ lw $s2, 0x18($sp) -/* 35840 8005A440 8FB10014 */ lw $s1, 0x14($sp) -/* 35844 8005A444 8FB00010 */ lw $s0, 0x10($sp) -/* 35848 8005A448 03E00008 */ jr $ra -/* 3584C 8005A44C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/world/play_effect.s b/asm/nonmatchings/world/world/play_effect.s deleted file mode 100644 index 6934b218ac..0000000000 --- a/asm/nonmatchings/world/world/play_effect.s +++ /dev/null @@ -1,101 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel play_effect -/* 35964 8005A564 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 35968 8005A568 AFB20020 */ sw $s2, 0x20($sp) -/* 3596C 8005A56C 0080902D */ daddu $s2, $a0, $zero -/* 35970 8005A570 3C038008 */ lui $v1, %hi(D_8007F210) -/* 35974 8005A574 2463F210 */ addiu $v1, $v1, %lo(D_8007F210) -/* 35978 8005A578 00121040 */ sll $v0, $s2, 1 -/* 3597C 8005A57C 00521021 */ addu $v0, $v0, $s2 -/* 35980 8005A580 000210C0 */ sll $v0, $v0, 3 -/* 35984 8005A584 AFB1001C */ sw $s1, 0x1c($sp) -/* 35988 8005A588 00438821 */ addu $s1, $v0, $v1 -/* 3598C 8005A58C 0000202D */ daddu $a0, $zero, $zero -/* 35990 8005A590 AFB00018 */ sw $s0, 0x18($sp) -/* 35994 8005A594 3C10800A */ lui $s0, %hi(D_800A4000) -/* 35998 8005A598 26104000 */ addiu $s0, $s0, %lo(D_800A4000) -/* 3599C 8005A59C AFBF0024 */ sw $ra, 0x24($sp) -.L8005A5A0: -/* 359A0 8005A5A0 8E020000 */ lw $v0, ($s0) -/* 359A4 8005A5A4 30420001 */ andi $v0, $v0, 1 -/* 359A8 8005A5A8 50400005 */ beql $v0, $zero, .L8005A5C0 -/* 359AC 8005A5AC 24840001 */ addiu $a0, $a0, 1 -/* 359B0 8005A5B0 8E020004 */ lw $v0, 4($s0) -/* 359B4 8005A5B4 10520006 */ beq $v0, $s2, .L8005A5D0 -/* 359B8 8005A5B8 2882000F */ slti $v0, $a0, 0xf -/* 359BC 8005A5BC 24840001 */ addiu $a0, $a0, 1 -.L8005A5C0: -/* 359C0 8005A5C0 2882000F */ slti $v0, $a0, 0xf -/* 359C4 8005A5C4 1440FFF6 */ bnez $v0, .L8005A5A0 -/* 359C8 8005A5C8 26100020 */ addiu $s0, $s0, 0x20 -/* 359CC 8005A5CC 2882000F */ slti $v0, $a0, 0xf -.L8005A5D0: -/* 359D0 8005A5D0 14400030 */ bnez $v0, .L8005A694 -/* 359D4 8005A5D4 24020001 */ addiu $v0, $zero, 1 -/* 359D8 8005A5D8 0000202D */ daddu $a0, $zero, $zero -/* 359DC 8005A5DC 3C10800A */ lui $s0, %hi(D_800A4000) -/* 359E0 8005A5E0 26104000 */ addiu $s0, $s0, %lo(D_800A4000) -.L8005A5E4: -/* 359E4 8005A5E4 8E020000 */ lw $v0, ($s0) -/* 359E8 8005A5E8 30420001 */ andi $v0, $v0, 1 -/* 359EC 8005A5EC 10400006 */ beqz $v0, .L8005A608 -/* 359F0 8005A5F0 2882000F */ slti $v0, $a0, 0xf -/* 359F4 8005A5F4 24840001 */ addiu $a0, $a0, 1 -/* 359F8 8005A5F8 2882000F */ slti $v0, $a0, 0xf -/* 359FC 8005A5FC 1440FFF9 */ bnez $v0, .L8005A5E4 -/* 35A00 8005A600 26100020 */ addiu $s0, $s0, 0x20 -/* 35A04 8005A604 2882000F */ slti $v0, $a0, 0xf -.L8005A608: -/* 35A08 8005A608 14400003 */ bnez $v0, .L8005A618 -/* 35A0C 8005A60C 3C0700FF */ lui $a3, 0xff -.L8005A610: -/* 35A10 8005A610 08016984 */ j .L8005A610 -/* 35A14 8005A614 00000000 */ nop -.L8005A618: -/* 35A18 8005A618 34E7FFFF */ ori $a3, $a3, 0xffff -/* 35A1C 8005A61C 0000282D */ daddu $a1, $zero, $zero -/* 35A20 8005A620 2402FFFF */ addiu $v0, $zero, -1 -/* 35A24 8005A624 3C038019 */ lui $v1, %hi(D_80197000) -/* 35A28 8005A628 24637000 */ addiu $v1, $v1, %lo(D_80197000) -/* 35A2C 8005A62C AFA20010 */ sw $v0, 0x10($sp) -/* 35A30 8005A630 AFA20014 */ sw $v0, 0x14($sp) -/* 35A34 8005A634 00041300 */ sll $v0, $a0, 0xc -/* 35A38 8005A638 00431021 */ addu $v0, $v0, $v1 -/* 35A3C 8005A63C 8E26000C */ lw $a2, 0xc($s1) -/* 35A40 8005A640 0C0199E8 */ jal osMapTLB -/* 35A44 8005A644 00473824 */ and $a3, $v0, $a3 -/* 35A48 8005A648 8E240004 */ lw $a0, 4($s1) -/* 35A4C 8005A64C 8E250008 */ lw $a1, 8($s1) -/* 35A50 8005A650 0C00A5CF */ jal dma_copy -/* 35A54 8005A654 8E26000C */ lw $a2, 0xc($s1) -/* 35A58 8005A658 8E220010 */ lw $v0, 0x10($s1) -/* 35A5C 8005A65C 5040000D */ beql $v0, $zero, .L8005A694 -/* 35A60 8005A660 24020001 */ addiu $v0, $zero, 1 -/* 35A64 8005A664 8E240014 */ lw $a0, 0x14($s1) -/* 35A68 8005A668 0C00AB0A */ jal general_heap_malloc -/* 35A6C 8005A66C 00822023 */ subu $a0, $a0, $v0 -/* 35A70 8005A670 14400003 */ bnez $v0, .L8005A680 -/* 35A74 8005A674 AE02001C */ sw $v0, 0x1c($s0) -.L8005A678: -/* 35A78 8005A678 0801699E */ j .L8005A678 -/* 35A7C 8005A67C 00000000 */ nop -.L8005A680: -/* 35A80 8005A680 8E240010 */ lw $a0, 0x10($s1) -/* 35A84 8005A684 8E250014 */ lw $a1, 0x14($s1) -/* 35A88 8005A688 0C00A5CF */ jal dma_copy -/* 35A8C 8005A68C 8E06001C */ lw $a2, 0x1c($s0) -/* 35A90 8005A690 24020001 */ addiu $v0, $zero, 1 -.L8005A694: -/* 35A94 8005A694 0040182D */ daddu $v1, $v0, $zero -/* 35A98 8005A698 AE120004 */ sw $s2, 4($s0) -/* 35A9C 8005A69C AE000008 */ sw $zero, 8($s0) -/* 35AA0 8005A6A0 AE030000 */ sw $v1, ($s0) -/* 35AA4 8005A6A4 8FBF0024 */ lw $ra, 0x24($sp) -/* 35AA8 8005A6A8 8FB20020 */ lw $s2, 0x20($sp) -/* 35AAC 8005A6AC 8FB1001C */ lw $s1, 0x1c($sp) -/* 35AB0 8005A6B0 8FB00018 */ lw $s0, 0x18($sp) -/* 35AB4 8005A6B4 03E00008 */ jr $ra -/* 35AB8 8005A6B8 27BD0028 */ addiu $sp, $sp, 0x28 -/* 35ABC 8005A6BC 00000000 */ nop diff --git a/asm/nonmatchings/world/world/remove_all_effects.s b/asm/nonmatchings/world/world/remove_all_effects.s deleted file mode 100644 index 6583c9b49f..0000000000 --- a/asm/nonmatchings/world/world/remove_all_effects.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel remove_all_effects -/* 358E0 8005A4E0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 358E4 8005A4E4 AFB20018 */ sw $s2, 0x18($sp) -/* 358E8 8005A4E8 0000902D */ daddu $s2, $zero, $zero -/* 358EC 8005A4EC AFB10014 */ sw $s1, 0x14($sp) -/* 358F0 8005A4F0 3C11800B */ lui $s1, %hi(D_800B4398) -/* 358F4 8005A4F4 26314398 */ addiu $s1, $s1, %lo(D_800B4398) -/* 358F8 8005A4F8 AFBF001C */ sw $ra, 0x1c($sp) -/* 358FC 8005A4FC AFB00010 */ sw $s0, 0x10($sp) -.L8005A500: -/* 35900 8005A500 8E300000 */ lw $s0, ($s1) -/* 35904 8005A504 5200000E */ beql $s0, $zero, .L8005A540 -/* 35908 8005A508 26520001 */ addiu $s2, $s2, 1 -/* 3590C 8005A50C 8E020000 */ lw $v0, ($s0) -/* 35910 8005A510 30420004 */ andi $v0, $v0, 4 -/* 35914 8005A514 5040000A */ beql $v0, $zero, .L8005A540 -/* 35918 8005A518 26520001 */ addiu $s2, $s2, 1 -/* 3591C 8005A51C 8E04000C */ lw $a0, 0xc($s0) -/* 35920 8005A520 10800003 */ beqz $a0, .L8005A530 -/* 35924 8005A524 00000000 */ nop -/* 35928 8005A528 0C00AB1E */ jal general_heap_free -/* 3592C 8005A52C 00000000 */ nop -.L8005A530: -/* 35930 8005A530 0C00AB1E */ jal general_heap_free -/* 35934 8005A534 0200202D */ daddu $a0, $s0, $zero -/* 35938 8005A538 AE200000 */ sw $zero, ($s1) -/* 3593C 8005A53C 26520001 */ addiu $s2, $s2, 1 -.L8005A540: -/* 35940 8005A540 2A420060 */ slti $v0, $s2, 0x60 -/* 35944 8005A544 1440FFEE */ bnez $v0, .L8005A500 -/* 35948 8005A548 26310004 */ addiu $s1, $s1, 4 -/* 3594C 8005A54C 8FBF001C */ lw $ra, 0x1c($sp) -/* 35950 8005A550 8FB20018 */ lw $s2, 0x18($sp) -/* 35954 8005A554 8FB10014 */ lw $s1, 0x14($sp) -/* 35958 8005A558 8FB00010 */ lw $s0, 0x10($sp) -/* 3595C 8005A55C 03E00008 */ jr $ra -/* 35960 8005A560 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/world/remove_effect.s b/asm/nonmatchings/world/world/remove_effect.s deleted file mode 100644 index d9098b0b60..0000000000 --- a/asm/nonmatchings/world/world/remove_effect.s +++ /dev/null @@ -1,45 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel remove_effect -/* 35850 8005A450 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 35854 8005A454 AFB10014 */ sw $s1, 0x14($sp) -/* 35858 8005A458 0080882D */ daddu $s1, $a0, $zero -/* 3585C 8005A45C AFB00010 */ sw $s0, 0x10($sp) -/* 35860 8005A460 0000802D */ daddu $s0, $zero, $zero -/* 35864 8005A464 3C03800B */ lui $v1, %hi(D_800B4398) -/* 35868 8005A468 24634398 */ addiu $v1, $v1, %lo(D_800B4398) -/* 3586C 8005A46C AFBF0018 */ sw $ra, 0x18($sp) -.L8005A470: -/* 35870 8005A470 8C620000 */ lw $v0, ($v1) -/* 35874 8005A474 10510006 */ beq $v0, $s1, .L8005A490 -/* 35878 8005A478 2A020060 */ slti $v0, $s0, 0x60 -/* 3587C 8005A47C 26100001 */ addiu $s0, $s0, 1 -/* 35880 8005A480 2A020060 */ slti $v0, $s0, 0x60 -/* 35884 8005A484 1440FFFA */ bnez $v0, .L8005A470 -/* 35888 8005A488 24630004 */ addiu $v1, $v1, 4 -/* 3588C 8005A48C 2A020060 */ slti $v0, $s0, 0x60 -.L8005A490: -/* 35890 8005A490 14400003 */ bnez $v0, .L8005A4A0 -/* 35894 8005A494 00000000 */ nop -.L8005A498: -/* 35898 8005A498 08016926 */ j .L8005A498 -/* 3589C 8005A49C 00000000 */ nop -.L8005A4A0: -/* 358A0 8005A4A0 8E24000C */ lw $a0, 0xc($s1) -/* 358A4 8005A4A4 10800003 */ beqz $a0, .L8005A4B4 -/* 358A8 8005A4A8 00000000 */ nop -/* 358AC 8005A4AC 0C00AB1E */ jal general_heap_free -/* 358B0 8005A4B0 00000000 */ nop -.L8005A4B4: -/* 358B4 8005A4B4 0C00AB1E */ jal general_heap_free -/* 358B8 8005A4B8 0220202D */ daddu $a0, $s1, $zero -/* 358BC 8005A4BC 00101080 */ sll $v0, $s0, 2 -/* 358C0 8005A4C0 3C01800B */ lui $at, %hi(D_800B4398) -/* 358C4 8005A4C4 00220821 */ addu $at, $at, $v0 -/* 358C8 8005A4C8 AC204398 */ sw $zero, %lo(D_800B4398)($at) -/* 358CC 8005A4CC 8FBF0018 */ lw $ra, 0x18($sp) -/* 358D0 8005A4D0 8FB10014 */ lw $s1, 0x14($sp) -/* 358D4 8005A4D4 8FB00010 */ lw $s0, 0x10($sp) -/* 358D8 8005A4D8 03E00008 */ jr $ra -/* 358DC 8005A4DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/world/render_effects.s b/asm/nonmatchings/world/world/render_effects.s deleted file mode 100644 index 5382c7b2cf..0000000000 --- a/asm/nonmatchings/world/world/render_effects.s +++ /dev/null @@ -1,48 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_effects -/* 352F4 80059EF4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 352F8 80059EF8 AFB10014 */ sw $s1, 0x14($sp) -/* 352FC 80059EFC 0000882D */ daddu $s1, $zero, $zero -/* 35300 80059F00 AFB00010 */ sw $s0, 0x10($sp) -/* 35304 80059F04 3C10800B */ lui $s0, %hi(D_800B4398) -/* 35308 80059F08 26104398 */ addiu $s0, $s0, %lo(D_800B4398) -/* 3530C 80059F0C AFBF0018 */ sw $ra, 0x18($sp) -.L80059F10: -/* 35310 80059F10 8E040000 */ lw $a0, ($s0) -/* 35314 80059F14 50800017 */ beql $a0, $zero, .L80059F74 -/* 35318 80059F18 26310001 */ addiu $s1, $s1, 1 -/* 3531C 80059F1C 8C830000 */ lw $v1, ($a0) -/* 35320 80059F20 30620001 */ andi $v0, $v1, 1 -/* 35324 80059F24 50400013 */ beql $v0, $zero, .L80059F74 -/* 35328 80059F28 26310001 */ addiu $s1, $s1, 1 -/* 3532C 80059F2C 30620008 */ andi $v0, $v1, 8 -/* 35330 80059F30 50400010 */ beql $v0, $zero, .L80059F74 -/* 35334 80059F34 26310001 */ addiu $s1, $s1, 1 -/* 35338 80059F38 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 3533C 80059F3C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 35340 80059F40 80420070 */ lb $v0, 0x70($v0) -/* 35344 80059F44 10400005 */ beqz $v0, .L80059F5C -/* 35348 80059F48 30620004 */ andi $v0, $v1, 4 -/* 3534C 80059F4C 50400009 */ beql $v0, $zero, .L80059F74 -/* 35350 80059F50 26310001 */ addiu $s1, $s1, 1 -/* 35354 80059F54 080167D9 */ j .L80059F64 -/* 35358 80059F58 00000000 */ nop -.L80059F5C: -/* 3535C 80059F5C 54400005 */ bnel $v0, $zero, .L80059F74 -/* 35360 80059F60 26310001 */ addiu $s1, $s1, 1 -.L80059F64: -/* 35364 80059F64 8C820010 */ lw $v0, 0x10($a0) -/* 35368 80059F68 8C420014 */ lw $v0, 0x14($v0) -/* 3536C 80059F6C 0040F809 */ jalr $v0 -/* 35370 80059F70 26310001 */ addiu $s1, $s1, 1 -.L80059F74: -/* 35374 80059F74 2A220060 */ slti $v0, $s1, 0x60 -/* 35378 80059F78 1440FFE5 */ bnez $v0, .L80059F10 -/* 3537C 80059F7C 26100004 */ addiu $s0, $s0, 4 -/* 35380 80059F80 8FBF0018 */ lw $ra, 0x18($sp) -/* 35384 80059F84 8FB10014 */ lw $s1, 0x14($sp) -/* 35388 80059F88 8FB00010 */ lw $s0, 0x10($sp) -/* 3538C 80059F8C 03E00008 */ jr $ra -/* 35390 80059F90 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/include/common_structs.h b/include/common_structs.h index 33d20a69b5..6b91843409 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -289,29 +289,34 @@ typedef ScriptInstance* ScriptList[MAX_SCRIPTS]; typedef struct Entity { /* 0x00 */ s32 flags; - /* 0x04 */ char unk_04[2]; - /* 0x06 */ s8 unk_06; - /* 0x07 */ char unk_08[4]; + /* 0x04 */ u8 listIndex; + /* 0x05 */ char unk_05; + /* 0x06 */ u8 unk_06; + /* 0x07 */ char unk_07[3]; + /* 0x0A */ u8 unk_0A; /* 0x0B */ u8 alpha; /* reported by rain */ /* 0x0C */ s16 aabb[3]; /* 0x12 */ char unk_12[2]; - /* 0x14 */ s16 unk_14; + /* 0x14 */ s16 virtualModelIndex; /* 0x16 */ s16 shadowIndex; - /* 0x18 */ char unk_18[16]; + /* 0x18 */ char unk_18[8]; + /* 0x20 */ UNK_PTR buildMatrixOverride; + /* 0x24 */ char unk_24[4]; /* 0x28 */ Bytecode* boundScript; /* 0x2C */ char unk_2C[12]; /* 0x38 */ struct StaticEntityData* static_data; - /* 0x3C */ char unk_3C[4]; - /* 0x40 */ struct Trigger* trigger; - /* 0x44 */ s32* vertexData; + /* 0x3C */ UNK_PTR unk_3C; // pointer to draw func(?) + /* 0x40 */ void* dataBuf; + /* 0x44 */ Mtx* vertexData; /* 0x48 */ Vec3f position; /* 0x54 */ Vec3f scale; /* 0x60 */ Vec3f rotation; /* 0x6C */ char unk_6C[4]; /* 0x70 */ struct Matrix4f* inverseTransformMatrix; /* world-to-local */ /* 0x74 */ char unk_74[60]; - /* 0xB0 */ u8 radius; /* Created by retype action */ - /* 0xB1 */ char unk_B1[71]; + /* 0xB0 */ float effectiveSize; + /* 0xB4 */ char unk_B4[4]; + /* 0xB8 */ Matrix4s transformMatrix; } Entity; // size = 0xF8 typedef Entity* EntityList[MAX_ENTITIES]; @@ -321,13 +326,15 @@ typedef UNK_TYPE* DynamicEntityList[MAX_DYNAMIC_ENTITIES]; typedef struct StaticEntityData { /* 0x00 */ s16 flags; /* 0x02 */ s16 argSize; - /* 0x04 */ char unk_04[8]; + /* 0x04 */ UNK_PTR unk_04; + /* 0x08 */ char unk_08[4]; /* 0x0C */ UNK_FUN_PTR(unk_data_func); /* 0x10 */ UNK_PTR unk_data_ptr1; /* 0x14 */ UNK_PTR unk_data_ptr2; /* 0x18 */ s32 dmaStart; /* 0x1C */ s32 dmaEnd; - /* 0x20 */ char unk_20[4]; + /* 0x20 */ s8 entityType; + /* 0x21 */ char unk_21[3]; } StaticEntityData; // size = 0x24 typedef struct MusicPlayer { @@ -471,7 +478,9 @@ typedef struct Camera { /* 0x084 */ f32 trueRotation[3]; /* 0x090 */ f32 currentBlendedYawNegated; /* 0x094 */ f32 currentPitch; - /* 0x098 */ char unk_98[60]; + /* 0x098 */ char unk_98[8]; + /* 0x0A0 */ Vp viewport; + /* 0x0B0 */ char unk_B0[0x24]; /* 0x0D4 */ struct Matrix4f perspectiveMatrix; /* 0x114 */ struct Matrix4f viewMtxPlayer; /* centers on player */ /* 0x154 */ struct Matrix4f viewMtxLeading; /* leads player slightly */ @@ -770,17 +779,41 @@ typedef struct StaticItem { /* 0x1D */ char unk_1D[3]; } StaticItem; // size = 0x20 +typedef struct EffectInstance { + /* 0x00 */ s32 flags; + /* 0x04 */ s32 effectIndex; + /* 0x08 */ s32 totalMatricies; + /* 0x0C */ void* unk_0C; + /* 0x10 */ struct Effect* effect; +} EffectInstance; + +typedef struct EffectBlueprint { + /* 0x00 */ s32 unk_00; + /* 0x04 */ s32 effectIndex; + /* 0x08 */ void (*init)(EffectInstance* effectInst); + /* 0x0C */ void (*update)(EffectInstance* effectInst); + /* 0x10 */ void (*renderWorld)(EffectInstance* effectInst); + /* 0x14 */ void (*unk_14)(EffectInstance* effectInst); +} EffectBlueprint; // size = 0x18 + typedef struct Effect { - /* 0x00 */ char unk_00[32]; + /* 0x00 */ s32 flags; + /* 0x04 */ s32 effectIndex; + /* 0x08 */ s32 instanceCounter; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ void (*update)(EffectInstance* effectInst); + /* 0x14 */ void (*renderWorld)(EffectInstance* effectInst); + /* 0x18 */ void (*unk_18)(EffectInstance* effectInst); + /* 0x1C */ void* unk_1C; } Effect; // size = 0x20 typedef struct EffectTableEntry { - /* 0x00 */ s32 dmaStart; - /* 0x04 */ s32 dmaEnd; - /* 0x08 */ s32 dmaDest; - /* 0x0C */ s32 unkStartRom; - /* 0x10 */ s32 unkEndRom; - /* 0x14 */ UNK_FUN_PTR(delegate); + /* 0x00 */ void (*entryPoint)(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 x, f32 y, f32 z); + /* 0x04 */ void* dmaStart; + /* 0x08 */ void* dmaEnd; + /* 0x0C */ void* dmaDest; + /* 0x10 */ void* unkStartRom; + /* 0x14 */ void* unkEndRom; } EffectTableEntry; // size = 0x18 typedef struct ItemEntity { @@ -906,11 +939,15 @@ typedef struct GameStatus { /* 0x078 */ s8 disableScripts; /* 0x079 */ char unk_79; /* 0x07A */ s8 musicEnabled; - /* 0x07B */ char unk_7B[2]; + /* 0x07B */ char unk_7B; + /* 0x07C */ s8 unk_7C; /* 0x07D */ s8 unk_7D; /* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */ /* 0x07F */ u8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */ - /* 0x080 */ char unk_80[4]; + /* 0x080 */ char unk_80; + /* 0x081 */ s8 unk_81; + /* 0x082 */ s8 unk_82; + /* 0x083 */ s8 unk_83; /* 0x084 */ s8 unk_84; /* 0x085 */ char unk_85; /* 0x086 */ s16 areaID; /* Created by retype action */ @@ -918,7 +955,8 @@ typedef struct GameStatus { /* 0x08A */ s16 changedArea; /* (1 = yes) */ /* 0x08C */ s16 mapID; /* 0x08E */ s16 entryID; - /* 0x090 */ char unk_90[4]; + /* 0x090 */ u16 unk_90; + /* 0x092 */ u16 unk_92; /* 0x094 */ f32 exitAngle; /* 0x098 */ Vec3f playerPos; /* 0x0A4 */ f32 playerYaw; @@ -938,7 +976,8 @@ typedef struct GameStatus { /* 0x134 */ u16 frameCounter; /* 0x136 */ char unk_136[2]; /* 0x138 */ s32 nextRNG; - /* 0x13C */ char unk_13C[4]; + /* 0x13C */ s16 unk_13C; + /* 0x13E */ char unk_13E[2]; /* 0x140 */ s32* shopItemData; /* 0x144 */ struct Shop* mapShop; /* 0x148 */ s16 enableBackground; /* (bit 2 is also used for something) */ @@ -975,9 +1014,11 @@ typedef struct PartnerAnimations { typedef struct Shadow { /* 0x00 */ s32 flags; - /* 0x04 */ char unk_04[12]; - /* 0x10 */ Vec3f position; - /* 0x1C */ Vec3f scale; + /* 0x04 */ char unk_04[2]; + /* 0x06 */ u8 unk_06; + /* 0x07 */ char unk_07[9]; + /* 0x10 */ struct Vec3f position; + /* 0x1C */ struct Vec3f scale; /* 0x28 */ char unk_28[80]; } Shadow; // size = 0x78 @@ -1590,8 +1631,86 @@ typedef struct { /* 0x1D */ char unk_1D[3]; } UIPanel; // size = 0x20 +// BEGIN ENTITY-SPECIFIC STRUCTS + +typedef struct struct802E2BA4 { + /* 0x00 */ char unk_00[2]; + /* 0x02 */ u16 unk_02[24][2]; +} struct802E2BA4; + +// from code_102c80, size unknown. +typedef struct struct802E1400 { + /* 0x000 */ Vec3f unk_00; + /* 0x00C */ char unk_0C[4]; + /* 0x010 */ s8 unk_10; + /* 0x011 */ s8 unk_11; + /* 0x014 */ Vec3f unk_14; + /* 0x020 */ u16 unk_20; + /* 0x022 */ s16 unk_22; + /* 0x024 */ s16 unk_24; + /* 0x028 */ Entity* attachedEntity; + /* 0x02C */ char unk_2C[8]; + /* 0x034 */ struct802E2BA4* unk_34; + /* 0x038 */ f32 unk_38; + /* 0x03C */ union { + /* */ s16 s; + /* */ s8 b[2]; + /* */ + } unk_3C; + /* 0x03E */ char unk_3E[0x4D]; + /* 0x08B */ u8 unk_8B[24]; + /* 0x0A3 */ char unk_A3; // padding? + /* 0x0A4 */ u8 unk_A4[24]; + /* 0x0BC */ char unk_BC[4]; + /* 0x0C0 */ f32 unk_C0[24]; + /* 0x120 */ char unk_120[4]; + /* 0x124 */ f32 unk_124[24]; + /* 0x184 */ char unk_184[4]; + /* 0x188 */ f32 unk_188[24]; +} struct802E1400; + +// from code_104940_len_dc0, size unknown +// appears to belong to the hammer blocks(?) +typedef struct struct802E3650 { + /* 0x000 */ u8 unk_00; + /* 0x001 */ char unk_01[2]; + /* 0x003 */ s8 unk_03; + /* 0x004 */ s16 unk_04; + /* 0x006 */ s16 unk_06; + /* 0x008 */ char unk_08[2]; + /* 0x00A */ u16 unk_0A; + /* 0x00C */ char unk_0C[2]; + /* 0x00E */ s16 unk_0E; + /* 0x010 */ s16 unk_10; + /* 0x012 */ s16 unk_12; + /* 0x014 */ f32 unk_14; + /* 0x018 */ f32 unk_18; + /* 0x01C */ char unk_1C[0x10C]; + /* 0x128 */ UNK_PTR unk_128; + /* 0x12C */ UNK_PTR unk_12C; +} struct802E3650; + +// size unknown +typedef struct struct802E4B10 { + /* 0x00 */ u8 unk_00; + /* 0x01 */ u8 unk_01; + /* 0x02 */ s8 unk_02; + /* 0x03 */ char unk_03[6]; + /* 0x09 */ u8 unk_09; + /* 0x0A */ u8 unk_0A; + /* 0x0B */ char unk_0B; // padding? + /* 0x0C */ s32 unk_0C; + /* 0x10 */ s32 unk_10; + /* 0x14 */ char unk_14[0xBC]; + /* 0xD0 */ u16 unk_D0; + /* 0xD4 */ f32 unk_D4[0]; +} struct802E4B10; + +// END ENTITY-SPECIFIC STRUCTS + typedef struct { - /* 0x00000 */ LookAt lookAt[2]; + /* 0x00000 */ Light l1[2]; + /* 0x00018 */ Light l2[2]; /* 0x00030 */ Matrix4s camPerspMatrix[8]; // could only be length 4, unsure /* 0x00230 */ s32 mainGfx[0x4100]; /* 0x10630 */ s32 smallGfx[0x400]; // used by func 800269EC diff --git a/include/enums.h b/include/enums.h index 68349ca77d..bc473bbd07 100644 --- a/include/enums.h +++ b/include/enums.h @@ -782,7 +782,7 @@ typedef UNK_TYPE Phase; #define Phase_MERLEE_EXP_BONUS 0x00000016 #define Phase_PLAYER_HAPPY 0x0000001E -typedef UNK_TYPE ActorID; +typedef s32 ActorID; #define ActorID_SELF 0xFFFFFF81 #define ActorID_PLAYER 0x00000000 #define ActorID_PARTNER 0x00000100 diff --git a/include/functions.h b/include/functions.h index 47058afc7e..c5aa63b0e3 100644 --- a/include/functions.h +++ b/include/functions.h @@ -31,6 +31,43 @@ void render_player_model(); f32 integrate_gravity(void); f32 get_clamped_angle_diff(f32, f32); +u32 get_entity_type(s32 arg0); +Entity* get_entity_by_index(s32 index); +s32 create_entity(StaticEntityData*, s32, s32, s32, s32, s32); +void func_80070550(s32, f32, f32, f32, f32, f32, s32, s32); +void func_802E263C(Entity* entity); + +void create_shadow_callback(Shadow* entity); +void func_802E10F4(Entity* entity); +void func_802E114C(void); +void func_802E117C(void); +void save_game_at_player_position(void); +void func_802E1204(Entity* entity); +void func_802E1270(Entity* entity); +void func_802E1298(void); +void func_802E12F8(void); +void func_802E1328(Entity* entity); +void func_802E1350(Entity* entity); +void func_802E13B8(Entity* entity); +void func_802E1400(Entity* entity); +void func_802E1460(Entity* entity); +void func_802E14D8(Entity* entity); +void func_802E1614(Entity* entity); +void func_802E1660(Entity* entity); +void func_802E1740(Entity* entity); +void func_802E176C(Entity* entity); +s32 func_802E17A8(Entity* entity); +void func_802E1EA8(Entity* entity); +void func_802E1EDC(Entity* entity); +void func_802E234C(Entity* entity); +f32 func_802E31EC(Entity* entity); +void func_802E328C(Entity* entity); +s32 func_802E3BA4(Entity* entity); +void entity_init_BlueSwitch(Entity* entity); +void entity_init_HugeBlueSwitch(Entity* entity); + +UNK_TYPE func_80072230(s32, f32, f32, f32, f32, s32); + // Text PrintContext* load_string(s32 stringID, s32* a1); void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, f32* outX, f32* outY, f32* outZ); @@ -135,6 +172,8 @@ void sort_items(void); s32 is_ability_active(s32 arg0); f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration); +s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, + s32 pickupVar); s32 make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 pickupVar); void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z); ItemEntity* get_item_entity(s32 itemEntityIndex); @@ -185,6 +224,7 @@ ScriptInstance* get_script_by_index(s32 index); void suspend_all_group(s32 groupFlags); void kill_script(ScriptInstance* instanceToKill); +void func_8010FD68(Entity* entity); void func_802D7460(f32 x, f32 y, f32 z, s32 arg3); void func_802D74C0(f32 x, f32 y, f32 z, s32 arg3); diff --git a/include/macros.h b/include/macros.h index c09358012a..02be32f6da 100644 --- a/include/macros.h +++ b/include/macros.h @@ -30,6 +30,7 @@ #define PLAYER_DATA (&gPlayerData) #define CAM(id) (&gCameras[id]) #define CURRENT_CAM (&gCameras[gCurrentCameraID]) +#define GET_MAP_ENTRY(cfg, idx) (&(*cfg->entryList)[idx]) #define BADGE_MENU_PAGE(index) (&gBadgeMenuPages[index]) #define ITEM_MENU_PAGE(index) (&gItemMenuPages[index]) diff --git a/include/map.h b/include/map.h index 03e9cb971e..44d64610d5 100644 --- a/include/map.h +++ b/include/map.h @@ -31,7 +31,7 @@ typedef struct MapConfig { } tattle; } MapConfig; // size = 0x40 -typedef s32 MapInit(void); +typedef s32(*MapInit)(void); #define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator. typedef struct Map { @@ -41,7 +41,7 @@ typedef struct Map { /* 0x0C */ void* dmaEnd; /* 0x10 */ void* dmaDest; /* 0x14 */ char* bgName; - /* 0x18 */ MapInit* init; ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading. + /* 0x18 */ MapInit init; ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading. /* 0x1C */ s16 unk_1C; // Unused? /* 0x1E */ s8 songVariation; ///< 0 or 1. @see get_song_variation_override_for_cur_map /* 0x1F */ s8 flags; diff --git a/include/stdlib/README.md b/include/stdlib/README.md new file mode 100644 index 0000000000..581fb48b4d --- /dev/null +++ b/include/stdlib/README.md @@ -0,0 +1 @@ +The headers here are from GCC 2.8.1 and can be found in the original source for the compiler as well as [our repo](https://github.com/pmret/gcc-papermario) with modifications made for Paper Mario. diff --git a/include/stdlib/stdarg.h b/include/stdlib/stdarg.h new file mode 100644 index 0000000000..24f3383198 --- /dev/null +++ b/include/stdlib/stdarg.h @@ -0,0 +1,205 @@ +/* stdarg.h for GNU. + Note that the type used in va_arg is supposed to match the + actual type **after default promotions**. + Thus, va_arg (..., short) is not valid. */ + +#ifndef _STDARG_H +#ifndef _ANSI_STDARG_H_ +#ifndef __need___va_list +#define _STDARG_H +#define _ANSI_STDARG_H_ +#endif /* not __need___va_list */ +#undef __need___va_list + +#ifdef __clipper__ +#include "va-clipper.h" +#else +#ifdef __m88k__ +#include "va-m88k.h" +#else +#ifdef __i860__ +#include "va-i860.h" +#else +#ifdef __hppa__ +#include "va-pa.h" +#else +#ifdef __mips__ +#include "va-mips.h" +#else +#ifdef __sparc__ +#include "va-sparc.h" +#else +#ifdef __i960__ +#include "va-i960.h" +#else +#ifdef __alpha__ +#include "va-alpha.h" +#else +#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) +#include "va-h8300.h" +#else +#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +#include "va-ppc.h" +#else +#ifdef __arc__ +#include "va-arc.h" +#else +#ifdef __M32R__ +#include "va-m32r.h" +#else +#ifdef __sh__ +#include "va-sh.h" +#else +#ifdef __mn10300__ +#include "va-mn10300.h" +#else +#ifdef __mn10200__ +#include "va-mn10200.h" +#else +#ifdef __v850__ +#include "va-v850.h" +#else + +/* Define __gnuc_va_list. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__) +typedef char *__gnuc_va_list; +#else +typedef void *__gnuc_va_list; +#endif +#endif + +/* Define the standard macros for the user, + if this invocation was from the user program. */ +#ifdef _STDARG_H + +/* Amount of space required in an argument list for an arg of type TYPE. + TYPE may alternatively be an expression whose type is used. */ + +#if defined(sysV68) +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (short) - 1) / sizeof (short)) * sizeof (short)) +#else +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) +#endif + +#define va_start(AP, LASTARG) \ + (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) + +#undef va_end +void va_end (__gnuc_va_list); /* Defined in libgcc.a */ +#define va_end(AP) ((void)0) + +/* We cast to void * and then to TYPE * because this avoids + a warning about increasing the alignment requirement. */ + +#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) +/* This is for little-endian machines; small args are padded upward. */ +#define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ + *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) +#else /* big-endian */ +/* This is for big-endian machines; small args are padded downward. */ +#define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ + *((TYPE *) (void *) ((char *) (AP) \ + - ((sizeof (TYPE) < __va_rounded_size (char) \ + ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) +#endif /* big-endian */ + +/* Copy __gnuc_va_list into another variable of this type. */ +#define __va_copy(dest, src) (dest) = (src) + +#endif /* _STDARG_H */ + +#endif /* not v850 */ +#endif /* not mn10200 */ +#endif /* not mn10300 */ +#endif /* not sh */ +#endif /* not m32r */ +#endif /* not arc */ +#endif /* not powerpc with V.4 calling sequence */ +#endif /* not h8300 */ +#endif /* not alpha */ +#endif /* not i960 */ +#endif /* not sparc */ +#endif /* not mips */ +#endif /* not hppa */ +#endif /* not i860 */ +#endif /* not m88k */ +#endif /* not clipper */ + +#ifdef _STDARG_H +/* Define va_list, if desired, from __gnuc_va_list. */ +/* We deliberately do not define va_list when called from + stdio.h, because ANSI C says that stdio.h is not supposed to define + va_list. stdio.h needs to have access to that data type, + but must not use that name. It should use the name __gnuc_va_list, + which is safe because it is reserved for the implementation. */ + +#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ +#undef _VA_LIST +#endif + +#ifdef _BSD_VA_LIST +#undef _BSD_VA_LIST +#endif + +#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) +/* SVR4.2 uses _VA_LIST for an internal alias for va_list, + so we must avoid testing it and setting it here. + SVR4 uses _VA_LIST as a flag in stdarg.h, but we should + have no conflict with that. */ +#ifndef _VA_LIST_ +#define _VA_LIST_ +#ifdef __i860__ +#ifndef _VA_LIST +#define _VA_LIST va_list +#endif +#endif /* __i860__ */ +typedef __gnuc_va_list va_list; +#ifdef _SCO_DS +#define __VA_LIST +#endif +#endif /* _VA_LIST_ */ +#else /* not __svr4__ || _SCO_DS */ + +/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. + But on BSD NET2 we must not test or define or undef it. + (Note that the comments in NET 2's ansi.h + are incorrect for _VA_LIST_--see stdio.h!) */ +#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) +/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ +#ifndef _VA_LIST_DEFINED +/* The macro _VA_LIST is used in SCO Unix 3.2. */ +#ifndef _VA_LIST +/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ +#ifndef _VA_LIST_T_H +typedef __gnuc_va_list va_list; +#endif /* not _VA_LIST_T_H */ +#endif /* not _VA_LIST */ +#endif /* not _VA_LIST_DEFINED */ +#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) +#define _VA_LIST_ +#endif +#ifndef _VA_LIST +#define _VA_LIST +#endif +#ifndef _VA_LIST_DEFINED +#define _VA_LIST_DEFINED +#endif +#ifndef _VA_LIST_T_H +#define _VA_LIST_T_H +#endif + +#endif /* not _VA_LIST_, except on certain systems */ + +#endif /* not __svr4__ */ + +#endif /* _STDARG_H */ + +#endif /* not _ANSI_STDARG_H_ */ +#endif /* not _STDARG_H */ diff --git a/include/stdlib/va-mips.h b/include/stdlib/va-mips.h new file mode 100644 index 0000000000..a622199388 --- /dev/null +++ b/include/stdlib/va-mips.h @@ -0,0 +1,276 @@ +/* ---------------------------------------- */ +/* VARARGS for MIPS/GNU CC */ +/* */ +/* */ +/* */ +/* */ +/* ---------------------------------------- */ + + +/* These macros implement varargs for GNU C--either traditional or ANSI. */ + +/* Define __gnuc_va_list. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +#if defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float) + +typedef struct { + /* Pointer to FP regs. */ + char *__fp_regs; + /* Number of FP regs remaining. */ + int __fp_left; + /* Pointer to GP regs followed by stack parameters. */ + char *__gp_regs; +} __gnuc_va_list; + +#else /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ + +typedef char * __gnuc_va_list; + +#endif /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ +#endif /* not __GNUC_VA_LIST */ + +/* If this is for internal libc use, don't define anything but + __gnuc_va_list. */ +#if defined (_STDARG_H) || defined (_VARARGS_H) + +#ifndef _VA_MIPS_H_ENUM +#define _VA_MIPS_H_ENUM +enum { + __no_type_class = -1, + __void_type_class, + __integer_type_class, + __char_type_class, + __enumeral_type_class, + __boolean_type_class, + __pointer_type_class, + __reference_type_class, + __offset_type_class, + __real_type_class, + __complex_type_class, + __function_type_class, + __method_type_class, + __record_type_class, + __union_type_class, + __array_type_class, + __string_type_class, + __set_type_class, + __file_type_class, + __lang_type_class +}; +#endif + +/* In GCC version 2, we want an ellipsis at the end of the declaration + of the argument list. GCC version 1 can't parse it. */ + +#if __GNUC__ > 1 +#define __va_ellipsis ... +#else +#define __va_ellipsis +#endif + +#ifdef __mips64 +#define __va_rounded_size(__TYPE) \ + (((sizeof (__TYPE) + 8 - 1) / 8) * 8) +#else +#define __va_rounded_size(__TYPE) \ + (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) +#endif + +#ifdef __mips64 +#define __va_reg_size 8 +#else +#define __va_reg_size 4 +#endif + +/* Get definitions for _MIPS_SIM_ABI64 etc. */ +#ifdef _MIPS_SIM +#include +#endif + +#ifdef _STDARG_H +#if defined (__mips_eabi) +#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) +#ifdef __mips64 +#define va_start(__AP, __LASTARG) \ + (__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \ + - (__builtin_args_info (2) < 8 \ + ? (8 - __builtin_args_info (2)) * __va_reg_size \ + : 0)), \ + __AP.__fp_left = 8 - __builtin_args_info (3), \ + __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size) +#else /* ! defined (__mips64) */ +#define va_start(__AP, __LASTARG) \ + (__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \ + - (__builtin_args_info (2) < 8 \ + ? (8 - __builtin_args_info (2)) * __va_reg_size \ + : 0)), \ + __AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \ + __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \ + __AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8)) +#endif /* ! defined (__mips64) */ +#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */ +#define va_start(__AP, __LASTARG) \ + (__AP = ((__gnuc_va_list) __builtin_next_arg (__LASTARG) \ + - (__builtin_args_info (2) >= 8 ? 0 \ + : (8 - __builtin_args_info (2)) * __va_reg_size))) +#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */ +#else /* ! defined (__mips_eabi) */ +#define va_start(__AP, __LASTARG) \ + (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG)) +#endif /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ +#else /* ! _STDARG_H */ +#define va_alist __builtin_va_alist +#ifdef __mips64 +/* This assumes that `long long int' is always a 64 bit type. */ +#define va_dcl long long int __builtin_va_alist; __va_ellipsis +#else +#define va_dcl int __builtin_va_alist; __va_ellipsis +#endif +#if defined (__mips_eabi) +#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) +#ifdef __mips64 +#define va_start(__AP) \ + (__AP.__gp_regs = ((char *) __builtin_next_arg () \ + - (__builtin_args_info (2) < 8 \ + ? (8 - __builtin_args_info (2)) * __va_reg_size \ + : __va_reg_size)), \ + __AP.__fp_left = 8 - __builtin_args_info (3), \ + __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size) +#else /* ! defined (__mips64) */ +#define va_start(__AP) \ + (__AP.__gp_regs = ((char *) __builtin_next_arg () \ + - (__builtin_args_info (2) < 8 \ + ? (8 - __builtin_args_info (2)) * __va_reg_size \ + : __va_reg_size)), \ + __AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \ + __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \ + __AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8)) +#endif /* ! defined (__mips64) */ +#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ +#define va_start(__AP) \ + (__AP = ((__gnuc_va_list) __builtin_next_arg () \ + - (__builtin_args_info (2) >= 8 ? __va_reg_size \ + : (8 - __builtin_args_info (2)) * __va_reg_size))) +#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ +/* Need alternate code for _MIPS_SIM_ABI64. */ +#elif defined(_MIPS_SIM) && (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32) +#define va_start(__AP) \ + (__AP = (__gnuc_va_list) __builtin_next_arg () \ + + (__builtin_args_info (2) >= 8 ? -8 : 0)) +#else +#define va_start(__AP) __AP = (char *) &__builtin_va_alist +#endif +#endif /* ! _STDARG_H */ + +#ifndef va_end +void va_end (__gnuc_va_list); /* Defined in libgcc.a */ +#endif +#define va_end(__AP) ((void)0) + +#if defined (__mips_eabi) + +#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) +#ifdef __mips64 +#define __va_next_addr(__AP, __type) \ + ((__builtin_classify_type (*(__type *) 0) == __real_type_class \ + && __AP.__fp_left > 0) \ + ? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \ + : (__AP.__gp_regs += __va_reg_size) - __va_reg_size) +#else +#define __va_next_addr(__AP, __type) \ + ((__builtin_classify_type (*(__type *) 0) == __real_type_class \ + && __AP.__fp_left > 0) \ + ? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \ + : (((__builtin_classify_type (* (__type *) 0) < __record_type_class \ + && __alignof__ (__type) > 4) \ + ? __AP.__gp_regs = (char *) (((int) __AP.__gp_regs + 8 - 1) & -8) \ + : (char *) 0), \ + (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ + ? (__AP.__gp_regs += __va_reg_size) - __va_reg_size \ + : ((__AP.__gp_regs += __va_rounded_size (__type)) \ + - __va_rounded_size (__type))))) +#endif +#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ +#ifdef __mips64 +#define __va_next_addr(__AP, __type) \ + ((__AP += __va_reg_size) - __va_reg_size) +#else +#define __va_next_addr(__AP, __type) \ + (((__builtin_classify_type (* (__type *) 0) < __record_type_class \ + && __alignof__ (__type) > 4) \ + ? __AP = (char *) (((int) __AP + 8 - 1) & -8) \ + : (char *) 0), \ + (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ + ? (__AP += __va_reg_size) - __va_reg_size \ + : ((__AP += __va_rounded_size (__type)) \ + - __va_rounded_size (__type)))) +#endif +#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ + +#ifdef __MIPSEB__ +#define va_arg(__AP, __type) \ + ((__va_rounded_size (__type) <= __va_reg_size) \ + ? *(__type *) (void *) (__va_next_addr (__AP, __type) \ + + __va_reg_size \ + - sizeof (__type)) \ + : (__builtin_classify_type (*(__type *) 0) >= __record_type_class \ + ? **(__type **) (void *) (__va_next_addr (__AP, __type) \ + + __va_reg_size \ + - sizeof (char *)) \ + : *(__type *) (void *) __va_next_addr (__AP, __type))) +#else +#define va_arg(__AP, __type) \ + ((__va_rounded_size (__type) <= __va_reg_size) \ + ? *(__type *) (void *) __va_next_addr (__AP, __type) \ + : (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ + ? **(__type **) (void *) __va_next_addr (__AP, __type) \ + : *(__type *) (void *) __va_next_addr (__AP, __type))) +#endif + +#else /* ! defined (__mips_eabi) */ + +/* We cast to void * and then to TYPE * because this avoids + a warning about increasing the alignment requirement. */ +/* The __mips64 cases are reversed from the 32 bit cases, because the standard + 32 bit calling convention left-aligns all parameters smaller than a word, + whereas the __mips64 calling convention does not (and hence they are + right aligned). */ +#ifdef __mips64 +#ifdef __MIPSEB__ +#define va_arg(__AP, __type) \ + ((__type *) (void *) (__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ + + __va_rounded_size (__type))))[-1] +#else +#define va_arg(__AP, __type) \ + ((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ + + __va_rounded_size (__type))), \ + *(__type *) (void *) (__AP - __va_rounded_size (__type))) +#endif + +#else /* not __mips64 */ + +#ifdef __MIPSEB__ +/* For big-endian machines. */ +#define va_arg(__AP, __type) \ + ((__AP = (char *) ((__alignof__ (__type) > 4 \ + ? ((int)__AP + 8 - 1) & -8 \ + : ((int)__AP + 4 - 1) & -4) \ + + __va_rounded_size (__type))), \ + *(__type *) (void *) (__AP - __va_rounded_size (__type))) +#else +/* For little-endian machines. */ +#define va_arg(__AP, __type) \ + ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \ + ? ((int)__AP + 8 - 1) & -8 \ + : ((int)__AP + 4 - 1) & -4) \ + + __va_rounded_size(__type))))[-1] +#endif +#endif +#endif /* ! defined (__mips_eabi) */ + +/* Copy __gnuc_va_list into another variable of this type. */ +#define __va_copy(dest, src) (dest) = (src) + +#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/include/stdlib/varargs.h b/include/stdlib/varargs.h new file mode 100644 index 0000000000..410d06aac6 --- /dev/null +++ b/include/stdlib/varargs.h @@ -0,0 +1,220 @@ +/* Record that this is varargs.h; this turns off stdarg.h. */ + +#ifndef _VARARGS_H +#define _VARARGS_H + +#ifdef __sparc__ +#include "va-sparc.h" +#else +#ifdef __spur__ +#include "va-spur.h" +#else +#ifdef __mips__ +#include "va-mips.h" +#else +#ifdef __i860__ +#include "va-i860.h" +#else +#ifdef __pyr__ +#include "va-pyr.h" +#else +#ifdef __clipper__ +#include "va-clipper.h" +#else +#ifdef __m88k__ +#include "va-m88k.h" +#else +#if defined(__hppa__) || defined(hp800) +#include "va-pa.h" +#else +#ifdef __i960__ +#include "va-i960.h" +#else +#ifdef __alpha__ +#include "va-alpha.h" +#else +#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) +#include "va-h8300.h" +#else +#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +#include "va-ppc.h" +#else +#ifdef __arc__ +#include "va-arc.h" +#else +#ifdef __M32R__ +#include "va-m32r.h" +#else +#ifdef __sh__ +#include "va-sh.h" +#else +#ifdef __mn10300__ +#include "va-mn10300.h" +#else +#ifdef __mn10200__ +#include "va-mn10200.h" +#else +#ifdef __v850__ +#include "va-v850.h" +#else + +#ifdef __NeXT__ + +/* On Next, erase any vestiges of stdarg.h. */ + +#ifdef _ANSI_STDARG_H_ +#define _VA_LIST_ +#endif +#define _ANSI_STDARG_H_ + +#undef va_alist +#undef va_dcl +#undef va_list +#undef va_start +#undef va_end +#undef __va_rounded_size +#undef va_arg +#endif /* __NeXT__ */ + +/* In GCC version 2, we want an ellipsis at the end of the declaration + of the argument list. GCC version 1 can't parse it. */ + +#if __GNUC__ > 1 +#define __va_ellipsis ... +#else +#define __va_ellipsis +#endif + +/* These macros implement traditional (non-ANSI) varargs + for GNU C. */ + +#define va_alist __builtin_va_alist +/* The ... causes current_function_varargs to be set in cc1. */ +#define va_dcl int __builtin_va_alist; __va_ellipsis + +/* Define __gnuc_va_list, just as in gstdarg.h. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) +typedef char *__gnuc_va_list; +#else +typedef void *__gnuc_va_list; +#endif +#endif + +#define va_start(AP) AP=(char *) &__builtin_va_alist + +#define va_end(AP) ((void)0) + +#if defined(sysV68) +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (short) - 1) / sizeof (short)) * sizeof (short)) +#else +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) +#endif + +#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) +/* This is for little-endian machines; small args are padded upward. */ +#define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ + *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) +#else /* big-endian */ +/* This is for big-endian machines; small args are padded downward. */ +#define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ + *((TYPE *) (void *) ((char *) (AP) \ + - ((sizeof (TYPE) < __va_rounded_size (char) \ + ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) +#endif /* big-endian */ + +/* Copy __gnuc_va_list into another variable of this type. */ +#define __va_copy(dest, src) (dest) = (src) + +#endif /* not v850 */ +#endif /* not mn10200 */ +#endif /* not mn10300 */ +#endif /* not sh */ +#endif /* not m32r */ +#endif /* not arc */ +#endif /* not powerpc with V.4 calling sequence */ +#endif /* not h8300 */ +#endif /* not alpha */ +#endif /* not i960 */ +#endif /* not hppa */ +#endif /* not m88k */ +#endif /* not clipper */ +#endif /* not pyr */ +#endif /* not i860 */ +#endif /* not mips */ +#endif /* not spur */ +#endif /* not sparc */ +#endif /* not _VARARGS_H */ + +/* Define va_list from __gnuc_va_list. */ + +#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ +#undef _VA_LIST +#endif + +#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) +/* SVR4.2 uses _VA_LIST for an internal alias for va_list, + so we must avoid testing it and setting it here. + SVR4 uses _VA_LIST as a flag in stdarg.h, but we should + have no conflict with that. */ +#ifndef _VA_LIST_ +#define _VA_LIST_ +#ifdef __i860__ +#ifndef _VA_LIST +#define _VA_LIST va_list +#endif +#endif /* __i860__ */ +typedef __gnuc_va_list va_list; +#ifdef _SCO_DS +#define __VA_LIST +#endif +#endif /* _VA_LIST_ */ + +#else /* not __svr4__ || _SCO_DS */ + +/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. + But on BSD NET2 we must not test or define or undef it. + (Note that the comments in NET 2's ansi.h + are incorrect for _VA_LIST_--see stdio.h!) */ +/* Michael Eriksson at Thu Sep 30 11:00:57 1993: + Sequent defines _VA_LIST_ in to be the type to + use for va_list (``typedef _VA_LIST_ va_list'') */ +#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) +/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ +#ifndef _VA_LIST_DEFINED +/* The macro _VA_LIST is used in SCO Unix 3.2. */ +#ifndef _VA_LIST +/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ +#ifndef _VA_LIST_T_H +typedef __gnuc_va_list va_list; +#endif /* not _VA_LIST_T_H */ +#endif /* not _VA_LIST */ +#endif /* not _VA_LIST_DEFINED */ +#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) +#define _VA_LIST_ +#endif +#ifndef _VA_LIST +#define _VA_LIST +#endif +#ifndef _VA_LIST_DEFINED +#define _VA_LIST_DEFINED +#endif +#ifndef _VA_LIST_T_H +#define _VA_LIST_T_H +#endif + +#endif /* not _VA_LIST_, except on certain systems */ + +#endif /* not __svr4__ */ + +/* The next BSD release (if there is one) wants this symbol to be + undefined instead of _VA_LIST_. */ +#ifdef _BSD_VA_LIST +#undef _BSD_VA_LIST +#endif diff --git a/include/variables.h b/include/variables.h index e74e945664..e41dd6ba53 100644 --- a/include/variables.h +++ b/include/variables.h @@ -87,6 +87,27 @@ extern PrintContext* gCurrentPrintContext; extern s32 D_802DB264; extern PrintContext* D_802DB268; +extern s32 D_802EB390; +extern s32 D_802EB394; +extern PrintContext* D_802EB398; +extern PrintContext* D_802EB39C; +extern s32 D_802E99DC; + +extern f64 D_802EB000; +extern f64 D_802EB008; + +extern Entity* D_802EB3A0; +extern s32 D_8015C7D0[3]; + +extern UNK_TYPE D_0A0031E0; +extern UNK_TYPE D_0A001508; +extern UNK_TYPE D_0A0031B0; +extern UNK_TYPE D_0A0014D8; +extern UNK_TYPE D_0A002F78; +extern UNK_TYPE D_0A001218; +extern UNK_TYPE D_0A003F70; +extern UNK_TYPE D_0A002318; + // Animation related extern AnimatedMeshList* gCurrentAnimMeshListPtr; @@ -232,6 +253,23 @@ extern u8 D_800779B0; extern u32 D_80078174; extern u8 D_800A0963; +extern UNK_TYPE D_802EB3B0; +extern UNK_TYPE D_00000094; +extern UNK_TYPE D_00000094_2; // two symbols resolve to the same addr. Required for matching +extern UNK_TYPE D_802EA0A0; +extern StaticEntityData D_802EA07C; +extern UNK_TYPE D_802EA310; +extern UNK_TYPE D_802EA618; +extern UNK_TYPE D_802EA63C; +extern UNK_TYPE D_802EA660; +extern s16 D_8015C7D2; + +extern UNK_TYPE D_0A000328; +extern UNK_TYPE D_0A000380; +extern UNK_TYPE D_0A000750; +extern UNK_TYPE D_0A000800; +extern UNK_TYPE D_0A000808; + // Scripts extern Bytecode* SCRIPT_NpcDefeat; extern Bytecode* ShakeCam1; @@ -256,4 +294,9 @@ extern Gfx* gMasterGfxPos; extern u16 gMatrixListPos; extern u16 gCurrentDisplayContextIndex; +extern UNK_TYPE D_0A004350; +extern UNK_TYPE D_0A0026F0; +extern UNK_TYPE D_802EAE7C; +extern f64 D_802EB370; + #endif diff --git a/src/code_102610_len_2330.c b/src/code_102610_len_2330.c index ce5f376525..b1b5eb9b50 100644 --- a/src/code_102610_len_2330.c +++ b/src/code_102610_len_2330.c @@ -1,22 +1,44 @@ #include "common.h" -INCLUDE_ASM(s32, "code_102610_len_2330", create_shadow_callback); -// Needs rodata support -/*void create_shadow_callback(Shadow* shadow) { +void create_shadow_callback(Shadow* shadow) { shadow->scale.x = 0.1f; shadow->scale.y = 0.1f; shadow->scale.z = 0.1f; -}*/ +} -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E0DB0); +//TODO: make sure this is the right struct for this. +s32 func_802E0DB0(Shadow* shadow) { + if ((shadow->unk_06 & 4) && (gPlayerStatus.flags & 2)) { + return TRUE; + } + return FALSE; +} INCLUDE_ASM(s32, "code_102610_len_2330", func_802E0DE0); -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E10F4); +typedef struct struct802E10F4 { + char unk_0[4]; + s16 angle; +} struct802E10F4; -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E114C); +void func_802E10F4(Entity* entity) { + struct802E10F4* temp; -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E117C); + temp = (struct802E10F4*)entity->dataBuf; + temp->angle = clamp_angle(temp->angle + 6); + func_802E3650(entity); +} + +void func_802E114C(void) { + func_80027088(TRUE); + disable_player_input(); + gPlayerStatusPtr->currentSpeed = 0.0f; +} + +void func_802E117C(void) { + func_80027088(FALSE); + enable_player_input(); +} void save_game_at_player_position(void) { GameStatus* gameStatus = GAME_STATUS; @@ -27,16 +49,66 @@ void save_game_at_player_position(void) { fio_save_game(gameStatus->saveSlot); } -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E1204); +void func_802E1204(Entity* entity) { -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E1270); + if (!get_global_flag(SI_SAVE_FLAG(95))) { + s32* temp = &D_802EB390; + *temp = 0; + load_string(0x1D0000, temp); + set_global_flag(SI_SAVE_FLAG(95)); + return; + } -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E1298); + func_8010FD68(entity); + func_8010FD68(entity); +} -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E12F8); +void func_802E1270(Entity* entity) { + s32* temp = &D_802EB390; -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E1328); + if (*temp != 0) { + func_8010FD68(entity); + } +} -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E1350); +void func_802E1298(void) { + s32* temp1 = &D_802EB390; + s32* temp2 = &D_802EB394; + *temp1 = 0; + *temp2 = 0; + D_802EB39C = load_string(0x1D0004, temp2); + D_802EB398 = load_string(0x1E000A, temp1); +} -INCLUDE_ASM(s32, "code_102610_len_2330", func_802E13B8); +void func_802E12F8(void) { + load_message_to_printer(0x1D0005, D_802EB39C); + play_sound(0x10); +} + +void func_802E1328(Entity* entity) { + s32* temp = &D_802EB394; + + if (*temp != 0) { + func_8010FD68(entity); + } +} + +void func_802E1350(Entity* entity) { + s32* temp = &D_802EB390; + if (*temp != 0) { + if (D_802EB398->unk_4E8 == 1) { + func_8010FBC0(entity, &D_802E99DC); + } else { + func_8010FD68(entity); + } + close_message(D_802EB39C); + } +} + +void func_802E13B8(Entity* entity) { + struct802E3650* temp = entity->dataBuf; + + entity_init_Hammer23Block_normal(entity); + entity->unk_3C = func_802E0DE0; + temp->unk_04 = 8; +} diff --git a/src/code_102C80.c b/src/code_102C80.c index ba1d7a8a8a..38be52b429 100644 --- a/src/code_102C80.c +++ b/src/code_102C80.c @@ -1,37 +1,576 @@ #include "common.h" -INCLUDE_ASM(s32, "code_102C80", func_802E1400); +void func_802E246C(Entity* entity, void* arg1, void* arg2); -INCLUDE_ASM(s32, "code_102C80", func_802E1460); +void func_802E1400(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + struct802E1400* temp = entity->dataBuf; -INCLUDE_ASM(s32, "code_102C80", func_802E14D8); + if (entity->unk_06 & 1) { + if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { + func_8010FD68(entity); + temp->unk_22 = 8; + } + } +} +void func_802E1460(Entity* entity) { + struct802E1400* temp = entity->dataBuf; + u16 temp2 = temp->unk_22--; + + if (temp2) { + entity->position.y -= D_802EB000; // 1.8625; + return; + } + func_80110678(entity); + func_8010FD68(entity); + temp->unk_22 = 8; +} + +void func_802E14D8(Entity* entity) { + struct802E1400* temp = entity->dataBuf; + u16 temp2 = temp->unk_22--; + + if (temp2) { + entity->position.y += D_802EB008; // 1.8625; + return; + } + func_8010FD68(entity); + temp->unk_22 = 8; +} + +void func_801125E8(f32*, f32*, f32*, f32*, f32*, f32*); + +#ifdef NON_MATCHING +// regalloc issues +void func_802E153C(Entity* entity) { + struct802E1400* temp_s1 = entity->dataBuf; + f32 hitDepth = 10.0f; + f32 x = entity->position.x; + f32 y = entity->position.y; + f32 z = entity->position.z; + f32 hitYaw; + f32 hitPitch; + + func_801125E8(&x, &y, &z, &hitYaw, &hitPitch, &hitDepth); + + if ((entity->position.y != y) && (entity->position.y > y)) { + temp_s1->unk_00.x += 0.5; + entity->position.y -= temp_s1->unk_00.x; + if (entity->position.y < y) { + entity->position.y = y; + } + } +} +#else INCLUDE_ASM(s32, "code_102C80", func_802E153C); +#endif -INCLUDE_ASM(s32, "code_102C80", func_802E1614); +void func_802E1614(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; -INCLUDE_ASM(s32, "code_102C80", func_802E1660); + if (entity->unk_06 & 1) { + if ((playerStatus->actionState == ActionState_GROUND_POUND) + || (playerStatus->actionState == ActionState_ULTRA_POUND)) { + func_8010FD68(entity); + } + } +} -INCLUDE_ASM(s32, "code_102C80", func_802E1740); +void func_802E1660(Entity* entity) { + struct802E1400* temp = entity->dataBuf; + PlayerStatus* playerStatus = &gPlayerStatus; + s8* temp2 = D_8010EBB0; -INCLUDE_ASM(s32, "code_102C80", func_802E176C); + func_802E153C(entity); -INCLUDE_ASM(s32, "code_102C80", func_802E17A8); + if (entity->unk_06 & 0x40) { + if (playerStatus->actionState == ActionState_HAMMER) { + if (gPlayerData.hammerLevel < 0) { + return; + } + func_8010FD68(entity); -INCLUDE_ASM(s32, "code_102C80", func_802E1EA8); + if (temp->attachedEntity == NULL) { + return; + } -INCLUDE_ASM(s32, "code_102C80", func_802E1EDC); + func_8010FD68(temp->attachedEntity); + return; + } + } -INCLUDE_ASM(s32, "code_102C80", func_802E234C); + if (playerStatus->actionState == ActionState_SPIN_JUMP) { + return; + } -INCLUDE_ASM(s32, "code_102C80", entity_init_BlueSwitch); + if ((temp2[3] == 4) && (temp2[0] != 0)) { + return; + } -INCLUDE_ASM(s32, "code_102C80", entity_init_HugeBlueSwitch); + if (!(entity->unk_06 & 1)) { + if (!(entity->unk_06 & 0x80)) { + return; + } + } -INCLUDE_ASM(s32, "code_102C80", func_802E2450); + func_8010FD68(entity); -INCLUDE_ASM(s32, "code_102C80", func_802E246C); + if (temp->attachedEntity == NULL) { + return; + } -INCLUDE_ASM(s32, "code_102C80", func_802E263C); + func_8010FD68(temp->attachedEntity); +} +void func_802E1740(Entity* entity) { + if (!(entity->unk_06 & 1)) { + func_8010FD68(entity); + } +} + +void func_802E176C(Entity* entity) { + struct802E1400* temp = entity->dataBuf; + + temp->unk_00.x = 1.0f; + temp->unk_00.y = 0.1f; + temp->unk_00.z = -0.1f; + temp->unk_10 = 0; + temp->unk_11 = 0; +} + +#ifdef NON_MATCHING +// needs rodata support +s32 func_802E17A8(Entity* entity) { + f32 temp_f0; + f32 temp_f2; + f32 temp_f4; + f32 temp_f6; + struct802E1400* temp_s0 = entity->dataBuf; + f32 phi_f4; + s32 phi_s2 = 0; + + switch (temp_s0->unk_10) { + case 0: // switch 1 + temp_f6 = temp_s0->unk_14.z * 0.3; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + case 1: // switch 1 + temp_f6 = temp_s0->unk_14.z * -0.2; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + case 2: // switch 1 + temp_f6 = temp_s0->unk_14.z * 0.15; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + case 3: // switch 1 + temp_f6 = temp_s0->unk_14.z * -0.1; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + case 4: // switch 1 + temp_f4 = (temp_s0->unk_14.x - entity->scale.x) / 4.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if (temp_s0->unk_14.x <= entity->scale.x) { + entity->scale.x = temp_s0->unk_14.x; + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + case 5: // switch 1 + phi_s2++; + break; + } + + entity->scale.z = entity->scale.x; + + switch (temp_s0->unk_11) { + + case 0: // switch 2 + temp_f6 = temp_s0->unk_14.z * -0.5; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + case 1: // switch 2 + temp_f6 = temp_s0->unk_14.z * 0.1; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + case 2: // switch 2 + temp_f6 = temp_s0->unk_14.z * -0.3; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + case 3: // switch 2 + temp_f6 = temp_s0->unk_14.z * 0.0; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + case 4: // switch 2 + temp_f4 = (temp_s0->unk_14.y - entity->scale.y) / 5.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if (entity->scale.y <= temp_s0->unk_14.y) { + entity->scale.y = temp_s0->unk_14.y; + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + case 5: // switch 2 + phi_s2++; + break; + } + + func_802E153C(entity); + if (phi_s2 == 2) { + temp_s0->unk_10 = 0; + temp_s0->unk_11 = 0; + func_8010FD68(entity); + } +} +#else +INCLUDE_ASM(s32, "code_102C80", func_802E17A8, Entity* entity); +#endif + +void func_802E1EA8(Entity* entity) { + struct802E1400* temp = entity->dataBuf; + set_area_flag(temp->unk_20); + func_80110678(entity); +} + +#ifdef NON_MATCHING +// needs rodata support +void func_802E1EDC(Entity* entity) { + f32 temp_f0; + f32 temp_f4; + f32 temp_f6; + struct802E1400* temp_s0 = entity->dataBuf; + f32 phi_f4; + s32 phi_s2 = 0; + + switch (temp_s0->unk_10) { + case 0: + temp_f6 = temp_s0->unk_14.z * 0.3; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + + case 1: + temp_f6 = (temp_s0->unk_14.z * -0.2); + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + + case 2: + temp_f6 = temp_s0->unk_14.z * 0.15; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + + case 3: + temp_f6 = temp_s0->unk_14.z * -0.1; + temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.y += phi_f4; + entity->scale.x += temp_s0->unk_00.y; + if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) { + temp_s0->unk_00.y = 0.0f; + temp_s0->unk_10++; + } + break; + + case 4: + phi_s2++; + break; + } + + entity->scale.z = entity->scale.x; + + switch (temp_s0->unk_11) { + case 0: + temp_f6 = temp_s0->unk_14.z * -0.5; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + + case 1: + temp_f6 = temp_s0->unk_14.z * 0.1; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0; + phi_f4 = temp_f4; + if (temp_f4 < 0.01) { + phi_f4 = 0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + + case 2: + temp_f6 = temp_s0->unk_14.z * -0.3; + temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0; + phi_f4 = temp_f4; + if (temp_f4 > -0.01) { + phi_f4 = -0.01f; + } + temp_s0->unk_00.z += phi_f4; + entity->scale.y += temp_s0->unk_00.z; + if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) { + temp_s0->unk_00.z = 0.0f; + temp_s0->unk_11++; + } + break; + + case 3: + phi_s2++; + break; + } + + func_802E153C(entity); + if (phi_s2 == 2) { + temp_s0->unk_10 = 0; + temp_s0->unk_11 = 0; + func_8010FD68(entity); + } + + temp_s0->unk_24++; + if ((temp_s0->unk_24 == 10) && (temp_s0->attachedEntity == NULL)) { + func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); + } +} +#else +INCLUDE_ASM(void, "code_102C80", func_802E1EDC, Entity* entity); +#endif + +void func_802E234C(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + struct802E1400* temp = entity->dataBuf; + + playerStatus->animFlags |= 0x1000000; + temp->unk_14.x = 1.0f; + temp->unk_14.y = 1.0f; + temp->unk_14.z = 1.0f; +} + +void entity_init_BlueSwitch(Entity* entity) { + Entity* temp_v0_2; + struct802E1400* temp = entity->dataBuf; + + func_802E234C(entity); + if (D_8015C7D0[0] == 2) { + D_802EB3A0 = entity; + return; + } + + if (D_8015C7D0[0] == 1) { + if (D_802EB3A0 != NULL) { + temp->attachedEntity = D_802EB3A0; + entity->flags |= 1; + return; + } + } else { + D_802EB3A0 = NULL; + } +} + +void entity_init_HugeBlueSwitch(Entity* entity) { + struct802E1400* temp; + + func_802E234C(entity); + temp = entity->dataBuf; + entity->scale.x = 3.0f; + entity->scale.y = 3.0f; + entity->scale.z = 3.0f; + temp->unk_14.x = 3.0f; + temp->unk_14.y = 3.0f; + temp->unk_14.z = 3.0f; +} + +void func_802E2450(Entity* entity) { + func_802E3650(entity); +} + + +INCLUDE_ASM(void, "code_102C80", func_802E246C, Entity* entity, void* arg1, void* arg2); + +INCLUDE_ASM(void, "code_102C80", func_802E263C, Entity* entity); + +#ifdef NON_MATCHING +// display list issues +void func_802E2BA4(s32 entityIndex) { + Gfx* temp_s2; + struct802E1400* temp_s4; + struct802E2BA4* phi_fp; + Matrix4f subroutine_arg6; + Matrix4f subroutine_arg16; + Matrix4f subroutine_arg36; + Matrix4f subroutine_arg48; + s32 i; + f32 x_inv; + f32 y_inv; + f32 z_inv; + Entity* entity; + f32 threeSixty; + f32 someFloat; + f32 one; + s16 temp; + + temp_s2 = gMasterGfxPos; + threeSixty = 360.0f; + someFloat = 0.00390625f; + entity = get_entity_by_index(entityIndex); + temp_s4 = entity->dataBuf; + x_inv = -entity->position.x; + y_inv = -entity->position.y; + z_inv = -entity->position.z; + phi_fp = temp_s4->unk_34; + for (i = 0; i < 24; i++) { + if (temp_s4->unk_3C.s == 0xFF) { + gDPSetRenderMode(temp_s2++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + gDPSetCombineMode(temp_s2++, G_CC_MODULATEIA, G_CC_MODULATEIA); + } else { + gDPSetCombineLERP(temp_s2++, 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0); + gDPSetPrimColor(temp_s2++, 0, 0, 0x00, 0x00, 0x00, temp_s4->unk_3C.b[1]) + } + guTranslateF(&subroutine_arg6, x_inv, y_inv, z_inv); + guRotateF(&subroutine_arg36, temp_s4->unk_8B[i] * threeSixty * someFloat, 1.0f, 0.0f, 0.0f); + guRotateF(&subroutine_arg48, temp_s4->unk_A4[i] * threeSixty * someFloat, 0.0f, 1.0f, 0.0f); + guMtxCatF(&subroutine_arg36, &subroutine_arg48, &subroutine_arg48); + guMtxCatF(&subroutine_arg48, &subroutine_arg6, &subroutine_arg6); + guTranslateF(&subroutine_arg16, temp_s4->unk_C0[i], temp_s4->unk_124[i], temp_s4->unk_188[i]); + guMtxCatF(&subroutine_arg6, &subroutine_arg16, &subroutine_arg16); + guMtxF2L(&subroutine_arg16, &gDisplayContext->matrixStack[gMatrixListPos]); + gSPMatrix(temp_s2++, &gDisplayContext->matrixStack[++gMatrixListPos], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); + gSPDisplayList(temp_s2++, entity->vertexData + phi_fp->unk_02[i][0]); + gSPPopMatrix(temp_s2++, G_MTX_MODELVIEW); + } + gMasterGfxPos = temp_s2; +} +#else INCLUDE_ASM(s32, "code_102C80", func_802E2BA4); +#endif diff --git a/src/code_104730.c b/src/code_104730.c index 585e174008..d82b401348 100644 --- a/src/code_104730.c +++ b/src/code_104730.c @@ -1,5 +1,328 @@ #include "common.h" -INCLUDE_ASM(s32, "code_104730", func_802E2EB0); +void func_802E2EB0(Entity* entity); -INCLUDE_ASM(s32, "code_104730", func_802E2FD0); +extern UNK_TYPE D_802E9170; +extern UNK_TYPE D_802E91F0; +extern UNK_TYPE D_802E9270; +extern UNK_TYPE D_802E92B0; + +extern UNK_TYPE D_0A003508; +extern UNK_TYPE D_00E4B2E0; +extern UNK_TYPE D_00E4E7F0; +extern UNK_TYPE D_0A000EF8; +extern UNK_TYPE D_0A000EF8; +extern UNK_TYPE D_0A000EE8; +extern UNK_TYPE D_0A000740; + +extern UNK_TYPE D_00E62AC0; +extern UNK_TYPE D_00E639C0; +extern UNK_TYPE D_00E639C0; +extern UNK_TYPE D_00E648D0; +extern UNK_TYPE D_00E639C0; +extern UNK_TYPE D_00E648D0; +extern UNK_TYPE D_00E62370; +extern UNK_TYPE D_00E62AC0; + +extern UNK_TYPE D_0A0031E0; +extern UNK_TYPE D_0A001508; +extern UNK_TYPE D_0A0031B0; +extern UNK_TYPE D_0A0014D8; +extern UNK_TYPE D_0A002F78; +extern UNK_TYPE D_0A001218; +extern UNK_TYPE D_0A003F70; +extern UNK_TYPE D_0A002318; + +Gfx D_802E96F0[] = { + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), + gsDPPipeSync(), + gsDPSetTexturePersp(G_TP_PERSP), + gsDPSetTextureDetail(G_TD_CLAMP), + gsDPSetTextureLOD(G_TL_TILE), + gsDPSetTextureLUT(G_TT_NONE), + gsDPSetTextureFilter(G_TF_BILERP), + gsDPSetTextureConvert(G_TC_FILT), + gsSPEndDisplayList(), +}; + +Gfx D_802E9738[] = { + gsSPDisplayList(&D_802E96F0), + gsDPSetTextureLUT(G_TT_NONE), + gsDPLoadTextureTile_4b(&D_802E9170, G_IM_FMT_I, 16, 0, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD), + gsSPEndDisplayList(), +}; + +Gfx D_802E9788[] = { + gsSPDisplayList(&D_802E96F0), + gsDPSetTextureLUT(G_TT_NONE), + gsDPLoadTextureTile_4b(&D_802E91F0, G_IM_FMT_I, 16, 0, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD), + gsSPEndDisplayList(), +}; + +Gfx D_802E97B0[] = { + gsSPDisplayList(&D_802E9738), + gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH), + gsSPVertex(&D_802E92B0, 4, 0), + gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), + gsSPEndDisplayList(), +}; + +Gfx D_802E97D8[] = { + gsSPDisplayList(&D_802E9788), + gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH), + gsSPVertex(&D_802E9270, 4, 0), + gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), + gsSPEndDisplayList(), +}; + +Gfx D_802E9828[] = { + gsSPEndDisplayList(), +}; + +// Entity "script" data; unknown if it's used or not. +s32 D_802E9830[8] = { + 0x00000001, 0x0000003C, (s32) &D_802E9828, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; + +s32 D_802E9850[9] = { + 0x00000005, 0x00000800, 0x00000004, 0x00000020, + 0x00000001, 0x0000003C, (s32) &D_802E97D8, 0x00000002, + 0x00000000 +}; + +s32 D_802E9874[9] = { + 0x00000005, 0x00000800, 0x00000004, 0x00000020, + 0x00000001, 0x0000003C, (s32) &D_802E97D8, 0x00000002, + 0x00000000 +}; +s32 D_802E9898[9] = { + 0x00000005, 0x00000800, 0x00000004, 0x00000020, + 0x00000001, 0x0000003C, &D_802E97B0, 0x00000002, + 0x00000000, +}; + +s32 D_802E98BC[8] = { + 0x00200000, (s32) &D_802E9850, 0x00000000, (s32)create_shadow_callback, + 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; + +s32 D_802E98DC[9] = { + 0x01190A19, 0x00200000, (s32) &D_802E9874, 0x00000000, + (s32)create_shadow_callback, 0x00000000, 0x00000000, 0x00000000, + 0x00000000 +}; + +s32 D_802E9900[9] = { + 0x01190A19, 0x00200000, (s32) &D_802E9898, 0x00000000, + (s32)create_shadow_callback, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, +}; + +s32 D_802E9924[3] = { + 0x01190A19, 0x00000000, 0x00000000 +}; + +s32 D_802E9930[51] = { + 0x00000003, 0x00000000, (s32)func_802E10F4, 0x00000009, + 0x0000014E, 0x00000002, (s32)func_802E114C, 0x00000002, + (s32)func_802E31EC, 0x00000003, 0x00000006, (s32)func_802E328C, + 0x00000003, 0x00000002, 0x00000000, 0x00000002, + (s32)func_802E1204, 0x00000003, 0x00000000, (s32)func_802E1270, + 0x00000003, 0x0000000E, 0x00000000, 0x00000002, + (s32)func_802E1298, 0x00000003, 0x00000000, (s32)func_802E1350, + 0x00000002, (s32)save_game_at_player_position, 0x00000002, (s32)func_802E12F8, + 0x00000003, 0x00000000, (s32)func_802E1328, 0x00000002, + (s32)func_802E117C, 0x00000003, 0x0000000C, 0x00000000, + 0x00000004, 0x00000000, 0x00000000, 0x00000002, + (s32)func_802E117C, 0x00000003, 0x00000002, 0x00000000, + 0x00000001, (s32)D_802E9930, 0x00000000, +}; + +s32 D_802E99FC[7] = { + + 0x00000004, 0x00000022, 0x00000001, 0x0000003C, + &D_0A003508, 0x00000002, 0x00000000, +}; + +StaticEntityData D_802E9A18 = { 0x4200, 0x0020, &D_802E99FC, {0, 0, 0, 0}, func_802E13B8, &D_802E9930, func_802E3BA4, &D_00E4B2E0, &D_00E4E7F0, 32, {0x19, 0x19, 0x19}}; + +// potential file split(?) +s32 D_802E9A3C[1] = { + 0x00000000 +}; + +s32 D_802E9A40[18] = { + 0x00000003, 0x00000000, (s32)func_802E1660, 0x00000009, + 0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, + (s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E17A8, + 0x00000003, 0x00000000, (s32)func_802E1740, 0x00000004, + 0x00000000, 0x00000000, +}; + +s32 D_802E9A88[15] = { + 0x00000003, 0x00000000, (s32)func_802E1614, 0x00000009, + 0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, + (s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E1EDC, + 0x00000007, 0x20000000, 0x00000000 +}; + +s32 D_802E9AC4[15] = { + 0x00000003, 0x00000000, (s32)func_802E1660, 0x00000009, + 0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, + (s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E1EDC, + 0x00000007, 0x20000000, 0x00000000 +}; + +s32 D_802E9B00[16] = { + 0x00000003, 0x00000000, (s32)func_802E1400, 0x00000003, + 0x00000000, (s32)func_802E1460, 0x00000009, 0x00000152, + 0x00000003, 0x00000080, 0x00000000, 0x00000003, + 0x00000000, (s32)func_802E14D8, 0x00000004, 0x00000000, +}; + +s32 D_802E9B40[7] = { + 0x00000004, 0x00000011, 0x00000001, 0x0000003C, + &D_0A000EF8, 0x00000002, 0x00000000, +}; + +s32 D_802E9B5C[7] = { + 0x00000004, 0x00000011, 0x00000001, 0x0000003C, + (s32) &D_0A000EF8, 0x00000002, 0x00000000, +}; + +s32 D_802E9B78[7] = { + 0x00000004, 0x00000011, 0x00000001, 0x0000003C, + (s32) &D_0A000EE8, 0x00000002, 0x00000000 +}; + +s32 D_802E9B94[7] = { + 0x00000004, 0x00000001, 0x00000001, 0x0000003C, + (s32) &D_0A000740, 0x00000002, 0x00000000, +}; + +StaticEntityData D_802E9BB0 = { 0xA000, 0x002C, &D_802E9B78, {0, 0, 0, 0}, func_802E234C, &D_802E9A40, NULL, &D_00E62AC0, &D_00E639C0, 8, {0x16, 0x17, 0x16} }; +StaticEntityData D_802E9BD4 = { 0xAA04, 0x002C, &D_802E9B40, {0, 0, 0, 0}, entity_init_BlueSwitch, &D_802E9AC4, NULL, &D_00E639C0, &D_00E648D0, 7, {0x16, 0x17, 0x16} }; +StaticEntityData D_802E9BF8 = { 0xAA04, 0x002C, &D_802E9B5C, {0, 0, 0, 0}, entity_init_HugeBlueSwitch, &D_802E9A88, NULL, &D_00E639C0, &D_00E648D0, 9, {0x42, 0x4B, 0x42} }; +StaticEntityData D_802E9C1C = { 0xC000, 0x002C, &D_802E9B94, {0, 0, 0, 0}, func_802E234C, &D_802E9B00, NULL, &D_00E62370, &D_00E62AC0, 10, {0x32, 0x0F, 0x32} }; + +s32 D_802E9C40[12] = { + 0x00000007, 0x00000020, 0x00000003, 0x00000000, + func_802E263C, 0x00000007, 0x00000001, 0x00000007, + 0x20000000, 0x00000000, 0x00000000, 0x00000000 +}; + +s32 D_802E9C70[7] = { + 0x00000004, 0x00000011, 0x00000001, 0x0000003C, + (s32) &D_802E9828, 0x00000002, 0x00000000 +}; + +extern UNK_TYPE D_00E32420; +extern UNK_TYPE D_00E35670; +extern UNK_TYPE D_00E38890; +extern UNK_TYPE D_00E3B870; +extern UNK_TYPE D_00E3E260; +extern UNK_TYPE D_00E42240; + +StaticEntityData D_802E9C8C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 21, {0x10, 0x10, 0x10}}; +StaticEntityData D_802E9CB0 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 22, {0x10, 0x10, 0x10}}; +StaticEntityData D_802E9CD4 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 23, {0x10, 0x10, 0x10}}; +StaticEntityData D_802E9CF8 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 24, {0x08, 0x08, 0x08}}; +StaticEntityData D_802E9D1C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 25, {0x08, 0x08, 0x08}}; +StaticEntityData D_802E9D40 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 26, {0x08, 0x08, 0x08}}; +StaticEntityData D_802E9D64 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E3E260, &D_00E42240, 13, {0x08, 0x08, 0x08}}; + +void func_802E2EB0(Entity* entity) { + u32 type; + void* a2 = NULL; + void* a1 = NULL; + + ((struct802E1400*)entity->dataBuf)->unk_38 = entity->position.y; + type = get_entity_type((u8)entity->listIndex); + + if ((type - 24) < 3) { + entity->scale.x = 0.5f; + entity->scale.y = 0.5f; + entity->scale.z = 0.5f; + } + + switch (type) { + case 21: + case 24: + a1 = &D_0A0031E0; + a2 = &D_0A001508; + break; + case 22: + case 25: + a1 = &D_0A0031B0; + a2 = &D_0A0014D8; + break; + case 23: + case 26: + a1 = &D_0A002F78; + a2 = &D_0A001218; + break; + case 13: + play_sound_at_position(0x158, 0, entity->position.x, entity->position.y, entity->position.z); + a1 = &D_0A003F70; + a2 = &D_0A002318; + break; + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + break; + } + + if (a2 == NULL) { + return; + } + + func_802E246C(entity, a1, a2); +} + +void func_802E2FD0(Entity* entity) { + u32 type; + StaticEntityData* addr = NULL; + + type = get_entity_type(entity->listIndex); + + switch (type) { + case 21: + addr = &D_802E9C8C; + break; + case 24: + addr = &D_802E9CF8; + break; + case 22: + addr = &D_802E9CB0; + break; + case 25: + addr = &D_802E9D1C; + break; + case 23: + addr = &D_802E9CD4; + break; + case 26: + addr = &D_802E9D40; + break; + case 13: + addr = &D_802E9D64; + break; + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + break; + } + + if (addr == NULL) { + return; + } + + create_entity(addr, entity->position.x, entity->position.y, entity->position.z, 0, 0x80000000); +} diff --git a/src/code_104940_len_dc0.c b/src/code_104940_len_dc0.c index 00619eff78..09e60056ff 100644 --- a/src/code_104940_len_dc0.c +++ b/src/code_104940_len_dc0.c @@ -1,37 +1,337 @@ #include "common.h" +// TODO: replace usages of these with proper constants +extern f64 D_802EB1D0; // 0.09 +extern f64 D_802EB1D8; // 0.045 +extern f64 D_802EB1E0; // 0.18 +extern f64 D_802EB1E8; // 0.09 +extern f64 D_802EB1F0; // 1.2 +extern f64 D_802EB1F8; // 0.3 +extern f64 D_802EB200; // 1.2 +extern f64 D_802EB208; // 0.3 + +//display list func INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E30C0); -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E31B0); +void func_802E31B0(Entity* entity) { + func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); +} -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E31EC); +f32 func_802E31EC(Entity* entity) { -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E328C); + if ((get_entity_type(entity->listIndex) - 24) < 3) { + entity->scale.y = 0.23f; + entity->scale.x = 1.04f; + entity->scale.z = 1.04f; + entity->position.y += 18.0f; + } else { + entity->scale.y = 0.46f; + entity->scale.x = 2.08f; + entity->scale.z = 2.08f; + entity->position.y += 18.0f; + } +} + +void func_802E328C(Entity* entity) { + + if ((get_entity_type(entity->listIndex) - 24) < 3) { + entity->scale.x -= D_802EB1D0; + entity->scale.z -= D_802EB1D0; + entity->scale.y += D_802EB1D8; + entity->position.y -= 3.0f; + } else { + entity->scale.x -= D_802EB1E0; + entity->scale.z -= D_802EB1E0; + entity->scale.y += D_802EB1E8; + entity->position.y -= 3.0f; + } + func_802E3650(entity); +} INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3370); -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3650); +s32 func_802E3650(Entity* entity) { + struct802E3650* temp = (struct802E3650*)entity->dataBuf; + s32 ret = 0; -INCLUDE_ASM(s32, "code_104940_len_dc0", entity_init_Hammer23Block_normal); + if (func_80112B20() != 0) { + if (entity->flags & 0x200000) { + ret = 1; + func_802E3370(entity); + if (temp->unk_10 != -1) { + ItemEntity* itemEntity = get_item_entity(temp->unk_10); + itemEntity->position.y = entity->position.y + 4.0f; + } + } + } -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3714); + return ret; +} -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3728); +void entity_init_Hammer23Block_normal(Entity* entity) { + struct802E3650* temp = (struct802E3650*)entity->dataBuf; + f32 posY; -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E37E4); + temp->unk_10 = -1; + temp->unk_14 = entity->position.y; + temp->unk_0E = -1; + entity->flags &= ~0x200000; +} -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3898); +void func_802E3714(Entity* entity) { + struct802E3650* temp = (struct802E3650*)entity->dataBuf; -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E38D8); + temp->unk_18 = 90.0f; +} -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3A00); +void func_802E3728(Entity* entity) { + f64 temp_f20; + struct802E3650* temp = (struct802E3650*)entity->dataBuf; -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3A48); + func_802E3A00(entity); + temp_f20 = entity->position.y; + entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f) * 2); + temp->unk_18 += 60.0f; + if (temp->unk_18 > 450.0f) { + temp->unk_18 = clamp_angle(temp->unk_18); + func_8010FD68(entity); + } +} -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3B08); +void func_802E37E4(Entity* entity) { + f64 temp_f20; + struct802E3650* temp = (struct802E3650*)entity->dataBuf; -INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3BA4); + func_802E3A00(entity); + temp_f20 = entity->position.y; + entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f)); + temp->unk_18 += 60.0f; + if (temp->unk_18 >= 360.0f) { + temp->unk_18 = 0.0f; + entity->position.y = temp->unk_14; + func_8010FD68(entity); + } +} -INCLUDE_ASM(s32, "code_104940_len_dc0", entity_init_Hammer1Block_normal); +void func_802E3898(Entity* entity) { + struct802E3650* temp; -INCLUDE_ASM(s32, "code_104940_len_dc0", entity_init_HammerBlock_small); + entity_init_Hammer23Block_normal(entity); + temp = (struct802E3650*)entity->dataBuf; + temp->unk_04 = 0xA; + temp->unk_06 = 0x7B; + temp->unk_0A = 0xFFFF; +} + +extern s32 D_802E9E54; +extern StaticEntityData D_802EA07C; + +void func_802E38D8(Entity* entity) { + struct802E3650* temp = (struct802E3650*)entity->dataBuf; + s32 phi_v1; + s32 phi_v0; + + if (temp->unk_04 > 0) { + if (temp->unk_04 == 10) { + phi_v1 = 21; + phi_v0 = temp->unk_0A; + } else { + phi_v1 = 20; + phi_v0 = 0; + } + make_item_entity_nodelay(0x157, entity->position.x, entity->position.y + 28.0, entity->position.z, phi_v1, phi_v0); + temp->unk_04 -= 1; + } + + if ((temp->unk_04 == 0) || (temp->unk_06 == 0)) { + temp->unk_03 = 1; + func_8010FBC0(get_entity_by_index(create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, + entity->rotation.y, 0x80000000)), &D_802E9E54); + entity->flags |= 0x20000020; + } +} + +void func_802E3A00(Entity* entity) { + u16 temp_v0; + struct802E3650* temp = (struct802E3650*)entity->dataBuf; + s16 phi_return; + + if (entity->unk_0A == 0xE) { + if (temp->unk_04 != 0xA) { + temp->unk_06 -= 1; + if (temp->unk_06 < 0) { + temp->unk_06 = 0; + temp->unk_04 = 1; + } + } + } +} + +void func_802E3A48(Entity* entity) { + s32 temp_v0; + struct802E3650* temp = (struct802E3650*)entity->dataBuf; + + if ((entity->unk_06 & 0x80) != 0) { + func_8010FD68(entity); + return; + } + func_802E3A00(entity); + func_802E3650(entity); + if (temp->unk_03 != 0) { + create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); + entity->flags |= 0x20000020; + } +} + +void func_802E3B08(Entity* entity) { + s32 temp_v0; + u16 temp_v1; + struct802E3650* temp = entity->dataBuf; + + if (temp->unk_0A != 0xFFFF) { + if (get_global_flag(temp->unk_0A) != 0) { + create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); + entity->flags |= 0x20000020; + } + } +} + +extern s32 D_802E9E80; + +#ifdef NON_MATCHING +// tail merge + rodata +s32 func_802E3BA4(Entity* entity) { + u8 bVar1; + s32 bVar2; + s32 iVar3; + s32 uVar4; + PlayerStatus* playerStatus = &gPlayerStatus; + + if ((entity->alpha == 0) && ((entity->unk_06 & 1) != 0)) { + return 0; + } + + bVar1 = entity->unk_06; + if (bVar1 & 4) { + s32 type = get_entity_type(entity->listIndex); + if (type == 0xC) { + return 0; + } + + if (type >= 0xC) { + if (type < 0x1b) { + if (type > 0x14) { + return 0; + } + } + } + + if (!(playerStatus->flags & 2)) { + return 1; + } + func_8010FD68(entity); + return 1; + } + if (bVar1 & 0x80) { + func_8010FD68(entity); + return 1; + } + + bVar2 = FALSE; + if (bVar1 & 1) { + if ((playerStatus->actionState == 0xd) || (playerStatus->actionState == 0x0f)) { + return 0; + } + + if ((playerStatus->actionState == 0x0e) || (playerStatus->actionState == 0x10)) { + bVar2 = TRUE; + } else { + return 1; + } + } else { + if (!(bVar1 & 0x40)) { + return 1; + } + if ((playerStatus->flags & 0x1000000) == 0) { + return 1; + } + } + + switch (get_entity_type(entity->listIndex)) { + default: + break; + case 0x15: + case 0x18: + if (bVar2) { + if (gPlayerData.bootsLevel < 1) { + bVar2 = FALSE; + } + } else { + if (gPlayerData.hammerLevel > -1) { + bVar2 = TRUE; + } + } + if (!bVar2) { + return 1; + } + func_8010FBC0(entity, &D_802E9E80); + play_sound_at_position(0x14f, 0, entity->position.x, entity->position.y, entity->position.z); + break; + case 0x16: + case 0x19: + if (bVar2) { + if (gPlayerData.bootsLevel < 2) { + bVar2 = FALSE; + } + } else if (gPlayerData.hammerLevel > 0) { + bVar2 = TRUE; + } + if (!bVar2) { + return 1; + } + func_8010FBC0(entity, &D_802E9E80); + play_sound_at_position(0x150, 0, entity->position.x, entity->position.y, entity->position.z); + break; + case 0x17: + case 0x1a: + if (gPlayerData.hammerLevel < '\x02') { + return 1; + } + func_8010FBC0(entity, &D_802E9E80); + play_sound_at_position(0x151, 0, entity->position.x, entity->position.y, entity->position.z); + break; + case 0x1b: + case 0x1c: + case 0x1d: + case 0x1e: + case 0x1f: + func_80110678(entity); + func_8010FD68(entity); + return 1; + case 0xb: + func_80110678(entity); + break; + } + return 1; +} +#else +INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3BA4, Entity* entity); +#endif + +void entity_init_Hammer1Block_normal(Entity* entity) { + entity_init_Hammer23Block_normal(entity); + entity->unk_3C = func_802E30C0; +} + +s32 entity_init_HammerBlock_small(Entity* entity) { + s32 temp_v0; + struct802E3650* temp = entity->dataBuf; + + temp->unk_10 = -1; + temp->unk_14 = entity->position.y; + temp->unk_0E = -1; + entity->flags &= ~0x200000; + entity->scale.x = 0.5f; + entity->scale.y = 0.5f; + entity->scale.z = 0.5f; +} diff --git a/src/code_105700_len_2130.c b/src/code_105700_len_2130.c index 1fec8a6eac..56e0e16b46 100644 --- a/src/code_105700_len_2130.c +++ b/src/code_105700_len_2130.c @@ -1,32 +1,188 @@ #include "common.h" -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E3E80); +typedef struct struct802E3F0C { + /* 0x00 */ char unk_00[10]; + /* 0x0A */ u16 unk_A; + /* 0x0C */ char unk_C[4]; + /* 0x10 */ s16 unk_10; + /* 0x12 */ s16 unk_12; +} struct802E3F0C; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E3E9C); +void func_802E3E80(Entity* entity) { + func_802E3650(entity); +} + +void func_802E3E9C(Entity* entity) { + s32 alpha; + + alpha = entity->alpha; + if (gPlayerStatus.animFlags & 1) { + alpha += 32; + if (alpha > 192) { + alpha = 192; + } + entity->alpha = alpha; + return; + } else { + alpha -= 32; + if (alpha <= 0) { + alpha = 0; + } + entity->alpha = alpha; + return; + } +} INCLUDE_ASM(s32, "code_105700_len_2130", func_802E3EE0); -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E3F0C); +INCLUDE_ASM(void, "code_105700_len_2130", func_802E3F0C, Entity* entity); -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4040); +void func_802E4040(Entity* entity) { + func_80110678(entity); +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E405C); +void func_802E405C(Entity* entity) { + D_802EB3B0 = func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E40A0); +void func_802E40A0(Entity* entity) { + s32 entityType; + s32 virtualModelIndex; + UNK_PTR ptr; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4108); + entityType = get_entity_type(entity->listIndex); + if ((entityType == 0x12) || (entityType == 0x14)) { + play_model_animation(entity->virtualModelIndex, &D_00000094); + } else { + play_model_animation(entity->virtualModelIndex, &D_00000094_2); + } +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4154); +void func_802E4108(Entity* entity) { + Entity* someEntity; // TODO: better var name + Shadow* someShadow; // TODO: better var name + struct802E3F0C* temp = entity->dataBuf; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E421C); + someEntity = get_entity_by_index(temp->unk_12); + someEntity->flags &= ~1; + someShadow = get_shadow_by_index(someEntity->shadowIndex); + someShadow->flags &= ~1; +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4484); +void func_802E4154(Entity* entity) { + u16 temp_v1; + UNK_PTR phi_a0; + struct802E3F0C* temp = entity->dataBuf; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E44CC); + if ((temp->unk_A != 0xFFFF) && get_global_flag(temp->unk_A)) { + if (get_entity_type(entity->listIndex) != 0x14) { + phi_a0 = &D_802EA07C; + } else { + phi_a0 = &D_802EA0A0; + } + create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); + func_8010FBC0(entity, &D_802EA310); + } else { + func_8010FD68(entity); + } +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E44F8); +void func_802E421C(Entity* entity) { + s32 temp_s2; + s32 temp_s0; + s32 temp_v0_2; + s32 temp_v0_5; + struct802E3F0C* temp; + Entity* entityTemp; + Shadow* shadow; + UNK_PTR phi_a0; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4540); + temp_v0_2 = get_entity_type(entity->listIndex); + phi_a0 = &D_802EA07C; + if (temp_v0_2 < 0x15) { + phi_a0 = &D_802EA07C; + if (temp_v0_2 >= 0x12) { + phi_a0 = &D_802EA0A0; + } + } + temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, + 0x80000000); + entityTemp = get_entity_by_index(temp_s2); + entityTemp->flags |= 1; + + if ((entity->flags & 0x40000) != 0) { + entityTemp->flags |= 0x40000; + } + + if ((entity->flags & 4) != 0) { + entityTemp->flags |= 4; + } + + shadow = get_shadow_by_index(entityTemp->shadowIndex); + shadow->flags |= 0x400001; + temp_s0 = func_80112B20(entity); + temp_v0_5 = get_entity_type(entity->listIndex); + if ((temp_v0_5 == 0x12) || (temp_v0_5 == 0x14)) { + phi_a0 = &D_802EA660; + } else if (temp_s0 != 0) { + phi_a0 = &D_802EA618; + } else { + phi_a0 = &D_802EA63C; + } + entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, + entity->rotation.y, 0x80000000)); + entityTemp->alpha = entity->alpha; + if (((entity->flags & 1) != 0) || ((u32) entity->alpha < 0xFF)) { + entityTemp->alpha = 0x20; + } + + if ((entity->flags & 0x40000) != 0) { + entityTemp->flags |= 0x40000; + } + temp = entityTemp->dataBuf; + temp->unk_12 = temp_s2; + + if ((entity->flags & 4) != 0) { + entityTemp->flags |= 4; + } + + entity->flags &= ~0x100; + shadow = get_shadow_by_index(entity->shadowIndex); + shadow->flags |= 0x10000001; + shadow = get_shadow_by_index(entityTemp->shadowIndex); + shadow->flags |= 0x400000; +} + +void func_802E4484(Entity* entity) { + Shadow* shadow; + + entity->flags = (entity->flags | 1) & ~0x100; + shadow = get_shadow_by_index(entity->shadowIndex); + shadow->flags |= 0x10000001; +} + +s32 func_802E44CC(Entity* entity) { + if (entity->boundScript != NULL) { + entity->flags |= 0x1000000; + return TRUE; + } + return FALSE; +} + +// TODO: new file here? +void func_802E44F8(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + + disable_player_input(); + playerStatus->currentSpeed = 0.0f; + playerStatus->flags |= 0x800000; + set_action_state(8); + gravity_use_fall_parms(); +} + +void func_802E4540(void) { + enable_player_input(); +} void func_802E455C(s32 entityIndex) { Gfx* gfx = gMasterGfxPos; @@ -46,8 +202,27 @@ void func_802E455C(s32 entityIndex) { gMasterGfxPos = gfx; } -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E464C); +void func_802E464C(Entity* entity) { + struct802E3650* temp; -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4694); + entity_init_Hammer23Block_normal(entity); + temp = entity->dataBuf; + temp->unk_10 = D_8015C7D2; + temp->unk_0A = 0xFFFF; + entity->unk_3C = func_802E455C; +} -INCLUDE_ASM(s32, "code_105700_len_2130", func_802E46BC); +void func_802E4694(Entity* entity) { + func_802E464C(entity); + entity->alpha = 0; +} + +void func_802E46BC(Entity* entity) { + AnimatedMesh* animMesh; + + entity_init_Hammer23Block_normal(entity); + entity->unk_3C = func_802E455C; + animMesh = get_anim_mesh(entity->virtualModelIndex); + animMesh->renderMode = 0x11; + animMesh->flags |= 0x10000; +} diff --git a/src/code_105F90.c b/src/code_105F90.c index ca0a9d41f5..5244e6abef 100644 --- a/src/code_105F90.c +++ b/src/code_105F90.c @@ -4,36 +4,140 @@ INCLUDE_ASM(s32, "code_105F90", func_802E4710); INCLUDE_ASM(s32, "code_105F90", func_802E4730); -INCLUDE_ASM(s32, "code_105F90", func_802E4AEC); +void func_802E4AEC(s32 entityIndex) { + func_802E4730(entityIndex, &D_0A000808); +} -INCLUDE_ASM(s32, "code_105F90", func_802E4B10); +void func_802E4B10(Entity* entity) { + struct802E4B10* temp = entity->dataBuf; + Entity* entityTemp = get_entity_by_index(temp->unk_00); -INCLUDE_ASM(s32, "code_105F90", func_802E4B60); + entity->position.x = entityTemp->position.x; + entity->position.y = entityTemp->position.y + 14.0f; + entity->position.z = entityTemp->position.z; +} + +void func_802E4B60(Entity* entity) { + struct802E4B10* temp_s0; + Entity* someEntity; + + entity->unk_3C = func_802E4AEC; + entity->alpha = 0xFF; + temp_s0 = entity->dataBuf; + entity->flags |= 0x2000; + someEntity = get_entity_by_index(temp_s0->unk_00); + if (temp_s0->unk_09 == 0) { + temp_s0->unk_09 = 1; + temp_s0->unk_01 = 2; + entity->scale.x = 1.0f; + } else { + temp_s0->unk_01 = 0; + entity->scale.x = 0.0f; + } + + temp_s0->unk_0C = 0; + temp_s0->unk_10 = 0; + entity->rotation.x = 0.0f; + entity->rotation.y = 0.0f; + entity->rotation.z = 0.0f; + entity->scale.y = entity->scale.x; + entity->scale.z = entity->scale.x; + + func_802E4B10(entity); +} INCLUDE_ASM(s32, "code_105F90", func_802E4C10); -INCLUDE_ASM(s32, "code_105F90", func_802E4DE0); +void func_802E4DE0(Entity* entity) { + struct802E4B10* temp = entity->dataBuf; + + temp->unk_01 = 0; + entity->scale.x = 1.0f; + entity->scale.y = 1.0f; + entity->scale.z = 1.0f; + entity->rotation.z = 0.0f; +} INCLUDE_ASM(s32, "code_105F90", func_802E4E04); -INCLUDE_ASM(s32, "code_105F90", func_802E5308); +void func_802E5308(Entity* entity) { + func_802E3650(entity); +} INCLUDE_ASM(s32, "code_105F90", func_802E5324); -INCLUDE_ASM(s32, "code_105F90", func_802E540C); +void func_802E540C(Entity* entity) { + func_802E4B10(entity); +} -INCLUDE_ASM(s32, "code_105F90", func_802E5428); +extern UNK_TYPE D_802EA728; -INCLUDE_ASM(s32, "code_105F90", func_802E545C); +void func_802E5428(Entity* entity) { + func_802E4B60(entity); + func_80110BCC(entity, &D_802EA728); +} -INCLUDE_ASM(s32, "code_105F90", func_802E548C); +void func_802E545C(Entity* entity) { + func_802E4C10(entity, 0); + func_802E5324(entity); +} -INCLUDE_ASM(s32, "code_105F90", func_802E54A8); +void func_802E548C(Entity* entity) { + func_802E4E04(entity, 0); +} -INCLUDE_ASM(s32, "code_105F90", func_802E54CC); +extern UNK_TYPE D_802EA760; -INCLUDE_ASM(s32, "code_105F90", func_802E555C); +void func_802E54A8(Entity* entity) { + func_80110BCC(entity, &D_802EA760); +} -INCLUDE_ASM(s32, "code_105F90", func_802E55A8); +extern UNK_TYPE D_802EB3C0; -INCLUDE_ASM(s32, "code_105F90", func_802E5648); +void func_802E54CC(Entity* entity) { + if ((gPlayerData.partners[1].enabled == 0) && (get_global_flag(0xF8405BE0) == 0)) { + UNK_TYPE* ptr = &D_802EB3C0; + *ptr = 0; + load_string(0x1D0001, ptr); + func_80027088(1); + D_8009A650[0] |= 0x40; + disable_player_input(); + set_global_flag(0xF8405BE0); + return; + } + func_8010FD68(entity); +} + +void func_802E555C(Entity* entity) { + if (D_802EB3C0) { + func_8010FD68(entity); + func_80027088(0); + D_8009A650[0] &= ~0x40; + enable_player_input(); + } +} + +s8 func_802E55A8(Entity* entity, StaticEntityData* data) { + s32 temp_s2; + Entity* someEntity; + struct802E4B10* temp_v1; + s8 phi_v0; + + temp_s2 = D_8015C7D0[0]; + entity_init_Hammer23Block_normal(entity); + someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f, + 0x80000000)); + temp_v1 = someEntity->dataBuf; + temp_v1->unk_00 = entity->listIndex; + if (temp_s2 == 0) { + temp_v1->unk_0A = 3; + } else { + temp_v1->unk_0A = 6; + } +} + +extern StaticEntityData D_802EA7BC; + +void func_802E5648(Entity* entity) { + func_802E55A8(entity, &D_802EA7BC); +} diff --git a/src/code_1060_len_310.c b/src/code_1060_len_310.c index 44a8397aee..3d05508e2d 100644 --- a/src/code_1060_len_310.c +++ b/src/code_1060_len_310.c @@ -1,4 +1,7 @@ #include "common.h" +#include "stdlib/stdarg.h" + +u32 func_80025D74(void* arg0, const unsigned char* str, s32 count); void func_80025C60(void) { OSPiHandle** handle = &carthandle; @@ -8,12 +11,77 @@ void func_80025C60(void) { osEPiWriteIo(*handle, 0xB3FF0000, ASCII_TO_U32('I', 'S', '6', '4')); } -INCLUDE_ASM(s32, "code_1060_len_310", func_80025CC0); +void func_80025CC0(const char* fmt, ...) { + va_list args; + va_start(args, fmt); -INCLUDE_ASM(s32, "code_1060_len_310", func_80025CFC); + _Printf(&func_80025D74, NULL, fmt, args); +} -INCLUDE_ASM(s32, "code_1060_len_310", func_80025D38); +void func_80025CFC(const char* fmt, ...) { + va_list args; + va_start(args, fmt); -INCLUDE_ASM(s32, "code_1060_len_310", func_80025D74); + _Printf(&func_80025D74, NULL, fmt, args); +} -INCLUDE_ASM(s32, "code_1060_len_310", func_80025F44); +void func_80025D38(const char* fmt, ...) { + va_list args; + va_start(args, fmt); + + _Printf(&func_80025D74, NULL, fmt, args); +} + +u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) { + u32 data; + s32 pos; + s32 start; + s32 end; + OSPiHandle** handle = &carthandle; + + osEPiReadIo(*handle, 0xB3FF0000, &data); + if (data != ASCII_TO_U32('I', 'S', '6', '4')) { + return 1; + } + osEPiReadIo(*handle, 0xB3FF0004, &data); + pos = data; + osEPiReadIo(*handle, 0xB3FF0014, &data); + start = data; + end = start + count; + if (end >= 0xffe0) { + end -= 0xffe0; + if (pos < end || start < pos) { + return 1; + } + } else { + if (start < pos && pos < end) { + return 1; + } + } + while (count) { + if (*str) { + u32 addr = 0xB3FF0020 + (start & 0xffffffc); + s32 shift = ((3 - (start & 3)) * 8); + OSPiHandle** handle2 = &carthandle; + + osEPiReadIo(*handle2, addr, &data); + osEPiWriteIo(*handle2, addr, (data & ~(0xff << shift)) | (*str << shift)); + + start++; + if (start >= 0xffe0) { + start -= 0xffe0; + } + } + count--; + str++; + } + osEPiWriteIo(carthandle, 0xB3FF0014, start); + return 1; +} + +extern const char D_80097D30[]; + +void func_80025F44(char* arg0, char* file, s32 line, char* arg3) { + func_80025CFC(&D_80097D30, file, line, arg0); + PANIC(); +} diff --git a/src/code_106EF0.c b/src/code_106EF0.c index cd03bd5581..eee23db9da 100644 --- a/src/code_106EF0.c +++ b/src/code_106EF0.c @@ -1,25 +1,126 @@ #include "common.h" -INCLUDE_ASM(s32, "code_106EF0", func_802E5670); +f32 func_802E5670(struct802E4B10* arg0, s32 arg1) { + s32 temp_v0; -INCLUDE_ASM(s32, "code_106EF0", func_802E5690); + temp_v0 = arg0->unk_D0 - arg1; + if (arg0->unk_D0 - arg1 < 0) { + temp_v0 += 0x14; + } + return arg0->unk_D4[temp_v0]; +} -INCLUDE_ASM(s32, "code_106EF0", func_802E56D0); +void func_802E5690(s32 entityIndex) { + s16 temp_a0; + Entity* someEntity; + Entity* someOtherEntity; + struct802E3650* temp; -INCLUDE_ASM(s32, "code_106EF0", func_802E56EC); + someEntity = get_entity_by_index(entityIndex); + temp = someEntity->dataBuf; + if (temp->unk_12 >= 0) { + Entity* someOtherEntity = get_entity_by_index(temp->unk_12); + struct802E4B10* temp2 = someOtherEntity->dataBuf; + temp2->unk_0A = 1; + } +} -INCLUDE_ASM(s32, "code_106EF0", func_802E578C); +s32 func_802E56D0(Entity* entity) { + return func_802E3650(entity); +} -INCLUDE_ASM(s32, "code_106EF0", func_802E57E4); +extern StaticEntityData D_802EA934; -INCLUDE_ASM(s32, "code_106EF0", func_802E5800); +void func_802E56EC(Entity* entity) { + s16 entityIndex; + u8 temp_v0_2; + struct802E3650* temp_s0; -INCLUDE_ASM(s32, "code_106EF0", func_802E581C); + temp_s0 = entity->dataBuf; + if (temp_s0->unk_0A != 0xFFFF) { + if (get_global_flag(temp_s0->unk_0A) == 0) { + Entity* someEntity; + struct802E3650* temp2; + entityIndex = create_entity(&D_802EA934, entity->position.x, entity->position.y, entity->position.z, 0.0f, 0x80000000); + temp_s0->unk_12 = entityIndex; + someEntity = get_entity_by_index(entityIndex); + temp2 = someEntity->dataBuf; + temp2->unk_00 = entity->listIndex; + } + } +} + +void func_802E578C(Entity* entity) { + struct802E3650* temp_s1; + + temp_s1 = entity->dataBuf; + entity_init_Hammer23Block_normal(entity); + entity->rotation.y += 180.0f; + temp_s1->unk_0A = 0xFFFF; + temp_s1->unk_12 = -1; +} + +void func_802E57E4(Entity* entity) { + func_802E578C(entity); +} + +void func_802E5800(Entity* entity) { + func_802E578C(entity); +} + +void func_802E581C(Entity* entity) { + struct802E3650* temp = entity->dataBuf; + Entity* temp_v0 = get_entity_by_index(temp->unk_00); + + entity->position.x = temp_v0->position.x; + entity->position.y = temp_v0->position.y + 14.0f; + entity->position.z = temp_v0->position.z; +} + +// display list func INCLUDE_ASM(s32, "code_106EF0", func_802E586C); -INCLUDE_ASM(s32, "code_106EF0", func_802E5E50); +void func_802E5E50(Entity* entity) { + f32 clampedAngle; + struct802E4B10* temp_s0 = entity->dataBuf; -INCLUDE_ASM(s32, "code_106EF0", func_802E5F50); + func_802E581C(entity); + if (temp_s0->unk_0A != 0) { + entity->unk_3C = NULL; + } -INCLUDE_ASM(s32, "code_106EF0", func_802E5F7C); + clampedAngle = clamp_angle(entity->rotation.y + 3.0); + entity->rotation.y = clampedAngle; + temp_s0->unk_D4[temp_s0->unk_D0] = clampedAngle; + if (++temp_s0->unk_D0 >= 0x15) { + temp_s0->unk_D0 = 0; + } + + if (temp_s0->unk_0A == 0) { + if (D_8009A650[0] == 0) { + if (--temp_s0->unk_02 <= 0) { + temp_s0->unk_02 = 0x32; + func_80070550(3, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 0x14); + } + } + } +} + +void func_802E5F50(Entity* entity) { + struct802E3650* temp; + + temp = entity->dataBuf; + temp->unk_128 = &D_0A000328; + temp->unk_12C = &D_0A000380; + entity->unk_3C = func_802E586C; +} + +void func_802E5F7C(Entity* entity) { + struct802E3650* temp; + + temp = entity->dataBuf; + temp->unk_128 = &D_0A000800; + temp->unk_12C = &D_0A000750; + entity->unk_3C = func_802E586C; +} diff --git a/src/code_109660_len_1270.c b/src/code_109660_len_1270.c index 4cea538933..acec7c62f1 100644 --- a/src/code_109660_len_1270.c +++ b/src/code_109660_len_1270.c @@ -1,34 +1,228 @@ #include "common.h" +#include "map.h" + +MapConfig* get_current_map_header(void); +void disable_player_input(void); +void disable_player_static_collisions(void); +void move_player(s32, f32, f32); +s32 func_802E854C(); + +typedef struct struct802E7DE0 { + /* 0x000 */ s32 unk_000; + /* 0x004 */ s32 unk_004; + /* 0x008 */ u8* unk_008; + /* 0x00C */ s32 unk_00C; + /* 0x010 */ u8 unk_010[36]; + /* 0x034 */ s8 unk_034[36]; + /* 0x058 */ u8 unk_058[36]; + /* 0x07C */ u8 unk_07C[36]; + /* 0x0A0 */ u8 unk_0A0[36]; + /* 0x0C4 */ f32 unk_0C4[36]; + /* 0x154 */ f32 unk_154[36]; + /* 0x1E4 */ f32 unk_1E4[36]; + /* 0x274 */ f32 unk_274[36]; + /* 0x304 */ f32 unk_304[36]; +} struct802E7DE0; INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7DE0); -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7F40); +typedef struct struct802E7F40 { + /* 0x00 */ s32 unk_00; + /* 0x04 */ u16 unk_04; + /* 0x06 */ char unk_06[6]; + /* 0x0C */ f32 unk_0C; + /* 0x10 */ char unk_10[4]; + /* 0x14 */ s32 unk_14; +} struct802E7F40; -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7F6C); +void func_802E7F40(Entity* entity) { + struct802E7F40* temp = entity->dataBuf; + + entity->scale.y = 0.85714287f; + temp->unk_00 = D_8015C7D0[0]; + temp->unk_04 = 0xFFFF; +} + +void func_802E7F6C(Entity* entity) { + struct802E7F40* temp = entity->dataBuf; + + temp->unk_0C = entity->position.y; + func_802E7DE0(entity, &D_0A004350, &D_0A0026F0); +} INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7FA0); +extern f64 D_802EB370; + INCLUDE_ASM(s32, "code_109660_len_1270", func_802E854C); -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8858); +s32 func_802E8858(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + s32 phi_a0 = FALSE; -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E88EC); + if (entity->unk_06 & 1) { + if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { + set_action_state(ActionState_FALLING); + phi_a0 = TRUE; + } + } -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E89B0); + if (phi_a0) { + func_802E7F6C(entity); + func_80110BCC(entity, &D_802EAE7C); + func_80110678(entity); + func_8010FD68(entity); + play_sound(0x20AE); + } +} -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E89F8); +f32 func_800E546C(void); -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8A58); +void func_802E88EC(Entity* entity, f32 arg1) { + struct802E7F40* temp = entity->dataBuf; + if (temp->unk_00 != -1) { + s32 flag = FALSE; + + // can't do || here, or gcc realizes it can reuse the temp->unk_04 load + if (temp->unk_04 == 0xFFFF) { + flag = TRUE; + } else if (!get_global_flag(temp->unk_04)) { + flag = TRUE; + } + + if (flag) { + make_item_entity(temp->unk_00, entity->position.x, entity->position.y + D_802EB370, entity->position.z, 0xA, 0, + func_800E546C(), temp->unk_04); + } + } +} + +typedef struct struct802E89B0 { + /* 0x00 */ s32 unk_00; + /* 0x04 */ s32 unk_04; + /* 0x08 */ s32 unk_08; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ f32 unk_18; +} struct802E89B0; + +void func_802E89B0(Entity* entity) { + struct802E89B0* temp_s0; + + temp_s0 = entity->dataBuf; + if (get_global_flag(temp_s0->unk_14)) { + temp_s0->unk_04 = 0x10; + func_8010FD68(entity); + } +} + +extern f64 D_802EB380; + +void func_802E89F8(Entity* entity) { + s32 temp_v0; + struct802E89B0* temp; + + temp = entity->dataBuf; + temp->unk_04--; + if ((temp->unk_04 != -1) && (temp->unk_08 == 0)) { + entity->position.y += D_802EB380; + return; + } + temp->unk_04 = 0; + func_8010FD68(entity); +} + +void func_802E8A58(Entity* entity) { + struct802E89B0* temp = entity->dataBuf; + + if (temp->unk_0C == GAME_STATUS->entryID) { + switch (temp->unk_04) { + case 0: + if (gCollisionStatus.currentFloor > 0) { + temp->unk_04 = 1; + } + return; + case 1: + if (gCollisionStatus.currentFloor < 0) { + temp->unk_04 = 2; + } + return; + default: + func_8010FD68(entity); + return; + } + } else { + func_8010FD68(entity); + } +} + +#ifdef NON_MATCHING +// small regalloc issue +void func_802E8ADC(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + + if ((entity->unk_06 & 1) != 0) { + *D_8009A650 |= 0x40; + if ((playerStatus->flags & 0x3000) == 0) { + s32 phi_v0 = playerStatus->stickAxis[0]; + s32 temp_a0 = playerStatus->stickAxis[1]; + + if (phi_v0 < 0) { + phi_v0 = -phi_v0; + } + + if ((phi_v0 != 0) || (temp_a0 != 0)) { + if (atan2(0.0f, 0.0f, phi_v0, temp_a0) < 60.0f) { + func_8010FD68(entity); + return; + } + } + } + } else { + *D_8009A650 &= ~0x40; + } +} +#else INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8ADC); +#endif -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8BC0); +void func_802E8BC0(Entity* entity) { + PlayerStatus* playerStatus = &gPlayerStatus; + PlayerStatus* playerStatus2 = &gPlayerStatus; + struct802E89B0* temp = entity->dataBuf; + MapConfig* mapConfig = get_current_map_header(); + f32 temp_f20; + f32 entryX; + f32 entryZ; -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8C94); + entryX = GET_MAP_ENTRY(mapConfig, temp->unk_0C)->x; + entryZ = GET_MAP_ENTRY(mapConfig, temp->unk_0C)->z; + temp->unk_04 = func_800E0088(entryX, entryZ) / playerStatus->runSpeed; + if (temp->unk_04 == 0) { + temp->unk_04 = 1; + } + + entryX = GET_MAP_ENTRY(mapConfig, temp->unk_0C)->x; + entryZ = GET_MAP_ENTRY(mapConfig, temp->unk_0C)->z; + temp_f20 = atan2(playerStatus2->position.x, playerStatus2->position.z, entryX, entryZ); + disable_player_input(); + disable_player_static_collisions(); + move_player(temp->unk_04, temp_f20, playerStatus2->runSpeed); +} + +void func_802E8C94(Entity* entity) { + Trigger* trigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct? + + if (--trigger->params1 == -1) { + func_8010FD68(entity); + } +} void player_enter_blue_pipe(Entity* bluePipe) { PlayerStatus* playerStatus = &gPlayerStatus; - Trigger* pipeTrigger = bluePipe->trigger; + Trigger* pipeTrigger = (Trigger*)bluePipe->dataBuf; // TODO: is Trigger correct? playerStatus->targetYaw = CURRENT_CAM->currentYaw + 180.0f; pipeTrigger->params1 = 0x19; @@ -41,7 +235,7 @@ void player_enter_blue_pipe(Entity* bluePipe) { void func_802E8D74(Entity* entity) { PlayerStatus* playerStatus = &gPlayerStatus; - Trigger* entityTrigger = entity->trigger; + Trigger* entityTrigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct? playerStatus->position.y--; entityTrigger->params1--; @@ -55,13 +249,33 @@ void func_802E8D74(Entity* entity) { } void func_802E8E10(Entity* entity) { - Bytecode* triggerScriptStart = entity->trigger->scriptStart; + Bytecode* triggerScriptStart = ((Trigger*)entity->dataBuf)->scriptStart; D_8009A650[0] &= ~0x40; entity->boundScript = triggerScriptStart; - func_80110678(); + func_80110678(entity); } INCLUDE_ASM(s32, "code_109660_len_1270", push_entity_matrix); -INCLUDE_ASM(s32, "code_109660_len_1270", func_802E8F94); +f32 func_802E8F94(Entity* entity) { + struct802E89B0* temp_s0; + s32* temp = &D_8015C7D0; + s32 temp2; + s32 temp3; + s32 temp4; + f32* temp5; + + temp2 = temp[0]; + temp3 = temp[1]; + temp4 = temp[2]; + entity->unk_3C = &push_entity_matrix; + temp_s0 = entity->dataBuf; + temp5 = &entity->position.y; // required... wtf + temp_s0->unk_0C = temp2; + temp_s0->unk_10 = temp3; + temp_s0->unk_14 = temp4; + temp_s0->unk_18 = entity->position.y; + temp_s0->unk_08 = get_global_flag(temp_s0->unk_14); + *temp5 = entity->position.y - (temp_s0->unk_08 ? 15.0 : 52.0); +} diff --git a/src/code_197F40.c b/src/code_197F40.c index 1856a3e239..b7e4abfcad 100644 --- a/src/code_197F40.c +++ b/src/code_197F40.c @@ -79,7 +79,7 @@ void set_actor_home_position(ActorID actorID, f32 x, f32 y, f32 z) { actor->homePos.z = z; } -Actor* get_actor(s32 actorID) { +Actor* get_actor(ActorID actorID) { Actor* ret = NULL; BattleStatus* battleStatus = BATTLE_STATUS; s32 idFlag = actorID & 0x700; diff --git a/src/code_1b40_len_20b0.c b/src/code_1b40_len_20b0.c index 1ac84aa402..dcd663933e 100644 --- a/src/code_1b40_len_20b0.c +++ b/src/code_1b40_len_20b0.c @@ -1,7 +1,7 @@ #include "common.h" -// extern Gfx D_00074210[]; -// extern Gfx D_00074230[]; +extern Gfx D_80074210[]; +extern Gfx D_80074230[]; extern int D_000759B0[]; extern int D_000759B0_end[]; // A55D0 @@ -37,9 +37,9 @@ INCLUDE_ASM(s32, "code_1b40_len_20b0", func_800269EC); INCLUDE_ASM(s32, "code_1b40_len_20b0", gfx_draw_frame); -INCLUDE_ASM(s32, "code_1b40_len_20b0", load_engine_data); -/*void load_engine_data(void) { - game_status *phi_s0; +#ifdef NON_MATCHING +void load_engine_data(void) { + GameStatus* phi_s0; s32 i; dma_copy(D_000FEE30, D_000FEE30_end, D_802DBD40); @@ -50,19 +50,19 @@ INCLUDE_ASM(s32, "code_1b40_len_20b0", load_engine_data); dma_copy(D_0010CC10, D_0010CC10_end, D_802EB3D0); D_8009A650[0] = 0; phi_s0 = *gGameStatusPtr; - (*gGameStatusPtr)->unk_79 = 0; - (*gGameStatusPtr)->musicEnabled = 1; + GAME_STATUS->unk_79 = 0; + GAME_STATUS->musicEnabled = 1; phi_s0->unk_148 = 0; - (*gGameStatusPtr)->unk_7C = 1; - (*gGameStatusPtr)->unk_A8 = -1; - (*gGameStatusPtr)->unk_AA = 0; - (*gGameStatusPtr)->unk_81 = 0; - (*gGameStatusPtr)->unk_82 = -8; - (*gGameStatusPtr)->unk_83 = 4; + GAME_STATUS->unk_7C = 1; + GAME_STATUS->unk_A8 = -1; + GAME_STATUS->unk_AA = 0; + GAME_STATUS->unk_81 = 0; + GAME_STATUS->unk_82 = -8; + GAME_STATUS->unk_83 = 4; D_8009A5D8 = 0; - (*gGameStatusPtr)->unk_75 = (*gGameStatusPtr)->unk_13C = 0; + GAME_STATUS->unk_75 = GAME_STATUS->unk_13C = 0; D_80074021 = 5; - (*gGameStatusPtr)->unk_168 = 0; + GAME_STATUS->unk_168 = 0; fio_init_flash(); func_80028838(); general_heap_create(); @@ -97,16 +97,18 @@ INCLUDE_ASM(s32, "code_1b40_len_20b0", load_engine_data); func_8002BA40(); poll_rumble(); - phi_s0 = *gGameStatusPtr; - for(i = 0; i < 4; i++) - { + phi_s0 = GAME_STATUS; + for (i = 0; i < 4; i++) { phi_s0->unk_50[i] = 3; phi_s0->unk_48[i] = 0xC; } D_8009A650[0] |= 8; set_game_mode(0); -}*/ +} +#else +INCLUDE_ASM(s32, "code_1b40_len_20b0", load_engine_data); +#endif INCLUDE_ASM(void, "code_1b40_len_20b0", func_80027088, s32 arg0); @@ -114,19 +116,15 @@ s32 func_80027190(void) { return D_8009A5D8; } +#ifdef NON_MATCHING +void func_800271A0(void) { + gSPSegment(gMasterGfxPos++, 0x00, 0x0); + gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(&D_80074230)); + gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(&D_80074210)); +} +#else INCLUDE_ASM(s32, "code_1b40_len_20b0", func_800271A0); -/*void func_800271A0(void) { - Gfx *temp = gMasterGfxPos[0] + 1; - - gSPSegment(gMasterGfxPos[0], 0x00, 0x00000000); - gMasterGfxPos[0] = temp; - gSPDisplayList(temp, &D_00074230); - gMasterGfxPos[0]++; - gSPDisplayList(gMasterGfxPos[0]++, &D_00074210); -}*/ - -// extern Gfx D_00074210[]; -// extern Gfx D_00074230[]; +#endif // void func_800271A0(void) { // gSPSegment(gMasterGfxPos++, 0x00, 0x00000000); diff --git a/src/code_341d0.c b/src/code_341d0.c new file mode 100644 index 0000000000..6bb7bb45d3 --- /dev/null +++ b/src/code_341d0.c @@ -0,0 +1,224 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_341d0", func_80058DD0); + +INCLUDE_ASM(s32, "code_341d0", func_80058E84); + +INCLUDE_ASM(s32, "code_341d0", func_80058F88); + +INCLUDE_ASM(s32, "code_341d0", func_80059008); + +INCLUDE_ASM(s32, "code_341d0", func_8005904C); + +INCLUDE_ASM(s32, "code_341d0", func_80059310); + +INCLUDE_ASM(s32, "code_341d0", func_800598A0); + +INCLUDE_ASM(s32, "code_341d0", func_80059AB8); + +INCLUDE_ASM(s32, "code_341d0", func_80059BD4); + +void func_80059C80(EffectInstance* effectInst) { +} + +INCLUDE_ASM(s32, "code_341d0", func_80059C88); + +INCLUDE_ASM(s32, "code_341d0", func_80059C9C); + +void func_80059D48(void) { +} + +INCLUDE_ASM(s32, "code_341d0", func_80059D50); + +#define EFFECT_LOADED 1 + +extern EffectInstance* D_800B4398[96]; //effectInstanceList +extern Effect D_800A4000[15]; +extern void* D_80059C80; + +s32 render_effects(void) { + EffectInstance** curEffectInst; + s32 i; + + curEffectInst = &D_800B4398[0]; + for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { + if ((curEffectInst[i] != NULL) && (curEffectInst[i]->flags & 1) && (curEffectInst[i]->flags & 8)) { + if (GAME_STATUS->isBattle) { + if (curEffectInst[i]->flags & 4) { + curEffectInst[i]->effect->renderWorld(curEffectInst[i]); + } + } else if (!(curEffectInst[i]->flags & 4)) { + curEffectInst[i]->effect->renderWorld(curEffectInst[i]); + } + } + } +} + +INCLUDE_ASM(s32, "code_341d0", func_80059F94); + +EffectInstance* func_8005A2BC(EffectBlueprint* effectBp) { + EffectInstance* newEffectInst; + Effect* curEffect; + s32 i; + EffectInstance** temp = &D_800B4398[0]; + + // Search for an unused instance + for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { + if (temp[i] == NULL) { + break; + } + } + + ASSERT(i < ARRAY_COUNT(D_800B4398)); + + // Allocate space for the new instance + D_800B4398[i] = newEffectInst = general_heap_malloc(sizeof(EffectInstance)); + ASSERT(newEffectInst != NULL); + + curEffect = &D_800A4000[0]; + newEffectInst->effectIndex = effectBp->effectIndex; + newEffectInst->flags = 1; + + // Look for a loaded effect of the proper index + for (i = 0; i < ARRAY_COUNT(D_800A4000); i++) { + if ((curEffect->flags & EFFECT_LOADED) && (curEffect->effectIndex == effectBp->effectIndex)) { + break; + } + curEffect++; + } + + ASSERT(i < ARRAY_COUNT(D_800A4000)); + + // If this is the first new instance of the effect, initialize the function pointers + if (curEffect->instanceCounter == 0) { + curEffect->update = effectBp->update; + if (curEffect->update == NULL) { + curEffect->renderWorld = func_80059C80; + } + + curEffect->renderWorld = effectBp->renderWorld; + if (curEffect->unk_18 == NULL) { + curEffect->unk_18 = func_80059C80; + } + + curEffect->unk_18 = effectBp->unk_14; + if (curEffect->unk_18 == NULL) { + curEffect->unk_18 = func_80059C80; + } + } + + curEffect->instanceCounter++; + newEffectInst->effect = curEffect; + + if (effectBp->init != NULL) { + effectBp->init(newEffectInst); + } + + if (GAME_STATUS->isBattle) { + newEffectInst->flags |= 4; + } + return newEffectInst; +} + +void remove_effect(EffectInstance* arg0) { + s32 i; + EffectInstance** temp = &D_800B4398[0]; + + for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { + if (temp[i] == arg0) { + break; + } + } + + ASSERT(i < ARRAY_COUNT(D_800B4398)); + + if (arg0->unk_0C == NULL) { + general_heap_free(arg0); + D_800B4398[i] = NULL; + return; + } + + general_heap_free(arg0->unk_0C); + general_heap_free(arg0); + D_800B4398[i] = NULL; +} + +void remove_all_effects(void) { + s32 i; + EffectInstance** temp = &D_800B4398[0]; + + for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { + EffectInstance* temp2 = temp[i]; + if (temp2 != NULL && temp2->flags & 4) { + if (temp2->unk_0C != NULL) { + general_heap_free(temp2->unk_0C); + } + general_heap_free(temp2); + temp[i] = NULL; + } + } +} + +typedef s32 TlbEntry[0x1000 / 4]; +typedef TlbEntry TlbMappablePage[15]; + +extern TlbMappablePage D_80197000; +extern EffectTableEntry D_8007F210[135]; + +s32 play_effect(s32 effectIndex) { + EffectTableEntry* effectTable = &D_8007F210[0]; + EffectTableEntry* effectEntry; + Effect* curEffect; + TlbMappablePage* tlbMappablePages; + s32 i; + + effectEntry = &effectTable[effectIndex]; + + // Look for a loaded effect matching the desired index + for (i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) { + if ((curEffect->flags & EFFECT_LOADED) && (curEffect->effectIndex == effectIndex)) { + break; + } + curEffect++; + } + + // If an effect was found within the table, initialize it and return + if (i < ARRAY_COUNT(D_800A4000)) { + curEffect->effectIndex = effectIndex; + curEffect->instanceCounter = 0; + curEffect->flags = EFFECT_LOADED; + return 1; + } + + // If a loaded effect wasn't found, look for the first empty space + for (i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) { + if (!(curEffect->flags & EFFECT_LOADED)) { + break; + } + curEffect++; + } + + // If no empty space was found, panic + ASSERT(i < ARRAY_COUNT(D_800A4000)); + + // Map space for the effect + tlbMappablePages = &D_80197000; + osMapTLB(i, 0, effectEntry->dmaDest, (s32)((*tlbMappablePages)[i]) & 0xFFFFFF, -1, -1); + + // Copy the effect into the newly mapped space + dma_copy(effectEntry->dmaStart, effectEntry->dmaEnd, effectEntry->dmaDest); + + // If there's extra data the effect normally loads, allocate space and copy into the new space + if (effectEntry->unkStartRom != NULL) { + void* effectDataBuf = general_heap_malloc(effectEntry->unkEndRom - effectEntry->unkStartRom); + curEffect->unk_1C = effectDataBuf; + ASSERT(effectDataBuf != NULL); + dma_copy(effectEntry->unkStartRom, effectEntry->unkEndRom, curEffect->unk_1C); + } + + // Initialize the newly loaded effect data + curEffect->effectIndex = effectIndex; + curEffect->instanceCounter = 0; + curEffect->flags = EFFECT_LOADED; + return 1; +} diff --git a/src/code_404220.c b/src/code_404220.c index bd2e179507..61a67e7af9 100644 --- a/src/code_404220.c +++ b/src/code_404220.c @@ -13,7 +13,9 @@ INCLUDE_ASM(s32, "code_404220", func_E011A3A0); #ifdef NON_MATCHING // gfx gbi macro issue void func_E011A3BC(s16 alpha) { if (alpha == 255) { - gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); + gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, + G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, + G_BL_A_MEM)); gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); } else { gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); diff --git a/src/code_a5dd0_len_114e0.c b/src/code_a5dd0_len_114e0.c index 98c9bbe439..f5d70ae051 100644 --- a/src/code_a5dd0_len_114e0.c +++ b/src/code_a5dd0_len_114e0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8010FBC0); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8010FBD8); -INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8010FD68); +INCLUDE_ASM(void, "code_a5dd0_len_114e0", func_8010FD68, Entity* entity); void func_8010FD98(s32 arg0, s32 alpha) { if (alpha >= 255) { @@ -69,7 +69,7 @@ ShadowList* get_shadow_list(void) { INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110678); -INCLUDE_ASM(s32, "code_a5dd0_len_114e0", get_entity_type); +INCLUDE_ASM(u32, "code_a5dd0_len_114e0", get_entity_type, s32 arg0); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", delete_entity); @@ -111,7 +111,8 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80111790); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_801117DC); -INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, + s32 flags); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_shadow_from_data); @@ -132,7 +133,7 @@ ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall) { Trigger* trigger; if (isInitialCall == TRUE) { - trigger = get_entity_by_index(gLastCreatedEntityIndex)->trigger; + trigger = (Trigger*)get_entity_by_index(gLastCreatedEntityIndex)->dataBuf; trigger->flags.bytes.genericFlagIndex = get_variable_index(script, *args); return ApiStatus_DONE2; } diff --git a/src/os/code_4ac90_len_3910.c b/src/os/code_4ac90_len_3910.c index 2fd30486e4..8a13ee472d 100644 --- a/src/os/code_4ac90_len_3910.c +++ b/src/os/code_4ac90_len_3910.c @@ -1,5 +1,7 @@ #include "common.h" +extern EffectTableEntry D_8007F210[135]; + INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006F890); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_8006F8F0); @@ -69,7 +71,8 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070490); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800704F0); -INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80070550); +INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80070550, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, + s32 arg6, s32 arg7); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800705B0); @@ -223,7 +226,8 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072170); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800721D0); -INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072230); +INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, + s32 arg5); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072290); @@ -271,6 +275,7 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072A70); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072AD0); +// FILE SPLIT INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072B30); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072BB0); diff --git a/src/si.c b/src/si.c index 884debba91..07712b475a 100644 --- a/src/si.c +++ b/src/si.c @@ -92,14 +92,12 @@ ApiStatus si_handle_sleep_frames(ScriptInstance* script) { script->blocked = 1; } - if (script->functionTemp[0].s) { - s32 todo = 1; // val can be anything - if (todo) { - script->functionTemp[0].s -= 1; - } - return !script->functionTemp[0].s; + if (script->functionTemp[0].s == 0) { + return ApiStatus_DONE2; } - return ApiStatus_DONE2; + + script->functionTemp[0].s -= 1; + return !script->functionTemp[0].s; } ApiStatus si_handle_sleep_seconds(ScriptInstance* script) { @@ -110,14 +108,12 @@ ApiStatus si_handle_sleep_seconds(ScriptInstance* script) { script->blocked = 1; } - if (script->functionTemp[0].s != 0) { - s32 todo = 1; // val can be anything - if (todo) { - script->functionTemp[0].s -= 1; - } - return !script->functionTemp[0].s; + if (script->functionTemp[0].s == 0) { + return ApiStatus_DONE2; } - return ApiStatus_DONE2; + + script->functionTemp[0].s--; + return !script->functionTemp[0].s; } ApiStatus si_handle_if_equal(ScriptInstance* script) { @@ -248,6 +244,7 @@ ApiStatus si_handle_case_equal(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var != switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -255,7 +252,6 @@ ApiStatus si_handle_case_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_not_equal(ScriptInstance* script) { @@ -271,6 +267,7 @@ ApiStatus si_handle_case_not_equal(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var == switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -278,7 +275,6 @@ ApiStatus si_handle_case_not_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_less(ScriptInstance* script) { @@ -294,6 +290,7 @@ ApiStatus si_handle_case_less(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var <= switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -301,7 +298,6 @@ ApiStatus si_handle_case_less(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_less_equal(ScriptInstance* script) { @@ -317,6 +313,7 @@ ApiStatus si_handle_case_less_equal(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var < switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -324,7 +321,6 @@ ApiStatus si_handle_case_less_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_greater(ScriptInstance* script) { @@ -340,6 +336,7 @@ ApiStatus si_handle_case_greater(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var >= switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -347,7 +344,6 @@ ApiStatus si_handle_case_greater(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_greater_equal(ScriptInstance* script) { @@ -363,6 +359,7 @@ ApiStatus si_handle_case_greater_equal(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var > switchBlockValue) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -370,7 +367,6 @@ ApiStatus si_handle_case_greater_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_range(ScriptInstance* script) { @@ -389,6 +385,7 @@ ApiStatus si_handle_case_range(ScriptInstance* script) { if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if ((var <= switchBlockValue) && (switchBlockValue <= var2)) { script->switchBlockState[switchDepth] = 0; } else { @@ -396,7 +393,6 @@ ApiStatus si_handle_case_range(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_else(ScriptInstance* script) { @@ -404,13 +400,14 @@ ApiStatus si_handle_case_else(ScriptInstance* script) { ASSERT(switchDepth >= 0); - if (script->switchBlockState[switchDepth] > 0) { - script->switchBlockState[switchDepth] = 0; - } else { + if (script->switchBlockState[switchDepth] <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; + } else { + script->switchBlockState[switchDepth] = 0; } + return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_flag(ScriptInstance* script) { @@ -428,6 +425,7 @@ ApiStatus si_handle_case_flag(ScriptInstance* script) { if (switchBlockState <= 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if ((var & switchBlockValue) == 0) { script->ptrNextLine = si_goto_next_case(script); } else { @@ -435,7 +433,6 @@ ApiStatus si_handle_case_flag(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_multi_or_equal(ScriptInstance* script) { @@ -453,6 +450,7 @@ ApiStatus si_handle_case_multi_or_equal(ScriptInstance* script) { if (switchBlockState == 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (var == switchBlockValue) { script->switchBlockState[switchDepth] = -1; } else if (switchBlockState != -1) { @@ -460,7 +458,6 @@ ApiStatus si_handle_case_multi_or_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_case_multi_and_equal(ScriptInstance* script) { @@ -478,6 +475,7 @@ ApiStatus si_handle_case_multi_and_equal(ScriptInstance* script) { if (switchBlockState == 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (switchBlockState == -2) { script->ptrNextLine = si_goto_next_case(script); } else if (var == switchBlockValue) { @@ -488,7 +486,6 @@ ApiStatus si_handle_case_multi_and_equal(ScriptInstance* script) { } return ApiStatus_DONE2; - do {} while (0); // Necessary to match } ApiStatus si_handle_end_case_multi(ScriptInstance* script) { @@ -496,6 +493,7 @@ ApiStatus si_handle_end_case_multi(ScriptInstance* script) { if (script->switchBlockState[script->switchDepth] == 0) { script->ptrNextLine = si_goto_end_case(script); + return ApiStatus_DONE2; } else if (script->switchBlockState[script->switchDepth] != -1) { script->switchBlockState[script->switchDepth] = 1; script->ptrNextLine = si_goto_next_case(script); @@ -505,8 +503,6 @@ ApiStatus si_handle_end_case_multi(ScriptInstance* script) { } return ApiStatus_DONE2; - - do {} while (0); // Necessary to match } ApiStatus si_handle_break_match(ScriptInstance* script) { diff --git a/src/world/area_end/end_01/E07C20.c b/src/world/area_end/end_01/E07C20.c index ca153ec4e6..312a6bc7dc 100644 --- a/src/world/area_end/end_01/E07C20.c +++ b/src/world/area_end/end_01/E07C20.c @@ -15,6 +15,7 @@ INCLUDE_ASM(s32, "world/area_end/end_01/E07C20", func_80242B68_E07EC8); INCLUDE_ASM(s32, "world/area_end/end_01/E07C20", func_80242C68_E07FC8); void func_80242C94_E07FF4(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, SHADE, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80245D37); } diff --git a/src/world/area_hos/hos_01/A11020.c b/src/world/area_hos/hos_01/A11020.c index ecfa4cd692..5b6df02f09 100644 --- a/src/world/area_hos/hos_01/A11020.c +++ b/src/world/area_hos/hos_01/A11020.c @@ -14,14 +14,16 @@ INCLUDE_ASM(s32, "world/area_hos/hos_01/A11020", func_80240B10_A11390); INCLUDE_ASM(s32, "world/area_hos/hos_01/A11020", func_80240B64_A113E4); void func_80240BB8_A11438(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80241C2F); } INCLUDE_ASM(s32, "world/area_hos/hos_01/A11020", func_80240C08_A11488); void func_80240C34_A114B4(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80241C33); } diff --git a/src/world/area_hos/hos_05/A2EF00.c b/src/world/area_hos/hos_05/A2EF00.c index f7a96110e9..4492be4a7a 100644 --- a/src/world/area_hos/hos_05/A2EF00.c +++ b/src/world/area_hos/hos_05/A2EF00.c @@ -17,21 +17,24 @@ INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EF00", func_80244DE4_A2F024); INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EF00", func_802452C4_A2F504); void func_8024564C_A2F88C(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_802D9D73); } INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EF00", func_8024569C_A2F8DC); void func_802456C8_A2F908(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_8024DCCF); } INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EF00", func_80245718_A2F958); void func_80245744_A2F984(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_8024DCD3); } diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 7996bc7626..b1246aeb20 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -50,7 +50,6 @@ ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { #include "world/common/CheckPartnerFlags1000.inc.c" -// 8C85E0 Vec4f N(entryList)[] = { { -340.0f, 0.0f, 348.0f, 48.0f }, { 480.0f, 0.0f, 0.0f, 270.0f }, diff --git a/src/world/area_kmr/kmr_30/90B9E0.c b/src/world/area_kmr/kmr_30/90B9E0.c index b226924159..4a78767077 100644 --- a/src/world/area_kmr/kmr_30/90B9E0.c +++ b/src/world/area_kmr/kmr_30/90B9E0.c @@ -7,6 +7,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_30/90B9E0", func_80240310_90B9E0); INCLUDE_ASM(s32, "world/area_kmr/kmr_30/90B9E0", func_8024045C_90BB2C); void func_80240488_90BB58(void) { - gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80240C0F); } diff --git a/src/world/world.c b/src/world/world.c index 8b6632c172..d95dfa8090 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -2,48 +2,6 @@ #include "ld_addrs.h" #include "map.h" -INCLUDE_ASM(s32, "world/world", func_80058DD0); - -INCLUDE_ASM(s32, "world/world", func_80058E84); - -INCLUDE_ASM(s32, "world/world", func_80058F88); - -INCLUDE_ASM(s32, "world/world", func_80059008); - -INCLUDE_ASM(s32, "world/world", func_8005904C); - -INCLUDE_ASM(s32, "world/world", func_80059310); - -INCLUDE_ASM(s32, "world/world", func_800598A0); - -INCLUDE_ASM(s32, "world/world", func_80059AB8); - -INCLUDE_ASM(s32, "world/world", func_80059BD4); - -void func_80059C80(void) { -} - -INCLUDE_ASM(s32, "world/world", func_80059C88); - -INCLUDE_ASM(s32, "world/world", func_80059C9C); - -void func_80059D48(void) { -} - -INCLUDE_ASM(s32, "world/world", func_80059D50); - -INCLUDE_ASM(s32, "world/world", render_effects); - -INCLUDE_ASM(s32, "world/world", func_80059F94); - -INCLUDE_ASM(s32, "world/world", func_8005A2BC); - -INCLUDE_ASM(s32, "world/world", remove_effect); - -INCLUDE_ASM(s32, "world/world", remove_all_effects); - -INCLUDE_ASM(s32, "world/world", play_effect); - void load_world_script_api(void) { dma_copy(&world_script_api_ROM_START, &world_script_api_ROM_END, &world_script_api_VRAM); } @@ -100,7 +58,7 @@ static Map mac_maps[] = { { MAP_UNSPLIT(mac_01, 0x80246730), .bgName = "nok_bg" }, { MAP_UNSPLIT(mac_02, 0x80243580), .bgName = "nok_bg" }, { MAP_UNSPLIT(mac_03, 0x802428B0), .bgName = "nok_bg" }, - { MAP_UNSPLIT(mac_04, 0x80242080), .bgName = "nok_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(mac_04, 0x80242080), .bgName = "nok_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(mac_05, 0x802441A0), .bgName = "nok_bg" }, { MAP_UNSPLIT(mac_06, 0x802416A0), .bgName = "nok_bg" }, }; @@ -127,7 +85,7 @@ static Map tik_maps[] = { { MAP_UNSPLIT(tik_21, 0x80240990), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(tik_22, 0x802409D0), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(tik_23, 0x80241160), .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(tik_24, 0x80240ED0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(tik_24, 0x80240ED0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(tik_25, 0x802407D0), .songVariation = 1, .flags = 2 }, }; @@ -152,10 +110,10 @@ static Map kmr_maps[] = { { MAP_UNSPLIT(kmr_11, 0x80241180), .bgName = "kmr_bg" }, { MAP(kmr_12), .bgName = "kmr_bg" }, { MAP_UNSPLIT(kmr_20, 0x80242C00), .bgName = "kmr_bg" }, // Mario's House - { MAP_UNSPLIT(kmr_21, 0x802402F0), .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kmr_22, 0x80240DA0), .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kmr_23, 0x80241150), .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kmr_24, 0x80240120), .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kmr_21, 0x802402F0), .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kmr_22, 0x80240DA0), .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kmr_23, 0x80241150), .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kmr_24, 0x80240120), .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kmr_30, 0x802404F0) }, }; @@ -281,14 +239,14 @@ static Map nok_maps[] = { /// Star Region static Map hos_maps[] = { - { MAP_UNSPLIT(hos_00, 0x80240D50), .bgName = "nok_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(hos_00, 0x80240D50), .bgName = "nok_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(hos_01, 0x80240E40), .bgName = "hos_bg" }, { MAP_UNSPLIT(hos_02, 0x80242B90), .bgName = "hos_bg" }, { MAP_UNSPLIT(hos_03, 0x802435F0), .bgName = "hos_bg" }, { MAP_UNSPLIT(hos_04, 0x80240EE0), .bgName = "hos_bg" }, { MAP_UNSPLIT(hos_05, 0x80245910), .bgName = "hos_bg", .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(hos_06, 0x80242570), .bgName = "hos_bg" }, - { MAP_UNSPLIT(hos_10, 0x80240CE0), .bgName = "hos_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(hos_10, 0x80240CE0), .bgName = "hos_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(hos_20, 0x80240390), .bgName = "hos_bg" }, }; @@ -312,29 +270,29 @@ static Map kpa_maps[] = { { MAP_UNSPLIT(kpa_40, 0x80240040), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_41, 0x80240040), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_50, 0x80241A40), .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(kpa_51, 0x80241C40), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kpa_51, 0x80241C40), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kpa_52, 0x80241360), .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(kpa_53, 0x80240190), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kpa_53, 0x80240190), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kpa_60, 0x80240450), .bgName = "kpa_bg" }, { MAP_UNSPLIT(kpa_61, 0x80242360), .bgName = "kpa_bg" }, { MAP_UNSPLIT(kpa_62, 0x80240430), .bgName = "kpa_bg" }, { MAP_UNSPLIT(kpa_63, 0x802401B0), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_70, 0x80240B10), .songVariation = 1, .flags = 3 }, - { MAP_UNSPLIT(kpa_81, 0x80240480), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kpa_82, 0x80240460), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kpa_83, 0x80240090), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kpa_81, 0x80240480), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kpa_82, 0x80240460), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kpa_83, 0x80240090), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kpa_90, 0x80240020), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_91, 0x80241920), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_94, 0x80240020), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_95, 0x80241920), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_96, 0x80240040), .songVariation = 1, .flags = 1 }, - { MAP_UNSPLIT(kpa_100, 0x80240060), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kpa_101, 0x80240060), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kpa_100, 0x80240060), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kpa_101, 0x80240060), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kpa_102, 0x802435B0), .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kpa_111, 0x802413E0), .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kpa_112, 0x80240020), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_113, 0x80240AD0), .songVariation = 1, .flags = 3 }, - { MAP_UNSPLIT(kpa_114, 0x80240070), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kpa_114, 0x80240070), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kpa_115, 0x802413F0), .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kpa_116, 0x80240020), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(kpa_117, 0x80240010), .songVariation = 1, .flags = 1 }, @@ -349,24 +307,24 @@ static Map kpa_maps[] = { /// Peach's Castle Grounds static Map osr_maps[] = { { MAP_UNSPLIT(osr_00, 0x802407E0), .bgName = "nok_bg" }, - { MAP_UNSPLIT(osr_01, 0x80240B00), .bgName = "nok_bg", .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(osr_02, 0x80240170), .bgName = "kpa_bg", .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(osr_03, 0x802403F0), .bgName = "kpa_bg", .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(osr_04, 0x802400D0), .bgName = "nok_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(osr_01, 0x80240B00), .bgName = "nok_bg", .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(osr_02, 0x80240170), .bgName = "kpa_bg", .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(osr_03, 0x802403F0), .bgName = "kpa_bg", .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(osr_04, 0x802400D0), .bgName = "nok_bg", .init = (MapInit)0x80240000 }, }; /// Peach's Castle /// @bug There are two entries for kkj_26; the latter is unreachable. static Map kkj_maps[] = { - { MAP_UNSPLIT(kkj_00, 0x80241030), .bgName = "nok_bg", .songVariation = 1, .flags = 3, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kkj_00, 0x80241030), .bgName = "nok_bg", .songVariation = 1, .flags = 3, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kkj_01, 0x80240F10), .bgName = "nok_bg", .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kkj_02, 0x80240030), .bgName = "nok_bg", .flags = 2 }, - { MAP_UNSPLIT(kkj_03, 0x80240360), .bgName = "nok_bg", .flags = 3, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kkj_03, 0x80240360), .bgName = "nok_bg", .flags = 3, .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kkj_10, 0x80241120), .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kkj_11, 0x80241160), .songVariation = 1, .flags = 3 }, { MAP_UNSPLIT(kkj_12, 0x802408D0), .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(kkj_13, 0x802407A0), .bgName = "kpa_bg", .songVariation = 1, .flags = 3, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(kkj_14, 0x80240580), .bgName = "kpa_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kkj_13, 0x802407A0), .bgName = "kpa_bg", .songVariation = 1, .flags = 3, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(kkj_14, 0x80240580), .bgName = "kpa_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kkj_15, 0x80240640) }, { MAP_UNSPLIT(kkj_16, 0x80241090), .flags = 0x1 }, { MAP_UNSPLIT(kkj_17, 0x802405B0) }, @@ -375,9 +333,9 @@ static Map kkj_maps[] = { { MAP_UNSPLIT(kkj_20, 0x80240600) }, { MAP_UNSPLIT(kkj_21, 0x80240010), .flags = 0x1 }, { MAP_UNSPLIT(kkj_22, 0x80240020), .bgName = "kpa_bg", .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(kkj_23, 0x802409F0), .bgName = "kpa_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kkj_23, 0x802409F0), .bgName = "kpa_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kkj_24, 0x80240040), .bgName = "kpa_bg", .songVariation = 1, .flags = 2 }, - { MAP_UNSPLIT(kkj_25, 0x80240F50), .bgName = "kpa_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(kkj_25, 0x80240F50), .bgName = "kpa_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(kkj_26, 0x80240070), .bgName = "kpa_bg" }, { MAP_UNSPLIT(kkj_26, 0x80240070), .flags = 0x2 }, { MAP_UNSPLIT(kkj_27, 0x802404C0), .flags = 0x1 }, @@ -457,7 +415,7 @@ static Map arn_maps[] = { /// Tubba Blubba's Castle static Map dgb_maps[] = { - { MAP_UNSPLIT(dgb_00, 0x802400D0), .bgName = "arn_bg", .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(dgb_00, 0x802400D0), .bgName = "arn_bg", .init = (MapInit)0x80240000 }, { MAP_UNSPLIT(dgb_01, 0x80243460), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(dgb_02, 0x80241470), .songVariation = 1, .flags = 2 }, { MAP_UNSPLIT(dgb_03, 0x80242830), .songVariation = 1, .flags = 2 }, @@ -541,38 +499,38 @@ static Map sam_maps[] = { /// Crystal Palace static Map pra_maps[] = { - { MAP_UNSPLIT(pra_01, 0x80241400), .bgName = "yki_bg", .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_02, 0x802416C0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_03, 0x802401E0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_04, 0x80240970), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_05, 0x802411F0), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_06, 0x80240F60), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_09, 0x80241670), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_10, 0x802416D0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_11, 0x802411F0), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_12, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_13, 0x80241620), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_14, 0x80241200), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_15, 0x80240050), .bgName = "yki_bg", .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_16, 0x80240F60), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_18, 0x80240F50), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_19, 0x802419D0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_20, 0x80240F70), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_21, 0x80240140), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_22, 0x802402F0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_27, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_28, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_29, 0x802412C0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_31, 0x802410E0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_32, 0x80240850), .bgName = "sam_bg", .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_33, 0x802410C0), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_34, 0x80241040), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_35, 0x80242C40), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_36, 0x80240F70), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_37, 0x80241840), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_38, 0x80241700), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_39, 0x80241700), .songVariation = 1, .flags = 2, .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(pra_40, 0x80240F40), .songVariation = 1, .flags = 1, .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(pra_01, 0x80241400), .bgName = "yki_bg", .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_02, 0x802416C0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_03, 0x802401E0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_04, 0x80240970), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_05, 0x802411F0), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_06, 0x80240F60), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_09, 0x80241670), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_10, 0x802416D0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_11, 0x802411F0), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_12, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_13, 0x80241620), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_14, 0x80241200), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_15, 0x80240050), .bgName = "yki_bg", .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_16, 0x80240F60), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_18, 0x80240F50), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_19, 0x802419D0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_20, 0x80240F70), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_21, 0x80240140), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_22, 0x802402F0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_27, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_28, 0x80241220), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_29, 0x802412C0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_31, 0x802410E0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_32, 0x80240850), .bgName = "sam_bg", .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_33, 0x802410C0), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_34, 0x80241040), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_35, 0x80242C40), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_36, 0x80240F70), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_37, 0x80241840), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_38, 0x80241700), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_39, 0x80241700), .songVariation = 1, .flags = 2, .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(pra_40, 0x80240F40), .songVariation = 1, .flags = 1, .init = (MapInit)0x80240000 }, }; /// Shy Guy's Toy Box @@ -611,8 +569,8 @@ static Map tst_maps[] = { /// Credits static Map end_maps[] = { - { MAP_UNSPLIT(end_00, 0x80242B50), .init = (MapInit*)0x80240000 }, - { MAP_UNSPLIT(end_01, 0x80243000), .init = (MapInit*)0x80240000 }, + { MAP_UNSPLIT(end_00, 0x80242B50), .init = (MapInit)0x80240000 }, + { MAP_UNSPLIT(end_01, 0x80243000), .init = (MapInit)0x80240000 }, }; /// Toad Town Playroom diff --git a/tools/splat.yaml b/tools/splat.yaml index 1351623e5b..ca8303d181 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -63,7 +63,8 @@ segments: - [0x2e230, c, code_2e230_len_2190] - [0x303c0, c, code_303c0_len_3e10] - [0x31650, c, code_31650] - - [0x341d0, c, world/world] + - [0x341d0, c, code_341d0] + - [0x35ac0, c, world/world] - [0x362a0, c, code_362a0_len_2f70] - [0x39210, c, code_39210_len_aa0] - [0x39cb0, c, os/code_39cb0_len_100] @@ -307,7 +308,7 @@ segments: files: - [0x102610, c, code_102610_len_2330] - [0x102C80, c] - - [0x104730, c] + - [0x104730, c, code_104730] - [0x104940, c, code_104940_len_dc0] - [0x105700, c, code_105700_len_2130] - [0x105F90, c] @@ -316,12 +317,18 @@ segments: - [0x1086a0, c, code_1086a0_len_fc0] - [0x109660, c, code_109660_len_1270] - [0x10A8D0, c, code_10A8D0] - - [0x10A9F0, i4, shadow/square, 16, 16] - - [0x10AA70, i4, shadow/circle, 16, 16] - - [0x10AAF0, bin] - - [0x10AB70, i4, shadow/10AB70, 32, 32] - - [0x10AD70, i4, shadow/10AD70, 32, 32] - - [0x10AF70, bin] # TODO + - [0x10A9F0, bin] + #- [0x10A9F0, i4, shadow/square, 16, 16] + #- [0x10AA70, i4, shadow/circle, 16, 16] + - [0x10AAF0, bin] + #- [0x10AB70, i4, shadow/10AB70, 32, 32] + #- [0x10AD70, i4, shadow/10AD70, 32, 32] + - [0x10AF70, .data, code_104730] + - [0x10B608, bin] + - [0x10C880, rodata, code_102c80] + - [0x10C9E0, .rodata, code_104730] + - [0x10CA50, rodata, code_104940_len_dc0] + - [0x10CAF0, bin] - [0x1164B8, ci8, peach_letter, 150, 105] - [0x11A23E, bin] - [0x11A240, palette, peach_letter] diff --git a/undefined_syms.txt b/undefined_syms.txt index 511450ae76..3f90eef00c 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -69,5 +69,50 @@ D_80254C50 = 0x80254C50; D_80258E14 = 0x80258E14; D_80258E14 = 0x80258E14; +D_00000094 = 0x00000094; +D_00000094_2 = 0x00000094; +D_0A000808 = 0x0A000808; +D_0A000328 = 0x0A000328; +D_0A000380 = 0x0A000380; +D_0A000380 = 0x0A000380; +D_0A000740 = 0x0A000740; +D_0A000750 = 0x0A000750; +D_0A000800 = 0x0A000800; +D_0A000EE8 = 0x0A000EE8; +D_0A000EF8 = 0x0A000EF8; +D_0A004350 = 0x0A004350; +D_0A0026F0 = 0x0A0026F0; D_00074210 = 0x00074210; D_00074230 = 0x00074230; +D_0A0031E0 = 0x0A0031E0; +D_0A001508 = 0x0A001508; +D_0A0031B0 = 0x0A0031B0; +D_0A0014D8 = 0x0A0014D8; +D_0A002F78 = 0x0A002F78; +D_0A001218 = 0x0A001218; +D_0A003F70 = 0x0A003F70; +D_0A002318 = 0x0A002318; +D_0A003508 = 0x0A003508; + +D_802E9828 = 0x802E9828; +D_802E9C40 = 0x802E9C40; +D_802E9C70 = 0x802E9C70; +D_802E91F0 = 0x802E91F0; +D_802E9170 = 0x802E9170; +D_802E9270 = 0x802E9270; +D_802E92B0 = 0x802E92B0; + + +D_00E32420 = 0x00E32420; +D_00E35670 = 0x00E35670; +D_00E38890 = 0x00E38890; +D_00E3B870 = 0x00E3B870; +D_00E3E260 = 0x00E3E260; +D_00E42240 = 0x00E42240; + +D_00E4B2E0 = 0x00E4B2E0; +D_00E4E7F0 = 0x00E4E7F0; +D_00E62370 = 0x00E62370; +D_00E62AC0 = 0x00E62AC0; +D_00E639C0 = 0x00E639C0; +D_00E648D0 = 0x00E648D0; \ No newline at end of file