Document collision, and correct what it made false elsewhere
The new chapter 15 covers the opt-in setup, where resolution runs in the step and why it runs after the move, shapes and the z-extrusion trap, the asymmetric masks and the defaults that matter more than the mechanism, tiles as a source rather than proxies, the response hook and the three ways it is easy to write wrongly, sensors, the four queries, both partitioners, and what is still not implemented. Collision falsified claims in eight other chapters. The physics chapter said "There is no collision detection, at all" and that collide always raises AKERR_API; actors had six behaviour hooks; the heap had five pools and four non-claiming acquires; the status band held five codes; and the design philosophy had exactly two pluggable subsystems. The appendix gains a collision.h status section, the three new pool ceilings and a table of the collision constants that are deliberately not in a public header. Also fixes chapter labels the renumbering commit left pointing at their old numbers -- "18. Utilities" linked to 19-utilities.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzBDV2fqgnUAcqCKqKvc71
This commit is contained in:
@@ -119,7 +119,7 @@ the `&`, parsing as `!(a & b) == b`. Nothing in the tree negated it, which is th
|
||||
only reason it was latent rather than live — and the test that distinguishes the
|
||||
two parses is a bit that is *not* set whose value is *not* 1, not the obvious one.
|
||||
|
||||
## The six behaviour hooks
|
||||
## The seven behaviour hooks
|
||||
|
||||
**Behaviour attaches as function pointers, not by inheritance.** There is no actor
|
||||
subclass. `akgl_actor_initialize` installs the library's defaults on every actor,
|
||||
@@ -134,8 +134,9 @@ one actor**.
|
||||
| `movementlogicfunc` | `akgl_actor_logic_movement` | `akgl_physics_simulate`, before gravity | turn movement bits into signed acceleration |
|
||||
| `changeframefunc` | `akgl_actor_logic_changeframe` | `akgl_actor_update`, when the frame is due | step to the next animation frame |
|
||||
| `addchild` | `akgl_actor_add_child` | you | attach a child actor |
|
||||
| `collidefunc` | `akgl_actor_collide_block` | `akgl_collision_resolve`, after the move | answer a contact — see [Chapter 15](15-collision.md) |
|
||||
|
||||
Replace them after `akgl_actor_initialize`, never before — it overwrites all six.
|
||||
Replace them after `akgl_actor_initialize`, never before — it overwrites all seven.
|
||||
|
||||
The `movementlogicfunc` slot is the interesting one, because it is where
|
||||
`AKGL_ERR_LOGICINTERRUPT` stops being a table row in [Chapter 04](04-errors.md) and
|
||||
|
||||
Reference in New Issue
Block a user