summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-07-27 05:08:26 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-07-27 05:08:26 +0000
commit4e16015427287381e4ef826a61118408c96658f0 (patch)
tree6aebf2fb83c6433fdf4022f7d48ec40d1e8f7997 /apps
parentd884bbeb2e7dcfcf450bad9c6d9584d087bc0019 (diff)
downloadrockbox-4e16015427287381e4ef826a61118408c96658f0.tar.gz
rockbox-4e16015427287381e4ef826a61118408c96658f0.tar.bz2
rockbox-4e16015427287381e4ef826a61118408c96658f0.zip
Reversi: Simplify screen sizing - now supports any resolution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22061 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/reversi/reversi-gui.c90
1 files changed, 5 insertions, 85 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c
index 2eb6f5bb79..0bf32daed0 100644
--- a/apps/plugins/reversi/reversi-gui.c
+++ b/apps/plugins/reversi/reversi-gui.c
@@ -54,94 +54,14 @@ PLUGIN_HEADER
/* Thickness of the grid lines */
#define LINE_THCK 1
-#if LCD_HEIGHT <= LCD_WIDTH /* Horizontal layout */
-
-#if (LCD_HEIGHT==64) && (LCD_WIDTH==112)
-/* Archos Recorders and Ondios - 112x64, 8 cells @ 8x6 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 8
-#define CELL_HEIGHT 6
-#define SMALL_BOARD
-
-#elif (LCD_HEIGHT==64) && (LCD_WIDTH==128)
-/* Sansa Clip and M200 - 128x64, 8 cells @ 9x9 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 6
-#define CELL_HEIGHT 6
-#define SMALL_BOARD
-
-#elif (LCD_HEIGHT==80) && (LCD_WIDTH==132)
-/* Sansa C200 - 132x80, 8 cells @ 9x9 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 8
-#define CELL_HEIGHT 8
-#define SMALL_BOARD
-
-#elif (LCD_HEIGHT==96) && (LCD_WIDTH==128) \
- || (LCD_HEIGHT==110) && (LCD_WIDTH==138) \
- || (LCD_HEIGHT==128) && (LCD_WIDTH==128)
-/* iAudio M3 - 138x110, 8 cells @ 10x10 with 9 border lines */
-/* iPod Mini - 138x110, 8 cells @ 10x10 with 9 border lines */
-/* iriver H10 5-6GB - 128x128, 8 cells @ 10x10 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 10
-#define CELL_HEIGHT 10
-
-#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \
- || ((LCD_HEIGHT==132) && (LCD_WIDTH==176))
-/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
-/* iPod Nano - 176x132, 8 cells @ 12x12 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 12
-#define CELL_HEIGHT 12
-
-#elif ((LCD_HEIGHT==176) && (LCD_WIDTH==220)) || \
- ((LCD_HEIGHT==220) && (LCD_WIDTH==176))
-/* Iriver h300, iPod Color/Photo - 220x176, 8 cells @ 16x16 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 16
-#define CELL_HEIGHT 16
-
-#elif (LCD_HEIGHT>=240) && (LCD_WIDTH>=320)
-/* iPod Video - 320x240, 8 cells @ 24x24 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 24
-#define CELL_HEIGHT 24
-
-#else
- #error REVERSI: Unsupported LCD size
-#endif
-
-#else /* Vertical layout */
-#define VERTICAL_LAYOUT
-
-#if (LCD_HEIGHT>=320) && (LCD_WIDTH>=240)
-/* Gigabeat - 240x320, 8 cells @ 24x24 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 24
-#define CELL_HEIGHT 24
-
-#elif (LCD_HEIGHT>=220) && (LCD_WIDTH>=176)
-/* e200 - 176x220, 8 cells @ 12x12 with 9 border lines */
-
-/* Internal dimensions of a cell */
-#define CELL_WIDTH 18
-#define CELL_HEIGHT 18
-
+#if (LCD_WIDTH/12) < (LCD_HEIGHT/10)
+#define CELL_WIDTH (LCD_WIDTH/12)
+#define CELL_HEIGHT (LCD_WIDTH/12)
#else
- #error REVERSI: Unsupported LCD size
+#define CELL_WIDTH (LCD_HEIGHT/10)
+#define CELL_HEIGHT (LCD_HEIGHT/10)
#endif
-#endif /* Layout */
-
/* Where the board begins */
#define XOFS 4