Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12607) remove SPRITE define from gui-gtk-2.0
Home

[Freeciv-Dev] (PR#12607) remove SPRITE define from gui-gtk-2.0

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12607) remove SPRITE define from gui-gtk-2.0
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Mar 2005 12:38:32 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12607 >

This patch removes the SPRITE definition, replacing it's users with a 
simple "struct Sprite".  It's search-and-replace (aside from the #define 
that I removed) but I fixed the style.

-jason

Index: client/gui-gtk-2.0/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v
retrieving revision 1.93
diff -u -r1.93 dialogs.c
--- client/gui-gtk-2.0/dialogs.c        21 Mar 2005 16:37:52 -0000      1.93
+++ client/gui-gtk-2.0/dialogs.c        23 Mar 2005 20:36:41 -0000
@@ -1642,7 +1642,7 @@
   /* Populate nation list store. */
   for (i = 0; i < game.playable_nation_count; i++) {
     struct nation_type *nation;
-    SPRITE *s;
+    struct Sprite *s;
     GdkPixbuf *img;
     GtkTreeIter it;
     GValue value = { 0, };
@@ -1753,7 +1753,7 @@
   /* Populate city style store. */
   for (i = 0; i < game.styles_count; i++) {
     GdkPixbuf *img;
-    SPRITE *s;
+    struct Sprite *s;
     GtkTreeIter it;
 
     if (city_styles[i].techreq != A_NONE) {
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.41
diff -u -r1.41 graphics.c
--- client/gui-gtk-2.0/graphics.c       23 Mar 2005 18:13:21 -0000      1.41
+++ client/gui-gtk-2.0/graphics.c       23 Mar 2005 20:36:42 -0000
@@ -41,8 +41,8 @@
 
 #include "graphics.h"
 
-SPRITE *               intro_gfx_sprite;
-SPRITE *               radar_gfx_sprite;
+struct Sprite *intro_gfx_sprite;
+struct Sprite *radar_gfx_sprite;
 
 GdkCursor *fc_cursors[CURSOR_LAST];
 
Index: client/gui-gtk-2.0/graphics.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/graphics.h,v
retrieving revision 1.15
diff -u -r1.15 graphics.h
--- client/gui-gtk-2.0/graphics.h       23 Mar 2005 18:13:21 -0000      1.15
+++ client/gui-gtk-2.0/graphics.h       23 Mar 2005 20:36:42 -0000
@@ -23,8 +23,8 @@
 
 void create_overlay_unit(struct canvas *pcanvas, int i);
 
-extern SPRITE *    intro_gfx_sprite;
-extern SPRITE *    radar_gfx_sprite;
+extern struct Sprite *intro_gfx_sprite;
+extern struct Sprite *radar_gfx_sprite;
 
 /* This name is to avoid a naming conflict with a global 'cursors'
  * variable in GTK+-2.6.  See PR#12459. */
Index: client/gui-gtk-2.0/gtkpixcomm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gtkpixcomm.c,v
retrieving revision 1.15
diff -u -r1.15 gtkpixcomm.c
--- client/gui-gtk-2.0/gtkpixcomm.c     23 Mar 2005 18:13:21 -0000      1.15
+++ client/gui-gtk-2.0/gtkpixcomm.c     23 Mar 2005 20:36:42 -0000
@@ -67,7 +67,7 @@
   GdkColor *color;
 
   /* OP_COPY */
-  SPRITE *src;
+  struct Sprite *src;
   gint x, y;
 };
 
@@ -187,8 +187,7 @@
   refresh(p);
 }
 
-void
-gtk_pixcomm_copyto(GtkPixcomm *p, SPRITE *src, gint x, gint y)
+void gtk_pixcomm_copyto(GtkPixcomm *p, struct Sprite *src, gint x, gint y)
 {
   struct op v;
 
Index: client/gui-gtk-2.0/gtkpixcomm.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gtkpixcomm.h,v
retrieving revision 1.5
diff -u -r1.5 gtkpixcomm.h
--- client/gui-gtk-2.0/gtkpixcomm.h     23 Mar 2005 18:13:21 -0000      1.5
+++ client/gui-gtk-2.0/gtkpixcomm.h     23 Mar 2005 20:36:42 -0000
@@ -65,8 +65,8 @@
 
 GType     gtk_pixcomm_get_type  (void) G_GNUC_CONST;
 GtkWidget *gtk_pixcomm_new      (gint width, gint height);
-void       gtk_pixcomm_copyto   (GtkPixcomm *pixcomm, SPRITE *src,
-                                 gint x, gint y);
+void gtk_pixcomm_copyto(GtkPixcomm *pixcomm, struct Sprite *src,
+                       gint x, gint y);
 void       gtk_pixcomm_clear    (GtkPixcomm *pixcomm);
 void      gtk_pixcomm_fill      (GtkPixcomm *pixcomm, GdkColor *color);
 
Index: client/gui-gtk-2.0/pages.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/pages.c,v
retrieving revision 1.20
diff -u -r1.20 pages.c
--- client/gui-gtk-2.0/pages.c  11 Mar 2005 17:11:26 -0000      1.20
+++ client/gui-gtk-2.0/pages.c  23 Mar 2005 20:36:43 -0000
@@ -1435,7 +1435,7 @@
 {
   int x0, y0, x1, y1, w, h;
   GdkPixbuf *im, *im2;
-  SPRITE *flag;
+  struct Sprite *flag;
 
   flag = load_sprite(tileset, flag_str);
 
Index: client/gui-gtk-2.0/plrdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/plrdlg.c,v
retrieving revision 1.51
diff -u -r1.51 plrdlg.c
--- client/gui-gtk-2.0/plrdlg.c 5 Feb 2005 17:56:35 -0000       1.51
+++ client/gui-gtk-2.0/plrdlg.c 23 Mar 2005 20:36:44 -0000
@@ -478,7 +478,7 @@
 {
   int x0, y0, x1, y1, w, h;
   GdkPixbuf *im, *im2;
-  SPRITE *flag;
+  struct Sprite *flag;
 
   flag = nation->flag_sprite;
 
Index: client/gui-gtk-2.0/sprite.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/sprite.h,v
retrieving revision 1.1
diff -u -r1.1 sprite.h
--- client/gui-gtk-2.0/sprite.h 23 Mar 2005 18:13:21 -0000      1.1
+++ client/gui-gtk-2.0/sprite.h 23 Mar 2005 20:36:44 -0000
@@ -32,8 +32,6 @@
   int       height;
 };
 
-typedef struct Sprite SPRITE;
-
 struct Sprite *ctor_sprite(GdkPixbuf *pixbuf);
 struct Sprite *sprite_scale(struct Sprite *src, int new_w, int new_h);
 void sprite_get_bounding_box(struct Sprite *sprite, int *start_x,
@@ -43,7 +41,7 @@
 /********************************************************************
   Note: a sprite cannot be changed after these functions are called!
 ********************************************************************/
-GdkPixbuf *sprite_get_pixbuf(SPRITE *sprite);
+GdkPixbuf *sprite_get_pixbuf(struct Sprite *sprite);
 GdkBitmap *sprite_get_mask(struct Sprite *sprite);
 
 #endif  /* FC__SPRITE_H */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12607) remove SPRITE define from gui-gtk-2.0, Jason Short <=