Files
loop/src/Dodge/Data/Creature/Stance.hs
T
2026-04-20 12:25:39 +01:00

49 lines
1.2 KiB
Haskell

{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Creature.Stance (
module Dodge.Data.Creature.Stance,
module Dodge.Data.AimStance,
) where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.AimStance
import Geometry.Data
import Linear
data Stance = Stance
{ _carriage :: Carriage
, _posture :: Posture
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Carriage
= Walking
| Crawling
| Floating
| Flying {_zSpeed :: Float}--, _flyInertia :: Float}
| Boosting Point2
| Falling {_fallRot :: Quaternion Float, _carDir :: Quaternion Float}
| OnGround {_carDir :: Quaternion Float}
| Rooted
| Mounted {_mountID :: Int, _mountPos :: Point3}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data FootForward = LeftForward | RightForward
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Posture = Aiming | AtEase
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Stance
makeLenses ''Carriage
makeLenses ''Posture
deriveJSON defaultOptions ''Quaternion
deriveJSON defaultOptions ''FootForward
deriveJSON defaultOptions ''Posture
deriveJSON defaultOptions ''Carriage
deriveJSON defaultOptions ''Stance