Fix a common SDL_Rect error:
when translating a rectangle, no need to change its width and height. i am not sure about the impact of the bug, maybe bigger for map with a lot of upper wood background. However our extra hex rounding compensated (at normal zoom level)
This commit is contained in:
parent
09a5d8278d
commit
cf94d506bf
1 changed files with 0 additions and 2 deletions
|
@ -257,8 +257,6 @@ void display::get_rect_hex_bounds(SDL_Rect rect, gamemap::location &topleft, gam
|
||||||
const SDL_Rect& map_rect = map_area();
|
const SDL_Rect& map_rect = map_area();
|
||||||
rect.x -= map_rect.x;
|
rect.x -= map_rect.x;
|
||||||
rect.y -= map_rect.y;
|
rect.y -= map_rect.y;
|
||||||
rect.w += map_rect.x;
|
|
||||||
rect.h += map_rect.y;
|
|
||||||
|
|
||||||
const int tile_width = hex_width();
|
const int tile_width = hex_width();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue