diff options
Diffstat (limited to 'apps/plugins/pong.c')
-rw-r--r-- | apps/plugins/pong.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 2fec2e3a44..438bfbbc4e 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c | |||
@@ -72,10 +72,14 @@ struct pong { | |||
72 | 72 | ||
73 | void singlepad(int x, int y, int set) | 73 | void singlepad(int x, int y, int set) |
74 | { | 74 | { |
75 | if(set) | 75 | if(set) { |
76 | rb->lcd_fillrect(x, y, PAD_WIDTH, PAD_HEIGHT); | 76 | rb->lcd_fillrect(x, y, PAD_WIDTH, PAD_HEIGHT); |
77 | else | 77 | } |
78 | rb->lcd_clearrect(x, y, PAD_WIDTH, PAD_HEIGHT); | 78 | else { |
79 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | ||
80 | rb->lcd_fillrect(x, y, PAD_WIDTH, PAD_HEIGHT); | ||
81 | rb->lcd_set_drawmode(DRMODE_SOLID); | ||
82 | } | ||
79 | } | 83 | } |
80 | 84 | ||
81 | void pad(struct pong *p, int pad) | 85 | void pad(struct pong *p, int pad) |
@@ -241,7 +245,9 @@ void ball(struct pong *p) | |||
241 | score(p, 0); | 245 | score(p, 0); |
242 | 246 | ||
243 | /* clear old position */ | 247 | /* clear old position */ |
244 | rb->lcd_clearrect(x, y, BALL_WIDTH, BALL_HEIGTH); | 248 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
249 | rb->lcd_fillrect(x, y, BALL_WIDTH, BALL_HEIGTH); | ||
250 | rb->lcd_set_drawmode(DRMODE_SOLID); | ||
245 | 251 | ||
246 | /* draw the new ball position */ | 252 | /* draw the new ball position */ |
247 | rb->lcd_fillrect(newx, newy, BALL_WIDTH, BALL_HEIGTH); | 253 | rb->lcd_fillrect(newx, newy, BALL_WIDTH, BALL_HEIGTH); |