Sanity check added

This commit is contained in:
bsongis
2015-01-28 19:36:28 +01:00
parent 15378b8f19
commit db1de54314
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -49,6 +49,11 @@ void loadCurves()
case CURVE_TYPE_CUSTOM:
tmp += 8+2*g_model.curves[i].points;
break;
default:
TRACE("Wrong curve type! Fixing...");
g_model.curves[i].type = CURVE_TYPE_STANDARD;
tmp += 5+g_model.curves[i].points;
break;
}
curveEnd[i] = tmp;
}
@@ -299,6 +304,9 @@ int applyCurve(int x, CurveRef & curve)
int applyCustomCurve(int x, uint8_t idx)
{
if (idx >= MAX_CURVES)
return 0;
CurveInfo &crv = g_model.curves[idx];
if (crv.smooth)
return hermite_spline(x, idx);
+1
View File
@@ -2,3 +2,4 @@
/font_dblsize.png
/font_midsize.png
/font_stdsize.png
/font_tinsize.png