SDL中文论坛

标题: 构造规则:{NEW:BEACH !,Chw,Khw,Khs,W*,S*,Xv,Qx*,A*,_* W* flat/shore} [打印本页]

作者: admin    时间: 2020-8-24 16:22
标题: 构造规则:{NEW:BEACH !,Chw,Khw,Khs,W*,S*,Xv,Qx*,A*,_* W* flat/shore}
它用于构造海滩,此处海滩指的是浸在水中、陆上透过水能看到部分。

搜索NEW:BEACH宏定义,该宏没中间过程,直接转入最后定义。
  1. #define NEW:BEACH TERRAINLIST ADJACENT IMAGESTEM
  2.     [terrain_graphics]
  3.         map="
  4. ,  2
  5. *,   3
  6. ,  1
  7. *,   *
  8. ,  *"
  9.         [tile]
  10.             pos=1
  11.             type={ADJACENT}
  12.             set_no_flag=beach-@R0-[@R5,@R1]
  13.         [/tile]
  14.         [tile]
  15.             pos=2
  16.             type={TERRAINLIST}
  17.             set_no_flag=beach-@R2-@R3
  18.         [/tile]
  19.         [tile]
  20.             pos=3
  21.             type={TERRAINLIST}
  22.             set_no_flag=beach-@R4-@R3
  23.         [/tile]

  24.         rotations=tr,r,br,bl,l,tl

  25.         [image]
  26.             # wmlscope: start ignoring
  27.             name={IMAGESTEM}-concave-@R0-@R5.png
  28.             # wmlscope: stop ignoring
  29.             layer=-500
  30.             center=90,144
  31.             base=90,144
  32.         [/image]
  33.         [image]
  34.             # wmlscope: start ignoring
  35.             name={IMAGESTEM}-concave-@R0-@R1.png
  36.             # wmlscope: stop ignoring
  37.             layer=-500
  38.             center=90,144
  39.             base=90,144
  40.         [/image]
  41.     [/terrain_graphics]

  42.     [terrain_graphics]
  43.         map="
  44. ,  2
  45. *,   3
  46. ,  1
  47. *,   *
  48. ,  *"
  49.         [tile]
  50.             pos=1
  51.             type={TERRAINLIST}
  52.             set_no_flag=beach-@R0-[@R5,@R1]
  53.         [/tile]
  54.         [tile]
  55.             pos=2
  56.             type={ADJACENT}
  57.             set_no_flag=beach-@R2-@R3
  58.         [/tile]
  59.         [tile]
  60.             pos=3
  61.             type={ADJACENT}
  62.             set_no_flag=beach-@R4-@R3
  63.         [/tile]

  64.         rotations=tr,r,br,bl,l,tl

  65.         [image]
  66.             # wmlscope: start ignoring
  67.             name={IMAGESTEM}-convex-@R0-@R5.png
  68.             # wmlscope: stop ignoring
  69.             layer=-500
  70.             center=90,144
  71.             base=90,144
  72.         [/image]
  73.         [image]
  74.             # wmlscope: start ignoring
  75.             name={IMAGESTEM}-convex-@R0-@R1.png
  76.             # wmlscope: stop ignoring
  77.             layer=-500
  78.             center=90,144
  79.             base=90,144
  80.         [/image]
  81.     [/terrain_graphics]

  82.     [terrain_graphics]
  83.         map="
  84. ,  2
  85. *,   3
  86. ,  1
  87. *,   *
  88. ,  *"
  89.         [tile]
  90.             pos=1
  91.             type={TERRAINLIST}
  92.             set_no_flag=beach-@R0-@R5
  93.         [/tile]
  94.         [tile]
  95.             pos=2
  96.             type={ADJACENT}
  97.             set_no_flag=beach-@R2-@R3
  98.         [/tile]
  99.         [tile]
  100.             pos=3
  101.             type=!,{TERRAINLIST},{ADJACENT}
  102.         [/tile]

  103.         rotations=tr,r,br,bl,l,tl

  104.         [image]
  105.             # wmlscope: start ignoring
  106.             name={IMAGESTEM}-convex-@R0-@R5.png
  107.             # wmlscope: stop ignoring
  108.             layer=-500
  109.             center=90,144
  110.             base=90,144
  111.         [/image]
  112.     [/terrain_graphics]

  113.     [terrain_graphics]
  114.         map="
  115. ,  2
  116. *,   3
  117. ,  1
  118. *,   *
  119. ,  *"
  120.         [tile]
  121.             pos=1
  122.             type={TERRAINLIST}
  123.             set_no_flag=beach-@R0-@R1
  124.         [/tile]
  125.         [tile]
  126.             pos=2
  127.             type=!,{TERRAINLIST},{ADJACENT}
  128.         [/tile]
  129.         [tile]
  130.             pos=3
  131.             type={ADJACENT}
  132.             set_no_flag=beach-@R4-@R3
  133.         [/tile]

  134.         rotations=tr,r,br,bl,l,tl

  135.         [image]
  136.             # wmlscope: start ignoring
  137.             name={IMAGESTEM}-convex-@R0-@R1.png
  138.             # wmlscope: stop ignoring
  139.             layer=-500
  140.             center=90,144
  141.             base=90,144
  142.         [/image]
  143.     [/terrain_graphics]
  144. #enddef
复制代码



包含四个旋转模板,每个模板产生6条,总计24条规则。

先后次序依次是6条内凹(concave)、6条外凸(convex)、6条内凹(concave)、6条外凸(convex)。

需要的文件名类似{IMAGESTEM}-concave-@R0-@R1.png、{IMAGESTEM}-convex-@R0-@R1.png

层值是-500,标记类似“beach-@R0-@R5”,beach字符只有此规则有,因此只要地形满足条件,这规则都会被用上。
(, 下载次数: 2863)
纯红色:shore-concave-tr-r.png
绿色:shore-concave-tr-tl.png
蓝色:shore-convex-tr-r.png
紫红色:shore-convex-tr-tl.png




欢迎光临 SDL中文论坛 (http://www.libsdl.cn/bbs/) Powered by Discuz! X3.3