summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-19 19:38:45 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit0c4f89370d05056faa789aa9cabcccc4e509fb9f (patch)
tree6ddf7fff0a47564db41d39927ea1acbdb03e74ee /apps/plugins
parent092c340a2062fa98b7387fc5fd63578ddae7d0b6 (diff)
downloadrockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.tar.gz
rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.tar.bz2
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')
-rw-r--r--apps/plugins/credits.c68
-rw-r--r--apps/plugins/cube.c10
-rw-r--r--apps/plugins/flipit.c75
-rw-r--r--apps/plugins/invadrox.c4
-rw-r--r--apps/plugins/jackpot.c70
-rw-r--r--apps/plugins/lib/SOURCES4
-rw-r--r--apps/plugins/lib/display_text.c4
-rw-r--r--apps/plugins/lib/mylcd.h9
-rw-r--r--apps/plugins/lib/osd.h4
-rw-r--r--apps/plugins/lib/playergfx.c526
-rw-r--r--apps/plugins/lib/playergfx.h55
-rw-r--r--apps/plugins/lib/simple_viewer.c5
-rw-r--r--apps/plugins/logo.c17
-rw-r--r--apps/plugins/lrcplayer.c53
-rw-r--r--apps/plugins/metronome.c5
-rw-r--r--apps/plugins/mosaique.c15
-rw-r--r--apps/plugins/random_folder_advance_config.c2
-rw-r--r--apps/plugins/rockblox.c38
-rw-r--r--apps/plugins/snow.c19
-rw-r--r--apps/plugins/text_viewer/tv_display.c5
20 files changed, 6 insertions, 982 deletions
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c
index 6e993b5468..593b54277e 100644
--- a/apps/plugins/credits.c
+++ b/apps/plugins/credits.c
@@ -27,69 +27,6 @@ static const char* const credits[] = {
#include "credits.raw" /* generated list of names from docs/CREDITS */
};
-#ifdef HAVE_LCD_CHARCELLS
-
-static void roll_credits(void)
-{
- int numnames = sizeof(credits)/sizeof(char*);
- int curr_name = 0;
- int curr_len = rb->utf8length(credits[0]);
- int curr_index = 0;
- int curr_line = 0;
- int name, len, new_len, line, x;
-
- while (1)
- {
- rb->lcd_clear_display();
-
- name = curr_name;
- x = -curr_index;
- len = curr_len;
- line = curr_line;
-
- while (x < 11)
- {
- int x2;
-
- if (x < 0)
- rb->lcd_puts(0, line,
- credits[name] + rb->utf8seek(credits[name], -x));
- else
- rb->lcd_puts(x, line, credits[name]);
-
- if (++name >= numnames)
- break;
-
- line ^= 1;
-
- x2 = x + len/2;
- if ((unsigned)x2 < 11)
- rb->lcd_putc(x2, line, '*');
-
- new_len = rb->utf8length(credits[name]);
- x += MAX(len/2 + 2, len - new_len/2 + 1);
- len = new_len;
- }
- rb->lcd_update();
-
- /* abort on keypress */
- if(rb->action_userabort(HZ/8))
- return;
-
- if (++curr_index >= curr_len)
- {
- if (++curr_name >= numnames)
- break;
- new_len = rb->utf8length(credits[curr_name]);
- curr_index -= MAX(curr_len/2 + 2, curr_len - new_len/2 + 1);
- curr_len = new_len;
- curr_line ^= 1;
- }
- }
-}
-
-#else
-
static bool stop_autoscroll(int action)
{
switch (action)
@@ -362,8 +299,6 @@ static void roll_credits(void)
}
}
-#endif
-
enum plugin_status plugin_start(const void* parameter)
{
(void)parameter;
@@ -372,9 +307,6 @@ enum plugin_status plugin_start(const void* parameter)
backlight_ignore_timeout();
rb->show_logo();
-#ifdef HAVE_LCD_CHARCELLS
- rb->lcd_double_height(false);
-#endif
/* Show the logo for about 3 secs allowing the user to stop */
if(!rb->action_userabort(3*HZ))
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 4cd314a035..29d2ba2fc1 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -22,7 +22,6 @@
***************************************************************************/
#include "plugin.h"
#include "fixedpoint.h"
-#include "lib/playergfx.h"
#include "lib/pluginlib_exit.h"
#if LCD_DEPTH > 1
#include "lib/mylcd.h" /* MYLCD_CFG_RB_XLCD or MYLCD_CFG_PGFX */
@@ -746,8 +745,6 @@ static void cleanup(void)
{
#ifdef USEGSLIB
grey_release();
-#elif defined HAVE_LCD_CHARCELLS
- pgfx_release();
#endif
}
@@ -797,13 +794,6 @@ enum plugin_status plugin_start(const void* parameter)
grey_setfont(FONT_SYSFIXED);
#endif
rb->lcd_setfont(FONT_SYSFIXED);
-#else /* LCD_CHARCELLS */
- if (!pgfx_init(4, 2))
- {
- rb->splash(HZ*2, "Old LCD :(");
- return PLUGIN_OK;
- }
- pgfx_display(0, 0);
#endif
atexit(cleanup);
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index fab409cc14..294bee8f5b 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -595,75 +595,6 @@ static void draw_info_panel(void)
GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s );
}
-#else /* HAVE_LCD_CHARCELLS */
-
-static const unsigned char tk_pat[4][7] = {
- { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* white - white */
- { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x1f, 0x0e }, /* white - black */
- { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* black - white */
- { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x1f, 0x0e } /* black - black */
-};
-
-static unsigned char cur_pat[7];
-static unsigned long gfx_chars[5];
-
-static void release_gfx(void)
-{
- int i;
-
- for (i = 0; i < 5; i++)
- if (gfx_chars[i])
- rb->lcd_unlock_pattern(gfx_chars[i]);
-}
-
-static bool init_gfx(void)
-{
- int i;
-
- for (i = 0; i < 5; i++) {
- if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0) {
- release_gfx();
- return false;
- }
- }
- for (i = 0; i < 4; i++)
- rb->lcd_define_pattern(gfx_chars[i], tk_pat[i]);
- return true;
-}
-
-/* draw a spot at the coordinates (x,y), range of p is 0-19 */
-static void draw_spot(int p)
-{
- if ((p/5) & 1)
- p -= 5;
-
- rb->lcd_putc (p%5, p/10, gfx_chars[2*spots[p]+spots[p+5]]);
-}
-
-/* draw the cursor at the current cursor position */
-static void draw_cursor(void)
-{
- if ((cursor_pos/5) & 1) {
- rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos-5]+spots[cursor_pos]], 7 );
- cur_pat[4] ^= 0x15;
- cur_pat[6] ^= 0x11;
- }
- else {
- rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos]+spots[cursor_pos+5]], 7 );
- cur_pat[0] ^= 0x15;
- cur_pat[2] ^= 0x11;
- }
- rb->lcd_define_pattern(gfx_chars[4], cur_pat);
- rb->lcd_putc( cursor_pos%5, cursor_pos/10, gfx_chars[4] );
-}
-
-/* draw the info panel ... duh */
-static void draw_info_panel(void)
-{
- rb->lcd_puts( 6, 0, "Flips" );
- rb->lcd_putsf( 6, 1, "%d", moves );
-}
-
#endif /* LCD */
/* clear the cursor where it is */
@@ -978,9 +909,6 @@ enum plugin_status plugin_start(const void* parameter)
#endif
rb->lcd_update();
-#else /* HAVE_LCD_CHARCELLS */
- if (!init_gfx())
- return PLUGIN_ERROR;
#endif
rb->button_get_w_tmo(HZ*3);
@@ -995,8 +923,5 @@ enum plugin_status plugin_start(const void* parameter)
rb->srand(*rb->current_tick);
rc = flipit_loop();
-#ifdef HAVE_LCD_CHARCELLS
- release_gfx();
-#endif
return rc;
}
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 8cf4d67f3e..e7529895ac 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -66,10 +66,6 @@
/* Original graphics is only 1bpp so it should be portable
* to most targets. But for now, only support the simple ones.
*/
-#ifndef HAVE_LCD_BITMAP
- #error INVADROX: Unsupported LCD
-#endif
-
#if (LCD_DEPTH < 2)
#error INVADROX: Unsupported LCD
#endif
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index b380e85180..26f8f47e8f 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -30,24 +30,7 @@ const struct button_mapping* plugin_contexts[]={pla_main_ctx};
#define NB_PICTURES 9
#define NB_SLOTS 3
-#ifdef HAVE_LCD_CHARCELLS
-#define PICTURE_ROTATION_STEPS 7
-static unsigned char jackpot_slots_patterns[]={
- 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04, /* (+00)Heart */
- 0x00, 0x04, 0x0E, 0x1F, 0x1F, 0x04, 0x0E, /* (+07)Spade */
- 0x00, 0x04, 0x0E, 0x1F, 0x0E, 0x04, 0x00, /* (+14)Diamond */
- 0x00, 0x15, 0x0E, 0x1F, 0x0E, 0x15, 0x00, /* (+21)Club */
- 0x03, 0x04, 0x0e, 0x1F, 0x1F, 0x1F, 0x0e, /* (+28)Cherry */
- 0x00, 0x04, 0x04, 0x1F, 0x04, 0x0E, 0x1F, /* (+35)Cross */
- 0x04, 0x0E, 0x15, 0x04, 0x0A, 0x0A, 0x11, /* (+42)Man */
- 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, /* (+49)Square */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* (+56)Empty */
- 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04 /* (+63)Heart */
-};
-static unsigned long char_patterns[NB_SLOTS];
-#define SLEEP_TIME (HZ/24)
-#else /* bitmaps LCDs */
-
+#ifdef HAVE_LCD_BITMAP
#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1))
#if NB_SCREENS==1
#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT
@@ -72,7 +55,7 @@ const struct picture jackpot_pictures[]={
};
#define SLEEP_TIME (HZ/200)
-#endif /* HAVE_LCD_CHARCELLS */
+#endif /* HAVE_LCD_BITMAP */
struct jackpot
{
@@ -92,29 +75,9 @@ struct jackpot
int money;
};
-#ifdef HAVE_LCD_CHARCELLS
-static void patterns_init(struct screen* display)
-{
- int i;
- for(i=0;i<NB_SLOTS;i++)
- char_patterns[i]=display->get_locked_pattern();
-}
-
-static void patterns_deinit(struct screen* display)
-{
- /* Restore the old pattern */
- int i;
- for(i=0;i<NB_SLOTS;i++)
- display->unlock_pattern(char_patterns[i]);
-}
-#endif /* HAVE_LCD_CHARCELLS */
-
/*Call when the program exit*/
static void jackpot_exit(void)
{
-#ifdef HAVE_LCD_CHARCELLS
- patterns_deinit(rb->screens[SCREEN_MAIN]);
-#endif /* HAVE_LCD_CHARCELLS */
}
static void jackpot_init(struct jackpot* game)
@@ -168,47 +131,25 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di
char str[20];
int i;
bool changes=false;
-#ifdef HAVE_LCD_CHARCELLS
- display->putchar(0, 0, '[');
-#else
const struct picture* picture= &(jackpot_pictures[display->screen_type]);
int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2;
int pos_y=(display->getheight()-(picture->slide_height))/2;
-#endif /* HAVE_LCD_CHARCELLS */
for(i=0;i<NB_SLOTS;i++)
{
-#ifdef HAVE_LCD_CHARCELLS
- /* the only charcell lcd is 7 pixel high */
- int state_y=(game->slot_state[i]*7)/PICTURE_ROTATION_STEPS;
-#else
int state_y=
(picture->slide_height*game->slot_state[i])/PICTURE_ROTATION_STEPS;
-#endif /* HAVE_LCD_CHARCELLS */
int previous_state_y=game->state_y[display->screen_type][i];
if(state_y==previous_state_y)
continue;/*no need to update the picture
as it's the same as previous displayed one*/
changes=true;
game->state_y[display->screen_type][i]=state_y;
-#ifdef HAVE_LCD_CHARCELLS
- char* current_pattern=&(jackpot_slots_patterns[state_y]);
- display->define_pattern(char_patterns[i],
- current_pattern);
- display->putchar(i+1, 0, char_patterns[i]);
-#else
vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y);
pos_x+=(picture->width+1);
-#endif
}
if(changes){
-#ifdef HAVE_LCD_CHARCELLS
- rb->snprintf(str,sizeof(str),"$%d", game->money);
- display->putchar(++i, 0, ']');
- display->puts(++i, 0, str);
-#else
rb->snprintf(str,sizeof(str),"money : $%d", game->money);
display->puts(0, 0, str);
-#endif
display->update();
}
}
@@ -216,9 +157,6 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di
static void jackpot_info_message(struct screen* display, char* message)
{
-#ifdef HAVE_LCD_CHARCELLS
- display->puts_scroll(0,1,message);
-#else
int xpos, ypos;
int message_height, message_width;
display->getstringsize(message, &message_width, &message_height);
@@ -228,7 +166,6 @@ static void jackpot_info_message(struct screen* display, char* message)
message_height);
display->putsxy(xpos,ypos,message);
display->update();
-#endif /* HAVE_LCD_CHARCELLS */
}
static void jackpot_print_turn_result(struct jackpot* game,
@@ -299,9 +236,6 @@ enum plugin_status plugin_start(const void* parameter)
(void)parameter;
atexit(jackpot_exit);
rb->srand(*rb->current_tick);
-#ifdef HAVE_LCD_CHARCELLS
- patterns_init(rb->screens[SCREEN_MAIN]);
-#endif /* HAVE_LCD_CHARCELLS */
jackpot_init(&game);
FOR_NB_SCREENS(i){
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index 82b9fba4a5..effc076eb7 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -33,10 +33,6 @@ overlay.c
profile_plugin.c
#endif
-#ifdef HAVE_LCD_CHARCELLS
-playergfx.c
-#endif
-
#ifdef HAVE_LCD_BITMAP
#ifdef CPU_ARM
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c
index 5d13fc678d..90712a649f 100644
--- a/apps/plugins/lib/display_text.c
+++ b/apps/plugins/lib/display_text.c
@@ -22,11 +22,7 @@
#include "plugin.h"
#include "display_text.h"
-#ifdef HAVE_LCD_CHARCELLS
-#define MARGIN 0
-#else
#define MARGIN 5
-#endif
static bool wait_key_press(void)
{
diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h
index e363111c71..a543d60890 100644
--- a/apps/plugins/lib/mylcd.h
+++ b/apps/plugins/lib/mylcd.h
@@ -32,15 +32,10 @@
* targets. On color, mylcd_ub_update_XXXX refer to the proper update
* functions, otherwise they are no-ops.
*
- * lib/playergfx.h or lib/grey.h should be included before including this
+ * lib/grey.h should be included before including this
* header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise.
*/
-#if defined (HAVE_LCD_CHARCELLS) && defined(__PGFX_H__)
-#define MYLCD_CFG_PGFX /* using PGFX */
-#define mylcd_(fn) pgfx_##fn
-#define mylcd_ub_(fn) pgfx_##fn
-
-#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
+#if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
#define MYLCD_CFG_GREYLIB /* using greylib */
#define mylcd_(fn) grey_##fn
#define myxlcd_(fn) grey_##fn
diff --git a/apps/plugins/lib/osd.h b/apps/plugins/lib/osd.h
index b5bf63d9fe..1c2752139a 100644
--- a/apps/plugins/lib/osd.h
+++ b/apps/plugins/lib/osd.h
@@ -23,10 +23,6 @@
#ifndef OSD_H
#define OSD_H
-#ifndef HAVE_LCD_BITMAP
-#error OSD requires bitmapped LCD
-#endif
-
/* At this time: assumes use of the default viewport for normal drawing */
/* Callback implemented by user. Paramters are OSD vp-relative coordinates */
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c
deleted file mode 100644
index b2ba71351f..0000000000
--- a/apps/plugins/lib/playergfx.c
+++ /dev/null
@@ -1,526 +0,0 @@
-/***************************************************************************
-* __________ __ ___.
-* Open \______ \ ____ ____ | | _\_ |__ _______ ___
-* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-* \/ \/ \/ \/ \/
-* $Id$
-*
-* Bitmap graphics on player LCD!
-*
-* Copyright (C) 2005 Jens Arnold
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-* KIND, either express or implied.
-*
-****************************************************************************/
-
-#include "plugin.h"
-
-#include "playergfx.h"
-
-/*** globals ***/
-
-static int char_width;
-static int char_height;
-static int pixel_height;
-static int pixel_width;
-static unsigned long gfx_chars[8];
-static unsigned char gfx_buffer[56];
-static int drawmode = DRMODE_SOLID;
-
-/*** Special functions ***/
-
-/* library init */
-bool pgfx_init(int cwidth, int cheight)
-{
- int i;
-
- if (((unsigned) cwidth * (unsigned) cheight) > 8 || (unsigned) cheight > 2)
- return false;
-
- char_width = cwidth;
- char_height = cheight;
- pixel_height = 7 * char_height;
- pixel_width = 5 * char_width;
-
- for (i = 0; i < cwidth * cheight; i++)
- {
- if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0)
- {
- pgfx_release();
- return false;
- }
- }
-
- return true;
-}
-
-/* library deinit */
-void pgfx_release(void)
-{
- int i;
-
- for (i = 0; i < 8; i++)
- if (gfx_chars[i])
- rb->lcd_unlock_pattern(gfx_chars[i]);
-}
-
-/* place the display */
-void pgfx_display(int cx, int cy)
-{
- int i, j;
- int width = MIN(char_width, 11 - cx);
- int height = MIN(char_height, 2 - cy);
-
- for (i = 0; i < width; i++)
- for (j = 0; j < height; j++)
- rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]);
-}
-
-void pgfx_display_block(int cx, int cy, int x, int y)
-{
- rb->lcd_putc(cx, cy, gfx_chars[char_height * x + y]);
-}
-
-
-/*** Update functions ***/
-
-void pgfx_update(void)
-{
- int i;
-
- for (i = 0; i < char_width * char_height; i++)
- rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i);
-
- rb->lcd_update();
-}
-
-/*** Parameter handling ***/
-
-void pgfx_set_drawmode(int mode)
-{
- drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
-}
-
-int pgfx_get_drawmode(void)
-{
- return drawmode;
-}
-
-/*** Low-level drawing functions ***/
-
-static void setpixel(int x, int y)
-{
- gfx_buffer[pixel_height * (x/5) + y] |= 0x10 >> (x%5);
-}
-
-static void clearpixel(int x, int y)
-{
- gfx_buffer[pixel_height * (x/5) + y] &= ~(0x10 >> (x%5));
-}
-
-static void flippixel(int x, int y)
-{
- gfx_buffer[pixel_height * (x/5) + y] ^= 0x10 >> (x%5);
-}
-
-static void nopixel(int x, int y)
-{
- (void)x;
- (void)y;
-}
-
-lcd_pixelfunc_type* pgfx_pixelfuncs[8] = {
- flippixel, nopixel, setpixel, setpixel,
- nopixel, clearpixel, nopixel, clearpixel
-};
-
-static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address ^= (bits & mask);
-}
-
-static void bgblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address &= (bits | ~mask);
-}
-
-static void fgblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address |= (bits & mask);
-}
-
-static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- unsigned data = *(char *)address;
-
- bits ^= data;
- *address = data ^ (bits & mask);
-}
-
-static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address ^= (~bits & mask);
-}
-
-static void bginvblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address &= ~(bits & mask);
-}
-
-static void fginvblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- *address |= (~bits & mask);
-}
-
-static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
-{
- unsigned data = *(char *)address;
-
- bits = ~bits ^ data;
- *address = data ^ (bits & mask);
-}
-
-lcd_blockfunc_type* pgfx_blockfuncs[8] = {
- flipblock, bgblock, fgblock, solidblock,
- flipinvblock, bginvblock, fginvblock, solidinvblock
-};
-
-/*** Drawing functions ***/
-
-/* Clear the whole display */
-void pgfx_clear_display(void)
-{
- unsigned bits = (drawmode & DRMODE_INVERSEVID) ? 0x1F : 0;
-
- rb->memset(gfx_buffer, bits, char_width * pixel_height);
-}
-
-/* Set a single pixel */
-void pgfx_drawpixel(int x, int y)
-{
- if (((unsigned)x < (unsigned)pixel_width)
- && ((unsigned)y < (unsigned)pixel_height))
- pgfx_pixelfuncs[drawmode](x, y);
-}
-
-/* Draw a line */
-void pgfx_drawline(int x1, int y1, int x2, int y2)
-{
- int numpixels;
- int i;
- int deltax, deltay;
- int d, dinc1, dinc2;
- int x, xinc1, xinc2;
- int y, yinc1, yinc2;
- lcd_pixelfunc_type *pfunc = pgfx_pixelfuncs[drawmode];
-
- deltax = abs(x2 - x1);
- deltay = abs(y2 - y1);
- xinc2 = 1;
- yinc2 = 1;
-
- if (deltax >= deltay)
- {
- numpixels = deltax;
- d = 2 * deltay - deltax;
- dinc1 = deltay * 2;
- dinc2 = (deltay - deltax) * 2;
- xinc1 = 1;
- yinc1 = 0;
- }
- else
- {
- numpixels = deltay;
- d = 2 * deltax - deltay;
- dinc1 = deltax * 2;
- dinc2 = (deltax - deltay) * 2;
- xinc1 = 0;
- yinc1 = 1;
- }
- numpixels++; /* include endpoints */
-
- if (x1 > x2)
- {
- xinc1 = -xinc1;
- xinc2 = -xinc2;
- }
-
- if (y1 > y2)
- {
- yinc1 = -yinc1;
- yinc2 = -yinc2;
- }
-
- x = x1;
- y = y1;
-
- for (i = 0; i < numpixels; i++)
- {
- if (((unsigned)x < (unsigned)pixel_width)
- && ((unsigned)y < (unsigned)pixel_height))
- pfunc(x, y);
-
- if (d < 0)
- {
- d += dinc1;
- x += xinc1;
- y += yinc1;
- }
- else
- {
- d += dinc2;
- x += xinc2;
- y += yinc2;
- }
- }
-}
-
-/* Draw a horizontal line (optimised) */
-void pgfx_hline(int x1, int x2, int y)
-{
- int nx;
- unsigned char *dst;
- unsigned mask, mask_right;
- lcd_blockfunc_type *bfunc;
-
- /* direction flip */
- if (x2 < x1)
- {
- nx = x1;
- x1 = x2;
- x2 = nx;
- }
-
- /* nothing to draw? */
- if (((unsigned)y >= (unsigned)pixel_height) || (x1 >= pixel_width)
- || (x2 < 0))
- return;
-
- /* clipping */
- if (x1 < 0)
- x1 = 0;
- if (x2 >= pixel_width)
- x2 = pixel_width - 1;
-
- bfunc = pgfx_blockfuncs[drawmode];
- dst = &gfx_buffer[pixel_height * (x1/5) + y];
- nx = x2 - (x1 - (x1 % 5));
- mask = 0x1F >> (x1 % 5);
- mask_right = 0x1F0 >> (nx % 5);
-
- for (; nx >= 5; nx -= 5)
- {
- bfunc(dst, mask, 0xFFu);
- dst += pixel_height;
- mask = 0x1F;
- }
- mask &= mask_right;
- bfunc(dst, mask, 0x1F);
-}
-
-/* Draw a vertical line (optimised) */
-void pgfx_vline(int x, int y1, int y2)
-{
- int y;
- unsigned char *dst, *dst_end;
- unsigned mask;
- lcd_blockfunc_type *bfunc;
-
- /* direction flip */
- if (y2 < y1)
- {
- y = y1;
- y1 = y2;
- y2 = y;
- }
-
- /* nothing to draw? */
- if (((unsigned)x >= (unsigned)pixel_width) || (y1 >= pixel_height)
- || (y2 < 0))
- return;
-
- /* clipping */
- if (y1 < 0)
- y1 = 0;
- if (y2 >= pixel_height)
- y2 = pixel_height - 1;
-
- bfunc = pgfx_blockfuncs[drawmode];
- dst = &gfx_buffer[pixel_height * (x/5) + y1];
- mask = 0x10 >> (x % 5);
-
- dst_end = dst + y2 - y1;
- do
- bfunc(dst++, mask, 0x1F);
- while (dst <= dst_end);
-}
-
-/* Draw a rectangular box */
-void pgfx_drawrect(int x, int y, int width, int height)
-{
- if ((width <= 0) || (height <= 0))
- return;
-
- int x2 = x + width - 1;
- int y2 = y + height - 1;
-
- pgfx_vline(x, y, y2);
- pgfx_vline(x2, y, y2);
- pgfx_hline(x, x2, y);
- pgfx_hline(x, x2, y2);
-}
-
-/* Fill a rectangular area */
-void pgfx_fillrect(int x, int y, int width, int height)
-{
- int nx;
- unsigned char *dst, *dst_end;
- unsigned mask, mask_right;
- lcd_blockfunc_type *bfunc;
-
- /* nothing to draw? */
- if ((width <= 0) || (height <= 0) || (x >= pixel_width)
- || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0))
- return;
-
- /* clipping */
- if (x < 0)
- {
- width += x;
- x = 0;
- }
- if (y < 0)
- {
- height += y;
- y = 0;
- }
- if (x + width > pixel_width)
- width = pixel_width - x;
- if (y + height > pixel_height)
- height = pixel_height - y;
-
- bfunc = pgfx_blockfuncs[drawmode];
- dst = &gfx_buffer[pixel_height * (x/5) + y];
- nx = width - 1 + (x % 5);
- mask = 0x1F >> (x % 5);
- mask_right = 0x1F0 >> (nx % 5);
-
- for (; nx >= 5; nx -= 5)
- {
- unsigned char *dst_col = dst;
-
- dst_end = dst_col + height;
- do
- bfunc(dst_col++, mask, 0x1F);
- while (dst_col < dst_end);
-
- dst += pixel_height;
- mask = 0x1F;
- }
- mask &= mask_right;
-
- dst_end = dst + height;
- do
- bfunc(dst++, mask, 0x1F);
- while (dst < dst_end);
-}
-
-/* About PlayerGFX internal bitmap format:
- *
- * A bitmap contains one bit for every pixel that defines if that pixel is
- * black (1) or white (0). Bits within a byte are arranged horizontally,
- * MSB at the left.
- * The bytes are stored in row-major order, with byte 0 being top left,
- * byte 1 2nd from left etc. Each row of bytes defines one pixel row.
- *
- * This approximates the (even more strange) internal hardware format. */
-
-/* Draw a partial bitmap. stride is given in pixels */
-void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y,
- int stride, int x, int y, int width, int height)
-{
- int nx, shift;
- unsigned char *dst, *dst_end;
- unsigned mask, mask_right;
- lcd_blockfunc_type *bfunc;
-
- /* nothing to draw? */
- if ((width <= 0) || (height <= 0) || (x >= pixel_width)
- || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0))
- return;
-
- /* clipping */
- if (x < 0)
- {
- width += x;
- src_x -= x;
- x = 0;
- }
- if (y < 0)
- {
- height += y;
- src_y -= y;
- y = 0;
- }
- if (x + width > pixel_width)
- width = pixel_width - x;
- if (y + height > pixel_height)
- height = pixel_height - y;
-
- stride = (stride + 7) >> 3; /* convert to no. of bytes */
-
- src += stride * src_y + (src_x >> 3); /* move starting point */
- dst = &gfx_buffer[pixel_height * (x/5) + y];
- shift = 3 + (x % 5) - (src_x & 7);
- nx = width - 1 + (x % 5);
-
- bfunc = pgfx_blockfuncs[drawmode];
- mask = 0x1F >> (x % 5);
- mask_right = 0x1F0 >> (nx % 5);
-
- dst_end = dst + height;
- do
- {
- const unsigned char *src_row = src;
- unsigned char *dst_row = dst++;
- unsigned mask_row = mask;
- unsigned data = *src_row++;
- int extrabits = shift;
-
- for (x = nx; x >= 5; x -= 5)
- {
- if (extrabits < 0)
- {
- data = (data << 8) | *src_row++;
- extrabits += 8;
- }
- bfunc(dst_row, mask_row, data >> extrabits);
- extrabits -= 5;
- dst_row += pixel_height;
- mask_row = 0x1F;
- }
- if (extrabits < 0)
- {
- data = (data << 8) | *src_row;
- extrabits += 8;
- }
- bfunc(dst_row, mask_row & mask_right, data >> extrabits);
-
- src += stride;
- }
- while (dst < dst_end);
-}
-
-/* Draw a full bitmap */
-void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height)
-{
- pgfx_bitmap_part(src, 0, 0, width, x, y, width, height);
-}
diff --git a/apps/plugins/lib/playergfx.h b/apps/plugins/lib/playergfx.h
deleted file mode 100644
index 9f1305af12..0000000000
--- a/apps/plugins/lib/playergfx.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************
-* __________ __ ___.
-* Open \______ \ ____ ____ | | _\_ |__ _______ ___
-* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-* \/ \/ \/ \/ \/
-* $Id$
-*
-* Bitmap graphics on player LCD!
-*
-* Copyright (C) 2005 Jens Arnold
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-* KIND, either express or implied.
-*
-****************************************************************************/
-
-#ifndef __PGFX_H__
-#define __PGFX_H__
-
-#include "plugin.h"
-
-#ifdef HAVE_LCD_CHARCELLS /* Player only :) */
-
-bool pgfx_init(int cwidth, int cheight);
-void pgfx_release(void);
-void pgfx_display(int cx, int cy);
-void pgfx_display_block(int cx, int cy, int x, int y);
-void pgfx_update(void);
-
-void pgfx_set_drawmode(int mode);
-int pgfx_get_drawmode(void);
-
-void pgfx_clear_display(void);
-void pgfx_drawpixel(int x, int y);
-void pgfx_drawline(int x1, int y1, int x2, int y2);
-void pgfx_hline(int x1, int x2, int y);
-void pgfx_vline(int x, int y1, int y2);
-void pgfx_drawrect(int x, int y, int width, int height);
-void pgfx_fillrect(int x, int y, int width, int height);
-void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y,
- int stride, int x, int y, int width, int height);
-void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height);
-
-#define pgfx_mono_bitmap_part pgfx_bitmap_part
-#define pgfx_mono_bitmap pgfx_bitmap
-
-#endif /* HAVE_LCD_CHARCELLS */
-#endif /* __PGFX_H__ */
diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c
index 6927d84a96..4c05ee68c5 100644
--- a/apps/plugins/lib/simple_viewer.c
+++ b/apps/plugins/lib/simple_viewer.c
@@ -64,17 +64,12 @@ static const char* get_next_line(const char *text, struct view_info *info)
total = 0;
while(*ptr)
{
-#ifdef HAVE_LCD_CHARCELLS
- n = rb->utf8seek(ptr, 1);
- w = 1;
-#else
unsigned short ch;
n = ((intptr_t)rb->utf8decode(ptr, &ch) - (intptr_t)ptr);
if (rb->is_diacritic(ch, NULL))
w = 0;
else
w = rb->font_get_width(info->pf, ch);
-#endif
if (isbrchr(ptr, n))
space = ptr+(isspace(*ptr) || total + w <= info->vp.width? n: 0);
if (*ptr == '\n')
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index e1c570b6a5..60bed3b826 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -19,7 +19,6 @@
*
**************************************************************************/
#include "plugin.h"
-#include "lib/playergfx.h"
#include "lib/pluginlib_actions.h"
/* this set the context to use with PLA */
@@ -81,19 +80,9 @@ enum plugin_status plugin_start(const void* parameter) {
int y = (DISPLAY_HEIGHT / 2) - (LOGO_HEIGHT / 2);
int dx;
int dy;
-#ifdef HAVE_LCD_CHARCELLS
- int cpos = -1;
- int old_cpos = -1;
-#endif
(void)parameter;
-#ifdef HAVE_LCD_CHARCELLS
- if (!pgfx_init(4, 2)) {
- rb->splash(HZ*2, "Old LCD :(");
- return PLUGIN_OK;
- }
-#endif
rb->srand(*rb->current_tick);
dx = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
@@ -159,9 +148,6 @@ enum plugin_status plugin_start(const void* parameter) {
switch (button) {
case LP_QUIT:
case LP_QUIT2:
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_OK;
case LP_DEC_X:
case LP_DEC_X_REPEAT:
@@ -184,9 +170,6 @@ enum plugin_status plugin_start(const void* parameter) {
default:
if (rb->default_event_handler(button) == SYS_USB_CONNECTED) {
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_USB_CONNECTED;
}
break;
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index eb441eab8d..1b017942a9 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -144,11 +144,7 @@ static struct viewport vp_lyrics[NB_SCREENS];
#include "lib/pluginlib_actions.h"
#define LST_SET_TIME (LST_SET_MSEC|LST_SET_SEC|LST_SET_MIN|LST_SET_HOUR)
-#ifdef HAVE_LCD_CHARCELLS
-#define LST_OFF_Y 0
-#else /* HAVE_LCD_BITMAP */
#define LST_OFF_Y 1
-#endif
static int lrc_set_time(const char *title, const char *unit, long *pval,
int step, int min, int max, int flags)
{
@@ -229,17 +225,11 @@ static int lrc_set_time(const char *title, const char *unit, long *pval,
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]);
rb->lcd_set_drawmode(DRMODE_SOLID);
-#else
- rb->lcd_put_cursor(x+rb->utf8length(&buffer[p_start])-1, y, 0x7F);
#endif
}
rb->lcd_update();
int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts));
int mult = 1;
-#ifdef HAVE_LCD_CHARCELLS
- if (pos_min != pos_max)
- rb->lcd_remove_cursor();
-#endif
switch (button)
{
case PLA_UP_REPEAT:
@@ -452,9 +442,7 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
int word_count, word_width;
const unsigned char *str;
}
-#ifndef HAVE_LCD_CHARCELLS
sp,
-#endif
cr;
lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */
@@ -514,19 +502,15 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
cr.nword = lrc_line->nword;
lrc_word = lrc_line->words+cr.nword;
cr.str = (lrc_word-1)->word;
-#ifndef HAVE_LCD_CHARCELLS
sp.word_count = 0;
sp.word_width = 0;
sp.nword = 0;
sp.count = 0;
sp.width = 0;
-#endif
do {
cr.count = 0;
cr.width = 0;
-#ifndef HAVE_LCD_CHARCELLS
sp.str = NULL;
-#endif
while (1)
{
@@ -541,10 +525,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
break;
int c, w;
-#ifdef HAVE_LCD_CHARCELLS
- c = rb->utf8seek(cr.str, 1);
- w = 1;
-#else
c = ((intptr_t)rb->utf8decode(cr.str, &ch) - (intptr_t)cr.str);
if (rb->is_diacritic(ch, NULL))
w = 0;
@@ -576,7 +556,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
}
break;
}
-#endif
cr.count += c;
cr.width += w;
lrc_word->count += c;
@@ -1916,38 +1895,6 @@ static void display_lrcs(void)
}
if (!lrc_line && ypos < vp_lyrics[i].height)
display->putsxy(0, ypos, "[end]");
-#else /* HAVE_LCD_CHARCELLS */
- struct lrc_line *lrc_line = lrc_center;
- struct lrc_brpos *lrc_brpos = calc_brpos(lrc_line, i);
- long elapsed = 0;
- const char *str = get_lrc_str(lrc_line);
- int x = vp_lyrics[i].width/2, y = 0;
-
- if (rin >= 0 && len > 0)
- {
- elapsed = rin * lrc_center->width / len;
- while (elapsed > lrc_brpos->width)
- {
- elapsed -= lrc_brpos->width;
- str = lrc_skip_space(str+lrc_brpos->count);
- lrc_brpos++;
- }
- }
- rb->strlcpy(temp_buf, str, lrc_brpos->count+1);
-
- x -= elapsed;
- if (x < 0)
- display->puts(0, y, temp_buf + rb->utf8seek(temp_buf, -x));
- else
- display->puts(x, y, temp_buf);
- x += rb->utf8length(temp_buf)+1;
- lrc_line = lrc_line->next;
- if (!lrc_line && x < vp_lyrics[i].width)
- {
- if (x < vp_lyrics[i].width/2)
- x = vp_lyrics[i].width/2;
- display->puts(x, y, "[end]");
- }
#endif /* HAVE_LCD_BITMAP */
display->update_viewport();
display->set_viewport(NULL);
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 02217390cd..75947df618 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -1022,12 +1022,7 @@ static void play_tock(void)
static void metronome_draw(struct screen* display, int state)
{
struct part *ps;
-#ifndef HAVE_LCD_BITMAP
- char beat1 = ' ';
- char beat2 = ' ';
-#else
int textlen = display->lcdwidth / display->getcharwidth();
-#endif
ps = part;
display->clear_display();
#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 68938a1f13..28ea9efd93 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -19,7 +19,6 @@
*
**************************************************************************/
#include "plugin.h"
-#include "lib/playergfx.h"
#include "lib/mylcd.h"
#include "lib/pluginlib_actions.h"
@@ -59,14 +58,6 @@ enum plugin_status plugin_start(const void* parameter)
int sy = 3;
(void)parameter;
-#ifdef HAVE_LCD_CHARCELLS
- if (!pgfx_init(4, 2))
- {
- rb->splash(HZ*2, "Old LCD :(");
- return PLUGIN_OK;
- }
- pgfx_display(3, 0);
-#endif
mylcd_clear_display();
mylcd_set_drawmode(DRMODE_COMPLEMENT);
while (1) {
@@ -117,9 +108,6 @@ enum plugin_status plugin_start(const void* parameter)
case MOSAIQUE_QUIT:
case MOSAIQUE_QUIT2:
mylcd_set_drawmode(DRMODE_SOLID);
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_OK;
case MOSAIQUE_SPEED:
@@ -142,9 +130,6 @@ enum plugin_status plugin_start(const void* parameter)
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
{
mylcd_set_drawmode(DRMODE_SOLID);
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_USB_CONNECTED;
}
break;
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index add1fc5724..68440e4602 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -229,9 +229,7 @@ static void generate(void)
rb->splashf(HZ, "Couldnt open %s", RFA_FILE);
return;
}
-#ifndef HAVE_LCD_CHARCELLS
update_screen(true);
-#endif
lasttick = *rb->current_tick;
if(!custom_dir())
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 @@
#include "lib/helper.h"
#include "lib/highscore.h"
#include "lib/playback_control.h"
-#include "lib/playergfx.h"
#include "lib/mylcd.h"
@@ -770,17 +769,8 @@
extern const fb_data rockblox_background[];
-#else /* HAVE_LCD_CHARCELLS */
-
-#define BOARD_HEIGHT 14
-
-#define BLOCK_WIDTH 1
-#define BLOCK_HEIGHT 1
-#define BOARD_X 5
-#define BOARD_Y 0
-#define PREVIEW_X 15
-#define PREVIEW_Y 1
-
+#else
+#error "lcd screen size not defined!"
#endif
#ifndef HIGHSCORE_SPACE
@@ -992,10 +982,6 @@ static void show_details (void)
rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score);
rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level);
rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines);
-#else /* HAVE_LCD_CHARCELLS */
- rb->lcd_putsf (5, 0, "L%d/%d", rockblox_status.level,
- rockblox_status.lines);
- rb->lcd_putsf (5, 1, "S%d", rockblox_status.score);
#endif
}
@@ -1066,15 +1052,6 @@ static void init_rockblox (bool resume)
#ifdef HAVE_LCD_BITMAP
rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
-#else /* HAVE_LCD_CHARCELLS */
- pgfx_display (0, 0);
- pgfx_display_block (3, 0, 3, 1);
- pgfx_display_block (4, 0, 3, 0);
- rb->lcd_puts(4, 1, " ");
- pgfx_clear_display();
- pgfx_fillrect (3, 0, 2, 14);
- pgfx_fillrect (15, 7, 2, 7);
- pgfx_update();
#endif
if (!resume)
{
@@ -1200,8 +1177,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1,
BOARD_X + (i + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1);
-#else /* HAVE_LCD_CHARCELLS */
- pgfx_drawpixel (BOARD_X + i, BOARD_Y + j);
#endif
}
}
@@ -1246,8 +1221,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
-#else /* HAVE_LCD_CHARCELLS */
- pgfx_drawpixel (BOARD_X + x, BOARD_Y + y);
#endif
}
@@ -1285,8 +1258,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
-#else /* HAVE_LCD_CHARCELLS */
- pgfx_drawpixel (BOARD_X + x, BOARD_Y + y);
#endif
}
@@ -1355,8 +1326,6 @@ static void draw_next_block (void)
rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1,
PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1,
PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1);
-#else /* HAVE_LCD_CHARCELLS */
- pgfx_drawpixel (PREVIEW_X + rx, PREVIEW_Y + ry);
#endif
}
@@ -1787,9 +1756,6 @@ enum plugin_status plugin_start (const void *parameter)
}
}
-#ifndef HAVE_LCD_BITMAP
- pgfx_release();
-#endif
/* Save user's HighScore */
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
backlight_use_settings();
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 74efb8ea00..f05d3c2a44 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -19,7 +19,6 @@
*
**************************************************************************/
#include "plugin.h"
-#include "lib/playergfx.h"
#include "lib/mylcd.h"
#include "lib/pluginlib_actions.h"
@@ -143,11 +142,6 @@ static void snow_init(void)
particles[i][0]=-1;
particles[i][1]=-1;
}
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_display(0, 0); /* display three times */
- pgfx_display(4, 0);
- pgfx_display(8, 0);
-#endif
mylcd_clear_display();
#ifdef HAVE_REMOTE_LCD
rb->lcd_remote_clear_display();
@@ -159,13 +153,6 @@ enum plugin_status plugin_start(const void* parameter)
int button;
(void)(parameter);
-#ifdef HAVE_LCD_CHARCELLS
- if (!pgfx_init(4, 2))
- {
- rb->splash(HZ*2, "Old LCD :(");
- return PLUGIN_OK;
- }
-#endif
#ifdef HAVE_LCD_COLOR
rb->lcd_clear_display();
rb->lcd_set_foreground(LCD_WHITE);
@@ -186,17 +173,11 @@ enum plugin_status plugin_start(const void* parameter)
if ((button == SNOW_QUIT) || (button == SNOW_QUIT2))
{
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_OK;
}
else
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
{
-#ifdef HAVE_LCD_CHARCELLS
- pgfx_release();
-#endif
return PLUGIN_USB_CONNECTED;
}
}
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c
index 1f8499bed2..d6175b79cf 100644
--- a/apps/plugins/text_viewer/tv_display.c
+++ b/apps/plugins/text_viewer/tv_display.c
@@ -69,11 +69,6 @@
#define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width
#define TV_SCROLLBAR_HEIGHT 4
-
-#ifndef HAVE_LCD_BITMAP
-#define TV_BOOKMARK_ICON 0xe101
-#endif
-
struct tv_rect {
int x;
int y;