struct quadtree_ops planet_ops;
int gravitations, optimizations;
+static int draw_lines = 0;
+
static void putpixel(struct SDL_Surface *screen, const int x, const int y,
const unsigned char r, const unsigned char g,
const unsigned char b)
pos.x += screen->w / 2;
pos.y += screen->h / 2;
+ if (draw_lines) {
+ for (i = 0; i < 4; i++) {
+ if (!p->tree.child[i])
+ continue;
- for (i = 0; i < 4; i++) {
- if (!p->tree.child[i])
- continue;
-
- struct planet *q = tree_to_planet(p->tree.child[i]);
+ struct planet *q = tree_to_planet(p->tree.child[i]);
- draw_line(screen, &p->pos, &q->pos,
- p->r, p->g, p->b, cam);
+ draw_line(screen, &p->pos, &q->pos,
+ p->r, p->g, p->b, cam);
+ }
}
draw_circle(screen, &pos, radius, p->r, p->g, p->b, 0);