diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-26 11:29:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-26 11:29:40 -0300 |
| commit | 3d60aa05ec1a6f9ed535186be6c6c2850c71b24d (patch) | |
| tree | e55587fb9d1ec5f55c55fa81b7d81f3a91bf5375 /addons/fake | |
| parent | add0837dc1927389096cbaaf65b7e1a42028eafc (diff) | |
| parent | 8723462d8e02bc9d78b5004de38b910e83540575 (diff) | |
| download | pardes-3d60aa05ec1a6f9ed535186be6c6c2850c71b24d.tar.gz pardes-3d60aa05ec1a6f9ed535186be6c6c2850c71b24d.zip | |
merge: L2a (tags, grips, band, notice onto chrome) + M2's fix + FP (PDF leaks, spawn stop, PDF hits)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'addons/fake')
| -rw-r--r-- | addons/fake/fake.c | 13 | ||||
| -rw-r--r-- | addons/fake/fake.out | 22 |
2 files changed, 23 insertions, 12 deletions
diff --git a/addons/fake/fake.c b/addons/fake/fake.c index b3f6b288..b5423317 100644 --- a/addons/fake/fake.c +++ b/addons/fake/fake.c @@ -6,7 +6,8 @@ * * A pane of it counts: keys and clicks and ticks and words each add to a * count it paints, dumps and answers `where` with; `:N` sets it. It paints - * which view it is painted for and that view's size as `view` told it. */ + * which view it is painted for and that view's size as `view` told it, + * and the theme's hit colours its window has (since 3.4). */ #include "pardes_addon.h" /* The loader's tests build it wrong on purpose: another ABI, no export, @@ -60,6 +61,10 @@ static void view(void *st, const pa_view *v) { f->cols[v->id - 1] = v->cols, f->rows[v->id - 1] = v->rows; } +static void hex(char *out, uint32_t rgb) { + for (int i = 0; i < 6; i++) out[i] = "0123456789abcdef"[rgb >> (20 - 4 * i) & 0xf]; +} + static void num(char *out, unsigned n) { char t[12]; int k = 0; @@ -84,6 +89,12 @@ static void paint(void *st, const pa_window *w, pa_paint *out) { if (w->glyphs) memcpy(v + strlen(v), " glyphs", 8); pa_put(w, 3, 0, v, PA_DEFAULT, PA_DEFAULT, 0); } + if (api->abi >= 0x30004u) { + char h[] = "hits rrggbb rrggbb"; + hex(h + 5, w->hit); + hex(h + 12, w->hit_current); + pa_put(w, 4, 0, h, PA_DEFAULT, PA_DEFAULT, 0); + } if (f && out->cap > 0 && w->rows > 2) { pa_placement *pl = &out->placements[out->n++]; *pl = (pa_placement){.rgba = f->pixels, .w = 2, .h = 2, .src = {0, 0, 2, 2}, .dst = {0, 2, 2, 1}, .key = f->count}; diff --git a/addons/fake/fake.out b/addons/fake/fake.out index 8f92d24e..ef4c200b 100644 --- a/addons/fake/fake.out +++ b/addons/fake/fake.out @@ -6,7 +6,7 @@ tag fake petscii:on palette:commodore ascii:on | | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 4b3cd99b86ea3486 @@ -16,7 +16,7 @@ tag fake petscii:on palette:commodore ascii:on |kb | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key fdcaab9076ad067e @@ -26,7 +26,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 71e39225f0cec2a5 @@ -36,7 +36,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 54740e23065232cf @@ -46,7 +46,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 @@ -56,7 +56,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 @@ -66,7 +66,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 2 58x7 -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 @@ -77,7 +77,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 2 68x13 -| +|hits 5e4923 917a53 | | | @@ -93,7 +93,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 @@ -103,7 +103,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 @@ -113,7 +113,7 @@ tag fake petscii:on palette:commodore ascii:on |m3 | |view 1 58x7 glyphs -| +|hits 5e4923 917a53 | | placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716 |
