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

Safe HaskellNone

Game.LambdaHack.Common.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

defAttr :: 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.

The fields are not strict, because sometimes frames are not used, e.g., when a keypress discards all frames not yet drawn and displayed.

Constructors

SingleFrame 

Fields

sfLevel :: [[AttrChar]]

content of the screen, line by line

sfTop :: Text

an extra line to show at the top

sfBottom :: Text

an extra line to show at the bottom

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.

data DebugModeCli Source

Constructors

DebugModeCli 

Fields

sfont :: !(Maybe String)

Font to use for the main game window.

smaxFps :: !(Maybe Int)

Maximal frames per second. This is better low and fixed, to avoid jerkiness and delays that tell the player there are many intelligent enemies on the level. That's better than scaling AI sofistication down based on the FPS setting and machine speed.

snoDelay :: !Bool

Don't maintain any requested delays between frames, e.g., for screensaver.

snoMore :: !Bool

Auto-answer all prompts, e.g., for screensaver.

snoAnim :: !(Maybe Bool)

Don't show any animations.

snewGameCli :: !Bool

Start a new game, overwriting the save file.

ssavePrefixCli :: !(Maybe String)

Prefix of the save game file.

sfrontendStd :: !Bool

Whether to use the stdout/stdin frontend.

sdbgMsgCli :: !Bool

Show clients' internal debug messages.