Skip to content

Commit

Permalink
Refactor|InputSystem|Client: Reimplemented InputDevice models in OO C++
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Oct 31, 2014
1 parent 1bc1213 commit 7ecd105
Show file tree
Hide file tree
Showing 24 changed files with 1,512 additions and 1,031 deletions.
7 changes: 5 additions & 2 deletions doomsday/client/include/ui/b_command.h
Expand Up @@ -30,7 +30,7 @@ typedef struct evbinding_s {
int bid; ///< Binding identifier.
char *command; ///< Command to execute.

uint device; ///< Which device?
int device; ///< Which device?
ddeventtype_t type; ///< Type of event.
int id; ///< Identifier.
ebstate_t state;
Expand Down Expand Up @@ -67,7 +67,10 @@ void B_DestroyCommandBinding(evbinding_t *eb);
*/
void B_EventBindingToString(evbinding_t const *eb, ddstring_t *str);

evbinding_t *B_FindCommandBinding(evbinding_t const *listRoot, char const *command, uint device);
/**
* @param device Use @c < 0 || >= NUM_INPUT_DEVICES for wildcard search.
*/
evbinding_t *B_FindCommandBinding(evbinding_t const *listRoot, char const *command, int device);

/**
* Checks if the event matches the binding's conditions, and if so, returns an
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/b_context.h
Expand Up @@ -56,7 +56,7 @@ typedef struct bcontext_s {
*
* Called automatically whenever a context is activated or deactivated.
*/
void B_UpdateDeviceStateAssociations();
void B_UpdateAllDeviceStateAssociations();

/**
* Creates a new binding context. The new context has the highest priority
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/include/ui/b_util.h
Expand Up @@ -65,7 +65,7 @@ dd_bool B_ParseKeyId(char const *desc, int *id);

dd_bool B_ParseMouseTypeAndId(char const *desc, ddeventtype_t *type, int *id);

dd_bool B_ParseJoystickTypeAndId(uint device, char const *desc, ddeventtype_t *type, int *id);
dd_bool B_ParseJoystickTypeAndId(int device, char const *desc, ddeventtype_t *type, int *id);

dd_bool B_ParseAnglePosition(char const *desc, float *pos);

Expand All @@ -82,7 +82,7 @@ dd_bool B_CheckCondition(statecondition_t *cond, int localNum, struct bcontext_s

dd_bool B_EqualConditions(statecondition_t const *a, statecondition_t const *b);

void B_AppendDeviceDescToString(uint device, ddeventtype_t type, int id, ddstring_t *str);
void B_AppendDeviceDescToString(int device, ddeventtype_t type, int id, ddstring_t *str);

void B_AppendToggleStateToString(ebstate_t state, ddstring_t *str);

Expand Down

0 comments on commit 7ecd105

Please sign in to comment.