Improve window drawing
This commit is contained in:
@@ -24,6 +24,7 @@ import Dodge.Zoning.Wall
|
||||
import Geometry
|
||||
import LensHelp
|
||||
import SDL (MouseButton (..))
|
||||
import qualified SDL as SDL
|
||||
|
||||
{- Update the screen camera rotation and position, including any in rold scope/remote camera modifiers;
|
||||
update where your avatar's view is from. -}
|
||||
@@ -63,10 +64,12 @@ translateFloatingCamera theinput cam = fromMaybe cam $ do
|
||||
translateFloatingCameraKeys :: Input -> Camera -> Camera
|
||||
translateFloatingCameraKeys theinput cam =
|
||||
cam
|
||||
& camCenter -~ thetran
|
||||
& camViewFrom -~ thetran
|
||||
& camCenter -~ x
|
||||
& camViewFrom -~ y
|
||||
where
|
||||
thetran = rotateV (cam ^. camRot) $ negate 10 *.* wasdDir theinput
|
||||
x = rotateV (cam ^. camRot) $ negate 10 *.* wasdDir theinput
|
||||
y | SDL.ScancodeLShift `M.member` (theinput ^. pressedKeys) = 0
|
||||
| otherwise = x
|
||||
|
||||
zoomFloatingCamera :: Input -> Camera -> Camera
|
||||
zoomFloatingCamera theinput
|
||||
|
||||
Reference in New Issue
Block a user