From 2d187a02033d7980202b44d9f6b4b0a4d185a60b Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Tue, 31 Jan 2017 23:09:30 +0900 Subject: added color palette support (ctrl-f1 - ctrl-f10) --- fmdsp/fmdsp_sprites.h | 126 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) (limited to 'fmdsp/fmdsp_sprites.h') diff --git a/fmdsp/fmdsp_sprites.h b/fmdsp/fmdsp_sprites.h index 1fe6c13..ded3591 100644 --- a/fmdsp/fmdsp_sprites.h +++ b/fmdsp/fmdsp_sprites.h @@ -37,7 +37,22 @@ enum { PLAYING_H = 9, }; -static const uint8_t s_palettes[1][FMDSP_PALETTE_COLORS*3] = { +enum { + PALETTE_NUM = 10 +}; + +#define LCDWR 181 +#define LCDWG 192 +#define LCDWB 12 +#define LCDBR 70 +#define LCDBG 124 +#define LCDBB 108 +#define LCD(C) \ + (LCDWR*(C)+LCDBR*(255-C))/256, \ + (LCDWG*(C)+LCDBG*(255-C))/256, \ + (LCDWB*(C)+LCDBB*(255-C))/256 + +static const uint8_t s_palettes[PALETTE_NUM][FMDSP_PALETTE_COLORS*3] = { { 0, 0, 0, 170, 170, 153, @@ -48,9 +63,116 @@ static const uint8_t s_palettes[1][FMDSP_PALETTE_COLORS*3] = { 136, 255, 68, 51, 51, 238, 0, 187, 255, - } + }, + { + 0, 0, 0, + 187, 187, 170, + 136, 170, 255, + 85, 85, 153, + 204, 204, 187, + 136, 136, 119, + 153, 255, 119, + 102, 85, 255, + 0, 204, 255, + }, + { + 0, 0, 0, + 255, 102, 0, + 255, 170, 0, + 102, 68, 51, + 153, 136, 102, + 119, 85, 68, + 255, 221, 85, + 255, 102, 0, + 255, 85, 0, + }, + { + 0, 0, 0, + 170, 170, 153, + 170, 153, 255, + 85, 51, 102, + 204, 204, 187, + 102, 102, 85, + 119, 255, 34, + 136, 68, 221, + 0, 187, 255, + }, + { + 0, 0, 0, + 187, 187, 170, + 102, 153, 255, + 85, 68, 136, + 255, 255, 238, + 119, 119, 102, + 255, 68, 0, + 85, 85, 255, + 255, 119, 255, + }, + { + 0, 0, 0, + 255, 51, 119, + 255, 187, 0, + 85, 85, 68, + 119, 119, 102, + 102, 102, 102, + 255, 221, 0, + 255, 0, 51, + 255, 0, 51, + }, + { + 102, 170, 238, + 0, 17, 136, + 0, 51, 136, + 153, 221, 255, + 153, 221, 255, + 119, 187, 255, + 0, 51, 136, + 34, 102, 187, + 0, 85, 204, + }, + { + 0, 0, 0, + 170, 170, 136, + 102, 153, 255, + 17, 0, 51, + 170, 170, 153, + 51, 51, 51, + 85, 255, 68, + 34, 17, 255, + 0, 170, 255, + }, + { + LCD(255), + LCD(72), + LCD(0), + LCD(182), + LCD(0), + LCD(145), + LCD(218), + LCD(109), + LCD(218), + }, + { + LCD(255), + LCD(72), + LCD(0), + LCD(182), + LCD(145), + LCD(145), + LCD(0), + LCD(109), + LCD(0), + }, }; +#undef LCDWR +#undef LCDWG +#undef LCDWB +#undef LCDBR +#undef LCDBG +#undef LCDBB +#undef LCD + static const uint8_t s_track[TNAME_W*TNAME_H] = { 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -- cgit v1.2.3