From e7a6a8267d14419137be16a86b671ffd472f8f64 Mon Sep 17 00:00:00 2001 From: Robert Hak Date: Tue, 13 Aug 2002 09:32:56 +0000 Subject: cleaned up git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1708 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/common/lcd-common.c | 139 ++-------------------------------------- uisimulator/common/lcd-common.h | 36 +---------- 2 files changed, 5 insertions(+), 170 deletions(-) diff --git a/uisimulator/common/lcd-common.c b/uisimulator/common/lcd-common.c index d55cd0baa8..52a98eec58 100644 --- a/uisimulator/common/lcd-common.c +++ b/uisimulator/common/lcd-common.c @@ -22,141 +22,10 @@ #include "lcd-common.h" -/*** Define our #includes ***/ -#ifdef WIN32 - #include - #include - #include "uisw32.h" -#else - /* X11 */ - #include - #include - #include - #include - #include - #include - #include - #include - - #include - #include - #include - - #include "screenhack.h" -#endif -/**** End #includes ****/ - - -/*** Start global variables ***/ -#ifdef WIN32 - -/* Simulate the target ui display */ -char bitmap[LCD_HEIGHT][LCD_WIDTH]; - -BITMAPINFO2 bmi = -{ - { sizeof (BITMAPINFOHEADER), - LCD_WIDTH, -LCD_HEIGHT, 1, 8, - BI_RGB, 0, 0, 0, 2, 2, }, - { - /* green background color */ - {UI_LCD_BGCOLOR, 0}, - /* black color */ - {UI_LCD_BLACK, 0} - } - -}; - -#else -extern Display *dpy; -unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8]; -#endif - -/* Both X11 and WIN32 use this */ -extern unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; - -/*** End Global variables ***/ - +#include "lcd.h" -/*** Externed functions ***/ -#ifndef WIN32 -extern void screen_resized(int width, int height); - -/* From uibasic.c */ -extern void drawdots(int color, XPoint *points, int count); -#endif - -/*** End Externed functions ***/ - - - -/*** Begin Functions ***/ -void lcd_update() -{ -#ifdef WIN32 - int x, y; - if(hGUIWnd == NULL) - _endthread (); - - for(x = 0; x < LCD_WIDTH; x++) - for(y = 0; y < LCD_HEIGHT; y++) - bitmap[y][x] = ((lcd_framebuffer[x][y/8] >> (y & 7)) & 1); - - InvalidateRect (hGUIWnd, NULL, FALSE); - - Sleep (50); +#ifdef WIN32 + #include "lcd-win32.h" #else - int x, y, bit; - int p=0, cp=0; - - XPoint points[LCD_WIDTH * LCD_HEIGHT]; - XPoint clearpoints[LCD_WIDTH * LCD_HEIGHT]; - - for(y=0; y