diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-19 19:38:45 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (patch) | |
tree | 6ddf7fff0a47564db41d39927ea1acbdb03e74ee /apps/plugins/rockblox.c | |
parent | 092c340a2062fa98b7387fc5fd63578ddae7d0b6 (diff) | |
download | rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.tar.gz rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.zip |
[2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.
lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change
Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
Diffstat (limited to 'apps/plugins/rockblox.c')
-rw-r--r-- | apps/plugins/rockblox.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 1732d61277..c7968c3e20 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "lib/helper.h" | 25 | #include "lib/helper.h" |
26 | #include "lib/highscore.h" | 26 | #include "lib/highscore.h" |
27 | #include "lib/playback_control.h" | 27 | #include "lib/playback_control.h" |
28 | #include "lib/playergfx.h" | ||
29 | #include "lib/mylcd.h" | 28 | #include "lib/mylcd.h" |
30 | 29 | ||
31 | 30 | ||
@@ -770,17 +769,8 @@ | |||
770 | 769 | ||
771 | extern const fb_data rockblox_background[]; | 770 | extern const fb_data rockblox_background[]; |
772 | 771 | ||
773 | #else /* HAVE_LCD_CHARCELLS */ | 772 | #else |
774 | 773 | #error "lcd screen size not defined!" | |
775 | #define BOARD_HEIGHT 14 | ||
776 | |||
777 | #define BLOCK_WIDTH 1 | ||
778 | #define BLOCK_HEIGHT 1 | ||
779 | #define BOARD_X 5 | ||
780 | #define BOARD_Y 0 | ||
781 | #define PREVIEW_X 15 | ||
782 | #define PREVIEW_Y 1 | ||
783 | |||
784 | #endif | 774 | #endif |
785 | 775 | ||
786 | #ifndef HIGHSCORE_SPACE | 776 | #ifndef HIGHSCORE_SPACE |
@@ -992,10 +982,6 @@ static void show_details (void) | |||
992 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); | 982 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); |
993 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); | 983 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); |
994 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); | 984 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); |
995 | #else /* HAVE_LCD_CHARCELLS */ | ||
996 | rb->lcd_putsf (5, 0, "L%d/%d", rockblox_status.level, | ||
997 | rockblox_status.lines); | ||
998 | rb->lcd_putsf (5, 1, "S%d", rockblox_status.score); | ||
999 | #endif | 985 | #endif |
1000 | } | 986 | } |
1001 | 987 | ||
@@ -1066,15 +1052,6 @@ static void init_rockblox (bool resume) | |||
1066 | 1052 | ||
1067 | #ifdef HAVE_LCD_BITMAP | 1053 | #ifdef HAVE_LCD_BITMAP |
1068 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); | 1054 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); |
1069 | #else /* HAVE_LCD_CHARCELLS */ | ||
1070 | pgfx_display (0, 0); | ||
1071 | pgfx_display_block (3, 0, 3, 1); | ||
1072 | pgfx_display_block (4, 0, 3, 0); | ||
1073 | rb->lcd_puts(4, 1, " "); | ||
1074 | pgfx_clear_display(); | ||
1075 | pgfx_fillrect (3, 0, 2, 14); | ||
1076 | pgfx_fillrect (15, 7, 2, 7); | ||
1077 | pgfx_update(); | ||
1078 | #endif | 1055 | #endif |
1079 | if (!resume) | 1056 | if (!resume) |
1080 | { | 1057 | { |
@@ -1200,8 +1177,6 @@ static void refresh_board (void) | |||
1200 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, | 1177 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, |
1201 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, | 1178 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, |
1202 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); | 1179 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); |
1203 | #else /* HAVE_LCD_CHARCELLS */ | ||
1204 | pgfx_drawpixel (BOARD_X + i, BOARD_Y + j); | ||
1205 | #endif | 1180 | #endif |
1206 | } | 1181 | } |
1207 | } | 1182 | } |
@@ -1246,8 +1221,6 @@ static void refresh_board (void) | |||
1246 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1221 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1247 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1222 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1248 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1223 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1249 | #else /* HAVE_LCD_CHARCELLS */ | ||
1250 | pgfx_drawpixel (BOARD_X + x, BOARD_Y + y); | ||
1251 | #endif | 1224 | #endif |
1252 | } | 1225 | } |
1253 | 1226 | ||
@@ -1285,8 +1258,6 @@ static void refresh_board (void) | |||
1285 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1258 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1286 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1259 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1287 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1260 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1288 | #else /* HAVE_LCD_CHARCELLS */ | ||
1289 | pgfx_drawpixel (BOARD_X + x, BOARD_Y + y); | ||
1290 | #endif | 1261 | #endif |
1291 | } | 1262 | } |
1292 | 1263 | ||
@@ -1355,8 +1326,6 @@ static void draw_next_block (void) | |||
1355 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, | 1326 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, |
1356 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, | 1327 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, |
1357 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); | 1328 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); |
1358 | #else /* HAVE_LCD_CHARCELLS */ | ||
1359 | pgfx_drawpixel (PREVIEW_X + rx, PREVIEW_Y + ry); | ||
1360 | #endif | 1329 | #endif |
1361 | } | 1330 | } |
1362 | 1331 | ||
@@ -1787,9 +1756,6 @@ enum plugin_status plugin_start (const void *parameter) | |||
1787 | } | 1756 | } |
1788 | } | 1757 | } |
1789 | 1758 | ||
1790 | #ifndef HAVE_LCD_BITMAP | ||
1791 | pgfx_release(); | ||
1792 | #endif | ||
1793 | /* Save user's HighScore */ | 1759 | /* Save user's HighScore */ |
1794 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); | 1760 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); |
1795 | backlight_use_settings(); | 1761 | backlight_use_settings(); |