mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-03 18:06:02 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -66,6 +66,7 @@ struct UserSettings {
|
||||
// Preferences
|
||||
ConfigVar<bool> enableMirrorMode;
|
||||
ConfigVar<bool> invertCameraXAxis;
|
||||
ConfigVar<bool> disableMainHUD;
|
||||
|
||||
// Graphics
|
||||
ConfigVar<BloomMode> bloomMode;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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<double>(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<float>(accumulator / kSimStepSeconds);
|
||||
dusk::frame_interp::interpolate(interp_alpha);
|
||||
dusk::frame_interp::interpolate(static_cast<float>(accumulator / kSimStepSeconds));
|
||||
cAPIGph_Painter();
|
||||
} else {
|
||||
accumulator = 0.0;
|
||||
|
||||
|
||||
// Game Inputs
|
||||
mDoCPd_c::read();
|
||||
if (dusk::getSettings().game.enableGyroAim) {
|
||||
|
||||
Reference in New Issue
Block a user