Skip to main content

Crate repame_shell

Crate repame_shell 

Source
Expand description

App wiring: Repose platform runners + sim/gamepad helpers.

A game provides a root view; ShellHooks is the game-side per-frame contract (snapshot production + variable-rate hook) that the game’s own root closure drives. The run_* runners below are thin mounts only: they do not call ShellHooks or step the sim — stepping stays game-side via Sim::step (see the rozvp pilot runner for the reference wiring). Per-game UI stays in the game crate as Repose views.

Structs§

Camera2d
2D orthographic camera. Owned by the UI (signals), copied into the snapshot per frame.
FrameInput
Everything the viewport draws this frame. Plain data, snapshot per frame.
GamepadId
Opaque gamepad handle. Backend-local index, stable for the connection lifetime. Survives across frames; invalid after GamepadEvent::Disconnected.
GamepadPoller
Gamepad polling unified on the shared repose-platform backend: one button layout, one deadzone, one mapping policy for repose apps and repame games alike. Events feed straight into ReposeRuntime::handle_gamepad (UI nav) and rt.gamepads (gameplay).
Sim
Fixed-timestep simulation state.
SimTime
Sim time resource, advanced once per fixed step.
SpriteInstance
One batched sprite. uv is in atlas texels normalized to 0..1.

Enums§

GamepadEvent
PickEvent
UI-facing pointer events from the viewport.

Traits§

ShellHooks
Per-frame hooks the game implements. Snapshot production (frame_input) is the only required render coupling: plain data out, no renderer types.

Functions§

run_desktop
Desktop entry point. Mounts root on the repose-platform runner with the given window title/size. The root closure owns stepping (sim, rigs) and must call request_frame() for continuous frames; see the rozvp pilot runner for the reference wiring.