packages feed

htiled 0.1.3.0 → 0.1.4.0

raw patch · 2 files changed

+14/−5 lines, 2 filesdep ~basedep ~hxtdep ~zlibPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, hxt, zlib

API changes (from Hackage documentation)

Files

htiled.cabal view
@@ -1,5 +1,5 @@ Name:                htiled-Version:             0.1.3.0+Version:             0.1.4.0 Synopsis:            Import from the Tiled map editor. Description:         Import maps from the .tmx map format generated by Tiled,                      <http://www.mapeditor.org>.@@ -18,7 +18,13 @@ Library   Hs-Source-Dirs:    src   Exposed-Modules:   Data.Tiled, Data.Tiled.Types, Data.Tiled.Load-  Build-depends:       base ==4.*, zlib ==0.5.*, bytestring-                     , hxt == 9.*, base64-bytestring > 1-                     , containers >=0.4 && <0.6, filepath, split+  Build-depends:       base >= 4.0 && < 5.0+                     , zlib >= 0.5+                     , bytestring+                     , hxt >= 9.0+                     , base64-bytestring > 1+                     , containers >=0.4 && <0.6+                     , filepath+                     , split+   Ghc-Options:       -Wall
src/Data/Tiled/Load.hs view
@@ -128,7 +128,10 @@                                 \gzip/zlib and csv are supported at the moment."      toMap w h = fromDistinctAscList . sort . filter (\(_, x) → tileGid x /= 0)-                . zip [(x, y) | y ← [0..h-1], x ← [0..w-1]]+                . zipWith (\ndx t -> ((x w ndx, y w ndx), t)) [0..]++    x w ndx = ndx - (y w ndx) * fromIntegral w+    y w ndx = floor $ fromIntegral ndx / fromIntegral w      base64 f = wordsToTiles . bytesToWords . LBS.unpack . f . LBS.fromChunks                             . (:[]) . B64.decodeLenient . BS.pack