RSDKv3 Functions¶
3D¶
Function | Description |
---|---|
Draw3DScene | Draws the active 3DScene data to the screen. |
SetIdentityMatrix | Sets the matrix of MatID to the identity state. |
MatrixMultiply | Multiplies MatrixA by MatrixB . |
MatrixTranslateXYZ | Translates Matrix to TranslateX , TranslateY and TranslateZ . |
MatrixScaleXYZ | Scales Matrix to ScaleX , ScaleY and ScaleZ . |
MatrixRotate | Rotates Matrix to Angle on the specified axis. |
MatrixRotateXYZ | Rotates Matrix to AngleX , AngleY and AngleZ . |
TransformVertices | Transform all vertices from StartIndex to EndIndex using Matrix . |
Audio¶
Function | Description |
---|---|
SetMusicTrack | Loads a music file in the given track slot with the given loop point. |
PlayMusic | Plays the music currently loaded in the given track slot. |
StopMusic | Stops playing the currently playing music track, if one is playing. |
PauseMusic | Pauses the currently playing music track, if one is playing. |
ResumeMusic | If a track has been paused with PauseMusic(), resumes playing the track. |
PlaySfx | Plays the sound effect in the given slot in the GameConfig, looping it if set to do so. |
StopSfx | Stops all instances of the given sound effect slot in the GameConfig playing. |
SetSfxAttributes | Sets the loop count and panning of the given sound effect slot in the GameConfig to the given values. |
PlayStageSfx | Plays the sound effect in the given slot in the StageConfig, looping it if set to do so. |
StopStageSfx | Stops all instances of the given sound effect slot in the StageConfig playing. |
Drawing¶
Function | Description |
---|---|
DrawTintRect | Draws a tinted rectangle to iXPos and iYPos in screen-space. |
LoadPalette | Loads a palette into PalBank starting from StartPalIndex , with an offset of StartIndex and reading all colors through to EndIndex . |
RotatePalette | Rotates all colors in PalBank from StartIndex to EndIndex , moving left or right depending on RotRight . |
SetScreenFade | Adds a screen fade effect based on the R , G , B and Alpha values. |
SetActivePalette | Sets the active palette to PalBank for all vertical screen lines from StartLine to EndLine . |
SetPaletteFade | Blends the currectly active palette from StartIndex to EndIndex based on R , G , B , and BlendAmount , and stores the new palette in DstBank . |
CopyPalette | Copies SrcPal into DstPal . |
ClearScreen | Clears all pixels on screen with color ClearIndex from the active palette. |
DrawRect | Draws a rectangle to iXPos and iYPos in screen-space, with a color based on the R , G , B , and Alpha . |
ClearDrawList | Removes all entries in drawList Layer . |
AddDrawListEntityRef | Adds ObjectPos to drawList Layer . |
GetDrawListEntityRef | Gets ObjectPos in drawList Layer and stores it in Store . |
SetDrawListEntityRef | Sets ObjectPos in drawList Layer to Value . |
Graphics¶
Function | Description |
---|---|
LoadSpriteSheet | Loads a spritesheet and assigns the ID to Object.SpriteSheet . |
RemoveSpriteSheet | Removes the given spritesheet from memory, if it is already loaded. |
DrawSprite | Draws Frame at the object's X and Y position. |
DrawSpriteXY | Draws Frame at a specified X and Y position. |
DrawSpriteScreenXY | Draws Frame at a specified X and Y position in screen-space. |
SpriteFrame | Adds a SpriteFrame with the specified values. |
EditFrame | Edits the pivots, width, height, and sheet coordinates of Frame . |
DrawSpriteFX | Draws Frame at a specified X and Y position with visual effects. |
DrawSpriteScreenFX | Draws Frame at a specified X and Y position in screen-space with visual effects. |
LoadAnimation | Loads an animation file for the current object type. |
ProcessAnimation | Processes the current object's animation, based on the animation file loaded prior via LoadAnimation(). |
DrawObjectAnimation | Draws an object's sprites from the animation file loaded prior via LoadAnimation(). |
DrawPlayerAnimation | Draws the player's sprites from the animation file loaded prior via LoadAnimation(). |
Math¶
Function | Description |
---|---|
Rand | Gets a random value from 0 to Max (not inclusive) and stores it in Store . |
Sin | Gets the value from the sin512 lookup table based on Angle and sets it in Store . |
Cos | Gets the value from the cos512 lookup table based on Angle and sets it in Store . |
Sin256 | Gets the value from the sin256 lookup table based on Angle and sets it in Store . |
Cos256 | Gets the value from the cos256 lookup table based on Angle and sets it in Store . |
ATan2 | Performs an arctan operation using X and Y , storing the result in Store . |
Interpolate | Linearly interpolates X and Y by Percent and stores the result in Store . |
InterpolateXY | Linearly interpolates two points at once and stores the result in StoreX and StoreY respectively. |
Not | Performs a NOT operation on Value . |
GetBit | Gets the binary bit at index BitPos from Value and stores it in Store . |
SetBit | Sets index BitPos of Value to Bit and updates Value accordingly. |
Object¶
Function | Description |
---|---|
ResetObjectEntity | Resets an object in position Slot to the Type , PropertyValue , XPos , and YPos specified. |
CreateTempObject | Creates a temporary object specified by Type , PropertyValue , XPos and YPos near the end of the object list. |
PlayerObjectCollision | Checks for collision of an object with the player, using the hitbox values passed. |
ProcessPlayerControl | Handles player input variables and sidekick input buffering. |
ObjectTileCollision | Tries to collide with the foreground layer based on the position of Object.iXPos + xOffset , Object.iYPos + yOffset . |
ObjectTileGrip | Tries to collide with the foreground layer based on the position of Object.iXPos + xOffset , Object.iYPos + yOffset . |
PlayerTileCollision | Handles tile collision of the player. |
BindPlayerToObject | Binds a Player set to ListPos in the player list to entity slot number EntityNo . |
Stages¶
Function | Description |
---|---|
LoadStage | Loads a stage based on Stage.ActiveList and Stage.ListPos . |
SetLayerDeformation | Sets the deformation data array of DeformID , based on DeformA and DeformB . |
GetTileLayerEntry | Gets the ID of the chunk at ChunkX , ChunkY in tile layer Layer and stores it in Store . |
SetTileLayerEntry | Sets the chunk at ChunkX , ChunkY in tile layer Layer to the index of Value . |
Get16x16TileInfo | Gets the value for InfoTile from the tile at TileX , TileY and stores it in Store . |
Set16x16TileInfo | Sets the value for InfoType from the tile at TileX , TileY to Value . |
Copy16x16Tile | Copies the tileset image data of SrcTile to DstTile . |
Miscellaneous¶
Function | Description |
---|---|
DrawMenu | Draws Menu at XPos and YPos relative to the screen. |
SetupMenu | Sets up Menu with RowCount rows, SelectionCount active selections and aligning set to Alignment . |
AddMenuEntry | Adds an entry to Menu with the contents of Text . |
EditMenuEntry | Edits an entry of Menu with the contents of Text in RowID . |
LoadVideo | Loads and plays a video. |
NextVideoFrame | Advances the video frame of an RSV video. |
CheckTouchRect | Checks if there's a touch input between the given coordinates. |
ReadSaveRAM | Reads the contents of the save file on disk into SaveRAM. |
WriteSaveRAM | Writes the contents of SaveRAM to the save file on disk. |
LoadTextFont | Loads a bitmap font from FilePath for use with text menus. |
LoadTextFile | Loads Menu based on the text file loaded from FilePath . |
DrawText | Draws the contents of menu . |
GetTextInfo | Gets the data of Type from Menu using Index and stores it in Store . |
GetVersionNumber | Adds a text entry to Menu with the engine's version as the text. |
SetAchievement | Sets the status of the given achievement. |
SetLeaderboard | Submits the given score to the given leaderboard. |
LoadOnlineMenu | Loads the data for the specified online menu. |
EngineCallback | Sends a callback to the engine. |