Skip to main content

Module bake

Module bake 

Source
Expand description

bake [--target <id>] [--out <file>] [--sheet <file>]: the game’s sources baked into one pack (.shuyipak, ADR-0023), with what went in, the sizes, and how long baking and loading took. A source with errors is refused, with every error. check --baked uses the same bake to prove the pack equal to its sources (check_baked).

The game says what it bakes for a target, from which bundle and with which formats (GameTools::bake). A target must have a profile, the engine’s or the game’s (target::profiles); the game picks its layers and kinds by it. For a one-bit target it bakes its pictures as one-bit picture files (Bake::under_as), from the target’s own layer (Bundle::for_target) where it has one: the answer names the pictures dithered, for an artist to check, and those its layer replaced, and --sheet draws each dithered one beside its source (sheet).

Modules§

sheet
The contact sheet of a one-bit bake (bake --sheet <file>): every picture the bake dithered, a row each, its source on the left and its one-bit picture from the pack on the right, so an artist sees at a glance which ones the dither spoiled and are worth drawing by hand in the target’s layer. Each pixel is SCALE × SCALE, so the dots show, on a grey ground that see-through pixels show too.

Structs§

BakeInput
What bake bakes.
BakeOutput
What bake made.
PackMade
A pack bake wrote.

Constants§

LOAD_RUNS
How many times each load is timed: the fastest counts.
OUT_DIR
Where a pack goes when --out doesn’t say, from the project’s root: target/shuyi/game.shuyipak, or <target>.shuyipak for a target.

Functions§

bake
bake: game’s pack for input, written under project’s root.
check_baked
check --baked’s part: every way the pack game bakes (for no target) differs from its sources (Bake::check), or why it could not be baked.
parse_args
Reads bake’s arguments (not --json).
text
What bake made, for people.
usage
bake’s usage, with command as the tool’s name.