diff options
| author | a1xd <[email protected]> | 2020-08-22 22:33:45 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-22 22:33:45 -0400 |
| commit | 252637e53ca42353061dc3118e8625af6edc348f (patch) | |
| tree | 26ea73edae996242eaef559485309fb9c66f4d30 /common/rawaccel.hpp | |
| parent | Merge pull request #15 from JacobPalecki/GUI (diff) | |
| parent | delete personal settings.json left in repo (diff) | |
| download | rawaccel-252637e53ca42353061dc3118e8625af6edc348f.tar.xz rawaccel-252637e53ca42353061dc3118e8625af6edc348f.zip | |
Merge pull request #16 from JacobPalecki/Misc
Gain Styles, Settings File, and other miscellaneous
Diffstat (limited to 'common/rawaccel.hpp')
| -rw-r--r-- | common/rawaccel.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp index 8dc4825..23a8214 100644 --- a/common/rawaccel.hpp +++ b/common/rawaccel.hpp @@ -9,8 +9,10 @@ #include "accel-linear.hpp" #include "accel-classic.hpp" #include "accel-natural.hpp" +#include "accel-naturalgain.hpp" #include "accel-logarithmic.hpp" #include "accel-sigmoid.hpp" +#include "accel-sigmoidgain.hpp" #include "accel-power.hpp" #include "accel-noaccel.hpp" @@ -76,7 +78,7 @@ namespace rawaccel { }; /// <summary> Tagged union to hold all accel implementations and allow "polymorphism" via a visitor call. </summary> - using accel_impl_t = tagged_union<accel_linear, accel_classic, accel_natural, accel_logarithmic, accel_sigmoid, accel_power, accel_noaccel>; + using accel_impl_t = tagged_union<accel_linear, accel_classic, accel_natural, accel_logarithmic, accel_sigmoid, accel_power, accel_naturalgain, accel_sigmoidgain, accel_noaccel>; /// <summary> Struct to hold information about applying a gain cap. </summary> struct velocity_gain_cap { @@ -183,6 +185,8 @@ namespace rawaccel { vec2<accel_scale_clamp> clamp; velocity_gain_cap gain_cap = velocity_gain_cap(); + + accel_args impl_args; accel_function(const accel_fn_args& args) { if (args.time_min <= 0) bad_arg("min time must be positive"); @@ -190,6 +194,7 @@ namespace rawaccel { accel.tag = args.accel_mode; accel.visit([&](auto& impl) { impl = { args.acc_args }; }); + impl_args = args.acc_args; time_min = args.time_min; speed_offset = args.acc_args.offset; |