gblib
A module script.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Software framebuffer + draw ops for the 160x144 Game Boy screen. The framebuffer holds palette indices 0..3 (0 = lightest, 3 = darkest). Sprites/tiles are authored as rows of chars: '0'..'3' = shade, '.' = transparent.
new(w: ?, h: ?, fill: ?) → void
| arg | type | description |
|---|---|---|
| w | ? | |
| h | ? | |
| fill | ? |
clear(fb: ?, idx: ?) → void
| arg | type | description |
|---|---|---|
| fb | ? | |
| idx | ? |
px(fb: ?, x: ?, y: ?, idx: ?) → void
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| idx | ? |
rect(fb: ?, x: ?, y: ?, w: ?, h: ?, idx: ?) → void
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| w | ? | |
| h | ? | |
| idx | ? |
frame(fb: ?, x: ?, y: ?, w: ?, h: ?, idx: ?) → void
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| w | ? | |
| h | ? | |
| idx | ? |
textbox(fb: ?, x: ?, y: ?, w: ?, h: ?) → void
A textbox: white fill, dark double-ish border with rounded feel.
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| w | ? | |
| h | ? |
glyph(fb: ?, key: ?, x: ?, y: ?, idx: ?) → void
Draw one font glyph (5x7 within an 8px cell) in shade `idx`.
| arg | type | description |
|---|---|---|
| fb | ? | |
| key | ? | |
| x | ? | |
| y | ? | |
| idx | ? |
text(fb: ?, str: ?, x: ?, y: ?, idx: ?, spacing: ?) → void
Draw a string. 8px advance per char; '\n' drops a line. Special ASCII -> glyphs. Returns the pixel width consumed on the last line (for typewriter cursors).
| arg | type | description |
|---|---|---|
| fb | ? | |
| str | ? | |
| x | ? | |
| y | ? | |
| idx | ? | |
| spacing | ? |
textWidth(str: ?, spacing: ?) → void
Width in pixels a string will occupy (single line), for centering.
| arg | type | description |
|---|---|---|
| str | ? | |
| spacing | ? |
textCentered(fb: ?, str: ?, cx: ?, y: ?, idx: ?, spacing: ?) → void
| arg | type | description |
|---|---|---|
| fb | ? | |
| str | ? | |
| cx | ? | |
| y | ? | |
| idx | ? | |
| spacing | ? |
compile(spr: ?) → void
Compile a sprite's row strings into a flat int array once (idx 0..3, -1 clear).
| arg | type | description |
|---|---|---|
| spr | ? |
blit(fb: ?, spr: ?, x: ?, y: ?, opts: ?) → void
Blit a sprite. opts.flipX mirrors; opts.tint recolors every opaque pixel.
| arg | type | description |
|---|---|---|
| fb | ? | |
| spr | ? | |
| x | ? | |
| y | ? | |
| opts | ? |
moreArrow(fb: ?, x: ?, y: ?, idx: ?) → void
A small down-pointing "more text" arrow, blinks are the caller's job.
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| idx | ? |
cursor(fb: ?, x: ?, y: ?, idx: ?) → void
Menu cursor (right-pointing filled triangle).
| arg | type | description |
|---|---|---|
| fb | ? | |
| x | ? | |
| y | ? | |
| idx | ? |
toRGBA(fb: ?, paletteName: ?) → void
Convert the index buffer to a flat RGBA byte array (top-to-bottom).
| arg | type | description |
|---|---|---|
| fb | ? | |
| paletteName | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.