mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
Merge branch 'develop' of garrettjoecox.github.com:HarbourMasters/Shipwright into let-it-snow
This commit is contained in:
commit
4162a818b1
33 changed files with 202 additions and 143 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 467f36589b0d6fe6c7f9d248945650a459bce768
|
||||
Subproject commit c872b1ff18b793a97385ccf1c864c3fc04051cc7
|
|
@ -1 +1 @@
|
|||
Subproject commit 0302eab051a7e0e5a8dc208aca5b00899a91808c
|
||||
Subproject commit d252cc241e0ff2270a289abba274ed43bd0b1792
|
|
@ -86,7 +86,7 @@ static void OnPresentChange() {
|
|||
uint32_t giftsCollected = CVarGetInteger(CVAR("GiftsCollected"), 0);
|
||||
giftsCollected++;
|
||||
CVarSetInteger(CVAR("GiftsCollected"), giftsCollected);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
std::string msg = std::to_string(giftsCollected).c_str();
|
||||
msg += " Gifts in Inventory.";
|
||||
Notification::Emit({
|
||||
|
@ -117,7 +117,7 @@ static void OnPresentChange() {
|
|||
vanillaQueuedItemEntry = Rando::StaticData::RetrieveItem(RG_TRIFORCE_PIECE).GetGIEntry_Copy();
|
||||
giftsCollected -= giftsRequired;
|
||||
CVarSetInteger(CVAR("GiftsCollected"), giftsCollected);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
|
||||
std::string msg = std::to_string(giftsCollected).c_str();
|
||||
msg += " Gifts in Inventory.";
|
||||
|
|
|
@ -27,7 +27,7 @@ static void OnConfigurationChanged() {
|
|||
COND_HOOK(OnSaveFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) {
|
||||
std::string cvar = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), file);
|
||||
CVarSetInteger(cvar.c_str(), CVarGetInteger(CVAR("BombArrows.Active"), 0));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
});
|
||||
|
||||
COND_HOOK(OnLoadFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) {
|
||||
|
@ -39,13 +39,13 @@ static void OnConfigurationChanged() {
|
|||
std::string cvarFrom = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), from);
|
||||
std::string cvarTo = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), to);
|
||||
CVarSetInteger(cvarTo.c_str(), CVarGetInteger(cvarFrom.c_str(), 0));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
});
|
||||
|
||||
COND_HOOK(OnDeleteFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) {
|
||||
std::string cvar = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), file);
|
||||
CVarSetInteger(cvar.c_str(), 0);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
});
|
||||
|
||||
COND_ID_HOOK(OnActorInit, ACTOR_EN_ARROW, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](void* actorRef) {
|
||||
|
|
|
@ -389,7 +389,7 @@ void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) {
|
|||
excludedSequences.insert(seqInfo);
|
||||
includedSequences.erase(seqInfo);
|
||||
CVarSetInteger(cvarKey.c_str(), 1);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) {
|
||||
|
@ -397,7 +397,7 @@ void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) {
|
|||
includedSequences.insert(seqInfo);
|
||||
excludedSequences.erase(seqInfo);
|
||||
CVarClear(cvarKey.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
void AudioCollection::InitializeShufflePool() {
|
||||
|
|
|
@ -204,7 +204,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
ResetGroup(map, type);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
|
@ -215,7 +215,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
RandomizeGroup(type);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
|
@ -226,7 +226,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
LockGroup(map, type);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
|
@ -237,7 +237,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
UnlockGroup(map, type);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
|
@ -282,7 +282,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
|
||||
if (ImGui::Selectable(seqData.label.c_str())) {
|
||||
CVarSetInteger(cvarKey.c_str(), value);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
if (ImGui::Button(resetButton.c_str())) {
|
||||
CVarClear(cvarKey.c_str());
|
||||
CVarClear(cvarLockKey.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
UpdateCurrentBGM(defaultValue, seqData.category);
|
||||
}
|
||||
UIWidgets::Tooltip("Reset to default");
|
||||
|
@ -323,7 +323,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
if (locked) {
|
||||
CVarClear(cvarLockKey.c_str());
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
|||
} else {
|
||||
CVarSetInteger(cvarLockKey.c_str(), 1);
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
UIWidgets::Tooltip(locked ? "Sound locked" : "Sound unlocked");
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ void AudioEditor::DrawElement() {
|
|||
const std::string resetButton = "Reset##linkVoiceFreqMultiplier";
|
||||
if (ImGui::Button(resetButton.c_str())) {
|
||||
CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
ImGui::NewLine();
|
||||
|
@ -704,14 +704,14 @@ void AudioEditor_RandomizeAll() {
|
|||
RandomizeGroup(type);
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
void AudioEditor_RandomizeGroup(SeqType group) {
|
||||
RandomizeGroup(group);
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
|
@ -720,14 +720,14 @@ void AudioEditor_ResetAll() {
|
|||
ResetGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
void AudioEditor_ResetGroup(SeqType group) {
|
||||
ResetGroup(AudioCollection::Instance->GetAllSequences(), group);
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
|
@ -736,7 +736,7 @@ void AudioEditor_LockAll() {
|
|||
LockGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
void AudioEditor_UnlockAll() {
|
||||
|
@ -744,5 +744,5 @@ void AudioEditor_UnlockAll() {
|
|||
UnlockGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void SohInputEditorWindow::UpdateElement() {
|
|||
}
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->BlockImGuiGamepadNavigation();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->BlockGamepadNavigation();
|
||||
} else {
|
||||
if (mGameInputBlockTimer != INT32_MAX) {
|
||||
mGameInputBlockTimer--;
|
||||
|
@ -95,13 +95,13 @@ void SohInputEditorWindow::UpdateElement() {
|
|||
}
|
||||
}
|
||||
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetGui()->ImGuiGamepadNavigationEnabled()) {
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetGui()->GamepadNavigationEnabled()) {
|
||||
mMappingInputBlockTimer = ImGui::GetIO().Framerate / 3;
|
||||
} else {
|
||||
mMappingInputBlockTimer = INT32_MAX;
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->UnblockImGuiGamepadNavigation();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->UnblockGamepadNavigation();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ void SohInputEditorWindow::DrawLEDSection(uint8_t port) {
|
|||
color.b = colorVec.z * 255.0;
|
||||
|
||||
CVarSetColor24(CVAR_SETTING("LEDPort1Color"), color);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("Custom Color");
|
||||
|
@ -1525,7 +1525,7 @@ void SohInputEditorWindow::DrawMapping(CustomButtonMap& mapping, float labelWidt
|
|||
}
|
||||
if (ImGui::Selectable(i->second, i->first == currentButton)) {
|
||||
CVarSetInteger(mapping.cVarName, i->first);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
|
|
|
@ -130,7 +130,7 @@ Color_RGBA8 ColorRGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
|
|||
# Silly Options
|
||||
Lets get this one out of the way, probably the only thing that will be consistent between silly options is how they are rendered
|
||||
on the ImGui tab. So when adding one just make sure it follows the same general pattern as the rest. Notably:
|
||||
- Make sure to SaveConsoleVariablesOnNextTick(), forgetting this will not persist your changes
|
||||
- Make sure to SaveConsoleVariablesNextFrame(), forgetting this will not persist your changes
|
||||
- Make sure reset properly resets the value
|
||||
- Depending on your use case you may or may not have to split the cvar into two values (cvar.Changed & cvar.Value)
|
||||
|
||||
|
@ -1443,7 +1443,7 @@ void Draw_Placements(){
|
|||
if (ImGui::Button("Reset##EnemyHealthBarWidth")) {
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Value"));
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Changed"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::NewLine();
|
||||
ImGui::EndTable();
|
||||
|
@ -1455,7 +1455,7 @@ void Reset_Option_Single(const char* Button_Title, const char* name) {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(Button_Title)) {
|
||||
CVarClear(name);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1464,7 +1464,7 @@ void Reset_Option_Double(const char* Button_Title, const char* name) {
|
|||
if (ImGui::Button(Button_Title)) {
|
||||
CVarClear((std::string(name) + ".Value").c_str());
|
||||
CVarClear((std::string(name) + ".Changed").c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1472,7 +1472,7 @@ void DrawSillyTab() {
|
|||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
if (UIWidgets::EnhancementCheckbox("Let It Snow", "gLetItSnow")) {
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Body Scale: %.3fx", "##Link_BodyScale", CVAR_COSMETIC("Link.BodyScale.Value"), 0.001f, 0.025f, "", 0.01f, true)) {
|
||||
|
@ -1482,7 +1482,7 @@ void DrawSillyTab() {
|
|||
if (ImGui::Button("Reset##Link_BodyScale")) {
|
||||
CVarClear(CVAR_COSMETIC("Link.BodyScale.Value"));
|
||||
CVarClear(CVAR_COSMETIC("Link.BodyScale.Changed"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
if (gPlayState != nullptr) {
|
||||
static Player* player = GET_PLAYER(gPlayState);
|
||||
player->actor.scale.x = 0.01f;
|
||||
|
@ -1737,7 +1737,7 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) {
|
|||
CVarSetInteger((cosmeticOption.changedCvar), 1);
|
||||
ApplySideEffects(cosmeticOption);
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", cosmeticOption.label.c_str());
|
||||
|
@ -1746,7 +1746,7 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) {
|
|||
if (ImGui::Button(("Random##" + cosmeticOption.label).c_str())) {
|
||||
RandomizeColor(cosmeticOption);
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (cosmeticOption.supportsRainbow) {
|
||||
ImGui::SameLine();
|
||||
|
@ -1756,21 +1756,21 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) {
|
|||
CVarSetInteger((cosmeticOption.changedCvar), 1);
|
||||
ApplySideEffects(cosmeticOption);
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
bool isLocked = (bool)CVarGetInteger((cosmeticOption.lockedCvar), 0);
|
||||
if (ImGui::Checkbox(("Locked##" + cosmeticOption.label).c_str(), &isLocked)) {
|
||||
CVarSetInteger((cosmeticOption.lockedCvar), isLocked);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (CVarGetInteger((cosmeticOption.changedCvar), 0)) {
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(("Reset##" + cosmeticOption.label).c_str())) {
|
||||
ResetColor(cosmeticOption);
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1787,7 +1787,7 @@ void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) {
|
|||
}
|
||||
}
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(("Reset##" + label).c_str())) {
|
||||
|
@ -1797,7 +1797,7 @@ void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) {
|
|||
}
|
||||
}
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
for (auto& [id, cosmeticOption] : cosmeticOptions) {
|
||||
if (cosmeticOption.group == cosmeticGroup && (!cosmeticOption.advancedOption || CVarGetInteger(CVAR_COSMETIC("AdvancedMode"), 0))) {
|
||||
|
@ -1827,7 +1827,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.lockedCvar, 1);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Unlock All Advanced", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) {
|
||||
|
@ -1836,7 +1836,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.lockedCvar, 0);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Sync Rainbow colors", CVAR_COSMETIC("RainbowSync"));
|
||||
|
@ -1855,7 +1855,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
}
|
||||
}
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
if (ImGui::Button("Lock All", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
||||
|
@ -1864,7 +1864,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.lockedCvar, 1);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Unlock All", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) {
|
||||
|
@ -1873,7 +1873,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.lockedCvar, 0);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
if (ImGui::Button("Rainbow All", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
||||
|
@ -1888,7 +1888,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.rainbowCvar, 1);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Un-Rainbow All", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) {
|
||||
|
@ -1903,7 +1903,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
CVarSetInteger(cosmeticOption.rainbowCvar, 0);
|
||||
}
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
if (ImGui::BeginTabBar("CosmeticsContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
|
||||
|
@ -1928,7 +1928,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
if (ImGui::Button("Reset##Trails_Duration")) {
|
||||
CVarClear(CVAR_COSMETIC("Trails.Duration.Value"));
|
||||
CVarClear(CVAR_COSMETIC("Trails.Duration.Changed"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
@ -2000,7 +2000,7 @@ void CosmeticsEditorWindow::InitElement() {
|
|||
cosmeticOption.currentColor.z = cvarColor.b / 255.0f;
|
||||
cosmeticOption.currentColor.w = cvarColor.a / 255.0f;
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
ApplyAuthenticGfxPatches();
|
||||
|
||||
|
@ -2017,7 +2017,7 @@ void CosmeticsEditor_RandomizeAll() {
|
|||
}
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
||||
|
@ -2030,7 +2030,7 @@ void CosmeticsEditor_RandomizeGroup(CosmeticGroup group) {
|
|||
}
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
||||
|
@ -2041,7 +2041,7 @@ void CosmeticsEditor_ResetAll() {
|
|||
}
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
||||
|
@ -2052,6 +2052,6 @@ void CosmeticsEditor_ResetGroup(CosmeticGroup group) {
|
|||
}
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
|
|
@ -1596,5 +1596,5 @@ void DebugConsole_Init(void) {
|
|||
{"group_name", Ship::ArgumentType::TEXT, true},
|
||||
}});
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
|
|
@ -309,6 +309,8 @@ typedef enum {
|
|||
// Vanilla condition: !EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL
|
||||
VB_PLAY_PULL_MASTER_SWORD_CS,
|
||||
VB_PLAY_DROP_FISH_FOR_JABU_CS,
|
||||
// Opt: *EnKz
|
||||
VB_PLAY_MWEEP_CS,
|
||||
// Vanilla condition: player->getItemId == GI_GAUNTLETS_SILVER
|
||||
VB_PLAY_NABOORU_CAPTURED_CS,
|
||||
VB_PLAY_ZELDAS_LULLABY_CS,
|
||||
|
|
|
@ -477,7 +477,7 @@ void GameInteractor::RawAction::SetCosmeticsColor(uint8_t cosmeticCategory, uint
|
|||
break;
|
||||
}
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void DrawPresetSelector(PresetType presetTypeId) {
|
|||
if (selectedPresetId != 0) {
|
||||
applyPreset(selectedPresetDef.entries);
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
if (presetTypeId == PRESET_TYPE_RANDOMIZER){
|
||||
Rando::Context::GetInstance()->GetSettings()->ReloadOptions();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ void RandoMain::GenerateRando(std::set<RandomizerCheck> excludedLocations, std::
|
|||
|
||||
Rando::Context::GetInstance()->SetSeedGenerated(GenerateRandomizer(excludedLocations, enabledTricks, seedString));
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Rando::Context::GetInstance()->SetPlandoLoaded(false);
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ bool Option::RenderCheckbox() {
|
|||
if (CustomCheckbox(name.c_str(), &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
changed = true;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
|
@ -228,7 +228,7 @@ bool Option::RenderTristateCheckbox() {
|
|||
if (CustomCheckboxTristate(name.c_str(), &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
changed = true;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
|
@ -250,7 +250,7 @@ bool Option::RenderCombobox() {
|
|||
selected = options.size();
|
||||
CVarSetInteger(cvarName.c_str(), selected);
|
||||
changed = true;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
|
@ -263,7 +263,7 @@ bool Option::RenderCombobox() {
|
|||
CVarSetInteger(cvarName.c_str(), static_cast<int>(i));
|
||||
changed = true;
|
||||
selected = i;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ bool Option::RenderSlider() {
|
|||
if (changed) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
SetFromCVar();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
|
|
@ -478,7 +478,8 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
|
|||
(CUR_UPG_VALUE(UPG_STICKS) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE);
|
||||
case RG_DEKU_STICK_1:
|
||||
case RG_BUY_DEKU_STICK_1:
|
||||
return CUR_UPG_VALUE(UPG_STICKS) ? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
return CUR_UPG_VALUE(UPG_STICKS) || !OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_DEKU_STICK_BAG).GetContextOptionIndex()
|
||||
? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
case RG_PROGRESSIVE_NUT_UPGRADE:
|
||||
return infiniteUpgrades != RO_INF_UPGRADES_OFF ?
|
||||
(Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_NUT_UPGRADE) ? CANT_OBTAIN_ALREADY_HAVE : CAN_OBTAIN) :
|
||||
|
@ -487,7 +488,8 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
|
|||
case RG_DEKU_NUTS_10:
|
||||
case RG_BUY_DEKU_NUTS_5:
|
||||
case RG_BUY_DEKU_NUTS_10:
|
||||
return CUR_UPG_VALUE(UPG_NUTS) ? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
return CUR_UPG_VALUE(UPG_NUTS) || !OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_DEKU_NUT_BAG).GetContextOptionIndex()
|
||||
? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
case RG_PROGRESSIVE_BOMB_BAG:
|
||||
return infiniteUpgrades != RO_INF_UPGRADES_OFF ?
|
||||
(Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_BOMB_BAG) ? CANT_OBTAIN_ALREADY_HAVE : CAN_OBTAIN) :
|
||||
|
@ -1339,7 +1341,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
|||
RandoMain::GenerateRando(excludedLocations, enabledTricks, seed);
|
||||
|
||||
CVarSetInteger(CVAR_GENERAL("RandoGenerating"), 0);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
|
||||
generated = 1;
|
||||
}
|
||||
|
@ -1511,7 +1513,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
excludedLocationString += ",";
|
||||
}
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", Rando::StaticData::GetLocation(location)->GetShortName().c_str());
|
||||
|
@ -1556,7 +1558,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
} else {
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str());
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", Rando::StaticData::GetLocation(location)->GetShortName().c_str());
|
||||
|
@ -1726,7 +1728,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
enabledTrickString += ",";
|
||||
}
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Enable All")) {
|
||||
|
@ -1741,7 +1743,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
if (ImGui::BeginTable("trickTags", showTag.size(), ImGuiTableFlags_Resizable | ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders)) {
|
||||
|
@ -1796,7 +1798,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
ImGui::BeginChild("ChildTricksDisabled", ImVec2(0, -8), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
|
@ -1831,7 +1833,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
Rando::Tricks::DrawTagChips(option.GetTags());
|
||||
ImGui::SameLine();
|
||||
|
@ -1887,7 +1889,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
} else {
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
ImGui::BeginChild("ChildTricksEnabled", ImVec2(0, -8), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
|
@ -1926,7 +1928,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
} else {
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
}
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
Rando::Tricks::DrawTagChips(option.GetTags());
|
||||
ImGui::SameLine();
|
||||
|
|
|
@ -1376,7 +1376,7 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
|||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorG"), ChromaKeyBackground.y);
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorB"), ChromaKeyBackground.z);
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorA"), ChromaKeyBackground.w);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ extern SaveContext gSaveContext;
|
|||
extern PlayState* gPlayState;
|
||||
extern int32_t D_8011D3AC;
|
||||
|
||||
extern void func_808ADEF0(BgSpot03Taki* bgSpot03Taki, PlayState* play);
|
||||
extern void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* bgSpot03Taki, PlayState* play);
|
||||
extern void BgSpot03Taki_ApplyOpeningAlpha(BgSpot03Taki* bgSpot03Taki, s32 bufferIndex);
|
||||
|
||||
extern void func_80AF36EC(EnRu2* enRu2, PlayState* play);
|
||||
|
@ -212,6 +212,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
s16* csId = va_arg(args, s16*);
|
||||
BgSpot03Taki* taki = NULL;
|
||||
switch (*csId) {
|
||||
case 3150:
|
||||
case 4180:
|
||||
case 4100:
|
||||
*should = false;
|
||||
|
@ -306,6 +307,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
case ACTOR_BG_YDAN_MARUTA:
|
||||
case ACTOR_BG_SPOT18_SHUTTER:
|
||||
case ACTOR_BG_SPOT05_SOKO:
|
||||
case ACTOR_BG_SPOT06_OBJECTS:
|
||||
case ACTOR_BG_SPOT18_BASKET:
|
||||
case ACTOR_BG_HIDAN_CURTAIN:
|
||||
case ACTOR_BG_MORI_HINERI:
|
||||
|
@ -404,6 +406,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_MWEEP_CS: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), 0)) {
|
||||
*should = false;
|
||||
Inventory_ReplaceItem(gPlayState, ITEM_LETTER_RUTO, ITEM_BOTTLE);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_EYEDROP_CREATION_ANIM:
|
||||
case VB_PLAY_EYEDROPS_CS:
|
||||
case VB_PLAY_DROP_FISH_FOR_JABU_CS:
|
||||
|
@ -814,7 +824,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
|||
}
|
||||
|
||||
BgSpot03Taki* bgSpot03 = static_cast<BgSpot03Taki*>(innerActorRef);
|
||||
if (bgSpot03->actionFunc == func_808ADEF0) {
|
||||
if (bgSpot03->actionFunc == BgSpot03Taki_HandleWaterfallState) {
|
||||
bgSpot03->actionFunc = BgSpot03Taki_KeepOpen;
|
||||
bgSpot03->state = WATERFALL_OPENED;
|
||||
bgSpot03->openingAlpha = 0.0f;
|
||||
|
|
|
@ -774,13 +774,13 @@ void TimeSplitsDrawOptionsMenu() {
|
|||
color.b = windowColor.z * 255.0;
|
||||
color.a = windowColor.w * 255.0;
|
||||
CVarSetColor("TimeSplits.WindowColor", color);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset")) {
|
||||
windowColor = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
CVarSetColor("TimeSplits.WindowColor", {0, 0, 0, 1});
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Window Size: %.1fx", "##windowSize",
|
||||
|
|
|
@ -1045,16 +1045,16 @@ void InitTTSBank() {
|
|||
initData->ResourceVersion = 0;
|
||||
|
||||
sceneMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/scenes" + languageSuffix, true, initData))->Data;
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/scenes" + languageSuffix, 0, true, initData))->Data;
|
||||
|
||||
miscMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/misc" + languageSuffix, true, initData))->Data;
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/misc" + languageSuffix, 0, true, initData))->Data;
|
||||
|
||||
kaleidoMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/kaleidoscope" + languageSuffix, true, initData))->Data;
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/kaleidoscope" + languageSuffix, 0, true, initData))->Data;
|
||||
|
||||
fileChooseMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/filechoose" + languageSuffix, true, initData))->Data;
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/filechoose" + languageSuffix, 0, true, initData))->Data;
|
||||
}
|
||||
|
||||
void RegisterOnSetGameLanguageHook() {
|
||||
|
|
|
@ -788,14 +788,14 @@ void CrowdControl::DrawMenu() {
|
|||
ImGui::Text("Host & Port");
|
||||
if (UIWidgets::InputString("##Host", &host)) {
|
||||
CVarSetString(CVAR_REMOTE_CROWD_CONTROL("Host"), host.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(ImGui::GetFontSize() * 5);
|
||||
if (ImGui::InputScalar("##Port", ImGuiDataType_U16, &port)) {
|
||||
CVarSetInteger(CVAR_REMOTE_CROWD_CONTROL("Port"), port);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndDisabled();
|
||||
|
@ -807,11 +807,11 @@ void CrowdControl::DrawMenu() {
|
|||
if (ImGui::Button(buttonLabel, ImVec2(-1.0f, 0.0f))) {
|
||||
if (isEnabled) {
|
||||
CVarClear(CVAR_REMOTE_CROWD_CONTROL("Enabled"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Disable();
|
||||
} else {
|
||||
CVarSetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 1);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,14 +514,14 @@ void Sail::DrawMenu() {
|
|||
ImGui::Text("Host & Port");
|
||||
if (UIWidgets::InputString("##Host", &host)) {
|
||||
CVarSetString(CVAR_REMOTE_SAIL("Host"), host.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(ImGui::GetFontSize() * 5);
|
||||
if (ImGui::InputScalar("##Port", ImGuiDataType_U16, &port)) {
|
||||
CVarSetInteger(CVAR_REMOTE_SAIL("Port"), port);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndDisabled();
|
||||
|
@ -533,11 +533,11 @@ void Sail::DrawMenu() {
|
|||
if (ImGui::Button(buttonLabel, ImVec2(-1.0f, 0.0f))) {
|
||||
if (isEnabled) {
|
||||
CVarClear(CVAR_REMOTE_SAIL("Enabled"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Disable();
|
||||
} else {
|
||||
CVarSetInteger(CVAR_REMOTE_SAIL("Enabled"), 1);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,8 +349,8 @@ OTRGlobals::OTRGlobals() {
|
|||
context->InitWindow({ sohInputEditorWindow });
|
||||
|
||||
auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay();
|
||||
overlay->LoadFont("Press Start 2P", "fonts/PressStart2P-Regular.ttf", 12.0f);
|
||||
overlay->LoadFont("Fipps", "fonts/Fipps-Regular.otf", 32.0f);
|
||||
overlay->LoadFont("Press Start 2P", 12.0f, "fonts/PressStart2P-Regular.ttf");
|
||||
overlay->LoadFont("Fipps", 32.0f, "fonts/Fipps-Regular.otf");
|
||||
overlay->SetCurrentFont(CVarGetString(CVAR_GAME_OVERLAY_FONT, "Press Start 2P"));
|
||||
|
||||
context->InitAudio({ .SampleRate = 44100, .SampleLength = 1024, .DesiredBuffered = 2480 });
|
||||
|
@ -2461,7 +2461,7 @@ void SoH_ProcessDroppedFiles(std::string filePath) {
|
|||
gui->GetGuiWindow("Stats")->Hide();
|
||||
std::dynamic_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->ClearBindings();
|
||||
|
||||
gui->SaveConsoleVariablesOnNextTick();
|
||||
gui->SaveConsoleVariablesNextFrame();
|
||||
|
||||
uint32_t finalHash = boost::hash_32<std::string>{}(configJson.dump());
|
||||
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Configuration Loaded. Hash: %d", finalHash);
|
||||
|
|
|
@ -254,7 +254,7 @@ void DrawSettingsMenu() {
|
|||
};
|
||||
|
||||
ImGui::Text("Audio API (Needs reload)");
|
||||
auto currentAudioBackend = Ship::Context::GetInstance()->GetAudio()->GetAudioBackend();
|
||||
auto currentAudioBackend = Ship::Context::GetInstance()->GetAudio()->GetCurrentAudioBackend();
|
||||
|
||||
if (Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) {
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
|
@ -263,7 +263,7 @@ void DrawSettingsMenu() {
|
|||
for (uint8_t i = 0; i < Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size(); i++) {
|
||||
auto backend = Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->data()[i];
|
||||
if (ImGui::Selectable(audioBackendNames[backend], backend == currentAudioBackend)) {
|
||||
Ship::Context::GetInstance()->GetAudio()->SetAudioBackend(backend);
|
||||
Ship::Context::GetInstance()->GetAudio()->SetCurrentAudioBackend(backend);
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
|
@ -435,7 +435,7 @@ void DrawSettingsMenu() {
|
|||
currentFps = 60;
|
||||
}
|
||||
CVarSetInteger(CVAR_SETTING("InterpolationFPS"), currentFps);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
#else
|
||||
bool matchingRefreshRate =
|
||||
CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::FAST3D_DXGI_DX11;
|
||||
|
@ -464,7 +464,7 @@ void DrawSettingsMenu() {
|
|||
int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||
if (hz >= 20 && hz <= 360) {
|
||||
CVarSetInteger(CVAR_SETTING("InterpolationFPS"), hz);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -672,7 +672,7 @@ void DrawEnhancementsMenu() {
|
|||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), newValue);
|
||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), newValue);
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
g->CurrentItemFlags = backup_item_flags;
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip Intro", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||
|
@ -913,7 +913,7 @@ void DrawEnhancementsMenu() {
|
|||
std::for_each(itemCountMessageCVars, itemCountMessageCVars + numOptions,
|
||||
[newValue](const char* cvar) { CVarSetInteger(cvar, newValue); });
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
g->CurrentItemFlags = backup_item_flags;
|
||||
|
||||
|
@ -1849,7 +1849,7 @@ void DrawCheatsMenu() {
|
|||
if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", CVAR_CHEAT("SaveStatePromise"), true,
|
||||
false)) {
|
||||
CVarSetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
if (CVarGetInteger(CVAR_CHEAT("SaveStatePromise"), 0) == 1) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", CVAR_CHEAT("SaveStatesEnabled"), true,
|
||||
|
@ -1944,7 +1944,7 @@ void DrawCheatsMenu() {
|
|||
CVarSetInteger(CVAR_CHEAT("BetaQuestWorld"), betaQuestWorld);
|
||||
|
||||
std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
if (!isBetaQuestEnabled) {
|
||||
|
|
|
@ -238,7 +238,7 @@ namespace UIWidgets {
|
|||
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
||||
if (CustomCheckbox(text, &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ namespace UIWidgets {
|
|||
int val = CVarGetInteger(cvarName, defaultValue);
|
||||
if (CustomCheckboxTristate(text, &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ namespace UIWidgets {
|
|||
CVarSetInteger(cvarName, i);
|
||||
selected = i;
|
||||
changed = true;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ namespace UIWidgets {
|
|||
if (disabledValue >= 0 && selected != disabledValue) {
|
||||
CVarSetInteger(cvarName, disabledValue);
|
||||
changed = true;
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ namespace UIWidgets {
|
|||
|
||||
if (changed && (oldVal != val)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
|
@ -501,7 +501,7 @@ namespace UIWidgets {
|
|||
ss << std::setprecision(ticks + 1) << std::setiosflags(std::ios_base::fixed) << val;
|
||||
val = std::stof(ss.str());
|
||||
CVarSetFloat(cvarName, val);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ namespace UIWidgets {
|
|||
int val = CVarGetInteger(cvarName, 0);
|
||||
if (ImGui::RadioButton(make_invisible.c_str(), id == val)) {
|
||||
CVarSetInteger(cvarName, id);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
ret = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
@ -577,7 +577,7 @@ namespace UIWidgets {
|
|||
|
||||
CVarSetColor(cvarName, colorsRGBA);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); //On click disable rainbow mode.
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Revert colors to the game's original colors (GameCube version)\nOverwrites previously chosen color");
|
||||
|
@ -602,7 +602,7 @@ namespace UIWidgets {
|
|||
NewColors.b = fmin(fmax(colors->z * 255, 0), 255);
|
||||
CVarSetColor(cvarName, NewColors);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); // On click disable rainbow mode.
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Chooses a random color\nOverwrites previously chosen color");
|
||||
|
@ -663,7 +663,7 @@ namespace UIWidgets {
|
|||
colors.a = 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ namespace UIWidgets {
|
|||
colors.a = ColorRGBA.w * 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "soh/ResourceManagerHelpers.h"
|
||||
#include "soh/SaveManager.h"
|
||||
#include "soh/framebuffer_effects.h"
|
||||
|
||||
|
@ -1336,15 +1337,16 @@ void Play_Draw(PlayState* play) {
|
|||
// Track render size when paused and that a copy was performed
|
||||
static u32 lastPauseWidth;
|
||||
static u32 lastPauseHeight;
|
||||
static u8 hasCapturedPauseBuffer;
|
||||
u8 recapturePauseBuffer = false;
|
||||
static bool lastAltAssets;
|
||||
static bool hasCapturedPauseBuffer;
|
||||
bool recapturePauseBuffer = false;
|
||||
|
||||
// If the size has changed or dropped frames leading to the buffer not being copied,
|
||||
// If the size has changed, alt assets toggled, or dropped frames leading to the buffer not being copied,
|
||||
// set the prerender state back to setup to copy a new frame.
|
||||
// This requires not rendering kaleido during this copy to avoid kaleido being copied
|
||||
// This requires not rendering kaleido during this copy to avoid kaleido itself being copied too.
|
||||
if ((R_PAUSE_MENU_MODE == 2 || R_PAUSE_MENU_MODE == 3) &&
|
||||
(lastPauseWidth != OTRGetGameRenderWidth() || lastPauseHeight != OTRGetGameRenderHeight() ||
|
||||
!hasCapturedPauseBuffer)) {
|
||||
lastAltAssets != ResourceMgr_IsAltAssetsEnabled() || !hasCapturedPauseBuffer)) {
|
||||
R_PAUSE_MENU_MODE = 1;
|
||||
recapturePauseBuffer = true;
|
||||
}
|
||||
|
@ -1603,6 +1605,7 @@ void Play_Draw(PlayState* play) {
|
|||
// #region SOH [Port] Custom handling for pause prerender background capture
|
||||
lastPauseWidth = OTRGetGameRenderWidth();
|
||||
lastPauseHeight = OTRGetGameRenderHeight();
|
||||
lastAltAssets = ResourceMgr_IsAltAssetsEnabled();
|
||||
hasCapturedPauseBuffer = false;
|
||||
|
||||
FB_CopyToFramebuffer(&gfxP, 0, gPauseFrameBuffer, false, &hasCapturedPauseBuffer);
|
||||
|
|
|
@ -14,7 +14,7 @@ void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play);
|
|||
void BgSpot01Idomizu_Update(Actor* thisx, PlayState* play);
|
||||
void BgSpot01Idomizu_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_808ABB84(BgSpot01Idomizu* this, PlayState* play);
|
||||
void BgSpot01Idomizu_UpdateWaterLevel(BgSpot01Idomizu* this, PlayState* play);
|
||||
|
||||
const ActorInit Bg_Spot01_Idomizu_InitVars = {
|
||||
ACTOR_BG_SPOT01_IDOMIZU,
|
||||
|
@ -42,14 +42,14 @@ void BgSpot01Idomizu_Init(Actor* thisx, PlayState* play) {
|
|||
} else {
|
||||
this->waterHeight = 52.0f;
|
||||
}
|
||||
this->actionFunc = func_808ABB84;
|
||||
this->actionFunc = BgSpot01Idomizu_UpdateWaterLevel;
|
||||
this->actor.world.pos.y = this->waterHeight;
|
||||
}
|
||||
|
||||
void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
|
||||
void BgSpot01Idomizu_UpdateWaterLevel(BgSpot01Idomizu* this, PlayState* play) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO)) {
|
||||
this->waterHeight = -550.0f;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play);
|
|||
void BgSpot03Taki_Update(Actor* thisx, PlayState* play);
|
||||
void BgSpot03Taki_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_808ADEF0(BgSpot03Taki* this, PlayState* play);
|
||||
void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* this, PlayState* play);
|
||||
|
||||
const ActorInit Bg_Spot03_Taki_InitVars = {
|
||||
ACTOR_BG_SPOT03_TAKI,
|
||||
|
@ -60,7 +60,7 @@ void BgSpot03Taki_Init(Actor* thisx, PlayState* play) {
|
|||
this->openingAlpha = 255.0f;
|
||||
BgSpot03Taki_ApplyOpeningAlpha(this, 0);
|
||||
BgSpot03Taki_ApplyOpeningAlpha(this, 1);
|
||||
this->actionFunc = func_808ADEF0;
|
||||
this->actionFunc = BgSpot03Taki_HandleWaterfallState;
|
||||
}
|
||||
|
||||
void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
@ -69,7 +69,7 @@ void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play) {
|
|||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808ADEF0(BgSpot03Taki* this, PlayState* play) {
|
||||
void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* this, PlayState* play) {
|
||||
if (this->state == WATERFALL_CLOSED) {
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->state = WATERFALL_OPENING_ANIMATED;
|
||||
|
|
|
@ -179,7 +179,8 @@ void func_808BA2CC(BgTokiHikari* this, PlayState* play) {
|
|||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayListOffset(POLY_XLU_DISP++, object_toki_objects_DL_0009C0, 10);
|
||||
// SOH [Port] Index adjust 11 -> 14 (for LUS marker and gsSPVertex) to account for our extraction size changes
|
||||
gSPDisplayListOffset(POLY_XLU_DISP++, object_toki_objects_DL_0009C0, 10 + 2 + 1);
|
||||
Matrix_Pop();
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) {
|
|||
EnBombf* this = (EnBombf*)thisx;
|
||||
|
||||
Actor_SetScale(thisx, 0.01f);
|
||||
this->unk_200 = 1;
|
||||
this->isFuseEnabled = 1;
|
||||
Collider_InitCylinder(play, &this->bombCollider);
|
||||
Collider_InitJntSph(play, &this->explosionCollider);
|
||||
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
|
||||
|
@ -174,7 +174,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
|
|||
(EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
|
||||
if (bombFlower != NULL) {
|
||||
bombFlower->unk_200 = 1;
|
||||
bombFlower->isFuseEnabled = 1;
|
||||
bombFlower->timer = 0;
|
||||
this->timer = 180;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
|
@ -323,7 +323,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
|
|||
s32 pad[2];
|
||||
EnBombf* this = (EnBombf*)thisx;
|
||||
|
||||
if ((this->unk_200 != 0) && (this->timer != 0)) {
|
||||
if ((this->isFuseEnabled != 0) && (this->timer != 0)) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) &&
|
||||
(this->bombCollider.base.oc->category == ACTORCAT_ENEMY))) {
|
||||
this->unk_200 = 1;
|
||||
this->isFuseEnabled = 1;
|
||||
this->timer = 0;
|
||||
} else {
|
||||
// if a lit stick touches the bomb, set timer to 100
|
||||
|
@ -376,7 +376,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->unk_200 != 0) {
|
||||
if (this->isFuseEnabled != 0) {
|
||||
dustAccel.y = 0.2f;
|
||||
effPos = thisx->world.pos;
|
||||
effPos.y += 25.0f;
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef struct EnBombf {
|
|||
/* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1];
|
||||
/* 0x01F8 */ s16 timer;
|
||||
/* 0x01FC */ EnBombfActionFunc actionFunc;
|
||||
/* 0x0200 */ s32 unk_200;
|
||||
/* 0x0200 */ s32 isFuseEnabled;
|
||||
/* 0x0204 */ u8 bumpOn;
|
||||
/* 0x0206 */ s16 flashSpeedScale;
|
||||
/* 0x0208 */ f32 flashIntensity;
|
||||
|
|
|
@ -737,6 +737,8 @@ void EnBox_CreateExtraChestTextures() {
|
|||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gChristmasGreenTreasureChestSideAndTopTex),
|
||||
};
|
||||
|
||||
Gfx gNoOp[] = { gsDPNoOp() };
|
||||
|
||||
Gfx* frontCmd = ResourceMgr_LoadGfxByName(gTreasureChestChestFrontDL);
|
||||
int frontIndex = 0;
|
||||
while (frontCmd->words.w0 >> 24 != G_ENDDL) {
|
||||
|
@ -745,6 +747,20 @@ void EnBox_CreateExtraChestTextures() {
|
|||
gKeyTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasRedTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasGreenTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
|
||||
// Set the second instruction of img OTR hash opcode to noop, since we will replace it with the
|
||||
// OTR filepath opcode below
|
||||
if (frontCmd->words.w0 >> 24 == G_SETTIMG_OTR_HASH) {
|
||||
frontIndex++;
|
||||
++frontCmd;
|
||||
|
||||
gSkullTreasureChestChestFrontDL[frontIndex] = gNoOp[0];
|
||||
gGoldTreasureChestChestFrontDL[frontIndex] = gNoOp[0];
|
||||
gKeyTreasureChestChestFrontDL[frontIndex] = gNoOp[0];
|
||||
gChristmasRedTreasureChestChestFrontDL[frontIndex] = gNoOp[0];
|
||||
gChristmasGreenTreasureChestChestFrontDL[frontIndex] = gNoOp[0];
|
||||
}
|
||||
|
||||
frontIndex++;
|
||||
++frontCmd;
|
||||
}
|
||||
|
@ -783,6 +799,20 @@ void EnBox_CreateExtraChestTextures() {
|
|||
gKeyTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
|
||||
// Set the second instruction of img OTR hash opcode to noop, since we will replace it with the
|
||||
// OTR filepath opcode below
|
||||
if (sideCmd->words.w0 >> 24 == G_SETTIMG_OTR_HASH) {
|
||||
sideIndex++;
|
||||
++sideCmd;
|
||||
|
||||
gSkullTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0];
|
||||
gGoldTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0];
|
||||
gKeyTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0];
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0];
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0];
|
||||
}
|
||||
|
||||
sideIndex++;
|
||||
++sideCmd;
|
||||
}
|
||||
|
|
|
@ -437,17 +437,23 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) {
|
|||
Vec3f pos;
|
||||
Vec3f initPos;
|
||||
|
||||
this->cutsceneCamera = Play_CreateSubCamera(play);
|
||||
this->gameplayCamera = play->activeCamera;
|
||||
Play_ChangeCameraStatus(play, this->gameplayCamera, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cutsceneCamera, CAM_STAT_ACTIVE);
|
||||
bool shouldPlayCutscene = GameInteractor_Should(VB_PLAY_MWEEP_CS, true);
|
||||
|
||||
if (shouldPlayCutscene) {
|
||||
this->cutsceneCamera = Play_CreateSubCamera(play);
|
||||
this->gameplayCamera = play->activeCamera;
|
||||
Play_ChangeCameraStatus(play, this->gameplayCamera, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cutsceneCamera, CAM_STAT_ACTIVE);
|
||||
}
|
||||
pos = this->actor.world.pos;
|
||||
initPos = this->actor.home.pos;
|
||||
pos.y += 60.0f;
|
||||
initPos.y += -100.0f;
|
||||
initPos.z += 260.0f;
|
||||
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
|
||||
if (shouldPlayCutscene) {
|
||||
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
|
||||
}
|
||||
this->actor.speedXZ = 0.1f * CVarGetFloat(CVAR_ENHANCEMENT("MweepSpeed"), 1.0f);
|
||||
this->actionFunc = EnKz_Mweep;
|
||||
}
|
||||
|
@ -462,7 +468,9 @@ void EnKz_Mweep(EnKz* this, PlayState* play) {
|
|||
pos.y += 60.0f;
|
||||
initPos.y += -100.0f;
|
||||
initPos.z += 260.0f;
|
||||
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
|
||||
if (GameInteractor_Should(VB_PLAY_MWEEP_CS, true)) {
|
||||
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
|
||||
}
|
||||
if ((EnKz_FollowPath(this, play) == 1) && (this->waypoint == 0)) {
|
||||
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_1);
|
||||
Inventory_ReplaceItem(play, ITEM_LETTER_RUTO, ITEM_BOTTLE);
|
||||
|
@ -477,9 +485,11 @@ void EnKz_Mweep(EnKz* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnKz_StopMweep(EnKz* this, PlayState* play) {
|
||||
Play_ChangeCameraStatus(play, this->gameplayCamera, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, this->cutsceneCamera);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||
if (GameInteractor_Should(VB_PLAY_MWEEP_CS, true)) {
|
||||
Play_ChangeCameraStatus(play, this->gameplayCamera, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, this->cutsceneCamera);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||
}
|
||||
this->actionFunc = EnKz_Wait;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ void OceffWipe4_Draw(Actor* thisx, PlayState* play) {
|
|||
gSPDisplayList(POLY_XLU_DISP++, sMaterial2DL);
|
||||
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, 1,
|
||||
scroll * (-1), scroll, 32, 32));
|
||||
gSPDisplayListOffset(POLY_XLU_DISP++, sMaterial2DL, 11);
|
||||
// SOH [Port] Index adjust 11 -> 14 (for LUS marker and load texture) to account for our extraction size changes
|
||||
gSPDisplayListOffset(POLY_XLU_DISP++, sMaterial2DL, 11 + 2 + 1);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue