Make anti-clockwise what were clockwise shapes, cleanup flash module-ing

This commit is contained in:
2024-10-04 00:59:08 +01:00
parent ac550bc6a4
commit 075429088b
18 changed files with 128 additions and 156 deletions
+10 -21
View File
@@ -44,12 +44,12 @@ itemSPic it = case it ^. itType of
ammoMagSPic :: Item -> AmmoMagType -> SPic
ammoMagSPic it = \case
TINMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
DRUMMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
TINMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 5)) (-1) 1)
DRUMMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 15)) (-1) 1)
CHEMFUELPOUCH -> noPic $ colorSH yellow (upperPrismPolyST 3 $ polyCirc 3 5)
BATTERY -> colorSH blue (upperBox Tiny Superfluous 1 (rectNSWE 0 (-2) (-2) 2))
:!: setLayer BloomNoZWrite (setDepth 2 . color (mixColorsFrac green red am) $ circleSolid 2)
_ -> noPic $ upperPrismPolyTS 1 (reverse $ rectNSWE 0 (- y) (-1) 1)
_ -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
where
y = fromIntegral y' * 0.3
y' = fromMaybe 0 $ it ^? itUse . amagLoadStatus . iaLoaded
@@ -246,8 +246,8 @@ shatterGunSPic =
-- TODO cylinderize
noPic $
colorSH blue $
upperPrismPolyST 5 (rectNESW xb 8 xa 0)
<> upperPrismPolyST 5 (rectNESW (- xa) 8 (- xb) 0)
upperPrismPolyST 5 (rectNSWE xb xa 0 8)
<> upperPrismPolyST 5 (rectNSWE (- xa) (- xb) 0 8)
where
xa = 1
xb = 9
@@ -346,28 +346,17 @@ baseAMRShape :: Shape
baseAMRShape = colorSH orange $ xCylinderST 3 30
teslaGunPic :: SPic
teslaGunPic =
noPic $
colorSH blue $
upperPrismPolyST 5 (rectNESW xb 8 xa 0)
<> upperPrismPolyST 5 (rectNESW (- xa) 8 (- xb) 0)
where
xa = 1
xb = 9
teslaGunPic = shatterGunSPic
lasGunPic :: Item -> SPic
lasGunPic _ =
colorSH
blue
( upperBoxST 4 (rectNESW 3 30 1 0)
<> upperBoxSU 4 (rectNESW (-1) 30 (-3) 0)
<> upperBoxSU 1 (rectNESW 3 30 (-3) 0)
( upperBoxST 4 (rectNSWE 3 1 0 30)
<> upperBoxSU 4 (rectNSWE (-1) (-3) 0 30)
<> upperBoxSU 1 (rectNSWE 3 (-3) 0 30)
)
:!: (setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW 1 30 (-1) 0)
where
--amFrac = fractionLoadedAmmo it
amFrac = 0.5
col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
:!: mempty
--dualBeamPic :: Item -> SPic
--dualBeamPic it =