Flappy game: reduce flickering.

This commit is contained in:
Serge Vakulenko
2015-12-03 21:43:43 -08:00
parent 6028db705a
commit 8dd0fb4860

View File

@@ -225,10 +225,11 @@ void draw_loop()
{
/* Clear moving items. */
clear_pillar(pillar_pos, gap_pos);
clear_flappy(fx, fy);
/* Move items. */
if (running) {
clear_flappy(fx, fy);
fy += fall_rate;
fall_rate++;
@@ -243,8 +244,8 @@ void draw_loop()
}
/* Draw moving items & animate. */
draw_pillar(pillar_pos, gap_pos);
draw_flappy(fx, fy);
draw_pillar(pillar_pos, gap_pos);
switch (wing) {
case 0:
case 1: