lua curve progress
This commit is contained in:
parent
2c47f603fc
commit
c05376ed5f
|
@ -604,6 +604,18 @@ ValueProvider3D *getFSIOTable(int index) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return zero-based index of curve with given name
|
||||
*/
|
||||
int getCurveIndexByName(const char *name DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
for (int i = 0;i<SCRIPT_CURVE_COUNT;i++) {
|
||||
if (strEqualCaseInsensitive(name, engineConfiguration->scriptCurveName[i])) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return EFI_ERROR_CODE;
|
||||
}
|
||||
|
||||
float getCurveValue(int index, float key DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
// not great code at all :(
|
||||
switch (index) {
|
||||
|
|
|
@ -39,5 +39,6 @@ void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfigura
|
|||
void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
float getCurveValue(int index, float key DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
int getCurveIndexByName(const char *name DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
ValueProvider3D *getFSIOTable(int index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue