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