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 fc = FloorConfig
(V2 10 10) (V2 10 10)
[(V2 5 5), (V2 5 20)] [(V2 5 5), (V2 5 20)]
(75, 50) (50, 50)
modifyMVar_ progress (return . (\(p, _) -> modifyMVar_ progress (return . (\(p, _) ->
( p + increment ( p + increment
, "Building floor" , "Building floor"

View file

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