1 #ifndef _CONTROL_MAP_HPP
2 #define _CONTROL_MAP_HPP
4 #include "util/Vector.hpp"
12 enum OutputType { THROTTLE, MIXTURE, ADVANCE, REHEAT, PROP,
14 INCIDENCE, FLAP0, FLAP1, SLAT, SPOILER };
16 static const int OPT_SPLIT = 0x01;
17 static const int OPT_INVERT = 0x02;
18 static const int OPT_SQUARE = 0x04;
20 // Returns a new, not-yet-used "input handle" for addMapping and
21 // setInput. This typically corresponds to one user axis.
24 // Adds a mapping to between input handle and a particular setting
25 // on an output object. The value of output MUST match the type
27 void addMapping(int input, int output, void* object, int options=0);
29 // Resets our accumulated input values. Call before any
30 // setInput() invokations.
33 // Sets the specified input (as returned by newInput) to the
35 void setInput(int input, float value);
37 // Calculates and applies the settings received since the last reset().
41 struct OutRec { int type; void* object; int n;
42 float* values; Vector options; };
43 struct MapRec { OutRec* out; int idx; };
45 // A list of (sub)Vectors containing a bunch of MapRec objects for
49 // An unordered list of output settings.
54 #endif // _CONTROL_MAP_HPP