summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Tiled2.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Tiled2.hs b/lib/Tiled2.hs
index 5b37f20..2c5f55e 100644
--- a/lib/Tiled2.hs
+++ b/lib/Tiled2.hs
@@ -97,13 +97,13 @@ data Object = Object { objectId :: Int
-- ^ Width in pixels. Ignored if using a gid.
, objectHeight :: Double
-- ^ Height in pixels. Ignored if using a gid.
- , objectName :: String
+ , objectName :: Maybe String
-- ^ String assigned to name field in editor
, objectType :: String
-- ^ String assigned to type field in editor
- , objectProperties :: Map Text Text
+ , objectProperties :: Maybe Value
-- ^ String key-value pairs
- , objectVisible :: Bool
+ , objectVisible :: Maybe Bool
-- ^ Whether object is shown in editor.
, objectX :: Double
-- ^ x coordinate in pixels
@@ -113,13 +113,13 @@ data Object = Object { objectId :: Int
-- ^ Angle in degrees clockwise
, objectGid :: Maybe GlobalId
-- ^ GID, only if object comes from a Tilemap
- , objectEllipse :: Bool
+ , objectEllipse :: Maybe Bool
-- ^ Used to mark an object as an ellipse
, objectPolygon :: Maybe (Vector (Double, Double))
-- ^ A list of x,y coordinates in pixels
, objectPolyline :: Maybe (Vector (Double, Double))
-- ^ A list of x,y coordinates in pixels
- , objectText :: Map Text Text
+ , objectText :: Maybe Value
-- ^ String key-value pairs
} deriving (Eq, Generic, Show)
@@ -276,7 +276,7 @@ instance ToJSON Tileset where
-- | The full monty.
-data Tiledmap = Tiledmap { tiledmapVersion :: Float
+data Tiledmap = Tiledmap { tiledmapVersion :: Value
-- ^ The JSON format version
, tiledmapTiledversion :: String
-- ^ The Tiled version used to save the file