From a84998293913225dfdd06b5c0ff3c034c5d4a2f1 Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Fri, 1 Jul 2022 11:01:45 -0500 Subject: [PATCH] Update GTESetBG0Origin, GTERender, GTELoadTileSet, GTECreateSpriteStamp, GTEAddSprite, GTEMoveSprite, GTEUpdateSprite, and GTERemoveSprite docs --- docs/toolboxref.html | 197 ++++++++++++++++++++++++++++++++----------- 1 file changed, 146 insertions(+), 51 deletions(-) diff --git a/docs/toolboxref.html b/docs/toolboxref.html index b90e3b8..6d03460 100644 --- a/docs/toolboxref.html +++ b/docs/toolboxref.html @@ -1014,8 +1014,8 @@ style: toolref
C

extern pascal void GTESetTile(x, y, tileID)

-

Word width;

-

Word height;

+

Word x;

+

Word y;

Word tileID;

@@ -1051,7 +1051,10 @@ style: toolref

$0CXX

GTESetBG0Origin

-

+

+ Sets the coordinate of the upper-left corner of the playfield within the primary background buffer. The coordiate values + are unsigned, so transitioning from 0 to -1 will result in a discontinuous jump in the background position. +

Parameters
@@ -1067,6 +1070,18 @@ style: toolref + + + xpos + + + + + + ypos + + + @@ -1101,69 +1116,43 @@ style: toolref
C
+

extern pascal void GTESetBG0Origin(x, y)

+

Word x;

+

Word y;

$0DXX

GTERender

-

+

Renders the current playfield to the graphics screen.

Parameters
-
previous contents
Word—Unsigned horizontal position
Word—Unsigned vertical position
- - - - - - - - - - - - - - - - - - -
Stack before call
previous contents
SP
- - - - - - - - - - - - - - - - - - - - -
Stack after call
previous contents
SP
+

+ The stack is not affected by this call. There are no input or output parameters. +

Errors
C
+

extern pascal void GTERender()

$0EXX

GTELoadTileSet

-

+

+ Loads a tileset into the internal GTE memory buffer. The pointer must point to + tiles that are already in GTE tile format. +

+

+ A tile set is an array of (up to) 512 tile definitions and each tile definition is 128 bytes. The tile definition + is comprised of four, 32-byte tiles; a normal tile, its mask, a horizontally flipped versio of the tile and its mask. + The first 128 bytes of a tileset must be set to zero. +

Parameters
@@ -1179,6 +1168,11 @@ style: toolref + + + + + @@ -1213,13 +1207,20 @@ style: toolref
C
+

extern pascal void GTELoadTileSet(tileSetPtr)

+

Pointer tileSetPtr;

$0FXX

GTECreateSpriteStamp

-

+

+ Creates a sprite stamp (cache sprite pixel data copy) from a sprite identifier and the current + tile set. The vBuffAddr points to a location in the internal virtual buffer area. In + most cases, an address for a sprite can be calculated from the VBUFF_SPRITE_START and + VBUFF_SPRITE_STEP constants as ADDR(n) = VBUFF_SPRITE_START + n*VBUFF_SPRITE_STEP. +

Parameters
previous contents
tileSetPtrLongpointer to the tile set data.
@@ -1235,6 +1236,16 @@ style: toolref + + + + + + + + + + @@ -1269,13 +1280,23 @@ style: toolref
C
+

extern pascal void GTECreateSpriteStamp(spriteID, vBuffAddr)

+

Word spriteID;

+

Word vBuffAddr;

$10XX

GTEAddSprite

-

+

+ Adds a new sprite to the current scene. If a sprite is already assigned to the sprite slot, then + that sprite is removed and replaced with the new sprite. +

+

+ A sprite can have negative coordinates and be placed off-screen. A sprite's coordinates are local + coordinates on the playfield; a sprite will not move automatically when GTESetBG0Origin is changed. +

Parameters
previous contents
spriteIDWord—sprite descriptor word
vBuffAddrWord—Location in the sprite vitual buffer to allocate the stamp.
@@ -1291,6 +1312,26 @@ style: toolref + + + + + + + + + + + + + + + + + + + + @@ -1325,13 +1366,18 @@ style: toolref
C
+

extern pascal void GTEAddSprite(spriteSlot, x, y, vBuffAddr)

+

Word spriteSlot;

+

Word x;

+

Word y;

+

Word vBuffAddr;

$11XX

GTEMoveSprite

-

+

Repositions a sprite on the play field.

Parameters
previous contents
spriteSlotWord—Sprite slot assigned to this new sprite.
xWord—Signed horizontal sprite position on the playfield.
yWord—Signed vertical sprite position on the playfield.
vBuffAddrWord—Address of the stamp to use for this sprite. A stamp can be shared by multiple sprites.
@@ -1347,6 +1393,21 @@ style: toolref + + + + + + + + + + + + + + + @@ -1381,13 +1442,21 @@ style: toolref
C
+

extern pascal void GTEMoveSprite(spriteSlot, x, y)

+

Word spriteSlot;

+

Word x;

+

Word y;

$12XX

GTEUpdateSprite

-

+

+ Changes the stamp or the status flags of a sprite. The size of the sprite cannot be changed. + Typically, an application will call GTEUpdateSprite immediately after GTEAddSprite to + set all of th desired sprite properties. +

Parameters
previous contents
spriteSlotWord—Slot where the target sprite is located.
xWord—New horizontal position.
yWord—New vertical position
@@ -1403,6 +1472,21 @@ style: toolref + + + + + + + + + + + + + + + @@ -1437,13 +1521,17 @@ style: toolref
C
+

extern pascal void GTEUpdateSprite(spriteSlot, spriteFlags, vBuffAddr)

+

Word spriteSlot;

+

Word spriteFlags;

+

Word vBuffAddr;

$13XX

GTERemoveSprite

-

+

Removes a sprite from the play field.

Parameters
previous contents
spriteSlotWord—Sprite slot of the target sprite to update.
spriteFlagsWord—A new set of sprite flags.
vBuffAddrWord—Sprite stamp virtual buffer address.
@@ -1459,6 +1547,11 @@ style: toolref + + + + + @@ -1493,6 +1586,8 @@ style: toolref
C
+

extern pascal void GTERemoveSprite(spriteSlot)

+

Word spriteSlot;

previous contents
spriteSlotWord—Sprite slot of the target sprite to update.