mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-26 01:58:51 -05:00
Clear Cutscene Pointer Button/Cheat (#2837)
* clear custcene pointer button * now use RawAction for button * add button to new menu bar
This commit is contained in:
parent
ebfd14974f
commit
82d87ff680
@ -229,6 +229,7 @@ public:
|
||||
static void EmulateRandomButtonPress(uint32_t chancePercentage = 100);
|
||||
static void SetRandomWind(bool active);
|
||||
static void SetPlayerInvincibility(bool active);
|
||||
static void ClearCutscenePointer();
|
||||
|
||||
static GameInteractionEffectQueryResult SpawnEnemyWithOffset(uint32_t enemyId, int32_t enemyParams);
|
||||
static GameInteractionEffectQueryResult SpawnActor(uint32_t actorId, int32_t actorParams);
|
||||
|
@ -542,6 +542,13 @@ void GameInteractor::RawAction::SetPlayerInvincibility(bool active) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Clears the cutscene pointer to a value safe for wrong warps.
|
||||
void GameInteractor::RawAction::ClearCutscenePointer() {
|
||||
if (!gPlayState) return;
|
||||
static uint32_t null_cs[] = {0, 0};
|
||||
gPlayState->csCtx.segment = &null_cs;
|
||||
}
|
||||
|
||||
GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset(uint32_t enemyId, int32_t enemyParams) {
|
||||
|
||||
if (!GameInteractor::CanSpawnActor()) {
|
||||
|
@ -1354,7 +1354,12 @@ void DrawCheatsMenu() {
|
||||
if (ImGui::Button("Change Age")) {
|
||||
CVarSetInteger("gSwitchAge", 1);
|
||||
}
|
||||
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
|
||||
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
|
||||
|
||||
if (ImGui::Button("Clear Cutscene Pointer")) {
|
||||
GameInteractor::RawAction::ClearCutscenePointer();
|
||||
}
|
||||
UIWidgets::Tooltip("Clears the cutscene pointer to a value safe for wrong warps.");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user