Move towards incorporating sound into ai

This commit is contained in:
2021-09-08 17:41:13 +01:00
parent 45bbf9b005
commit 643cd5a420
25 changed files with 150 additions and 144 deletions
+6 -4
View File
@@ -5,12 +5,13 @@ import qualified SDL.Mixer as Mix
import qualified Data.IntMap.Strict as IM
import qualified Data.Map.Strict as M
import Control.Lens
--import Geometry
import Geometry.Data
import Data.Word (Word8)
import Data.Int (Int16)
data SoundStatus
= Playing
= JustStartedPlaying
| Playing
| FadingOut
| ToStart
deriving (Eq,Ord,Show)
@@ -24,11 +25,12 @@ data Sound = Sound
, _soundFadeTime :: Int
, _soundStatus :: SoundStatus
, _soundChannel :: Maybe Mix.Channel
, _soundPos :: Maybe (Int16,Word8)
, _soundAngDist :: Maybe (Int16,Word8)
, _soundPos :: Point2
, _soundVolume :: Float
, _soundChunkID :: Int
}
deriving (Eq,Ord,Show)
makeLenses ''SoundData
makeLenses ''Sound