Liquorice-0.0.1: Algorithmic Doom map generation

Description

Core Liquorice functions for building maps. These are all under the State Monad, the state which is passed around is the Context being operated on.

Many of these functions are wrapped versions of those in Pure.

Synopsis

# Documentation

Perform the supplied action twice.

triple :: Applicative m => m a -> m () Source #

Perform the supplied action three times.

quad :: Applicative m => m a -> m () Source #

Perform the supplied action four times.

box :: Int -> Int -> Int -> Int -> Int -> StateT Context Identity () Source #

Draw a primitive rectangular box, X and Y in size, and give the resulting sector's properties as f floor height, c ceiling height and l light level.

ibox :: Int -> Int -> Int -> Int -> Int -> State Context () Source #

Draw a primitive rectangular box, similar to box, but as an inner sector parented by the last-drawn Sector.

Perform the actions x and then return the pen location to the value it had prior to x.

Perform the action stuff at an offset of (x,y) from the current location move the pen back that relative amount afterwards.

withXoff :: Int -> State Context () -> State Context () Source #

Perform the supplied actions with paletteXoff set to the supplied value, then reset paletteXoff`.

Evaluate the supplied State Context to produce a pure Context. In other words, run the supplied Liquorice DSL program and calculate the resulting structure.