summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/brickmania.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index 3a754b3e9e..e5f953ac8d 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -1805,20 +1805,24 @@ static int brickmania_game_loop(void)
1805 short touch_x, touch_y; 1805 short touch_x, touch_y;
1806 touch_x = FIXED3(rb->button_get_data() >> 16); 1806 touch_x = FIXED3(rb->button_get_data() >> 16);
1807 touch_y = FIXED3(rb->button_get_data() & 0xffff); 1807 touch_y = FIXED3(rb->button_get_data() & 0xffff);
1808 if(touch_y >= (GAMESCREEN_HEIGHT-GAMESCREEN_HEIGHT/4) && touch_y <= GAMESCREEN_HEIGHT) 1808
1809 if(flip_sides)
1810 {
1811 pad_pos_x = GAMESCREEN_WIDTH - (touch_x - pad_width/2);
1812 }
1813 else
1809 { 1814 {
1810 pad_pos_x = (flip_sides ? -1 : 1) * 1815 pad_pos_x = (touch_x - pad_width/2);
1811 (touch_x - pad_width/2);
1812
1813 if(pad_pos_x < 0)
1814 pad_pos_x = 0;
1815 else if(pad_pos_x+pad_width > GAMESCREEN_WIDTH)
1816 pad_pos_x = GAMESCREEN_WIDTH-pad_width;
1817 for(k=0;k<used_balls;k++)
1818 if (game_state==ST_READY || ball[k].glue)
1819 ball[k].pos_x = pad_pos_x+pad_width/2;
1820 } 1816 }
1821 1817
1818 if(pad_pos_x < 0)
1819 pad_pos_x = 0;
1820 else if(pad_pos_x+pad_width > GAMESCREEN_WIDTH)
1821 pad_pos_x = GAMESCREEN_WIDTH-pad_width;
1822 for(k=0;k<used_balls;k++)
1823 if (game_state==ST_READY || ball[k].glue)
1824 ball[k].pos_x = pad_pos_x+pad_width/2;
1825
1822 if(button & BUTTON_REL) 1826 if(button & BUTTON_REL)
1823 button = SELECT; 1827 button = SELECT;
1824 } 1828 }