diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-07-27 05:08:26 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-07-27 05:08:26 +0000 |
commit | 4e16015427287381e4ef826a61118408c96658f0 (patch) | |
tree | 6aebf2fb83c6433fdf4022f7d48ec40d1e8f7997 /apps/plugins/reversi | |
parent | d884bbeb2e7dcfcf450bad9c6d9584d087bc0019 (diff) | |
download | rockbox-4e16015427287381e4ef826a61118408c96658f0.tar.gz 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/plugins/reversi')
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 90 |
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 | |||
54 | /* Thickness of the grid lines */ | 54 | /* Thickness of the grid lines */ |
55 | #define LINE_THCK 1 | 55 | #define LINE_THCK 1 |
56 | 56 | ||
57 | #if LCD_HEIGHT <= LCD_WIDTH /* Horizontal layout */ | 57 | #if (LCD_WIDTH/12) < (LCD_HEIGHT/10) |
58 | 58 | #define CELL_WIDTH (LCD_WIDTH/12) | |
59 | #if (LCD_HEIGHT==64) && (LCD_WIDTH==112) | 59 | #define CELL_HEIGHT (LCD_WIDTH/12) |
60 | /* Archos Recorders and Ondios - 112x64, 8 cells @ 8x6 with 9 border lines */ | ||
61 | |||
62 | /* Internal dimensions of a cell */ | ||
63 | #define CELL_WIDTH 8 | ||
64 | #define CELL_HEIGHT 6 | ||
65 | #define SMALL_BOARD | ||
66 | |||
67 | #elif (LCD_HEIGHT==64) && (LCD_WIDTH==128) | ||
68 | /* Sansa Clip and M200 - 128x64, 8 cells @ 9x9 with 9 border lines */ | ||
69 | |||
70 | /* Internal dimensions of a cell */ | ||
71 | #define CELL_WIDTH 6 | ||
72 | #define CELL_HEIGHT 6 | ||
73 | #define SMALL_BOARD | ||
74 | |||
75 | #elif (LCD_HEIGHT==80) && (LCD_WIDTH==132) | ||
76 | /* Sansa C200 - 132x80, 8 cells @ 9x9 with 9 border lines */ | ||
77 | |||
78 | /* Internal dimensions of a cell */ | ||
79 | #define CELL_WIDTH 8 | ||
80 | #define CELL_HEIGHT 8 | ||
81 | #define SMALL_BOARD | ||
82 | |||
83 | #elif (LCD_HEIGHT==96) && (LCD_WIDTH==128) \ | ||
84 | || (LCD_HEIGHT==110) && (LCD_WIDTH==138) \ | ||
85 | || (LCD_HEIGHT==128) && (LCD_WIDTH==128) | ||
86 | /* iAudio M3 - 138x110, 8 cells @ 10x10 with 9 border lines */ | ||
87 | /* iPod Mini - 138x110, 8 cells @ 10x10 with 9 border lines */ | ||
88 | /* iriver H10 5-6GB - 128x128, 8 cells @ 10x10 with 9 border lines */ | ||
89 | |||
90 | /* Internal dimensions of a cell */ | ||
91 | #define CELL_WIDTH 10 | ||
92 | #define CELL_HEIGHT 10 | ||
93 | |||
94 | #elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \ | ||
95 | || ((LCD_HEIGHT==132) && (LCD_WIDTH==176)) | ||
96 | /* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */ | ||
97 | /* iPod Nano - 176x132, 8 cells @ 12x12 with 9 border lines */ | ||
98 | |||
99 | /* Internal dimensions of a cell */ | ||
100 | #define CELL_WIDTH 12 | ||
101 | #define CELL_HEIGHT 12 | ||
102 | |||
103 | #elif ((LCD_HEIGHT==176) && (LCD_WIDTH==220)) || \ | ||
104 | ((LCD_HEIGHT==220) && (LCD_WIDTH==176)) | ||
105 | /* Iriver h300, iPod Color/Photo - 220x176, 8 cells @ 16x16 with 9 border lines */ | ||
106 | |||
107 | /* Internal dimensions of a cell */ | ||
108 | #define CELL_WIDTH 16 | ||
109 | #define CELL_HEIGHT 16 | ||
110 | |||
111 | #elif (LCD_HEIGHT>=240) && (LCD_WIDTH>=320) | ||
112 | /* iPod Video - 320x240, 8 cells @ 24x24 with 9 border lines */ | ||
113 | |||
114 | /* Internal dimensions of a cell */ | ||
115 | #define CELL_WIDTH 24 | ||
116 | #define CELL_HEIGHT 24 | ||
117 | |||
118 | #else | ||
119 | #error REVERSI: Unsupported LCD size | ||
120 | #endif | ||
121 | |||
122 | #else /* Vertical layout */ | ||
123 | #define VERTICAL_LAYOUT | ||
124 | |||
125 | #if (LCD_HEIGHT>=320) && (LCD_WIDTH>=240) | ||
126 | /* Gigabeat - 240x320, 8 cells @ 24x24 with 9 border lines */ | ||
127 | |||
128 | /* Internal dimensions of a cell */ | ||
129 | #define CELL_WIDTH 24 | ||
130 | #define CELL_HEIGHT 24 | ||
131 | |||
132 | #elif (LCD_HEIGHT>=220) && (LCD_WIDTH>=176) | ||
133 | /* e200 - 176x220, 8 cells @ 12x12 with 9 border lines */ | ||
134 | |||
135 | /* Internal dimensions of a cell */ | ||
136 | #define CELL_WIDTH 18 | ||
137 | #define CELL_HEIGHT 18 | ||
138 | |||
139 | #else | 60 | #else |
140 | #error REVERSI: Unsupported LCD size | 61 | #define CELL_WIDTH (LCD_HEIGHT/10) |
62 | #define CELL_HEIGHT (LCD_HEIGHT/10) | ||
141 | #endif | 63 | #endif |
142 | 64 | ||
143 | #endif /* Layout */ | ||
144 | |||
145 | 65 | ||
146 | /* Where the board begins */ | 66 | /* Where the board begins */ |
147 | #define XOFS 4 | 67 | #define XOFS 4 |