fix some trivial deprecations

This commit is contained in:
Andrei Alexeyev 2020-01-06 06:47:43 +02:00
parent a1177bb817
commit 9fd9dfcf94
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
4 changed files with 5 additions and 10 deletions

View file

@ -578,8 +578,7 @@ static void draw_spell_portrait(Boss *b, int time) {
r_state_pop();
}
DEPRECATED_DRAW_RULE
static void BossGlow(Projectile *p, int t, ProjDrawRuleArgs args) {
static void boss_glow_draw(Projectile *p, int t, ProjDrawRuleArgs args) {
float s = 1.0+t/(double)p->timeout*0.5;
float fade = 1 - (1.5 - s);
float deform = 5 - 10 * fade * fade;
@ -598,13 +597,13 @@ static void BossGlow(Projectile *p, int t, ProjDrawRuleArgs args) {
});
}
static Projectile* spawn_boss_glow(Boss *boss, const Color *clr, int timeout) {
static Projectile *spawn_boss_glow(Boss *boss, const Color *clr, int timeout) {
return PARTICLE(
.sprite_ptr = aniplayer_get_frame(&boss->ani),
// this is in sync with the boss position oscillation
.pos = boss->pos + 6 * sin(global.frames/25.0) * I,
.color = clr,
.draw_rule = BossGlow,
.draw_rule = boss_glow_draw,
.timeout = timeout,
.layer = LAYER_PARTICLE_LOW,
.shader = "sprite_silhouette",
@ -1240,7 +1239,6 @@ void boss_reset_motion(Boss *boss) {
boss->move.retention = 0.8;
}
DEPRECATED_DRAW_RULE
static void boss_death_effect_draw_overlay(Projectile *p, int t, ProjDrawRuleArgs args) {
FBPair *framebuffers = stage_get_fbpair(FBPAIR_FG);
r_framebuffer(framebuffers->front);

View file

@ -432,7 +432,6 @@ static void _powersurge_trail_draw(Projectile *p, float t, float cmul) {
});
}
DEPRECATED_DRAW_RULE
static void powersurge_trail_draw(Projectile *p, int t, ProjDrawRuleArgs args) {
if(t > 0) {
_powersurge_trail_draw(p, t - 0.5, 0.25);
@ -710,7 +709,6 @@ static int powersurge_discharge(Projectile *p, int t) {
return ACTION_NONE;
}
DEPRECATED_DRAW_RULE
static void powersurge_distortion_draw(Projectile *p, int t, ProjDrawRuleArgs args) {
if(config_get_int(CONFIG_POSTPROCESS) < 1) {
return;

View file

@ -925,7 +925,7 @@ void ProjDrawCore(Projectile *proj, const Color *c) {
projectile_draw_sprite(proj->sprite, c, proj->opacity, proj->scale);
}
void ProjDraw(Projectile *proj, int t, ProjDrawRuleArgs args) {
static void pdraw_basic_func(Projectile *proj, int t, ProjDrawRuleArgs args) {
SpriteParamsBuffer spbuf;
SpriteParams sp = projectile_sprite_params(proj, &spbuf);
@ -940,7 +940,7 @@ void ProjDraw(Projectile *proj, int t, ProjDrawRuleArgs args) {
}
ProjDrawRule pdraw_basic(void) {
return (ProjDrawRule) { ProjDraw };
return (ProjDrawRule) { pdraw_basic_func };
}
static void pdraw_blast_func(Projectile *p, int t, ProjDrawRuleArgs args) {

View file

@ -233,7 +233,6 @@ int asymptotic(Projectile *p, int t);
#define DEPRECATED_DRAW_RULE attr_deprecated("")
void ProjDrawCore(Projectile *proj, const Color *c);
void ProjDraw(Projectile *proj, int t, ProjDrawRuleArgs args) DEPRECATED_DRAW_RULE;
void Shrink(Projectile *p, int t, ProjDrawRuleArgs) DEPRECATED_DRAW_RULE;
void Fade(Projectile *p, int t, ProjDrawRuleArgs) DEPRECATED_DRAW_RULE;