Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] (PR#3783) support for pixel_border bigger that 1
Home

[Freeciv-Dev] (PR#3783) support for pixel_border bigger that 1

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3783) support for pixel_border bigger that 1
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Mon, 24 Mar 2003 09:58:37 -0800
Reply-to: rt@xxxxxxxxxxxxxx

hi

Some time ago I try 128x64 tileset theme. Simple way to get such 
grapchics is resize exist tilesets x 2 but problem is that pixel 
borders are resize too. I haven to edit those graphics or add support 
for that bigger pixel border. ( I prefered secound )

method is easy :
is_pixel_border = 0 - no pixel border
is_pixel_border = 1 - pixel border exist ( 1 pixel )
is_pixel_border = 2 - pixel border exist ( 2 pixels )
...

Rafal

----------------------------------------------------------------------
Kochasz pilke nozna? Zagraj i wygraj! >>> http://link.interia.pl/f16fa 

diff -u -r ../store/freeciv/client/tilespec.c fc2/client/tilespec.c
--- ../store/freeciv/client/tilespec.c  Mon Mar 24 15:43:13 2003
+++ fc2/client/tilespec.c       Mon Mar 24 18:45:01 2003
@@ -467,8 +467,8 @@
   for (i = 0; i < num_grids; i++) {
     int j, k;
     int x_top_left, y_top_left, dx, dy;
-    bool is_pixel_border =
-      secfile_lookup_bool_default(file, FALSE,
+    int is_pixel_border =
+      secfile_lookup_int_default(file, 0,
                                  "%s.is_pixel_border", gridnames[i]);
     x_top_left = secfile_lookup_int(file, "%s.x_top_left", gridnames[i]);
     y_top_left = secfile_lookup_int(file, "%s.y_top_left", gridnames[i]);
@@ -491,8 +491,10 @@
       /* there must be at least 1 because of the while(): */
       assert(num_tags > 0);
 
-      x1 = x_top_left + column * dx + (is_pixel_border ? column : 0);
-      y1 = y_top_left + row * dy + (is_pixel_border ? row : 0);
+      x1 = x_top_left + column * dx +
+               (is_pixel_border ? column * is_pixel_border : 0);
+      y1 = y_top_left + row * dy +
+               (is_pixel_border ? row * is_pixel_border : 0);
 
       ss->ref_count = 0;
       ss->x = x1;

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