Improve parser

dev
Louis Pearson 2022-08-03 01:13:43 -06:00
parent c8c86dd11d
commit c4c8b9c378
3 changed files with 1093 additions and 25 deletions

852
src/AutoLayers_1_basic Normal file
View File

@ -0,0 +1,852 @@
{
"__header__": {
"fileType": "LDtk Project JSON",
"app": "LDtk",
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.1.3",
"url": "https://ldtk.io"
},
"jsonVersion": "1.1.3",
"appBuildId": 458364,
"nextUid": 108,
"identifierStyle": "Capitalize",
"worldLayout": "Free",
"worldGridWidth": 128,
"worldGridHeight": 128,
"defaultLevelWidth": 256,
"defaultLevelHeight": 256,
"defaultPivotX": 0,
"defaultPivotY": 0,
"defaultGridSize": 8,
"bgColor": "#4A5066",
"defaultLevelBgColor": "#1E2027",
"minifyJson": false,
"externalLevels": false,
"exportTiled": false,
"simplifiedExport": false,
"imageExportMode": "None",
"pngFilePattern": null,
"backupOnSave": false,
"backupLimit": 10,
"levelNamePattern": "%world_Level_%idx",
"tutorialDesc": "IntGrid layers can paint tiles automatically using simple RULE SETS.\n\n - Press [SHIFT + R] to toggle auto-layer rendering\n - Click on the RULES button on the left to see/edit rules.",
"flags": ["UseMultilinesType"],
"defs": { "layers": [
{
"__type": "IntGrid",
"identifier": "IntGrid_layer",
"type": "IntGrid",
"uid": 72,
"gridSize": 8,
"guideGridWid": 0,
"guideGridHei": 0,
"displayOpacity": 1,
"inactiveOpacity": 1,
"hideInList": false,
"hideFieldsWhenInactive": true,
"pxOffsetX": 0,
"pxOffsetY": 0,
"parallaxFactorX": 0,
"parallaxFactorY": 0,
"parallaxScaling": true,
"requiredTags": [],
"excludedTags": [],
"intGridValues": [{ "value": 1, "identifier": "walls", "color": "#FFFFFF" }],
"autoTilesetDefUid": 9,
"autoRuleGroups": [
{
"uid": 104,
"name": "Plants",
"active": true,
"isOptional": false,
"rules": [
{
"uid": 99,
"active": true,
"size": 3,
"tileIds": [126,127,147,148],
"chance": 0.65,
"breakOnMatch": false,
"pattern": [0,1,0,0,-1,0,0,0,0],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 2671222,
"perlinScale": 0.2,
"perlinOctaves": 2
}
]
},
{
"uid": 85,
"name": "Dirt",
"active": true,
"isOptional": false,
"rules": [
{
"uid": 95,
"active": true,
"size": 3,
"tileIds": [64],
"chance": 0.3,
"breakOnMatch": false,
"pattern": [0,0,0,0,-1,0,0,1,0],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 336628,
"perlinScale": 0.28,
"perlinOctaves": 2
},
{
"uid": 98,
"active": true,
"size": 3,
"tileIds": [92],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,-1,0,0,1,0,0,-1,0],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 7378060,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 82,
"active": true,
"size": 3,
"tileIds": [51],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,-1,0,-1,1,0,0,0,0],
"flipX": true,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 8451851,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 83,
"active": true,
"size": 3,
"tileIds": [75],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,0,0,-1,1,0,0,-1,0],
"flipX": true,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 182798,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 76,
"active": true,
"size": 3,
"tileIds": [52],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,-1,0,0,1,0,0,0,0],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 5373312,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 84,
"active": true,
"size": 3,
"tileIds": [76],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,0,0,0,1,0,0,-1,0],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 9668495,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 81,
"active": true,
"size": 3,
"tileIds": [63],
"chance": 1,
"breakOnMatch": true,
"pattern": [0,0,0,-1,1,0,0,0,0],
"flipX": true,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 4414423,
"perlinScale": 0.2,
"perlinOctaves": 2
},
{
"uid": 73,
"active": true,
"size": 1,
"tileIds": [1,2,3,4,5,6],
"chance": 1,
"breakOnMatch": true,
"pattern": [1],
"flipX": false,
"flipY": false,
"xModulo": 1,
"yModulo": 1,
"xOffset": 0,
"yOffset": 0,
"checker": "None",
"tileMode": "Single",
"pivotX": 0,
"pivotY": 0,
"outOfBoundsValue": null,
"perlinActive": false,
"perlinSeed": 3417420,
"perlinScale": 0.2,
"perlinOctaves": 2
}
]
}
],
"autoSourceLayerDefUid": null,
"tilesetDefUid": 9,
"tilePivotX": 0,
"tilePivotY": 0
}
], "entities": [], "tilesets": [
{
"__cWid": 12,
"__cHei": 32,
"identifier": "Cavernas_by_Adam_Saltsman",
"uid": 9,
"relPath": "../../../../.cache/appimage-run/51ad79e58777ddefcee1262c7cef942d0e0e128375338c832688df0e0b14318d/extraFiles/samples/atlas/Cavernas_by_Adam_Saltsman.png",
"embedAtlas": null,
"pxWid": 96,
"pxHei": 256,
"tileGridSize": 8,
"spacing": 0,
"padding": 0,
"tags": [],
"tagsSourceEnumUid": null,
"enumTags": [],
"customData": [],
"savedSelections": [
{ "ids": [0,1,2,3,4,5,6], "mode": "Random" },
{ "ids": [120,121,122], "mode": "Random" },
{ "ids": [56,57,58,59], "mode": "Random" },
{ "ids": [32,44,33,45,34,46,35,47], "mode": "Random" },
{ "ids": [9,10], "mode": "Random" },
{ "ids": [20,21,22], "mode": "Random" },
{ "ids": [25,40], "mode": "Random" },
{ "ids": [168,180], "mode": "Stamp" },
{ "ids": [169,181], "mode": "Stamp" },
{ "ids": [170,182], "mode": "Stamp" },
{ "ids": [156,157,158], "mode": "Random" },
{ "ids": [140,141], "mode": "Random" },
{ "ids": [142,143], "mode": "Random" },
{ "ids": [154,155], "mode": "Random" },
{ "ids": [152,153], "mode": "Random" },
{ "ids": [164,165], "mode": "Random" },
{ "ids": [265,277,289], "mode": "Random" },
{ "ids": [266,278,290], "mode": "Random" },
{ "ids": [268,280,292], "mode": "Random" },
{ "ids": [269,281,293], "mode": "Random" },
{ "ids": [252,264,276,288], "mode": "Random" }
],
"cachedPixelData": null
}
], "enums": [], "externalEnums": [], "levelFields": [] },
"levels": [
{
"identifier": "AutoLayer",
"iid": "a2a50ff0-66b0-11ec-9cd7-c721746049b9",
"uid": 70,
"worldX": 0,
"worldY": 40,
"worldDepth": 0,
"pxWid": 296,
"pxHei": 176,
"__bgColor": "#1E2027",
"bgColor": null,
"useAutoIdentifier": false,
"bgRelPath": null,
"bgPos": null,
"bgPivotX": 0.5,
"bgPivotY": 0.5,
"__smartColor": "#838488",
"__bgPos": null,
"externalRelPath": null,
"fieldInstances": [],
"layerInstances": [
{
"__identifier": "IntGrid_layer",
"__type": "IntGrid",
"__cWid": 37,
"__cHei": 22,
"__gridSize": 8,
"__opacity": 1,
"__pxTotalOffsetX": 0,
"__pxTotalOffsetY": 0,
"__tilesetDefUid": 9,
"__tilesetRelPath": "atlas/Cavernas_by_Adam_Saltsman.png",
"iid": "a2a53701-66b0-11ec-9cd7-43934582bcfa",
"levelId": 70,
"layerDefUid": 72,
"pxOffsetX": 0,
"pxOffsetY": 0,
"visible": true,
"optionalRules": [],
"intGridCsv": [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,0,0,
0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,
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,0,0,0,0,0,0,0,0,0,0,
0,0,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,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,1,1,1
],
"autoLayerTiles": [
{ "px": [96,40], "src": [32,0], "f": 0, "t": 4, "d": [73,197] },
{ "px": [104,40], "src": [16,0], "f": 0, "t": 2, "d": [73,198] },
{ "px": [112,40], "src": [40,0], "f": 0, "t": 5, "d": [73,199] },
{ "px": [120,40], "src": [40,0], "f": 0, "t": 5, "d": [73,200] },
{ "px": [128,40], "src": [8,0], "f": 0, "t": 1, "d": [73,201] },
{ "px": [136,40], "src": [40,0], "f": 0, "t": 5, "d": [73,202] },
{ "px": [144,40], "src": [40,0], "f": 0, "t": 5, "d": [73,203] },
{ "px": [152,40], "src": [8,0], "f": 0, "t": 1, "d": [73,204] },
{ "px": [160,40], "src": [16,0], "f": 0, "t": 2, "d": [73,205] },
{ "px": [168,40], "src": [32,0], "f": 0, "t": 4, "d": [73,206] },
{ "px": [176,40], "src": [24,0], "f": 0, "t": 3, "d": [73,207] },
{ "px": [184,40], "src": [8,0], "f": 0, "t": 1, "d": [73,208] },
{ "px": [192,40], "src": [48,0], "f": 0, "t": 6, "d": [73,209] },
{ "px": [200,40], "src": [24,0], "f": 0, "t": 3, "d": [73,210] },
{ "px": [208,40], "src": [40,0], "f": 0, "t": 5, "d": [73,211] },
{ "px": [216,40], "src": [48,0], "f": 0, "t": 6, "d": [73,212] },
{ "px": [224,40], "src": [40,0], "f": 0, "t": 5, "d": [73,213] },
{ "px": [232,40], "src": [32,0], "f": 0, "t": 4, "d": [73,214] },
{ "px": [240,40], "src": [40,0], "f": 0, "t": 5, "d": [73,215] },
{ "px": [248,40], "src": [24,0], "f": 0, "t": 3, "d": [73,216] },
{ "px": [256,40], "src": [16,0], "f": 0, "t": 2, "d": [73,217] },
{ "px": [264,40], "src": [24,0], "f": 0, "t": 3, "d": [73,218] },
{ "px": [272,40], "src": [48,0], "f": 0, "t": 6, "d": [73,219] },
{ "px": [280,40], "src": [24,0], "f": 0, "t": 3, "d": [73,220] },
{ "px": [288,40], "src": [48,0], "f": 0, "t": 6, "d": [73,221] },
{ "px": [208,48], "src": [16,0], "f": 0, "t": 2, "d": [73,248] },
{ "px": [216,48], "src": [8,0], "f": 0, "t": 1, "d": [73,249] },
{ "px": [224,48], "src": [32,0], "f": 0, "t": 4, "d": [73,250] },
{ "px": [232,48], "src": [32,0], "f": 0, "t": 4, "d": [73,251] },
{ "px": [240,48], "src": [32,0], "f": 0, "t": 4, "d": [73,252] },
{ "px": [248,48], "src": [16,0], "f": 0, "t": 2, "d": [73,253] },
{ "px": [256,48], "src": [16,0], "f": 0, "t": 2, "d": [73,254] },
{ "px": [264,48], "src": [32,0], "f": 0, "t": 4, "d": [73,255] },
{ "px": [272,48], "src": [16,0], "f": 0, "t": 2, "d": [73,256] },
{ "px": [280,48], "src": [24,0], "f": 0, "t": 3, "d": [73,257] },
{ "px": [288,48], "src": [8,0], "f": 0, "t": 1, "d": [73,258] },
{ "px": [216,56], "src": [32,0], "f": 0, "t": 4, "d": [73,286] },
{ "px": [224,56], "src": [24,0], "f": 0, "t": 3, "d": [73,287] },
{ "px": [232,56], "src": [32,0], "f": 0, "t": 4, "d": [73,288] },
{ "px": [240,56], "src": [32,0], "f": 0, "t": 4, "d": [73,289] },
{ "px": [248,56], "src": [24,0], "f": 0, "t": 3, "d": [73,290] },
{ "px": [256,56], "src": [8,0], "f": 0, "t": 1, "d": [73,291] },
{ "px": [264,56], "src": [32,0], "f": 0, "t": 4, "d": [73,292] },
{ "px": [272,56], "src": [40,0], "f": 0, "t": 5, "d": [73,293] },
{ "px": [280,56], "src": [16,0], "f": 0, "t": 2, "d": [73,294] },
{ "px": [288,56], "src": [8,0], "f": 0, "t": 1, "d": [73,295] },
{ "px": [0,64], "src": [40,0], "f": 0, "t": 5, "d": [73,296] },
{ "px": [8,64], "src": [16,0], "f": 0, "t": 2, "d": [73,297] },
{ "px": [16,64], "src": [8,0], "f": 0, "t": 1, "d": [73,298] },
{ "px": [24,64], "src": [40,0], "f": 0, "t": 5, "d": [73,299] },
{ "px": [216,64], "src": [24,0], "f": 0, "t": 3, "d": [73,323] },
{ "px": [224,64], "src": [32,0], "f": 0, "t": 4, "d": [73,324] },
{ "px": [232,64], "src": [48,0], "f": 0, "t": 6, "d": [73,325] },
{ "px": [240,64], "src": [48,0], "f": 0, "t": 6, "d": [73,326] },
{ "px": [248,64], "src": [8,0], "f": 0, "t": 1, "d": [73,327] },
{ "px": [256,64], "src": [32,0], "f": 0, "t": 4, "d": [73,328] },
{ "px": [264,64], "src": [16,0], "f": 0, "t": 2, "d": [73,329] },
{ "px": [272,64], "src": [24,0], "f": 0, "t": 3, "d": [73,330] },
{ "px": [280,64], "src": [48,0], "f": 0, "t": 6, "d": [73,331] },
{ "px": [288,64], "src": [32,0], "f": 0, "t": 4, "d": [73,332] },
{ "px": [216,72], "src": [8,0], "f": 0, "t": 1, "d": [73,360] },
{ "px": [224,72], "src": [32,0], "f": 0, "t": 4, "d": [73,361] },
{ "px": [232,72], "src": [40,0], "f": 0, "t": 5, "d": [73,362] },
{ "px": [240,72], "src": [40,0], "f": 0, "t": 5, "d": [73,363] },
{ "px": [248,72], "src": [48,0], "f": 0, "t": 6, "d": [73,364] },
{ "px": [256,72], "src": [8,0], "f": 0, "t": 1, "d": [73,365] },
{ "px": [264,72], "src": [48,0], "f": 0, "t": 6, "d": [73,366] },
{ "px": [272,72], "src": [32,0], "f": 0, "t": 4, "d": [73,367] },
{ "px": [280,72], "src": [24,0], "f": 0, "t": 3, "d": [73,368] },
{ "px": [288,72], "src": [8,0], "f": 0, "t": 1, "d": [73,369] },
{ "px": [216,80], "src": [32,0], "f": 0, "t": 4, "d": [73,397] },
{ "px": [224,80], "src": [40,0], "f": 0, "t": 5, "d": [73,398] },
{ "px": [232,80], "src": [8,0], "f": 0, "t": 1, "d": [73,399] },
{ "px": [240,80], "src": [16,0], "f": 0, "t": 2, "d": [73,400] },
{ "px": [248,80], "src": [16,0], "f": 0, "t": 2, "d": [73,401] },
{ "px": [256,80], "src": [8,0], "f": 0, "t": 1, "d": [73,402] },
{ "px": [264,80], "src": [8,0], "f": 0, "t": 1, "d": [73,403] },
{ "px": [272,80], "src": [8,0], "f": 0, "t": 1, "d": [73,404] },
{ "px": [280,80], "src": [40,0], "f": 0, "t": 5, "d": [73,405] },
{ "px": [288,80], "src": [8,0], "f": 0, "t": 1, "d": [73,406] },
{ "px": [256,88], "src": [40,0], "f": 0, "t": 5, "d": [73,439] },
{ "px": [264,88], "src": [40,0], "f": 0, "t": 5, "d": [73,440] },
{ "px": [272,88], "src": [8,0], "f": 0, "t": 1, "d": [73,441] },
{ "px": [280,88], "src": [40,0], "f": 0, "t": 5, "d": [73,442] },
{ "px": [288,88], "src": [16,0], "f": 0, "t": 2, "d": [73,443] },
{ "px": [112,96], "src": [48,0], "f": 0, "t": 6, "d": [73,458] },
{ "px": [120,96], "src": [48,0], "f": 0, "t": 6, "d": [73,459] },
{ "px": [128,96], "src": [32,0], "f": 0, "t": 4, "d": [73,460] },
{ "px": [136,96], "src": [32,0], "f": 0, "t": 4, "d": [73,461] },
{ "px": [144,96], "src": [24,0], "f": 0, "t": 3, "d": [73,462] },
{ "px": [264,96], "src": [8,0], "f": 0, "t": 1, "d": [73,477] },
{ "px": [272,96], "src": [16,0], "f": 0, "t": 2, "d": [73,478] },
{ "px": [280,96], "src": [8,0], "f": 0, "t": 1, "d": [73,479] },
{ "px": [288,96], "src": [48,0], "f": 0, "t": 6, "d": [73,480] },
{ "px": [48,104], "src": [40,0], "f": 0, "t": 5, "d": [73,487] },
{ "px": [56,104], "src": [24,0], "f": 0, "t": 3, "d": [73,488] },
{ "px": [64,104], "src": [8,0], "f": 0, "t": 1, "d": [73,489] },
{ "px": [96,104], "src": [48,0], "f": 0, "t": 6, "d": [73,493] },
{ "px": [104,104], "src": [16,0], "f": 0, "t": 2, "d": [73,494] },
{ "px": [112,104], "src": [8,0], "f": 0, "t": 1, "d": [73,495] },
{ "px": [120,104], "src": [48,0], "f": 0, "t": 6, "d": [73,496] },
{ "px": [128,104], "src": [8,0], "f": 0, "t": 1, "d": [73,497] },
{ "px": [136,104], "src": [40,0], "f": 0, "t": 5, "d": [73,498] },
{ "px": [144,104], "src": [24,0], "f": 0, "t": 3, "d": [73,499] },
{ "px": [264,104], "src": [8,0], "f": 0, "t": 1, "d": [73,514] },
{ "px": [272,104], "src": [48,0], "f": 0, "t": 6, "d": [73,515] },
{ "px": [280,104], "src": [16,0], "f": 0, "t": 2, "d": [73,516] },
{ "px": [288,104], "src": [32,0], "f": 0, "t": 4, "d": [73,517] },
{ "px": [0,112], "src": [16,0], "f": 0, "t": 2, "d": [73,518] },
{ "px": [8,112], "src": [32,0], "f": 0, "t": 4, "d": [73,519] },
{ "px": [16,112], "src": [32,0], "f": 0, "t": 4, "d": [73,520] },
{ "px": [24,112], "src": [24,0], "f": 0, "t": 3, "d": [73,521] },
{ "px": [32,112], "src": [16,0], "f": 0, "t": 2, "d": [73,522] },
{ "px": [40,112], "src": [48,0], "f": 0, "t": 6, "d": [73,523] },
{ "px": [48,112], "src": [16,0], "f": 0, "t": 2, "d": [73,524] },
{ "px": [56,112], "src": [8,0], "f": 0, "t": 1, "d": [73,525] },
{ "px": [64,112], "src": [40,0], "f": 0, "t": 5, "d": [73,526] },
{ "px": [72,112], "src": [32,0], "f": 0, "t": 4, "d": [73,527] },
{ "px": [80,112], "src": [8,0], "f": 0, "t": 1, "d": [73,528] },
{ "px": [88,112], "src": [40,0], "f": 0, "t": 5, "d": [73,529] },
{ "px": [96,112], "src": [32,0], "f": 0, "t": 4, "d": [73,530] },
{ "px": [104,112], "src": [48,0], "f": 0, "t": 6, "d": [73,531] },
{ "px": [112,112], "src": [32,0], "f": 0, "t": 4, "d": [73,532] },
{ "px": [120,112], "src": [48,0], "f": 0, "t": 6, "d": [73,533] },
{ "px": [128,112], "src": [24,0], "f": 0, "t": 3, "d": [73,534] },
{ "px": [136,112], "src": [32,0], "f": 0, "t": 4, "d": [73,535] },
{ "px": [144,112], "src": [8,0], "f": 0, "t": 1, "d": [73,536] },
{ "px": [264,112], "src": [24,0], "f": 0, "t": 3, "d": [73,551] },
{ "px": [272,112], "src": [32,0], "f": 0, "t": 4, "d": [73,552] },
{ "px": [280,112], "src": [48,0], "f": 0, "t": 6, "d": [73,553] },
{ "px": [288,112], "src": [24,0], "f": 0, "t": 3, "d": [73,554] },
{ "px": [0,120], "src": [8,0], "f": 0, "t": 1, "d": [73,555] },
{ "px": [8,120], "src": [24,0], "f": 0, "t": 3, "d": [73,556] },
{ "px": [16,120], "src": [16,0], "f": 0, "t": 2, "d": [73,557] },
{ "px": [24,120], "src": [24,0], "f": 0, "t": 3, "d": [73,558] },
{ "px": [32,120], "src": [24,0], "f": 0, "t": 3, "d": [73,559] },
{ "px": [40,120], "src": [40,0], "f": 0, "t": 5, "d": [73,560] },
{ "px": [48,120], "src": [24,0], "f": 0, "t": 3, "d": [73,561] },
{ "px": [56,120], "src": [40,0], "f": 0, "t": 5, "d": [73,562] },
{ "px": [64,120], "src": [48,0], "f": 0, "t": 6, "d": [73,563] },
{ "px": [72,120], "src": [16,0], "f": 0, "t": 2, "d": [73,564] },
{ "px": [80,120], "src": [16,0], "f": 0, "t": 2, "d": [73,565] },
{ "px": [88,120], "src": [32,0], "f": 0, "t": 4, "d": [73,566] },
{ "px": [96,120], "src": [48,0], "f": 0, "t": 6, "d": [73,567] },
{ "px": [104,120], "src": [16,0], "f": 0, "t": 2, "d": [73,568] },
{ "px": [112,120], "src": [16,0], "f": 0, "t": 2, "d": [73,569] },
{ "px": [120,120], "src": [16,0], "f": 0, "t": 2, "d": [73,570] },
{ "px": [128,120], "src": [40,0], "f": 0, "t": 5, "d": [73,571] },
{ "px": [136,120], "src": [48,0], "f": 0, "t": 6, "d": [73,572] },
{ "px": [144,120], "src": [40,0], "f": 0, "t": 5, "d": [73,573] },
{ "px": [264,120], "src": [8,0], "f": 0, "t": 1, "d": [73,588] },
{ "px": [272,120], "src": [40,0], "f": 0, "t": 5, "d": [73,589] },
{ "px": [280,120], "src": [40,0], "f": 0, "t": 5, "d": [73,590] },
{ "px": [288,120], "src": [8,0], "f": 0, "t": 1, "d": [73,591] },
{ "px": [0,128], "src": [40,0], "f": 0, "t": 5, "d": [73,592] },
{ "px": [8,128], "src": [8,0], "f": 0, "t": 1, "d": [73,593] },
{ "px": [16,128], "src": [32,0], "f": 0, "t": 4, "d": [73,594] },
{ "px": [24,128], "src": [32,0], "f": 0, "t": 4, "d": [73,595] },
{ "px": [32,128], "src": [32,0], "f": 0, "t": 4, "d": [73,596] },
{ "px": [40,128], "src": [32,0], "f": 0, "t": 4, "d": [73,597] },
{ "px": [48,128], "src": [24,0], "f": 0, "t": 3, "d": [73,598] },
{ "px": [56,128], "src": [40,0], "f": 0, "t": 5, "d": [73,599] },
{ "px": [64,128], "src": [48,0], "f": 0, "t": 6, "d": [73,600] },
{ "px": [72,128], "src": [32,0], "f": 0, "t": 4, "d": [73,601] },
{ "px": [80,128], "src": [16,0], "f": 0, "t": 2, "d": [73,602] },
{ "px": [88,128], "src": [32,0], "f": 0, "t": 4, "d": [73,603] },
{ "px": [96,128], "src": [40,0], "f": 0, "t": 5, "d": [73,604] },
{ "px": [104,128], "src": [24,0], "f": 0, "t": 3, "d": [73,605] },
{ "px": [112,128], "src": [24,0], "f": 0, "t": 3, "d": [73,606] },
{ "px": [120,128], "src": [32,0], "f": 0, "t": 4, "d": [73,607] },
{ "px": [128,128], "src": [40,0], "f": 0, "t": 5, "d": [73,608] },
{ "px": [136,128], "src": [16,0], "f": 0, "t": 2, "d": [73,609] },
{ "px": [144,128], "src": [16,0], "f": 0, "t": 2, "d": [73,610] },
{ "px": [264,128], "src": [24,0], "f": 0, "t": 3, "d": [73,625] },
{ "px": [272,128], "src": [8,0], "f": 0, "t": 1, "d": [73,626] },
{ "px": [280,128], "src": [8,0], "f": 0, "t": 1, "d": [73,627] },
{ "px": [288,128], "src": [40,0], "f": 0, "t": 5, "d": [73,628] },
{ "px": [0,136], "src": [16,0], "f": 0, "t": 2, "d": [73,629] },
{ "px": [8,136], "src": [24,0], "f": 0, "t": 3, "d": [73,630] },
{ "px": [16,136], "src": [16,0], "f": 0, "t": 2, "d": [73,631] },
{ "px": [24,136], "src": [32,0], "f": 0, "t": 4, "d": [73,632] },
{ "px": [32,136], "src": [24,0], "f": 0, "t": 3, "d": [73,633] },
{ "px": [40,136], "src": [8,0], "f": 0, "t": 1, "d": [73,634] },
{ "px": [48,136], "src": [32,0], "f": 0, "t": 4, "d": [73,635] },
{ "px": [56,136], "src": [24,0], "f": 0, "t": 3, "d": [73,636] },
{ "px": [64,136], "src": [16,0], "f": 0, "t": 2, "d": [73,637] },
{ "px": [72,136], "src": [32,0], "f": 0, "t": 4, "d": [73,638] },
{ "px": [80,136], "src": [40,0], "f": 0, "t": 5, "d": [73,639] },
{ "px": [88,136], "src": [24,0], "f": 0, "t": 3, "d": [73,640] },
{ "px": [96,136], "src": [40,0], "f": 0, "t": 5, "d": [73,641] },
{ "px": [104,136], "src": [16,0], "f": 0, "t": 2, "d": [73,642] },
{ "px": [112,136], "src": [48,0], "f": 0, "t": 6, "d": [73,643] },
{ "px": [120,136], "src": [40,0], "f": 0, "t": 5, "d": [73,644] },
{ "px": [128,136], "src": [8,0], "f": 0, "t": 1, "d": [73,645] },
{ "px": [136,136], "src": [40,0], "f": 0, "t": 5, "d": [73,646] },
{ "px": [144,136], "src": [32,0], "f": 0, "t": 4, "d": [73,647] },
{ "px": [264,136], "src": [16,0], "f": 0, "t": 2, "d": [73,662] },
{ "px": [272,136], "src": [32,0], "f": 0, "t": 4, "d": [73,663] },
{ "px": [280,136], "src": [24,0], "f": 0, "t": 3, "d": [73,664] },
{ "px": [288,136], "src": [32,0], "f": 0, "t": 4, "d": [73,665] },
{ "px": [0,144], "src": [40,0], "f": 0, "t": 5, "d": [73,666] },
{ "px": [8,144], "src": [24,0], "f": 0, "t": 3, "d": [73,667] },
{ "px": [16,144], "src": [16,0], "f": 0, "t": 2, "d": [73,668] },
{ "px": [24,144], "src": [16,0], "f": 0, "t": 2, "d": [73,669] },
{ "px": [32,144], "src": [32,0], "f": 0, "t": 4, "d": [73,670] },
{ "px": [40,144], "src": [16,0], "f": 0, "t": 2, "d": [73,671] },
{ "px": [48,144], "src": [32,0], "f": 0, "t": 4, "d": [73,672] },
{ "px": [56,144], "src": [24,0], "f": 0, "t": 3, "d": [73,673] },
{ "px": [64,144], "src": [8,0], "f": 0, "t": 1, "d": [73,674] },
{ "px": [72,144], "src": [24,0], "f": 0, "t": 3, "d": [73,675] },
{ "px": [80,144], "src": [32,0], "f": 0, "t": 4, "d": [73,676] },
{ "px": [88,144], "src": [40,0], "f": 0, "t": 5, "d": [73,677] },
{ "px": [96,144], "src": [24,0], "f": 0, "t": 3, "d": [73,678] },
{ "px": [104,144], "src": [16,0], "f": 0, "t": 2, "d": [73,679] },
{ "px": [112,144], "src": [40,0], "f": 0, "t": 5, "d": [73,680] },
{ "px": [120,144], "src": [16,0], "f": 0, "t": 2, "d": [73,681] },
{ "px": [128,144], "src": [48,0], "f": 0, "t": 6, "d": [73,682] },
{ "px": [136,144], "src": [24,0], "f": 0, "t": 3, "d": [73,683] },
{ "px": [144,144], "src": [48,0], "f": 0, "t": 6, "d": [73,684] },
{ "px": [264,144], "src": [40,0], "f": 0, "t": 5, "d": [73,699] },
{ "px": [272,144], "src": [48,0], "f": 0, "t": 6, "d": [73,700] },
{ "px": [280,144], "src": [40,0], "f": 0, "t": 5, "d": [73,701] },
{ "px": [288,144], "src": [48,0], "f": 0, "t": 6, "d": [73,702] },
{ "px": [0,152], "src": [32,0], "f": 0, "t": 4, "d": [73,703] },
{ "px": [8,152], "src": [24,0], "f": 0, "t": 3, "d": [73,704] },
{ "px": [16,152], "src": [8,0], "f": 0, "t": 1, "d": [73,705] },
{ "px": [24,152], "src": [40,0], "f": 0, "t": 5, "d": [73,706] },
{ "px": [32,152], "src": [16,0], "f": 0, "t": 2, "d": [73,707] },
{ "px": [40,152], "src": [48,0], "f": 0, "t": 6, "d": [73,708] },
{ "px": [48,152], "src": [40,0], "f": 0, "t": 5, "d": [73,709] },
{ "px": [56,152], "src": [8,0], "f": 0, "t": 1, "d": [73,710] },
{ "px": [64,152], "src": [8,0], "f": 0, "t": 1, "d": [73,711] },
{ "px": [72,152], "src": [32,0], "f": 0, "t": 4, "d": [73,712] },
{ "px": [80,152], "src": [16,0], "f": 0, "t": 2, "d": [73,713] },
{ "px": [88,152], "src": [40,0], "f": 0, "t": 5, "d": [73,714] },
{ "px": [96,152], "src": [48,0], "f": 0, "t": 6, "d": [73,715] },
{ "px": [104,152], "src": [40,0], "f": 0, "t": 5, "d": [73,716] },
{ "px": [112,152], "src": [24,0], "f": 0, "t": 3, "d": [73,717] },
{ "px": [120,152], "src": [48,0], "f": 0, "t": 6, "d": [73,718] },
{ "px": [128,152], "src": [8,0], "f": 0, "t": 1, "d": [73,719] },
{ "px": [136,152], "src": [40,0], "f": 0, "t": 5, "d": [73,720] },
{ "px": [144,152], "src": [8,0], "f": 0, "t": 1, "d": [73,721] },
{ "px": [264,152], "src": [16,0], "f": 0, "t": 2, "d": [73,736] },
{ "px": [272,152], "src": [8,0], "f": 0, "t": 1, "d": [73,737] },
{ "px": [280,152], "src": [32,0], "f": 0, "t": 4, "d": [73,738] },
{ "px": [288,152], "src": [48,0], "f": 0, "t": 6, "d": [73,739] },
{ "px": [0,160], "src": [48,0], "f": 0, "t": 6, "d": [73,740] },
{ "px": [8,160], "src": [24,0], "f": 0, "t": 3, "d": [73,741] },
{ "px": [16,160], "src": [16,0], "f": 0, "t": 2, "d": [73,742] },
{ "px": [24,160], "src": [32,0], "f": 0, "t": 4, "d": [73,743] },
{ "px": [32,160], "src": [8,0], "f": 0, "t": 1, "d": [73,744] },
{ "px": [40,160], "src": [48,0], "f": 0, "t": 6, "d": [73,745] },
{ "px": [48,160], "src": [48,0], "f": 0, "t": 6, "d": [73,746] },
{ "px": [56,160], "src": [8,0], "f": 0, "t": 1, "d": [73,747] },
{ "px": [64,160], "src": [32,0], "f": 0, "t": 4, "d": [73,748] },
{ "px": [72,160], "src": [32,0], "f": 0, "t": 4, "d": [73,749] },
{ "px": [80,160], "src": [8,0], "f": 0, "t": 1, "d": [73,750] },
{ "px": [88,160], "src": [8,0], "f": 0, "t": 1, "d": [73,751] },
{ "px": [96,160], "src": [8,0], "f": 0, "t": 1, "d": [73,752] },
{ "px": [104,160], "src": [32,0], "f": 0, "t": 4, "d": [73,753] },
{ "px": [112,160], "src": [24,0], "f": 0, "t": 3, "d": [73,754] },
{ "px": [120,160], "src": [48,0], "f": 0, "t": 6, "d": [73,755] },
{ "px": [128,160], "src": [16,0], "f": 0, "t": 2, "d": [73,756] },
{ "px": [136,160], "src": [16,0], "f": 0, "t": 2, "d": [73,757] },
{ "px": [144,160], "src": [32,0], "f": 0, "t": 4, "d": [73,758] },
{ "px": [264,160], "src": [40,0], "f": 0, "t": 5, "d": [73,773] },
{ "px": [272,160], "src": [8,0], "f": 0, "t": 1, "d": [73,774] },
{ "px": [280,160], "src": [8,0], "f": 0, "t": 1, "d": [73,775] },
{ "px": [288,160], "src": [8,0], "f": 0, "t": 1, "d": [73,776] },
{ "px": [0,168], "src": [16,0], "f": 0, "t": 2, "d": [73,777] },
{ "px": [8,168], "src": [24,0], "f": 0, "t": 3, "d": [73,778] },
{ "px": [16,168], "src": [32,0], "f": 0, "t": 4, "d": [73,779] },
{ "px": [24,168], "src": [8,0], "f": 0, "t": 1, "d": [73,780] },
{ "px": [32,168], "src": [48,0], "f": 0, "t": 6, "d": [73,781] },
{ "px": [40,168], "src": [40,0], "f": 0, "t": 5, "d": [73,782] },
{ "px": [48,168], "src": [24,0], "f": 0, "t": 3, "d": [73,783] },
{ "px": [56,168], "src": [8,0], "f": 0, "t": 1, "d": [73,784] },
{ "px": [64,168], "src": [40,0], "f": 0, "t": 5, "d": [73,785] },
{ "px": [72,168], "src": [40,0], "f": 0, "t": 5, "d": [73,786] },
{ "px": [80,168], "src": [8,0], "f": 0, "t": 1, "d": [73,787] },
{ "px": [88,168], "src": [32,0], "f": 0, "t": 4, "d": [73,788] },
{ "px": [96,168], "src": [40,0], "f": 0, "t": 5, "d": [73,789] },
{ "px": [104,168], "src": [16,0], "f": 0, "t": 2, "d": [73,790] },
{ "px": [112,168], "src": [32,0], "f": 0, "t": 4, "d": [73,791] },
{ "px": [120,168], "src": [48,0], "f": 0, "t": 6, "d": [73,792] },
{ "px": [128,168], "src": [8,0], "f": 0, "t": 1, "d": [73,793] },
{ "px": [136,168], "src": [8,0], "f": 0, "t": 1, "d": [73,794] },
{ "px": [144,168], "src": [8,0], "f": 0, "t": 1, "d": [73,795] },
{ "px": [264,168], "src": [40,0], "f": 0, "t": 5, "d": [73,810] },
{ "px": [272,168], "src": [48,0], "f": 0, "t": 6, "d": [73,811] },
{ "px": [280,168], "src": [32,0], "f": 0, "t": 4, "d": [73,812] },
{ "px": [288,168], "src": [16,0], "f": 0, "t": 2, "d": [73,813] },
{ "px": [88,40], "src": [24,40], "f": 0, "t": 63, "d": [81,196] },
{ "px": [208,56], "src": [24,40], "f": 0, "t": 63, "d": [81,285] },
{ "px": [208,64], "src": [24,40], "f": 0, "t": 63, "d": [81,322] },
{ "px": [208,72], "src": [24,40], "f": 0, "t": 63, "d": [81,359] },
{ "px": [208,80], "src": [24,40], "f": 0, "t": 63, "d": [81,396] },
{ "px": [152,96], "src": [24,40], "f": 1, "t": 63, "d": [81,463] },
{ "px": [256,96], "src": [24,40], "f": 0, "t": 63, "d": [81,476] },
{ "px": [152,104], "src": [24,40], "f": 1, "t": 63, "d": [81,500] },
{ "px": [256,104], "src": [24,40], "f": 0, "t": 63, "d": [81,513] },
{ "px": [152,112], "src": [24,40], "f": 1, "t": 63, "d": [81,537] },
{ "px": [256,112], "src": [24,40], "f": 0, "t": 63, "d": [81,550] },
{ "px": [152,120], "src": [24,40], "f": 1, "t": 63, "d": [81,574] },
{ "px": [256,120], "src": [24,40], "f": 0, "t": 63, "d": [81,587] },
{ "px": [152,128], "src": [24,40], "f": 1, "t": 63, "d": [81,611] },
{ "px": [256,128], "src": [24,40], "f": 0, "t": 63, "d": [81,624] },
{ "px": [152,136], "src": [24,40], "f": 1, "t": 63, "d": [81,648] },
{ "px": [256,136], "src": [24,40], "f": 0, "t": 63, "d": [81,661] },
{ "px": [152,144], "src": [24,40], "f": 1, "t": 63, "d": [81,685] },
{ "px": [256,144], "src": [24,40], "f": 0, "t": 63, "d": [81,698] },
{ "px": [152,152], "src": [24,40], "f": 1, "t": 63, "d": [81,722] },
{ "px": [256,152], "src": [24,40], "f": 0, "t": 63, "d": [81,735] },
{ "px": [152,160], "src": [24,40], "f": 1, "t": 63, "d": [81,759] },
{ "px": [256,160], "src": [24,40], "f": 0, "t": 63, "d": [81,772] },
{ "px": [152,168], "src": [24,40], "f": 1, "t": 63, "d": [81,796] },
{ "px": [256,168], "src": [24,40], "f": 0, "t": 63, "d": [81,809] },
{ "px": [96,48], "src": [32,48], "f": 0, "t": 76, "d": [84,234] },
{ "px": [104,48], "src": [32,48], "f": 0, "t": 76, "d": [84,235] },
{ "px": [112,48], "src": [32,48], "f": 0, "t": 76, "d": [84,236] },
{ "px": [120,48], "src": [32,48], "f": 0, "t": 76, "d": [84,237] },
{ "px": [128,48], "src": [32,48], "f": 0, "t": 76, "d": [84,238] },
{ "px": [136,48], "src": [32,48], "f": 0, "t": 76, "d": [84,239] },
{ "px": [144,48], "src": [32,48], "f": 0, "t": 76, "d": [84,240] },
{ "px": [152,48], "src": [32,48], "f": 0, "t": 76, "d": [84,241] },
{ "px": [160,48], "src": [32,48], "f": 0, "t": 76, "d": [84,242] },
{ "px": [168,48], "src": [32,48], "f": 0, "t": 76, "d": [84,243] },
{ "px": [176,48], "src": [32,48], "f": 0, "t": 76, "d": [84,244] },
{ "px": [184,48], "src": [32,48], "f": 0, "t": 76, "d": [84,245] },
{ "px": [192,48], "src": [32,48], "f": 0, "t": 76, "d": [84,246] },
{ "px": [200,48], "src": [32,48], "f": 0, "t": 76, "d": [84,247] },
{ "px": [32,64], "src": [32,48], "f": 0, "t": 76, "d": [84,300] },
{ "px": [40,64], "src": [32,48], "f": 0, "t": 76, "d": [84,301] },
{ "px": [48,64], "src": [32,48], "f": 0, "t": 76, "d": [84,302] },
{ "px": [0,72], "src": [32,48], "f": 0, "t": 76, "d": [84,333] },
{ "px": [8,72], "src": [32,48], "f": 0, "t": 76, "d": [84,334] },
{ "px": [16,72], "src": [32,48], "f": 0, "t": 76, "d": [84,335] },
{ "px": [216,88], "src": [32,48], "f": 0, "t": 76, "d": [84,434] },
{ "px": [224,88], "src": [32,48], "f": 0, "t": 76, "d": [84,435] },
{ "px": [232,88], "src": [32,48], "f": 0, "t": 76, "d": [84,436] },
{ "px": [240,88], "src": [32,48], "f": 0, "t": 76, "d": [84,437] },
{ "px": [248,88], "src": [32,48], "f": 0, "t": 76, "d": [84,438] },
{ "px": [96,32], "src": [32,32], "f": 0, "t": 52, "d": [76,160] },
{ "px": [104,32], "src": [32,32], "f": 0, "t": 52, "d": [76,161] },
{ "px": [112,32], "src": [32,32], "f": 0, "t": 52, "d": [76,162] },
{ "px": [120,32], "src": [32,32], "f": 0, "t": 52, "d": [76,163] },
{ "px": [128,32], "src": [32,32], "f": 0, "t": 52, "d": [76,164] },
{ "px": [136,32], "src": [32,32], "f": 0, "t": 52, "d": [76,165] },
{ "px": [144,32], "src": [32,32], "f": 0, "t": 52, "d": [76,166] },
{ "px": [152,32], "src": [32,32], "f": 0, "t": 52, "d": [76,167] },
{ "px": [160,32], "src": [32,32], "f": 0, "t": 52, "d": [76,168] },
{ "px": [168,32], "src": [32,32], "f": 0, "t": 52, "d": [76,169] },
{ "px": [176,32], "src": [32,32], "f": 0, "t": 52, "d": [76,170] },
{ "px": [184,32], "src": [32,32], "f": 0, "t": 52, "d": [76,171] },
{ "px": [192,32], "src": [32,32], "f": 0, "t": 52, "d": [76,172] },
{ "px": [200,32], "src": [32,32], "f": 0, "t": 52, "d": [76,173] },
{ "px": [208,32], "src": [32,32], "f": 0, "t": 52, "d": [76,174] },
{ "px": [216,32], "src": [32,32], "f": 0, "t": 52, "d": [76,175] },
{ "px": [224,32], "src": [32,32], "f": 0, "t": 52, "d": [76,176] },
{ "px": [232,32], "src": [32,32], "f": 0, "t": 52, "d": [76,177] },
{ "px": [240,32], "src": [32,32], "f": 0, "t": 52, "d": [76,178] },
{ "px": [248,32], "src": [32,32], "f": 0, "t": 52, "d": [76,179] },
{ "px": [256,32], "src": [32,32], "f": 0, "t": 52, "d": [76,180] },
{ "px": [264,32], "src": [32,32], "f": 0, "t": 52, "d": [76,181] },
{ "px": [272,32], "src": [32,32], "f": 0, "t": 52, "d": [76,182] },
{ "px": [280,32], "src": [32,32], "f": 0, "t": 52, "d": [76,183] },
{ "px": [288,32], "src": [32,32], "f": 0, "t": 52, "d": [76,184] },
{ "px": [0,56], "src": [32,32], "f": 0, "t": 52, "d": [76,259] },
{ "px": [8,56], "src": [32,32], "f": 0, "t": 52, "d": [76,260] },
{ "px": [16,56], "src": [32,32], "f": 0, "t": 52, "d": [76,261] },
{ "px": [24,56], "src": [32,32], "f": 0, "t": 52, "d": [76,262] },
{ "px": [32,56], "src": [32,32], "f": 0, "t": 52, "d": [76,263] },
{ "px": [40,56], "src": [32,32], "f": 0, "t": 52, "d": [76,264] },
{ "px": [48,56], "src": [32,32], "f": 0, "t": 52, "d": [76,265] },
{ "px": [120,88], "src": [32,32], "f": 0, "t": 52, "d": [76,422] },
{ "px": [128,88], "src": [32,32], "f": 0, "t": 52, "d": [76,423] },
{ "px": [136,88], "src": [32,32], "f": 0, "t": 52, "d": [76,424] },
{ "px": [144,88], "src": [32,32], "f": 0, "t": 52, "d": [76,425] },
{ "px": [152,88], "src": [32,32], "f": 0, "t": 52, "d": [76,426] },
{ "px": [56,96], "src": [32,32], "f": 0, "t": 52, "d": [76,451] },
{ "px": [104,96], "src": [32,32], "f": 0, "t": 52, "d": [76,457] },
{ "px": [0,104], "src": [32,32], "f": 0, "t": 52, "d": [76,481] },
{ "px": [8,104], "src": [32,32], "f": 0, "t": 52, "d": [76,482] },
{ "px": [16,104], "src": [32,32], "f": 0, "t": 52, "d": [76,483] },
{ "px": [24,104], "src": [32,32], "f": 0, "t": 52, "d": [76,484] },
{ "px": [32,104], "src": [32,32], "f": 0, "t": 52, "d": [76,485] },
{ "px": [40,104], "src": [32,32], "f": 0, "t": 52, "d": [76,486] },
{ "px": [72,104], "src": [32,32], "f": 0, "t": 52, "d": [76,490] },
{ "px": [80,104], "src": [32,32], "f": 0, "t": 52, "d": [76,491] },
{ "px": [88,104], "src": [32,32], "f": 0, "t": 52, "d": [76,492] },
{ "px": [88,48], "src": [24,48], "f": 0, "t": 75, "d": [83,233] },
{ "px": [56,64], "src": [24,48], "f": 1, "t": 75, "d": [83,303] },
{ "px": [24,72], "src": [24,48], "f": 1, "t": 75, "d": [83,336] },
{ "px": [208,88], "src": [24,48], "f": 0, "t": 75, "d": [83,433] },
{ "px": [88,32], "src": [24,32], "f": 0, "t": 51, "d": [82,159] },
{ "px": [56,56], "src": [24,32], "f": 1, "t": 51, "d": [82,266] },
{ "px": [112,88], "src": [24,32], "f": 0, "t": 51, "d": [82,421] },
{ "px": [48,96], "src": [24,32], "f": 0, "t": 51, "d": [82,450] },
{ "px": [64,96], "src": [24,32], "f": 1, "t": 51, "d": [82,452] },
{ "px": [96,96], "src": [24,32], "f": 0, "t": 51, "d": [82,456] },
{ "px": [160,88], "src": [64,56], "f": 0, "t": 92, "d": [98,427] },
{ "px": [168,88], "src": [64,56], "f": 0, "t": 92, "d": [98,428] },
{ "px": [112,24], "src": [32,40], "f": 0, "t": 64, "d": [95,125] },
{ "px": [152,24], "src": [32,40], "f": 0, "t": 64, "d": [95,130] },
{ "px": [176,24], "src": [32,40], "f": 0, "t": 64, "d": [95,133] },
{ "px": [224,24], "src": [32,40], "f": 0, "t": 64, "d": [95,139] },
{ "px": [248,24], "src": [32,40], "f": 0, "t": 64, "d": [95,142] },
{ "px": [288,24], "src": [32,40], "f": 0, "t": 64, "d": [95,147] },
{ "px": [24,48], "src": [32,40], "f": 0, "t": 64, "d": [95,225] },
{ "px": [120,80], "src": [32,40], "f": 0, "t": 64, "d": [95,385] },
{ "px": [128,80], "src": [32,40], "f": 0, "t": 64, "d": [95,386] },
{ "px": [168,80], "src": [32,40], "f": 0, "t": 64, "d": [95,391] },
{ "px": [96,88], "src": [32,40], "f": 0, "t": 64, "d": [95,419] },
{ "px": [16,96], "src": [32,40], "f": 0, "t": 64, "d": [95,446] },
{ "px": [40,96], "src": [32,40], "f": 0, "t": 64, "d": [95,449] },
{ "px": [72,96], "src": [32,40], "f": 0, "t": 64, "d": [95,453] },
{ "px": [96,56], "src": [48,80], "f": 0, "t": 126, "d": [99,271] },
{ "px": [112,56], "src": [32,96], "f": 0, "t": 148, "d": [99,273] },
{ "px": [120,56], "src": [48,80], "f": 0, "t": 126, "d": [99,274] },
{ "px": [128,56], "src": [48,80], "f": 0, "t": 126, "d": [99,275] },
{ "px": [136,56], "src": [56,80], "f": 0, "t": 127, "d": [99,276] },
{ "px": [160,56], "src": [56,80], "f": 0, "t": 127, "d": [99,279] },
{ "px": [176,56], "src": [32,96], "f": 0, "t": 148, "d": [99,281] },
{ "px": [184,56], "src": [24,96], "f": 0, "t": 147, "d": [99,282] },
{ "px": [32,72], "src": [56,80], "f": 0, "t": 127, "d": [99,337] },
{ "px": [40,72], "src": [48,80], "f": 0, "t": 126, "d": [99,338] },
{ "px": [48,72], "src": [24,96], "f": 0, "t": 147, "d": [99,339] },
{ "px": [56,72], "src": [32,96], "f": 0, "t": 148, "d": [99,340] },
{ "px": [8,80], "src": [48,80], "f": 0, "t": 126, "d": [99,371] },
{ "px": [16,80], "src": [48,80], "f": 0, "t": 126, "d": [99,372] },
{ "px": [168,96], "src": [24,96], "f": 0, "t": 147, "d": [99,465] },
{ "px": [232,96], "src": [24,96], "f": 0, "t": 147, "d": [99,473] },
{ "px": [240,96], "src": [56,80], "f": 0, "t": 127, "d": [99,474] },
{ "px": [248,96], "src": [56,80], "f": 0, "t": 127, "d": [99,475] }
],
"seed": 6134941,
"overrideTilesetUid": null,
"gridTiles": [],
"entityInstances": []
}
],
"__neighbours": []
}
],
"worlds": []
}

View File

@ -1,25 +1,71 @@
const std = @import("std"); const std = @import("std");
// pub fn parse(parser: *std.json.Parser, json_string: []const u8) !std.json.Value { const json = struct {
// const value_tree = try parser.parse(json_string); pub fn object(value_opt: ?std.json.Value) ?std.json.ObjectMap {
// value_tree.root.dump(); const value = value_opt orelse return null;
return switch (value) {
.Object => |obj| obj,
else => null,
};
}
// const root_obj = switch (value_tree.root) { pub fn array(value_opt: ?std.json.Value) ?std.json.Array {
// .Object => |obj| obj, const value = value_opt orelse return null;
// else => return error.InvalidRoot, return switch (value) {
// }; .Array => |arr| arr,
// _ = root_obj; else => null,
// // const root = Root { };
// // name: root_obj.get("name") orelse error.InvalidRoot, }
// // version: root_obj.get("jsonVersion") orelse error.InvalidRoot,
// // defaultPivotX: root_obj.get("defaultPivotX") orelse error.InvalidRoot, pub fn string(value_opt: ?std.json.Value) ?[]const u8 {
// // defaultPivotY: root_obj.get("defaultPivotY") orelse error.InvalidRoot, const value = value_opt orelse return null;
// // defaultGridSize: root_obj.get("defaultGridSize") orelse error.InvalidRoot, return switch (value) {
// // name: root_obj.get("name") orelse error.InvalidRoot, .String => |str| str,
// // }; else => null,
};
}
pub fn boolean(value_opt: ?std.json.Value) ?bool {
const value = value_opt orelse return null;
return switch (value) {
.Bool => |b| b,
else => null,
};
}
pub fn integer(value_opt: ?std.json.Value) ?i64 {
const value = value_opt orelse return null;
return switch (value) {
.Integer => |int| int,
else => null,
};
}
pub fn enum_from_value(comptime T: type, value_opt: ?std.json.Value) ?T {
const value = value_opt orelse return null;
return switch (value) {
.String => |str| std.meta.stringToEnum(T, str),
else => null,
};
}
pub fn pos_from_value(value_opt: ?std.json.Value) ?[2]i64 {
const value = array(value_opt) orelse return null;
return .{
integer(value[0]) orelse return null,
integer(value[1]) orelse return null,
};
}
pub fn posf_from_value(value_opt: ?std.json.Value) ?[2]i64 {
const value = array(value_opt) orelse return null;
return .{
float(value[0]) orelse return null,
float(value[1]) orelse return null,
};
}
};
// return Root{};
// }
/// 1. LDtk Json root /// 1. LDtk Json root
pub const Root = struct { pub const Root = struct {
@ -81,17 +127,29 @@ pub const Neighbour = struct {
}; };
/// 2.1. Layer instance /// 2.1. Layer instance
const LayerInstance = struct { pub const LayerInstance = struct {
/// Grid-based height
__cHei: i64, __cHei: i64,
/// Grid-based width
__cWid: i64, __cWid: i64,
/// Grid size
__gridSize: i64, __gridSize: i64,
/// Layer definition identifier
__identifier: []const u8, __identifier: []const u8,
/// Layer opacity as Float [0-1]
__opacity: f64, __opacity: f64,
/// Total layer X pixel offset, including both instance and definition offsets
__pxTotalOffsetX: i64, __pxTotalOffsetX: i64,
/// Total layer Y pixel offset, including both instance and definition offsets
__pxTotalOffsetY: i64, __pxTotalOffsetY: i64,
/// The definition UID of corresponding Tileset, if any
__tilesetDefUid: ?i64, __tilesetDefUid: ?i64,
/// The relative path to corresponding Tileset, if any
__tilesetRelPath: ?[]const u8, __tilesetRelPath: ?[]const u8,
__type: []const u8, /// Layer type (possible values: IntGrid, Entities, Tiles, or AutoLayer)
__type: LayerType,
/// An array containing all tiles generated by Auto-layer rules. The array is laready sorted in display order (ie. 1st tile is beneath 2nd, which is beneath 3rd etc.).
/// Note: if multiple tiles are stacked in the same cell as the result of rules, all tiles behind opaque ones will be discarded.
autoLayerTiles: []TileInstance, autoLayerTiles: []TileInstance,
entityInstances: []EntityInstance, entityInstances: []EntityInstance,
gridTiles: []TileInstance, gridTiles: []TileInstance,
@ -106,11 +164,58 @@ const LayerInstance = struct {
/// WARNING: this deprecated value is no longer exported since version 1.0.0 /// WARNING: this deprecated value is no longer exported since version 1.0.0
/// Replaced by: intGridCsv /// Replaced by: intGridCsv
intGrid: ?[][]const u8 = null, intGrid: ?[][]const u8 = null,
// seed: i64,
// autoTiles: []AutoTile, pub fn fromJSON(alloc: std.mem.Allocator, layer_value: std.json.Value) !LayerInstance {
const layer_obj = object(layer_value) orelse return error.InvalidLayer;
const __type = enum_from_value(LayerType, layer.get("__type")) orelse return error.InvalidType;
const grid = grid: {
if (__type == .IntGrid and array(layer.get("intGridCsv"))) |intGridCsv| grid: {
const grid = std.ArrayList(i64).initCapacity(alloc, intGridCsv.items.len);
defer grid.deinit();
for (grid) |int| {
grid.appendAssumeCapacity(integer(int) orelse return error.InvalidInt);
}
break :grid grid.toOwnedSlice();
}
break :grid &[0]i64{};
};
return LayerInstance {
.__cHei = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.__cWid = integer(layer_obj.get("__cWid")) orelse return error.InvalidCWid,
.__gridSize = integer(layer_obj.get("__gridSize")) orelse return error.InvalidGridSize,
.__identifier = string(layer_obj.get("__identifier")) orelse return error.InvalidIdentifier,
.__opacity = float(layer_obj.get("__opacity")) orelse return error.InvalidOpacity,
.__pxTotalOffsetX = integer(layer_obj.get("__pxTotalOffsetX")) orelse return error.InvalidTotalOffsetX,
.__pxTotalOffsetY = integer(layer_obj.get("__pxTotalOffsetY")) orelse return error.InvalidTotalOffsetY,
.__tilesetDefUid = integer(layer_obj.get("__tilesetDefUid")) orelse return error.InvalidTilesetDefUid,
.__tilesetRelPath = integer(layer_obj.get("__tilesetRelPath")) orelse return error.InvalidTilesetRelPath,
.__type = __type,
.autoLayerTiles = try TileInstance.fromJSON(alloc, layer_obj.get("autoLayerTiles")),
.entityInstances = try EntityInstance.fromJSON(alloc, layer_obj.get("entityInstances")),
.gridTiles = try TileInstance.fromJSON(alloc, layer_obj.get("gridTiles")),
.iid = string(layer_obj.get("iid")) orelse return error.InvalidIID,
.intGridCsv = grid,
.levelId = integer(layer_obj.get("levelId")) orelse return error.InvalidLevelId,
.overrideTilesetUid = integer(layer_obj.get("overrideTilesetUid")) orelse return error.InvalidOverrideTilesetUid,
.pxOffsetX = integer(layer_obj.get("pxOffsetX")) orelse return error.InvalidPxOffsetX,
.pxOffsetY = integer(layer_obj.get("pxOffsetY")) orelse return error.InvalidPxOffsetY,
.visible = boolean(layer_obj.get("visible")) orelse return error.InvalidVisible,
};
}
pub fn fromJSONMany(alloc: std.mem.Allocator, layers: std.json.Array) ![]LayerInstance {
var ldtk_layers = try std.ArrayList(LayerInstance).initCapacity(alloc, layers.items.len);
defer ldtk_layers.deinit(); // levels will be returned using toOwnedSlice
for (layers.items) |layer_value| {
ldtk_layers.appendAssumeCapacity(try fromJSON(layer_value));
}
return ldtk_layers.toOwnedSlice();
}
}; };
const __Type = enum { const LayerType = enum {
IntGrid, IntGrid,
Entities, Entities,
Tiles, Tiles,
@ -119,10 +224,29 @@ const __Type = enum {
/// 2.2. Tile instance /// 2.2. Tile instance
const TileInstance = struct { const TileInstance = struct {
/// "Flip bits", a 2-bits integer to represent the mirror transformations of the tile.
/// - Bit 0 = X flip
/// - Bit 1 = Y flip
f: FlipBits, f: FlipBits,
/// Pixel coordinates of the tile in the layer ([x, y] format). Don't forget optional layer offsets, if they exist!
px: [2]i64, px: [2]i64,
/// Pixel coordinates of the tile in the tileset ([x, y] format)
src: [2]i64, src: [2]i64,
/// The Tile ID in the corresponding tileset
t: i64, t: i64,
pub fn fromJSON(tile: std.json.Value) !TileInstance {
const f = @intToEnum(FlipBits, integer(tile.get("f")) orelse return error.InvalidFlipBits);
const px = pos_from_value(tile.get("px")) orelse return error.InvalidPx;
const src = pos_from_value(tile.get("src")) orelse return error.InvalidSrc;
const t = integer(tile.get("t")) orelse return error.InvalidT;
return TileInstance{
.f = f,
.px = px,
.src = src,
.t = t,
};
}
}; };
const FlipBits = enum(u4) { const FlipBits = enum(u4) {
@ -146,6 +270,36 @@ const EntityInstance = struct {
iid: []const u8, iid: []const u8,
px: [2]i64, px: [2]i64,
width: i64, width: i64,
pub fn fromJSON(alloc: std.mem.Allocator, entity: std.json.Value) !TileInstance {
const __grid = pos_from_value(tile.get("__grid")) orelse return error.InvalidGrid;
const __identifier = string(tile.get("__identifier")) orelse return error.InvalidIdentifier;
const __pivot = posf_from_value(tile.get("__pivot")) orelse return error.InvalidPivot;
const __smartColor = string(tile.get("__smartColor")) orelse return error.InvalidSmartColor;
const __tags = pos_from_value(tile.get("__tags")) orelse return error.InvalidTags;
const __tile: ?[]TilesetRectangle = null; // TilesetRectangle.fromJSON();
const defUid = integer(tile.get("defUid")) orelse return error.InvalidDefUid;
const fieldInstances = try FieldInstance.fromJSON(alloc);
const height = integer(tile.get("height")) orelse return error.InvalidHeight;
const iid = string(tile.get("iid")) orelse return error.InvalidIid;
const px = pos_from_value(tile.get("px")) orelse return error.InvalidPx;
const width = integer(tile.get("width")) orelse return error.InvalidWidth;
return EntityInstance{
.__grid = __grid,
.__identifier = __identifier,
.__pivot = __pivot,
.__smartColor = __smartColor,
.__tags = __tags,
.__tile = __tile,
.defUid = defUid,
.fieldInstances = fieldInstances,
.height = height,
.iid = iid,
.px = px,
.width = width,
};
}
}; };
/// 2.4. Field Instance /// 2.4. Field Instance
@ -157,6 +311,20 @@ pub const FieldInstance = struct {
__type: []const u8, __type: []const u8,
__value: []const u8, __value: []const u8,
defUid: i64, defUid: i64,
pub fn fromJSON(alloc: std.mem.Allocator, field: std.json.Value) !FieldInstance {
const __identifier = string(field.get("__identifier")) orelse return error.InvalidIdentifier;
const __tile = string(field.get("__tile")) orelse return error.InvalidTile;
const __type = string(field.get("__type")) orelse return error.InvalidType;
const __value = string(field.get("__value")) orelse return error.InvalidValue;
const defUid = integer(field.get("defUid")) orelse return error.InvalidIDefUid;
return FieldInstance {
.__identifier = __identifier,
.__tile = __tile,
.__type = __type,
.__value = __value,
};
}
}; };
const FieldType = union(enum) { const FieldType = union(enum) {

View File

@ -40,9 +40,13 @@ test "load default/empty ldtk file" {
defer testing.allocator.free(ldtk_worlds); defer testing.allocator.free(ldtk_worlds);
ldtk_root.worlds = ldtk_worlds; ldtk_root.worlds = ldtk_worlds;
} }
_ = ldtk_root;
std.log.warn("\n{?}\n", .{ ldtk_root }); try testing.expectEqualStrings("1.1.3", ldtk_root.jsonVersion);
try testing.expectEqualStrings("#40465B", ldtk_root.bgColor);
try testing.expectEqual(@as(?i64, 256), ldtk_root.worldGridHeight);
try testing.expectEqual(@as(?i64, 256), ldtk_root.worldGridWidth);
try testing.expectEqual(@as(?LDtk.WorldLayout, LDtk.WorldLayout.Free), ldtk_root.worldLayout);
try testing.expect(!ldtk_root.externalLevels);
} }
// pub fn extract_defs(alloc: std.mem.Allocator, defs_obj: std.json.Value) !LDtk.Definitions { // pub fn extract_defs(alloc: std.mem.Allocator, defs_obj: std.json.Value) !LDtk.Definitions {
@ -97,6 +101,42 @@ pub fn extract_levels(alloc: std.mem.Allocator, levels: std.json.Array) ![]LDtk.
return ldtk_levels.toOwnedSlice(); return ldtk_levels.toOwnedSlice();
} }
pub fn extract_layers(alloc: std.mem.Allocator, layers: std.json.Array) ![]LDtk.LayerInstance {
var ldtk_layers = try std.ArrayList(LDtk.LayerInstance).initCapacity(alloc, layers.items.len);
defer ldtk_layers.deinit(); // levels will be returned using toOwnedSlice
for (layers.items) |layer_value| {
const layer_obj = object(layer_value) orelse return error.InvalidLayer;
const __type = enum_from_value(LDtk.LayerType, layer_obj.get("__type")) orelse return error.InvalidType;
const autoLayerTiles = if (__type == .AutoLayer) {} else null;
const entityInstances = if (__type == .Entities) {} else null;
const gridTiles = if (__type == .Tiles) {} else null;
const intGridCsv = if (__type == .IntGrid) {} else null;
ldtk_layers.appendAssumeCapacity(.{
.__cHei = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.__cWid = integer(layer_obj.get("__cWid")) orelse return error.InvalidCWid,
.__gridSize = integer(layer_obj.get("__gridSize")) orelse return error.InvalidGridSize,
.__identifier = string(layer_obj.get("__identifier")) orelse return error.InvalidIdentifier,
.__opacity = float(layer_obj.get("__opacity")) orelse return error.InvalidOpacity,
.__pxTotalOffsetX = integer(layer_obj.get("__pxTotalOffsetX")) orelse return error.InvalidTotalOffsetX,
.__pxTotalOffsetY = integer(layer_obj.get("__pxTotalOffsetY")) orelse return error.InvalidTotalOffsetY,
.__tilesetDefUid = integer(layer_obj.get("__tilesetDefUid")) orelse return error.InvalidTilesetDefUid,
.__tilesetRelPath = integer(layer_obj.get("__tilesetRelPath")) orelse return error.InvalidTilesetRelPath,
.__type = __type,
.autoLayerTiles = autoLayerTiles,
.entityInstances = entityInstances,
.gridTiles = gridTiles,
.iid = string(layer_obj.get("iid")) orelse return error.InvalidIID,
.intGridCsv = integer(layer_obj.get("intGridCsv")) orelse return error.InvalidGridCsv,
.levelId = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.overrideTilesetUid = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.pxOffsetX = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.pxOffsetY = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
.visible = integer(layer_obj.get("__cHei")) orelse return error.InvalidCHei,
});
}
return ldtk_layers.toOwnedSlice();
}
fn object(value_opt: ?std.json.Value) ?std.json.ObjectMap { fn object(value_opt: ?std.json.Value) ?std.json.ObjectMap {
const value = value_opt orelse return null; const value = value_opt orelse return null;
return switch (value) { return switch (value) {
@ -137,6 +177,14 @@ fn integer(value_opt: ?std.json.Value) ?i64 {
}; };
} }
fn float(value_opt: ?std.json.Value) ?f64 {
const value = value_opt orelse return null;
return switch (value) {
.Float => |float| float,
else => null,
};
}
fn enum_from_value(comptime T: type, value_opt: ?std.json.Value) ?T { fn enum_from_value(comptime T: type, value_opt: ?std.json.Value) ?T {
const value = value_opt orelse return null; const value = value_opt orelse return null;
return switch (value) { return switch (value) {