summaryrefslogtreecommitdiff
path: root/doc/api.texi
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-09-21 20:08:17 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-09-21 20:34:43 -0400
commitc2373a75d763ed6f2d1c684564dc2ad2348bdc79 (patch)
treeb0df1319daa0fc37d3f75be026c896e65686c28f /doc/api.texi
parentb9fa5959cbd7ad512566029b202d00a443ea3f15 (diff)
game-loop: Add init argument to run-game*.
Diffstat (limited to 'doc/api.texi')
-rw-r--r--doc/api.texi5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/api.texi b/doc/api.texi
index 3946ecd..63b3d9d 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -332,7 +332,7 @@ make a terminal roguelike game instead? Chickadee doesn't come with a
terminal rendering engine, but the developer could write one without
having to write their own core game loop.
-@deffn {Procedure} run-game* [#:update] [#:render] [#:time] [#:error] @
+@deffn {Procedure} run-game* [#:init] [#:update] [#:render] [#:time] [#:error] @
[#:update-hz 60]
Start the game loop. This procedure will not return until
@@ -343,6 +343,9 @@ to operate:
@itemize
@item
+@var{init}: Called just before game loop is started. Use it to
+perform game initialization.
+@item
@var{update}: Called @var{update-hz} times per second to advance the
game simulation. This procedure is called with a single argument: The
amount of time that has passed since the last update, in milliseconds.