9template <std::
size_t N>
10bool contains(
const std::array<std::uint16_t, N>&
values, std::uint16_t
value)
noexcept {
14constexpr std::array<std::uint16_t, 32> cornerFill = {27, 31, 54, 55, 91, 95, 118, 119, 216, 217, 220,
15 221, 283, 287, 310, 311, 347, 351, 374, 375, 432, 433,
16 436, 437, 472, 473, 476, 477, 496, 497, 500, 501};
17constexpr std::array<std::uint16_t, 31> cornerWay = {26, 30, 50, 51, 90, 94, 114, 115, 152, 153, 156,
18 157, 176, 177, 180, 181, 240, 241, 244, 245, 282, 286,
19 306, 307, 346, 370, 371, 408, 409, 412, 413};
20constexpr std::array<std::uint16_t, 32> edgeWay = {56, 57, 60, 61, 120, 121, 124, 125, 146, 147, 150,
21 151, 210, 211, 214, 215, 312, 313, 316, 317, 376, 377,
22 380, 381, 402, 403, 406, 407, 466, 467, 470, 471};
23constexpr std::array<std::uint16_t, 16> edgeFill = {63, 127, 219, 223, 319, 383, 438, 439,
24 475, 479, 502, 503, 504, 505, 508, 509};
25constexpr std::array<std::uint16_t, 16> threeWay = {58, 122, 154, 158, 178, 179, 184, 185,
26 188, 189, 242, 243, 314, 378, 410, 414};
27constexpr std::array<std::uint16_t, 4> threeWayFill = {191, 251, 446, 506};
28constexpr std::array<std::uint16_t, 64> deadEnd = {
29 18, 19, 22, 23, 24, 25, 28, 29, 48, 49, 52, 53, 82, 83, 86, 87, 88, 89, 92, 93, 112, 113,
30 116, 117, 144, 145, 148, 149, 208, 209, 212, 213, 274, 275, 278, 279, 280, 281, 284, 285, 304, 305, 308, 309,
31 338, 339, 342, 343, 344, 345, 348, 349, 368, 369, 372, 373, 400, 401, 404, 405, 464, 465, 468, 469};
32constexpr std::array<std::uint16_t, 16> single = {16, 17, 20, 21, 80, 81, 84, 85,
33 272, 273, 276, 277, 336, 337, 340, 341};
34constexpr std::array<std::uint16_t, 32> edgeCornerFill = {59, 62, 123, 126, 155, 159, 182, 183, 218, 222, 246,
35 247, 248, 249, 252, 253, 315, 318, 379, 382, 411, 415,
36 434, 435, 440, 441, 444, 445, 474, 478, 498, 499};
37constexpr std::array<std::uint16_t, 4> threeCorner = {187, 190, 250, 442};
38constexpr std::array<std::uint16_t, 2> doubleCorner = {254, 443};
39constexpr std::array<std::uint16_t, 4> interiorCorner = {255, 447, 507, 510};
41constexpr std::array<std::uint16_t, 15> rotationZero = {312, 120, 56, 24, 89, 280, 58, 152,
42 186, 95, 218, 222, 434, 474, 498};
43constexpr std::array<std::uint16_t, 65> rotation90 = {
44 22, 23, 18, 19, 82, 83, 86, 87, 274, 275, 278, 279, 338, 339, 342, 343, 146, 147, 151, 210, 211, 214,
45 215, 403, 406, 407, 466, 467, 470, 471, 438, 439, 502, 503, 178, 179, 242, 243, 191, 54, 59, 123, 248, 249,
46 252, 253, 315, 379, 55, 118, 310, 311, 374, 375, 26, 30, 90, 94, 119, 282, 286, 346, 507, 254, 250};
47constexpr std::array<std::uint16_t, 51> rotation180 = {48, 49, 52, 53, 112, 113, 116, 117, 304, 305, 308, 309, 368,
48 369, 372, 373, 50, 51, 114, 115, 306, 307, 370, 371, 504, 505,
49 508, 509, 432, 433, 436, 437, 496, 497, 500, 501, 187, 184, 185,
50 188, 189, 446, 155, 159, 182, 183, 246, 247, 411, 415, 255};
51constexpr std::array<std::uint16_t, 53> rotation270 = {
52 144, 145, 148, 149, 208, 209, 212, 213, 400, 401, 404, 405, 464, 465, 468, 469, 154, 158,
53 410, 414, 506, 216, 217, 220, 472, 476, 473, 477, 176, 177, 180, 181, 221, 240, 241, 244,
54 245, 190, 150, 402, 223, 219, 475, 479, 62, 126, 318, 382, 440, 441, 444, 445, 447};
55constexpr std::array<std::uint16_t, 16>
mirrorX = {59, 123, 182, 183, 218, 222, 246, 247,
56 315, 379, 440, 441, 444, 445, 474, 478};
79 std::uint16_t
c = 1u << 4u;
80 if (
mask & (1u << 0
u))
c |= 1u << 1u;
81 if (
mask & (1u << 1u))
c |= 1u << 5u;
82 if (
mask & (1u << 2u))
c |= 1u << 7u;
83 if (
mask & (1u << 3u))
c |= 1u << 3u;
84 if (
mask & (1u << 4u))
c |= 1u << 2u;
85 if (
mask & (1u << 5u))
c |= 1u << 8u;
86 if (
mask & (1u << 6u))
c |= 1u << 6u;
87 if (
mask & (1u << 7u))
c |= 1u << 0
u;
94 if (contains(rotation90,
c))
96 else if (contains(rotation180,
c))
98 else if (contains(rotation270,
c))
100 else if (contains(rotationZero,
c))
std::map< std::string, Var > values
std::array< float, 4 > rotation
std::string_view tilePresetKindName(TilePresetKind kind) noexcept
Stable lowercase identifier used in mesh build-layer group names.
TilePresetKind
TileWorldCreator-compatible standard-grid tile categories.
std::uint16_t toTilePresetConfiguration(std::uint8_t mask) noexcept
Convert EVEngine's N/E/S/W/NE/SE/SW/NW mask to the reference 3x3 configuration.
TilePresetVariant resolveTilePreset(std::uint8_t mask) noexcept
Resolve the exact TileWorldCreator 4.3.5 standard-grid category and transform tables.
Stable build semantics resolved from one eight-neighbour autotile mask.