Safe Haskell | None |
---|---|
Language | Haskell2010 |
Screen frames and animations.
Synopsis
- data Animation
- renderAnim :: PreFrame -> Animation -> PreFrames
- pushAndDelay :: Animation
- twirlSplash :: ScreenContent -> (Point, Point) -> Color -> Color -> Animation
- blockHit :: ScreenContent -> (Point, Point) -> Color -> Color -> Animation
- blockMiss :: ScreenContent -> (Point, Point) -> Animation
- subtleHit :: ScreenContent -> Point -> Animation
- deathBody :: ScreenContent -> Point -> Animation
- shortDeathBody :: ScreenContent -> Point -> Animation
- actorX :: ScreenContent -> Point -> Animation
- teleport :: ScreenContent -> (Point, Point) -> Animation
- swapPlaces :: ScreenContent -> (Point, Point) -> Animation
- fadeout :: ScreenContent -> Bool -> Int -> Rnd Animation
- blank :: Maybe AttrCharW32
- cSym :: Color -> Char -> Maybe AttrCharW32
- mapPosToOffset :: ScreenContent -> (Point, AttrCharW32) -> (Int, [AttrCharW32])
- mzipSingleton :: ScreenContent -> Point -> Maybe AttrCharW32 -> IntOverlay
- mzipPairs :: ScreenContent -> (Point, Point) -> (Maybe AttrCharW32, Maybe AttrCharW32) -> IntOverlay
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 :: PreFrame -> Animation -> PreFrames Source #
Render animations on top of a screen frame.
Located in this module to keep Animation
abstract.
twirlSplash :: ScreenContent -> (Point, Point) -> Color -> Color -> Animation Source #
Attack animation. A part of it also reused for self-damage and healing.
blockHit :: ScreenContent -> (Point, Point) -> Color -> Color -> Animation Source #
Attack that hits through a block.
subtleHit :: ScreenContent -> Point -> Animation Source #
Attack that is subtle (e.g., damage dice 0).
shortDeathBody :: ScreenContent -> Point -> Animation Source #
Death animation for an organic body, short version (e.g., for enemies).
swapPlaces :: ScreenContent -> (Point, Point) -> Animation Source #
Swap-places animation, both hostile and friendly.
Internal operations
blank :: Maybe AttrCharW32 Source #
mapPosToOffset :: ScreenContent -> (Point, AttrCharW32) -> (Int, [AttrCharW32]) Source #
mzipSingleton :: ScreenContent -> Point -> Maybe AttrCharW32 -> IntOverlay Source #
mzipPairs :: ScreenContent -> (Point, Point) -> (Maybe AttrCharW32, Maybe AttrCharW32) -> IntOverlay Source #