summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-01-20 00:45:38 +0000
committerJens Arnold <amiconn@rockbox.org>2006-01-20 00:45:38 +0000
commitcd7779c229f89f732869c6b7228833ae859aca88 (patch)
tree019500b62d11bc865a758af095be3cb748b58fce /apps/plugins
parent3249f3eb87f2b4b406bf7aead50adeb6a4e4e52e (diff)
Sudoku: Fixed drawing of scratchpad on archos LCD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8395 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/sudoku.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/apps/plugins/sudoku.c b/apps/plugins/sudoku.c
index b6df4e1235..f6342c44d1 100644
--- a/apps/plugins/sudoku.c
+++ b/apps/plugins/sudoku.c
@@ -2228,25 +2228,36 @@ void display_board(struct sudoku_state_t* state)
rb->lcd_vline(XOFSSCRATCHPAD,YOFS,YOFS+BOARD_HEIGHT-1);
rb->lcd_vline(XOFSSCRATCHPAD+CELL_WIDTH+1,YOFS,YOFS+BOARD_HEIGHT-1);
for (r=0;r<9;r++) {
-#if (LCD_HEIGHT==128) || (LCD_HEIGHT==176)
+#if LCD_HEIGHT > 64
+ /* Large targets - draw single/double lines */
+ rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
+ YOFS+cellypos[r]-1);
+ if ((r % 3)==0)
+ rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
+ YOFS+cellypos[r]-2);
+#elif LCD_HEIGHT == 64
+ /* Small targets - draw dotted/single lines */
+ if ((r % 3)==0) {
+ /* Solid Line */
rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
YOFS+cellypos[r]-1);
-#elif (LCD_HEIGHT==64)
+ } else {
+ /* Dotted line */
for (c=XOFSSCRATCHPAD;c<XOFSSCRATCHPAD+CELL_WIDTH+1;c+=2) {
rb->lcd_drawpixel(c,YOFS+cellypos[r]-1);
- }
+ }
+ }
#endif
- if ((r % 3)==0)
- rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
- YOFS+cellypos[r]-2);
if ((r>0) && state->possiblevals[state->y][state->x]&(1<<(r)))
rb->lcd_bitmap(num[r],XOFSSCRATCHPAD+1,YOFS+cellypos[r-1],
CELL_WIDTH,CELL_HEIGHT);
}
rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
YOFS+cellypos[8]+CELL_HEIGHT);
+#if LCD_HEIGHT > 64
rb->lcd_hline(XOFSSCRATCHPAD,XOFSSCRATCHPAD+CELL_WIDTH+1,
YOFS+cellypos[8]+CELL_HEIGHT+1);
+#endif
if (state->possiblevals[state->y][state->x]&(1<<(r)))
rb->lcd_bitmap(num[r],XOFSSCRATCHPAD+1,YOFS+cellypos[8],
CELL_WIDTH,CELL_HEIGHT);