Cleanup, only commented out char sequence scrolling code

This commit is contained in:
2024-09-21 16:59:56 +01:00
parent 27e07a10c4
commit 9df60d62ab
6 changed files with 28 additions and 50 deletions
+1 -14
View File
@@ -94,7 +94,6 @@ moveZoomCamera cfig theinput cr campos =
mscopeoffset = do
guard (SDL.ButtonRight `M.member` _mouseButtons theinput)
i <- cr ^? crManipulation . manObject . inInventory . ispItem
--(cr ^? crInv . ix (i - 1) . itUse . attachParams . scrollAttachParams . opticPos)
(fmap (rotateV camrot) (cr ^? crInv . ix i . itScope . opticPos))
<|> (cr ^? crInv . ix i . itScope . remotePos)
camrot = campos ^. camRot
@@ -145,7 +144,6 @@ updateScopeZoom' i w
wppointer = cWorld . lWorld . creatures . ix 0 . crInv . ix i . itScope
resetscope (OpticScope _ _ defz) = OpticScope (V2 0 0) defz defz
resetscope otherAtt = otherAtt
--mp = rotateV (w ^. wCam . camRot) $ _mousePos (_input w)
mp = _mousePos (_input w)
doScopeZoom :: Int -> Point2 -> Scope -> Scope
@@ -207,18 +205,7 @@ doWallRotate wl w = rotateUsing $ (argV . uncurry (-.-) $ _wlLine wl) - (w ^. wC
b' = fromIntegral (round b :: Int)
rotateCameraBy :: Float -> World -> World
rotateCameraBy x w =
w
& wCam . camRot +~ x
-- & cWorld %~ rotateanyscope
where
rotateanyscope = fromMaybe id $ do
i <- w ^? cWorld . lWorld . creatures . ix 0 . crManipulation . manObject . inInventory . ispItem
return $
lWorld . creatures . ix 0 . crInv . ix i
. itScope
. opticPos
%~ rotateV x
rotateCameraBy x = wCam . camRot +~ x
rotateCamera :: Configuration -> World -> World
rotateCamera cfig w