Skip to content
Snippets Groups Projects
Commit 9fe9b66c authored by Arian Ubuntu's avatar Arian Ubuntu
Browse files

Renommer type "planet_t" par "celestial_body_t"

parent eb445369
No related branches found
No related tags found
1 merge request!42Renommer type "planet_t" par "celestial_body_t"
......@@ -4,23 +4,23 @@
#include "../vec2/vec2.h"
#include "../gfx/gfx.h"
typedef struct _planet
typedef struct _celestial_body
{
double mass;
vec2 pos; // x(t)
vec2 prec_pos; // x(t - dt)
} planet_t;
} celestial_body_t;
typedef struct _system
{
planet_t star; // ex. The sun
celestial_body_t star; // ex. The sun
uint32_t nb_planets; // The number of orbiting planets
planet_t *planets; // An array of orbiting planets
celestial_body_t *planets; // An array of orbiting planets
} system_t;
// Those function are not mandatory to implement,
// it's rather a hint of what you should have.
planet_t create_planet(double mass, vec2 pos);
celestial_body_t create_planet(double mass, vec2 pos);
system_t create_system(double delta_t);
void show_system(struct gfx_context_t *ctxt, system_t *system);
void update_system(system_t *system, double delta_t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment