diff --git a/src/test/kc/screen-center-angle.kc b/src/test/kc/screen-center-angle.kc index bb4d7783a..6c911db1f 100644 --- a/src/test/kc/screen-center-angle.kc +++ b/src/test/kc/screen-center-angle.kc @@ -34,10 +34,10 @@ void init_angle_screen(byte* screen) { signed word yw = (signed word)(word){ y*2, 0 }; word angle_w = atan2_16(xw, yw); byte ang_w = >(angle_w+0x0080); + screen_bottomline[xb] = ang_w; + screen_topline[xb] = -ang_w; screen_topline[x] = 0x80+ang_w; screen_bottomline[x] = 0x80-ang_w; - screen_topline[xb] = -ang_w; - screen_bottomline[xb] = ang_w; } screen_topline -= 40; screen_bottomline += 40; diff --git a/src/test/kc/screen-center-distance.kc b/src/test/kc/screen-center-distance.kc index b2cf1a89e..22bd2ccd7 100644 --- a/src/test/kc/screen-center-distance.kc +++ b/src/test/kc/screen-center-distance.kc @@ -4,6 +4,8 @@ import "stdlib" import "sqr" import "c64" import "font-hex" +import "time" +import "print" #reserve(08) @@ -13,7 +15,13 @@ const byte* SCREEN = 0x2800; void main() { init_font_hex(CHARSET); *D018 = toD018(SCREEN, CHARSET); + clock_start(); init_dist_screen(SCREEN); + clock_t cyclecount = clock()-CLOCKS_PER_INIT; + byte* BASE_SCREEN = 0x0400; + byte* BASE_CHARSET = 0x1000; + print_dword_at(cyclecount, BASE_SCREEN); + *D018 = toD018(BASE_SCREEN, BASE_CHARSET); } // Populates 1000 bytes (a screen) with values representing the distance to the center.