Add looping sound, add sound to terminals
This commit is contained in:
+18
-5
@@ -30,6 +30,7 @@ import Dodge.SoundLogic.LoadSound
|
||||
import Control.Lens
|
||||
import qualified Data.Map as M
|
||||
import Data.Int (Int16)
|
||||
import Data.Maybe
|
||||
|
||||
{-| Placeholder...-}
|
||||
haltSound :: World -> World
|
||||
@@ -44,7 +45,7 @@ resumeSound :: Universe -> Universe
|
||||
resumeSound w = w
|
||||
|
||||
soundWithStatus
|
||||
:: SoundStatus
|
||||
:: PlayStatus
|
||||
-> SoundOrigin -- ^ \"Creator\" of sound
|
||||
-> Point2 -- ^ Position of sound
|
||||
-> SoundID -- ^ ID of sound to be played
|
||||
@@ -56,7 +57,10 @@ soundWithStatus status so pos sType mtime w = over toPlaySounds (M.insertWith f
|
||||
sound = Sound
|
||||
{ _soundChunkID = sType
|
||||
, _soundTime = mtime
|
||||
, _soundStatus = status
|
||||
, _soundStatus = SoundStatus
|
||||
{_playStatus = status
|
||||
,_isLooping = isJust mtime
|
||||
}
|
||||
, _soundChannel = Nothing
|
||||
, _soundAngDist = Just (a,0)
|
||||
, _soundPos = pos
|
||||
@@ -94,7 +98,10 @@ soundFromGeneral so fpos sType mtime w = over toPlaySounds (M.insertWith f so so
|
||||
sound = Sound
|
||||
{ _soundChunkID = sType
|
||||
, _soundTime = mtime
|
||||
, _soundStatus = ToStart
|
||||
, _soundStatus = SoundStatus
|
||||
{ _playStatus = ToStart
|
||||
, _isLooping = isJust mtime
|
||||
}
|
||||
, _soundChannel = Nothing
|
||||
, _soundAngDist = Just (a,0)
|
||||
, _soundPos = fpos w
|
||||
@@ -134,7 +141,10 @@ soundMultiFrom [so] pos sType mtime w
|
||||
sound = Sound
|
||||
{ _soundChunkID = sType
|
||||
, _soundTime = mtime
|
||||
, _soundStatus = ToStart
|
||||
, _soundStatus = SoundStatus
|
||||
{ _playStatus = ToStart
|
||||
, _isLooping = isJust mtime
|
||||
}
|
||||
, _soundChannel = Nothing
|
||||
, _soundAngDist = Just (a,0)
|
||||
, _soundPos = pos
|
||||
@@ -148,7 +158,10 @@ soundMultiFrom (so:sos) pos sType mtime w
|
||||
sound = Sound
|
||||
{ _soundChunkID = sType
|
||||
, _soundTime = mtime
|
||||
, _soundStatus = ToStart
|
||||
, _soundStatus = SoundStatus
|
||||
{ _playStatus = ToStart
|
||||
, _isLooping = isJust mtime
|
||||
}
|
||||
, _soundChannel = Nothing
|
||||
, _soundAngDist = Just (a,0)
|
||||
, _soundPos = pos
|
||||
|
||||
Reference in New Issue
Block a user