-static inline rectangle rect_from_enemy(jumpnrun_enemy const *enemy) {
- badge_sprite const *cur_sprite = &enemy->type->animation_frames[(enemy->tick_counter / enemy->type->animation_ticks_per_frame) % enemy->type->animation_length];
- rectangle r = { enemy->current_pos, { FIXED_POINT(cur_sprite->width, 0), FIXED_POINT(cur_sprite->height, 0) } };
- return r;
-}
+static inline rectangle const *enemy_box (jumpnrun_enemy const *enemy) { return &enemy->base.current_box ; }
+static inline vec2d enemy_position (jumpnrun_enemy const *enemy) { return enemy->base.current_box.pos; }
+static inline rectangle enemy_hitbox (jumpnrun_enemy const *enemy) { rectangle r = enemy->type->hitbox; rectangle_move_rel(&r, enemy_position(enemy)); return r; }
+static inline badge_sprite const *enemy_sprite (jumpnrun_enemy const *enemy) { return &enemy->type->animation_frames[enemy->base.anim_frame]; }
+static inline uint8_t enemy_render_flags(jumpnrun_enemy const *enemy) { return fixed_point_lt(enemy->base.inertia.x, FIXED_POINT(0, 0)) ? 0 : BADGE_BLT_MIRRORED; }