Last Modified: 11/15/2026
Transforms the graphic data loaded into the graphic buffer from the sbLoadGfxBuffer command using a trasnformation map generated by SecondBASIC Studio.
| Name | Type | Required | Description |
| TxfmTableAddress | Long Integer | Yes | The address of the transformation tables to apply to the graphics. |
| Frame | Integer | Yes | The frame of the transformation you want to tranform to. |
| Size | Integer | Yes | The size of the sprite. Valid values are 1, 2, 3, and 4. |
| Type | Integer | Yes | Tells the routine if it's a background or sprite source. 0 is for background, 1 is for sprites. |
| UserBufferAddress | Long Integer | Yes | The address of the variable you want to store the transformation data into. This is any long variable you want to use. |
| Syntax: sbTransformation <TxfmTableAddress>, <Frame>, <Size>, <Type>, <UserBufferAddress> |
|
Option UseSBGfxLib Global sbGfxBuffer&(511) As Long, sbVRAMBuffer&(511) As Long, sbBuffer&(511) As Long TxfmTbl& = LblPtr&(MyTxfm) sbLoadGfxBuffer LblPtr&(MyGfx), 4, 1 sbTransform TxfmTbl&, Frame, 4, 0, VarPtr&(myBuffer&) LoadTiles myBuffer&, 16, 256 MyGfx: DataFile "c:\SecondBASIC\MyGfx.bny", Bin MyTxfm: DataFile "c:\SecondBASIC\MyTransformation.txm", Bin |
The size of the graphics must be square (i.e., 1x1, 2x2, 3x3, or 4x4 tiles). This will be expanded upon in the future.
Currently only 4x4 sprites can be loaded into the graphic buffer. This will be expanded upon in the next update.