diff options
Diffstat (limited to 'apps/plugins')
29 files changed, 90 insertions, 38 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 176ad61d82..df93395ee1 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES | |||
@@ -8,6 +8,8 @@ brickmania_gameover.112x54x16.bmp | |||
8 | brickmania_ball.15x15x16.bmp | 8 | brickmania_ball.15x15x16.bmp |
9 | brickmania_bricks.640x480x16.bmp | 9 | brickmania_bricks.640x480x16.bmp |
10 | brickmania_pads.640x480x16.bmp | 10 | brickmania_pads.640x480x16.bmp |
11 | brickmania_short_pads.640x480x16.bmp | ||
12 | brickmania_long_pads.640x480x16.bmp | ||
11 | brickmania_break.640x480x16.bmp | 13 | brickmania_break.640x480x16.bmp |
12 | brickmania_powerups.640x480x16.bmp | 14 | brickmania_powerups.640x480x16.bmp |
13 | 15 | ||
@@ -15,6 +17,8 @@ brickmania_powerups.640x480x16.bmp | |||
15 | brickmania_ball.11x11x16.bmp | 17 | brickmania_ball.11x11x16.bmp |
16 | brickmania_bricks.480x640x16.bmp | 18 | brickmania_bricks.480x640x16.bmp |
17 | brickmania_pads.480x640x16.bmp | 19 | brickmania_pads.480x640x16.bmp |
20 | brickmania_short_pads.480x640x16.bmp | ||
21 | brickmania_long_pads.480x640x16.bmp | ||
18 | brickmania_break.480x640x16.bmp | 22 | brickmania_break.480x640x16.bmp |
19 | brickmania_powerups.480x640x16.bmp | 23 | brickmania_powerups.480x640x16.bmp |
20 | 24 | ||
@@ -22,6 +26,8 @@ brickmania_powerups.480x640x16.bmp | |||
22 | brickmania_ball.5x5x16.bmp | 26 | brickmania_ball.5x5x16.bmp |
23 | brickmania_bricks.320x240x16.bmp | 27 | brickmania_bricks.320x240x16.bmp |
24 | brickmania_pads.320x240x16.bmp | 28 | brickmania_pads.320x240x16.bmp |
29 | brickmania_short_pads.320x240x16.bmp | ||
30 | brickmania_long_pads.320x240x16.bmp | ||
25 | brickmania_break.320x240x16.bmp | 31 | brickmania_break.320x240x16.bmp |
26 | brickmania_powerups.320x240x16.bmp | 32 | brickmania_powerups.320x240x16.bmp |
27 | 33 | ||
@@ -29,6 +35,8 @@ brickmania_powerups.320x240x16.bmp | |||
29 | brickmania_ball.5x5x16.bmp | 35 | brickmania_ball.5x5x16.bmp |
30 | brickmania_bricks.220x176x16.bmp | 36 | brickmania_bricks.220x176x16.bmp |
31 | brickmania_pads.220x176x16.bmp | 37 | brickmania_pads.220x176x16.bmp |
38 | brickmania_short_pads.220x176x16.bmp | ||
39 | brickmania_long_pads.220x176x16.bmp | ||
32 | brickmania_break.220x176x16.bmp | 40 | brickmania_break.220x176x16.bmp |
33 | brickmania_powerups.220x176x16.bmp | 41 | brickmania_powerups.220x176x16.bmp |
34 | 42 | ||
@@ -36,6 +44,8 @@ brickmania_powerups.220x176x16.bmp | |||
36 | brickmania_ball.5x5x16.bmp | 44 | brickmania_ball.5x5x16.bmp |
37 | brickmania_bricks.176x132x16.bmp | 45 | brickmania_bricks.176x132x16.bmp |
38 | brickmania_pads.176x132x16.bmp | 46 | brickmania_pads.176x132x16.bmp |
47 | brickmania_short_pads.176x132x16.bmp | ||
48 | brickmania_long_pads.176x132x16.bmp | ||
39 | brickmania_powerups.176x132x16.bmp | 49 | brickmania_powerups.176x132x16.bmp |
40 | brickmania_break.176x132x16.bmp | 50 | brickmania_break.176x132x16.bmp |
41 | 51 | ||
@@ -43,6 +53,8 @@ brickmania_break.176x132x16.bmp | |||
43 | brickmania_ball.5x5x16.bmp | 53 | brickmania_ball.5x5x16.bmp |
44 | brickmania_bricks.160x128x16.bmp | 54 | brickmania_bricks.160x128x16.bmp |
45 | brickmania_pads.160x128x16.bmp | 55 | brickmania_pads.160x128x16.bmp |
56 | brickmania_short_pads.160x128x16.bmp | ||
57 | brickmania_long_pads.160x128x16.bmp | ||
46 | brickmania_powerups.160x128x16.bmp | 58 | brickmania_powerups.160x128x16.bmp |
47 | brickmania_break.160x128x16.bmp | 59 | brickmania_break.160x128x16.bmp |
48 | 60 | ||
@@ -50,6 +62,8 @@ brickmania_break.160x128x16.bmp | |||
50 | brickmania_ball.4x4x16.bmp | 62 | brickmania_ball.4x4x16.bmp |
51 | brickmania_bricks.132x80x16.bmp | 63 | brickmania_bricks.132x80x16.bmp |
52 | brickmania_pads.132x80x16.bmp | 64 | brickmania_pads.132x80x16.bmp |
65 | brickmania_short_pads.132x80x16.bmp | ||
66 | brickmania_long_pads.132x80x16.bmp | ||
53 | brickmania_powerups.132x80x16.bmp | 67 | brickmania_powerups.132x80x16.bmp |
54 | brickmania_break.132x80x16.bmp | 68 | brickmania_break.132x80x16.bmp |
55 | 69 | ||
@@ -57,6 +71,8 @@ brickmania_break.132x80x16.bmp | |||
57 | brickmania_ball.4x4x16.bmp | 71 | brickmania_ball.4x4x16.bmp |
58 | brickmania_bricks.128x128x16.bmp | 72 | brickmania_bricks.128x128x16.bmp |
59 | brickmania_pads.132x80x16.bmp | 73 | brickmania_pads.132x80x16.bmp |
74 | brickmania_short_pads.132x80x16.bmp | ||
75 | brickmania_long_pads.132x80x16.bmp | ||
60 | brickmania_powerups.132x80x16.bmp | 76 | brickmania_powerups.132x80x16.bmp |
61 | brickmania_break.132x80x16.bmp | 77 | brickmania_break.132x80x16.bmp |
62 | #endif /* different colour displays */ | 78 | #endif /* different colour displays */ |
@@ -64,6 +80,8 @@ brickmania_break.132x80x16.bmp | |||
64 | #elif LCD_DEPTH > 1 | 80 | #elif LCD_DEPTH > 1 |
65 | brickmania_gameover.86x43x2.bmp | 81 | brickmania_gameover.86x43x2.bmp |
66 | brickmania_pads.160x128x2.bmp | 82 | brickmania_pads.160x128x2.bmp |
83 | brickmania_short_pads.160x128x2.bmp | ||
84 | brickmania_long_pads.160x128x2.bmp | ||
67 | brickmania_powerups.160x128x2.bmp | 85 | brickmania_powerups.160x128x2.bmp |
68 | #if (LCD_WIDTH >= 160) | 86 | #if (LCD_WIDTH >= 160) |
69 | brickmania_ball.5x5x2.bmp | 87 | brickmania_ball.5x5x2.bmp |
@@ -80,6 +98,8 @@ brickmania_gameover.59x30x1.bmp | |||
80 | brickmania_bricks.112x64x1.bmp | 98 | brickmania_bricks.112x64x1.bmp |
81 | brickmania_ball.3x3x1.bmp | 99 | brickmania_ball.3x3x1.bmp |
82 | brickmania_pads.112x64x1.bmp | 100 | brickmania_pads.112x64x1.bmp |
101 | brickmania_short_pads.112x64x1.bmp | ||
102 | brickmania_long_pads.112x64x1.bmp | ||
83 | brickmania_powerups.112x64x1.bmp | 103 | brickmania_powerups.112x64x1.bmp |
84 | #endif | 104 | #endif |
85 | 105 | ||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.112x64x1.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.112x64x1.bmp new file mode 100644 index 0000000000..4714e711b1 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.112x64x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.132x80x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.132x80x16.bmp new file mode 100644 index 0000000000..8480c612b8 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.132x80x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x16.bmp new file mode 100644 index 0000000000..3c994f76cb --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x2.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x2.bmp new file mode 100644 index 0000000000..eee7ed8adc --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.160x128x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.176x132x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.176x132x16.bmp new file mode 100644 index 0000000000..e1819db343 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.176x132x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.220x176x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.220x176x16.bmp new file mode 100644 index 0000000000..e1819db343 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.220x176x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.320x240x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.320x240x16.bmp new file mode 100644 index 0000000000..4b82df8ac6 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.320x240x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.480x640x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.480x640x16.bmp new file mode 100644 index 0000000000..fc1c12b0ab --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.480x640x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_long_pads.640x480x16.bmp b/apps/plugins/bitmaps/native/brickmania_long_pads.640x480x16.bmp new file mode 100644 index 0000000000..b3b470750a --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_long_pads.640x480x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.112x64x1.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.112x64x1.bmp index 66cca0a6d8..ecad786393 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.112x64x1.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.112x64x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.132x80x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.132x80x16.bmp index 2ff913e3a3..4e7b7ba235 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.132x80x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.132x80x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.160x128x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.160x128x16.bmp index 91ece1048d..838d7a3031 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.160x128x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.160x128x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.160x128x2.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.160x128x2.bmp index c52d5348c8..8d834766d3 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.160x128x2.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.160x128x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.176x132x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.176x132x16.bmp index 91ece1048d..838d7a3031 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.176x132x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.176x132x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.220x176x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.220x176x16.bmp index 91ece1048d..838d7a3031 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.220x176x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.220x176x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.bmp index 6952b4dea8..d8e40280e0 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.480x640x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.480x640x16.bmp index eb7d1a4402..4313f1fe0f 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.480x640x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.480x640x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_powerups.640x480x16.bmp b/apps/plugins/bitmaps/native/brickmania_powerups.640x480x16.bmp index 3fabfd2bb5..1a58b5bae5 100644 --- a/apps/plugins/bitmaps/native/brickmania_powerups.640x480x16.bmp +++ b/apps/plugins/bitmaps/native/brickmania_powerups.640x480x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.112x64x1.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.112x64x1.bmp new file mode 100644 index 0000000000..a889517eaa --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.112x64x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.132x80x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.132x80x16.bmp new file mode 100644 index 0000000000..c5c13fc842 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.132x80x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x16.bmp new file mode 100644 index 0000000000..f750658479 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x2.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x2.bmp new file mode 100644 index 0000000000..45d1962d96 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.160x128x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.176x132x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.176x132x16.bmp new file mode 100644 index 0000000000..022cfddc0d --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.176x132x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.220x176x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.220x176x16.bmp new file mode 100644 index 0000000000..022cfddc0d --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.220x176x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.320x240x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.320x240x16.bmp new file mode 100644 index 0000000000..b63ffc5f7f --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.320x240x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.480x640x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.480x640x16.bmp new file mode 100644 index 0000000000..76db3bb73a --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.480x640x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/native/brickmania_short_pads.640x480x16.bmp b/apps/plugins/bitmaps/native/brickmania_short_pads.640x480x16.bmp new file mode 100644 index 0000000000..0b513e0c95 --- /dev/null +++ b/apps/plugins/bitmaps/native/brickmania_short_pads.640x480x16.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 034ac9c770..7f1b95b6cd 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -214,6 +214,8 @@ CONFIG_KEYPAD == SANSA_M200_PAD | |||
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | #include "pluginbitmaps/brickmania_pads.h" | 216 | #include "pluginbitmaps/brickmania_pads.h" |
217 | #include "pluginbitmaps/brickmania_short_pads.h" | ||
218 | #include "pluginbitmaps/brickmania_long_pads.h" | ||
217 | #include "pluginbitmaps/brickmania_bricks.h" | 219 | #include "pluginbitmaps/brickmania_bricks.h" |
218 | #include "pluginbitmaps/brickmania_powerups.h" | 220 | #include "pluginbitmaps/brickmania_powerups.h" |
219 | #include "pluginbitmaps/brickmania_ball.h" | 221 | #include "pluginbitmaps/brickmania_ball.h" |
@@ -221,10 +223,12 @@ CONFIG_KEYPAD == SANSA_M200_PAD | |||
221 | 223 | ||
222 | #define PAD_WIDTH BMPWIDTH_brickmania_pads | 224 | #define PAD_WIDTH BMPWIDTH_brickmania_pads |
223 | #define PAD_HEIGHT (BMPHEIGHT_brickmania_pads/3) | 225 | #define PAD_HEIGHT (BMPHEIGHT_brickmania_pads/3) |
226 | #define SHORT_PAD_WIDTH BMPWIDTH_brickmania_short_pads | ||
227 | #define LONG_PAD_WIDTH BMPWIDTH_brickmania_long_pads | ||
224 | #define BRICK_HEIGHT (BMPHEIGHT_brickmania_bricks/7) | 228 | #define BRICK_HEIGHT (BMPHEIGHT_brickmania_bricks/7) |
225 | #define BRICK_WIDTH BMPWIDTH_brickmania_bricks | 229 | #define BRICK_WIDTH BMPWIDTH_brickmania_bricks |
226 | #define LEFTMARGIN ((LCD_WIDTH-10*BRICK_WIDTH)/2) | 230 | #define LEFTMARGIN ((LCD_WIDTH-10*BRICK_WIDTH)/2) |
227 | #define POWERUP_HEIGHT (BMPHEIGHT_brickmania_powerups/7) | 231 | #define POWERUP_HEIGHT (BMPHEIGHT_brickmania_powerups/9) |
228 | #define POWERUP_WIDTH BMPWIDTH_brickmania_powerups | 232 | #define POWERUP_WIDTH BMPWIDTH_brickmania_powerups |
229 | #define BALL BMPHEIGHT_brickmania_ball | 233 | #define BALL BMPHEIGHT_brickmania_ball |
230 | #define HALFBALL ((BALL+1)/2) | 234 | #define HALFBALL ((BALL+1)/2) |
@@ -585,6 +589,7 @@ int used_balls=1; | |||
585 | bool saved_game=false; | 589 | bool saved_game=false; |
586 | int l_score=0; | 590 | int l_score=0; |
587 | int difficulty = EASY; | 591 | int difficulty = EASY; |
592 | int pad_width; | ||
588 | 593 | ||
589 | typedef struct cube { | 594 | typedef struct cube { |
590 | int powertop; | 595 | int powertop; |
@@ -642,7 +647,7 @@ static void brickmania_int_game(int new_game) | |||
642 | ball[i].tempy=0; | 647 | ball[i].tempy=0; |
643 | ball[i].tempx=0; | 648 | ball[i].tempx=0; |
644 | ball[i].pos_y=PAD_POS_Y-BALL; | 649 | ball[i].pos_y=PAD_POS_Y-BALL; |
645 | ball[i].pos_x=pad_pos_x+(PAD_WIDTH/2)-2; | 650 | ball[i].pos_x=LCD_WIDTH/2-2; |
646 | ball[i].glue=false; | 651 | ball[i].glue=false; |
647 | } | 652 | } |
648 | 653 | ||
@@ -650,7 +655,7 @@ static void brickmania_int_game(int new_game) | |||
650 | start_game =1; | 655 | start_game =1; |
651 | con_game =0; | 656 | con_game =0; |
652 | pad_type=0; | 657 | pad_type=0; |
653 | 658 | pad_width=PAD_WIDTH; | |
654 | flip_sides=false; | 659 | flip_sides=false; |
655 | 660 | ||
656 | if (new_game==1) { | 661 | if (new_game==1) { |
@@ -1029,7 +1034,7 @@ static int brickmania_game_loop(void) | |||
1029 | /* the bricks */ | 1034 | /* the bricks */ |
1030 | for (i=0;i<=7;i++) { | 1035 | for (i=0;i<=7;i++) { |
1031 | for (j=0;j<=9;j++) { | 1036 | for (j=0;j<=9;j++) { |
1032 | if (brick[i*10+j].power<7) { | 1037 | if (brick[i*10+j].power<9) { |
1033 | if (brick[i*10+j].poweruse==2) { | 1038 | if (brick[i*10+j].poweruse==2) { |
1034 | if (con_game!=1) | 1039 | if (con_game!=1) |
1035 | brick[i*10+j].powertop+=2; | 1040 | brick[i*10+j].powertop+=2; |
@@ -1047,7 +1052,7 @@ static int brickmania_game_loop(void) | |||
1047 | } | 1052 | } |
1048 | 1053 | ||
1049 | if ((pad_pos_x<LEFTMARGIN+j*BRICK_WIDTH+5 && | 1054 | if ((pad_pos_x<LEFTMARGIN+j*BRICK_WIDTH+5 && |
1050 | pad_pos_x+PAD_WIDTH>LEFTMARGIN+j*BRICK_WIDTH+5) && | 1055 | pad_pos_x+pad_width>LEFTMARGIN+j*BRICK_WIDTH+5) && |
1051 | brick[i*10+j].powertop+6>=PAD_POS_Y && | 1056 | brick[i*10+j].powertop+6>=PAD_POS_Y && |
1052 | brick[i*10+j].poweruse==2) { | 1057 | brick[i*10+j].poweruse==2) { |
1053 | switch(brick[i*10+j].power) { | 1058 | switch(brick[i*10+j].power) { |
@@ -1078,6 +1083,8 @@ static int brickmania_game_loop(void) | |||
1078 | for(k=0;k<used_balls;k++) | 1083 | for(k=0;k<used_balls;k++) |
1079 | ball[k].glue=false; | 1084 | ball[k].glue=false; |
1080 | flip_sides=false; | 1085 | flip_sides=false; |
1086 | pad_pos_x+=(pad_width-PAD_WIDTH)/2; | ||
1087 | pad_width=PAD_WIDTH; | ||
1081 | break; | 1088 | break; |
1082 | case 5: | 1089 | case 5: |
1083 | score+=23; | 1090 | score+=23; |
@@ -1092,6 +1099,31 @@ static int brickmania_game_loop(void) | |||
1092 | -1 : 1; | 1099 | -1 : 1; |
1093 | ball[used_balls-1].y= -4; | 1100 | ball[used_balls-1].y= -4; |
1094 | break; | 1101 | break; |
1102 | case 7: | ||
1103 | score+=23; | ||
1104 | if (pad_width==PAD_WIDTH) { | ||
1105 | pad_width=LONG_PAD_WIDTH; | ||
1106 | pad_pos_x-=(LONG_PAD_WIDTH-PAD_WIDTH)/2; | ||
1107 | } | ||
1108 | else if (pad_width==SHORT_PAD_WIDTH) { | ||
1109 | pad_width=PAD_WIDTH; | ||
1110 | pad_pos_x-=(PAD_WIDTH-SHORT_PAD_WIDTH)/2; | ||
1111 | } | ||
1112 | if (pad_pos_x < 0) | ||
1113 | pad_pos_x = 0; | ||
1114 | else if(pad_pos_x+pad_width > LCD_WIDTH) | ||
1115 | pad_pos_x = LCD_WIDTH-pad_width; | ||
1116 | break; | ||
1117 | case 8: | ||
1118 | if (pad_width==PAD_WIDTH) { | ||
1119 | pad_width=SHORT_PAD_WIDTH; | ||
1120 | pad_pos_x+=(PAD_WIDTH-SHORT_PAD_WIDTH)/2; | ||
1121 | } | ||
1122 | else if (pad_width==LONG_PAD_WIDTH) { | ||
1123 | pad_width=PAD_WIDTH; | ||
1124 | pad_pos_x+=(LONG_PAD_WIDTH-PAD_WIDTH)/2; | ||
1125 | } | ||
1126 | break; | ||
1095 | } | 1127 | } |
1096 | brick[i*10+j].poweruse=1; | 1128 | brick[i*10+j].poweruse=1; |
1097 | } | 1129 | } |
@@ -1296,14 +1328,14 @@ static int brickmania_game_loop(void) | |||
1296 | } /* for i */ | 1328 | } /* for i */ |
1297 | 1329 | ||
1298 | /* draw the pad */ | 1330 | /* draw the pad */ |
1299 | rb->lcd_bitmap_part(brickmania_pads,0,pad_type*PAD_HEIGHT, | 1331 | rb->lcd_bitmap_part(pad_width==PAD_WIDTH?brickmania_pads:pad_width==LONG_PAD_WIDTH?brickmania_long_pads:brickmania_short_pads,0,pad_type*PAD_HEIGHT, |
1300 | PAD_WIDTH,pad_pos_x, PAD_POS_Y, PAD_WIDTH, | 1332 | pad_width,pad_pos_x, PAD_POS_Y, pad_width, |
1301 | PAD_HEIGHT); | 1333 | PAD_HEIGHT); |
1302 | 1334 | ||
1303 | for(k=0;k<used_balls;k++) { | 1335 | for(k=0;k<used_balls;k++) { |
1304 | 1336 | ||
1305 | if ((ball[k].pos_x >= pad_pos_x && | 1337 | if ((ball[k].pos_x >= pad_pos_x && |
1306 | ball[k].pos_x <= pad_pos_x+PAD_WIDTH) && | 1338 | ball[k].pos_x <= pad_pos_x+pad_width) && |
1307 | (PAD_POS_Y-4<ball[k].pos_y+BALL && | 1339 | (PAD_POS_Y-4<ball[k].pos_y+BALL && |
1308 | PAD_POS_Y>ball[k].pos_y+BALL) && (ball[k].y >0)) | 1340 | PAD_POS_Y>ball[k].pos_y+BALL) && (ball[k].y >0)) |
1309 | ball[k].tempy=PAD_POS_Y-ball[k].pos_y-BALL; | 1341 | ball[k].tempy=PAD_POS_Y-ball[k].pos_y-BALL; |
@@ -1337,7 +1369,7 @@ static int brickmania_game_loop(void) | |||
1337 | ball[used_balls].tempy=0; | 1369 | ball[used_balls].tempy=0; |
1338 | ball[used_balls].tempx=0; | 1370 | ball[used_balls].tempx=0; |
1339 | ball[used_balls].pos_y=PAD_POS_Y-BALL; | 1371 | ball[used_balls].pos_y=PAD_POS_Y-BALL; |
1340 | ball[used_balls].pos_x=pad_pos_x+(PAD_WIDTH/2)-2; | 1372 | ball[used_balls].pos_x=pad_pos_x+(pad_width/2)-2; |
1341 | 1373 | ||
1342 | k--; | 1374 | k--; |
1343 | continue; | 1375 | continue; |
@@ -1359,65 +1391,65 @@ static int brickmania_game_loop(void) | |||
1359 | 1391 | ||
1360 | if ((ball[k].pos_y+BALL >= PAD_POS_Y && | 1392 | if ((ball[k].pos_y+BALL >= PAD_POS_Y && |
1361 | (ball[k].pos_x >= pad_pos_x && | 1393 | (ball[k].pos_x >= pad_pos_x && |
1362 | ball[k].pos_x <= pad_pos_x+PAD_WIDTH)) && | 1394 | ball[k].pos_x <= pad_pos_x+pad_width)) && |
1363 | start_game != 1 && !ball[k].glue) { | 1395 | start_game != 1 && !ball[k].glue) { |
1364 | 1396 | ||
1365 | if ((ball[k].pos_x+HALFBALL >= pad_pos_x && | 1397 | if ((ball[k].pos_x+HALFBALL >= pad_pos_x && |
1366 | ball[k].pos_x+HALFBALL <= | 1398 | ball[k].pos_x+HALFBALL <= |
1367 | pad_pos_x+(PAD_WIDTH/2/4)) || | 1399 | pad_pos_x+(pad_width/2/4)) || |
1368 | (ball[k].pos_x +HALFBALL>= | 1400 | (ball[k].pos_x +HALFBALL>= |
1369 | pad_pos_x+(PAD_WIDTH-(PAD_WIDTH/2/4)) && | 1401 | pad_pos_x+(pad_width-(pad_width/2/4)) && |
1370 | ball[k].pos_x+HALFBALL <= pad_pos_x+PAD_WIDTH)) { | 1402 | ball[k].pos_x+HALFBALL <= pad_pos_x+pad_width)) { |
1371 | 1403 | ||
1372 | ball[k].y = -2; | 1404 | ball[k].y = -2; |
1373 | if (ball[k].pos_x != 0 && | 1405 | if (ball[k].pos_x != 0 && |
1374 | ball[k].pos_x+BALL!=LCD_WIDTH) | 1406 | ball[k].pos_x+BALL!=LCD_WIDTH) |
1375 | ball[k].x = brickmania_pad_check(6,0,ball[k].pos_x+2<= | 1407 | ball[k].x = brickmania_pad_check(6,0,ball[k].pos_x+2<= |
1376 | pad_pos_x+(PAD_WIDTH/2)? | 1408 | pad_pos_x+(pad_width/2)? |
1377 | 0:1,k); | 1409 | 0:1,k); |
1378 | 1410 | ||
1379 | } | 1411 | } |
1380 | else if ((ball[k].pos_x+HALFBALL >= | 1412 | else if ((ball[k].pos_x+HALFBALL >= |
1381 | pad_pos_x+(PAD_WIDTH/2/4) && | 1413 | pad_pos_x+(pad_width/2/4) && |
1382 | ball[k].pos_x+HALFBALL <= | 1414 | ball[k].pos_x+HALFBALL <= |
1383 | pad_pos_x+2*(PAD_WIDTH/2/4)) || | 1415 | pad_pos_x+2*(pad_width/2/4)) || |
1384 | (ball[k].pos_x+HALFBALL >= | 1416 | (ball[k].pos_x+HALFBALL >= |
1385 | pad_pos_x+(PAD_WIDTH-2*(PAD_WIDTH/2/4)) && | 1417 | pad_pos_x+(pad_width-2*(pad_width/2/4)) && |
1386 | ball[k].pos_x+HALFBALL <= | 1418 | ball[k].pos_x+HALFBALL <= |
1387 | pad_pos_x+(PAD_WIDTH-(PAD_WIDTH/2/4)) )) { | 1419 | pad_pos_x+(pad_width-(pad_width/2/4)) )) { |
1388 | 1420 | ||
1389 | ball[k].y = -3; | 1421 | ball[k].y = -3; |
1390 | if (ball[k].pos_x != 0 && | 1422 | if (ball[k].pos_x != 0 && |
1391 | ball[k].pos_x+BALL!=LCD_WIDTH) | 1423 | ball[k].pos_x+BALL!=LCD_WIDTH) |
1392 | ball[k].x = brickmania_pad_check(4,0,ball[k].pos_x+2<= | 1424 | ball[k].x = brickmania_pad_check(4,0,ball[k].pos_x+2<= |
1393 | pad_pos_x+(PAD_WIDTH/2)? | 1425 | pad_pos_x+(pad_width/2)? |
1394 | 0:1,k); | 1426 | 0:1,k); |
1395 | 1427 | ||
1396 | } | 1428 | } |
1397 | else if ((ball[k].pos_x+HALFBALL >= | 1429 | else if ((ball[k].pos_x+HALFBALL >= |
1398 | pad_pos_x+2*(PAD_WIDTH/2/4) && | 1430 | pad_pos_x+2*(pad_width/2/4) && |
1399 | ball[k].pos_x+HALFBALL <= | 1431 | ball[k].pos_x+HALFBALL <= |
1400 | pad_pos_x+3*(PAD_WIDTH/2/4)) || | 1432 | pad_pos_x+3*(pad_width/2/4)) || |
1401 | (ball[k].pos_x+2 >= | 1433 | (ball[k].pos_x+2 >= |
1402 | pad_pos_x+(PAD_WIDTH-3*(PAD_WIDTH/2/4)) && | 1434 | pad_pos_x+(pad_width-3*(pad_width/2/4)) && |
1403 | ball[k].pos_x+2 <= | 1435 | ball[k].pos_x+2 <= |
1404 | pad_pos_x+ ((PAD_WIDTH/2)-2*(PAD_WIDTH/2/4)) )) { | 1436 | pad_pos_x+ ((pad_width/2)-2*(pad_width/2/4)) )) { |
1405 | 1437 | ||
1406 | ball[k].y = -4; | 1438 | ball[k].y = -4; |
1407 | if (ball[k].pos_x != 0 && | 1439 | if (ball[k].pos_x != 0 && |
1408 | ball[k].pos_x+BALL!=LCD_WIDTH) | 1440 | ball[k].pos_x+BALL!=LCD_WIDTH) |
1409 | ball[k].x = brickmania_pad_check(3,0,ball[k].pos_x+2<= | 1441 | ball[k].x = brickmania_pad_check(3,0,ball[k].pos_x+2<= |
1410 | pad_pos_x+(PAD_WIDTH/2)? | 1442 | pad_pos_x+(pad_width/2)? |
1411 | 0:1,k); | 1443 | 0:1,k); |
1412 | 1444 | ||
1413 | } | 1445 | } |
1414 | else if ((ball[k].pos_x+HALFBALL >= | 1446 | else if ((ball[k].pos_x+HALFBALL >= |
1415 | pad_pos_x+3*(PAD_WIDTH/2/4) && | 1447 | pad_pos_x+3*(pad_width/2/4) && |
1416 | ball[k].pos_x+HALFBALL <= | 1448 | ball[k].pos_x+HALFBALL <= |
1417 | pad_pos_x+4*(PAD_WIDTH/2/4)-2) || | 1449 | pad_pos_x+4*(pad_width/2/4)-2) || |
1418 | (ball[k].pos_x+2 >= pad_pos_x+(PAD_WIDTH/2+2) && | 1450 | (ball[k].pos_x+2 >= pad_pos_x+(pad_width/2+2) && |
1419 | ball[k].pos_x+2 <= | 1451 | ball[k].pos_x+2 <= |
1420 | pad_pos_x+(PAD_WIDTH-3*(PAD_WIDTH/2/4)) )) { | 1452 | pad_pos_x+(pad_width-3*(pad_width/2/4)) )) { |
1421 | 1453 | ||
1422 | ball[k].y = -4; | 1454 | ball[k].y = -4; |
1423 | if (ball[k].pos_x != 0 && | 1455 | if (ball[k].pos_x != 0 && |
@@ -1441,7 +1473,7 @@ static int brickmania_game_loop(void) | |||
1441 | if (ball[k].pos_y+5 >= PAD_POS_Y && | 1473 | if (ball[k].pos_y+5 >= PAD_POS_Y && |
1442 | (pad_type==1 && !ball[k].glue) && | 1474 | (pad_type==1 && !ball[k].glue) && |
1443 | (ball[k].pos_x >= pad_pos_x && | 1475 | (ball[k].pos_x >= pad_pos_x && |
1444 | ball[k].pos_x <= pad_pos_x+PAD_WIDTH)) { | 1476 | ball[k].pos_x <= pad_pos_x+pad_width)) { |
1445 | ball[k].y=0; | 1477 | ball[k].y=0; |
1446 | ball[k].pos_y=PAD_POS_Y-BALL; | 1478 | ball[k].pos_y=PAD_POS_Y-BALL; |
1447 | ball[k].glue=true; | 1479 | ball[k].glue=true; |
@@ -1511,15 +1543,15 @@ static int brickmania_game_loop(void) | |||
1511 | touch_y = rb->button_get_data() & 0xffff; | 1543 | touch_y = rb->button_get_data() & 0xffff; |
1512 | if(touch_y >= PAD_POS_Y && touch_y <= PAD_POS_Y+PAD_HEIGHT) | 1544 | if(touch_y >= PAD_POS_Y && touch_y <= PAD_POS_Y+PAD_HEIGHT) |
1513 | { | 1545 | { |
1514 | pad_pos_x += (flip_sides ? -1 : 1) * ( (touch_x-pad_pos_x-PAD_WIDTH/2) / 4 ); | 1546 | pad_pos_x += (flip_sides ? -1 : 1) * ( (touch_x-pad_pos_x-pad_width/2) / 4 ); |
1515 | 1547 | ||
1516 | if(pad_pos_x < 0) | 1548 | if(pad_pos_x < 0) |
1517 | pad_pos_x = 0; | 1549 | pad_pos_x = 0; |
1518 | else if(pad_pos_x+PAD_WIDTH > LCD_WIDTH) | 1550 | else if(pad_pos_x+pad_width > LCD_WIDTH) |
1519 | pad_pos_x = LCD_WIDTH-PAD_WIDTH; | 1551 | pad_pos_x = LCD_WIDTH-pad_width; |
1520 | for(k=0;k<used_balls;k++) | 1552 | for(k=0;k<used_balls;k++) |
1521 | if ((start_game==1 || ball[k].glue)) | 1553 | if ((start_game==1 || ball[k].glue)) |
1522 | ball[k].pos_x = pad_pos_x+PAD_WIDTH/2; | 1554 | ball[k].pos_x = pad_pos_x+pad_width/2; |
1523 | } | 1555 | } |
1524 | 1556 | ||
1525 | if(button & BUTTON_REL) | 1557 | if(button & BUTTON_REL) |
@@ -1540,11 +1572,11 @@ static int brickmania_game_loop(void) | |||
1540 | continue; | 1572 | continue; |
1541 | if ((button_right && flip_sides==false) || | 1573 | if ((button_right && flip_sides==false) || |
1542 | (button_left && flip_sides==true)) { | 1574 | (button_left && flip_sides==true)) { |
1543 | if (pad_pos_x+8+PAD_WIDTH > LCD_WIDTH) { | 1575 | if (pad_pos_x+8+pad_width > LCD_WIDTH) { |
1544 | for(k=0;k<used_balls;k++) | 1576 | for(k=0;k<used_balls;k++) |
1545 | if (start_game==1 || ball[k].glue) | 1577 | if (start_game==1 || ball[k].glue) |
1546 | ball[k].pos_x+=LCD_WIDTH-pad_pos_x-PAD_WIDTH; | 1578 | ball[k].pos_x+=LCD_WIDTH-pad_pos_x-pad_width; |
1547 | pad_pos_x+=LCD_WIDTH-pad_pos_x-PAD_WIDTH; | 1579 | pad_pos_x+=LCD_WIDTH-pad_pos_x-pad_width; |
1548 | } | 1580 | } |
1549 | else { | 1581 | else { |
1550 | for(k=0;k<used_balls;k++) | 1582 | for(k=0;k<used_balls;k++) |
@@ -1579,7 +1611,7 @@ static int brickmania_game_loop(void) | |||
1579 | if (start_game==1 && con_game!=1 && pad_type!=1) { | 1611 | if (start_game==1 && con_game!=1 && pad_type!=1) { |
1580 | for(k=0;k<used_balls;k++) { | 1612 | for(k=0;k<used_balls;k++) { |
1581 | ball[k].y=-4; | 1613 | ball[k].y=-4; |
1582 | ball[k].x=pad_pos_x+(PAD_WIDTH/2)-2>= | 1614 | ball[k].x=pad_pos_x+(pad_width/2)-2>= |
1583 | LCD_WIDTH/2?2:-2; | 1615 | LCD_WIDTH/2?2:-2; |
1584 | } | 1616 | } |
1585 | start_game =0; | 1617 | start_game =0; |
@@ -1605,7 +1637,7 @@ static int brickmania_game_loop(void) | |||
1605 | fire[tfire].left=pad_pos_x+1; | 1637 | fire[tfire].left=pad_pos_x+1; |
1606 | tfire=brickmania_fire_space(); | 1638 | tfire=brickmania_fire_space(); |
1607 | fire[tfire].top=PAD_POS_Y-7; | 1639 | fire[tfire].top=PAD_POS_Y-7; |
1608 | fire[tfire].left=pad_pos_x+PAD_WIDTH-1; | 1640 | fire[tfire].left=pad_pos_x+pad_width-1; |
1609 | } else if (con_game==1 && start_game!=1) { | 1641 | } else if (con_game==1 && start_game!=1) { |
1610 | for(k=0;k<used_balls;k++) { | 1642 | for(k=0;k<used_balls;k++) { |
1611 | ball[k].x=x[k]; | 1643 | ball[k].x=x[k]; |