Cleanup
This commit is contained in:
@@ -44,7 +44,7 @@ basicCrShape cr
|
||||
where
|
||||
cskin = _crType cr
|
||||
crsize = 0.1 * _crRad cr
|
||||
tr = uncurryV translateSHf (_crPos cr)
|
||||
tr = uncurryV translateSHxy (_crPos cr)
|
||||
rotdir = rotateSH (_crDir cr)
|
||||
rotmdir = rotateSH (_crMvDir cr)
|
||||
|
||||
@@ -53,18 +53,18 @@ feet :: Creature -> Shape
|
||||
feet cr = case cr ^? crStance . carriage of
|
||||
Just (Walking sa LeftForward) ->
|
||||
mconcat
|
||||
[ translateSHf (f sa) off aFoot
|
||||
, translateSHf (- f sa) (- off) aFoot
|
||||
[ translateSHxy (f sa) off aFoot
|
||||
, translateSHxy (- f sa) (- off) aFoot
|
||||
]
|
||||
Just (Walking sa RightForward) ->
|
||||
mconcat
|
||||
[ translateSHf (- f sa) off aFoot
|
||||
, translateSHf (f sa) (- off) aFoot
|
||||
[ translateSHxy (- f sa) off aFoot
|
||||
, translateSHxy (f sa) (- off) aFoot
|
||||
]
|
||||
_ ->
|
||||
mconcat
|
||||
[ translateSHf 0 off aFoot
|
||||
, translateSHf 0 (- off) aFoot
|
||||
[ translateSHxy 0 off aFoot
|
||||
, translateSHxy 0 (- off) aFoot
|
||||
]
|
||||
where
|
||||
aFoot :: Shape
|
||||
@@ -78,18 +78,18 @@ deadFeet :: Creature -> Shape
|
||||
deadFeet cr = case cr ^? crStance . carriage of
|
||||
Just (Walking sa LeftForward) ->
|
||||
mconcat
|
||||
[ translateSHf (f sa) off aFoot
|
||||
, translateSHf (- f sa) (- off) aFoot
|
||||
[ translateSHxy (f sa) off aFoot
|
||||
, translateSHxy (- f sa) (- off) aFoot
|
||||
]
|
||||
Just (Walking sa RightForward) ->
|
||||
mconcat
|
||||
[ translateSHf (- f sa) off aFoot
|
||||
, translateSHf (f sa) (- off) aFoot
|
||||
[ translateSHxy (- f sa) off aFoot
|
||||
, translateSHxy (f sa) (- off) aFoot
|
||||
]
|
||||
_ ->
|
||||
mconcat
|
||||
[ translateSHf 0 off aFoot
|
||||
, translateSHf 0 (- off) aFoot
|
||||
[ translateSHxy 0 off aFoot
|
||||
, translateSHxy 0 (- off) aFoot
|
||||
]
|
||||
where
|
||||
aFoot :: Shape
|
||||
@@ -122,9 +122,9 @@ deadRot cr = overPosSH (Q.rotateToZ d)
|
||||
scalp :: Creature -> Shape
|
||||
{-# INLINE scalp #-}
|
||||
scalp cr
|
||||
| twists cr = translateSHf 0 5 . rotateSH (-1) $ translateSHf (negate 2.5) 0.25 fhead
|
||||
| oneH cr = rotateSH 0.5 $ translateSHf 2.5 0 fhead
|
||||
| otherwise = translateSHf 2.5 0 fhead
|
||||
| twists cr = translateSHxy 0 5 . rotateSH (-1) $ translateSHxy (negate 2.5) 0.25 fhead
|
||||
| oneH cr = rotateSH 0.5 $ translateSHxy 2.5 0 fhead
|
||||
| otherwise = translateSHxy 2.5 0 fhead
|
||||
where
|
||||
fhead = colorSH (greyN 0.9) . upperPrismPolyHalf 5 $ polyCirc 4 5
|
||||
|
||||
@@ -134,19 +134,19 @@ torso cr
|
||||
| oneH cr =
|
||||
rotateSH 0.5 $
|
||||
mconcat
|
||||
[ translateSHf 0 3 . rotateSH (negate 0.2) $ aShoulder
|
||||
, translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
[ translateSHxy 0 3 . rotateSH (negate 0.2) $ aShoulder
|
||||
, translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
]
|
||||
| twists cr =
|
||||
translateSHf 0 5 . rotateSH (-1) $
|
||||
translateSHxy 0 5 . rotateSH (-1) $
|
||||
mconcat
|
||||
[ rotateSH (negate 0.2) . translateSHf 2 3 . rotateSH (negate 0.4) $ aShoulder
|
||||
, rotateSH (negate 0.2) . translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
[ rotateSH (negate 0.2) . translateSHxy 2 3 . rotateSH (negate 0.4) $ aShoulder
|
||||
, rotateSH (negate 0.2) . translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
]
|
||||
| otherwise =
|
||||
mconcat
|
||||
[ translateSHf 0 3 . rotateSH (negate 0.2) $ aShoulder
|
||||
, translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
[ translateSHxy 0 3 . rotateSH (negate 0.2) $ aShoulder
|
||||
, translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
|
||||
]
|
||||
where
|
||||
aShoulder = scaleSH (V3 10 10 1) baseShoulder
|
||||
|
||||
@@ -30,7 +30,7 @@ equipItemSPic et _ = case et of
|
||||
MAGSHIELD -> defSPic
|
||||
FLAMESHIELD -> defSPic
|
||||
FRONTARMOUR ->
|
||||
( emptySH
|
||||
( mempty
|
||||
, setDepth 20 $
|
||||
pictures
|
||||
[ color yellow $ thickArc 0 (pi / 2) 10 5
|
||||
@@ -191,8 +191,8 @@ heldItemSPic ht it = case ht of
|
||||
torchShape :: Shape
|
||||
torchShape =
|
||||
colorSH blue $
|
||||
translateSHf 0 1.5 side
|
||||
<> translateSHf 0 (-1.5) side
|
||||
translateSHxy 0 1.5 side
|
||||
<> translateSHxy 0 (-1.5) side
|
||||
<> translateSHz 2.5 top
|
||||
<> translateSHz (-0.5) bot
|
||||
<> back
|
||||
@@ -397,7 +397,7 @@ baseSMGShape = colorSH green $ upperPrismPoly 3 $ rectXH 20 2
|
||||
flamerPic :: Item -> SPic
|
||||
flamerPic it =
|
||||
( colorSH yellow $
|
||||
translateSHf tx ty (upperPrismPoly tz $ polyCirc 3 r)
|
||||
translateSHxy tx ty (upperPrismPoly tz $ polyCirc 3 r)
|
||||
<> upperPrismPoly 5 (rectNESW 2 18 (-2) 0)
|
||||
, color black $ translate3 (V3 tx ty (tz + 0.01)) $ circleSolid (r * am)
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ drawShell :: Proj -> SPic
|
||||
drawShell pj =
|
||||
noPic
|
||||
. translateSHz 18
|
||||
. uncurryV translateSHf (_prjPos pj)
|
||||
. uncurryV translateSHxy (_prjPos pj)
|
||||
$ rotateSH (argV $ _prjAcc pj) shellShape
|
||||
|
||||
shellShape :: Shape
|
||||
|
||||
@@ -43,7 +43,7 @@ propDrawToggle pd pr
|
||||
|
||||
drawLampCover :: Float -> Prop -> SPic
|
||||
drawLampCover h pr =
|
||||
( translateSHz (h -2.5) . uncurryV translateSHf (_prPos pr) $
|
||||
( translateSHz (h -2.5) . uncurryV translateSHxy (_prPos pr) $
|
||||
rotateSH (_prRot pr) $
|
||||
mconcat
|
||||
[ translateSHz 1 . upperPrismPoly 1 . reverse $ rectNSWE 3 2 (-1) 3
|
||||
@@ -57,7 +57,7 @@ drawLampCover h pr =
|
||||
|
||||
drawVerticalLampCover :: Float -> Prop -> SPic
|
||||
drawVerticalLampCover h pr =
|
||||
( translateSHz h . uncurryV translateSHf (_prPos pr) $
|
||||
( translateSHz h . uncurryV translateSHxy (_prPos pr) $
|
||||
rotateSHx (_prRot pr) $
|
||||
mconcat
|
||||
[ translateSHz (-3) . upperPrismPoly 1 $ reverse $ rectNSWE 2 (-2) (-5) 5
|
||||
@@ -69,20 +69,20 @@ drawMovingShape :: Prop -> Shape -> SPic
|
||||
drawMovingShape pr =
|
||||
noPic
|
||||
. translateSHz (_prPosZ pr)
|
||||
. uncurryV translateSHf (_prPos pr)
|
||||
. uncurryV translateSHxy (_prPos pr)
|
||||
. overPosSH (Q.rotate (_prQuat pr))
|
||||
|
||||
drawMovingShapeCol :: Prop -> Shape -> SPic
|
||||
drawMovingShapeCol pr =
|
||||
noPic
|
||||
. translateSHz (_prPosZ pr)
|
||||
. uncurryV translateSHf (_prPos pr)
|
||||
. uncurryV translateSHxy (_prPos pr)
|
||||
. overPosSH (Q.rotate (_prQuat pr))
|
||||
. colorSH (_prColor pr)
|
||||
|
||||
drawDoubleLampCover :: Float -> Prop -> SPic
|
||||
drawDoubleLampCover h pr =
|
||||
( translateSHz (h -2.5) . uncurryV translateSHf (_prPos pr) $
|
||||
( translateSHz (h -2.5) . uncurryV translateSHxy (_prPos pr) $
|
||||
rotateSH (_prRot pr) $
|
||||
mconcat
|
||||
[ upperPrismPoly 5 $ reverse $ rectNSWE 6 5 (-6) 6
|
||||
|
||||
@@ -136,7 +136,7 @@ putShape sh =
|
||||
defaultForeground
|
||||
& fsPos .~ m
|
||||
& fsRad .~ radBounds bnds
|
||||
& fsSPic .~ noPic (uncurryV translateSHf (- m) sh)
|
||||
& fsSPic .~ noPic (uncurryV translateSHxy (- m) sh)
|
||||
where
|
||||
bnds = shapeBounds sh
|
||||
m = midBounds bnds
|
||||
|
||||
Reference in New Issue
Block a user