From db2f3d3af8553825d90e2abe9c4c535c9d94eb83 Mon Sep 17 00:00:00 2001 From: Behemoth Date: Fri, 18 Sep 2020 18:54:08 +0200 Subject: [PATCH] add madderpillar and rupeeLike rodata --- data/animations/madderpillar.s | 31 +++++++++++ data/animations/rupeeLike.s | 31 +++++++++++ data/data_080CC6FC.s | 96 ---------------------------------- linker.ld | 4 ++ src/enemy/madderpillar.c | 2 - src/enemy/rupeeLike.c | 49 +++++++++++++++-- 6 files changed, 110 insertions(+), 103 deletions(-) create mode 100644 data/animations/madderpillar.s create mode 100644 data/animations/rupeeLike.s diff --git a/data/animations/madderpillar.s b/data/animations/madderpillar.s new file mode 100644 index 00000000..4591874c --- /dev/null +++ b/data/animations/madderpillar.s @@ -0,0 +1,31 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnk_080CCDDC:: @ 080CCDDC + .incbin "baserom.gba", 0x0CCDDC, 0x0000011 + +gUnk_080CCDED:: @ 080CCDED + .incbin "baserom.gba", 0x0CCDED, 0x0000011 + +gUnk_080CCDFE:: @ 080CCDFE + .incbin "baserom.gba", 0x0CCDFE, 0x0000011 + +gUnk_080CCE0F:: @ 080CCE0F + .incbin "baserom.gba", 0x0CCE0F, 0x0000011 + +gUnk_080CCE20:: @ 080CCE20 + .incbin "baserom.gba", 0x0CCE20, 0x0000011 + +gUnk_080CCE31:: @ 080CCE31 + .incbin "baserom.gba", 0x0CCE31, 0x0000011 + +gUnk_080CCE42:: @ 080CCE42 + .incbin "baserom.gba", 0x0CCE42, 0x0000011 + +gUnk_080CCE53:: @ 080CCE53 + .incbin "baserom.gba", 0x0CCE53, 0x0000011 + +gUnk_080CCE64:: @ 080CCE64 + .incbin "baserom.gba", 0x0CCE64, 0x0000024 diff --git a/data/animations/rupeeLike.s b/data/animations/rupeeLike.s new file mode 100644 index 00000000..3523322a --- /dev/null +++ b/data/animations/rupeeLike.s @@ -0,0 +1,31 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnk_080CCC4A:: @ 080CCC4A + .incbin "baserom.gba", 0x0CCC4A, 0x0000015 + +gUnk_080CCC5F:: @ 080CCC5F + .incbin "baserom.gba", 0x0CCC5F, 0x0000015 + +gUnk_080CCC74:: @ 080CCC74 + .incbin "baserom.gba", 0x0CCC74, 0x0000028 + +gUnk_080CCC9C:: @ 080CCC9C + .incbin "baserom.gba", 0x0CCC9C, 0x0000018 + +gUnk_080CCCB4:: @ 080CCCB4 + .incbin "baserom.gba", 0x0CCCB4, 0x0000015 + +gUnk_080CCCC9:: @ 080CCCC9 + .incbin "baserom.gba", 0x0CCCC9, 0x0000015 + +gUnk_080CCCDE:: @ 080CCCDE + .incbin "baserom.gba", 0x0CCCDE, 0x0000028 + +gUnk_080CCD06:: @ 080CCD06 + .incbin "baserom.gba", 0x0CCD06, 0x000001A + +gUnk_080CCD20:: @ 080CCD20 + .incbin "baserom.gba", 0x0CCD20, 0x0000024 diff --git a/data/data_080CC6FC.s b/data/data_080CC6FC.s index 7ea93e02..695f6de8 100644 --- a/data/data_080CC6FC.s +++ b/data/data_080CC6FC.s @@ -3,102 +3,6 @@ .section .rodata -gUnk_080CCC00:: @ 080CCC00 - .incbin "baserom.gba", 0x0CCC00, 0x0000018 - -gUnk_080CCC18:: @ 080CCC18 - .incbin "baserom.gba", 0x0CCC18, 0x000001C - -gUnk_080CCC34:: @ 080CCC34 - .incbin "baserom.gba", 0x0CCC34, 0x0000008 - -gUnk_080CCC3C:: @ 080CCC3C - .incbin "baserom.gba", 0x0CCC3C, 0x0000008 - -gUnk_080CCC44:: @ 080CCC44 - .incbin "baserom.gba", 0x0CCC44, 0x0000003 - -gUnk_080CCC47:: @ 080CCC47 - .incbin "baserom.gba", 0x0CCC47, 0x0000003 - -gUnk_080CCC4A:: @ 080CCC4A - .incbin "baserom.gba", 0x0CCC4A, 0x0000015 - -gUnk_080CCC5F:: @ 080CCC5F - .incbin "baserom.gba", 0x0CCC5F, 0x0000015 - -gUnk_080CCC74:: @ 080CCC74 - .incbin "baserom.gba", 0x0CCC74, 0x0000028 - -gUnk_080CCC9C:: @ 080CCC9C - .incbin "baserom.gba", 0x0CCC9C, 0x0000018 - -gUnk_080CCCB4:: @ 080CCCB4 - .incbin "baserom.gba", 0x0CCCB4, 0x0000015 - -gUnk_080CCCC9:: @ 080CCCC9 - .incbin "baserom.gba", 0x0CCCC9, 0x0000015 - -gUnk_080CCCDE:: @ 080CCCDE - .incbin "baserom.gba", 0x0CCCDE, 0x0000028 - -gUnk_080CCD06:: @ 080CCD06 - .incbin "baserom.gba", 0x0CCD06, 0x000001A - -gUnk_080CCD20:: @ 080CCD20 - .incbin "baserom.gba", 0x0CCD20, 0x0000024 - -gUnk_080CCD44:: @ 080CCD44 - .incbin "baserom.gba", 0x0CCD44, 0x000001C - -gUnk_080CCD60:: @ 080CCD60 - .incbin "baserom.gba", 0x0CCD60, 0x0000018 - -gUnk_080CCD78:: @ 080CCD78 - .incbin "baserom.gba", 0x0CCD78, 0x0000010 - -gUnk_080CCD88:: @ 080CCD88 - .incbin "baserom.gba", 0x0CCD88, 0x0000018 - -gUnk_080CCDA0:: @ 080CCDA0 - .incbin "baserom.gba", 0x0CCDA0, 0x0000008 - -gUnk_080CCDA8:: @ 080CCDA8 - .incbin "baserom.gba", 0x0CCDA8, 0x0000020 - -gUnk_080CCDC8:: @ 080CCDC8 - .incbin "baserom.gba", 0x0CCDC8, 0x000000C - -gUnk_080CCDD4:: @ 080CCDD4 - .incbin "baserom.gba", 0x0CCDD4, 0x0000008 - -gUnk_080CCDDC:: @ 080CCDDC - .incbin "baserom.gba", 0x0CCDDC, 0x0000011 - -gUnk_080CCDED:: @ 080CCDED - .incbin "baserom.gba", 0x0CCDED, 0x0000011 - -gUnk_080CCDFE:: @ 080CCDFE - .incbin "baserom.gba", 0x0CCDFE, 0x0000011 - -gUnk_080CCE0F:: @ 080CCE0F - .incbin "baserom.gba", 0x0CCE0F, 0x0000011 - -gUnk_080CCE20:: @ 080CCE20 - .incbin "baserom.gba", 0x0CCE20, 0x0000011 - -gUnk_080CCE31:: @ 080CCE31 - .incbin "baserom.gba", 0x0CCE31, 0x0000011 - -gUnk_080CCE42:: @ 080CCE42 - .incbin "baserom.gba", 0x0CCE42, 0x0000011 - -gUnk_080CCE53:: @ 080CCE53 - .incbin "baserom.gba", 0x0CCE53, 0x0000011 - -gUnk_080CCE64:: @ 080CCE64 - .incbin "baserom.gba", 0x0CCE64, 0x0000024 - gUnk_080CCE88:: @ 080CCE88 .incbin "baserom.gba", 0x0CCE88, 0x0000011 diff --git a/linker.ld b/linker.ld index 4b1c355f..ae8dccbe 100644 --- a/linker.ld +++ b/linker.ld @@ -949,6 +949,10 @@ SECTIONS { data/animations/spearMoblin.o(.rodata); src/enemy/businessScrub.o(.rodata); data/animations/businessScrub.o(.rodata); + src/enemy/rupeeLike.o(.rodata); + data/animations/rupeeLike.o(.rodata); + src/enemy/madderpillar.o(.rodata); + data/animations/madderpillar.o(.rodata); data/data_080CC6FC.o(.rodata); src/enemy.o(.rodata); data/data_080D3D94.o(.rodata); diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c index 78a579e9..69f61aee 100644 --- a/src/enemy/madderpillar.c +++ b/src/enemy/madderpillar.c @@ -509,7 +509,6 @@ void sub_0802A18C(Entity* this) { } } -/* // clang-format off void (*const gUnk_080CCD44[])(Entity*) = { sub_08029870, @@ -581,4 +580,3 @@ const u16 gUnk_080CCDD4[] = { 0x82, 0x81, }; // clang-format on -*/ diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index 05117e73..b7b43f8b 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -17,8 +17,9 @@ extern void (*const gUnk_080CCC00[])(Entity*); extern void (*const gUnk_080CCC18[])(Entity*); extern void (*const gUnk_080CCC3C[])(Entity*); -extern u8 gUnk_080CCC34[]; -extern u8 gUnk_080CCC47[]; +extern const u8 gUnk_080CCC34[]; +extern const s8 gUnk_080CCC44[]; +extern const u8 gUnk_080CCC47[]; extern BoundingBox gUnk_080FD260; void RupeeLike(Entity* this) { @@ -146,8 +147,6 @@ void sub_080294D4(Entity* this) { } } -extern s8 gUnk_080CCC44[]; - void sub_0802953C(Entity* this) { u8* pbVar3; @@ -279,4 +278,44 @@ void sub_080297F0(Entity* this) { this->palette.b.b0 = temp; this->spriteVramOffset = 9; InitializeAnimation(this, 0x54); -} \ No newline at end of file +} + +// clang-format off +void (*const gUnk_080CCC00[])(Entity*) = { + sub_08029300, + sub_08029318, + sub_08001324, + sub_080293B4, + sub_08001242, + nullsub_141, +}; + +void (*const gUnk_080CCC18[])(Entity*) = { + sub_0802940C, + sub_0802944C, + sub_08029474, + sub_080294D4, + sub_0802953C, + sub_08029610, + sub_08029630, +}; + +const u8 gUnk_080CCC34[] = { + 0x54, 0x55, + 0x56, 0x55, + 0x56, 0x57, +}; + +void (*const gUnk_080CCC3C[])(Entity*) = { + sub_08029660, + sub_08029688, +}; + +const s8 gUnk_080CCC44[] = { + -1, -5, -20, +}; + +const u8 gUnk_080CCC47[] = { + 2, 1, 0, +}; +// clang-format on