Flappy game: reduce flickering.
This commit is contained in:
@@ -225,10 +225,11 @@ void draw_loop()
|
|||||||
{
|
{
|
||||||
/* Clear moving items. */
|
/* Clear moving items. */
|
||||||
clear_pillar(pillar_pos, gap_pos);
|
clear_pillar(pillar_pos, gap_pos);
|
||||||
clear_flappy(fx, fy);
|
|
||||||
|
|
||||||
/* Move items. */
|
/* Move items. */
|
||||||
if (running) {
|
if (running) {
|
||||||
|
clear_flappy(fx, fy);
|
||||||
|
|
||||||
fy += fall_rate;
|
fy += fall_rate;
|
||||||
fall_rate++;
|
fall_rate++;
|
||||||
|
|
||||||
@@ -243,8 +244,8 @@ void draw_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Draw moving items & animate. */
|
/* Draw moving items & animate. */
|
||||||
draw_pillar(pillar_pos, gap_pos);
|
|
||||||
draw_flappy(fx, fy);
|
draw_flappy(fx, fy);
|
||||||
|
draw_pillar(pillar_pos, gap_pos);
|
||||||
switch (wing) {
|
switch (wing) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user