From f51e1f9821f73762477feb7e97e561c51463c24b Mon Sep 17 00:00:00 2001 From: Robert Menes Date: Fri, 4 Dec 2009 11:41:31 +0000 Subject: Fix a typo for the GoGear SA9200 on chessclock, and got the LCD resolution in the right spot this time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23843 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/chessclock.c | 2 +- apps/plugins/pong.c | 10 +++++----- apps/plugins/sudoku/sudoku.c | 10 +++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'apps') diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 1bd6c80940..39b28628f0 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -242,7 +242,7 @@ PLUGIN_HEADER #define CHC_SETTINGS_INC BUTTON_NEXT #define CHC_SETTINGS_DEC BUTTON_PREV #define CHC_SETTINGS_OK BUTTON_PLAY -#define CHC_SETTINGS_CANEL BUTTON_POWER +#define CHC_SETTINGS_CANCEL BUTTON_POWER #elif CONFIG_KEYPAD == ONDAVX747_PAD #define CHC_QUIT BUTTON_POWER diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 13c5012770..73fb48356b 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -370,7 +370,7 @@ void score(struct pong *p, int pad) /* avoid hitting the pad with the new ball */ p->ballx = (p->ballx < 0) ? (RES * PAD_WIDTH) : (RES * (LCD_WIDTH - PAD_WIDTH - BALL_WIDTH)); - + /* restore Y-speed to default */ p->ballspeedy = (p->ballspeedy > 0) ? SPEEDY : -SPEEDY; @@ -460,7 +460,7 @@ int keys(struct pong *p) while(TIME_BEFORE(*rb->current_tick, end)) { key = rb->button_get_w_tmo(end - *rb->current_tick); - + #ifdef HAVE_TOUCHSCREEN short touch_x, touch_y; if(key & BUTTON_TOUCHSCREEN) @@ -469,7 +469,7 @@ int keys(struct pong *p) touch_y = rb->button_get_data() & 0xFFFF; if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4)) padmove(&p->w_pad[0], touch_y-(p->e_pad[0]*2+PAD_HEIGHT)/2); - + if(touch_x >= xpos[1]-(PAD_WIDTH*4) && touch_x <= xpos[1]) padmove(&p->w_pad[1], touch_y-(p->e_pad[1]*2+PAD_HEIGHT)/2); } @@ -507,7 +507,7 @@ int keys(struct pong *p) if(key & PONG_RIGHT_UP) /* player right goes up */ padmove(&p->w_pad[1], -MOVE_STEP); - + if(rb->default_event_handler(key) == SYS_USB_CONNECTED) return -1; /* exit game because of USB */ } @@ -548,7 +548,7 @@ enum plugin_status plugin_start(const void* parameter) /* if you don't use the parameter, you can do like this to avoid the compiler warning about it */ (void)parameter; - + /* Clear screen */ rb->lcd_clear_display(); diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index acd6065fbc..99b08f21a9 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -122,11 +122,9 @@ static const char default_game[9][9] = #define MARK_SIZE 1 /* Mark width and height */ #elif (LCD_HEIGHT==110) && (LCD_WIDTH==138) \ - || (LCD_HEIGHT==128) && (LCD_WIDTH==128) \ - || (LCD_HEIGHT==160) && (LCD_WIDTH==128) + || (LCD_HEIGHT==128) && (LCD_WIDTH==128) /* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */ /* iriver H10 5-6GB - 128x128, 9 cells @ 10x10 with 14 border lines */ -/* Philips GoGear SA9200 - 128x160, 9 cells @ 10x10 with 14 border tiles */ #define MARK_OFFS 1 /* Pixels between border and mark */ #define MARK_SPACE 1 /* Pixels between two marks */ #define MARK_SIZE 2 /* Mark width and height */ @@ -176,6 +174,12 @@ static const char default_game[9][9] = #define MARK_SPACE 2 /* Pixels between two marks */ #define MARK_SIZE 6 /* Mark width and height */ +#elif ((LCD_HEIGHT==160) && (LCD_WIDTH==128)) +/* Philips GoGear SA9200 - 128x160, 9 cells @ 10x10 with 14 border tiles */ +#define MARK_OFFS 1 /* Pixels between border and mark */ +#define MARK_SPACE 1 /* Pixels between two marks */ +#define MARK_SIZE 2 /* Mark width and height */ + #else #error SUDOKU: Unsupported LCD size #endif -- cgit v1.2.3