würg in progress

This commit is contained in:
nek0 2018-09-16 23:55:22 +02:00
parent 99318f8919
commit a68b186fd0
2 changed files with 7 additions and 8 deletions

View file

@ -86,7 +86,7 @@ loadMapFork ud ad future progress = do
fc = FloorConfig
(V2 10 10)
[(V2 5 5), (V2 5 20)]
(75, 50)
(50, 50)
modifyMVar_ progress (return . (\(p, _) ->
( p + increment
, "Building floor"

View file

@ -164,7 +164,7 @@ naviGraph imgmat animBounds (V2 r c) =
(\acc (rr, cc) ->
if null
(maybe [] collisionObstacle
(fromMaybe Nothing $ M.safeGet (r + rr) (c + cc) imgmat) ++
(M.safeGet (r + rr) (c + cc) imgmat) ++
map snd (filter
(\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc)
animBounds))
@ -177,15 +177,14 @@ naviGraph imgmat animBounds (V2 r c) =
foldl
(\acc (rr, cc) ->
if null
(maybe [] collisionObstacle
(fromMaybe Nothing $ M.safeGet (r + rr) (c + cc) imgmat) ++
map snd (filter
(\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc)
animBounds))
(maybe [] (collisionObstacle <$>)
([M.safeGet (r + rr) (c + cc) imgmat] ++
map snd (filter (\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc)
animBounds)))
&& all null
(map
(\(oor, ooc) -> (maybe [] collisionObstacle
(fromMaybe Nothing $ M.safeGet (r + oor) (c + ooc) imgmat)) ++
(M.safeGet (r + oor) (c + ooc) imgmat)) ++
map snd (filter
(\(V2 br bc, _) -> floor br == r + oor && floor bc == c + ooc)
animBounds))