summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kukla <roolku@rockbox.org>2009-07-26 19:51:44 +0000
committerRobert Kukla <roolku@rockbox.org>2009-07-26 19:51:44 +0000
commit00c657f9cc59cf0fdcd3ae2e9bc6e796b9aabf0e (patch)
treee2941bd4d22e7d1f9fb66729136a8d08d13897b0
parentc6309633a1b33c85b1920c61126ad03f262ab215 (diff)
downloadrockbox-00c657f9cc59cf0fdcd3ae2e9bc6e796b9aabf0e.tar.gz
rockbox-00c657f9cc59cf0fdcd3ae2e9bc6e796b9aabf0e.zip
new powerup in brickmania
Author: Asael Reiter Flyspray: FS #10463 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22057 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/bitmaps/native/SOURCES20
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.112x64x1.bmpbin0 -> 278 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.132x80x16.bmpbin0 -> 1134 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.160x128x16.bmpbin0 -> 1974 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.160x128x2.bmpbin0 -> 430 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.176x132x16.bmpbin0 -> 2574 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.220x176x16.bmpbin0 -> 2574 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.320x240x16.bmpbin0 -> 5010 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.480x640x16.bmpbin0 -> 11446 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_long_pads.640x480x16.bmpbin0 -> 19878 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.112x64x1.bmpbin244 -> 282 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.132x80x16.bmpbin754 -> 954 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.160x128x16.bmpbin1400 -> 1782 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.160x128x2.bmpbin412 -> 506 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.176x132x16.bmpbin1400 -> 1782 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.220x176x16.bmpbin1400 -> 1782 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.bmpbin3416 -> 4374 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.480x640x16.bmpbin7614 -> 9774 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_powerups.640x480x16.bmpbin13494 -> 17334 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.112x64x1.bmpbin0 -> 170 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.132x80x16.bmpbin0 -> 522 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.160x128x16.bmpbin0 -> 954 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.160x128x2.bmpbin0 -> 298 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.176x132x16.bmpbin0 -> 1314 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.220x176x16.bmpbin0 -> 1314 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.320x240x16.bmpbin0 -> 2574 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.480x640x16.bmpbin0 -> 5814 bytes
-rw-r--r--apps/plugins/bitmaps/native/brickmania_short_pads.640x480x16.bmpbin0 -> 9966 bytes
-rw-r--r--apps/plugins/brickmania.c108
-rw-r--r--docs/CREDITS1
30 files changed, 91 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
8brickmania_ball.15x15x16.bmp 8brickmania_ball.15x15x16.bmp
9brickmania_bricks.640x480x16.bmp 9brickmania_bricks.640x480x16.bmp
10brickmania_pads.640x480x16.bmp 10brickmania_pads.640x480x16.bmp
11brickmania_short_pads.640x480x16.bmp
12brickmania_long_pads.640x480x16.bmp
11brickmania_break.640x480x16.bmp 13brickmania_break.640x480x16.bmp
12brickmania_powerups.640x480x16.bmp 14brickmania_powerups.640x480x16.bmp
13 15
@@ -15,6 +17,8 @@ brickmania_powerups.640x480x16.bmp
15brickmania_ball.11x11x16.bmp 17brickmania_ball.11x11x16.bmp
16brickmania_bricks.480x640x16.bmp 18brickmania_bricks.480x640x16.bmp
17brickmania_pads.480x640x16.bmp 19brickmania_pads.480x640x16.bmp
20brickmania_short_pads.480x640x16.bmp
21brickmania_long_pads.480x640x16.bmp
18brickmania_break.480x640x16.bmp 22brickmania_break.480x640x16.bmp
19brickmania_powerups.480x640x16.bmp 23brickmania_powerups.480x640x16.bmp
20 24
@@ -22,6 +26,8 @@ brickmania_powerups.480x640x16.bmp
22brickmania_ball.5x5x16.bmp 26brickmania_ball.5x5x16.bmp
23brickmania_bricks.320x240x16.bmp 27brickmania_bricks.320x240x16.bmp
24brickmania_pads.320x240x16.bmp 28brickmania_pads.320x240x16.bmp
29brickmania_short_pads.320x240x16.bmp
30brickmania_long_pads.320x240x16.bmp
25brickmania_break.320x240x16.bmp 31brickmania_break.320x240x16.bmp
26brickmania_powerups.320x240x16.bmp 32brickmania_powerups.320x240x16.bmp
27 33
@@ -29,6 +35,8 @@ brickmania_powerups.320x240x16.bmp
29brickmania_ball.5x5x16.bmp 35brickmania_ball.5x5x16.bmp
30brickmania_bricks.220x176x16.bmp 36brickmania_bricks.220x176x16.bmp
31brickmania_pads.220x176x16.bmp 37brickmania_pads.220x176x16.bmp
38brickmania_short_pads.220x176x16.bmp
39brickmania_long_pads.220x176x16.bmp
32brickmania_break.220x176x16.bmp 40brickmania_break.220x176x16.bmp
33brickmania_powerups.220x176x16.bmp 41brickmania_powerups.220x176x16.bmp
34 42
@@ -36,6 +44,8 @@ brickmania_powerups.220x176x16.bmp
36brickmania_ball.5x5x16.bmp 44brickmania_ball.5x5x16.bmp
37brickmania_bricks.176x132x16.bmp 45brickmania_bricks.176x132x16.bmp
38brickmania_pads.176x132x16.bmp 46brickmania_pads.176x132x16.bmp
47brickmania_short_pads.176x132x16.bmp
48brickmania_long_pads.176x132x16.bmp
39brickmania_powerups.176x132x16.bmp 49brickmania_powerups.176x132x16.bmp
40brickmania_break.176x132x16.bmp 50brickmania_break.176x132x16.bmp
41 51
@@ -43,6 +53,8 @@ brickmania_break.176x132x16.bmp
43brickmania_ball.5x5x16.bmp 53brickmania_ball.5x5x16.bmp
44brickmania_bricks.160x128x16.bmp 54brickmania_bricks.160x128x16.bmp
45brickmania_pads.160x128x16.bmp 55brickmania_pads.160x128x16.bmp
56brickmania_short_pads.160x128x16.bmp
57brickmania_long_pads.160x128x16.bmp
46brickmania_powerups.160x128x16.bmp 58brickmania_powerups.160x128x16.bmp
47brickmania_break.160x128x16.bmp 59brickmania_break.160x128x16.bmp
48 60
@@ -50,6 +62,8 @@ brickmania_break.160x128x16.bmp
50brickmania_ball.4x4x16.bmp 62brickmania_ball.4x4x16.bmp
51brickmania_bricks.132x80x16.bmp 63brickmania_bricks.132x80x16.bmp
52brickmania_pads.132x80x16.bmp 64brickmania_pads.132x80x16.bmp
65brickmania_short_pads.132x80x16.bmp
66brickmania_long_pads.132x80x16.bmp
53brickmania_powerups.132x80x16.bmp 67brickmania_powerups.132x80x16.bmp
54brickmania_break.132x80x16.bmp 68brickmania_break.132x80x16.bmp
55 69
@@ -57,6 +71,8 @@ brickmania_break.132x80x16.bmp
57brickmania_ball.4x4x16.bmp 71brickmania_ball.4x4x16.bmp
58brickmania_bricks.128x128x16.bmp 72brickmania_bricks.128x128x16.bmp
59brickmania_pads.132x80x16.bmp 73brickmania_pads.132x80x16.bmp
74brickmania_short_pads.132x80x16.bmp
75brickmania_long_pads.132x80x16.bmp
60brickmania_powerups.132x80x16.bmp 76brickmania_powerups.132x80x16.bmp
61brickmania_break.132x80x16.bmp 77brickmania_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
65brickmania_gameover.86x43x2.bmp 81brickmania_gameover.86x43x2.bmp
66brickmania_pads.160x128x2.bmp 82brickmania_pads.160x128x2.bmp
83brickmania_short_pads.160x128x2.bmp
84brickmania_long_pads.160x128x2.bmp
67brickmania_powerups.160x128x2.bmp 85brickmania_powerups.160x128x2.bmp
68#if (LCD_WIDTH >= 160) 86#if (LCD_WIDTH >= 160)
69brickmania_ball.5x5x2.bmp 87brickmania_ball.5x5x2.bmp
@@ -80,6 +98,8 @@ brickmania_gameover.59x30x1.bmp
80brickmania_bricks.112x64x1.bmp 98brickmania_bricks.112x64x1.bmp
81brickmania_ball.3x3x1.bmp 99brickmania_ball.3x3x1.bmp
82brickmania_pads.112x64x1.bmp 100brickmania_pads.112x64x1.bmp
101brickmania_short_pads.112x64x1.bmp
102brickmania_long_pads.112x64x1.bmp
83brickmania_powerups.112x64x1.bmp 103brickmania_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;
585bool saved_game=false; 589bool saved_game=false;
586int l_score=0; 590int l_score=0;
587int difficulty = EASY; 591int difficulty = EASY;
592int pad_width;
588 593
589typedef struct cube { 594typedef 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];
diff --git a/docs/CREDITS b/docs/CREDITS
index 9527a73c2b..b5f6bfcaef 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -483,6 +483,7 @@ David Johnston
483Ralph Soto 483Ralph Soto
484Mykhailo Radzievskyi 484Mykhailo Radzievskyi
485Christophe Gouiran 485Christophe Gouiran
486Asael Reiter
486 487
487The libmad team 488The libmad team
488The wavpack team 489The wavpack team