-- 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.4.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 -> Properties -> [Tileset] -> [Layer] -> TiledMap -- | The file path of the map file. [mapPath] :: TiledMap -> FilePath [mapOrientation] :: TiledMap -> MapOrientation [mapWidth, 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, tsTileHeight] :: Tileset -> Int [tsSpacing, tsMargin] :: 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 -> Image [iSource] :: Image -> FilePath [iTrans] :: Image -> Maybe (Word8, Word8, Word8) [iWidth, iHeight] :: Image -> Int -- | An object, usable for stuff not repetitively aligned on a grid. data Object Object :: Maybe String -> Maybe String -> Properties -> Int -> Maybe Int -> Maybe Word32 -> Maybe Polygon -> Maybe Polyline -> Object [objectName] :: Object -> Maybe String [objectType] :: Object -> Maybe String [objectProperties] :: Object -> Properties [objectX, objectY] :: Object -> Int [objectWidth, 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 -> Tile [tileGid] :: Tile -> Word32 [tileIsVFlipped, tileIsHFlipped, tileIsDiagFlipped] :: Tile -> Bool instance GHC.Classes.Eq Data.Tiled.Types.TiledMap instance GHC.Show.Show Data.Tiled.Types.TiledMap instance GHC.Classes.Eq Data.Tiled.Types.Layer instance GHC.Classes.Ord Data.Tiled.Types.Tile instance GHC.Classes.Eq Data.Tiled.Types.Tile instance GHC.Show.Show Data.Tiled.Types.Tile instance GHC.Classes.Eq Data.Tiled.Types.Object instance GHC.Show.Show Data.Tiled.Types.Object instance GHC.Classes.Eq Data.Tiled.Types.Polyline instance GHC.Show.Show Data.Tiled.Types.Polyline instance GHC.Classes.Eq Data.Tiled.Types.Polygon instance GHC.Show.Show Data.Tiled.Types.Polygon instance GHC.Classes.Eq Data.Tiled.Types.Tileset instance GHC.Show.Show Data.Tiled.Types.Tileset instance GHC.Classes.Eq Data.Tiled.Types.Image instance GHC.Show.Show Data.Tiled.Types.Image instance GHC.Classes.Eq Data.Tiled.Types.MapOrientation instance GHC.Show.Show Data.Tiled.Types.MapOrientation instance GHC.Show.Show Data.Tiled.Types.Layer module Data.Tiled.Load -- | Load a map file. loadMapFile :: FilePath -> IO TiledMap -- | Load a map from a string loadMap :: String -> IO TiledMap instance GHC.Read.Read Data.Tiled.Load.ImageType module Data.Tiled