This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
htanks/src/Model.hs

17 lines
452 B
Haskell

module Model ( Model(..)
, InterleavedObj
, modelPath
) where
import Paths_htanks
import Data.Obj3D.GL (InterleavedObj)
data Model = ModelTank | ModelBullet | ModelBlock
deriving (Eq, Ord, Show)
modelPath :: Model -> IO FilePath
modelPath t = getDataFileName $ "model/" ++ (name t) ++ ".obj"
where
name ModelTank = "tank"
name ModelBullet = "bullet"
name ModelBlock = "cube"