pituicat/src/Types/Application.hs

64 lines
988 B
Haskell

module Types.Application where
import Affection
import qualified SDL
import Control.Concurrent.STM
import qualified Data.Map.Strict as M
-- internal imports
import Types.Subsystems
data GameData = GameData
{ gameState :: TVar State
-- , gameCurrentLevel :: Tvar Level
, gameSubsystems :: Subsystems
, gameActionTranslation :: TVar ActionTranslation
, gameRunning :: TVar Bool
}
data State
= Loading
| Menu MenuState
| MainGame Level
deriving (Eq, Show)
data MenuState
= MenuMain
| MenuSettings
deriving (Eq , Show)
data Level
= DNAMenu
| Sewer01
| Sewer02
| Sewer03
| Sewer04
| Alley01
| Alley02
| Alley03
| Alley04
| Lab01
| Lab02
| Lab03
| Lab04
| Highway01
| Highway02
| Highway03
| Highway04
| Complex01
| Complex02
| Complex03
| Complex04
| Base01
| Base02
| Base03
| Base04
| Test
deriving (Enum, Eq, Show)
type ActionTranslation = M.Map SDL.Keycode Action