Skip to content

Commit

Permalink
Use the scaled tileset when computing city screen dimensions
Browse files Browse the repository at this point in the history
Closes #725.
  • Loading branch information
lmoureaux committed Nov 19, 2021
1 parent 7066a26 commit d8bd1d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/citydlg_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void generate_citydlg_dimensions()
{
float canvas_x, canvas_y;

map_to_gui_vector(get_tileset(), &canvas_x, &canvas_y,
CITY_ABS2REL(city_x), CITY_ABS2REL(city_y));
map_to_gui_vector(tileset, &canvas_x, &canvas_y, CITY_ABS2REL(city_x),
CITY_ABS2REL(city_y));

min_x = MIN(canvas_x, min_x);
max_x = MAX(canvas_x, max_x);
Expand All @@ -77,8 +77,8 @@ void generate_citydlg_dimensions()
}
city_map_iterate_without_index_end;

citydlg_map_width = max_x - min_x + tileset_tile_width(get_tileset());
citydlg_map_height = max_y - min_y + tileset_tile_height(get_tileset());
citydlg_map_width = max_x - min_x + tileset_tile_width(tileset);
citydlg_map_height = max_y - min_y + tileset_tile_height(tileset);
}

/**
Expand Down

0 comments on commit d8bd1d7

Please sign in to comment.