win32: fix tile viewer lcdc mode which broke due to changed memory mapping

This commit is contained in:
zeromus 2009-05-06 04:49:58 +00:00
parent 444c3a0b0a
commit 300a8b996d
1 changed files with 16 additions and 3 deletions

View File

@ -79,7 +79,11 @@ LRESULT TileViewBox_Direct(HWND hwnd, tileview_struct * win, WPARAM wParam, LPAR
FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH));
u8* mem = MMU_RenderMapToLCD(win->target);
u8* mem;
if(win->target >= ARM9MEM_LCDC)
mem = ARM9Mem.ARM9_LCD + win->target - ARM9MEM_LCDC;
else
mem = MMU_RenderMapToLCD(win->target);
if(mem)
SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);
@ -136,7 +140,11 @@ LRESULT TileViewBox_Pal256(HWND hwnd, tileview_struct * win, WPARAM wParam, LPAR
{
u32 i, num2, num, y, x;
u8* mem = MMU_RenderMapToLCD(win->target);
u8* mem;
if(win->target >= ARM9MEM_LCDC)
mem = ARM9Mem.ARM9_LCD + win->target - ARM9MEM_LCDC;
else
mem = MMU_RenderMapToLCD(win->target);
if(mem)
{
for(num2 = 0; num2<32; ++num2)
@ -203,7 +211,12 @@ LRESULT TileViewBox_Pal16(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARA
if(win->pal)
{
u8* mem = MMU_RenderMapToLCD(win->target);
u8* mem;
if(win->target >= ARM9MEM_LCDC)
mem = ARM9Mem.ARM9_LCD + win->target - ARM9MEM_LCDC;
else
mem = MMU_RenderMapToLCD(win->target);
if(mem)
{
u32 num2, num, y, x;