-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Import from the Tiled map editor. -- -- Import maps from the .tmx map format generated by Tiled, -- http://www.mapeditor.org. @package htiled @version 0.1.0 module Data.Tiled.Types -- | Orientations. data MapOrientation Orthogonal :: MapOrientation Isometric :: MapOrientation -- | Properties. type Properties = [(String, String)] -- | A tiled map. data TiledMap TiledMap :: FilePath -> MapOrientation -> Int -> Int -> Int -> Int -> Properties -> [Tileset] -> [Layer] -> TiledMap -- | The file path of the map file. mapPath :: TiledMap -> FilePath mapOrientation :: TiledMap -> MapOrientation mapWidth :: TiledMap -> Int mapHeight :: TiledMap -> Int mapTileWidth :: TiledMap -> Int mapTileHeight :: TiledMap -> Int mapProperties :: TiledMap -> Properties mapTilesets :: TiledMap -> [Tileset] mapLayers :: TiledMap -> [Layer] -- | A set of tiles that can be used. data Tileset Tileset :: String -> Word32 -> Int -> Int -> [Image] -> [(Word32, Properties)] -> Tileset tsName :: Tileset -> String tsInitialGid :: Tileset -> Word32 tsTileWidth :: Tileset -> Int tsTileHeight :: Tileset -> Int -- | Multiple images not yet supported in tiled. tsImages :: Tileset -> [Image] tsTileProperties :: Tileset -> [(Word32, Properties)] -- | An image containing tiles. data Image Image :: FilePath -> Maybe (Word8, Word8, Word8) -> Int -> Int -> Image iSource :: Image -> FilePath iTrans :: Image -> Maybe (Word8, Word8, Word8) iWidth :: Image -> Int iHeight :: Image -> Int -- | An object, usable for stuff not repetitively aligned on a grid. data Object Object :: Maybe String -> Maybe String -> Properties -> Int -> Int -> Maybe Int -> Maybe Int -> Maybe Word32 -> Maybe Polygon -> Maybe Polyline -> Object objectName :: Object -> Maybe String objectType :: Object -> Maybe String objectProperties :: Object -> Properties objectX :: Object -> Int objectY :: Object -> Int objectWidth :: Object -> Maybe Int objectHeight :: Object -> Maybe Int objectGid :: Object -> Maybe Word32 objectPolygon :: Object -> Maybe Polygon objectPolyline :: Object -> Maybe Polyline -- | A polygon. data Polygon Polygon :: [(Int, Int)] -> Polygon -- | A polyline. data Polyline Polyline :: [(Int, Int)] -> Polyline -- | Either a tile layer or an object layer. data Layer Layer :: String -> Float -> Bool -> Properties -> Map (Int, Int) Tile -> Layer layerName :: Layer -> String layerOpacity :: Layer -> Float layerIsVisible :: Layer -> Bool layerProperties :: Layer -> Properties layerData :: Layer -> Map (Int, Int) Tile ObjectLayer :: String -> Float -> Bool -> Properties -> [Object] -> Layer layerName :: Layer -> String layerOpacity :: Layer -> Float layerIsVisible :: Layer -> Bool layerProperties :: Layer -> Properties layerObjects :: Layer -> [Object] ImageLayer :: String -> Float -> Bool -> Properties -> Image -> Layer layerName :: Layer -> String layerOpacity :: Layer -> Float layerIsVisible :: Layer -> Bool layerProperties :: Layer -> Properties layerImage :: Layer -> Image -- | A single tile as is stored in a layer. data Tile Tile :: Word32 -> Bool -> Bool -> Bool -> Tile tileGid :: Tile -> Word32 tileIsVFlipped :: Tile -> Bool tileIsHFlipped :: Tile -> Bool tileIsDiagFlipped :: Tile -> Bool instance Show MapOrientation instance Eq MapOrientation instance Show Image instance Eq Image instance Show Tileset instance Eq Tileset instance Show Polygon instance Eq Polygon instance Show Polyline instance Eq Polyline instance Show Object instance Eq Object instance Show Tile instance Eq Tile instance Ord Tile instance Eq Layer instance Show TiledMap instance Eq TiledMap instance Show Layer module Data.Tiled.Load -- | Load a map file. loadMapFile :: FilePath -> IO TiledMap module Data.Tiled