- removed the default parameter handling from all native script functions because it is no longer needed.

This commit is contained in:
Christoph Oelckers 2018-11-17 10:03:40 +01:00
commit 94ed30e782
45 changed files with 736 additions and 769 deletions

View file

@ -993,8 +993,8 @@ DEFINE_ACTION_FUNCTION(_Screen, VirtualToRealCoords)
PARAM_FLOAT(h);
PARAM_FLOAT(vw);
PARAM_FLOAT(vh);
PARAM_BOOL_DEF(vbottom);
PARAM_BOOL_DEF(handleaspect);
PARAM_BOOL(vbottom);
PARAM_BOOL(handleaspect);
screen->VirtualToRealCoords(x, y, w, h, vw, vh, vbottom, handleaspect);
if (numret >= 1) ret[0].SetVector2(DVector2(x, y));
if (numret >= 2) ret[1].SetVector2(DVector2(w, h));
@ -1088,7 +1088,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawLine)
PARAM_INT(x1);
PARAM_INT(y1);
PARAM_INT(color);
PARAM_INT_DEF(alpha);
PARAM_INT(alpha);
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
screen->DrawLine(x0, y0, x1, y1, -1, color, alpha);
return 0;
@ -1107,7 +1107,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawThickLine)
PARAM_INT(y1);
PARAM_FLOAT(thickness);
PARAM_INT(color);
PARAM_INT_DEF(alpha);
PARAM_INT(alpha);
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
screen->DrawThickLine(x0, y0, x1, y1, thickness, color, alpha);
return 0;
@ -1172,7 +1172,7 @@ DEFINE_ACTION_FUNCTION(_Screen, Clear)
PARAM_INT(x2);
PARAM_INT(y2);
PARAM_INT(color);
PARAM_INT_DEF(palcol);
PARAM_INT(palcol);
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
screen->Clear(x1, y1, x2, y2, palcol, color);
return 0;