summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/SUBDIRS2
-rw-r--r--apps/plugins/bitmaps/native/SOURCES4
-rw-r--r--apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmpbin0 -> 8374 bytes
-rw-r--r--apps/plugins/chessbox/Makefile3
-rw-r--r--apps/plugins/chessbox/chessbox.c46
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.c15
-rw-r--r--manual/plugins/chessbox.tex7
7 files changed, 42 insertions, 35 deletions
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index 6cdc865..c01f760 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -16,9 +16,7 @@ rockboy
/* For all targets with a bitmap display */
#ifdef HAVE_LCD_BITMAP
-#ifndef SANSA_C200
chessbox
-#endif
sudoku
reversi
#endif
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 02eead8..aa36caa 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -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)
diff --git a/apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmp b/apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmp
new file mode 100644
index 0000000..67ef683
--- /dev/null
+++ b/apps/plugins/bitmaps/native/chessbox_pieces.80x80x16.bmp
Binary files differ
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile
index bb85d40..fd665b0 100644
--- a/apps/plugins/chessbox/Makefile
+++ b/apps/plugins/chessbox/Makefile
@@ -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
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index 2ff808d..9b0b79b 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -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)
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c
index 3780e32..ab32153 100644
--- a/apps/plugins/chessbox/chessbox_pgn.c
+++ b/apps/plugins/chessbox/chessbox_pgn.c
@@ -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
diff --git a/manual/plugins/chessbox.tex b/manual/plugins/chessbox.tex
index 57caad2..883cc64 100644
--- a/manual/plugins/chessbox.tex
+++ b/manual/plugins/chessbox.tex
@@ -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}