LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.UI.Animation

Contents

- Internal operations

Description

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

data Animation Source #

Animation is a list of frame modifications to play one by one, where each modification if a map from positions to level map symbols.

#### Instances

Instances details

Show Animation Source # |
Instance details Defined in Game.LambdaHack.Client.UI.Animation Methods showsPrec :: Int -> Animation -> ShowS Source # show :: Animation -> String Source # showList :: [Animation] -> ShowS Source #
Eq Animation Source # |
Instance details Defined in Game.LambdaHack.Client.UI.Animation Methods (==) :: Animation -> Animation -> Bool Source # (/=) :: Animation -> Animation -> Bool Source #

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.

twirlSplashShort :: (Point, Point) -> Color -> Color -> Animation Source #

Short attack animation.

blockHit :: (Point, Point) -> Color -> Color -> Animation Source #

Attack that hits through a block.

blockMiss :: (Point, Point) -> Animation Source #

Attack that is blocked.

subtleHit :: (Point, Point) -> Animation Source #

Attack that is subtle (e.g., damage dice 0).

deathBody :: Point -> Animation Source #

Death animation for an organic body.

shortDeathBody :: Point -> Animation Source #

Death animation for an organic body, short version (e.g., for enemies).

actorX :: Point -> Animation Source #

Mark actor location animation.

teleport :: (Point, Point) -> Animation Source #

Actor teleport animation.

vanish :: Point -> Animation Source #

Terrain feature vanishing animation.

swapPlaces :: (Point, Point) -> Animation Source #

Swap-places animation, both hostile and friendly.

fadeout :: ScreenContent -> Bool -> Int -> Rnd Animation Source #

# Internal operations

blank :: Maybe AttrCharW32 Source #

cSym :: Color -> Char -> Maybe AttrCharW32 Source #

mapPosToOffset :: (Point, AttrCharW32) -> (PointUI, AttrString) Source #

mzipSingleton :: Point -> Maybe AttrCharW32 -> OverlaySpace Source #

mzipPairs :: (Point, Point) -> (Maybe AttrCharW32, Maybe AttrCharW32) -> OverlaySpace Source #