Tweak clouds
This commit is contained in:
@@ -582,7 +582,6 @@ data PSType = PutCrit Creature
|
||||
| PutPressPlate PressPlate
|
||||
| PutAutoDoor Point2 Point2
|
||||
| PutBlock [Int] Color [Point2]
|
||||
-- | PutBlockWall [Int] Color [Point2]
|
||||
| PutLineBlock Wall Float Float Point2 Point2
|
||||
| PutTriggerDoor Color (World -> Bool) Point2 Point2
|
||||
| PutBtDoor Color Point2 Float Point2 Point2
|
||||
|
||||
@@ -15,18 +15,6 @@ resumeSound w = w
|
||||
soundOnce :: Int -> World -> World
|
||||
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 sType so = over sounds (M.insertWith (flip const) so sound)
|
||||
where
|
||||
@@ -66,9 +54,6 @@ soundMultiFrom (so:sos) sType time fadeTime w
|
||||
stopSoundFrom :: SoundOrigin -> World -> World
|
||||
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
|
||||
clickSound = 1
|
||||
reloadSound = 2
|
||||
|
||||
@@ -25,10 +25,12 @@ makeCloudAt rad t drawFunc p w
|
||||
}
|
||||
|
||||
drawCloudWith :: Float -> Float -> Color -> Cloud -> Picture
|
||||
drawCloudWith radMult fadet col cl = setLayer 2
|
||||
. setDepth (-0.5)
|
||||
. color (withAlpha a col)
|
||||
$ circleSolid (radMult * _clRad cl)
|
||||
drawCloudWith radMult fadet col cl
|
||||
= setLayer 2
|
||||
. setDepth (-0.5)
|
||||
$ circleSolidCol (withAlpha 0 col) (withAlpha a col) (radMult * _clRad cl)
|
||||
-- . color (withAlpha a col)
|
||||
-- $ circleSolid (radMult * _clRad cl)
|
||||
where a = min 1 $ fromIntegral (_clTimer cl) / fadet
|
||||
|
||||
makeThickSmokeAt :: Point2 -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user