diff --git a/src/dusk/game_combos.cpp b/src/dusk/game_combos.cpp index 90f4fb0770..a901dba285 100644 --- a/src/dusk/game_combos.cpp +++ b/src/dusk/game_combos.cpp @@ -18,7 +18,7 @@ static daAlink_c* getPlayer() { return (daAlink_c*)dComIfGp_getPlayer(0); } -static void consumeButtons(u32 mask) { +static void consumeButtons(u16 mask) { mDoCPd_c::getCpadInfo(PAD_1).mPressedButtonFlags &= ~mask; mDoCPd_c::getCpadInfo(PAD_1).mButtonFlags &= ~mask; } @@ -107,8 +107,8 @@ void processGameCombos() { getTransientSettings().moveLinkActive = false; } - const u32 held = mDoCPd_c::getHold(PAD_1); - const u32 trig = mDoCPd_c::getTrig(PAD_1); + const u16 held = mDoCPd_c::getHold(PAD_1) & 0xFFFF; + const u16 trig = mDoCPd_c::getTrig(PAD_1) & 0xFFFF; for (const auto& combo : kCombos) { if ((held & combo.holdMask) != combo.holdMask) { diff --git a/src/dusk/game_combos.h b/src/dusk/game_combos.h index ed247fe4e4..5306cb447c 100644 --- a/src/dusk/game_combos.h +++ b/src/dusk/game_combos.h @@ -8,12 +8,12 @@ struct GameCombo { using ConditionFn = bool(*)(); using ActionFn = void(*)(); - u32 holdMask; // all of these must be held (getHold) - u32 trigMask; // at least one must be newly triggered (getTrig); 0 = fires every frame while holdMask is held + u16 holdMask; // all of these must be held (getHold) + u16 trigMask; // at least one must be newly triggered (getTrig); 0 = fires every frame while holdMask is held bool strict; // if true: (held & ~trigMask) must equal holdMask exactly, no extra buttons held ConditionFn condition; // extra game-state guard; nullptr = no extra check ActionFn action; // runs when the combo is fired - u32 consumeMask; // buttons to clear after firing; 0 = pass-through + u16 consumeMask; // buttons to clear after firing; 0 = pass-through bool exclusive; // stop evaluating future combos if this fires };