win32: fix tile viewer lcdc mode which broke due to changed memory mapping
This commit is contained in:
parent
444c3a0b0a
commit
300a8b996d
|
@ -79,7 +79,11 @@ LRESULT TileViewBox_Direct(HWND hwnd, tileview_struct * win, WPARAM wParam, LPAR
|
||||||
|
|
||||||
FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH));
|
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)
|
if(mem)
|
||||||
SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);
|
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;
|
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)
|
if(mem)
|
||||||
{
|
{
|
||||||
for(num2 = 0; num2<32; ++num2)
|
for(num2 = 0; num2<32; ++num2)
|
||||||
|
@ -203,7 +211,12 @@ LRESULT TileViewBox_Pal16(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARA
|
||||||
|
|
||||||
if(win->pal)
|
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)
|
if(mem)
|
||||||
{
|
{
|
||||||
u32 num2, num, y, x;
|
u32 num2, num, y, x;
|
||||||
|
|
Loading…
Reference in New Issue