Invadrox: Add support for 640x480 screens.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22151 a1c6a512-1295-4272-9138-f99709370657
|
@ -783,15 +783,14 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
|
||||
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
enum touchscreen_mode old_mode = touchscreen_get_mode();
|
||||
|
||||
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
|
||||
#endif
|
||||
|
||||
rc = hdr->entry_point(parameter);
|
||||
|
||||
/* Go back to the global setting in case the plugin changed it */
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
touchscreen_set_mode(old_mode);
|
||||
touchscreen_set_mode(global_settings.touch_mode);
|
||||
#endif
|
||||
|
||||
viewportmanager_set_statusbar(oldbars);
|
||||
|
|
|
@ -291,15 +291,15 @@ flipit_tokens.16x26x1.bmp
|
|||
|
||||
/* Invadrox */
|
||||
#if defined HAVE_LCD_COLOR
|
||||
#if LCD_WIDTH >= 480
|
||||
invadrox_aliens.24x24x16.bmp
|
||||
invadrox_alien_explode.13x7x16.bmp
|
||||
invadrox_ships.16x24x16.bmp
|
||||
invadrox_bombs.9x42x16.bmp
|
||||
invadrox_shield.22x16x16.bmp
|
||||
invadrox_ufo.16x7x16.bmp
|
||||
invadrox_ufo_explode.21x8x16.bmp
|
||||
invadrox_numbers.50x7x16.bmp
|
||||
#if LCD_WIDTH >= 640
|
||||
invadrox_alien_explode.37x20x16.bmp
|
||||
invadrox_aliens.68x68x16.bmp
|
||||
invadrox_ships.46x69x16.bmp
|
||||
invadrox_bombs.27x126x16.bmp
|
||||
invadrox_shield.64x47x16.bmp
|
||||
invadrox_ufo.46x20x16.bmp
|
||||
invadrox_ufo_explode.61x23x16.bmp
|
||||
invadrox_numbers.140x19x16.bmp
|
||||
#if LCD_WIDTH == 480
|
||||
invadrox_background.480x640x16.bmp
|
||||
#elif LCD_WIDTH == 640
|
||||
|
|
BIN
apps/plugins/bitmaps/native/invadrox_alien_explode.37x20x16.bmp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_aliens.68x68x16.bmp
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_background.480x640x16.bmp
Normal file
After Width: | Height: | Size: 900 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_background.640x480x16.bmp
Normal file
After Width: | Height: | Size: 900 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_bombs.27x126x16.bmp
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_numbers.140x19x16.bmp
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_shield.64x47x16.bmp
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_ships.46x69x16.bmp
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_ufo.46x20x16.bmp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
apps/plugins/bitmaps/native/invadrox_ufo_explode.61x23x16.bmp
Normal file
After Width: | Height: | Size: 4.2 KiB |
|
@ -29,6 +29,38 @@
|
|||
#include "lib/highscore.h"
|
||||
#include "lib/helper.h"
|
||||
|
||||
/* bitmaps */
|
||||
#include "pluginbitmaps/invadrox_background.h"
|
||||
|
||||
/* get dimensions for later use from the bitmaps */
|
||||
#include "pluginbitmaps/invadrox_aliens.h"
|
||||
#include "pluginbitmaps/invadrox_ships.h"
|
||||
#include "pluginbitmaps/invadrox_bombs.h"
|
||||
#include "pluginbitmaps/invadrox_alien_explode.h"
|
||||
#include "pluginbitmaps/invadrox_shield.h"
|
||||
#include "pluginbitmaps/invadrox_ufo.h"
|
||||
#include "pluginbitmaps/invadrox_ufo_explode.h"
|
||||
#include "pluginbitmaps/invadrox_numbers.h"
|
||||
#include "pluginbitmaps/invadrox_fire.h"
|
||||
#define ALIEN_WIDTH (BMPWIDTH_invadrox_aliens/2)
|
||||
#define ALIEN_HEIGHT (BMPHEIGHT_invadrox_aliens/3)
|
||||
#define SHIP_WIDTH BMPWIDTH_invadrox_ships
|
||||
#define SHIP_HEIGHT (BMPHEIGHT_invadrox_ships/3)
|
||||
#define BOMB_WIDTH (BMPWIDTH_invadrox_bombs/3)
|
||||
#define BOMB_HEIGHT (BMPHEIGHT_invadrox_bombs/6)
|
||||
#define ALIEN_EXPLODE_WIDTH BMPWIDTH_invadrox_alien_explode
|
||||
#define ALIEN_EXPLODE_HEIGHT BMPHEIGHT_invadrox_alien_explode
|
||||
#define SHIELD_WIDTH BMPWIDTH_invadrox_shield
|
||||
#define SHIELD_HEIGHT BMPHEIGHT_invadrox_shield
|
||||
#define UFO_WIDTH BMPWIDTH_invadrox_ufo
|
||||
#define UFO_HEIGHT BMPHEIGHT_invadrox_ufo
|
||||
#define UFO_EXPLODE_WIDTH BMPWIDTH_invadrox_ufo_explode
|
||||
#define UFO_EXPLODE_HEIGHT BMPHEIGHT_invadrox_ufo_explode
|
||||
#define NUMBERS_WIDTH (BMPWIDTH_invadrox_numbers/10)
|
||||
#define FONT_HEIGHT BMPHEIGHT_invadrox_numbers
|
||||
#define FIRE_WIDTH BMPWIDTH_invadrox_fire
|
||||
#define FIRE_HEIGHT BMPHEIGHT_invadrox_fire
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
/* Original graphics is only 1bpp so it should be portable
|
||||
|
@ -186,8 +218,30 @@ PLUGIN_HEADER
|
|||
#define MAX_LIVES 8
|
||||
|
||||
|
||||
/* m:robe 500 defines */
|
||||
#if ((LCD_WIDTH == 640) && (LCD_HEIGHT == 480)) || \
|
||||
((LCD_WIDTH == 480) && (LCD_HEIGHT == 640))
|
||||
|
||||
/* Original arcade game size 224x240, 1bpp with
|
||||
* red overlay at top and green overlay at bottom.
|
||||
*
|
||||
* M:Robe 500: 640x480x16
|
||||
* ======================
|
||||
*/
|
||||
|
||||
#define ARCADISH_GRAPHICS
|
||||
#define PLAYFIELD_X 48
|
||||
#define SHIP_Y (PLAYFIELD_Y - 2 * SHIP_HEIGHT)
|
||||
#define ALIEN_START_Y (UFO_Y + ALIEN_HEIGHT)
|
||||
#define SCORENUM_X (PLAYFIELD_X + NUMBERS_WIDTH)
|
||||
#define SCORENUM_Y (SCORE_Y + FONT_HEIGHT + 2)
|
||||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 1 - 6 * NUMBERS_WIDTH - 5 * NUM_SPACING)
|
||||
#define SHIELD_Y (PLAYFIELD_Y - 5 * SHIP_HEIGHT)
|
||||
#define LIVES_X 10
|
||||
#define MAX_Y 18
|
||||
|
||||
/* iPod Video defines */
|
||||
#if (LCD_WIDTH == 320) && (LCD_HEIGHT == 240)
|
||||
#elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240)
|
||||
|
||||
/* Original arcade game size 224x240, 1bpp with
|
||||
* red overlay at top and green overlay at bottom.
|
||||
|
@ -226,10 +280,8 @@ PLUGIN_HEADER
|
|||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 1 - 6 * NUMBERS_WIDTH - 5 * NUM_SPACING)
|
||||
#define SHIELD_Y (PLAYFIELD_Y - 6 * SHIP_HEIGHT)
|
||||
#define LIVES_X 10
|
||||
#define MAX_X 95
|
||||
#define MAX_Y 18
|
||||
|
||||
|
||||
#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220)
|
||||
|
||||
/* Sandisk Sansa e200: 176x220x16
|
||||
|
@ -271,7 +323,6 @@ PLUGIN_HEADER
|
|||
#define SCORENUM_Y (SCORE_Y + 2 * FONT_HEIGHT)
|
||||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 1 - 6 * NUMBERS_WIDTH - 5 * NUM_SPACING)
|
||||
#define LIVES_X 8
|
||||
#define MAX_X 75
|
||||
#define MAX_Y 18
|
||||
|
||||
|
||||
|
@ -325,7 +376,6 @@ PLUGIN_HEADER
|
|||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 4 * NUMBERS_WIDTH - 3 * NUM_SPACING)
|
||||
#define SHIELD_Y (SHIP_Y - SHIP_HEIGHT - SHIELD_HEIGHT)
|
||||
#define LIVES_X 8
|
||||
#define MAX_X 75
|
||||
#define MAX_Y 18
|
||||
|
||||
#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128)
|
||||
|
@ -378,7 +428,6 @@ PLUGIN_HEADER
|
|||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 4 * NUMBERS_WIDTH - 3 * NUM_SPACING)
|
||||
#define SHIELD_Y (SHIP_Y - SHIP_HEIGHT - SHIELD_HEIGHT)
|
||||
#define LIVES_X 0
|
||||
#define MAX_X 75
|
||||
#define MAX_Y 18
|
||||
|
||||
|
||||
|
@ -421,7 +470,6 @@ PLUGIN_HEADER
|
|||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 1 - 6 * NUMBERS_WIDTH - 5 * NUM_SPACING)
|
||||
#define SHIELD_Y (PLAYFIELD_Y - 6 * SHIP_HEIGHT)
|
||||
#define LIVES_X 10
|
||||
#define MAX_X 95
|
||||
#define MAX_Y 18
|
||||
|
||||
#elif (LCD_WIDTH == 220) && (LCD_HEIGHT == 176)
|
||||
|
@ -458,7 +506,6 @@ PLUGIN_HEADER
|
|||
#define HISCORENUM_X (LCD_WIDTH - PLAYFIELD_X - 4 * NUMBERS_WIDTH - 3 * NUM_SPACING)
|
||||
#define SHIELD_Y (PLAYFIELD_Y - 5 * SHIP_HEIGHT)
|
||||
#define LIVES_X 8
|
||||
#define MAX_X 95
|
||||
#define MAX_Y 15
|
||||
|
||||
|
||||
|
@ -466,37 +513,7 @@ PLUGIN_HEADER
|
|||
#error INVADROX: Unsupported LCD type
|
||||
#endif
|
||||
|
||||
/* bitmaps */
|
||||
#include "pluginbitmaps/invadrox_background.h"
|
||||
|
||||
/* get dimensions for later use from the bitmaps */
|
||||
#include "pluginbitmaps/invadrox_aliens.h"
|
||||
#include "pluginbitmaps/invadrox_ships.h"
|
||||
#include "pluginbitmaps/invadrox_bombs.h"
|
||||
#include "pluginbitmaps/invadrox_alien_explode.h"
|
||||
#include "pluginbitmaps/invadrox_shield.h"
|
||||
#include "pluginbitmaps/invadrox_ufo.h"
|
||||
#include "pluginbitmaps/invadrox_ufo_explode.h"
|
||||
#include "pluginbitmaps/invadrox_numbers.h"
|
||||
#include "pluginbitmaps/invadrox_fire.h"
|
||||
#define ALIEN_WIDTH (BMPWIDTH_invadrox_aliens/2)
|
||||
#define ALIEN_HEIGHT (BMPHEIGHT_invadrox_aliens/3)
|
||||
#define SHIP_WIDTH BMPWIDTH_invadrox_ships
|
||||
#define SHIP_HEIGHT (BMPHEIGHT_invadrox_ships/3)
|
||||
#define BOMB_WIDTH (BMPWIDTH_invadrox_bombs/3)
|
||||
#define BOMB_HEIGHT (BMPHEIGHT_invadrox_bombs/6)
|
||||
#define ALIEN_EXPLODE_WIDTH BMPWIDTH_invadrox_alien_explode
|
||||
#define ALIEN_EXPLODE_HEIGHT BMPHEIGHT_invadrox_alien_explode
|
||||
#define SHIELD_WIDTH BMPWIDTH_invadrox_shield
|
||||
#define SHIELD_HEIGHT BMPHEIGHT_invadrox_shield
|
||||
#define UFO_WIDTH BMPWIDTH_invadrox_ufo
|
||||
#define UFO_HEIGHT BMPHEIGHT_invadrox_ufo
|
||||
#define UFO_EXPLODE_WIDTH BMPWIDTH_invadrox_ufo_explode
|
||||
#define UFO_EXPLODE_HEIGHT BMPHEIGHT_invadrox_ufo_explode
|
||||
#define NUMBERS_WIDTH (BMPWIDTH_invadrox_numbers/10)
|
||||
#define FONT_HEIGHT BMPHEIGHT_invadrox_numbers
|
||||
#define FIRE_WIDTH BMPWIDTH_invadrox_fire
|
||||
#define FIRE_HEIGHT BMPHEIGHT_invadrox_fire
|
||||
#define MAX_X ((LCD_WIDTH-LIVES_X*2-PLAYFIELD_X*2 - ALIEN_WIDTH)/2 - 1)
|
||||
|
||||
/* Defines common to each "graphic type" */
|
||||
#ifdef ARCADISH_GRAPHICS
|
||||
|
@ -569,8 +586,8 @@ PLUGIN_HEADER
|
|||
* Physical y is at y * ALIEN_HEIGHT
|
||||
*/
|
||||
struct alien {
|
||||
unsigned char x; /* x-coordinate (0 - 95) */
|
||||
unsigned char y; /* y-coordinate (0 - 18) */
|
||||
int x; /* x-coordinate (0 - 95) */
|
||||
int y; /* y-coordinate (0 - 18) */
|
||||
unsigned char type; /* 0 (Kang), 1 (Kodos), 2 (Serak) */
|
||||
unsigned char state; /* Dead, alive or bomber */
|
||||
};
|
||||
|
|