diff options
author | Dave Chapman <dave@dchapman.com> | 2006-02-09 00:48:53 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-02-09 00:48:53 +0000 |
commit | 8ad2df82754184a8dfe1a6d66248a1dd156286bd (patch) | |
tree | f1916f784da7adce628654f1480b3ada77498152 /uisimulator | |
parent | a88632f885308667fed1b000f3d2d5a363b130c3 (diff) | |
download | rockbox-8ad2df82754184a8dfe1a6d66248a1dd156286bd.tar.gz rockbox-8ad2df82754184a8dfe1a6d66248a1dd156286bd.zip |
Create an SDL sim for the iPod 4G Grayscale and also create an IPOD_ARCH define for all iPods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8636 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/sdl/UI-ipod4g.bmp | bin | 0 -> 217614 bytes | |||
-rw-r--r-- | uisimulator/sdl/lcd-sdl.c | 4 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 12 |
3 files changed, 16 insertions, 0 deletions
diff --git a/uisimulator/sdl/UI-ipod4g.bmp b/uisimulator/sdl/UI-ipod4g.bmp new file mode 100644 index 0000000000..b24c560d1c --- /dev/null +++ b/uisimulator/sdl/UI-ipod4g.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/sdl/lcd-sdl.c b/uisimulator/sdl/lcd-sdl.c index a90efbd204..80a3c96a87 100644 --- a/uisimulator/sdl/lcd-sdl.c +++ b/uisimulator/sdl/lcd-sdl.c | |||
@@ -73,7 +73,11 @@ void lcd_update_rect(int x_start, int y_start, int width, int height) | |||
73 | #if LCD_DEPTH == 1 | 73 | #if LCD_DEPTH == 1 |
74 | *p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); | 74 | *p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); |
75 | #elif LCD_DEPTH == 2 | 75 | #elif LCD_DEPTH == 2 |
76 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | ||
77 | *p = ((lcd_framebuffer[y][x/4] >> (2 * (x & 3))) & 3); | ||
78 | #else | ||
76 | *p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | 79 | *p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); |
80 | #endif | ||
77 | #elif LCD_DEPTH == 16 | 81 | #elif LCD_DEPTH == 16 |
78 | #if LCD_PIXELFORMAT == RGB565SWAPPED | 82 | #if LCD_PIXELFORMAT == RGB565SWAPPED |
79 | unsigned bits = lcd_framebuffer[y][x]; | 83 | unsigned bits = lcd_framebuffer[y][x]; |
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index dd8e558b66..ddf0a6ff86 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h | |||
@@ -109,6 +109,18 @@ | |||
109 | #define UI_REMOTE_WIDTH 128 | 109 | #define UI_REMOTE_WIDTH 128 |
110 | #define UI_REMOTE_HEIGHT 64 | 110 | #define UI_REMOTE_HEIGHT 64 |
111 | 111 | ||
112 | #elif defined(IPOD_4G) | ||
113 | #define UI_TITLE "iPod 4G" | ||
114 | #define UI_WIDTH 196 // width of GUI window | ||
115 | #define UI_HEIGHT 370 // height of GUI window | ||
116 | #define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) | ||
117 | #define UI_LCD_BGCOLORLIGHT 173, 216, 230 // bkgnd color of LCD (backlight) | ||
118 | #define UI_LCD_BLACK 0, 0, 0 // black | ||
119 | #define UI_LCD_POSX 19 // x position of lcd | ||
120 | #define UI_LCD_POSY 14 // y position of lcd | ||
121 | #define UI_LCD_WIDTH 160 | ||
122 | #define UI_LCD_HEIGHT 128 | ||
123 | |||
112 | #elif defined(IPOD_COLOR) | 124 | #elif defined(IPOD_COLOR) |
113 | #define UI_TITLE "iPod Color" | 125 | #define UI_TITLE "iPod Color" |
114 | #define UI_WIDTH 261 // width of GUI window | 126 | #define UI_WIDTH 261 // width of GUI window |