Ported BtnSelector from 2ship (#6158)

Allows the rebinding for Resetting the game, Debug Map Select, and Debug No-Clip.
Also allows for Speed Modifiers to use the new button combos, instead of only the modifier buttons.
This commit is contained in:
ItsHeckinPat
2026-01-18 11:01:39 -05:00
committed by GitHub
parent eab279c0be
commit 04c5d50b3e
11 changed files with 249 additions and 17 deletions

View File

@@ -408,9 +408,11 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
sGraphUpdateTime = time;
}
s32 mask = CVarGetInteger("gDeveloperTools.MapSelectBtn", BTN_Z | BTN_L | BTN_R);
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
if (CHECK_BTN_ANY(gameState->input[0].press.button, mask) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, mask)) {
gSaveContext.gameMode = GAMEMODE_NORMAL;
SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext);
gameState->running = false;