diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-05 23:44:12 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-05 23:44:12 +0100 |
| commit | 300131ca5a19d9de5250579d944a52b067b2d60b (patch) | |
| tree | bed560ea0f5f252e3f40576a14e2a7f19bb35662 /docs/api.org | |
| parent | b99ada53b715def5492c7d04c0d327fa7048e5d3 (diff) | |
Rename prefix from downstroke/ to downstroke-
Diffstat (limited to 'docs/api.org')
| -rw-r--r-- | docs/api.org | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/docs/api.org b/docs/api.org index 0a443d6..3925bc2 100644 --- a/docs/api.org +++ b/docs/api.org @@ -2,10 +2,10 @@ This document describes the public API for the Downstroke game engine. All exported functions are organized by module. -* Engine (~downstroke/engine~) +* Engine (~downstroke-engine~) #+begin_src scheme -(import downstroke/engine) +(import downstroke-engine) #+end_src The engine module provides the top-level game lifecycle and state management. @@ -135,10 +135,10 @@ Transitions to a named state, activating its lifecycle hooks. Calls the state's (game-start-state! my-game 'paused) #+end_src -* World (~downstroke/world~) +* World (~downstroke-world~) #+begin_src scheme -(import downstroke/world) +(import downstroke-world) #+end_src The world module provides the scene (level) abstraction and camera management. @@ -268,10 +268,10 @@ Returns a list of all entities whose ~#:tags~ list contains the given tag. Retur - ~scene-camera~, ~scene-camera-set!~ - ~scene-tileset-texture~, ~scene-tileset-texture-set!~ -* Entity (~downstroke/entity~) +* Entity (~downstroke-entity~) #+begin_src scheme -(import downstroke/entity) +(import downstroke-entity) #+end_src The entity module provides property list (plist) accessors for game objects. Entities are immutable plists, never modified in place. @@ -354,10 +354,10 @@ All entities can have these keys. Not all are required: | ~#:anim-frame~ | integer | Current frame index | | ~#:anim-tick~ | integer | Ticks in current frame | -* Physics (~downstroke/physics~) +* Physics (~downstroke-physics~) #+begin_src scheme -(import downstroke/physics) +(import downstroke-physics) #+end_src The physics module implements the main collision and movement pipeline. The physics pipeline runs automatically before the user's ~update:~ hook. @@ -469,10 +469,10 @@ Applies ~resolve-entity-collisions~ to the scene's entity list. Returns the modi - ~*gravity*~ = 1 (pixels per frame per frame) - ~*jump-force*~ = 15 (vertical acceleration on jump) -* Input (~downstroke/input~) +* Input (~downstroke-input~) #+begin_src scheme -(import downstroke/input) +(import downstroke-input) #+end_src The input module handles keyboard, joystick, and game controller events. It maintains the current and previous input state to support pressed/released detection. @@ -536,10 +536,10 @@ Initializes an input state record from a configuration. All actions start as unp player))) #+end_src -* Renderer (~downstroke/renderer~) +* Renderer (~downstroke-renderer~) #+begin_src scheme -(import downstroke/renderer) +(import downstroke-renderer) #+end_src The renderer module provides SDL2 drawing abstractions. @@ -584,10 +584,10 @@ Returns an SDL2 flip list based on the entity's ~#:facing~ field. Returns ~'(hor Renders a single line of text to the screen at the given pixel coordinates. ~color~ is an SDL2 color struct. Positions are in screen (viewport) space, not world space. Does not cache; call once per frame for each text element. -* Assets (~downstroke/assets~) +* Assets (~downstroke-assets~) #+begin_src scheme -(import downstroke/assets) +(import downstroke-assets) #+end_src The assets module provides a simple registry for game resources. @@ -629,10 +629,10 @@ Retrieves a value from the registry by key. Returns ~#f~ if not found. (sdl2:make-color 255 255 255) 10 10))) #+end_src -* Sound (~downstroke/sound~) +* Sound (~downstroke-sound~) #+begin_src scheme -(import downstroke/sound) +(import downstroke-sound) #+end_src The sound module provides music and sound effect playback via SDL_mixer. @@ -708,10 +708,10 @@ Changes the music volume while it is playing. ~volume~ is 0.0 to 1.0. Releases all audio resources. Call at shutdown or in a cleanup hook. -* Animation (~downstroke/animation~) +* Animation (~downstroke-animation~) #+begin_src scheme -(import downstroke/animation) +(import downstroke-animation) #+end_src The animation module provides simple frame-based sprite animation. @@ -753,10 +753,10 @@ Example: Converts a frame index to a tile ID (1-indexed). Used internally by ~animate-entity~. -* Scene Loader (~downstroke/scene-loader~) +* Scene Loader (~downstroke-scene-loader~) #+begin_src scheme -(import downstroke/scene-loader) +(import downstroke-scene-loader) #+end_src The scene-loader module provides utilities for loading Tiled maps and instantiating entities from prefabs. |
