Commit a3283219 authored by Richard Gobeille's avatar Richard Gobeille

editor: add drawline256 command for scripting

parent 1f0bc174
......@@ -437,6 +437,7 @@ const char *keyw[] =
"drawline16",
"drawline16b",
"drawline16z",
"drawline256",
"drawcircle16",
"drawcircle16b",
"drawcircle16z",
......@@ -3427,6 +3428,7 @@ repeatcase:
case CON_DRAWLINE16:
case CON_DRAWLINE16B:
case CON_DRAWLINE16Z:
case CON_DRAWLINE256:
case CON_DRAWCIRCLE16:
case CON_DRAWCIRCLE16B:
case CON_DRAWCIRCLE16Z:
......@@ -3435,7 +3437,7 @@ repeatcase:
C_ReportError(ERROR_EVENTONLY);
g_numCompilerErrors++;
}
if (tw==CON_DRAWLINE16 || tw==CON_DRAWLINE16B || tw==CON_DRAWCIRCLE16Z)
if (tw==CON_DRAWLINE16 || tw==CON_DRAWLINE16B || tw==CON_DRAWCIRCLE16Z || tw==CON_DRAWLINE256)
C_GetManyVars(5);
else if (tw==CON_DRAWLINE16Z)
C_GetManyVars(7);
......
......@@ -592,6 +592,7 @@ enum ScriptKeywords_t
CON_DRAWLINE16,
CON_DRAWLINE16B,
CON_DRAWLINE16Z,
CON_DRAWLINE256,
CON_DRAWCIRCLE16,
CON_DRAWCIRCLE16B,
CON_DRAWCIRCLE16Z,
......
......@@ -3061,7 +3061,15 @@ dodefault:
drawlinepat = odrawlinepat;
continue;
}
case CON_DRAWLINE256:
insptr++;
{
int32_t x1=Gv_GetVar(*insptr++), y1=Gv_GetVar(*insptr++);
int32_t x2=Gv_GetVar(*insptr++), y2=Gv_GetVar(*insptr++);
int32_t col=Gv_GetVar(*insptr++);
renderDrawLine(x1, y1, x2, y2, col);
continue;
}
case CON_DRAWCIRCLE16:
case CON_DRAWCIRCLE16B:
case CON_DRAWCIRCLE16Z:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment