some skin adjustments

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@226 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-08-25 10:59:00 +00:00
parent 13059a606f
commit f9a37a0225
2 changed files with 24 additions and 15 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);
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;
if (darker)
{
while (pixels--)
{
unsigned int p = *screen;
*screen = ((p&0xf79ef79e)>>1) - ((p&0xc618c618)>>3);
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