diff -ruN -Xcvs/diff_ignore cvs/client/tilespec.c test/client/tilespec.c --- cvs/client/tilespec.c Mon Nov 19 15:46:25 2001 +++ test/client/tilespec.c Tue Dec 4 10:17:32 2001 @@ -67,6 +67,9 @@ char *city_productions_font_name; int flags_are_transparent=1; +int flags_in_front=0; +int flags_offset_x=0; +int flags_offset_y=0; int num_tiles_explode_unit=0; @@ -274,6 +277,15 @@ flags_are_transparent = secfile_lookup_int(file, "tilespec.flags_are_transparent"); + flags_in_front = + secfile_lookup_int_default(file, 0, "tilespec.flags_in_front"); + + flags_offset_x = + secfile_lookup_int_default(file, 0, "tilespec.flags_offset_x"); + + flags_offset_y = + secfile_lookup_int_default(file, 0, "tilespec.flags_offset_y"); + c = secfile_lookup_str(file, "tilespec.main_intro_file"); main_intro_filename = tilespec_gfx_filename(c); freelog(LOG_DEBUG, "intro file %s", main_intro_filename); @@ -362,8 +374,14 @@ for(i=0; ix, pcity->y); + if ( flags_in_front ) { + *sprs++ = get_city_sprite(pcity); + } + if (!no_backdrop) { *sprs++ = get_city_nation_flag_sprite(pcity); } @@ -934,7 +956,9 @@ if (genlist_size(&(ptile->units.list)) > 0) *sprs++ = get_city_occupied_sprite(pcity); - *sprs++ = get_city_sprite(pcity); + if ( !flags_in_front ) { + *sprs++ = get_city_sprite(pcity); + } if (city_unhappy(pcity)) *sprs++ = sprites.city.disorder; @@ -949,25 +973,35 @@ int *solid_bg) { struct Sprite **save_sprs=sprs; + int drawflag = 0; int ihp; *solid_bg = 0; if (is_isometric) { if (!no_backdrop) { - *sprs++ = get_unit_nation_flag_sprite(punit); + drawflag = 1; } } else { if (!no_backdrop) { if (!solid_color_behind_units) { /* will be the first sprite if flags_are_transparent == FALSE */ - *sprs++ = get_unit_nation_flag_sprite(punit); + drawflag = 1; } else { *solid_bg = 1; } } } + if ( drawflag && !flags_in_front ) { + *sprs++ = get_unit_nation_flag_sprite(punit); + } + *sprs++ = unit_type(punit)->sprite; + + if ( drawflag && flags_in_front ) { + *sprs++ = get_unit_nation_flag_sprite(punit); + } + if(punit->activity!=ACTIVITY_IDLE) { struct Sprite *s = NULL; diff -ruN -Xcvs/diff_ignore cvs/data/Makefile.am test/data/Makefile.am --- cvs/data/Makefile.am Thu Jan 25 20:39:38 2001 +++ test/data/Makefile.am Tue Dec 4 10:23:10 2001 @@ -8,6 +8,7 @@ trident.tilespec \ trident_shields.tilespec \ hires.tilespec \ + hires_shields.tilespec \ helpdata.txt \ civ1.serv \ civ2.serv diff -ruN -Xcvs/diff_ignore cvs/data/engels/flags.spec test/data/engels/flags.spec --- cvs/data/engels/flags.spec Sun Sep 24 13:43:25 2000 +++ test/data/engels/flags.spec Tue Dec 4 10:28:43 2001 @@ -25,6 +25,7 @@ [grid_main] +is_flags = 1 x_top_left = 0 y_top_left = 0 dx = 45 diff -ruN -Xcvs/diff_ignore cvs/data/hires_shields.tilespec test/data/hires_shields.tilespec --- cvs/data/hires_shields.tilespec Thu Jan 1 01:00:00 1970 +++ test/data/hires_shields.tilespec Tue Dec 4 10:22:53 2001 @@ -0,0 +1,59 @@ + +[tilespec] + +; Format and options of this tilespec file: +options = "+tilespec2" + +; A simple name for the tileset specified by this file: +name = "HiRes w/Shields" + +; TODO: add more overall information fields on tiles, +; eg, description, authors, colors, etc. + +; Basic tile sizes: +normal_tile_width = 64 +normal_tile_height = 32 +small_tile_width = 15 +small_tile_height = 20 + +is_isometric = 1 + +; Font to use to draw city names: +city_names_font = "9x15bold" + +; Font to use to draw city productions: +city_productions_font = "6x13" + +; Should flags be drawn as transparent: (else opaque) +flags_are_transparent = 1 + +; Should flags be drawn in front of unit/city: (else behind) +flags_in_front = 1 + +; Offset of flags +flags_offset_x = 32 +flags_offset_y = 25 + +; These are special because they get freed and reloaded +; as required: +main_intro_file = "misc/intro" +minimap_intro_file = "misc/radar" + +; Below, the graphics spec files; must be somewhere (anywhere) in +; the data path. Order may be important for color allocation on +; low-color systems, and if there are any duplicate tags (lattermost +; tag is used). +files = + "hires/terrain1.spec", + "hires/terrain2.spec", + "hires/tiles.spec", + "misc/small.spec", + "hires/units.spec", + "trident/flags.spec", + "misc/space.spec", + "misc/treaty.spec", + "hires/cities.spec", + "hires/icons.spec", + "hires/nuke.spec", + "misc/chiefs.spec", + "misc/shields.spec" diff -ruN -Xcvs/diff_ignore cvs/data/misc/chiefs.spec test/data/misc/chiefs.spec --- cvs/data/misc/chiefs.spec Tue Jan 18 20:42:50 2000 +++ test/data/misc/chiefs.spec Tue Dec 4 10:16:29 2001 @@ -15,6 +15,7 @@ [grid_main] +is_flags = 1 x_top_left = 0 y_top_left = 0 dx = 45 diff -ruN -Xcvs/diff_ignore cvs/data/misc/shields.spec test/data/misc/shields.spec --- cvs/data/misc/shields.spec Sun Sep 24 20:26:12 2000 +++ test/data/misc/shields.spec Tue Dec 4 10:16:11 2001 @@ -17,6 +17,7 @@ [grid_main] +is_flags = 1 x_top_left = 0 y_top_left = 0 dx = 45 diff -ruN -Xcvs/diff_ignore cvs/data/trident/flags.spec test/data/trident/flags.spec --- cvs/data/trident/flags.spec Sun Sep 24 13:43:28 2000 +++ test/data/trident/flags.spec Tue Dec 4 10:29:35 2001 @@ -24,6 +24,7 @@ [grid_main] +is_flags = 1 x_top_left = 0 y_top_left = 0 dx = 30