diff --git a/ci/build-appimage.sh b/ci/build-appimage.sh index 3ce3021b97..078d6cabf0 100755 --- a/ci/build-appimage.sh +++ b/ci/build-appimage.sh @@ -15,4 +15,4 @@ cp platforms/freedesktop/dusk.desktop build/appdir/usr/share/applications cd build/install VERSION="$DUSK_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \ - --appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage + -l /usr/lib/x86_64-linux-gnu/libusb-1.0.so --appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage diff --git a/include/d/actor/d_a_balloon_2D.h b/include/d/actor/d_a_balloon_2D.h index f2dfa5e99f..193ecadbaa 100644 --- a/include/d/actor/d_a_balloon_2D.h +++ b/include/d/actor/d_a_balloon_2D.h @@ -44,6 +44,9 @@ public: int draw(); int execute(); void drawMeter(); + #if TARGET_PC + void updateOnWide(); + #endif void setComboCount(u8, u8); void setScoreCount(u32); void addScoreCount(cXyz*, u32, u8); diff --git a/include/dusk/settings.h b/include/dusk/settings.h index 7381ccafe5..67dce3c067 100644 --- a/include/dusk/settings.h +++ b/include/dusk/settings.h @@ -66,6 +66,7 @@ struct UserSettings { // Preferences ConfigVar enableMirrorMode; ConfigVar invertCameraXAxis; + ConfigVar disableMainHUD; // Graphics ConfigVar bloomMode; diff --git a/libs/JSystem/src/JFramework/JFWDisplay.cpp b/libs/JSystem/src/JFramework/JFWDisplay.cpp index ce4c870064..38dbc7eab1 100644 --- a/libs/JSystem/src/JFramework/JFWDisplay.cpp +++ b/libs/JSystem/src/JFramework/JFWDisplay.cpp @@ -393,7 +393,7 @@ static void waitPrecise(Limiter& limiter, Uint64 targetNs) { static void waitForTick(u32 p1, u16 p2) { #if TARGET_PC - if (dusk::getSettings().game.enableFrameInterpolation) { + if (dusk::getSettings().game.enableFrameInterpolation && !dusk::getTransientSettings().skipFrameRateLimit) { return; } if (dusk::getTransientSettings().skipFrameRateLimit) { diff --git a/src/d/actor/d_a_balloon_2D.cpp b/src/d/actor/d_a_balloon_2D.cpp index 957e7df281..6d9c66b464 100644 --- a/src/d/actor/d_a_balloon_2D.cpp +++ b/src/d/actor/d_a_balloon_2D.cpp @@ -268,6 +268,11 @@ int daBalloon2D_c::draw() { int daBalloon2D_c::execute() { setAllAlpha(); setComboAlpha(); + + #if TARGET_PC + updateOnWide(); + #endif + setHIO(false); return 1; } @@ -278,6 +283,15 @@ void daBalloon2D_c::drawMeter() { drawAddScore(); } +#if TARGET_PC +void daBalloon2D_c::updateOnWide() { + // Combo HUD + l_HOSTIO = {}; + + l_HOSTIO.m.m2DNumberCombo2PosX = mDoGph_gInf_c::ScaleHUDXRight(l_HOSTIO.m.m2DNumberCombo2PosX); + l_HOSTIO.m.mAdjustmentToggle = 1; +} +#endif void daBalloon2D_c::setComboCount(u8 size, u8 comboNum) { if (mComboNum != comboNum) { diff --git a/src/d/actor/d_a_npc_theB.cpp b/src/d/actor/d_a_npc_theB.cpp index 71704f9717..901c495543 100644 --- a/src/d/actor/d_a_npc_theB.cpp +++ b/src/d/actor/d_a_npc_theB.cpp @@ -239,6 +239,17 @@ cPhs_Step daNpcTheB_c::create() { fopAcM_ct(this, daNpcTheB_c); cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); +#if TARGET_PC + // !@bug On PC (and presumably the WiiU version) during the wagon escort, + // Telma's main() can queue the PERSONAL_COMBAT_INTRO (Telma's initial dialog when the escort starts) + // before Link's create() sets getPlayer(0), so demoCheck drops the event and the dialog never shows up + if (phase == cPhs_COMPLEATE_e && dComIfGp_getPlayer(0) == NULL && + strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0 && + dComIfG_play_c::getLayerNo(0) == 3) + { + return cPhs_INIT_e; + } +#endif if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x2CB0)) { return cPhs_ERROR_e; diff --git a/src/d/d_meter2.cpp b/src/d/d_meter2.cpp index aa5496dbba..5bd321e7a8 100644 --- a/src/d/d_meter2.cpp +++ b/src/d/d_meter2.cpp @@ -423,6 +423,13 @@ void dMeter2_c::setLifeZero() { void dMeter2_c::checkStatus() { mStatus = 0; + + #if TARGET_PC + if (dusk::getSettings().game.disableMainHUD) { + mStatus |= 0xF0000000; + } + #endif + field_0x12c = field_0x128; field_0x128 = daPy_py_c::checkNowWolf(); diff --git a/src/d/d_meter_HIO.cpp b/src/d/d_meter_HIO.cpp index 0566494863..2df28b2655 100644 --- a/src/d/d_meter_HIO.cpp +++ b/src/d/d_meter_HIO.cpp @@ -2289,7 +2289,8 @@ dMeter_drawHIO_c::dMeter_drawHIO_c() { #if WIDESCREEN_SUPPORT void dMeter_drawHIO_c::updateOnWide() { #if TARGET_PC - g_drawHIO = {}; // this might be a bad idea + // Main HUD + g_drawHIO = {}; g_drawHIO.mMainHUDButtonsPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mMainHUDButtonsPosX); g_drawHIO.mRingHUDButtonsPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mRingHUDButtonsPosX); @@ -2301,6 +2302,10 @@ void dMeter_drawHIO_c::updateOnWide() { g_drawHIO.mButtonCrossONPosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mButtonCrossONPosX); g_drawHIO.mLifeGaugePosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mLifeGaugePosX); g_drawHIO.mLanternMeterPosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mLanternMeterPosX); + + // River Canoe Minigame + g_drawHIO.mMiniGame.mCounterPosX[1] = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mMiniGame.mCounterPosX[1]); + g_drawHIO.mMiniGame.mIconPosX[1] = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mMiniGame.mIconPosX[1]); #endif } diff --git a/src/dusk/imgui/ImGuiMenuEnhancements.cpp b/src/dusk/imgui/ImGuiMenuEnhancements.cpp index 8c65c97912..a6058592da 100644 --- a/src/dusk/imgui/ImGuiMenuEnhancements.cpp +++ b/src/dusk/imgui/ImGuiMenuEnhancements.cpp @@ -83,6 +83,12 @@ namespace dusk { config::ImGuiCheckbox("Invert Camera X Axis", getSettings().game.invertCameraXAxis); + config::ImGuiCheckbox("Disable Main HUD", getSettings().game.disableMainHUD); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("Disables the main HUD of the game.\n" + "Useful for recording or a more immersive experience!"); + } + ImGui::EndMenu(); } @@ -185,10 +191,9 @@ namespace dusk { } if (ImGui::BeginMenu("Tools")) { - config::ImGuiCheckbox("Enable Turbo Key", getSettings().game.enableTurboKeybind); + config::ImGuiCheckbox("Turbo Key", getSettings().game.enableTurboKeybind); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Holding TAB will speed up the game.\n" - "This will not work with the \"Unlock Framerate\" enhancement."); + ImGui::SetTooltip("Hold TAB to increase game speed by up to 4x."); } ImGui::EndMenu(); diff --git a/src/dusk/settings.cpp b/src/dusk/settings.cpp index 0c2f02c129..99ff183e79 100644 --- a/src/dusk/settings.cpp +++ b/src/dusk/settings.cpp @@ -40,6 +40,7 @@ UserSettings g_userSettings = { // Preferences .enableMirrorMode {"game.enableMirrorMode", false}, .invertCameraXAxis {"game.invertCameraXAxis", false}, + .disableMainHUD {"game.disableMainHUD", false}, // Graphics .bloomMode {"game.bloomMode", BloomMode::Classic}, @@ -117,6 +118,7 @@ void registerSettings() { Register(g_userSettings.game.sunsSong); Register(g_userSettings.game.enableMirrorMode); Register(g_userSettings.game.invertCameraXAxis); + Register(g_userSettings.game.disableMainHUD); Register(g_userSettings.game.bloomMode); Register(g_userSettings.game.bloomMultiplier); Register(g_userSettings.game.enableWaterRefraction); diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp index 03319db3d8..4d424ad75e 100644 --- a/src/f_pc/f_pc_manager.cpp +++ b/src/f_pc/f_pc_manager.cpp @@ -64,13 +64,12 @@ void fpcM_Management(fpcM_ManagementFunc i_preExecuteFn, fpcM_ManagementFunc i_p } #ifdef TARGET_PC - // Frame interpolation: call moved to m_Do_main - if (!dusk::getSettings().game.enableFrameInterpolation) { + // FRAME INTERP NOTE: Called in m_Do_main when interp is enabled + if (!dusk::getSettings().game.enableFrameInterpolation || dusk::getTransientSettings().skipFrameRateLimit) #endif + { cAPIGph_Painter(); -#ifdef TARGET_PC } -#endif if (!dPa_control_c::isStatus(1)) { fpcDt_Handler(); diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 281a892d0f..a98c691cbc 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -207,9 +207,8 @@ void main01(void) { if (preLaunchUIWindowSize.width != 0) mDoGph_gInf_c::setWindowSize(preLaunchUIWindowSize); - using clock = std::chrono::steady_clock; constexpr double kSimStepSeconds = 1.0 / 30.0; - auto previous_time = clock::now(); + auto previous_time = std::chrono::steady_clock::now(); double accumulator = kSimStepSeconds; do { @@ -234,7 +233,7 @@ void main01(void) { eventsDone:; - auto current_time = clock::now(); + auto current_time = std::chrono::steady_clock::now(); double frame_seconds = std::chrono::duration(current_time - previous_time).count(); previous_time = current_time; accumulator += frame_seconds; @@ -247,9 +246,8 @@ void main01(void) { continue; } - if (dusk::getSettings().game.enableFrameInterpolation) { + if (dusk::getSettings().game.enableFrameInterpolation && !dusk::getTransientSettings().skipFrameRateLimit) { dusk::frame_interp::notify_presentation_frame(); - while (accumulator >= kSimStepSeconds) { mDoCPd_c::read(); if (dusk::getSettings().game.enableGyroAim) { @@ -259,13 +257,11 @@ void main01(void) { mDoAud_Execute(); accumulator -= kSimStepSeconds; } - - float interp_alpha = static_cast(accumulator / kSimStepSeconds); - dusk::frame_interp::interpolate(interp_alpha); + dusk::frame_interp::interpolate(static_cast(accumulator / kSimStepSeconds)); cAPIGph_Painter(); } else { accumulator = 0.0; - + // Game Inputs mDoCPd_c::read(); if (dusk::getSettings().game.enableGyroAim) {