aboutsummaryrefslogtreecommitdiff
path: root/Final.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-03 02:18:25 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-03 02:18:25 -0700
commitecf90db5ffada1890e759c5a7e91c13ec15a02bd (patch)
treebb102d9d8aeeecdb6d36b63a5b5ec0623d2d8f4d /Final.hs
parentd7fb5d4551a93b4756db62f494b761c0cef2fda7 (diff)
parenta60702dd882768e7f5b7fcadd39253ac8de9114f (diff)
downloadterralloc-ecf90db5ffada1890e759c5a7e91c13ec15a02bd.tar.gz
terralloc-ecf90db5ffada1890e759c5a7e91c13ec15a02bd.tar.bz2
terralloc-ecf90db5ffada1890e759c5a7e91c13ec15a02bd.zip
Merge remote-tracking branch 'origin/snow'
Diffstat (limited to 'Final.hs')
-rw-r--r--Final.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Final.hs b/Final.hs
index 3a7596f..f17703c 100644
--- a/Final.hs
+++ b/Final.hs
@@ -127,6 +127,7 @@ colorArray marr = do
- 2 things:
- A map of water bodies ids to elevations (to detect if you are under water
- A builder that will generate all of the quads for the water. -}
+
getWaterQuads :: Array (Int,Int) Tile -> IOArray (Int,Int) Int -> IO ( Map.Map Int GLfloat, BuilderM GLfloat () )
getWaterQuads marr arr = do
let (_,(w,h)) = bounds marr
@@ -351,6 +352,7 @@ main = do
(mapping,water) <- getWaterQuads arr coloredArr
coloredArr2 <- mapArray (\idx -> if idx == 0 then -1 else Map.findWithDefault (-1) idx mapping) coloredArr
+
printShowArray coloredArr2
printArray arr