Skip to content

Commit

Permalink
nds: reduce binary size by ~2KB
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Oct 22, 2023
1 parent 90907fb commit 9e51434
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arm9/source/nds_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ static void keyboard_update_palettes(int target_keycode) {
}
}

__attribute__((optimize("-Os")))
static void keyboard_set_palette_colors(uint16_t *pal, uint8_t mul /* 0-15 */) {
for (int i = 0; i < 14; i++) {
uint16_t col = gfx_keyboardPal[i];
Expand All @@ -199,6 +200,7 @@ static void keyboard_set_palette_colors(uint16_t *pal, uint8_t mul /* 0-15 */) {
}
}

__attribute__((optimize("-Os")))
bool keyboard_init(void) {
decompress(gfx_keyboardTiles, BG_TILE_RAM_SUB(KBD_TILE_BASE), LZ77Vram);
memset(BG_MAP_RAM_SUB(KBD_MAP_BASE), 0, 2*(32*14));
Expand Down

0 comments on commit 9e51434

Please sign in to comment.