Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#11080) FOW BUG
Home

[Freeciv-Dev] Re: (PR#11080) FOW BUG

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Watershape@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#11080) FOW BUG
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Nov 2004 15:01:08 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11080 >

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=11080 >
> 
> Try out this patch.
> 
> This is just a stab in the dark.

Here's another stab in the dark.

Apply the attached patch (patch -p0 < isofog.diff), and drop the .png 
file into data/isotrident/.  Then rebuild (with "make").

jason

? diff
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.81.2.10
diff -u -r1.81.2.10 gui_main.c
--- client/gui-gtk-2.0/gui_main.c       14 Nov 2004 16:48:21 -0000      
1.81.2.10
+++ client/gui-gtk-2.0/gui_main.c       19 Nov 2004 22:59:52 -0000
@@ -103,7 +103,7 @@
 GdkGC *thin_line_gc;
 GdkGC *thick_line_gc;
 GdkGC *border_line_gc;
-GdkPixmap *gray50, *gray25, *black50;
+GdkPixmap *gray50, *gray25;
 GdkPixmap *mask_bitmap;
 
 GtkWidget *main_frame_civ_name;
@@ -1126,11 +1126,13 @@
   {
     unsigned char d1[] = {0x03, 0x0c, 0x03, 0x0c};
     unsigned char d2[] = {0x08, 0x02, 0x08, 0x02};
+#if 0
+    /* This used to be used for fog. */
     unsigned char d3[] = {0xAA, 0x55, 0xAA, 0x55};
+#endif
 
     gray50 = gdk_bitmap_create_from_data(root_window, d1, 4, 4);
     gray25 = gdk_bitmap_create_from_data(root_window, d2, 4, 4);
-    black50 = gdk_bitmap_create_from_data(root_window, d3, 4, 4);
   }
 
   {
Index: client/gui-gtk-2.0/gui_main.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.h,v
retrieving revision 1.14.2.3
diff -u -r1.14.2.3 gui_main.h
--- client/gui-gtk-2.0/gui_main.h       8 Nov 2004 00:18:03 -0000       1.14.2.3
+++ client/gui-gtk-2.0/gui_main.h       19 Nov 2004 22:59:52 -0000
@@ -54,7 +54,6 @@
 extern GdkGC *          border_line_gc;
 extern GdkPixmap *      gray50;
 extern GdkPixmap *      gray25;
-extern GdkPixmap *      black50;
 extern GdkPixmap *      mask_bitmap;
 #define single_tile_pixmap (mapview_canvas.single_tile->pixmap)
 extern GtkTextView *   main_message_area;
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.142.2.5
diff -u -r1.142.2.5 mapview.c
--- client/gui-gtk-2.0/mapview.c        1 Nov 2004 03:40:44 -0000       
1.142.2.5
+++ client/gui-gtk-2.0/mapview.c        19 Nov 2004 22:59:53 -0000
@@ -816,7 +816,7 @@
   gdk_gc_set_clip_origin(fill_tile_gc, canvas_x, canvas_y);
   gdk_gc_set_clip_mask(fill_tile_gc, psprite->mask);
   gdk_gc_set_foreground(fill_tile_gc, colors_standard[COLOR_STD_BLACK]);
-  gdk_gc_set_stipple(fill_tile_gc, black50);
+  gdk_gc_set_stipple(fill_tile_gc, sprites.tx.fog->mask);
   gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
 
   gdk_draw_rectangle(pcanvas->v.pixmap, fill_tile_gc, TRUE,
@@ -888,7 +888,7 @@
     gdk_gc_set_clip_mask(fill_tile_gc, ssprite->mask);
     gdk_gc_set_foreground(fill_tile_gc, colors_standard[COLOR_STD_BLACK]);
     gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
-    gdk_gc_set_stipple(fill_tile_gc, black50);
+    gdk_gc_set_stipple(fill_tile_gc, sprites.tx.fog->mask);
 
     gdk_draw_rectangle(pixmap, fill_tile_gc, TRUE,
                       canvas_x, canvas_y, ssprite->width, ssprite->height);
Index: data/isotrident/terrain1.png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/terrain1.png,v
retrieving revision 1.3
diff -u -r1.3 terrain1.png
Binary files /tmp/cvsCb9Dye and terrain1.png differ
Index: data/isotrident/terrain1.spec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident/terrain1.spec,v
retrieving revision 1.6
diff -u -r1.6 terrain1.spec
--- data/isotrident/terrain1.spec       4 Oct 2004 19:39:20 -0000       1.6
+++ data/isotrident/terrain1.spec       19 Nov 2004 22:59:54 -0000
@@ -132,7 +132,7 @@
 tiles = { "row", "column","tag"
   0, 0, "t.dither_tile"
   0, 0, "tx.darkness"
-  0, 1, "tx.fog"
+  0, 2, "tx.fog"
   0, 2, "t.black_tile"
   0, 2, "t.unknown1"
   0, 3, "t.ocean1"
Index: data/trident/tiles.png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident/tiles.png,v
retrieving revision 1.5
diff -u -r1.5 tiles.png
Binary files /tmp/cvsJGTeaY and tiles.png differ

PNG image


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