Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] (PR#3759) remove references to XPM
Home

[Freeciv-Dev] (PR#3759) remove references to XPM

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3759) remove references to XPM
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Mar 2003 02:51:17 -0800
Reply-to: rt@xxxxxxxxxxxxxx

This patch removes all remaining code references to XPM.  In the process
I have rewritten a comment that claimed it needed rewriting.

There are also XPM references in configure.in and configure.ac, but
those are more complicated.

jason

? client/annotate
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.39
diff -u -r1.39 tilespec.h
--- client/tilespec.h   2003/03/18 06:24:18     1.39
+++ client/tilespec.h   2003/03/21 10:50:13
@@ -214,32 +214,27 @@
 extern char *main_intro_filename;
 extern char *minimap_intro_filename;
 
-/* NOTE: The following comments are out of date and need to
- *       be revised!  -- dwp
+/* These variables contain the size of the tiles used within the game.
  *
- * These variables contain thee size of the tiles used within the game.
- * Tiles for the units and city squares, etc, are usually 30x30.
- * Tiles for things like food production, etc, are usually 15x20.  We
- * say "usually" for two reasons:  
+ * "normal" tiles include most mapview graphics, particularly the basic
+ * terrain graphics.
  *
- * First, it is feasible to replace the tiles in the .xpm files with
- * ones of some other size.  Mitch Davis (mjd@xxxxxxxxxxxxxxxx) has
- * done this, and replaced all the tiles with the ones from the
- * original Civ.  The tiles from the original civ are 32x32.  All that
- * is required is that these constants be changed.
+ * "unit" tiles are those used for drawing units.  In iso view these are
+ * larger than normal tiles to mimic a 3D effect.
  *
- * Second, although there is currently no "zoom" feature as in the
- * original Civ, we might add it some time in the future.  If and when
- * this happens, we'll have to stop using the constants, and go back
- * to using ints which change at runtime.  Note, this would require
- * quite a bit of memory and pixmap management work, so it seems like
- * a nasty task.
+ * "small" tiles are used for extra "theme" graphics, particularly sprites
+ * for citizens, governments, and other panel indicator icons.
  *
- * BUG: pjunold informs me that there are hard-coded geometries in
- * the Freeciv.h file which will prevent ideal displaying of pixmaps
- * which are not of the original 30x30 size.  Also, the pixcomm widget
- * apparently also does not handle this well.  Truthfully, I hadn't
- * noticed at all! :-) (mjd)
+ * Various parts of the code may make additional assumptions, including:
+ *   - in non-iso view:
+ *     - NORMAL_TILE_WIDTH == NORMAL_TILE_HEIGHT
+ *     - UNIT_TILE_WIDTH == NORMAL_TILE_WIDTH
+ *     - UNIT_TILE_HEIGHT == NORMAL_TILE_HEIGHT
+ *   - in iso-view:
+ *     - NORMAL_TILE_WIDTH == 2 * NORMAL_TILE_HEIGHT
+ *     - UNIT_TILE_WIDTH == NORMAL_TILE_WIDTH
+ *     - UNIT_TILE_HEIGHT == NORMAL_TILE_HEIGHT * 3 / 2
+ *     - NORMAL_TILE_WIDTH and NORMAL_TILE_HEIGHT are even
  */
 
 extern int NORMAL_TILE_WIDTH;
Index: client/gui-gtk/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/graphics.c,v
retrieving revision 1.48
diff -u -r1.48 graphics.c
--- client/gui-gtk/graphics.c   2003/01/29 05:10:49     1.48
+++ client/gui-gtk/graphics.c   2003/03/21 10:50:13
@@ -311,7 +311,7 @@
   int           w, h;
 
   if(!(im=gdk_imlib_load_image((char*)filename))) {
-    freelog(LOG_FATAL, "Failed reading XPM file: %s", filename);
+    freelog(LOG_FATAL, "Failed reading graphics file: %s", filename);
     exit(EXIT_FAILURE);
   }
 
Index: client/gui-gtk-2.0/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/graphics.c,v
retrieving revision 1.13
diff -u -r1.13 graphics.c
--- client/gui-gtk-2.0/graphics.c       2003/02/26 23:49:49     1.13
+++ client/gui-gtk-2.0/graphics.c       2003/03/21 10:50:14
@@ -308,7 +308,7 @@
   int       w, h;
 
   if (!(im = gdk_pixbuf_new_from_file(filename, NULL))) {
-    freelog(LOG_FATAL, "Failed reading XPM file: %s", filename);
+    freelog(LOG_FATAL, "Failed reading graphics file: %s", filename);
     exit(EXIT_FAILURE);
   }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#3759) remove references to XPM, Jason Short <=