Skip to content

Commit

Permalink
xr_input_xinput.h|cpp: reformatting
Browse files Browse the repository at this point in the history
Also I removed one #ifdef COC_KICK
  • Loading branch information
Xottab-DUTY committed Oct 10, 2018
1 parent 686f5db commit 5eceeed
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 107 deletions.
206 changes: 102 additions & 104 deletions src/xrEngine/xr_input_xinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,113 +8,111 @@ ENGINE_API _key_group g_current_keygroup = _sp;

// clang-format off
_action actions[] = {
{ "left", kLEFT, _both },
{ "right", kRIGHT, _both },
{ "up", kUP, _both },
{ "down", kDOWN, _both },
{ "jump", kJUMP, _both },
{ "crouch", kCROUCH, _both },
{ "accel", kACCEL, _both },
{ "sprint_toggle", kSPRINT_TOGGLE, _both },

{ "forward", kFWD, _both },
{ "back", kBACK, _both },
{ "lstrafe", kL_STRAFE, _both },
{ "rstrafe", kR_STRAFE, _both },

{ "llookout", kL_LOOKOUT, _both },
{ "rlookout", kR_LOOKOUT, _both },

{ "cam_1", kCAM_1, _both },
{ "cam_2", kCAM_2, _both },
{ "cam_3", kCAM_3, _both },
{ "cam_zoom_in", kCAM_ZOOM_IN, _both },
{ "cam_zoom_out", kCAM_ZOOM_OUT, _both },

{ "torch", kTORCH, _both },
{ "night_vision", kNIGHT_VISION, _both },
{ "show_detector", kDETECTOR, _sp },

{ "wpn_1", kWPN_1, _both },
{ "wpn_2", kWPN_2, _both },
{ "wpn_3", kWPN_3, _both },
{ "wpn_4", kWPN_4, _both },
{ "wpn_5", kWPN_5, _both },
{ "wpn_6", kWPN_6, _both },
{ "artefact", kARTEFACT, _both /*_mp*/ },
{ "wpn_next", kWPN_NEXT, _both }, // means next ammo type
{ "wpn_fire", kWPN_FIRE, _both },
{ "wpn_zoom", kWPN_ZOOM, _both },
{ "wpn_zoom_inc", kWPN_ZOOM_INC, _both },
{ "wpn_zoom_dec", kWPN_ZOOM_DEC, _both },
{ "wpn_reload", kWPN_RELOAD, _both },
{ "wpn_func", kWPN_FUNC, _both },
{ "left", kLEFT, _both },
{ "right", kRIGHT, _both },
{ "up", kUP, _both },
{ "down", kDOWN, _both },
{ "jump", kJUMP, _both },
{ "crouch", kCROUCH, _both },
{ "accel", kACCEL, _both },
{ "sprint_toggle", kSPRINT_TOGGLE, _both },

{ "forward", kFWD, _both },
{ "back", kBACK, _both },
{ "lstrafe", kL_STRAFE, _both },
{ "rstrafe", kR_STRAFE, _both },

{ "llookout", kL_LOOKOUT, _both },
{ "rlookout", kR_LOOKOUT, _both },

{ "cam_1", kCAM_1, _both },
{ "cam_2", kCAM_2, _both },
{ "cam_3", kCAM_3, _both },
{ "cam_zoom_in", kCAM_ZOOM_IN, _both },
{ "cam_zoom_out", kCAM_ZOOM_OUT, _both },

{ "torch", kTORCH, _both },
{ "night_vision", kNIGHT_VISION, _both },
{ "show_detector", kDETECTOR, _sp },

{ "wpn_1", kWPN_1, _both },
{ "wpn_2", kWPN_2, _both },
{ "wpn_3", kWPN_3, _both },
{ "wpn_4", kWPN_4, _both },
{ "wpn_5", kWPN_5, _both },
{ "wpn_6", kWPN_6, _both },
{ "artefact", kARTEFACT, _both /*_mp*/ },
{ "wpn_next", kWPN_NEXT, _both }, // means next ammo type
{ "wpn_fire", kWPN_FIRE, _both },
{ "wpn_zoom", kWPN_ZOOM, _both },
{ "wpn_zoom_inc", kWPN_ZOOM_INC, _both },
{ "wpn_zoom_dec", kWPN_ZOOM_DEC, _both },
{ "wpn_reload", kWPN_RELOAD, _both },
{ "wpn_func", kWPN_FUNC, _both },
{ "wpn_firemode_prev", kWPN_FIREMODE_PREV, _both },
{ "wpn_firemode_next", kWPN_FIREMODE_NEXT, _both },

{ "pause", kPAUSE, _both },
{ "drop", kDROP, _both },
{ "use", kUSE, _both },
{ "scores", kSCORES, _both },
{ "chat", kCHAT, _both },
{ "chat_team", kCHAT_TEAM, _both },
{ "screenshot", kSCREENSHOT, _both },
{ "quit", kQUIT, _both },
{ "console", kCONSOLE, _both },
{ "inventory", kINVENTORY, _both },
{ "buy_menu", kBUY, _both },
{ "skin_menu", kSKIN, _both },
{ "team_menu", kTEAM, _both },
{ "active_jobs", kACTIVE_JOBS, _sp },

{ "vote_begin", kVOTE_BEGIN, _both },
{ "show_admin_menu", kSHOW_ADMIN_MENU, _both },
{ "vote", kVOTE, _both },
{ "vote_yes", kVOTEYES, _both },
{ "vote_no", kVOTENO, _both },

{ "next_slot", kNEXT_SLOT, _both },
{ "prev_slot", kPREV_SLOT, _both },

{ "speech_menu_0", kSPEECH_MENU_0, _both },
{ "speech_menu_1", kSPEECH_MENU_1, _both },

{ "quick_use_1", kQUICK_USE_1, _both },
{ "quick_use_2", kQUICK_USE_2, _both },
{ "quick_use_3", kQUICK_USE_3, _both },
{ "quick_use_4", kQUICK_USE_4, _both },

{ "quick_save", kQUICK_SAVE, _sp },
{ "quick_load", kQUICK_LOAD, _sp },
//{ "alife_command", kALIFE_CMD, _sp},

{ "custom1", kCUSTOM1, _sp },
{ "custom2", kCUSTOM2, _sp },
{ "custom3", kCUSTOM3, _sp },
{ "custom4", kCUSTOM4, _sp },
{ "custom5", kCUSTOM5, _sp },
{ "custom6", kCUSTOM6, _sp },
{ "custom7", kCUSTOM7, _sp },
{ "custom8", kCUSTOM8, _sp },
{ "custom9", kCUSTOM9, _sp },
{ "custom10", kCUSTOM10, _sp },
{ "custom11", kCUSTOM11, _sp },
{ "custom12", kCUSTOM12, _sp },
{ "custom13", kCUSTOM13, _sp },
{ "custom14", kCUSTOM14, _sp },
{ "custom15", kCUSTOM15, _sp },
{ "cam_autoaim", kCAM_AUTOAIM, _sp },
{ "pda_tab1", kPDA_TAB1, _sp },
{ "pda_tab2", kPDA_TAB2, _sp },
{ "pda_tab3", kPDA_TAB3, _sp },
{ "pda_tab4", kPDA_TAB4, _sp },
{ "pda_tab5", kPDA_TAB5, _sp },
{ "pda_tab6", kPDA_TAB6, _sp },
#ifdef COC_KICK
{ "kick", kKICK, _sp },
#endif

{ nullptr, kLASTACTION, _both }
{ "pause", kPAUSE, _both },
{ "drop", kDROP, _both },
{ "use", kUSE, _both },
{ "scores", kSCORES, _both },
{ "chat", kCHAT, _both },
{ "chat_team", kCHAT_TEAM, _both },
{ "screenshot", kSCREENSHOT, _both },
{ "quit", kQUIT, _both },
{ "console", kCONSOLE, _both },
{ "inventory", kINVENTORY, _both },
{ "buy_menu", kBUY, _both },
{ "skin_menu", kSKIN, _both },
{ "team_menu", kTEAM, _both },
{ "active_jobs", kACTIVE_JOBS, _sp },

{ "vote_begin", kVOTE_BEGIN, _both },
{ "show_admin_menu", kSHOW_ADMIN_MENU, _both },
{ "vote", kVOTE, _both },
{ "vote_yes", kVOTEYES, _both },
{ "vote_no", kVOTENO, _both },

{ "next_slot", kNEXT_SLOT, _both },
{ "prev_slot", kPREV_SLOT, _both },

{ "speech_menu_0", kSPEECH_MENU_0, _both },
{ "speech_menu_1", kSPEECH_MENU_1, _both },

{ "quick_use_1", kQUICK_USE_1, _both },
{ "quick_use_2", kQUICK_USE_2, _both },
{ "quick_use_3", kQUICK_USE_3, _both },
{ "quick_use_4", kQUICK_USE_4, _both },

{ "quick_save", kQUICK_SAVE, _sp },
{ "quick_load", kQUICK_LOAD, _sp },
//{ "alife_command", kALIFE_CMD, _sp},

{ "custom1", kCUSTOM1, _sp },
{ "custom2", kCUSTOM2, _sp },
{ "custom3", kCUSTOM3, _sp },
{ "custom4", kCUSTOM4, _sp },
{ "custom5", kCUSTOM5, _sp },
{ "custom6", kCUSTOM6, _sp },
{ "custom7", kCUSTOM7, _sp },
{ "custom8", kCUSTOM8, _sp },
{ "custom9", kCUSTOM9, _sp },
{ "custom10", kCUSTOM10, _sp },
{ "custom11", kCUSTOM11, _sp },
{ "custom12", kCUSTOM12, _sp },
{ "custom13", kCUSTOM13, _sp },
{ "custom14", kCUSTOM14, _sp },
{ "custom15", kCUSTOM15, _sp },
{ "cam_autoaim", kCAM_AUTOAIM, _sp },
{ "pda_tab1", kPDA_TAB1, _sp },
{ "pda_tab2", kPDA_TAB2, _sp },
{ "pda_tab3", kPDA_TAB3, _sp },
{ "pda_tab4", kPDA_TAB4, _sp },
{ "pda_tab5", kPDA_TAB5, _sp },
{ "pda_tab6", kPDA_TAB6, _sp },
{ "kick", kKICK, _sp },

{ nullptr, kLASTACTION, _both }
};

_keyboard keyboards[] =
Expand Down
4 changes: 1 addition & 3 deletions src/xrEngine/xr_input_xinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ enum EGameActions

kQUICK_SAVE,
kQUICK_LOAD,
// kALIFE_CMD,
//kALIFE_CMD,

kCUSTOM1,
kCUSTOM2,
Expand All @@ -110,9 +110,7 @@ enum EGameActions
kPDA_TAB5,
kPDA_TAB6,

#ifdef COC_KICK
kKICK, // alpet: kick dynamic objects
#endif

kLASTACTION,
kNOTBINDED,
Expand Down

0 comments on commit 5eceeed

Please sign in to comment.