mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-11 19:08:54 -04:00
Add Aiming Reticle for Bow and Slingshot (#2290)
* Change sight drawing flag to on in arrow logic * Refactor setBowSight for PC targeting and reticle logic * Add Aiming Reticle option to settings Add option for Aiming Reticle in settings. * Add aiming reticle setting to game preferences * Add aiming reticle to user settings registration * Add aimingReticle configuration variable * Fix syntax error in settings.cpp * Add aiming reticle check to bow charge condition * Refactor bow charge sight position logic Removed redundant sight position handling when aiming reticle is not displayed. * Refactor setBowSight for Dusk targeting * Clarify aiming reticle option description * Refactor bow sight logic in setBowSight function Removed dusk condition from bow sight check and adjusted sight drawing logic. * Refactor sight drawing logic in d_a_alink_bow.inc Remove redundant call to offDrawFlg() when aiming reticle is enabled.
This commit is contained in:
@@ -551,7 +551,7 @@ void daAlink_c::setBowSight() {
|
||||
getArrowFlyData(&dist, &speed, TRUE);
|
||||
checkSightLine(dist, &sight_pos);
|
||||
mSight.setPos(&sight_pos);
|
||||
mSight.offDrawFlg();
|
||||
DUSK_IF_ELSE(dusk::getSettings().game.aimingReticle ? mSight.onDrawFlg() : mSight.offDrawFlg(), mSight.offDrawFlg());
|
||||
} else {
|
||||
mSight.offDrawFlg();
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ UserSettings g_userSettings = {
|
||||
.sunsSong {"game.sunsSong", false},
|
||||
.autoSave {"game.autoSave", false},
|
||||
.enhancedMapMenus {"game.enhancedMapMenus", false},
|
||||
.aimingReticle {"game.aimingReticle", false},
|
||||
|
||||
// Preferences
|
||||
.enableMirrorMode {"game.enableMirrorMode", false},
|
||||
@@ -255,6 +256,7 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.sunsSong);
|
||||
Register(g_userSettings.game.autoSave);
|
||||
Register(g_userSettings.game.enhancedMapMenus);
|
||||
Register(g_userSettings.game.aimingReticle);
|
||||
Register(g_userSettings.game.enableMirrorMode);
|
||||
Register(g_userSettings.game.invertCameraXAxis);
|
||||
Register(g_userSettings.game.invertCameraYAxis);
|
||||
|
||||
@@ -183,6 +183,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> sunsSong;
|
||||
ConfigVar<bool> autoSave;
|
||||
ConfigVar<bool> enhancedMapMenus;
|
||||
ConfigVar<bool> aimingReticle;
|
||||
|
||||
// Preferences
|
||||
ConfigVar<bool> enableMirrorMode;
|
||||
|
||||
@@ -1225,6 +1225,8 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
"Allows Wolf Link to howl and change the time of day.");
|
||||
addOption("Quick Transform (R+Y)", getSettings().game.enableQuickTransform,
|
||||
"Transform instantly by pressing R and Y simultaneously.");
|
||||
addOption("Aiming Reticle", getSettings().game.aimingReticle,
|
||||
"Shows the aiming reticle for bow and slingshot.");
|
||||
|
||||
leftPane.add_section("Speedrunning");
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.speedrunMode,
|
||||
|
||||
Reference in New Issue
Block a user