Commit before attempting to remove bottom and mid picture layers
This commit is contained in:
+11
-1
@@ -1,4 +1,14 @@
|
||||
/home/justin/Haskell/loop/src/Dodge/Item/Grammar.hs:12:1-20: warning: [-Wunused-imports]
|
||||
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:69:5-6: warning: [-Wunused-local-binds]
|
||||
Defined but not used: ‘am’
|
||||
|
|
||||
69 | am = fractionLoadedAmmo (it ^?! itUse . amagLoadStatus)
|
||||
| ^^
|
||||
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:75:1-19: warning: [-Wunused-top-binds]
|
||||
Defined but not used: ‘fractionLoadedAmmo2’
|
||||
|
|
||||
75 | fractionLoadedAmmo2 rs =
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
/home/justin/Haskell/loop/src/Dodge/Item/Grammar.hs:12:1: warning: [-Wunused-imports]
|
||||
The import of ‘Geometry.Data’ is redundant
|
||||
|
|
||||
12 | import Geometry.Data
|
||||
|
||||
@@ -59,13 +59,17 @@ ammoMagSPic it = \case
|
||||
TINMAG -> noPic $ upperPrismPolyTS 1 (reverse $ rectNSWE 0 (- y) (-1) 1)
|
||||
DRUMMAG -> noPic $ upperPrismPolyTS 1 (reverse $ rectNSWE 0 (- y) (-1) 1)
|
||||
CHEMFUELPOUCH -> (colorSH yellow (upperPrismPolyST 3 $ polyCirc 3 5)
|
||||
, setLayer MidLayer . color black $ translate3 (V3 0 0 4) $ circleSolid (5 * am)
|
||||
, mempty
|
||||
-- , setLayer MidLayer . color black $ translate3 (V3 0 0 4) $ circleSolid (5 * am)
|
||||
)
|
||||
_ -> noPic $ upperPrismPolyTS 1 (reverse $ rectNSWE 0 (- y) (-1) 1)
|
||||
where
|
||||
y = fromIntegral y' * 0.3
|
||||
y' = fromMaybe 0 $ it ^? itUse . amagLoadStatus . iaLoaded
|
||||
am = fractionLoadedAmmo2 (it ^?! itUse . amagLoadStatus)
|
||||
am = fractionLoadedAmmo (it ^?! itUse . amagLoadStatus)
|
||||
|
||||
fractionLoadedAmmo :: ReloadStatus -> Float
|
||||
fractionLoadedAmmo rs = fromIntegral (_iaLoaded rs) / fromIntegral (_iaMax rs)
|
||||
|
||||
fractionLoadedAmmo2 :: ReloadStatus -> Float
|
||||
fractionLoadedAmmo2 rs =
|
||||
|
||||
+2
-2
@@ -162,7 +162,7 @@ doDrawing' win pdata u = do
|
||||
0
|
||||
(fromIntegral trueNWalls)
|
||||
--draw object pictures onto base buffer (are there any?!)
|
||||
renderLayer BottomLayer shadV layerCounts
|
||||
-- renderLayer BottomLayer shadV layerCounts
|
||||
--draw object shapes onto base buffer
|
||||
let fs = _shapeShader pdata
|
||||
glUseProgram (_shaderUINT fs)
|
||||
@@ -251,7 +251,7 @@ doDrawing' win pdata u = do
|
||||
GL_COLOR
|
||||
0
|
||||
ptr
|
||||
renderLayer MidLayer shadV layerCounts
|
||||
-- renderLayer MidLayer shadV layerCounts
|
||||
glUseProgram (pdata ^. cloudShader . shaderUINT)
|
||||
glBindVertexArray $ pdata ^. cloudShader . shaderVAO . vaoName
|
||||
glDrawElements
|
||||
|
||||
+1
-1
@@ -49,4 +49,4 @@ arcPart startA sw sc endA ew ec r centercol =
|
||||
(V2 xa ya) = rotateV startA (V2 r 0)
|
||||
(V2 xb yb) = rotateV (0.5 * (startA + endA)) (V2 (r * sqrt 2) 0)
|
||||
(V2 xc yc) = rotateV endA (V2 r 0)
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c] BottomLayer ArcShad
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c] minBound ArcShad
|
||||
|
||||
+5
-5
@@ -73,13 +73,13 @@ polygon :: [Point2] -> Picture
|
||||
{-# INLINE polygon #-}
|
||||
polygon = map f . polyToTris
|
||||
where
|
||||
f (V2 x y) = Verx (V3 x y 0) black [] BottomLayer PolyShad
|
||||
f (V2 x y) = Verx (V3 x y 0) black [] minBound PolyShad
|
||||
|
||||
polygonCol :: [(Point2, RGBA)] -> Picture
|
||||
{-# INLINE polygonCol #-}
|
||||
polygonCol = polyToTris . map f
|
||||
where
|
||||
f (V2 x y, col) = Verx (V3 x y 0) col [] BottomLayer PolyShad
|
||||
f (V2 x y, col) = Verx (V3 x y 0) col [] minBound PolyShad
|
||||
|
||||
poly3 :: [Point3] -> Picture
|
||||
{-# INLINE poly3 #-}
|
||||
@@ -89,7 +89,7 @@ poly3Col :: [(Point3, RGBA)] -> Picture
|
||||
{-# INLINE poly3Col #-}
|
||||
poly3Col = map f . polyToTris
|
||||
where
|
||||
f (pos, col) = Verx pos col [] BottomLayer PolyShad
|
||||
f (pos, col) = Verx pos col [] minBound PolyShad
|
||||
|
||||
---- given a one and two zeros of a linear function over x and y,
|
||||
---- determine the function
|
||||
@@ -175,7 +175,7 @@ circleSolidCol colC colE r =
|
||||
, (V3 r (- r) 0, black)
|
||||
]
|
||||
where
|
||||
f (pos, col) = Verx pos col [] BottomLayer EllShad
|
||||
f (pos, col) = Verx pos col [] minBound EllShad
|
||||
|
||||
circle :: Float -> Picture
|
||||
{-# INLINE circle #-}
|
||||
@@ -221,7 +221,7 @@ drawText :: Float -> String -> [Verx]
|
||||
{-# INLINE drawText #-}
|
||||
drawText gap = map f . stringToList gap
|
||||
where
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c, 1] BottomLayer TextShad
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c, 1] minBound TextShad
|
||||
|
||||
line :: [Point2] -> Picture
|
||||
{-# INLINE line #-}
|
||||
|
||||
+1
-1
@@ -46,4 +46,4 @@ arcTest' startA sw sc endA ew ec r centercol =
|
||||
(V2 xa ya) = rotateV startA (V2 r 0)
|
||||
(V2 xb yb) = rotateV (0.5 * (startA + endA)) (V2 (r * sqrt 2) 0)
|
||||
(V2 xc yc) = rotateV endA (V2 r 0)
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c] BottomLayer ArcShad
|
||||
f (pos, col, V3 a b c) = Verx pos col [a, b, c] minBound ArcShad
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ textGrad :: Color -> Color -> String -> Picture
|
||||
{-# INLINE textGrad #-}
|
||||
textGrad topc botc = map f . stringToListGrad topc botc
|
||||
where
|
||||
f (pos, col, V2 a b) = Verx pos col [a, b] BottomLayer TextShad
|
||||
f (pos, col, V2 a b) = Verx pos col [a, b] minBound TextShad
|
||||
|
||||
-- no premature optimisation, consider changing to use texture arrays
|
||||
stringToListGrad :: Color -> Color -> String -> [(Point3, Point4, Point2)]
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ polyToPics = map helpPoly3D . _pyFaces
|
||||
helpPoly3D :: [(Point3, Point4)] -> Picture
|
||||
helpPoly3D = picFormat . map f . polyToTris
|
||||
where
|
||||
f (pos,col) = Verx pos col [] BottomLayer PolyShad
|
||||
f (pos,col) = Verx pos col [] minBound PolyShad
|
||||
|
||||
polysToPic :: [Polyhedra] -> Picture
|
||||
polysToPic = fold . concatMap polyToPics
|
||||
|
||||
Reference in New Issue
Block a user