diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/clear_model_data.s b/asm/nonmatchings/code_a5dd0_len_114e0/clear_model_data.s index 46232c5431..94323ff27c 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/clear_model_data.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/clear_model_data.s @@ -15,8 +15,8 @@ glabel clear_model_data /* AC46C 80115D6C 24421F70 */ addiu $v0, $v0, 0x1f70 /* AC470 80115D70 3C018015 */ lui $at, 0x8015 /* AC474 80115D74 AC2212E0 */ sw $v0, 0x12e0($at) -/* AC478 80115D78 3C028015 */ lui $v0, 0x8015 -/* AC47C 80115D7C 24421F90 */ addiu $v0, $v0, 0x1f90 +/* AC478 80115D78 3C028015 */ lui $v0, %hi(gWorldModelSpecialDls) +/* AC47C 80115D7C 24421F90 */ addiu $v0, $v0, %lo(gWorldModelSpecialDls) /* AC480 80115D80 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) /* AC484 80115D84 AC2212E8 */ sw $v0, %lo(gCurrentModelSpecialDlsPtr)($at) /* AC488 80115D88 3C028015 */ lui $v0, 0x8015 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E224.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E224.s index 872c5ecf9d..32da325a2c 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E224.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E224.s @@ -9,8 +9,8 @@ glabel func_8011E224 /* B4934 8011E234 2404FFFF */ addiu $a0, $zero, -1 /* B4938 8011E238 3C028015 */ lui $v0, 0x8015 /* B493C 8011E23C 244239C0 */ addiu $v0, $v0, 0x39c0 -/* B4940 8011E240 3C018015 */ lui $at, 0x8015 -/* B4944 8011E244 AC223A40 */ sw $v0, 0x3a40($at) +/* B4940 8011E240 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) +/* B4944 8011E244 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) /* B4948 8011E248 2403005F */ addiu $v1, $zero, 0x5f /* B494C 8011E24C 3C028015 */ lui $v0, 0x8015 /* B4950 8011E250 244236B8 */ addiu $v0, $v0, 0x36b8 @@ -33,11 +33,11 @@ glabel func_8011E224 .L8011E28C: /* B498C 8011E28C 3C028015 */ lui $v0, 0x8015 /* B4990 8011E290 24423A00 */ addiu $v0, $v0, 0x3a00 -/* B4994 8011E294 3C018015 */ lui $at, 0x8015 -/* B4998 8011E298 AC223A40 */ sw $v0, 0x3a40($at) +/* B4994 8011E294 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) +/* B4998 8011E298 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) .L8011E29C: -/* B499C 8011E29C 3C028015 */ lui $v0, 0x8015 -/* B49A0 8011E2A0 8C423A40 */ lw $v0, 0x3a40($v0) +/* B499C 8011E29C 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B49A0 8011E2A0 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B49A4 8011E2A4 2403000F */ addiu $v1, $zero, 0xf /* B49A8 8011E2A8 2442003C */ addiu $v0, $v0, 0x3c .L8011E2AC: diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E310.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E310.s index a9740098d5..5c4aee6771 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E310.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E310.s @@ -15,8 +15,8 @@ glabel func_8011E310 /* B4A34 8011E334 3C028015 */ lui $v0, 0x8015 /* B4A38 8011E338 24423A00 */ addiu $v0, $v0, 0x3a00 .L8011E33C: -/* B4A3C 8011E33C 3C018015 */ lui $at, 0x8015 -/* B4A40 8011E340 AC223A40 */ sw $v0, 0x3a40($at) +/* B4A3C 8011E33C 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) +/* B4A40 8011E340 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) /* B4A44 8011E344 2402000A */ addiu $v0, $zero, 0xa /* B4A48 8011E348 3C018015 */ lui $at, 0x8015 /* B4A4C 8011E34C AC223A48 */ sw $v0, 0x3a48($at) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E438.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E438.s index af8b649804..38cb6446df 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E438.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E438.s @@ -11,8 +11,8 @@ glabel func_8011E438 /* B4B50 8011E450 A2000014 */ sb $zero, 0x14($s0) /* B4B54 8011E454 0C0478E6 */ jal func_8011E398 /* B4B58 8011E458 00000000 */ nop -/* B4B5C 8011E45C 3C038015 */ lui $v1, 0x8015 -/* B4B60 8011E460 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4B5C 8011E45C 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4B60 8011E460 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4B64 8011E464 0000202D */ daddu $a0, $zero, $zero /* B4B68 8011E468 AE000010 */ sw $zero, 0x10($s0) .L8011E46C: diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E4B8.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E4B8.s index 46028d9f65..65639b9f22 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E4B8.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E4B8.s @@ -2,8 +2,8 @@ .set noreorder # don't insert nops after branches glabel func_8011E4B8 -/* B4BB8 8011E4B8 3C038015 */ lui $v1, 0x8015 -/* B4BBC 8011E4BC 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4BB8 8011E4B8 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4BBC 8011E4BC 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4BC0 8011E4C0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B4BC4 8011E4C4 AFB10014 */ sw $s1, 0x14($sp) /* B4BC8 8011E4C8 0080882D */ daddu $s1, $a0, $zero @@ -29,8 +29,8 @@ glabel func_8011E4B8 /* B4C08 8011E508 0C00AB39 */ jal heap_malloc /* B4C0C 8011E50C 240402E0 */ addiu $a0, $zero, 0x2e0 /* B4C10 8011E510 00102080 */ sll $a0, $s0, 2 -/* B4C14 8011E514 3C038015 */ lui $v1, 0x8015 -/* B4C18 8011E518 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4C14 8011E514 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4C18 8011E518 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4C1C 8011E51C 3C058015 */ lui $a1, 0x8015 /* B4C20 8011E520 24A512D4 */ addiu $a1, $a1, 0x12d4 /* B4C24 8011E524 00832021 */ addu $a0, $a0, $v1 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E5E0.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E5E0.s index 219e8030cc..50bb059d0f 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E5E0.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E5E0.s @@ -2,8 +2,8 @@ .set noreorder # don't insert nops after branches glabel func_8011E5E0 -/* B4CE0 8011E5E0 3C038015 */ lui $v1, 0x8015 -/* B4CE4 8011E5E4 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4CE0 8011E5E0 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4CE4 8011E5E4 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4CE8 8011E5E8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* B4CEC 8011E5EC AFB10014 */ sw $s1, 0x14($sp) /* B4CF0 8011E5F0 0080882D */ daddu $s1, $a0, $zero @@ -31,8 +31,8 @@ glabel func_8011E5E0 /* B4D38 8011E638 0C00AB39 */ jal heap_malloc /* B4D3C 8011E63C 240402E0 */ addiu $a0, $zero, 0x2e0 /* B4D40 8011E640 00102080 */ sll $a0, $s0, 2 -/* B4D44 8011E644 3C038015 */ lui $v1, 0x8015 -/* B4D48 8011E648 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4D44 8011E644 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4D48 8011E648 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4D4C 8011E64C 3C058015 */ lui $a1, 0x8015 /* B4D50 8011E650 24A512D4 */ addiu $a1, $a1, 0x12d4 /* B4D54 8011E654 00832021 */ addu $a0, $a0, $v1 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E8BC.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E8BC.s index d9f7c98be9..21acb862e5 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E8BC.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011E8BC.s @@ -17,8 +17,8 @@ glabel func_8011E8BC .L8011E8EC: /* B4FEC 8011E8EC 2402F7FF */ addiu $v0, $zero, -0x801 /* B4FF0 8011E8F0 00822024 */ and $a0, $a0, $v0 -/* B4FF4 8011E8F4 3C038015 */ lui $v1, 0x8015 -/* B4FF8 8011E8F8 8C633A40 */ lw $v1, 0x3a40($v1) +/* B4FF4 8011E8F4 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B4FF8 8011E8F8 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B4FFC 8011E8FC 00041080 */ sll $v0, $a0, 2 /* B5000 8011E900 00431021 */ addu $v0, $v0, $v1 /* B5004 8011E904 8C500000 */ lw $s0, ($v0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011EA54.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011EA54.s index 26cbea428a..e606b6da6d 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011EA54.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011EA54.s @@ -18,8 +18,8 @@ glabel func_8011EA54 .L8011EA88: /* B5188 8011EA88 2402F7FF */ addiu $v0, $zero, -0x801 /* B518C 8011EA8C 00822024 */ and $a0, $a0, $v0 -/* B5190 8011EA90 3C038015 */ lui $v1, 0x8015 -/* B5194 8011EA94 8C633A40 */ lw $v1, 0x3a40($v1) +/* B5190 8011EA90 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B5194 8011EA94 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B5198 8011EA98 00041080 */ sll $v0, $a0, 2 /* B519C 8011EA9C 00431021 */ addu $v0, $v0, $v1 /* B51A0 8011EAA0 8C500000 */ lw $s0, ($v0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F304.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F304.s index 63fb282b0e..edb58da4a1 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F304.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F304.s @@ -15,8 +15,8 @@ glabel func_8011F304 .L8011F32C: /* B5A2C 8011F32C 2402F7FF */ addiu $v0, $zero, -0x801 /* B5A30 8011F330 00822024 */ and $a0, $a0, $v0 -/* B5A34 8011F334 3C038015 */ lui $v1, 0x8015 -/* B5A38 8011F338 8C633A40 */ lw $v1, 0x3a40($v1) +/* B5A34 8011F334 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B5A38 8011F338 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B5A3C 8011F33C 00041080 */ sll $v0, $a0, 2 /* B5A40 8011F340 00431021 */ addu $v0, $v0, $v1 /* B5A44 8011F344 8C470000 */ lw $a3, ($v0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F3E8.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F3E8.s index e5fd74d3bf..c947596a52 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F3E8.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011F3E8.s @@ -15,8 +15,8 @@ glabel func_8011F3E8 .L8011F410: /* B5B10 8011F410 2402F7FF */ addiu $v0, $zero, -0x801 /* B5B14 8011F414 00822024 */ and $a0, $a0, $v0 -/* B5B18 8011F418 3C038015 */ lui $v1, 0x8015 -/* B5B1C 8011F41C 8C633A40 */ lw $v1, 0x3a40($v1) +/* B5B18 8011F418 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B5B1C 8011F41C 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B5B20 8011F420 00041080 */ sll $v0, $a0, 2 /* B5B24 8011F424 00431021 */ addu $v0, $v0, $v1 /* B5B28 8011F428 8C490000 */ lw $t1, ($v0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s index 7f6d056168..1b9217c601 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s @@ -4,8 +4,8 @@ glabel func_8011FFE0 /* B66E0 8011FFE0 2402F7FF */ addiu $v0, $zero, -0x801 /* B66E4 8011FFE4 00822024 */ and $a0, $a0, $v0 -/* B66E8 8011FFE8 3C028015 */ lui $v0, 0x8015 -/* B66EC 8011FFEC 8C423A40 */ lw $v0, 0x3a40($v0) +/* B66E8 8011FFE8 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B66EC 8011FFEC 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B66F0 8011FFF0 00042080 */ sll $a0, $a0, 2 /* B66F4 8011FFF4 00822021 */ addu $a0, $a0, $v0 /* B66F8 8011FFF8 03E00008 */ jr $ra diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120000.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120000.s index 6978358df2..675bb6219d 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120000.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120000.s @@ -4,8 +4,8 @@ glabel func_80120000 /* B6700 80120000 2402F7FF */ addiu $v0, $zero, -0x801 /* B6704 80120004 00822024 */ and $a0, $a0, $v0 -/* B6708 80120008 3C028015 */ lui $v0, 0x8015 -/* B670C 8012000C 8C423A40 */ lw $v0, 0x3a40($v0) +/* B6708 80120008 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B670C 8012000C 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B6710 80120010 00042080 */ sll $a0, $a0, 2 /* B6714 80120014 00822021 */ addu $a0, $a0, $v0 /* B6718 80120018 8C820000 */ lw $v0, ($a0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_801200EC.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_801200EC.s index 9ac3a3d20f..950fa70a50 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_801200EC.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_801200EC.s @@ -4,8 +4,8 @@ glabel func_801200EC /* B67EC 801200EC 2402F7FF */ addiu $v0, $zero, -0x801 /* B67F0 801200F0 00822024 */ and $a0, $a0, $v0 -/* B67F4 801200F4 3C028015 */ lui $v0, 0x8015 -/* B67F8 801200F8 8C423A40 */ lw $v0, 0x3a40($v0) +/* B67F4 801200F4 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B67F8 801200F8 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B67FC 801200FC 00042080 */ sll $a0, $a0, 2 /* B6800 80120100 00822021 */ addu $a0, $a0, $v0 /* B6804 80120104 8C830000 */ lw $v1, ($a0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120118.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120118.s index 36f5aa2b97..f2dcece28e 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120118.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120118.s @@ -4,8 +4,8 @@ glabel func_80120118 /* B6818 80120118 2402F7FF */ addiu $v0, $zero, -0x801 /* B681C 8012011C 00822024 */ and $a0, $a0, $v0 -/* B6820 80120120 3C028015 */ lui $v0, 0x8015 -/* B6824 80120124 8C423A40 */ lw $v0, 0x3a40($v0) +/* B6820 80120120 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B6824 80120124 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B6828 80120128 00042080 */ sll $a0, $a0, 2 /* B682C 8012012C 00822021 */ addu $a0, $a0, $v0 /* B6830 80120130 8C830000 */ lw $v1, ($a0) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120198.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120198.s index 980690f243..57a0520eee 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120198.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120198.s @@ -6,8 +6,8 @@ glabel func_80120198 /* B689C 8012019C 2402F7FF */ addiu $v0, $zero, -0x801 /* B68A0 801201A0 AFB10014 */ sw $s1, 0x14($sp) /* B68A4 801201A4 00828824 */ and $s1, $a0, $v0 -/* B68A8 801201A8 3C038015 */ lui $v1, 0x8015 -/* B68AC 801201AC 8C633A40 */ lw $v1, 0x3a40($v1) +/* B68A8 801201A8 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B68AC 801201AC 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B68B0 801201B0 00111080 */ sll $v0, $s1, 2 /* B68B4 801201B4 AFBF001C */ sw $ra, 0x1c($sp) /* B68B8 801201B8 AFB20018 */ sw $s2, 0x18($sp) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_801203AC.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_801203AC.s index 800531754b..0d7e2b5115 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_801203AC.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_801203AC.s @@ -5,8 +5,8 @@ glabel func_801203AC /* B6AAC 801203AC 27BDFE00 */ addiu $sp, $sp, -0x200 /* B6AB0 801203B0 2402F7FF */ addiu $v0, $zero, -0x801 /* B6AB4 801203B4 00822024 */ and $a0, $a0, $v0 -/* B6AB8 801203B8 3C028015 */ lui $v0, 0x8015 -/* B6ABC 801203BC 8C423A40 */ lw $v0, 0x3a40($v0) +/* B6AB8 801203B8 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B6ABC 801203BC 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B6AC0 801203C0 00042080 */ sll $a0, $a0, 2 /* B6AC4 801203C4 AFBF01FC */ sw $ra, 0x1fc($sp) /* B6AC8 801203C8 AFB001F8 */ sw $s0, 0x1f8($sp) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120474.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120474.s index 442bc0e678..4e13e0a6ff 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_80120474.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/func_80120474.s @@ -5,8 +5,8 @@ glabel func_80120474 /* B6B74 80120474 27BDFE00 */ addiu $sp, $sp, -0x200 /* B6B78 80120478 2402F7FF */ addiu $v0, $zero, -0x801 /* B6B7C 8012047C 00822024 */ and $a0, $a0, $v0 -/* B6B80 80120480 3C038015 */ lui $v1, 0x8015 -/* B6B84 80120484 8C633A40 */ lw $v1, 0x3a40($v1) +/* B6B80 80120480 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) +/* B6B84 80120484 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) /* B6B88 80120488 00041080 */ sll $v0, $a0, 2 /* B6B8C 8012048C AFBF01FC */ sw $ra, 0x1fc($sp) /* B6B90 80120490 AFB001F8 */ sw $s0, 0x1f8($sp) diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/init_model_data.s b/asm/nonmatchings/code_a5dd0_len_114e0/init_model_data.s index 9e5f7ada64..2fa2d2d7d7 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/init_model_data.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/init_model_data.s @@ -15,8 +15,8 @@ glabel init_model_data /* AC710 80116010 24421F70 */ addiu $v0, $v0, 0x1f70 /* AC714 80116014 3C018015 */ lui $at, 0x8015 /* AC718 80116018 AC2212E0 */ sw $v0, 0x12e0($at) -/* AC71C 8011601C 3C028015 */ lui $v0, 0x8015 -/* AC720 80116020 24421F90 */ addiu $v0, $v0, 0x1f90 +/* AC71C 8011601C 3C028015 */ lui $v0, %hi(gWorldModelSpecialDls) +/* AC720 80116020 24421F90 */ addiu $v0, $v0, %lo(gWorldModelSpecialDls) /* AC724 80116024 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) /* AC728 80116028 AC2212E8 */ sw $v0, %lo(gCurrentModelSpecialDlsPtr)($at) /* AC72C 8011602C 3C028015 */ lui $v0, 0x8015 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/play_model_animation.s b/asm/nonmatchings/code_a5dd0_len_114e0/play_model_animation.s index 37da73a5e1..a6e58b2ce2 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/play_model_animation.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/play_model_animation.s @@ -4,8 +4,8 @@ glabel play_model_animation /* B6848 80120148 2402F7FF */ addiu $v0, $zero, -0x801 /* B684C 8012014C 00822024 */ and $a0, $a0, $v0 -/* B6850 80120150 3C028015 */ lui $v0, 0x8015 -/* B6854 80120154 8C423A40 */ lw $v0, 0x3a40($v0) +/* B6850 80120150 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) +/* B6854 80120154 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) /* B6858 80120158 00042080 */ sll $a0, $a0, 2 /* B685C 8012015C 00822021 */ addu $a0, $a0, $v0 /* B6860 80120160 8C840000 */ lw $a0, ($a0) diff --git a/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s b/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s index e15b9635a8..114cefa93f 100644 --- a/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s +++ b/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s @@ -28,8 +28,8 @@ glabel AddAnimModelPosition /* F1B38 802CD188 8E050000 */ lw $a1, ($s0) /* F1B3C 802CD18C 0C0B210B */ jal get_float_variable /* F1B40 802CD190 46000506 */ mov.s $f20, $f0 -/* F1B44 802CD194 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F1B48 802CD198 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F1B44 802CD194 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F1B48 802CD198 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F1B4C 802CD19C 00118880 */ sll $s1, $s1, 2 /* F1B50 802CD1A0 02228821 */ addu $s1, $s1, $v0 /* F1B54 802CD1A4 8E230000 */ lw $v1, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s b/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s index e90ceb5086..ac3a426a16 100644 --- a/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s +++ b/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s @@ -17,8 +17,8 @@ glabel LoadModelAnimation /* F16CC 802CCD1C 0C0B1EAF */ jal get_variable /* F16D0 802CCD20 0040802D */ daddu $s0, $v0, $zero /* F16D4 802CCD24 0040902D */ daddu $s2, $v0, $zero -/* F16D8 802CCD28 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F16DC 802CCD2C 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F16D8 802CCD28 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F16DC 802CCD2C 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F16E0 802CCD30 00108080 */ sll $s0, $s0, 2 /* F16E4 802CCD34 02028021 */ addu $s0, $s0, $v0 /* F16E8 802CCD38 8E100000 */ lw $s0, ($s0) diff --git a/asm/nonmatchings/code_ef070_len_3400/draw_anim_models.s b/asm/nonmatchings/code_ef070_len_3400/draw_anim_models.s index 6fbf7df9e1..66fa0e9529 100644 --- a/asm/nonmatchings/code_ef070_len_3400/draw_anim_models.s +++ b/asm/nonmatchings/code_ef070_len_3400/draw_anim_models.s @@ -28,8 +28,8 @@ glabel draw_anim_models /* F1524 802CCB74 AFB00220 */ sw $s0, 0x220($sp) /* F1528 802CCB78 AFA80218 */ sw $t0, 0x218($sp) .L802CCB7C: -/* F152C 802CCB7C 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F1530 802CCB80 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F152C 802CCB7C 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F1530 802CCB80 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F1534 802CCB84 00131880 */ sll $v1, $s3, 2 /* F1538 802CCB88 00621821 */ addu $v1, $v1, $v0 /* F153C 802CCB8C 8C710000 */ lw $s1, ($v1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s b/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s index 92ccddbbba..8aa048d12c 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s @@ -17,8 +17,8 @@ glabel func_802CCDAC /* F178C 802CCDDC 0C0B1EAF */ jal get_variable /* F1790 802CCDE0 0040802D */ daddu $s0, $v0, $zero /* F1794 802CCDE4 0040902D */ daddu $s2, $v0, $zero -/* F1798 802CCDE8 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F179C 802CCDEC 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F1798 802CCDE8 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F179C 802CCDEC 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F17A0 802CCDF0 00108080 */ sll $s0, $s0, 2 /* F17A4 802CCDF4 02028021 */ addu $s0, $s0, $v0 /* F17A8 802CCDF8 8E100000 */ lw $s0, ($s0) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s index ebb2f3d1cc..b8575a3b17 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s @@ -15,8 +15,8 @@ glabel func_802CD348 /* F1D20 802CD370 8E050000 */ lw $a1, ($s0) /* F1D24 802CD374 0C0B210B */ jal get_float_variable /* F1D28 802CD378 0040802D */ daddu $s0, $v0, $zero -/* F1D2C 802CD37C 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F1D30 802CD380 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F1D2C 802CD37C 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F1D30 802CD380 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F1D34 802CD384 00108080 */ sll $s0, $s0, 2 /* F1D38 802CD388 02028021 */ addu $s0, $s0, $v0 /* F1D3C 802CD38C 8E020000 */ lw $v0, ($s0) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s index 56eaf7f3f8..07b97bfebc 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s @@ -17,8 +17,8 @@ glabel func_802CD418 /* F1DF8 802CD448 8E120000 */ lw $s2, ($s0) /* F1DFC 802CD44C 0C0B1EAF */ jal get_variable /* F1E00 802CD450 0040882D */ daddu $s1, $v0, $zero -/* F1E04 802CD454 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F1E08 802CD458 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F1E04 802CD454 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F1E08 802CD458 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F1E0C 802CD45C 00118880 */ sll $s1, $s1, 2 /* F1E10 802CD460 02238821 */ addu $s1, $s1, $v1 /* F1E14 802CD464 8E230000 */ lw $v1, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD4B4.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD4B4.s index ff00bc5b1b..3afb237f93 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD4B4.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD4B4.s @@ -12,24 +12,24 @@ glabel func_802CD4B4 /* F1E80 802CD4D0 80420070 */ lb $v0, 0x70($v0) /* F1E84 802CD4D4 14400005 */ bnez $v0, .L802CD4EC /* F1E88 802CD4D8 00000000 */ nop -/* F1E8C 802CD4DC 3C02802E */ lui $v0, %hi(gWorldMeshAnimations) -/* F1E90 802CD4E0 2442ADF0 */ addiu $v0, $v0, %lo(gWorldMeshAnimations) +/* F1E8C 802CD4DC 3C02802E */ lui $v0, %hi(gWorldMeshAnimationList) +/* F1E90 802CD4E0 2442ADF0 */ addiu $v0, $v0, %lo(gWorldMeshAnimationList) /* F1E94 802CD4E4 080B353D */ j .L802CD4F4 /* F1E98 802CD4E8 00000000 */ nop .L802CD4EC: -/* F1E9C 802CD4EC 3C02802E */ lui $v0, %hi(gBattleMeshAnimations) -/* F1EA0 802CD4F0 2442ADB0 */ addiu $v0, $v0, %lo(gBattleMeshAnimations) +/* F1E9C 802CD4EC 3C02802E */ lui $v0, %hi(gBattleMeshAnimationList) +/* F1EA0 802CD4F0 2442ADB0 */ addiu $v0, $v0, %lo(gBattleMeshAnimationList) .L802CD4F4: -/* F1EA4 802CD4F4 3C01802E */ lui $at, %hi(gMeshAnimationsPtr) -/* F1EA8 802CD4F8 AC22AE30 */ sw $v0, %lo(gMeshAnimationsPtr)($at) +/* F1EA4 802CD4F4 3C01802E */ lui $at, %hi(gCurrentMeshAnimationListPtr) +/* F1EA8 802CD4F8 AC22AE30 */ sw $v0, %lo(gCurrentMeshAnimationListPtr)($at) /* F1EAC 802CD4FC 0000882D */ daddu $s1, $zero, $zero /* F1EB0 802CD500 2412FFFF */ addiu $s2, $zero, -1 /* F1EB4 802CD504 0220802D */ daddu $s0, $s1, $zero .L802CD508: /* F1EB8 802CD508 0C00AB39 */ jal heap_malloc /* F1EBC 802CD50C 24040070 */ addiu $a0, $zero, 0x70 -/* F1EC0 802CD510 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F1EC4 802CD514 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F1EC0 802CD510 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F1EC4 802CD514 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F1EC8 802CD518 02031821 */ addu $v1, $s0, $v1 /* F1ECC 802CD51C 14400003 */ bnez $v0, .L802CD52C /* F1ED0 802CD520 AC620000 */ sw $v0, ($v1) @@ -37,8 +37,8 @@ glabel func_802CD4B4 /* F1ED4 802CD524 080B3549 */ j .L802CD524 /* F1ED8 802CD528 00000000 */ nop .L802CD52C: -/* F1EDC 802CD52C 3C02802E */ lui $v0, %hi(gMeshAnimationsPtr) -/* F1EE0 802CD530 8C42AE30 */ lw $v0, %lo(gMeshAnimationsPtr)($v0) +/* F1EDC 802CD52C 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) +/* F1EE0 802CD530 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F1EE4 802CD534 26310001 */ addiu $s1, $s1, 1 /* F1EE8 802CD538 02021021 */ addu $v0, $s0, $v0 /* F1EEC 802CD53C 8C420000 */ lw $v0, ($v0) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s index e30d159494..659a0dc841 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s @@ -23,8 +23,8 @@ glabel func_802CD5C0 /* F1FB8 802CD608 00118880 */ sll $s1, $s1, 2 /* F1FBC 802CD60C 8E140000 */ lw $s4, ($s0) /* F1FC0 802CD610 26100004 */ addiu $s0, $s0, 4 -/* F1FC4 802CD614 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F1FC8 802CD618 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F1FC4 802CD614 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F1FC8 802CD618 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F1FCC 802CD61C 8E150000 */ lw $s5, ($s0) /* F1FD0 802CD620 02238821 */ addu $s1, $s1, $v1 /* F1FD4 802CD624 8E330000 */ lw $s3, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s index fe83bbbae9..d5f620f9be 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s @@ -23,8 +23,8 @@ glabel func_802CD6E0 /* F20D8 802CD728 00118880 */ sll $s1, $s1, 2 /* F20DC 802CD72C 8E130000 */ lw $s3, ($s0) /* F20E0 802CD730 26100004 */ addiu $s0, $s0, 4 -/* F20E4 802CD734 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F20E8 802CD738 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F20E4 802CD734 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F20E8 802CD738 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F20EC 802CD73C 8E140000 */ lw $s4, ($s0) /* F20F0 802CD740 02238821 */ addu $s1, $s1, $v1 /* F20F4 802CD744 8E230000 */ lw $v1, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s index 03323eca79..20f51a62a8 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s @@ -23,8 +23,8 @@ glabel func_802CD7D8 /* F21D0 802CD820 00118880 */ sll $s1, $s1, 2 /* F21D4 802CD824 8E140000 */ lw $s4, ($s0) /* F21D8 802CD828 26100004 */ addiu $s0, $s0, 4 -/* F21DC 802CD82C 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F21E0 802CD830 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F21DC 802CD82C 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F21E0 802CD830 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F21E4 802CD834 8E150000 */ lw $s5, ($s0) /* F21E8 802CD838 02238821 */ addu $s1, $s1, $v1 /* F21EC 802CD83C 8E330000 */ lw $s3, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s index 358262361b..3e409569e9 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s @@ -23,8 +23,8 @@ glabel func_802CD8F8 /* F22F0 802CD940 00118880 */ sll $s1, $s1, 2 /* F22F4 802CD944 8E130000 */ lw $s3, ($s0) /* F22F8 802CD948 26100004 */ addiu $s0, $s0, 4 -/* F22FC 802CD94C 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F2300 802CD950 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F22FC 802CD94C 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F2300 802CD950 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F2304 802CD954 8E140000 */ lw $s4, ($s0) /* F2308 802CD958 02238821 */ addu $s1, $s1, $v1 /* F230C 802CD95C 8E230000 */ lw $v1, ($s1) diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s index bafc068c6b..7799c63cce 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s @@ -23,8 +23,8 @@ glabel func_802CD9F0 /* F23E8 802CDA38 8E130000 */ lw $s3, ($s0) /* F23EC 802CDA3C 0C0B1EAF */ jal get_variable /* F23F0 802CDA40 0040902D */ daddu $s2, $v0, $zero -/* F23F4 802CDA44 3C03802E */ lui $v1, %hi(gMeshAnimationsPtr) -/* F23F8 802CDA48 8C63AE30 */ lw $v1, %lo(gMeshAnimationsPtr)($v1) +/* F23F4 802CDA44 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) +/* F23F8 802CDA48 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) /* F23FC 802CDA4C 00118880 */ sll $s1, $s1, 2 /* F2400 802CDA50 02238821 */ addu $s1, $s1, $v1 /* F2404 802CDA54 8E230000 */ lw $v1, ($s1) diff --git a/include/common_structs.h b/include/common_structs.h index eff0633cb3..5822802726 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -716,6 +716,8 @@ typedef struct AnimatedMesh { /* 0x2D0 */ char unk_2D0[16]; } AnimatedMesh; // size = 0x2E0 +typedef AnimatedMesh* AnimatedMeshList[MAX_ANIMATED_MESHES]; + typedef struct PrintHandle { /* 0x000 */ char unk_00[16]; /* 0x010 */ s8* printbuf; /* Created by retype action */ @@ -1170,6 +1172,8 @@ typedef struct AnimatedModel { /* 0x6C */ char unk_6C[4]; } AnimatedModel; // size = 0x70 +typedef AnimatedModel* AnimatedModelList[MAX_ANIMATED_MODELS]; + typedef struct CollisionHeader { /* 0x00 */ s16 numColliders; /* 0x02 */ char unk_02[2]; diff --git a/include/macros.h b/include/macros.h index 9c633e9a76..20d9536c34 100644 --- a/include/macros.h +++ b/include/macros.h @@ -26,6 +26,8 @@ #define MAX_MAPVARS 16 #define MAX_MAPFLAGS 3 +#define MAX_ANIMATED_MODELS 16 +#define MAX_ANIMATED_MESHES 16 #define MAX_MODELS 256 #define MAX_SCRIPTS 128 #define MAX_NPCS 64 diff --git a/include/variables.h b/include/variables.h index cdd6635377..17fc8fb3d1 100644 --- a/include/variables.h +++ b/include/variables.h @@ -87,10 +87,13 @@ extern s32 D_802DB264; extern PrintContext* D_802DB268; // Animation related +extern AnimatedMeshList* gCurrentAnimMeshListPtr; + extern PartnerAnimations gPartnerAnimations[12]; -extern AnimatedModel* gBattleMeshAnimations[16]; -extern AnimatedModel* gWorldMeshAnimations[16]; -extern AnimatedModel** gMeshAnimationsPtr; + +extern AnimatedModelList gBattleMeshAnimationList; +extern AnimatedModelList gWorldMeshAnimationList; +extern AnimatedModelList* gCurrentMeshAnimationListPtr; // Triggers extern s16 gTriggerCount; diff --git a/src/code_ef070_len_3400.c b/src/code_ef070_len_3400.c index aaeef39ad4..f04ec53b35 100644 --- a/src/code_ef070_len_3400.c +++ b/src/code_ef070_len_3400.c @@ -468,9 +468,8 @@ INCLUDE_ASM(s32, "code_ef070_len_3400", ResetCam, ScriptInstance* script, s32 is void func_802CCAC0(void) { s32 i; - //todo fix type - for (i = 0; i < 0x10; i++) { - AnimatedModel* anim = gMeshAnimationsPtr[i]; + for (i = 0; i < MAX_ANIMATED_MODELS; i++) { + AnimatedModel* anim = (*gCurrentMeshAnimationListPtr)[i]; if (anim->animModelID >= 0) { func_8011EA54(anim->animModelID, &anim->mtx); @@ -482,9 +481,9 @@ INCLUDE_ASM(s32, "code_ef070_len_3400", draw_anim_models); ApiStatus func_802CCCB0(ScriptInstance* script, s32 isInitialCall) { if (!GAME_STATUS->isBattle) { - gMeshAnimationsPtr = &gWorldMeshAnimations; + gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; } else { - gMeshAnimationsPtr = &gBattleMeshAnimations; + gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; } return ApiStatus_DONE2; @@ -498,7 +497,7 @@ ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; model->currentAnimData = var2; play_model_animation(model->animModelID, var2); @@ -511,7 +510,7 @@ ApiStatus func_802CCEDC(ScriptInstance* script, s32 isInitialCall) { s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); s32 var3 = get_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; model->currentAnimData = var2; func_80120198(model->animModelID, var2, var3); @@ -523,7 +522,7 @@ ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; if (model->currentAnimData == var2) { return ApiStatus_DONE2; @@ -540,7 +539,7 @@ ApiStatus SetAnimModelPosition(ScriptInstance* script, s32 isInitialCall) { f32 x = get_float_variable(script, *args++); f32 y = get_float_variable(script, *args++); f32 z = get_float_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; model->pos.x = x; model->pos.y = y; @@ -555,7 +554,7 @@ ApiStatus GetAnimModelPosition(ScriptInstance* script, s32 isInitialCall) { s32 outX = *args++; s32 outY = *args++; s32 outZ = *args++; - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; set_float_variable(script, outX, model->pos.x); set_float_variable(script, outY, model->pos.y); @@ -572,7 +571,7 @@ ApiStatus SetAnimModelRotation(ScriptInstance* script, s32 isInitialCall) { f32 x = get_float_variable(script, *args++); f32 y = get_float_variable(script, *args++); f32 z = get_float_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; model->rot.x = x; model->rot.y = y; @@ -587,7 +586,7 @@ ApiStatus SetAnimModelScale(ScriptInstance* script, s32 isInitialCall) { f32 x = get_float_variable(script, *args++); f32 y = get_float_variable(script, *args++); f32 z = get_float_variable(script, *args++); - AnimatedModel* model = gMeshAnimationsPtr[index]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; model->scale.x = x; model->scale.y = y; @@ -599,7 +598,7 @@ ApiStatus SetAnimModelScale(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CD348); ApiStatus func_802CD3C0(ScriptInstance* script, s32 isInitialCall) { - AnimatedModel* model = gMeshAnimationsPtr[get_variable(script, *script->ptrReadPos)]; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[get_variable(script, *script->ptrReadPos)]; func_8011E438(func_8011FFE0(model->animModelID)); model->animModelID = -1; @@ -612,9 +611,9 @@ INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CD4B4); void func_802CD57C(void) { if (!GAME_STATUS->isBattle) { - gMeshAnimationsPtr = &gWorldMeshAnimations; + gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; } else { - gMeshAnimationsPtr = &gBattleMeshAnimations; + gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; } } diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 342a89fc97..d41b15cb25 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -891,6 +891,7 @@ _set_music_track = 0x8014A7E0; set_music_track = 0x8014A918; transition_music_volume_to = 0x8014AC84; gSongArray = 0x8014F720; +gCurrentAnimMeshListPtr = 0x80153A40; D_80156954 = 0x80156954; gMusicUnkVolume = 0x80159AE0; gMusicTargetVolume = 0x80159AE2; @@ -1891,9 +1892,9 @@ gGlobalTimeSpace = 0x802D9CA8; ShakeCam1 = 0x802D9CB0; ShakeCamX = 0x802D9CE8; D_802D9D50 = 0x802D9D50; -gBattleMeshAnimations = 0x802DADB0; // size:0x40 -gWorldMeshAnimations = 0x802DADF0; // size:0x40 -gMeshAnimationsPtr = 0x802DAE30; +gBattleMeshAnimationList = 0x802DADB0; // size:0x40 +gWorldMeshAnimationList = 0x802DADF0; // size:0x40 +gCurrentMeshAnimationListPtr = 0x802DAE30; gWorldMapFlags = 0x802DBC70; // size:0xC gWorldMapVars = 0x802DBCA8; // size:0x40 gBattleMapVars = 0x802DBCE8; // size:0x40 diff --git a/undefined_syms.txt b/undefined_syms.txt index fc123c5c23..8ab053d88f 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -194,9 +194,11 @@ gWorldModelList = 0x80151770; gBattleModelList = 0x80151B70; gCurrentModelListPtr = 0x801512CC; -gWorldModelSpecialDls = 0x8015F90; -gBattleModelSpecialDls = 0x80152010; +gCurrentAnimMeshListPtr = 0x80153A40; + gCurrentModelSpecialDlsPtr = 0x801512E8; +gWorldModelSpecialDls = 0x80151F90; +gBattleModelSpecialDls = 0x80152010; gWorldEntityList = 0x80151380; gBattleEntityList = 0x801513F8; @@ -230,9 +232,9 @@ gCurrentSaveFile = 0x800DACC0; gMapFlags = 0x802DA480; gMapVars = 0x802DA484; -gBattleMeshAnimations = 0x802DADB0; -gWorldMeshAnimations = 0x802DADF0; -gMeshAnimationsPtr = 0x802DAE30; +gBattleMeshAnimationList = 0x802DADB0; +gWorldMeshAnimationList = 0x802DADF0; +gCurrentMeshAnimationListPtr = 0x802DAE30; gEffectTable = 0x8007F214;