Movement works now.

- Movement works. Keys are read out by KeyCode
  thus independent from Keyboard-Layout

  On a normal quertz-layout they map like so:
  * e, s, d, f for movement
  * r, w       for rotation
  * space/caps for up/down
This commit is contained in:
Stefan Dresselhaus
2013-12-29 18:18:18 +01:00
parent 55a873022b
commit f3b218c44e
3 changed files with 137 additions and 31 deletions

View File

@ -50,8 +50,8 @@ parseTemplate (r:rs) t =
(case T.head t of
'~' -> (0, Water)
'S' -> (0, Sand)
'G' -> (fromIntegral (r `mod` 3) / 3,Grass)
'M' -> (fromIntegral (r `mod` 3 + 2) / 3, Mountain)
'G' -> (fromIntegral (r `mod` 3)/2.0,Grass)
'M' -> (fromIntegral (r `mod` 3 + 2)/2.0, Mountain)
_ -> error "invalid template format for map"
):parseTemplate rs (T.tail t)
parseTemplate [] _ = error "out of randoms.."