-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more v5 function pages + misc fixes
- Loading branch information
Showing
20 changed files
with
350 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# HasNotifyCallback | ||
|
||
!!! note | ||
This function only exists in Sonic Origins. | ||
|
||
## Description | ||
Checks if the game has access to [NotifyCallback()](NotifyCallback.md). | ||
|
||
## Parameters | ||
None. | ||
|
||
## Return Value | ||
Returns `true` if [NotifyCallback()](NotifyCallback.md) exists and is accessible, or `false` if not. | ||
|
||
## Syntax | ||
``` c++ | ||
HasNotifyCallback(); | ||
``` | ||
|
||
## Example | ||
``` c++ | ||
if (HasNotifyCallback()) { /* do stuff */ } | ||
``` | ||
!!! note | ||
This is a macro, which is designed to make programming in RSDK easier. The underlying logic is: | ||
``` c++ | ||
RSDKTable->NotifyCallback != NULL | ||
``` | ||
The underlying logic should NEVER be used as it's less safe than the macro. This note is here for anyone wishing to learn about the internals or hoping to develop a wrapper for another language that doesn't support macros. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SetGameFinished | ||
|
||
!!! note | ||
This function only exists in Sonic Origins. | ||
|
||
## Description | ||
Notifies the engine that the game has been finished. | ||
|
||
## Parameters | ||
None. | ||
|
||
## Return Value | ||
Sets `SceneInfo->state` to `ENGINESTATE_GAME_FINISHED`. | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.SetGameFinished(); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
RSDKTable->SetGameFinished(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# FindObject | ||
|
||
## Description | ||
Finds a loaded object by name and retrieves its ID. | ||
|
||
## Parameters | ||
`name` | ||
|
||
: The name of the object to find. | ||
|
||
## Return Value | ||
Returns the [classID](TODO) of the found object as a `uint16`. The return value will be `0` if the object wasn't found. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.FindObject(const char *name); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
GameObject::Find(const char *name); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
uint16 foundObject = RSDK.FindObject("MyObject"); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
uint16 foundObject = GameObject::Find("MyObject"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# CheckSceneFolder | ||
|
||
## Description | ||
Reads the name of the current stage's folder. | ||
|
||
## Parameters | ||
`folderName` | ||
|
||
: The string to match. | ||
|
||
## Return Value | ||
Returns `true` as a `bool32` if the current folder's name matches `folderName`; otherwise, returns `false`. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.CheckSceneFolder(const char *folderName); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::CheckSceneFolder(const char *folderName); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.CheckSceneFolder("Menu"); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::CheckSceneFolder("Menu"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CheckValidScene | ||
|
||
## Description | ||
Checks if `SceneInfo->activeCategory` and `SceneInfo->listPos` point to a valid scene in the GameConfig. | ||
|
||
## Parameters | ||
None. | ||
|
||
## Return Value | ||
Returns whether the current scene is valid as a `bool32`. | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.CheckValidScene(); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::CheckValidScene(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# ForceHardReset | ||
|
||
!!! note | ||
This function only exists in REV02 and above. | ||
|
||
## Description | ||
Sets whether the next stage reload should reload all assets. | ||
|
||
!!! note | ||
This function does not reload the scene by itself; you must call [LoadStage()](LoadStage.md) manually. | ||
|
||
## Parameters | ||
`shouldHardReset` | ||
|
||
: If set to `false`, the stage will reload normally. If set to `true`, the stage will reload all assets when reloaded. | ||
|
||
## Return Value | ||
None. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.ForceHardReset(bool32 shouldHardReset); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::ForceHardReset(bool32 shouldHardReset); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.ForceHardReset(true); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::ForceHardReset(true); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# LoadScene | ||
|
||
## Description | ||
Loads a stage based on `SceneInfo->activeCategory` and `SceneInfo->listPos`. | ||
|
||
## Parameters | ||
None. | ||
|
||
## Return Value | ||
None. | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.LoadScene(); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::LoadScene(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SetEngineState | ||
|
||
## Description | ||
Sets the state of the engine. | ||
|
||
## Parameters | ||
`state` | ||
|
||
: The [engine state](TODO) to set the engine to. | ||
|
||
## Return Value | ||
Sets `SceneInfo->state` to the given state, preserving step-over mode if it's enabled. | ||
|
||
## Syntax | ||
=== "C" | ||
|
||
``` c | ||
RSDK.SetEngineState(uint8 state); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::SetEngineState(EngineStates state); | ||
``` | ||
|
||
## Example | ||
=== "C" | ||
|
||
``` c | ||
RSDK.SetEngineState(ENGINESTATE_FROZEN); | ||
``` | ||
|
||
=== "C++" | ||
|
||
``` cpp | ||
Stage::SetEngineState(ENGINESTATE_FROZEN); | ||
``` |
Oops, something went wrong.