mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
screen ptr/size unification, major cleanups
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@644 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
8c2a366166
commit
e2de9939cd
17 changed files with 263 additions and 415 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "../common/plat.h"
|
||||
#include "../common/readpng.h"
|
||||
#include "../common/menu.h"
|
||||
#include "../common/emu.h"
|
||||
|
||||
|
||||
void plat_video_menu_enter(int is_rom_loaded)
|
||||
|
@ -11,18 +12,18 @@ void plat_video_menu_enter(int is_rom_loaded)
|
|||
if (is_rom_loaded)
|
||||
{
|
||||
// darken the active framebuffer
|
||||
memset(gp2x_screen, 0, 320*8*2);
|
||||
menu_darken_bg((char *)gp2x_screen + 320*8*2, 320*224, 1);
|
||||
memset((char *)gp2x_screen + 320*232*2, 0, 320*8*2);
|
||||
memset(g_screen_ptr, 0, 320*8*2);
|
||||
menu_darken_bg((char *)g_screen_ptr + 320*8*2, 320*224, 1);
|
||||
memset((char *)g_screen_ptr + 320*232*2, 0, 320*8*2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// should really only happen once, on startup..
|
||||
readpng(gp2x_screen, "skin/background.png", READPNG_BG);
|
||||
readpng(g_screen_ptr, "skin/background.png", READPNG_BG);
|
||||
}
|
||||
|
||||
// copy to buffer2
|
||||
gp2x_memcpy_buffers((1<<2), gp2x_screen, 0, 320*240*2);
|
||||
gp2x_memcpy_buffers((1<<2), g_screen_ptr, 0, 320*240*2);
|
||||
|
||||
// switch to 16bpp
|
||||
gp2x_video_changemode2(16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue