bigger map
This commit is contained in:
parent
8622881a13
commit
61ed20c865
@ -256,7 +256,7 @@ run = do
|
|||||||
(x, y) <- liftIO $ GLFW.getCursorPos win
|
(x, y) <- liftIO $ GLFW.getCursorPos win
|
||||||
let myrot = (x - sodx) / 2
|
let myrot = (x - sodx) / 2
|
||||||
mxrot = (y - sody) / 2
|
mxrot = (y - sody) / 2
|
||||||
newXAngle = curb 0 (0.45*pi) newXAngle'
|
newXAngle = curb (pi/12) (0.45*pi) newXAngle'
|
||||||
newXAngle' = sodxa + mxrot/100
|
newXAngle' = sodxa + mxrot/100
|
||||||
newYAngle
|
newYAngle
|
||||||
| newYAngle' > pi = newYAngle' - 2 * pi
|
| newYAngle' > pi = newYAngle' - 2 * pi
|
||||||
|
@ -210,29 +210,36 @@ coordLookup (x,z) y =
|
|||||||
-- if writing in ASCII-Format transpose so i,j -> y,x
|
-- if writing in ASCII-Format transpose so i,j -> y,x
|
||||||
-- row-minor -> row-major
|
-- row-minor -> row-major
|
||||||
testMapTemplate :: [Text]
|
testMapTemplate :: [Text]
|
||||||
testMapTemplate = T.transpose [
|
testMapTemplate = repText 2 $ T.transpose [
|
||||||
"~~~~~~~~~~~~~~~~~~~~",
|
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
|
||||||
"~~SSSSSSSSSSSSSS~~~~",
|
"~~~SSSSSSSSSSSSSS~~~~~SSSSSSSSSSSSSS~~~~",
|
||||||
"~SSGGGGGGGSGSGGS~~~~",
|
"~~SSGGGGGGGSGSGGS~~~~SSGGGGGGGSGSGGS~~~~",
|
||||||
"~SSGGGGGGMSGSGMS~~~~",
|
"~~SSGGGGGGMSGSGGS~~~~SSGGGGGGMSGSGGS~~~~",
|
||||||
"~SGGGGGGMMMGGGS~~~S~",
|
"~~SGGGGGGMMMGGGS~~~S~SGGGGGGMMMGGGS~~~S~",
|
||||||
"~SGGGMGMMMMMGGS~~~SS",
|
"~~SGGGMGMMMMMGGS~~~SSSGGGMGMMMMMGG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~~~~~~~~~~~~~~~~~~"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
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 :: [Text]
|
||||||
testMapTemplate2 = T.transpose [
|
testMapTemplate2 = T.transpose [
|
||||||
"~~~~~~~~~~~~"
|
"~~~~~~~~~~~~"
|
||||||
@ -242,7 +249,7 @@ testmap :: IO PlayMap
|
|||||||
testmap = do
|
testmap = do
|
||||||
g <- getStdGen
|
g <- getStdGen
|
||||||
rawMap <- return $ parseTemplate (randoms g) (T.concat testMapTemplate)
|
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 :: IO PlayMap
|
||||||
testmap2 = do
|
testmap2 = do
|
||||||
|
Loading…
Reference in New Issue
Block a user