mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
Merge pull request #206 from NeonNyan/port
Input fixups for quick-detonate and radial menu navigation
This commit is contained in:
3 files changed
+19
-23
No files matched your search
@@ -62,22 +62,22 @@ Note that the mouse only controls player 1.
|
||||
|
||||
Controls can be rebound in `pd.ini`. Default control scheme is as follows:
|
||||
|
||||
| Action | Keyboard and mouse | Xbox pad | N64 pad |
|
||||
| - | - | - | - |
|
||||
| Fire / Accept | LMB/Space | RT | Z Trigger |
|
||||
| Aim mode | RMB/Z | LT | R Trigger |
|
||||
| Use / Cancel | E | N/A | B |
|
||||
| Use / Accept | N/A | A | A |
|
||||
| Crouch cycle | N/A | L3 | `0x80000000` (Extra) |
|
||||
| Half-Crouch | Shift | N/A | `0x40000000` (Extra) |
|
||||
| Full-Crouch | Control | N/A | `0x20000000` (Extra) |
|
||||
| Reload | R | X | X `(0x40)` |
|
||||
| Previous weapon | Mousewheel forward | B | D-Left |
|
||||
| Next weapon | Mousewheel back | Y | Y `(0x80)` |
|
||||
| Radial menu | Q | LB | D-Down |
|
||||
| Alt fire mode | F | RB | L Trigger |
|
||||
| Alt-fire oneshot | F + LMB or E + LMB | A + RT or RB + RT | A + Z, L + Z |
|
||||
| Quick-detonate | E + Q | A + B | A + D-Left |
|
||||
| Action | Keyboard and mouse | Xbox pad | N64 pad |
|
||||
| - | - | - | - |
|
||||
| Fire / Accept | LMB/Space | RT | Z Trigger |
|
||||
| Aim mode | RMB/Z | LT | R Trigger |
|
||||
| Use / Cancel | E | N/A | B |
|
||||
| Use / Accept | N/A | A | A |
|
||||
| Crouch cycle | N/A | L3 | `0x80000000` (Extra) |
|
||||
| Half-Crouch | Shift | N/A | `0x40000000` (Extra) |
|
||||
| Full-Crouch | Control | N/A | `0x20000000` (Extra) |
|
||||
| Reload | R | X | X `(0x40)` |
|
||||
| Previous weapon | Mousewheel forward | B | D-Left |
|
||||
| Next weapon | Mousewheel back | Y | Y `(0x80)` |
|
||||
| Radial menu | Q | LB | D-Down |
|
||||
| Alt fire mode | F | RB | L Trigger |
|
||||
| Alt-fire oneshot | `F + LMB` or `E + LMB` | `A + RT`` or 'RB + RT` | `A + Z` or `L + Z` |
|
||||
| Quick-detonate | `E + Q` or `E + R` | `A + B` or `A + X` | `A + D-Left`or `A + 0x40` |
|
||||
|
||||
## Building
|
||||
|
||||
|
||||
@@ -48,8 +48,6 @@ void amTick(void)
|
||||
s8 gotonextscreen = false;
|
||||
s8 cstickx = joyGetStickXOnSample(j, contpadnum);
|
||||
s8 csticky = joyGetStickYOnSample(j, contpadnum);
|
||||
s8 crstickx = joyGetRStickXOnSample(j, contpadnum);
|
||||
s8 crsticky = joyGetRStickYOnSample(j, contpadnum);
|
||||
#ifdef AVOID_UB
|
||||
// if cstickx is -128, it will get negated and stored into absstickx, negating it again if it's 8 bit
|
||||
s32 absstickx;
|
||||
@@ -75,8 +73,8 @@ void amTick(void)
|
||||
g_AmMenus[g_AmIndex].allbots = false;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
s32 newstickx = (s32)cstickx + (s32)crstickx;
|
||||
s32 newsticky = (s32)csticky + (s32)crsticky;
|
||||
s32 newstickx = (s32)cstickx;
|
||||
s32 newsticky = (s32)csticky;
|
||||
if (j == 0 && g_Vars.currentplayernum == 0 && inputMouseIsLocked()) {
|
||||
f32 mdx, mdy;
|
||||
struct activemenu *am = &g_AmMenus[g_AmIndex];
|
||||
@@ -98,8 +96,6 @@ void amTick(void)
|
||||
buttonsstate = buttonsstate & D_JPAD;
|
||||
cstickx = 0;
|
||||
csticky = 0;
|
||||
crstickx = 0;
|
||||
crsticky = 0;
|
||||
buttonspressed = 0;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1748,7 +1748,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
g_Vars.currentplayer->usedowntime = -2;
|
||||
}
|
||||
#else
|
||||
bgunProcessQuickDetonate(&movedata, c1buttons, c1buttonsthisframe, (BUTTON_CANCEL_USE | BUTTON_ACCEPT_USE), (BUTTON_WPNBACK | BUTTON_RADIAL));
|
||||
bgunProcessQuickDetonate(&movedata, c1buttons, c1buttonsthisframe, (BUTTON_CANCEL_USE | BUTTON_ACCEPT_USE), (BUTTON_WPNBACK | BUTTON_RADIAL | BUTTON_RELOAD));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user