mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-10 12:54:50 -04:00
Gyro: Add Subjectivity ProcIDs
This commit is contained in:
@@ -4551,7 +4551,7 @@ public:
|
||||
#if TARGET_PC
|
||||
void handleWolfHowl();
|
||||
void handleQuickTransform();
|
||||
bool checkGyroAimItemContext();
|
||||
bool checkGyroAimContext();
|
||||
#endif
|
||||
}; // Size: 0x385C
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
namespace dusk::gyro {
|
||||
void read(float dt);
|
||||
void getAimDeltas(float& out_yaw, float& out_pitch);
|
||||
bool queryGyroAimItemContext();
|
||||
bool queryGyroAimContext();
|
||||
|
||||
void rollgoalTick(bool play_active, s16 camera_yaw);
|
||||
void rollgoalTableOffset(s16& out_ax, s16& out_az);
|
||||
|
||||
@@ -143,12 +143,14 @@ void daAlink_c::handleQuickTransform() {
|
||||
procCoMetamorphoseInit();
|
||||
}
|
||||
|
||||
bool daAlink_c::checkGyroAimItemContext() {
|
||||
if (checkWolf()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool daAlink_c::checkGyroAimContext() {
|
||||
switch (mProcID) {
|
||||
case PROC_SUBJECTIVITY:
|
||||
case PROC_SWIM_SUBJECTIVITY:
|
||||
case PROC_HORSE_SUBJECTIVITY:
|
||||
case PROC_CANOE_SUBJECTIVITY:
|
||||
case PROC_BOARD_SUBJECTIVITY:
|
||||
case PROC_WOLF_ROPE_SUBJECTIVITY:
|
||||
case PROC_BOW_SUBJECT:
|
||||
case PROC_BOOMERANG_SUBJECT:
|
||||
case PROC_COPY_ROD_SUBJECT:
|
||||
|
||||
@@ -130,7 +130,7 @@ BOOL daAlink_c::setBodyAngleToCamera() {
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableGyroAim && checkGyroAimItemContext()) {
|
||||
if (dusk::getSettings().game.enableGyroAim && checkGyroAimContext()) {
|
||||
f32 gyro_scale = 1.0f;
|
||||
if (checkWolfEyeUp()) {
|
||||
gyro_scale *= 0.6f;
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ bool s_sensor_keep_alive = false;
|
||||
bool get_sensor_keep_alive() { return s_sensor_keep_alive; }
|
||||
void set_sensor_keep_alive(bool value) { s_sensor_keep_alive = value; }
|
||||
|
||||
bool queryGyroAimItemContext() {
|
||||
bool queryGyroAimContext() {
|
||||
if (!static_cast<bool>(dusk::getSettings().game.enableGyroAim)) {
|
||||
return false;
|
||||
}
|
||||
@@ -45,11 +45,11 @@ bool queryGyroAimItemContext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return link->checkGyroAimItemContext() && dComIfGp_checkCameraAttentionStatus(link->field_0x317c, 0x10);
|
||||
return link->checkGyroAimContext() && dComIfGp_checkCameraAttentionStatus(link->field_0x317c, 0x10);
|
||||
}
|
||||
|
||||
void read(float dt) {
|
||||
if (!s_sensor_keep_alive && !(dusk::getSettings().game.enableGyroAim && queryGyroAimItemContext())) {
|
||||
if (!s_sensor_keep_alive && !queryGyroAimContext()) {
|
||||
if (s_sensor_enabled) {
|
||||
PADSetSensorEnabled(PAD_CHAN0, PAD_SENSOR_GYRO, FALSE);
|
||||
s_sensor_enabled = false;
|
||||
|
||||
@@ -144,8 +144,10 @@ namespace dusk {
|
||||
|
||||
config::ImGuiCheckbox("Gyro Aim", getSettings().game.enableGyroAim);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Enables the gyroscope on supported controllers while aiming the\n"
|
||||
"Slingshot, Gale Boomerang, Hero's Bow, Clawshot(s), Ball and Chain, and Dominion Rod.");
|
||||
ImGui::SetTooltip("Enables the gyroscope on supported controllers\n"
|
||||
"while in look mode (C-Up) and while aiming the\n"
|
||||
"Slingshot, Gale Boomerang, Hero's Bow, Clawshot(s),\n"
|
||||
"Ball and Chain, and Dominion Rod.");
|
||||
}
|
||||
|
||||
config::ImGuiCheckbox("Gyro Rollgoal", getSettings().game.enableGyroRollgoal);
|
||||
|
||||
Reference in New Issue
Block a user