Improve level generation speed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user