removing old code

This commit is contained in:
nek0 2018-07-03 02:20:30 +02:00
parent 9d5b3d62a0
commit f74ce66e2f

View file

@ -25,56 +25,6 @@ import Util
import Types
-- drawNPCs
-- :: Map ImgId Image
-- -> Context
-- -> UserData
-- -> [(V2 Double, Direction)]
-- -> Double
-- -> Double
-- -> Int
-- -> Int
-- -> Maybe ImgId
-- -> IO ()
-- drawNPCs ai ctx ud npcposrots prow pcol row col img = do
-- let fnpcposrots = filter
-- (\((V2 nr nc, dir)) ->
-- let x = realToFrac $ 640 + ((nc - pcol) + (nr - prow)) * 32
-- y = realToFrac $ 360 + ((nr - prow) - (nc - pcol)) * 16
-- in ((realToFrac x > -tileWidth && realToFrac y > -tileHeight) &&
-- (realToFrac x < 1280 && realToFrac (y - (74 - realToFrac tileHeight)) < 720)) &&
-- ((all (\m -> prow > (fromIntegral (floor prow :: Int)) + m) minrs &&
-- all (\m -> pcol < (fromIntegral (floor pcol :: Int)) + m) mincs) ||
-- (all (\m -> prow > (fromIntegral (floor prow :: Int)) + m) minrs &&
-- all (\m -> pcol < (fromIntegral (floor pcol :: Int)) + m) maxcs)) &&
-- (floor nr == row && floor nc == col)
-- )
-- npcposrots
-- mapM_
-- (\((V2 nr nc, dir)) -> do
-- let x = realToFrac $ 640 + ((nc - pcol) + (nr - prow)) * 32
-- y = realToFrac $ 360 + ((nr - prow) - (nc - pcol)) * 16
-- beginPath ctx
-- paint <- imagePattern ctx (x - 32) (y - 58) 64 74 0
-- (ai Map.! (dirToImgId dir)) 1
-- rect ctx (x - realToFrac (tileWidth / 2)) (y - 58)
-- (realToFrac tileWidth) 74
-- fillPaint ctx paint
-- -- circle ctx x y 5
-- -- closePath ctx
-- -- fillColor ctx (rgba 255 0 0 255)
-- fill ctx
-- )
-- fnpcposrots
-- where
-- tileWidth = 64 :: Double
-- tileHeight = 32 :: Double
-- mb = imgObstacle img
-- minrs = Prelude.map (fst . matmin) mb
-- maxrs = Prelude.map (fst . matmax) mb
-- mincs = Prelude.map (snd . matmin) mb
-- maxcs = Prelude.map (snd . matmax) mb
placeNPCs
:: M.Matrix (Maybe ImgId)
-> M.Matrix TileState