mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +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,7 +79,6 @@ palette {
|
|||||||
|
|
||||||
sub set_grayscale() {
|
sub set_grayscale() {
|
||||||
vera_palette_ptr = $fa00
|
vera_palette_ptr = $fa00
|
||||||
repeat 16 {
|
|
||||||
cc=0
|
cc=0
|
||||||
repeat 16 {
|
repeat 16 {
|
||||||
cx16.vpoke(1, vera_palette_ptr, cc)
|
cx16.vpoke(1, vera_palette_ptr, cc)
|
||||||
@ -89,7 +88,6 @@ palette {
|
|||||||
cc += $11
|
cc += $11
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
uword[] C64_colorpalette_dark = [ ; this is a darker palette with more contrast
|
uword[] C64_colorpalette_dark = [ ; this is a darker palette with more contrast
|
||||||
$000, ; 0 = black
|
$000, ; 0 = black
|
||||||
@ -150,7 +148,6 @@ 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
|
||||||
@ -159,11 +156,9 @@ palette {
|
|||||||
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
|
||||||
@ -172,11 +167,9 @@ palette {
|
|||||||
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
|
||||||
@ -185,6 +178,5 @@ palette {
|
|||||||
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