summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-07-28 07:35:45 +0000
committerJens Arnold <amiconn@rockbox.org>2006-07-28 07:35:45 +0000
commit05ddd9a44eb565e936274b6f73fc76f7476113a7 (patch)
tree0c2a5a8db4c86196deb06615b246d66e920784b7 /uisimulator
parentcb36fec3922cb1317bdb06a6497370f188694d4e (diff)
downloadrockbox-05ddd9a44eb565e936274b6f73fc76f7476113a7.tar.gz
rockbox-05ddd9a44eb565e936274b6f73fc76f7476113a7.tar.bz2
rockbox-05ddd9a44eb565e936274b6f73fc76f7476113a7.zip
X5 remote LCD drawing. This will break target linking atm - lcd_remote_update[_rect]() are not yet implemented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10347 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/SOURCES2
-rw-r--r--uisimulator/sdl/lcd-remote-bitmap.c (renamed from uisimulator/sdl/lcd-remote.c)13
-rw-r--r--uisimulator/sdl/lcd-remote-bitmap.h (renamed from uisimulator/sdl/lcd-remote.h)1
-rw-r--r--uisimulator/sdl/uisdl.c2
-rw-r--r--uisimulator/sdl/uisdl.h16
5 files changed, 18 insertions, 16 deletions
diff --git a/uisimulator/sdl/SOURCES b/uisimulator/sdl/SOURCES
index 41890048de..92bf021711 100644
--- a/uisimulator/sdl/SOURCES
+++ b/uisimulator/sdl/SOURCES
@@ -6,7 +6,7 @@ lcd-bitmap.c
lcd-charcell.c
#endif
#ifdef HAVE_REMOTE_LCD
-lcd-remote.c
+lcd-remote-bitmap.c
#endif
lcd-sdl.c
sound.c
diff --git a/uisimulator/sdl/lcd-remote.c b/uisimulator/sdl/lcd-remote-bitmap.c
index 7231b50aea..21fa0d2ab4 100644
--- a/uisimulator/sdl/lcd-remote.c
+++ b/uisimulator/sdl/lcd-remote-bitmap.c
@@ -19,7 +19,7 @@
#include "uisdl.h"
#include "lcd-sdl.h"
-#include "lcd-remote.h"
+#include "lcd-remote-bitmap.h"
SDL_Surface *remote_surface;
@@ -27,10 +27,15 @@ SDL_Color remote_color_zero = {UI_REMOTE_BGCOLOR, 0};
SDL_Color remote_backlight_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0};
SDL_Color remote_color_max = {0, 0, 0, 0};
-extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH];
-
static unsigned long get_lcd_remote_pixel(int x, int y) {
- return ((lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 1);
+#if LCD_REMOTE_DEPTH == 1
+ return (lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 1;
+#elif LCD_REMOTE_DEPTH == 2
+#if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED
+ unsigned bits = (lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 0x0101;
+ return (bits | (bits >> 7)) & 3;
+#endif
+#endif
}
void lcd_remote_update (void)
diff --git a/uisimulator/sdl/lcd-remote.h b/uisimulator/sdl/lcd-remote-bitmap.h
index 7def1e723c..09391726fb 100644
--- a/uisimulator/sdl/lcd-remote.h
+++ b/uisimulator/sdl/lcd-remote-bitmap.h
@@ -21,6 +21,7 @@
#define __LCDREMOTE_H__
#include "lcd.h"
+#include "lcd-remote.h"
#include "SDL.h"
void sim_lcd_remote_init(void);
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c
index 75531d263f..8c9d216f10 100644
--- a/uisimulator/sdl/uisdl.c
+++ b/uisimulator/sdl/uisdl.c
@@ -31,7 +31,7 @@
#include "lcd-charcell.h"
#endif
#ifdef HAVE_REMOTE_LCD
-#include "lcd-remote.h"
+#include "lcd-remote-bitmap.h"
#endif
#include "thread-sdl.h"
#include "SDL_mutex.h"
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index afd9678f32..7deeff3bb8 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -176,22 +176,18 @@
#elif defined(IAUDIO_X5)
#define UI_TITLE "iAudio X5"
#define UI_WIDTH 300 /* width of GUI window */
-#define UI_HEIGHT 462 /* height of GUI window */
-#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
-#define UI_LCD_BGCOLORLIGHT 230, 160, 60 /* bkgnd color of LCD (backlight) */
-#define UI_LCD_BLACK 0, 0, 0 /* black */
+#define UI_HEIGHT 558 /* height of GUI window */
+/* high-colour */
#define UI_LCD_POSX 55 /* x position of lcd */
#define UI_LCD_POSY 61 /* y position of lcd (74 for real aspect) */
#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
-
+#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
+#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
#define UI_REMOTE_POSX 12 /* x position of remote lcd */
-#define UI_REMOTE_POSY 478 /* y position of remote lcd */
+#define UI_REMOTE_POSY 462 /* y position of remote lcd */
#define UI_REMOTE_WIDTH 128
-#define UI_REMOTE_HEIGHT 64
-
-#define UI_REMOTE_BGCOLORLIGHT 250, 180, 130 /* bkgnd of remote lcd (bklight) */
-#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
+#define UI_REMOTE_HEIGHT 96
#elif defined(GIGABEAT_F)
#define UI_TITLE "Toshiba Gigabeat"