The actual fixes here are pretty small, and mostly incidental to action-diffing: ActionState::pressed and just_pressed were returning true for uninitialized data. Overall, the tests were simply wrong, and expecting bizarre, extremely verbose action-diffs (buttonlike inputs having values, axislike inputs being released...).
The tests are substantially simpler now, there's unit tests for action-diffing, all of the action-diffing code lives together, and now there's some nice set_value and set_axis_pair helper methods!
Fixes #565.
The actual fixes here are pretty small, and mostly incidental to action-diffing:
ActionState::pressed
andjust_pressed
were returning true for uninitialized data. Overall, the tests were simply wrong, and expecting bizarre, extremely verbose action-diffs (buttonlike inputs having values, axislike inputs being released...).The tests are substantially simpler now, there's unit tests for action-diffing, all of the action-diffing code lives together, and now there's some nice
set_value
andset_axis_pair
helper methods!