Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer

This commit is contained in:
gymnast86
2026-05-23 09:11:07 -07:00
11 changed files with 401 additions and 207 deletions
+21 -9
View File
@@ -26,15 +26,16 @@
#include "f_op/f_op_overlap_mng.h"
#include "JSystem/JAudio2/JASCriticalSection.h"
#if TARGET_PC
#include "dusk/gx_helper.h"
#include "dusk/os.h"
#include "dusk/layout.hpp"
#include "JSystem/JAudio2/JASCriticalSection.h"
#if MOVIE_SUPPORT
#include "turbojpeg.h"
#endif
#endif
inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
return *(BE(s32)*)readBuf->ptr;
@@ -3912,13 +3913,20 @@ static BOOL daMP_ProperTimingForGettingNextFrame() {
return TRUE;
}
} else {
s32 frameRate = daMP_ActivePlayer.header.frameRate * 100.0f;
#if TARGET_PC
// DUSK HACK: We only fire retrace callbacks *half* as often as the game expects,
// because we only run them once per frame, and normally there should be two scans
// per game frame.
frameRate *= 2;
#endif
const f32 fps = daMP_ActivePlayer.header.frameRate;
if (fps > 0.0f) {
const f32 elapsed = std::chrono::duration<f32>(
std::chrono::steady_clock::now() - daMP_ActivePlayer.thpPlaybackClock).count();
const s32 desired = static_cast<s32>(elapsed * fps);
if (desired != daMP_ActivePlayer.prevCount) {
daMP_ActivePlayer.prevCount = desired;
daMP_ActivePlayer.curCount = desired;
return TRUE;
}
}
#else
s32 frameRate = daMP_ActivePlayer.header.frameRate * 100.0f;
if (VIGetTvFormat() == VI_PAL) {
daMP_ActivePlayer.curCount = daMP_ActivePlayer.retaceCount * frameRate / 5000;
} else {
@@ -3929,6 +3937,7 @@ static BOOL daMP_ProperTimingForGettingNextFrame() {
daMP_ActivePlayer.prevCount = daMP_ActivePlayer.curCount;
return TRUE;
}
#endif
}
return FALSE;
@@ -4133,6 +4142,9 @@ static BOOL daMP_THPPlayerPlay() {
daMP_ActivePlayer.prevCount = 0;
daMP_ActivePlayer.curCount = 0;
daMP_ActivePlayer.retaceCount = -1;
#if TARGET_PC
daMP_ActivePlayer.thpPlaybackClock = std::chrono::steady_clock::now();
#endif
return TRUE;
}
+1 -1
View File
@@ -442,7 +442,7 @@ std::vector<AchievementSystem::Entry> AchievementSystem::makeEntries() {
{
"dark_hammer_one_hit",
"Mortal Edge",
"Defeat Dark Hammer in a single hit.",
"Defeat Darkhammer in a single hit.",
AchievementCategory::Misc,
false, 0, 0, false
},
+2 -2
View File
@@ -323,8 +323,8 @@ namespace dusk {
}
ImGui::PushFont(ImGuiEngine::fontLarge);
ImGuiTextCenter("Failed to initialize any graphics backend.");
ImGuiTextCenter("\nDusklight requires Vulkan 1.1+, or Direct X 12.0.");
ImGuiTextCenter("\nTry updating your Operating System and GPU drivers.");
ImGuiTextCenter("\nDusklight requires at least Vulkan 1.1 or Direct3D 12.");
ImGuiTextCenter("\nTry updating your operating system and GPU drivers.");
const auto& style = ImGui::GetStyle();
const auto retrySize = ImGui::CalcTextSize("Retry (Auto backend)");
const auto quitSize = ImGui::CalcTextSize("Quit");
+5
View File
@@ -887,14 +887,19 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
config_bool_select(leftPane, rightPane, getSettings().game.enableDepthOfField,
{
.key = "Enable Depth of Field",
.helpText = "Render a blurring effect for out-of-focus areas in some situations. May impact performance."
});
config_bool_select(leftPane, rightPane, getSettings().game.enableMapBackground,
{
.key = "Enable Mini-Map Shadows",
.helpText = "Render a thick shadow around the mini-map. May impact performance."
});
config_bool_select(leftPane, rightPane, getSettings().game.disableCutscenePillarboxing,
{
.key = "Disable Cutscene Pillarboxing",
.helpText = "Disable black bars on the left and right sides of the screen "
"during some cutscenes, particularly on ultra-wide displays. "
"Visuals beyond the original intended framing may appear buggy."
});
});
+1
View File
@@ -315,6 +315,7 @@ NavCommand map_nav_event(const Rml::Event& event) noexcept {
case Rml::Input::KeyIdentifier::KI_ESCAPE:
return NavCommand::Cancel;
case Rml::Input::KeyIdentifier::KI_RETURN:
case Rml::Input::KeyIdentifier::KI_NUMPADENTER:
return NavCommand::Confirm;
case Rml::Input::KeyIdentifier::KI_F1:
return event.GetParameter<int>("shift_key", 0) ? NavCommand::None : NavCommand::Menu;