(tgachr) Added dither
This commit is contained in:
parent
9a4634c02b
commit
124109101f
Binary file not shown.
|
@ -158,15 +158,19 @@
|
|||
( save ) ROT ROT STA
|
||||
JMP2r
|
||||
|
||||
@pixel-raw-true ( pixel* -- color )
|
||||
@pixel-raw-true ( x* y* addr* -- x* y* color )
|
||||
LDAk ,&b STR
|
||||
INC2 LDAk ,&g STR
|
||||
INC2 LDAk ,&r STR
|
||||
INC2 LDA ,&a STR
|
||||
[ LIT2 00 &r $1 ] [ LIT2 00 &g $1 ] [ LIT2 00 &b $1 ] ADD2 ADD2
|
||||
( ) #0003 DIV2 NIP [ LIT &a $1 ] POP #06 SFT JMP2r
|
||||
EOR2k NIP #01 AND STH
|
||||
[ LIT2 00 &r $1 ] [ LIT2 00 &g $1 ] ADD2 [ LIT2 00 &b $1 ] ADD2
|
||||
( ) #0003 DIV2 NIP [ LIT &a $1 ] POP #05 SFT
|
||||
( dither ) STHr ADD #01 SFT
|
||||
( max ) #03 LTHk [ JMP SWP POP ]
|
||||
JMP2r
|
||||
|
||||
@pixel-raw-bw ( pixel* -- color )
|
||||
@pixel-raw-bw ( x* y* addr* -- x* y* color )
|
||||
( res ) LDA JMP2r
|
||||
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue