Cleanup
This commit is contained in:
@@ -1,17 +1,33 @@
|
||||
module Dodge.Creature.HandPos where
|
||||
module Dodge.Creature.HandPos (
|
||||
aimingWeaponZeroPos,
|
||||
aimingMuzzlePos,
|
||||
aimingMuzzleLength,
|
||||
translatePointToLeftHand,
|
||||
translatePointToRightHand,
|
||||
translatePointToHead,
|
||||
translateToLeftWrist,
|
||||
translateToRightWrist,
|
||||
translateToLeftLeg,
|
||||
translateToRightLeg,
|
||||
translateToHead,
|
||||
translateToChest,
|
||||
translateToBack,
|
||||
translateToLeftHand,
|
||||
translateToRightHand,
|
||||
) where
|
||||
|
||||
import Linear
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Data.Creature
|
||||
import Geometry
|
||||
import Linear
|
||||
import ShapePicture
|
||||
|
||||
-- the position of a weapon handle
|
||||
aimingWeaponHandlePos :: Creature -> Item -> Point2
|
||||
aimingWeaponHandlePos _ it = case it ^? itUse . heldAim . aimStance of
|
||||
Just TwoHandUnder -> 0
|
||||
Just TwoHandUnder -> 0
|
||||
Just TwoHandOver -> V2 (-7) 0
|
||||
Just OneHand -> V2 10 (-2)
|
||||
Just TwoHandFlat -> V2 10 0
|
||||
@@ -27,11 +43,6 @@ aimingMuzzlePos cr it = fmap ((+ zp) . _mzPos) (it ^.. itUse . heldAim . aimMuzz
|
||||
where
|
||||
zp = aimingWeaponZeroPos cr it
|
||||
|
||||
aimingMuzzleOff :: Creature -> Item -> [Point2]
|
||||
aimingMuzzleOff cr it = fmap (rotateV (_crDir cr) . (+ zp) . _mzPos) (it ^.. itUse . heldAim . aimMuzzles . folded)
|
||||
where
|
||||
zp = aimingWeaponZeroPos cr it
|
||||
|
||||
aimingMuzzleLength :: Creature -> Item -> Float
|
||||
aimingMuzzleLength cr it = head (aimingMuzzlePos cr it) ^. _x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user