mirror of
https://github.com/irmen/prog8.git
synced 2024-10-25 00:24:16 +00:00
removed cx16.FB_cursor_position2() because it was only for use in the graphics module
This commit is contained in:
parent
d73709653d
commit
d22359b6e7
@ -16,6 +16,8 @@
|
|||||||
graphics {
|
graphics {
|
||||||
%option no_symbol_prefixing
|
%option no_symbol_prefixing
|
||||||
|
|
||||||
|
romsub $feff = FB_cursor_position2() clobbers(A,X,Y) ; alias for the normal FB_cursor_position() call but reuses existing r0 and r1
|
||||||
|
|
||||||
const uword WIDTH = 320
|
const uword WIDTH = 320
|
||||||
const ubyte HEIGHT = 240
|
const ubyte HEIGHT = 240
|
||||||
|
|
||||||
@ -91,31 +93,31 @@ graphics {
|
|||||||
while xx>=yy {
|
while xx>=yy {
|
||||||
cx16.r0 = xcenter + xx
|
cx16.r0 = xcenter + xx
|
||||||
cx16.r1 = ycenter + yy
|
cx16.r1 = ycenter + yy
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter - xx
|
cx16.r0 = xcenter - xx
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter + xx
|
cx16.r0 = xcenter + xx
|
||||||
cx16.r1 = ycenter - yy
|
cx16.r1 = ycenter - yy
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter - xx
|
cx16.r0 = xcenter - xx
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter + yy
|
cx16.r0 = xcenter + yy
|
||||||
cx16.r1 = ycenter + xx
|
cx16.r1 = ycenter + xx
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter - yy
|
cx16.r0 = xcenter - yy
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter + yy
|
cx16.r0 = xcenter + yy
|
||||||
cx16.r1 = ycenter - xx
|
cx16.r1 = ycenter - xx
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
cx16.r0 = xcenter - yy
|
cx16.r0 = xcenter - yy
|
||||||
cx16.FB_cursor_position2()
|
FB_cursor_position2()
|
||||||
cx16.FB_set_pixel(stroke_color)
|
cx16.FB_set_pixel(stroke_color)
|
||||||
|
|
||||||
yy++
|
yy++
|
||||||
|
@ -79,15 +79,13 @@ palette {
|
|||||||
|
|
||||||
sub set_grayscale() {
|
sub set_grayscale() {
|
||||||
vera_palette_ptr = $fa00
|
vera_palette_ptr = $fa00
|
||||||
|
cc=0
|
||||||
repeat 16 {
|
repeat 16 {
|
||||||
cc=0
|
cx16.vpoke(1, vera_palette_ptr, cc)
|
||||||
repeat 16 {
|
vera_palette_ptr++
|
||||||
cx16.vpoke(1, vera_palette_ptr, cc)
|
cx16.vpoke(1, vera_palette_ptr, cc)
|
||||||
vera_palette_ptr++
|
vera_palette_ptr++
|
||||||
cx16.vpoke(1, vera_palette_ptr, cc)
|
cc += $11
|
||||||
vera_palette_ptr++
|
|
||||||
cc += $11
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,40 +148,34 @@ palette {
|
|||||||
|
|
||||||
sub set_c64pepto() {
|
sub set_c64pepto() {
|
||||||
vera_palette_ptr = $fa00
|
vera_palette_ptr = $fa00
|
||||||
repeat 16 {
|
for cc in 0 to 15 {
|
||||||
for cc in 0 to 15 {
|
uword ccp = C64_colorpalette_pepto[cc]
|
||||||
uword ccp = C64_colorpalette_pepto[cc]
|
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
||||||
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
||||||
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub set_c64light() {
|
sub set_c64light() {
|
||||||
vera_palette_ptr = $fa00
|
vera_palette_ptr = $fa00
|
||||||
repeat 16 {
|
for cc in 0 to 15 {
|
||||||
for cc in 0 to 15 {
|
uword ccp = C64_colorpalette_light[cc]
|
||||||
uword ccp = C64_colorpalette_light[cc]
|
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
||||||
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
||||||
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub set_c64dark() {
|
sub set_c64dark() {
|
||||||
vera_palette_ptr = $fa00
|
vera_palette_ptr = $fa00
|
||||||
repeat 16 {
|
for cc in 0 to 15 {
|
||||||
for cc in 0 to 15 {
|
uword ccp = C64_colorpalette_dark[cc]
|
||||||
uword ccp = C64_colorpalette_dark[cc]
|
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
||||||
cx16.vpoke(1, vera_palette_ptr, lsb(ccp)) ; G, B
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
||||||
cx16.vpoke(1, vera_palette_ptr, msb(ccp)) ; R
|
vera_palette_ptr++
|
||||||
vera_palette_ptr++
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +367,6 @@ romsub $fef6 = FB_init() clobbers(A,X,Y)
|
|||||||
romsub $fef9 = FB_get_info() clobbers(X,Y) -> byte @A, uword @R0, uword @R1 ; width=r0, height=r1
|
romsub $fef9 = FB_get_info() clobbers(X,Y) -> byte @A, uword @R0, uword @R1 ; width=r0, height=r1
|
||||||
romsub $fefc = FB_set_palette(uword pointer @R0, ubyte index @A, ubyte colorcount @X) clobbers(A,X,Y)
|
romsub $fefc = FB_set_palette(uword pointer @R0, ubyte index @A, ubyte colorcount @X) clobbers(A,X,Y)
|
||||||
romsub $feff = FB_cursor_position(uword x @R0, uword y @R1) clobbers(A,X,Y)
|
romsub $feff = FB_cursor_position(uword x @R0, uword y @R1) clobbers(A,X,Y)
|
||||||
romsub $feff = FB_cursor_position2() clobbers(A,X,Y) ; alias for the previous routine, but avoiding having to respecify both x and y every time
|
|
||||||
romsub $ff02 = FB_cursor_next_line(uword x @R0) clobbers(A,X,Y)
|
romsub $ff02 = FB_cursor_next_line(uword x @R0) clobbers(A,X,Y)
|
||||||
romsub $ff05 = FB_get_pixel() clobbers(X,Y) -> ubyte @A
|
romsub $ff05 = FB_get_pixel() clobbers(X,Y) -> ubyte @A
|
||||||
romsub $ff08 = FB_get_pixels(uword pointer @R0, uword count @R1) clobbers(A,X,Y)
|
romsub $ff08 = FB_get_pixels(uword pointer @R0, uword count @R1) clobbers(A,X,Y)
|
||||||
|
Loading…
Reference in New Issue
Block a user