Third Dusk Preset (#331)

* fix aspect ratio not changing when applying the sd preset

* Added a third preset, and renamed SD preset to Classic

* show preset menu before setting the iso

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
This commit is contained in:
MelonSpeedruns
2026-04-11 19:51:37 -04:00
committed by GitHub
parent aafd50cd09
commit eaf1b386a6
4 changed files with 32 additions and 26 deletions
-16
View File
@@ -18,10 +18,6 @@
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "m_Do/m_Do_graphic.h"
#if TARGET_PC
#include <dusk/config.hpp>
#endif
class daTit_HIO_c : public JORReflexible {
public:
daTit_HIO_c();
@@ -156,12 +152,6 @@ int daTitle_c::createHeapCallBack(fopAc_ac_c* actor) {
}
int daTitle_c::Execute() {
#if TARGET_PC
if (!dusk::getSettings().backend.wasPresetChosen) {
return 0;
}
#endif
#if PLATFORM_WII || PLATFORM_SHIELD
mDoGph_gInf_c::resetDimming();
#endif
@@ -380,12 +370,6 @@ int daTitle_c::getDemoPrm() {
}
int daTitle_c::Draw() {
#if TARGET_PC
if (!dusk::getSettings().backend.wasPresetChosen) {
return 0;
}
#endif
J3DModelData* modelData = mpModel->getModelData();
cMtx_trans(mpModel->getBaseTRMtx(), IREG_F(7), IREG_F(8), IREG_F(9) + -430.0f);
mpModel->getBaseScale()->x = -1.0f;
+2 -4
View File
@@ -237,10 +237,8 @@ namespace dusk {
m_preLaunchWindow.draw();
}
if (!m_isLaunchInitialized && !getSettings().backend.wasPresetChosen) {
if (dusk::IsGameLaunched) {
m_firstRunPreset.draw();
}
if (!getSettings().backend.wasPresetChosen) {
m_firstRunPreset.draw();
return;
}
+1 -1
View File
@@ -144,7 +144,7 @@ void ImGuiEngine_Initialize(float scale) {
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.60f);
}
Image GetImage(const std::string& path) {
+29 -5
View File
@@ -5,12 +5,14 @@
#include "ImGuiEngine.hpp"
#include "dusk/settings.h"
#include "dusk/config.hpp"
#include <dusk/dusk.h>
namespace dusk {
static void ApplyPresetStandard() {
static void ApplyPresetClassic() {
auto& s = getSettings();
s.video.lockAspectRatio.setValue(true);
VILockAspectRatio(defaultAspectRatioW, defaultAspectRatioH);
}
static void ApplyPresetHD() {
@@ -26,6 +28,16 @@ static void ApplyPresetHD() {
s.game.invertCameraXAxis.setValue(true);
}
static void ApplyPresetDusk() {
ApplyPresetHD();
auto& s = getSettings();
s.game.enableQuickTransform.setValue(true);
s.game.instantSaves.setValue(true);
s.game.midnasLamentNonStop.setValue(true);
s.game.enableFrameInterpolation.setValue(true);
}
// =========================================================================
void ImGuiFirstRunPreset::draw() {
@@ -55,18 +67,19 @@ void ImGuiFirstRunPreset::draw() {
int chosen = -1;
if (ImGui::BeginTable("##presets", 3, ImGuiTableFlags_None)) {
if (ImGui::BeginTable("##presets", 5, ImGuiTableFlags_None)) {
ImGui::TableSetupColumn(nullptr, ImGuiTableColumnFlags_WidthStretch);
ImGui::TableSetupColumn(nullptr, ImGuiTableColumnFlags_WidthFixed, 16.0f * ImGuiScale());
ImGui::TableSetupColumn(nullptr, ImGuiTableColumnFlags_WidthStretch);
ImGui::TableSetupColumn(nullptr, ImGuiTableColumnFlags_WidthFixed, 16.0f * ImGuiScale());
ImGui::TableSetupColumn(nullptr, ImGuiTableColumnFlags_WidthStretch);
ImGui::TableNextRow();
ImGui::PushFont(ImGuiEngine::fontLarge);
ImGui::TableSetColumnIndex(0);
if (ImGui::Button("Standard##btn", ImVec2(ImGui::GetContentRegionAvail().x, 80.0f * ImGuiScale()))) {
if (ImGui::Button("Classic##btn", ImVec2(ImGui::GetContentRegionAvail().x, 80.0f * ImGuiScale()))) {
chosen = 0;
}
@@ -75,6 +88,12 @@ void ImGuiFirstRunPreset::draw() {
chosen = 1;
}
ImGui::TableSetColumnIndex(4);
if (ImGui::Button("Dusk##btn", ImVec2(ImGui::GetContentRegionAvail().x, 80.0f * ImGuiScale())))
{
chosen = 2;
}
ImGui::PopFont();
ImGui::TableNextRow();
@@ -87,12 +106,17 @@ void ImGuiFirstRunPreset::draw() {
ImGui::Spacing();
ImGui::TextWrapped("Some enhancements enabled to match the HD version. A good starting point for most players!");
ImGui::TableSetColumnIndex(4);
ImGui::Spacing();
ImGui::TextWrapped("More enhancements enabled than the HD preset. Veteran players will appreciate the additional tweaks!");
ImGui::EndTable();
}
if (chosen >= 0) {
if (chosen == 0) ApplyPresetStandard();
if (chosen == 0) ApplyPresetClassic();
if (chosen == 1) ApplyPresetHD();
if (chosen == 2) ApplyPresetDusk();
getSettings().backend.wasPresetChosen.setValue(true);
config::Save();