Author: cazfi
Date: Mon Mar 30 20:31:51 2015
New Revision: 28666

URL: http://svn.gna.org/viewcvs/freeciv?rev=28666&view=rev
Log:
Added unit activity icon offset in X-direction to tilespec format.

See patch #5821

Modified:
    branches/S2_6/client/tilespec.c
    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=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/client/tilespec.c     (original)
+++ branches/S2_6/client/tilespec.c     Mon Mar 30 20:31:51 2015
@@ -480,6 +480,7 @@
 
   int citybar_offset_y;
   int tilelabel_offset_y;
+  int activity_offset_x;
 
 #define NUM_CORNER_DIRS 4
 #define TILES_PER_CORNER 4
@@ -1702,6 +1703,8 @@
                              "tilespec.unit_offset_x")
       || !secfile_lookup_int(file, &t->unit_offset_y,
                              "tilespec.unit_offset_y")
+      || !secfile_lookup_int(file, &t->activity_offset_x,
+                             "tilespec.activity_offset_x")
       || !secfile_lookup_int(file, &t->city_offset_x,
                              "tilespec.city_offset_x")
       || !secfile_lookup_int(file, &t->city_offset_y,
@@ -3740,9 +3743,10 @@
     ADD_SPRITE_FULL(t->sprites.unit.loaded);
   }
 
-  if(punit->activity!=ACTIVITY_IDLE) {
+  if (punit->activity != ACTIVITY_IDLE) {
     struct sprite *s = NULL;
-    switch(punit->activity) {
+
+    switch (punit->activity) {
     case ACTIVITY_MINE:
       if (punit->activity_target == NULL) {
         s = t->sprites.unit.mine;
@@ -3794,7 +3798,7 @@
     }
 
     if (s != NULL) {
-      ADD_SPRITE_FULL(s);
+      ADD_SPRITE(s, TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x, 
FULL_TILE_Y_OFFSET);
     }
   }
 

Modified: branches/S2_6/data/amplio.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/amplio.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/amplio.tilespec  (original)
+++ branches/S2_6/data/amplio.tilespec  Mon Mar 30 20:31:51 2015
@@ -36,6 +36,9 @@
 ; offset the units by this amount
 unit_offset_x = 19
 unit_offset_y = 18
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/amplio2.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/amplio2.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/amplio2.tilespec (original)
+++ branches/S2_6/data/amplio2.tilespec Mon Mar 30 20:31:51 2015
@@ -36,6 +36,9 @@
 ; offset the units by this amount
 unit_offset_x = 19
 unit_offset_y = 18
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/cimpletoon.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/cimpletoon.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/cimpletoon.tilespec      (original)
+++ branches/S2_6/data/cimpletoon.tilespec      Mon Mar 30 20:31:51 2015
@@ -36,6 +36,9 @@
 ; offset the units by this amount
 unit_offset_x = 19
 unit_offset_y = 18
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/hex2t.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/hex2t.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/hex2t.tilespec   (original)
+++ branches/S2_6/data/hex2t.tilespec   Mon Mar 30 20:31:51 2015
@@ -39,6 +39,9 @@
 ; offset units by this amount
 unit_offset_x = 4
 unit_offset_y = 21
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/hexemplio.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/hexemplio.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/hexemplio.tilespec       (original)
+++ branches/S2_6/data/hexemplio.tilespec       Mon Mar 30 20:31:51 2015
@@ -42,6 +42,9 @@
 ; offset the units by this amount
 unit_offset_x = 34
 unit_offset_y = 38
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/isophex.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/isophex.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/isophex.tilespec (original)
+++ branches/S2_6/data/isophex.tilespec Mon Mar 30 20:31:51 2015
@@ -39,6 +39,9 @@
 ; offset the units by this amount
 unit_offset_x = 21
 unit_offset_y = 13
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/isotrident.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/isotrident.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/isotrident.tilespec      (original)
+++ branches/S2_6/data/isotrident.tilespec      Mon Mar 30 20:31:51 2015
@@ -38,6 +38,9 @@
 ; offset the units by this amount
 unit_offset_x = 21
 unit_offset_y = 13
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/toonhex.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/toonhex.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/toonhex.tilespec (original)
+++ branches/S2_6/data/toonhex.tilespec Mon Mar 30 20:31:51 2015
@@ -43,6 +43,9 @@
 ; offset the units by this amount
 unit_offset_x = 34
 unit_offset_y = 38
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/data/trident.tilespec
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/trident.tilespec?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/data/trident.tilespec (original)
+++ branches/S2_6/data/trident.tilespec Mon Mar 30 20:31:51 2015
@@ -38,6 +38,9 @@
 ; offset the units by this amount
 unit_offset_x = 0
 unit_offset_y = 0
+
+; offset of the normal activity icons
+activity_offset_x = 0
 
 ; offset the cities by this amount
 city_offset_x = 0

Modified: branches/S2_6/doc/README.graphics
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.graphics?rev=28666&r1=28665&r2=28666&view=diff
==============================================================================
--- branches/S2_6/doc/README.graphics   (original)
+++ branches/S2_6/doc/README.graphics   Mon Mar 30 20:31:51 2015
@@ -124,6 +124,10 @@
   city_flag_offset_y     is placed correctly behind the unit/city.
   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
+                         draw normal unit activity icons. "Auto" icons are not
+                         affected by this as they are usually wanted in 
different
+                         offset than real activity icons for both to appear 
simultaneously
   citybar_offset_y     : Gives an offset from city tile origin at which to
                          draw city bar text.
   hex_side             : When is_hex is specified (see is_hex, below), this


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

Reply via email to