Chessbox: ported to c200, also simplify the tile size calculation (thanks to Jens). Just retrieve it from the assigned bmp (same as e.g. Sudoku does), so that there's no need to check for lcd resolution in two different places. Update the manual.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15202 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3ab686e07e
commit
df1f0d6429
7 changed files with 42 additions and 35 deletions
|
@ -16,9 +16,7 @@ rockboy
|
|||
|
||||
/* For all targets with a bitmap display */
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#ifndef SANSA_C200
|
||||
chessbox
|
||||
#endif
|
||||
sudoku
|
||||
reversi
|
||||
#endif
|
||||
|
|
|
@ -103,10 +103,10 @@ chessbox_pieces.240x240x16.bmp
|
|||
chessbox_pieces.176x176x16.bmp
|
||||
#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128) & (LCD_DEPTH > 1)
|
||||
chessbox_pieces.128x128x2.bmp
|
||||
#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128)
|
||||
chessbox_pieces.128x128x1.bmp
|
||||
#elif (LCD_WIDTH >= 104) && (LCD_HEIGHT >= 104) & (LCD_DEPTH > 1)
|
||||
chessbox_pieces.104x104x2.bmp
|
||||
#elif (LCD_WIDTH >= 80) && (LCD_HEIGHT >= 80) & (LCD_DEPTH > 1)
|
||||
chessbox_pieces.80x80x16.bmp
|
||||
#elif (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) & (LCD_DEPTH == 1)
|
||||
chessbox_pieces.80x64x1.bmp
|
||||
#elif (LCD_WIDTH >= 64) && (LCD_HEIGHT >= 64)
|
||||
|
|
BIN
apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmp
Normal file
BIN
apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
|
@ -8,7 +8,8 @@
|
|||
#
|
||||
|
||||
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
|
||||
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
|
||||
-I$(BUILDDIR)/pluginbitmaps -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) \
|
||||
-I$(BUILDDIR)
|
||||
CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
|
||||
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
|
||||
|
||||
|
|
|
@ -196,37 +196,29 @@ PLUGIN_HEADER
|
|||
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
|
||||
|
||||
#elif CONFIG_KEYPAD == SANSA_C200_PAD
|
||||
#define CB_SELECT BUTTON_SELECT
|
||||
#define CB_UP BUTTON_UP
|
||||
#define CB_DOWN BUTTON_DOWN
|
||||
#define CB_LEFT BUTTON_LEFT
|
||||
#define CB_RIGHT BUTTON_RIGHT
|
||||
#define CB_PLAY BUTTON_VOL_UP
|
||||
#define CB_LEVEL BUTTON_REC
|
||||
#define CB_MENU BUTTON_POWER
|
||||
|
||||
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
|
||||
|
||||
#else
|
||||
#error CHESSBOX: Unsupported keypad
|
||||
#endif
|
||||
|
||||
/* use 30x30 tiles */
|
||||
#if (LCD_HEIGHT >= 240) && (LCD_WIDTH >= 240)
|
||||
#define TILE_WIDTH 30
|
||||
#define TILE_HEIGHT 30
|
||||
/* use 22x22 tiles */
|
||||
#elif (LCD_HEIGHT >= 176) && (LCD_WIDTH >= 176)
|
||||
#define TILE_WIDTH 22
|
||||
#define TILE_HEIGHT 22
|
||||
/* use 16x16 tiles */
|
||||
#elif (LCD_HEIGHT >= 128) && (LCD_WIDTH >= 128)
|
||||
#define TILE_WIDTH 16
|
||||
#define TILE_HEIGHT 16
|
||||
/* use 13x13 tiles */
|
||||
#elif (LCD_HEIGHT >= 104) && (LCD_WIDTH >= 104)
|
||||
#define TILE_WIDTH 13
|
||||
#define TILE_HEIGHT 13
|
||||
/* use 10x8 tiles , only for the archoses */
|
||||
#elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112)
|
||||
#define TILE_WIDTH 10
|
||||
#define TILE_HEIGHT 8
|
||||
/* use 8x8 tiles */
|
||||
#elif (LCD_HEIGHT >= 64) && (LCD_WIDTH >= 64)
|
||||
#define TILE_WIDTH 8
|
||||
#define TILE_HEIGHT 8
|
||||
#else
|
||||
#error CHESSBOX: Unsupported LCD
|
||||
#endif
|
||||
/* Tile size defined by the assigned bitmap */
|
||||
#include "chessbox_pieces.h"
|
||||
#define TILE_WIDTH BMPWIDTH_chessbox_pieces
|
||||
#define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26)
|
||||
|
||||
/* Calculate Offsets */
|
||||
#define XOFS ((LCD_WIDTH-8*TILE_WIDTH)/2)
|
||||
|
|
|
@ -184,6 +184,21 @@
|
|||
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
|
||||
|
||||
#elif CONFIG_KEYPAD == SANSA_C200_PAD
|
||||
#define CB_SELECT BUTTON_SELECT
|
||||
#define CB_UP BUTTON_UP
|
||||
#define CB_DOWN BUTTON_DOWN
|
||||
#define CB_LEFT BUTTON_LEFT
|
||||
#define CB_RIGHT BUTTON_RIGHT
|
||||
#define CB_PLAY BUTTON_VOL_UP
|
||||
#define CB_LEVEL BUTTON_REC
|
||||
#define CB_MENU BUTTON_POWER
|
||||
|
||||
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
|
||||
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
|
||||
|
||||
#else
|
||||
#error CHESSBOX: Unsupported keypad
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@ the game.
|
|||
& Move the cursor\\
|
||||
\opt{RECORDER_PAD}{\ButtonPlay}
|
||||
\opt{ONDIO_PAD}{\ButtonMenu}
|
||||
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IPOD_4G_PAD,IPOD_3G_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,GIGABEAT_PAD}
|
||||
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IPOD_4G_PAD,IPOD_3G_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD,GIGABEAT_PAD}
|
||||
{\ButtonSelect}
|
||||
\opt{IRIVER_H10_PAD}{\ButtonRew}
|
||||
& Select / Move piece\\
|
||||
|
@ -37,7 +37,7 @@ the game.
|
|||
\opt{ONDIO_PAD}{\ButtonMenu+\ButtonOff}
|
||||
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode}
|
||||
\opt{IPOD_4G_PAD,IPOD_3G_PAD}{\ButtonSelect+\ButtonRight}
|
||||
\opt{IAUDIO_X5_PAD,SANSA_E200_PAD}{\ButtonRec}
|
||||
\opt{IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD}{\ButtonRec}
|
||||
\opt{IRIVER_H10_PAD}{\ButtonFF}
|
||||
\opt{GIGABEAT_PAD}{\ButtonMenu}
|
||||
& Change level\\
|
||||
|
@ -46,11 +46,12 @@ the game.
|
|||
\opt{IPOD_4G_PAD,IPOD_3G_PAD}{\ButtonSelect+\ButtonPlay}
|
||||
\opt{IAUDIO_X5_PAD,IRIVER_H10_PAD}{\ButtonPlay}
|
||||
\opt{SANSA_E200_PAD}{\ButtonSelect+\ButtonRight}
|
||||
\opt{SANSA_C200_PAD}{\ButtonVolUp}
|
||||
\opt{GIGABEAT_PAD}{\ButtonPower}
|
||||
& Force play\\
|
||||
\opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonOff}
|
||||
\opt{IPOD_4G_PAD,IPOD_3G_PAD}{\ButtonSelect+\ButtonMenu}
|
||||
\opt{IAUDIO_X5_PAD,IRIVER_H10_PAD,SANSA_E200_PAD}{\ButtonPower}
|
||||
\opt{IAUDIO_X5_PAD,IRIVER_H10_PAD,SANSA_E200_PAD,SANSA_C200_PAD}{\ButtonPower}
|
||||
\opt{GIGABEAT_PAD}{\ButtonA}
|
||||
& Show the menu\\
|
||||
\end{btnmap}
|
||||
|
|
Loading…
Reference in a new issue