Cleanup
This commit is contained in:
@@ -292,10 +292,6 @@ concurrentIS = go . IS.minView
|
||||
(i,is) <- x
|
||||
(j, js) <- IS.minView is
|
||||
return $ i + 1 == j && go (Just (j, js))
|
||||
-- go Nothing = True
|
||||
-- go (Just (i, is)) = fromMaybe True $ do
|
||||
-- (j, js) <- IS.minView is
|
||||
-- return $ i + 1 == j && go (Just (j, js))
|
||||
|
||||
collectInvItems :: Int -> IS.IntSet -> World -> World
|
||||
collectInvItems secid is w = fromMaybe w $ do
|
||||
@@ -381,31 +377,6 @@ updateFunctionKey uv ScancodeF3 _ = doDebugTest uv
|
||||
updateFunctionKey uv ScancodeF4 _ = doDebugTest2 uv
|
||||
updateFunctionKey uv _ _ = uv
|
||||
|
||||
--updatePressedButtonsCarte :: World -> World
|
||||
--updatePressedButtonsCarte w = updatePressedButtonsCarte' (_mouseButtons (_input w)) w
|
||||
|
||||
--updatePressedButtonsCarte' :: M.Map MouseButton Int -> World -> World
|
||||
--updatePressedButtonsCarte' pkeys w
|
||||
-- | isDown ButtonRight =
|
||||
-- w & hud . carteCenter %~ (-.- trans)
|
||||
-- | isDown ButtonLeft =
|
||||
-- w
|
||||
-- & hud . carteRot -~ rot
|
||||
-- & hud . carteZoom *~ czoom
|
||||
-- | otherwise = w
|
||||
-- where
|
||||
-- isDown but = but `M.member` pkeys
|
||||
-- mbutpos but = theinput ^. heldPos . at but
|
||||
-- rot = maybe 0 (angleBetween (_mousePos (_input w))) $ mbutpos SDL.ButtonLeft
|
||||
-- czoom = fromMaybe 1 $ do
|
||||
-- p <- mbutpos SDL.ButtonLeft
|
||||
-- return $ magV (_mousePos theinput) / magV p
|
||||
-- theinput = w ^. input
|
||||
-- trans = fromMaybe 0 $ do
|
||||
-- p <- mbutpos SDL.ButtonRight
|
||||
-- return . rotateV (w ^. hud . carteRot) $
|
||||
-- 1 / (w ^. hud . carteZoom) *.* (_mousePos (_input w) -.- p)
|
||||
|
||||
updateKeysInTerminal :: Int -> Universe -> Universe
|
||||
updateKeysInTerminal tmid u =
|
||||
u
|
||||
@@ -549,19 +520,6 @@ getCloseObj w = getSelectedCloseObj w <|> firstcitem <|> firstcbut
|
||||
k <- w ^? hud . closeButtons . ix 0
|
||||
fmap Right $ w ^? cWorld . lWorld . buttons . ix k
|
||||
|
||||
--toggleMap :: Universe -> Universe
|
||||
--toggleMap u = case u ^. uvWorld . hud . hudElement of
|
||||
-- DisplayCarte ->
|
||||
-- u & uvWorld . hud . hudElement
|
||||
-- .~ DisplayInventory
|
||||
-- { _subInventory = NoSubInventory
|
||||
-- , _diSections = mempty
|
||||
-- , _diSelection = Nothing
|
||||
-- , _diInvFilter = mempty
|
||||
-- , _diCloseFilter = mempty
|
||||
-- }
|
||||
-- _ -> u & uvWorld . hud . hudElement .~ DisplayCarte
|
||||
|
||||
tryCombine :: (Int, Int) -> World -> World
|
||||
tryCombine (i, j) w = fromMaybe w $ do
|
||||
sss <- w ^? hud . hudElement . subInventory . ciSections
|
||||
|
||||
Reference in New Issue
Block a user