summaryrefslogtreecommitdiffstats
path: root/uisimulator/common/lcd-playersim.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-19 19:38:45 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit0c4f89370d05056faa789aa9cabcccc4e509fb9f (patch)
tree6ddf7fff0a47564db41d39927ea1acbdb03e74ee /uisimulator/common/lcd-playersim.c
parent092c340a2062fa98b7387fc5fd63578ddae7d0b6 (diff)
downloadrockbox-0c4f89370d.tar.gz
rockbox-0c4f89370d.zip
[2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
Diffstat (limited to 'uisimulator/common/lcd-playersim.c')
-rw-r--r--uisimulator/common/lcd-playersim.c119
1 files changed, 0 insertions, 119 deletions
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c
deleted file mode 100644
index 14efded5d4..0000000000
--- a/uisimulator/common/lcd-playersim.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2002 by Alan Korr
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "config.h"
-#include "hwcompat.h"
-
-#include "lcd.h"
-#include "lcd-charcell.h"
-#include "kernel.h"
-#include "thread.h"
-#include <string.h>
-#include <stdlib.h>
-#include "debug.h"
-#include "system.h"
-
-#include "font-player.h"
-#include "lcd-playersim.h"
-
-/*** definitions ***/
-
-bool sim_lcd_framebuffer[SIM_LCD_HEIGHT][SIM_LCD_WIDTH];
-
-static int double_height = 1;
-
-void lcd_print_icon(int x, int icon_line, bool enable, char **icon)
-{
- int row = 0, col = 0; /* shut up gcc */
- int y = (ICON_HEIGHT+(CHAR_HEIGHT*2+2)*CHAR_PIXEL) * icon_line;
-
- y += BORDER_MARGIN;
- x += BORDER_MARGIN;
-
- for (; icon[row]; row++)
- {
- for (col = 0; icon[row][col]; col++)
- {
- switch (icon[row][col])
- {
- case '*':
- sim_lcd_framebuffer[y+row][x+col] = enable;
- break;
-
- case ' ':
- sim_lcd_framebuffer[y+row][x+col] = false;
- break;
- }
- }
- }
- sim_lcd_update_rect(x, y, col, row);
- /* icon drawing updates immediately */
-}
-
-void lcd_print_char(int x, int y, unsigned char ch)
-{
- int xpos = x * CHAR_WIDTH*CHAR_PIXEL;
- int ypos = y * CHAR_HEIGHT*CHAR_PIXEL + ICON_HEIGHT;
- int row, col, r, c;
-
- if (double_height > 1 && y == 1)
- return; /* only one row available if text is double height */
-
- for (row = 0; row < 7; row ++)
- {
- unsigned fontbitmap = (*font_player)[ch][row];
- int height = (row == 3) ? 1 : double_height;
-
- y = ypos + row * CHAR_PIXEL * double_height;
- for (col = 0; col < 5; col++)
- {
- bool fontbit = fontbitmap & (0x10 >> col);
-
- x = xpos + col * CHAR_PIXEL;
- for (r = 0; r < height * CHAR_PIXEL; r++)
- for (c = 0; c < CHAR_PIXEL; c++)
- sim_lcd_framebuffer[y+r][x+c] = fontbit;
- }
- }
- if (double_height > 1)
- {
- y = ypos + 15*CHAR_PIXEL;
- for (r = 0; r < CHAR_PIXEL; r++)
- for (c = 0; c < 5*CHAR_PIXEL; c++)
- sim_lcd_framebuffer[y+r][xpos+c] = false;
- }
-}
-
-void lcd_double_height(bool on)
-{
- int newval = (is_new_player() && on) ? 2 : 1;
-
- if (newval != double_height)
- {
- double_height = newval;
- lcd_update();
- }
-}
-
-void sim_lcd_define_pattern(int pat, const char *pattern)
-{
- if (pat < lcd_pattern_count)
- memcpy((*font_player)[pat], pattern, 7);
-}