15 struct list_head list;
19 unsigned char r, g, b;
22 #define list_to_planet(list_head) container_of((list_head), struct planet, list)
24 #define tree_to_planet(qt) container_of((qt), struct planet, tree)
26 void init_planet(struct planet *p);
27 void create_planets(struct planet *p, int num, double total_mass,
29 void draw_planet(SDL_Surface *screen, struct planet *p, const struct camera *);
30 int gravitize_planets(struct planet *a, struct planet *b, const double time);
31 struct planet *merge_planets(struct planet *a, struct planet *b);
32 struct planet *move_planet(struct planet *p, const double time);
33 void print_planet(const struct planet *p);
35 int planet_spatial_compare(struct quadtree *a, struct quadtree *b);