Fix the Tilemap mode : When grid was visible, the copied tiles were erasing the grid. Now the grid is refreshed as needed.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1929 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
145c9545e7
commit
7d6d3ad875
24
src/graph.c
24
src/graph.c
@ -183,8 +183,28 @@ void Update_part_of_screen(short x, short y, short width, short height)
|
|||||||
r.w=effective_w;
|
r.w=effective_w;
|
||||||
SDL_FillRect(Screen_SDL,&r,3);*/
|
SDL_FillRect(Screen_SDL,&r,3);*/
|
||||||
|
|
||||||
Redraw_grid(effective_X,effective_Y,effective_w,effective_h);
|
// When the grid is displayed in Tilemap mode, this tests if
|
||||||
Update_rect(effective_X,effective_Y,effective_w,effective_h);
|
// one edge of the grid has been touched :
|
||||||
|
// In this case, the whole magnified area requires a refreshed grid.
|
||||||
|
// This could be optimized further, but at the moment this seemed
|
||||||
|
// fast enough.
|
||||||
|
if (Show_grid && Main_tilemap_mode && (
|
||||||
|
x/Snap_width <(x+width )/Snap_width ||
|
||||||
|
y/Snap_height<(y+height)/Snap_height))
|
||||||
|
{
|
||||||
|
short w,h;
|
||||||
|
|
||||||
|
w=Min(Screen_width-Main_X_zoom, (Main_image_width-Main_magnifier_offset_X)*Main_magnifier_factor);
|
||||||
|
h=Min(Menu_Y, (Main_image_height-Main_magnifier_offset_Y)*Main_magnifier_factor);
|
||||||
|
|
||||||
|
Redraw_grid(Main_X_zoom,0,w,h);
|
||||||
|
Update_rect(Main_X_zoom,0,w,h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Redraw_grid(effective_X,effective_Y,effective_w,effective_h);
|
||||||
|
Update_rect(effective_X,effective_Y,effective_w,effective_h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user