diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-07-18 03:47:03 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-07-18 03:47:03 +0000 |
commit | f2c45dc3693cd3695d8d0ed2fd8e7f189286d3cc (patch) | |
tree | 5cf145974150a3d772dc848e5e2f220831baf905 /apps | |
parent | 8a1cda66f0dea643a2c9cf52c08570eb5fb0707c (diff) | |
download | rockbox-f2c45dc3693cd3695d8d0ed2fd8e7f189286d3cc.tar.gz rockbox-f2c45dc3693cd3695d8d0ed2fd8e7f189286d3cc.zip |
Bubbles: Make new screen support a bit more generic and add support for 640x480 and 480x640 screen sizes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21945 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/bubbles.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 44d172c4ee..17848dbcf3 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -114,87 +114,82 @@ PLUGIN_HEADER | |||
114 | #define EMBLEM_HEIGHT (BMPHEIGHT_bubbles_emblem/8) | 114 | #define EMBLEM_HEIGHT (BMPHEIGHT_bubbles_emblem/8) |
115 | 115 | ||
116 | /* bubbles will consume height of ROW_HEIGHT*(BB_HEIGHT-1)+BUBBLE_HEIGHT*3/2 */ | 116 | /* bubbles will consume height of ROW_HEIGHT*(BB_HEIGHT-1)+BUBBLE_HEIGHT*3/2 */ |
117 | /* 44x44 bubbles (m:robe 500) */ | ||
118 | #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) | ||
119 | #define XOFS 144 | ||
120 | #define MAX_FPS 40 | ||
121 | |||
122 | #elif (LCD_WIDTH == 480) && (LCD_HEIGHT == 640) | ||
123 | #define XOFS 128 | ||
124 | #define MAX_FPS 40 | ||
125 | |||
117 | /* 22x22 bubbles (iPod Video) */ | 126 | /* 22x22 bubbles (iPod Video) */ |
118 | #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) | 127 | #elif (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) |
119 | #define XOFS 72 | 128 | #define XOFS 72 |
120 | #define ROW_HEIGHT 18 | ||
121 | #define ROW_INDENT 11 | ||
122 | #define MAX_FPS 40 | 129 | #define MAX_FPS 40 |
123 | 130 | ||
124 | /* 22x22 bubbles (Gigabeat, Onda VX747) */ | 131 | /* 22x22 bubbles (Gigabeat, Onda VX747) */ |
125 | #elif ((LCD_HEIGHT == 320) || (LCD_HEIGHT == 400)) && (LCD_WIDTH == 240) | 132 | #elif ((LCD_HEIGHT == 320) || (LCD_HEIGHT == 400)) && (LCD_WIDTH == 240) |
126 | #define XOFS 64 | 133 | #define XOFS 64 |
127 | #define ROW_HEIGHT 18 | ||
128 | #define ROW_INDENT 11 | ||
129 | #define MAX_FPS 30 | 134 | #define MAX_FPS 30 |
130 | 135 | ||
131 | /* 16x16 bubbles (H300, iPod Color) */ | 136 | /* 16x16 bubbles (H300, iPod Color) */ |
132 | #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) | 137 | #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) |
133 | #define XOFS 46 | 138 | #define XOFS 46 |
134 | #define ROW_HEIGHT 14 | ||
135 | #define ROW_INDENT 8 | ||
136 | #define MAX_FPS 30 | 139 | #define MAX_FPS 30 |
137 | 140 | ||
138 | /* 16x16 bubbles (Sansa E200) */ | 141 | /* 16x16 bubbles (Sansa E200) */ |
139 | #elif (LCD_HEIGHT == 220) && (LCD_WIDTH == 176) | 142 | #elif (LCD_HEIGHT == 220) && (LCD_WIDTH == 176) |
140 | #define XOFS 48 | 143 | #define XOFS 48 |
141 | #define ROW_HEIGHT 14 | ||
142 | #define ROW_INDENT 8 | ||
143 | #define MAX_FPS 30 | 144 | #define MAX_FPS 30 |
144 | 145 | ||
145 | /* 12x12 bubbles (iPod Nano) */ | 146 | /* 12x12 bubbles (iPod Nano) */ |
146 | #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) | 147 | #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) |
147 | #define XOFS 40 | 148 | #define XOFS 40 |
148 | #define ROW_HEIGHT 10 | ||
149 | #define ROW_INDENT 6 | ||
150 | #define MAX_FPS 40 | 149 | #define MAX_FPS 40 |
151 | 150 | ||
152 | /* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */ | 151 | /* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */ |
153 | #elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128)) | 152 | #elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128)) |
154 | #define XOFS 33 | 153 | #define XOFS 33 |
155 | #define ROW_HEIGHT 10 | ||
156 | #define ROW_INDENT 6 | ||
157 | #define MAX_FPS 30 | 154 | #define MAX_FPS 30 |
158 | 155 | ||
159 | /* 10x10 bubbles (iPod Mini) */ | 156 | /* 10x10 bubbles (iPod Mini) */ |
160 | #elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138) | 157 | #elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138) |
161 | #define XOFS 33 | 158 | #define XOFS 33 |
162 | #define ROW_HEIGHT 8 | ||
163 | #define ROW_INDENT 5 | ||
164 | #define MAX_FPS 30 | 159 | #define MAX_FPS 30 |
165 | 160 | ||
166 | /* 9x9 bubbles (iAudio M3) */ | 161 | /* 9x9 bubbles (iAudio M3) */ |
167 | #elif (LCD_HEIGHT == 96) && (LCD_WIDTH == 128) | 162 | #elif (LCD_HEIGHT == 96) && (LCD_WIDTH == 128) |
168 | #define XOFS 45 | 163 | #define XOFS 45 |
169 | #define ROW_HEIGHT 7 | ||
170 | #define ROW_INDENT 4 | ||
171 | #define MAX_FPS 30 | 164 | #define MAX_FPS 30 |
172 | 165 | ||
173 | /* 8x8 bubbles (Sansa C200) */ | 166 | /* 8x8 bubbles (Sansa C200) */ |
174 | #elif ((LCD_HEIGHT == 80) && (LCD_WIDTH == 132)) | 167 | #elif ((LCD_HEIGHT == 80) && (LCD_WIDTH == 132)) |
175 | #define XOFS 45 | 168 | #define XOFS 45 |
176 | #define ROW_HEIGHT 6 | ||
177 | #define ROW_INDENT 4 | ||
178 | #define MAX_FPS 30 | 169 | #define MAX_FPS 30 |
179 | 170 | ||
180 | /* 7x7 bubbles (Sansa Clip/m200) */ | 171 | /* 7x7 bubbles (Sansa Clip/m200) */ |
181 | #elif (LCD_HEIGHT == 64 && LCD_WIDTH == 128) | 172 | #elif (LCD_HEIGHT == 64 && LCD_WIDTH == 128) |
182 | #define XOFS 33 | 173 | #define XOFS 33 |
183 | #define ROW_HEIGHT 5 | 174 | #define ROW_HEIGHT 5 |
184 | #define ROW_INDENT 4 | ||
185 | #define MAX_FPS 30 | 175 | #define MAX_FPS 30 |
186 | 176 | ||
187 | /* 8x7 bubbles (Archos recorder, Ondio) */ | 177 | /* 8x7 bubbles (Archos recorder, Ondio) */ |
188 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) | 178 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) |
189 | #define XOFS 33 | 179 | #define XOFS 33 |
190 | #define ROW_HEIGHT 5 | 180 | #define ROW_HEIGHT 5 |
191 | #define ROW_INDENT 4 | ||
192 | #define MAX_FPS 20 | 181 | #define MAX_FPS 20 |
193 | 182 | ||
194 | #else | 183 | #else |
195 | #error BUBBLES: Unsupported LCD type | 184 | #error BUBBLES: Unsupported LCD type |
196 | #endif | 185 | #endif |
197 | 186 | ||
187 | #if !defined(ROW_HEIGHT) | ||
188 | #define ROW_HEIGHT (BUBBLE_WIDTH-(BUBBLE_WIDTH-EMBLEM_WIDTH)/2) | ||
189 | #endif | ||
190 | |||
191 | #define ROW_INDENT (BUBBLE_WIDTH/2) | ||
192 | |||
198 | #define TEXT_LINES (LCD_HEIGHT/8) | 193 | #define TEXT_LINES (LCD_HEIGHT/8) |
199 | 194 | ||
200 | /* shot position */ | 195 | /* shot position */ |