diff --git a/compiler/res/prog8lib/cx16lib.p8 b/compiler/res/prog8lib/cx16lib.p8 index 5538bac5a..288ab0e45 100644 --- a/compiler/res/prog8lib/cx16lib.p8 +++ b/compiler/res/prog8lib/cx16lib.p8 @@ -192,11 +192,12 @@ romsub $ff4d = clock_set_date_time() clobbers(A, X, Y) ; args: r0, r1, r2, romsub $ff50 = clock_get_date_time() clobbers(A) ; outout args: r0, r1, r2, r3L ; high level graphics & fonts -romsub $ff20 = GRAPH_init() ; uses vectors=r0 -romsub $ff23 = GRAPH_clear() +; TODO specify the correct clobbers for GRAPH and FB functions +romsub $ff20 = GRAPH_init() clobbers(A,X,Y) ; uses vectors=r0 +romsub $ff23 = GRAPH_clear() clobbers(A,X,Y) romsub $ff26 = GRAPH_set_window() ; uses x=r0, y=r1, width=r2, height=r3 -romsub $ff29 = GRAPH_set_colors(ubyte stroke @A, ubyte fill @X, ubyte background @Y) -romsub $ff2c = GRAPH_draw_line() ; uses x1=r0, y1=r1, x2=r2, y2=r3 +romsub $ff29 = GRAPH_set_colors(ubyte stroke @A, ubyte fill @X, ubyte background @Y) clobbers (A,X,Y) +romsub $ff2c = GRAPH_draw_line() clobbers(A,X,Y) ; uses x1=r0, y1=r1, x2=r2, y2=r3 romsub $ff2f = GRAPH_draw_rect(ubyte fill @Pc) ; uses x=r0, y=r1, width=r2, height=r3, cornerradius=r4 romsub $ff32 = GRAPH_move_rect() ; uses sx=r0, sy=r1, tx=r2, ty=r3, width=r4, height=r5 romsub $ff35 = GRAPH_draw_oval(ubyte fill @Pc) ; uses x=r0, y=r1, width=r2, height=r3 diff --git a/examples/cx16/cube3d-gfx.p8 b/examples/cx16/cube3d-gfx.p8 index 3b2a934da..aa0890154 100644 --- a/examples/cx16/cube3d-gfx.p8 +++ b/examples/cx16/cube3d-gfx.p8 @@ -31,9 +31,9 @@ main { rotate_vertices(msb(anglex), msb(angley), msb(anglez)) cx16.GRAPH_clear() draw_lines() - anglex-=250 - angley+=109 - anglez+=226 + anglex-=500 + angley+=217 + anglez+=452 } } @@ -84,7 +84,7 @@ main { cx16.r1 = rotatedy[vFrom] / persp1 + screen_height/2 as uword cx16.r2 = rotatedx[vTo] / persp2 + screen_width/2 as uword cx16.r3 = rotatedy[vTo] / persp2 + screen_height/2 as uword - cx16.GRAPH_draw_line() ; TODO are there bugs in here? the lines are all wrong... + cx16.GRAPH_draw_line() } } } diff --git a/examples/test.p8 b/examples/test.p8 index f90540f22..7f53bfdfc 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -11,6 +11,8 @@ main { c64.CHROUT('*') + uword value = lsb(rnd() & 31) ; TODO fix compiler crash + ;asmsub clear_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) { ...} ; TODO dont cause name conflict if we define sub or sub with param 'color' or even a var 'color' later.