benilla-re systems structs docs

s_coverageMasks

global · charactermodel

Address
0x838ae4 · 4 bytes, up to 0x838ae7
Type
const uint8_t[4]
Meaning
Holds the 2-bit coverage masks 3, 0xc, 0x30 and 0xc0
Confidence
verified, proof one
Finding
charactermodel/composite#key-kernel

Finding: Key kernel in charactermodel: composite

0x477db0 has the same geometry but copies a pixel only when its coverage is not 0. The coverage is a 2-bit plane that starts after the source level's colour rows, at source level + size.h · source pitch, with the pixels counted continuously from the first one of the rectangle: the pixel number i has its coverage in byte i >> 2, selected by the mask {3, 0xc, 0x30, 0xc0}[i & 3]. A source whose width differs from the rectangle's width has its coverage read at the wrong pixels.

The derivation is in the doc.