-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a "DPAD" expression operation that takes four input states and produces a 0-8 value that can be used as a d-pad (hat switch) output on a gamepad. Example use: 0x00070050 input_state_binary 0x0007004f input_state_binary 0x00070052 input_state_binary 0x00070051 input_state_binary dpad
- Loading branch information
Showing
5 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,7 @@ | |
"ATAN2": 32, | ||
"ROUND": 33, | ||
"PORT": 34, | ||
"DPAD": 35, | ||
} | ||
|
||
opcodes = {v: k for k, v in ops.items()} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ enum class Op : int8_t { | |
ATAN2 = 32, | ||
ROUND = 33, | ||
PORT = 34, | ||
DPAD = 35, | ||
}; | ||
|
||
struct expr_elem_t { | ||
|