some skin adjustments

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@226 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-08-25 10:59:00 +00:00
parent a12e011623
commit a4f0cc8647
8 changed files with 40 additions and 20 deletions

View file

@ -212,7 +212,7 @@ endif
rel: PicoDrive.gpe code940/pico940.bin ../readme.txt config.txt PicoDrive.man.txt PicoDrive.png
zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o
zip -9 PicoDrive_$(VER).zip skin
zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt
code940/code940.bin:
make -C code940/

View file

@ -45,7 +45,7 @@ static int menu_sel_color = -1; // disabled
char menuErrorMsg[40] = {0, };
static void menu_darken_bg(void *dst, int pixels);
static void menu_darken_bg(void *dst, int pixels, int darker);
static void menu_prepare_bg(int use_game_bg);
// draws text to current bbp16 screen
@ -562,14 +562,13 @@ static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)
start = 12 - sel;
n--; // exclude current dir (".")
if (rom_data)
gp2x_pd_clone_buffer2();
else {
memset(gp2x_screen, 0, 320*240*2);
memset((char *)gp2x_screen + 320*120*2, 0xff, 320*8*2);
gp2x_pd_clone_buffer2();
if (rom_data == NULL) {
menu_darken_bg(gp2x_screen, 320*240, 0);
}
menu_darken_bg((char *)gp2x_screen + 320*120*2, 320*8);
menu_darken_bg((char *)gp2x_screen + 320*120*2, 320*8, 0);
if(start - 2 >= 0)
smalltext_out16_lim(14, (start - 2)*10, curdir, 0xffff, 53-2);
@ -1754,7 +1753,7 @@ static void draw_menu_credits(void)
text_out16(tl_x, (y+=10), "Dzz: ARM940 sample");
text_out16(tl_x, (y+=10), "GnoStiC / Puck2099: USB joystick");
text_out16(tl_x, (y+=10), "craigix: GP2X hardware");
text_out16(tl_x, (y+=10), "ketch: skin design");
text_out16(tl_x, (y+=10), "ketchupgun: skin design");
menu_flip();
}
@ -1918,15 +1917,25 @@ static void menu_loop_root(void)
}
}
static void menu_darken_bg(void *dst, int pixels)
static void menu_darken_bg(void *dst, int pixels, int darker)
{
unsigned int *screen = dst;
pixels /= 2;
while (pixels--)
if (darker)
{
unsigned int p = *screen;
*screen = ((p&0xf79ef79e)>>1) - ((p&0xc618c618)>>3);
screen++;
while (pixels--)
{
unsigned int p = *screen;
*screen++ = ((p&0xf79ef79e)>>1) - ((p&0xc618c618)>>3);
}
}
else
{
while (pixels--)
{
unsigned int p = *screen;
*screen++ = (p&0xf79ef79e)>>1;
}
}
}
@ -1936,7 +1945,7 @@ static void menu_prepare_bg(int use_game_bg)
{
// darken the active framebuffer
memset(gp2x_screen, 0, 320*8*2);
menu_darken_bg((char *)gp2x_screen + 320*8*2, 320*224);
menu_darken_bg((char *)gp2x_screen + 320*8*2, 320*224, 1);
memset((char *)gp2x_screen + 320*232*2, 0, 320*8*2);
}
else

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
platform/gp2x/skin/font.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,8 @@
The skin images can be customized, but there are several limitations:
background.png - must be 320x240 image with 24bit RGB colors.
font.png - must be 128x160 8bit grayscale image.
selector.png - must be 8x10 8bit grayscale image.
Font and selector colors can be changed by editing skin.txt.

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

View file

@ -0,0 +1,4 @@
// html-style hex color codes, ex. ff0000 is red, 0000ff is blue, etc.
text_color=ffffff
selection_color=c00000

View file

@ -209,8 +209,11 @@ GP2X:
* Dzz for his ARM940 sample code.
* GnoStiC & Puck2099 for USB joystick support.
* Hermes PS2R, god_at_hell for the CpuCtrl library.
* A_SN for his gamma code.
* craigix for supplying the GP2X hardware and making this port possible.
* Alex for the icon.
* ketchupgun for the skin.
* All the people from gp32x boards for their support.
Symbian:
* Peter van Sebille for his various open-source Symbian projects to learn from.
@ -244,7 +247,7 @@ Changelog
* Changed key configuration behaviour to the one from gpfce (should be more
intuitive).
+ Added some skinning capabilities to the menu system with default skin by
ketch. Delete skin directory if you want old behaviour.
ketchupgun. Delete skin directory if you want old behaviour.
1.32
+ Added some new scaling options.