LambdaHack-0.4.99.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone

Game.LambdaHack.Client.UI.Animation

Description

Screen frames and animations.

Synopsis

Documentation

data SingleFrame Source

The data sufficent to draw a single game screen frame.

Constructors

SingleFrame 

Fields

sfLevel :: ![ScreenLine]

screen, from top to bottom, line by line

sfTop :: !Overlay

some extra lines to show over the top

sfBottom :: ![ScreenLine]

some extra lines to show at the bottom

sfBlank :: !Bool

display only sfTop, on blank screen

overlayOverlay :: SingleFrame -> SingleFrameSource

Overlays the sfTop and sfBottom fields onto the sfLevel field. The resulting frame has empty sfTop and sfBottom. To be used by simple frontends that don't display overlays in separate windowspanesscrolled views.

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.

type Frames = [Maybe SingleFrame]Source

Sequences of screen frames, including delays.

renderAnim :: X -> Y -> SingleFrame -> Animation -> FramesSource

Render animations on top of a screen frame.

twirlSplash :: (Point, Point) -> Color -> Color -> AnimationSource

Attack animation. A part of it also reused for self-damage and healing.

blockHit :: (Point, Point) -> Color -> Color -> AnimationSource

Attack that hits through a block.

blockMiss :: (Point, Point) -> AnimationSource

Attack that is blocked.

deathBody :: Point -> AnimationSource

Death animation for an organic body.

swapPlaces :: (Point, Point) -> AnimationSource

Swap-places animation, both hostile and friendly.