1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Robert Menes 2009-12-04 11:41:31 +00:00
parent fce66cb835
commit f51e1f9821
3 changed files with 13 additions and 9 deletions

View file

@ -242,7 +242,7 @@ PLUGIN_HEADER
#define CHC_SETTINGS_INC BUTTON_NEXT #define CHC_SETTINGS_INC BUTTON_NEXT
#define CHC_SETTINGS_DEC BUTTON_PREV #define CHC_SETTINGS_DEC BUTTON_PREV
#define CHC_SETTINGS_OK BUTTON_PLAY #define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANEL BUTTON_POWER #define CHC_SETTINGS_CANCEL BUTTON_POWER
#elif CONFIG_KEYPAD == ONDAVX747_PAD #elif CONFIG_KEYPAD == ONDAVX747_PAD
#define CHC_QUIT BUTTON_POWER #define CHC_QUIT BUTTON_POWER

View file

@ -370,7 +370,7 @@ void score(struct pong *p, int pad)
/* avoid hitting the pad with the new ball */ /* avoid hitting the pad with the new ball */
p->ballx = (p->ballx < 0) ? p->ballx = (p->ballx < 0) ?
(RES * PAD_WIDTH) : (RES * (LCD_WIDTH - PAD_WIDTH - BALL_WIDTH)); (RES * PAD_WIDTH) : (RES * (LCD_WIDTH - PAD_WIDTH - BALL_WIDTH));
/* restore Y-speed to default */ /* restore Y-speed to default */
p->ballspeedy = (p->ballspeedy > 0) ? SPEEDY : -SPEEDY; p->ballspeedy = (p->ballspeedy > 0) ? SPEEDY : -SPEEDY;
@ -460,7 +460,7 @@ int keys(struct pong *p)
while(TIME_BEFORE(*rb->current_tick, end)) { while(TIME_BEFORE(*rb->current_tick, end)) {
key = rb->button_get_w_tmo(end - *rb->current_tick); key = rb->button_get_w_tmo(end - *rb->current_tick);
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
short touch_x, touch_y; short touch_x, touch_y;
if(key & BUTTON_TOUCHSCREEN) if(key & BUTTON_TOUCHSCREEN)
@ -469,7 +469,7 @@ int keys(struct pong *p)
touch_y = rb->button_get_data() & 0xFFFF; touch_y = rb->button_get_data() & 0xFFFF;
if(touch_x >= xpos[0] && touch_x <= xpos[0]+(PAD_WIDTH*4)) 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); 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]) 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); 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 */ if(key & PONG_RIGHT_UP) /* player right goes up */
padmove(&p->w_pad[1], -MOVE_STEP); padmove(&p->w_pad[1], -MOVE_STEP);
if(rb->default_event_handler(key) == SYS_USB_CONNECTED) if(rb->default_event_handler(key) == SYS_USB_CONNECTED)
return -1; /* exit game because of USB */ 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 /* if you don't use the parameter, you can do like
this to avoid the compiler warning about it */ this to avoid the compiler warning about it */
(void)parameter; (void)parameter;
/* Clear screen */ /* Clear screen */
rb->lcd_clear_display(); rb->lcd_clear_display();

View file

@ -122,11 +122,9 @@ static const char default_game[9][9] =
#define MARK_SIZE 1 /* Mark width and height */ #define MARK_SIZE 1 /* Mark width and height */
#elif (LCD_HEIGHT==110) && (LCD_WIDTH==138) \ #elif (LCD_HEIGHT==110) && (LCD_WIDTH==138) \
|| (LCD_HEIGHT==128) && (LCD_WIDTH==128) \ || (LCD_HEIGHT==128) && (LCD_WIDTH==128)
|| (LCD_HEIGHT==160) && (LCD_WIDTH==128)
/* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */ /* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */
/* iriver H10 5-6GB - 128x128, 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_OFFS 1 /* Pixels between border and mark */
#define MARK_SPACE 1 /* Pixels between two marks */ #define MARK_SPACE 1 /* Pixels between two marks */
#define MARK_SIZE 2 /* Mark width and height */ #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_SPACE 2 /* Pixels between two marks */
#define MARK_SIZE 6 /* Mark width and height */ #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 #else
#error SUDOKU: Unsupported LCD size #error SUDOKU: Unsupported LCD size
#endif #endif