#include <dos.h>\r
#include <bios.h>\r
\r
+#define resetMaus setMaus\r
+\r
+//Strustures in the CPI file format\r
struct FontFileHeader\r
{\r
unsigned char id0;\r
int byo14[16];\r
int byo16[16];\r
int wys=8;\r
+ int prew;\r
int cp=0;\r
int lit=0x42;\r
int pre;\r
int prey;\r
int key;\r
int tab=0;\r
+ int pret;\r
int any=0;\r
char abc[17]="0123456789ABCDEF";\r
+ REGS iR;\r
+ REGS oR;\r
+ SREGS sR;\r
+ int maus=0;\r
+ int mausv=1;\r
+ int mausx;\r
+ int mausy;\r
+ //int premx;\r
+ //int premy;\r
+ int klik;\r
+ int prek;\r
+\r
+ \r
+void showMaus();\r
+void hideMaus();\r
+int setMaus();\r
+void getMaus(int *x,int *y,int *k);\r
+\r
+void nullpointers();\r
+void offset();\r
+\r
+void new8 ();\r
+void menu8();\r
+void cpwys();\r
+\r
+void displayDialog(int color, char *text, int type=0);\r
+int message (char *text, char *value, int type=1);\r
+void question (char *text, char *result);\r
+unsigned question (char *text);\r
+\r
+void ramka8 ();\r
+void ramka14();\r
+void ramka16();\r
+void lin8 (int mode=0);\r
+void lin14(int mode=0);\r
+void lin16(int mode=0);\r
+void lit8 (int mode=0);\r
+void lit14(int mode=0);\r
+void lit16(int mode=0);\r
+\r
+void spc8 ();\r
+void spc14();\r
+void spc16();\r
+void bsp8 ();\r
+void bsp14();\r
+void bsp16();\r
+void ent8 ();\r
+void ent14();\r
+void ent16();\r
+\r
+int otw();\r
+int otw2();\r
+\r
+int zap();\r
+int zap2();\r
+\r
+int zmn();\r
+\r
+int newCPI ();\r
+int newCPI2(short CP, short h);\r
+\r
+void deleteCPI(short st=6,short a=0,short b=0);\r
+\r
+int newCP ();\r
+int newCP2(short CP,short h);\r
+\r
+int delCP();\r
+\r
+int newF ();\r
+int newF2 (short h);\r
+int newF8 (short CP);\r
+int newF14(short CP);\r
+int newF16(short CP);\r
+\r
+int delF ();\r
+int delF8 (short h);\r
+int delF14(short h);\r
+int delF16(short h);\r
+\r
+int main(int argc,char* argv[]);\r
+\r
+void showMaus()\r
+{\r
+ iR.x.ax=0x0001;\r
+ int86(0x33,&iR,&oR);\r
+}\r
+\r
+void hideMaus()\r
+{\r
+ iR.x.ax=0x0002;\r
+ int86(0x33,&iR,&oR);\r
+}\r
+\r
+int setMaus()\r
+{\r
+ iR.x.ax=0x0000;\r
+ oR.x.ax=0x0000;\r
+ int86(0x33,&iR,&oR);\r
+ return oR.x.ax;\r
+}\r
+\r
+void getMaus(int *x,int *y,int *k)\r
+{\r
+ iR.x.ax=0x0003;\r
+ int86(0x33,&iR,&oR);\r
+ *y=oR.x.dx;\r
+ *x=oR.x.cx;\r
+ *k=oR.x.bx;\r
+}\r
\r
void nullpointers()\r
{\r
}\r
\r
}\r
-void deleteCPI(short st=6,short a=0,short b=0)\r
+void deleteCPI(short st,short a,short b)\r
{\r
short i,j;\r
switch(st)\r
cleardevice();\r
setcolor(GREEN);\r
\r
- outtextxy(0,0, "Edytor napis¢w±");\r
+ outtextxy(0,0, "CPI editor 1.2±");\r
outtextxy(0,8, "±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
- outtextxy(600,16,"v1.1b");\r
+ //outtextxy(600,16,"v1.2a");\r
}\r
void menu8()\r
{\r
outtextxy(0x78,0,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ");\r
if(any)\r
{\r
- if(strlen(nazwap)<52)\r
- sprintf(cpw,"°cp%03u°8x%02d°%s°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys,nazwap);\r
+ if((unsigned)(CPEH[cp]->codepage)>=1000)\r
+ {\r
+ if((unsigned)(CPEH[cp]->codepage)>=10000)\r
+ {\r
+ if(strlen(nazwap)<52)\r
+ sprintf(cpw,"°cp%03u°8x%02d°%s°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys,nazwap);\r
+ else\r
+ sprintf(cpw,"°cp%03u°8x%02d°path too long°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys);\r
+ }\r
+ else\r
+ {\r
+ if(strlen(nazwap)<52)\r
+ sprintf(cpw,"°°cp%03u°8x%02d°%s°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys,nazwap);\r
+ else\r
+ sprintf(cpw,"°°cp%03u°8x%02d°path too long°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys);\r
+ }\r
+ }\r
else\r
- sprintf(cpw,"°cp%03u°8x%02d°path too long°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys);\r
+ {\r
+ if(strlen(nazwap)<52)\r
+ sprintf(cpw,"°°°cp%03u°8x%02d°%s°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys,nazwap);\r
+ else\r
+ sprintf(cpw,"°°°cp%03u°8x%02d°path too long°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp]->codepage,wys);\r
+ }\r
}\r
else\r
strcpy(cpw, "°No CPI open°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");\r
setcolor(RED);\r
rectangle(495,110,624,367);\r
}\r
-void lin14(int mode=0)\r
+void lin14(int mode)\r
{\r
if(!any)\r
return;\r
break;\r
}\r
}\r
-void lin8(int mode=0)\r
+void lin8(int mode)\r
{\r
if(!any)\r
return;\r
break;\r
}\r
}\r
-void lin16(int mode=0)\r
+void lin16(int mode)\r
{\r
if(!any)\r
return;\r
break;\r
}\r
}\r
-void lit8(int mode=0)\r
+void lit8(int mode)\r
{\r
if(!any)\r
return;\r
setcolor(color);\r
ab[0]=abc[curx];\r
outtextxy(20+16*curx,24,ab);\r
- ab[0]=abc[cury];\r
- outtextxy(8,36+16*cury,ab);\r
- if(SFB8[cp]->lit[lit].lin[cury]&(0x80>>curx))\r
- {\r
- setcolor(BROWN);\r
- setfillstyle(SOLID_FILL,BROWN);\r
- }\r
- else\r
- {\r
- setcolor(BLACK);\r
- setfillstyle(SOLID_FILL,BLACK);\r
- }\r
- bar(0x10+curx*0x10,0x20+cury*0x10,0x1f+curx*0x10,0x2f+cury*0x10);\r
- if(wys==8)\r
- {\r
- setcolor(GREEN);\r
- rectangle(0x10 + curx*0x10, 0x20 + cury*0x10 ,0x1f + curx*0x10, 0x2f + cury*0x10);\r
- setcolor(BLACK);\r
- rectangle(0x11 + curx*0x10, 0x21 + cury*0x10, 0x1e + curx*0x10, 0x2e + cury*0x10);\r
+ if(cury<8)\r
+ {\r
+ ab[0]=abc[cury];\r
+ outtextxy(8,36+16*cury,ab);\r
+ if(SFB8[cp]->lit[lit].lin[cury]&(0x80>>curx))\r
+ {\r
+ setcolor(BROWN);\r
+ setfillstyle(SOLID_FILL,BROWN);\r
+ }\r
+ else\r
+ {\r
+ setcolor(BLACK);\r
+ setfillstyle(SOLID_FILL,BLACK);\r
+ }\r
+ bar(0x10+curx*0x10,0x20+cury*0x10,0x1f+curx*0x10,0x2f+cury*0x10);\r
+ if(wys==8)\r
+ {\r
+ setcolor(GREEN);\r
+ rectangle(0x10 + curx*0x10, 0x20 + cury*0x10 ,0x1f + curx*0x10, 0x2f + cury*0x10);\r
+ setcolor(BLACK);\r
+ rectangle(0x11 + curx*0x10, 0x21 + cury*0x10, 0x1e + curx*0x10, 0x2e + cury*0x10);\r
+ }\r
}\r
break;\r
case 0:\r
break;\r
}\r
}\r
-void lit14(int mode=0)\r
+void lit14(int mode)\r
{\r
if(!any)\r
return;\r
setcolor(color);\r
ab[0]=abc[curx];\r
outtextxy(20+16*curx,215,ab);\r
- ab[0]=abc[cury];\r
- outtextxy(8,227+16*cury,ab);\r
- if(SFB14[cp]->lit[lit].lin[cury]&(0x80>>curx))\r
- {\r
- setcolor(BROWN);\r
- setfillstyle(SOLID_FILL,BROWN);\r
- }\r
- else\r
- {\r
- setcolor(BLACK);\r
- setfillstyle(SOLID_FILL,BLACK);\r
- }\r
- bar(16+curx*16,223+cury*16,31+curx*16,238+cury*16);\r
- if(wys==14)\r
+ if(cury<14)\r
{\r
- setcolor(GREEN);\r
- rectangle(16+curx*16,223+cury*16,31+curx*16,238+cury*16);\r
- setcolor(BLACK);\r
- rectangle(17+curx*16,224+cury*16,30+curx*16,237+cury*16);\r
+ ab[0]=abc[cury];\r
+ outtextxy(8,227+16*cury,ab);\r
+ if(SFB14[cp]->lit[lit].lin[cury]&(0x80>>curx))\r
+ {\r
+ setcolor(BROWN);\r
+ setfillstyle(SOLID_FILL,BROWN);\r
+ }\r
+ else\r
+ {\r
+ setcolor(BLACK);\r
+ setfillstyle(SOLID_FILL,BLACK);\r
+ }\r
+ bar(16+curx*16,223+cury*16,31+curx*16,238+cury*16);\r
+ if(wys==14)\r
+ {\r
+ setcolor(GREEN);\r
+ rectangle(16+curx*16,223+cury*16,31+curx*16,238+cury*16);\r
+ setcolor(BLACK);\r
+ rectangle(17+curx*16,224+cury*16,30+curx*16,237+cury*16);\r
+ }\r
}\r
break;\r
case 0:\r
break;\r
}\r
}\r
-void lit16(int mode=0)\r
+void lit16(int mode)\r
{\r
if(!any)\r
return;\r
int c;\r
int d;\r
int NT;\r
- \r
+\r
\r
CPI=fopen(nazwap,"rb");\r
\r
}\r
}\r
\r
- fprintf(CPI,"\r\nTen plik zosta\88 wygenerowany za pomoc¥ Edytora napis¢w, wersja 1.1b\r\n autor programu: Balthasar Szczepaäski%c",0x1a);\r
+ fprintf(CPI,"\r\nTen plik zosta\88 wygenerowany za pomoc¥ Edytora napis¢w, wersja 1.2a\r\n autor programu: Balthasar Szczepaäski%c",0x1a);\r
\r
fclose(CPI);\r
return 0;\r
byo16[FIH->num_codepages] = 0;\r
byo14[FIH->num_codepages] = 0;\r
byo8[FIH->num_codepages] = 0;\r
- \r
+\r
sprintf(err,"0:OK");\r
return 0;\r
}\r
return 0;\r
}\r
\r
-void displayDialog(int color,char *text,int type=0)\r
+void displayDialog(int color,char *text,int type)\r
{\r
gotoxy(21,13);\r
char t1[43]="±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±";\r
}\r
}\r
\r
-int message(char *text, char *value, int type=1)\r
+int message(char *text, char *value, int type)\r
{\r
if (type!=2)\r
{\r
}\r
else\r
any=0;\r
- \r
+\r
status=registerbgidriver(EGAVGA_driver);\r
if (status < 0)\r
{\r
wys=16;\r
else if(byo14[0])\r
wys=14;\r
- \r
+\r
\r
new8();\r
menu8();\r
lin14();\r
lin16();\r
\r
+ //iR.x.ax=0x1;\r
+ //int86(0x33,&iR,&oR);\r
+ //iR.x.cx=0x01;\r
+ //iR.x.ax=0x0c;\r
+ //iR.x.dx=FP_OFF(inth);\r
+ //sR.es=FP_SEG(inth);\r
+ //int86x(0x33,&iR,&oR,&sR);\r
+ maus=setMaus();\r
+ if(maus)\r
+ showMaus();\r
for(;;)\r
{\r
- key=bioskey(_KEYBRD_READ);\r
- if(tab==0)\r
+ if(bioskey(_KEYBRD_READY))\r
{\r
- if((key&0xFF00)==0x4800&&any)\r
+ key=bioskey(_KEYBRD_READ);\r
+ if(maus)\r
+ hideMaus();\r
+ if(tab==0)\r
{\r
- //w g¢r©\r
- prey=cury;\r
- prex=curx;\r
- cury+=wys-1;\r
- cury%=wys;\r
- switch(wys)\r
+ if((key&0xFF00)==0x4800&&any)\r
{\r
- case 8:\r
- lit8(2);\r
- break;\r
- case 14:\r
- lit14(2);\r
- break;\r
- case 16:\r
- lit16(2);\r
- break;\r
+ //w g¢r©\r
+ prey=cury;\r
+ prex=curx;\r
+ cury+=wys-1;\r
+ cury%=wys;\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lit8(2);\r
+ break;\r
+ case 14:\r
+ lit14(2);\r
+ break;\r
+ case 16:\r
+ lit16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x5000&&any)\r
+ {\r
+ //w d¢\88\r
+ prey=cury;\r
+ prex=curx;\r
+ ++cury;\r
+ cury%=wys;\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lit8(2);\r
+ break;\r
+ case 14:\r
+ lit14(2);\r
+ break;\r
+ case 16:\r
+ lit16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x4b00&&any)\r
+ {\r
+ //w lewo\r
+ prey=cury;\r
+ prex=curx;\r
+ --curx;\r
+ curx&=0x7;\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lit8(2);\r
+ break;\r
+ case 14:\r
+ lit14(2);\r
+ break;\r
+ case 16:\r
+ lit16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x4d00&&any)\r
+ {\r
+ //w prawo\r
+ prey=cury;\r
+ prex=curx;\r
+ ++curx;\r
+ curx&=0x7;\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lit8(2);\r
+ break;\r
+ case 14:\r
+ lit14(2);\r
+ break;\r
+ case 16:\r
+ lit16(2);\r
+ break;\r
+ }\r
+ }\r
+ if ((key&0xFF00)==0x3900&&any)\r
+ {\r
+ //spacja\r
+ switch(wys)\r
+ {\r
+ case 8: \r
+ spc8();\r
+ lit8(1);\r
+ lin8(3);\r
+ break;\r
+ case 14:\r
+ spc14();\r
+ lit14(1);\r
+ lin14(3);\r
+ break;\r
+ case 16:\r
+ spc16();\r
+ lit16(1);\r
+ lin16(3);\r
+ break;\r
+ }\r
+ }\r
+ if ((key&0xFF00)==0x0e00&&any)\r
+ {\r
+ //backspace\r
+ switch(wys)\r
+ {\r
+ case 8: \r
+ bsp8();\r
+ lit8(1);\r
+ lin8(3);\r
+ break;\r
+ case 14:\r
+ bsp14();\r
+ lit14(1);\r
+ lin14(3);\r
+ break;\r
+ case 16:\r
+ bsp16();\r
+ lit16(1);\r
+ lin16(3);\r
+ break;\r
+ }\r
+ }\r
+ if ((key&0xFF00)==0x1c00&&any)\r
+ {\r
+ //enter\r
+ switch(wys)\r
+ {\r
+ case 8: \r
+ ent8();\r
+ lit8(1);\r
+ lin8(3);\r
+ break;\r
+ case 14:\r
+ ent14();\r
+ lit14(1);\r
+ lin14(3);\r
+ break;\r
+ case 16:\r
+ ent16();\r
+ lit16(1);\r
+ lin16(3);\r
+ break;\r
+ }\r
}\r
}\r
- if((key&0xFF00)==0x5000&&any)\r
+ else\r
{\r
- //w d¢\88\r
- prey=cury;\r
- prex=curx;\r
- ++cury;\r
- cury%=wys;\r
+ if((key&0xFF00)==0x4800&&any)\r
+ {\r
+ //w g¢r© l\r
+ pre=lit;\r
+ lit-=16;\r
+ lit&=0xFF;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ break;\r
+ case 16:\r
+ lin16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x5000&&any)\r
+ {\r
+ //w d¢\88 l\r
+ pre=lit;\r
+ lit+=16;\r
+ lit&=0xFF;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ break;\r
+ case 16:\r
+ lin16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x4b00&&any)\r
+ {\r
+ //w lewo l\r
+ pre=lit;\r
+ --lit;\r
+ lit&=0xFF;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ break;\r
+ case 16:\r
+ lin16(2);\r
+ break;\r
+ }\r
+ }\r
+ if((key&0xFF00)==0x4d00&&any)\r
+ {\r
+ //w prawo l\r
+ pre=lit;\r
+ ++lit;\r
+ lit&=0xFF;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(wys)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ break;\r
+ case 16:\r
+ lin16(2);\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ if ((key&0xFF00)==0x0f00&&any)\r
+ {\r
+ //tab\r
+ if(!tab)\r
+ tab=1;\r
+ else\r
+ tab=0;\r
switch(wys)\r
{\r
case 8:\r
- lit8(2);\r
+ ramka8();\r
break;\r
case 14:\r
- lit14(2);\r
+ ramka14();\r
break;\r
case 16:\r
- lit16(2);\r
+ ramka16();\r
break;\r
}\r
}\r
- if((key&0xFF00)==0x4b00&&any)\r
+ if ((key&0xFF00)==0x5100&&any)\r
{\r
- //w lewo\r
+ //cp++\r
+ ++cp;\r
+ cp%=FIH->num_codepages;\r
+ prex=curx;\r
prey=cury;\r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ cpwys();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ \r
+ }\r
+ if ((key&0xFF00)==0x4900&&any)\r
+ {\r
+ //cp--\r
+ cp+=FIH->num_codepages-1;\r
+ cp%=FIH->num_codepages;\r
+ \r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+\r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ cpwys();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+\r
+ }\r
+ if ((key&0xFF00)==0x4700&&any)\r
+ {\r
+ //wys--\r
prex=curx;\r
- --curx;\r
- curx&=0x7;\r
+ prey=cury;\r
switch(wys)\r
{\r
case 8:\r
- lit8(2);\r
+ if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ else if(byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ lin14(1);\r
+ lit14(1);\r
+ ramka14();\r
+ }\r
+ lin8(1);\r
+ lit8(1);\r
+ ramka8();\r
break;\r
case 14:\r
+ if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ else if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ lin14(1);\r
lit14(2);\r
+ ramka14();\r
break;\r
case 16:\r
+ if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ lin14(1);\r
+ lit14(2);\r
+ ramka14();\r
+ }\r
+ else if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ lin16(1);\r
lit16(2);\r
+ ramka16();\r
break;\r
}\r
+ cpwys();\r
}\r
- if((key&0xFF00)==0x4d00&&any)\r
+ if ((key&0xFF00)==0x4f00&&any)\r
{\r
- //w prawo\r
- prey=cury;\r
+ //wys++\r
prex=curx;\r
- ++curx;\r
- curx&=0x7;\r
+ prey=cury;\r
switch(wys)\r
{\r
case 8:\r
- lit8(2);\r
+ if(byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ lin14(1);\r
+ lit14(1);\r
+ ramka14();\r
+ }\r
+ else if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ lin8(1);\r
+ lit8(1);\r
+ ramka8();\r
break;\r
case 14:\r
+ if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ else if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ lin14(1);\r
lit14(2);\r
+ ramka14();\r
break;\r
case 16:\r
+ if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ else if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ lin14(1);\r
+ lit14(2);\r
+ ramka14();\r
+ }\r
+ lin16(1);\r
lit16(2);\r
+ ramka16();\r
break;\r
}\r
+ cpwys();\r
}\r
- if ((key&0xFF00)==0x3900&&any)\r
+ \r
+ if ((key&0xFF00)==0x3b00)\r
{\r
- //spacja\r
- switch(wys)\r
+ //new CPI\r
+ setcolor(RED);\r
+ outtextxy(16,472,"new");\r
+ deleteCPI();\r
+ status=newCPI();\r
+ while(status!=0)\r
{\r
- case 8: \r
- spc8();\r
- lit8(1);\r
- lin8(3);\r
- break;\r
- case 14:\r
- spc14();\r
- lit14(1);\r
- lin14(3);\r
- break;\r
- case 16:\r
- spc16();\r
- lit16(1);\r
- lin16(3);\r
- break;\r
+ if (message("CPI not created",err,2)==0)\r
+ status=newCPI();\r
+ else\r
+ {\r
+ break;\r
+ //closegraph();\r
+ //deleteCPI();\r
+ //return status;\r
+ }\r
}\r
- }\r
- if ((key&0xFF00)==0x0e00&&any)\r
- {\r
- //backspace\r
- switch(wys)\r
+ any=!status;\r
+ if(any)\r
{\r
- case 8: \r
- bsp8();\r
- lit8(1);\r
- lin8(3);\r
- break;\r
- case 14:\r
- bsp14();\r
- lit14(1);\r
- lin14(3);\r
- break;\r
- case 16:\r
- bsp16();\r
- lit16(1);\r
- lin16(3);\r
- break;\r
+ strcpy(nazwap,"new CPI");\r
+ cp=0;\r
+ if(byo8[0])\r
+ wys=8;\r
+ else if(byo16[0])\r
+ wys=16;\r
+ else if(byo14[0])\r
+ wys=14;\r
+ cury%=8;\r
}\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ \r
}\r
- if ((key&0xFF00)==0x1c00&&any)\r
+ if ((key&0xFF00)==0x3c00&&any)\r
{\r
- //enter\r
- switch(wys)\r
+ //zapisz\r
+ setcolor(RED);\r
+ outtextxy(72,472,"save");\r
+ status=zap();\r
+ while(status!=0)\r
{\r
- case 8: \r
- ent8();\r
- lit8(1);\r
- lin8(3);\r
- break;\r
- case 14:\r
- ent14();\r
- lit14(1);\r
- lin14(3);\r
- break;\r
- case 16:\r
- ent16();\r
- lit16(1);\r
- lin16(3);\r
- break;\r
+ if (message("CPI file not saved",err,2)==0)\r
+ status=zap();\r
+ else\r
+ break;\r
}\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ cury%=8;\r
+\r
+\r
}\r
- }\r
- else\r
- {\r
- if((key&0xFF00)==0x4800&&any)\r
+\r
+\r
+ if ((key&0xFF00)==0x3d00)\r
{\r
- //w g¢r© l\r
- pre=lit;\r
- lit-=16;\r
- lit&=0xFF;\r
+ //wczytaj\r
+ setcolor(RED);\r
+ outtextxy(136,472,"load");\r
+ deleteCPI();\r
+ status=otw();\r
+ while(status!=0)\r
+ {\r
+ if (message("CPI file not loaded",err,2)==0)\r
+ status=otw();\r
+ else\r
+ break;\r
+ }\r
+ any=!status;\r
+ cp=0;\r
+ if(byo8[0])\r
+ wys=8;\r
+ else if(byo16[0])\r
+ wys=16;\r
+ else if(byo14[0])\r
+ wys=14;\r
+ cury%=8;\r
+\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
lit8();\r
lit14();\r
lit16();\r
- switch(wys)\r
+\r
+ }\r
+ if((key&0xFF00)==0x3e00&&any)\r
+ {\r
+ \r
+ //zapisz+system\r
+ setcolor(RED);\r
+ outtextxy(72,472,"save use");\r
+ status=zap();\r
+ while(status!=0)\r
{\r
- case 8:\r
- lin8(2);\r
- break;\r
- case 14:\r
- lin14(2);\r
- break;\r
- case 16:\r
- lin16(2);\r
- break;\r
+ if (message("CPI file not saved",err,2)==0)\r
+ status=zap();\r
+ else\r
+ break;\r
+ }\r
+ if(status==0)\r
+ {\r
+ sprintf(err,"mode con:cp prep=((%u) %s)",CPEH[cp]->codepage,nazwap);\r
+ puts(err);\r
+ system(err);\r
+ sprintf(err,"mode con:cp sel=%u",CPEH[cp]->codepage);\r
+ puts(err);\r
+ system(err);\r
+ delay(5000);\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+\r
}\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ cury%=8;\r
+\r
}\r
- if((key&0xFF00)==0x5000&&any)\r
+ if ((key&0xFF00)==0x3f00&&any)\r
{\r
- //w d¢\88 l\r
- pre=lit;\r
- lit+=16;\r
- lit&=0xFF;\r
+ //zmiana numeru\r
+ setcolor(RED);\r
+ outtextxy(256,472,"number");\r
+ status=zmn();\r
+ if(status!=0)\r
+ message("Number not changed",err);\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
lit8();\r
lit14();\r
lit16();\r
- switch(wys)\r
- {\r
- case 8:\r
- lin8(2);\r
- break;\r
- case 14:\r
- lin14(2);\r
- break;\r
- case 16:\r
- lin16(2);\r
- break;\r
- }\r
}\r
- if((key&0xFF00)==0x4b00&&any)\r
+ if ((key&0xFF00)==0x4000&&any)\r
{\r
- //w lewo l\r
- pre=lit;\r
- --lit;\r
- lit&=0xFF;\r
+ //new font\r
+ setcolor(RED);\r
+ outtextxy(336,472,"newF");\r
+ status=newF();\r
+ if(status!=0)\r
+ message("Fonr not created",err);\r
+ offset();\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
lit8();\r
lit14();\r
lit16();\r
- switch(wys)\r
- {\r
- case 8:\r
- lin8(2);\r
- break;\r
- case 14:\r
- lin14(2);\r
- break;\r
- case 16:\r
- lin16(2);\r
- break;\r
- }\r
+ \r
}\r
- if((key&0xFF00)==0x4d00&&any)\r
+ if ((key&0xFF00)==0x4100&&any)\r
{\r
- //w prawo l\r
- pre=lit;\r
- ++lit;\r
- lit&=0xFF;\r
+ //new CP\r
+ setcolor(RED);\r
+ outtextxy(400,472,"newCP");\r
+ status=newCP();\r
+ if(status!=0)\r
+ message("Codepage not created",err);\r
+ else\r
+ cp=FIH->num_codepages-1;\r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ offset();\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
lit8();\r
lit14();\r
lit16();\r
- switch(wys)\r
+ \r
+ }\r
+ if ((key&0xFF00)==0x4200&&any)\r
+ {\r
+ //delete font\r
+ setcolor(RED);\r
+ outtextxy(472,472,"delF");\r
+ status=delF();\r
+ if(status!=0)\r
+ message("Font not deleted",err);\r
+ offset();\r
+\r
+ if(wys==8&&byo8[cp]==0)\r
{\r
- case 8:\r
- lin8(2);\r
- break;\r
- case 14:\r
- lin14(2);\r
- break;\r
- case 16:\r
- lin16(2);\r
- break;\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
}\r
+ \r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ \r
}\r
- }\r
- if ((key&0xFF00)==0x0f00&&any)\r
- {\r
- //tab\r
- if(!tab)\r
- tab=1;\r
- else\r
- tab=0;\r
- switch(wys)\r
+ if ((key&0xFF00)==0x4300&&any)\r
{\r
- case 8:\r
+ //delete CP\r
+ setcolor(RED);\r
+ outtextxy(536,472,"delCP");\r
+ status=delCP();\r
+ if(status!=0)\r
+ message("Codepage not deleted",err);\r
+ offset();\r
+ \r
+ cp%=FIH->num_codepages;\r
+ \r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+\r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
ramka8();\r
- break;\r
- case 14:\r
ramka14();\r
- break;\r
- case 16:\r
ramka16();\r
- break;\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+\r
}\r
- }\r
- if ((key&0xFF00)==0x5100&&any)\r
- {\r
- //cp++\r
- ++cp;\r
- cp%=FIH->num_codepages;\r
- prex=curx;\r
- prey=cury;\r
- if(wys==8&&byo8[cp]==0)\r
+ if ((key&0xFF00)==0x4400)\r
{\r
- if(byo14[cp]!=0)\r
- wys=14;\r
- else if(byo16[cp]!=0)\r
- wys=16;\r
+ //koniec\r
+ setcolor(RED);\r
+ outtextxy(616,472,"end");\r
+ if(maus)\r
+ resetMaus();\r
+ break;\r
}\r
- \r
- else if(wys==14&&byo14[cp]==0)\r
+ while(bioskey(_KEYBRD_READY))\r
{\r
- if(byo16[cp]!=0)\r
- wys=16;\r
- else if(byo8[cp]!=0)\r
- wys=8;\r
+ bioskey(_KEYBRD_READ);\r
}\r
+ if(maus&&mausv)\r
+ showMaus();\r
+ }\r
+ else if(maus)\r
+ {\r
+ prek=klik;\r
+ //premx=mausx;\r
+ //premy=mausy;\r
+ getMaus(&mausx,&mausy,&klik);\r
\r
- else if(wys==16&&byo16[cp]==0)\r
+ if(any&&mausx>=16&&mausx<144&&mausy>=32&&mausy<160&&byo8[cp])\r
{\r
- if(byo8[cp]!=0)\r
- wys=8;\r
- else if(byo14[cp]!=0)\r
- wys=14;\r
+ hideMaus();\r
+ mausv=0;\r
+ pret=tab;\r
+ prew=wys;\r
+ prex=curx;\r
+ prey=cury;\r
+ curx=(mausx-16)/16;\r
+ cury=(mausy-32)/16;\r
+ wys=8;\r
+ tab=0;\r
+ if(klik)\r
+ {\r
+ if(klik&0x01)\r
+ ent8();\r
+ else if(klik&0x2)\r
+ bsp8();\r
+ else if(klik&0x4)\r
+ spc8();\r
+ lin8(3);\r
+ }\r
+ if(prew!=wys||pret)\r
+ ramka8();\r
+ if(prex==curx&&prey==cury)\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(1);\r
+ ramka16();\r
+ lit8(1);\r
+ lit16(1);\r
+ lin8(1);\r
+ break;\r
+ case 14:\r
+ lin14(1);\r
+ ramka14();\r
+ lit8(1);\r
+ lit14(1);\r
+ lin8(1);\r
+ break;\r
+ }\r
+ if(klik)\r
+ lit8(1);\r
+ }\r
+ else\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(2);\r
+ ramka16();\r
+ lit8(1);\r
+ lit16(2);\r
+ lin8(1);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ ramka14();\r
+ lit8(1);\r
+ lit14(2);\r
+ lin8(1);\r
+ break;\r
+ case 8:\r
+ lit8(2);\r
+ }\r
+ }\r
}\r
- cury&=0x7;\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- cpwys();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- \r
- }\r
- if ((key&0xFF00)==0x4900&&any)\r
- {\r
- //cp--\r
- cp+=FIH->num_codepages-1;\r
- cp%=FIH->num_codepages;\r
\r
- if(wys==8&&byo8[cp]==0)\r
+ else if(any&&mausx>=16&&mausx<144&&mausy>=223&&mausy<447&&byo14[cp])\r
{\r
- if(byo14[cp]!=0)\r
- wys=14;\r
- else if(byo16[cp]!=0)\r
- wys=16;\r
+ hideMaus();\r
+ mausv=0;\r
+ pret=tab;\r
+ prew=wys;\r
+ prex=curx;\r
+ prey=cury;\r
+ curx=(mausx-16)/16;\r
+ cury=(mausy-223)/16;\r
+ wys=14;\r
+ tab=0;\r
+ if(klik)\r
+ {\r
+ if(klik&0x01)\r
+ ent14();\r
+ else if(klik&0x2)\r
+ bsp14();\r
+ else if(klik&0x4)\r
+ spc14();\r
+ lin14(3);\r
+ }\r
+ if(prew!=wys||pret)\r
+ ramka14();\r
+ if(prex==curx&&prey==cury)\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(1);\r
+ ramka16();\r
+ lit14(1);\r
+ lit16(1);\r
+ lin14(1);\r
+ break;\r
+ case 8:\r
+ lin8(1);\r
+ ramka8();\r
+ lit14(1);\r
+ lit8(1);\r
+ lin14(1);\r
+ break;\r
+ }\r
+ if(klik)\r
+ lit14(1);\r
+ }\r
+ else\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(2);\r
+ ramka16();\r
+ lit14(1);\r
+ lit16(2);\r
+ lin14(1);\r
+ break;\r
+ case 8:\r
+ lin8(2);\r
+ ramka8();\r
+ lit14(1);\r
+ lit8(2);\r
+ lin14(1);\r
+ break;\r
+ case 14:\r
+ lit14(2);\r
+ }\r
+ }\r
}\r
\r
- else if(wys==14&&byo14[cp]==0)\r
+ else if(any&&mausx>=336&&mausx<464&&mausy>=111&&mausy<367&&byo16[cp])\r
{\r
- if(byo16[cp]!=0)\r
- wys=16;\r
- else if(byo8[cp]!=0)\r
- wys=8;\r
+ hideMaus();\r
+ mausv=0;\r
+ pret=tab;\r
+ prew=wys;\r
+ prex=curx;\r
+ prey=cury;\r
+ curx=(mausx-336)/16;\r
+ cury=(mausy-111)/16;\r
+ wys=16;\r
+ tab=0;\r
+ if(klik)\r
+ {\r
+ if(klik&0x01)\r
+ ent16();\r
+ else if(klik&0x2)\r
+ bsp16();\r
+ else if(klik&0x4)\r
+ spc16();\r
+ lin16(3);\r
+ }\r
+ if(prew!=wys||pret)\r
+ ramka16();\r
+ if(prex==curx&&prey==cury)\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 8:\r
+ lin8(1);\r
+ ramka8();\r
+ lit16(1);\r
+ lit8(1);\r
+ lin16(1);\r
+ break;\r
+ case 14:\r
+ lin14(1);\r
+ ramka14();\r
+ lit16(1);\r
+ lit14(1);\r
+ lin16(1);\r
+ break;\r
+ }\r
+ if(klik)\r
+ lit16(1);\r
+ }\r
+ else\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ ramka8();\r
+ lit16(1);\r
+ lit8(2);\r
+ lin16(1);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ ramka14();\r
+ lit16(1);\r
+ lit14(2);\r
+ lin16(1);\r
+ break;\r
+ case 16:\r
+ lit16(2);\r
+ }\r
+ }\r
}\r
\r
- else if(wys==16&&byo16[cp]==0)\r
+ else if(any&&klik&&mausx>=176&&mausx<304&&mausy>=32&&mausy<160&&byo8[cp])\r
{\r
- if(byo8[cp]!=0)\r
- wys=8;\r
- else if(byo14[cp]!=0)\r
- wys=14;\r
+ hideMaus();\r
+ mausv=0;\r
+ prew=wys;\r
+ pre=lit;\r
+ pret=tab;\r
+ wys=8;\r
+ tab=1;\r
+ lit=((mausy-32)/8)*16+((mausx-176)/8);\r
+ if (pre==lit)\r
+ {\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ ramka16();\r
+ ramka8();\r
+ lin16(1);\r
+ lit16(1);\r
+ lin8(1);\r
+ lit8(1);\r
+ break;\r
+ case 14:\r
+ ramka14();\r
+ ramka8();\r
+ lin14(1);\r
+ lit14(1);\r
+ lin8(1);\r
+ lit8(1);\r
+ break;\r
+ case 8:\r
+ if(!pret)\r
+ ramka8();\r
+ break;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(2);\r
+ ramka16();\r
+ ramka8();\r
+ lin8(1);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ ramka14();\r
+ ramka8();\r
+ lin8(1);\r
+ break;\r
+ case 8:\r
+ lin8(2);\r
+ if(!pret)\r
+ ramka8();\r
+ }\r
+ }\r
}\r
- cury&=0x7;\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- cpwys();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
-\r
- }\r
- if ((key&0xFF00)==0x4700&&any)\r
- {\r
- //wys--\r
- prex=curx;\r
- prey=cury;\r
- switch(wys)\r
+ \r
+ else if(any&&klik&&mausx>=176&&mausx<304&&mausy>=223&&mausy<447&&byo14[cp])\r
{\r
- case 8:\r
- if (byo16[cp]!=0)\r
+ hideMaus();\r
+ mausv=0;\r
+ prew=wys;\r
+ pre=lit;\r
+ pret=tab;\r
+ wys=14;\r
+ tab=1;\r
+ lit=((mausy-223)/14)*16+((mausx-176)/8);\r
+ if (pre==lit)\r
{\r
- wys=16;\r
- lin16(1);\r
- lit16(1);\r
- ramka16();\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ ramka16();\r
+ ramka14();\r
+ lin16(1);\r
+ lit16(1);\r
+ lin14(1);\r
+ lit14(1);\r
+ break;\r
+ case 8:\r
+ ramka8();\r
+ ramka14();\r
+ lin8(1);\r
+ lit8(1);\r
+ lin14(1);\r
+ lit14(1);\r
+ break;\r
+ case 14:\r
+ if(!pret)\r
+ ramka14();\r
+ break;\r
+ }\r
}\r
- else if(byo14[cp]!=0)\r
+ else\r
{\r
- wys=14;\r
- lin14(1);\r
- lit14(1);\r
- ramka14();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(prew)\r
+ {\r
+ case 16:\r
+ lin16(2);\r
+ ramka16();\r
+ ramka14();\r
+ lin14(1);\r
+ break;\r
+ case 8:\r
+ lin8(2);\r
+ ramka8();\r
+ ramka14();\r
+ lin14(1);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ if(!pret)\r
+ ramka14();\r
+ }\r
}\r
- lin8(1);\r
- lit8(1);\r
- ramka8();\r
- break;\r
- case 14:\r
- if (byo8[cp]!=0)\r
+ }\r
+ \r
+ else if(any&&klik&&mausx>=496&&mausx<624&&mausy>=111&&mausy<367&&byo16[cp])\r
+ {\r
+ hideMaus();\r
+ mausv=0;\r
+ prew=wys;\r
+ pre=lit;\r
+ pret=tab;\r
+ wys=16;\r
+ tab=1;\r
+ lit=((mausy-111)/16)*16+((mausx-496)/8);\r
+ if (pre==lit)\r
{\r
- wys=8;\r
- cury%=8;\r
- lin8(1);\r
- lit8(2);\r
- ramka8();\r
+ switch(prew)\r
+ {\r
+ case 8:\r
+ ramka8();\r
+ ramka16();\r
+ lin8(1);\r
+ lit8(1);\r
+ lin16(1);\r
+ lit16(1);\r
+ break;\r
+ case 14:\r
+ ramka14();\r
+ ramka16();\r
+ lin14(1);\r
+ lit14(1);\r
+ lin16(1);\r
+ lit16(1);\r
+ break;\r
+ case 16:\r
+ if(!pret)\r
+ ramka16();\r
+ break;\r
+ }\r
}\r
- else if(byo16[cp]!=0)\r
+ else\r
+ {\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ switch(prew)\r
+ {\r
+ case 8:\r
+ lin8(2);\r
+ ramka8();\r
+ ramka16();\r
+ lin16(1);\r
+ break;\r
+ case 14:\r
+ lin14(2);\r
+ ramka14();\r
+ ramka16();\r
+ lin16(1);\r
+ break;\r
+ case 16:\r
+ lin16(2);\r
+ if(!pret)\r
+ ramka16();\r
+ }\r
+ }\r
+ }\r
+ \r
+ else if(any&&klik&&!prek&&mausx>=128&&mausx<184&&mausy<8)\r
+ {\r
+ hideMaus();\r
+ mausv=0;\r
+ //cp+-\r
+ if(klik&0x01)\r
+ ++cp;\r
+ else\r
+ cp+=FIH->num_codepages-1;\r
+ cp%=FIH->num_codepages;\r
+ prex=curx;\r
+ prey=cury;\r
+ if(wys==8&&byo8[cp]==0)\r
{\r
- wys=16;\r
- lin16(1);\r
- lit16(1);\r
- ramka16();\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
}\r
- lin14(1);\r
- lit14(2);\r
- ramka14();\r
- break;\r
- case 16:\r
- if (byo14[cp]!=0)\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
{\r
- wys=14;\r
- cury%=14;\r
- lin14(1);\r
- lit14(2);\r
- ramka14();\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
}\r
- else if(byo8[cp]!=0)\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
{\r
- wys=8;\r
- cury%=8;\r
- lin8(1);\r
- lit8(2);\r
- ramka8();\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
}\r
- lin16(1);\r
- lit16(2);\r
+ cury&=0x7;\r
+ ramka8();\r
+ ramka14();\r
ramka16();\r
- break;\r
+ cpwys();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
- cpwys();\r
- }\r
- if ((key&0xFF00)==0x4f00&&any)\r
- {\r
- //wys++\r
- prex=curx;\r
- prey=cury;\r
- switch(wys)\r
+ \r
+ else if(any&&klik&&!prek&&mausx>=192&&mausx<224&&mausy<8)\r
{\r
- case 8:\r
- if(byo14[cp]!=0)\r
+ hideMaus();\r
+ mausv=0;\r
+ //wys+-\r
+ prex=curx;\r
+ prey=cury;\r
+ switch(wys)\r
{\r
- wys=14;\r
+ case 8:\r
+ if(klik&0x1)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ { \r
+ wys=14;\r
+ lin14(1);\r
+ lit14(1);\r
+ ramka14();\r
+ }\r
+ else if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ else if(byo14[cp]!=0)\r
+ { \r
+ wys=14;\r
+ lin14(1);\r
+ lit14(1);\r
+ ramka14();\r
+ }\r
+ }\r
+ lin8(1);\r
+ lit8(1);\r
+ ramka8();\r
+ break;\r
+ case 14:\r
+ if(klik&0x1)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ else if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ else if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ lin16(1);\r
+ lit16(1);\r
+ ramka16();\r
+ }\r
+ }\r
lin14(1);\r
- lit14(1);\r
+ lit14(2);\r
ramka14();\r
- }\r
- else if (byo16[cp]!=0)\r
- {\r
- wys=16;\r
+ break;\r
+ case 16:\r
+ if(klik&0x1)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ else if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ lin14(1);\r
+ lit14(2);\r
+ ramka14();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ lin14(1);\r
+ lit14(2);\r
+ ramka14();\r
+ }\r
+ else if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ lin8(1);\r
+ lit8(2);\r
+ ramka8();\r
+ }\r
+ }\r
lin16(1);\r
- lit16(1);\r
+ lit16(2);\r
ramka16();\r
+ break;\r
}\r
- lin8(1);\r
- lit8(1);\r
- ramka8();\r
- break;\r
- case 14:\r
- if(byo16[cp]!=0)\r
+ cpwys();\r
+ }\r
+ \r
+ else if(klik&&!prek&&mausx<40&&mausy>=472)\r
+ {\r
+ hideMaus();\r
+ mausv=0;\r
+ //new CPI\r
+ setcolor(RED);\r
+ outtextxy(16,472,"new");\r
+ deleteCPI();\r
+ status=newCPI();\r
+ while(status!=0)\r
{\r
- wys=16;\r
- lin16(1);\r
- lit16(1);\r
- ramka16();\r
+ if (message("CPI not created",err,2)==0)\r
+ status=newCPI();\r
+ else\r
+ break;\r
}\r
- else if (byo8[cp]!=0)\r
+ any=!status;\r
+ if(any)\r
{\r
- wys=8;\r
+ strcpy(nazwap,"new CPI");\r
+ cp=0;\r
+ if(byo8[0])\r
+ wys=8;\r
+ else if(byo16[0])\r
+ wys=16;\r
+ else if(byo14[0])\r
+ wys=14;\r
cury%=8;\r
- lin8(1);\r
- lit8(2);\r
- ramka8();\r
}\r
- lin14(1);\r
- lit14(2);\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
ramka14();\r
- break;\r
- case 16:\r
- if(byo8[cp]!=0)\r
- {\r
- wys=8;\r
- cury%=8;\r
- lin8(1);\r
- lit8(2);\r
- ramka8();\r
- }\r
- else if (byo14[cp]!=0)\r
- {\r
- wys=14;\r
- cury%=14;\r
- lin14(1);\r
- lit14(2);\r
- ramka14();\r
- }\r
- lin16(1);\r
- lit16(2);\r
ramka16();\r
- break;\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
- cpwys();\r
- }\r
- \r
- if ((key&0xFF00)==0x3b00)\r
- {\r
- //new CPI\r
- setcolor(RED);\r
- outtextxy(16,472,"new");\r
- deleteCPI();\r
- status=newCPI();\r
- while(status!=0)\r
+ \r
+ else if(any&&klik&&!prek&&mausx>=56&&mausx<104&&mausy>=472)\r
{\r
- if (message("CPI not created",err,2)==0)\r
- status=newCPI();\r
- else\r
+ hideMaus();\r
+ mausv=0;\r
+ //save CPI\r
+ setcolor(RED);\r
+ outtextxy(72,472,"save");\r
+ status=zap();\r
+ while(status!=0)\r
{\r
- break;\r
- //closegraph();\r
- //deleteCPI();\r
- //return status;\r
+ if (message("CPI file not saved",err,2)==0)\r
+ status=zap();\r
+ else\r
+ break;\r
}\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ cury%=8;\r
}\r
- any=!status;\r
- if(any)\r
+ \r
+ else if(klik&&!prek&&mausx>=120&&mausx<168&&mausy>=472)\r
{\r
- strcpy(nazwap,"new CPI");\r
+ hideMaus();\r
+ mausv=0;\r
+ //load CPI\r
+ setcolor(RED);\r
+ outtextxy(136,472,"load");\r
+ deleteCPI();\r
+ status=otw();\r
+ while(status!=0)\r
+ {\r
+ if (message("CPI file not loaded",err,2)==0)\r
+ status=otw();\r
+ else\r
+ break;\r
+ }\r
+ any=!status;\r
cp=0;\r
if(byo8[0])\r
wys=8;\r
else if(byo14[0])\r
wys=14;\r
cury%=8;\r
+\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
\r
- }\r
- if ((key&0xFF00)==0x3c00&&any)\r
- {\r
- //zapisz\r
- setcolor(RED);\r
- outtextxy(72,472,"save");\r
- status=zap();\r
- while(status!=0)\r
- {\r
- if (message("CPI file not saved",err,2)==0)\r
- status=zap();\r
- else\r
- break;\r
- }\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- cury%=8;\r
-\r
-\r
- }\r
-\r
-\r
- if ((key&0xFF00)==0x3d00)\r
- {\r
- //wczytaj\r
- setcolor(RED);\r
- outtextxy(136,472,"load");\r
- deleteCPI();\r
- status=otw();\r
- while(status!=0)\r
+ else if(any&&klik&&!prek&&mausx>=184&&mausx<224&&mausy>=472)\r
{\r
- if (message("CPI file not loaded",err,2)==0)\r
- status=otw();\r
- else\r
- break;\r
- }\r
- any=!status;\r
- cp=0;\r
- if(byo8[0])\r
- wys=8;\r
- else if(byo16[0])\r
- wys=16;\r
- else if(byo14[0])\r
- wys=14;\r
- cury%=8;\r
+ hideMaus();\r
+ mausv=0;\r
+ //save & use CPI\r
+ setcolor(RED);\r
+ outtextxy(72,472,"save use");\r
+ status=zap();\r
+ while(status!=0)\r
+ {\r
+ if (message("CPI file not saved",err,2)==0)\r
+ status=zap();\r
+ else\r
+ break;\r
+ }\r
+ if(status==0)\r
+ {\r
+ sprintf(err,"mode con:cp prep=((%u) %s)",CPEH[cp]->codepage,nazwap);\r
+ puts(err);\r
+ system(err);\r
+ sprintf(err,"mode con:cp sel=%u",CPEH[cp]->codepage);\r
+ puts(err);\r
+ system(err);\r
+ delay(5000);\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
+ }\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ cury%=8;\r
\r
- }\r
- if((key&0xFF00)==0x3e00&&any)\r
- {\r
- \r
- //zapisz+system\r
- setcolor(RED);\r
- outtextxy(72,472,"save use");\r
- status=zap();\r
- while(status!=0)\r
- {\r
- if (message("CPI file not saved",err,2)==0)\r
- status=zap();\r
- else\r
- break;\r
- }\r
- if(status==0)\r
- {\r
- sprintf(err,"mode con:cp prep=((%u) %s)",CPEH[cp]->codepage,nazwap);\r
- puts(err);\r
- system(err);\r
- sprintf(err,"mode con:cp sel=%u",CPEH[cp]->codepage);\r
- puts(err);\r
- system(err);\r
- delay(5000);\r
- closegraph();\r
- initgraph(&kart16,&tryb16,"");\r
-\r
- }\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- cury%=8;\r
-\r
- }\r
- if ((key&0xFF00)==0x3f00&&any)\r
- {\r
- //zmiana numeru\r
- setcolor(RED);\r
- outtextxy(256,472,"number");\r
- status=zmn();\r
- if(status!=0)\r
- message("Number not changed",err);\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- }\r
- if ((key&0xFF00)==0x4000&&any)\r
- {\r
- //new font\r
- setcolor(RED);\r
- outtextxy(336,472,"newF");\r
- status=newF();\r
- if(status!=0)\r
- message("Fonr not created",err);\r
- offset();\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- \r
- }\r
- if ((key&0xFF00)==0x4100&&any)\r
- {\r
- //new CP\r
- setcolor(RED);\r
- outtextxy(400,472,"newCP");\r
- status=newCP();\r
- if(status!=0)\r
- message("Codepage not created",err);\r
- else\r
- cp=FIH->num_codepages-1;\r
- if(wys==8&&byo8[cp]==0)\r
- {\r
- if(byo14[cp]!=0)\r
- wys=14;\r
- else if(byo16[cp]!=0)\r
- wys=16;\r
- }\r
- \r
- else if(wys==14&&byo14[cp]==0)\r
- {\r
- if(byo16[cp]!=0)\r
- wys=16;\r
- else if(byo8[cp]!=0)\r
- wys=8;\r
}\r
- \r
- else if(wys==16&&byo16[cp]==0)\r
+ \r
+ else if(any&&klik&&!prek&&mausx>=240&&mausx<304&&mausy>=472)\r
{\r
- if(byo8[cp]!=0)\r
- wys=8;\r
- else if(byo14[cp]!=0)\r
- wys=14;\r
+ hideMaus();\r
+ mausv=0;\r
+ //change CP #\r
+ setcolor(RED);\r
+ outtextxy(256,472,"number");\r
+ status=zmn();\r
+ if(status!=0)\r
+ message("Number not changed",err);\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
- cury&=0x7;\r
- offset();\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
\r
- }\r
- if ((key&0xFF00)==0x4200&&any)\r
- {\r
- //delete font\r
- setcolor(RED);\r
- outtextxy(472,472,"delF");\r
- status=delF();\r
- if(status!=0)\r
- message("Font not deleted",err);\r
- offset();\r
\r
- if(wys==8&&byo8[cp]==0)\r
+ else if(any&&klik&&!prek&&mausx>=320&&mausx<368&&mausy>=472)\r
{\r
- if(byo14[cp]!=0)\r
- wys=14;\r
- else if(byo16[cp]!=0)\r
- wys=16;\r
+ hideMaus();\r
+ mausv=0;\r
+ //new font\r
+ setcolor(RED);\r
+ outtextxy(336,472,"newF");\r
+ status=newF();\r
+ if(status!=0)\r
+ message("Fonr not created",err);\r
+ offset();\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
\r
- else if(wys==14&&byo14[cp]==0)\r
+ else if(any&&klik&&!prek&&mausx>=384&&mausx<440&&mausy>=472)\r
{\r
- if(byo16[cp]!=0)\r
- wys=16;\r
- else if(byo8[cp]!=0)\r
- wys=8;\r
+ hideMaus();\r
+ mausv=0;\r
+ //new CP\r
+ setcolor(RED);\r
+ outtextxy(400,472,"newCP");\r
+ status=newCP();\r
+ if(status!=0)\r
+ message("Codepage not created",err);\r
+ else\r
+ cp=FIH->num_codepages-1;\r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ offset();\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
\r
- else if(wys==16&&byo16[cp]==0)\r
+ else if(any&&klik&&!prek&&mausx>=456&&mausx<504&&mausy>=472)\r
{\r
- if(byo8[cp]!=0)\r
- wys=8;\r
- else if(byo14[cp]!=0)\r
- wys=14;\r
+ hideMaus();\r
+ mausv=0;\r
+ //delete font\r
+ setcolor(RED);\r
+ outtextxy(472,472,"delF");\r
+ status=delF();\r
+ if(status!=0)\r
+ message("Font not deleted",err);\r
+ offset();\r
+\r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+ \r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+ \r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
- cury&=0x7;\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- \r
- }\r
- if ((key&0xFF00)==0x4300&&any)\r
- {\r
- //delete CP\r
- setcolor(RED);\r
- outtextxy(536,472,"delCP");\r
- status=delCP();\r
- if(status!=0)\r
- message("Codepage not deleted",err);\r
- offset();\r
- \r
- cp%=FIH->num_codepages;\r
\r
- if(wys==8&&byo8[cp]==0)\r
+ else if(any&&klik&&!prek&&mausx>=520&&mausx<576&&mausy>=472)\r
{\r
- if(byo14[cp]!=0)\r
- wys=14;\r
- else if(byo16[cp]!=0)\r
- wys=16;\r
+ hideMaus();\r
+ mausv=0;\r
+ //delete CP\r
+ setcolor(RED);\r
+ outtextxy(536,472,"delCP");\r
+ status=delCP();\r
+ if(status!=0)\r
+ message("Codepage not deleted",err);\r
+ offset();\r
+ \r
+ cp%=FIH->num_codepages;\r
+ \r
+ if(wys==8&&byo8[cp]==0)\r
+ {\r
+ if(byo14[cp]!=0)\r
+ wys=14;\r
+ else if(byo16[cp]!=0)\r
+ wys=16;\r
+ }\r
+\r
+ else if(wys==14&&byo14[cp]==0)\r
+ {\r
+ if(byo16[cp]!=0)\r
+ wys=16;\r
+ else if(byo8[cp]!=0)\r
+ wys=8;\r
+ }\r
+\r
+ else if(wys==16&&byo16[cp]==0)\r
+ {\r
+ if(byo8[cp]!=0)\r
+ wys=8;\r
+ else if(byo14[cp]!=0)\r
+ wys=14;\r
+ }\r
+ cury&=0x7;\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
}\r
\r
- else if(wys==14&&byo14[cp]==0)\r
+ else if(klik&&!prek&&mausx>=592&&mausy>=472)\r
{\r
- if(byo16[cp]!=0)\r
- wys=16;\r
- else if(byo8[cp]!=0)\r
- wys=8;\r
+ hideMaus();\r
+ mausv=0;\r
+ setcolor(RED);\r
+ outtextxy(616,472,"end");\r
+ resetMaus();\r
+ break;\r
}\r
\r
- else if(wys==16&&byo16[cp]==0)\r
+ else\r
{\r
- if(byo8[cp]!=0)\r
- wys=8;\r
- else if(byo14[cp]!=0)\r
- wys=14;\r
+ mausv=1;\r
+ showMaus();\r
}\r
- cury&=0x7;\r
- new8();\r
- menu8();\r
- cpwys();\r
- ramka8();\r
- ramka14();\r
- ramka16();\r
- lin8();\r
- lin14();\r
- lin16();\r
- lit8();\r
- lit14();\r
- lit16();\r
- \r
- }\r
- if ((key&0xFF00)==0x4400)\r
- {\r
- //koniec\r
- setcolor(RED);\r
- outtextxy(616,472,"end");\r
- break;\r
- }\r
- while(bioskey(_KEYBRD_READY))\r
- {\r
- bioskey(_KEYBRD_READ);\r
}\r
}\r
\r