Remove bezier shader
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
module Dodge.Render.Connectors
|
||||
( zConnect
|
||||
, zConnectCol
|
||||
, bConnect
|
||||
, lConnect
|
||||
) where
|
||||
import Picture
|
||||
@@ -24,16 +23,6 @@ zConnectCol (V2 x y) (V2 a b) c1 c2 c3 c4 = lineCol $ zip
|
||||
]
|
||||
) [c1,c2,c3,c4]
|
||||
|
||||
bConnect :: Point2 -> Point2 -> Picture
|
||||
bConnect (V2 x y) (V2 z w) = pictures
|
||||
[ bline 0.2 0.050 0.010
|
||||
, bline 0.5 0.045 0.005
|
||||
, bline 0.5 0.035 0.002
|
||||
] --cheapo antialiasing
|
||||
where
|
||||
bline alph lwidth rwidth
|
||||
= bezierQuad (withAlpha 0.0 white) (withAlpha alph white) lwidth rwidth (V2 x y) (V2 0 y) (V2 z w)
|
||||
|
||||
lConnect :: Point2 -> Point2 -> Picture
|
||||
lConnect sp@(V2 _ y) ep@(V2 x _) = line
|
||||
[ sp
|
||||
|
||||
+13
-12
@@ -23,7 +23,7 @@ import Dodge.ListDisplayParams
|
||||
import Dodge.Render.Connectors
|
||||
import Dodge.Render.List
|
||||
import Dodge.Tweak.Show
|
||||
import Dodge.WorldPos
|
||||
--import Dodge.WorldPos
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
import Justify
|
||||
@@ -312,22 +312,23 @@ drawCarte :: Configuration -> World -> Picture
|
||||
drawCarte cfig w =
|
||||
pictures $
|
||||
renderListAt 0 0 cfig locs :
|
||||
zipWith bConnect (displayListEndCoords cfig locTexts) locPoss
|
||||
++ mapOverlay cfig w
|
||||
-- zipWith bConnect (displayListEndCoords cfig locTexts) locPoss
|
||||
-- ++
|
||||
mapOverlay cfig w
|
||||
++ [mainListCursor white iPos cfig]
|
||||
where
|
||||
iPos = w ^. cWorld . lWorld . selLocation
|
||||
locs = map (\(_, s) -> (s, white)) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
locPoss = map (cartePosToScreen cfig (w ^. hud) . ($ w) . doWorldPos . fst) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
locTexts = map fst locs
|
||||
--locPoss = map (cartePosToScreen cfig (w ^. hud) . ($ w) . doWorldPos . fst) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
--locTexts = map fst locs
|
||||
|
||||
displayListEndCoords :: Configuration -> [String] -> [Point2]
|
||||
displayListEndCoords cfig ss = map (doWindowScale cfig) $ zipWith h ss $ map f [1 ..]
|
||||
where
|
||||
f :: Int -> Point2
|
||||
f i = V2 (15 - halfWidth cfig) (2.5 + halfHeight cfig - (20 * fromIntegral i))
|
||||
h :: String -> Point2 -> Point2
|
||||
h s (V2 x y) = V2 (x + 9 * fromIntegral (length s)) y
|
||||
--displayListEndCoords :: Configuration -> [String] -> [Point2]
|
||||
--displayListEndCoords cfig ss = map (doWindowScale cfig) $ zipWith h ss $ map f [1 ..]
|
||||
-- where
|
||||
-- f :: Int -> Point2
|
||||
-- f i = V2 (15 - halfWidth cfig) (2.5 + halfHeight cfig - (20 * fromIntegral i))
|
||||
-- h :: String -> Point2 -> Point2
|
||||
-- h s (V2 x y) = V2 (x + 9 * fromIntegral (length s)) y
|
||||
|
||||
mapOverlay :: Configuration -> World -> [Picture]
|
||||
mapOverlay cfig w =
|
||||
|
||||
Reference in New Issue
Block a user