| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Client.UI.Animation
Description
Screen frames and animations.
- data SingleFrame = SingleFrame {
- sfLevel :: ![ScreenLine]
- sfTop :: !Overlay
- sfBottom :: ![ScreenLine]
- sfBlank :: !Bool
- decodeLine :: ScreenLine -> [AttrChar]
- encodeLine :: [AttrChar] -> ScreenLine
- overlayOverlay :: SingleFrame -> SingleFrame
- data Animation
- type Frames = [Maybe SingleFrame]
- renderAnim :: X -> Y -> SingleFrame -> Animation -> Frames
- restrictAnim :: EnumSet Point -> Animation -> Animation
- twirlSplash :: (Point, Point) -> Color -> Color -> Animation
- blockHit :: (Point, Point) -> Color -> Color -> Animation
- blockMiss :: (Point, Point) -> Animation
- deathBody :: Point -> Animation
- actorX :: Point -> Char -> Color -> Animation
- swapPlaces :: (Point, Point) -> Animation
- moveProj :: (Point, Point, Point) -> Char -> Color -> Animation
- fadeout :: Bool -> Bool -> Int -> X -> Y -> Rnd Animation
Documentation
data SingleFrame Source #
The data sufficent to draw a single game screen frame.
Constructors
| SingleFrame | |
Fields
| |
Instances
decodeLine :: ScreenLine -> [AttrChar] Source #
encodeLine :: [AttrChar] -> ScreenLine Source #
overlayOverlay :: SingleFrame -> SingleFrame Source #
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.
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 -> Frames Source #
Render animations on top of a screen frame.