Take libakgl 0.9.0, and shadow set_property(TEST) so it configures
0.9.0 is the akgl_ui subsystem: a vendored clay, an arena, menus, HUDs and dialogs, reached through a new akgl/ui.h this project does not include. Every header the akbasic_akgl target actually compiles against is byte-identical to 0.8.0, so unlike the 0.8.0 bump there is no sizeof to get wrong. The floor in include/akbasic/akgl.h moves to 0.9.0 anyway, on the standing rule that the soname carries MAJOR.MINOR while the major is 0. It does not configure as it stands. 0.9.0 moved eight test property calls off set_tests_properties -- correctly, because that command splits a semicolon-separated value and had been silently reducing its LD_LIBRARY_PATH prepend list to one directory -- onto set_property(TEST ...). This repository suppresses add_test() while it pulls its dependencies in, so those test names do not exist, and set_property errors on an unknown test name where set_tests_properties was silent: eight hard configure failures. Shadow set_property in its TEST form only; every other form has to pass through, since the dependencies set target and directory properties their own builds need. libakgl's status band grew to seven codes with AKGL_ERR_UI and it now owns 256 to 262, so the coordinated range map, docs/15-error-codes.md and both header comments follow. TODO.md section 5's persistent-drawing-layer item still stands: 0.9.0's arena draws inside the frame like everything else, and there is still no render-to-texture layer. Both configurations build and both suites pass -- 110/110 without libakgl, 111/111 with it, akgl_typing included. Co-Authored-By: Tachikoma (Claude Code Opus 5 1M) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwxGB6TdoVvZ11KQQME9cL Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* of these takes something the host already created and draws or plays through
|
||||
* it. None of them creates a device, and none of them pumps events.
|
||||
*
|
||||
* Each initializer calls akgl_error_init() first. It reserves libakgl's 256-261
|
||||
* Each initializer calls akgl_error_init() first. It reserves libakgl's 256-262
|
||||
* status band and names every AKGL_ERR_* code; akgl_game_init() calls it as its
|
||||
* first statement, but a program driving subsystems directly -- which is exactly
|
||||
* what an embedded interpreter does -- never goes through akgl_game_init() and
|
||||
@@ -70,9 +70,27 @@
|
||||
* `src/sprite_akgl.c` writes exactly those two. The symptom is a jump through a
|
||||
* garbage pointer on the first frame, which is precisely the case this guard
|
||||
* exists to turn into a compile error. And libakgl's reserved status band grew
|
||||
* from five codes to six with `AKGL_ERR_COLLISION`, so it now owns 256 to 261;
|
||||
* `MAINTENANCE.md`'s coordinated range map and `docs/15-error-codes.md` both say
|
||||
* so.
|
||||
* from five codes to six with `AKGL_ERR_COLLISION`, taking it to 256 to 261 --
|
||||
* 0.9.0 moved it again, below. `MAINTENANCE.md`'s coordinated range map and
|
||||
* `docs/15-error-codes.md` both carry the current band.
|
||||
*
|
||||
* **0.9.0 is the first one that is additive on its face**, and the floor moves
|
||||
* anyway. It is the `akgl_ui` subsystem -- a vendored clay, an arena, menus,
|
||||
* HUDs and dialogs -- reached entirely through a new `akgl/ui.h` this target
|
||||
* does not include, plus three new entry points in `akgl/draw.h`
|
||||
* (`akgl_draw_filled_rounded_rect`, `akgl_draw_arc`, `akgl_draw_set_clip`).
|
||||
* Every header this target actually compiles against -- `actor.h`, `sprite.h`,
|
||||
* `renderer.h`, `text.h`, `registry.h`, `heap.h` -- is byte-identical to 0.8.0,
|
||||
* so unlike 0.8.0 there is no `sizeof` to get wrong. The status band grew again
|
||||
* regardless: `AKGL_ERR_UI` makes seven codes and libakgl now owns 256 to 262.
|
||||
*
|
||||
* It also collided with the build rather than the code. 0.9.0 moved eight test
|
||||
* property calls from `set_tests_properties` to `set_property(TEST ...)`, which
|
||||
* errors on a test name that does not exist where the old command was silent --
|
||||
* and this repository suppresses `add_test()` while it pulls its dependencies
|
||||
* in, so those names do not exist. Eight configure failures, fixed by shadowing
|
||||
* `set_property` in its `TEST` form too; `MAINTENANCE.md`'s embedding section
|
||||
* carries the detail.
|
||||
*
|
||||
* The soname carries MAJOR.MINOR while the major is 0, so 0.5, 0.6 and 0.7 are
|
||||
* different ABIs *by declaration* -- libakgl's versioning policy says a 0.x minor
|
||||
@@ -86,8 +104,8 @@
|
||||
* at link time, because a missing symbol names a function and this names the
|
||||
* release.
|
||||
*/
|
||||
#if !AKGL_VERSION_AT_LEAST(0, 8, 0)
|
||||
#error "akbasic's libakgl adaptors require libakgl 0.8.0 or later"
|
||||
#if !AKGL_VERSION_AT_LEAST(0, 9, 0)
|
||||
#error "akbasic's libakgl adaptors require libakgl 0.9.0 or later"
|
||||
#endif
|
||||
|
||||
#include <akbasic/audio.h>
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
|
||||
/*
|
||||
* libakerror reserves 0-255 for the host's errno values and its own AKERR_*
|
||||
* codes. libakgl claims 256-261 -- five codes until 0.8.0 added
|
||||
* AKGL_ERR_COLLISION, six since. akbasic claims 512-767, leaving 262-511 as
|
||||
* codes. libakgl claims 256-262 -- five codes until 0.8.0 added
|
||||
* AKGL_ERR_COLLISION and 0.9.0 added AKGL_ERR_UI, seven since. akbasic claims
|
||||
* 512-767, leaving 263-511 as
|
||||
* headroom for libakgl to grow into -- see MAINTENANCE.md for the coordinated
|
||||
* range map, which is the only coordination there is: libakerror can enumerate
|
||||
* its consumers no better than we can.
|
||||
|
||||
Reference in New Issue
Block a user