static int grow_state = 0; /* Current state (values -1, 0, +1) */
-static void grow_set(const struct s_file *fp, int type)
+static void grow_init(const struct s_file *fp, int type)
{
if (!got_orig)
{
}
}
-static void grow_ball(const struct s_file *fp, float dt)
+static void grow_step(const struct s_file *fp, float dt)
{
float dr;
+ if (!grow)
+ return;
+
/* Calculate new size based on how long since you touched the coin... */
grow_t += dt;
sol_draw(&file);
- if (config_get_d(CONFIG_SHADOW))
+ if (pose == 0 && config_get_d(CONFIG_SHADOW))
{
shad_draw_set(ball_p, ball_r);
sol_shad(&file);
item_color(hp, c);
part_burst(p, c);
- grow_set(fp, hp->t);
+ grow_init(fp, hp->t);
if (hp->t == ITEM_COIN)
{
game_rz = game_iz;
}
- if (grow)
- grow_ball(fp, dt);
+ grow_step(fp, dt);
game_update_grav(h, g);
part_step(h, t);