Compare commits

..

5 Commits

Author SHA1 Message Date
Luke Street 595a6f1c9e Enable DoF (+ setting) & fix texture cache leak 2026-04-21 14:52:26 -06:00
MelonSpeedruns 18d70df188 Small Imgui changes for better visibility by end user (#473)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-21 10:17:56 -06:00
TakaRikka 46f6dc67c1 make file select card wait times obey instantSaves setting 2026-04-21 00:46:22 -07:00
madeline 6267b79da3 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 20:22:12 -07:00
madeline 62f3d09076 fix incorrect eldin field name on map 2026-04-20 20:22:06 -07:00
7 changed files with 33 additions and 14 deletions
+1 -1
+3 -1
View File
@@ -75,7 +75,9 @@ public:
/* 0x8 */ BE(u16) mAreaName;
/* 0xA */ u8 mCount;
#ifdef _MSVC_LANG
u8* __get_mRoomNos() const { return (u8*)(this + 1); }
// Room numbers start at offset 0xB (right after mCount), NOT at sizeof(data)=12.
// (u8*)(this+1) would give offset 12 because MSVC sizeof=12; use &mCount+1 instead.
u8* __get_mRoomNos() const { return (u8*)&mCount + 1; }
__declspec(property(get = __get_mRoomNos)) u8* mRoomNos;
#else
/* 0xB */ u8 mRoomNos[0];
+1
View File
@@ -77,6 +77,7 @@ struct UserSettings {
ConfigVar<bool> enableFrameInterpolation;
ConfigVar<int> internalResolutionScale;
ConfigVar<int> shadowResolutionMultiplier;
ConfigVar<bool> enableDepthOfField;
// Audio
ConfigVar<bool> noLowHpSound;
+3 -7
View File
@@ -70,11 +70,7 @@ dFs_HIO_c::dFs_HIO_c() {
select_icon_appear_frames = 5;
appear_display_wait_frames = 15;
field_0x000d = 15;
#if TARGET_PC
card_wait_frames = 0;
#else
card_wait_frames = 90;
#endif
test_frame_counts[0] = 1.11f;
test_frame_counts[1] = 1.11f;
test_frame_counts[2] = 1.11f;
@@ -2367,7 +2363,7 @@ void dFile_select_c::CommandExec() {
break;
}
mWaitTimer = g_fsHIO.card_wait_frames;
mWaitTimer = IF_DUSK(dusk::getSettings().game.instantSaves ? 0 :) g_fsHIO.card_wait_frames;
}
void dFile_select_c::DataEraseWait() {
@@ -4759,7 +4755,7 @@ void dFile_select_c::MemCardFormatYesSel2Disp() {
bool isErrorTxtChange = errorTxtChangeAnm();
bool isYnMenuMove = yesnoMenuMoveAnm();
if (isErrorTxtChange == true && isYnMenuMove == true) {
mWaitTimer = g_fsHIO.card_wait_frames;
mWaitTimer = IF_DUSK(dusk::getSettings().game.instantSaves ? 0 :) g_fsHIO.card_wait_frames;
mDoMemCd_Format();
mCardCheckProc = MEMCARDCHECKPROC_FORMAT;
}
@@ -4830,7 +4826,7 @@ void dFile_select_c::MemCardMakeGameFileSelDisp() {
if (isErrorTxtChange == true && isYnMenuMove == true && isKetteiTxtDisp == true) {
if (field_0x0268 != 0) {
mWaitTimer = g_fsHIO.card_wait_frames;
mWaitTimer = IF_DUSK(dusk::getSettings().game.instantSaves ? 0 :) g_fsHIO.card_wait_frames;
setInitSaveData();
dataSave();
mCardCheckProc = MEMCARDCHECKPROC_MAKE_GAMEFILE;
+20 -5
View File
@@ -67,7 +67,7 @@ namespace dusk {
ToggleFullscreen();
}
if (ImGui::MenuItem("Restore Default Window Size")) {
if (ImGui::Button("Restore Default Window Size")) {
getSettings().video.enableFullscreen.setValue(false);
VISetWindowFullscreen(false);
VISetWindowSize(FB_WIDTH * 2, FB_HEIGHT * 2);
@@ -75,6 +75,8 @@ namespace dusk {
}
}
ImGui::Separator();
bool vsync = getSettings().video.enableVsync;
if (ImGui::Checkbox("Enable VSync", &vsync)) {
getSettings().video.enableVsync.setValue(vsync);
@@ -163,6 +165,8 @@ namespace dusk {
ImGui::Checkbox("Enable LOD Bias", &aurora::gx::enableLodBias);
config::ImGuiCheckbox("Enable Depth of Field", getSettings().game.enableDepthOfField);
ImGui::EndMenu();
}
}
@@ -312,14 +316,14 @@ namespace dusk {
void ImGuiMenuGame::drawAudioMenu() {
if (ImGui::BeginMenu("Audio")) {
ImGui::SeparatorText("Volume");
ImGui::Text("Master Volume");
if (config::ImGuiSliderInt("##masterVolume", getSettings().audio.masterVolume, 0, 100)) {
dusk::audio::SetMasterVolume(getSettings().audio.masterVolume / 100.0f);
}
if (config::ImGuiCheckbox("Enable Reverb", getSettings().audio.enableReverb)) {
dusk::audio::SetEnableReverb(getSettings().audio.enableReverb);
}
/*
// TODO: Implement additional settings
ImGui::Text("Main Music Volume");
@@ -339,6 +343,13 @@ namespace dusk {
}
*/
ImGui::SeparatorText("Effects");
if (config::ImGuiCheckbox("Enable Reverb", getSettings().audio.enableReverb)) {
dusk::audio::SetEnableReverb(getSettings().audio.enableReverb);
}
ImGui::SeparatorText("Tweaks");
config::ImGuiCheckbox("No Low HP Sound", getSettings().game.noLowHpSound);
@@ -359,7 +370,11 @@ namespace dusk {
if (ImGui::BeginMenu("Input")) {
ImGui::SeparatorText("Controller");
ImGui::MenuItem("Configure Controller", nullptr, &m_showControllerConfig);
if (ImGui::Button("Configure Controller")){
m_showControllerConfig = !m_showControllerConfig;
}
ImGui::SeparatorText("Camera");
config::ImGuiCheckbox("Invert Camera X Axis", getSettings().game.invertCameraXAxis);
+2
View File
@@ -51,6 +51,7 @@ UserSettings g_userSettings = {
.enableFrameInterpolation = {"game.enableFrameInterpolation", false},
.internalResolutionScale {"game.internalResolutionScale", 0},
.shadowResolutionMultiplier {"game.shadowResolutionMultiplier", 1},
.enableDepthOfField {"game.enableDepthOfField", true},
// Audio
.noLowHpSound {"game.noLowHpSound", false},
@@ -143,6 +144,7 @@ void registerSettings() {
Register(g_userSettings.game.disableWaterRefraction);
Register(g_userSettings.game.internalResolutionScale);
Register(g_userSettings.game.shadowResolutionMultiplier);
Register(g_userSettings.game.enableDepthOfField);
Register(g_userSettings.game.enableFastIronBoots);
Register(g_userSettings.game.canTransformAnywhere);
Register(g_userSettings.game.freeMagicArmor);
+3
View File
@@ -1155,6 +1155,9 @@ static void drawDepth2(view_class* param_0, view_port_class* param_1, int param_
GXSetProjection(ortho, GX_ORTHOGRAPHIC);
GXSetCurrentMtx(0);
#ifdef TARGET_PC
if (dusk::getSettings().game.enableDepthOfField)
#endif
if (l_tevColor0.a > -255 && sp8 == 1) {
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
GXPosition3s16(x_orig, y_orig_pos, -5);