pituicat/src/Types/Application.hs

63 lines
971 B
Haskell
Raw Normal View History

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