Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
module Dodge.Creature.Picture.Awareness where
import Linear (_xy)
import Dodge.Creature.Radius
import qualified Data.Vector as V
import Dodge.Clock
@@ -31,7 +32,7 @@ creatureDisplayText w cr =
lw = w ^. cWorld . lWorld
campos = w ^. wCam . camViewFrom
theScale = 0.15 / (w ^. wCam . camZoom)
cpos = _crPos cr
cpos = cr ^. crPos . _xy
v = cpos -.- campos
(V2 x y) = campos +.+ v +.+ crRad (cr ^. crType) *.* normalizeV v