|
|
|
|
@@ -47,7 +47,7 @@ void ReloadSceneTogglingLinkAge() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteMoney() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
if (CVarGetInteger("gInfiniteMoney", 0) != 0) {
|
|
|
|
|
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
|
|
|
|
|
gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET);
|
|
|
|
|
@@ -58,7 +58,7 @@ void RegisterInfiniteMoney() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteHealth() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
if (CVarGetInteger("gInfiniteHealth", 0) != 0) {
|
|
|
|
|
if (gSaveContext.health < gSaveContext.healthCapacity) {
|
|
|
|
|
gSaveContext.health = gSaveContext.healthCapacity;
|
|
|
|
|
@@ -69,7 +69,7 @@ void RegisterInfiniteHealth() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteAmmo() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
if (CVarGetInteger("gInfiniteAmmo", 0) != 0) {
|
|
|
|
|
// Deku Sticks
|
|
|
|
|
if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) {
|
|
|
|
|
@@ -106,7 +106,7 @@ void RegisterInfiniteAmmo() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteMagic() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
if (CVarGetInteger("gInfiniteMagic", 0) != 0) {
|
|
|
|
|
if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) {
|
|
|
|
|
gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
|
|
|
|
|
@@ -117,7 +117,7 @@ void RegisterInfiniteMagic() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteNayrusLove() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
if (CVarGetInteger("gInfiniteNayru", 0) != 0) {
|
|
|
|
|
gSaveContext.nayrusLoveTimer = 0x44B;
|
|
|
|
|
}
|
|
|
|
|
@@ -126,7 +126,7 @@ void RegisterInfiniteNayrusLove() {
|
|
|
|
|
|
|
|
|
|
void RegisterMoonJumpOnL() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
|
|
|
|
|
if (CVarGetInteger("gMoonJumpOnL", 0) != 0) {
|
|
|
|
|
Player* player = GET_PLAYER(gPlayState);
|
|
|
|
|
@@ -141,7 +141,7 @@ void RegisterMoonJumpOnL() {
|
|
|
|
|
|
|
|
|
|
void RegisterInfiniteISG() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
|
|
|
|
|
if (CVarGetInteger("gEzISG", 0) != 0) {
|
|
|
|
|
Player* player = GET_PLAYER(gPlayState);
|
|
|
|
|
@@ -153,7 +153,7 @@ void RegisterInfiniteISG() {
|
|
|
|
|
//Permanent quick put away (QPA) glitched damage value
|
|
|
|
|
void RegisterEzQPA() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
|
|
|
|
|
if (CVarGetInteger("gEzQPA", 0) != 0) {
|
|
|
|
|
Player* player = GET_PLAYER(gPlayState);
|
|
|
|
|
@@ -165,7 +165,7 @@ void RegisterEzQPA() {
|
|
|
|
|
|
|
|
|
|
void RegisterUnrestrictedItems() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) return;
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) return;
|
|
|
|
|
|
|
|
|
|
if (CVarGetInteger("gNoRestrictItems", 0) != 0) {
|
|
|
|
|
u8 sunsBackup = gPlayState->interfaceCtx.restrictions.sunsSong;
|
|
|
|
|
@@ -193,11 +193,14 @@ void RegisterFreezeTime() {
|
|
|
|
|
/// Switches Link's age and respawns him at the last entrance he entered.
|
|
|
|
|
void RegisterSwitchAge() {
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) {
|
|
|
|
|
static bool warped = false;
|
|
|
|
|
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) {
|
|
|
|
|
CVarClear("gSwitchAge");
|
|
|
|
|
warped = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
static bool warped = false;
|
|
|
|
|
|
|
|
|
|
static Vec3f playerPos;
|
|
|
|
|
static int16_t playerYaw;
|
|
|
|
|
static RoomContext* roomCtx;
|
|
|
|
|
@@ -231,7 +234,7 @@ void RegisterSwitchAge() {
|
|
|
|
|
void RegisterOcarinaTimeTravel() {
|
|
|
|
|
|
|
|
|
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnOcarinaSongAction>([]() {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded()) {
|
|
|
|
|
if (!GameInteractor::IsSaveLoaded(true)) {
|
|
|
|
|
CVarClear("gTimeTravel");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|