forked from Ports/perfect_dark
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into port-net
This commit is contained in:
commit
4c1e9ece94
3 files changed
+32
-28
No files matched your search
@@ -148,6 +148,33 @@ s32 g_MouseDimmedMode = false;
|
|||||||
s32 g_MouseEndDeferredSlider = false;
|
s32 g_MouseEndDeferredSlider = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
s32 menuAlt1Pressed(s32 playerNum)
|
||||||
|
{
|
||||||
|
const s32 rshoulderKey = VK_JOY1_RSHOULDER + playerNum * INPUT_MAX_CONTROLLER_BUTTONS;
|
||||||
|
|
||||||
|
if (playerNum == 0) {
|
||||||
|
return inputKeyJustPressed(VK_LCTRL) || inputKeyJustPressed(rshoulderKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return inputKeyJustPressed(rshoulderKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 menuAlt2Pressed(s32 playerNum)
|
||||||
|
{
|
||||||
|
const s32 lshoulderKey = VK_JOY1_LSHOULDER + playerNum * INPUT_MAX_CONTROLLER_BUTTONS;
|
||||||
|
|
||||||
|
if (playerNum == 0) {
|
||||||
|
return inputKeyJustPressed(VK_LALT) || inputKeyJustPressed(lshoulderKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return inputKeyJustPressed(lshoulderKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 menuAltAnyPressed(s32 playerNum)
|
||||||
|
{
|
||||||
|
return menuAlt1Pressed(playerNum) || menuAlt2Pressed(playerNum);
|
||||||
|
}
|
||||||
|
|
||||||
void menuPlaySound(s32 menusound)
|
void menuPlaySound(s32 menusound)
|
||||||
{
|
{
|
||||||
s32 sound = -1;
|
s32 sound = -1;
|
||||||
|
|||||||
@@ -46,33 +46,6 @@ extern struct menudialogdef g_FilemgrErrorMenuDialog;
|
|||||||
extern s32 g_MpWeaponSetNum;
|
extern s32 g_MpWeaponSetNum;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline s32 menuAlt1Pressed(s32 playerNum)
|
|
||||||
{
|
|
||||||
const s32 rshoulderKey = VK_JOY1_RSHOULDER + playerNum * INPUT_MAX_CONTROLLER_BUTTONS;
|
|
||||||
|
|
||||||
if (playerNum == 0) {
|
|
||||||
return inputKeyJustPressed(VK_LCTRL) || inputKeyJustPressed(rshoulderKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
return inputKeyJustPressed(rshoulderKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline s32 menuAlt2Pressed(s32 playerNum)
|
|
||||||
{
|
|
||||||
const s32 lshoulderKey = VK_JOY1_LSHOULDER + playerNum * INPUT_MAX_CONTROLLER_BUTTONS;
|
|
||||||
|
|
||||||
if (playerNum == 0) {
|
|
||||||
return inputKeyJustPressed(VK_LALT) || inputKeyJustPressed(lshoulderKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
return inputKeyJustPressed(lshoulderKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline s32 menuAltPressed(s32 playerNum)
|
|
||||||
{
|
|
||||||
return menuAlt1Pressed(playerNum) || menuAlt2Pressed(playerNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuItemHandlerResult menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data)
|
MenuItemHandlerResult menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||||
{
|
{
|
||||||
if (operation == MENUOP_SET) {
|
if (operation == MENUOP_SET) {
|
||||||
@@ -2606,7 +2579,7 @@ MenuDialogHandlerResult menudialogMpSimulant(s32 operation, struct menudialogdef
|
|||||||
MenuDialogHandlerResult mpLoadSettingsDialogHandler(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
|
MenuDialogHandlerResult mpLoadSettingsDialogHandler(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
|
||||||
{
|
{
|
||||||
if (operation == MENUOP_TICK) {
|
if (operation == MENUOP_TICK) {
|
||||||
if (menuAltPressed(g_MpPlayerNum)) {
|
if (menuAltAnyPressed(g_MpPlayerNum)) {
|
||||||
u8 presets = g_Menus[g_MpPlayerNum].mpsetup.showpresets;
|
u8 presets = g_Menus[g_MpPlayerNum].mpsetup.showpresets;
|
||||||
g_Menus[g_MpPlayerNum].mpsetup.showpresets = 1 - presets;
|
g_Menus[g_MpPlayerNum].mpsetup.showpresets = 1 - presets;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,6 +113,10 @@ MenuItemHandlerResult menuhandlerRepairPak(s32 operation, struct menuitem *item,
|
|||||||
MenuItemHandlerResult menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
MenuItemHandlerResult menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
|
|
||||||
|
s32 menuAlt1Pressed(s32 playerNum);
|
||||||
|
s32 menuAlt2Pressed(s32 playerNum);
|
||||||
|
s32 menuAltAnyPressed(s32 playerNum);
|
||||||
|
|
||||||
extern const char var7f1b2658[];
|
extern const char var7f1b2658[];
|
||||||
extern const char var7f1b265c[];
|
extern const char var7f1b265c[];
|
||||||
extern const char var7f1b2660[];
|
extern const char var7f1b2660[];
|
||||||
|
|||||||
Reference in new issue
Block a user