diff options
| author | Markus Braun <markus.braun@krawel.de> | 2002-08-07 10:35:26 +0000 |
|---|---|---|
| committer | Markus Braun <markus.braun@krawel.de> | 2002-08-07 10:35:26 +0000 |
| commit | de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9 (patch) | |
| tree | 5cc60884b43b291f3878527413c4d7f21f210624 /uisimulator | |
| parent | 999e2127af292ffac2d36dcb54b78a2f1abce6bf (diff) | |
| download | rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.zip rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.tar.gz rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.tar.bz2 rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.tar.xz | |
Added status bar to file browser and wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
| -rw-r--r-- | uisimulator/win32/Makefile | 5 | ||||
| -rw-r--r-- | uisimulator/win32/lcd-win32.c | 4 | ||||
| -rw-r--r-- | uisimulator/x11/Makefile | 5 | ||||
| -rw-r--r-- | uisimulator/x11/lcd-x11.c | 16 |
4 files changed, 18 insertions, 12 deletions
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index 3a84a2d..4cdcef3 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile @@ -68,7 +68,7 @@ APPS = main.c tree.c menu.c credits.c main_menu.c\ MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) - APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c + APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c widgets.c endif SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \ @@ -116,6 +116,9 @@ $(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c $(OBJDIR)/icons.o: $(RECDIR)/icons.c $(CC) $(APPCFLAGS) -c $< -o $@ +$(OBJDIR)/widgets.o: $(RECDIR)/widgets.c + $(CC) $(APPCFLAGS) -c $< -o $@ + $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c $(CC) $(APPCFLAGS) -c $< -o $@ diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c index 510117e..102e262 100644 --- a/uisimulator/win32/lcd-win32.c +++ b/uisimulator/win32/lcd-win32.c @@ -27,7 +27,7 @@ // // varaibles -unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display +unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; // the display char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display BITMAPINFO2 bmi = @@ -54,7 +54,7 @@ void lcd_update() for (x = 0; x < LCD_WIDTH; x++) for (y = 0; y < LCD_HEIGHT; y++) - bitmap[y][x] = ((display[x][y/8] >> (y & 7)) & 1); + bitmap[y][x] = ((lcd_framebuffer[x][y/8] >> (y & 7)) & 1); InvalidateRect (hGUIWnd, NULL, FALSE); diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 3d40303..e327a1c 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile @@ -81,7 +81,7 @@ APPS = main.c tree.c menu.c credits.c main_menu.c\ MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) - APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c + APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c widgets.c endif SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ @@ -167,6 +167,9 @@ $(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c $(OBJDIR)/icons.o: $(RECDIR)/icons.c $(CC) $(APPCFLAGS) -c $< -o $@ +$(OBJDIR)/widgets.o: $(RECDIR)/widgets.c + $(CC) $(APPCFLAGS) -c $< -o $@ + $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c $(CC) $(APPCFLAGS) -c $< -o $@ diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c index 96ce800..e1d1953 100644 --- a/uisimulator/x11/lcd-x11.c +++ b/uisimulator/x11/lcd-x11.c @@ -38,11 +38,11 @@ #include "lcd-x11.h" -extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; +extern unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; extern void screen_resized(int width, int height); extern Display *dpy; -unsigned char display_copy[LCD_WIDTH][LCD_HEIGHT/8]; +unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8]; /* this is in uibasic.c */ extern void drawdots(int color, XPoint *points, int count); @@ -61,10 +61,10 @@ void lcd_update (void) for(y=0; y<LCD_HEIGHT; y+=8) { for(x=0; x<LCD_WIDTH; x++) { - if(display[x][y/8]) { + if(lcd_framebuffer[x][y/8]) { /* one or more bits/pixels are set */ for(bit=0; bit<8; bit++) { - if(display[x][y/8]&(1<<bit)) { + if(lcd_framebuffer[x][y/8]&(1<<bit)) { points[p].x = x + MARGIN_X; points[p].y = y+bit + MARGIN_Y; p++; /* increase the point counter */ @@ -76,13 +76,13 @@ void lcd_update (void) #else for(y=0; y<LCD_HEIGHT; y+=8) { for(x=0; x<LCD_WIDTH; x++) { - if(display[x][y/8] || display_copy[x][y/8]) { + if(lcd_framebuffer[x][y/8] || lcd_framebuffer_copy[x][y/8]) { /* one or more bits/pixels are changed */ unsigned char diff = - display[x][y/8] ^ display_copy[x][y/8]; + lcd_framebuffer[x][y/8] ^ lcd_framebuffer_copy[x][y/8]; for(bit=0; bit<8; bit++) { - if(display[x][y/8]&(1<<bit)) { + if(lcd_framebuffer[x][y/8]&(1<<bit)) { /* set a dot */ points[p].x = x + MARGIN_X; points[p].y = y+bit + MARGIN_Y; @@ -100,7 +100,7 @@ void lcd_update (void) } /* copy a huge block */ - memcpy(display_copy, display, sizeof(display)); + memcpy(lcd_framebuffer_copy, lcd_framebuffer, sizeof(lcd_framebuffer)); #endif |