summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs5
-rw-r--r--lib/Tiled.hs6
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 0bd3d55..b15ea15 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -121,7 +121,7 @@ checkTileset = do
$ complain "Tilesets must have tile size 32×32."
unless (tilesetImageheight tileset < 4096 && tilesetImagewidth tileset < 4096)
- $ warn "Tilesets should not be larger than 4096×4096 pixels in total."
+ $ warn "Tilesets should not be larger than 4096x4096 pixels in total."
when (isJust (tilesetSource tileset))
$ complain "Tilesets must be embedded and cannot be loaded from external files."
@@ -129,6 +129,9 @@ checkTileset = do
unlessHasProperty "tilesetCopyright"
$ forbid "property \"tilesetCopyright\" for tilesets must be set."
+ when (isJust (tilesetFileName tileset))
+ $ complain "The \"filename\" property on tilesets was removed; use \"image\" instead (and perhaps a newer version of the Tiled Editor)."
+
-- check individual tileset properties
mapM_ checkTilesetProperty (fromMaybe mempty $ tilesetProperties tileset)
diff --git a/lib/Tiled.hs b/lib/Tiled.hs
index 05839a7..f1d7ec6 100644
--- a/lib/Tiled.hs
+++ b/lib/Tiled.hs
@@ -217,8 +217,8 @@ data Layer = Layer { layerWidth :: Maybe Double
, layerDraworder :: Maybe String
-- ^ “topdown” (default) or “index”. objectgroup only.
, layerId :: Int
- , layerOffsetx :: Maybe Int
- , layerOffsety :: Maybe Int
+ , layerOffsetx :: Maybe Float
+ , layerOffsety :: Maybe Float
, layerParallaxx :: Maybe Float
, layerParallaxy :: Maybe Float
, layerTintColor :: Maybe Color
@@ -227,6 +227,7 @@ data Layer = Layer { layerWidth :: Maybe Double
, layerLayers :: Maybe [Layer]
, layerStartX :: Maybe Int
, layerStartY :: Maybe Int
+ , layerColor :: Maybe Color
} deriving (Eq, Generic, Show)
instance FromJSON Layer where
@@ -331,6 +332,7 @@ data Tileset = Tileset { tilesetFirstgid :: GlobalId
, tilesetVersion :: Maybe Value
, tilesetWangsets :: Maybe Value
, tilesetType :: Maybe Text
+ , tilesetFileName :: Maybe Text
} deriving (Eq, Generic, Show)
newtype TransitiveTilesetMap = TransitiveTilesetMap (Map LocalId Value)