Simplified texture and model loading; also use crosshair for DefaultPlayer

This commit is contained in:
Matthias Schiffer 2010-04-12 16:17:41 +02:00
parent dafe16f191
commit 08762ddc9a
7 changed files with 55 additions and 54 deletions

View file

@ -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"