laser,move,projectile: annotate hot paths
This commit is contained in:
parent
4592212b06
commit
ef92ee12fc
3 changed files with 3 additions and 2 deletions
|
@ -174,6 +174,7 @@ static void laserseg_flip(LaserSegment *s) {
|
|||
SWAP(s->width.a, s->width.b);
|
||||
}
|
||||
|
||||
attr_hot
|
||||
static int quantize_laser(Laser *l) {
|
||||
// Break the laser curve into small line segments, simplify and cull them,
|
||||
// compute the bounding box.
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct MoveParams {
|
|||
real attraction_exponent;
|
||||
} MoveParams;
|
||||
|
||||
cmplx move_update(cmplx *restrict pos, MoveParams *restrict params);
|
||||
cmplx move_update(cmplx *restrict pos, MoveParams *restrict params) attr_hot attr_nonnull_all;
|
||||
cmplx move_update_multiple(uint times, cmplx *restrict pos, MoveParams *restrict params);
|
||||
|
||||
INLINE MoveParams move_next(cmplx pos, MoveParams move) {
|
||||
|
|
|
@ -239,7 +239,7 @@ void calc_projectile_collision(Projectile *p, ProjCollisionResult *out_col) attr
|
|||
void apply_projectile_collision(ProjectileList *projlist, Projectile *p, ProjCollisionResult *col) attr_nonnull_all;
|
||||
int trace_projectile(Projectile *p, ProjCollisionResult *out_col, ProjCollisionType stopflags, int timeofs) attr_nonnull_all;
|
||||
bool projectile_in_viewport(Projectile *proj) attr_nonnull_all;
|
||||
void process_projectiles(ProjectileList *projlist, bool collision) attr_nonnull_all;
|
||||
void process_projectiles(ProjectileList *projlist, bool collision) attr_hot attr_nonnull_all;
|
||||
bool projectile_is_clearable(Projectile *p) attr_nonnull_all;
|
||||
|
||||
Projectile *spawn_projectile_collision_effect(Projectile *proj) attr_nonnull_all;
|
||||
|
|
Loading…
Reference in a new issue