Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13035) colors broken
Home

[Freeciv-Dev] (PR#13035) colors broken

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13035) colors broken
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 May 2005 16:43:03 -0700
Reply-to: bugs@xxxxxxxxxxx

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

The last colors patch broke the client.  COLOR_STD_BLACK is 0 which is
NULL which causes no type breakage (even though it'a an enum).

This patch fixes it.  I will commit immediately.

-jason

Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.77
diff -u -r1.77 citydlg_common.c
--- client/citydlg_common.c     7 May 2005 18:58:02 -0000       1.77
+++ client/citydlg_common.c     10 May 2005 23:41:45 -0000
@@ -173,7 +173,7 @@
                            struct canvas *pcanvas)
 {
   /* First make it all black. */
-  canvas_put_rectangle(pcanvas, COLOR_STD_BLACK, 0, 0,
+  canvas_put_rectangle(pcanvas, get_color(COLOR_STD_BLACK), 0, 0,
                       get_citydlg_canvas_width(),
                       get_citydlg_canvas_height());
 
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.234
diff -u -r1.234 mapview_common.c
--- client/mapview_common.c     10 May 2005 20:02:07 -0000      1.234
+++ client/mapview_common.c     10 May 2005 23:41:45 -0000
@@ -1152,7 +1152,7 @@
    *
    * Of course it's necessary to draw to the whole area to cover up any old
    * drawing that was done there. */
-  canvas_put_rectangle(mapview.store, COLOR_STD_BLACK,
+  canvas_put_rectangle(mapview.store, get_color(COLOR_STD_BLACK),
                       canvas_x, canvas_y, width, height);
 
   mapview_layer_iterate(layer) {
@@ -2277,8 +2277,8 @@
       canvas_free(mapview.tmp_store);
     }
     mapview.store = canvas_create(full_width, full_height);
-    canvas_put_rectangle(mapview.store, COLOR_STD_BLACK, 0, 0,
-                        full_width, full_height);
+    canvas_put_rectangle(mapview.store, get_color(COLOR_STD_BLACK),
+                        0, 0, full_width, full_height);
 
     mapview.tmp_store = canvas_create(full_width, full_height);
   }
@@ -2341,7 +2341,8 @@
   sprite = get_spaceship_sprite(t, SPACESHIP_HABITATION);
   get_sprite_dimensions(sprite, &w, &h);
 
-  canvas_put_rectangle(pcanvas, COLOR_STD_BLACK, 0, 0, w * 7, h * 7);
+  canvas_put_rectangle(pcanvas, get_color(COLOR_STD_BLACK),
+                      0, 0, w * 7, h * 7);
 
   for (i = 0; i < NUM_SS_MODULES; i++) {
     const int j = i / 3;
Index: client/reqtree.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/reqtree.c,v
retrieving revision 1.4
diff -u -r1.4 reqtree.c
--- client/reqtree.c    10 May 2005 20:02:07 -0000      1.4
+++ client/reqtree.c    10 May 2005 23:41:46 -0000
@@ -802,7 +802,8 @@
        canvas_put_text(pcanvas,
                        startx + (width - text_w) / 2,
                        starty + (height - text_h) / 2,
-                       FONT_REQTREE_TEXT, COLOR_STD_BLACK, text);
+                       FONT_REQTREE_TEXT, get_color(COLOR_STD_BLACK),
+                       text);
       }
 
       /* Draw all outgoing edges */
@@ -814,7 +815,7 @@
        endx = dest_node->node_x;
        endy = dest_node->node_y + dest_node->node_height / 2;
 
-       canvas_put_line(pcanvas, COLOR_STD_BLACK, LINE_NORMAL,
+       canvas_put_line(pcanvas, get_color(COLOR_STD_BLACK), LINE_NORMAL,
                        startx, starty, endx - startx, endy - starty);
       }
     }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13035) colors broken, Jason Short <=