Improve level generation speed

This commit is contained in:
2021-08-16 20:56:49 +02:00
parent 37db056f23
commit 650e58bdfa
11 changed files with 168 additions and 133 deletions
+7 -2
View File
@@ -5,6 +5,7 @@ module Dodge.Creature.Picture
( basicCrPict
, circLine
, picAtCrPos
, picAtCrPosNoRot
) where
import Dodge.Data
--import Dodge.Creature.Stance.Data
@@ -174,5 +175,9 @@ circLine :: Float -> Picture
circLine x = line [V2 0 0,V2 x 0]
picAtCrPos :: Picture -> Creature -> World -> Picture
{-# INLINE picAtCrPos #-}
picAtCrPos thePic cr _ = uncurryV translate (_crPos cr) $ rotate (_crDir cr) thePic
--{-# INLINE picAtCrPos #-}
picAtCrPos thePic cr _ = tranRot (_crPos cr) (_crDir cr) thePic
picAtCrPosNoRot :: Picture -> Creature -> World -> Picture
--{-# INLINE picAtCrPos #-}
picAtCrPosNoRot thePic cr _ = uncurryV translate (_crPos cr) thePic