ohsp

Prototype for a game with dual thruster controls.
git clone git://git.amin.space/ohsp.git
Log | Files | Refs | LICENSE

entity.c (271B)


      1 #include "entity.h"
      2 #include "vector.h"
      3 
      4 
      5 void entity_accelerate(struct Entity *e, struct Vec2d *v)
      6 {
      7     struct Vec2d new_vec = vec2d_add(e->velocity, *v);
      8     //printf("(%f, %f)\n", new_vec.x, new_vec.y);
      9     e->velocity.x = new_vec.x;
     10     e->velocity.y = new_vec.y;
     11 }