// This file has been automatically generated.

#include "AppHdr.h"
#include "libutil.h"
#include "tiledef-feat.h"

static unsigned int _tile_feat_count[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    13,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    2,
    1,
    3,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    16,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    1,
    1,
    1,
    29,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    6,
    1,
    1,
    1,
    1,
    1,
    8,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    6,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    1,
    1,
    2,
    1,
    1,
    2,
    1,
    3,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    3,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    1,
    3,
    1,
    1,
    2,
    1,
    1,
    1,
    2,
    1,
    1,
    1,
    1,
    2,
    1,
    1,
    1,
    2,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    8,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    6,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    8,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    1,
    8,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    5,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    12,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    3,
    1,
    1,
    3,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    6,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    2,
    1,
    2,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    1,
    1,
    30,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    18,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    18,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    18,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    18,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    10,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    2,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    3,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    4,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
};

unsigned int tile_feat_count(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_count[idx - TILE_WALL_MAX];
}

static tileidx_t _tile_feat_basetiles[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    13,
    13,
    13,
    13,
    17,
    17,
    19,
    19,
    19,
    22,
    22,
    22,
    22,
    22,
    27,
    27,
    27,
    27,
    31,
    31,
    31,
    31,
    35,
    35,
    35,
    38,
    38,
    38,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    41,
    57,
    58,
    59,
    60,
    61,
    62,
    63,
    64,
    65,
    66,
    67,
    68,
    69,
    70,
    71,
    72,
    73,
    74,
    75,
    76,
    77,
    78,
    79,
    80,
    81,
    82,
    83,
    84,
    85,
    86,
    87,
    88,
    89,
    90,
    91,
    92,
    93,
    94,
    95,
    96,
    97,
    98,
    99,
    100,
    101,
    102,
    103,
    104,
    105,
    106,
    107,
    108,
    109,
    110,
    111,
    112,
    113,
    114,
    115,
    116,
    117,
    118,
    119,
    120,
    121,
    122,
    123,
    124,
    125,
    126,
    127,
    128,
    129,
    130,
    131,
    132,
    133,
    134,
    135,
    136,
    137,
    138,
    139,
    140,
    141,
    142,
    143,
    144,
    145,
    146,
    147,
    148,
    149,
    149,
    149,
    152,
    153,
    154,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    155,
    184,
    184,
    184,
    184,
    184,
    184,
    190,
    190,
    190,
    190,
    190,
    190,
    190,
    190,
    198,
    198,
    198,
    198,
    198,
    203,
    203,
    203,
    203,
    203,
    203,
    209,
    210,
    211,
    212,
    213,
    214,
    215,
    215,
    215,
    218,
    218,
    218,
    221,
    222,
    223,
    223,
    225,
    226,
    226,
    228,
    228,
    228,
    231,
    231,
    231,
    231,
    231,
    236,
    236,
    236,
    239,
    239,
    239,
    239,
    243,
    243,
    243,
    243,
    247,
    247,
    247,
    247,
    251,
    251,
    251,
    251,
    255,
    255,
    255,
    255,
    259,
    259,
    259,
    259,
    263,
    263,
    263,
    263,
    267,
    267,
    267,
    267,
    271,
    271,
    271,
    271,
    275,
    276,
    277,
    278,
    279,
    280,
    281,
    282,
    283,
    284,
    285,
    286,
    287,
    288,
    289,
    290,
    291,
    292,
    293,
    294,
    295,
    296,
    297,
    298,
    298,
    300,
    300,
    300,
    303,
    304,
    305,
    306,
    307,
    307,
    309,
    310,
    311,
    312,
    313,
    314,
    315,
    316,
    317,
    318,
    319,
    320,
    321,
    321,
    321,
    321,
    321,
    326,
    327,
    328,
    329,
    330,
    331,
    332,
    333,
    334,
    335,
    335,
    335,
    335,
    335,
    340,
    341,
    342,
    343,
    344,
    345,
    346,
    347,
    348,
    349,
    350,
    351,
    352,
    353,
    354,
    355,
    356,
    357,
    358,
    359,
    360,
    361,
    362,
    363,
    364,
    365,
    366,
    367,
    368,
    369,
    370,
    371,
    372,
    373,
    374,
    375,
    376,
    377,
    378,
    379,
    380,
    381,
    382,
    383,
    384,
    385,
    386,
    387,
    388,
    389,
    390,
    391,
    392,
    393,
    394,
    395,
    396,
    397,
    398,
    399,
    400,
    401,
    402,
    403,
    404,
    405,
    406,
    407,
    408,
    409,
    410,
    411,
    412,
    413,
    414,
    415,
    415,
    415,
    418,
    419,
    420,
    420,
    420,
    423,
    423,
    423,
    426,
    426,
    426,
    429,
    429,
    429,
    432,
    433,
    433,
    433,
    436,
    436,
    438,
    439,
    440,
    440,
    442,
    443,
    444,
    445,
    445,
    447,
    448,
    449,
    449,
    451,
    452,
    453,
    454,
    455,
    456,
    457,
    458,
    459,
    460,
    461,
    461,
    461,
    461,
    461,
    461,
    461,
    461,
    469,
    470,
    471,
    472,
    473,
    474,
    475,
    476,
    477,
    478,
    479,
    480,
    481,
    482,
    483,
    484,
    485,
    486,
    487,
    488,
    489,
    489,
    489,
    489,
    489,
    489,
    495,
    496,
    497,
    498,
    498,
    498,
    498,
    498,
    498,
    498,
    498,
    506,
    506,
    508,
    509,
    509,
    509,
    509,
    509,
    509,
    509,
    509,
    517,
    517,
    517,
    517,
    521,
    522,
    522,
    522,
    522,
    522,
    527,
    528,
    529,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    530,
    542,
    543,
    544,
    545,
    545,
    545,
    545,
    549,
    549,
    549,
    552,
    552,
    552,
    555,
    556,
    556,
    556,
    556,
    560,
    561,
    561,
    561,
    561,
    561,
    561,
    567,
    568,
    569,
    570,
    571,
    571,
    571,
    571,
    575,
    575,
    577,
    577,
    579,
    579,
    581,
    582,
    583,
    584,
    585,
    585,
    585,
    588,
    588,
    590,
    590,
    592,
    593,
    593,
    593,
    593,
    597,
    598,
    599,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    600,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    630,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    648,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    666,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    684,
    702,
    702,
    702,
    702,
    702,
    702,
    702,
    702,
    702,
    702,
    712,
    713,
    713,
    713,
    713,
    717,
    717,
    719,
    720,
    720,
    720,
    720,
    724,
    725,
    725,
    725,
    728,
    729,
    730,
    731,
    732,
    733,
    734,
    735,
    736,
    737,
    738,
    739,
    740,
    741,
    742,
    743,
    744,
    745,
    746,
    746,
    746,
    746,
    750,
    750,
    750,
    750,
    754,
    755,
    756,
    757,
    758,
    759,
    760,
    761,
    762,
    763,
    764,
    765,
    766,
    767,
    768,
    769,
    770,
    771,
    772,
    773,
    774,
    775,
    776,
    777,
    778,
    779,
    780,
    781,
    782,
    783,
    784,
    785,
};

tileidx_t tile_feat_basetile(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_basetiles[idx - TILE_WALL_MAX] + TILE_WALL_MAX;
}

static int _tile_feat_probs[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    10,
    20,
    30,
    40,
    50,
    60,
    70,
    80,
    90,
    100,
    110,
    120,
    130,
    10,
    20,
    30,
    40,
    10,
    20,
    10,
    20,
    30,
    10,
    20,
    30,
    40,
    50,
    10,
    20,
    30,
    40,
    10,
    20,
    30,
    40,
    10,
    18,
    23,
    5,
    10,
    15,
    5,
    10,
    15,
    20,
    25,
    30,
    35,
    40,
    45,
    50,
    55,
    60,
    65,
    70,
    75,
    80,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    10,
    15,
    5,
    5,
    5,
    5,
    10,
    15,
    20,
    25,
    30,
    35,
    43,
    51,
    59,
    67,
    70,
    73,
    76,
    79,
    82,
    85,
    88,
    91,
    94,
    97,
    100,
    103,
    104,
    105,
    106,
    107,
    110,
    113,
    5,
    10,
    13,
    16,
    17,
    18,
    6,
    12,
    18,
    22,
    26,
    28,
    30,
    31,
    7,
    14,
    19,
    24,
    25,
    1,
    2,
    3,
    4,
    5,
    6,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    3,
    1,
    2,
    3,
    1,
    1,
    1,
    2,
    1,
    1,
    2,
    10,
    11,
    12,
    60,
    75,
    78,
    81,
    84,
    3,
    6,
    9,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    4,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    10,
    12,
    2,
    4,
    6,
    2,
    2,
    2,
    2,
    2,
    4,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    4,
    6,
    8,
    10,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    4,
    6,
    8,
    10,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    4,
    6,
    2,
    2,
    2,
    4,
    6,
    2,
    4,
    6,
    2,
    4,
    6,
    2,
    4,
    6,
    2,
    2,
    4,
    6,
    2,
    4,
    2,
    2,
    2,
    4,
    2,
    2,
    2,
    2,
    4,
    2,
    2,
    2,
    4,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    4,
    6,
    8,
    10,
    12,
    14,
    16,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    4,
    6,
    8,
    10,
    12,
    2,
    2,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    1,
    2,
    1,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    1,
    2,
    3,
    4,
    1,
    1,
    2,
    3,
    4,
    5,
    1,
    1,
    1,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    1,
    1,
    1,
    1,
    2,
    3,
    4,
    1,
    2,
    3,
    1,
    2,
    3,
    1,
    1,
    2,
    3,
    4,
    1,
    1,
    2,
    3,
    4,
    5,
    6,
    1,
    1,
    1,
    1,
    1,
    2,
    3,
    4,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    1,
    1,
    1,
    8,
    16,
    26,
    10,
    13,
    3,
    6,
    3,
    10,
    17,
    24,
    27,
    3,
    3,
    3,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    33,
    36,
    39,
    42,
    45,
    48,
    51,
    54,
    57,
    60,
    63,
    66,
    69,
    72,
    75,
    78,
    81,
    84,
    87,
    90,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    33,
    36,
    39,
    42,
    45,
    48,
    51,
    54,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    33,
    36,
    39,
    42,
    45,
    48,
    51,
    54,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    33,
    36,
    39,
    42,
    45,
    48,
    51,
    54,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    33,
    36,
    39,
    42,
    45,
    48,
    51,
    54,
    3,
    6,
    9,
    12,
    15,
    18,
    21,
    24,
    27,
    30,
    3,
    3,
    6,
    9,
    12,
    3,
    6,
    3,
    3,
    6,
    9,
    12,
    3,
    3,
    6,
    9,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    6,
    9,
    12,
    3,
    6,
    9,
    12,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
};

int tile_feat_probs(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_probs[idx - TILE_WALL_MAX];
}

static int _tile_feat_dominoes[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

int tile_feat_dominoes(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_dominoes[idx - TILE_WALL_MAX];
}

static const char *_tile_feat_name[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    "DNGN_TREE",
    "DNGN_TREE_1",
    "DNGN_TREE_2",
    "DNGN_TREE_3",
    "DNGN_TREE_4",
    "DNGN_TREE_5",
    "DNGN_TREE_6",
    "DNGN_TREE_7",
    "DNGN_TREE_8",
    "DNGN_TREE_9",
    "DNGN_TREE_10",
    "DNGN_TREE_11",
    "DNGN_TREE_12",
    "DNGN_TREE_YELLOW",
    "DNGN_TREE_YELLOW_1",
    "DNGN_TREE_YELLOW_2",
    "DNGN_TREE_YELLOW_3",
    "DNGN_TREE_LIGHTRED",
    "DNGN_TREE_LIGHTRED_1",
    "DNGN_TREE_RED",
    "DNGN_TREE_RED_1",
    "DNGN_TREE_RED_2",
    "DNGN_TREE_DEAD",
    "DNGN_TREE_DEAD_1",
    "DNGN_TREE_DEAD_2",
    "DNGN_TREE_DEAD_3",
    "DNGN_TREE_DEAD_4",
    "DNGN_TREE_OF_WOE",
    "DNGN_TREE_OF_WOE_1",
    "DNGN_TREE_OF_WOE_2",
    "DNGN_TREE_OF_WOE_3",
    "DNGN_DEAD_TREE_OF_WOE",
    "DNGN_DEAD_TREE_OF_WOE_1",
    "DNGN_DEAD_TREE_OF_WOE_2",
    "DNGN_DEAD_TREE_OF_WOE_3",
    "DNGN_MANGROVE",
    "DNGN_MANGROVE_1",
    "DNGN_MANGROVE_2",
    "DNGN_PETRIFIED_TREE",
    "DNGN_PETRIFIED_TREE_1",
    "DNGN_PETRIFIED_TREE_2",
    "DNGN_DEMONIC_TREE",
    "DNGN_DEMONIC_TREE_2",
    "DNGN_DEMONIC_TREE_3",
    "DNGN_DEMONIC_TREE_4",
    "DNGN_DEMONIC_TREE_5",
    "DNGN_DEMONIC_TREE_6",
    "DNGN_DEMONIC_TREE_7",
    "DNGN_DEMONIC_TREE_8",
    "DNGN_DEMONIC_TREE_9",
    "DNGN_DEMONIC_TREE_10",
    "DNGN_DEMONIC_TREE_11",
    "DNGN_DEMONIC_TREE_12",
    "DNGN_DEMONIC_TREE_13",
    "DNGN_DEMONIC_TREE_14",
    "DNGN_DEMONIC_TREE_15",
    "DNGN_DEMONIC_TREE_16",
    "AWOKEN_OVERLAY",
    "DNGN_CLOSED_DOOR",
    "DNGN_GATE_CLOSED_LEFT",
    "DNGN_GATE_CLOSED_MIDDLE",
    "DNGN_GATE_CLOSED_RIGHT",
    "DNGN_VGATE_CLOSED_UP",
    "DNGN_VGATE_CLOSED_MIDDLE",
    "DNGN_VGATE_CLOSED_DOWN",
    "DNGN_OPEN_DOOR",
    "DNGN_GATE_OPEN_LEFT",
    "DNGN_GATE_OPEN_MIDDLE",
    "DNGN_GATE_OPEN_RIGHT",
    "DNGN_VGATE_OPEN_UP",
    "DNGN_VGATE_OPEN_MIDDLE",
    "DNGN_VGATE_OPEN_DOWN",
    "DNGN_RUNED_DOOR",
    "DNGN_GATE_RUNED_LEFT",
    "DNGN_GATE_RUNED_MIDDLE",
    "DNGN_GATE_RUNED_RIGHT",
    "DNGN_VGATE_RUNED_UP",
    "DNGN_VGATE_RUNED_MIDDLE",
    "DNGN_VGATE_RUNED_DOWN",
    "DNGN_SEALED_DOOR",
    "DNGN_GATE_SEALED_LEFT",
    "DNGN_GATE_SEALED_MIDDLE",
    "DNGN_GATE_SEALED_RIGHT",
    "DNGN_VGATE_SEALED_UP",
    "DNGN_VGATE_SEALED_MIDDLE",
    "DNGN_VGATE_SEALED_DOWN",
    "DNGN_BROKEN_DOOR",
    "DNGN_GATE_BROKEN_LEFT",
    "DNGN_GATE_BROKEN_MIDDLE",
    "DNGN_GATE_BROKEN_RIGHT",
    "DNGN_VGATE_BROKEN_UP",
    "DNGN_VGATE_BROKEN_MIDDLE",
    "DNGN_VGATE_BROKEN_DOWN",
    "DNGN_CLOSED_CLEAR_DOOR",
    "DNGN_GATE_CLOSED_CLEAR_LEFT",
    "DNGN_GATE_CLOSED_CLEAR_MIDDLE",
    "DNGN_GATE_CLOSED_CLEAR_RIGHT",
    "DNGN_VGATE_CLOSED_CLEAR_UP",
    "DNGN_VGATE_CLOSED_CLEAR_MIDDLE",
    "DNGN_VGATE_CLOSED_CLEAR_DOWN",
    "DNGN_OPEN_CLEAR_DOOR",
    "DNGN_GATE_OPEN_CLEAR_LEFT",
    "DNGN_GATE_OPEN_CLEAR_MIDDLE",
    "DNGN_GATE_OPEN_CLEAR_RIGHT",
    "DNGN_VGATE_OPEN_CLEAR_UP",
    "DNGN_VGATE_OPEN_CLEAR_MIDDLE",
    "DNGN_VGATE_OPEN_CLEAR_DOWN",
    "DNGN_RUNED_CLEAR_DOOR",
    "DNGN_GATE_RUNED_CLEAR_LEFT",
    "DNGN_GATE_RUNED_CLEAR_MIDDLE",
    "DNGN_GATE_RUNED_CLEAR_RIGHT",
    "DNGN_VGATE_RUNED_CLEAR_UP",
    "DNGN_VGATE_RUNED_CLEAR_MIDDLE",
    "DNGN_VGATE_RUNED_CLEAR_DOWN",
    "DNGN_SEALED_CLEAR_DOOR",
    "DNGN_GATE_SEALED_CLEAR_LEFT",
    "DNGN_GATE_SEALED_CLEAR_MIDDLE",
    "DNGN_GATE_SEALED_CLEAR_RIGHT",
    "DNGN_VGATE_SEALED_CLEAR_UP",
    "DNGN_VGATE_SEALED_CLEAR_MIDDLE",
    "DNGN_VGATE_SEALED_CLEAR_DOWN",
    "DNGN_BROKEN_CLEAR_DOOR",
    "DNGN_GATE_BROKEN_CLEAR_LEFT",
    "DNGN_GATE_BROKEN_CLEAR_MIDDLE",
    "DNGN_GATE_BROKEN_CLEAR_RIGHT",
    "DNGN_VGATE_BROKEN_CLEAR_UP",
    "DNGN_VGATE_BROKEN_CLEAR_MIDDLE",
    "DNGN_VGATE_BROKEN_CLEAR_DOWN",
    "DNGN_CLOSED_DOOR_CRYPT",
    "DNGN_GATE_CLOSED_LEFT_CRYPT",
    "DNGN_GATE_CLOSED_MIDDLE_CRYPT",
    "DNGN_GATE_CLOSED_RIGHT_CRYPT",
    "DNGN_VGATE_CLOSED_UP_CRYPT",
    "DNGN_VGATE_CLOSED_MIDDLE_CRYPT",
    "DNGN_VGATE_CLOSED_DOWN_CRYPT",
    "DNGN_OPEN_DOOR_CRYPT",
    "DNGN_GATE_OPEN_LEFT_CRYPT",
    "DNGN_GATE_OPEN_MIDDLE_CRYPT",
    "DNGN_GATE_OPEN_RIGHT_CRYPT",
    "DNGN_VGATE_OPEN_UP_CRYPT",
    "DNGN_VGATE_OPEN_MIDDLE_CRYPT",
    "DNGN_VGATE_OPEN_DOWN_CRYPT",
    "DNGN_BROKEN_DOOR_CRYPT",
    "DNGN_GATE_BROKEN_LEFT_CRYPT",
    "DNGN_GATE_BROKEN_MIDDLE_CRYPT",
    "DNGN_GATE_BROKEN_RIGHT_CRYPT",
    "DNGN_VGATE_BROKEN_UP_CRYPT",
    "DNGN_VGATE_BROKEN_MIDDLE_CRYPT",
    "DNGN_VGATE_BROKEN_DOWN_CRYPT",
    "DNGN_FLESHY_ORIFICE",
    "DNGN_FLESHY_ORIFICE_1",
    "DNGN_FLESHY_ORIFICE_2",
    "DNGN_STONE_ARCH",
    "DNGN_ORCISH_IDOL",
    "DNGN_METAL_STATUE",
    "DNGN_GRANITE_STATUE",
    "DNGN_STATUE_ARCHER",
    "DNGN_STATUE_TENGU",
    "DNGN_STATUE_CENTAUR",
    "DNGN_STATUE_SNAIL",
    "DNGN_STATUE_CAT",
    "DNGN_STATUE_PRINCESS",
    "DNGN_STATUE_MERMAID",
    "DNGN_STATUE_NAGA",
    "DNGN_STATUE_DRAGON",
    "DNGN_STATUE_HYDRA",
    "DNGN_STATUE_ANGEL",
    "DNGN_STATUE_ELEPHANT",
    "DNGN_STATUE_WRAITH",
    "DNGN_STATUE_IMP",
    "DNGN_STATUE_ORB",
    "DNGN_STATUE_CEREBOV",
    "DNGN_STATUE_DEMONIC_BUST",
    "DNGN_STATUE_TWINS",
    "DNGN_STATUE_ORB_GUARDIAN",
    "DNGN_STATUE_SWORD",
    "DNGN_STATUE_AXE",
    "DNGN_STATUE_POLEARM",
    "DNGN_STATUE_SIGMUND",
    "DNGN_STATUE_ANCIENT_HERO",
    "DNGN_STATUE_ANCIENT_EVIL",
    "DNGN_STATUE_TRIANGLE",
    "DNGN_STATUE_MAW",
    "DNGN_STATUE_TENTACLES",
    "DNGN_GRANITE_STATUE_DEPTHS",
    "DNGN_STATUE_DEPTHS_SPRIGGAN",
    "DNGN_STATUE_DEPTHS_ASMODEUS",
    "DNGN_STATUE_DEPTHS_TOMES",
    "DNGN_STATUE_DEPTHS_SERAPH",
    "DNGN_STATUE_DEPTHS_FANGS",
    "DNGN_GRANITE_STATUE_DEPTHS_ZOT",
    "DNGN_STATUE_DEPTHS_ZOT_ORB_GUARDIAN",
    "DNGN_STATUE_DEPTHS_ZOT_TENTACLES",
    "DNGN_STATUE_DEPTHS_ZOT_ANGEL",
    "DNGN_STATUE_DEPTHS_ZOT_DEVIL",
    "DNGN_STATUE_DEPTHS_ZOT_CEREBOV",
    "DNGN_STATUE_DEPTHS_ZOT_LICH",
    "DNGN_STATUE_DEPTHS_ZOT_ANCIENT_EVIL",
    "DNGN_GRANITE_STATUE_ZOT",
    "DNGN_STATUE_ZOT_SERPENT",
    "DNGN_STATUE_ZOT_OLD_GUARDIAN",
    "DNGN_STATUE_ZOT_TORNADO",
    "DNGN_STATUE_ZOT_OLDEST_GUARDIAN",
    "DNGN_CRUMBLED_COLUMN",
    "DNGN_CRUMBLED_COLUMN_1",
    "DNGN_CRUMBLED_COLUMN_2",
    "DNGN_CRUMBLED_COLUMN_3",
    "DNGN_CRUMBLED_COLUMN_4",
    "DNGN_CRUMBLED_COLUMN_5",
    "DEPTHS_COLUMN",
    "DEPTHS_CRUMBLED_COLUMN",
    "DNGN_STATUE_IRON",
    "DNGN_ZOT_FIRE_STATUE",
    "DNGN_ZOT_WINTER_STATUE",
    "DNGN_ZOT_ENTROPY_STATUE",
    "DNGN_GRAVESTONE",
    "DNGN_GRAVESTONE_1",
    "DNGN_GRAVESTONE_2",
    "DNGN_NECROPOLIS_GRAVESTONE",
    "DNGN_NECROPOLIS_GRAVESTONE_1",
    "DNGN_NECROPOLIS_GRAVESTONE_2",
    "DNGN_ZONGULDROK_SHRINE",
    "DNGN_TELEPORTER_ICE_CAVE",
    "DNGN_GOLDEN_STATUE",
    "DNGN_GOLDEN_STATUE_1",
    "DNGN_GOLDEN_IRON_STATUE",
    "DNGN_OKA_IRON_STATUE",
    "DNGN_OKA_IRON_STATUE_1",
    "DNGN_SILVER_STATUE",
    "DNGN_SILVER_STATUE_1",
    "DNGN_SILVER_STATUE_2",
    "DNGN_SCINTILLATING_STATUE",
    "DNGN_SCINTILLATING_STATUE_1",
    "DNGN_SCINTILLATING_STATUE_2",
    "DNGN_SCINTILLATING_STATUE_3",
    "DNGN_SCINTILLATING_STATUE_4",
    "DNGN_MYSTIC_CAGE",
    "DNGN_MYSTIC_CAGE_1",
    "DNGN_MYSTIC_CAGE_2",
    "ARCANE_CONDUIT",
    "ARCANE_CONDUIT_1",
    "ARCANE_CONDUIT_2",
    "ARCANE_CONDUIT_3",
    "MISFORTUNE_CONDUIT",
    "MISFORTUNE_CONDUIT_1",
    "MISFORTUNE_CONDUIT_2",
    "MISFORTUNE_CONDUIT_3",
    "DIMENSIONAL_CONDUIT",
    "DIMENSIONAL_CONDUIT_1",
    "DIMENSIONAL_CONDUIT_2",
    "DIMENSIONAL_CONDUIT_3",
    "SOUL_CONDUIT",
    "SOUL_CONDUIT_1",
    "SOUL_CONDUIT_2",
    "SOUL_CONDUIT_3",
    "ALCHEMICAL_CONDUIT",
    "ALCHEMICAL_CONDUIT_1",
    "ALCHEMICAL_CONDUIT_2",
    "ALCHEMICAL_CONDUIT_3",
    "FIERY_CONDUIT",
    "FIERY_CONDUIT_1",
    "FIERY_CONDUIT_2",
    "FIERY_CONDUIT_3",
    "ICY_CONDUIT",
    "ICY_CONDUIT_1",
    "ICY_CONDUIT_2",
    "ICY_CONDUIT_3",
    "EARTHEN_CONDUIT",
    "EARTHEN_CONDUIT_1",
    "EARTHEN_CONDUIT_2",
    "EARTHEN_CONDUIT_3",
    "STORM_CONDUIT",
    "STORM_CONDUIT_1",
    "STORM_CONDUIT_2",
    "STORM_CONDUIT_3",
    "DNGN_ENIGMATIC_DYNAMO",
    "DNGN_NASCENCE_CIRCUIT",
    "DNGN_SARCOPHAGUS_SEALED",
    "DNGN_SARCOPHAGUS_PEDESTAL_LEFT",
    "DNGN_SARCOPHAGUS_PEDESTAL_RIGHT",
    "DNGN_STATUE_ELEPHANT_JADE",
    "DNGN_STATUE_IRON_GOLEM",
    "DNGN_DIMENSION_EDGE",
    "DNGN_DISCO_BALL",
    "DNGN_ORB_DAIS",
    "DNGN_MOP",
    "DNGN_MOP_BLOODY",
    "DNGN_YAK_FUR",
    "DNGN_LECTERN",
    "DNGN_FLOWER_POT",
    "DNGN_FLOWER_POT_BROKEN",
    "DNGN_DARK_FLOWER_POT",
    "DNGN_DARK_FLOWER_POT_BROKEN",
    "DNGN_DJEMBE",
    "DNGN_ENSIGN_BEOGH",
    "DNGN_ENSIGN_DARK",
    "DNGN_ENSIGN_GEHENNA",
    "DNGN_BOTTLED_SPIRITS",
    "DNGN_SKULL_PIKE",
    "DNGN_SKULL_PIKE_1",
    "DNGN_STACKED_BOOKS",
    "DNGN_STACKED_BOOKS_1",
    "DNGN_STACKED_BOOKS_2",
    "DNGN_FOUNTAIN_NOVELTY_FANCY",
    "DNGN_FOUNTAIN_NOVELTY_OCTOPODE",
    "DNGN_FOUNTAIN_NOVELTY_LANTERN",
    "DNGN_FOUNTAIN_NOVELTY_XOM",
    "STONE_SMOOTH_WALL_BEOGH",
    "STONE_SMOOTH_WALL_BEOGH_1",
    "DNGN_GILDED_RELIQUARY",
    "DNGN_SPIKE_LAUNCHER",
    "PLACEHOLDER1",
    "PLACEHOLDER2",
    "PLACEHOLDER3",
    "DNGN_TRAP_BOLT",
    "DNGN_TRAP_SPEAR",
    "DNGN_TRAP_NET",
    "DNGN_TRAP_ALARM",
    "DNGN_TRAP_SHAFT",
    "DNGN_TRAP_TYRANT",
    "DNGN_TRAP_ARCHMAGE",
    "DNGN_TRAP_HARLEQUIN",
    "DNGN_TRAP_HARLEQUIN_1",
    "DNGN_TRAP_HARLEQUIN_2",
    "DNGN_TRAP_HARLEQUIN_3",
    "DNGN_TRAP_HARLEQUIN_4",
    "DNGN_TRAP_DEVOURER",
    "DNGN_TRAP_DISPERSAL",
    "DNGN_TRAP_DISPERSAL_INACTIVE",
    "DNGN_TRAP_TELEPORT",
    "DNGN_TRAP_TELEPORT_PERMANENT",
    "DNGN_TRAP_ZOT",
    "DNGN_TRAP_GOLUBRIA",
    "DNGN_TRAP_PLATE",
    "DNGN_BINDING_SIGIL",
    "DNGN_TRAP_WEB",
    "DNGN_TRAP_WEB_1",
    "DNGN_TRAP_WEB_2",
    "DNGN_TRAP_WEB_3",
    "DNGN_TRAP_WEB_4",
    "DNGN_TRAP_WEB_N",
    "DNGN_TRAP_WEB_E",
    "DNGN_TRAP_WEB_NE",
    "DNGN_TRAP_WEB_S",
    "DNGN_TRAP_WEB_NS",
    "DNGN_TRAP_WEB_ES",
    "DNGN_TRAP_WEB_NES",
    "DNGN_TRAP_WEB_W",
    "DNGN_TRAP_WEB_NW",
    "DNGN_TRAP_WEB_EW",
    "DNGN_TRAP_WEB_NEW",
    "DNGN_TRAP_WEB_SW",
    "DNGN_TRAP_WEB_NSW",
    "DNGN_TRAP_WEB_ESW",
    "DNGN_TRAP_WEB_NESW",
    "DNGN_EXIT_DUNGEON",
    "DNGN_STONE_STAIRS_DOWN",
    "DNGN_STONE_STAIRS_UP",
    "DNGN_ESCAPE_HATCH_DOWN",
    "DNGN_ESCAPE_HATCH_UP",
    "DNGN_SHOALS_STAIRS_DOWN",
    "DNGN_SHOALS_STAIRS_UP",
    "DNGN_METAL_STAIRS_DOWN",
    "DNGN_METAL_STAIRS_UP",
    "DNGN_ZOT_STAIRS_DOWN",
    "DNGN_ZOT_STAIRS_UP",
    "DNGN_SLIMY_STAIRS_DOWN",
    "DNGN_SLIMY_STAIRS_UP",
    "DNGN_ENTER",
    "DNGN_RETURN",
    "DNGN_SEALED_STAIRS_UP",
    "DNGN_SEALED_STAIRS_DOWN",
    "DNGN_ONE_WAY_STAIRS_UP",
    "DNGN_ONE_WAY_STAIRS_DOWN",
    "SHOP_GENERAL",
    "SHOP_WEAPONS",
    "SHOP_ARMOUR",
    "SHOP_FOOD",
    "SHOP_BOOKS",
    "SHOP_SCROLLS",
    "SHOP_WANDS",
    "SHOP_JEWELLERY",
    "SHOP_POTIONS",
    "SHOP_GADGETS",
    "DNGN_ABANDONED_SHOP",
    "DNGN_ENTER_ZOT_CLOSED",
    "DNGN_ENTER_ZOT_OPEN",
    "DNGN_RETURN_ZOT",
    "DNGN_ENTER_TEMPLE",
    "DNGN_EXIT_TEMPLE",
    "DNGN_ENTER_ORC",
    "DNGN_EXIT_ORC",
    "DNGN_ENTER_ELF",
    "DNGN_EXIT_ELF",
    "DNGN_ENTER_LAIR",
    "DNGN_EXIT_LAIR",
    "DNGN_ENTER_SNAKE",
    "DNGN_EXIT_SNAKE",
    "DNGN_ENTER_SWAMP",
    "DNGN_EXIT_SWAMP",
    "DNGN_ENTER_SPIDER",
    "DNGN_EXIT_SPIDER",
    "DNGN_ENTER_SHOALS",
    "DNGN_EXIT_SHOALS",
    "DNGN_ENTER_SLIME",
    "DNGN_EXIT_SLIME",
    "DNGN_EXIT_VAULTS_CLOSED",
    "DNGN_ENTER_VAULTS",
    "DNGN_EXIT_VAULTS_OPEN",
    "DNGN_ENTER_DEPTHS",
    "DNGN_RETURN_DEPTHS",
    "DNGN_ENTER_CRYPT",
    "DNGN_EXIT_CRYPT",
    "DNGN_ENTER_TOMB",
    "DNGN_EXIT_TOMB",
    "DNGN_ENTER_HELL",
    "DNGN_ENTER_HELL_1",
    "DNGN_ENTER_HELL_2",
    "DNGN_RETURN_VESTIBULE",
    "DNGN_STONE_ARCH_HELL",
    "DNGN_ENTER_DIS",
    "DNGN_ENTER_DIS_1",
    "DNGN_ENTER_DIS_2",
    "DNGN_ENTER_GEHENNA",
    "DNGN_ENTER_GEHENNA_1",
    "DNGN_ENTER_GEHENNA_2",
    "DNGN_ENTER_COCYTUS",
    "DNGN_ENTER_COCYTUS_1",
    "DNGN_ENTER_COCYTUS_2",
    "DNGN_ENTER_TARTARUS",
    "DNGN_ENTER_TARTARUS_1",
    "DNGN_ENTER_TARTARUS_2",
    "DNGN_RETURN_HELL",
    "DNGN_ENTER_ABYSS",
    "DNGN_ENTER_ABYSS_1",
    "DNGN_ENTER_ABYSS_2",
    "DNGN_EXIT_ABYSS",
    "DNGN_EXIT_ABYSS_1",
    "DNGN_ABYSSAL_STAIR",
    "DNGN_ENTER_PANDEMONIUM",
    "DNGN_PORTAL",
    "DNGN_PORTAL_1",
    "DNGN_PORTAL_EXPIRED",
    "DNGN_STARRY_PORTAL",
    "DNGN_TRANSIT_PANDEMONIUM",
    "DNGN_EXIT_PANDEMONIUM",
    "DNGN_EXIT_PANDEMONIUM_1",
    "DNGN_PORTAL_NECROPOLIS",
    "DNGN_NECROPOLIS_GONE",
    "DNGN_EXIT_NECROPOLIS",
    "DNGN_EXIT_NECROPOLIS_1",
    "DNGN_PORTAL_VOLCANO",
    "DNGN_PORTAL_VOLCANO_GONE",
    "DNGN_EXIT_VOLCANO",
    "DNGN_PORTAL_SEWER",
    "DNGN_EXIT_SEWER",
    "DNGN_PORTAL_SEWER_RUSTED",
    "DNGN_PORTAL_ICE_CAVE",
    "DNGN_PORTAL_ICE_CAVE_GONE",
    "DNGN_PORTAL_GLACIAL_CHASM",
    "DNGN_PORTAL_GLACIAL_CHASM_GONE",
    "DNGN_PORTAL_WIZARD_LAB",
    "DNGN_PORTAL_WIZARD_LAB_1",
    "DNGN_PORTAL_WIZARD_LAB_2",
    "DNGN_PORTAL_WIZARD_LAB_3",
    "DNGN_PORTAL_WIZARD_LAB_4",
    "DNGN_PORTAL_WIZARD_LAB_5",
    "DNGN_PORTAL_WIZARD_LAB_6",
    "DNGN_PORTAL_WIZARD_LAB_7",
    "DNGN_PORTAL_WIZLAB_GONE",
    "DNGN_PORTAL_OSSUARY",
    "DNGN_EXIT_OSSUARY",
    "DNGN_PORTAL_OSSUARY_GONE",
    "DNGN_PORTAL_BAILEY",
    "DNGN_EXIT_BAILEY",
    "DNGN_PORTAL_BAILEY_GONE",
    "DNGN_PORTAL_GAUNTLET",
    "DNGN_PORTAL_GAUNTLET_GONE",
    "DNGN_PORTAL_TROVE",
    "DNGN_PORTAL_TROVE_GONE",
    "DNGN_PORTAL_BAZAAR",
    "DNGN_PORTAL_BAZAAR_GONE",
    "DNGN_PORTAL_ZIGGURAT",
    "DNGN_PORTAL_ZIGGURAT_GONE",
    "DNGN_PORTAL_DESOLATION",
    "DNGN_EXIT_DESOLATION",
    "DNGN_PORTAL_DESOLATION_GONE",
    "DNGN_EXIT_CRUCIBLE",
    "DNGN_UNKNOWN_PORTAL",
    "DNGN_ALTAR_ZIN",
    "DNGN_ALTAR_ZIN_1",
    "DNGN_ALTAR_ZIN_2",
    "DNGN_ALTAR_ZIN_3",
    "DNGN_ALTAR_ZIN_4",
    "DNGN_ALTAR_ZIN_5",
    "DNGN_ALTAR_SHINING_ONE",
    "DNGN_ALTAR_KIKUBAAQUDGHA",
    "DNGN_ALTAR_YREDELEMNUL",
    "DNGN_ALTAR_XOM",
    "DNGN_ALTAR_XOM_1",
    "DNGN_ALTAR_XOM_2",
    "DNGN_ALTAR_XOM_3",
    "DNGN_ALTAR_XOM_4",
    "DNGN_ALTAR_XOM_5",
    "DNGN_ALTAR_XOM_6",
    "DNGN_ALTAR_XOM_7",
    "DNGN_ALTAR_VEHUMET",
    "DNGN_ALTAR_VEHUMET_1",
    "DNGN_ALTAR_OKAWARU",
    "DNGN_ALTAR_MAKHLEB",
    "DNGN_ALTAR_MAKHLEB_1",
    "DNGN_ALTAR_MAKHLEB_2",
    "DNGN_ALTAR_MAKHLEB_3",
    "DNGN_ALTAR_MAKHLEB_4",
    "DNGN_ALTAR_MAKHLEB_5",
    "DNGN_ALTAR_MAKHLEB_6",
    "DNGN_ALTAR_MAKHLEB_7",
    "DNGN_ALTAR_SIF_MUNA",
    "DNGN_ALTAR_SIF_MUNA_1",
    "DNGN_ALTAR_SIF_MUNA_2",
    "DNGN_ALTAR_SIF_MUNA_3",
    "DNGN_ALTAR_TROG",
    "DNGN_ALTAR_NEMELEX_XOBEH",
    "DNGN_ALTAR_NEMELEX_XOBEH_1",
    "DNGN_ALTAR_NEMELEX_XOBEH_2",
    "DNGN_ALTAR_NEMELEX_XOBEH_3",
    "DNGN_ALTAR_NEMELEX_XOBEH_4",
    "DNGN_ALTAR_ELYVILON",
    "DNGN_ALTAR_LUGONU",
    "DNGN_ALTAR_BEOGH",
    "DNGN_ALTAR_JIYVA",
    "DNGN_ALTAR_JIYVA_1",
    "DNGN_ALTAR_JIYVA_2",
    "DNGN_ALTAR_JIYVA_3",
    "DNGN_ALTAR_JIYVA_4",
    "DNGN_ALTAR_JIYVA_5",
    "DNGN_ALTAR_JIYVA_6",
    "DNGN_ALTAR_JIYVA_7",
    "DNGN_ALTAR_JIYVA_8",
    "DNGN_ALTAR_JIYVA_9",
    "DNGN_ALTAR_JIYVA_10",
    "DNGN_ALTAR_JIYVA_11",
    "DNGN_ALTAR_FEDHAS",
    "DNGN_ALTAR_CHEIBRIADOS",
    "DNGN_ALTAR_ASHENZARI",
    "DNGN_ALTAR_DITHMENOS",
    "DNGN_ALTAR_DITHMENOS_1",
    "DNGN_ALTAR_DITHMENOS_2",
    "DNGN_ALTAR_DITHMENOS_3",
    "DNGN_ALTAR_GOZAG",
    "DNGN_ALTAR_GOZAG_1",
    "DNGN_ALTAR_GOZAG_2",
    "DNGN_ALTAR_QAZLAL",
    "DNGN_ALTAR_QAZLAL_1",
    "DNGN_ALTAR_QAZLAL_2",
    "DNGN_ALTAR_RU",
    "DNGN_ALTAR_PAKELLAS",
    "DNGN_ALTAR_PAKELLAS_1",
    "DNGN_ALTAR_PAKELLAS_2",
    "DNGN_ALTAR_PAKELLAS_3",
    "DNGN_ALTAR_USKAYAW",
    "DNGN_ALTAR_HEPLIAKLQANA",
    "DNGN_ALTAR_HEPLIAKLQANA_1",
    "DNGN_ALTAR_HEPLIAKLQANA_2",
    "DNGN_ALTAR_HEPLIAKLQANA_3",
    "DNGN_ALTAR_HEPLIAKLQANA_4",
    "DNGN_ALTAR_HEPLIAKLQANA_5",
    "DNGN_ALTAR_WU_JIAN",
    "DNGN_ALTAR_IGNIS",
    "DNGN_ALTAR_ECUMENICAL",
    "DNGN_UNKNOWN_ALTAR",
    "DNGN_RUNELIGHT",
    "DNGN_RUNELIGHT_1",
    "DNGN_RUNELIGHT_2",
    "DNGN_RUNELIGHT_3",
    "DNGN_FOUNTAIN",
    "DNGN_FOUNTAIN_1",
    "DNGN_SPARKLING_FOUNTAIN",
    "DNGN_SPARKLING_FOUNTAIN_1",
    "DNGN_BLOOD_FOUNTAIN",
    "DNGN_BLOOD_FOUNTAIN_1",
    "DNGN_EYES_FOUNTAIN",
    "DNGN_DRY_FOUNTAIN",
    "DNGN_DRY_FOUNTAIN_WHITE",
    "DNGN_DECORATIVE_FLOOR",
    "DNGN_CACHE_OF_FRUIT",
    "DNGN_CACHE_OF_FRUIT_1",
    "DNGN_CACHE_OF_FRUIT_2",
    "DNGN_CACHE_OF_MEAT",
    "DNGN_CACHE_OF_MEAT_1",
    "DNGN_CACHE_OF_BAKED_GOODS",
    "DNGN_CACHE_OF_BAKED_GOODS_1",
    "DNGN_GARDEN_PATCH",
    "DNGN_FLOWER_PATCH",
    "DNGN_FLOWER_PATCH_1",
    "DNGN_FLOWER_PATCH_2",
    "DNGN_FLOWER_PATCH_3",
    "DNGN_TELEPORTER",
    "DNGN_TRANSPORTER",
    "DNGN_TRANSPORTER_LANDING",
    "BLOOD",
    "BLOOD_1",
    "BLOOD_2",
    "BLOOD_3",
    "BLOOD_4",
    "BLOOD_5",
    "BLOOD_6",
    "BLOOD_7",
    "BLOOD_8",
    "BLOOD_9",
    "BLOOD_10",
    "BLOOD_11",
    "BLOOD_12",
    "BLOOD_13",
    "BLOOD_14",
    "BLOOD_15",
    "BLOOD_16",
    "BLOOD_17",
    "BLOOD_18",
    "BLOOD_19",
    "BLOOD_20",
    "BLOOD_21",
    "BLOOD_22",
    "BLOOD_23",
    "BLOOD_24",
    "BLOOD_25",
    "BLOOD_26",
    "BLOOD_27",
    "BLOOD_28",
    "BLOOD_29",
    "WALL_BLOOD_S",
    "WALL_BLOOD_S_1",
    "WALL_BLOOD_S_2",
    "WALL_BLOOD_S_3",
    "WALL_BLOOD_S_4",
    "WALL_BLOOD_S_5",
    "WALL_BLOOD_S_6",
    "WALL_BLOOD_S_7",
    "WALL_BLOOD_S_8",
    "WALL_BLOOD_S_9",
    "WALL_BLOOD_S_10",
    "WALL_BLOOD_S_11",
    "WALL_BLOOD_S_12",
    "WALL_BLOOD_S_13",
    "WALL_BLOOD_S_14",
    "WALL_BLOOD_S_15",
    "WALL_BLOOD_S_16",
    "WALL_BLOOD_S_17",
    "WALL_BLOOD_W",
    "WALL_BLOOD_W_1",
    "WALL_BLOOD_W_2",
    "WALL_BLOOD_W_3",
    "WALL_BLOOD_W_4",
    "WALL_BLOOD_W_5",
    "WALL_BLOOD_W_6",
    "WALL_BLOOD_W_7",
    "WALL_BLOOD_W_8",
    "WALL_BLOOD_W_9",
    "WALL_BLOOD_W_10",
    "WALL_BLOOD_W_11",
    "WALL_BLOOD_W_12",
    "WALL_BLOOD_W_13",
    "WALL_BLOOD_W_14",
    "WALL_BLOOD_W_15",
    "WALL_BLOOD_W_16",
    "WALL_BLOOD_W_17",
    "WALL_BLOOD_N",
    "WALL_BLOOD_N_1",
    "WALL_BLOOD_N_2",
    "WALL_BLOOD_N_3",
    "WALL_BLOOD_N_4",
    "WALL_BLOOD_N_5",
    "WALL_BLOOD_N_6",
    "WALL_BLOOD_N_7",
    "WALL_BLOOD_N_8",
    "WALL_BLOOD_N_9",
    "WALL_BLOOD_N_10",
    "WALL_BLOOD_N_11",
    "WALL_BLOOD_N_12",
    "WALL_BLOOD_N_13",
    "WALL_BLOOD_N_14",
    "WALL_BLOOD_N_15",
    "WALL_BLOOD_N_16",
    "WALL_BLOOD_N_17",
    "WALL_BLOOD_E",
    "WALL_BLOOD_E_1",
    "WALL_BLOOD_E_2",
    "WALL_BLOOD_E_3",
    "WALL_BLOOD_E_4",
    "WALL_BLOOD_E_5",
    "WALL_BLOOD_E_6",
    "WALL_BLOOD_E_7",
    "WALL_BLOOD_E_8",
    "WALL_BLOOD_E_9",
    "WALL_BLOOD_E_10",
    "WALL_BLOOD_E_11",
    "WALL_BLOOD_E_12",
    "WALL_BLOOD_E_13",
    "WALL_BLOOD_E_14",
    "WALL_BLOOD_E_15",
    "WALL_BLOOD_E_16",
    "WALL_BLOOD_E_17",
    "WALL_OLD_BLOOD",
    "WALL_OLD_BLOOD_1",
    "WALL_OLD_BLOOD_2",
    "WALL_OLD_BLOOD_3",
    "WALL_OLD_BLOOD_4",
    "WALL_OLD_BLOOD_5",
    "WALL_OLD_BLOOD_6",
    "WALL_OLD_BLOOD_7",
    "WALL_OLD_BLOOD_8",
    "WALL_OLD_BLOOD_9",
    "HALO_RANGE",
    "UMBRA",
    "UMBRA_1",
    "UMBRA_2",
    "UMBRA_3",
    "ORB_GLOW",
    "ORB_GLOW_1",
    "QUAD_GLOW",
    "DISJUNCT",
    "DISJUNCT_1",
    "DISJUNCT_2",
    "DISJUNCT_3",
    "LANDING",
    "HEAT_AURA",
    "HEAT_AURA_1",
    "HEAT_AURA_2",
    "HALO_FRIENDLY",
    "HALO_GD_NEUTRAL",
    "HALO_NEUTRAL",
    "HALO_SUMMONER",
    "THREAT_TRIVIAL",
    "THREAT_EASY",
    "THREAT_TOUGH",
    "THREAT_NASTY",
    "THREAT_GHOST_TRIVIAL",
    "THREAT_GHOST_EASY",
    "THREAT_GHOST_TOUGH",
    "THREAT_GHOST_NASTY",
    "THREAT_UNUSUAL",
    "TRAVEL_EXCLUSION_BG",
    "TRAVEL_EXCLUSION_CENTRE_BG",
    "SANCTUARY",
    "BLOOD_FOR_BLOOD",
    "BLASPHEMY",
    "MOLD",
    "MOLD_1",
    "MOLD_2",
    "MOLD_3",
    "GLOWING_MOLD",
    "GLOWING_MOLD_1",
    "GLOWING_MOLD_2",
    "GLOWING_MOLD_3",
    "SILENCED",
    "KRAKEN_OVERLAY_NW",
    "KRAKEN_OVERLAY_NE",
    "KRAKEN_OVERLAY_SE",
    "KRAKEN_OVERLAY_SW",
    "KRAKEN_ZOMBIE_OVERLAY_NW",
    "KRAKEN_ZOMBIE_OVERLAY_NE",
    "KRAKEN_ZOMBIE_OVERLAY_SE",
    "KRAKEN_ZOMBIE_OVERLAY_SW",
    "KRAKEN_SIMULACRUM_OVERLAY_NW",
    "KRAKEN_SIMULACRUM_OVERLAY_NE",
    "KRAKEN_SIMULACRUM_OVERLAY_SE",
    "KRAKEN_SIMULACRUM_OVERLAY_SW",
    "KRAKEN_SPECTRAL_OVERLAY_NW",
    "KRAKEN_SPECTRAL_OVERLAY_NE",
    "KRAKEN_SPECTRAL_OVERLAY_SE",
    "KRAKEN_SPECTRAL_OVERLAY_SW",
    "ELDRITCH_OVERLAY_NW",
    "ELDRITCH_OVERLAY_NE",
    "ELDRITCH_OVERLAY_SE",
    "ELDRITCH_OVERLAY_SW",
    "STARSPAWN_OVERLAY_NW",
    "STARSPAWN_OVERLAY_NE",
    "STARSPAWN_OVERLAY_SE",
    "STARSPAWN_OVERLAY_SW",
    "VINE_OVERLAY_NW",
    "VINE_OVERLAY_NE",
    "VINE_OVERLAY_SE",
    "VINE_OVERLAY_SW",
    "HIGHLIGHT_DARK_YELLOW",
    "HIGHLIGHT_YELLOW",
    "HIGHLIGHT_BRIGHT_YELLOW",
};

const char *tile_feat_name(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_name[idx - TILE_WALL_MAX];
}

static tile_info _tile_feat_info[TILE_FEAT_MAX - TILE_WALL_MAX] =
{
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(0, 0, 0, 0, 0, 0, 0, 0),
    tile_info(32, 32, 0, 0, 0, 0, 32, 32),
    tile_info(32, 32, 0, 0, 32, 0, 64, 32),
    tile_info(32, 32, 0, 0, 64, 0, 96, 32),
};

tile_info &tile_feat_info(tileidx_t idx)
{
    ASSERT_RANGE(idx, TILE_WALL_MAX, TILE_FEAT_MAX);
    return _tile_feat_info[idx - TILE_WALL_MAX];
}


typedef pair<const char*, tileidx_t> _name_pair;

static _name_pair feat_name_pairs[] =
{
    _name_pair("alchemical_conduit", 255 + TILE_WALL_MAX),
    _name_pair("arcane_conduit", 239 + TILE_WALL_MAX),
    _name_pair("awoken_overlay", 57 + TILE_WALL_MAX),
    _name_pair("blasphemy", 745 + TILE_WALL_MAX),
    _name_pair("blood", 600 + TILE_WALL_MAX),
    _name_pair("blood_for_blood", 744 + TILE_WALL_MAX),
    _name_pair("depths_column", 209 + TILE_WALL_MAX),
    _name_pair("depths_crumbled_column", 210 + TILE_WALL_MAX),
    _name_pair("dimensional_conduit", 247 + TILE_WALL_MAX),
    _name_pair("disjunct", 720 + TILE_WALL_MAX),
    _name_pair("dngn_abandoned_shop", 384 + TILE_WALL_MAX),
    _name_pair("dngn_abyssal_stair", 438 + TILE_WALL_MAX),
    _name_pair("dngn_altar_ashenzari", 544 + TILE_WALL_MAX),
    _name_pair("dngn_altar_beogh", 529 + TILE_WALL_MAX),
    _name_pair("dngn_altar_cheibriados", 543 + TILE_WALL_MAX),
    _name_pair("dngn_altar_dithmenos", 545 + TILE_WALL_MAX),
    _name_pair("dngn_altar_ecumenical", 569 + TILE_WALL_MAX),
    _name_pair("dngn_altar_elyvilon", 527 + TILE_WALL_MAX),
    _name_pair("dngn_altar_fedhas", 542 + TILE_WALL_MAX),
    _name_pair("dngn_altar_gozag", 549 + TILE_WALL_MAX),
    _name_pair("dngn_altar_hepliaklqana", 561 + TILE_WALL_MAX),
    _name_pair("dngn_altar_ignis", 568 + TILE_WALL_MAX),
    _name_pair("dngn_altar_jiyva", 530 + TILE_WALL_MAX),
    _name_pair("dngn_altar_kikubaaqudgha", 496 + TILE_WALL_MAX),
    _name_pair("dngn_altar_lugonu", 528 + TILE_WALL_MAX),
    _name_pair("dngn_altar_makhleb", 509 + TILE_WALL_MAX),
    _name_pair("dngn_altar_nemelex_xobeh", 522 + TILE_WALL_MAX),
    _name_pair("dngn_altar_okawaru", 508 + TILE_WALL_MAX),
    _name_pair("dngn_altar_pakellas", 556 + TILE_WALL_MAX),
    _name_pair("dngn_altar_qazlal", 552 + TILE_WALL_MAX),
    _name_pair("dngn_altar_ru", 555 + TILE_WALL_MAX),
    _name_pair("dngn_altar_shining_one", 495 + TILE_WALL_MAX),
    _name_pair("dngn_altar_sif_muna", 517 + TILE_WALL_MAX),
    _name_pair("dngn_altar_trog", 521 + TILE_WALL_MAX),
    _name_pair("dngn_altar_uskayaw", 560 + TILE_WALL_MAX),
    _name_pair("dngn_altar_vehumet", 506 + TILE_WALL_MAX),
    _name_pair("dngn_altar_wu_jian", 567 + TILE_WALL_MAX),
    _name_pair("dngn_altar_xom", 498 + TILE_WALL_MAX),
    _name_pair("dngn_altar_yredelemnul", 497 + TILE_WALL_MAX),
    _name_pair("dngn_altar_zin", 489 + TILE_WALL_MAX),
    _name_pair("dngn_binding_sigil", 334 + TILE_WALL_MAX),
    _name_pair("dngn_blood_fountain", 579 + TILE_WALL_MAX),
    _name_pair("dngn_blue_fountain", 575 + TILE_WALL_MAX),
    _name_pair("dngn_bottled_spirits", 297 + TILE_WALL_MAX),
    _name_pair("dngn_broken_clear_door", 121 + TILE_WALL_MAX),
    _name_pair("dngn_broken_door", 86 + TILE_WALL_MAX),
    _name_pair("dngn_broken_door_crypt", 142 + TILE_WALL_MAX),
    _name_pair("dngn_cache_of_baked_goods", 590 + TILE_WALL_MAX),
    _name_pair("dngn_cache_of_fruit", 585 + TILE_WALL_MAX),
    _name_pair("dngn_cache_of_meat", 588 + TILE_WALL_MAX),
    _name_pair("dngn_cache_of_pizza", 588 + TILE_WALL_MAX),
    _name_pair("dngn_closed_clear_door", 93 + TILE_WALL_MAX),
    _name_pair("dngn_closed_door", 58 + TILE_WALL_MAX),
    _name_pair("dngn_closed_door_crypt", 128 + TILE_WALL_MAX),
    _name_pair("dngn_crumbled_column", 203 + TILE_WALL_MAX),
    _name_pair("dngn_dark_flower_pot", 291 + TILE_WALL_MAX),
    _name_pair("dngn_dark_flower_pot_broken", 292 + TILE_WALL_MAX),
    _name_pair("dngn_dead_tree_of_woe", 31 + TILE_WALL_MAX),
    _name_pair("dngn_decorative_floor", 584 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree", 41 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_1", 41 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_10", 50 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_11", 51 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_12", 52 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_13", 53 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_14", 54 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_15", 55 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_16", 56 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_2", 42 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_3", 43 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_4", 44 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_5", 45 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_6", 46 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_7", 47 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_8", 48 + TILE_WALL_MAX),
    _name_pair("dngn_demonic_tree_9", 49 + TILE_WALL_MAX),
    _name_pair("dngn_dimension_edge", 282 + TILE_WALL_MAX),
    _name_pair("dngn_disco_ball", 283 + TILE_WALL_MAX),
    _name_pair("dngn_djembe", 293 + TILE_WALL_MAX),
    _name_pair("dngn_dry_fountain", 582 + TILE_WALL_MAX),
    _name_pair("dngn_dry_fountain_white", 583 + TILE_WALL_MAX),
    _name_pair("dngn_enigmatic_dynamo", 275 + TILE_WALL_MAX),
    _name_pair("dngn_ensign_beogh", 294 + TILE_WALL_MAX),
    _name_pair("dngn_ensign_dark", 295 + TILE_WALL_MAX),
    _name_pair("dngn_ensign_gehenna", 296 + TILE_WALL_MAX),
    _name_pair("dngn_enter", 368 + TILE_WALL_MAX),
    _name_pair("dngn_enter_abyss", 433 + TILE_WALL_MAX),
    _name_pair("dngn_enter_cocytus", 426 + TILE_WALL_MAX),
    _name_pair("dngn_enter_crypt", 411 + TILE_WALL_MAX),
    _name_pair("dngn_enter_depths", 409 + TILE_WALL_MAX),
    _name_pair("dngn_enter_dis", 420 + TILE_WALL_MAX),
    _name_pair("dngn_enter_elf", 392 + TILE_WALL_MAX),
    _name_pair("dngn_enter_gehenna", 423 + TILE_WALL_MAX),
    _name_pair("dngn_enter_hell", 415 + TILE_WALL_MAX),
    _name_pair("dngn_enter_lair", 394 + TILE_WALL_MAX),
    _name_pair("dngn_enter_orc", 390 + TILE_WALL_MAX),
    _name_pair("dngn_enter_pandemonium", 439 + TILE_WALL_MAX),
    _name_pair("dngn_enter_shoals", 402 + TILE_WALL_MAX),
    _name_pair("dngn_enter_slime", 404 + TILE_WALL_MAX),
    _name_pair("dngn_enter_snake", 396 + TILE_WALL_MAX),
    _name_pair("dngn_enter_spider", 400 + TILE_WALL_MAX),
    _name_pair("dngn_enter_swamp", 398 + TILE_WALL_MAX),
    _name_pair("dngn_enter_tartarus", 429 + TILE_WALL_MAX),
    _name_pair("dngn_enter_temple", 388 + TILE_WALL_MAX),
    _name_pair("dngn_enter_tomb", 413 + TILE_WALL_MAX),
    _name_pair("dngn_enter_vaults", 407 + TILE_WALL_MAX),
    _name_pair("dngn_enter_zot_closed", 385 + TILE_WALL_MAX),
    _name_pair("dngn_enter_zot_open", 386 + TILE_WALL_MAX),
    _name_pair("dngn_escape_hatch_down", 358 + TILE_WALL_MAX),
    _name_pair("dngn_escape_hatch_up", 359 + TILE_WALL_MAX),
    _name_pair("dngn_exit_abyss", 436 + TILE_WALL_MAX),
    _name_pair("dngn_exit_bailey", 474 + TILE_WALL_MAX),
    _name_pair("dngn_exit_crucible", 487 + TILE_WALL_MAX),
    _name_pair("dngn_exit_crypt", 412 + TILE_WALL_MAX),
    _name_pair("dngn_exit_desolation", 485 + TILE_WALL_MAX),
    _name_pair("dngn_exit_dungeon", 355 + TILE_WALL_MAX),
    _name_pair("dngn_exit_elf", 393 + TILE_WALL_MAX),
    _name_pair("dngn_exit_lair", 395 + TILE_WALL_MAX),
    _name_pair("dngn_exit_necropolis", 449 + TILE_WALL_MAX),
    _name_pair("dngn_exit_orc", 391 + TILE_WALL_MAX),
    _name_pair("dngn_exit_ossuary", 471 + TILE_WALL_MAX),
    _name_pair("dngn_exit_pandemonium", 445 + TILE_WALL_MAX),
    _name_pair("dngn_exit_sewer", 455 + TILE_WALL_MAX),
    _name_pair("dngn_exit_shoals", 403 + TILE_WALL_MAX),
    _name_pair("dngn_exit_slime", 405 + TILE_WALL_MAX),
    _name_pair("dngn_exit_snake", 397 + TILE_WALL_MAX),
    _name_pair("dngn_exit_spider", 401 + TILE_WALL_MAX),
    _name_pair("dngn_exit_swamp", 399 + TILE_WALL_MAX),
    _name_pair("dngn_exit_temple", 389 + TILE_WALL_MAX),
    _name_pair("dngn_exit_tomb", 414 + TILE_WALL_MAX),
    _name_pair("dngn_exit_vaults_closed", 406 + TILE_WALL_MAX),
    _name_pair("dngn_exit_vaults_open", 408 + TILE_WALL_MAX),
    _name_pair("dngn_exit_volcano", 453 + TILE_WALL_MAX),
    _name_pair("dngn_eyes_fountain", 581 + TILE_WALL_MAX),
    _name_pair("dngn_fleshy_orifice", 149 + TILE_WALL_MAX),
    _name_pair("dngn_flower_patch", 593 + TILE_WALL_MAX),
    _name_pair("dngn_flower_pot", 289 + TILE_WALL_MAX),
    _name_pair("dngn_flower_pot_broken", 290 + TILE_WALL_MAX),
    _name_pair("dngn_fountain", 575 + TILE_WALL_MAX),
    _name_pair("dngn_fountain_novelty_fancy", 303 + TILE_WALL_MAX),
    _name_pair("dngn_fountain_novelty_lantern", 305 + TILE_WALL_MAX),
    _name_pair("dngn_fountain_novelty_octopode", 304 + TILE_WALL_MAX),
    _name_pair("dngn_fountain_novelty_xom", 306 + TILE_WALL_MAX),
    _name_pair("dngn_garden_patch", 592 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_clear_left", 122 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_clear_middle", 123 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_clear_right", 124 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_left", 87 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_left_crypt", 143 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_middle", 88 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_middle_crypt", 144 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_right", 89 + TILE_WALL_MAX),
    _name_pair("dngn_gate_broken_right_crypt", 145 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_clear_left", 94 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_clear_middle", 95 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_clear_right", 96 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_left", 59 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_left_crypt", 129 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_middle", 60 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_middle_crypt", 130 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_right", 61 + TILE_WALL_MAX),
    _name_pair("dngn_gate_closed_right_crypt", 131 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_clear_left", 101 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_clear_middle", 102 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_clear_right", 103 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_left", 66 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_left_crypt", 136 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_middle", 67 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_middle_crypt", 137 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_right", 68 + TILE_WALL_MAX),
    _name_pair("dngn_gate_open_right_crypt", 138 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_clear_left", 108 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_clear_middle", 109 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_clear_right", 110 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_left", 73 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_middle", 74 + TILE_WALL_MAX),
    _name_pair("dngn_gate_runed_right", 75 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_clear_left", 115 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_clear_middle", 116 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_clear_right", 117 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_left", 80 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_middle", 81 + TILE_WALL_MAX),
    _name_pair("dngn_gate_sealed_right", 82 + TILE_WALL_MAX),
    _name_pair("dngn_gilded_reliquary", 309 + TILE_WALL_MAX),
    _name_pair("dngn_golden_iron_statue", 225 + TILE_WALL_MAX),
    _name_pair("dngn_golden_statue", 223 + TILE_WALL_MAX),
    _name_pair("dngn_granite_statue", 155 + TILE_WALL_MAX),
    _name_pair("dngn_granite_statue_depths", 184 + TILE_WALL_MAX),
    _name_pair("dngn_granite_statue_depths_zot", 190 + TILE_WALL_MAX),
    _name_pair("dngn_granite_statue_zot", 198 + TILE_WALL_MAX),
    _name_pair("dngn_gravestone", 215 + TILE_WALL_MAX),
    _name_pair("dngn_lectern", 288 + TILE_WALL_MAX),
    _name_pair("dngn_mangrove", 35 + TILE_WALL_MAX),
    _name_pair("dngn_metal_stairs_down", 362 + TILE_WALL_MAX),
    _name_pair("dngn_metal_stairs_up", 363 + TILE_WALL_MAX),
    _name_pair("dngn_metal_statue", 154 + TILE_WALL_MAX),
    _name_pair("dngn_mop", 285 + TILE_WALL_MAX),
    _name_pair("dngn_mop_bloody", 286 + TILE_WALL_MAX),
    _name_pair("dngn_mystic_cage", 236 + TILE_WALL_MAX),
    _name_pair("dngn_nascence_circuit", 276 + TILE_WALL_MAX),
    _name_pair("dngn_necropolis_gone", 448 + TILE_WALL_MAX),
    _name_pair("dngn_necropolis_gravestone", 218 + TILE_WALL_MAX),
    _name_pair("dngn_oka_iron_statue", 226 + TILE_WALL_MAX),
    _name_pair("dngn_one_way_stairs_down", 373 + TILE_WALL_MAX),
    _name_pair("dngn_one_way_stairs_up", 372 + TILE_WALL_MAX),
    _name_pair("dngn_open_clear_door", 100 + TILE_WALL_MAX),
    _name_pair("dngn_open_door", 65 + TILE_WALL_MAX),
    _name_pair("dngn_open_door_crypt", 135 + TILE_WALL_MAX),
    _name_pair("dngn_orb_dais", 284 + TILE_WALL_MAX),
    _name_pair("dngn_orcish_idol", 153 + TILE_WALL_MAX),
    _name_pair("dngn_petrified_tree", 38 + TILE_WALL_MAX),
    _name_pair("dngn_portal", 440 + TILE_WALL_MAX),
    _name_pair("dngn_portal_bailey", 473 + TILE_WALL_MAX),
    _name_pair("dngn_portal_bailey_gone", 475 + TILE_WALL_MAX),
    _name_pair("dngn_portal_bazaar", 480 + TILE_WALL_MAX),
    _name_pair("dngn_portal_bazaar_gone", 481 + TILE_WALL_MAX),
    _name_pair("dngn_portal_desolation", 484 + TILE_WALL_MAX),
    _name_pair("dngn_portal_desolation_gone", 486 + TILE_WALL_MAX),
    _name_pair("dngn_portal_expired", 442 + TILE_WALL_MAX),
    _name_pair("dngn_portal_gauntlet", 476 + TILE_WALL_MAX),
    _name_pair("dngn_portal_gauntlet_gone", 477 + TILE_WALL_MAX),
    _name_pair("dngn_portal_glacial_chasm", 459 + TILE_WALL_MAX),
    _name_pair("dngn_portal_glacial_chasm_gone", 460 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ice_cave", 457 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ice_cave_gone", 458 + TILE_WALL_MAX),
    _name_pair("dngn_portal_necropolis", 447 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ossuary", 470 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ossuary_gone", 472 + TILE_WALL_MAX),
    _name_pair("dngn_portal_sewer", 454 + TILE_WALL_MAX),
    _name_pair("dngn_portal_sewer_rusted", 456 + TILE_WALL_MAX),
    _name_pair("dngn_portal_trove", 478 + TILE_WALL_MAX),
    _name_pair("dngn_portal_trove_gone", 479 + TILE_WALL_MAX),
    _name_pair("dngn_portal_volcano", 451 + TILE_WALL_MAX),
    _name_pair("dngn_portal_volcano_gone", 452 + TILE_WALL_MAX),
    _name_pair("dngn_portal_wizard_lab", 461 + TILE_WALL_MAX),
    _name_pair("dngn_portal_wizlab_gone", 469 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ziggurat", 482 + TILE_WALL_MAX),
    _name_pair("dngn_portal_ziggurat_gone", 483 + TILE_WALL_MAX),
    _name_pair("dngn_return", 369 + TILE_WALL_MAX),
    _name_pair("dngn_return_depths", 410 + TILE_WALL_MAX),
    _name_pair("dngn_return_hell", 432 + TILE_WALL_MAX),
    _name_pair("dngn_return_vestibule", 418 + TILE_WALL_MAX),
    _name_pair("dngn_return_zot", 387 + TILE_WALL_MAX),
    _name_pair("dngn_runed_clear_door", 107 + TILE_WALL_MAX),
    _name_pair("dngn_runed_door", 72 + TILE_WALL_MAX),
    _name_pair("dngn_runelight", 571 + TILE_WALL_MAX),
    _name_pair("dngn_sarcophagus_pedestal_left", 278 + TILE_WALL_MAX),
    _name_pair("dngn_sarcophagus_pedestal_right", 279 + TILE_WALL_MAX),
    _name_pair("dngn_sarcophagus_sealed", 277 + TILE_WALL_MAX),
    _name_pair("dngn_scintillating_statue", 231 + TILE_WALL_MAX),
    _name_pair("dngn_sealed_clear_door", 114 + TILE_WALL_MAX),
    _name_pair("dngn_sealed_door", 79 + TILE_WALL_MAX),
    _name_pair("dngn_sealed_stairs_down", 371 + TILE_WALL_MAX),
    _name_pair("dngn_sealed_stairs_up", 370 + TILE_WALL_MAX),
    _name_pair("dngn_shoals_stairs_down", 360 + TILE_WALL_MAX),
    _name_pair("dngn_shoals_stairs_up", 361 + TILE_WALL_MAX),
    _name_pair("dngn_silver_statue", 228 + TILE_WALL_MAX),
    _name_pair("dngn_skull_pike", 298 + TILE_WALL_MAX),
    _name_pair("dngn_slimy_stairs_down", 366 + TILE_WALL_MAX),
    _name_pair("dngn_slimy_stairs_up", 367 + TILE_WALL_MAX),
    _name_pair("dngn_sparkling_fountain", 577 + TILE_WALL_MAX),
    _name_pair("dngn_spike_launcher", 310 + TILE_WALL_MAX),
    _name_pair("dngn_stacked_books", 300 + TILE_WALL_MAX),
    _name_pair("dngn_starry_portal", 443 + TILE_WALL_MAX),
    _name_pair("dngn_statue_ancient_evil", 180 + TILE_WALL_MAX),
    _name_pair("dngn_statue_ancient_hero", 179 + TILE_WALL_MAX),
    _name_pair("dngn_statue_angel", 166 + TILE_WALL_MAX),
    _name_pair("dngn_statue_archer", 156 + TILE_WALL_MAX),
    _name_pair("dngn_statue_axe", 176 + TILE_WALL_MAX),
    _name_pair("dngn_statue_cat", 160 + TILE_WALL_MAX),
    _name_pair("dngn_statue_centaur", 158 + TILE_WALL_MAX),
    _name_pair("dngn_statue_cerebov", 171 + TILE_WALL_MAX),
    _name_pair("dngn_statue_demonic_bust", 172 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_asmodeus", 186 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_fangs", 189 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_seraph", 188 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_spriggan", 185 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_tengu", 184 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_tomes", 187 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_ancient_evil", 197 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_angel", 193 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_cerebov", 195 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_devil", 194 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_dragon", 190 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_lich", 196 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_orb_guardian", 191 + TILE_WALL_MAX),
    _name_pair("dngn_statue_depths_zot_tentacles", 192 + TILE_WALL_MAX),
    _name_pair("dngn_statue_dragon", 164 + TILE_WALL_MAX),
    _name_pair("dngn_statue_dwarf", 155 + TILE_WALL_MAX),
    _name_pair("dngn_statue_elephant", 167 + TILE_WALL_MAX),
    _name_pair("dngn_statue_elephant_jade", 280 + TILE_WALL_MAX),
    _name_pair("dngn_statue_hydra", 165 + TILE_WALL_MAX),
    _name_pair("dngn_statue_imp", 169 + TILE_WALL_MAX),
    _name_pair("dngn_statue_iron", 211 + TILE_WALL_MAX),
    _name_pair("dngn_statue_iron_golem", 281 + TILE_WALL_MAX),
    _name_pair("dngn_statue_maw", 182 + TILE_WALL_MAX),
    _name_pair("dngn_statue_mermaid", 162 + TILE_WALL_MAX),
    _name_pair("dngn_statue_naga", 163 + TILE_WALL_MAX),
    _name_pair("dngn_statue_orb", 170 + TILE_WALL_MAX),
    _name_pair("dngn_statue_orb_guardian", 174 + TILE_WALL_MAX),
    _name_pair("dngn_statue_polearm", 177 + TILE_WALL_MAX),
    _name_pair("dngn_statue_princess", 161 + TILE_WALL_MAX),
    _name_pair("dngn_statue_sigmund", 178 + TILE_WALL_MAX),
    _name_pair("dngn_statue_snail", 159 + TILE_WALL_MAX),
    _name_pair("dngn_statue_sword", 175 + TILE_WALL_MAX),
    _name_pair("dngn_statue_tengu", 157 + TILE_WALL_MAX),
    _name_pair("dngn_statue_tentacles", 183 + TILE_WALL_MAX),
    _name_pair("dngn_statue_triangle", 181 + TILE_WALL_MAX),
    _name_pair("dngn_statue_twins", 173 + TILE_WALL_MAX),
    _name_pair("dngn_statue_wraith", 168 + TILE_WALL_MAX),
    _name_pair("dngn_statue_zot_old_guardian", 200 + TILE_WALL_MAX),
    _name_pair("dngn_statue_zot_oldest_guardian", 202 + TILE_WALL_MAX),
    _name_pair("dngn_statue_zot_orb", 198 + TILE_WALL_MAX),
    _name_pair("dngn_statue_zot_serpent", 199 + TILE_WALL_MAX),
    _name_pair("dngn_statue_zot_tornado", 201 + TILE_WALL_MAX),
    _name_pair("dngn_stone_arch", 152 + TILE_WALL_MAX),
    _name_pair("dngn_stone_arch_hell", 419 + TILE_WALL_MAX),
    _name_pair("dngn_stone_stairs_down", 356 + TILE_WALL_MAX),
    _name_pair("dngn_stone_stairs_up", 357 + TILE_WALL_MAX),
    _name_pair("dngn_teleporter", 597 + TILE_WALL_MAX),
    _name_pair("dngn_teleporter_ice_cave", 222 + TILE_WALL_MAX),
    _name_pair("dngn_transit_pandemonium", 444 + TILE_WALL_MAX),
    _name_pair("dngn_transporter", 598 + TILE_WALL_MAX),
    _name_pair("dngn_transporter_landing", 599 + TILE_WALL_MAX),
    _name_pair("dngn_trap_alarm", 317 + TILE_WALL_MAX),
    _name_pair("dngn_trap_archmage", 320 + TILE_WALL_MAX),
    _name_pair("dngn_trap_bolt", 314 + TILE_WALL_MAX),
    _name_pair("dngn_trap_devourer", 326 + TILE_WALL_MAX),
    _name_pair("dngn_trap_dispersal", 327 + TILE_WALL_MAX),
    _name_pair("dngn_trap_dispersal_inactive", 328 + TILE_WALL_MAX),
    _name_pair("dngn_trap_golubria", 332 + TILE_WALL_MAX),
    _name_pair("dngn_trap_harlequin", 321 + TILE_WALL_MAX),
    _name_pair("dngn_trap_net", 316 + TILE_WALL_MAX),
    _name_pair("dngn_trap_plate", 333 + TILE_WALL_MAX),
    _name_pair("dngn_trap_shaft", 318 + TILE_WALL_MAX),
    _name_pair("dngn_trap_spear", 315 + TILE_WALL_MAX),
    _name_pair("dngn_trap_teleport", 329 + TILE_WALL_MAX),
    _name_pair("dngn_trap_teleport_permanent", 330 + TILE_WALL_MAX),
    _name_pair("dngn_trap_tyrant", 319 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web", 335 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_e", 341 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_es", 345 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_esw", 353 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_ew", 349 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_n", 340 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_ne", 342 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_nes", 346 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_nesw", 354 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_new", 350 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_ns", 344 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_nsw", 352 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_nw", 348 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_s", 343 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_sw", 351 + TILE_WALL_MAX),
    _name_pair("dngn_trap_web_w", 347 + TILE_WALL_MAX),
    _name_pair("dngn_trap_zot", 331 + TILE_WALL_MAX),
    _name_pair("dngn_tree", 0 + TILE_WALL_MAX),
    _name_pair("dngn_tree_dead", 22 + TILE_WALL_MAX),
    _name_pair("dngn_tree_lightred", 17 + TILE_WALL_MAX),
    _name_pair("dngn_tree_of_woe", 27 + TILE_WALL_MAX),
    _name_pair("dngn_tree_red", 19 + TILE_WALL_MAX),
    _name_pair("dngn_tree_yellow", 13 + TILE_WALL_MAX),
    _name_pair("dngn_unknown_altar", 570 + TILE_WALL_MAX),
    _name_pair("dngn_unknown_portal", 488 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_clear_down", 127 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_clear_middle", 126 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_clear_up", 125 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_down", 92 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_down_crypt", 148 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_middle", 91 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_middle_crypt", 147 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_up", 90 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_broken_up_crypt", 146 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_clear_down", 99 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_clear_middle", 98 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_clear_up", 97 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_down", 64 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_down_crypt", 134 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_middle", 63 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_middle_crypt", 133 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_up", 62 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_closed_up_crypt", 132 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_clear_down", 106 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_clear_middle", 105 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_clear_up", 104 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_down", 71 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_down_crypt", 141 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_middle", 70 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_middle_crypt", 140 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_up", 69 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_open_up_crypt", 139 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_clear_down", 113 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_clear_middle", 112 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_clear_up", 111 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_down", 78 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_middle", 77 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_runed_up", 76 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_clear_down", 120 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_clear_middle", 119 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_clear_up", 118 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_down", 85 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_middle", 84 + TILE_WALL_MAX),
    _name_pair("dngn_vgate_sealed_up", 83 + TILE_WALL_MAX),
    _name_pair("dngn_yak_fur", 287 + TILE_WALL_MAX),
    _name_pair("dngn_zonguldrok_shrine", 221 + TILE_WALL_MAX),
    _name_pair("dngn_zot_entropy_statue", 214 + TILE_WALL_MAX),
    _name_pair("dngn_zot_fire_statue", 212 + TILE_WALL_MAX),
    _name_pair("dngn_zot_stairs_down", 364 + TILE_WALL_MAX),
    _name_pair("dngn_zot_stairs_up", 365 + TILE_WALL_MAX),
    _name_pair("dngn_zot_winter_statue", 213 + TILE_WALL_MAX),
    _name_pair("earthen_conduit", 267 + TILE_WALL_MAX),
    _name_pair("eldritch_overlay_ne", 772 + TILE_WALL_MAX),
    _name_pair("eldritch_overlay_nw", 771 + TILE_WALL_MAX),
    _name_pair("eldritch_overlay_se", 773 + TILE_WALL_MAX),
    _name_pair("eldritch_overlay_sw", 774 + TILE_WALL_MAX),
    _name_pair("fiery_conduit", 259 + TILE_WALL_MAX),
    _name_pair("glowing_mold", 750 + TILE_WALL_MAX),
    _name_pair("halo_friendly", 728 + TILE_WALL_MAX),
    _name_pair("halo_gd_neutral", 729 + TILE_WALL_MAX),
    _name_pair("halo_neutral", 730 + TILE_WALL_MAX),
    _name_pair("halo_range", 712 + TILE_WALL_MAX),
    _name_pair("halo_summoner", 731 + TILE_WALL_MAX),
    _name_pair("heat_aura", 725 + TILE_WALL_MAX),
    _name_pair("highlight_bright_yellow", 785 + TILE_WALL_MAX),
    _name_pair("highlight_dark_yellow", 783 + TILE_WALL_MAX),
    _name_pair("highlight_yellow", 784 + TILE_WALL_MAX),
    _name_pair("icy_conduit", 263 + TILE_WALL_MAX),
    _name_pair("kraken_overlay_ne", 756 + TILE_WALL_MAX),
    _name_pair("kraken_overlay_nw", 755 + TILE_WALL_MAX),
    _name_pair("kraken_overlay_se", 757 + TILE_WALL_MAX),
    _name_pair("kraken_overlay_sw", 758 + TILE_WALL_MAX),
    _name_pair("kraken_simulacrum_overlay_ne", 764 + TILE_WALL_MAX),
    _name_pair("kraken_simulacrum_overlay_nw", 763 + TILE_WALL_MAX),
    _name_pair("kraken_simulacrum_overlay_se", 765 + TILE_WALL_MAX),
    _name_pair("kraken_simulacrum_overlay_sw", 766 + TILE_WALL_MAX),
    _name_pair("kraken_spectral_overlay_ne", 768 + TILE_WALL_MAX),
    _name_pair("kraken_spectral_overlay_nw", 767 + TILE_WALL_MAX),
    _name_pair("kraken_spectral_overlay_se", 769 + TILE_WALL_MAX),
    _name_pair("kraken_spectral_overlay_sw", 770 + TILE_WALL_MAX),
    _name_pair("kraken_zombie_overlay_ne", 760 + TILE_WALL_MAX),
    _name_pair("kraken_zombie_overlay_nw", 759 + TILE_WALL_MAX),
    _name_pair("kraken_zombie_overlay_se", 761 + TILE_WALL_MAX),
    _name_pair("kraken_zombie_overlay_sw", 762 + TILE_WALL_MAX),
    _name_pair("landing", 724 + TILE_WALL_MAX),
    _name_pair("misfortune_conduit", 243 + TILE_WALL_MAX),
    _name_pair("mold", 746 + TILE_WALL_MAX),
    _name_pair("orb_glow", 717 + TILE_WALL_MAX),
    _name_pair("placeholder1", 311 + TILE_WALL_MAX),
    _name_pair("placeholder2", 312 + TILE_WALL_MAX),
    _name_pair("placeholder3", 313 + TILE_WALL_MAX),
    _name_pair("quad_glow", 719 + TILE_WALL_MAX),
    _name_pair("ray", 784 + TILE_WALL_MAX),
    _name_pair("ray_multi", 785 + TILE_WALL_MAX),
    _name_pair("ray_out_of_range", 783 + TILE_WALL_MAX),
    _name_pair("sanctuary", 743 + TILE_WALL_MAX),
    _name_pair("shop_armour", 376 + TILE_WALL_MAX),
    _name_pair("shop_books", 378 + TILE_WALL_MAX),
    _name_pair("shop_food", 377 + TILE_WALL_MAX),
    _name_pair("shop_gadgets", 383 + TILE_WALL_MAX),
    _name_pair("shop_general", 374 + TILE_WALL_MAX),
    _name_pair("shop_jewellery", 381 + TILE_WALL_MAX),
    _name_pair("shop_potions", 382 + TILE_WALL_MAX),
    _name_pair("shop_scrolls", 379 + TILE_WALL_MAX),
    _name_pair("shop_wands", 380 + TILE_WALL_MAX),
    _name_pair("shop_weapons", 375 + TILE_WALL_MAX),
    _name_pair("silenced", 754 + TILE_WALL_MAX),
    _name_pair("soul_conduit", 251 + TILE_WALL_MAX),
    _name_pair("starspawn_overlay_ne", 776 + TILE_WALL_MAX),
    _name_pair("starspawn_overlay_nw", 775 + TILE_WALL_MAX),
    _name_pair("starspawn_overlay_se", 777 + TILE_WALL_MAX),
    _name_pair("starspawn_overlay_sw", 778 + TILE_WALL_MAX),
    _name_pair("stone_smooth_wall_beogh", 307 + TILE_WALL_MAX),
    _name_pair("storm_conduit", 271 + TILE_WALL_MAX),
    _name_pair("threat_easy", 733 + TILE_WALL_MAX),
    _name_pair("threat_ghost_easy", 737 + TILE_WALL_MAX),
    _name_pair("threat_ghost_nasty", 739 + TILE_WALL_MAX),
    _name_pair("threat_ghost_tough", 738 + TILE_WALL_MAX),
    _name_pair("threat_ghost_trivial", 736 + TILE_WALL_MAX),
    _name_pair("threat_nasty", 735 + TILE_WALL_MAX),
    _name_pair("threat_tough", 734 + TILE_WALL_MAX),
    _name_pair("threat_trivial", 732 + TILE_WALL_MAX),
    _name_pair("threat_unusual", 740 + TILE_WALL_MAX),
    _name_pair("travel_exclusion_bg", 741 + TILE_WALL_MAX),
    _name_pair("travel_exclusion_centre_bg", 742 + TILE_WALL_MAX),
    _name_pair("umbra", 713 + TILE_WALL_MAX),
    _name_pair("vine_overlay_ne", 780 + TILE_WALL_MAX),
    _name_pair("vine_overlay_nw", 779 + TILE_WALL_MAX),
    _name_pair("vine_overlay_se", 781 + TILE_WALL_MAX),
    _name_pair("vine_overlay_sw", 782 + TILE_WALL_MAX),
    _name_pair("wall_blood_e", 684 + TILE_WALL_MAX),
    _name_pair("wall_blood_n", 666 + TILE_WALL_MAX),
    _name_pair("wall_blood_s", 630 + TILE_WALL_MAX),
    _name_pair("wall_blood_w", 648 + TILE_WALL_MAX),
    _name_pair("wall_old_blood", 702 + TILE_WALL_MAX),
};

bool tile_feat_index(const char *str, tileidx_t *idx)
{
    ASSERT(str);
    if (!str)
        return false;

    string lc = str;
    for (unsigned int i = 0; i < lc.size(); i++)
        lc[i] = toalower(lc[i]);

    int num_pairs = sizeof(feat_name_pairs) / sizeof(feat_name_pairs[0]);
    bool result = binary_search<const char *, tileidx_t>(
       lc.c_str(), &feat_name_pairs[0], num_pairs, &strcmp, idx);
    return result;
}

bool tile_feat_equal(tileidx_t tile, tileidx_t idx)
{
    ASSERT_RANGE(tile, TILE_WALL_MAX, TILE_FEAT_MAX);
    return idx >= tile && idx < tile + tile_feat_count(tile);
}


typedef pair<tile_variation, tileidx_t> _variation_pair;

static _variation_pair feat_colour_pairs[] =
{
    _variation_pair(tile_variation(0, 0), 0),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 1), 27 + TILE_WALL_MAX),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 4), 19 + TILE_WALL_MAX),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 6), 22 + TILE_WALL_MAX),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 9), 31 + TILE_WALL_MAX),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 12), 17 + TILE_WALL_MAX),
    _variation_pair(tile_variation(0 + TILE_WALL_MAX, 14), 13 + TILE_WALL_MAX),
    _variation_pair(tile_variation(582 + TILE_WALL_MAX, 15), 583 + TILE_WALL_MAX),
};

tileidx_t tile_feat_coloured(tileidx_t idx, int col)
{
    int num_pairs = sizeof(feat_colour_pairs) / sizeof(feat_colour_pairs[0]);
    tile_variation key(idx, col);
    tileidx_t found;
    bool result = binary_search<tile_variation, tileidx_t>(
       key, &feat_colour_pairs[0], num_pairs,
       &tile_variation::cmp, &found);
    return (result ? found : idx);
}

static _variation_pair feat_enchant_pairs[] =
{
    _variation_pair(tile_variation(0, 0), 0),
};

tileidx_t tile_feat_enchanted(tileidx_t idx, int ench)
{
    int num_pairs = sizeof(feat_enchant_pairs) / sizeof(feat_enchant_pairs[0]);
    tile_variation key(idx, ench);
    tileidx_t found;
    bool result = binary_search<tile_variation, tileidx_t>(
       key, &feat_enchant_pairs[0], num_pairs,
       &tile_variation::cmp, &found);
    return (result ? found : idx);
}

