bigger map

This commit is contained in:
Nicole Dresselhaus 2014-01-05 21:09:34 +01:00
parent 8622881a13
commit 61ed20c865
2 changed files with 30 additions and 23 deletions

View File

@ -256,7 +256,7 @@ run = do
(x, y) <- liftIO $ GLFW.getCursorPos win
let myrot = (x - sodx) / 2
mxrot = (y - sody) / 2
newXAngle = curb 0 (0.45*pi) newXAngle'
newXAngle = curb (pi/12) (0.45*pi) newXAngle'
newXAngle' = sodxa + mxrot/100
newYAngle
| newYAngle' > pi = newYAngle' - 2 * pi

View File

@ -210,29 +210,36 @@ coordLookup (x,z) y =
-- if writing in ASCII-Format transpose so i,j -> y,x
-- row-minor -> row-major
testMapTemplate :: [Text]
testMapTemplate = T.transpose [
"~~~~~~~~~~~~~~~~~~~~",
"~~SSSSSSSSSSSSSS~~~~",
"~SSGGGGGGGSGSGGS~~~~",
"~SSGGGGGGMSGSGMS~~~~",
"~SGGGGGGMMMGGGS~~~S~",
"~SGGGMGMMMMMGGS~~~SS",
"~GGGGGGGGGGGGGGS~~~~",
"~SGGGGGGGGGGGGGS~~~~",
"~~SSSSGGGSSSSS~~~~~~",
"~~~~~SGGGGS~~~~~~~~~",
"~~~~SSGGGGSS~~~~~~~~",
"~~SSSGGGGGGSSSSS~~~~",
"~SSGSGSGGGSGSGGS~~~~",
"~SSGSGSGGMSGSGMS~~~~",
"~SGGMMMMGGGGGGS~~~~~",
"~SGMMMMMGGGGSSS~~~~~",
"~GGMMMMMGGGSSSSS~~~~",
"~SGGGGGGGSSSSSSS~~~~",
"~~SSSSSSSSSSSS~~~~~~",
"~~~~~~~~~~~~~~~~~~~~"
testMapTemplate = repText 2 $ T.transpose [
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
"~~~SSSSSSSSSSSSSS~~~~~SSSSSSSSSSSSSS~~~~",
"~~SSGGGGGGGSGSGGS~~~~SSGGGGGGGSGSGGS~~~~",
"~~SSGGGGGGMSGSGGS~~~~SSGGGGGGMSGSGGS~~~~",
"~~SGGGGGGMMMGGGS~~~S~SGGGGGGMMMGGGS~~~S~",
"~~SGGGMGMMMMMGGS~~~SSSGGGMGMMMMMGGS~~~SS",
"~~GGGGGGGGGGGGGGS~~~~GGGGGGGGGGGGGGS~~~~",
"~~SGGGGGGGGGGGGGS~~~~SGGGGGGGGGGGGGS~~~~",
"~~~SSSSGGGSSSSS~~~~~~~SSSSGGGSSSSS~~~~~~",
"~~~~~~SGGGGS~~~~~~~~~~~~~SGGGGS~~~~~~~~~",
"~~~~~SSGGGGSS~~~~~~~~~~~SSGGGGSS~~~~~~~~",
"~~~SSSGGGGGGSSSSS~~~~~SSSGGGGGGSSSSS~~~~",
"~~SSGSGSGGGSGSGGS~~~~SSGSGSGGGSGSGGS~~~~",
"~~SSGSGSGGMSGSGMS~~~~SSGSGSGGMSGSGMS~~~~",
"~~SGGMMMMGGGGGGS~~~~~SGGMMMMGGGGGGS~~~~~",
"~~SGMMMMMGGGGSSS~~~~~SGMMMMMGGGGSSS~~~~~",
"~~GGMMMMMGGGSSSSS~~~~GGMMMMMGGGSSSSS~~~~",
"~~SGGGGGGGSSSSSSS~~~~SGGGGGGGSSSSSSS~~~~",
"~~~SSSSSSSSSSSS~~~~~~~SSSSSSSSSSSS~~~~~~",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
]
repText :: Int -> [a] -> [a]
repText a (t:[]) = P.replicate a t
repText a ts = P.concat $ P.map (repText' a) ts
where
repText' :: Int -> a -> [a]
repText' a x = repText a [x]
testMapTemplate2 :: [Text]
testMapTemplate2 = T.transpose [
"~~~~~~~~~~~~"
@ -242,7 +249,7 @@ testmap :: IO PlayMap
testmap = do
g <- getStdGen
rawMap <- return $ parseTemplate (randoms g) (T.concat testMapTemplate)
return $ listArray ((0,0),(19,19)) rawMap
return $ listArray ((0,0),(79,19)) rawMap
testmap2 :: IO PlayMap
testmap2 = do