Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8574) merge fill_tile_sprite_array[_iso]
Home

[Freeciv-Dev] Re: (PR#8574) merge fill_tile_sprite_array[_iso]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8574) merge fill_tile_sprite_array[_iso]
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Apr 2004 07:43:28 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8574 >

Jason Short wrote:
> fill_tile_sprite_array and fill_tile_sprite_array_iso should be merged.

Here's an updated patch.  This one should be ready to be applied.

jason

? crash
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.106
diff -u -r1.106 mapview_common.c
--- client/mapview_common.c     24 Apr 2004 17:20:17 -0000      1.106
+++ client/mapview_common.c     25 Apr 2004 14:42:02 -0000
@@ -1001,8 +1001,8 @@
   bool is_real = normalize_map_pos(&map_x, &map_y);
 
   if (is_real && tile_get_known(map_x, map_y)) {
-    int count = fill_tile_sprite_array(tile_sprs, map_x, map_y, citymode,
-                                      &solid_bg, &bg_color);
+    int count = fill_tile_sprite_array(tile_sprs, &solid_bg, &bg_color,
+                                      map_x, map_y, citymode);
     int i = 0;
 
     if (solid_bg) {
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.162
diff -u -r1.162 tilespec.c
--- client/tilespec.c   25 Apr 2004 14:23:50 -0000      1.162
+++ client/tilespec.c   25 Apr 2004 14:42:02 -0000
@@ -1446,62 +1446,6 @@
 #define ADD_SPRITE_SIMPLE(s) ADD_SPRITE(s, DRAW_NORMAL, TRUE, 0, 0)
 #define ADD_SPRITE_FULL(s) ADD_SPRITE(s, DRAW_FULL, TRUE, 0, 0)
 
-/**********************************************************************
-  Fill in the sprite array for the city
-***********************************************************************/
-static int fill_city_sprite_array(struct drawn_sprite *sprs,
-                                 struct city *pcity, bool *solid_bg)
-{
-  struct drawn_sprite *save_sprs = sprs;
-
-  *solid_bg = FALSE;
-
-  if (!solid_color_behind_units) {
-    ADD_SPRITE(get_city_nation_flag_sprite(pcity), DRAW_FULL, TRUE,
-              flag_offset_x, flag_offset_y);
-  } else {
-    *solid_bg = TRUE;
-  }
-
-  if (pcity->client.occupied) {
-    ADD_SPRITE_SIMPLE(get_city_occupied_sprite(pcity));
-  }
-
-  ADD_SPRITE_SIMPLE(get_city_sprite(pcity));
-
-  if (city_got_citywalls(pcity)) {
-    ADD_SPRITE_SIMPLE(get_city_wall_sprite(pcity));
-  }
-
-  if (map_has_special(pcity->x, pcity->y, S_POLLUTION)) {
-    ADD_SPRITE_SIMPLE(sprites.tx.pollution);
-  }
-  if (map_has_special(pcity->x, pcity->y, S_FALLOUT)) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fallout);
-  }
-
-  if (pcity->client.unhappy) {
-    ADD_SPRITE_SIMPLE(sprites.city.disorder);
-  }
-
-  if (tile_get_known(pcity->x, pcity->y) == TILE_KNOWN_FOGGED
-      && draw_fog_of_war) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fog);
-  }
-
-  /* Put the size sprites last, so that they are not obscured
-   * (and because they can be hard to read if fogged).
-   */
-  if (pcity->size >= 10) {
-    assert(pcity->size < 100);
-    ADD_SPRITE_SIMPLE(sprites.city.size_tens[pcity->size / 10]);
-  }
-
-  ADD_SPRITE_SIMPLE(sprites.city.size[pcity->size % 10]);
-
-  return sprs - save_sprs;
-}
-
 /**************************************************************************
   Assemble some data that is used in building the tile sprite arrays.
     (map_x, map_y) : the (normalized) map position
@@ -2146,70 +2090,89 @@
  4) mine
  5) huts
 ***********************************************************************/
-int fill_tile_sprite_array_iso(struct drawn_sprite *sprs,
-                              int x, int y, bool citymode,
-                              bool *solid_bg, enum color_std *bg_color)
+int fill_tile_sprite_array(struct drawn_sprite *sprs,
+                          bool *solid_bg, enum color_std *bg_color,
+                          int map_x, int map_y, bool citymode)
 {
   enum tile_terrain_type ttype, ttype_near[8];
   enum tile_special_type tspecial, tspecial_near[8];
   int tileno, dir;
-  struct tile *ptile = map_get_tile(x, y);
+  struct tile *ptile = map_get_tile(map_x, map_y);
   struct city *pcity = ptile->city;
-  struct unit *punit = get_drawable_unit(x, y, citymode);
+  struct unit *punit = get_drawable_unit(map_x, map_y, citymode);
   struct unit *pfocus = get_unit_in_focus();
   struct drawn_sprite *save_sprs = sprs;
+  bool unit_only = FALSE, city_only = FALSE;
 
-  *solid_bg = FALSE;
-
-  if (tile_get_known(x, y) == TILE_UNKNOWN)
-    return -1;
+  if (tile_get_known(map_x, map_y) == TILE_UNKNOWN) {
+    *solid_bg = TRUE;
+    *bg_color = COLOR_STD_BLACK;
+    return 0;
+  }
 
-  build_tile_data(x, y, &ttype, &tspecial, ttype_near, tspecial_near);
+  /* Set up background color. */
+  *solid_bg = FALSE;
+  if (solid_color_behind_units) {
+    if (punit && (draw_units || (draw_focus_unit && pfocus == punit))) {
+      *solid_bg = unit_only = TRUE;
+      *bg_color = player_color(unit_owner(punit));
+    } else if (pcity && draw_cities) {
+      *solid_bg = city_only = TRUE;
+      *bg_color = player_color(city_owner(pcity));
+    }
+  } else if (!draw_terrain) {
+    *solid_bg = TRUE;
+    *bg_color = COLOR_STD_BACKGROUND;
+  }
 
-  sprs += fill_terrain_sprite_array(sprs, x, y, ttype_near);
+  build_tile_data(map_x, map_y,
+                 &ttype, &tspecial, ttype_near, tspecial_near);
 
-  if (is_ocean(ttype) && draw_terrain) {
-    for (dir = 0; dir < 4; dir++) {
-      if (contains_special(tspecial_near[DIR4_TO_DIR8[dir]], S_RIVER)) {
-       ADD_SPRITE_SIMPLE(sprites.tx.river_outlet[dir]);
+  /* Terrain and specials. */
+  if (!unit_only && !city_only) {
+    sprs += fill_terrain_sprite_array(sprs, map_x, map_y, ttype_near);
+
+    if (is_ocean(ttype) && draw_terrain) {
+      for (dir = 0; dir < 4; dir++) {
+       if (contains_special(tspecial_near[DIR4_TO_DIR8[dir]], S_RIVER)) {
+         ADD_SPRITE_SIMPLE(sprites.tx.river_outlet[dir]);
+       }
       }
     }
-  }
 
-  sprs += fill_irrigation_sprite_array(sprs, tspecial, tspecial_near,
-                                          pcity);
+    sprs += fill_irrigation_sprite_array(sprs, tspecial, tspecial_near,
+                                        pcity);
 
-  if (draw_terrain) {
-    /* Draw rivers on top of irrigation. */
-    if (contains_special(tspecial, S_RIVER)) {
-      tileno = INDEX_NSEW(contains_special(tspecial_near[DIR8_NORTH], S_RIVER)
-                         || is_ocean(ttype_near[DIR8_NORTH]),
-                         contains_special(tspecial_near[DIR8_SOUTH], S_RIVER)
-                         || is_ocean(ttype_near[DIR8_SOUTH]),
-                         contains_special(tspecial_near[DIR8_EAST], S_RIVER)
-                         || is_ocean(ttype_near[DIR8_EAST]),
-                         contains_special(tspecial_near[DIR8_WEST], S_RIVER)
-                         || is_ocean(ttype_near[DIR8_WEST]));
+    if (draw_terrain && contains_special(tspecial, S_RIVER)) {
+      /* Draw rivers on top of irrigation. */
+      tileno = INDEX_NSEW((contains_special(tspecial_near[DIR8_NORTH],
+                                           S_RIVER)
+                          || is_ocean(ttype_near[DIR8_NORTH])),
+                         (contains_special(tspecial_near[DIR8_SOUTH],
+                                           S_RIVER)
+                          || is_ocean(ttype_near[DIR8_SOUTH])),
+                         (contains_special(tspecial_near[DIR8_EAST],
+                                           S_RIVER)
+                          || is_ocean(ttype_near[DIR8_EAST])),
+                         (contains_special(tspecial_near[DIR8_WEST],
+                                           S_RIVER)
+                          || is_ocean(ttype_near[DIR8_WEST])));
       ADD_SPRITE_SIMPLE(sprites.tx.spec_river[tileno]);
     }
-  } else {
-    *solid_bg = TRUE;
-    *bg_color = COLOR_STD_BACKGROUND;
-  }
   
-  sprs += fill_road_rail_sprite_array(sprs,
-                                     tspecial, tspecial_near, pcity);
+    sprs += fill_road_rail_sprite_array(sprs,
+                                       tspecial, tspecial_near, pcity);
 
-  if (draw_specials) {
-    if (contains_special(tspecial, S_SPECIAL_1)) {
-      ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
-    } else if (contains_special(tspecial, S_SPECIAL_2)) {
-      ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
+    if (draw_specials) {
+      if (contains_special(tspecial, S_SPECIAL_1)) {
+       ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
+      } else if (contains_special(tspecial, S_SPECIAL_2)) {
+       ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
+      }
     }
-  }
 
-  if (!is_ocean(ttype)) {
-    if (contains_special(tspecial, S_FORTRESS) && draw_fortress_airbase) {
+    if (draw_fortress_airbase && contains_special(tspecial, S_FORTRESS)
+       && sprites.tx.fortress_back) {
       ADD_SPRITE_SIMPLE(sprites.tx.fortress_back);
     }
 
@@ -2218,40 +2181,57 @@
       ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->mine);
     }
     
-    if (contains_special(tspecial, S_HUT) && draw_specials) {
+    if (draw_specials && contains_special(tspecial, S_HUT)) {
       ADD_SPRITE_SIMPLE(sprites.tx.village);
     }
   }
 
-  /* Add grid. */
-  sprs->type = DRAWN_GRID;
-  sprs++;
-
-  if (pcity && draw_cities) {
-    ADD_SPRITE(get_city_nation_flag_sprite(pcity),
-              DRAW_FULL, TRUE, flag_offset_x, flag_offset_y);
+  if (is_isometric) {
+    /* Add grid.  In classic view this is done later. */
+    sprs->type = DRAWN_GRID;
+    sprs++;
+  }
+
+  /* City.  Some city sprites are drawn later. */
+  if (pcity && draw_cities && !unit_only) {
+    if (!solid_color_behind_units) {
+      ADD_SPRITE(get_city_nation_flag_sprite(pcity),
+                DRAW_FULL, TRUE, flag_offset_x, flag_offset_y);
+    }
     if (pcity->client.occupied) {
       ADD_SPRITE_FULL(get_city_occupied_sprite(pcity));
     }
     ADD_SPRITE_FULL(get_city_sprite(pcity));
+    if (!is_isometric && city_got_citywalls(pcity)) {
+      /* In iso-view the city wall is a part of the city sprite. */
+      ADD_SPRITE_SIMPLE(get_city_wall_sprite(pcity));
+    }
     if (pcity->client.unhappy) {
       ADD_SPRITE_FULL(sprites.city.disorder);
     }
   }
 
-  if (draw_fortress_airbase && contains_special(tspecial, S_AIRBASE)) {
-    ADD_SPRITE_FULL(sprites.tx.airbase);
-  }
+  if (!unit_only && !city_only) {
+    if (draw_fortress_airbase && contains_special(tspecial, S_AIRBASE)) {
+      ADD_SPRITE_FULL(sprites.tx.airbase);
+    }
 
-  if (draw_pollution && contains_special(tspecial, S_POLLUTION)) {
-    ADD_SPRITE_SIMPLE(sprites.tx.pollution);
+    if (draw_pollution && contains_special(tspecial, S_POLLUTION)) {
+      ADD_SPRITE_SIMPLE(sprites.tx.pollution);
+    }
+    if (draw_pollution && contains_special(tspecial, S_FALLOUT)) {
+      ADD_SPRITE_SIMPLE(sprites.tx.fallout);
+    }
   }
-  if (draw_pollution && contains_special(tspecial, S_FALLOUT)) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fallout);
+
+  if (!is_isometric && draw_fog_of_war
+      && tile_get_known(map_x, map_y) == TILE_KNOWN_FOGGED) {
+    /* Fogging in non-iso is done this way. */
+    ADD_SPRITE_SIMPLE(sprites.tx.fog);
   }
 
   /* City size.  Drawing this under fog makes it hard to read. */
-  if (pcity && draw_cities) {
+  if (pcity && draw_cities && !unit_only) {
     if (pcity->size >= 10) {
       ADD_SPRITE(sprites.city.size_tens[pcity->size / 10], DRAW_FULL,
                 FALSE, 0, 0);
@@ -2260,169 +2240,26 @@
               FALSE, 0, 0);
   }
 
-  if (punit && (draw_units || (punit == pfocus && draw_focus_unit))) {
-    bool stacked = (unit_list_size(&map_get_tile(x, y)->units) > 1);
-    bool backdrop = !pcity;
-
-    sprs += fill_unit_sprite_array(sprs, punit, solid_bg, stacked, backdrop);
-  }
-
-  if (draw_fortress_airbase && contains_special(tspecial, S_FORTRESS)) {
-    ADD_SPRITE_FULL(sprites.tx.fortress);
-  }
-
-  return sprs - save_sprs;
-}
-
-/**********************************************************************
-  Fill in the sprite array for the tile at position (abs_x0,abs_y0)
-
-The sprites are drawn in the following order:
- 1) basic terrain type
- 2) river
- 3) irritation
- 4) road/railroad
- 5) specials
- 6) mine
- 7) hut
- 8) fortress
- 9) airbase
-10) pollution
-11) fallout
-12) FoW
-***********************************************************************/
-int fill_tile_sprite_array(struct drawn_sprite *sprs, int abs_x0, int abs_y0,
-                          bool citymode, bool *solid_bg,
-                          enum color_std *bg_color)
-{
-  enum tile_terrain_type ttype, ttype_near[8];
-  enum tile_special_type tspecial, tspecial_near[8];
-  int dir, tileno;
-  struct tile *ptile;
-  struct city *pcity;
-  struct unit *pfocus;
-  struct unit *punit;
-  struct drawn_sprite *save_sprs = sprs;
-
-  *solid_bg = FALSE;
-  *bg_color = COLOR_STD_BACKGROUND;
-
-  ptile=map_get_tile(abs_x0, abs_y0);
-
-  if (tile_get_known(abs_x0, abs_y0) == TILE_UNKNOWN) {
-    return 0;
-  }
-
-  pcity=map_get_city(abs_x0, abs_y0);
-  pfocus=get_unit_in_focus();
-
-  if (solid_color_behind_units) {
-    punit = get_drawable_unit(abs_x0, abs_y0, citymode);
-    if (punit && (draw_units || (draw_focus_unit && pfocus == punit))) {
-      bool stacked = (unit_list_size(&ptile->units) > 1);
-
-      sprs += fill_unit_sprite_array(sprs, punit, solid_bg,
-                                    stacked, TRUE);
-
-      *bg_color = player_color(unit_owner(punit));
-      return sprs - save_sprs;
-    }
-
-    if (pcity && draw_cities) {
-      sprs += fill_city_sprite_array(sprs, pcity, solid_bg);
-      *bg_color = player_color(city_owner(pcity));
-      return sprs - save_sprs;
-    }
-  }
-
-  build_tile_data(abs_x0, abs_y0, 
-                 &ttype, &tspecial, ttype_near, tspecial_near);
-
-  sprs += fill_terrain_sprite_array(sprs, abs_x0, abs_y0, ttype_near);
-
-  if (!draw_terrain) {
-    *solid_bg = TRUE;
-  }
-
-  if (is_ocean(ttype) && draw_terrain) {
-    for (dir = 0; dir < 4; dir++) {
-      if (contains_special(tspecial_near[DIR4_TO_DIR8[dir]], S_RIVER)) {
-       ADD_SPRITE_SIMPLE(sprites.tx.river_outlet[dir]);
-      }
-    }
-  }
-
-  if (contains_special(tspecial, S_RIVER) && draw_terrain) {
-    tileno = INDEX_NSEW(contains_special(tspecial_near[DIR8_NORTH], S_RIVER)
-                       || is_ocean(ttype_near[DIR8_NORTH]),
-                       contains_special(tspecial_near[DIR8_SOUTH], S_RIVER)
-                       || is_ocean(ttype_near[DIR8_SOUTH]),
-                       contains_special(tspecial_near[DIR8_EAST], S_RIVER)
-                       || is_ocean(ttype_near[DIR8_EAST]),
-                       contains_special(tspecial_near[DIR8_WEST], S_RIVER)
-                       || is_ocean(ttype_near[DIR8_WEST]));
-    ADD_SPRITE_SIMPLE(sprites.tx.spec_river[tileno]);
-  }
-
-  sprs += fill_irrigation_sprite_array(sprs, tspecial, tspecial_near, pcity);
-  sprs += fill_road_rail_sprite_array(sprs, tspecial, tspecial_near, pcity);
-
-  if(draw_specials) {
-    if (contains_special(tspecial, S_SPECIAL_1))
-      ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[0]);
-    else if (contains_special(tspecial, S_SPECIAL_2))
-      ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->special[1]);
-  }
-
-  if (draw_mines && contains_special(tspecial, S_MINE)
-      && sprites.terrain[ttype]->mine) {
-    ADD_SPRITE_SIMPLE(sprites.terrain[ttype]->mine);
-  }
-
-  if(contains_special(tspecial, S_HUT) && draw_specials) {
-    ADD_SPRITE_SIMPLE(sprites.tx.village);
-  }
-  if(contains_special(tspecial, S_FORTRESS) && draw_fortress_airbase) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fortress);
-  }
-  if(contains_special(tspecial, S_AIRBASE) && draw_fortress_airbase) {
-    ADD_SPRITE_SIMPLE(sprites.tx.airbase);
-  }
-  if(contains_special(tspecial, S_POLLUTION) && draw_pollution) {
-    ADD_SPRITE_SIMPLE(sprites.tx.pollution);
-  }
-  if(contains_special(tspecial, S_FALLOUT) && draw_pollution) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fallout);
-  }
-  if(tile_get_known(abs_x0,abs_y0) == TILE_KNOWN_FOGGED && draw_fog_of_war) {
-    ADD_SPRITE_SIMPLE(sprites.tx.fog);
-  }
-
-  if (pcity && draw_cities) {
+  if (punit && !city_only
+      && (draw_units || (punit == pfocus && draw_focus_unit))) {
+    bool stacked = (unit_list_size(&map_get_tile(map_x, map_y)->units) > 1);
+    bool backdrop = !pcity && !unit_only;
     bool dummy;
 
-    sprs += fill_city_sprite_array(sprs, pcity, &dummy);
+    sprs += fill_unit_sprite_array(sprs, punit, &dummy, stacked, backdrop);
   }
 
-  punit = find_visible_unit(ptile);
-  if (punit) {
-    if (!citymode || punit->owner != game.player_idx) {
-      if ((!focus_unit_hidden || pfocus != punit) &&
-         (draw_units || (draw_focus_unit && !focus_unit_hidden
-                         && punit == pfocus))) {
-       bool dummy;
-       bool stacked = (unit_list_size(&ptile->units) > 1);
-       bool backdrop = !pcity;
-
-       sprs += fill_unit_sprite_array(sprs, punit, &dummy,
-                                      stacked, backdrop);
-      }
+  if (!unit_only && !city_only) {
+    if (draw_fortress_airbase && contains_special(tspecial, S_FORTRESS)) {
+      ADD_SPRITE_FULL(sprites.tx.fortress);
     }
   }
 
-  /* Add grid. */
-  sprs->type = DRAWN_GRID;
-  sprs++;
+  if (!is_isometric) {
+    /* Add grid.  In iso-view this is done earlier. */
+    sprs->type = DRAWN_GRID;
+    sprs++;
+  }
 
   return sprs - save_sprs;
 }
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.63
diff -u -r1.63 tilespec.h
--- client/tilespec.h   25 Apr 2004 14:23:50 -0000      1.63
+++ client/tilespec.h   25 Apr 2004 14:42:02 -0000
@@ -66,16 +66,11 @@
 
 /* Gfx support */
 
-int fill_tile_sprite_array_iso(struct drawn_sprite *sprs,
-                              int x, int y, bool citymode,
-                              bool *solid_bg, enum color_std *bg_color);
-int fill_tile_sprite_array(struct drawn_sprite *sprs, int abs_x0, int abs_y0,
-                          bool citymode, bool *solid_bg,
-                          enum color_std *bg_color);
+int fill_tile_sprite_array(struct drawn_sprite *sprs,
+                          bool *solid_bg, enum color_std *bg_color,
+                          int map_x, int map_y, bool citymode);
 int fill_unit_sprite_array(struct drawn_sprite *sprs, struct unit *punit,
                           bool *solid_bg, bool stack, bool backdrop);
-int fill_city_sprite_array_iso(struct drawn_sprite *sprs,
-                              struct city *pcity);
 
 enum color_std player_color(struct player *pplayer);
 enum color_std overview_tile_color(int x, int y);
Index: client/gui-gtk/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v
retrieving revision 1.217
diff -u -r1.217 mapview.c
--- client/gui-gtk/mapview.c    25 Apr 2004 14:23:50 -0000      1.217
+++ client/gui-gtk/mapview.c    25 Apr 2004 14:42:02 -0000
@@ -974,8 +974,8 @@
   if (!width || !(height || height_unit))
     return;
 
-  count = fill_tile_sprite_array_iso(tile_sprs,
-                                    x, y, citymode, &solid_bg, &bg_color);
+  count = fill_tile_sprite_array(tile_sprs, &solid_bg, &bg_color,
+                                x, y, citymode);
 
   if (count == -1) { /* tile is unknown */
     pixmap_put_black_tile_iso(pm, canvas_x, canvas_y,
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.122
diff -u -r1.122 mapview.c
--- client/gui-gtk-2.0/mapview.c        25 Apr 2004 14:23:50 -0000      1.122
+++ client/gui-gtk-2.0/mapview.c        25 Apr 2004 14:42:03 -0000
@@ -1032,8 +1032,8 @@
   if (!width || !(height || height_unit))
     return;
 
-  count = fill_tile_sprite_array_iso(tile_sprs,
-                                    x, y, citymode, &solid_bg, &bg_color);
+  count = fill_tile_sprite_array(tile_sprs, &solid_bg, &bg_color,
+                                x, y, citymode);
 
   if (count == -1) { /* tile is unknown */
     pixmap_put_black_tile_iso(pm, canvas_x, canvas_y,
Index: client/gui-win32/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/mapview.c,v
retrieving revision 1.114
diff -u -r1.114 mapview.c
--- client/gui-win32/mapview.c  25 Apr 2004 14:23:51 -0000      1.114
+++ client/gui-win32/mapview.c  25 Apr 2004 14:42:03 -0000
@@ -923,8 +923,8 @@
   if (!width || !(height || height_unit))
     return;
 
-  count = fill_tile_sprite_array_iso(tile_sprs, x, y, citymode,
-                                    &solid_bg, &bg_color);
+  count = fill_tile_sprite_array(tile_sprs, &solid_bg, &bg_color,
+                                x, y, citymode);
 
   if (count == -1) { /* tile is unknown */
     pixmap_put_black_tile_iso(hdc, canvas_x, canvas_y,

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#8574) merge fill_tile_sprite_array[_iso], Jason Short <=