Tweak clouds
This commit is contained in:
@@ -582,7 +582,6 @@ data PSType = PutCrit Creature
|
|||||||
| PutPressPlate PressPlate
|
| PutPressPlate PressPlate
|
||||||
| PutAutoDoor Point2 Point2
|
| PutAutoDoor Point2 Point2
|
||||||
| PutBlock [Int] Color [Point2]
|
| PutBlock [Int] Color [Point2]
|
||||||
-- | PutBlockWall [Int] Color [Point2]
|
|
||||||
| PutLineBlock Wall Float Float Point2 Point2
|
| PutLineBlock Wall Float Float Point2 Point2
|
||||||
| PutTriggerDoor Color (World -> Bool) Point2 Point2
|
| PutTriggerDoor Color (World -> Bool) Point2 Point2
|
||||||
| PutBtDoor Color Point2 Float Point2 Point2
|
| PutBtDoor Color Point2 Float Point2 Point2
|
||||||
|
|||||||
@@ -15,18 +15,6 @@ resumeSound w = w
|
|||||||
soundOnce :: Int -> World -> World
|
soundOnce :: Int -> World -> World
|
||||||
soundOnce i = over soundQueue ((:) i)
|
soundOnce i = over soundQueue ((:) i)
|
||||||
|
|
||||||
--continueSoundFrom :: SoundOrigin -> Int -> Int -> Int -> World -> World
|
|
||||||
--continueSoundFrom so sType time fadeTime w = over sounds (M.insertWith f so sound) w
|
|
||||||
-- where
|
|
||||||
-- sound = Sound
|
|
||||||
-- { _soundType = sType
|
|
||||||
-- , _soundTime = time
|
|
||||||
-- , _soundFadeTime = fadeTime
|
|
||||||
-- , _soundChannel = Nothing
|
|
||||||
-- , _soundPos = Nothing
|
|
||||||
-- }
|
|
||||||
-- f _ s = s {_soundTime = time, _soundFadeTime = fadeTime}
|
|
||||||
|
|
||||||
soundOnceOrigin :: Int -> SoundOrigin -> World -> World
|
soundOnceOrigin :: Int -> SoundOrigin -> World -> World
|
||||||
soundOnceOrigin sType so = over sounds (M.insertWith (flip const) so sound)
|
soundOnceOrigin sType so = over sounds (M.insertWith (flip const) so sound)
|
||||||
where
|
where
|
||||||
@@ -66,9 +54,6 @@ soundMultiFrom (so:sos) sType time fadeTime w
|
|||||||
stopSoundFrom :: SoundOrigin -> World -> World
|
stopSoundFrom :: SoundOrigin -> World -> World
|
||||||
stopSoundFrom so = over (sounds . ix so . soundTime) (fmap $ min 0)
|
stopSoundFrom so = over (sounds . ix so . soundTime) (fmap $ min 0)
|
||||||
|
|
||||||
-- idea: pass the id of the sound to the world and send it to some queue for
|
|
||||||
-- playback
|
|
||||||
|
|
||||||
reloadSound,putDownSound,pickUpSound,fireSound,grenadeBang,healSound,teleSound,twoStepSlowSound :: Int
|
reloadSound,putDownSound,pickUpSound,fireSound,grenadeBang,healSound,teleSound,twoStepSlowSound :: Int
|
||||||
clickSound = 1
|
clickSound = 1
|
||||||
reloadSound = 2
|
reloadSound = 2
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ makeCloudAt rad t drawFunc p w
|
|||||||
}
|
}
|
||||||
|
|
||||||
drawCloudWith :: Float -> Float -> Color -> Cloud -> Picture
|
drawCloudWith :: Float -> Float -> Color -> Cloud -> Picture
|
||||||
drawCloudWith radMult fadet col cl = setLayer 2
|
drawCloudWith radMult fadet col cl
|
||||||
|
= setLayer 2
|
||||||
. setDepth (-0.5)
|
. setDepth (-0.5)
|
||||||
. color (withAlpha a col)
|
$ circleSolidCol (withAlpha 0 col) (withAlpha a col) (radMult * _clRad cl)
|
||||||
$ circleSolid (radMult * _clRad cl)
|
-- . color (withAlpha a col)
|
||||||
|
-- $ circleSolid (radMult * _clRad cl)
|
||||||
where a = min 1 $ fromIntegral (_clTimer cl) / fadet
|
where a = min 1 $ fromIntegral (_clTimer cl) / fadet
|
||||||
|
|
||||||
makeThickSmokeAt :: Point2 -> World -> World
|
makeThickSmokeAt :: Point2 -> World -> World
|
||||||
|
|||||||
Reference in New Issue
Block a user