Appearance
aowlspt_visible.h
Source: abi/aowlspt_visible.h — 149 lines, 10 file-scope functions.
What this header owns
Reproduced verbatim from the header's own banner comment — these notes are frequently the only written record of why the subsystem is shaped the way it is.
text
aowlspt_visible.h -- THE PURE ARITHMETIC BEHIND "is it actually on screen".
WHY THIS FILE EXISTS SEPARATELY FROM THE VERBS THAT USE IT
----------------------------------------------------------
Every managed call in the visibility verbs can only be exercised inside a
running Tarkov client. The arithmetic those calls feed -- folding a
CanvasGroup alpha chain, deciding whether a pixel rect is on the back
buffer, deciding whether a rect is degenerate -- is PURE, and pure logic
that can only be tested in the client is logic that never gets tested.
So it lives here, as free functions over doubles with no pointer to
anything, and `tests/overlayhost/vistest.c` compiles this header on its own
and asserts against it offline. The client-side code then contains no
arithmetic of its own to get wrong.
THE TRI-STATE IS THE POINT (CLAUDE.md 9b). Nothing here returns a plain
boolean where "I could not look" is possible. `aowl_vis_alpha_ok` is
separate from `aowl_vis_alpha_value`; `aowl_vis_onscreen` has a distinct
UNKNOWN return for an unpublished back-buffer size. A verb that flattens
"not visible" and "could not determine" into one answer is the exact defect
that let a successful F3 clone walk report success while nothing drew.
NIMONY CONSTRAINT: nimony cannot hand out the address of an array element,
which is why the alpha chain is an incremental push/reset over statics
rather than an array parameter -- the same reason `aowl_du_sret_out` in
aowlspt_debugui.h is shaped the way it is. The host is single-threaded on
this path (one Unity-thread detour, one command at a time), so there is no
sharing question.Constants
AOWLSPT_VISIBLE_HAOWL_VIS_ALPHA_MAX
Functions
| Signature | Line |
|---|---|
void aowl_vis_alpha_reset(void) | 54 |
int32_t aowl_vis_alpha_push(double alpha, int32_t ignore_parent_groups) | 64 |
int32_t aowl_vis_alpha_ok(void) | 83 |
double aowl_vis_alpha_value(void) | 84 |
int32_t aowl_vis_alpha_count(void) | 85 |
int32_t aowl_vis_alpha_closed(void) | 86 |
int32_t aowl_vis_onscreen(double x0, double y0, double x1, double y1, int32_t sw, int32_t sh, int32_t size_known) | 103 |
int32_t aowl_vis_degenerate(double w, double h) | 121 |
int32_t aowl_vis_scale_collapsed(double sx, double sy) | 131 |
int32_t aowl_vis_alpha_invisible(double a) | 143 |

