Add general smooth scrolling, move camera into world

This commit is contained in:
2023-03-26 20:09:00 +01:00
parent 73e742e1a2
commit 07a1d71039
32 changed files with 154 additions and 131 deletions
-1
View File
@@ -24,7 +24,6 @@ import Data.Graph.Inductive
data CWorld = CWorld
{ _lWorld :: LWorld
, _cwCam :: Camera
, _cwGen :: CWGen
, _cClock :: Int
, _seenWalls :: IS.IntSet
+2 -1
View File
@@ -23,6 +23,7 @@ data Input = Input
, _mouseButtons :: M.Map MouseButton Int -- counts number of frames held down
, _scrollAmount :: Int
, _previousScrollAmount :: Int
, _smoothScrollAmount :: Int
, _lLine :: (Point2, Point2)
, _rLine :: (Point2, Point2)
, _lrLine :: (Point2, Point2)
@@ -31,7 +32,7 @@ data Input = Input
, _clickMousePos :: Point2 -- is this in world or screen coords?
, _clickPos :: M.Map MouseButton Point2 -- updates when mouse button is pressed
, _heldPos :: M.Map MouseButton Point2 -- updates when mouse button is held
-- ideally, lags ONE FRAME BEHIND the stored mouse position
-- lags ONE FRAME BEHIND the stored mouse position
, _textInput :: [Either TermSignal Char]
, _scrollTestFloat :: Float
, _scrollTestInt :: Int
+1
View File
@@ -51,6 +51,7 @@ data World = World
, _pnZoning :: IntMap (IntMap [(Int, Point2)]) --Zoning IM.IntMap Creature
, _peZoning :: IntMap (IntMap (Set PathEdgeNodes))
, _gsZoning :: IntMap (IntMap IntSet)
, _wCam :: Camera
}
data TimeFlowStatus