Refactor sound
This commit is contained in:
@@ -7,6 +7,12 @@ import qualified Data.Map as M
|
||||
import Control.Lens
|
||||
import Geometry
|
||||
|
||||
data SoundStatus
|
||||
= Playing
|
||||
| FadingOut
|
||||
| ToStart
|
||||
deriving (Eq,Ord,Show)
|
||||
|
||||
data SoundData a = SoundData
|
||||
{_loadedChunks :: IM.IntMap Mix.Chunk
|
||||
,_playingSounds :: M.Map a Sound
|
||||
@@ -14,7 +20,7 @@ data SoundData a = SoundData
|
||||
data Sound = Sound
|
||||
{ _soundTime :: Maybe Int
|
||||
, _soundFadeTime :: Int
|
||||
, _soundIsFadingOut :: Bool
|
||||
, _soundStatus :: SoundStatus
|
||||
, _soundChannel :: Maybe Mix.Channel
|
||||
, _soundPos :: Maybe Point2
|
||||
, _soundChunkID :: Int
|
||||
|
||||
Reference in New Issue
Block a user