Author: cazfi
Date: Mon May 15 23:40:56 2017
New Revision: 35607

URL: http://svn.gna.org/viewcvs/freeciv?rev=35607&view=rev
Log:
Apply activity offsets to workertask icons

See hrm Bug #660421

Modified:
    branches/S3_0/client/tilespec.c

Modified: branches/S3_0/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/tilespec.c?rev=35607&r1=35606&r2=35607&view=diff
==============================================================================
--- branches/S3_0/client/tilespec.c     (original)
+++ branches/S3_0/client/tilespec.c     Mon May 15 23:40:56 2017
@@ -5930,23 +5930,35 @@
           switch (ptask->act) {
           case ACTIVITY_MINE:
             if (ptask->tgt == NULL) {
-              ADD_SPRITE_SIMPLE(t->sprites.unit.plant);
+              ADD_SPRITE(t->sprites.unit.plant,
+                         TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                         FULL_TILE_Y_OFFSET + t->activity_offset_y);
             } else {
-              
ADD_SPRITE_SIMPLE(t->sprites.extras[extra_index(ptask->tgt)].activity);
+              ADD_SPRITE(t->sprites.extras[extra_index(ptask->tgt)].activity,
+                         TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                         FULL_TILE_Y_OFFSET + t->activity_offset_y);
             }
             break;
           case ACTIVITY_IRRIGATE:
             if (ptask->tgt == NULL) {
-              ADD_SPRITE_SIMPLE(t->sprites.unit.irrigate);
+              ADD_SPRITE(t->sprites.unit.irrigate,
+                         TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                         FULL_TILE_Y_OFFSET + t->activity_offset_y);
             } else {
-              
ADD_SPRITE_SIMPLE(t->sprites.extras[extra_index(ptask->tgt)].activity);
+              ADD_SPRITE(t->sprites.extras[extra_index(ptask->tgt)].activity,
+                         TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                         FULL_TILE_Y_OFFSET + t->activity_offset_y);
             }
             break;
           case ACTIVITY_GEN_ROAD:
-            
ADD_SPRITE_SIMPLE(t->sprites.extras[extra_index(ptask->tgt)].activity);
+            ADD_SPRITE(t->sprites.extras[extra_index(ptask->tgt)].activity,
+                       TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                       FULL_TILE_Y_OFFSET + t->activity_offset_y);
             break;
           case ACTIVITY_TRANSFORM:
-            ADD_SPRITE_SIMPLE(t->sprites.unit.transform);
+            ADD_SPRITE(t->sprites.unit.transform,
+                         TRUE, FULL_TILE_X_OFFSET + t->activity_offset_x,
+                         FULL_TILE_Y_OFFSET + t->activity_offset_y);
             break;
           default:
             break;


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

Reply via email to