summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorKjell Ericson <kjell@haxx.se>2003-01-10 10:02:27 +0000
committerKjell Ericson <kjell@haxx.se>2003-01-10 10:02:27 +0000
commitea3d4d5a0049c755b71e001c957707a7619399e6 (patch)
tree137a6167f12580b9c44fb1854da9f72702bdf7ff /uisimulator
parenta309014f497206fc5e66c676d4b5a1f8bd84933b (diff)
downloadrockbox-ea3d4d5a0049c755b71e001c957707a7619399e6.tar.gz
rockbox-ea3d4d5a0049c755b71e001c957707a7619399e6.zip
Implementing Rocklatin for Rockbox player.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3054 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/lcd-playersim.c47
-rw-r--r--uisimulator/x11/Makefile5
2 files changed, 9 insertions, 43 deletions
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c
index 25e17b5f81..e3cadd4513 100644
--- a/uisimulator/common/lcd-playersim.c
+++ b/uisimulator/common/lcd-playersim.c
@@ -39,11 +39,10 @@
#define CHAR_PIXEL 4
#define BORDER_MARGIN 5
-unsigned char lcd_buffer[2][11];
-
static int double_height=1;
extern bool lcd_display_redraw;
-extern unsigned const char *lcd_ascii;
+extern const unsigned short *lcd_ascii;
+extern unsigned char hardware_buffer_lcd[11][2];
void lcd_print_icon(int x, int icon_line, bool enable, char **icon)
@@ -96,7 +95,7 @@ void lcd_print_char(int x, int y)
int p=0, cp=0;
struct rectangle points[CHAR_HEIGHT*CHAR_WIDTH];
struct rectangle clearpoints[CHAR_HEIGHT*CHAR_WIDTH];
- unsigned char ch=lcd_buffer[y][x];
+ unsigned char ch=hardware_buffer_lcd[x][y];
if (double_height == 2 && y == 1)
return; /* Second row can't be printed in double height. ??*/
@@ -204,35 +203,7 @@ void lcd_invertpixel(int x, int y)
(void)y;
}
-void lcd_clear_display(void)
-{
- int x, y;
- for (y=0; y<2; y++) {
- for (x=0; x<11; x++) {
- lcd_buffer[y][x]=lcd_ascii[' '];
- }
- }
- lcd_update();
-}
-void lcd_puts(int x, int y, unsigned char *str)
-{
- int i;
- DEBUGF("lcd_puts(%d, %d, \"", x, y);
- for (i=0; *str && x<11; i++) {
-#ifdef DEBUGF
- if (*str>=32 && *str<128)
- {DEBUGF("%c", *str);}
- else
- {DEBUGF("(0x%02x)", *str);}
-#endif
- lcd_buffer[y][x++]=lcd_ascii[*str++];
- }
- DEBUGF("\")\n");
- for (; x<11; x++)
- lcd_buffer[y][x]=lcd_ascii[' '];
- lcd_update();
-}
void lcd_double_height(bool on)
{
@@ -243,11 +214,11 @@ void lcd_double_height(bool on)
lcd_update();
}
-void lcd_define_pattern(int which, char *pattern, int length)
+void lcd_define_hw_pattern(int which, char *pattern, int length)
{
int i, j;
int pat = which / 8;
- char icon[8];
+ unsigned char icon[8];
memset(icon, 0, sizeof icon);
DEBUGF("Defining pattern %d:", pat);
@@ -267,11 +238,3 @@ void lcd_define_pattern(int which, char *pattern, int length)
lcd_update();
}
-extern void lcd_puts(int x, int y, unsigned char *str);
-
-void lcd_putc(int x, int y, unsigned char ch)
-{
- DEBUGF("lcd_putc(%d, %d, %d '0x%02x')\n", x, y, ch, ch);
- lcd_buffer[y][x]=lcd_ascii[ch];
- lcd_update();
-}
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile
index 10fc2c532b..5fc83bfcaa 100644
--- a/uisimulator/x11/Makefile
+++ b/uisimulator/x11/Makefile
@@ -83,7 +83,7 @@ APPCFLAGS = $(DEBUG) $(DEFINES) -DAPPSVERSION=\"$(VERSION)\" $(APPINCLUDES) -W -
ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
LCDSRSC = lcd-recorder.c sysfont.c font.c
else
- LCDSRSC = lcd-playersim.c lcd-player.c font-player.c
+ LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c
endif
FIRMSRCS = $(LCDSRSC) sprintf.c id3.c debug.c usb.c mpeg.c power.c\
powermgmt.c panic.c ctype.c
@@ -304,6 +304,9 @@ $(OBJDIR)/ajf.o: $(FIRMWAREDIR)/ajf.c
$(OBJDIR)/power.o: $(DRIVERS)/power.c
$(CC) $(CFLAGS) -c $< -o $@
+$(OBJDIR)/lcd-player-charset.o: $(DRIVERS)/lcd-player-charset.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
$(OBJDIR)/lcd-playersim.o: ../common/lcd-playersim.c
$(CC) $(CFLAGS) -c $< -o $@