Author: cazfi Date: Sun May 10 21:38:07 2015 New Revision: 29039 URL: http://svn.gna.org/viewcvs/freeciv?rev=29039&view=rev Log: Added occupied_offset_[x|y] fields to tilespec format.
See patch #6069 Modified: trunk/client/tilespec.c trunk/data/alio.tilespec trunk/data/amplio.tilespec trunk/data/amplio2.tilespec trunk/data/cimpletoon.tilespec trunk/data/hex2t.tilespec trunk/data/hexemplio.tilespec trunk/data/isophex.tilespec trunk/data/isotrident.tilespec trunk/data/toonhex.tilespec trunk/data/trident.tilespec trunk/doc/README.graphics Modified: trunk/client/tilespec.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/client/tilespec.c (original) +++ trunk/client/tilespec.c Sun May 10 21:38:07 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, @@ -5169,7 +5175,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: trunk/data/alio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alio.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/alio.tilespec (original) +++ trunk/data/alio.tilespec Sun May 10 21:38:07 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: trunk/data/amplio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/amplio.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/amplio.tilespec (original) +++ trunk/data/amplio.tilespec Sun May 10 21:38:07 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: trunk/data/amplio2.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/amplio2.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/amplio2.tilespec (original) +++ trunk/data/amplio2.tilespec Sun May 10 21:38:07 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: trunk/data/cimpletoon.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/cimpletoon.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/cimpletoon.tilespec (original) +++ trunk/data/cimpletoon.tilespec Sun May 10 21:38:07 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: trunk/data/hex2t.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hex2t.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/hex2t.tilespec (original) +++ trunk/data/hex2t.tilespec Sun May 10 21:38:07 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: trunk/data/hexemplio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hexemplio.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/hexemplio.tilespec (original) +++ trunk/data/hexemplio.tilespec Sun May 10 21:38:07 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: trunk/data/isophex.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/isophex.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/isophex.tilespec (original) +++ trunk/data/isophex.tilespec Sun May 10 21:38:07 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: trunk/data/isotrident.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/isotrident.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/isotrident.tilespec (original) +++ trunk/data/isotrident.tilespec Sun May 10 21:38:07 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: trunk/data/toonhex.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/toonhex.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/toonhex.tilespec (original) +++ trunk/data/toonhex.tilespec Sun May 10 21:38:07 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: trunk/data/trident.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/trident.tilespec?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/data/trident.tilespec (original) +++ trunk/data/trident.tilespec Sun May 10 21:38:07 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: trunk/doc/README.graphics URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.graphics?rev=29039&r1=29038&r2=29039&view=diff ============================================================================== --- trunk/doc/README.graphics (original) +++ trunk/doc/README.graphics Sun May 10 21:38:07 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