Skip to content

Commit ffa8dfa

Browse files
committed
Allow u32, u64, s64 for field
* Change default int type to `s32`
1 parent 8e494e7 commit ffa8dfa

File tree

8 files changed

+495
-74
lines changed

8 files changed

+495
-74
lines changed
9.47 KB
Loading

examples/tests/levels/test.ldtk

Lines changed: 161 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"iid": "7b5a0230-8560-11f0-8a9b-5743c2864c93",
1212
"jsonVersion": "1.5.3",
1313
"appBuildId": 473703,
14-
"nextUid": 62,
14+
"nextUid": 66,
1515
"identifierStyle": "Lowercase",
1616
"toc": [],
1717
"worldLayout": "LinearHorizontal",
@@ -183,7 +183,7 @@
183183
"fieldDefs": [
184184
{
185185
"identifier": "int",
186-
"doc": "Treated as s16",
186+
"doc": "Treated as s32",
187187
"__type": "Int",
188188
"uid": 58,
189189
"type": "F_Int",
@@ -366,6 +366,43 @@
366366
"allowedRefTags": [],
367367
"tilesetUid": null
368368
},
369+
{
370+
"identifier": "u32",
371+
"doc": null,
372+
"__type": "Int",
373+
"uid": 62,
374+
"type": "F_Int",
375+
"isArray": false,
376+
"canBeNull": false,
377+
"arrayMinLength": null,
378+
"arrayMaxLength": null,
379+
"editorDisplayMode": "Hidden",
380+
"editorDisplayScale": 1,
381+
"editorDisplayPos": "Above",
382+
"editorLinkStyle": "StraightArrow",
383+
"editorDisplayColor": null,
384+
"editorAlwaysShow": false,
385+
"editorShowInWorld": true,
386+
"editorCutLongValues": true,
387+
"editorTextSuffix": null,
388+
"editorTextPrefix": null,
389+
"useForSmartColor": false,
390+
"exportToToc": false,
391+
"searchable": false,
392+
"min": 0,
393+
"max": 2147483,
394+
"regex": null,
395+
"acceptFileTypes": null,
396+
"defaultOverride": null,
397+
"textLanguageMode": null,
398+
"symmetricalRef": false,
399+
"autoChainRef": true,
400+
"allowOutOfLevelRef": true,
401+
"allowedRefs": "OnlySame",
402+
"allowedRefsEntityUid": null,
403+
"allowedRefTags": [],
404+
"tilesetUid": null
405+
},
369406
{
370407
"identifier": "s32",
371408
"doc": null,
@@ -701,7 +738,7 @@
701738
},
702739
{
703740
"identifier": "int_arr",
704-
"doc": "Treated as s16_arr",
741+
"doc": "Treated as s32_arr",
705742
"__type": "Array<Int>",
706743
"uid": 60,
707744
"type": "F_Int",
@@ -884,6 +921,43 @@
884921
"allowedRefTags": [],
885922
"tilesetUid": null
886923
},
924+
{
925+
"identifier": "u32_arr",
926+
"doc": null,
927+
"__type": "Array<Int>",
928+
"uid": 63,
929+
"type": "F_Int",
930+
"isArray": true,
931+
"canBeNull": false,
932+
"arrayMinLength": null,
933+
"arrayMaxLength": null,
934+
"editorDisplayMode": "Hidden",
935+
"editorDisplayScale": 1,
936+
"editorDisplayPos": "Above",
937+
"editorLinkStyle": "StraightArrow",
938+
"editorDisplayColor": null,
939+
"editorAlwaysShow": false,
940+
"editorShowInWorld": true,
941+
"editorCutLongValues": true,
942+
"editorTextSuffix": null,
943+
"editorTextPrefix": null,
944+
"useForSmartColor": false,
945+
"exportToToc": false,
946+
"searchable": false,
947+
"min": 0,
948+
"max": 2147483,
949+
"regex": null,
950+
"acceptFileTypes": null,
951+
"defaultOverride": null,
952+
"textLanguageMode": null,
953+
"symmetricalRef": false,
954+
"autoChainRef": true,
955+
"allowOutOfLevelRef": true,
956+
"allowedRefs": "OnlySame",
957+
"allowedRefsEntityUid": null,
958+
"allowedRefTags": [],
959+
"tilesetUid": null
960+
},
887961
{
888962
"identifier": "s32_arr",
889963
"doc": null,
@@ -1219,7 +1293,7 @@
12191293
},
12201294
{
12211295
"identifier": "int_opt",
1222-
"doc": "Treated as s16_opt",
1296+
"doc": "Treated as s32_opt",
12231297
"__type": "Int",
12241298
"uid": 59,
12251299
"type": "F_Int",
@@ -1402,6 +1476,43 @@
14021476
"allowedRefTags": [],
14031477
"tilesetUid": null
14041478
},
1479+
{
1480+
"identifier": "u32_opt",
1481+
"doc": null,
1482+
"__type": "Int",
1483+
"uid": 64,
1484+
"type": "F_Int",
1485+
"isArray": false,
1486+
"canBeNull": true,
1487+
"arrayMinLength": null,
1488+
"arrayMaxLength": null,
1489+
"editorDisplayMode": "Hidden",
1490+
"editorDisplayScale": 1,
1491+
"editorDisplayPos": "Above",
1492+
"editorLinkStyle": "StraightArrow",
1493+
"editorDisplayColor": null,
1494+
"editorAlwaysShow": false,
1495+
"editorShowInWorld": true,
1496+
"editorCutLongValues": true,
1497+
"editorTextSuffix": null,
1498+
"editorTextPrefix": null,
1499+
"useForSmartColor": false,
1500+
"exportToToc": false,
1501+
"searchable": false,
1502+
"min": 0,
1503+
"max": 2147483,
1504+
"regex": null,
1505+
"acceptFileTypes": null,
1506+
"defaultOverride": null,
1507+
"textLanguageMode": null,
1508+
"symmetricalRef": false,
1509+
"autoChainRef": true,
1510+
"allowOutOfLevelRef": true,
1511+
"allowedRefs": "OnlySame",
1512+
"allowedRefsEntityUid": null,
1513+
"allowedRefTags": [],
1514+
"tilesetUid": null
1515+
},
14051516
{
14061517
"identifier": "s32_opt",
14071518
"doc": null,
@@ -1663,7 +1774,7 @@
16631774
},
16641775
{
16651776
"identifier": "int_opt_arr",
1666-
"doc": "Treated as s16_opt_arr",
1777+
"doc": "Treated as s32_opt_arr",
16671778
"__type": "Array<Int>",
16681779
"uid": 61,
16691780
"type": "F_Int",
@@ -1846,6 +1957,43 @@
18461957
"allowedRefTags": [],
18471958
"tilesetUid": null
18481959
},
1960+
{
1961+
"identifier": "u32_opt_arr",
1962+
"doc": null,
1963+
"__type": "Array<Int>",
1964+
"uid": 65,
1965+
"type": "F_Int",
1966+
"isArray": true,
1967+
"canBeNull": true,
1968+
"arrayMinLength": null,
1969+
"arrayMaxLength": null,
1970+
"editorDisplayMode": "Hidden",
1971+
"editorDisplayScale": 1,
1972+
"editorDisplayPos": "Above",
1973+
"editorLinkStyle": "StraightArrow",
1974+
"editorDisplayColor": null,
1975+
"editorAlwaysShow": false,
1976+
"editorShowInWorld": true,
1977+
"editorCutLongValues": true,
1978+
"editorTextSuffix": null,
1979+
"editorTextPrefix": null,
1980+
"useForSmartColor": false,
1981+
"exportToToc": false,
1982+
"searchable": false,
1983+
"min": 0,
1984+
"max": 2147483,
1985+
"regex": null,
1986+
"acceptFileTypes": null,
1987+
"defaultOverride": null,
1988+
"textLanguageMode": null,
1989+
"symmetricalRef": false,
1990+
"autoChainRef": true,
1991+
"allowOutOfLevelRef": true,
1992+
"allowedRefs": "OnlySame",
1993+
"allowedRefsEntityUid": null,
1994+
"allowedRefTags": [],
1995+
"tilesetUid": null
1996+
},
18491997
{
18501998
"identifier": "s32_opt_arr",
18511999
"doc": null,
@@ -2274,6 +2422,7 @@
22742422
{ "__identifier": "s8", "__type": "Int", "__value": 0, "__tile": null, "defUid": 13, "realEditorValues": [] },
22752423
{ "__identifier": "u16", "__type": "Int", "__value": 0, "__tile": null, "defUid": 14, "realEditorValues": [] },
22762424
{ "__identifier": "s16", "__type": "Int", "__value": 0, "__tile": null, "defUid": 15, "realEditorValues": [] },
2425+
{ "__identifier": "u32", "__type": "Int", "__value": 0, "__tile": null, "defUid": 62, "realEditorValues": [] },
22772426
{ "__identifier": "s32", "__type": "Int", "__value": 0, "__tile": null, "defUid": 3, "realEditorValues": [] },
22782427
{ "__identifier": "float", "__type": "Float", "__value": 0, "__tile": null, "defUid": 4, "realEditorValues": [] },
22792428
{ "__identifier": "boolean", "__type": "Bool", "__value": false, "__tile": null, "defUid": 5, "realEditorValues": [] },
@@ -2302,6 +2451,7 @@
23022451
{ "__identifier": "s8_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 18, "realEditorValues": [] },
23032452
{ "__identifier": "u16_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 19, "realEditorValues": [] },
23042453
{ "__identifier": "s16_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 20, "realEditorValues": [] },
2454+
{ "__identifier": "u32_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 63, "realEditorValues": [] },
23052455
{ "__identifier": "s32_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 21, "realEditorValues": [] },
23062456
{ "__identifier": "float_arr", "__type": "Array<Float>", "__value": [], "__tile": null, "defUid": 22, "realEditorValues": [] },
23072457
{ "__identifier": "boolean_arr", "__type": "Array<Bool>", "__value": [], "__tile": null, "defUid": 23, "realEditorValues": [] },
@@ -2316,6 +2466,7 @@
23162466
{ "__identifier": "s8_opt", "__type": "Int", "__value": null, "__tile": null, "defUid": 31, "realEditorValues": [] },
23172467
{ "__identifier": "u16_opt", "__type": "Int", "__value": null, "__tile": null, "defUid": 32, "realEditorValues": [] },
23182468
{ "__identifier": "s16_opt", "__type": "Int", "__value": null, "__tile": null, "defUid": 33, "realEditorValues": [] },
2469+
{ "__identifier": "u32_opt", "__type": "Int", "__value": null, "__tile": null, "defUid": 64, "realEditorValues": [] },
23192470
{ "__identifier": "s32_opt", "__type": "Int", "__value": null, "__tile": null, "defUid": 34, "realEditorValues": [] },
23202471
{ "__identifier": "float_opt", "__type": "Float", "__value": null, "__tile": null, "defUid": 35, "realEditorValues": [] },
23212472
{ "__identifier": "string_opt", "__type": "String", "__value": null, "__tile": null, "defUid": 37, "realEditorValues": [] },
@@ -2328,6 +2479,7 @@
23282479
{ "__identifier": "s8_opt_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 44, "realEditorValues": [] },
23292480
{ "__identifier": "u16_opt_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 45, "realEditorValues": [] },
23302481
{ "__identifier": "s16_opt_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 46, "realEditorValues": [] },
2482+
{ "__identifier": "u32_opt_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 65, "realEditorValues": [] },
23312483
{ "__identifier": "s32_opt_arr", "__type": "Array<Int>", "__value": [], "__tile": null, "defUid": 47, "realEditorValues": [] },
23322484
{ "__identifier": "float_opt_arr", "__type": "Array<Float>", "__value": [], "__tile": null, "defUid": 48, "realEditorValues": [] },
23332485
{ "__identifier": "string_opt_arr", "__type": "Array<String>", "__value": [], "__tile": null, "defUid": 49, "realEditorValues": [] },
@@ -2355,6 +2507,7 @@
23552507
{ "__identifier": "s8", "__type": "Int", "__value": -128, "__tile": null, "defUid": 13, "realEditorValues": [{ "id": "V_Int", "params": [-128] }] },
23562508
{ "__identifier": "u16", "__type": "Int", "__value": 65535, "__tile": null, "defUid": 14, "realEditorValues": [{ "id": "V_Int", "params": [65535] }] },
23572509
{ "__identifier": "s16", "__type": "Int", "__value": -32768, "__tile": null, "defUid": 15, "realEditorValues": [{ "id": "V_Int", "params": [-32768] }] },
2510+
{ "__identifier": "u32", "__type": "Int", "__value": 2147483, "__tile": null, "defUid": 62, "realEditorValues": [{ "id": "V_Int", "params": [2147483] }] },
23582511
{ "__identifier": "s32", "__type": "Int", "__value": -2147483, "__tile": null, "defUid": 3, "realEditorValues": [{ "id": "V_Int", "params": [-2147483] }] },
23592512
{ "__identifier": "float", "__type": "Float", "__value": 3.142, "__tile": null, "defUid": 4, "realEditorValues": [{ "id": "V_Float", "params": [3.14159265358979] }] },
23602513
{ "__identifier": "boolean", "__type": "Bool", "__value": true, "__tile": null, "defUid": 5, "realEditorValues": [{
@@ -2392,6 +2545,7 @@
23922545
{ "__identifier": "s8_arr", "__type": "Array<Int>", "__value": [127,-128,0,0], "__tile": null, "defUid": 18, "realEditorValues": [ { "id": "V_Int", "params": [127] }, { "id": "V_Int", "params": [-128] }, null, { "id": "V_Int", "params": [0] } ] },
23932546
{ "__identifier": "u16_arr", "__type": "Array<Int>", "__value": [65535,0,32767], "__tile": null, "defUid": 19, "realEditorValues": [ { "id": "V_Int", "params": [65535] }, null, { "id": "V_Int", "params": [32767] } ] },
23942547
{ "__identifier": "s16_arr", "__type": "Array<Int>", "__value": [32767,-32768,0,0], "__tile": null, "defUid": 20, "realEditorValues": [ { "id": "V_Int", "params": [32767] }, { "id": "V_Int", "params": [-32768] }, null, { "id": "V_Int", "params": [0] } ] },
2548+
{ "__identifier": "u32_arr", "__type": "Array<Int>", "__value": [0,0,2147483], "__tile": null, "defUid": 63, "realEditorValues": [ null, { "id": "V_Int", "params": [0] }, { "id": "V_Int", "params": [2147483] } ] },
23952549
{ "__identifier": "s32_arr", "__type": "Array<Int>", "__value": [2147483,-2147483,0], "__tile": null, "defUid": 21, "realEditorValues": [ { "id": "V_Int", "params": [2147483] }, { "id": "V_Int", "params": [-2147483] }, null ] },
23962550
{ "__identifier": "float_arr", "__type": "Array<Float>", "__value": [0,3.142,31.416,314.159,3141.593,31415.927], "__tile": null, "defUid": 22, "realEditorValues": [
23972551
null,
@@ -2472,6 +2626,7 @@
24722626
{ "__identifier": "s8_opt", "__type": "Int", "__value": 127, "__tile": null, "defUid": 31, "realEditorValues": [{ "id": "V_Int", "params": [127] }] },
24732627
{ "__identifier": "u16_opt", "__type": "Int", "__value": 0, "__tile": null, "defUid": 32, "realEditorValues": [{ "id": "V_Int", "params": [0] }] },
24742628
{ "__identifier": "s16_opt", "__type": "Int", "__value": 32767, "__tile": null, "defUid": 33, "realEditorValues": [{ "id": "V_Int", "params": [32767] }] },
2629+
{ "__identifier": "u32_opt", "__type": "Int", "__value": 2147483, "__tile": null, "defUid": 64, "realEditorValues": [{ "id": "V_Int", "params": [2147483] }] },
24752630
{ "__identifier": "s32_opt", "__type": "Int", "__value": 2147483, "__tile": null, "defUid": 34, "realEditorValues": [{ "id": "V_Int", "params": [2147483] }] },
24762631
{ "__identifier": "float_opt", "__type": "Float", "__value": 3.142, "__tile": null, "defUid": 35, "realEditorValues": [{ "id": "V_Float", "params": [3.14159] }] },
24772632
{ "__identifier": "string_opt", "__type": "String", "__value": "Hello, world!", "__tile": null, "defUid": 37, "realEditorValues": [{
@@ -2504,6 +2659,7 @@
25042659
{ "__identifier": "s8_opt_arr", "__type": "Array<Int>", "__value": [-128,null,127], "__tile": null, "defUid": 44, "realEditorValues": [ { "id": "V_Int", "params": [-128] }, null, { "id": "V_Int", "params": [127] } ] },
25052660
{ "__identifier": "u16_opt_arr", "__type": "Array<Int>", "__value": [0,65535,null], "__tile": null, "defUid": 45, "realEditorValues": [ { "id": "V_Int", "params": [0] }, { "id": "V_Int", "params": [65535] }, null ] },
25062661
{ "__identifier": "s16_opt_arr", "__type": "Array<Int>", "__value": [ null, -32768, 32767, null ], "__tile": null, "defUid": 46, "realEditorValues": [ null, { "id": "V_Int", "params": [-32768] }, { "id": "V_Int", "params": [32767] }, null ] },
2662+
{ "__identifier": "u32_opt_arr", "__type": "Array<Int>", "__value": [0,null,2147483], "__tile": null, "defUid": 65, "realEditorValues": [ { "id": "V_Int", "params": [0] }, null, { "id": "V_Int", "params": [2147483] } ] },
25072663
{ "__identifier": "s32_opt_arr", "__type": "Array<Int>", "__value": [-2147483,2147483], "__tile": null, "defUid": 47, "realEditorValues": [ { "id": "V_Int", "params": [-2147483] }, { "id": "V_Int", "params": [2147483] } ] },
25082664
{ "__identifier": "float_opt_arr", "__type": "Array<Float>", "__value": [
25092665
null,

0 commit comments

Comments
 (0)