Fix dependency loop

This commit is contained in:
Tibo De Peuter 2022-12-22 13:31:46 +01:00
parent b7278d6afc
commit f529fc5237
25 changed files with 251 additions and 199 deletions

View file

@ -2,22 +2,13 @@ module RPGEngine.Render.Playing
( renderPlaying
) where
import RPGEngine.Render.Core ( Renderer, getRender, setRenderPos )
import RPGEngine.Render.Core (Renderer, getRender, setRenderPos)
import RPGEngine.Data
( Player(..),
Entity(..),
Item(..),
Physical(..),
Layout,
Level(..),
State(..),
Game(..) )
import Graphics.Gloss ( Picture, pictures )
import Graphics.Gloss.Data.Picture (translate)
import RPGEngine.Config (resolution, zoom)
import Graphics.Gloss (text)
import Graphics.Gloss (blank)
import RPGEngine.Data (State(..), Player (..), Game (..), Level (..), Layout, Physical (..), Item (..), Entity (..))
import Graphics.Gloss ( pictures, Picture, translate )
import Graphics.Gloss.Data.Picture (blank)
------------------------------ Exported ------------------------------
@ -42,6 +33,7 @@ focusPlayer Game{ state = Playing{ player = Player{ position = (x, y) }}} = move
where move = translate centerX centerY
centerX = resolution * zoom * fromIntegral (negate x)
centerY = resolution * zoom * fromIntegral (negate y)
focusPlayer _ = id
------------------------------- Level --------------------------------