diff --git a/asm/data/code_1AF2D0.data.s b/asm/data/code_1AF2D0.data.s index 7b25aa86ce..45258b3c60 100644 --- a/asm/data/code_1AF2D0.data.s +++ b/asm/data/code_1AF2D0.data.s @@ -401,8 +401,9 @@ glabel D_80293AC4 glabel D_80293B80 .word 0xFFFFFFFF, 0x0000008A, 0x00000080, 0x00000086, 0x00000090, 0x00000085, 0x0000008B, 0x00000082, 0x00000081, 0x0000008D, 0x00000083, 0x0000008F, 0x00000088, 0x00000089, 0x00000084, 0x0000008C, 0x0000008E, 0x0000009B, 0x00000091, 0x00000092, 0x0000009A, 0x00000099, 0x000000C8, 0x00000087, 0x00000098, 0x00000096, 0x00000097, 0x00000095, 0x000000AC, 0x000000CC, 0x000000D2, 0x000000D3, 0x00000000 -glabel D_80293C04 -.word 0x007330D0, 0x007345A0, func_802A1000_752450, 0x802A20FC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00716C60, 0x007179D0, func_802A1000_752450, 0x802A19BC, 0x007179D0, 0x00718850, func_802A1000_752450, 0x802A1B6C, 0x00718850, 0x00719970, func_802A1000_752450, 0x802A195C, 0x00719970, 0x0071A7F0, func_802A1000_752450, 0x802A1B6C, 0x0071A7F0, 0x0071B1A0, func_802A1000_752450, 0x802A183C, 0x0071B1A0, 0x0071BE30, func_802A1000_752450, 0x802A1A5C, 0x0071BE30, 0x0071CCE0, func_802A1000_752450, 0x802A19FC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x0071D770, 0x0071E650, func_802A1000_752450, 0x802A1B0C, 0x0071E650, 0x007215A0, func_802A1000_752450, 0x802A3320, 0x007215A0, 0x00722000, func_802A1000_752450, 0x802A198C, 0x00722000, 0x00722B40, func_802A1000_752450, 0x802A189C, 0x00722B40, 0x00723780, func_802A1000_752450, 0x802A1A5C, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00724CE0, 0x00725F60, func_802A1000_752450, 0x802A1FFC, 0x00725F60, 0x00726DD0, func_802A1000_752450, 0x802A189C, 0x00726DD0, 0x00727910, func_802A1000_752450, 0x802A191C, 0x00727910, 0x007285E0, func_802A1000_752450, 0x802A198C, 0x007285E0, 0x00728EC0, func_802A1000_752450, 0x802A17FC, 0x00728EC0, 0x0072A750, func_802A1000_752450, 0x802A25A0, 0x0072A750, 0x0072B910, func_802A1000_752450, 0x802A1D4C, 0x0072B910, 0x0072C5B0, func_802A1000_752450, 0x802A191C, 0x0072C5B0, 0x0072DB70, func_802A1000_752450, 0x802A22BC, 0x0072DB70, 0x0072E530, func_802A1000_752450, 0x802A185C, 0x0072E530, 0x0072F720, func_802A1000_752450, 0x802A1FCC, 0x0072F720, 0x007305A0, func_802A1000_752450, 0x802A1B6C, 0x007305A0, 0x00731300, func_802A1000_752450, 0x802A1AFC, 0x00731300, 0x007330D0, func_802A1000_752450, 0x802A2870, 0x00731300, 0x007330D0, func_802A1000_752450, 0x802A2870, 0x0001001F, 0x00010005, 0x00010002, 0x00090003, 0x00090003, 0x00090001, 0x000A0006, 0x000A0006, 0x000A0004, 0x000B0008, 0x000B0008, 0x000B0004, 0x000C0003, 0x000C0003, 0x000C0001 +glabel gBattleItemTable +# dma start, dma end, dma vaddr, Script* +.word 0x007330D0, 0x007345A0, func_802A1000_752450, 0x802A20FC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00716C60, 0x007179D0, func_802A1000_752450, 0x802A19BC, 0x007179D0, 0x00718850, func_802A1000_752450, 0x802A1B6C, 0x00718850, 0x00719970, func_802A1000_752450, 0x802A195C, 0x00719970, 0x0071A7F0, func_802A1000_752450, 0x802A1B6C, 0x0071A7F0, 0x0071B1A0, func_802A1000_752450, 0x802A183C, 0x0071B1A0, 0x0071BE30, func_802A1000_752450, 0x802A1A5C, 0x0071BE30, 0x0071CCE0, func_802A1000_752450, 0x802A19FC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x0071D770, 0x0071E650, func_802A1000_752450, 0x802A1B0C, 0x0071E650, 0x007215A0, func_802A1000_752450, 0x802A3320, 0x007215A0, 0x00722000, func_802A1000_752450, 0x802A198C, 0x00722000, 0x00722B40, func_802A1000_752450, 0x802A189C, 0x00722B40, 0x00723780, func_802A1000_752450, 0x802A1A5C, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00715850, 0x00716C60, func_802A1000_752450, 0x802A20CC, 0x00724CE0, 0x00725F60, func_802A1000_752450, 0x802A1FFC, 0x00725F60, 0x00726DD0, func_802A1000_752450, 0x802A189C, 0x00726DD0, 0x00727910, func_802A1000_752450, 0x802A191C, 0x00727910, 0x007285E0, func_802A1000_752450, 0x802A198C, 0x007285E0, 0x00728EC0, func_802A1000_752450, 0x802A17FC, 0x00728EC0, 0x0072A750, func_802A1000_752450, 0x802A25A0, 0x0072A750, 0x0072B910, func_802A1000_752450, 0x802A1D4C, 0x0072B910, 0x0072C5B0, func_802A1000_752450, 0x802A191C, 0x0072C5B0, 0x0072DB70, func_802A1000_752450, 0x802A22BC, 0x0072DB70, 0x0072E530, func_802A1000_752450, 0x802A185C, 0x0072E530, 0x0072F720, func_802A1000_752450, 0x802A1FCC, battle_item_coconut_ROM_START, battle_item_coconut_ROM_END, battle_item_coconut_VRAM, battle_item_coconut_main, 0x007305A0, 0x00731300, func_802A1000_752450, 0x802A1AFC, 0x00731300, 0x007330D0, func_802A1000_752450, 0x802A2870, 0x00731300, 0x007330D0, func_802A1000_752450, 0x802A2870, 0x0001001F, 0x00010005, 0x00010002, 0x00090003, 0x00090003, 0x00090001, 0x000A0006, 0x000A0006, 0x000A0004, 0x000B0008, 0x000B0008, 0x000B0004, 0x000C0003, 0x000C0003, 0x000C0001 glabel UseMystery .word 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000001, LoadFreeItemScript, 0x00000046, 0x00000001, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 diff --git a/asm/nonmatchings/code_1967B0/LoadFreeItemScript.s b/asm/nonmatchings/code_1967B0/LoadFreeItemScript.s index c98a11c473..5a5e1ba2d7 100644 --- a/asm/nonmatchings/code_1967B0/LoadFreeItemScript.s +++ b/asm/nonmatchings/code_1967B0/LoadFreeItemScript.s @@ -55,8 +55,8 @@ glabel LoadFreeItemScript /* 1969B8 802680D8 30420080 */ andi $v0, $v0, 0x80 /* 1969BC 802680DC 2C500001 */ sltiu $s0, $v0, 1 .L802680E0: -/* 1969C0 802680E0 3C028029 */ lui $v0, %hi(D_80293C04) -/* 1969C4 802680E4 24423C04 */ addiu $v0, $v0, %lo(D_80293C04) +/* 1969C0 802680E0 3C028029 */ lui $v0, %hi(gBattleItemTable) +/* 1969C4 802680E4 24423C04 */ addiu $v0, $v0, %lo(gBattleItemTable) /* 1969C8 802680E8 00108100 */ sll $s0, $s0, 4 /* 1969CC 802680EC 02028021 */ addu $s0, $s0, $v0 /* 1969D0 802680F0 8E040000 */ lw $a0, ($s0) diff --git a/asm/nonmatchings/code_1967B0/LoadItemScript.s b/asm/nonmatchings/code_1967B0/LoadItemScript.s index 27c4489f32..776d9cefeb 100644 --- a/asm/nonmatchings/code_1967B0/LoadItemScript.s +++ b/asm/nonmatchings/code_1967B0/LoadItemScript.s @@ -75,8 +75,8 @@ glabel LoadItemScript /* 1968A8 80267FC8 30420080 */ andi $v0, $v0, 0x80 /* 1968AC 80267FCC 2C500001 */ sltiu $s0, $v0, 1 .L80267FD0: -/* 1968B0 80267FD0 3C028029 */ lui $v0, %hi(D_80293C04) -/* 1968B4 80267FD4 24423C04 */ addiu $v0, $v0, %lo(D_80293C04) +/* 1968B0 80267FD0 3C028029 */ lui $v0, %hi(gBattleItemTable) +/* 1968B4 80267FD4 24423C04 */ addiu $v0, $v0, %lo(gBattleItemTable) /* 1968B8 80267FD8 00108100 */ sll $s0, $s0, 4 /* 1968BC 80267FDC 02028021 */ addu $s0, $s0, $v0 /* 1968C0 80267FE0 8E040000 */ lw $a0, ($s0) diff --git a/configure.py b/configure.py index e88db25984..837897bcf3 100755 --- a/configure.py +++ b/configure.py @@ -61,8 +61,6 @@ def read_splat(splat_config: str): split_file["name"] + "." + segment.get_ext(split_file["subtype"]) ) - print(path) - if path in segments: segments[path] = split_file diff --git a/src/battle/item/coconut/coconut.c b/src/battle/item/coconut/coconut.c index 9a11ea12b9..a6ffa7dce1 100644 --- a/src/battle/item/coconut/coconut.c +++ b/src/battle/item/coconut/coconut.c @@ -30,7 +30,7 @@ s32 D_802A1B50_7304B0[] = { 0x00000004, 0x0000000D, 0x00000001, 0x0000003C, &D_802A1A60_7303C0, 0x00000002, 0x00000000, }; -Script D_802A1B6C_7304B0 = SCRIPT({ +Script N(main) = SCRIPT({ SI_VAR(10) =c ItemId_COCONUT; await D_802A1240_72F960; UseCamPreset(3); @@ -74,4 +74,3 @@ Script D_802A1B6C_7304B0 = SCRIPT({ func_802D3624(SI_VAR(10)); await D_802A1670_72FFD0; }); - diff --git a/tools/splat.yaml b/tools/splat.yaml index 78ea80f11c..5b5a65c72c 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -2339,6 +2339,7 @@ segments: - [0x72E530, c] - [0x72EA20, data] - name: battle/item/coconut/ + ld_name: battle_item_coconut type: code start: 0x72F720 vram: 0x802A1000