Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
c4d2a5d
fix(wuss): keep parent menu rows highlit while a submenu is open
dpt Sep 6, 2026
8816c80
refactor(wuss): move the descriptor menu demo into the image task
dpt Sep 6, 2026
e2de080
style: list result_t declaration first in every function
dpt Sep 6, 2026
8aa171f
docs: note the result_t-declared-first convention in CLAUDE.md
dpt Sep 6, 2026
2b4fd05
fix(wuss): restore image demo window to full height
dpt Sep 6, 2026
cd3f120
feat(wuss): add prog_info standard dialogue component
dpt Sep 6, 2026
a5ab1d2
fix(wuss): don't paint the image into the proginfo dialogue
dpt Sep 6, 2026
9852e7f
feat(wuss): add wuss_WINDOW_NO_REDRAW flag
dpt Sep 6, 2026
138b53b
docs(wuss): document wuss_WINDOW_NO_REDRAW and the proginfo component
dpt Sep 6, 2026
42557d1
feat(wuss): add a border field to label icons
dpt Sep 6, 2026
54247cd
feat(wuss): show proginfo values in sunken display fields
dpt Sep 6, 2026
e848b88
fix(wuss): deliver task QUIT before tearing down the menu chain
dpt Sep 6, 2026
a99956c
refactor(wuss): use MIN/MAX macros for proginfo layout clamps
dpt Sep 6, 2026
cb3643a
style(wuss): align the image_create init block
dpt Sep 6, 2026
fb61a91
feat(wuss): add wuss_COLOUR_WINDOW and wuss_COLOUR_MENU named colours
dpt Sep 6, 2026
f6c237c
refactor(wuss)!: make WINDOW and MENU colours config-backed roles
dpt Sep 6, 2026
c5880fd
feat(wuss): paint menu and window backdrops from the body role colours
dpt Sep 6, 2026
a2d768b
fix(wuss): set config.body in the wuss demo so menus aren't black
dpt Sep 6, 2026
f79d331
fix(wuss): right-justified icon labels align on their true right edge
dpt Sep 6, 2026
dc10ddf
fix(wuss): tell the owning task when wuss closes its menu chain
dpt Sep 6, 2026
6f23a9a
fix(wuss): keep the menu task alive through client task teardown
dpt Sep 7, 2026
308ba93
feat(wuss): row leading in proginfo, batched icon border draw
dpt Sep 7, 2026
6a90225
feat(wuss): 2px icon bevel, drop proginfo trailing row leading
dpt Sep 7, 2026
e50a384
refactor(wuss): split proginfo onto a reusable info grid component
dpt Sep 7, 2026
0ff4ef1
refactor(wuss): simplify wuss_info_create
dpt Sep 7, 2026
72ca1e9
test(wuss): add GROOVE and RIDGE border example icons
dpt Sep 7, 2026
152c830
feat(wuss): paint the icons demo from the standard window colour
dpt Sep 7, 2026
3fbc27c
test(wuss): use wuss_COLOUR_BLACK instead of wuss_nearest_colour
dpt Sep 7, 2026
97afa07
feat(wuss): add wuss_ICON_BORDER_ACTION and a bevel-edge primitive
dpt Sep 7, 2026
35e07d0
style(wuss): one palette constant per line in g_chrome
dpt Sep 7, 2026
e98fa6d
refactor(wuss): draw button bevels through screen_draw_bevel_edge
dpt Sep 7, 2026
87d4b4d
fix(wuss): nudge centred icon label down 1px
dpt Sep 7, 2026
6fbc78f
fix(wuss): ignore mouse clicks outside the image window
dpt Sep 7, 2026
cf9c01a
feat(wuss): add a dedicated window outline colour
dpt Sep 7, 2026
a76578f
feat(wuss): draw default buttons with the action-border surround
dpt Sep 7, 2026
4f3ccfe
feat(wuss): use orange accent chrome in the PICO-8 demo palette
dpt Sep 7, 2026
783d313
feat(wuss): fill pressed buttons with a darker face colour
dpt Sep 7, 2026
5494767
docs(wuss): reorganise TODO into dependency layers
dpt Sep 7, 2026
b269cb7
fix(wuss): tile furniture hit boxes over the outline band and corners
dpt Sep 7, 2026
6e7c263
fix(wuss): give the resize icon dividing seams either side
dpt Sep 7, 2026
a401c8a
fix(wuss): stop pre-filling the desktop backdrop behind windows
dpt Sep 7, 2026
4fee285
feat(wuss): add Saturn task, a ringed-planet dot sketch
dpt Sep 7, 2026
0a1c8d5
refactor(wuss): hoist saturn's magic constants to named defines
dpt Sep 7, 2026
8020cfc
feat(framebuf): add screen_fill_rects multi-rect fill op
dpt Sep 7, 2026
8bde3e1
perf(wuss): cache furniture layout, split paint into two phases
dpt Sep 7, 2026
dcd4a98
feat(utils): add rng.h, a seedable deterministic PRNG
dpt Sep 7, 2026
97d540b
feat(io): add namelist_scan, dir leafname collection into a table
dpt Sep 7, 2026
4f08068
fix(wuss): saturn redraw honours scroll offset; rename wuss_WINDOW_NONE
dpt Sep 8, 2026
5623006
feat(wuss): add wuss_ICON_BORDER_DIVIDER label border
dpt Sep 8, 2026
70a9a7e
fix(wuss): paint interior rules and resize seams in outline colour
dpt Sep 8, 2026
ca50f13
feat(wuss): centralise text rendering; split button/accent chrome col…
dpt Sep 8, 2026
9f5e696
feat(wuss): draw wuss_ICON_TYPE_FRAME surround as a DIVIDER border
dpt Sep 8, 2026
b81d3f9
feat(wuss): curve task cycles curve type on Adjust, with label and pe…
dpt Sep 8, 2026
d71dce5
feat(framebuf): add RLE-compressed read-only bitmaps
dpt Sep 8, 2026
5237e91
feat(wuss): load a directory of PNGs into an RLE-compressed icon set
dpt Sep 8, 2026
b27af47
refactor(wuss): lay out icons Buttons demo as a 2x2 grid
dpt Sep 8, 2026
9a9a5d1
feat(framebuf): render 32bpp RLE bitmaps onto 4bpp paletted screens
dpt Sep 8, 2026
ff8f9a4
fix(wuss): cover the drawn resize icon in its hit box with one scrollbar
dpt Sep 8, 2026
d960b99
test(wuss): assert the resize icon centre hits RESIZE for every scrol…
dpt Sep 8, 2026
6598bb5
feat(wuss): draw a full-width divider rule under the titlebar
dpt Sep 8, 2026
a5a4f98
fix(wuss): swap desktop backdrop dot and field colours for the Wimp p…
dpt Sep 8, 2026
362470b
feat(framebuf): add pixelmap cached format-conversion tables
dpt Sep 9, 2026
d4ba9d3
test(wuss): wrap the icons menu strip in a captioned frame
dpt Sep 9, 2026
ed320c9
test: add smred test image
dpt Sep 9, 2026
41db2cf
fix(wuss): recalc furniture layout on toggle-size no-blit path
dpt Sep 9, 2026
7556f2d
feat(wuss): make screen depth and startup palette command-line options
dpt Sep 9, 2026
f816f52
docs(wuss): update TODO
dpt Sep 9, 2026
d8fc5f2
feat(wuss): add --scale option and switch the demo to getopt_long
dpt Sep 9, 2026
3a6023c
feat(wuss): blit icon-set bitmaps for radio and option icons
dpt Sep 9, 2026
5f250b0
assets(wuss): update Digits bmfont PNGs
dpt Sep 9, 2026
0ba5456
refactor(wuss)!: rename wuss_window_invalidate_all to _visible
dpt Sep 9, 2026
216b8d3
chore(wuss): regenerate greeble prefab tiles
dpt Sep 9, 2026
7ca797e
fix(wuss): resize image window on load, add 8px border
dpt Sep 9, 2026
42f358b
feat(framebuf): support 1bpp paletted (p1) bitmaps
dpt Sep 9, 2026
4e5c97f
feat(wuss): support a 1bpp (pixelfmt_p1) desktop
dpt Sep 9, 2026
ca028b2
feat(bmfont): render to a 1bpp (pixelfmt_p1) screen
dpt Sep 9, 2026
918736f
feat(wuss): draw the control polygon's convex hull in the curve task
dpt Sep 9, 2026
bea9304
feat(framebuf): support 2bpp paletted (p2) bitmaps
dpt Sep 9, 2026
549b6d1
feat(wuss): support a 2bpp (pixelfmt_p2) desktop
dpt Sep 9, 2026
800aced
feat(bmfont): render to a 2bpp (pixelfmt_p2) screen
dpt Sep 9, 2026
a033164
refactor(framebuf): rename screen_set_pixel_8 to _p8
dpt Sep 9, 2026
dc62624
feat(wuss): cycle 2x2/4x4/8x8 Bayer dithers in the gradient task
dpt Sep 9, 2026
3193eb9
feat(bmfont): add pixel-font PNGs and a TTF-to-PNG generator
dpt Sep 9, 2026
7054b15
chore(tools): mark Python scripts executable
dpt Sep 9, 2026
43d0468
fix(wuss): drop furniture layout cache on NO_RESIZE_BLIT resize
dpt Sep 9, 2026
996ee39
fix(bitmap): stop bitmap_fill_pattern inverting the clip test
dpt Sep 9, 2026
eb024f5
fix(bitmap): bound bitmap__rle_decode_row against an end pointer
dpt Sep 9, 2026
bd0d429
fix(bmfont): range-check the glyph id in bmfont_draw
dpt Sep 9, 2026
27da007
fix(wuss): guard against a double free when a QUIT handler reaps its …
dpt Sep 9, 2026
2f1cc04
fix(bitmap): size the RLE compress buffer for one control byte per pixel
dpt Sep 9, 2026
ac4e5ea
docs(wuss): spell out that wuss_EVENT_CLOSE is not a veto point
dpt Sep 9, 2026
156b3ec
fix(bitmap): convert every p4 pixel in bmconv_p4_to_bgrx8888
dpt Sep 9, 2026
7e72caa
fix(wuss): clear stale pointer state when a window is hidden
dpt Sep 9, 2026
fbcdcd0
fix(wuss): match the drawn scroll strip to its hit region at the corner
dpt Sep 9, 2026
9ca2a86
fix(wuss): stop nearest_edge_region turning frame chrome into a resize
dpt Sep 9, 2026
490fc88
fix(screen): guard the span fill pointer, not just the span, in release
dpt Sep 9, 2026
970e47d
docs(wuss): update TODO
dpt Sep 9, 2026
b414c2e
docs(changelog): record p1/p2 support and the wuss-picklepuss fixes
dpt Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 113 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ _Unreleased_ until one is cut.
a live icon per element.
- `wuss_window_invalidate_extent()` — marks a window's whole virtual
document extent dirty (`window->doc`), not just the visible content
rectangle `wuss_window_invalidate_all()` covers, so a change touching the
rectangle `wuss_window_invalidate_visible()` covers, so a change touching the
whole document repaints correctly at any scroll position.
- Clicking in a scrollbar well (not on the sausage) now pages the content
one visible extent towards the click, keeping one `WUSS_SCROLL_STEP` of
Expand Down Expand Up @@ -232,9 +232,42 @@ _Unreleased_ until one is cut.
pool. Released areas are not coalesced.
- `POINT(x, y)` and `SIZE2D(w, h)` compound-literal macros in `geom/point.h`
and `geom/size.h`.
- 1bpp and 2bpp paletted pixel formats (`pixelfmt_p1`, `pixelfmt_p2`),
packed MSB-first (bit 7 / bits 7..6 are the leftmost pixel) to match PNG
and the existing pattern bit order. `span_p1` / `span_p2` (`fill` +
`blendconst`) are registered so `bitmap_init()` hands out a valid span;
`screen_set_pixel` / `screen_blend_pixel` / `screen_fill_pattern` /
`screen_copy_bitmap` gain p1 and p2 cases; `bitmap_convert()` grows
`p1 -> bgrx8888` and `p2 -> bgrx8888` paths for the SDL frontend's
per-frame display conversion. `pixelmap` already handled both generically.
- `bmfont_draw()` renders to a `pixelfmt_p1` or `pixelfmt_p2` screen. A
single `bmfont_p1_plot_row` / `bmfont_p2_plot_row` does the per-pixel
MSB-first bit write for both 1- and 2-byte glyph rows and both opaque
and transparent backgrounds.
- `pixelfmt_paletted_nentries()` — palette entry count for any paletted
format, replacing the `(scr->format == pixelfmt_p4) ? 16 : 0` hack at
every `colour_to_pixel()` call site (which passed a broken `nentries=0`
for any non-p4 paletted screen).
- The `wuss` SDL demo accepts `-d`/`--depth 1` and `--depth 2`, selecting a
`pixelfmt_p1` (stride `(width + 7) / 8`) or `pixelfmt_p2` (stride
`(width + 3) / 4`) framebuffer alongside the existing 4 and 32.
- The `wuss` curve task draws the active control points' convex hull
(Andrew's monotone chain) as a closed light-grey polyline before the
curve and blobs.
- The `wuss` gradient task cycles its ordered-dither matrix through 2x2,
4x4 and 8x8 on SELECT / ADJUST clicks; each matrix cell maps to a fixed
-8..+8 offset so a larger matrix gives a finer pattern, not a noisier
one (4x4 output unchanged). The current size is drawn top-left.
- `tools/ttf2bmfont.py` — renders a TTF into the bmfont PNG format the
loader expects. Three small paletted bitmap faces (`04b_03`, `04b_25`,
`Nokia`) added under `resources/bmfonts/`.

### Changed

- **Breaking:** `wuss_window_invalidate_all()` is renamed
`wuss_window_invalidate_visible()` -- "all" misread as the whole document
when it only ever covered the visible content rectangle. Same behaviour;
use `wuss_window_invalidate_extent()` for the full document.
- The `wuss` demo task launcher is split out of `apps/wuss/main.c` into
`apps/wuss/tasks.c` behind `tasks.h`: the 19 `spawn_*` callbacks, every
menu table and `task_handle_event` move over, and the shared file-scope
Expand Down Expand Up @@ -368,6 +401,14 @@ _Unreleased_ until one is cut.
leaf now delivers `wuss_EVENT_MENU_SELECT` (with `window == NULL`) to that
task — `data.menu_select` carries `{ const struct wuss_menu *menu; int
index; wuss_button_t button; }`. `wuss_menu_select_fn_t` is removed.
- `screen_set_pixel_8()` is renamed `screen_set_pixel_p8()`, matching the
`_p1` / `_p2` / `_p4` naming of the other paletted set-pixel helpers.
- The greeble prefab tables (`greeble_prefab_cells` / `greeble_prefab`) are
regenerated from the current sheet; `GREEBLE_NPREFAB` 103 -> 137.
- The `wuss` image task resizes the window frame on load (via
`wuss_window_resize()` before `wuss_window_set_doc()`, which alone only
moved the scroll extent) and insets an 8px solid border inside the
ninepatch frame.

### Fixed

Expand Down Expand Up @@ -445,9 +486,9 @@ _Unreleased_ until one is cut.
`NDEBUG`).
- `screen_fill_hline()` (and so `screen_fill_rect()`, which calls it per
row) is a no-op in release builds for a `screen_t` whose pixel format has
no span-registry entry, instead of dereferencing the NULL `scr->span` —
the guarding `assert` was compiled out under `NDEBUG` so this previously
crashed.
no span-registry entry — or a span with no `fill` — instead of
dereferencing the NULL `scr->span` / `scr->span->fill`; the guarding
`assert` was compiled out under `NDEBUG` so this previously crashed.
- `wuss_create()`'s font-slot arrays and loop bound in the interactive demo
are now sized from one named, compile-time-checked constant
(`WUSS_MAIN_NFONTS`, checked against `wuss_MAX_FONTS`) instead of three
Expand Down Expand Up @@ -484,3 +525,71 @@ _Unreleased_ until one is cut.
endpoints.
- `screen_draw_ninepatch()` clamps its corner cells so they no longer overlap
and double-draw when the destination box is smaller than the source corners.
- `spanregistry_get()`'s one-slot cache seeded `lastformat` to zero, which
equals `pixelfmt_p1` (the first enum member), so the first p1 lookup
short-circuited to a NULL span and tripped the `screen_fill_hline()`
assert. Seeded with `pixelfmt_unknown` and the fast path guarded on a
non-NULL span.
- The `NO_RESIZE_BLIT` branch of `wuss_window_resize()` invalidated the
dirty region but never dropped the cached furniture layout, so
`wuss__furniture_draw` kept painting titlebar/carve/outline rects at the
previous frame's width. It now calls `wuss__chrome_invalidate_layout`,
matching the blit branch's `wuss__chrome_repaint`.
- `bitmap_fill_pattern()` negated the `box_intersection()` result (which is
non-zero when the intersection is *empty*), so any non-NULL `area` that
overlapped the bitmap returned early and painted nothing — only
`area == NULL` worked. Drop the negation to match `screen_fill_pattern()`.
- `bitmap__rle_decode_row()` ran a bare `for (;;)` that only stopped on an
EOL opcode, so a truncated or corrupt RLE blob read opcodes past the
allocation. It now takes an `end` limit (like every other row walker),
stops at it, and has a reserved opcode bail to `end` (release builds
previously did a bare `break`, desynchronising the caller's row cursor).
`bitmap_decompress()` reads `data_len` from the blob header to form
`end`.
- `bmfont_draw()` formed `gid = c - ' '` from a raw signed `char` and
indexed `adw[]` and the glyph bitmaps with no bounds check, so a tab, a
DEL or any byte `>= 0x80` produced a negative or oversized index and an
out-of-bounds read/write. Both draw loops now filter `c < ' '` and
`gid >= totalchars`, matching `bmfont_measure()`. The
fully-vertically-clipped case (`clippedcharheight <= 0`) also gets a
release-build bail rather than entering `drawfn` with a negative height
and looping ~`INT_MAX` times.
- `wuss_destroy()`'s task sweep delivered `wuss_EVENT_QUIT` and freed each
task node without first setting `wuss_TASK__REAPING`. A QUIT handler that
closed its last autoclose window hit `wuss_window_close`'s self-destruct
path, which delivered a second QUIT and freed the node — which the sweep
then freed again. `wuss_TASK__REAPING` is now set before QUIT in the
sweep, and `wuss_task_destroy()` is a no-op when the task is already
being reaped.
- `bitmap_compress()`'s worst-case row estimate assumed one control byte
per 128 pixels, but the encoder emits a 1-byte literal control for every
isolated non-repeatable pixel. A legal y8 image of the form singleton,
pair, singleton, pair, ... needs ~1.33*w bytes/row, overflowing the
allocation and returning `result_BUFFER_OVERFLOW` on valid input. The
budget is now `w * (bpp + 1)` plus the literal-long split control and an
EOL.
- `bmconv_p4_to_bgrx8888()` ran `x < src->size.w / 8` and expanded 8 pixels
per iteration, so the final `w % 8` pixels of each row were never written
— the output had uninitialised garbage columns for any width not a
multiple of 8 — and it ignored row padding in `src->rowbytes`. Switched
to a per-pixel loop honouring both, matching the p1 and p2 converters.
- `wuss_window_set_hidden()` marked a window hidden but left
`wuss->furniture.dragging`, `wuss->pressed_icon` and `wuss->hover_icon`
pointing into it, so hiding a window mid-drag from an event handler meant
the next `wuss_mouse_move()` still drove `wuss_window_move()` on an
off-screen window every pointer report. It now clears the same pointer
state `wuss_window_close()` does.
- `scroll_strip()` always reserved `size + WUSS_DIVIDER_PX` at the far end
for the resize corner, but `scroll_strip_hit()` only reserves it when
something owns that corner. With a horizontal scrollbar and `NO_VSCROLL`
and `NO_RESIZE` the drawn strip stopped short while the hit box ran to
the visible edge: the rightmost band showed stale pixels yet hit-tested
as `HSCROLL_WELL` and started a scrollbar drag over empty chrome.
`scroll_strip()` gets the same far-end rule.
- `wuss__furniture_hit_test()`'s `nearest_edge_region()` fallback claimed
`wuss_FURNITURE_RESIZE` for a whole bottom or right carve band whenever a
resize icon was present, and a scroll well for an edge with no scrollbar
strip. A click on the bare carve band left of the corner icon then
started a resize far from the visible handle. It now hands off to a
scroll well only when that scrollbar's strip runs the full edge;
every other edge pixel resolves to `TITLE` or `CONTENT`.
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ New source/header files must be added by hand to the relevant `set(..._SOURCES .

**Test structure.** There is a single test binary (`DPTLibTest`, from `apps/test/main.c`) that dispatches to per-module `<module>_test(resources)` functions declared centrally in `include/test/all-tests.h`. Tests return `result_TEST_PASSED`/`result_TEST_FAILED` (`result_BASE_TEST`).

**Notable sub-libraries with their own docs** (`docs/*.md`): `io/stream` (chainable byte-stream sources/transforms, PackBits and move-to-front compression), `framebuf/bmfont` (proportional bitmap fonts loaded from specially-formatted PNGs), `framebuf/composite` (Porter-Duff compositing on RGBA/BGRA bitmaps), `wuss` (minimal window manager: creation, z-ordering, mouse routing, dirty-region redraw, client-delegated content).
**Notable sub-libraries with their own docs** (`docs/*.md`): `io/stream` (chainable byte-stream sources/transforms, PackBits and move-to-front compression), `framebuf/bmfont` (proportional bitmap fonts loaded from specially-formatted PNGs), `framebuf/composite` (Porter-Duff compositing on RGBA/BGRA bitmaps), `framebuf/pixelmap` (cached deep-to-paletted colour conversion tables for blit inner loops), `wuss` (minimal window manager: creation, z-ordering, mouse routing, dirty-region redraw, client-delegated content).

**RISC OS.** `TARGET_RISCOS` (set by an external toolchain file) switches CMake to fetch/build zlib+libpng from source, link OSLib from `$GCCSDK_INSTALL_ENV`, and applies `riscos_set_flags()`. `pngusr-ro.dfa`/`pngusr-rw.dfa` select libpng's build config depending on `DPTLIB_IMAGES_READ_ONLY`.

## Code style

- C99, `-Wall -Wextra -pedantic`. Allman brace style, 2-space indentation, tabs converted to spaces (see `.astylerc`/`.editorconfig` — astyle is the formatter of record).
- Declare variables at the top of each scope (pre-C99 style is followed throughout, even though the standard is C99), ordered by first use.
- Declare variables at the top of each scope (pre-C99 style is followed throughout, even though the standard is C99), ordered by first use. Exception: a `result_t` status local (`rc`, `err`, `crc`, ...) is always declared first in its block, ahead of the use-ordered locals.
- File header comment format: `/* filename.c -- one-line description */`.
- Section breaks within files use `/* ----- ... ----- */` rule comments.
- Public API docs use Doxygen (`\file`, `\param`, `\return`); a `Doxyfile` exists for generating them.
Expand Down
28 changes: 27 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ set(PUBLIC_HEADERS
include/framebuf/palettes.h
include/framebuf/pattern.h
include/framebuf/pixelfmt.h
include/framebuf/pixelmap.h
include/framebuf/screen.h
include/framebuf/span-bgrx8888.h
include/framebuf/span-p1.h
include/framebuf/span-p2.h
include/framebuf/span-p4.h
include/framebuf/span-registry.h
include/framebuf/span-rgba8888.h
Expand All @@ -101,6 +104,7 @@ set(PUBLIC_HEADERS
include/geom/point.h
include/geom/size.h
include/io/dirscan.h
include/io/namelist.h
include/io/path.h
include/io/stream-mem.h
include/io/stream-mtfcomp.h
Expand All @@ -119,6 +123,7 @@ set(PUBLIC_HEADERS
include/utils/maths.h
include/utils/pack.h
include/utils/primes.h
include/utils/rng.h
include/wuss/task.h
include/wuss/window.h
include/wuss/wuss.h)
Expand All @@ -133,6 +138,8 @@ endif()
if(WUSS_COMPONENTS)
list(APPEND PUBLIC_HEADERS include/wuss/component/fontmenu.h)
list(APPEND PUBLIC_HEADERS include/wuss/component/colourmenu.h)
list(APPEND PUBLIC_HEADERS include/wuss/component/info.h)
list(APPEND PUBLIC_HEADERS include/wuss/component/proginfo.h)
endif()

# The public headers must be set as properties of the library, not as
Expand Down Expand Up @@ -245,8 +252,10 @@ set(DATASTRUCT_SOURCES

set(FRAMEBUF_SOURCES
libraries/framebuf/bitmap/bitmap.c
libraries/framebuf/bitmap/compress.c
libraries/framebuf/bitmap/fill-pattern.c
libraries/framebuf/bitmap/load.c
libraries/framebuf/bitmap/rle.h
libraries/framebuf/bitmap/save.c
libraries/framebuf/bmfont/bmfont.c
libraries/framebuf/bmfont/enumerate.c
Expand All @@ -256,7 +265,13 @@ set(FRAMEBUF_SOURCES
libraries/framebuf/palettes/palettes.c
libraries/framebuf/pattern/pattern.c
libraries/framebuf/pixelfmt/log2bpp.c
libraries/framebuf/pixelfmt/paletted-nentries.c
libraries/framebuf/pixelmap/build.c
libraries/framebuf/pixelmap/get.c
libraries/framebuf/pixelmap/impl.h
libraries/framebuf/screen/screen.c
libraries/framebuf/screen/screen-copy-bitmap-rle.c
libraries/framebuf/screen/screen-copy-bitmap-rle.h
libraries/framebuf/screen/screen-copy-ninepatch.c
libraries/framebuf/screen/screen-copy-rect.c
libraries/framebuf/screen/screen-draw.c
Expand All @@ -268,6 +283,8 @@ set(FRAMEBUF_SOURCES
libraries/framebuf/span/all8888.c
libraries/framebuf/span/all8888.h
libraries/framebuf/span/bgrx8888.c
libraries/framebuf/span/p1.c
libraries/framebuf/span/p2.c
libraries/framebuf/span/p4.c
libraries/framebuf/span/rgbx8888.c
libraries/framebuf/span/xbgr8888.c)
Expand Down Expand Up @@ -295,6 +312,7 @@ set(GEOM_SOURCES

set(IO_SOURCES
libraries/io/dirscan/dirscan.c
libraries/io/namelist/namelist.c
libraries/io/path/path.c
libraries/io/stream/stream-mem.c
libraries/io/stream/stream-mtfcomp.c
Expand Down Expand Up @@ -368,6 +386,7 @@ set(WUSS_CORE_SOURCES
libraries/wuss/core/scroll-step.c
libraries/wuss/core/set-backdrop.c
libraries/wuss/core/set-palette.c
libraries/wuss/core/text.c
libraries/wuss/core/task/create.c
libraries/wuss/core/task/destroy.c
libraries/wuss/core/task/set-autoclose.c
Expand Down Expand Up @@ -397,6 +416,7 @@ set(WUSS_FURNITURE_SOURCES
libraries/wuss/furniture/draw.c
libraries/wuss/furniture/hit-test.c
libraries/wuss/furniture/invalidate.c
libraries/wuss/furniture/layout.c
libraries/wuss/furniture/ops.c
libraries/wuss/furniture/resize-box.c
libraries/wuss/furniture/scroll-action.c
Expand All @@ -421,6 +441,7 @@ set(WUSS_ICON_SOURCES
libraries/wuss/icon/hit-test.c
libraries/wuss/icon/invalidate.c
libraries/wuss/icon/plot.c
libraries/wuss/icon/registry.c
libraries/wuss/icon/screen-box.c
libraries/wuss/icon/set-hidden.c
libraries/wuss/icon/set-hover.c
Expand All @@ -435,7 +456,9 @@ set(WUSS_MENU_SOURCES

set(WUSS_COMPONENT_SOURCES
libraries/wuss/component/fontmenu.c
libraries/wuss/component/colourmenu.c)
libraries/wuss/component/colourmenu.c
libraries/wuss/component/info.c
libraries/wuss/component/proginfo.c)

set(WUSS_SOURCES ${WUSS_CORE_SOURCES})
if(WUSS_FURNITURE)
Expand Down Expand Up @@ -650,9 +673,11 @@ if(BUILD_TESTS)
libraries/datastruct/hash/test/hash-test.c
libraries/datastruct/list/test/list-test.c
libraries/datastruct/ntree/test/ntree-test.c
libraries/framebuf/bitmap/test/rle-test.c
libraries/framebuf/bmfont/test/bmfont-test.c
libraries/framebuf/composite/test/composite-test.c
libraries/framebuf/curve/test/curve-test.c
libraries/framebuf/pixelmap/test/pixelmap-test.c
libraries/framebuf/screen/test/screen-test.c
libraries/geom/box/test/box-test.c
libraries/geom/layout/test/layout-test.c
Expand Down Expand Up @@ -731,6 +756,7 @@ if(BUILD_APPS)
libraries/wuss/test/tasks/minesweeper.c
libraries/wuss/test/tasks/palette.c
libraries/wuss/test/tasks/porter-duff.c
libraries/wuss/test/tasks/saturn.c
libraries/wuss/test/tasks/sofa.c
libraries/wuss/test/tasks/swatches.c
libraries/wuss/test/tasks/text.c)
Expand Down
2 changes: 2 additions & 0 deletions apps/test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ static const test_t tests[] =

{ "bmfont", bmfont_test },
{ "composite", composite_test },
{ "rle", bitmap_rle_test },
{ "curve", curve_test },
{ "pixelmap", pixelmap_test },
{ "screen", screen_test },

{ "box", box_test },
Expand Down
7 changes: 7 additions & 0 deletions apps/wuss/frontend-riscos.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ result_t wuss_frontend_open(int width,
int height,
const colour_t *palette,
int npalette,
int depth,
int scale,
void **pixels,
int *rowbytes,
pixelfmt_t *fmt,
Expand All @@ -99,6 +101,11 @@ result_t wuss_frontend_open(int width,
_kernel_oserror *err;
char msg[160]; /* deferred so it prints after the mode restore */

/* this backend is locked to the 16-colour Wimp mode with a fixed 1:1
* window; -depth and -scale only make sense for the SDL backend */
NOT_USED(depth);
NOT_USED(scale);

msg[0] = '\0';

fe = calloc(1, sizeof(*fe));
Expand Down
Loading