+void jumpnrun_render_splosion (badge_framebuffer *fb, jumpnrun_game_state const *state, jumpnrun_moveable const *moveable) {
+ badge_sprite const *sprite = &anim_splosion[moveable->tick_minor / JUMPNRUN_SPLOSION_TICKS_PER_FRAME];
+ vec2d sprite_offset = {
+ fixed_point_div(fixed_point_sub(FIXED_INT(sprite->width ), rectangle_width (&moveable->hitbox)), FIXED_INT(2)),
+ fixed_point_div(fixed_point_sub(FIXED_INT(sprite->height), rectangle_height(&moveable->hitbox)), FIXED_INT(2))
+ };
+ vec2d render_pos = vec2d_sub(moveable->hitbox.pos, sprite_offset);
+
+ badge_framebuffer_blt(fb,
+ fixed_point_cast_int(render_pos.x) - jumpnrun_screen_left(state),
+ fixed_point_cast_int(render_pos.y),
+ sprite, 0);
+}
+