Safe Haskell | None |
---|---|
Language | Haskell2010 |
Screen frames.
Synopsis
- type FrameST s = Mutable Vector s Word32 -> ST s ()
- newtype FrameForall = FrameForall {
- unFrameForall :: forall s. FrameST s
- newtype FrameBase = FrameBase {
- unFrameBase :: forall s. ST s (Mutable Vector s Word32)
- type Frame = (FrameBase, FrameForall)
- type PreFrame = (Vector Word32, FrameForall)
- type PreFrames = [Maybe PreFrame]
- newtype SingleFrame = SingleFrame {}
- blankSingleFrame :: ScreenContent -> SingleFrame
- overlayFrame :: IntOverlay -> PreFrame -> PreFrame
- overlayFrameWithLines :: ScreenContent -> Bool -> Overlay -> PreFrame -> PreFrame
- truncateAttrLine :: X -> AttrLine -> X -> AttrLine
Documentation
newtype FrameForall Source #
Efficiently composable representation of an operation
on a frame, that is, on a mutable vector. When the composite operation
is eventually performed, the vector is frozen to become a SingleFrame
.
FrameForall | |
|
Action that results in a base frame, to be modified further.
type Frame = (FrameBase, FrameForall) Source #
A frame, that is, a base frame and all its modifications.
type PreFrame = (Vector Word32, FrameForall) Source #
Components of a frame, before it's decided if the first can be overwritten in-place or needs to be copied.
type PreFrames = [Maybe PreFrame] Source #
Sequence of screen frames, including delays. Potentially based on a single base frame.
newtype SingleFrame Source #
An overlay that fits on the screen (or is meant to be truncated on display) and is padded to fill the whole screen and is displayed as a single game screen frame.
Note that we don't provide a list of color-highlighed positions separately, because overlays need to obscure not only map, but the highlights as well.
Instances
Eq SingleFrame Source # | |
Defined in Game.LambdaHack.Client.UI.Frame (==) :: SingleFrame -> SingleFrame -> Bool # (/=) :: SingleFrame -> SingleFrame -> Bool # | |
Show SingleFrame Source # | |
Defined in Game.LambdaHack.Client.UI.Frame showsPrec :: Int -> SingleFrame -> ShowS # show :: SingleFrame -> String # showList :: [SingleFrame] -> ShowS # |
overlayFrame :: IntOverlay -> PreFrame -> PreFrame Source #
Overlays either the game map only or the whole empty screen frame. We assume the lines of the overlay are not too long nor too many.
overlayFrameWithLines :: ScreenContent -> Bool -> Overlay -> PreFrame -> PreFrame Source #