[Freeciv-Dev] (PR#12392) encapsulate fogstyle value
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12392 >
This is the last and simplest patch to encapsulate top-level tileset
data. The fogstyle value and enum is simply moved into tilespec.c from
tilespec.h. The one user in mapview_common.c is removed (since
ADD_SPRITE in tilespec.c already takes care of this check).
No doubt this conflicts with other recent tileset patches. But I
figured this was the last of the bunch so there's no reason to wait.
-jason
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.199
diff -u -r1.199 mapview_common.c
--- client/mapview_common.c 28 Feb 2005 04:01:52 -0000 1.199
+++ client/mapview_common.c 1 Mar 2005 08:01:38 -0000
@@ -982,8 +982,8 @@
struct drawn_sprite tile_sprs[80];
int count = fill_sprite_array(tile_sprs, layer, ptile, pedge, pcorner,
punit, pcity, citymode);
- bool fog = (ptile && tile_get_known(ptile) == TILE_KNOWN_FOGGED
- && draw_fog_of_war && fogstyle == FOG_AUTO);
+ bool fog = (ptile && draw_fog_of_war
+ && tile_get_known(ptile) == TILE_KNOWN_FOGGED);
/*** Draw terrain and specials ***/
put_drawn_sprites(pcanvas, canvas_x, canvas_y, count, tile_sprs, fog);
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.248
diff -u -r1.248 tilespec.c
--- client/tilespec.c 28 Feb 2005 20:24:38 -0000 1.248
+++ client/tilespec.c 1 Mar 2005 08:01:38 -0000
@@ -85,7 +85,14 @@
int num_tiles_explode_unit=0;
static int roadstyle;
-enum fog_style fogstyle;
+
+/* Don't reorder this enum since tilesets depend on it. */
+enum fog_style {
+ FOG_AUTO, /* Fog is automatically appended by the code. */
+ FOG_SPRITE, /* A single fog sprite is provided by the tileset (tx.fog). */
+ FOG_NONE /* No fog. */
+};
+static enum fog_style fogstyle;
static int flag_offset_x, flag_offset_y;
static int unit_offset_x, unit_offset_y;
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.112
diff -u -r1.112 tilespec.h
--- client/tilespec.h 28 Feb 2005 20:24:38 -0000 1.112
+++ client/tilespec.h 1 Mar 2005 08:01:39 -0000
@@ -344,14 +344,6 @@
extern struct named_sprites sprites;
-/* Don't reorder this enum since tilesets depend on it. */
-enum fog_style {
- FOG_AUTO, /* Fog is automatically appended by the code. */
- FOG_SPRITE, /* A single fog sprite is provided by the tileset (tx.fog). */
- FOG_NONE /* No fog. */
-};
-extern enum fog_style fogstyle;
-
struct Sprite *get_citizen_sprite(struct citizen_type type,
int citizen_index,
const struct city *pcity);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12392) encapsulate fogstyle value,
Jason Short <=
|
|