Add frame clock

This commit is contained in:
2021-09-09 13:29:09 +01:00
parent a2288110ae
commit be7b2d2cd7
27 changed files with 176 additions and 87 deletions
+14 -5
View File
@@ -103,14 +103,14 @@ data World = World
, _selLocation :: Int
, _keyConfig :: KeyConfigSDL
, _config :: Configuration
, _sideEffects :: [PreloadData -> IO PreloadData]
, _doneSideEffects :: [PreloadData -> IO PreloadData]
, _sideEffects :: World -> IO World
, _debugFlags :: DebugFlags
, _inventoryMode :: InventoryMode
, _lClickHammer :: HammerPosition
, _radDistortion :: [(Point2,Point2,Point2,Float)]
, _gameRooms :: [GameRoom]
, _preloadData :: PreloadData
, _frameClock :: Int
}
data OptionScreenFlag = NormalOptions | GameOverOptions
data ScreenLayer
@@ -221,10 +221,15 @@ data Creature = Creature
, _crMemory :: MemoryState
, _crFaction :: Faction
, _crGroup :: CrGroup
, _crTarget :: Maybe Creature
, _crMvTarget :: Maybe Point2
, _crIntention :: Intention
, _crMvType :: CrMvType
}
data Intention = Intention
{ _targetCr :: Maybe Creature
, _mvToPoint :: Maybe Point2
, _viewPoint :: Maybe Point2
}
data CrMvType
= NoMvType
| ChaseMvType
@@ -580,7 +585,7 @@ data Impulse
| DropItem
-- | PickupNearby Int
-- | UseWorldObject Int
| Bark -- placeholder for various communication types
-- | Bark -- placeholder for various communication types
-- | UseIntrinsicAbility
| Melee Int
| ChangePosture Posture
@@ -612,6 +617,9 @@ data Action
| PathTo
{_pathToPoint :: Point2
}
| TurnToA
{_turnToAPoint :: Point2
}
-- | PickupItem
-- {_pickupItemID :: Int
-- }
@@ -737,6 +745,7 @@ makeLenses ''Impulse
makeLenses ''Action
makeLenses ''CrGroupParams
makeLenses ''CrMvType
makeLenses ''Intention
numColor :: Int -> Color
numColor 0 = toV4 (1,0,0,1)
numColor 1 = toV4 (0,1,0,1)