| Copyright | © Jonathan Dowland 2020 |
|---|---|
| License | GPL-3 |
| Maintainer | jon+hackage@dow.land |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell98 |
Liquorice.Pure
Description
These Pure functions are the basic Liquorice primitives for constructing
Liquorice programs that evaluate to Doom maps. Monadic equivalents are defined
in Monad. Most people may find those more convenient.
Synopsis
- draw :: Int -> Int -> Context -> Context
- rightsector :: Int -> Int -> Int -> Context -> Context
- step :: Int -> Int -> Context -> Context
- turnright :: Context -> Context
- turnleft :: Context -> Context
- turnaround :: Context -> Context
- innerrightsector :: Int -> Int -> Int -> Context -> Context
- innerleftsector :: Int -> Int -> Int -> Context -> Context
- leftsector :: Int -> Int -> Int -> Context -> Context
- popsector :: Context -> Context
- thing :: Context -> Context
- mid :: String -> Context -> Context
- upper :: String -> Context -> Context
- lower :: String -> Context -> Context
- xoff :: Int -> Context -> Context
- yoff :: Int -> Context -> Context
- floorflat :: String -> Context -> Context
- ceil :: String -> Context -> Context
- linetype :: Int -> Int -> Context -> Context
- sectortype :: Int -> Int -> Context -> Context
- setthing :: Int -> Context -> Context
- mapname :: String -> Context -> Context
- box :: Int -> Int -> Int -> Int -> Int -> Context -> Context
- ibox :: Int -> Int -> Int -> Int -> Int -> Context -> Context
- pushpop :: (Context -> Context) -> Context -> Context
- place :: Int -> Int -> (Context -> Context) -> Context -> Context
- addLine :: Line -> Context -> Context
Documentation
draw :: Int -> Int -> Context -> Context Source #
Define a line from the current location to a new one reached by
moving forwards and sideways by the supplied amounts.
rightsector :: Int -> Int -> Int -> Context -> Context Source #
Define a new Sector on the right-hand side of the pen.
step :: Int -> Int -> Context -> Context Source #
Move the pen forwards and sideways by the supplied amounts.
turnaround :: Context -> Context Source #
Rotate the pen 180°.
innerrightsector :: Int -> Int -> Int -> Context -> Context Source #
Define a new inner-Sector on the right-hand side of the pen.
innerleftsector :: Int -> Int -> Int -> Context -> Context Source #
Define a new inner-Sector on the left-hand side of the pen.
leftsector :: Int -> Int -> Int -> Context -> Context Source #
Define a new Sector on the left-hand side of the pen.
linetype :: Int -> Int -> Context -> Context Source #
Set the type and tag values for future defined Lines.
sectortype :: Int -> Int -> Context -> Context Source #
Set the type and tag values for future defined Sectors.
box :: Int -> Int -> Int -> Int -> Int -> Context -> Context Source #
Define a rectangular Sector of the supplied size and properties.
ibox :: Int -> Int -> Int -> Int -> Int -> Context -> Context Source #
Define a rectangular inner-Sector of the supplied size and properties,
parented to the last-drawn Sector.
pushpop :: (Context -> Context) -> Context -> Context Source #
Evaluate fn and then re-define the location to the value it was
prior to evaluation.