#textdomain wesnoth

#toplevel macros to handle overlays

###############################
#  No test on neighbour       #
###############################
#define OVERLAY_PLFB TERRAIN PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_SINGLE_PLFB ({TERRAIN})  ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef

#meta-macro OVERLAY TERRAINLIST P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_RANDOM_LFB TERRAIN LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_SINGLE_RANDOM_LFB ({TERRAIN}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef

#meta-macro OVERLAY_RANDOM TERRAINLIST L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

###############################
#  Needs one neighbour        #
###############################

#define OVERLAY_RESTRICTED_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_RESTRICTED_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

###############################
#  Needs two neighbour        #
###############################

#define OVERLAY_RESTRICTED2_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED2 TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_RESTRICTED2_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED2_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED2_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0-@R1)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED2 TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0-@R1)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED2_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

###############################
#  Needs three neighbour      #
###############################

#define OVERLAY_RESTRICTED3_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED3 TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_RESTRICTED3_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) ()}
#enddef

#meta-macro OVERLAY_RESTRICTED3_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED3_PLFB TERRAIN ADJACENT PROB LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0-@R1-@R2)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED3 TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM}) (-@R0-@R1-@R2)}
#enddef

#meta-macro OVERLAY_ROTATION_RESTRICTED3_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

###############################
#  Combination of the above   #
###############################

#define OVERLAY_COMPLETE_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_COMPLETE_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef

#meta-macro OVERLAY_COMPLETE TERRAINLIST ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM

#####################################################################################################
###############        AUTO GENERATED CODE        ###################################################
#####################################################################################################
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY TERRAINLIST P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_LFB TERRAINLIST LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_PFB TERRAINLIST PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_FB TERRAINLIST FLAG BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_PLB TERRAINLIST PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_LB TERRAINLIST LAYER BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_PB TERRAINLIST PROB BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_B TERRAINLIST BUILDER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_PLF TERRAINLIST PROB LAYER FLAG IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_LF TERRAINLIST LAYER FLAG IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_PF TERRAINLIST PROB FLAG IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_F TERRAINLIST FLAG IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_PL TERRAINLIST PROB LAYER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_L TERRAINLIST LAYER IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_P TERRAINLIST PROB IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY TERRAINLIST IMAGESTEM
    {OVERLAY_PLFB ({TERRAINLIST}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RANDOM TERRAINLIST L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RANDOM_FB TERRAINLIST FLAG BUILDER IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM_LB TERRAINLIST LAYER BUILDER IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM_B TERRAINLIST BUILDER IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM_LF TERRAINLIST LAYER FLAG IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM_F TERRAINLIST FLAG IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM_L TERRAINLIST LAYER IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RANDOM TERRAINLIST IMAGESTEM
    {OVERLAY_RANDOM_LFB ({TERRAINLIST}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED2 TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED2_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2 TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED2_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED2_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED2_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED2 TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED2_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2 TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED2_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED2_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED2_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED3 TERRAIN ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED3_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3 TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_RESTRICTED3_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_RESTRICTED3_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_RESTRICTED3_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED3 TERRAIN  ADJACENT P=PROB=100 L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED3_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PFB TERRAIN ADJACENT PROB FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PLB TERRAIN ADJACENT PROB LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PB TERRAIN ADJACENT PROB BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PLF TERRAIN ADJACENT PROB LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PF TERRAIN ADJACENT PROB FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_PL TERRAIN ADJACENT PROB LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_P TERRAIN ADJACENT PROB IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) ({PROB}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3 TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_ROTATION_RESTRICTED3_RANDOM TERRAIN ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_FB TERRAIN ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_LB TERRAIN ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_B TERRAIN ADJACENT BUILDER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_LF TERRAIN ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_F TERRAIN ADJACENT FLAG IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM_L TERRAIN ADJACENT LAYER IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_ROTATION_RESTRICTED3_RANDOM TERRAIN ADJACENT IMAGESTEM
    {OVERLAY_ROTATION_RESTRICTED3_RANDOM_LFB ({TERRAIN}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
#The following code is autogenerated by expand-terrain-macros.py
#generated from: #meta-macro OVERLAY_COMPLETE TERRAINLIST ADJACENT L=LAYER=0 F=FLAG=overlay B=BUILDER=IMAGE_SINGLE IMAGESTEM
#Please do not modify
#define OVERLAY_COMPLETE_FB TERRAINLIST ADJACENT FLAG BUILDER IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) 0 ({FLAG}) ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE_LB TERRAINLIST ADJACENT LAYER BUILDER IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) ({LAYER}) overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE_B TERRAINLIST ADJACENT BUILDER IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) 0 overlay ({BUILDER}) ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE_LF TERRAINLIST ADJACENT LAYER FLAG IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) ({LAYER}) ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE_F TERRAINLIST ADJACENT FLAG IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) 0 ({FLAG}) IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE_L TERRAINLIST ADJACENT LAYER IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) ({LAYER}) overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#define OVERLAY_COMPLETE TERRAINLIST ADJACENT IMAGESTEM
    {OVERLAY_COMPLETE_LFB ({TERRAINLIST}) ({ADJACENT}) 0 overlay IMAGE_SINGLE ({IMAGESTEM})}
#enddef
#end of generated code
