Added a macro for layering rules for specific three-way junctions of terrains

...(TERRAIN_ADJACENT_3_DIFFERENT).

Applied this rule to fix desert road-water-desert village glitch.
This commit is contained in:
Jan Rietema 2007-09-17 10:36:16 +00:00
parent c871e19386
commit d487834ecd
2 changed files with 83 additions and 5 deletions

View file

@ -887,11 +887,14 @@
# Desert and desert road transitions, with desert road transitioning extra
# nicely with desert and desert villages.
{TERRAIN_ADJACENT -330 Dd^ (Dd^V*) desert}
{TERRAIN_ADJACENT -355 Rd (Dd^V*) desert-road}
{TERRAIN_ADJACENT -350 Rd (!,Rd,Dd) desert-road}
{TERRAIN_ADJACENT -340 Dd (!,Rd,Dd^,Dd^V*) desert}
{TERRAIN_ADJACENT -345 Dd^ Rd desert}
{TERRAIN_ADJACENT -330 Dd^ (Dd^V*) desert}
{TERRAIN_ADJACENT -345 Rd (Dd^V*) desert-road}
# we need a specific rule to raise road-to-water transitions above
# desert-to-water in the case where desert-village, road and shallow water meet
{TERRAIN_ADJACENT_3_DIFFERENT -345 Rd W* Dd^V* desert-road road-water-desert-transition}
{TERRAIN_ADJACENT -355 Rd (!,Rd,Dd) desert-road}
{TERRAIN_ADJACENT -350 Dd (!,Rd,Dd^,Dd^V*) desert}
{TERRAIN_ADJACENT -340 Dd^ Rd desert}
# Water Transitions draw below everything else

View file

@ -197,3 +197,78 @@
#define TERRAIN_ADJACENT_CUSTOM LAYER TERRAIN ADJACENT IMAGE FLAG
{TERRAIN_ADJACENT_FL ({LAYER}) ({TERRAIN}) ({ADJACENT}) {IMAGE} {FLAG}}
#enddef
# define a specific rule for layering when the transition borders
# on a specific OTHER_TERRAIN - to use in situations where the layering
# needs to be adjusted for three-way-junctions of a particular set of
# terrains
#define TERRAIN_ADJACENT_3_DIFFERENT LAYER TERRAIN ADJACENT OTHER_TERRAIN IMAGE FLAG
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
no_flag={FLAG}-@R0,{FLAG}-@R1
set_flag={FLAG}-@R0,{FLAG}-@R1
[image]
layer={LAYER}
name={IMAGE}-@R0
[/image]
[/tile]
[tile]
pos=2
type={TERRAIN}
no_flag={FLAG}-@R3
set_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={OTHER_TERRAIN}
no_flag={FLAG}-@R4
set_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3, .
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
no_flag={FLAG}-@R0,{FLAG}-@R1
set_flag={FLAG}-@R0,{FLAG}-@R1
[image]
layer={LAYER}
name={IMAGE}-@R0
[/image]
[/tile]
[tile]
pos=2
type={TERRAIN}
no_flag={FLAG}-@R3
set_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={OTHER_TERRAIN}
no_flag={FLAG}-@R4
set_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef