Author: cazfi
Date: Sun May 10 21:38:15 2015
New Revision: 29040

URL: http://svn.gna.org/viewcvs/freeciv?rev=29040&view=rev
Log:
Added occupied_offset_[x|y] fields to tilespec format.

See patch #6069

Modified:
    branches/S2_6/client/tilespec.c
    branches/S2_6/data/alio.tilespec
    branches/S2_6/data/amplio.tilespec
    branches/S2_6/data/amplio2.tilespec
    branches/S2_6/data/cimpletoon.tilespec
    branches/S2_6/data/hex2t.tilespec
    branches/S2_6/data/hexemplio.tilespec
    branches/S2_6/data/isophex.tilespec
    branches/S2_6/data/isotrident.tilespec
    branches/S2_6/data/toonhex.tilespec
    branches/S2_6/data/trident.tilespec
    branches/S2_6/doc/README.graphics

Modified: branches/S2_6/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/tilespec.c?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/client/tilespec.c     (original)
+++ branches/S2_6/client/tilespec.c     Sun May 10 21:38:15 2015
@@ -482,6 +482,8 @@
   int tilelabel_offset_y;
   int activity_offset_x;
   int activity_offset_y;
+  int occupied_offset_x;
+  int occupied_offset_y;
 
 #define NUM_CORNER_DIRS 4
 #define TILES_PER_CORNER 4
@@ -1716,6 +1718,10 @@
                              "tilespec.citybar_offset_y")
       || !secfile_lookup_int(file, &t->tilelabel_offset_y,
                              "tilespec.tilelabel_offset_y")
+      || !secfile_lookup_int(file, &t->occupied_offset_x,
+                             "tilespec.occupied_offset_x")
+      || !secfile_lookup_int(file, &t->occupied_offset_y,
+                             "tilespec.occupied_offset_y")
       || !secfile_lookup_int(file, &t->city_names_font_size,
                              "tilespec.city_names_font_size")
       || !secfile_lookup_int(file, &t->city_productions_font_size,
@@ -5165,7 +5171,9 @@
         }
       }
       if (!options.draw_full_citybar && pcity->client.occupied) {
-       ADD_SPRITE_FULL(get_city_sprite(t->sprites.city.occupied, pcity));
+       ADD_SPRITE(get_city_sprite(t->sprites.city.occupied, pcity), TRUE,
+                   FULL_TILE_X_OFFSET + t->occupied_offset_x,
+                   FULL_TILE_Y_OFFSET + t->occupied_offset_y);
       }
       if (t->type == TS_OVERHEAD && pcity->client.walls > 0) {
         struct city_sprite *cspr = t->sprites.city.wall[pcity->client.walls - 
1];

Modified: branches/S2_6/data/alio.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alio.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/alio.tilespec    (original)
+++ branches/S2_6/data/alio.tilespec    Sun May 10 21:38:15 2015
@@ -39,6 +39,10 @@
 unit_flag_offset_y = 39
 city_flag_offset_x = 42
 city_flag_offset_y = 10
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 40
+occupied_offset_y = 1
 
 ; offset the units by this amount
 unit_offset_x = 34

Modified: branches/S2_6/data/amplio.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/amplio.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/amplio.tilespec  (original)
+++ branches/S2_6/data/amplio.tilespec  Sun May 10 21:38:15 2015
@@ -32,6 +32,10 @@
 unit_flag_offset_y = 16
 city_flag_offset_x = 2
 city_flag_offset_y = 9
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset the units by this amount
 unit_offset_x = 19

Modified: branches/S2_6/data/amplio2.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/amplio2.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/amplio2.tilespec (original)
+++ branches/S2_6/data/amplio2.tilespec Sun May 10 21:38:15 2015
@@ -32,6 +32,10 @@
 unit_flag_offset_y = 16
 city_flag_offset_x = 2
 city_flag_offset_y = 9
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset the units by this amount
 unit_offset_x = 19

Modified: branches/S2_6/data/cimpletoon.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/cimpletoon.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/cimpletoon.tilespec      (original)
+++ branches/S2_6/data/cimpletoon.tilespec      Sun May 10 21:38:15 2015
@@ -32,6 +32,10 @@
 unit_flag_offset_y = 16
 city_flag_offset_x = 2
 city_flag_offset_y = 9
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset the units by this amount
 unit_offset_x = 19

Modified: branches/S2_6/data/hex2t.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/hex2t.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/hex2t.tilespec   (original)
+++ branches/S2_6/data/hex2t.tilespec   Sun May 10 21:38:15 2015
@@ -35,6 +35,10 @@
 unit_flag_offset_y = 23
 city_flag_offset_x = 1
 city_flag_offset_y = 25
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset units by this amount
 unit_offset_x = 4

Modified: branches/S2_6/data/hexemplio.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/hexemplio.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/hexemplio.tilespec       (original)
+++ branches/S2_6/data/hexemplio.tilespec       Sun May 10 21:38:15 2015
@@ -38,6 +38,10 @@
 unit_flag_offset_y = 39
 city_flag_offset_x = 42
 city_flag_offset_y = 10
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 40
+occupied_offset_y = 1
 
 ; offset the units by this amount
 unit_offset_x = 34

Modified: branches/S2_6/data/isophex.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/isophex.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/isophex.tilespec (original)
+++ branches/S2_6/data/isophex.tilespec Sun May 10 21:38:15 2015
@@ -35,6 +35,10 @@
 unit_flag_offset_y = 11
 city_flag_offset_x = 17
 city_flag_offset_y = 11
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset the units by this amount
 unit_offset_x = 21

Modified: branches/S2_6/data/isotrident.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/isotrident.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/isotrident.tilespec      (original)
+++ branches/S2_6/data/isotrident.tilespec      Sun May 10 21:38:15 2015
@@ -34,6 +34,10 @@
 unit_flag_offset_y = 11
 city_flag_offset_x = 17
 city_flag_offset_y = 11
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
 
 ; offset the units by this amount
 unit_offset_x = 21

Modified: branches/S2_6/data/toonhex.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/toonhex.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/toonhex.tilespec (original)
+++ branches/S2_6/data/toonhex.tilespec Sun May 10 21:38:15 2015
@@ -39,6 +39,10 @@
 unit_flag_offset_y = 39
 city_flag_offset_x = 42
 city_flag_offset_y = 10
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 40
+occupied_offset_y = 1
 
 ; offset the units by this amount
 unit_offset_x = 34

Modified: branches/S2_6/data/trident.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/trident.tilespec?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/data/trident.tilespec (original)
+++ branches/S2_6/data/trident.tilespec Sun May 10 21:38:15 2015
@@ -34,6 +34,10 @@
 unit_flag_offset_y = 0
 city_flag_offset_x = 0
 city_flag_offset_y = 0
+
+; offset the city occupied sprite by this amount
+occupied_offset_x = 0
+occupied_offset_y = 0
  
 ; offset the units by this amount
 unit_offset_x = 0

Modified: branches/S2_6/doc/README.graphics
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.graphics?rev=29040&r1=29039&r2=29040&view=diff
==============================================================================
--- branches/S2_6/doc/README.graphics   (original)
+++ branches/S2_6/doc/README.graphics   Sun May 10 21:38:15 2015
@@ -122,6 +122,8 @@
   unit_flag_offset_y     draw flags behind units or cities. With isometric
   city_flag_offset_x     tilesets this should be non-zero so that the flag
   city_flag_offset_y     is placed correctly behind the unit/city.
+  occupied_offset_x    : Gives an offset form the tile origin at which to
+  occupied_offset_y      draw city occupied icon (in many tilesets placed 
above the flag)
   unit_offset_x        : Gives an offset from the tile origin at which to
   unit_offset_y          draw units.
   activity_offset_x    : Gives an offset from the tile origin at which to


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to