diff options
Diffstat (limited to 'apps/plugins/chessbox/chessbox.c')
-rw-r--r-- | apps/plugins/chessbox/chessbox.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 2ff808d52c..9b0b79bcda 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c | |||
@@ -196,37 +196,29 @@ PLUGIN_HEADER | |||
196 | #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) | 196 | #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) |
197 | #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) | 197 | #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) |
198 | 198 | ||
199 | #elif CONFIG_KEYPAD == SANSA_C200_PAD | ||
200 | #define CB_SELECT BUTTON_SELECT | ||
201 | #define CB_UP BUTTON_UP | ||
202 | #define CB_DOWN BUTTON_DOWN | ||
203 | #define CB_LEFT BUTTON_LEFT | ||
204 | #define CB_RIGHT BUTTON_RIGHT | ||
205 | #define CB_PLAY BUTTON_VOL_UP | ||
206 | #define CB_LEVEL BUTTON_REC | ||
207 | #define CB_MENU BUTTON_POWER | ||
208 | |||
209 | #define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT) | ||
210 | #define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT) | ||
211 | #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) | ||
212 | #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) | ||
213 | |||
199 | #else | 214 | #else |
200 | #error CHESSBOX: Unsupported keypad | 215 | #error CHESSBOX: Unsupported keypad |
201 | #endif | 216 | #endif |
202 | 217 | ||
203 | /* use 30x30 tiles */ | 218 | /* Tile size defined by the assigned bitmap */ |
204 | #if (LCD_HEIGHT >= 240) && (LCD_WIDTH >= 240) | 219 | #include "chessbox_pieces.h" |
205 | #define TILE_WIDTH 30 | 220 | #define TILE_WIDTH BMPWIDTH_chessbox_pieces |
206 | #define TILE_HEIGHT 30 | 221 | #define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26) |
207 | /* use 22x22 tiles */ | ||
208 | #elif (LCD_HEIGHT >= 176) && (LCD_WIDTH >= 176) | ||
209 | #define TILE_WIDTH 22 | ||
210 | #define TILE_HEIGHT 22 | ||
211 | /* use 16x16 tiles */ | ||
212 | #elif (LCD_HEIGHT >= 128) && (LCD_WIDTH >= 128) | ||
213 | #define TILE_WIDTH 16 | ||
214 | #define TILE_HEIGHT 16 | ||
215 | /* use 13x13 tiles */ | ||
216 | #elif (LCD_HEIGHT >= 104) && (LCD_WIDTH >= 104) | ||
217 | #define TILE_WIDTH 13 | ||
218 | #define TILE_HEIGHT 13 | ||
219 | /* use 10x8 tiles , only for the archoses */ | ||
220 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) | ||
221 | #define TILE_WIDTH 10 | ||
222 | #define TILE_HEIGHT 8 | ||
223 | /* use 8x8 tiles */ | ||
224 | #elif (LCD_HEIGHT >= 64) && (LCD_WIDTH >= 64) | ||
225 | #define TILE_WIDTH 8 | ||
226 | #define TILE_HEIGHT 8 | ||
227 | #else | ||
228 | #error CHESSBOX: Unsupported LCD | ||
229 | #endif | ||
230 | 222 | ||
231 | /* Calculate Offsets */ | 223 | /* Calculate Offsets */ |
232 | #define XOFS ((LCD_WIDTH-8*TILE_WIDTH)/2) | 224 | #define XOFS ((LCD_WIDTH-8*TILE_WIDTH)/2) |