Sim_Body* sim_get_next_body(Simulator* sim) { if(sim->bodies_count + 1 > sim->bodies_capacity) { Log_Error("Ran out of bodies"); return NULL; } Sim_Body* e = sim->bodies + sim->bodies_count++; init_body(e); e->id = sim->next_body_id++; return e; }
void init_robot() { init_bumper(); init_body(); init_wheels(); }