Admiral H. Curtiss
2281cde28b
InputCommon: Add a handful of math functions to the expression parser.
2020-08-02 22:09:09 +02:00
Jordan Woyak
e8152b700f
InputCommon: Allow controller settings specified with input expresions.
2020-02-08 14:01:55 -06:00
Lioncash
814fd165af
InputCommon/FunctionExpression: Use Yoda conditions, we do not
...
The general convention in the codebase is to compare the non-constant
value/string with the constant value/string, not the other way around.
2019-11-22 15:36:18 -05:00
Lioncash
1f6077922b
InputCommon/FunctionExpression: Remove unnecessary 'else' in MakeFunctionExpression()
...
Given all conditional bodies only contain a return, the use of else here
isn't necessary.
This has the benefit of consistently vertically aligning the names.
2019-11-22 15:36:18 -05:00
Lioncash
10fea99d80
InputCommon/FunctionExpression: Make MakeFunctionExpression() take a std::string_view
...
There's nothing within this function that requires a copy of the string
to be made, so we can make use of a non-owning view
2019-11-22 15:36:18 -05:00
Lioncash
ddf8abf507
InputCommon/FunctionExpression: Remove unused LOOP_MAX_REPS constant
...
This isn't used anywhere in the translation unit, so we can remove it.
2019-11-22 15:36:18 -05:00
Lioncash
cb8fbe872e
InputCommon/FunctionExpression: Collapse namespaces
...
Since we target C++17, we can collapse the namespaces into a single
declaration specifier.
2019-11-22 15:36:14 -05:00
Lioncash
6586ecc7a8
InputCommon/FunctionExpression: include <algorithm>
...
std::min/std::max are used within this translation unit, so it needs to
be included to prevent potential compilation failures.
2019-11-22 14:41:13 -05:00
Jordan Woyak
4d41bd64c8
ExpressionParser: Show error message with expected arguments.
2019-10-11 19:38:18 -05:00
Jordan Woyak
b57178d246
ExpressionParser: Remove ! character from function syntax. Remove unused serialization functions.
2019-10-11 18:12:18 -05:00
Jordan Woyak
7912dc57dd
ExpressionParser: Remove !while and add optional 2nd argument to !smooth.
2019-10-11 18:12:18 -05:00
Jordan Woyak
ca7ce67450
ExpressionParser/DolphinQt: Added parse results to UI.
2019-10-11 18:12:18 -05:00
Jordan Woyak
5cb1248612
ExpressionParser: Clean up some redundant using-declarations and wrong comments.
2019-10-11 18:12:18 -05:00
Jordan Woyak
fae8b15db1
ExpressionParser: Add !pulse function that evaluates to 1.0 for N seconds for each press.
2019-10-11 18:12:18 -05:00
Jordan Woyak
b5b43f8342
ExpressionParser: Add relative input function.
2019-10-11 18:12:18 -05:00
Jordan Woyak
08b291b0f9
ExpressionParser: Fix timer function with negative values.
2019-10-11 18:12:18 -05:00
Jordan Woyak
18b5120441
ExpressionParser: Add !tap function which activates after X (defaults to 2) taps within Y seconds.
2019-10-11 18:12:17 -05:00
Jordan Woyak
f2e499d587
ExpressionParser: Add !hold function that activates after input is held for N seconds.
2019-10-11 18:12:17 -05:00
Jordan Woyak
9e536382c4
ExpressionParser: Add function to smooth inputs.
2019-10-11 18:12:17 -05:00
Jordan Woyak
bbd6b1848f
ExpressionParser: Add deadzone function.
2019-10-11 18:12:17 -05:00
Jordan Woyak
6a2096c419
ExpressionParser: Add optional 2nd argument to toggle function which clears state.
2019-10-11 18:12:17 -05:00
Jordan Woyak
fd07ae8cec
ExpressionParser: Move FunctionExpression type definitions into another file.
2019-10-11 18:12:16 -05:00