Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] (PR#2759) warning message while loading tech sprites
Home

[Freeciv-Dev] (PR#2759) warning message while loading tech sprites

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2759) warning message while loading tech sprites
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 28 Jan 2003 20:58:08 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Thu Jan 16 20:21:27 2003]:

> [rfalke - Wed Jan  8 09:20:19 2003]:
> 
> > 
> > I get this
> >   2: Don't have graphics tags  or  for tech_type None
> > for both trident and isotrident.
> 
> The attached patch fixes this by not trying to load a sprite for A_NONE.

This version also makes the sprites non-manditory.  This is the way it
"should" be, although this will break the SDL client.  Rafal - it should
be quit easy to check to see if the sprite exists before using it.

jason

? client/mapview_common.c-clip_mapview_window
? client/gui-gtk/diff
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.106
diff -u -r1.106 tilespec.c
--- client/tilespec.c   2003/01/21 20:25:30     1.106
+++ client/tilespec.c   2003/01/29 04:55:48
@@ -339,7 +339,7 @@
   impr_type_iterate(imp_id) {
     tilespec_setup_impr_type(imp_id);
   } impr_type_iterate_end;
-  for (id = 0; id < game.num_tech_types; id++) {
+  for (id = A_FIRST; id < game.num_tech_types; id++) {
     if (tech_exists(id)) {
       tilespec_setup_tech_type(id);
     }
@@ -990,7 +990,7 @@
 {
   advances[id].sprite = lookup_sprite_tag_alt(advances[id].graphic_str,
                                              advances[id].graphic_alt,
-                                             tech_exists(id), "tech_type",
+                                             FALSE, "tech_type",
                                              advances[id].name);
 
   /* should maybe do something if NULL, eg generic default? */

[Prev in Thread] Current Thread [Next in Thread]