replace remaining Fade usage in non-stage code

This commit is contained in:
Andrei Alexeyev 2020-01-04 00:12:20 +02:00
parent cfbc697936
commit be5ee1900d
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
5 changed files with 6 additions and 4 deletions

View file

@ -1160,7 +1160,7 @@ void process_boss(Boss **pboss) {
.pos = boss->pos,
.timeout = vrng_range(rng[2], 60, 70),
.rule = linear,
.draw_rule = Fade,
.draw_rule = pdraw_timeout_fade(1, 0),
.args = { vrng_range(rng[0], 3, 13) * vrng_dir(rng[1]) },
);
}

View file

@ -149,7 +149,7 @@ Item *create_clear_item(cmplx pos, uint clear_flags) {
.sprite = "flare",
.pos = pos,
.timeout = 30,
.draw_rule = Fade,
.draw_rule = pdraw_timeout_fade(1, 0),
.layer = LAYER_BULLET+1
);

View file

@ -190,7 +190,7 @@ static void reimu_spirit_bomb_impact_balls(cmplx pos, int count) {
.args = { cdir(2 * M_PI / count * (i + offset)) * 15 },
.angle = rng_angle(),
.rule = linear,
.draw_rule = Fade,
.draw_rule = pdraw_timeout_fade(1, 0),
.layer = LAYER_BOSS,
.flags = PFLAG_NOREFLECT | PFLAG_REQUIREDPARTICLE,
);

View file

@ -453,7 +453,7 @@ static int youmu_mirror_bomb_controller(Enemy *e, int t) {
.sprite = "arc",
.pos = e->pos,
.rule = linear,
.draw_rule = Fade,
.draw_rule = pdraw_timeout_fade(1, 0),
.color = RGBA(0.9, 0.8, 1.0, 0.0),
.timeout = 30,
.args = {

View file

@ -1111,10 +1111,12 @@ ProjDrawRule pdraw_timeout_scalefade(cmplx32 scale0, cmplx32 scale1, float32 opa
}
ProjDrawRule pdraw_timeout_scale(cmplx32 scale0, cmplx32 scale1) {
// TODO: specialized code path without fade component
return pdraw_timeout_scalefade(scale0, scale1, 1, 1);
}
ProjDrawRule pdraw_timeout_fade(float32 opacity0, float32 opacity1) {
// TODO: specialized code path without scale component
return pdraw_timeout_scalefade(1+I, 1+I, opacity0, opacity1);
}