for (i = 0; i < _curr_repo->max_zoom; i++) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mapman_info->chk_zoom_levels[i]))) {
guint start_tilex, start_tiley, end_tilex, end_tiley;
- start_tilex = unit2ztile(start_unitx, i);
- start_tiley = unit2ztile(start_unity, i);
- end_tilex = unit2ztile(end_unitx, i);
- end_tiley = unit2ztile(end_unity, i);
+ start_tilex = gtk_map_unit2ztile(start_unitx, i);
+ start_tiley = gtk_map_unit2ztile(start_unity, i);
+ end_tilex = gtk_map_unit2ztile(end_unitx, i);
+ end_tiley = gtk_map_unit2ztile(end_unity, i);
num_maps += (end_tilex - start_tilex + 1) * (end_tiley - start_tiley + 1);
}
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mapman_info->chk_zoom_levels[i]))) {
guint start_tilex, start_tiley, end_tilex, end_tiley;
guint tilex, tiley;
- start_tilex = unit2ztile(start_unitx, i);
- start_tiley = unit2ztile(start_unity, i);
- end_tilex = unit2ztile(end_unitx, i);
- end_tiley = unit2ztile(end_unity, i);
+ start_tilex = gtk_map_unit2ztile(start_unitx, i);
+ start_tiley = gtk_map_unit2ztile(start_unity, i);
+ end_tilex = gtk_map_unit2ztile(end_unitx, i);
+ end_tiley = gtk_map_unit2ztile(end_unity, i);
for (tiley = start_tiley; tiley <= end_tiley; tiley++)
for (tilex = start_tilex; tilex <= end_tilex; tilex++)
for (curr = path->head - 1; curr++ != path->tail;) {
if (curr->unity) {
- guint tilex = unit2ztile(curr->unitx, i);
- guint tiley = unit2ztile(curr->unity, i);
+ guint tilex = gtk_map_unit2ztile(curr->unitx, i);
+ guint tiley = gtk_map_unit2ztile(curr->unity, i);
if (tilex != prev_tilex || tiley != prev_tiley) {
if (prev_tiley)
num_maps += (abs((gint) tilex - prev_tilex) + 1) * (abs((gint) tiley - prev_tiley) + 1) - 1;
for (curr = path->head - 1; curr++ != path->tail;) {
if (curr->unity) {
- guint tilex = unit2ztile(curr->unitx, i);
- guint tiley = unit2ztile(curr->unity, i);
+ guint tilex = gtk_map_unit2ztile(curr->unitx, i);
+ guint tiley = gtk_map_unit2ztile(curr->unity, i);
if (tilex != prev_tilex || tiley != prev_tiley) {
guint minx, miny, maxx, maxy, x, y;
if (prev_tiley != 0) {