mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
Merge pull request #4659 from garrettjoecox/let-it-snow
`develop`->`let-it-snow`
This commit is contained in:
commit
0c7ce16986
60 changed files with 992 additions and 1551 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 467f36589b0d6fe6c7f9d248945650a459bce768
|
||||
Subproject commit c872b1ff18b793a97385ccf1c864c3fc04051cc7
|
|
@ -1 +1 @@
|
|||
Subproject commit 0302eab051a7e0e5a8dc208aca5b00899a91808c
|
||||
Subproject commit d252cc241e0ff2270a289abba274ed43bd0b1792
|
|
@ -537,7 +537,7 @@ void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
|
|||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3);
|
||||
s16 Actor_UpdateAlphaByDistance(Actor* actor, PlayState* play, s16 arg2, f32 arg3);
|
||||
void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 index);
|
||||
void func_80034F54(PlayState* play, s16* arg1, s16* arg2, s32 arg3);
|
||||
void Actor_Noop(Actor* actor, PlayState* play);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -281,6 +281,9 @@ typedef enum {
|
|||
VB_SPAWN_BLUE_WARP,
|
||||
// Vanilla condition: this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF
|
||||
VB_BLUE_WARP_APPLY_ENTRANCE_AND_CUTSCENE,
|
||||
// Vanilla condition: SurfaceType_GetSlope(&play->colCtx, poly, bgId) == 2
|
||||
// Opt: int (original next entrance index)
|
||||
VB_SET_VOIDOUT_FROM_SURFACE,
|
||||
// Vanilla condition: this->collider.base.acFlags & 2
|
||||
VB_BG_BREAKWALL_BREAK,
|
||||
// Vanilla condition: true
|
||||
|
@ -309,6 +312,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();
|
||||
}
|
||||
|
|
|
@ -2493,86 +2493,91 @@ void StaticData::HintTable_Init() {
|
|||
/*--------------------------
|
||||
| BOSS HINT TEXT |
|
||||
---------------------------*/
|
||||
|
||||
hintTextTable[RHT_QUEEN_GOHMA] = HintText(CustomMessage("#Queen Gohma# holds",
|
||||
/*german*/ "#Königin Gohma# hält",
|
||||
/*french*/ "la #Reine Gohma# possède"),
|
||||
// /*spanish*/la #Reina Goma# porta
|
||||
//RANDOTODO check the beginning and end on the french and german translations
|
||||
hintTextTable[RHT_QUEEN_GOHMA] = HintText(CustomMessage("They say that #Queen Gohma# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Königin Gohma# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, la #Reine Gohma# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/la #Reina Goma# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Parasitic Armored Arachnid# holds",
|
||||
/*german*/ "die #gepanzerte parasitäre Spinne# hält",
|
||||
/*french*/ "le #monstre insectoïde géant# possède")});
|
||||
// /*spanish*/el #arácnido parasitario acorazado# porta
|
||||
{CustomMessage("They say that the #Parasitic Armored Arachnid# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß die #gepanzerte parasitäre Spinne# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, le #monstre insectoïde géant# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/el #arácnido parasitario acorazado# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_KING_DODONGO] = HintText(CustomMessage("#King Dodongo# holds",
|
||||
/*german*/ "#König Dodongo# hält",
|
||||
/*french*/ "le #Roi Dodongo# possède"),
|
||||
// /*spanish*/el #Rey Dodongo# porta
|
||||
hintTextTable[RHT_KING_DODONGO] = HintText(CustomMessage("They say that #King Dodongo# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #König Dodongo# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, le #Roi Dodongo# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/el #Rey Dodongo# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Infernal Dinosaur# holds",
|
||||
/*german*/ "der #infernalische Dinosaurier# hält",
|
||||
/*french*/ "le #dinosaure infernal# possède")});
|
||||
// /*spanish*/el #dinosaurio infernal# porta
|
||||
{CustomMessage("They say that the #Infernal Dinosaur# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß der #infernalische Dinosaurier# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, le #dinosaure infernal# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/el #dinosaurio infernal# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_BARINADE] = HintText(CustomMessage("#Barinade# holds",
|
||||
/*german*/ "#Barinade# hält",
|
||||
/*french*/ "#Barinade# possède"),
|
||||
// /*spanish*/#Barinade# porta
|
||||
hintTextTable[RHT_BARINADE] = HintText(CustomMessage("They say that #Barinade# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Barinade# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Barinade# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Barinade# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Bio-Electric Anemone# holds",
|
||||
/*german*/ "die #bioelektrische Anemone# hält",
|
||||
/*french*/ "l'#anémone bioélectrique# possède")});
|
||||
// /*spanish*/la #anémona bioeléctrica# porta
|
||||
{CustomMessage("They say that the #Bio-Electric Anemone# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß die #bioelektrische Anemone# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, l'#anémone bioélectrique# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/la #anémona bioeléctrica# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_PHANTOM_GANON] = HintText(CustomMessage("#Phantom Ganon# holds",
|
||||
/*german*/ "#Phantom-Ganon# hält",
|
||||
/*french*/ "#Ganon Spectral# possède"),
|
||||
// /*spanish*/#Ganon Fantasma# porta
|
||||
hintTextTable[RHT_PHANTOM_GANON] = HintText(CustomMessage("They say that #Phantom Ganon# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Phantom-Ganon# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Ganon Spectral# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Ganon Fantasma# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Evil Spirit from Beyond# holds",
|
||||
/*german*/ "der #böse Geist aus dem Jenseits# hält",
|
||||
/*french*/ "l'#esprit maléfique de l'au-delà# possède")});
|
||||
// /*spanish*/el #espíritu maligno de ultratumba# porta
|
||||
{CustomMessage("They say that the #Evil Spirit from Beyond# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß der #böse Geist aus dem Jenseits# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, l'#esprit maléfique de l'au-delà# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/el #espíritu maligno de ultratumba# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_VOLVAGIA] = HintText(CustomMessage("#Volvagia# holds",
|
||||
/*german*/ "#Volvagia# hält",
|
||||
/*french*/ "#Volvagia# possède"),
|
||||
// /*spanish*/#Volvagia# porta
|
||||
hintTextTable[RHT_VOLVAGIA] = HintText(CustomMessage("They say that #Volvagia# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Volvagia# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Volvagia# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Volvagia# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Subterranean Lava Dragon# holds",
|
||||
/*german*/ "der #subterrane Lavadrache# hält",
|
||||
/*french*/ "le #dragon des profondeurs# possède")});
|
||||
// /*spanish*/el #dragón de lava subterráneo# porta
|
||||
{CustomMessage("They say that the #Subterranean Lava Dragon# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß der #subterrane Lavadrache# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, le #dragon des profondeurs# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/el #dragón de lava subterráneo# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_MORPHA] = HintText(CustomMessage("#Morpha# holds",
|
||||
/*german*/ "#Morpha# hält",
|
||||
/*french*/ "#Morpha# possède"),
|
||||
// /*spanish*/#Morpha# porta
|
||||
hintTextTable[RHT_MORPHA] = HintText(CustomMessage("They say that #Morpha# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Morpha# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Morpha# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Morpha# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Giant Aquatic Amoeba# holds",
|
||||
/*german*/ "die #gigantische aquatische Amöbe# hält",
|
||||
/*french*/ "l'#amibe aquatique géante# possède")});
|
||||
// /*spanish*/la #ameba acuática gigante# porta
|
||||
{CustomMessage("They say that the #Giant Aquatic Amoeba# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß die #gigantische aquatische Amöbe# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, l'#amibe aquatique géante# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/la #ameba acuática gigante# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_BONGO_BONGO] = HintText(CustomMessage("#Bongo Bongo# holds",
|
||||
/*german*/ "#Bongo Bongo# hält",
|
||||
/*french*/ "#Bongo Bongo# possède"),
|
||||
// /*spanish*/#Bongo Bongo# porta
|
||||
hintTextTable[RHT_BONGO_BONGO] = HintText(CustomMessage("They say that #Bongo Bongo# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Bongo Bongo# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Bongo Bongo# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Bongo Bongo# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Phantom Shadow Beast# holds",
|
||||
/*german*/ "das #Phantomschattenbiest# hält",
|
||||
/*french*/ "le #monstre de l'ombre# possède")});
|
||||
// /*spanish*/la #alimaña oscura espectral# porta
|
||||
{CustomMessage("They say that the #Phantom Shadow Beast# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß das #Phantomschattenbiest# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, le #monstre de l'ombre# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/la #alimaña oscura espectral# porta #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_TWINROVA] = HintText(CustomMessage("#Twinrova# holds",
|
||||
/*german*/ "#Twinrova# hält",
|
||||
/*french*/ "#Twinrova# possède"),
|
||||
// /*spanish*/#Birova# porta
|
||||
hintTextTable[RHT_TWINROVA] = HintText(CustomMessage("They say that #Twinrova# holds #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß #Twinrova# hält #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #Twinrova# possède #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
// /*spanish*/#Birova# porta #[[1]]#.
|
||||
{},
|
||||
{CustomMessage("the #Sorceress Sisters# hold",
|
||||
/*german*/ "die #Hexenschwestern# halten",
|
||||
/*french*/ "#les sorcières jumelles# possède")});
|
||||
// /*spanish*/las #hermanas hechiceras# portan
|
||||
{CustomMessage("They say that the #Sorceress Sisters# hold #[[1]]#.",
|
||||
/*german*/ "Man erzählt sich, daß die #Hexenschwestern# halten #[[1]]# lehre.",
|
||||
/*french*/ "Selon moi, #les sorcières jumelles# possède #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
// /*spanish*/las #hermanas hechiceras# portan #[[1]]#.
|
||||
|
||||
hintTextTable[RHT_GIFT_FROM_SAGES] = HintText(CustomMessage("They say that the #Sage of Light# gifts @ #[[1]]#.", {QM_RED, QM_GREEN}),
|
||||
{},
|
||||
{CustomMessage("They say that #a former owl# gifts @ #[[1]]#.", {QM_RED, QM_GREEN})});
|
||||
|
||||
/*--------------------------
|
||||
| BRIDGE HINT TEXT |
|
||||
---------------------------*/
|
||||
|
|
|
@ -1026,7 +1026,7 @@ void GenerateItemPool() {
|
|||
}
|
||||
|
||||
//Gerudo Fortress
|
||||
if (ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_OPEN)) {
|
||||
if (ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FREE)) {
|
||||
ctx->PlaceItemInLocation(RC_GF_NORTH_F1_CARPENTER, RG_RECOVERY_HEART, false, true);
|
||||
ctx->PlaceItemInLocation(RC_GF_NORTH_F2_CARPENTER, RG_RECOVERY_HEART, false, true);
|
||||
ctx->PlaceItemInLocation(RC_GF_SOUTH_F1_CARPENTER, RG_RECOVERY_HEART, false, true);
|
||||
|
@ -1071,7 +1071,7 @@ void GenerateItemPool() {
|
|||
}
|
||||
|
||||
//Gerudo Membership Card
|
||||
if (ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) && ctx->GetOption(RSK_GERUDO_FORTRESS).IsNot(RO_GF_OPEN)) {
|
||||
if (ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) && ctx->GetOption(RSK_GERUDO_FORTRESS).IsNot(RO_GF_FREE)) {
|
||||
AddItemToMainPool(RG_GERUDO_MEMBERSHIP_CARD);
|
||||
ctx->possibleIceTrapModels.push_back(RG_GERUDO_MEMBERSHIP_CARD);
|
||||
} else if (ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) {
|
||||
|
|
|
@ -16,7 +16,7 @@ void RegionTable_Init_GerudoValley() {
|
|||
Entrance(RR_GV_UPPER_STREAM, {[]{return true;}}),
|
||||
Entrance(RR_GV_CRATE_LEDGE, {[]{return logic->IsChild || logic->CanUse(RG_LONGSHOT);}}),
|
||||
Entrance(RR_GV_GROTTO_LEDGE, {[]{return true;}}),
|
||||
Entrance(RR_GV_FORTRESS_SIDE, {[]{return (logic->IsAdult && (logic->CanUse(RG_EPONA) || logic->CanUse(RG_LONGSHOT) || ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_OPEN) || logic->CarpenterRescue)) || (logic->IsChild && logic->CanUse(RG_HOOKSHOT));}}),
|
||||
Entrance(RR_GV_FORTRESS_SIDE, {[]{return (logic->IsAdult && (logic->CanUse(RG_EPONA) || logic->CanUse(RG_LONGSHOT) || ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FREE) || logic->CarpenterRescue)) || (logic->IsChild && logic->CanUse(RG_HOOKSHOT));}}),
|
||||
});
|
||||
|
||||
areaTable[RR_GV_UPPER_STREAM] = Region("GV Upper Stream", "Gerudo Valley", {RA_GERUDO_VALLEY}, DAY_NIGHT_CYCLE, {
|
||||
|
@ -64,7 +64,7 @@ void RegionTable_Init_GerudoValley() {
|
|||
//Exits
|
||||
Entrance(RR_GERUDO_FORTRESS, {[]{return true;}}),
|
||||
Entrance(RR_GV_UPPER_STREAM, {[]{return true;}}),
|
||||
Entrance(RR_GERUDO_VALLEY, {[]{return logic->IsChild || logic->CanUse(RG_EPONA) || logic->CanUse(RG_LONGSHOT) || ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_OPEN) || logic->CarpenterRescue;}}),
|
||||
Entrance(RR_GERUDO_VALLEY, {[]{return logic->IsChild || logic->CanUse(RG_EPONA) || logic->CanUse(RG_LONGSHOT) || ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FREE) || logic->CarpenterRescue;}}),
|
||||
Entrance(RR_GV_CARPENTER_TENT, {[]{return logic->IsAdult;}}),
|
||||
Entrance(RR_GV_STORMS_GROTTO, {[]{return logic->IsAdult && logic->CanOpenStormsGrotto();}}),
|
||||
Entrance(RR_GV_CRATE_LEDGE, {[]{return false;}}),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -139,14 +139,11 @@ static void WriteShuffledEntrance(std::string sphereString, Entrance* entrance)
|
|||
// Writes the settings (without excluded locations, starting inventory and tricks) to the spoilerLog document.
|
||||
static void WriteSettings() {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
auto allOptionGroups = ctx->GetSettings()->GetOptionGroups();
|
||||
for (const Rando::OptionGroup& optionGroup : allOptionGroups) {
|
||||
if (optionGroup.GetContainsType() == Rando::OptionGroupType::DEFAULT && optionGroup.PrintInSpoiler()) {
|
||||
for (Rando::Option* option : optionGroup.GetOptions()) {
|
||||
std::string settingName = optionGroup.GetName() + ":" + option->GetName();
|
||||
jsonData["settings"][settingName] = option->GetSelectedOptionText();
|
||||
}
|
||||
}
|
||||
std::array<Rando::Option, RSK_MAX> options = ctx->GetSettings()->GetAllOptions();
|
||||
for (const Rando::Option& option : options) {
|
||||
if (option.GetName() != ""){
|
||||
jsonData["settings"][option.GetName()] = option.GetSelectedOptionText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ void GenerateStartingInventory() {
|
|||
AddItemToInventory(RG_GANONS_CASTLE_BOSS_KEY);
|
||||
}
|
||||
|
||||
if (ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_OPEN) && !ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) {
|
||||
if (ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FREE) && !ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) {
|
||||
AddItemToInventory(RG_GERUDO_MEMBERSHIP_CARD);
|
||||
}
|
||||
|
||||
|
|
|
@ -1558,6 +1558,40 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
|||
*should = !Flags_GetInfTable(INFTABLE_145) || Flags_GetInfTable(INFTABLE_146);
|
||||
break;
|
||||
}
|
||||
case VB_SET_VOIDOUT_FROM_SURFACE: {
|
||||
// ENTRTODO: Move all entrance rando handling to a dedicated file
|
||||
std::vector<s16> entrPersistTempFlags = {
|
||||
ENTR_DEKU_TREE_BOSS_ENTRANCE, ENTR_DEKU_TREE_BOSS_DOOR, ENTR_DODONGOS_CAVERN_BOSS_ENTRANCE,
|
||||
ENTR_DODONGOS_CAVERN_BOSS_DOOR, ENTR_JABU_JABU_BOSS_ENTRANCE, ENTR_JABU_JABU_BOSS_DOOR,
|
||||
ENTR_FOREST_TEMPLE_BOSS_ENTRANCE, ENTR_FOREST_TEMPLE_BOSS_DOOR, ENTR_FIRE_TEMPLE_BOSS_ENTRANCE,
|
||||
ENTR_FIRE_TEMPLE_BOSS_DOOR, ENTR_WATER_TEMPLE_BOSS_ENTRANCE, ENTR_WATER_TEMPLE_BOSS_DOOR,
|
||||
ENTR_SPIRIT_TEMPLE_BOSS_ENTRANCE, ENTR_SPIRIT_TEMPLE_BOSS_DOOR, ENTR_SHADOW_TEMPLE_BOSS_ENTRANCE,
|
||||
ENTR_SHADOW_TEMPLE_BOSS_DOOR, ENTR_SPIRIT_TEMPLE_ENTRANCE,
|
||||
};
|
||||
|
||||
s16 originalEntrance = (s16)va_arg(args, int);
|
||||
|
||||
// In Entrance rando, if our respawnFlag is set for a grotto return, we don't want the void out to happen
|
||||
if (*should == true && RAND_GET_OPTION(RSK_SHUFFLE_ENTRANCES)) {
|
||||
// Check for dungeon special entrances that are randomized to a new location
|
||||
if (std::find(entrPersistTempFlags.begin(), entrPersistTempFlags.end(), originalEntrance) !=
|
||||
entrPersistTempFlags.end() && originalEntrance != gPlayState->nextEntranceIndex) {
|
||||
// Normally dungeons use a special voidout between scenes so that entering/exiting a boss room,
|
||||
// or leaving via Spirit Hands and going back in persist temp flags across scenes.
|
||||
// For ER, the temp flags should be wiped out so that they aren't transferred to the new location.
|
||||
gPlayState->actorCtx.flags.tempSwch = 0;
|
||||
gPlayState->actorCtx.flags.tempCollect = 0;
|
||||
|
||||
// If the respawnFlag is set for a grotto return, we don't want the void out to happen.
|
||||
// Set the data flag to one to prevent the respawn point from being overriden by dungeon doors.
|
||||
if (gSaveContext.respawnFlag == 2) {
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].data = 1;
|
||||
*should = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_FREEZE_ON_SKULL_TOKEN:
|
||||
case VB_TRADE_TIMER_ODD_MUSHROOM:
|
||||
case VB_TRADE_TIMER_FROG:
|
||||
|
@ -1623,6 +1657,7 @@ void RandomizerOnSceneInitHandler(int16_t sceneNum) {
|
|||
CheckTracker::RecalculateAllAreaTotals();
|
||||
}
|
||||
|
||||
// ENTRTODO: Move all entrance rando handling to a dedicated file
|
||||
if (RAND_GET_OPTION(RSK_SHUFFLE_ENTRANCES)) {
|
||||
// In ER, override roomNum to load based on scene and spawn during scene init
|
||||
if (gSaveContext.respawnFlag <= 0) {
|
||||
|
@ -2336,6 +2371,7 @@ void RandomizerRegisterHooks() {
|
|||
|
||||
if (!IS_RANDO) return;
|
||||
|
||||
// ENTRTODO: Move all entrance rando handling to a dedicated file
|
||||
// Setup the modified entrance table and entrance shuffle table for rando
|
||||
Entrance_Init();
|
||||
|
||||
|
|
|
@ -818,7 +818,7 @@ void Rando::StaticData::InitLocationTable() { //
|
|||
locationTable[RC_TWINROVA] = Location::Base(RC_TWINROVA, RCQUEST_BOTH, RCTYPE_DUNGEON_REWARD, ACTOR_DOOR_WARP1, SCENE_SPIRIT_TEMPLE_BOSS, 0x00, "Twinrova", "Twinrova", RHT_TWINROVA, RG_SPIRIT_MEDALLION, SpoilerCollectionCheck::RandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE), true);
|
||||
locationTable[RC_BONGO_BONGO] = Location::Base(RC_BONGO_BONGO, RCQUEST_BOTH, RCTYPE_DUNGEON_REWARD, ACTOR_DOOR_WARP1, SCENE_SHADOW_TEMPLE_BOSS, 0x00, "Bongo Bongo", "Bongo Bongo", RHT_BONGO_BONGO, RG_SHADOW_MEDALLION, SpoilerCollectionCheck::RandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE), true);
|
||||
locationTable[RC_GANON] = Location::Base(RC_GANON, RCQUEST_BOTH, RCTYPE_DUNGEON_REWARD, ACTOR_DOOR_WARP1, SCENE_GANON_BOSS, 0x00, "Ganon", "Ganon", RHT_NONE, RG_TRIFORCE);
|
||||
locationTable[RC_GIFT_FROM_SAGES] = Location::Base(RC_GIFT_FROM_SAGES, RCQUEST_BOTH, RCTYPE_DUNGEON_REWARD, RCAREA_MARKET, ACTOR_ID_MAX, SCENE_ID_MAX, 0x00, "Gift from Raoru", "Gift from Raoru", RHT_NONE, RG_LIGHT_MEDALLION, SpoilerCollectionCheck::EventChkInf(0xC9), true);
|
||||
locationTable[RC_GIFT_FROM_SAGES] = Location::Base(RC_GIFT_FROM_SAGES, RCQUEST_BOTH, RCTYPE_DUNGEON_REWARD, RCAREA_MARKET, ACTOR_ID_MAX, SCENE_ID_MAX, 0x00, "Gift from Raoru", "Gift from Raoru", RHT_GIFT_FROM_SAGES, RG_LIGHT_MEDALLION, SpoilerCollectionCheck::EventChkInf(0xC9), true);
|
||||
|
||||
// Heart Containers
|
||||
locationTable[RC_DEKU_TREE_QUEEN_GOHMA_HEART] = Location::Base(RC_DEKU_TREE_QUEEN_GOHMA_HEART, RCQUEST_BOTH, RCTYPE_BOSS_HEART_OR_OTHER_REWARD, ACTOR_ITEM_B_HEART, SCENE_DEKU_TREE_BOSS, 0x00, "Queen Gohma Heart Container", RHT_DEKU_TREE_QUEEN_GOHMA_HEART, RG_HEART_CONTAINER, SpoilerCollectionCheck::Collectable(0x11, 0x1F), true);
|
||||
|
|
|
@ -1124,7 +1124,7 @@ namespace Rando {
|
|||
bool Logic::CanFinishGerudoFortress(){
|
||||
return (ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_NORMAL) && SmallKeys(RR_GERUDO_FORTRESS, 4) && (CanUse(RG_KOKIRI_SWORD) || CanUse(RG_MASTER_SWORD) || CanUse(RG_BIGGORON_SWORD)) && (HasItem(RG_GERUDO_MEMBERSHIP_CARD) || CanUse(RG_FAIRY_BOW) || CanUse(RG_HOOKSHOT) || CanUse(RG_HOVER_BOOTS) || ctx->GetTrickOption(RT_GF_KITCHEN))) ||
|
||||
(ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FAST) && SmallKeys(RR_GERUDO_FORTRESS, 1) && (CanUse(RG_KOKIRI_SWORD) || CanUse(RG_MASTER_SWORD) || CanUse(RG_BIGGORON_SWORD))) ||
|
||||
ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_OPEN);
|
||||
ctx->GetOption(RSK_GERUDO_FORTRESS).Is(RO_GF_FREE);
|
||||
}
|
||||
|
||||
bool Logic::CanStandingShield(){
|
||||
|
|
|
@ -178,6 +178,15 @@ void Option::RemoveFlag(const int imFlag_) {
|
|||
imFlags &= ~imFlag_;
|
||||
}
|
||||
|
||||
void Option::SetContextIndexFromText(const std::string text) {
|
||||
if (optionsTextToVar.contains(text)){
|
||||
SetContextIndex(optionsTextToVar[text]);
|
||||
} else {
|
||||
SPDLOG_ERROR("Option {} does not have a var named {}.", name, text);
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
Option::Option(uint8_t var_, std::string name_, std::vector<std::string> options_, OptionCategory category_,
|
||||
std::string cvarName_, std::string description_, WidgetType widgetType_, uint8_t defaultOption_,
|
||||
bool defaultHidden_, int imFlags_)
|
||||
|
@ -186,6 +195,7 @@ Option::Option(uint8_t var_, std::string name_, std::vector<std::string> options
|
|||
defaultOption(defaultOption_), defaultHidden(defaultHidden_), imFlags(imFlags_) {
|
||||
menuSelection = contextSelection = defaultOption;
|
||||
hidden = defaultHidden;
|
||||
PopulateTextToNum();
|
||||
SetFromCVar();
|
||||
}
|
||||
Option::Option(bool var_, std::string name_, std::vector<std::string> options_, const OptionCategory category_,
|
||||
|
@ -196,6 +206,7 @@ Option::Option(bool var_, std::string name_, std::vector<std::string> options_,
|
|||
defaultOption(defaultOption_), defaultHidden(defaultHidden_), imFlags(imFlags_) {
|
||||
menuSelection = contextSelection = defaultOption;
|
||||
hidden = defaultHidden;
|
||||
PopulateTextToNum();
|
||||
SetFromCVar();
|
||||
}
|
||||
|
||||
|
@ -208,7 +219,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 +239,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 +261,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 +274,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,11 +339,17 @@ 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;
|
||||
}
|
||||
|
||||
void Option::PopulateTextToNum(){
|
||||
for (uint8_t count = 0; count < options.size(); count++){
|
||||
optionsTextToVar[options[count]] = count;
|
||||
}
|
||||
}
|
||||
|
||||
TrickOption::TrickOption(const RandomizerCheckQuest quest_, const RandomizerArea area_, std::set<Tricks::Tag> tags_, const bool glitch_, const std::string& name_, std::string description_) :
|
||||
Option(false, name_, {"Disabled", "Enabled"}, OptionCategory::Setting, "",
|
||||
std::move(description_), WidgetType::Checkbox, 0, false, IMFLAG_NONE),
|
||||
|
@ -363,26 +380,26 @@ const std::set<Tricks::Tag>& TrickOption::GetTags() const {
|
|||
}
|
||||
|
||||
OptionGroup::OptionGroup(std::string name, std::vector<Option*> options, const OptionGroupType groupType,
|
||||
const bool printInSpoiler, const WidgetContainerType containerType, std::string description)
|
||||
: mName(std::move(name)), mOptions(std::move(options)), mGroupType(groupType), mPrintInSpoiler(printInSpoiler),
|
||||
const WidgetContainerType containerType, std::string description)
|
||||
: mName(std::move(name)), mOptions(std::move(options)), mGroupType(groupType),
|
||||
mContainerType(containerType), mDescription(std::move(description)) {
|
||||
}
|
||||
|
||||
OptionGroup::OptionGroup(std::string name, std::vector<OptionGroup*> subGroups, const OptionGroupType groupType,
|
||||
const bool printInSpoiler, const WidgetContainerType containerType, std::string description)
|
||||
: mName(std::move(name)), mSubGroups(std::move(subGroups)), mGroupType(groupType), mPrintInSpoiler(printInSpoiler),
|
||||
const WidgetContainerType containerType, std::string description)
|
||||
: mName(std::move(name)), mSubGroups(std::move(subGroups)), mGroupType(groupType),
|
||||
mContainsType(OptionGroupType::SUBGROUP), mContainerType(containerType), mDescription(std::move(description)) {
|
||||
}
|
||||
|
||||
OptionGroup OptionGroup::SubGroup(std::string name, std::vector<Option*> options, const bool printInSpoiler,
|
||||
OptionGroup OptionGroup::SubGroup(std::string name, std::vector<Option*> options,
|
||||
const WidgetContainerType containerType, std::string description) {
|
||||
return {std::move(name), std::move(options), OptionGroupType::SUBGROUP, printInSpoiler, containerType,
|
||||
return {std::move(name), std::move(options), OptionGroupType::SUBGROUP, containerType,
|
||||
std::move(description)};
|
||||
}
|
||||
|
||||
OptionGroup OptionGroup::SubGroup(std::string name, std::vector<OptionGroup*> subGroups, const bool printInSpoiler,
|
||||
OptionGroup OptionGroup::SubGroup(std::string name, std::vector<OptionGroup*> subGroups,
|
||||
const WidgetContainerType containerType, std::string description) {
|
||||
return {std::move(name), std::move(subGroups), OptionGroupType::SUBGROUP, printInSpoiler, containerType,
|
||||
return {std::move(name), std::move(subGroups), OptionGroupType::SUBGROUP, containerType,
|
||||
std::move(description)};
|
||||
}
|
||||
|
||||
|
@ -398,10 +415,6 @@ const std::vector<OptionGroup*>& OptionGroup::GetSubGroups() const {
|
|||
return mSubGroups;
|
||||
}
|
||||
|
||||
bool OptionGroup::PrintInSpoiler() const {
|
||||
return mPrintInSpoiler;
|
||||
}
|
||||
|
||||
OptionGroupType OptionGroup::GetGroupType() const {
|
||||
return mGroupType;
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ class Option {
|
|||
* @param options_ A vector of value names for this Option. This vector should have a size of 2.
|
||||
* The name corresponding to the selected index for this option will be printed to the spoiler/patch file.
|
||||
* @param category_ The desired `OptionCategory` for this option.
|
||||
* @param cvarName_ The name ofthe CVar this option should correspond with. Set as an empty string to not
|
||||
* @param cvarName_ The name of the CVar this option should correspond with. Set as an empty string to not
|
||||
* link to any Cvar.
|
||||
* @param description_ A description of what this option affects. Will be rendered in a toolip in ImGui.
|
||||
* @param description_ A description of what this option affects. Will be rendered in a tooltip in ImGui.
|
||||
* Can be left as an empty string if desired, no tooltip will be rendered.
|
||||
* @param widgetType_ What type of widget should be rendered. Should probably be `Checkbox` but technically
|
||||
* `Combobox` or `Slider` would render and function correctly.
|
||||
|
@ -305,6 +305,8 @@ class Option {
|
|||
void SetFlag(int imFlag_);
|
||||
void RemoveFlag(int imFlag_);
|
||||
|
||||
void SetContextIndexFromText(std::string text);
|
||||
|
||||
protected:
|
||||
Option(uint8_t var_, std::string name_, std::vector<std::string> options_, OptionCategory category_,
|
||||
std::string cvarName_, std::string description_, WidgetType widgetType_, uint8_t defaultOption_,
|
||||
|
@ -318,6 +320,7 @@ protected:
|
|||
bool RenderTristateCheckbox();
|
||||
bool RenderCombobox();
|
||||
bool RenderSlider();
|
||||
void PopulateTextToNum();
|
||||
std::variant<bool, uint8_t> var;
|
||||
std::string name;
|
||||
std::vector<std::string> options;
|
||||
|
@ -335,6 +338,7 @@ protected:
|
|||
bool disabled = false;
|
||||
UIWidgets::CheckboxGraphics disabledGraphic = UIWidgets::CheckboxGraphics::Cross;
|
||||
std::string disabledText;
|
||||
std::unordered_map<std::string, uint8_t> optionsTextToVar = {};
|
||||
};
|
||||
|
||||
class TrickOption : public Option {
|
||||
|
@ -416,13 +420,11 @@ class OptionGroup {
|
|||
* @param options A vector of Option pointers
|
||||
* @param groupType `DEFAULT` if this group is not contained within any other groups, `SUBGROUP` if it is a
|
||||
* subgroup of another group.
|
||||
* @param printInSpoiler Whether or not to print the contents of this group to the spoiler/patch file.
|
||||
* @param containerType Specifies the type of container this widget should render as in ImGui.
|
||||
* @param description A description that can appear in a tooltip in ImGui.
|
||||
*/
|
||||
OptionGroup(std::string name, std::vector<Option*> options, OptionGroupType groupType = OptionGroupType::DEFAULT,
|
||||
bool printInSpoiler = true, WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
std::string description = "");
|
||||
WidgetContainerType containerType = WidgetContainerType::BASIC, std::string description = "");
|
||||
|
||||
/**
|
||||
* @brief Construct a new Option Group containing a list of `OptionGroup` pointers.
|
||||
|
@ -431,13 +433,11 @@ class OptionGroup {
|
|||
* @param subGroups A vector of OptionGroup pointers that will be subgroups of this group.
|
||||
* @param groupType `DEFAULT` if this group is not contained within any other groups, `SUBGROUP` if it is a
|
||||
* subgroup of another group.
|
||||
* @param printInSpoiler Whether or not to print the contents of this group to spoiler/patch file.
|
||||
* @param containerType Specifies the type of container this widget should render as in ImGui.
|
||||
* @param description A description that can appear in a tooltip in ImGui.
|
||||
*/
|
||||
OptionGroup(std::string name, std::vector<OptionGroup*> subGroups, OptionGroupType groupType = OptionGroupType::DEFAULT,
|
||||
bool printInSpoiler = true, WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
std::string description = "");
|
||||
WidgetContainerType containerType = WidgetContainerType::BASIC, std::string description = "");
|
||||
|
||||
/**
|
||||
* @brief Convenience function for constructing an OptionGroup of groupType `SUBGROUP` with
|
||||
|
@ -445,13 +445,11 @@ class OptionGroup {
|
|||
*
|
||||
* @param name The name of this option group. Appears in the spoiler/patch file.
|
||||
* @param options A vector of Option pointers.
|
||||
* @param printInSpoiler Whether or not to print the options of this group to the spoiler/patch file.
|
||||
* @param containerType Specifies the type of container this widget should render as in ImGui.
|
||||
* @param description A description that can appear in a tooltip in ImGui.
|
||||
* @return OptionGroup
|
||||
*/
|
||||
static OptionGroup SubGroup(std::string name, std::vector<Option*> options, bool printInSpoiler = true,
|
||||
WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
static OptionGroup SubGroup(std::string name, std::vector<Option*> options, WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
std::string description = "");
|
||||
|
||||
/**
|
||||
|
@ -460,13 +458,11 @@ class OptionGroup {
|
|||
*
|
||||
* @param name The name of this option group. Appears in the spoiler/patch file.
|
||||
* @param subGroups A vector of OptionGroup pointers.
|
||||
* @param printInSpoiler Whether or not to print the options of this group to the spoiler/patch file.
|
||||
* @param containerType Specifies the type of container this widget should render as in ImGui.
|
||||
* @param description A description that can appear in a tooltip in ImGui.
|
||||
* @return OptionGroup
|
||||
*/
|
||||
static OptionGroup SubGroup(std::string name, std::vector<OptionGroup*> subGroups, bool printInSpoiler = true,
|
||||
WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
static OptionGroup SubGroup(std::string name, std::vector<OptionGroup*> subGroups, WidgetContainerType containerType = WidgetContainerType::BASIC,
|
||||
std::string description = "");
|
||||
|
||||
/**
|
||||
|
@ -490,15 +486,6 @@ class OptionGroup {
|
|||
*/
|
||||
const std::vector<OptionGroup*>& GetSubGroups() const;
|
||||
|
||||
/**
|
||||
* @brief Returns whether or not this `OptionGroup`'s contents should be printed to the
|
||||
* spoiler/patch file.
|
||||
*
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool PrintInSpoiler() const;
|
||||
|
||||
/**
|
||||
* @brief Get the Group Type of this `OptionGroup`. `DEFAULT` means this group is not contained
|
||||
* within any other groups, while `SUBGROUP` means that it is contained within at least one other.
|
||||
|
@ -532,7 +519,6 @@ class OptionGroup {
|
|||
std::vector<Option*> mOptions;
|
||||
std::vector<OptionGroup*> mSubGroups;
|
||||
OptionGroupType mGroupType = OptionGroupType::DEFAULT;
|
||||
bool mPrintInSpoiler = true;
|
||||
OptionGroupType mContainsType = OptionGroupType::DEFAULT;
|
||||
WidgetContainerType mContainerType = WidgetContainerType::BASIC;
|
||||
std::string mDescription;
|
||||
|
|
|
@ -43,14 +43,15 @@ void Settings::CreateOptionDescriptions() {
|
|||
"Choose which age Link will start as.\n\n"
|
||||
"Starting as adult means you start with the Master Sword in your inventory.\n"
|
||||
"The child option is forcefully set if it would conflict with other options.";
|
||||
mOptionDescriptions[RSK_GERUDO_FORTRESS] = "Sets the amount of carpenters required to repair the bridge "
|
||||
"in Gerudo Valley.\n"
|
||||
mOptionDescriptions[RSK_GERUDO_FORTRESS] = "Sets the state of the carpenters captured by Gerudo "
|
||||
"in Gerudo Fortress, and with it the number of guards that spawn.\n"
|
||||
"\n"
|
||||
"Normal - All 4 carpenters are required to be saved.\n"
|
||||
"\n"
|
||||
"Fast - Only the bottom left carpenter requires rescuing.\n"
|
||||
"\n"
|
||||
"Open - The bridge is repaired from the start.\n"
|
||||
"Free - The bridge is repaired from the start, and Nabooru cannot spawn.\n"
|
||||
"If the Gerudo Membership Card isn't shuffled, you start with it.\n"
|
||||
"\n"
|
||||
"Only \"Normal\" is compatible with Gerudo Fortress Key Rings.";
|
||||
mOptionDescriptions[RSK_RAINBOW_BRIDGE] =
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -2661,6 +2661,7 @@ typedef enum {
|
|||
RHT_MORPHA,
|
||||
RHT_BONGO_BONGO,
|
||||
RHT_TWINROVA,
|
||||
RHT_GIFT_FROM_SAGES,
|
||||
RHT_SONG_FROM_IMPA,
|
||||
RHT_SONG_FROM_MALON,
|
||||
RHT_SONG_FROM_SARIA,
|
||||
|
@ -4198,7 +4199,7 @@ typedef enum {
|
|||
typedef enum {
|
||||
RO_GF_NORMAL,
|
||||
RO_GF_FAST,
|
||||
RO_GF_OPEN,
|
||||
RO_GF_FREE,
|
||||
} RandoOptionGerudoFortress;
|
||||
|
||||
//Kakariko Gate settings (closed/open)
|
||||
|
|
|
@ -206,7 +206,7 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
|
|||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_KAK_TOKENS) && // 100 skull reward ganon boss key
|
||||
(location.GetRCType() != RCTYPE_GF_KEY && location.GetRandomizerCheck() != RC_GF_GERUDO_MEMBERSHIP_CARD ||
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_OPEN &&
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_FREE &&
|
||||
location.GetRCType() != RCTYPE_GF_KEY && location.GetRandomizerCheck() != RC_GF_GERUDO_MEMBERSHIP_CARD) ||
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_FAST &&
|
||||
((location.GetRandomizerCheck() == RC_GF_GERUDO_MEMBERSHIP_CARD &&
|
||||
|
|
|
@ -1185,7 +1185,7 @@ void LoadSettings() {
|
|||
fortressFast = false;
|
||||
fortressNormal = false;
|
||||
switch (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_FORTRESS)) {
|
||||
case RO_GF_OPEN:
|
||||
case RO_GF_FREE:
|
||||
showGerudoFortressKeys = false;
|
||||
showGerudoCard = false;
|
||||
break;
|
||||
|
|
|
@ -267,13 +267,6 @@ s16 Entrance_PeekNextIndexOverride(int16_t nextEntranceIndex) {
|
|||
}
|
||||
|
||||
s16 Entrance_OverrideNextIndex(s16 nextEntranceIndex) {
|
||||
// When entering Spirit Temple, clear temp flags so they don't carry over to the randomized dungeon
|
||||
if (nextEntranceIndex == ENTR_SPIRIT_TEMPLE_ENTRANCE && Entrance_GetOverride(nextEntranceIndex) != nextEntranceIndex &&
|
||||
gPlayState != NULL) {
|
||||
gPlayState->actorCtx.flags.tempSwch = 0;
|
||||
gPlayState->actorCtx.flags.tempCollect = 0;
|
||||
}
|
||||
|
||||
// Exiting through the crawl space from Hyrule Castle courtyard is the same exit as leaving Ganon's castle
|
||||
// Don't override the entrance if we came from the Castle courtyard (day and night scenes)
|
||||
if (gPlayState != NULL && (gPlayState->sceneNum == SCENE_CASTLE_COURTYARD_GUARDS_DAY || gPlayState->sceneNum == SCENE_CASTLE_COURTYARD_GUARDS_NIGHT) &&
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ extern "C" void Randomizer_InitSaveFile() {
|
|||
}
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_FAST ||
|
||||
Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) {
|
||||
Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_FREE) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_CARPENTERS_FREE(1));
|
||||
Flags_SetEventChkInf(EVENTCHKINF_CARPENTERS_FREE(2));
|
||||
Flags_SetEventChkInf(EVENTCHKINF_CARPENTERS_FREE(3));
|
||||
|
@ -471,7 +471,7 @@ extern "C" void Randomizer_InitSaveFile() {
|
|||
gSaveContext.sceneFlags[SCENE_THIEVES_HIDEOUT].collect |= (1 << 0x0F);
|
||||
}
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) {
|
||||
if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_FREE) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_CARPENTERS_FREE(0));
|
||||
gSaveContext.sceneFlags[SCENE_THIEVES_HIDEOUT].swch |= (1 << 0x01); // heard yell and unlocked door
|
||||
gSaveContext.sceneFlags[SCENE_THIEVES_HIDEOUT].swch |= (1 << 0x05);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,14 @@ class Settings {
|
|||
*/
|
||||
void CreateOptions();
|
||||
|
||||
/**
|
||||
* @brief Populates the map used to translate strings into RandomiserSettingKeys
|
||||
*
|
||||
* @return std::unordered_map<std::string, RandomizerSettingKey>
|
||||
*/
|
||||
|
||||
std::unordered_map<std::string, RandomizerSettingKey> PopulateOptionNameToEnum();
|
||||
|
||||
/**
|
||||
* @brief Get a reference to the `Option` corresponding to the provided RandomizerSettingKey.
|
||||
*
|
||||
|
@ -192,7 +200,6 @@ class Settings {
|
|||
std::array<OptionGroup, RSG_MAX> mOptionGroups = {};
|
||||
std::array<TrickOption, RT_MAX> mTrickOptions = {};
|
||||
std::vector<std::vector<Option*>> mExcludeLocationsOptionsAreas = {};
|
||||
std::unordered_map<std::string, RandomizerSettingKey> mSpoilerfileSettingNameToEnum;
|
||||
RandoOptionStartingAge mResolvedStartingAge = RO_AGE_CHILD;
|
||||
RandoOptionLACSCondition mLACSCondition = RO_LACS_VANILLA;
|
||||
std::string mHash;
|
||||
|
|
|
@ -251,7 +251,8 @@ std::unordered_map<std::string, uint32_t> StaticData::hintNameToEnum = {};
|
|||
std::unordered_map<std::string, uint32_t> StaticData::hintTypeNameToEnum = {};
|
||||
std::unordered_map<std::string, uint32_t> StaticData::areaNameToEnum = {};
|
||||
std::unordered_map<std::string, uint32_t> StaticData::trialNameToEnum = {};
|
||||
std::unordered_map<std::string, RandomizerCheck> StaticData::locationNameToEnum = {}; //is filled in context based on location table, not touching that because of VB
|
||||
std::unordered_map<std::string, RandomizerSettingKey> StaticData::optionNameToEnum = {};
|
||||
std::unordered_map<std::string, RandomizerCheck> StaticData::locationNameToEnum = {}; //is filled in context based on location table
|
||||
|
||||
std::unordered_map<u32, RandomizerHint> StaticData::stoneParamsToHint{
|
||||
{0x1, RH_ZF_FAIRY_GOSSIP_STONE},
|
||||
|
|
|
@ -61,6 +61,7 @@ class StaticData {
|
|||
static std::unordered_map<std::string, uint32_t> areaNameToEnum;
|
||||
static std::unordered_map<uint32_t, RandomizerHintTextKey> trialData;
|
||||
static std::unordered_map<std::string, uint32_t> trialNameToEnum;
|
||||
static std::unordered_map<std::string, RandomizerSettingKey> optionNameToEnum;
|
||||
static std::unordered_map<RandomizerHint, StaticHintInfo> staticHintInfoMap;
|
||||
static std::unordered_map<u32, RandomizerHint> stoneParamsToHint;
|
||||
static std::unordered_map<u32, RandomizerHint> grottoChestParamsToHint;
|
||||
|
|
|
@ -35,10 +35,10 @@ 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);
|
||||
extern void EnRu2_SetEncounterSwitchFlag(EnRu2* enRu2, PlayState* play);
|
||||
}
|
||||
|
||||
#define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetContextOptionIndex()
|
||||
|
@ -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:
|
||||
|
@ -338,11 +340,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NAVI)) {
|
||||
ElfMsg* naviTalk = va_arg(args, ElfMsg*);
|
||||
int32_t paramsHighByte = naviTalk->actor.params >> 8;
|
||||
if ((paramsHighByte & 0x80) == 0 && (paramsHighByte & 0x3F) != 0x3F) {
|
||||
Flags_SetSwitch(gPlayState, paramsHighByte & 0x3F);
|
||||
Actor_Kill(&naviTalk->actor);
|
||||
*should = false;
|
||||
if ((paramsHighByte & 0x80) != 0) {
|
||||
break;
|
||||
}
|
||||
if ((paramsHighByte & 0x3F) != 0x3F) {
|
||||
Flags_SetSwitch(gPlayState, paramsHighByte & 0x3F);
|
||||
}
|
||||
Actor_Kill(&naviTalk->actor);
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -404,6 +409,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 +827,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;
|
||||
|
@ -883,7 +896,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
|||
if (actor->id == ACTOR_EN_RU2 && gPlayState->sceneNum == SCENE_WATER_TEMPLE) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
EnRu2* enRu2 = (EnRu2*)actor;
|
||||
func_80AF36EC(enRu2, gPlayState);
|
||||
EnRu2_SetEncounterSwitchFlag(enRu2, gPlayState);
|
||||
Actor_Kill(actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4558,25 +4558,25 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
|
|||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3) {
|
||||
s16 Actor_UpdateAlphaByDistance(Actor* actor, PlayState* play, s16 alpha, f32 radius) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 var;
|
||||
f32 distance;
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) {
|
||||
var = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
|
||||
distance = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
|
||||
} else {
|
||||
var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
|
||||
distance = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
|
||||
}
|
||||
|
||||
if (arg3 < var) {
|
||||
if (radius < distance) {
|
||||
actor->flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1);
|
||||
Math_SmoothStepToS(&alpha, 0, 6, 0x14, 1);
|
||||
} else {
|
||||
actor->flags |= ACTOR_FLAG_TARGETABLE;
|
||||
Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1);
|
||||
Math_SmoothStepToS(&alpha, 0xFF, 6, 0x14, 1);
|
||||
}
|
||||
|
||||
return arg2;
|
||||
return alpha;
|
||||
}
|
||||
|
||||
void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 index) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ void func_80AAB5A4(EnMd* this, PlayState* play) {
|
|||
: 400.0f;
|
||||
}
|
||||
|
||||
this->alpha = func_80034DD4(&this->actor, play, this->alpha, temp);
|
||||
this->alpha = Actor_UpdateAlphaByDistance(&this->actor, play, this->alpha, temp);
|
||||
this->actor.shape.shadowAlpha = this->alpha;
|
||||
} else {
|
||||
this->alpha = 255;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,18 +14,18 @@ typedef struct EnRu2 {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s jointTable[23];
|
||||
/* 0x021A */ Vec3s morphTable[23];
|
||||
/* 0x02A4 */ s16 unk_2A4;
|
||||
/* 0x02A6 */ s16 unk_2A6;
|
||||
/* 0x02A4 */ s16 eyeIndex;
|
||||
/* 0x02A6 */ s16 blinkTimer;
|
||||
/* 0x02A8 */ s32 action;
|
||||
/* 0x02AC */ s32 drawConfig;
|
||||
/* 0x02B0 */ f32 unk_2B0;
|
||||
/* 0x02B0 */ f32 fadeTimer;
|
||||
/* 0x02B4 */ u32 alpha;
|
||||
/* 0x02B8 */ s32 unk_2B8;
|
||||
/* 0x02BC */ s32 unk_2BC;
|
||||
/* 0x02C0 */ u16 unk_2C0;
|
||||
/* 0x02C2 */ u8 unk_2C2;
|
||||
/* 0x02C3 */ u8 unk_2C3;
|
||||
/* 0x02C4 */ f32 unk_2C4;
|
||||
/* 0x02B8 */ s32 isLightBall;
|
||||
/* 0x02BC */ s32 cueId;
|
||||
/* 0x02C0 */ u16 swimmingUpFrame;
|
||||
/* 0x02C2 */ u8 textboxCount;
|
||||
/* 0x02C3 */ u8 lastDialogState;
|
||||
/* 0x02C4 */ f32 encounterTimer;
|
||||
/* 0x02C8 */ ColliderCylinder collider;
|
||||
/* 0x02C8 */ s16 subCamId;
|
||||
} EnRu2; // size = 0x0314
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "z64cutscene_commands.h"
|
||||
|
||||
// clang-format off
|
||||
static CutsceneData D_80AF411C[] = {
|
||||
static CutsceneData gWaterMedallionCs[] = {
|
||||
CS_BEGIN_CUTSCENE(35, 3338),
|
||||
CS_UNK_DATA_LIST(0x00000020, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
|
|
@ -742,10 +742,10 @@ void EnSa_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->actionFunc != func_80AF68E4) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableKokiriDrawDistance"), 0) != 0) {
|
||||
this->alpha = func_80034DD4(&this->actor, play, this->alpha, 32767);
|
||||
this->alpha = Actor_UpdateAlphaByDistance(&this->actor, play, this->alpha, 32767);
|
||||
}
|
||||
else {
|
||||
this->alpha = func_80034DD4(&this->actor, play, this->alpha, 400.0f);
|
||||
this->alpha = Actor_UpdateAlphaByDistance(&this->actor, play, this->alpha, 400.0f);
|
||||
}
|
||||
} else {
|
||||
this->alpha = 255;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -5147,9 +5147,9 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
|
|||
|
||||
Scene_SetTransitionForNextEntrance(play);
|
||||
} else {
|
||||
// In Entrance rando, if our respawnFlag is set for a grotto return, we don't want the void out to happen
|
||||
if (SurfaceType_GetSlope(&play->colCtx, poly, bgId) == 2 &&
|
||||
(!IS_RANDO || (Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) && gSaveContext.respawnFlag != 2))) {
|
||||
if (GameInteractor_Should(VB_SET_VOIDOUT_FROM_SURFACE,
|
||||
SurfaceType_GetSlope(&play->colCtx, poly, bgId) == 2,
|
||||
play->setupExitList[exitIndex - 1])) {
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex;
|
||||
Play_TriggerVoidOut(play);
|
||||
gSaveContext.respawnFlag = -2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue