diff --git a/data/monster_sbin.s b/data/monster_sbin.s index 37e971c8c..d2df720d4 100644 --- a/data/monster_sbin.s +++ b/data/monster_sbin.s @@ -612,7 +612,3 @@ ax_sprite 0, 0 .include "data/kao/deoxysnormal.inc" .include "data/kao/munchlax.inc" .include "data/kao/rayquazacutscene.inc" - -.global gPaletFile -gPaletFile: -.incbin "baserom.gba", 0x16BD42C, 0x82BD4 diff --git a/data/unk_96BD7AC.s b/data/unk_96BD7AC.s new file mode 100644 index 000000000..45dedf0c7 --- /dev/null +++ b/data/unk_96BD7AC.s @@ -0,0 +1,5 @@ +.section .rodata + +.align 2 + +.incbin "baserom.gba", 0x16BD7AC, 0x82854 diff --git a/include/structs/rgb.h b/include/structs/rgb.h index b4c9ad9f3..7fee2c50c 100644 --- a/include/structs/rgb.h +++ b/include/structs/rgb.h @@ -6,6 +6,7 @@ typedef struct RGB u8 r; u8 g; u8 b; + u8 unk4; // Never read, always 0x80. Unused transparency/alpha flag? } RGB; #endif // GUARD_RGB_H diff --git a/ld_script.txt b/ld_script.txt index 8b2dd820c..2697bb300 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -812,6 +812,13 @@ SECTIONS { { src/monster_sbin.o(.rodata); data/monster_sbin.o(.rodata); + src/monster_sbin_palet.o(.rodata); + } > ROM =0 + + unk_96BD7AC_section : + ALIGN(4) + { + data/unk_96BD7AC.o(.rodata); } > ROM =0 effect_sbin_section : diff --git a/src/monster_sbin.c b/src/monster_sbin.c index b697f858c..9cee63fe0 100644 --- a/src/monster_sbin.c +++ b/src/monster_sbin.c @@ -510,7 +510,7 @@ extern const u8 gKaoJirachi[]; extern const u8 gKaoDeoxysNormal[]; extern const u8 gKaoMunchlax[]; extern const u8 gKaoRayquazaCutscene[]; -extern const u8 gPaletFile[]; +extern const u8 gAxMonsPalette[]; const File gMonsterFiles[MONSTER_FILES_COUNT] = { [0] = { "ax001", gAxBulbasaur,}, @@ -1009,7 +1009,7 @@ const File gMonsterFiles[MONSTER_FILES_COUNT] = { [493] = { "kao414", gKaoDeoxysNormal,}, [494] = { "kao420", gKaoMunchlax,}, [495] = { "kao423", gKaoRayquazaCutscene,}, - [496] = { "palet", gPaletFile,}, + [496] = { "palet", gAxMonsPalette,}, }; UNUSED ALIGNED(4) static const char sPksDir3[] = "pksdir0"; diff --git a/src/monster_sbin_palet.c b/src/monster_sbin_palet.c new file mode 100644 index 000000000..56e685e29 --- /dev/null +++ b/src/monster_sbin_palet.c @@ -0,0 +1,25 @@ +#include "global.h" +#include "structs/rgb.h" + +typedef struct PaletteSlot +{ + RGB c[16]; +} PaletteSlot; + +// These correspond to the 'overworldPalette' field in the monster data. Only slots 0-12 are actually used, slot 13 seems to be a placeholder. +const PaletteSlot gAxMonsPalette[] = { + [0] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, {167, 111, 0, 0x80}, {223, 183, 0, 0x80}, {255, 247, 0, 0x80}, { 0, 103, 183, 0x80}, { 31, 159, 231, 0x80}, {143, 223, 255, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, {255, 135, 191, 0x80}, {255, 255, 255, 0x80}}}, + [1] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {231, 63, 103, 0x80}, {255, 143, 175, 0x80}, {255, 199, 215, 0x80}, { 0, 103, 183, 0x80}, { 31, 159, 231, 0x80}, {143, 223, 255, 0x80}, {119, 63, 0, 0x80}, {167, 95, 31, 0x80}, {223, 119, 31, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, {199, 215, 215, 0x80}, {255, 255, 255, 0x80}}}, + [2] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, { 87, 47, 159, 0x80}, {143, 103, 191, 0x80}, {183, 151, 223, 0x80}, {167, 111, 0, 0x80}, {223, 183, 0, 0x80}, {255, 247, 0, 0x80}, { 55, 63, 143, 0x80}, { 79, 95, 151, 0x80}, {103, 135, 175, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, {191, 207, 247, 0x80}, {255, 255, 255, 0x80}}}, + [3] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, { 87, 103, 183, 0x80}, {135, 159, 255, 0x80}, {183, 207, 255, 0x80}, {167, 111, 0, 0x80}, {223, 183, 0, 0x80}, {255, 247, 0, 0x80}, { 39, 135, 0, 0x80}, { 95, 183, 39, 0x80}, {159, 207, 111, 0x80}, {215, 239, 167, 0x80}, {255, 255, 255, 0x80}}}, + [4] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {183, 135, 39, 0x80}, {215, 191, 103, 0x80}, {255, 247, 159, 0x80}, {167, 111, 0, 0x80}, {223, 183, 0, 0x80}, {255, 247, 0, 0x80}, {231, 63, 103, 0x80}, {255, 143, 175, 0x80}, {255, 199, 215, 0x80}, {119, 63, 0, 0x80}, {167, 95, 31, 0x80}, {223, 119, 31, 0x80}, {255, 151, 71, 0x80}, {255, 255, 255, 0x80}}}, + [5] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, { 0, 103, 183, 0x80}, { 31, 159, 231, 0x80}, {127, 207, 255, 0x80}, { 71, 103, 111, 0x80}, {127, 143, 151, 0x80}, {175, 183, 191, 0x80}, {215, 223, 223, 0x80}, {255, 255, 255, 0x80}}}, + [6] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, {119, 63, 0, 0x80}, {167, 95, 31, 0x80}, {223, 119, 31, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, { 71, 103, 111, 0x80}, {127, 143, 151, 0x80}, {175, 183, 191, 0x80}, {215, 223, 223, 0x80}, {255, 255, 255, 0x80}}}, + [7] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, { 87, 103, 183, 0x80}, {135, 159, 255, 0x80}, {183, 207, 255, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, {135, 63, 135, 0x80}, {175, 111, 183, 0x80}, {215, 151, 223, 0x80}, {215, 63, 0, 0x80}, { 71, 103, 111, 0x80}, {151, 159, 167, 0x80}, {215, 223, 223, 0x80}, {255, 255, 255, 0x80}}}, + [8] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {119, 63, 0, 0x80}, {167, 95, 31, 0x80}, {223, 119, 31, 0x80}, {159, 0, 0, 0x80}, {215, 63, 0, 0x80}, {255, 135, 95, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, { 39, 135, 0, 0x80}, { 95, 183, 39, 0x80}, {127, 223, 87, 0x80}, {143, 255, 103, 0x80}, {255, 255, 255, 0x80}}}, + [9] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, { 55, 63, 143, 0x80}, { 79, 95, 151, 0x80}, {103, 135, 175, 0x80}, { 87, 103, 183, 0x80}, {135, 159, 255, 0x80}, {183, 207, 255, 0x80}, {119, 63, 0, 0x80}, {223, 119, 31, 0x80}, {255, 151, 71, 0x80}, {175, 103, 31, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, {183, 191, 199, 0x80}, {255, 255, 255, 0x80}}}, + [10] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {231, 63, 103, 0x80}, {255, 143, 175, 0x80}, {255, 199, 215, 0x80}, {127, 143, 151, 0x80}, {175, 183, 191, 0x80}, {215, 223, 223, 0x80}, { 39, 135, 0, 0x80}, { 95, 199, 55, 0x80}, {143, 255, 103, 0x80}, {111, 63, 151, 0x80}, {199, 151, 223, 0x80}, {223, 183, 0, 0x80}, {255, 247, 0, 0x80}, {255, 255, 255, 0x80}}}, + [11] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {191, 119, 39, 0x80}, {223, 175, 103, 0x80}, {255, 231, 159, 0x80}, { 55, 63, 143, 0x80}, { 79, 95, 151, 0x80}, {103, 135, 175, 0x80}, {127, 143, 151, 0x80}, {175, 183, 191, 0x80}, {215, 223, 223, 0x80}, {183, 0, 0, 0x80}, {231, 63, 103, 0x80}, {255, 143, 175, 0x80}, {255, 199, 215, 0x80}, {255, 255, 255, 0x80}}}, + [12] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, {119, 63, 0, 0x80}, {167, 95, 31, 0x80}, {223, 119, 31, 0x80}, { 71, 135, 111, 0x80}, {143, 175, 183, 0x80}, {215, 231, 223, 0x80}, {215, 167, 0, 0x80}, {255, 247, 0, 0x80}, {255, 231, 159, 0x80}, {159, 0, 0, 0x80}, {255, 87, 15, 0x80}, { 79, 159, 215, 0x80}, {167, 207, 239, 0x80}, {255, 255, 255, 0x80}}}, + [13] = {{{ 0, 127, 151, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}, { 0, 0, 0, 0x80}}}, +};