Merge branch 'tessallation' into mapmerge

Conflicts:
	src/Main.hs
	src/Map/Graphics.hs
This commit is contained in:
Stefan Dresselhaus
2014-03-05 15:02:30 +01:00
17 changed files with 987 additions and 298 deletions

View File

@ -79,6 +79,11 @@ getMapBufferObject = do
checkError "initBuffer"
return (bo,len)
prettyMap :: [GLfloat] -> [(GLfloat,GLfloat,GLfloat,GLfloat,GLfloat,GLfloat,GLfloat,GLfloat,GLfloat,GLfloat)]
prettyMap (a:b:c:d:x:y:z:u:v:w:ms) = (a,b,c,d,x,y,z,u,v,w):(prettyMap ms)
prettyMap _ = []
--generateTriangles :: PlayMap -> [GLfloat]
generateTriangles :: GraphicsMap -> [GLfloat]
generateTriangles map' =
let ((xl,yl),(xh,yh)) = bounds map' in
@ -179,7 +184,7 @@ colorLookup hs t = if inRange (bounds hs) t then c else (0.0, 0.0, 0.0)
Mountain -> (0.5, 0.5, 0.5)
coordLookup :: (Int,Int) -> GLfloat -> V3 GLfloat
coordLookup (x,z) y =
coordLookup (x,z) y =
if even x then
V3 (fromIntegral $ x `div` 2) y (fromIntegral (2 * z) * lineHeight)
else