Colour pinstripe/Display: Difference between revisions
Improve Uxntal version with suggestions from #uxn IRC channel
(→Uxntal: Added image output.) |
(Improve Uxntal version with suggestions from #uxn IRC channel) |
||
(One intermediate revision by the same user not shown) | |||
Line 2,181:
=={{header|Uxntal}}==
<syntaxhighlight lang="uxntal">(
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|0100
( set theme )
#0f00 .System/r DEO2
Line 2,193:
( store screen width )
.Screen/width DEI2 ,
( store a quarter of the screen height )
( draw
#
&loop ( -- )
&loop▼
#00 OVR [ LIT2 &quarter-height $2 ] MUL2 .Screen/y DEO2
( draw a layer )
INCk draw-layer
( do it four times )
INC DUP #04 LTH ?&loop
POP BRK
@draw-layer ( step -: )
( extend step to short, create counter )
#00 SWP #0000
▲ &loop ( -- )
( update x coordinate )
MUL2k .Screen/x DEO2
( fill a region )
DUP #03 AND #80 ORA .Screen/pixel DEO
INC2 MUL2k [ LIT2 &width $2 ] LTH2 ?&loop
[[File:Colour pinstripe-Display in Uxntal.png|thumb|none|alt=Uxntal implementation of Colour pinstripe/display in an emulator.|Running in an emulator.]]
=={{header|Visual Basic .NET}}==
|