corelib: PUTPIXEL can draw color 0 again
This commit is contained in:
parent
4ad879ba68
commit
4d103f99ec
1 changed files with 20 additions and 0 deletions
|
|
@ -754,6 +754,9 @@ PUTPIXEL_4BPP:
|
|||
STORE.B FB_WA ; set as write and read addresses
|
||||
STORE.B FB_RA
|
||||
|
||||
LOAD PUTPIXEL_COLOR
|
||||
CBRANCH.Z PUTPX_CLR ; color 0 is special case
|
||||
|
||||
; create pixel data from color value in
|
||||
; leftmost pixel data bits (31-28)
|
||||
LOADC 0
|
||||
|
|
@ -775,12 +778,29 @@ PUTPIXEL_4BPP:
|
|||
OR ; OR in new pixel bits
|
||||
STORE.B FB_IO ; write new pixel data word to vmem
|
||||
|
||||
PUTPX_XT:
|
||||
LOAD PUTPIXEL_BPSAV
|
||||
STOREREG BP
|
||||
|
||||
FPADJ PUTPIXEL_FS
|
||||
RET
|
||||
|
||||
PUTPX_CLR:
|
||||
LOADCP $F0000000 ; mask for leftmost pixel
|
||||
STORE.B FB_SHIFTER ; shift accordingly
|
||||
LOAD PUTPIXEL_X
|
||||
STORE.B FB_SHIFTCOUNT
|
||||
|
||||
LOAD.B FB_SHIFTER ; get shifted value
|
||||
NOT ; invert for real mask
|
||||
LOAD.B FB_IO ; get background pixels
|
||||
AND ; clear pixel with mask
|
||||
STORE.B FB_IO ; no need to OR in new pixel, just store to vmem
|
||||
|
||||
BRANCH PUTPX_XT
|
||||
|
||||
|
||||
|
||||
; draw a line between two points
|
||||
; parameters: x0, y0, x1, y1, color
|
||||
.EQU DL_X0 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue