deleting obsolete files

This commit is contained in:
nek0 2020-12-07 00:38:17 +01:00
parent ec087113f8
commit e7e157c8ab
8 changed files with 0 additions and 141 deletions

View file

@ -1,7 +0,0 @@
module State.Loading
( module L
) where
import State.Loading.Load as L
import State.Loading.Update as L
import State.Loading.Draw as L

View file

@ -1,10 +0,0 @@
module State.Loading.Draw where
import Affection
-- internal imports
import Types
initLoadDraw :: GameData -> Affection ()
initLoadDraw gd = return ()

View file

@ -1,35 +0,0 @@
module State.Loading.Load where
import Affection
import SDL (($=), get)
import qualified SDL
import qualified SDL.Internal.Numbered as SDL
import qualified SDL.Raw.Video as SDL (glSetAttribute)
import qualified SDL.Raw.Enum as SDL
import qualified Graphics.Rendering.OpenGL as GL
import qualified Graphics.GL as GLRaw
import Foreign.Marshal.Array
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
-- internal imports
import Types
import Classes
import Map
initLoad
:: GameData
-> Affection ()
initLoad gd = do
(Stage scene) <- liftIO $ atomically $ readTMVar $ gameScene gd
tid <- liftIO $ forkIO $ loadScene scene (gameStateLoadProgress gd)
liftIO $ atomically $ writeTVar (gameLoadThread gd) (Just tid)

View file

@ -1,10 +0,0 @@
module State.Loading.Update where
import Affection
-- internal imports
import Types
initLoadUpdate :: GameData -> Double -> Affection ()
initLoadUpdate gd dt = return ()

View file

@ -1,7 +0,0 @@
module State.MainGame
( module L
) where
import State.MainGame.Load as L
import State.MainGame.Update as L
import State.MainGame.Draw as L

View file

@ -1,10 +0,0 @@
module State.MainGame.Draw where
import Affection
-- internal imports
import Types
mainGameDraw :: GameData -> Affection ()
mainGameDraw gd = return ()

View file

@ -1,45 +0,0 @@
{-# LANGUAGE OverloadedStrings #-}
module State.MainGame.Load where
import Affection
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Control.Monad (void)
-- internal imports
import Types
import Map
import Classes.Scene
mainGameLoad
:: GameData
-> Affection ()
mainGameLoad gd = do
liftIO $ atomically $ do
_ <- takeTMVar (gameStateLoadProgress gd)
putTMVar (gameStateLoadProgress gd) (0, "Ohai!")
liftIO $ logIO Verbose "Entering main Game"
tid <- liftIO $ forkIO $ loadFork (gameScene gd) (gameStateLoadProgress gd)
liftIO $ atomically $ writeTVar (gameLoadThread gd) (Just tid)
loadFork
:: TMVar Stage
-> TMVar Progress
-> IO ()
loadFork stage progress = do
(Stage sceneContainer) <- atomically $ readTMVar stage
loadScene sceneContainer progress
void $ atomically $ swapTMVar stage (Stage sceneContainer)
-- atomically $ do
-- _ <- takeTMVar progress
-- putTMVar progress (0, "Loading test level...")
-- testData <- TestData <$> constructMap testLevelDesc 0
-- print testData
-- atomically $ do
-- _ <- takeTMVar dataContainer
-- putTMVar dataContainer testData
-- _ <- takeTMVar progress
-- putTMVar progress (1, "Loaded test level!")

View file

@ -1,17 +0,0 @@
{-# LANGUAGE OverloadedStrings #-}
module State.MainGame.Update where
import Affection
import Control.Monad (when)
import Control.Concurrent.STM
-- internal imports
import Types
mainGameUpdate :: GameData -> Double -> Affection ()
mainGameUpdate gd dt = do
progress <- liftIO $ atomically $ readTMVar (gameStateLoadProgress gd)
when (fst progress < 1) $ liftIO $ logIO Verbose (snd progress)