API Reference (Generated)
Auto-generated API documentation from C++ header files.
The apu module documents PixelRoot32-APU 2.5.0.
Apu
- ApuCore — Shared NES-style APU core used by every AudioScheduler.
- AudioChannel — Represents the internal state of a single audio channel.
- AudioCommand — Internal command to communicate between game and audio threads.
- AudioCommandQueue — Single-Producer Single-Consumer (SPSC) lock-free ring buffer for AudioCommands.
- AudioEvent — A fire-and-forget sound event triggered by the game.
- EnvelopeCurve — Shape of the ADSR decay and release ramps.
- EnvelopeState — Holds ADSR envelope state for a single voice.
- InstrumentPreset — Defines instrument characteristics for playback.
- LfoState — Holds LFO (Low-Frequency Oscillator) state for pitch or volume modulation.
- MixerCurve — Balance the summed voices carry into the output stage.
- MusicNote — Represents a single note in a melody.
- NesEnvelope — NES APU envelope unit state for PULSE 1, PULSE 2, and NOISE.
- NesFrameCounter — NES APU frame counter (sequencer) state.
- NesLengthCounter — NES APU length counter state for a single voice.
- NesLinearCounter — NES APU linear counter state for the TRIANGLE channel.
- NesSweepUnit — NES APU sweep unit state for the PULSE channels.
- NoisePeriodMode — Whether a note keeps the NOISE period it authored (E3/A1).
- OutputStageStateQ15 — Block-local snapshot of the integer output stage.
- PulseDutyMode — Whether a PULSE note keeps the continuous duty generator (E3/A2).
- SfxBreakpoint — Timed automation point for SFX duty steps or pitch envelope.
- SoundProfile — Named character sets applied to every voice.
- VoiceNesOptions — Every per-voice NES opt-in in one place (Hito 4 M14).
Audio
- AudioBackend — Abstract interface for platform-specific audio drivers.
- AudioConfig — Configuration for the Audio subsystem.
- AudioEngine — Facade class for the NES-style audio subsystem.
- AudioScheduler — Abstract interface for the audio execution context.
- DefaultAudioScheduler — Backend-driven scheduler used on platforms without a dedicated audio task.
- ImmediateSfxDelayScheduler — Plays every scheduled event immediately (ignores delay). Test / stub only.
- MusicPlayer — Simple sequencer to play MusicTracks using the AudioEngine.
- NullSfxDelayScheduler — No-op scheduler for banks that only use simultaneous layers (no delayed steps).
- SfxDelayScheduler — Schedules delayed SFX events for
playSfxBanksequence steps.
Core
- Actor — An Entity capable of physical interaction and collision.
- CollisionShape — Defines the geometric shape used for collision detection.
- Engine — The main engine class that manages the game loop and core subsystems.
- Entity — Abstract base class for all game objects.
- EntityType — Categorizes entities for type-safe casting and logic differentiation.
- LimitRect — Defines a rectangular boundary for actor movement.
- LogLevel — Enumeration of log levels.
- PhysicsActor — An actor with basic 2D physics properties using adaptable Scalar type.
- PhysicsBodyType — Defines the simulation behavior of a PhysicsActor.
- Rect — Represents a 2D rectangle, typically used for hitboxes or bounds.
- Scene — Represents a game level or screen containing entities.
- SceneArena — Bump allocator for objects whose lifetime is one scene.
- SceneManager — Manages the stack of active scenes.
- TransitionState — State machine for scene transitions.
- WorldCollisionInfo — Stores flags indicating which world boundaries were hit in the current frame.
Drivers
- ESP32AudioScheduler — Audio scheduler for ESP32 targets.
- ESP32EspNowTransport — ESP-NOW link backend for ESP32 targets.
- ESP32_DAC_AudioBackend — Audio backend for ESP32 classic / S2 internal 8-bit DAC.
- ESP32_I2S_AudioBackend — Audio backend implementation for ESP32 using I2S.
- Esp32NvsKeyValueStore — IKeyValueStore over one ESP-IDF NVS namespace (
nvs.h). - Esp32NvsSlotStore — ISlotStore over one ESP-IDF NVS namespace: one blob per slot.
- HostFileKeyValueStore — IKeyValueStore over one file per key, for native (PC) builds.
- HostFileSlotStore — ISlotStore over one file per slot, for native (PC) builds.
- LoopbackBus — In-process bus shared by a set of loopback transports.
- LoopbackFaults — Injectable link faults for deterministic native testing.
- LoopbackTransport — Native in-process transport with deterministic fault injection.
- NativeAudioScheduler — Audio scheduler for native builds.
- SDL2_AudioBackend — Audio backend implementation for SDL2 (Windows/Linux/Mac).
- SDL2_Drawer — SDL2-backed draw surface for native desktop builds.
- SdConfig — Hardware configuration for an SD card over SPI.
- SdSlotStore — ISlotStore over one file per slot on a FAT microSD card.
- TFT_eSPI_Drawer — Concrete implementation of DrawSurface for ESP32 using the TFT_eSPI library.
- U8G2_Drawer — Implementation of DrawSurface using the U8G2 library for monochromatic OLED displays.
Gameplay
- DialogAction — The semantic input vocabulary DialogRunner::feed() accepts.
- DialogChoice — One selectable option on a DialogState::ShowingChoices line.
- DialogEvent — The single payload type delivered to DialogEventFn for every kind of dialog event.
- DialogEventType — Identifies which fields of a DialogEvent are meaningful.
- DialogLine — One line of a DialogScript: either shown text or a choice prompt.
- DialogRunner — Headless five-state dialog machine over a caller-owned, const DialogScript.
- DialogScript — The caller-owned, immutable table a DialogRunner is started with.
- DialogState — The five states DialogRunner can be in; feed() is total over State x DialogAction.
- GameplayEvent — Fixed-size POD carried by the GameplayEventBus.
- GameplayEventBus — Fixed-capacity FIFO ring buffer for GameplayEvent, single-instance and Engine-owned.
- GameplayEventType — Tag identifying the meaning of a GameplayEvent.
- GridMotion — Plain five-
intaggregate: logical cell, target cell, progress. - GridSpec — Plain six-
intaggregate describing a grid's origin, per-axis cell size, and extent (columns/rows). No member functions, no per-instance runtime state beyond these fields — aconstexpr GridSpeccosts zero SRAM. - InteractionComponent — Opt-in interaction hooks for a game actor — composition, not inheritance.
- InteractionTracker — Detects enter/exit edges on the per-frame physics contact set and dispatches InteractionComponent callbacks (design.md D3).
- LineKind — Distinguishes what a DialogLine presents when the runner enters it.
- ObjectPool — Fixed-capacity, zero-heap slot pool over aligned raw storage.
- Room — POD describing a single room: camera rect + optional tile window + fixed-size connection list.
- RoomData — One exported room: its tile-space rect plus four connection slots.
- RoomDir — Cardinal direction enum for room connections.
- RoomGraph — Fixed-capacity graph of rooms with camera rects and connections.
- RoomGraphBase — Abstract base class for RoomGraph<N> used by Scene via type erasure.
- RoomLayer — Runtime view over an exported room array — the room-graph analogue of
physics::TileBehaviorLayer. - StateMachine — Non-template finite state machine over a caller-owned,
conststate table.
Graphics
- Anchor — Defines anchor points for positioning UI elements.
- BaseDrawSurface — Optional base class for DrawSurface implementations providing default primitive rendering.
- Camera2D — 2D camera for viewport management and smooth scrolling.
- CameraBounds — Closed-interval camera-position range produced by
cameraRangeFor. - CameraEffectsSystem — Manages up to 4 simultaneous camera effects with round-robin insertion.
- CameraTween — Fixed-capacity camera tween pool with enum-based easing.
- Color — Named color indices into the active 16-entry palette.
- DialogBox — Optional default dialog panel, driven by a DialogRunner.
- DialogBoxStyle — Every visual and layout knob DialogBox needs to draw a panel.
- DialogPortraitSize — The closed set of speaker-portrait boxes DialogBox supports.
- DirtyGrid — Two-buffer dirty cell grid (8×8 px cells) for selective framebuffer clears.
- DisplayConfig — Configuration settings for initializing displays with optional resolution scaling.
- DisplayType — Identifies the type of display driver to use.
- DrawSurface — Abstract interface for platform-specific drawing operations.
- EffectSlot — Per-slot state for a single camera effect (20 bytes).
- Font — Descriptor for a bitmap font using 1bpp sprites.
- FontManager — Static utility class for managing bitmap fonts.
- LayerAttributes — All tiles with attributes in a single tilemap layer.
- LayerType — Classifies draw layers for dirty-region marking (static backgrounds vs dynamic content).
- MultiSprite — Multi-layer, multi-color sprite built from 1bpp layers.
- PaletteContext — Context for palette selection in dual palette mode.
- PaletteType — Selects which built-in 16-color palette the renderer resolves against.
- Particle — Represents a single particle in the particle system.
- ParticleConfig — Configuration parameters for a particle emitter.
- ParticleEmitter — Manages a pool of particles to create visual effects.
- Renderer — High-level graphics rendering system.
- ResolutionPreset — Logical resolution choices for memory-constrained targets.
- ResolutionPresets — Factory for creating DisplayConfig from resolution presets.
- ScreenBounds — Half-open screen-space bounding box accumulated across one or more
expandProjectedMapBoundscalls. - ScrollBehavior — Defines how scrolling behaves in layouts.
- Sprite — Compact sprite descriptor for monochrome bitmapped sprites.
- Sprite2bpp — Sprite descriptor for 2bpp (4-color) multi-color sprites.
- Sprite4bpp — Sprite descriptor for 4bpp (16-color) multi-color sprites.
- SpriteAnimation — Lightweight, step-based sprite animation controller.
- SpriteAnimationFrame — Single animation frame that can reference either a Sprite or a MultiSprite.
- SpriteLayer — Single monochrome layer used by layered sprites.
- StaticLayerSnapshot — Framebuffer cache for static layers a game draws ITSELF.
- StaticTilemapLayerCache — Centralized framebuffer snapshot for static 4bpp tilemap layers.
- TextLayout — Wrap/measure over FontManager. Stateless, allocation-free, no Renderer.
- TileAnimation — Single tile animation definition (compile-time constant).
- TileAnimationManager — Manages tile animations for a tilemap.
- TileAttribute — Single attribute key-value pair for tile metadata.
- TileAttributeEntry — All attributes for a single tile at a specific position.
- TileMap4bppDrawSpec — One drawable 4bpp tilemap layer with an origin in logical coordinates.
- TileMapGeneric — Generic tilemap structure supporting 1bpp, 2bpp, or 4bpp tile graphics.
- TilemapSpriteDirtyMode — Suppress per-sprite dirty marks while drawing tilemaps (static layer or selective animated marking).
- TouchConfig — Configuration for a touch controller (XPT2046 or GT911).
- TouchController — Supported touch controller types.
- TransitionConfig — Full per-call description of a scene transition (issue #240).
- TransitionDirection — Direction of the transition effect.
- TransitionEffect — Manages a single scene transition with zero runtime allocation.
- TransitionType — Types of scene transitions.
- TweenEasing — Easing curves for camera tween interpolation.
- UIAnchorLayout — Layout that positions elements at fixed anchor points on the screen.
- UIButton — A clickable button UI element.
- UICheckBox — A clickable checkbox UI element.
- UIElement — Base class for all user interface elements (buttons, labels, etc.).
- UIGridLayout — Grid layout container for organizing elements in a matrix.
- UIHitTest — AABB hit testing for touch UI widgets
- UIHorizontalLayout — Horizontal layout container with scroll support.
- UILabel — A simple text label UI element.
- UILayout — Base class for UI layout containers.
- UIManager — Registry of touch UI elements for event routing (non-owning pointers).
- UIPaddingContainer — Container that wraps a single UI element and applies padding.
- UIPanel — Visual container that draws a background and border around a child element.
- UISprite — A UI leaf that draws a single sprite.
- UISpriteFormat — Which member of a UISpriteRef's storage is live.
- UISpriteRef — Non-owning, format-tagged pointer to one sprite plus its draw parameters.
- UISpriteRow — A UI leaf that draws a row of repeated icons whose fill is driven by one value — hearts, lives, keys, ammo.
- UITouchButton — Touch-optimized button widget.
- UITouchCheckbox — Touch-optimized checkbox widget.
- UITouchElement — UIElement with embedded UITouchWidget data for touch interaction.
- UITouchSlider — Touch-optimized slider widget.
- UITouchWidget — Base touch widget structure
- UIVerticalLayout — Vertical layout container with scroll support.
- UIWidgetFlags — Flags for widget behavior
- UIWidgetState — Current state of a touch widget
- UIWidgetType — Types of touch UI widgets
- WipeDirection — Corner-to-corner directions for DiagonalWipe transitions.
Input
- ActorPool — Fixed-size pool for managing draggable actors
- ActorTouchController — Handles touch-based dragging of game actors
- DisplayPreset — Display presets for common displays
- GT911Adapter — GT911 I2C touch controller driver
- InputConfig — Configuration structure for the InputManager.
- InputManager — Handles input from physical buttons, keyboard (on PC), and touch/mouse.
- TouchAdapter — Base class requirements for touch adapters (conceptual)
- TouchCalibration — Calibration parameters for coordinate transformation
- TouchController — Touch controller types
- TouchEvent — Compact touch event structure (12 bytes total, naturally aligned)
- TouchEventDispatcher — Pull-based touch event dispatcher
- TouchEventFlags — Flags for touch events
- TouchEventHistory — Ring buffer for touch events (for gesture detection)
- TouchEventQueue — Ring buffer for touch events (192 bytes total)
- TouchEventType — High-level touch event types for gesture detection
- TouchFactory — Factory for creating touch system configurations
- TouchManager — Touch event aggregation layer
- TouchPoint — Normalized touch data structure.
- TouchPointBuffer — Ring buffer for storing touch points
- TouchRotation — Display rotation modes for calibration
- TouchState — Internal states for touch gesture detection
- TouchStateData — Per-touch-ID state tracking
- TouchStateMachine — State machine for touch gesture detection
- XPT2046Adapter — XPT2046 SPI touch controller driver
Math
- CellRange — Half-open cell-space window
[startCol, endCol) x [startRow, endRow)covering a screen rectangle, under a given ProjectionSpec. - Fixed16 — Fixed-point 16.16 number implementation optimized for RISC-V.
- ProjectionSpec — Plain six-
intaggregate: the screen anchor of cell (0, 0) plus the two screen-space axis vectors of the cell grid. - Random — Instance-based random number generator
- Vector2 — 2D vector using the configured Scalar type (float or Fixed16).
Networking
- NetAddress — Fixed-size peer address, trivially copyable and free of constructors.
- NetCounter — Convergent signed accumulator replicated as idempotent operations.
- NetDelivery — Delivery contract requested for one outgoing message.
- NetEvent — One fixed-capacity event queued for the application.
- NetEventType — Kind of event drained from the session's receive queue.
- NetPacketHeader — Decoded, host-order view of the 16-byte wire header.
- NetPacketType — Discriminator carried in the header.
- NetParseResult — Outcome of decoding a frame.
- NetPeerConfig — One peer registration handed to the transport.
- NetPeerInfo — Snapshot of one peer table slot, copied out on query.
- NetResult — Every fallible networking entry point returns one of these.
- NetRxInfo — One received frame together with its source address.
- NetSession — Fixed-capacity networking session: discovery, reliability and lifecycle.
- NetSessionConfig — Values the application supplies once, when the session starts.
- NetStats — Monotonic traffic counters owned by the session.
- NetTransport — Abstract frame-level transport used by the networking session.
- NetTransportConfig — Per-transport initialization values.
- NetTxResult — Outcome of one accepted send, reported asynchronously.
- PeerSlot — One fixed peer table row.
- PendingTx — One reliable frame waiting for its ACK.
- Slot — One node's accumulated contribution to the shared value.
Persistence
- IKeyValueStore — Storage model for small named values: typed integers and blobs.
- ISlotStore — Storage model for a fixed number of numbered records (save slots).
- MemoryKeyValueStore — IKeyValueStore over a fixed in-RAM table; for tests and volatile use.
- MemorySlotStore — ISlotStore over fixed in-RAM records; for tests and volatile use.
- NullKeyValueStore — IKeyValueStore that is never available.
- NullSlotStore — ISlotStore that is never available.
- PersistenceService — Thin role registry: a settings key-value store and a saves slot store.
- RecordCodec — Wraps a game payload in a self-checking envelope.
- RecordInfo — Header fields reported by RecordCodec::decode().
- StoreResult — Outcome of every persistence operation.
Physics
- Circle — Represents a 2D circle for collision detection.
- CollisionSystem — Manages physics simulation and collision detection for all actors.
- Contact — Represents a contact point between two physics bodies.
- KinematicActor — A physics body moved via script/manual velocity with collision detection.
- KinematicCollision — Contains information about a collision involving a KinematicActor.
- PhysicsScheduler — Fixed-timestep accumulator that decouples physics from frame rate.
- RigidActor — A physics body fully simulated by the engine.
- Segment — Represents a 2D line segment for collision detection.
- SensorActor — A static body that acts as a trigger: detects overlap but produces no physical response.
- SnapPolicy — Controls floor snap behavior after slide resolution.
- SpatialGrid — Optimized spatial partitioning with separate static/dynamic layers.
- StaticActor — A physics body that does not move.
- TileBehaviorLayer — Runtime representation of exported behavior layer for O(1) flag lookup.
- TileCollisionBehavior — Defines how a tile collider behaves in the physics system.
- TileCollisionBuilder — Helper class for creating physics bodies from exported behavior layers.
- TileCollisionBuilderConfig — Configuration for tile collision building.
- TileConsumptionConfig — Configuration for tile consumption operations.
- TileConsumptionHelper — Helper class for consuming tiles (removing bodies and updating visuals).
- TileFlags — Bit flags for tile behavior attributes (8-bit, 1 byte per tile). Optimized for ESP32 runtime with bit operations only.
Platforms
- MockAudioBackend — Mock implementation of AudioBackend for unit testing.
- PlatformCapabilities — Represents the hardware capabilities of the current platform.
- SPIClass — Mocks the Arduino SPI class for native platform.
Test
- PhysicsSnapshot — Captures physics state for determinism validation
- PhysicsTestSuite — Comprehensive testing for Flat Solver
- StressTestScene — Scene for stress testing physics performance.
