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

This commit is contained in:
gymnast86
2026-04-23 06:37:06 -07:00
10 changed files with 77 additions and 4 deletions
+7
View File
@@ -2399,6 +2399,13 @@ void dMenu_Collect3D_c::_move(u8 param_0, u8 param_1) {
posZ = 550.0f;
}
toItem3Dpos(linkPos.x, posY, posZ, &itemPos);
#if TARGET_PC
if (dusk::getSettings().game.enableLinkDollRotation) {
const f32 angle = mDoCPd_c::getSubStickX3D(PAD_1) * 2048;
ANGLE_ADD(mLinkAngle, angle);
} else
#endif
if (param_0 == 0 && param_1 == 0) {
f32 temp = 450.0f;
ANGLE_ADD(mLinkAngle, temp);
+35
View File
@@ -185,6 +185,13 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
field_0x682 = 0xc000;
break;
}
#if TARGET_PC
mCursorInterpPrevX = 0.0f;
mCursorInterpPrevY = 0.0f;
mCursorInterpCurrX = 0.0f;
mCursorInterpCurrY = 0.0f;
mCursorInterpInit = false;
#endif
for (int i = 0; i < 4; i++) {
field_0x674[i] = 0;
#if TARGET_PC
@@ -631,6 +638,34 @@ void dMenu_Ring_c::_draw() {
} else {
drawSelectItem();
drawItem2();
#if TARGET_PC
if (dusk::frame_interp::is_enabled() && mAlphaRate >= 1.0f) {
f32 cursorX = mpDrawCursor->getPositionX();
f32 cursorY = mpDrawCursor->getPositionY();
if (dusk::frame_interp::get_ui_tick_pending()) {
mCursorInterpPrevX = mCursorInterpCurrX;
mCursorInterpPrevY = mCursorInterpCurrY;
mCursorInterpCurrX = cursorX;
mCursorInterpCurrY = cursorY;
if (!mCursorInterpInit) {
mCursorInterpPrevX = mCursorInterpCurrX;
mCursorInterpPrevY = mCursorInterpCurrY;
mCursorInterpInit = true;
}
}
if (mCursorInterpInit) {
const f32 step = dusk::frame_interp::get_interpolation_step();
mpDrawCursor->setPos(
mCursorInterpPrevX + (mCursorInterpCurrX - mCursorInterpPrevX) * step,
mCursorInterpPrevY + (mCursorInterpCurrY - mCursorInterpPrevY) * step
);
}
} else {
mCursorInterpInit = false;
}
#endif
mpDrawCursor->draw();
mpItemExplain->trans(mCenterPosX, mCenterPosY);
mpItemExplain->draw((J2DOrthoGraph*)grafPort);
+5
View File
@@ -191,6 +191,11 @@ namespace dusk {
ImGui::SetTooltip("Restores patched glitches from Wii USA 1.0,\n"
"the first released version.");
}
config::ImGuiCheckbox("Enable Rotating Link Doll", getSettings().game.enableLinkDollRotation);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Enables rotating Link in the collection menu with the C-Stick");
}
ImGui::SeparatorText("Difficulty");
+4 -4
View File
@@ -210,7 +210,7 @@ namespace dusk {
ImGui::Text("Link");
ImGuiStringViewText(
player != nullptr
? fmt::format("Position: {: .2f}, {: .2f}, {: .2f}\n", player->current.pos.x, player->current.pos.y, player->current.pos.z)
? fmt::format("Position: {: .4f}, {: .4f}, {: .4f}\n", player->current.pos.x, player->current.pos.y, player->current.pos.z)
: "Position: ?, ?, ?\n"
);
@@ -222,7 +222,7 @@ namespace dusk {
ImGuiStringViewText(
player != nullptr
? fmt::format("Speed: {0}\n", player->speedF)
? fmt::format("Speed: {: .4f}\n", player->speedF)
: "Speed: ?\n"
);
@@ -230,7 +230,7 @@ namespace dusk {
ImGui::Text("Epona");
ImGuiStringViewText(
horse != nullptr
? fmt::format("Position: {: .2f}, {: .2f}, {: .2f}\n", horse->current.pos.x, horse->current.pos.y, horse->current.pos.z)
? fmt::format("Position: {: .4f}, {: .4f}, {: .4f}\n", horse->current.pos.x, horse->current.pos.y, horse->current.pos.z)
: "Position: ?, ?, ?\n"
);
@@ -242,7 +242,7 @@ namespace dusk {
ImGuiStringViewText(
horse != nullptr
? fmt::format("Speed: {0}\n", horse->speedF)
? fmt::format("Speed: {: .4f}\n", horse->speedF)
: "Speed: ?\n"
);
+2
View File
@@ -43,6 +43,7 @@ UserSettings g_userSettings = {
.invertCameraXAxis {"game.invertCameraXAxis", false},
.disableMainHUD {"game.disableMainHUD", false},
.pauseOnFocusLost {"game.pauseOnFocusLost", false},
.enableLinkDollRotation = {"game.enableLinkDollRotation", false },
// Graphics
.bloomMode {"game.bloomMode", BloomMode::Classic},
@@ -150,6 +151,7 @@ void registerSettings() {
Register(g_userSettings.game.canTransformAnywhere);
Register(g_userSettings.game.freeMagicArmor);
Register(g_userSettings.game.restoreWiiGlitches);
Register(g_userSettings.game.enableLinkDollRotation);
Register(g_userSettings.game.noMissClimbing);
Register(g_userSettings.game.noLowHpSound);
Register(g_userSettings.game.midnasLamentNonStop);