Mapper, ARHUD, radar sweeps update. Add dropper items
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
module Dodge.Targeting.Draw (
|
||||
drawTargeting,
|
||||
drawTargetingAR,
|
||||
drawMapperAR,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Coordinate
|
||||
import Dodge.Data.Universe
|
||||
import Geometry.Data
|
||||
import Picture
|
||||
|
||||
-- it would be nice to get rid of some redundant checks here
|
||||
drawTargeting :: Item -> World -> Picture
|
||||
drawTargeting itm w = fromMaybe mempty $ do
|
||||
drawMapperAR :: Item -> World -> Maybe Picture
|
||||
drawMapperAR itm w = do
|
||||
ls <- itm ^? itUse . useMapperLines
|
||||
let _ = w ^. wCam . camRot
|
||||
return . setLayer FixedCoordLayer . color red $ foldMap (\(x,y) -> line [f x,f y]) ls
|
||||
where
|
||||
f = worldPosToScreen (w ^. wCam)
|
||||
|
||||
drawTargetingAR :: Item -> World -> Maybe Picture
|
||||
drawTargetingAR itm w = do
|
||||
p <- itm ^? itTargeting . itTgPos . _Just
|
||||
let thepic = case itm ^? itTargeting . itTgActive of
|
||||
Just True -> activeTargetCursorPic
|
||||
|
||||
Reference in New Issue
Block a user