Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Richard Gobeille
EDuke32
Commits
a3283219
Commit
a3283219
authored
Jan 08, 2021
by
Richard Gobeille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
editor: add drawline256 command for scripting
parent
1f0bc174
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
source/duke3d/src/m32def.cpp
source/duke3d/src/m32def.cpp
+3
-1
source/duke3d/src/m32def.h
source/duke3d/src/m32def.h
+1
-0
source/duke3d/src/m32exec.cpp
source/duke3d/src/m32exec.cpp
+9
-1
No files found.
source/duke3d/src/m32def.cpp
View file @
a3283219
...
...
@@ -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
);
...
...
source/duke3d/src/m32def.h
View file @
a3283219
...
...
@@ -592,6 +592,7 @@ enum ScriptKeywords_t
CON_DRAWLINE16
,
CON_DRAWLINE16B
,
CON_DRAWLINE16Z
,
CON_DRAWLINE256
,
CON_DRAWCIRCLE16
,
CON_DRAWCIRCLE16B
,
CON_DRAWCIRCLE16Z
,
...
...
source/duke3d/src/m32exec.cpp
View file @
a3283219
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment