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

Safe HaskellNone

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

decodeLine :: ScreenLine -> [AttrChar]Source

encodeLine :: [AttrChar] -> ScreenLineSource

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.

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.

sdifficultyCli :: !Int

The difficulty level for all UI clients.

ssavePrefixCli :: !(Maybe String)

Prefix of the save game file.

sfrontendStd :: !Bool

Whether to use the stdout/stdin frontend.

sfrontendNo :: !Bool

Whether to use no frontend at all (for benchmarking, etc.).

sdbgMsgCli :: !Bool

Show clients' internal debug messages.