Commit Graph

6 Commits

Author SHA1 Message Date
1b6ac779a8 import only the modules each unit uses
An import brings the types and constants its interface needs now
(sex#58): a module pub-imports what its pub forms hold, and sexc
refuses one that does not. Every unit had imported its whole
dependency chain in order to make up for it.

worldgen also pub-imports json, whose cJSON.h its pub fns take
pointers into; a type only C knows is not something sexc can check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:22:41 +03:00
28f0e8acac pub-import the modules a unit's interface holds by value
sexc now checks that importers can see every type a pub form holds,
and asks for pub where the type comes from another import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:05:14 +03:00
e174bff7e2 show what the prospecting pick reads, and find it
The ore maps GenDeposits makes are ported and match the save's for all
31 minerals in every stored region. With them and the strata, a column
reads as the pick's density mode would read it: a Minerals overlay
colours the map by reading, the probe lists every mineral the pick
finds, and Find nearest looks for a mineral read at least so high.

Readings run slightly high: the pick's column already holds the ore of
its chunk's deposits, which are not generated yet. The check against
the 13 readings stored in the save asserts exactly that direction.
Silver, gold and peridot are read from ore inside other deposits, so
they wait for the deposits themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:02:34 +03:00
75d734c2d6 find one rock at any depth
A new rock mode looks for the one highlighted rock anywhere between the
surface and the mantle: the overlay shows the columns that hold it, the
cursor label how deep it starts, and Find nearest the nearest such
column. It can be chosen only while one rock is highlighted, and while
it is on, clicking a rock in the legend highlights that one instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:35:24 +03:00
c14c154303 fix four conditional operands sexc emitted without parentheses, and mark every Sex workaround with a TODO
A conditional as an operand loses its parentheses (sex#59): box-blur
allocated a quarter of its buffer, deep water got the shallow colour,
and verify's delta histogram wrote out of bounds into the height
classes. Plan.org quoted the corrupted count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:01:59 +03:00
e412274837 rework the viewer around base layers, overlays and side panels
One base layer is drawn opaque and any number of overlays over it, so
rocks can be looked for on top of the terrain rather than instead of
it. Settings and rock finding live in fixed panels beside the map, not
in windows over it. What is under the cursor is worked out on a thread
of its own, since computing it per frame stalled the window.

Find nearest searches regions outward from the view's centre and stops
once no nearer region is left; probes leave pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:39:29 +03:00