Optimizing rasterizer.
This commit is contained in:
@ -89,5 +89,8 @@
|
|||||||
XV(internals, "'argc", ARGC, DUP; tos = (cell_t) &g_sys.argc) \
|
XV(internals, "'argc", ARGC, DUP; tos = (cell_t) &g_sys.argc) \
|
||||||
XV(internals, "'argv", ARGV, DUP; tos = (cell_t) &g_sys.argv) \
|
XV(internals, "'argv", ARGV, DUP; tos = (cell_t) &g_sys.argv) \
|
||||||
XV(internals, "'runner", RUNNER, DUP; tos = (cell_t) &g_sys.runner) \
|
XV(internals, "'runner", RUNNER, DUP; tos = (cell_t) &g_sys.runner) \
|
||||||
|
YV(internals, fill32, cell_t c = tos; DROP; cell_t n = tos; DROP; \
|
||||||
|
uint32_t *a = (uint32_t *) tos; DROP; \
|
||||||
|
for (;n;--n) *a++ = c) \
|
||||||
Y(context, DUP; tos = (cell_t) (g_sys.context + 1)) \
|
Y(context, DUP; tos = (cell_t) (g_sys.context + 1)) \
|
||||||
Y(latestxt, DUP; tos = (cell_t) g_sys.latestxt)
|
Y(latestxt, DUP; tos = (cell_t) g_sys.latestxt)
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
\ Drawing:
|
\ Drawing:
|
||||||
\ box ( x y w h -- )
|
\ box ( x y w h -- )
|
||||||
|
|
||||||
|
also internals
|
||||||
grf definitions
|
grf definitions
|
||||||
|
|
||||||
0 value color
|
0 value color
|
||||||
@ -25,7 +26,8 @@ grf definitions
|
|||||||
internals definitions
|
internals definitions
|
||||||
|
|
||||||
: hline { x y w }
|
: hline { x y w }
|
||||||
x y pixel w 1- for color over l! 4 + next drop ;
|
\ x y pixel w 1- for color over l! 4 + next drop ;
|
||||||
|
x y pixel w color fill32 ;
|
||||||
|
|
||||||
grf definitions also internals
|
grf definitions also internals
|
||||||
|
|
||||||
|
|||||||
@ -192,8 +192,12 @@ create arrow-table
|
|||||||
targeted-arrow
|
targeted-arrow
|
||||||
;
|
;
|
||||||
|
|
||||||
|
0 value last-tm
|
||||||
|
0 value next-tm
|
||||||
|
|
||||||
: run
|
: run
|
||||||
begin
|
begin
|
||||||
|
poll
|
||||||
PRESSED event = if
|
PRESSED event = if
|
||||||
65 last-key = if
|
65 last-key = if
|
||||||
init
|
init
|
||||||
@ -202,11 +206,14 @@ create arrow-table
|
|||||||
fire
|
fire
|
||||||
then
|
then
|
||||||
then
|
then
|
||||||
poll
|
event UNKNOWN = if
|
||||||
100 random 0= if volcano-spew then
|
begin ms-ticks to next-tm next-tm last-tm - 10 < while 1 ms repeat
|
||||||
draw
|
next-tm to last-tm
|
||||||
tick
|
100 random 0= if volcano-spew then
|
||||||
cleanup
|
draw
|
||||||
|
tick
|
||||||
|
cleanup
|
||||||
|
then
|
||||||
FINISHED event = until
|
FINISHED event = until
|
||||||
bye
|
bye
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user