Center and rotate to horizontal sound text

This commit is contained in:
2021-09-12 21:00:02 +01:00
parent 72657294d1
commit 064d43f903
3 changed files with 14 additions and 2 deletions
+8 -1
View File
@@ -78,7 +78,14 @@ soundPic :: World -> Sound -> Picture
soundPic w s = fixedSizePicClampArrow 50 50 thePic p w
where
p = _soundPos s
thePic = scale 0.15 0.15 $ text $ soundToOnomato $ _soundChunkID s
thePic
= rotate (_cameraRot w)
. scale theScale theScale
. centerText
. soundToOnomato
$ _soundChunkID s
theScale = 0.15 * f (_soundVolume s * 0.0001)
f x = 1 - 0.5 * (1 - x)
crDraw :: World -> Creature -> Picture
crDraw w c = _crPict c c w