summaryrefslogtreecommitdiffstats
path: root/src/Texture.hs
blob: 746456ea8ca4808608bb39d35ad3941814569c75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"