Skip to content

maggie.library function reference, checked against the source - #21

Merged
WDrijver merged 1 commit into
mainfrom
content-maggie-functions
Nov 4, 2026
Merged

WDrijver merged 1 commit into
mainfrom
content-maggie-functions

Conversation

@WDrijver

@WDrijver WDrijver commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Processes maggie.library from its golden source, github.com/RMortenB/MaggieLibrary.

State of the source

The repository's HEAD is still commit 64c78ef (2026-08-18), the commit os/libraries/maggie-library.md (TuKo1982) was written from. So this is a check and an addition, not an update.

New: os/libraries/maggie-library-functions.md

  • Conventions: base in a6, scratch registers, E registers destroyed, FPU rounding RZ, handles that must be freed.
  • Functions: every function with its argument registers (from maggie.fd), grouped as in the API document: context, scene, state, matrices, drawing, immediate mode, buffers and textures, clearing, lighting.
  • Constants: the light types, including MAG_LIGHT_AMBIENT, and the clear and texture formats.
  • Differences: where MaggieLibrary_API.md differs from the source:
API document Source
magScissor(x, y, width, height); "x/y > $7fff clamps to 0" magScissor(x0, y0, x1, y1): two inclusive corners; only x1/y1 are clamped (the < 0 tests on UWORD never fire)
No MAG_LIGHT_AMBIENT MAG_LIGHT_AMBIENT = 4, used by three samples
magUploadVertexColours: "float uvw triplets" ULONG colours
magUploadIndexBuffer parameters named like the vertex upload iBuffer, indx, startIndx, nIndx

Changed: os/libraries/maggie-library.md

  • It said magScissor(x, y, w, h), following the API document; now it says two corners, as the source does.
  • It links to the function reference.

Knowledge base files relied on

  • os/libraries/maggie-library.md
  • os/pitfalls/maggie-library-side-effects.md

🤖 Generated with Claude Code

The golden source (github.com/RMortenB/MaggieLibrary) is unchanged since
commit 64c78ef, which os/libraries/maggie-library.md already describes.
Add os/libraries/maggie-library-functions.md: every function with its
argument registers, the constants, and where MaggieLibrary_API.md differs
from the source (magScissor takes corners, not width and height;
MAG_LIGHT_AMBIENT exists; two copied parameter descriptions). Fix the
magScissor description in maggie-library.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WDrijver
WDrijver requested a review from TuKo1982 as a code owner November 4, 2026 15:20
@WDrijver
WDrijver merged commit f388f1c into main Nov 4, 2026
2 checks passed
@WDrijver
WDrijver deleted the content-maggie-functions branch November 4, 2026 15:41
WDrijver added a commit that referenced this pull request Nov 4, 2026
ApolloCrossDev #20 renamed SAGAPiP to ApolloPiP, #21 fixed
ApolloLoadPointer (result code, 24-bit, BMP freed). Cite commit ad7f0b4,
rename the example everywhere (also in the SAGA register converter, and
regenerate), simplify the pointer example to use the result code, and add
the ApolloLoadPointer fixes to the ApolloLib files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant