Compare commits
No commits in common. "78cdf6c993d2b2dc0743c433963cea34960a4f60" and "1f4b6008d77a11620673f05e526ee284bd50e6e4" have entirely different histories.
78cdf6c993
...
1f4b6008d7
1 changed files with 4 additions and 43 deletions
|
@ -3,60 +3,21 @@
|
||||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||||
|
|
||||||
|
|
||||||
|58 @canvas-width
|
|58 @width
|
||||||
|1f @canvas-height
|
|1f @height
|
||||||
|
|
||||||
(to run gui: `./run_ui.sh one_line_canvas.tal`)
|
(to run gui: `./run_ui.sh one_line_canvas.tal`)
|
||||||
(to run debugger: `../uxn/bin/uxnasm one_line_canvas.tal one_line_canvas.rom && ../uxn/bin/uxnemu ../beetbug.rom ./one_line_canvas.rom`)
|
(to run debugger: `../uxn/bin/uxnasm one_line_canvas.tal one_line_canvas.rom && ../uxn/bin/uxnemu ../beetbug.rom ./one_line_canvas.rom`)
|
||||||
%dbug { #01 .System/debug DEO }
|
|
||||||
|
|
||||||
|0100
|
|0100
|
||||||
@on-reset
|
@on-reset
|
||||||
setup-gui
|
setup-gui
|
||||||
draw-canvas-bounds
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@draw-line
|
|
||||||
(change x,y to top left of canvas)
|
|
||||||
LIT2 00 -canvas-width .Screen/x DEO2
|
|
||||||
LIT2 00 -canvas-height .Screen/y DEO2
|
|
||||||
|
|
||||||
&x $1
|
|
||||||
(set x to 88)
|
|
||||||
#58 ,&x STR
|
|
||||||
(#00 ,&i STR)
|
|
||||||
|
|
||||||
&loop
|
|
||||||
#00 LIT &x $1 .Screen/x DEO2
|
|
||||||
LIT &x $1
|
|
||||||
INC
|
|
||||||
,&x STRk
|
|
||||||
|
|
||||||
EQUk ?&loop
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(
|
|
||||||
,&top-left-x STR
|
|
||||||
dbug
|
|
||||||
&loop
|
|
||||||
LIT -width
|
|
||||||
(00 58)
|
|
||||||
ADDk (00 58 58)
|
|
||||||
#00 .Screen/x DEO2 (0058 00B0)
|
|
||||||
#01 .Screen/pixel DEO
|
|
||||||
INC2 (0059 00B0)
|
|
||||||
EQUk ?&loop
|
|
||||||
POP2 POP2)
|
|
||||||
JMP2r
|
|
||||||
|
|
||||||
@setup-gui ( -- )
|
@setup-gui ( -- )
|
||||||
(set screen height and width the 3x canvas size)
|
(set screen height and width the 3x canvas size)
|
||||||
LIT2 =canvas-width #0003 MUL2 .Screen/width DEO2
|
LIT2 =width #0003 MUL2 .Screen/width DEO2
|
||||||
LIT2 =canvas-height #0003 MUL2 .Screen/height DEO2
|
LIT2 =height #0003 MUL2 .Screen/height DEO2
|
||||||
(set basic color scheme)
|
(set basic color scheme)
|
||||||
#f07f .System/r DEO2
|
#f07f .System/r DEO2
|
||||||
#f0d6 .System/g DEO2
|
#f0d6 .System/g DEO2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue