}
self->base.inertia.y = fixed_point_add(self->base.inertia.y,
- fixed_point_mul(FIXED_POINT(0, 5),
+ fixed_point_mul(fixed_point_div(self->type->spawn_inertia.y, FIXED_INT(40)),
fixed_point_sub(self->spawn_pos.y,
self->base.current_box.pos.y)));
#define FIXED_POINT_I(x, y) { ((x) * 256) + ((y) * 256 / 1000) }
#define FIXED_INT_I(x) FIXED_POINT_I(x, 0)
-static inline fixed_point FIXED_POINT(unsigned x, unsigned y) {
- fixed_point r = { ((int) x * 256) + ((int) y * 256 / 1000) };
+static inline fixed_point FIXED_POINT(int32_t x, int32_t y) {
+ fixed_point r = { (x * 256) + (y * 256 / 1000) };
return r;
}
-static inline fixed_point FIXED_INT(unsigned x) { return FIXED_POINT(x, 0); }
+static inline fixed_point FIXED_INT(int32_t x) { return FIXED_POINT(x, 0); }
static inline int fixed_point_cast_int(fixed_point x) { return x.data / 256; }