|
libansr is used to turn the ansi stream of bytes into an
in-memory representation of the screen's character contents.
From this in-memory representation (ansr_t) an RGBA pixel
rendering is produced in the form of a uint32_t array. This is
then uploaded to the GPU via the existing tex.[ch] api.
The intention here is to replace all the compiled-in gfx/* RGBA
buffers with runtime-loaded-and-rendered .and files read from the
filesystem. This enables faster iteration on the art without
involving recompilation, and smaller distribution of the builds.
Nothing functionally changes with this commit yet. It's only
introducing the functionality to the tree and adding it to the
build.
Subsequent commits will replace the various tex_new() callers in
the various -node.c listings with ansr_tex_new() equivalents.
Afterwards all of the headers in gfx/ will be removed in favor of
.ans assets.
One additional detail is there's now going to be a concept of
mask.ans files for controlling the alpha, since .ans alone
doesn't really suffice here. Some ansi editors use methods like
space-padding from the left to place the actual content, and
there's no obvious way to differentiate those space pads from
desired opaque background color cells vs. just transparent
locators. So a separate mask.ans is supported where every
non-black pixel of the mask.ans will be opaque, and every black
pixel transparent, in the final tex_t output.
|