Skip to content

Commit

Permalink
bump LUS (#4638)
Browse files Browse the repository at this point in the history
* bump LUS

* bump OTRExporter
  • Loading branch information
briaguya-ai authored Dec 8, 2024
1 parent bccd969 commit 732b8c1
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 105 deletions.
2 changes: 1 addition & 1 deletion OTRExporter
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 49 files
+15 −15 .github/workflows/build-validation.yml
+1 −1 .github/workflows/tidy-format-validation.yml
+4 −4 .github/workflows/tidy-result-publish.yml
+9 −0 CONTRIBUTING.md
+13 −2 cmake/dependencies/common.cmake
+17 −0 cmake/dependencies/patches/sdl-gamepad-fix.patch
+2 −22 include/libultraship/libultra/controller.h
+81 −9 include/libultraship/libultra/gbi.h
+7 −2 src/CMakeLists.txt
+14 −2 src/Context.cpp
+6 −6 src/audio/Audio.cpp
+2 −2 src/audio/Audio.h
+24 −0 src/audio/AudioPlayer.cpp
+10 −22 src/audio/AudioPlayer.h
+11 −8 src/config/Config.cpp
+2 −2 src/config/Config.h
+4 −9 src/controller/deviceindex/ControllerDisconnectedWindow.cpp
+3 −1 src/controller/deviceindex/ShipDeviceIndexMappingManager.cpp
+4 −0 src/graphic/Fast3D/Fast3dWindow.cpp
+1 −0 src/graphic/Fast3D/Fast3dWindow.h
+14 −4 src/graphic/Fast3D/gfx_direct3d11.cpp
+1 −1 src/graphic/Fast3D/gfx_direct3d12.cpp
+23 −3 src/graphic/Fast3D/gfx_direct3d_common.cpp
+1 −1 src/graphic/Fast3D/gfx_direct3d_common.h
+1 −1 src/graphic/Fast3D/gfx_dxgi.cpp
+81 −10 src/graphic/Fast3D/gfx_metal.cpp
+1 −0 src/graphic/Fast3D/gfx_metal.h
+27 −3 src/graphic/Fast3D/gfx_opengl.cpp
+219 −83 src/graphic/Fast3D/gfx_pc.cpp
+2 −1 src/graphic/Fast3D/gfx_rendering_api.h
+1 −1 src/graphic/Fast3D/gfx_sdl2.cpp
+20 −1 src/graphic/Fast3D/lus_gbi.h
+2 −0 src/public/bridge/gfxbridge.h
+55 −34 src/resource/ResourceManager.cpp
+21 −13 src/resource/ResourceManager.h
+28 −7 src/resource/archive/ArchiveManager.cpp
+8 −5 src/resource/archive/ArchiveManager.h
+44 −8 src/resource/factory/DisplayListFactory.cpp
+2 −1 src/resource/type/DisplayList.h
+3 −0 src/utils/glob.c
+3 −3 src/window/gui/GameOverlay.cpp
+1 −1 src/window/gui/GameOverlay.h
+22 −2 src/window/gui/GfxDebuggerWindow.cpp
+145 −131 src/window/gui/Gui.cpp
+23 −18 src/window/gui/Gui.h
+1 −1 src/window/gui/GuiMenuBar.cpp
+1 −1 src/window/gui/GuiWindow.cpp
+3 −3 src/window/gui/InputEditorWindow.cpp
+0 −3 src/window/gui/InputEditorWindow.h
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/audio/AudioCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,15 @@ 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) {
const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo->sfxKey;
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() {
Expand Down
30 changes: 15 additions & 15 deletions soh/soh/Enhancements/audio/AudioEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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);
}

Expand All @@ -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");
Expand All @@ -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);
}
}
Expand All @@ -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");
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand All @@ -736,13 +736,13 @@ void AudioEditor_LockAll() {
LockGroup(AudioCollection::Instance->GetAllSequences(), type);
}

Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
}

void AudioEditor_UnlockAll() {
for (auto type : allTypes) {
UnlockGroup(AudioCollection::Instance->GetAllSequences(), type);
}

Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
}
10 changes: 5 additions & 5 deletions soh/soh/Enhancements/controls/SohInputEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand All @@ -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();
}
}

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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();
Expand Down
Loading

0 comments on commit 732b8c1

Please sign in to comment.