diff options
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/SOURCES | 6 | ||||
| -rw-r--r-- | apps/plugins/SUBDIRS | 3 | ||||
| -rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 8 | ||||
| -rw-r--r-- | apps/plugins/jewels.c | 26 | ||||
| -rw-r--r-- | apps/plugins/rockboy/rockboy.c | 7 | ||||
| -rw-r--r-- | apps/plugins/rockboy/sys_rockbox.c | 3 | ||||
| -rw-r--r-- | apps/plugins/spacerocks.c | 83 | ||||
| -rw-r--r-- | apps/plugins/sudoku/SOURCES | 2 | ||||
| -rw-r--r-- | apps/plugins/sudoku/sudoku.c | 12 | ||||
| -rw-r--r-- | apps/plugins/sudoku/sudoku.h | 5 | ||||
| -rw-r--r-- | apps/plugins/wormlet.c | 5 |
11 files changed, 108 insertions, 52 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index f396729..f00ac71 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -55,9 +55,7 @@ brickmania.c calculator.c chip8.c demystify.c -#ifndef SANSA_E200 jewels.c -#endif minesweeper.c oscilloscope.c pong.c @@ -72,7 +70,7 @@ starfield.c video.c #endif vu_meter.c -#if !defined(IRIVER_H10_5GB) && !defined(SANSA_E200) +#if !defined(IRIVER_H10_5GB) wormlet.c #endif @@ -95,9 +93,7 @@ rockboy.c fireworks.c xobox.c #endif -#if !defined(SANSA_E200) spacerocks.c -#endif #if LCD_DEPTH >= 16 rockpaint.c #endif diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 686c467..aff4a21 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -8,7 +8,8 @@ (CONFIG_KEYPAD == IRIVER_H300_PAD) || \ defined(IPOD_COLOR) || \ defined(IPOD_VIDEO) || \ - defined(TOSHIBA_GIGABEAT_F) + defined(TOSHIBA_GIGABEAT_F) || \ + defined(SANSA_E200) rockboy #endif diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 568597c..b98377e 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -66,6 +66,8 @@ jewels.160x128x16.bmp jewels.160x128x16.bmp #elif (LCD_WIDTH == 220) && (LCD_HEIGHT == 176) jewels.220x176x16.bmp +#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220) +jewels.220x176x16.bmp #elif (LCD_WIDTH == 240) && (LCD_HEIGHT == 320) jewels.320x240x16.bmp #elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) @@ -254,7 +256,11 @@ sudoku_normal.320x240x16.bmp sudoku_inverse.320x240x16.bmp #endif #else -#if (LCD_WIDTH >= 240) && (LCD_HEIGHT >= 320) && (LCD_DEPTH == 16) +#if ((LCD_WIDTH == 176) && (LCD_HEIGHT == 220) && (LCD_DEPTH == 16)) +sudoku_start.220x176x16.bmp +sudoku_normal.220x176x16.bmp +sudoku_inverse.220x176x16.bmp +#elif (LCD_WIDTH >= 240) && (LCD_HEIGHT >= 320) && (LCD_DEPTH == 16) sudoku_start.320x240x16.bmp sudoku_normal.320x240x16.bmp sudoku_inverse.320x240x16.bmp diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index ba74879..d0bf1af 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -123,7 +123,8 @@ PLUGIN_HEADER #define NUM_SCORES 10 /* use 22x22 tiles (H300, iPod Color) */ -#elif ((LCD_HEIGHT == 176) && (LCD_WIDTH == 220)) +#elif ((LCD_HEIGHT == 176) && (LCD_WIDTH == 220)) || \ + ((LCD_HEIGHT == 220) && (LCD_WIDTH == 176)) #define TILE_WIDTH 22 #define TILE_HEIGHT 22 #define YOFS 0 @@ -1306,6 +1307,29 @@ static int jewels_main(struct game_context* bj) { rb->lcd_puts(0, 9, "SELECT to select"); rb->lcd_puts(0, 10, "Long SELECT to show menu"); rb->lcd_puts(0, 11, "A to cancel"); +#elif CONFIG_KEYPAD == SANSA_E200_PAD + rb->lcd_puts(0, 2, "Swap pairs of jewels to"); + rb->lcd_puts(0, 3, "form connected segments"); + rb->lcd_puts(0, 4, "of three or more of the"); + rb->lcd_puts(0, 5, "same type."); + rb->lcd_puts(0, 7, "Controls:"); + rb->lcd_puts(0, 8, "Directions to move"); + rb->lcd_puts(0, 9, "SELECT to select"); + rb->lcd_puts(0, 10, "Long SELECT to show menu"); + rb->lcd_puts(0, 11, "POWER to cancel"); +#elif CONFIG_KEYPAD == IRIVER_H10_PAD + rb->lcd_puts(0, 2, "Swap pairs of jewels"); + rb->lcd_puts(0, 3, "to form connected"); + rb->lcd_puts(0, 4, "segments of three or "); + rb->lcd_puts(0, 5, "more of the"); + rb->lcd_puts(0, 6, "same type."); + rb->lcd_puts(0, 8, "Controls:"); + rb->lcd_puts(0, 9, "Directions or scroll to move"); + rb->lcd_puts(0, 10, "PLAY to select"); + rb->lcd_puts(0, 11, "Long PLAY for menu"); + rb->lcd_puts(0, 12, "POWER to cancel"); +#else + #warning: missing help text. #endif rb->lcd_update(); while(true) { diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index cce0f8c..d7dd4d8 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -129,6 +129,13 @@ void setoptions (void) options.START=BUTTON_POWER; options.SELECT=BUTTON_SELECT; options.MENU=BUTTON_MENU; + +#elif CONFIG_KEYPAD == SANSA_E200_PAD + options.A=BUTTON_SELECT; + options.B=BUTTON_REC; + options.START=BUTTON_SCROLL_UP; + options.SELECT=BUTTON_SCROLL_DOWN; + options.MENU=BUTTON_POWER; #endif options.maxskip=4; diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c index 431fe13..fb11816 100644 --- a/apps/plugins/rockboy/sys_rockbox.c +++ b/apps/plugins/rockboy/sys_rockbox.c @@ -181,7 +181,8 @@ void ev_poll(void) #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ (CONFIG_KEYPAD == IRIVER_H300_PAD) || \ (CONFIG_KEYPAD == IPOD_4G_PAD) || \ - (CONFIG_KEYPAD == GIGABEAT_PAD) + (CONFIG_KEYPAD == GIGABEAT_PAD) || \ + (CONFIG_KEYPAD == SANSA_E200_PAD) #ifdef HAVE_WHEEL_POSITION rb->wheel_send_events(true); #endif diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 0143af9..879a569 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -120,17 +120,17 @@ static struct plugin_api* rb; /* global api struct pointer */ #define AST_FIRE_REP BUTTON_SELECT | BUTTON_REPEAT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) -#define AST_PAUSE BUTTON_SELECT +#define AST_PAUSE BUTTON_REC #define AST_QUIT BUTTON_POWER -#define AST_THRUST_REP BUTTON_UP | BUTTON_RIGHT +#define AST_THRUST_REP (BUTTON_UP | BUTTON_REPEAT) #define AST_THRUST BUTTON_UP #define AST_HYPERSPACE BUTTON_DOWN #define AST_LEFT BUTTON_LEFT -#define AST_LEFT_REP BUTTON_LEFT | BUTTON_RIGHT +#define AST_LEFT_REP (BUTTON_LEFT | BUTTON_REPEAT) #define AST_RIGHT BUTTON_RIGHT -#define AST_RIGHT_REP (BUTTON_RIGHT | BUTTON_RIGHT) +#define AST_RIGHT_REP (BUTTON_RIGHT | BUTTON_REPEAT) #define AST_FIRE BUTTON_SELECT -#define AST_FIRE_REP BUTTON_SELECT | BUTTON_RIGHT +#define AST_FIRE_REP (BUTTON_SELECT | BUTTON_REPEAT) #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define AST_PAUSE BUTTON_PLAY @@ -161,7 +161,8 @@ static struct plugin_api* rb; /* global api struct pointer */ (CONFIG_KEYPAD == IPOD_4G_PAD) || \ (CONFIG_KEYPAD == GIGABEAT_PAD)|| \ (CONFIG_KEYPAD == ARCHOS_AV300_PAD)|| \ - (CONFIG_KEYPAD == IRIVER_H10_PAD) + (CONFIG_KEYPAD == IRIVER_H10_PAD)|| \ + (CONFIG_KEYPAD == SANSA_E200_PAD) #define ENEMY_MISSILE_SURVIVAL_LENGTH 140 #define MISSILE_SURVIVAL_LENGTH 40 #define ASTEROID_SPEED 15 @@ -595,7 +596,7 @@ void create_trail_blaze(int colour, struct Point* position) yadd = ship.position.y; } - //give the point a random countdown timer, so they dissapears at different times + /* give the point a random countdown timer, so they dissapears at different times */ tpoint = trailPoints; n = NUM_TRAIL_POINTS; while(--n) @@ -603,9 +604,9 @@ void create_trail_blaze(int colour, struct Point* position) if(tpoint->alive <= 0 && numtoadd) { numtoadd--; - //take a random x point anywhere between - //bottom two points of ship. - tpoint->position.x = (ship.vertices[2].x + (rb->rand()%18000)-9000) + position->x; //ship.position.x; + /* take a random x point anywhere between bottom two points of ship. */ + /* ship.position.x; */ + tpoint->position.x = (ship.vertices[2].x + (rb->rand()%18000)-9000) + position->x; tpoint->position.y = (ship.vertices[2].y + (rb->rand()%18000)-9000) + position->y; switch(colour) @@ -643,9 +644,9 @@ void create_trail_blaze(int colour, struct Point* position) tpoint->dec = 4; break; } - //add a proportional bit to the x and y based on dx and dy + /* add a proportional bit to the x and y based on dx and dy */ - //give the points a speed based on direction of travel - i.e. opposite + /* give the points a speed based on direction of travel - i.e. opposite */ tpoint->position.dx += position->dx; tpoint->position.dy += position->dy; @@ -653,17 +654,17 @@ void create_trail_blaze(int colour, struct Point* position) } tpoint++; } - //find a space in the array of trail_points that is NULL or DEAD or whatever. - //and place this one here. + /* find a space in the array of trail_points that is NULL or DEAD or whatever. + and place this one here. */ } void draw_trail_blaze(void) { struct TrailPoint* tpoint; - //loop through, if alive then move and draw. - //when drawn, countdown it's timer. - //if zero kill it! + /* loop through, if alive then move and draw. + when drawn, countdown it's timer. + if zero kill it! */ tpoint = trailPoints; int n = NUM_TRAIL_POINTS; @@ -677,7 +678,7 @@ void draw_trail_blaze(void) move_point(&(tpoint->position)); } #ifdef HAVE_LCD_COLOR - //intensity = tpoint->alive/2; + /* intensity = tpoint->alive/2; */ if(tpoint->r>0)tpoint->r-=tpoint->dec; if(tpoint->g>0)tpoint->g-=tpoint->dec; if(tpoint->b>0)tpoint->b-=tpoint->dec; @@ -875,8 +876,8 @@ void draw_and_move_enemy(void) else { - //animate_and_draw_explosion(enemy.vertices, NUM_ENEMY_VERTICES, - // enemy_x, enemy.position.y/SCALE); + /* animate_and_draw_explosion(enemy.vertices, NUM_ENEMY_VERTICES, + enemy_x, enemy.position.y/SCALE); */ if(game_state != PAUSE_MODE) { enemy.explode_countdown--; @@ -1002,7 +1003,7 @@ bool is_point_within_enemy(struct Point* point) current_score += 5; /*enemy_missile.survived = 0;*/ enemy.explode_countdown = EXPLOSION_LENGTH; - // initialise_explosion(enemy.vertices, NUM_ENEMY_VERTICES); + /* initialise_explosion(enemy.vertices, NUM_ENEMY_VERTICES); */ create_trail_blaze(ENEMY_EXPLOSION_COLOUR, &enemy.position); return true; } @@ -1092,7 +1093,7 @@ void check_collisions(void) { /*blow up ship*/ ship.explode_countdown = EXPLOSION_LENGTH; - // initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); + /* initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); */ create_trail_blaze(SHIP_EXPLOSION_COLOUR, &ship.position); } @@ -1130,7 +1131,7 @@ void check_collisions(void) if(is_point_within_enemy(&ship.position)) { ship.explode_countdown = EXPLOSION_LENGTH; - //initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); + /* initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); */ create_trail_blaze(SHIP_EXPLOSION_COLOUR, &ship.position); create_trail_blaze(ENEMY_EXPLOSION_COLOUR, &enemy.position); } @@ -1157,7 +1158,7 @@ void check_collisions(void) enemy_missile.position.y - ship.position.y)) { ship.explode_countdown = EXPLOSION_LENGTH; - //initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); + /* initialise_explosion(ship.vertices, NUM_SHIP_VERTICES); */ create_trail_blaze(SHIP_EXPLOSION_COLOUR, &ship.position); enemy_missile.survived = 0; enemy_missile.position.x = enemy_missile.position.y = 0; @@ -1304,7 +1305,11 @@ void draw_lives(void) { int n; int px = (LCD_WIDTH - num_lives*4 - 1); + #if(LARGE_LCD) + int py = (LCD_HEIGHT-6); + #else int py = (LCD_HEIGHT-4); + #endif SET_FG(COL_PLAYER); @@ -1312,7 +1317,11 @@ void draw_lives(void) while(--n) { draw_polygon(lives_points, px, py, NUM_SHIP_VERTICES); + #if(LARGE_LCD) + px += 8; + #else px += 6; + #endif } } @@ -1402,9 +1411,9 @@ void initialise_asteroid(struct Asteroid* asteroid, enum asteroid_type type) asteroid->radius += 6*SCALE; if(asteroid->type == SMALL) - asteroid->radius /= 3;//2 + asteroid->radius /= 3;/*2*/ else if(asteroid->type == LARGE) - asteroid->radius += 3*SCALE;//2 + asteroid->radius += 3*SCALE;/*2*/ b = true; while(b) { @@ -1520,9 +1529,9 @@ void draw_and_move_ship(void) } else { - // animate_and_draw_explosion(ship.vertices, NUM_SHIP_VERTICES, - // ship.position.x/SCALE, - // ship.position.y/SCALE); + /* animate_and_draw_explosion(ship.vertices, NUM_SHIP_VERTICES, + ship.position.x/SCALE, + ship.position.y/SCALE); */ if(game_state != PAUSE_MODE) { ship.explode_countdown--; @@ -1550,8 +1559,9 @@ void thrust_ship(void) { ship.position.dx += ( ship.vertices[0].x - ship.vertices[2].x )/20; ship.position.dy += ( ship.vertices[0].y - ship.vertices[2].y )/20; - /*if dx and dy are below a certain threshold, then set 'em to 0*/ - //but to do this we need to ascertain if the spacehip as moved on screen for more than a certain amount. + /*if dx and dy are below a certain threshold, then set 'em to 0 + but to do this we need to ascertain if the spacehip as moved on screen + for more than a certain amount. */ create_trail_blaze(THRUST_COLOUR, &ship.position); } @@ -1620,10 +1630,10 @@ void draw_and_move_asteroids(void) } else if(asteroid->explode_countdown) { - // animate_and_draw_explosion(asteroid->vertices, - // NUM_ASTEROID_VERTICES, - // asteroid->position.x/SCALE, - // asteroid->position.y/SCALE); + /* animate_and_draw_explosion(asteroid->vertices, + NUM_ASTEROID_VERTICES, + asteroid->position.x/SCALE, + asteroid->position.y/SCALE); */ asteroid->explode_countdown--; } } @@ -1655,7 +1665,8 @@ void create_stars(void) } - //give the point a random countdown timer, so they dissapears at different times + /* give the point a random countdown timer, so they dissapears at different + times */ tpoint = trailPoints; n = NUM_TRAIL_POINTS; while(--n) diff --git a/apps/plugins/sudoku/SOURCES b/apps/plugins/sudoku/SOURCES index 8b344bd..7cce555 100644 --- a/apps/plugins/sudoku/SOURCES +++ b/apps/plugins/sudoku/SOURCES @@ -1,5 +1,3 @@ -#if !defined(SANSA_E200) sudoku.c generator.c templates.c -#endif diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 9a3a147..218a544 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -129,8 +129,7 @@ static const char default_game[9][9] = #define CELL_WIDTH 12 #define CELL_HEIGHT 12 -#elif ((LCD_HEIGHT==176) && (LCD_WIDTH==220)) || \ - ((LCD_HEIGHT==220) && (LCD_WIDTH==176)) +#elif ((LCD_HEIGHT==176) && (LCD_WIDTH==220)) /* Iriver h300, iPod Color/Photo - 220x176, 9 cells @ 16x16 with 14 border lines */ /* Internal dimensions of a cell */ @@ -151,7 +150,14 @@ static const char default_game[9][9] = #else /* Vertical layout, scratchpad at the bottom */ #define VERTICAL_LAYOUT -#if (LCD_HEIGHT>=320) && (LCD_WIDTH>=240) +#if ((LCD_HEIGHT==220) && (LCD_WIDTH==176)) +/* e200, 9 cells @ 16x16 with 14 border lines */ + +/* Internal dimensions of a cell */ +#define CELL_WIDTH 16 +#define CELL_HEIGHT 16 + +#elif (LCD_HEIGHT>=320) && (LCD_WIDTH>=240) /* Gigabeat - 240x320, 9 cells @ 24x24 with 14 border lines */ /* Internal dimensions of a cell */ diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index 2628e32..04923be 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -116,8 +116,9 @@ #define SUDOKU_BUTTON_DOWN BUTTON_DOWN #define SUDOKU_BUTTON_LEFT BUTTON_LEFT #define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT -#define SUDOKU_BUTTON_TOGGLE BUTTON_SELECT -#define SUDOKU_BUTTON_MENU (BUTTON_SELECT|BUTTON_REPEAT) +#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_SCROLL_UP +#define SUDOKU_BUTTON_TOGGLE BUTTON_SCROLL_DOWN +#define SUDOKU_BUTTON_MENU BUTTON_SELECT #define SUDOKU_BUTTON_POSSIBLE BUTTON_REC #elif diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 5afefb7..b301a8a 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -200,6 +200,11 @@ PLUGIN_HEADER #define ARGH_SIZE 6 #define SPEED 4 #define MAX_WORM_SEGMENTS 512 +#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220) +#define FOOD_SIZE 5 +#define ARGH_SIZE 6 +#define SPEED 4 +#define MAX_WORM_SEGMENTS 512 #elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) #define FOOD_SIZE 7 #define ARGH_SIZE 8 |