pituicat/src/Types/Application.hs

77 lines
1.2 KiB
Haskell
Raw Normal View History

2020-09-21 02:26:45 +00:00
module Types.Application where
import Affection
import qualified SDL
2020-09-23 23:26:47 +00:00
import Control.Concurrent.STM
2020-09-21 02:26:45 +00:00
import qualified Data.Map.Strict as M
import qualified Data.Text as T
2020-09-21 02:26:45 +00:00
-- internal imports
import Types.Subsystems
2020-10-09 23:00:33 +00:00
import Types.GameMap
2020-09-21 02:26:45 +00:00
data GameData = GameData
{ gameState :: TVar State
, gameStateLoadProgress :: TMVar Progress
, gameStateData :: TMVar StateData
2020-09-21 02:26:45 +00:00
, gameSubsystems :: Subsystems
, gameActionTranslation :: TVar ActionTranslation
2020-09-23 23:26:47 +00:00
, gameRunning :: TVar Bool
2020-09-21 02:26:45 +00:00
}
data State
2020-09-22 12:07:13 +00:00
= Loading
| Menu MenuState
| MainGame Level
deriving (Eq, Show)
data MenuState
= MenuMain
| MenuSettings
2020-09-23 23:26:47 +00:00
deriving (Eq , Show)
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
2020-09-23 23:26:47 +00:00
| Base02
| Base03
| Base04
2020-09-21 02:26:45 +00:00
| Test
deriving (Enum, Eq, Show)
type Progress = (Float, T.Text)
2020-09-21 02:26:45 +00:00
type ActionTranslation = M.Map SDL.Keycode Action
2020-10-06 02:19:07 +00:00
2020-10-09 23:00:33 +00:00
data StateData
= EmptyData
| TestData
2020-10-06 02:19:07 +00:00
{ testMap :: LevelMap
}
deriving (Eq, Show)