gitadora: various fixes for wailing (#513)

## Link to GitHub Issue, if one exists
Fixes #512

## Description of change
Fix digital wailing not being recognized consistently.

Also address the fact that wailing was completely broken when lefty mode
was on. This requires a new option that the user needs to check off in
the configurator since we can't magically guess if the user is holding
the guitar in lefty mode.

- [x] fix downward wail
- [x] digital lefty mode
- [x] implement all of this for arena model i/o
- [x] test dx cab 2p
- [x] lefty toggle in overlay
- [x] fix analog not working for 2p guitar
- [ ] analog lefty mode?

## Testing
Checked GW and GW Delta
This commit is contained in:
bicarus
2026-01-12 21:52:48 -08:00
committed by GitHub
parent a3a59e689e
commit a0a04ab62f
18 changed files with 346 additions and 66 deletions
+45 -10
View File
@@ -3,6 +3,7 @@
#include "games/io.h"
#include "games/gitadora/gitadora.h"
#include "games/gitadora/io.h"
#include "overlay/imgui/extensions.h"
#include "misc/eamuse.h"
#include "util/logging.h"
@@ -11,6 +12,7 @@ namespace overlay::windows {
GitadoraIOPanel::GitadoraIOPanel(SpiceOverlay *overlay) : IOPanel(overlay) {
this->title = "GITADORA IO Panel";
this->has_menu_controls = true;
// by default, make a safer assumption that there are two players
this->two_players = true;
// by default, enable the extra input only available on DX cabs...
@@ -33,6 +35,12 @@ namespace overlay::windows {
this->has_guitar_knobs = false;
}
if (games::gitadora::is_arena_model()) {
this->has_menu_controls = false;
this->two_players = false;
this->has_guitar_knobs = false;
}
find_gfdm_buttons();
}
@@ -70,23 +78,43 @@ namespace overlay::windows {
void GitadoraIOPanel::build_io_panel() {
ImGui::Dummy(overlay::apply_scaling_to_vector(12, 0));
ImGui::SameLine();
this->draw_buttons(0);
if (this->has_guitar_knobs) {
if (this->has_menu_controls) {
ImGui::SameLine();
this->draw_sliders(0);
ImGui::PushID("P1");
this->draw_buttons(0);
if (this->has_guitar_knobs) {
ImGui::SameLine();
this->draw_sliders(0);
}
ImGui::PopID();
// draw p2 only if guitar freaks
if (this->two_players) {
ImGui::SameLine();
ImGui::Dummy(overlay::apply_scaling_to_vector(12, 0));
ImGui::SameLine();
ImGui::PushID("P2");
this->draw_buttons(1);
if (this->has_guitar_knobs) {
ImGui::SameLine();
this->draw_sliders(1);
}
ImGui::PopID();
}
}
// draw p2 only if guitar freaks
if (this->two_players) {
if (games::gitadora::is_guitar()) {
ImGui::SameLine();
ImGui::Dummy(overlay::apply_scaling_to_vector(12, 0));
ImGui::SameLine();
this->draw_buttons(1);
if (this->has_guitar_knobs) {
ImGui::SameLine();
this->draw_sliders(1);
ImGui::BeginGroup();
{
ImGui::Checkbox("P1 Lefty", &games::gitadora::P1_LEFTY);
if (this->two_players) {
ImGui::Checkbox("P2 Lefty", &games::gitadora::P2_LEFTY);
}
}
ImGui::EndGroup();
}
}
@@ -107,6 +135,10 @@ namespace overlay::windows {
{
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + ImGui::GetFrameHeightWithSpacing());
this->build_button("<", leftright_size, this->left[p], nullptr, this->leftright_light[p]);
this->build_button("+", tiny_size, this->help[p], this->start[p], nullptr);
if (ImGui::IsItemHovered()) {
ImGui::HelpTooltip("HELP + START");
}
}
ImGui::EndGroup();
@@ -135,6 +167,9 @@ namespace overlay::windows {
ImGui::BeginGroup();
{
this->build_button("?", tiny_size, this->help[p], nullptr, this->help_light[p]);
if (ImGui::IsItemHovered()) {
ImGui::HelpTooltip("HELP");
}
this->build_button(">", leftright_size, this->right[p], nullptr, this->leftright_light[p]);
}
ImGui::EndGroup();