LambdaHack-0.2.6: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Animation

Description

Screen frames and animations.

Synopsis

Documentation

data Attr Source

Text attributes: foreground and backgroud colors.

Constructors

Attr 

Fields

fg :: !Color

foreground colour

bg :: !Color

backgroud color

Instances

defaultAttr :: AttrSource

The default attribute, to optimize attribute setting.

data AttrChar Source

Constructors

AttrChar 

Fields

acAttr :: !Attr
 
acChar :: !Char
 

data SingleFrame Source

The data sufficent to draw a single game screen frame.

Constructors

SingleFrame 

Fields

sfLevel :: ![[AttrChar]]

content of the screen, line by line

sfTop :: String

an extra line to show at the top

sfBottom :: String

an extra line to show at the bottom

Instances

data Animation Source

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

Instances

rederAnim :: X -> Y -> SingleFrame -> Animation -> [Maybe SingleFrame]Source

Render animations on top of a screen frame.

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

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

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

Attack that hits through a block.

blockMiss :: (Maybe Point, Maybe Point) -> AnimationSource

Attack that is blocked.

deathBody :: Point -> AnimationSource

Death animation for an organic body.

swapPlaces :: (Maybe Point, Maybe Point) -> AnimationSource

Swap-places animation, both hostile and friendly.