diff options
Diffstat (limited to 'apps/plugins/pong.c')
-rw-r--r-- | apps/plugins/pong.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 13c5012770..73fb48356b 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c | |||
@@ -370,7 +370,7 @@ void score(struct pong *p, int pad) | |||
370 | /* avoid hitting the pad with the new ball */ | 370 | /* avoid hitting the pad with the new ball */ |
371 | p->ballx = (p->ballx < 0) ? | 371 | p->ballx = (p->ballx < 0) ? |
372 | (RES * PAD_WIDTH) : (RES * (LCD_WIDTH - PAD_WIDTH - BALL_WIDTH)); | 372 | (RES * PAD_WIDTH) : (RES * (LCD_WIDTH - PAD_WIDTH - BALL_WIDTH)); |
373 | 373 | ||
374 | /* restore Y-speed to default */ | 374 | /* restore Y-speed to default */ |
375 | p->ballspeedy = (p->ballspeedy > 0) ? SPEEDY : -SPEEDY; | 375 | p->ballspeedy = (p->ballspeedy > 0) ? SPEEDY : -SPEEDY; |
376 | 376 | ||
@@ -460,7 +460,7 @@ int keys(struct pong *p) | |||
460 | 460 | ||
461 | while(TIME_BEFORE(*rb->current_tick, end)) { | 461 | while(TIME_BEFORE(*rb->current_tick, end)) { |
462 | key = rb->button_get_w_tmo(end - *rb->current_tick); | 462 | key = rb->button_get_w_tmo(end - *rb->current_tick); |
463 | 463 | ||
464 | #ifdef HAVE_TOUCHSCREEN | 464 | #ifdef HAVE_TOUCHSCREEN |
465 | short touch_x, touch_y; | 465 | short touch_x, touch_y; |
466 | if(key & BUTTON_TOUCHSCREEN) | 466 | if(key & BUTTON_TOUCHSCREEN) |
@@ -469,7 +469,7 @@ int keys(struct pong *p) | |||
469 | touch_y = rb->button_get_data() & 0xFFFF; | 469 | touch_y = rb->button_get_data() & 0xFFFF; |
470 | if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4)) | 470 | if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4)) |
471 | padmove(&p->w_pad[0], touch_y-(p->e_pad[0]*2+PAD_HEIGHT)/2); | 471 | padmove(&p->w_pad[0], touch_y-(p->e_pad[0]*2+PAD_HEIGHT)/2); |
472 | 472 | ||
473 | if(touch_x >= xpos[1]-(PAD_WIDTH*4) && touch_x <= xpos[1]) | 473 | if(touch_x >= xpos[1]-(PAD_WIDTH*4) && touch_x <= xpos[1]) |
474 | padmove(&p->w_pad[1], touch_y-(p->e_pad[1]*2+PAD_HEIGHT)/2); | 474 | padmove(&p->w_pad[1], touch_y-(p->e_pad[1]*2+PAD_HEIGHT)/2); |
475 | } | 475 | } |
@@ -507,7 +507,7 @@ int keys(struct pong *p) | |||
507 | 507 | ||
508 | if(key & PONG_RIGHT_UP) /* player right goes up */ | 508 | if(key & PONG_RIGHT_UP) /* player right goes up */ |
509 | padmove(&p->w_pad[1], -MOVE_STEP); | 509 | padmove(&p->w_pad[1], -MOVE_STEP); |
510 | 510 | ||
511 | if(rb->default_event_handler(key) == SYS_USB_CONNECTED) | 511 | if(rb->default_event_handler(key) == SYS_USB_CONNECTED) |
512 | return -1; /* exit game because of USB */ | 512 | return -1; /* exit game because of USB */ |
513 | } | 513 | } |
@@ -548,7 +548,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
548 | /* if you don't use the parameter, you can do like | 548 | /* if you don't use the parameter, you can do like |
549 | this to avoid the compiler warning about it */ | 549 | this to avoid the compiler warning about it */ |
550 | (void)parameter; | 550 | (void)parameter; |
551 | 551 | ||
552 | /* Clear screen */ | 552 | /* Clear screen */ |
553 | rb->lcd_clear_display(); | 553 | rb->lcd_clear_display(); |
554 | 554 | ||