diff options
Diffstat (limited to 'src/Texture.hs')
-rw-r--r-- | src/Texture.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Texture.hs b/src/Texture.hs index 1e82cdf..746456e 100644 --- a/src/Texture.hs +++ b/src/Texture.hs @@ -1,8 +1,19 @@ module Texture ( Texture(..) , TextureObject + , texturePath ) where +import Paths_htanks import Graphics.Rendering.OpenGL.GL.Texturing.Objects (TextureObject) data Texture = TextureWood | TextureTank | TextureCannon | TextureBullet | TextureCrosshair deriving (Eq, Ord, Show) + +texturePath :: Texture -> IO FilePath +texturePath t = getDataFileName $ "tex/" ++ (name t) ++ ".png" + where + name TextureWood = "Wood" + name TextureTank = "Tank" + name TextureCannon = "Cannon" + name TextureBullet = "Bullet" + name TextureCrosshair = "Crosshair" |