mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
Fix for virtual zap; Fix for png icon paint from getSize; TTX national tables from actual tux cvs; Starting to test ttx sub remember/autostart
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@322 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: baa6d3bfdd
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-02-12 (Fri, 12 Feb 2010)
This commit is contained in:
@@ -7,7 +7,8 @@ extern void tuxtxt_start(int tpid); // Start caching
|
||||
extern int tuxtxt_stop(); // Stop caching
|
||||
extern int tuxtx_main(int _rc, int pid, int page = 0);
|
||||
void tuxtx_stop_subtitle();
|
||||
int tuxtx_subtitle_running(int pid, int page, int *running);
|
||||
int tuxtx_subtitle_running(int *pid, int *page, int *running);
|
||||
void tuxtx_pause_subtitle(bool pause = 1);
|
||||
void tuxtx_set_pid(int pid, int page);
|
||||
|
||||
#endif
|
||||
|
@@ -16,13 +16,13 @@
|
||||
#include "tuxtxt.h"
|
||||
#include <dmx_cs.h>
|
||||
#include "driver/framebuffer.h"
|
||||
#include "teletext.h"
|
||||
|
||||
void FillRect(int x, int y, int w, int h, int color)
|
||||
{
|
||||
unsigned char *p = lfb + x*4 + y * fix_screeninfo.line_length;
|
||||
#if 1
|
||||
unsigned int col = bgra[color][3] << 24 | bgra[color][2] << 16 | bgra[color][1] << 8 | bgra[color][0];
|
||||
|
||||
if (w > 0)
|
||||
for (int count = 0; count < h; count++) {
|
||||
unsigned int * dest0 = (unsigned int *)p;
|
||||
@@ -219,7 +219,8 @@ void RenderClearMenuLineBB(char *p, tstPageAttr *attrcol, tstPageAttr *attr)
|
||||
|
||||
void ClearBB(int color)
|
||||
{
|
||||
FillRect(0,(var_screeninfo.yres-var_screeninfo.yoffset),fix_screeninfo.line_length,var_screeninfo.yres, color);
|
||||
FillRect(0,(var_screeninfo.yres-var_screeninfo.yoffset),var_screeninfo.xres,var_screeninfo.yres, color);
|
||||
//FillRect(0,(var_screeninfo.yres-var_screeninfo.yoffset),fix_screeninfo.line_length,var_screeninfo.yres, color);
|
||||
}
|
||||
|
||||
void ClearFB(int /*color*/)
|
||||
@@ -230,7 +231,7 @@ void ClearFB(int /*color*/)
|
||||
|
||||
void ClearB(int color)
|
||||
{
|
||||
FillRect(0,0,fix_screeninfo.line_length,var_screeninfo.yres*2,color);
|
||||
FillRect(0,0,var_screeninfo.xres,var_screeninfo.yres*2,color);
|
||||
}
|
||||
|
||||
|
||||
@@ -1016,37 +1017,37 @@ int eval_triplet(int iOData, tstCachedPage *pstCachedPage,
|
||||
|
||||
return 0; /* normal exit, no termination */
|
||||
}
|
||||
|
||||
int setnational(unsigned char sec)
|
||||
{
|
||||
switch (sec)
|
||||
{
|
||||
case 0x08:
|
||||
return NAT_PL; //polish
|
||||
case 0x16:
|
||||
case 0x36:
|
||||
return NAT_TR; //turkish
|
||||
case 0x1d:
|
||||
return NAT_SR; //serbian, croatian, slovenian
|
||||
case 0x20:
|
||||
case 0x24:
|
||||
case 0x25:
|
||||
return NAT_RU; // cyrillic
|
||||
case 0x22:
|
||||
return NAT_ET; // estonian
|
||||
case 0x23:
|
||||
return NAT_LV; // latvian, lithuanian
|
||||
case 0x37:
|
||||
return NAT_GR; // greek
|
||||
case 0x47:
|
||||
case 0x57:
|
||||
// TODO : arabic
|
||||
break;
|
||||
case 0x55:
|
||||
// TODO : hebrew
|
||||
break;
|
||||
|
||||
}
|
||||
return countryconversiontable[sec & 0x07];
|
||||
switch (sec)
|
||||
{
|
||||
case 0x08:
|
||||
return NAT_PL; //polish
|
||||
case 0x16:
|
||||
case 0x36:
|
||||
return NAT_TR; //turkish
|
||||
case 0x1d:
|
||||
return NAT_SR; //serbian, croatian, slovenian
|
||||
case 0x20:
|
||||
return NAT_SC; // serbian, croatian
|
||||
case 0x24:
|
||||
return NAT_RB; // russian, bulgarian
|
||||
case 0x25:
|
||||
return NAT_UA; // ukrainian
|
||||
case 0x22:
|
||||
return NAT_ET; // estonian
|
||||
case 0x23:
|
||||
return NAT_LV; // latvian, lithuanian
|
||||
case 0x37:
|
||||
return NAT_GR; // greek
|
||||
case 0x55:
|
||||
return NAT_HB; // hebrew
|
||||
case 0x47:
|
||||
case 0x57:
|
||||
return NAT_AR; // arabic
|
||||
}
|
||||
return countryconversiontable[sec & 0x07];
|
||||
}
|
||||
|
||||
/* evaluate level 2.5 information */
|
||||
@@ -1482,12 +1483,14 @@ static pthread_t ttx_sub_thread;
|
||||
static int reader_running;
|
||||
static int ttx_paused;
|
||||
static int ttx_req_pause;
|
||||
static int sub_pid, sub_page;
|
||||
static bool use_gui;
|
||||
|
||||
static void* reader_thread(void * /*arg*/)
|
||||
{
|
||||
printf("TuxTxt subtitle thread started\n");
|
||||
reader_running = 1;
|
||||
ttx_paused = 0;
|
||||
//ttx_paused = 0;
|
||||
while(reader_running) {
|
||||
if(ttx_paused)
|
||||
usleep(10);
|
||||
@@ -1507,12 +1510,15 @@ static void* reader_thread(void * /*arg*/)
|
||||
|
||||
void tuxtx_pause_subtitle(bool pause)
|
||||
{
|
||||
if(!reader_running)
|
||||
return;
|
||||
|
||||
if(!pause)
|
||||
if(!pause) {
|
||||
printf("TuxTxt subtitle unpause, running %d pid %d page %d\n", reader_running, sub_pid, sub_page);
|
||||
ttx_paused = 0;
|
||||
if(!reader_running && sub_pid && sub_page)
|
||||
tuxtx_main(0, sub_pid, sub_page);
|
||||
}
|
||||
else {
|
||||
if(!reader_running)
|
||||
return;
|
||||
printf("TuxTxt subtitle asking to pause...\n");
|
||||
ttx_req_pause = 1;
|
||||
while(!ttx_paused)
|
||||
@@ -1528,32 +1534,55 @@ void tuxtx_stop_subtitle()
|
||||
if(ttx_sub_thread)
|
||||
pthread_join(ttx_sub_thread, NULL);
|
||||
ttx_sub_thread = NULL;
|
||||
sub_pid = sub_page = 0;
|
||||
ttx_paused = 0;
|
||||
}
|
||||
|
||||
int tuxtx_subtitle_running(int pid, int page, int *running)
|
||||
void tuxtx_set_pid(int pid, int page)
|
||||
{
|
||||
if(reader_running)
|
||||
tuxtx_stop_subtitle();
|
||||
|
||||
sub_pid = pid;
|
||||
sub_page = page;
|
||||
printf("TuxTxt subtitle set pid %d page %d\n", sub_pid, sub_page);
|
||||
#if 0
|
||||
ttx_paused = 1;
|
||||
if(sub_pid && sub_page)
|
||||
tuxtx_main(0, sub_pid, sub_page);
|
||||
#endif
|
||||
}
|
||||
|
||||
int tuxtx_subtitle_running(int *pid, int *page, int *running)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if(running)
|
||||
*running = reader_running;
|
||||
|
||||
if(reader_running && (tuxtxt_cache.vtxtpid == pid) && (tuxtxt_cache.page == page))
|
||||
if(reader_running && (tuxtxt_cache.vtxtpid == *pid) && (tuxtxt_cache.page == *page))
|
||||
{
|
||||
return 1;
|
||||
ret = 1;
|
||||
}
|
||||
return 0;
|
||||
*pid = sub_pid;
|
||||
*page = sub_page;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int tuxtx_main(int _rc, int pid, int page)
|
||||
{
|
||||
char cvs_revision[] = "$Revision: 1.95 $";
|
||||
|
||||
bool use_gui = 1;
|
||||
use_gui = 1;
|
||||
//printf("to init tuxtxt\n");fflush(stdout);
|
||||
#if !TUXTXT_CFG_STANDALONE
|
||||
int initialized = tuxtxt_init();
|
||||
if (initialized)
|
||||
tuxtxt_cache.page = 0x100;
|
||||
if(page) {
|
||||
tuxtxt_cache.page = page;
|
||||
sub_page = tuxtxt_cache.page = page;
|
||||
sub_pid = pid;
|
||||
use_gui = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -2431,52 +2460,54 @@ skip_pid:
|
||||
/******************************************************************************
|
||||
* GetNationalSubset *
|
||||
******************************************************************************/
|
||||
|
||||
int GetNationalSubset(char *cc)
|
||||
{
|
||||
if (memcmp(cc, "cze", 3) == 0 || memcmp(cc, "ces", 3) == 0 ||
|
||||
memcmp(cc, "slo", 3) == 0 || memcmp(cc, "slk", 3) == 0)
|
||||
return 0;
|
||||
if (memcmp(cc, "eng", 3) == 0)
|
||||
return 1;
|
||||
if (memcmp(cc, "est", 3) == 0)
|
||||
return 2;
|
||||
if (memcmp(cc, "fre", 3) == 0 || memcmp(cc, "fra", 3) == 0)
|
||||
return 3;
|
||||
if (memcmp(cc, "ger", 3) == 0 || memcmp(cc, "deu", 3) == 0)
|
||||
return 4;
|
||||
if (memcmp(cc, "ita", 3) == 0)
|
||||
return 5;
|
||||
if (memcmp(cc, "lav", 3) == 0 || memcmp(cc, "lit", 3) == 0)
|
||||
return 6;
|
||||
if (memcmp(cc, "pol", 3) == 0)
|
||||
return 7;
|
||||
if (memcmp(cc, "spa", 3) == 0 || memcmp(cc, "por", 3) == 0)
|
||||
return 8;
|
||||
if (memcmp(cc, "rum", 3) == 0 || memcmp(cc, "ron", 3) == 0)
|
||||
return 9;
|
||||
if (memcmp(cc, "scc", 3) == 0 || memcmp(cc, "srp", 3) == 0 ||
|
||||
memcmp(cc, "scr", 3) == 0 || memcmp(cc, "hrv", 3) == 0 ||
|
||||
memcmp(cc, "slv", 3) == 0)
|
||||
return 10;
|
||||
if (memcmp(cc, "swe", 3) == 0 ||
|
||||
memcmp(cc, "dan", 3) == 0 ||
|
||||
memcmp(cc, "nor", 3) == 0 ||
|
||||
memcmp(cc, "fin", 3) == 0 ||
|
||||
memcmp(cc, "hun", 3) == 0)
|
||||
return 11;
|
||||
if (memcmp(cc, "tur", 3) == 0)
|
||||
return 12;
|
||||
if (memcmp(cc, "rus", 3) == 0 ||
|
||||
memcmp(cc, "bul", 3) == 0 ||
|
||||
memcmp(cc, "ser", 3) == 0 ||
|
||||
memcmp(cc, "cro", 3) == 0 ||
|
||||
memcmp(cc, "ukr", 3) == 0)
|
||||
return NAT_RU;
|
||||
if (memcmp(cc, "gre", 3) == 0)
|
||||
return NAT_GR;
|
||||
|
||||
return NAT_DEFAULT; /* use default charset */
|
||||
if (memcmp(cc, "cze", 3) == 0 || memcmp(cc, "ces", 3) == 0 ||
|
||||
memcmp(cc, "slo", 3) == 0 || memcmp(cc, "slk", 3) == 0)
|
||||
return 0;
|
||||
if (memcmp(cc, "eng", 3) == 0)
|
||||
return 1;
|
||||
if (memcmp(cc, "est", 3) == 0)
|
||||
return 2;
|
||||
if (memcmp(cc, "fre", 3) == 0 || memcmp(cc, "fra", 3) == 0)
|
||||
return 3;
|
||||
if (memcmp(cc, "ger", 3) == 0 || memcmp(cc, "deu", 3) == 0)
|
||||
return 4;
|
||||
if (memcmp(cc, "ita", 3) == 0)
|
||||
return 5;
|
||||
if (memcmp(cc, "lav", 3) == 0 || memcmp(cc, "lit", 3) == 0)
|
||||
return 6;
|
||||
if (memcmp(cc, "pol", 3) == 0)
|
||||
return 7;
|
||||
if (memcmp(cc, "spa", 3) == 0 || memcmp(cc, "por", 3) == 0)
|
||||
return 8;
|
||||
if (memcmp(cc, "rum", 3) == 0 || memcmp(cc, "ron", 3) == 0)
|
||||
return 9;
|
||||
if (memcmp(cc, "scc", 3) == 0 || memcmp(cc, "srp", 3) == 0 ||
|
||||
memcmp(cc, "scr", 3) == 0 || memcmp(cc, "hrv", 3) == 0 ||
|
||||
memcmp(cc, "slv", 3) == 0)
|
||||
return 10;
|
||||
if (memcmp(cc, "swe", 3) == 0 ||
|
||||
memcmp(cc, "dan", 3) == 0 ||
|
||||
memcmp(cc, "nor", 3) == 0 ||
|
||||
memcmp(cc, "fin", 3) == 0 ||
|
||||
memcmp(cc, "hun", 3) == 0)
|
||||
return 11;
|
||||
if (memcmp(cc, "tur", 3) == 0)
|
||||
return 12;
|
||||
if (memcmp(cc, "rus", 3) == 0 || memcmp(cc, "bul", 3) == 0)
|
||||
return NAT_RB;
|
||||
if (memcmp(cc, "ser", 3) == 0 || memcmp(cc, "cro", 3) == 0)
|
||||
return NAT_SC;
|
||||
if (memcmp(cc, "ukr", 3) == 0)
|
||||
return NAT_UA;
|
||||
if (memcmp(cc, "gre", 3) == 0)
|
||||
return NAT_GR;
|
||||
if (memcmp(cc, "heb", 3) == 0)
|
||||
return NAT_HB;
|
||||
if (memcmp(cc, "ara", 3) == 0)
|
||||
return NAT_AR;
|
||||
return NAT_DEFAULT; /* use default charset */
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -4247,26 +4278,35 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
}
|
||||
|
||||
// G0+G2 set designation
|
||||
if (Attribute->setG0G2 != 0x3f)
|
||||
{
|
||||
switch (Attribute->setG0G2)
|
||||
{
|
||||
case 0x20 :
|
||||
case 0x24 :
|
||||
case 0x25 :
|
||||
national_subset_local = NAT_RU;
|
||||
break;
|
||||
case 0x37:
|
||||
national_subset_local = NAT_GR;
|
||||
break;
|
||||
//TODO: arabic and hebrew
|
||||
default:
|
||||
national_subset_local = countryconversiontable[Attribute->setG0G2 & 0x07];
|
||||
break;
|
||||
if (Attribute->setG0G2 != 0x3f)
|
||||
{
|
||||
switch (Attribute->setG0G2)
|
||||
{
|
||||
case 0x20 :
|
||||
national_subset_local = NAT_SC;
|
||||
break;
|
||||
case 0x24 :
|
||||
national_subset_local = NAT_RB;
|
||||
break;
|
||||
case 0x25 :
|
||||
national_subset_local = NAT_UA;
|
||||
break;
|
||||
case 0x37:
|
||||
national_subset_local = NAT_GR;
|
||||
break;
|
||||
case 0x55:
|
||||
national_subset_local = NAT_HB;
|
||||
break;
|
||||
case 0x47:
|
||||
case 0x57:
|
||||
national_subset_local = NAT_AR;
|
||||
break;
|
||||
default:
|
||||
national_subset_local = countryconversiontable[Attribute->setG0G2 & 0x07];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (Attribute->charset == C_G0S) // use secondary charset
|
||||
national_subset_local = national_subset_secondary;
|
||||
if (zoom && Attribute->doubleh)
|
||||
@@ -4313,7 +4353,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
|
||||
/* handle mosaic */
|
||||
if ((Attribute->charset == C_G1C || Attribute->charset == C_G1S) &&
|
||||
((Char&0xA0) == 0x20))
|
||||
((Char&0xA0) == 0x20))
|
||||
{
|
||||
int w1 = (curfontwidth / 2 ) *xfactor;
|
||||
int w2 = (curfontwidth - w1) *xfactor;
|
||||
@@ -4400,14 +4440,15 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
}
|
||||
axdrcs[12] = curfontwidth; /* adjust last x-offset according to position, FIXME: double width */
|
||||
RenderDRCS(p,
|
||||
lfb + PosX*4 + (yoffset + PosY) * fix_screeninfo.line_length,
|
||||
axdrcs, fgcolor, bgcolor);
|
||||
lfb + PosX*4 + (yoffset + PosY) * fix_screeninfo.line_length,
|
||||
axdrcs, fgcolor, bgcolor);
|
||||
}
|
||||
else
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, factor*fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
}
|
||||
#if 0//old
|
||||
else if (Attribute->charset == C_G2 && Char >= 0x20 && Char <= 0x7F)
|
||||
{
|
||||
if (national_subset_local == NAT_GR)
|
||||
@@ -4435,127 +4476,152 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
Char = nationaltable23[NAT_DE][Char-0x23]; /* #$ as in german option */
|
||||
else if (national_subset_local == NAT_RU && Char >= 0x40 && Char <= 0x7E) /* remap complete areas for cyrillic */
|
||||
Char = G0tablecyrillic[Char-0x20];
|
||||
#endif
|
||||
else if (Attribute->charset == C_G2 && Char >= 0x20 && Char <= 0x7F)
|
||||
{
|
||||
if ((national_subset_local == NAT_SC) || (national_subset_local == NAT_RB) || (national_subset_local == NAT_UA))
|
||||
Char = G2table[1][Char-0x20];
|
||||
else if (national_subset_local == NAT_GR)
|
||||
Char = G2table[2][Char-0x20];
|
||||
else if (national_subset_local == NAT_AR)
|
||||
Char = G2table[3][Char-0x20];
|
||||
else
|
||||
Char = G2table[0][Char-0x20];
|
||||
}
|
||||
else if (national_subset_local == NAT_SC && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for serbian/croatian */
|
||||
Char = G0table[0][Char-0x20];
|
||||
else if (national_subset_local == NAT_RB && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for russian/bulgarian */
|
||||
Char = G0table[1][Char-0x20];
|
||||
else if (national_subset_local == NAT_UA && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for ukrainian */
|
||||
Char = G0table[2][Char-0x20];
|
||||
else if (national_subset_local == NAT_GR && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for greek */
|
||||
Char = G0table[3][Char-0x20];
|
||||
else if (national_subset_local == NAT_HB && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for hebrew */
|
||||
Char = G0table[4][Char-0x20];
|
||||
else if (national_subset_local == NAT_AR && Char >= 0x20 && Char <= 0x7F) /* remap complete areas for arabic */
|
||||
Char = G0table[5][Char-0x20];
|
||||
|
||||
else
|
||||
{
|
||||
/* load char */
|
||||
switch (Char)
|
||||
{
|
||||
case 0x00:
|
||||
case 0x20:
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, factor*fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0x23:
|
||||
case 0x24:
|
||||
Char = nationaltable23[national_subset_local][Char-0x23];
|
||||
break;
|
||||
case 0x40:
|
||||
Char = nationaltable40[national_subset_local];
|
||||
break;
|
||||
case 0x5B:
|
||||
case 0x5C:
|
||||
case 0x5D:
|
||||
case 0x5E:
|
||||
case 0x5F:
|
||||
case 0x60:
|
||||
Char = nationaltable5b[national_subset_local][Char-0x5B];
|
||||
break;
|
||||
case 0x7B:
|
||||
case 0x7C:
|
||||
case 0x7D:
|
||||
case 0x7E:
|
||||
Char = nationaltable7b[national_subset_local][Char-0x7B];
|
||||
break;
|
||||
case 0x7F:
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, factor*ascender, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset + factor*ascender, curfontwidth, factor*(fontheight-ascender), bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE0: /* |- */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX, PosY + yoffset +1, fontheight -1, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset +1, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE1: /* - */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE2: /* -| */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset +1, fontheight -1, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE3: /* | */
|
||||
DrawVLine(PosX, PosY + yoffset, fontheight, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE4: /* | */
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset, fontheight, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE5: /* |_ */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX, PosY + yoffset, fontheight -1, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE6: /* _ */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE7: /* _| */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset, fontheight -1, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE8: /* Ii */
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
for (Row=0; Row < curfontwidth/2; Row++)
|
||||
DrawVLine(PosX + Row, PosY + yoffset + Row, fontheight - Row, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE9: /* II */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth/2, fontheight, fgcolor);
|
||||
FillRect(PosX + curfontwidth/2, PosY + yoffset, (curfontwidth+1)/2, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEA: /* <20> */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, fontheight, bgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth/2, curfontwidth/2, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEB: /* <20> */
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth, fontheight -1, bgcolor);
|
||||
for (Row=0; Row < curfontwidth/2; Row++)
|
||||
DrawHLine(PosX + Row, PosY + yoffset + Row, curfontwidth - Row, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEC: /* -- */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, curfontwidth/2, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset + curfontwidth/2, curfontwidth, fontheight - curfontwidth/2, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xED:
|
||||
case 0xEE:
|
||||
case 0xEF:
|
||||
case 0xF0:
|
||||
case 0xF1:
|
||||
case 0xF2:
|
||||
case 0xF3:
|
||||
case 0xF4:
|
||||
case 0xF5:
|
||||
case 0xF6:
|
||||
Char = arrowtable[Char - 0xED];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 0x00:
|
||||
case 0x20:
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, factor*fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0x23:
|
||||
case 0x24:
|
||||
Char = nationaltable23[national_subset_local][Char-0x23];
|
||||
break;
|
||||
case 0x40:
|
||||
Char = nationaltable40[national_subset_local];
|
||||
break;
|
||||
case 0x5B:
|
||||
case 0x5C:
|
||||
case 0x5D:
|
||||
case 0x5E:
|
||||
case 0x5F:
|
||||
case 0x60:
|
||||
Char = nationaltable5b[national_subset_local][Char-0x5B];
|
||||
break;
|
||||
case 0x7B:
|
||||
case 0x7C:
|
||||
case 0x7D:
|
||||
case 0x7E:
|
||||
Char = nationaltable7b[national_subset_local][Char-0x7B];
|
||||
break;
|
||||
case 0x7F:
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, factor*ascender, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset + factor*ascender, curfontwidth, factor*(fontheight-ascender), bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE0: /* |- */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX, PosY + yoffset +1, fontheight -1, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset +1, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE1: /* - */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE2: /* -| */
|
||||
DrawHLine(PosX, PosY + yoffset, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset +1, fontheight -1, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE3: /* | */
|
||||
DrawVLine(PosX, PosY + yoffset, fontheight, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE4: /* | */
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset, fontheight, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE5: /* |_ */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX, PosY + yoffset, fontheight -1, fgcolor);
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE6: /* _ */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE7: /* _| */
|
||||
DrawHLine(PosX, PosY + yoffset + fontheight -1, curfontwidth, fgcolor);
|
||||
DrawVLine(PosX + curfontwidth -1, PosY + yoffset, fontheight -1, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth-1, fontheight-1, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE8: /* Ii */
|
||||
FillRect(PosX +1, PosY + yoffset, curfontwidth -1, fontheight, bgcolor);
|
||||
for (Row=0; Row < curfontwidth/2; Row++)
|
||||
DrawVLine(PosX + Row, PosY + yoffset + Row, fontheight - Row, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xE9: /* II */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth/2, fontheight, fgcolor);
|
||||
FillRect(PosX + curfontwidth/2, PosY + yoffset, (curfontwidth+1)/2, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEA: /* <20> */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, fontheight, bgcolor);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth/2, curfontwidth/2, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEB: /* <20> */
|
||||
FillRect(PosX, PosY + yoffset +1, curfontwidth, fontheight -1, bgcolor);
|
||||
for (Row=0; Row < curfontwidth/2; Row++)
|
||||
DrawHLine(PosX + Row, PosY + yoffset + Row, curfontwidth - Row, fgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xEC: /* -- */
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, curfontwidth/2, fgcolor);
|
||||
FillRect(PosX, PosY + yoffset + curfontwidth/2, curfontwidth, fontheight - curfontwidth/2, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
return;
|
||||
case 0xED:
|
||||
case 0xEE:
|
||||
case 0xEF:
|
||||
case 0xF0:
|
||||
case 0xF1:
|
||||
case 0xF2:
|
||||
case 0xF3:
|
||||
case 0xF4:
|
||||
case 0xF5:
|
||||
case 0xF6:
|
||||
Char = arrowtable[Char - 0xED];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Char <= 0x20)
|
||||
@@ -4584,7 +4650,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
{
|
||||
#if TUXTXT_DEBUG
|
||||
printf("TuxTxt <FTC_SBitCache_Lookup: 0x%x> c%x a%x g%x w%d h%d x%d y%d\n",
|
||||
error, Char, (int) Attribute, glyph, curfontwidth, fontheight, PosX, PosY);
|
||||
error, Char, (int) Attribute, glyph, curfontwidth, fontheight, PosX, PosY);
|
||||
#endif
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, fontheight, bgcolor);
|
||||
PosX += curfontwidth;
|
||||
@@ -4598,105 +4664,117 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
|
||||
if (Attribute->diacrit)
|
||||
{
|
||||
FTC_SBit sbit_diacrit;
|
||||
|
||||
#if 0
|
||||
if (national_subset_local == NAT_GR)
|
||||
Char = G2table[2][0x20+ Attribute->diacrit];
|
||||
else if (national_subset_local == NAT_RU)
|
||||
Char = G2table[1][0x20+ Attribute->diacrit];
|
||||
else
|
||||
Char = G2table[0][0x20+ Attribute->diacrit];
|
||||
#endif
|
||||
if ((national_subset_local == NAT_SC) || (national_subset_local == NAT_RB) || (national_subset_local == NAT_UA))
|
||||
Char = G2table[1][0x20+ Attribute->diacrit];
|
||||
else if (national_subset_local == NAT_GR)
|
||||
Char = G2table[2][0x20+ Attribute->diacrit];
|
||||
else if (national_subset_local == NAT_HB)
|
||||
Char = G2table[3][0x20+ Attribute->diacrit];
|
||||
else if (national_subset_local == NAT_AR)
|
||||
Char = G2table[4][0x20+ Attribute->diacrit];
|
||||
else
|
||||
Char = G2table[0][0x20+ Attribute->diacrit];
|
||||
|
||||
if ((glyph = FT_Get_Char_Index(face, Char)))
|
||||
{
|
||||
if ((error = FTC_SBitCache_Lookup(cache, &typettf, glyph, &sbit_diacrit, NULL)) == 0)
|
||||
|
||||
{
|
||||
sbitbuffer = (unsigned char*) localbuffer;
|
||||
memcpy(sbitbuffer,sbit->buffer,sbit->pitch*sbit->height);
|
||||
sbitbuffer = (unsigned char*) localbuffer;
|
||||
memcpy(sbitbuffer,sbit->buffer,sbit->pitch*sbit->height);
|
||||
|
||||
for (Row = 0; Row < sbit->height; Row++)
|
||||
for (Row = 0; Row < sbit->height; Row++)
|
||||
{
|
||||
for (Pitch = 0; Pitch < sbit->pitch; Pitch++)
|
||||
{
|
||||
for (Pitch = 0; Pitch < sbit->pitch; Pitch++)
|
||||
{
|
||||
if (sbit_diacrit->pitch > Pitch && sbit_diacrit->height > Row)
|
||||
sbitbuffer[Row*sbit->pitch+Pitch] |= sbit_diacrit->buffer[Row*sbit->pitch+Pitch];
|
||||
}
|
||||
if (sbit_diacrit->pitch > Pitch && sbit_diacrit->height > Row)
|
||||
sbitbuffer[Row*sbit->pitch+Pitch] |= sbit_diacrit->buffer[Row*sbit->pitch+Pitch];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char *p;
|
||||
int f; /* running counter for zoom factor */
|
||||
unsigned char *p;
|
||||
int f; /* running counter for zoom factor */
|
||||
|
||||
Row = factor * (ascender - sbit->top + TTFShiftY);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, Row, bgcolor); /* fill upper margin */
|
||||
Row = factor * (ascender - sbit->top + TTFShiftY);
|
||||
FillRect(PosX, PosY + yoffset, curfontwidth, Row, bgcolor); /* fill upper margin */
|
||||
|
||||
if (ascender - sbit->top + TTFShiftY + sbit->height > fontheight)
|
||||
sbit->height = fontheight - ascender + sbit->top - TTFShiftY; /* limit char height to defined/calculated fontheight */
|
||||
if (ascender - sbit->top + TTFShiftY + sbit->height > fontheight)
|
||||
sbit->height = fontheight - ascender + sbit->top - TTFShiftY; /* limit char height to defined/calculated fontheight */
|
||||
|
||||
|
||||
p = lfb + PosX*4 + (yoffset + PosY + Row) * fix_screeninfo.line_length; /* running pointer into framebuffer */
|
||||
for (Row = sbit->height; Row; Row--) /* row counts up, but down may be a little faster :) */
|
||||
p = lfb + PosX*4 + (yoffset + PosY + Row) * fix_screeninfo.line_length; /* running pointer into framebuffer */
|
||||
for (Row = sbit->height; Row; Row--) /* row counts up, but down may be a little faster :) */
|
||||
{
|
||||
int pixtodo = (usettf ? sbit->width : curfontwidth);
|
||||
char *pstart = (char*) p;
|
||||
|
||||
for (Bit = xfactor * (sbit->left + TTFShiftX); Bit > 0; Bit--) /* fill left margin */
|
||||
{
|
||||
int pixtodo = (usettf ? sbit->width : curfontwidth);
|
||||
char *pstart = (char*) p;
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[bgcolor],4);/*bgcolor*/
|
||||
p+=4;
|
||||
if (!usettf)
|
||||
pixtodo--;
|
||||
}
|
||||
|
||||
for (Bit = xfactor * (sbit->left + TTFShiftX); Bit > 0; Bit--) /* fill left margin */
|
||||
for (Pitch = sbit->pitch; Pitch; Pitch--)
|
||||
{
|
||||
for (Bit = 0x80; Bit; Bit >>= 1)
|
||||
{
|
||||
int color;
|
||||
|
||||
if (--pixtodo < 0)
|
||||
break;
|
||||
|
||||
if (*sbitbuffer & Bit) /* bit set -> foreground */
|
||||
color = fgcolor;
|
||||
else /* bit not set -> background */
|
||||
color = bgcolor;
|
||||
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[bgcolor],4);/*bgcolor*/
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[color],4);
|
||||
p+=4;
|
||||
if (!usettf)
|
||||
pixtodo--;
|
||||
}
|
||||
|
||||
for (Pitch = sbit->pitch; Pitch; Pitch--)
|
||||
{
|
||||
for (Bit = 0x80; Bit; Bit >>= 1)
|
||||
if (xfactor > 1) /* double width */
|
||||
{
|
||||
int color;
|
||||
|
||||
if (--pixtodo < 0)
|
||||
break;
|
||||
|
||||
if (*sbitbuffer & Bit) /* bit set -> foreground */
|
||||
color = fgcolor;
|
||||
else /* bit not set -> background */
|
||||
color = bgcolor;
|
||||
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[color],4);
|
||||
p+=4;
|
||||
|
||||
if (xfactor > 1) /* double width */
|
||||
{
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[color],4);
|
||||
p+=4;
|
||||
|
||||
if (!usettf)
|
||||
pixtodo--;
|
||||
}
|
||||
if (!usettf)
|
||||
pixtodo--;
|
||||
}
|
||||
sbitbuffer++;
|
||||
}
|
||||
for (Bit = (usettf ? (curfontwidth - xfactor*(sbit->width + sbit->left + TTFShiftX)) : pixtodo);
|
||||
Bit > 0; Bit--) /* fill rest of char width */
|
||||
{
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[bgcolor],4);
|
||||
p+=4;
|
||||
}
|
||||
|
||||
p = (unsigned char*) pstart + factor*fix_screeninfo.line_length;
|
||||
sbitbuffer++;
|
||||
}
|
||||
for (Bit = (usettf ? (curfontwidth - xfactor*(sbit->width + sbit->left + TTFShiftX)) : pixtodo);
|
||||
Bit > 0; Bit--) /* fill rest of char width */
|
||||
{
|
||||
for (f = factor-1; f >= 0; f--)
|
||||
memcpy((p + f*fix_screeninfo.line_length),bgra[bgcolor],4);
|
||||
p+=4;
|
||||
}
|
||||
|
||||
Row = ascender - sbit->top + sbit->height + TTFShiftY;
|
||||
FillRect(PosX, PosY + yoffset + Row*factor, curfontwidth, (fontheight - Row) * factor, bgcolor); /* fill lower margin */
|
||||
if (Attribute->underline)
|
||||
FillRect(PosX, PosY + yoffset + (fontheight-2)* factor, curfontwidth,2*factor, fgcolor); /* underline char */
|
||||
p = (unsigned char*) pstart + factor*fix_screeninfo.line_length;
|
||||
}
|
||||
|
||||
PosX += curfontwidth;
|
||||
Row = ascender - sbit->top + sbit->height + TTFShiftY;
|
||||
FillRect(PosX, PosY + yoffset + Row*factor, curfontwidth, (fontheight - Row) * factor, bgcolor); /* fill lower margin */
|
||||
if (Attribute->underline)
|
||||
FillRect(PosX, PosY + yoffset + (fontheight-2)* factor, curfontwidth,2*factor, fgcolor); /* underline char */
|
||||
|
||||
PosX += curfontwidth;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -4988,18 +5066,17 @@ void RenderPage()
|
||||
/* update page or timestring */
|
||||
if (transpmode != 2 && tuxtxt_cache.pageupdate && tuxtxt_cache.page_receiving != tuxtxt_cache.page && inputcounter == 2)
|
||||
{
|
||||
if (boxed && subtitledelay)
|
||||
{
|
||||
if (!delaystarted)
|
||||
if (boxed && subtitledelay)
|
||||
{
|
||||
gettimeofday(&tv_delay,NULL);
|
||||
delaystarted = 1;
|
||||
return;
|
||||
if (!delaystarted)
|
||||
{
|
||||
gettimeofday(&tv_delay,NULL);
|
||||
delaystarted = 1;
|
||||
return;
|
||||
}
|
||||
else
|
||||
delaystarted = 0;
|
||||
}
|
||||
else
|
||||
delaystarted = 0;
|
||||
|
||||
}
|
||||
|
||||
/* reset update flag */
|
||||
tuxtxt_cache.pageupdate = 0;
|
||||
@@ -5010,6 +5087,7 @@ void RenderPage()
|
||||
DecodePage();
|
||||
else
|
||||
startrow = 1;
|
||||
|
||||
if (boxed)
|
||||
{
|
||||
if (screenmode != 0)
|
||||
@@ -5088,7 +5166,7 @@ void RenderPage()
|
||||
/* update framebuffer */
|
||||
CopyBB2FB();
|
||||
}
|
||||
else if (transpmode != 2)
|
||||
else if (use_gui && transpmode != 2)
|
||||
{
|
||||
if (zoommode != 2)
|
||||
{
|
||||
|
@@ -215,7 +215,156 @@ FTC_SBit sbit;
|
||||
FT_Face face;
|
||||
FONTTYPE typettf;
|
||||
|
||||
const unsigned short int arrowtable[] =
|
||||
{
|
||||
8592, 8594, 8593, 8595, 'O', 'K', 8592, 8592
|
||||
};
|
||||
// G2 Set as defined in ETS 300 706
|
||||
const unsigned short int G2table[4][6*16] =
|
||||
{
|
||||
{ 0x0020, 0x00A1, 0x00A2, 0x00A3, 0x0024, 0x00A5, 0x0023, 0x00A7, 0x00A4, 0x2018, 0x201C, 0x00AB, 0x2190, 0x2191, 0x2192, 0x2193,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x00B5, 0x00B6, 0x00B7, 0x00F7, 0x2019, 0x201D, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x0020, 0x0300, 0x0301, 0x02C6, 0x0303, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
|
||||
0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x0020, 0x0020, 0x0020, 0x215B, 0x215C, 0x215D, 0x215E,
|
||||
0x2126, 0x00C6, 0x00D0, 0x00AA, 0x0126, 0x0020, 0x0132, 0x013F, 0x0141, 0x00D8, 0x0152, 0x00BA, 0x00DE, 0x0166, 0x014A, 0x0149,
|
||||
0x0138, 0x00E6, 0x0111, 0x00F0, 0x0127, 0x0131, 0x0133, 0x0140, 0x0142, 0x00F8, 0x0153, 0x00DF, 0x00FE, 0x0167, 0x014B, 0x25A0},
|
||||
|
||||
{ 0x0020, 0x00A1, 0x00A2, 0x00A3, 0x0024, 0x00A5, 0x0020, 0x00A7, 0x0020, 0x2018, 0x201C, 0x00AB, 0x2190, 0x2191, 0x2192, 0x2193,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x00B5, 0x00B6, 0x00B7, 0x00F7, 0x2019, 0x201D, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x0020, 0x0300, 0x0301, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
|
||||
0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x0141, 0x0142, 0x00DF, 0x215B, 0x215C, 0x215D, 0x215E,
|
||||
0x0044, 0x0045, 0x0046, 0x0047, 0x0049, 0x004A, 0x004B, 0x004C, 0x004E, 0x0051, 0x0052, 0x0053, 0x0055, 0x0056, 0x0057, 0x005A,
|
||||
0x0064, 0x0065, 0x0066, 0x0067, 0x0069, 0x006A, 0x006B, 0x006C, 0x006E, 0x0071, 0x0072, 0x0073, 0x0075, 0x0076, 0x0077, 0x007A},
|
||||
|
||||
{ 0x0020, 0x0061, 0x0062, 0x00A3, 0x0065, 0x0068, 0x0069, 0x00A7, 0x003A, 0x2018, 0x201C, 0x006B, 0x2190, 0x2191, 0x2192, 0x2193,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x006D, 0x006E, 0x0070, 0x00F7, 0x2019, 0x201D, 0x0074, 0x00BC, 0x00BD, 0x00BE, 0x0078,
|
||||
0x0020, 0x0300, 0x0301, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
|
||||
0x003F, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x038A, 0x038E, 0x038F, 0x215B, 0x215C, 0x215D, 0x215E,
|
||||
0x0043, 0x0044, 0x0046, 0x0047, 0x004A, 0x004C, 0x0051, 0x0052, 0x0053, 0x0055, 0x0056, 0x0057, 0x0059, 0x005A, 0x0386, 0x0389,
|
||||
0x0063, 0x0064, 0x0066, 0x0067, 0x006A, 0x006C, 0x0071, 0x0072, 0x0073, 0x0075, 0x0076, 0x0077, 0x0079, 0x007A, 0x0388, 0x25A0},
|
||||
|
||||
{ 0x0020, 0x0639, 0xFEC9, 0xFE83, 0xFE85, 0xFE87, 0xFE8B, 0xFE89, 0xFB7C, 0xFB7D, 0xFB7A, 0xFB58, 0xFB59, 0xFB56, 0xFB6D, 0xFB8E,
|
||||
0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0xFECE, 0xFECD, 0xFEFC, 0xFEEC, 0xFEEA, 0xFEE9,
|
||||
0x00E0, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00EB, 0x00EA, 0x00F9, 0x00EE, 0xFECA,
|
||||
0x00E9, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00E2, 0x00F4, 0x00FB, 0x00E7, 0x25A0}
|
||||
};
|
||||
|
||||
const unsigned short int G0table[6][6*16] =
|
||||
{
|
||||
{ ' ', '!', '\"', '#', '$', '%', '&', '\'', '(' , ')' , '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
0x0427, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0408, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
|
||||
0x041F, 0x040C, 0x0420, 0x0421, 0x0422, 0x0423, 0x0412, 0x0403, 0x0409, 0x040A, 0x0417, 0x040B, 0x0416, 0x0402, 0x0428, 0x040F,
|
||||
0x0447, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0458, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
|
||||
0x043F, 0x045C, 0x0440, 0x0441, 0x0442, 0x0443, 0x0432, 0x0453, 0x0459, 0x045A, 0x0437, 0x045B, 0x0436, 0x0452, 0x0448, 0x25A0},
|
||||
|
||||
{ ' ', '!', '\"', '#', '$', '%', 0x044B, '\'', '(' , ')' , '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
|
||||
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x042A, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042B,
|
||||
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
|
||||
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044C, 0x044A, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x25A0},
|
||||
|
||||
{ ' ', '!', '\"', '#', '$', '%', 0x0457, '\'', '(' , ')' , '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
|
||||
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x0406, 0x0417, 0x0428, 0x0404, 0x0429, 0x0427, 0x0407,
|
||||
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
|
||||
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044C, 0x0456, 0x0437, 0x0448, 0x0454, 0x0449, 0x0447, 0x25A0},
|
||||
|
||||
{ ' ', '!', '\"', '#', '$', '%', '&', '\'', '(' , ')' , '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 0x00AB, '=', 0x00BB, '?',
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
|
||||
0x03A0, 0x03A1, 0x0384, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
|
||||
0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
|
||||
0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x25A0},
|
||||
|
||||
{ ' ', '!', 0x05F2, 0x00A3, '$', '%', '&', '\'', '(' , ')' , '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 0x2190, 0x00BD, 0x2192, 0x2191, '#',
|
||||
0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
|
||||
0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x20AA, 0x2551, 0x00BE, 0x00F7, 0x25A0},
|
||||
|
||||
{ ' ', '!', 0x05F2, 0x00A3, '$', 0x066A, 0xFEF0, 0xFEF2, 0xFD3F, 0xFD3E, '*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', 0x061B, '>', '=', '<', 0x061F,
|
||||
0xFE94, 0x0621, 0xFE92, 0x0628, 0xFE98, 0x062A, 0xFE8E, 0xFE8D, 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9,
|
||||
0x0630, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC1, 0xFEC5, 0xFECB, 0xFECF, 0xFE9C, 0xFEA0, 0xFEA4, 0xFEA8, 0x0023,
|
||||
0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB, 0xFEED, 0xFEEF, 0xFEF3, 0xFE99, 0xFE9D, 0xFEA1, 0xFEA5, 0xFEF4,
|
||||
0xFEF0, 0xFECC, 0xFED0, 0xFED4, 0xFED1, 0xFED8, 0xFED5, 0xFED9, 0xFEE0, 0xFEDD, 0xFEE4, 0xFEE1, 0xFEE8, 0xFEE5, 0xFEFB, 0x25A0}
|
||||
};
|
||||
|
||||
const unsigned short int nationaltable23[14][2] =
|
||||
{
|
||||
{ '#', 0x00A4 }, /* 0 */
|
||||
{ '#', 0x016F }, /* 1 CS/SK */
|
||||
{ 0x00A3, '$' }, /* 2 EN */
|
||||
{ '#', 0x00F5 }, /* 3 ET */
|
||||
{ 0x00E9, 0x0457 }, /* 4 FR */
|
||||
{ '#', '$' }, /* 5 DE */
|
||||
{ 0x00A3, '$' }, /* 6 IT */
|
||||
{ '#', '$' }, /* 7 LV/LT */
|
||||
{ '#', 0x0144 }, /* 8 PL */
|
||||
{ 0x00E7, '$' }, /* 9 PT/ES */
|
||||
{ '#', 0x00A4 }, /* A RO */
|
||||
{ '#', 0x00CB }, /* B SR/HR/SL */
|
||||
{ '#', 0x00A4 }, /* C SV/FI/HU */
|
||||
{ 0x20A4, 0x011F }, /* D TR */
|
||||
};
|
||||
const unsigned short int nationaltable40[14] =
|
||||
{
|
||||
'@', /* 0 */
|
||||
0x010D, /* 1 CS/SK */
|
||||
'@', /* 2 EN */
|
||||
0x0161, /* 3 ET */
|
||||
0x00E0, /* 4 FR */
|
||||
0x00A7, /* 5 DE */
|
||||
0x00E9, /* 6 IT */
|
||||
0x0161, /* 7 LV/LT */
|
||||
0x0105, /* 8 PL */
|
||||
0x00A1, /* 9 PT/ES */
|
||||
0x0162, /* A RO */
|
||||
0x010C, /* B SR/HR/SL */
|
||||
0x00C9, /* C SV/FI/HU */
|
||||
0x0130, /* D TR */
|
||||
};
|
||||
const unsigned short int nationaltable5b[14][6] =
|
||||
{
|
||||
{ '[', '\\', ']', '^', '_', '`' }, /* 0 */
|
||||
{ 0x0165, 0x017E, 0x00FD, 0x00ED, 0x0159, 0x00E9 }, /* 1 CS/SK */
|
||||
{ 0x2190, 0x00BD, 0x2192, 0x2191, '#', 0x00AD }, /* 2 EN */
|
||||
{ 0x00C4, 0x00D6, 0x017D, 0x00DC, 0x00D5, 0x0161 }, /* 3 ET */
|
||||
{ 0x0451, 0x00EA, 0x00F9, 0x00EE, '#', 0x00E8 }, /* 4 FR */
|
||||
{ 0x00C4, 0x00D6, 0x00DC, '^', '_', 0x00B0 }, /* 5 DE */
|
||||
{ 0x00B0, 0x00E7, 0x2192, 0x2191, '#', 0x00F9 }, /* 6 IT */
|
||||
{ 0x0117, 0x0119, 0x017D, 0x010D, 0x016B, 0x0161 }, /* 7 LV/LT */
|
||||
{ 0x017B, 0x015A, 0x0141, 0x0107, 0x00F3, 0x0119 }, /* 8 PL */
|
||||
{ 0x00E1, 0x00E9, 0x00ED, 0x00F3, 0x00FA, 0x00BF }, /* 9 PT/ES */
|
||||
{ 0x00C2, 0x015E, 0x01CD, 0x01CF, 0x0131, 0x0163 }, /* A RO */
|
||||
{ 0x0106, 0x017D, 0x00D0, 0x0160, 0x0451, 0x010D }, /* B SR/HR/SL */
|
||||
{ 0x00C4, 0x00D6, 0x00C5, 0x00DC, '_', 0x00E9 }, /* C SV/FI/HU */
|
||||
{ 0x015E, 0x00D6, 0x00C7, 0x00DC, 0x011E, 0x0131 }, /* D TR */
|
||||
};
|
||||
const unsigned short int nationaltable7b[14][4] =
|
||||
{
|
||||
{ '{', '|', '}', '~' }, /* 0 */
|
||||
{ 0x00E1, 0x011B, 0x00FA, 0x0161 }, /* 1 CS/SK */
|
||||
{ 0x00BC, 0x2551, 0x00BE, 0x00F7 }, /* 2 EN */
|
||||
{ 0x00E4, 0x00F6, 0x017E, 0x00FC }, /* 3 ET */
|
||||
{ 0x00E2, 0x00F4, 0x00FB, 0x00E7 }, /* 4 FR */
|
||||
{ 0x00E4, 0x00F6, 0x00FC, 0x00DF }, /* 5 DE */
|
||||
{ 0x00E0, 0x00F3, 0x00E8, 0x00EC }, /* 6 IT */
|
||||
{ 0x0105, 0x0173, 0x017E, 0x012F }, /* 7 LV/LT */
|
||||
{ 0x017C, 0x015B, 0x0142, 0x017A }, /* 8 PL */
|
||||
{ 0x00FC, 0x00F1, 0x00E8, 0x00E0 }, /* 9 PT/ES */
|
||||
{ 0x00E2, 0x015F, 0x01CE, 0x00EE }, /* A RO */
|
||||
{ 0x0107, 0x017E, 0x0111, 0x0161 }, /* B SR/HR/SL */
|
||||
{ 0x00E4, 0x00F6, 0x00E5, 0x00FC }, /* C SV/FI/HU */
|
||||
{ 0x015F, 0x00F6, 0x00E7, 0x00FC }, /* D TR */
|
||||
};
|
||||
#if 0
|
||||
// G2 Charset (0 = Latin, 1 = Cyrillic, 2 = Greek)
|
||||
const unsigned short int G2table[3][6*16] =
|
||||
{
|
||||
@@ -319,11 +468,6 @@ const unsigned short int nationaltable7b[14][4] =
|
||||
{ 351, '<27>', 231, '<27>' }, /* D TR */
|
||||
};
|
||||
|
||||
const unsigned short int arrowtable[] =
|
||||
{
|
||||
8592, 8594, 8593, 8595, 'O', 'K', 8592, 8592
|
||||
};
|
||||
|
||||
/* national subsets */
|
||||
const char countrystring[] =
|
||||
" (#$@[\\]^_`{|}~) " /* 0 no subset specified */
|
||||
@@ -343,33 +487,58 @@ const char countrystring[] =
|
||||
" RU/BUL/SER/CRO/UKR (cyr) " /* 14 cyrillic */
|
||||
" EK " /* 15 greek */
|
||||
;
|
||||
#endif
|
||||
const char countrystring[] =
|
||||
" Default " /* 0 no subset specified */
|
||||
" Czech/Slovak " /* 1 czech, slovak */
|
||||
" English " /* 2 english */
|
||||
" Estonian " /* 3 estonian */
|
||||
" French " /* 4 french */
|
||||
" Deutsch " /* 5 german */
|
||||
" Italian " /* 6 italian */
|
||||
" Latvian/Lithuanian " /* 7 latvian, lithuanian */
|
||||
" Polish " /* 8 polish */
|
||||
" Portuguese/Spanish " /* 9 portuguese, spanish */
|
||||
" Romanian " /* 10 romanian */
|
||||
"Serbian/Croatian/Slovenian" /* 11 serbian, croatian, slovenian */
|
||||
"Swedish/Finnish/Hungarian " /* 12 swedish, finnish, hungarian */
|
||||
" T~rk}e " /* 13 turkish */
|
||||
" Srpski/Hrvatski " /* 14 serbian, croatian */
|
||||
" Russkij/Bylgarski " /* 15 russian, bulgarian */
|
||||
" Ukra&nsxka " /* 16 ukrainian */
|
||||
" Ekkgmij\\ " /* 17 greek */
|
||||
" zixar " /* 18 hebrew */
|
||||
" pHQY " /* 19 arabic */
|
||||
;
|
||||
#define COUNTRYSTRING_WIDTH 26
|
||||
#define MAX_NATIONAL_SUBSET (sizeof(countrystring) / COUNTRYSTRING_WIDTH - 1)
|
||||
|
||||
enum
|
||||
{
|
||||
NAT_DEFAULT = 0,
|
||||
NAT_CZ = 1,
|
||||
NAT_UK = 2,
|
||||
NAT_ET = 3,
|
||||
NAT_FR = 4,
|
||||
NAT_DE = 5,
|
||||
NAT_IT = 6,
|
||||
NAT_LV = 7,
|
||||
NAT_PL = 8,
|
||||
NAT_SP = 9,
|
||||
NAT_RO = 10,
|
||||
NAT_SR = 11,
|
||||
NAT_SW = 12,
|
||||
NAT_TR = 13,
|
||||
NAT_MAX_FROM_HEADER = 13,
|
||||
NAT_RU = 14,
|
||||
NAT_GR = 15
|
||||
NAT_DEFAULT = 0,
|
||||
NAT_CZ = 1,
|
||||
NAT_UK = 2,
|
||||
NAT_ET = 3,
|
||||
NAT_FR = 4,
|
||||
NAT_DE = 5,
|
||||
NAT_IT = 6,
|
||||
NAT_LV = 7,
|
||||
NAT_PL = 8,
|
||||
NAT_SP = 9,
|
||||
NAT_RO = 10,
|
||||
NAT_SR = 11,
|
||||
NAT_SW = 12,
|
||||
NAT_TR = 13,
|
||||
NAT_MAX_FROM_HEADER = 13,
|
||||
NAT_SC = 14,
|
||||
NAT_RB = 15,
|
||||
NAT_UA = 16,
|
||||
NAT_GR = 17,
|
||||
NAT_HB = 18,
|
||||
NAT_AR = 19
|
||||
};
|
||||
|
||||
const unsigned char countryconversiontable[] = { NAT_UK, NAT_DE, NAT_SW, NAT_IT, NAT_FR, NAT_SP, NAT_CZ, NAT_RO};
|
||||
|
||||
|
||||
/* some data */
|
||||
char versioninfo[16];
|
||||
int hotlist[10];
|
||||
@@ -425,7 +594,7 @@ unsigned char restoreaudio = 0;
|
||||
/* language dependent texts */
|
||||
#define MAXMENULANGUAGE 8 /* 0 deutsch, 1 englisch, 2 franz<6E>sisch, 3 niederl<72>ndisch, 4 griechisch, 5 italienisch, 6 polnisch, 7 schwedisch, 8 suomi */
|
||||
const int menusubset[] = { NAT_DE , NAT_UK , NAT_FR , NAT_UK , NAT_GR , NAT_IT , NAT_PL , NAT_SW, NAT_SW };
|
||||
|
||||
//const int menusubset[] = { NAT_DE , NAT_UK , NAT_FR , NAT_UK , NAT_GR , NAT_IT , NAT_PL , NAT_SW , NAT_SW , NAT_SP, NAT_RB};//FIXME
|
||||
|
||||
#define Menu_StartX (StartX + fontwidth*9/2)
|
||||
#define Menu_StartY (StartY + fontheight)
|
||||
|
Reference in New Issue
Block a user