mcclim/inventory.lisp
Draw one deliberately old-fashioned raised or recessed CLIM panel.
Paint block as an isometric cube, sized as scale sixteenths used to be.
The flat top tile said what a material looked like; the cube says what it
is. atlas is no longer read here -- block-icon-pattern keeps its own -- but
it stays in the lambda list because the inventory frame owns one and the
callers all have it to hand.
How many there are, as a count or as the mark for no limit.
A creative inventory is mostly unlimited stacks, and spelling that out in every cell makes the word louder than the block it is about.
The (label . VALUE) rows the inspector prints for block held as entry.
A film is its video: what it is called, who put it up, how long it runs.
Hide the redundant HUD bar while the full inventory owns modal focus.
Return the zero-based visible inventory slot at texture U,V.
Escape leaves, and so does another I: the key which opened the view is the key which puts it away, since while it is open it owns every key.
Create, attach, and focus session's modal McCLIM inventory view.
Close an open-luvcraft-inventory overlay.
Build the durable inventory pane before the game window is published. Opening it later is then only focus/visibility state, with no shader or glyph-atlas compilation on the frame thread. This is an AROUND method so application adapters can independently own :AFTER attachment hooks; CLOS replaces, rather than accumulates, identical qualified coordinates.
(&optional (text *page*) (name "test"))()Return the little world's horizontal RGBA8 atlas as packed pixel words. RGB is the material's procedural colour and A is opaque coverage. The array spans the full tile capacity; tiles past the painted count stay zero, waiting for a material to claim them.
(stream left top right bottom &key (ink *inventory-face-ink*) recessed-p)Logical disjunction of tests and raw truth values.
Division of two represented quantities.
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(stream atlas block left top &key (scale 3))Paint BLOCK as an isometric cube, sized as SCALE sixteenths used to be. The flat top tile said what a material looked like; the cube says what it is. ATLAS is no longer read here -- BLOCK-ICON-PATTERN keeps its own -- but it stays in the lambda list because the inventory frame owns one and the callers all have it to…
(block &optional (size 32))(stream block x y &optional (size 32))Multiplication and scalar scaling.
(entry)(entry)How many there are, as a count or as the mark for no limit. A creative inventory is mostly unlimited stacks, and spelling that out in every cell makes the word louder than the block it is about.
Construct a meaningful literal.
(category block)An explicitly owned AVFrame.
(frame)The maximum of compatible quantities.
The minimum of compatible quantities.
Addition over compatible quantities.
(frame pane category label index)(frame pane)Test whether one compatible scalar is less than another.
(frame pane entry index left top width height)Subtraction or unary negation.
(frame pane entries)Test whether two compatible scalars are equal.
(block entry)The (LABEL . VALUE) rows the inspector prints for BLOCK held as ENTRY.
(block)BLOCK's own linear material radiance, independent of propagated light.
(text limit)Logical conjunction of tests and raw truth values.
Test whether one compatible scalar is greater than another.
One downloaded video as a thing in the world and in the bag. Every film shares the name :FILM and the reel's tiles; what differs is the video, so a film is its own block kind rather than one entry in the palette, and the world's palette-by-identity storage keeps them apart for free.
The non-negative remainder of integer division.
(frame pane selected entry)((pane lobby-hud-pane) region)(inventory)(inventory block)(sheet x1 y1 x2 y2 &rest options
&key (radius 7) (filled t) &allow-other-keys)(x1 y1 x2 y2 start-color end-color)(frame)A direct GPU target for an ordered LUV-GPU-MEDIUM drawing stream. An embedded mirror retains an immutable prepared CPU revision for the game's final pass; a standalone mirror renders into its native canvas drawable.
A direct McCLIM surface mounted in the presentation HUD.
(overlay session pass surface-texture)Encode OVERLAY into SESSION's open scene PASS for SURFACE-TEXTURE.
(overlay)Return where OVERLAY draws: :SCENE, :WORLD-PANEL, :VIEWMODEL, :HUD, or :NONE. Scene overlays inhabit world depth; viewmodels are first-person geometry above the world but below held items and the crosshair. World panels retain world projection and depth while drawing analytic application graphics at native…
(overlay)(overlay)(name-and-options &rest method-tail)Define a method whose complete dynamic extent is an ambient trace zone. The inferred name includes the generic function, non-T required specializers, and qualifiers. :ZONE and :VALUE have the same meaning as in ZDEFUN.
(overlay session)Publish any complete pending render state for OVERLAY at a frame boundary.
Test whether one compatible scalar is at most another.
(u v entry-count)(u v entry-count)(overlay session canvas event)Handle EVENT projected onto OVERLAY, returning true when consumed.
A native destination with a lifetime and frame clock.
(overlay x y)(session number)(focus session canvas event)Handle EVENT while FOCUS owns SESSION's modal player interaction.
Logical negation of one test or raw truth value.
(session)(focus session)Notify FOCUS that SESSION has left its interaction mode.
(session &key (title "luvcraft inventory"))(session focus)Enter modal interaction with FOCUS, suspending ordinary player input. This is the common session transition behind using a world terminal or book, mounting a vehicle, and other interactions described by #8JCMA5.
A McCLIM frame manager constrained by luv's current native host.
(session overlay)Attach OVERLAY at SESSION's next native frame boundary and return it. ADD consumes a newly offered OVERLAY on both success and terminal rejection. Once SESSION begins stopping, the rejected overlay is released exactly once before APPLICATION-ATTACHMENT-CLOSED is signalled.
(overlay)(session)Toggle SESSION's inventory view, returning true when one is available. LUVCRAFT/CORE has no UI dependency. LUVCRAFT/MCCLIM supplies the session method.
(session)Attach the player HUD supplied by the loaded presentation system. LUVCRAFT/CORE deliberately has no presentation-system dependency. LUVCRAFT/MCCLIM specializes this at the session boundary and returns its attached overlay.
A modal McCLIM inventory presented over the live luvcraft canvas.