[Cheat] Allow Elegy of Emptiness anywhere (#712)

* Add cheat to allow Elegy of Emptiness anywhere

* Use modern menu for Elegy Anywhere, rename VB

Removed redundant null from Elegy scene check
Moved ElegyAnywhere enhancement's menu order

* Remove extraneous widgets from ElegyAnywhere menu
This commit is contained in:
Eblo
2024-10-09 23:46:05 -05:00
committed by GitHub
parent b7d7a2d9bf
commit 0b16bced84
7 changed files with 25 additions and 6 deletions
+2
View File
@@ -792,6 +792,8 @@ void DrawCheatsMenu() {
{ .tooltip = "Holding L makes you float into the air" })) {
RegisterMoonJumpOnL();
}
UIWidgets::CVarCheckbox("Elegy of Emptiness Anywhere", "gCheats.ElegyAnywhere",
{ .tooltip = "Allows Elegy of Emptiness outside of Ikana" });
UIWidgets::CVarCombobox(
"Stop Time in Dungeons", "gCheats.TempleTimeStop", timeStopOptions,
{ .tooltip = "Stops time from advancing in selected areas. Requires a room change to update.\n\n"
+2
View File
@@ -973,6 +973,8 @@ void AddEnhancements() {
WIDGET_CVAR_CHECKBOX,
{},
[](widgetInfo& info) { RegisterMoonJumpOnL(); } },
{ "Elegy of Emptiness Anywhere", "gCheats.ElegyAnywhere", "Allows Elegy of Emptiness outside of Ikana",
WIDGET_CVAR_CHECKBOX },
{ "Stop Time in Dungeons",
"gCheats.TempleTimeStop",
"Stops time from advancing in selected areas. Requires a room change to update.\n\n"
+1
View File
@@ -7,5 +7,6 @@ void RegisterMoonJumpOnL();
void RegisterTimeStopInTemples();
void RegisterUnbreakableRazorSword();
void RegisterUnrestrictedItems();
void RegisterElegyAnywhere();
#endif // CHEATS_H
@@ -0,0 +1,10 @@
#include <libultraship/bridge.h>
#include "2s2h/GameInteractor/GameInteractor.h"
void RegisterElegyAnywhere() {
REGISTER_VB_SHOULD(VB_ELEGY_CHECK_SCENE, {
if (CVarGetInteger("gCheats.ElegyAnywhere", 0)) {
*should = true;
}
});
}
+1
View File
@@ -13,6 +13,7 @@ void InitEnhancements() {
RegisterUnbreakableRazorSword();
RegisterUnrestrictedItems();
RegisterTimeStopInTemples();
RegisterElegyAnywhere();
// Clock
RegisterTextBasedClock();
+1
View File
@@ -65,6 +65,7 @@ typedef enum {
VB_ZTARGET_SPEED_CHECK,
VB_THIEF_BIRD_STEAL,
VB_PLAY_CREMIA_HUG_CUTSCENE,
VB_ELEGY_CHECK_SCENE,
} GIVanillaBehavior;
typedef enum {
+8 -6
View File
@@ -4821,12 +4821,14 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE) {
if (sLastPlayedSong == OCARINA_SONG_ELEGY) {
if ((play->sceneId == SCENE_F40) || (play->sceneId == SCENE_F41) ||
(play->sceneId == SCENE_IKANAMAE) || (play->sceneId == SCENE_CASTLE) ||
(play->sceneId == SCENE_IKNINSIDE) || (play->sceneId == SCENE_IKANA) ||
(play->sceneId == SCENE_INISIE_N) || (play->sceneId == SCENE_INISIE_R) ||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_RANDOM) ||
(play->sceneId == SCENE_REDEAD) || (play->sceneId == SCENE_TOUGITES)) {
if (GameInteractor_Should(
VB_ELEGY_CHECK_SCENE,
(play->sceneId == SCENE_F40) || (play->sceneId == SCENE_F41) ||
(play->sceneId == SCENE_IKANAMAE) || (play->sceneId == SCENE_CASTLE) ||
(play->sceneId == SCENE_IKNINSIDE) || (play->sceneId == SCENE_IKANA) ||
(play->sceneId == SCENE_INISIE_N) || (play->sceneId == SCENE_INISIE_R) ||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_RANDOM) ||
(play->sceneId == SCENE_REDEAD) || (play->sceneId == SCENE_TOUGITES))) {
play->msgCtx.ocarinaMode = OCARINA_MODE_EVENT;
} else {
sLastPlayedSong = 0xFF;