From f0e75f25b5ce65c970ac125e6cdbc7034ad04c28 Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Mon, 4 Jul 2022 20:52:28 -0500 Subject: [PATCH] Add initial documentation for all remaining stable toolbox calls --- docs/toolboxref.html | 107 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 99 insertions(+), 8 deletions(-) diff --git a/docs/toolboxref.html b/docs/toolboxref.html index 731fc90..36f37d1 100644 --- a/docs/toolboxref.html +++ b/docs/toolboxref.html @@ -2341,7 +2341,10 @@ style: toolref

$1DXX

GTESetBG0TileMapInfo

-

+

+ Sets a tile map that will be used to automatically populate the primary background layer based on the current origin. Behavior is + undefined if the origin is set to a value that is outside the bounds of the tilemap. +

Parameters
@@ -2357,6 +2360,21 @@ style: toolref + + + + + + + + + + + + + + + @@ -2391,13 +2409,20 @@ style: toolref
C
+

extern pascal void GTESetBG0TileMapInfo(width, height, tileMapPtr)

+

Word width;

+

Word height;

+

Pointer tileMapPtr;

$1EXX

GTESetBG1TileMapInfo

-

+

+ Sets a tile map that will be used to automatically populate the secondary background layer based on the current origin. Behavior is + undefined if the origin is set to a value that is outside the bounds of the tilemap. +

Parameters
previous contents
widthWord—Width of the tilemap in tiles.
heightWord—Height of the tilemap in tiles.
tileMapPtrLongpointer to the tile map
@@ -2413,6 +2438,21 @@ style: toolref + + + + + + + + + + + + + + + @@ -2447,13 +2487,28 @@ style: toolref
C
+

extern pascal void GTESetBG1TileMapInfo(width, height, tileMapPtr)

+

Word width;

+

Word height;

+

Pointer tileMapPtr;

$1FXX

GTEAddTimer

-

+

+ Adds a timer with a callback function and a delay in VBL ticks. Timers may be repeated or one-shot timers. A one-shot + timer will remove itself after firing. Timers are handled on a best-effort basis. It is possible that a timer + callback could be invoked multiple times in a single frame and the callback functions should account for this possibility. +

+

+ The intended use for timers is to provide a way to perform animations and game physics at a consistent rate, + regardless of the speed of the machine. If a timer has not been invoked for over one second, then it will + not fire multiple times, but treat the current timestamp as its starting point. This is to avoid a + "callback storm" if timers are added then a long period of time elapses. It is recommended that timers be + removed if they are not expected to be fired on a regular basis. +

Parameters
previous contents
widthWord—Width of the tilemap in tiles.
heightWord—Height of the tilemap in tiles.
tileMapPtrLongpointer to the tile map
@@ -2469,6 +2524,26 @@ style: toolref + + + + + + + + + + + + + + + + + + + + @@ -2490,6 +2565,11 @@ style: toolref + + + + + @@ -2503,13 +2583,17 @@ style: toolref
C
+

extern pascal Word GTEAddTimer(numTicks, callback, flags)

+

Word numticks;

+

Pointer callback;

+

Word flags;

$20XX

GTERemoveTimer

-

+

Removed a timer that had been added to the system.

Parameters
previous contents
wordspaceWord—Space for result.
numTicksWord—Number of VBL ticks to wait before firing.
callbackLong—A pointer to a user function.
flagsWord—The only valid values are $0001 for a one-shot timer or $0000 for a timer that resets.
previous contents
timerIDWord—An opaque identifier of the timer. This value must be passed to the GTERemoveTimer() function.
@@ -2525,6 +2609,11 @@ style: toolref + + + + + @@ -2559,13 +2648,15 @@ style: toolref
C
+

extern pascal Word GTERemoveTimer(timerID)

+

Word timerID;

$21XX

GTEStartScript

-

+

This API is under active development at this time.

Parameters
previous contents
timerIDWord—ID of the timer.
@@ -2621,7 +2712,7 @@ style: toolref

$22XX

GTESetOverlay

-

+

This API is under active development at this time.

Parameters
@@ -2677,7 +2768,7 @@ style: toolref

$23XX

GTEClearOverlay

-

+

This API is under active development at this time.

Parameters
@@ -2733,7 +2824,7 @@ style: toolref

$24XX

GTEGetTileDataAddr

-

+

This API is under active development at this time.

Parameters