Skip to content

API Reference (Generated) ​

Auto-generated API documentation from C++ header files.

The apu module documents PixelRoot32-APU 2.0.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.
  • 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.
  • 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.
  • SfxBreakpoint — Timed automation point for SFX duty steps or pitch envelope.
  • 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 playSfxBank sequence 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 ​

Gameplay ​

  • 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-int aggregate: logical cell, target cell, progress.
  • GridSpec — Plain six-int aggregate describing a grid's origin, per-axis cell size, and extent (columns/rows). No member functions, no per-instance runtime state beyond these fields — a constexpr GridSpec costs 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).
  • 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, const state 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.
  • 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 expandProjectedMapBounds calls.
  • 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.
  • 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.
  • 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 ​

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-int aggregate: 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).

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 ​

Released under the MIT License.