Safe Haskell | None |
---|---|
Language | Haskell2010 |
Screen frames and animations.
Synopsis
- data Animation
- renderAnim :: Int -> PreFrame -> Animation -> PreFrames
- pushAndDelay :: Animation
- twirlSplash :: (Point, Point) -> Color -> Color -> Animation
- twirlSplashShort :: (Point, Point) -> Color -> Color -> Animation
- blockHit :: (Point, Point) -> Color -> Color -> Animation
- blockMiss :: (Point, Point) -> Animation
- subtleHit :: (Point, Point) -> Animation
- deathBody :: Point -> Animation
- shortDeathBody :: Point -> Animation
- actorX :: Point -> Animation
- teleport :: (Point, Point) -> Animation
- vanish :: Point -> Animation
- swapPlaces :: (Point, Point) -> Animation
- fadeout :: ScreenContent -> Bool -> Int -> Rnd Animation
- blank :: Maybe AttrCharW32
- cSym :: Color -> Char -> Maybe AttrCharW32
- mapPosToOffset :: (Point, AttrCharW32) -> (PointUI, AttrString)
- mzipSingleton :: Point -> Maybe AttrCharW32 -> OverlaySpace
- mzipPairs :: (Point, Point) -> (Maybe AttrCharW32, Maybe AttrCharW32) -> OverlaySpace
Documentation
Animation is a list of frame modifications to play one by one, where each modification if a map from positions to level map symbols.
renderAnim :: Int -> PreFrame -> Animation -> PreFrames Source #
Render animations on top of a screen frame.
Located in this module to keep Animation
abstract.
pushAndDelay :: Animation Source #
Empty animation with a frame of delay, to be used to momentarily display something for the player to see, e.g., the aiming line when swerving it. Don't use this if there are multi-line messages on the screen, because the text blinking is going to be distracting.
twirlSplash :: (Point, Point) -> Color -> Color -> Animation Source #
Attack animation. A part of it also reused for self-damage and healing.
shortDeathBody :: Point -> Animation Source #
Death animation for an organic body, short version (e.g., for enemies).
Internal operations
blank :: Maybe AttrCharW32 Source #
mapPosToOffset :: (Point, AttrCharW32) -> (PointUI, AttrString) Source #
mzipSingleton :: Point -> Maybe AttrCharW32 -> OverlaySpace Source #
mzipPairs :: (Point, Point) -> (Maybe AttrCharW32, Maybe AttrCharW32) -> OverlaySpace Source #