summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavenewton <devnewton@bci.im>2023-08-16 14:19:23 +0200
committerDavid Faure <faure@kde.org>2023-09-17 19:32:38 +0200
commit05165a1ad19c9c53a9ee32468326c319f4e6563e (patch)
tree05a5670507268a9367872bffc57066a4afd32258
parent515fc3d414bbc220b9f219704dd07d60391c9920 (diff)
add tiled map editor map and tileset files
-rw-r--r--data/freedesktop.org.xml.in10
-rw-r--r--tests/mime-detection/list4
-rw-r--r--tests/mime-detection/tiledsample/tiled_sample.license2
-rw-r--r--tests/mime-detection/tiledsample/tiled_sample.pngbin0 -> 26111 bytes
-rw-r--r--tests/mime-detection/tiledsample/tiled_sample.tmx40
-rw-r--r--tests/mime-detection/tiledsample/tiled_sample.tsx10
6 files changed, 66 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index d633b32..bfca133 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -8273,4 +8273,14 @@ command to generate the output files.
</magic>
<generic-icon name="text-x-generic"/>
</mime-type>
+ <mime-type type="application/x-tiled-tmx">
+ <comment>Tiled map files</comment>
+ <sub-class-of type="application/xml"/>
+ <glob pattern="*.tmx"/>
+ </mime-type>
+ <mime-type type="application/x-tiled-tsx">
+ <comment>Tiled tileset files</comment>
+ <sub-class-of type="application/xml"/>
+ <glob pattern="*.tsx"/>
+ </mime-type>
</mime-info>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 8d38276..a567784 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -954,6 +954,10 @@ test.qs application/sparql-query
# SPARQL query results
test.srx application/sparql-results+xml ox
+# Tiled files
+tiledsample/tiledsample.tmx
+tiledsample/tiledsample.tsx
+
# Modrinth Modpack
test.mrpack application/x-modrinth-modpack+zip ox
diff --git a/tests/mime-detection/tiledsample/tiled_sample.license b/tests/mime-detection/tiledsample/tiled_sample.license
new file mode 100644
index 0000000..f76a47d
--- /dev/null
+++ b/tests/mime-detection/tiledsample/tiled_sample.license
@@ -0,0 +1,2 @@
+Author: devnewton
+License: CC-BY-SA \ No newline at end of file
diff --git a/tests/mime-detection/tiledsample/tiled_sample.png b/tests/mime-detection/tiledsample/tiled_sample.png
new file mode 100644
index 0000000..762df93
--- /dev/null
+++ b/tests/mime-detection/tiledsample/tiled_sample.png
Binary files differ
diff --git a/tests/mime-detection/tiledsample/tiled_sample.tmx b/tests/mime-detection/tiledsample/tiled_sample.tmx
new file mode 100644
index 0000000..24880f7
--- /dev/null
+++ b/tests/mime-detection/tiledsample/tiled_sample.tmx
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<map version="1.10" tiledversion="1.10.0" orientation="orthogonal" renderorder="right-down" width="32" height="32" tilewidth="16" tileheight="16" infinite="0" nextlayerid="6" nextobjectid="2">
+ <tileset firstgid="1" source="tiled_sample.tsx"/>
+ <layer id="5" name="bg" width="32" height="32">
+ <data encoding="csv">
+2,3,1,3,6,2,3,6,2,3,2,3,3,6,1,6,3,6,6,1,2,6,3,6,1,1,1,3,6,6,1,1,
+2,2,1,2,3,1,2,3,3,1,1,1,2,2,6,2,3,6,6,3,2,3,2,1,6,6,1,2,6,1,1,1,
+3,6,6,2,1,1,6,6,2,3,2,2,1,6,3,6,1,6,3,6,1,3,3,6,2,3,1,3,2,1,2,3,
+2,2,1,2,3,2,2,1,1,2,1,2,6,2,1,1,2,3,3,6,3,6,3,6,6,1,3,1,6,1,2,6,
+3,1,6,3,2,3,6,3,6,3,3,3,2,6,6,1,1,2,6,3,6,6,6,2,1,2,1,1,2,3,3,2,
+6,3,2,6,3,3,6,3,1,5,1,6,1,6,1,3,3,1,6,6,3,1,2,6,1,1,2,3,6,2,2,3,
+3,1,2,1,6,2,6,6,3,1,1,1,1,6,1,6,3,2,6,1,1,2,2,1,3,3,1,6,3,2,3,3,
+1,3,2,3,2,1,2,6,2,6,6,1,3,6,6,1,1,2,3,1,3,2,6,1,1,6,1,2,3,3,3,2,
+2,6,1,2,1,2,6,6,1,2,2,1,3,3,6,1,2,1,2,3,1,6,2,2,1,3,6,3,2,1,2,2,
+3,1,3,6,3,6,2,3,3,2,3,3,1,6,3,6,6,1,6,1,6,3,2,1,6,2,6,2,1,1,2,6,
+3,6,6,6,1,2,2,2,1,3,116,1,1,3,1,2,1,6,6,1,1,1,2,3,2,1,3,1,6,3,3,3,
+21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,6,2,3,6,1,2,1,2,3,2,6,2,3,3,
+37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,21,21,21,21,21,21,22,6,1,6,6,2,2,
+53,53,53,53,53,53,53,53,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,22,3,3,2,1,3,
+3,1,1,1,1,1,1,6,52,53,53,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,21,21,22,2,
+6,1,1,2,1,6,3,1,2,1,1,52,53,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,22,
+6,3,6,2,6,2,1,2,3,1,3,3,6,52,53,53,53,53,53,53,53,53,53,53,53,53,53,53,37,37,37,37,
+3,6,1,6,1,1,1,3,1,2,1,6,3,1,3,3,3,3,2,6,3,2,116,3,2,1,1,5,52,37,37,37,
+1,3,1,2,6,3,1,6,113,66,66,66,66,115,2,2,1,6,1,3,6,3,1,6,6,1,2,6,2,52,37,38,
+3,2,6,2,3,1,1,113,162,82,82,82,82,83,2,1,3,6,3,1,2,3,1,2,3,2,3,6,6,1,52,54,
+6,2,6,2,6,6,2,129,82,82,82,82,82,131,3,2,1,3,3,3,2,6,1,3,3,6,2,3,6,3,3,1,
+2,1,3,3,3,1,2,145,146,146,146,146,146,147,3,2,1,1,3,2,1,2,3,3,2,2,2,1,3,6,1,1,
+2,6,3,6,2,2,3,1,2,6,2,6,1,2,6,3,2,6,1,6,1,2,1,3,3,6,1,6,2,6,3,2,
+3,6,3,1,6,3,3,2,6,6,1,1,2,2,6,6,2,6,6,2,3,1,1,1,2,2,1,6,1,2,6,3,
+2,6,6,6,2,1,2,3,2,3,1,6,6,2,2,3,2,2,6,1,1,1,34,5,3,2,1,2,1,2,3,5,
+1,6,6,2,3,3,1,6,3,1,2,6,6,6,6,2,1,6,2,1,17,18,18,18,18,18,18,18,18,18,18,18,
+1,6,3,2,2,6,6,2,1,1,1,1,6,3,2,3,1,1,1,1,35,2,6,3,1,6,6,2,3,2,6,6,
+2,2,6,6,1,6,3,2,1,3,1,2,3,1,2,2,6,6,1,6,35,2,6,2,1,2,1,1,2,6,2,3,
+2,3,1,6,3,3,3,3,3,3,2,3,3,6,2,3,6,2,6,3,35,2,6,1,1,1,2,3,1,1,2,1,
+1,3,3,1,6,3,3,3,2,1,3,2,3,6,6,6,1,3,1,6,35,3,3,3,2,6,2,3,3,1,1,2,
+2,3,1,2,3,2,2,1,6,2,2,2,2,6,3,2,3,3,6,6,35,6,2,1,3,1,1,2,3,6,2,3,
+6,1,2,2,6,1,2,6,6,2,1,3,1,2,3,1,3,1,1,6,35,2,3,1,6,2,1,6,6,3,2,3
+</data>
+ </layer>
+</map>
diff --git a/tests/mime-detection/tiledsample/tiled_sample.tsx b/tests/mime-detection/tiledsample/tiled_sample.tsx
new file mode 100644
index 0000000..8d38be0
--- /dev/null
+++ b/tests/mime-detection/tiledsample/tiled_sample.tsx
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tileset version="1.10" tiledversion="1.10.0" name="tiled_sample" tilewidth="16" tileheight="16" tilecount="256" columns="16">
+ <image source="tiled_sample.png" width="256" height="256"/>
+ <tile id="245">
+ <animation>
+ <frame tileid="243" duration="100"/>
+ <frame tileid="244" duration="100"/>
+ </animation>
+ </tile>
+</tileset>