Skip to content

Commit d846003

Browse files
committed
Adds doxy and warnings to control_used() and check_control_used()
1 parent a243052 commit d846003

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

code/controlconfig/controlsconfig.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,15 @@ void control_check_indicate()
28022802
Control_check_count = 0;
28032803
}
28042804

2805+
/**
2806+
* @brief Checks if a control is being used by the player this frame by checking the bound control input bindings
2807+
*
2808+
* @param[in] id The IoActionId of the control to check
2809+
* @param[in] key DO NOT USE. Key combination acquired from game_poll(), or -1 to check against a previous poll
2810+
*
2811+
* @returns 0 if none of the bound inputs are activate this frame, or
2812+
* @returns 1 if one or more of the bound inputs are active this frame
2813+
*/
28052814
int check_control_used(int id, int key)
28062815
{
28072816
// Make sure mouse_down() is only called once during any logic path,

code/controlconfig/controlsconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ float check_control_timef(int id);
944944
* @brief Wrapper for check_control_used. Allows the game to ignore the key if told to do so by the ignore-key SEXP.
945945
*
946946
* @param[in] id The IoActionId of the control to check
947-
* @param[in] key The key combo to check against the control. If -1, re-check the last key passed to this function
947+
* @param[in] key DO NOT USE OUTSIDE OF THE MAIN LOOP. Key combination acquired from game_poll(), or -1 to check against a previous poll
948948
*
949949
* @returns 0 If the control wasn't used, or
950950
* @returns 1 If the control was used

0 commit comments

Comments
 (0)