ControllerEmu: Constructors go on top
This commit is contained in:
parent
d468c38335
commit
c11672b2d8
|
@ -121,6 +121,7 @@ public:
|
||||||
class AnalogStick : public ControlGroup
|
class AnalogStick : public ControlGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
AnalogStick(const char* const _name);
|
||||||
|
|
||||||
template <typename C>
|
template <typename C>
|
||||||
void GetState(C* const x, C* const y, const unsigned int base, const unsigned int range)
|
void GetState(C* const x, C* const y, const unsigned int base, const unsigned int range)
|
||||||
|
@ -178,9 +179,6 @@ public:
|
||||||
*y = C(yy * range + base);
|
*y = C(yy * range + base);
|
||||||
*x = C(xx * range + base);
|
*x = C(xx * range + base);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnalogStick(const char* const _name);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Buttons : public ControlGroup
|
class Buttons : public ControlGroup
|
||||||
|
@ -205,6 +203,7 @@ public:
|
||||||
class MixedTriggers : public ControlGroup
|
class MixedTriggers : public ControlGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
MixedTriggers(const std::string& _name);
|
||||||
|
|
||||||
template <typename C, typename S>
|
template <typename C, typename S>
|
||||||
void GetState(C* const digital, const C* bitmasks, S* analog, const unsigned int range)
|
void GetState(C* const digital, const C* bitmasks, S* analog, const unsigned int range)
|
||||||
|
@ -223,14 +222,12 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MixedTriggers(const std::string& _name);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Triggers : public ControlGroup
|
class Triggers : public ControlGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Triggers(const std::string& _name);
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void GetState(S* analog, const unsigned int range)
|
void GetState(S* analog, const unsigned int range)
|
||||||
|
@ -240,14 +237,12 @@ public:
|
||||||
for (unsigned int i=0; i<trig_count; ++i,++analog)
|
for (unsigned int i=0; i<trig_count; ++i,++analog)
|
||||||
*analog = S(std::max(controls[i]->control_ref->State() - deadzone, 0.0f) / (1 - deadzone) * range);
|
*analog = S(std::max(controls[i]->control_ref->State() - deadzone, 0.0f) / (1 - deadzone) * range);
|
||||||
}
|
}
|
||||||
|
|
||||||
Triggers(const std::string& _name);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Slider : public ControlGroup
|
class Slider : public ControlGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Slider(const std::string& _name);
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void GetState(S* const slider, const unsigned int range, const unsigned int base = 0)
|
void GetState(S* const slider, const unsigned int range, const unsigned int base = 0)
|
||||||
|
@ -260,9 +255,6 @@ public:
|
||||||
else
|
else
|
||||||
*slider = 0;
|
*slider = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider(const std::string& _name);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Force : public ControlGroup
|
class Force : public ControlGroup
|
||||||
|
|
Loading…
Reference in New Issue