mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-14 13:33:48 +00:00
hgr: vgi: line support
This commit is contained in:
parent
c2edf45b18
commit
a5a8694340
@ -25,7 +25,7 @@ VGI: vgi.o
|
||||
ld65 -o VGI vgi.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
vgi.o: clock.data \
|
||||
vgi.s vgi_clearscreen.s vgi_rectangle.s vgi_circles.s
|
||||
vgi.s vgi_clearscreen.s vgi_rectangle.s vgi_circles.s vgi_lines.s
|
||||
ca65 -o vgi.o vgi.s -l vgi.lst
|
||||
|
||||
|
||||
|
@ -55,8 +55,8 @@ vgi_rts_table:
|
||||
.word vgi_simple_rectangle-1 ; 1 = simple rectangle
|
||||
.word vgi_circle-1 ; 2 = plain circle
|
||||
.word vgi_filled_circle-1 ; 3 = filled circle
|
||||
.word all_done-1 ; 4 = dot
|
||||
.word all_done-1 ; 5 = line to
|
||||
.word vgi_point-1 ; 4 = dot
|
||||
.word vgi_lineto-1 ; 5 = line to
|
||||
.word all_done-1
|
||||
.word all_done-1
|
||||
.word all_done-1
|
||||
@ -75,5 +75,6 @@ all_done:
|
||||
.include "vgi_clearscreen.s"
|
||||
.include "vgi_rectangle.s"
|
||||
.include "vgi_circles.s"
|
||||
.include "vgi_lines.s"
|
||||
|
||||
.include "clock.data"
|
||||
|
40
graphics/hgr/vgi/vgi_lines.s
Normal file
40
graphics/hgr/vgi/vgi_lines.s
Normal file
@ -0,0 +1,40 @@
|
||||
; VGI Lines
|
||||
|
||||
;========================
|
||||
; VGI point
|
||||
;========================
|
||||
|
||||
VGI_PCOLOR = P0
|
||||
VGI_PX = P1
|
||||
VGI_PY = P2
|
||||
|
||||
vgi_point:
|
||||
ldx VGI_PCOLOR
|
||||
lda COLORTBL,X
|
||||
sta HGR_COLOR
|
||||
|
||||
ldy #0
|
||||
ldx VGI_PX
|
||||
lda VGI_PY
|
||||
|
||||
jsr HPLOT0 ; plot at (Y,X), (A)
|
||||
|
||||
jmp vgi_loop
|
||||
|
||||
|
||||
|
||||
|
||||
;========================
|
||||
; VGI line to
|
||||
;========================
|
||||
VGI_LX = P0
|
||||
VGI_LY = P1
|
||||
|
||||
vgi_lineto:
|
||||
ldx #0
|
||||
ldy VGI_LY
|
||||
lda VGI_LX
|
||||
|
||||
jsr HGLIN ; line to (X,A),(Y)
|
||||
|
||||
jmp vgi_loop
|
Loading…
x
Reference in New Issue
Block a user