Reorganize repository structure

This commit is contained in:
Telekatz 2017-07-01 22:09:52 +02:00
parent f2259c5424
commit 3c44927e0a
364 changed files with 0 additions and 14028 deletions

BIN
boop/display/GrayScaler.exe Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

1
boop/display/Make.conf Normal file
View file

@ -0,0 +1 @@
THUMBSRCS := lcd.c fonty.c drawDigit.c drawIcon.c backlight.c

113
boop/display/backlight.c Normal file
View file

@ -0,0 +1,113 @@
/*
backlight.c - lcd backlight control
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lpc2220.h"
#include "timerfuncs.h"
#include "backlight.h"
// backlight PWM is done in soundirq
// backlight timing is done by timer functions
extern volatile unsigned char bl_val;
unsigned char bl_max;
unsigned int bl_cb;
unsigned char direction;
unsigned char bl_speed; // n*5 ms between two steps of brightness
unsigned int bl_timeout;
void autoBL(unsigned int cb)
{
switch(direction)
{
case 0:
if(bl_val < bl_max)
{
bl_val++;
}
else
{
direction = 1;
setCBIntervall(bl_cb, bl_timeout);
}
break;
case 1:
direction = 2;
setCBIntervall(bl_cb, bl_speed);
break;
case 2:
if(bl_val > 0x00)
{
bl_val--;
}
else
{
direction = 0;
stopCB(bl_cb);
}
break;
}
}
// adds function autoBL to timer
// initialises parameters // TODO: vgl. load_setting (settingsmenu.c)
void initBacklight(void)
{
direction = 1;
bl_speed = 2;
bl_timeout = 5000;
bl_max = 63;
bl_cb = addTimerCB(autoBL, bl_timeout);
startCB(bl_cb);
}
// set new brightness and set up fading and timout
void setBacklight(unsigned char level)
{
if(level == BL_AUTO)
{
stopCB(bl_cb);
direction = 0;
setCBIntervall(bl_cb, bl_speed);
startCB(bl_cb);
}
else if(level < BL_AUTO)
{
stopCB(bl_cb);
bl_val = level;
direction = 1;
setCBIntervall(bl_cb, bl_timeout);
startCB(bl_cb);
}
}
void setBLSpeed(unsigned char s)
{
if(s > 0)
bl_speed = s;
}
void setBLTimeout(unsigned int t)
{
if(t > 0)
bl_timeout = t;
}

29
boop/display/backlight.h Normal file
View file

@ -0,0 +1,29 @@
/*
backlight.h - lcd backlight control
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BACKLIGHT_H
#define BACKLIGHT_H
#define BL_OFF 0x00
#define BL_AUTO 0x40
#define BL_ON 0x80
void initBacklight(void);
void setBacklight(unsigned char level);
#endif

2592
boop/display/boop_logo Normal file

File diff suppressed because it is too large Load diff

127
boop/display/drawDigit.c Normal file
View file

@ -0,0 +1,127 @@
/**********************************************************************
@file drawDigit.c
@brief Draw a scalable 7-segment digit
-----------------------------------------------------------------------
@author 2010 Roman Steiger
LeoTheLoewe [at] gmx [dot] de
-----------------------------------------------------------------------
Following compile flags are usable:
-----------------------------------------------------------------------
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
@History
1.00 10012010 RSt Creation
@end
***********************************************************************/
#include "global.h"
#include "lcd.h"
#include "drawDigit.h"
// |<- w ->|
// | |
// |d|1| w1|1|d|
// ___ ______
// _ |_a_| _ _2_ ^
// | | | | |
// d | | f h1
// |_| ___ |_| ___ h
// _ |_b_| _ 1
// | | | |
// e | | g |
// |_| ___ |_| v
// |_c_| _2____
//
#define DIGIT_SEG_A _BV (0)
#define DIGIT_SEG_B _BV (1)
#define DIGIT_SEG_C _BV (2)
#define DIGIT_SEG_D _BV (3)
#define DIGIT_SEG_E _BV (4)
#define DIGIT_SEG_F _BV (5)
#define DIGIT_SEG_G _BV (6)
#define DIGIT_SEG_H _BV (7)
const unsigned char digitSegPattern [] =
{
/* 0 */ DIGIT_SEG_A | DIGIT_SEG_C | DIGIT_SEG_D | DIGIT_SEG_E | DIGIT_SEG_F | DIGIT_SEG_G,
/* 1 */ DIGIT_SEG_F | DIGIT_SEG_G,
/* 2 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_E | DIGIT_SEG_F ,
/* 3 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_F | DIGIT_SEG_G,
/* 4 */ DIGIT_SEG_B | DIGIT_SEG_D | DIGIT_SEG_F | DIGIT_SEG_G,
/* 5 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_D | DIGIT_SEG_G,
/* 6 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_D | DIGIT_SEG_E | DIGIT_SEG_G,
/* 7 */ DIGIT_SEG_A | DIGIT_SEG_F | DIGIT_SEG_G,
/* 8 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_D | DIGIT_SEG_E | DIGIT_SEG_F | DIGIT_SEG_G,
/* 9 */ DIGIT_SEG_A | DIGIT_SEG_B | DIGIT_SEG_C | DIGIT_SEG_D | DIGIT_SEG_F | DIGIT_SEG_G
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void drawDigit (unsigned char x, unsigned char y,
unsigned char w, unsigned char h,
unsigned char digit, unsigned char d, unsigned char c, unsigned char m)
{
char w1 = w - 2*d - 2;
char h1 = (h - 5) / 2;
unsigned char i, mode, pattern;
pattern = 0;
if (digit <= 9)
pattern = digitSegPattern [digit];
w1 = max (w1, 3);
h1 = max (h1, 3);
if (!d)
d = DIGIT_BAR_WIDTH;
for (i = 0; i < 3; i++)
{
mode = DRAW_ERASE;
if (pattern & _BV (i+0))
mode = m;
draw_block (x + d+1, y + i*(h1+1),
w1, d,
c, mode);
}
for (i = 0; i < 2; i++)
{
mode = DRAW_ERASE;
if (pattern & _BV (i+3))
mode = m;
draw_block (x, y + d-1 + i*(h1+1),
d, h1,
c, mode);
}
for (i = 0; i < 2; i++)
{
mode = DRAW_ERASE;
if (pattern & _BV (i+5))
mode = m;
draw_block (x + d + 1 + w1 + 1, y + d-1 + i*(h1+1),
d, h1,
c, mode);
}
} // drawDigit
//-----------------------------------------------------------------------------

68
boop/display/drawDigit.h Normal file
View file

@ -0,0 +1,68 @@
/**********************************************************************
@file drawDigit.h
@brief Draw a scalable 7-segment digit
-----------------------------------------------------------------------
@author 2010 Roman Steiger
LeoTheLoewe [at] gmx [dot] de
-----------------------------------------------------------------------
Following compile flags are usable:
-----------------------------------------------------------------------
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
@History
1.00 10012010 RSt Creation
@end
***********************************************************************/
#ifndef __DRAW_DIGIT_H__
#define __DRAW_DIGIT_H__
#include "global.h"
#include "lcd.h"
#ifndef DIGIT_BAR_WIDTH
#define DIGIT_BAR_WIDTH 3
#endif
// |<- w ->|
// | |
// |d|1| w1|1|d|
// ___ ______
// _ |_a_| _ _2_ ^
// | | | | |
// d | | f h1
// |_| ___ |_| ___ h
// _ |_b_| _ 1
// | | | |
// e | | g |
// |_| ___ |_| v
// |_c_| _2____
//
//-----------------------------------------------------------------------------
void drawDigit (unsigned char x, unsigned char y,
unsigned char w, unsigned char h,
unsigned char digit, unsigned char d, unsigned char c, unsigned char m);
//-----------------------------------------------------------------------------
#endif // #ifndef __DRAW_DIGIT_H__

363
boop/display/drawIcon.c Normal file
View file

@ -0,0 +1,363 @@
/**********************************************************************
@file drawIcon.c
@brief Draw Black/White and Gray scale icons with or without
Alpha channel (Transparency)
-----------------------------------------------------------------------
@author 2010 Roman Steiger
LeoTheLoewe [at] gmx [dot] de
-----------------------------------------------------------------------
Following compile flags are usable:
-----------------------------------------------------------------------
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
@History
1.00 20012010 RSt Creation
@end
***********************************************************************/
#include "global.h"
#include "lcd.h"
#include "icon.h"
//-----------------------------------------------------------------------------
// Internally used functions
static void _drawGray (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char m);
static void _drawBlackWhite (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char c, unsigned char m);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void drawIcon (unsigned char x, unsigned char y,
const icon_t const *pIcon, unsigned char c, unsigned char m)
{
if (!pIcon)
return;
drawIconExt (x, y, pIcon->data,
pIcon->width, pIcon->height, pIcon->info,
c, m);
} // drawIcon
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void drawIconExt (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char c, unsigned char m)
{
switch (iconInfo)
{
case ICON_BLACK_WHITE_TRANSPARENT: /// 2 bpp
case ICON_BLACK_WHITE: /// 1 bpp
_drawBlackWhite (x, y, pData,
width, height, iconInfo,
c, m);
break;
case ICON_GRAY_TRANSPARENT: /// 3 bpp
case ICON_GRAY: /// 2 bpp
_drawGray (x, y, pData,
width, height, iconInfo,
m);
break;
default:
if (x + width > LCD_SIZE_X)
width = LCD_SIZE_X - x;
if (y + height > LCD_SIZE_Y)
height = LCD_SIZE_Y - y;
draw_rect (x, y,
width, height,
1, LCD_COLOR_B, DRAW_XOR);
break;
} // switch (iconInfo)
} // drawIconExt
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
static void _drawGray (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char m)
{
unsigned char alphaBuf [LCD_SIZE_X];
unsigned short ix;
unsigned short iy;
unsigned char iconWidth = width;
unsigned char bpp;
unsigned char* alphaBuf_p;
if(iconInfo==ICON_GRAY_TRANSPARENT)
{
alphaBuf_p = alphaBuf;
bpp=3;
}
else
{
alphaBuf_p = NULL;
bpp=2;
}
if (x + width > LCD_SIZE_X)
width = LCD_SIZE_X - x;
if (y + height > LCD_SIZE_Y)
height = LCD_SIZE_Y - y;
unsigned short idx = (width * bpp); // 3 byte per pixel
unsigned char s = y & 0x07;
is_drawing++;
if (s)
{
for (ix = 0; ix < width; ix++)
{
alphaBuf [ix] = 0;
drawbuf [1][ix] = 0;
drawbuf [0][ix] = 0;
} // for (ix = 0; ix < width; ix++)
for (iy = 0; iy < height; iy += 8)
{
// Need to process two icon lines for one drawbuf line
if (iy)
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+2] >> (8-s);
drawbuf [1][ix] = pData [idx+1] >> (8-s);
drawbuf [0][ix] = pData [idx] >> (8-s);
} // for (ix = 0; ix < width; ix++)
// go back to end of this page
idx += (width * bpp); // 3bpp
// goto next page
idx += (iconWidth * bpp); // 3bpp
}
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] |= pData [idx+2] << s;
drawbuf [1][ix] |= pData [idx+1] << s;
drawbuf [0][ix] |= pData [idx] << s;
}
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
// go back to end of this page
idx += (width * bpp); // 3bpp
} // for (iy = 0; iy < height; iy += 8)
/* Pixel in the last page: height & 0x07
(i.e. 13 hight => 5 pixel in last page) */
if (((height & 0x07) == 0) ||
((height & 0x07) > (8 - s)))
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+2] >> (8-s);
drawbuf [1][ix] = pData [idx+1] >> (8-s);
drawbuf [0][ix] = pData [idx] >> (8-s);
} // for (ix = 0; ix < width; ix++)
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
}
}
else
{
for (iy = 0; iy < height; iy += 8)
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+2];
drawbuf [1][ix] = pData [idx+1];
drawbuf [0][ix] = pData [idx];
}
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
// go back to end of this page
idx += (width * bpp); // 3bpp
// goto next page
idx += (iconWidth * bpp); // 3bpp
} // for (iy = 0; iy < height; iy += 8)
} // else if (s)
is_drawing--;
} // _drawGrayAlpha
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
static void _drawBlackWhite (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char c, unsigned char m)
{
unsigned char alphaBuf [LCD_SIZE_X];
unsigned short ix;
unsigned short iy;
unsigned char iconWidth = width;
unsigned char bpp;
unsigned char* alphaBuf_p;
if(iconInfo==ICON_BLACK_WHITE_TRANSPARENT)
{
alphaBuf_p = alphaBuf;
bpp=2;
}
else
{
alphaBuf_p = NULL;
bpp=1;
}
if (x + width > LCD_SIZE_X)
width = LCD_SIZE_X - x;
if (y + height > LCD_SIZE_Y)
height = LCD_SIZE_Y - y;
unsigned short idx = width * bpp; // 1 byte per pixel
unsigned char s = y & 0x07;
is_drawing++;
if (s)
{
for (ix = 0; ix < width; ix++)
{
alphaBuf [ix] = 0;
drawbuf [1][ix] = 0;
drawbuf [0][ix] = 0;
} // for (ix = 0; ix < width; ix++)
for (iy = 0; iy < height; iy += 8)
{
// Need to process two icon lines for one drawbuf line
if (iy)
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+1] >> (8-s);
if (c & 0x02)
drawbuf [0][ix] = pData [idx] >> (8-s);
else
drawbuf [0][ix] = 0;
if (c & 0x01)
drawbuf [1][ix] = pData [idx] >> (8-s);
else
drawbuf [1][ix] = 0;
} // for (ix = 0; ix < width; ix++)
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
// go back to end of this page
idx += width * bpp; // 1bpp
// goto next page
idx += iconWidth * bpp; // 1bpp
}
for (ix = 0; ix < width; ix++)
{
idx -=bpp;
alphaBuf [ix] = pData [idx+1] << s;
if (c & 0x02)
drawbuf [0][ix] |= pData [idx] << s;
if (c & 0x01)
drawbuf [1][ix] |= pData [idx] << s;
}
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
// go back to end of this page
idx += width * bpp; // 1bpp
} // for (iy = 0; iy < height; iy += 8)
/* Pixel in the last page: height & 0x07
(i.e. 13 hight => 5 pixel in last page) */
if (((height & 0x07) == 0) ||
((height & 0x07) > (8 - s)))
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+1] >> (8-s);
if (c & 0x02)
drawbuf [0][ix] = pData [idx] >> (8-s);
else
drawbuf [0][ix] = 0;
if (c & 0x01)
drawbuf [1][ix] = pData [idx] >> (8-s);
else
drawbuf [1][ix] = 0;
} // for (ix = 0; ix < width; ix++)
do_rcuAlpha (x, y+iy, width, m, alphaBuf_p);
}
}
else
{
for (iy = 0; iy < height; iy += 8)
{
for (ix = 0; ix < width; ix++)
{
idx -= bpp;
alphaBuf [ix] = pData [idx+1];
if (c & 0x02)
drawbuf [0][ix] = pData [idx];
else
drawbuf [0][ix] = 0;
if (c & 0x01)
drawbuf [1][ix] = pData [idx];
else
drawbuf [1][ix] = 0;
}
do_rcuAlpha (x, y+iy, width, m, alphaBuf);
// go back to end of this page
idx += width * bpp; // 1bpp
// goto next page
idx += iconWidth * bpp; // 1bpp
} // for (iy = 0; iy < height; iy += 8)
} // else if (s)
is_drawing--;
} // _drawBlackWhiteAlpha
//-----------------------------------------------------------------------------

View file

@ -0,0 +1,118 @@
const unsigned char charset_bits[] = {
0x80, 0xc0, 0x80, 0xe0, 0x80, 0xc0, 0x80, 0xf0, 0x01, 0x03, 0x01, 0x07,
0x01, 0x03, 0x01, 0x0f, 0x80, 0x88, 0xaa, 0xff, 0xff, 0xaa, 0x88, 0x80,
0x00, 0xc0, 0x00, 0xe0, 0x00, 0xc0, 0x00, 0xf0, 0x00, 0x03, 0x00, 0x07,
0x00, 0x03, 0x00, 0x0f, 0x80, 0x88, 0xaa, 0xab, 0xab, 0xaa, 0x88, 0x80,
0x80, 0x80, 0x80, 0x70, 0x01, 0x01, 0x01, 0x0e, 0x0e, 0x01, 0x01, 0x01,
0x70, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x24,
0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x92, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xaa,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xaa, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x81,
0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xaa, 0x02, 0x05, 0x02, 0x00,
0x3e, 0x41, 0x41, 0x22, 0x02, 0x05, 0x02, 0x00, 0x7f, 0x09, 0x09, 0x01,
0x1c, 0x22, 0x41, 0x4f, 0x41, 0x22, 0x1c, 0x1c, 0x22, 0x41, 0x4f, 0x47,
0x22, 0x1c, 0x1c, 0x22, 0x41, 0x4f, 0x4f, 0x2e, 0x1c, 0x1c, 0x22, 0x41,
0x4f, 0x5f, 0x3e, 0x1c, 0x1c, 0x22, 0x41, 0x7f, 0x7f, 0x3e, 0x1c, 0x1c,
0x22, 0x71, 0x7f, 0x7f, 0x3e, 0x1c, 0x1c, 0x3a, 0x79, 0x7f, 0x7f, 0x3e,
0x1c, 0x1c, 0x3e, 0x7d, 0x7f, 0x7f, 0x3e, 0x1c, 0x1c, 0x3e, 0x7f, 0x7f,
0x7f, 0x3e, 0x1c, 0x00, 0x00, 0x5f, 0x03, 0x00, 0x03, 0x14, 0x7f, 0x14,
0x7f, 0x14, 0x24, 0x4a, 0xff, 0x4a, 0x32, 0x63, 0x13, 0x08, 0x64, 0x63,
0x36, 0x49, 0x55, 0x22, 0x50, 0x03, 0x1c, 0x22, 0x41, 0x41, 0x22, 0x1c,
0x14, 0x08, 0x3e, 0x08, 0x14, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x80, 0x60,
0x60, 0x08, 0x08, 0x08, 0x08, 0x08, 0x60, 0x60, 0xc0, 0x30, 0x0c, 0x03,
0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x42, 0x61,
0x51, 0x49, 0x46, 0x22, 0x41, 0x49, 0x49, 0x36, 0x18, 0x14, 0x12, 0x7f,
0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3e, 0x49, 0x49, 0x49, 0x32, 0x61,
0x11, 0x09, 0x05, 0x03, 0x36, 0x49, 0x49, 0x49, 0x36, 0x26, 0x49, 0x49,
0x49, 0x3e, 0x6c, 0x6c, 0x80, 0x6c, 0x6c, 0x08, 0x14, 0x22, 0x41, 0x14,
0x14, 0x14, 0x14, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x51, 0x09, 0x06,
0x3e, 0x41, 0x59, 0x55, 0x5e, 0x7e, 0x09, 0x09, 0x09, 0x7e, 0x7f, 0x49,
0x49, 0x49, 0x36, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x7f, 0x41, 0x41, 0x41,
0x3e, 0x7f, 0x49, 0x49, 0x41, 0x41, 0x7f, 0x09, 0x09, 0x01, 0x01, 0x3e,
0x41, 0x41, 0x49, 0x3a, 0x7f, 0x08, 0x08, 0x08, 0x7f, 0x41, 0x7f, 0x41,
0x30, 0x41, 0x41, 0x41, 0x3f, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x7f, 0x40,
0x40, 0x40, 0x40, 0x7f, 0x02, 0x0c, 0x02, 0x7f, 0x7f, 0x02, 0x04, 0x08,
0x7f, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x7f, 0x09, 0x09, 0x09, 0x06, 0x3e,
0x41, 0x41, 0x41, 0xbe, 0x7f, 0x09, 0x09, 0x09, 0x76, 0x26, 0x49, 0x49,
0x49, 0x32, 0x01, 0x01, 0x7f, 0x01, 0x01, 0x3f, 0x40, 0x40, 0x40, 0x3f,
0x1f, 0x20, 0x40, 0x20, 0x1f, 0x7f, 0x20, 0x10, 0x20, 0x7f, 0x41, 0x22,
0x1c, 0x22, 0x41, 0x07, 0x08, 0x70, 0x08, 0x07, 0x61, 0x51, 0x49, 0x45,
0x43, 0x7f, 0x41, 0x41, 0x03, 0x0c, 0x30, 0xc0, 0x41, 0x41, 0x7f, 0x02,
0x01, 0x02, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01, 0x02, 0x20, 0x54, 0x54,
0x78, 0x7f, 0x48, 0x48, 0x30, 0x38, 0x44, 0x44, 0x24, 0x30, 0x48, 0x48,
0x7f, 0x38, 0x54, 0x54, 0x18, 0x08, 0x7e, 0x09, 0x02, 0x98, 0xa4, 0xa4,
0x78, 0x7f, 0x08, 0x08, 0x70, 0x44, 0x7d, 0x40, 0x44, 0x84, 0x7d, 0x7f,
0x10, 0x28, 0x44, 0x41, 0x7f, 0x40, 0x7c, 0x04, 0x18, 0x04, 0x78, 0x7c,
0x08, 0x04, 0x78, 0x38, 0x44, 0x44, 0x38, 0xfc, 0x24, 0x24, 0x18, 0x18,
0x24, 0x24, 0xfc, 0x7c, 0x08, 0x04, 0x08, 0x48, 0x54, 0x54, 0x24, 0x04,
0x3f, 0x44, 0x3c, 0x40, 0x20, 0x7c, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x3c,
0x40, 0x30, 0x40, 0x3c, 0x44, 0x28, 0x10, 0x28, 0x44, 0x9c, 0xa0, 0xa0,
0x7c, 0x64, 0x54, 0x54, 0x4c, 0x08, 0x36, 0x41, 0x77, 0x41, 0x36, 0x08,
0x08, 0x08, 0x2a, 0x1c, 0x08, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x00,
0x00, 0xdf, 0xdf, 0x07, 0x07, 0x00, 0x07, 0x07, 0x14, 0x3e, 0x14, 0x3e,
0x14, 0x24, 0x4a, 0xff, 0x4a, 0x32, 0xf3, 0xfb, 0x18, 0xdf, 0xc7, 0x36,
0x49, 0x55, 0x22, 0x50, 0x04, 0x07, 0x03, 0x3c, 0x7e, 0xc3, 0x81, 0x81,
0xc3, 0x7e, 0x3c, 0x14, 0x08, 0x3e, 0x08, 0x14, 0x18, 0x7e, 0x7e, 0x18,
0x80, 0x60, 0x60, 0x18, 0x18, 0x18, 0x18, 0x18, 0x60, 0x60, 0xc0, 0xf0,
0x3c, 0x0f, 0x03, 0x7e, 0xff, 0xc3, 0xff, 0x7e, 0x04, 0xc6, 0xff, 0xff,
0xc0, 0xe6, 0xf7, 0xd3, 0xdf, 0xce, 0x42, 0xc3, 0xdb, 0xff, 0x76, 0x38,
0x3c, 0x36, 0xff, 0xff, 0x5f, 0xdf, 0xdb, 0xfb, 0x73, 0x7e, 0xff, 0xdb,
0xfb, 0x72, 0x03, 0xf3, 0xfb, 0x0f, 0x07, 0x76, 0xff, 0xdb, 0xff, 0x76,
0x4e, 0xdf, 0xdb, 0xff, 0x7e, 0x6c, 0x6c, 0x80, 0x6c, 0x6c, 0x18, 0x3c,
0x66, 0xc3, 0x81, 0x36, 0x36, 0x36, 0x36, 0x81, 0xc3, 0x66, 0x3c, 0x18,
0x06, 0xd3, 0xd9, 0x0f, 0x06, 0x7e, 0xc3, 0xdb, 0xd7, 0xde, 0xfe, 0xff,
0x33, 0xff, 0xfe, 0xff, 0xff, 0xdb, 0xff, 0x66, 0x7e, 0xff, 0xc3, 0xe7,
0x66, 0xff, 0xff, 0xc3, 0xff, 0x7e, 0xff, 0xff, 0xdb, 0xdb, 0xc3, 0xff,
0xff, 0x1b, 0x1b, 0x03, 0x7e, 0xff, 0xc3, 0xfb, 0x7a, 0xff, 0xff, 0x18,
0xff, 0xff, 0xc3, 0xff, 0xff, 0xc3, 0x60, 0xe3, 0xc3, 0xff, 0x7f, 0xff,
0xff, 0x1c, 0xf7, 0xe3, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xff, 0xfe, 0x0c,
0xfe, 0xff, 0xff, 0xfe, 0x18, 0x7f, 0xff, 0x7e, 0xff, 0xc3, 0xff, 0x7e,
0xff, 0xff, 0x1b, 0x1f, 0x0e, 0x7e, 0xff, 0xc3, 0x7f, 0xde, 0xff, 0xff,
0x1b, 0xff, 0xee, 0x4e, 0xdf, 0xdb, 0xfb, 0x72, 0x03, 0xff, 0xff, 0x03,
0x03, 0x7f, 0xff, 0xc0, 0xff, 0x7f, 0x3f, 0x7f, 0xc0, 0x7f, 0x3f, 0xff,
0x7f, 0x30, 0x7f, 0xff, 0xe7, 0xe7, 0x18, 0x18, 0xe7, 0xe7, 0x0f, 0x1f,
0xf0, 0x1f, 0x0f, 0xe3, 0xf3, 0xdb, 0xcf, 0xc7, 0xff, 0xff, 0xc3, 0xc3,
0x03, 0x0f, 0x3c, 0xf0, 0xc0, 0xc3, 0xc3, 0xff, 0xff, 0x04, 0x06, 0x03,
0x06, 0x04, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x03, 0x07, 0x60, 0xf4, 0xd4,
0xf4, 0xf8, 0xff, 0xff, 0xcc, 0xfc, 0x78, 0x78, 0xfc, 0xcc, 0xcc, 0x48,
0x78, 0xfc, 0xcc, 0xff, 0xff, 0x78, 0xfc, 0xac, 0xbc, 0xb8, 0x18, 0xfe,
0xff, 0x1b, 0x1b, 0xb8, 0xbc, 0xac, 0xfc, 0x78, 0xff, 0xff, 0x18, 0xf8,
0xf0, 0xcc, 0xfd, 0xfd, 0xc0, 0xc0, 0xcc, 0xfd, 0x7d, 0xff, 0xff, 0x10,
0xfc, 0xec, 0x7f, 0xff, 0xc0, 0xc0, 0xfc, 0xfc, 0x0c, 0xfc, 0x0c, 0xfc,
0xf8, 0xfc, 0xf8, 0x0c, 0xfc, 0xf8, 0x78, 0xfc, 0xcc, 0xfc, 0x78, 0xfc,
0xfc, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xfc, 0xf8, 0xfc, 0xf8, 0x0c,
0x1c, 0x18, 0xd8, 0xdc, 0xfc, 0xec, 0x6c, 0x0c, 0x7f, 0xff, 0xcc, 0xcc,
0x7c, 0xfc, 0xc0, 0x7c, 0xfc, 0x3c, 0x7c, 0xc0, 0x7c, 0x3c, 0x7c, 0xfc,
0xc0, 0x60, 0xc0, 0xfc, 0x7c, 0xcc, 0xfc, 0x30, 0xfc, 0xdc, 0x9c, 0xbc,
0xb0, 0xfc, 0x7c, 0xcc, 0xec, 0xfc, 0xdc, 0xcc, 0x10, 0x56, 0xef, 0x81,
0xef, 0xef, 0x81, 0xee, 0x56, 0x10, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x18,
0x3c, 0x7e, 0x18, 0x18, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0x7c, 0x3e, 0x1f,
0xc7, 0xe3, 0xf1, 0xf8, 0x7c, 0x3e, 0x1f, 0x8f, 0xe3, 0xf1, 0xf8, 0x7c,
0x3e, 0x1f, 0x8f, 0xc7, 0xf1, 0xf8, 0x7c, 0x3e, 0x1f, 0x8f, 0xc7, 0xe3,
0xf8, 0x7c, 0x3e, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0x7c, 0x3e, 0x1f, 0x8f,
0xc7, 0xe3, 0xf1, 0xf8, 0x3e, 0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0x7c,
0x1f, 0x8f, 0xc7, 0xe3, 0xf1, 0xf8, 0x7c, 0x3e, 0xff, 0xff, 0xe7, 0xc3,
0xc3, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xc3, 0xc3, 0xe7, 0xff, 0xff,
0xff, 0xf8, 0xe0, 0xc0, 0xc0, 0xe0, 0xf8, 0xff, 0xff, 0x1f, 0x07, 0x03,
0x03, 0x07, 0x1f, 0xff, 0x1c, 0x3e, 0x77, 0x63, 0x77, 0x3e, 0x1c, 0x1c,
0x36, 0x63, 0x41, 0x63, 0x36, 0x1c, 0x1c, 0x08, 0x41, 0x63, 0x41, 0x08,
0x1c, 0x08, 0x14, 0x22, 0x49, 0x22, 0x14, 0x08, 0x55, 0xaa, 0x55, 0xaa,
0x55, 0xaa, 0x55, 0xaa, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc,
0x33, 0x33, 0x0e, 0x11, 0x0e, 0x12, 0x1f, 0x10, 0x19, 0x15, 0x12, 0x11,
0x15, 0x0a, 0x07, 0x04, 0x1e, 0x17, 0x15, 0x09, 0x0e, 0x15, 0x09, 0x01,
0x1d, 0x03, 0x0a, 0x15, 0x0a, 0x12, 0x15, 0x0e, 0x0a, 0x10, 0x0a, 0x04,
0x0a, 0x11, 0x0a, 0x0a, 0x0a, 0x11, 0x0a, 0x04, 0x01, 0x15, 0x02, 0x01,
0x03, 0x07, 0x03, 0x01, 0x04, 0x06, 0x07, 0x06, 0x04, 0x04, 0x0e, 0x1f,
0x1f, 0x0e, 0x04, 0x18, 0x3c, 0x7e, 0x7e, 0x3c, 0x18, 0x3c, 0x42, 0x81,
0x81, 0x81, 0x81, 0x42, 0x3c, 0x3c, 0x42, 0x99, 0xbd, 0xbd, 0x99, 0x42,
0x3c, 0x7f, 0x49, 0x41, 0x6b, 0x41, 0x49, 0x7f, 0x80, 0x40, 0x20, 0x10,
0x0f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x3e, 0x01, 0x01, 0x01,
0x01, 0x02, 0x04, 0x38, 0x08, 0x08, 0x08, 0x08, 0x01, 0x01, 0x01, 0x01,
0x15, 0x0a, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,22 @@
const unsigned char charset_info[] = {
0x08, 0x84, 0x48, 0x84, 0x44, 0x44, 0x48, 0x88, // 0- 15 graticule & borders
0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, // 16- 31 graticule & symbols
0x21, 0x35, 0x55, 0x51, 0x33, 0x55, 0x35, 0x24, // 32- 47 ascii, font 1
0x55, 0x55, 0x55, 0x55, 0x55, 0x23, 0x44, 0x45, // 48- 63 ascii, font 1
0x55, 0x55, 0x55, 0x55, 0x53, 0x55, 0x55, 0x55, // 64- 80 ascii, font 1
0x55, 0x55, 0x55, 0x55, 0x55, 0x53, 0x43, 0x35, // 80- 95 ascii, font 1
0x24, 0x44, 0x44, 0x44, 0x43, 0x34, 0x35, 0x44, // 96-112 ascii, font 1
0x44, 0x44, 0x34, 0x55, 0x54, 0x43, 0x13, 0x55, // 112-127 ascii, font 1
0x32, 0x55, 0x55, 0x53, 0x44, 0x54, 0x35, 0x25, // 128-143 ascii, bold font
0x55, 0x55, 0x55, 0x55, 0x55, 0x23, 0x54, 0x55, // 144-159 ascii, bold font
0x55, 0x55, 0x55, 0x55, 0x54, 0x55, 0x55, 0x55, // 160-175 ascii, bold font
0x55, 0x55, 0x55, 0x55, 0x65, 0x54, 0x54, 0x55, // 176-191 ascii, bold font
0x25, 0x55, 0x55, 0x55, 0x54, 0x45, 0x47, 0x55, // 192-207 ascii, bold font
0x55, 0x55, 0x55, 0x57, 0x55, 0x54, 0x24, 0x55, // 208-223 ascii, bold font
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0x77, // 224-239 symbols
0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 240-255 symbols
0x33, 0x33, 0x33, 0x33, 0x33, 0x12, 0x33, 0x33, // 256-271 small numbers
0x55, 0x33, 0x68, 0x87, 0x84, 0x44, 0x44, 0x44 // 272-288 symbols
};
const unsigned char charset_dlines = 1;

View file

@ -0,0 +1,279 @@
const unsigned char smooth_mt_bits[] = {
0x00, 0x00, 0x00, 0xfc, 0xfc, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x20, 0x20,
0xe0, 0x3c, 0x20, 0xe0, 0x3c, 0x20, 0x20, 0xe0, 0xf0, 0x10, 0xfc, 0x10,
0x30, 0x60, 0x78, 0xfc, 0x84, 0xfc, 0x78, 0x00, 0x80, 0x20, 0x18, 0x84,
0x80, 0x80, 0x00, 0x80, 0xc0, 0x7c, 0x64, 0xc4, 0x84, 0x0c, 0x00, 0x40,
0xc0, 0x40, 0x00, 0x3c, 0x3c, 0xe0, 0xf8, 0x0c, 0x04, 0x04, 0x08, 0xf0,
0x80, 0x00, 0x50, 0x60, 0xfc, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x78, 0x0c, 0xf0, 0xf8, 0x04, 0x04, 0x04,
0x0c, 0xf8, 0xc0, 0x08, 0x08, 0xfc, 0xfc, 0x00, 0x00, 0x18, 0x04, 0x04,
0x04, 0x8c, 0xf8, 0x30, 0x08, 0x04, 0x44, 0x44, 0x44, 0xbc, 0x98, 0x00,
0x00, 0x80, 0x40, 0x30, 0x08, 0xfc, 0xfc, 0x00, 0x7c, 0x44, 0x44, 0x44,
0x44, 0x84, 0x00, 0xe0, 0xf8, 0x4c, 0x44, 0x44, 0xc4, 0x8c, 0x00, 0x0c,
0x04, 0x04, 0x04, 0xc4, 0x74, 0x0c, 0x00, 0x10, 0xb8, 0x44, 0x44, 0x44,
0xfc, 0xb8, 0x00, 0x70, 0xf8, 0x04, 0x04, 0x04, 0x8c, 0xf8, 0xc0, 0xc0,
0x00, 0x00, 0xc0, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x40, 0x40, 0x20, 0x20,
0x30, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x30, 0x20,
0x20, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x08, 0x04, 0x84, 0x84, 0xc4,
0x78, 0x10, 0x80, 0xc0, 0x20, 0x10, 0x80, 0xc8, 0x48, 0x08, 0x88, 0x90,
0x10, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x1c, 0xf8, 0xc0,
0x00, 0x00, 0x00, 0x04, 0xfc, 0xfc, 0x84, 0x84, 0x84, 0xc4, 0x78, 0x30,
0xe0, 0xf0, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x18, 0x00, 0x04, 0xfc,
0xfc, 0x04, 0x04, 0x04, 0x04, 0x08, 0xf0, 0xe0, 0x04, 0x04, 0xfc, 0xfc,
0x84, 0x84, 0x84, 0xe4, 0x0c, 0x04, 0xfc, 0xfc, 0x84, 0x84, 0x84, 0x84,
0xe4, 0x0c, 0xe0, 0xf0, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x00,
0x04, 0xfc, 0xfc, 0x84, 0x80, 0x80, 0x80, 0x84, 0xfc, 0xfc, 0x04, 0x04,
0xfc, 0xfc, 0x04, 0x00, 0x00, 0x04, 0x04, 0xfc, 0xfc, 0x04, 0x04, 0xfc,
0xfc, 0xc4, 0x20, 0x20, 0x14, 0x0c, 0x04, 0x04, 0x00, 0x04, 0xfc, 0xfc,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfc, 0x1c, 0x38, 0xf0, 0xc0,
0x00, 0x00, 0x80, 0x60, 0x18, 0xfc, 0xfc, 0x04, 0x04, 0xfc, 0x1c, 0x38,
0x60, 0xc0, 0x80, 0x00, 0x04, 0xfc, 0x04, 0x04, 0xe0, 0xf0, 0x08, 0x04,
0x04, 0x04, 0x04, 0x04, 0x18, 0xf0, 0x80, 0x04, 0xfc, 0xfc, 0x84, 0x84,
0x84, 0xc4, 0x78, 0x30, 0xe0, 0xf0, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04,
0x18, 0xf0, 0x80, 0x04, 0xfc, 0xfc, 0x84, 0x84, 0x84, 0x84, 0x7c, 0x38,
0x00, 0x00, 0x38, 0x7c, 0xc4, 0x84, 0x84, 0x84, 0x1c, 0x18, 0x0c, 0x04,
0x04, 0x04, 0xfc, 0xfc, 0x04, 0x04, 0x04, 0x0c, 0x04, 0xfc, 0xfc, 0x04,
0x00, 0x00, 0x00, 0x04, 0xfc, 0xfc, 0x04, 0x04, 0x0c, 0x3c, 0xe4, 0x80,
0x00, 0x00, 0x80, 0x64, 0x0c, 0x04, 0x04, 0x0c, 0xfc, 0xc4, 0x00, 0x00,
0xe0, 0x1c, 0x7c, 0xc0, 0x00, 0x00, 0xe4, 0x1c, 0x04, 0x04, 0x04, 0x1c,
0x7c, 0xe0, 0xc0, 0x34, 0x0c, 0x04, 0x04, 0x04, 0x0c, 0x1c, 0x74, 0xe0,
0x80, 0x40, 0x14, 0x0c, 0x04, 0x0c, 0x04, 0x04, 0x84, 0xc4, 0x74, 0x3c,
0x0c, 0x04, 0xfc, 0xfc, 0x04, 0x00, 0x0c, 0x78, 0xc0, 0x00, 0x00, 0x04,
0x04, 0xfc, 0xfc, 0x20, 0x10, 0x18, 0x0c, 0x04, 0x0c, 0x10, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x40,
0x60, 0x20, 0x20, 0x20, 0xc0, 0x80, 0x00, 0x00, 0x04, 0xfc, 0xfc, 0x20,
0x20, 0x20, 0xc0, 0x80, 0x80, 0xc0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x80,
0xc0, 0x20, 0x20, 0x24, 0xfc, 0xfc, 0x00, 0x00, 0x80, 0xc0, 0x20, 0x20,
0x20, 0x20, 0xc0, 0x00, 0x20, 0xf8, 0xfc, 0x24, 0x24, 0x04, 0x00, 0x80,
0xc0, 0x20, 0x20, 0x20, 0xe0, 0xe0, 0x20, 0x04, 0xfc, 0xfc, 0x20, 0x20,
0x20, 0xe0, 0x80, 0x00, 0x20, 0xec, 0xe0, 0x00, 0x00, 0x00, 0x20, 0xec,
0xec, 0x04, 0xfc, 0xfc, 0x00, 0xa0, 0x60, 0x20, 0x20, 0x04, 0xfc, 0xfc,
0x00, 0x20, 0xe0, 0xe0, 0x20, 0x20, 0x20, 0xe0, 0xc0, 0x20, 0x20, 0x20,
0xe0, 0x80, 0x00, 0x20, 0xe0, 0xe0, 0x20, 0x20, 0x20, 0xe0, 0x80, 0x00,
0x80, 0xc0, 0x20, 0x20, 0x20, 0x60, 0xc0, 0x00, 0x20, 0xe0, 0xe0, 0x20,
0x20, 0x20, 0x60, 0xc0, 0x00, 0x80, 0xc0, 0x20, 0x20, 0x20, 0xe0, 0xe0,
0x20, 0x20, 0xe0, 0xe0, 0x20, 0x20, 0x60, 0x60, 0xc0, 0xe0, 0x20, 0x20,
0x60, 0x60, 0x20, 0xf8, 0xf8, 0x20, 0x20, 0x00, 0x20, 0xe0, 0xe0, 0x00,
0x00, 0x20, 0xe0, 0xe0, 0x00, 0x20, 0x60, 0xe0, 0x20, 0x00, 0x00, 0xa0,
0x60, 0x20, 0x20, 0x60, 0xe0, 0x20, 0x00, 0x80, 0xe0, 0x80, 0x00, 0x20,
0xe0, 0x20, 0x20, 0x60, 0xe0, 0x00, 0x80, 0xe0, 0x20, 0x20, 0x20, 0x20,
0xe0, 0xa0, 0x00, 0x00, 0xa0, 0x60, 0x20, 0x60, 0x60, 0x20, 0x20, 0xe0,
0xe0, 0x20, 0x00, 0x00, 0xf8, 0x7c, 0x04, 0x04, 0xfc, 0xfc, 0x04, 0x04,
0xfc, 0xf0, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x80, 0x40, 0x6c, 0x20, 0x20, 0x2c, 0xc0, 0x80, 0x00, 0x80, 0xc0, 0x2c,
0x20, 0x20, 0x6c, 0xc0, 0x00, 0x20, 0xe0, 0xec, 0x00, 0x00, 0x2c, 0xe0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x39, 0x1c, 0xf9, 0xc0, 0x00, 0x00,
0x00, 0xe0, 0xf0, 0x08, 0x05, 0x04, 0x04, 0x05, 0x04, 0x18, 0xf0, 0x80,
0x04, 0xfc, 0xfc, 0x04, 0x01, 0x00, 0x00, 0x05, 0xfc, 0xfc, 0x04, 0x00,
0x00, 0xf8, 0xfc, 0x04, 0x64, 0xf4, 0x8c, 0x00, 0x00 };
const unsigned char smooth_lt_bits[] = {
0x00, 0x00, 0x00, 0xfc, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
0xf8, 0x6c, 0x00, 0xf0, 0x7c, 0x04, 0x00, 0xc0, 0xa0, 0x10, 0xfc, 0x10,
0x60, 0x10, 0x30, 0x4c, 0x84, 0x4c, 0x30, 0x00, 0x40, 0x70, 0x80, 0x8c,
0x80, 0x00, 0x00, 0x00, 0xd8, 0x38, 0x4c, 0x84, 0x04, 0x00, 0x0c, 0x00,
0x40, 0x00, 0x00, 0x3c, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x00, 0x3c, 0xf8,
0x40, 0xd8, 0x50, 0x10, 0xfc, 0x10, 0x50, 0xd8, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xa0, 0xb4, 0x14, 0xe0, 0x18, 0x08, 0x04, 0x04,
0x18, 0xf0, 0x20, 0x10, 0x04, 0xfc, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00,
0x04, 0xc4, 0x7c, 0x78, 0x04, 0x08, 0x00, 0x44, 0xe4, 0xe8, 0x38, 0x00,
0x00, 0x80, 0xe0, 0x00, 0x1c, 0xfc, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x40,
0x80, 0xc0, 0x80, 0xd0, 0x90, 0x80, 0x04, 0x44, 0x04, 0x88, 0x00, 0x0c,
0x00, 0x00, 0x00, 0x80, 0xac, 0x1c, 0x04, 0xa8, 0xfc, 0xec, 0x44, 0x44,
0x28, 0x98, 0x00, 0xf8, 0x8c, 0x8c, 0x04, 0x04, 0x00, 0xf0, 0x20, 0xc0,
0xc0, 0x00, 0xc0, 0xc0, 0x00, 0x80, 0xc0, 0x00, 0xc0, 0x60, 0x60, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x60, 0x60, 0xc0, 0x00, 0xc0, 0x80, 0x00, 0x04, 0x08, 0x04, 0x84, 0x0c,
0x7c, 0x28, 0x00, 0xe0, 0x70, 0x10, 0xd8, 0x00, 0x00, 0x48, 0x80, 0x88,
0x30, 0x30, 0xe0, 0x80, 0x00, 0x00, 0x80, 0x40, 0x2c, 0x2c, 0x70, 0xa0,
0x00, 0x00, 0x00, 0x00, 0xfc, 0x84, 0x00, 0x00, 0x84, 0x8c, 0xfc, 0x08,
0xd0, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x08, 0x0c, 0x18, 0x00, 0xfc,
0x04, 0x00, 0x04, 0x04, 0x08, 0x1c, 0x38, 0xd0, 0x00, 0x00, 0xfc, 0x84,
0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x04, 0xfc, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x1c, 0xd0, 0x38, 0x0c, 0x00, 0x04, 0x00, 0x04, 0x08, 0x1c, 0x18,
0x00, 0x04, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xfc, 0x00, 0x00,
0x04, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x04, 0x00, 0x00, 0x04,
0xfc, 0x80, 0xc0, 0x10, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0x7c, 0x60, 0x80,
0x80, 0x00, 0x00, 0x10, 0x04, 0xfc, 0x04, 0x00, 0x00, 0xfc, 0x0c, 0x30,
0xf0, 0xc0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xd0, 0x38, 0x1c, 0x00,
0x04, 0x00, 0x04, 0x08, 0x28, 0xf0, 0x60, 0x00, 0x04, 0xfc, 0x00, 0x00,
0x84, 0x0c, 0xfc, 0x08, 0xd0, 0x38, 0x1c, 0x00, 0x04, 0x00, 0x04, 0x08,
0x28, 0xf0, 0x60, 0x00, 0x04, 0xfc, 0x00, 0x80, 0x84, 0x84, 0xc8, 0x70,
0x00, 0x00, 0x70, 0xe8, 0xc4, 0xc0, 0x84, 0x84, 0x88, 0x04, 0x1c, 0x00,
0x00, 0x00, 0xfc, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0xfc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0xfc, 0x00, 0x00, 0x14, 0x7c, 0xf0, 0x40,
0x00, 0x00, 0x40, 0xb0, 0x14, 0x00, 0x00, 0x14, 0x7c, 0xa0, 0x00, 0x00,
0x50, 0x2c, 0xb8, 0xa0, 0x00, 0x00, 0x10, 0x24, 0x00, 0x00, 0x0c, 0x0c,
0x3c, 0xf0, 0xe0, 0x00, 0x1c, 0x04, 0x00, 0x00, 0x04, 0x3c, 0x38, 0xc0,
0xc0, 0xe0, 0x3c, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x1c,
0x1c, 0x00, 0xfc, 0x04, 0x00, 0x04, 0x14, 0xb4, 0xa0, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x00, 0x20, 0x30, 0x08, 0x0c, 0x0c, 0x18, 0x18, 0x10, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x08, 0x20,
0x20, 0x20, 0x20, 0x60, 0xe0, 0x40, 0x00, 0x04, 0x00, 0xfc, 0x40, 0x00,
0x00, 0x20, 0x60, 0xc0, 0xc0, 0x60, 0x60, 0x20, 0x20, 0x40, 0x20, 0xc0,
0x60, 0x20, 0x00, 0x00, 0x44, 0xfc, 0x00, 0x00, 0xc0, 0x60, 0x60, 0x20,
0x20, 0x40, 0xc0, 0x80, 0x00, 0xfc, 0x24, 0x04, 0x04, 0x04, 0x04, 0xc0,
0x60, 0x20, 0x00, 0x00, 0x40, 0xe0, 0x00, 0x00, 0xfc, 0x40, 0x00, 0x00,
0x60, 0xc0, 0x40, 0x00, 0x00, 0xe4, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x24,
0xe4, 0x00, 0xfc, 0x00, 0x80, 0x40, 0x20, 0x20, 0x00, 0x00, 0xfc, 0x00,
0x00, 0x00, 0xe0, 0x40, 0x00, 0x00, 0x60, 0xc0, 0x40, 0x00, 0x00, 0x60,
0xc0, 0x40, 0x00, 0x00, 0xe0, 0x40, 0x00, 0x00, 0x60, 0xc0, 0x40, 0x00,
0xc0, 0x60, 0x60, 0x20, 0x20, 0x00, 0xc0, 0x80, 0x00, 0xe0, 0x40, 0x40,
0x00, 0x20, 0x00, 0xc0, 0x80, 0xc0, 0x60, 0x20, 0x00, 0x00, 0x40, 0xe0,
0x00, 0x00, 0xe0, 0x40, 0x00, 0x00, 0x20, 0x60, 0xc0, 0x80, 0x20, 0x20,
0x20, 0x40, 0x00, 0xfc, 0x24, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xa0, 0xe0, 0x80, 0x00, 0x00, 0x00,
0xa0, 0x00, 0x00, 0xa0, 0xe0, 0x00, 0x00, 0x40, 0x60, 0x40, 0x00, 0x80,
0x60, 0x20, 0x20, 0x20, 0xe0, 0x80, 0x00, 0x20, 0x60, 0x00, 0x00, 0x60,
0xe0, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x60, 0x20, 0x00, 0x80, 0xa0,
0x60, 0x60, 0x00, 0x80, 0xfc, 0x84, 0x04, 0x00, 0xfc, 0x00, 0x00, 0x04,
0x78, 0x88, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
0x00, 0x20, 0x24, 0x2c, 0x20, 0x64, 0xec, 0x40, 0x00, 0xc0, 0x6c, 0x64,
0x20, 0x2c, 0x04, 0xc0, 0x80, 0x00, 0xec, 0x04, 0x00, 0x0c, 0x04, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x55, 0x2c, 0x75, 0xa1, 0x00, 0x00,
0x00, 0xd0, 0x38, 0x1c, 0x00, 0x05, 0x00, 0x04, 0x09, 0x28, 0xf0, 0x60,
0x00, 0x04, 0xfc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x04, 0xfc, 0x00, 0x00,
0x00, 0xf8, 0x00, 0x04, 0xf4, 0x9c, 0x08, 0x08, 0x00 };
const unsigned char smooth_mb_bits[] = {
0x00, 0x00, 0x00, 0x1b, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x1e,
0x03, 0x02, 0x1e, 0x03, 0x02, 0x02, 0x00, 0x08, 0x19, 0x11, 0xff, 0x12,
0x1e, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0x00, 0x06, 0x0f, 0x10,
0x10, 0x1f, 0x0f, 0x07, 0x0c, 0x10, 0x10, 0x10, 0x11, 0x13, 0x0e, 0x1e,
0x11, 0x10, 0x10, 0x00, 0x00, 0x0f, 0x1f, 0x20, 0x40, 0x40, 0x30, 0x1f,
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x1f, 0x1f, 0x01, 0x01, 0x01, 0x20, 0x38, 0x08, 0x01, 0x01, 0x01, 0x01,
0x18, 0x00, 0x30, 0x1e, 0x03, 0x00, 0x00, 0x07, 0x0f, 0x10, 0x10, 0x10,
0x18, 0x0f, 0x01, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x18, 0x1c, 0x16,
0x13, 0x11, 0x10, 0x18, 0x0c, 0x10, 0x10, 0x10, 0x10, 0x18, 0x0f, 0x02,
0x03, 0x02, 0x02, 0x12, 0x12, 0x1f, 0x1f, 0x12, 0x0c, 0x10, 0x10, 0x10,
0x10, 0x0f, 0x07, 0x07, 0x0f, 0x10, 0x10, 0x10, 0x18, 0x0f, 0x02, 0x00,
0x00, 0x18, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x10, 0x10, 0x10,
0x18, 0x0f, 0x02, 0x00, 0x18, 0x11, 0x11, 0x11, 0x08, 0x07, 0x00, 0x18,
0x00, 0x00, 0x38, 0x08, 0x01, 0x01, 0x02, 0x02, 0x06, 0x04, 0x04, 0x0c,
0x08, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x08, 0x0c,
0x04, 0x04, 0x06, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x00,
0x00, 0x00, 0x0f, 0x3f, 0x20, 0x42, 0x8f, 0x98, 0x90, 0x90, 0x9f, 0x1f,
0x10, 0x08, 0x07, 0x01, 0x10, 0x18, 0x13, 0x02, 0x02, 0x02, 0x02, 0x13,
0x1e, 0x18, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x0e,
0x03, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x18, 0x0c, 0x00, 0x10, 0x1f,
0x1f, 0x10, 0x10, 0x10, 0x10, 0x08, 0x07, 0x03, 0x10, 0x10, 0x1f, 0x1f,
0x10, 0x10, 0x10, 0x11, 0x18, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x00, 0x00,
0x01, 0x00, 0x03, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x11, 0x1f, 0x0f,
0x10, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x10,
0x1f, 0x1f, 0x10, 0xc0, 0x80, 0x80, 0x80, 0x7f, 0x3f, 0x00, 0x10, 0x1f,
0x1f, 0x10, 0x01, 0x02, 0x0c, 0x1c, 0x18, 0x10, 0x00, 0x10, 0x1f, 0x1f,
0x10, 0x10, 0x10, 0x10, 0x10, 0x1c, 0x10, 0x1f, 0x10, 0x10, 0x00, 0x01,
0x07, 0x06, 0x01, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x1f, 0x10, 0x10,
0x00, 0x00, 0x03, 0x06, 0x0c, 0x1f, 0x00, 0x00, 0x03, 0x07, 0x08, 0x10,
0x10, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x08, 0x10, 0x10, 0x10, 0x30, 0x50,
0x4c, 0x07, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x01, 0x07, 0x1c,
0x10, 0x00, 0x0c, 0x1c, 0x10, 0x10, 0x10, 0x11, 0x0f, 0x0f, 0x00, 0x00,
0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x18,
0x10, 0x10, 0x10, 0x10, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f,
0x1c, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1e, 0x0e,
0x00, 0x00, 0x00, 0x07, 0x1e, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1c,
0x12, 0x01, 0x03, 0x17, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x10, 0x1f,
0x1f, 0x10, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x16, 0x13, 0x10, 0x10, 0x10,
0x10, 0x18, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x30, 0x40,
0x40, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0e,
0x1f, 0x11, 0x11, 0x11, 0x1f, 0x1f, 0x10, 0x00, 0x10, 0x1f, 0x1f, 0x10,
0x10, 0x10, 0x0f, 0x07, 0x07, 0x0f, 0x10, 0x10, 0x10, 0x08, 0x04, 0x07,
0x0f, 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x07, 0x0f, 0x11, 0x11,
0x11, 0x11, 0x0d, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x47,
0xcf, 0x90, 0x90, 0x90, 0xff, 0x7f, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00,
0x10, 0x1f, 0x1f, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0xc0, 0x80, 0x80, 0xff,
0x7f, 0x10, 0x1f, 0x1f, 0x11, 0x12, 0x1c, 0x18, 0x10, 0x10, 0x1f, 0x1f,
0x10, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x10,
0x1f, 0x1f, 0x00, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x10, 0x1f, 0x1f, 0x10,
0x07, 0x0f, 0x10, 0x10, 0x10, 0x18, 0x0f, 0x03, 0x80, 0xff, 0xff, 0x90,
0x10, 0x10, 0x18, 0x0f, 0x03, 0x07, 0x0f, 0x10, 0x10, 0x90, 0xff, 0xff,
0x80, 0x10, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x18, 0x19, 0x13, 0x13,
0x1e, 0x0e, 0x00, 0x0f, 0x1f, 0x10, 0x18, 0x08, 0x00, 0x0f, 0x1f, 0x10,
0x10, 0x00, 0x1f, 0x1f, 0x10, 0x00, 0x00, 0x01, 0x07, 0x1c, 0x0c, 0x03,
0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x1c, 0x03, 0x00, 0x0f, 0x1c, 0x07,
0x00, 0x00, 0x10, 0x18, 0x14, 0x03, 0x17, 0x1c, 0x18, 0x10, 0x00, 0xc0,
0x80, 0xc7, 0x3c, 0x0c, 0x01, 0x00, 0x00, 0x10, 0x1c, 0x1e, 0x13, 0x11,
0x10, 0x18, 0x01, 0x01, 0x7e, 0xfc, 0x80, 0x80, 0xff, 0xff, 0x80, 0x80,
0xfe, 0x3f, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
0x00, 0x0e, 0x1f, 0x11, 0x11, 0x11, 0x1f, 0x1f, 0x10, 0x07, 0x0f, 0x10,
0x10, 0x10, 0x18, 0x0f, 0x03, 0x00, 0x0f, 0x1f, 0x10, 0x10, 0x00, 0x1f,
0x1f, 0x10, 0x10, 0x18, 0x17, 0x03, 0x02, 0x02, 0x02, 0x17, 0x1e, 0x18,
0x10, 0x03, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00,
0x00, 0x03, 0x0f, 0x18, 0x10, 0x10, 0x10, 0x10, 0x0f, 0x07, 0x00, 0x00,
0x10, 0x1f, 0x1f, 0x18, 0x10, 0x10, 0x11, 0x1b, 0x0e };
const unsigned char smooth_lb_bits[] = {
0x00, 0x00, 0x00, 0x1b, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1f,
0x07, 0x00, 0x1b, 0x0f, 0x00, 0x00, 0x00, 0x19, 0x11, 0x13, 0xff, 0x13,
0x06, 0x0e, 0x00, 0x00, 0x10, 0x10, 0x02, 0x02, 0x00, 0x09, 0x1f, 0x19,
0x10, 0x09, 0x06, 0x0f, 0x1b, 0x08, 0x10, 0x01, 0x13, 0x0e, 0x0c, 0x0c,
0x1a, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 0x40, 0x00, 0x00, 0x68, 0x3f,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0x01, 0x00, 0x00, 0x00, 0x50, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
0x18, 0x18, 0x28, 0x2d, 0x05, 0x00, 0x00, 0x03, 0x0c, 0x08, 0x10, 0x10,
0x0c, 0x07, 0x02, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18,
0x18, 0x18, 0x18, 0x1c, 0x1c, 0x08, 0x10, 0x00, 0x10, 0x01, 0x0f, 0x05,
0x02, 0x03, 0x00, 0x10, 0x10, 0x1f, 0x12, 0x10, 0x1c, 0x18, 0x10, 0x10,
0x18, 0x18, 0x0f, 0x03, 0x18, 0x08, 0x00, 0x10, 0x00, 0x0f, 0x05, 0x00,
0x00, 0x10, 0x15, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x18, 0x10, 0x10,
0x00, 0x1f, 0x05, 0x00, 0x01, 0x11, 0x11, 0x10, 0x1d, 0x0f, 0x03, 0x18,
0x18, 0x60, 0x38, 0x10, 0x01, 0x03, 0x03, 0x06, 0x00, 0x06, 0x0c, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x0c, 0x06, 0x00, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x1f, 0x18, 0x00,
0x00, 0x00, 0x17, 0x18, 0x60, 0x45, 0x5f, 0x00, 0x90, 0x00, 0x08, 0xdf,
0x40, 0x0c, 0x0f, 0x02, 0x00, 0x1c, 0x06, 0x03, 0x02, 0x02, 0x03, 0x07,
0x1f, 0x14, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x10, 0x11, 0x09, 0x07,
0x05, 0x0e, 0x18, 0x00, 0x00, 0x10, 0x10, 0x00, 0x0c, 0x04, 0x00, 0x1f,
0x10, 0x00, 0x10, 0x10, 0x08, 0x1c, 0x0e, 0x05, 0x00, 0x10, 0x1f, 0x10,
0x10, 0x10, 0x10, 0x11, 0x1c, 0x00, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x05, 0x0e, 0x1c, 0x08, 0x10, 0x00, 0x11, 0x10, 0x01, 0x0f,
0x00, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1f, 0x00, 0x00,
0x10, 0x1f, 0x00, 0x40, 0x80, 0x80, 0xc0, 0xff, 0x40, 0x00, 0x00, 0x10,
0x1f, 0x01, 0x03, 0x07, 0x06, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f,
0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x03,
0x07, 0x06, 0x02, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x1f, 0x00, 0x00,
0x00, 0x01, 0x01, 0x07, 0x1c, 0x1f, 0x00, 0x00, 0x05, 0x0e, 0x1c, 0x00,
0x10, 0x00, 0x10, 0x08, 0x0a, 0x07, 0x03, 0x00, 0x10, 0x1f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x1c, 0x00, 0x10, 0x30, 0x30, 0x08,
0x0a, 0x07, 0x03, 0x00, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1a,
0x10, 0x10, 0x1c, 0x08, 0x10, 0x10, 0x01, 0x11, 0x1b, 0x06, 0x00, 0x00,
0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0f, 0x04,
0x10, 0x00, 0x10, 0x18, 0x1c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17,
0x1a, 0x1a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x1d, 0x15,
0x01, 0x00, 0x00, 0x0b, 0x1d, 0x15, 0x01, 0x00, 0x00, 0x00, 0x18, 0x18,
0x07, 0x00, 0x01, 0x0e, 0x1e, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1c, 0x1f, 0x11, 0x11, 0x10, 0x10,
0x10, 0x1c, 0x7f, 0x40, 0x00, 0x40, 0x00, 0x00, 0x05, 0x2d, 0x28, 0x00,
0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c,
0x1a, 0x11, 0x01, 0x08, 0x1f, 0x10, 0x00, 0x10, 0x00, 0x1f, 0x08, 0x00,
0x00, 0x10, 0x18, 0x0f, 0x0f, 0x18, 0x18, 0x10, 0x10, 0x14, 0x0c, 0x0f,
0x18, 0x10, 0x00, 0x00, 0x08, 0x1f, 0x00, 0x10, 0x0b, 0x1d, 0x18, 0x10,
0x10, 0x08, 0x09, 0x05, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x8f,
0x98, 0x90, 0x80, 0x80, 0x48, 0x3f, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x00,
0x00, 0x1f, 0x10, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x40, 0x80, 0x80, 0x40,
0x7f, 0x00, 0x1f, 0x12, 0x03, 0x07, 0x1c, 0x10, 0x10, 0x00, 0x1f, 0x10,
0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x10, 0x00,
0x1f, 0x10, 0x10, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x00,
0x0f, 0x1c, 0x18, 0x10, 0x10, 0x00, 0x0f, 0x04, 0x00, 0xff, 0x88, 0x08,
0x00, 0x10, 0x00, 0x0f, 0x04, 0x0f, 0x18, 0x10, 0x00, 0x00, 0x88, 0xff,
0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x09, 0x11, 0x11, 0x12,
0x07, 0x0c, 0x00, 0x1f, 0x10, 0x10, 0x18, 0x00, 0x00, 0x1f, 0x18, 0x10,
0x00, 0x18, 0x1f, 0x10, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1a, 0x1a, 0x01,
0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0x18, 0x04, 0x01, 0x17, 0x18, 0x0a,
0x01, 0x00, 0x00, 0x10, 0x0b, 0x03, 0x07, 0x1c, 0x10, 0x10, 0x00, 0xc0,
0x81, 0x0b, 0x5e, 0x06, 0x03, 0x00, 0x00, 0x18, 0x18, 0x16, 0x17, 0x13,
0x10, 0x18, 0x01, 0x03, 0x7f, 0x42, 0x80, 0x00, 0xff, 0x00, 0x00, 0xc0,
0x7c, 0x42, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x0c, 0x1a, 0x11, 0x01, 0x08, 0x1f, 0x10, 0x00, 0x0f, 0x1c, 0x18,
0x10, 0x10, 0x00, 0x0f, 0x04, 0x00, 0x1f, 0x18, 0x10, 0x00, 0x18, 0x1f,
0x10, 0x00, 0x00, 0x14, 0x1e, 0x12, 0x02, 0x02, 0x03, 0x03, 0x1f, 0x14,
0x00, 0x05, 0x0e, 0x1c, 0x00, 0x10, 0x00, 0x10, 0x08, 0x0a, 0x07, 0x03,
0x00, 0x04, 0x0f, 0x04, 0x10, 0x00, 0x10, 0x18, 0x1c, 0x0f, 0x00, 0x10,
0x00, 0x1f, 0x00, 0x08, 0x10, 0x11, 0x11, 0x07, 0x0f };

View file

@ -0,0 +1,17 @@
const unsigned char smooth_info[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 2, 4,10, 7,13,12, 2, 4, 4, 7, 9, 3, 4, 2, 5,
8, 5, 8, 8, 8, 7, 8, 8, 8, 8, 2, 3, 9, 9, 9, 7,
14,11, 9,10,10, 9, 9,10,11, 4, 7,10,10,14,12,11,
9,11,11, 8,10,11,11,15,10,10, 9, 4, 5, 4, 9, 7,
4, 8, 9, 7, 9, 8, 7, 8, 9, 4, 5, 8, 4,14, 9, 8,
9, 8, 7, 6, 6, 9, 9,12, 8, 9, 7, 6, 2, 6, 9, 0,
8, 8, 9,11, 11, 11, 10
};
const unsigned char smooth_dlines = 2;

636
boop/display/fonty.c Normal file
View file

@ -0,0 +1,636 @@
/*
fonty.c - drawing text & font handling
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lcd.h"
#include "fonty.h"
#include "global.h"
#include "fonts/charset.info"
#include "fonts/charset.bits"
#include "fonts/smooth.info"
#include "fonts/smooth.bits"
extern unsigned char drawbuf[2][128];
extern unsigned int is_drawing;
static unsigned char tx, ty, coff, dbl;
unsigned char *font_bits, *font_info, font_dlines;
unsigned char *font_bitsUM, *font_bitsUL, *font_bitsMM, *font_bitsML, *font_bitsLM, *font_bitsLL;
unsigned char activefont;
void set_font(unsigned char f)
{
activefont = f;
switch(f)
{
case SMOOTHFONT:
coff = 0;
dbl = 16;
font_info = (unsigned char*) smooth_info;
font_bitsUM = (unsigned char*) smooth_mt_bits;
font_bitsUL = (unsigned char*) smooth_lt_bits;
font_bitsLM = (unsigned char*) smooth_mb_bits;
font_bitsLL = (unsigned char*) smooth_lb_bits;
font_dlines = smooth_dlines;
break;
case BOLDDOUBLEFONT:
coff = 96;
dbl = 1;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
case BOLDFONT:
coff = 96;
dbl = 0;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
case DOUBLEFONT:
coff = 0;
dbl = 1;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
default:
coff = 0;
dbl = 0;
font_bits = (unsigned char*) charset_bits;
font_info = (unsigned char*) charset_info;
font_dlines = charset_dlines;
break;
}
}
void _draw_char(unsigned int ch, unsigned char c, unsigned char m)
{
unsigned char p,q,r,s,t;
unsigned int cpos, cnt;
is_drawing++;
cpos = 0;
for(cnt=0; cnt<ch; cnt++)
{
if(cnt & 0x01)
{
cpos += (font_info[cnt>>1] & 0x0F);
}
else
{
cpos += (font_info[cnt>>1] >> 4);
}
}
p = font_info[ch>>1];
if(ch & 0x01)
{
p &= 0x0F;
}
else
{
p >>= 4;
}
if(dbl == 1)
{
if(ty & 0x07)
{
t = ty & 0x07;
p <<= 1;
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q << t;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q << t;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q >> (8-t);
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q >> (8-t);
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q << t;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q << t;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q >> (8-t);
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q >> (8-t);
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+16,p,m);
} // if (ty & 0x07)
else
{
p <<= 1;
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x01)
q += 0x03;;
if(s & 0x02)
q += 0x0C;;
if(s & 0x04)
q += 0x30;;
if(s & 0x08)
q += 0xC0;;
if(c & 0x02)
s = q;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt+=2)
{
r = p-cnt-1;
s = font_bits[cpos+(cnt>>1)];
q = 0x00;
if(s & 0x10)
q += 0x03;;
if(s & 0x20)
q += 0x0C;;
if(s & 0x40)
q += 0x30;;
if(s & 0x80)
q += 0xC0;;
if(c & 0x02)
s = q;
else
s = 0x00;
drawbuf[0][r] = s;
drawbuf[0][r-1] = s;
if(c & 0x01)
s = q;
else
s = 0x00;
drawbuf[1][r] = s;
drawbuf[1][r-1] = s;
}
do_rcu(tx,ty+8,p,m);
} // else if (ty & 0x07)
tx += p+2;
} // if (dbl == 1)
else
{
if(ty & 0x07)
{
s = ty & 0x07;
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt] << s;
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt] << s;
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt] >> (8-s);
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt] >> (8-s);
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty+8,p,m);
} // if (ty & 0x07)
else
{
for(cnt=0;cnt<p;cnt++)
{
if(c & 0x02)
drawbuf[0][p-cnt-1] = font_bits[cpos+cnt];
else
drawbuf[0][p-cnt-1] = 0x00;
if(c & 0x01)
drawbuf[1][p-cnt-1] = font_bits[cpos+cnt];
else
drawbuf[1][p-cnt-1] = 0x00;
}
do_rcu(tx,ty,p,m);
} // else if (ty & 0x07)
tx += (p+1);
} // else if (dbl == 1)
is_drawing--;
} // _draw_char
/// Draw function for Smooth Font
void _draw_charB(unsigned int ch, unsigned char c, unsigned char m)
{
unsigned char p, s;
unsigned int cpos, cnt;
is_drawing++;
cpos = 0;
for(cnt=0; cnt<ch; cnt++)
{
cpos += font_info[cnt];
}
p = font_info[ch];
if(dbl == 16)
{
if (ty & 0x07)
{
s = ty & 0x07;
for (cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsUM[cpos+cnt] << s;
drawbuf[1][p-cnt-1] = font_bitsUL[cpos+cnt] << s;
}
do_rcu (tx,ty,p,m);
for (cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsUM[cpos+cnt] >> (8-s);
drawbuf[1][p-cnt-1] = font_bitsUL[cpos+cnt] >> (8-s);
}
do_rcu (tx,ty+8,p,m);
for (cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsLM[cpos+cnt] << s;
drawbuf[1][p-cnt-1] = font_bitsLL[cpos+cnt] << s;
}
do_rcu (tx,ty+8,p,m);
for (cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsLM[cpos+cnt] >> (8-s);
drawbuf[1][p-cnt-1] = font_bitsLL[cpos+cnt] >> (8-s);
}
do_rcu (tx,ty+16,p,m);
} // if (ty & 0x07)
else
{
for(cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsUM[cpos+cnt];
drawbuf[1][p-cnt-1] = font_bitsUL[cpos+cnt];
}
do_rcu(tx,ty,p,m);
for(cnt=0;cnt<p;cnt++)
{
drawbuf[0][p-cnt-1] = font_bitsLM[cpos+cnt];
drawbuf[1][p-cnt-1] = font_bitsLL[cpos+cnt];
}
do_rcu(tx,ty+8,p,m);
} // else if (ty & 0x07)
tx += (p+1);
}
is_drawing--;
} // _draw_charB
void draw_char(unsigned char x, unsigned char y, unsigned char ch, unsigned char c, unsigned char m)
{
is_drawing++;
tx = x;
ty = y;
_draw_char(ch+coff, c, m);
is_drawing--;
}
void draw_string(unsigned char x, unsigned char y, char *st, unsigned char c, unsigned char m)
{
unsigned char cp;
is_drawing++;
tx = x;
ty = y;
cp = 0;
while(st[cp] != 0)
{
if (st[cp] == '\n')
{
tx = x;
if(!dbl)
ty += 9;
else
ty += 18;
}
else if (st[cp] == '\t')
{
tx=((tx/tabstep)+1)*tabstep;
}
else
{
if(dbl < 15)
_draw_char(st[cp]+coff, c, m);
else
_draw_charB(st[cp]+coff, c, m);
}
cp++;
}
is_drawing--;
}
unsigned short get_stringwidth (const char *st)
{
unsigned char cp;
unsigned char p;
unsigned short width;
unsigned short prevwidth;
width = 0;
prevwidth = 0;
cp = 0;
while(st[cp] != 0)
{
p=0;
if(st[cp] == '\n')
{
prevwidth = max(width,prevwidth);
width = 0;
}
else if(st[cp] == '\t')
{
// nothing ? TODO
}
else
{
if(dbl < 15)
{
p = font_info[(st[cp]+coff)>>1];
if((st[cp]+coff) & 0x01)
{
p &= 0x0F;
}
else
{
p >>= 4;
}
p +=1;
if(dbl == 1)
p <<= 1;
}
else
{
p = font_info[(unsigned char)(st[cp]+coff)];
p+=1;
}
}
width += p;
cp++;
}
width=max(width,prevwidth);
if (width)
width--;
return width;
}
unsigned short get_stringheight (const char *st)
{
unsigned char cp;
unsigned short height;
if(!dbl)
height = 8;
else
height = 16;
cp = 0;
while(st[cp] != 0)
{
if(st[cp] == '\n')
{
if(!dbl)
height += 9;
else
height += 18;
}
cp++;
}
return height;
}
extern char hval[16];
void draw_hexC(unsigned char x, unsigned char y, const unsigned char v, unsigned char c, unsigned char m)
{
is_drawing++;
tx = x;
ty = y;
_draw_char(hval[v>>4]+coff, c, m);
_draw_char(hval[v & 0x0F]+coff, c, m);
is_drawing--;
}
void draw_hexS(unsigned char x, unsigned char y, const unsigned short v, unsigned char c, unsigned char m)
{
is_drawing++;
tx = x;
ty = y;
draw_hexC(x, y, v >> 8, c, m);
draw_hexC(tx, ty, v & 0xFF, c, m);
is_drawing--;
}
void draw_hexW(unsigned char x, unsigned char y, const unsigned long v, unsigned char c, unsigned char m)
{
is_drawing++;
draw_hexS(x, y, v >> 16, c, m);
draw_hexS(tx, ty, v & 0xFFFF, c, m);
is_drawing--;
}
static unsigned long u_longval;
static unsigned char pos, inc;
static unsigned char num[12];
void get_digit(unsigned long tval)
{
unsigned char count;
count = 0;
while(u_longval >= tval)
{
count++;
u_longval -= tval;
}
num[pos] = '0' + count;
if(count)
inc = 1;
pos += inc;
}
void draw_numU(unsigned char x, unsigned char y, const unsigned long v, unsigned char z, unsigned char c, unsigned char m)
{
is_drawing++;
pos = 0;
u_longval = v;
if(z)
inc = 1;
else
inc = 0;
get_digit(1000000000);
get_digit(100000000);
get_digit(10000000);
get_digit(1000000);
get_digit(100000);
get_digit(10000);
get_digit(1000);
get_digit(100);
get_digit(10);
inc = 1;
get_digit(1);
num[pos] = 0x00;
draw_string(x, y, (char*)num, c, m);
is_drawing--;
}

49
boop/display/fonty.h Normal file
View file

@ -0,0 +1,49 @@
/*
fonty.h - drawing text & font handling
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FONTY_H
#define FONTY_H
#define SMALLFONT 0
#define DOUBLEFONT 1
#define BOLDFONT 2
#define BOLDDOUBLEFONT 3
#define SMOOTHFONT 4
#define SMALLFONT_HEIGHT 8
#define DOUBLEFONT_HEIGHT 16
#define BOLDFONT_HEIGHT 8
#define BOLDDOUBLEFONT_HEIGHT 16
#define SMOOTHFONT_HEIGHT 16
#define tabstep 24
unsigned char activefont;
void set_font(unsigned char f);
void draw_char(unsigned char x, unsigned char y, unsigned char ch, unsigned char c, unsigned char m);
void draw_string(unsigned char x, unsigned char y, char *st, unsigned char c, unsigned char m);
void draw_hexC(unsigned char x, unsigned char y, const unsigned char v, unsigned char c, unsigned char m);
void draw_hexS(unsigned char x, unsigned char y, const unsigned short v, unsigned char c, unsigned char m);
void draw_hexW(unsigned char x, unsigned char y, const unsigned long v, unsigned char c, unsigned char m);
void draw_numU(unsigned char x, unsigned char y, const unsigned long v, unsigned char z, unsigned char c, unsigned char m);
unsigned short get_stringwidth (const char *st);
unsigned short get_stringheight (const char *st);
#endif

113
boop/display/icon.h Normal file
View file

@ -0,0 +1,113 @@
/**********************************************************************
@file icon.c
@brief Definition of icon structure and appropriate functions
-----------------------------------------------------------------------
@author 2010 Roman Steiger
LeoTheLoewe [at] gmx [dot] de
-----------------------------------------------------------------------
Following compile flags are usable:
-----------------------------------------------------------------------
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
@History
1.00 20012010 RSt Creation
@end
***********************************************************************/
#ifndef __ICON_H__
#define __ICON_H__
///////////////////////////////////////////////////////////////////
// ICON can be defined in the appropriate C file before
// including that header or the related icon files to define the
// actual type of the icon structure:
//
// >> #define ICON iconElement_t
//
///////////////////////////////////////////////////////////////////
#ifndef ICON
#define ICON icon_t
#endif
///////////////////////////////////////////////////////////////////
// ICON_INFO can be defined in the appropriate C file before
// including that header to save one byte in the icon structure:
//
// >> #define ICON_INFO(i)
//
///////////////////////////////////////////////////////////////////
#ifndef ICON_INFO
#define ICON_INFO(i) /* info = */ i,
#define ICON_INFO_ELEMENT unsigned char info; // additional one byte (iconType_t might be larger)
#endif
#ifndef ICON_INFO_ELEMENT
#define ICON_INFO_ELEMENT
//#define ICON_IS_GRAY(i) 0
#define ICON_IS_GRAY(i) (sizeof(i.data) > (i.height/8 + (i.height%8 ? 1 : 0)) * i.width + 2);
#else
#define ICON_IS_GRAY(i) ((i)->info >= ICON_GRAY)
#endif
typedef enum iconInfo_e
{
ICON_BLACK_WHITE, /// 1 bpp
ICON_BLACK_WHITE_TRANSPARENT, /// 2 bpp
ICON_GRAY, /// 2 bpp
ICON_GRAY_TRANSPARENT, /// 3 bpp
ICON_MAX
} iconInfo_t;
typedef struct icon_s
{
unsigned char width;
unsigned char height;
ICON_INFO_ELEMENT
unsigned char data [];
} icon_t, *icon_p;
typedef struct iconElement_s
{
unsigned char width;
unsigned char height;
unsigned char data [];
} iconElement_t, *iconElement_p;
#ifdef __cplusplus
extern "C" {
#endif
//-----------------------------------------------------------------------------
extern void drawIcon (unsigned char x, unsigned char y,
const icon_t const *pIcon,
unsigned char c, unsigned char m);
extern void drawIconExt (unsigned char x, unsigned char y,
const unsigned char const *pData,
unsigned char width, unsigned char height, iconInfo_t iconInfo,
unsigned char c, unsigned char m);
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif // #ifndef __ICON_H__

173
boop/display/iconHourglas.h Normal file
View file

@ -0,0 +1,173 @@
////////////////////////////////////////////////////
// This file was generated by the tool GrayScaler.
// Source bitmap: R:\Project\GrayScaler\Icons\Hourglas.bmp
//
// ICON_GRAY - 2 bpp (Bit per Pixel)
// sizeof (iconHourglas.data) == 280
//
////////////////////////////////////////////////////
#include "icon.h"
#ifndef ICON_INFO
#define ICON_INFO(i) i,
#endif
const ICON iconHourglas =
{
/* width = */ 28,
/* height = */ 40,
/* info = */ ICON_INFO (ICON_GRAY)
/* data [] = */
{
// Bit 0 is the upper most pixel
// of the page, which is 8 pixel high
//--- Page 0 ---
0x0e, 0x11,
0x3f, 0x1e,
0x7f, 0x3a,
0xff, 0x6a,
0xff, 0xca,
0xff, 0xca,
0x3f, 0x0a,
0x3b, 0x0e,
0x3b, 0x0e,
0x3b, 0x0e,
0x3b, 0x0e,
0x3b, 0x0e,
0x3b, 0x0e,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0x3f, 0x0a,
0xff, 0xca,
0xff, 0xca,
0xff, 0x6a,
0x7f, 0x3a,
0x3f, 0x1e,
0x0e, 0x11,
//--- Page 1 ---
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0xff,
0xff, 0xff,
0xff, 0x0f,
0xfe, 0xfd,
0x70, 0xb8,
0xe0, 0x70,
0xc0, 0xa0,
0x80, 0x50,
0x30, 0x80,
0xf0, 0x00,
0xf0, 0x00,
0xf0, 0x00,
0xf0, 0x08,
0x70, 0x88,
0xb0, 0xc8,
0xd8, 0x64,
0x78, 0xe4,
0x36, 0xf8,
0xfe, 0xfd,
0xff, 0x0f,
0xff, 0xff,
0x00, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 2 ---
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0xff,
0xff, 0xff,
0xff, 0x00,
0xff, 0xff,
0x00, 0xff,
0x80, 0x80,
0xc1, 0xc0,
0x61, 0xb3,
0x3f, 0x12,
0x1c, 0x0f,
0x07, 0x00,
0x1d, 0x0e,
0x3f, 0x12,
0x63, 0xb5,
0xc1, 0xe2,
0x80, 0xc1,
0x00, 0x00,
0x00, 0xff,
0xff, 0xff,
0xff, 0x00,
0xff, 0xff,
0x00, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 3 ---
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0xff,
0xff, 0xff,
0xff, 0xfc,
0xff, 0x0f,
0x07, 0x0b,
0x81, 0x03,
0xc0, 0x01,
0xc0, 0x20,
0xe0, 0x10,
0xf0, 0x00,
0xf8, 0x00,
0xf0, 0x00,
0xe0, 0x10,
0xc0, 0x20,
0xc0, 0x01,
0x81, 0x03,
0x03, 0x87,
0x0e, 0x17,
0xff, 0x1f,
0xff, 0xf8,
0xff, 0xff,
0x00, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 4 ---
0x70, 0x88,
0xfc, 0x78,
0xfe, 0x7c,
0xff, 0x76,
0xff, 0x77,
0xff, 0x77,
0xff, 0x74,
0xfe, 0x75,
0xff, 0x74,
0xff, 0x74,
0xf7, 0x7c,
0xf7, 0x7c,
0xf7, 0x7c,
0xf7, 0x7c,
0xf7, 0x7c,
0xff, 0x74,
0xff, 0x74,
0xff, 0x74,
0xff, 0x74,
0xff, 0x74,
0xfe, 0x75,
0xff, 0x74,
0xff, 0x77,
0xff, 0x77,
0xff, 0x76,
0xfe, 0x7c,
0xfc, 0x78,
0x70, 0x88
}
};

View file

@ -0,0 +1,173 @@
////////////////////////////////////////////////////
// This file was generated by the tool GrayScaler.
// Source bitmap: L:\Betty\Sourcecode\SVN\Betty_sourceforge\boop\trunk\display\Hourglas_2bpp.bmp
//
// ICON_BLACK_WHITE - 1 bpp (Bit per Pixel)
// sizeof (iconHourglas2.data) == 140
//
////////////////////////////////////////////////////
#include "icon.h"
#ifndef ICON_INFO
#define ICON_INFO(i) i,
#endif
const ICON iconHourglas2 =
{
/* width = */ 28,
/* height = */ 40,
/* info = */ ICON_INFO (ICON_BLACK_WHITE)
/* data [] = */
{
// Bit 0 is the upper most pixel
// of the page, which is 8 pixel high
//--- Page 0 ---
0x0e,
0x3f,
0x7f,
0xff,
0xff,
0xff,
0x3f,
0x3b,
0x3b,
0x3b,
0x3b,
0x3b,
0x3b,
0x3f,
0x3f,
0x3f,
0x3f,
0x3f,
0x3f,
0x3f,
0x3f,
0x3f,
0xff,
0xff,
0xff,
0x7f,
0x3f,
0x0e,
//--- Page 1 ---
0x00,
0x00,
0x00,
0x00,
0xff,
0xff,
0xfe,
0x70,
0xe0,
0xc0,
0x80,
0x30,
0xf0,
0xf0,
0xf0,
0xf0,
0x70,
0xb0,
0xd8,
0x78,
0x36,
0xfe,
0xff,
0xff,
0x00,
0x00,
0x00,
0x00,
//--- Page 2 ---
0x00,
0x00,
0x00,
0x00,
0xff,
0xff,
0xff,
0x00,
0x80,
0xc1,
0x61,
0x3f,
0x1c,
0x07,
0x1d,
0x3f,
0x63,
0xc1,
0x80,
0x00,
0x00,
0xff,
0xff,
0xff,
0x00,
0x00,
0x00,
0x00,
//--- Page 3 ---
0x00,
0x00,
0x00,
0x00,
0xff,
0xff,
0xff,
0x07,
0x81,
0xc0,
0xc0,
0xe0,
0xf0,
0xf8,
0xf0,
0xe0,
0xc0,
0xc0,
0x81,
0x03,
0x0e,
0xff,
0xff,
0xff,
0x00,
0x00,
0x00,
0x00,
//--- Page 4 ---
0x70,
0xfc,
0xfe,
0xff,
0xff,
0xff,
0xff,
0xfe,
0xff,
0xff,
0xf7,
0xf7,
0xf7,
0xf7,
0xf7,
0xff,
0xff,
0xff,
0xff,
0xff,
0xfe,
0xff,
0xff,
0xff,
0xff,
0xfe,
0xfc,
0x70
}
};

View file

@ -0,0 +1,178 @@
////////////////////////////////////////////////////
// This file was generated by the tool GrayScaler.
// Source bitmap: L:\Betty\Sourcecode\SVN\Betty_sourceforge\boop\trunk\display\Hourglas_t_3bpp_t.bmp
//
// ICON_BLACK_WHITE_TRANSPARENT - 2 bpp (Bit per Pixel)
// sizeof (iconHourglas2_t.data) == 280
//
////////////////////////////////////////////////////
#include "icon.h"
#ifndef ICON_INFO
#define ICON_INFO(i) i,
#endif
const ICON iconHourglas2_t =
{
/* width = */ 28,
/* height = */ 40,
/* info = */ ICON_INFO (ICON_BLACK_WHITE_TRANSPARENT)
/* data [] = */
{
// Bit 0 is the upper most pixel
// of the page, which is 8 pixel high
//--- Page 0 ---
// v--- Alpha Channel
0x1f, 0x1f,
0x3f, 0x3f,
0x7f, 0x7f,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0x3f, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x7f, 0x7f,
0x3f, 0x3f,
0x1f, 0x1f,
//--- Page 1 ---
// v--- Alpha Channel
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xf8, 0xff,
0xf0, 0xff,
0xe0, 0xff,
0xd0, 0xff,
0xb0, 0xff,
0xf0, 0xff,
0xf0, 0xff,
0xf0, 0xff,
0xf8, 0xff,
0xf8, 0xff,
0xf8, 0xff,
0xfc, 0xff,
0xfc, 0xff,
0xfe, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 2 ---
// v--- Alpha Channel
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x80, 0x80,
0xc1, 0xc1,
0xf3, 0xf3,
0x3f, 0xff,
0x1f, 0xff,
0x07, 0xff,
0x1f, 0xff,
0x3f, 0xff,
0xf7, 0xf7,
0xe3, 0xe3,
0xc1, 0xc1,
0x00, 0x00,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 3 ---
// v--- Alpha Channel
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x0f, 0xff,
0x83, 0xff,
0xc1, 0xff,
0xe0, 0xff,
0xf0, 0xff,
0xf0, 0xff,
0xf8, 0xff,
0xf0, 0xff,
0xf0, 0xff,
0xe0, 0xff,
0xc1, 0xff,
0x83, 0xff,
0x87, 0xff,
0x1f, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
//--- Page 4 ---
// v--- Alpha Channel
0xf8, 0xf8,
0xfc, 0xfc,
0xfe, 0xfe,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xff, 0xff,
0xfe, 0xfe,
0xfc, 0xfc,
0xf8, 0xf8
}
};

View file

@ -0,0 +1,178 @@
////////////////////////////////////////////////////
// This file was generated by the tool GrayScaler.
// Source bitmap: R:\Project\GrayScaler\Icons\Hourglas_t.bmp
//
// ICON_GRAY_TRANSPARENT - 3 bpp (Bit per Pixel)
// sizeof (iconHourglas_t.data) == 420
//
////////////////////////////////////////////////////
#include "icon.h"
#ifndef ICON_INFO
#define ICON_INFO(i) i,
#endif
const ICON iconHourglas_t =
{
/* width = */ 28,
/* height = */ 40,
/* info = */ ICON_INFO (ICON_GRAY_TRANSPARENT)
/* data [] = */
{
// Bit 0 is the upper most pixel
// of the page, which is 8 pixel high
//--- Page 0 ---
// v--- Alpha Channel
0x0e, 0x11, 0x1f,
0x3f, 0x1e, 0x3f,
0x7f, 0x3a, 0x7f,
0xff, 0x6a, 0xff,
0xff, 0xca, 0xff,
0xff, 0xca, 0xff,
0x3f, 0x0a, 0xff,
0x3b, 0x0e, 0xff,
0x3b, 0x0e, 0xff,
0x3b, 0x0e, 0xff,
0x3b, 0x0e, 0xff,
0x3b, 0x0e, 0xff,
0x3b, 0x0e, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0x3f, 0x0a, 0xff,
0xff, 0xca, 0xff,
0xff, 0xca, 0xff,
0xff, 0x6a, 0xff,
0x7f, 0x3a, 0x7f,
0x3f, 0x1e, 0x3f,
0x0e, 0x11, 0x1f,
//--- Page 1 ---
// v--- Alpha Channel
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0x0f, 0xff,
0xfe, 0xfd, 0xff,
0x70, 0xb8, 0xff,
0xe0, 0x70, 0xff,
0xc0, 0xa0, 0xff,
0x80, 0x50, 0xff,
0x30, 0x80, 0xff,
0xf0, 0x00, 0xff,
0xf0, 0x00, 0xff,
0xf0, 0x00, 0xff,
0xf0, 0x08, 0xff,
0x70, 0x88, 0xff,
0xb0, 0xc8, 0xff,
0xd8, 0x64, 0xff,
0x78, 0xe4, 0xff,
0x36, 0xf8, 0xff,
0xfe, 0xfd, 0xff,
0xff, 0x0f, 0xff,
0xff, 0xff, 0xff,
0x00, 0xff, 0xff,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
//--- Page 2 ---
// v--- Alpha Channel
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0x00, 0xff,
0xff, 0xff, 0xff,
0x00, 0xff, 0xff,
0x80, 0x80, 0x80,
0xc1, 0xc0, 0xc1,
0x61, 0xb3, 0xf3,
0x3f, 0x12, 0xff,
0x1c, 0x0f, 0xff,
0x07, 0x00, 0xff,
0x1d, 0x0e, 0xff,
0x3f, 0x12, 0xff,
0x63, 0xb5, 0xf7,
0xc1, 0xe2, 0xe3,
0x80, 0xc1, 0xc1,
0x00, 0x00, 0x00,
0x00, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0x00, 0xff,
0xff, 0xff, 0xff,
0x00, 0xff, 0xff,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
//--- Page 3 ---
// v--- Alpha Channel
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xfc, 0xff,
0xff, 0x0f, 0xff,
0x07, 0x0b, 0xff,
0x81, 0x03, 0xff,
0xc0, 0x01, 0xff,
0xc0, 0x20, 0xff,
0xe0, 0x10, 0xff,
0xf0, 0x00, 0xff,
0xf8, 0x00, 0xff,
0xf0, 0x00, 0xff,
0xe0, 0x10, 0xff,
0xc0, 0x20, 0xff,
0xc0, 0x01, 0xff,
0x81, 0x03, 0xff,
0x03, 0x87, 0xff,
0x0e, 0x17, 0xff,
0xff, 0x1f, 0xff,
0xff, 0xf8, 0xff,
0xff, 0xff, 0xff,
0x00, 0xff, 0xff,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
//--- Page 4 ---
// v--- Alpha Channel
0x70, 0x88, 0xf8,
0xfc, 0x78, 0xfc,
0xfe, 0x7c, 0xfe,
0xff, 0x76, 0xff,
0xff, 0x77, 0xff,
0xff, 0x77, 0xff,
0xff, 0x74, 0xff,
0xfe, 0x75, 0xff,
0xff, 0x74, 0xff,
0xff, 0x74, 0xff,
0xf7, 0x7c, 0xff,
0xf7, 0x7c, 0xff,
0xf7, 0x7c, 0xff,
0xf7, 0x7c, 0xff,
0xf7, 0x7c, 0xff,
0xff, 0x74, 0xff,
0xff, 0x74, 0xff,
0xff, 0x74, 0xff,
0xff, 0x74, 0xff,
0xff, 0x74, 0xff,
0xfe, 0x75, 0xff,
0xff, 0x74, 0xff,
0xff, 0x77, 0xff,
0xff, 0x77, 0xff,
0xff, 0x76, 0xff,
0xfe, 0x7c, 0xfe,
0xfc, 0x78, 0xfc,
0x70, 0x88, 0xf8
}
};

1242
boop/display/lcd.c Normal file

File diff suppressed because it is too large Load diff

153
boop/display/lcd.h Normal file
View file

@ -0,0 +1,153 @@
/*
lcd.h - lcd control & graphics primitives
Copyright (C) 2007 Ch. Klippel <ck@mamalala.net>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LCD_H
#define LCD_H
// the lcd data & command ports
#define LCD_CMD (*((volatile unsigned char *) 0x81000000))
#define LCD_DATA (*((volatile unsigned char *) 0x81000001))
// LCD commands
#define LCD_CONTRAST 0x3A // original 0x3F (0..63)
#define LCD_GRAYMODE_88 0x00 // original 0x3F
#define LCD_GRAYMODE_89 0x00 // original 0x3F
#define LCD_GRAYMODE_8A 0x36 // original 0x33
#define LCD_GRAYMODE_8B 0x63 // original 0x33
#define LCD_GRAYMODE_8C 0x67 // original 0x66
#define LCD_GRAYMODE_8D 0x76 // original 0x66
#define LCD_GRAYMODE_8E 0xAC // original 0x99
#define LCD_GRAYMODE_8F 0xCA // original 0x99
#define LCD_DCDCx3 0x64 //
#define LCD_DCDCx4 0x65 //
#define LCD_DCDCx5 0x66 //
//~ #define LCD_DCDCx? 0x67 // ? datasheet p. 33
#define LCD_IRRR_1 0x20 //
#define LCD_IRRR_2 0x21 //
#define LCD_IRRR_3 0x22 //
#define LCD_IRRR_4 0x23 //
#define LCD_IRRR_5 0x24 //
#define LCD_IRRR_6 0x25 //
#define LCD_IRRR_7 0x26 //
#define LCD_IRRR_8 0x27 //
#define LCD_ALLON 0xA4 // black
#define LCD_ALLOFF 0xA5 // white
#define LCD_NORMAL 0xA6 //
#define LCD_REVERSE 0xA7 //
#define LCD_SLEEP 0xA9 // enter Sleep Mode. internal oscillator and LCD powersupply off
#define LCD_OSC_START 0xAB //
#define LCD_OFF 0xAE //
#define LCD_ON 0xAF //
#define LCD_WAKEUP 0xE1 //
#define LCD_RESET 0xE2 //
// drawmodes
#define DRAW_PUT 0
#define DRAW_XOR 1
#define DRAW_ERASE 2
#define DRAW_ALPHA 3
#define DRAW_NORCU 4
#define LCD_COLOR_W 0
#define LCD_COLOR_LG 1
#define LCD_COLOR_DG 2
#define LCD_COLOR_B 3
#define LCD_SIZE_X 128
#define LCD_SIZE_Y 160
#define ARROW_UP 1
#define ARROW_DOWN 2
#define ARROW_LEFT 3
#define ARROW_RIGHT 4
#define ARROW_LEN 4
#define TOP_LEFT 0
#define TOP_RIGHT 1
#define BOTTOM_LEFT 2
#define BOTTOM_RIGHT 3
#define BORDER_LEFT 0
#define BORDER_RIGHT 127
extern unsigned char drawbuf[2][LCD_SIZE_X];
extern unsigned int is_drawing;
extern volatile unsigned char symbols;
extern volatile unsigned char oldsymbols;
#define symbolRF (1<<0)
extern const unsigned char symIR[];
typedef void(*rcu_fn)(unsigned char x, unsigned char y, unsigned char l, unsigned char m);
typedef void (*rcuAlpha_fn) (unsigned char x, unsigned char y, unsigned char l, unsigned char m,
unsigned char* alphaBuf);
typedef void(*rcus_fn)(unsigned char x, unsigned char y, unsigned char m);
typedef void(*bl_fn)(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c, unsigned char m);
typedef void(*ln_fn)(unsigned char x, unsigned char y, unsigned char l, unsigned char c, unsigned char m);
// Function pointer to section (".text.fastcode")
extern rcu_fn do_rcu;
extern rcuAlpha_fn do_rcuAlpha;
extern rcus_fn do_rcuS;
extern bl_fn draw_block;
extern ln_fn draw_hline;
extern ln_fn draw_vline;
extern void lcd_set (unsigned char s);
extern void lcd_init (unsigned char s);
extern void lcd_enable (unsigned char e);
//extern void do_rcu(unsigned char x, unsigned char y, unsigned char l, unsigned char m);
//extern void do_rcuAlpha (unsigned char x, unsigned char y, unsigned char l, unsigned char m,
// unsigned char* alphaBuf);
//extern void do_rcuS(unsigned char x, unsigned char y, unsigned char m);
extern void lcd_set_contrast(unsigned char c);
extern void lcd_fill (unsigned char f);
extern void draw_logo (void);
//extern void draw_block (unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c, unsigned char m);
//extern void draw_hline (unsigned char x, unsigned char y, unsigned char l, unsigned char c, unsigned char m);
//extern void draw_vline (unsigned char x, unsigned char y, unsigned char l, unsigned char c, unsigned char m);
extern void draw_rect (unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char lw, unsigned char c, unsigned char m);
extern void draw_pixel (unsigned char x, unsigned char y, unsigned char c, unsigned char m);
extern void draw_line (unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2, unsigned char c, unsigned char m);
extern void draw_circle (unsigned char cx, unsigned char cy, unsigned char radius, unsigned char c, unsigned char m);
extern void draw_qcircle (unsigned char cx, unsigned char cy, unsigned char radius, unsigned char quarter, unsigned char c, unsigned char m);
extern void draw_disc (unsigned char cx, unsigned char cy, unsigned char radius, unsigned char c, unsigned char m);
extern void draw_qdisc (unsigned char cx, unsigned char cy, unsigned char radius, unsigned char quarter, unsigned char c, unsigned char m);
extern unsigned char draw_arrow (int x, int y, unsigned char ArrowDir, int ArrowLen, unsigned char Color, unsigned char Mode);
extern void draw_frame(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char t, unsigned char r, unsigned char c, unsigned char m);
extern void draw_symbol(unsigned char x, unsigned char y, unsigned char l,unsigned char* data, unsigned char c, unsigned char m);
extern void refresh_symbols(unsigned int cb);
extern void redraw_symbols(void);
extern void update_active_ind (void);
#endif