From 3e496e3ecf60db743cfe82e57b82b72764e20f39 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 20 Feb 2006 00:31:10 +0000 Subject: Reworked player simulator icons to fit the changed charcell scale factor and look more like the actual icons. Adapted player sim display sizes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8745 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/common/lcd-playersim.c | 8 +- uisimulator/common/sim_icons.c | 379 ++++++++++++------------------------- 2 files changed, 122 insertions(+), 265 deletions(-) (limited to 'uisimulator/common') diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c index 156f83e639..0e10acf437 100644 --- a/uisimulator/common/lcd-playersim.c +++ b/uisimulator/common/lcd-playersim.c @@ -34,9 +34,9 @@ #define CHAR_WIDTH 6 #define CHAR_HEIGHT 8 -#define ICON_HEIGHT 24 +#define ICON_HEIGHT 12 #define CHAR_PIXEL 2 -#define BORDER_MARGIN 2 +#define BORDER_MARGIN 1 static int double_height=1; extern bool lcd_display_redraw; @@ -47,13 +47,13 @@ extern unsigned char hardware_buffer_lcd[11][2]; void lcd_print_icon(int x, int icon_line, bool enable, char **icon) { int xpos = x; - int ypos = icon_line*(ICON_HEIGHT+CHAR_HEIGHT*2*4); + int ypos = icon_line*(ICON_HEIGHT+(CHAR_HEIGHT*2+2)*CHAR_PIXEL); int row=0, col; int p=0, cp=0; struct coordinate points[LCD_WIDTH * LCD_HEIGHT]; struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; - + while (icon[row]) { col=0; while (icon[row][col]) { diff --git a/uisimulator/common/sim_icons.c b/uisimulator/common/sim_icons.c index cb0aad0809..bd81e11fbf 100644 --- a/uisimulator/common/sim_icons.c +++ b/uisimulator/common/sim_icons.c @@ -31,90 +31,51 @@ extern void lcd_print_icon(int x, int icon_line, bool enable, char **icon); static char* icon_battery_bit[]= { - "------", - "------", - "------", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "******", - "------", - "------", - "------", + "-----", + " ", + "*****", + "*****", + "*****", + "*****", + "*****", + "*****", + " ", + "-----", NULL }; static char* icon_battery[]= { - " ********************************** ", - "*..................................* ", - "*..................................* ", - "*..................................* ", - "*..................................* ", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................*****", - "*..................................* ", - "*..................................* ", - "*..................................* ", - "*..................................* ", - " ********************************** ", + "********************* ", + "* * ", + "* * ", + "* ***", + "* * *", + "* * *", + "* ***", + "* * ", + "* * ", + "********************* ", NULL }; static char* icon_volume[]= { - " ", - " ", - " ", - " ", - " ", - " ", - "* * * ", - "* * * ", - " * * * ", - " * * * ", - " * * * ", - " * * * ", - " * * * ", - " * * ** * ", - " * * * * * ", - " * * * * * ", - " * * * * * ", - " * * * * * ", - " * ** * ", + " ", + " ", + " ", + " ", + "* * * ", + "* * * ", + " * * *** * ", + " * * * * * ", + " * * * * ", + " * *** * ", NULL }; static char* icon_volume_1[]= { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", " ", " ", " ", @@ -122,6 +83,9 @@ static char* icon_volume_1[]= "**", "**", "**", + "**", + "**", + "**", NULL }; @@ -130,16 +94,7 @@ static char* icon_volume_2[]= " ", " ", " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", + "**", "**", "**", "**", @@ -151,14 +106,6 @@ static char* icon_volume_2[]= static char* icon_volume_3[]= { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", " ", " ", "**", @@ -169,22 +116,12 @@ static char* icon_volume_3[]= "**", "**", "**", - "**", NULL }; static char* icon_volume_4[]= { " ", - " ", - " ", - " ", - " ", - " ", - " ", - "**", - "**", - "**", "**", "**", "**", @@ -199,15 +136,6 @@ static char* icon_volume_4[]= static char* icon_volume_5[]= { - " ", - " ", - " ", - " ", - "**", - "**", - "**", - "**", - "**", "**", "**", "**", @@ -223,174 +151,112 @@ static char* icon_volume_5[]= static char* icon_pause[]= { - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", - "**** ****", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", + " **** **** ", NULL }; static char* icon_play[]= { - "** ", - "**** ", - "****** ", - "******** ", - "********** ", - "************ ", - "************** ", - "**************** ", - "****************** ", - "******************** ", - "****************** ", - "**************** ", - "************** ", - "************ ", - "********** ", - "******** ", - "****** ", - "**** ", - "** ", + "** ", + "***** ", + "******* ", + "********* ", + "*********** ", + "********* ", + "******* ", + "***** ", + "** ", + " ", NULL }; static char* icon_record[]= { - " ", - " ", - " ", - " ", - " *** ", - " ********* ", - " ************* ", - " *************** ", - "*****************", - "*****************", - "*****************", - " *************** ", - " ************* ", - " ********* ", - " *** ", - " ", - " ", - " ", - " ", + " *** ", + " ***** ", + " ******* ", + " ********* ", + " ********* ", + " ********* ", + " ******* ", + " ***** ", + " *** ", + " ", NULL }; static char* icon_usb[]= { - " ", - " ", - " ************************** ", - " ** **** ", - " ** ", - " ** ", - " ** ", - " ** ", - " ** ", - " **** ** **** ", - "***************************************************", - " **** ** **** ", - " ** ", - " ** ", - " ** ", - " ** ", - " *** *** ", - " ***************** ", - " ", + " ********* ", + " ** ** ", + " * ", + " ** * ** ", + "***********************", + " ** * ** ", + " * ", + " ** ** ", + " ******** ", + " ** ", NULL }; static char* icon_audio[]= { - " ************************************** ", - " ****************************************** ", - " ** ** ", - " ** ** ", - " ** **** ** ** ****** ** **** ** ", - "** ****** ** ** ******* ** ****** **", - "** ** ** ** ** ** ** ** ** ** **", - "** ** ** ** ** ** ** ** ** ** **", - "** ** ** ** ** ** ** ** ** ** **", - "** ** ** ** ** ** ** ** ** ** **", - "** ******** ** ** ** ** ** ** ** **", - "** ******** ** ** ** ** ** ** ** **", - "** ** ** ** ** ** ** ** ** ** **", - "** ** ** ****** ******* ** ****** **", - " ** ** ** **** ****** ** **** ** ", - " ** ** ", - " ** ** ", - " ****************************************** ", - " ************************************** ", + " *************************** ", + " ** ** ", + "* ** * * **** * *** *", + "* * * * * * * * * * *", + "* * * * * * * * * * *", + "* ****** * * * * * * * *", + "* * * * * * * * * * *", + "* * * *** **** * *** *", + " ** ** ", + " *************************** ", NULL }; static char* icon_param[]= { - " ********************************************** ", - " ************************************************** ", - " ** ** ", - " ** ** ", - " ** ******* **** ******* ***** ** ** ** ", - "** ******** ****** ******** ******* ** ** **", - "** ** ** ** ** ** ** ** ** *** *** **", - "** ** ** ** ** ** ** ** ** *** *** **", - "** ** ** ** ** ** ** ** ** **** **** **", - "** ** ** ** ** ** ** ** ** ** **** ** **", - "** ******** ******** ******** ******** ** **** ** **", - "** ******* ******** ******* ******** ** ** ** **", - "** ** ** ** ** *** ** ** ** ** **", - "** ** ** ** ** *** ** ** ** ** **", - " ** ** ** ** ** *** ** ** ** ** ** ", - " ** ** ", - " ** ** ", - " ************************************************** ", - " ********************************************** ", + " ********************************* ", + " ** ** ", + "* **** ** **** ** ** ** *", + "* * * * * * * * * ** ** *", + "* * * * * * * * * * * * * *", + "* **** ****** **** ****** * * * * *", + "* * * * * * * * * * * *", + "* * * * * * * * * * * *", + " ** ** ", + " ********************************* ", NULL }; static char* icon_repeat[]= { - " ************************* ", - " *************************** ", - " *** ", - " ** ", - " ** ", - " ** ", - " ** ", - "** ", - "** ", - "** ", - "** ", - "** ", - " ** ** ", - " ** **** ", - " ** ****** ", - " ** ******** ", - " *** ********** ", - " ***************************** ", - " *****************************", + " ", + " *************", + " * ", + " * ", + "* ", + "* ", + "* ** ", + " * **** ", + " * ****** ", + " *************", NULL }; static char* icon_repeat2[]= { + " ", " *", " **", "***", @@ -400,16 +266,6 @@ static char* icon_repeat2[]= " *", " *", " *", - " *", - " *", - " *", - " *", - " *", - " *", - " *", - " *", - " *", - " *", NULL }; @@ -421,30 +277,31 @@ struct icon_info int row; }; -#define ICON_VOLUME_POS 224 -#define ICON_VOLUME_SIZE 20 +#define ICON_VOLUME_POS 102 +#define ICON_VOLUME_SIZE 14 #define ICON_VOLUME_X_SIZE 2 static struct icon_info icons [] = { + {icon_battery, 0, 0}, - {icon_battery_bit, 5, 0}, - {icon_battery_bit, 15, 0}, - {icon_battery_bit, 25, 0}, + {icon_battery_bit, 2, 0}, + {icon_battery_bit, 8, 0}, + {icon_battery_bit, 14, 0}, {icon_usb, 0, 1}, - {icon_play, 55, 0}, - {icon_record, 75, 0}, - {icon_pause, 100, 0}, - {icon_audio, 90, 1}, - {icon_repeat, 170, 0}, - {icon_repeat2, 170+35+4, 0}, + {icon_play, 36, 0}, + {icon_record, 48, 0}, + {icon_pause, 60, 0}, + {icon_audio, 37, 1}, + {icon_repeat, 74, 0}, + {icon_repeat2, 94, 0}, {icon_volume, ICON_VOLUME_POS, 0}, {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0}, {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0}, {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0}, {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0}, {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0}, - {icon_param, 170, 1} + {icon_param, 90, 1} }; void -- cgit v1.2.3