| 246 | } |
| 247 | |
| 248 | void draw_pixel(const int x, const int y, const int color) { |
| 249 | if(!is_off_screen(x, y)) camera.bitmap[x+y*(int)camera.width] = color; // only draw if point is on screen |
| 250 | } |
| 251 | void draw_circle(const int x, const int y, const int r, const int color) { |
| 252 | int d=-r, dx=r, dy=0; // Bresenham algorithm for circle |
| 253 | while(dx>=dy) { |
no test coverage detected