summaryrefslogtreecommitdiff
blob: c4079d3d9f0ef68d08b0e49e0bd0e5d0b0d371b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
m4_include(__MAKEFILE_DATA_DIR`/omnimods.m4.conf')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__TILE_CHOOSE_STYLE',
   `m4_define(`__TILE_CLASS',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__TILE_COST_WHEN_OCCUPIED', 201)m4_dnl
m4_define(`__TILE_COST_WHEN_OOB', 255)m4_dnl
m4_define(`__TILE_CATEGORY',`m4_define(`__TILE_CATEGORY_NAME', `$1')m4_define(`__TILE_CATEGORY_FAMILY', `$2')m4_define(`__TILE_CATEGORY_DEPTH', `$3')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__TILE_CLASS_ERLANG_STYLE',`from_id (<<"`$1'">>) ->
   #tile
   {
      id = <<"$1">>,
      name = <<"[__TILE_CATEGORY_NAME] $2">>,
      cost = $3,
      omnimods = __OMNIMODS($4, $5, $6),
      family = <<"__TILE_CATEGORY_FAMILY">>,
      depth = __TILE_CATEGORY_DEPTH
   };')m4_dnl
m4_define(`__TILE_CLASS_USE_ERLANG_STYLE',
   `__TILE_CHOOSE_STYLE(`__TILE_CLASS_ERLANG_STYLE')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__TILE_CLASS_JSON_STYLE',`   {
      "msg": "add_tile",
      "id": "$1",
      "nam": "[__TILE_CATEGORY_NAME] $2",
      "ct": $3,
      "omni": __OMNIMODS($4, $5, $6),
      "fa": "__TILE_CATEGORY_FAMILY",
      "de": __TILE_CATEGORY_DEPTH
   },')m4_dnl
m4_define(`__TILE_CLASS_USE_JSON_STYLE',
   `__TILE_CHOOSE_STYLE(`__TILE_CLASS_JSON_STYLE')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_ifelse(__CODE_STYLE(),
   erlang, `__TILE_CLASS_USE_ERLANG_STYLE()',
   __CODE_STYLE(), json, `__TILE_CLASS_USE_JSON_STYLE()')m4_dnl