Skip to content

Builder Format

Wattsy edited this page Aug 11, 2022 · 1 revision

Each toad feature is represented in an intermediate format that is compressed with INFLATE and stored via SSTORE2.

The uncompressed intermediate format for draw instructions is:

DrawFill: Fills the canvas with a given color

Field Date Type Description
Type byte Type discriminator, fixed at 0
c byte An index into the color table

DrawLine: Draws a line between two points

Field Date Type Description
Type byte Type discriminator, fixed at 1
c byte An index into the color table
x0 byte The x-coordinate of the first point
y0 byte The y-coordinate of the first point
x1 byte The x-coordinate of the second point
y1 byte The y-coordinate of the second point

DrawDot: Draws a single pixel

Field Date Type Description
Type byte Type discriminator, fixed at 2
c byte An index into the color table
x byte The x-coordinate to draw a dot
y byte The y-coordinate to draw a dot

DrawFeature: Draws another set of drawing instructions at a given offset

Field Date Type Description
Type byte Type discriminator, fixed at 3
i byte An index into the draw instructions
Clone this wiki locally