--- /dev/null
+#include <graphics.h>\r
+#include <stdio.h>\r
+#include <conio.h>\r
+#include <stdlib.h>\r
+#include <dos.h>\r
+#include <bios.h>\r
+\r
+//#include <iostream.h>\r
+\r
+struct FontFileHeader\r
+{\r
+ unsigned char id0;\r
+ unsigned char id[7];\r
+ unsigned char reserved[8];\r
+ short pnum;\r
+ unsigned char ptyp;\r
+ long fih_offset;\r
+};\r
+struct FontInfoHeader\r
+{\r
+ short num_codepages;\r
+};\r
+struct CodePageEntryHeader\r
+{\r
+ short cpeh_size;\r
+ long next_cpeh_offset;\r
+ short device_type;\r
+ unsigned char device_name[8];\r
+ short codepage;\r
+ unsigned char reserved[6];\r
+ long cpih_offset;\r
+};\r
+struct CodePageInfoHeader\r
+{\r
+ short version;\r
+ short num_fonts;\r
+ short size;\r
+};\r
+struct ScreenFontHeader\r
+{\r
+ unsigned char height;\r
+ unsigned char width;\r
+ unsigned char yaspect;\r
+ unsigned char xaspect;\r
+ short num_chars;\r
+};\r
+struct char8\r
+{\r
+ unsigned char lin[8];\r
+};\r
+struct char14\r
+{\r
+ unsigned char lin[14];\r
+};\r
+struct char16\r
+{\r
+ unsigned char lin[16];\r
+};\r
+struct ScreenFontBitmap16\r
+{\r
+ char16 lit[256];\r
+};\r
+\r
+struct ScreenFontBitmap14\r
+{\r
+ char14 lit[256];\r
+};\r
+\r
+struct ScreenFontBitmap8\r
+{\r
+ char8 lit[256];\r
+};\r
+\r
+\r
+ int status;\r
+ char nazwap[40]="Nie_wybrano_pliku";\r
+ char err[40];\r
+// int kart8=CGA;\r
+// int kart14=EGA;\r
+ int kart16=VGA;\r
+// int tryb8=CGAC2;\r
+// int tryb14=EGAHI;\r
+ int tryb16=VGAHI;\r
+\r
+ FILE *CPI;\r
+ FontFileHeader FFH;\r
+ FontInfoHeader FIH;\r
+ CodePageEntryHeader CPEH[6];\r
+ CodePageInfoHeader CPIH[6];\r
+ ScreenFontHeader SFH[6][3];\r
+ ScreenFontBitmap16 SFB16[6];\r
+ ScreenFontBitmap14 SFB14[6];\r
+ ScreenFontBitmap8 SFB8[6];\r
+\r
+ int byo8[6];\r
+ int byo14[6];\r
+ int byo16[6];\r
+ int wys=8;\r
+ int cp=0;\r
+ int lit=0x42;\r
+ int curx=2;\r
+ int cury=2;\r
+ int key;\r
+ int tab=0;\r
+ char abc[16]="0123456789ABCDEF";\r
+\r
+\r
+int pot(int a,int n)\r
+{\r
+ int y=1;\r
+ for(int i=0;i<n;++i)\r
+ y*=a;\r
+ return y;\r
+}\r
+\r
+void new8()\r
+{\r
+ system("CLS");\r
+ cleardevice();\r
+ setcolor(GREEN);\r
+ //outtextxy(0,0, "Edytor napis¢w±°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");\r
+ outtextxy(0,0, "Edytor napis¢w± ");\r
+ outtextxy(0,8, "±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
+}\r
+void menu8()\r
+{\r
+ setcolor(GREEN);\r
+ outtextxy(0,464,"±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
+ outtextxy(0,472,"F1.pomoc°°F2.zapis°°F3.odczyt°°F4.uzycie w systemie°°F5.zmiana numeru°°F6.koniec");\r
+ outtextxy(280,466,".");\r
+}\r
+void cpwys()\r
+{\r
+ char cpw[90];\r
+ setcolor(BLACK);\r
+ outtextxy(0x78,0,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ");\r
+ sprintf(cpw,"°cp%03d°8x%02d°%s°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°",CPEH[cp].codepage,wys,nazwap);\r
+ setcolor(GREEN);\r
+\r
+ outtextxy(0x78,0,cpw);\r
+ //sprintf(cpw,"%s°°°°°°°°°°°°°°°°°°°°°°°°°",nazwap);\r
+ //outtextxy(0xD8,0,nazwap);\r
+}\r
+\r
+void ramka8()\r
+{\r
+ if(tab==0&&wys==8)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(15,31,144,160);\r
+ if(tab!=0&&wys==8)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(175,31,304,160);\r
+}\r
+void ramka14()\r
+{\r
+ if(tab==0&&wys==14)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(15,222,144,447);\r
+ if(tab!=0&&wys==14)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(175,222,304,447);\r
+}\r
+void ramka16()\r
+{\r
+ if(tab==0&&wys==16)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(335,110,464,367);\r
+ if(tab!=0&&wys==16)\r
+ setcolor(GREEN);\r
+ else\r
+ setcolor(RED);\r
+ rectangle(495,110,624,367);\r
+}\r
+void lin14()\r
+{\r
+ char ab[2]="X";\r
+ setcolor(RED);\r
+ outtextxy(176,215,"0123456789ABCDEF");\r
+ outtextxy(168,226,"0");\r
+ outtextxy(168,240,"1");\r
+ outtextxy(168,254,"2");\r
+ outtextxy(168,268,"3");\r
+ outtextxy(168,282,"4");\r
+ outtextxy(168,296,"5");\r
+ outtextxy(168,310,"6");\r
+ outtextxy(168,324,"7");\r
+ outtextxy(168,338,"8");\r
+ outtextxy(168,352,"9");\r
+ outtextxy(168,366,"A");\r
+ outtextxy(168,380,"B");\r
+ outtextxy(168,394,"C");\r
+ outtextxy(168,408,"D");\r
+ outtextxy(168,422,"E");\r
+ outtextxy(168,436,"F");\r
+\r
+ for(int l=0;l<256;++l)\r
+ {\r
+ for(int a=0;a<14;++a)\r
+ {\r
+ for(int b=0;b<8;++b)\r
+ {\r
+ if (l==lit&&wys==14)\r
+ {\r
+ setcolor(GREEN);\r
+ ab[0]=abc[lit%16];\r
+ outtextxy(176+8*(lit%16),215,ab);\r
+ ab[0]=abc[lit/16];\r
+ outtextxy(168,226+14*(lit/16),ab);\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB14[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,GREEN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB14[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,GREEN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BLACK);\r
+ }\r
+ }\r
+ else\r
+ {\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB14[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BROWN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB14[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BROWN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,223+a+(l/16)*14,BLACK);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+void lin8()\r
+{\r
+ char ab[2]="X";\r
+ setcolor(RED);\r
+ outtextxy(176,24,"0123456789ABCDEF");\r
+ outtextxy(168,32,"0");\r
+ outtextxy(168,40,"1");\r
+ outtextxy(168,48,"2");\r
+ outtextxy(168,56,"3");\r
+ outtextxy(168,64,"4");\r
+ outtextxy(168,72,"5");\r
+ outtextxy(168,80,"6");\r
+ outtextxy(168,88,"7");\r
+ outtextxy(168,96,"8");\r
+ outtextxy(168,104,"9");\r
+ outtextxy(168,112,"A");\r
+ outtextxy(168,120,"B");\r
+ outtextxy(168,128,"C");\r
+ outtextxy(168,136,"D");\r
+ outtextxy(168,144,"E");\r
+ outtextxy(168,152,"F");\r
+\r
+ for(int l=0;l<256;++l)\r
+ {\r
+ for(int a=0;a<8;++a)\r
+ {\r
+ for(int b=0;b<8;++b)\r
+ {\r
+ if (l==lit&&wys==8)\r
+ {\r
+ setcolor(GREEN);\r
+ ab[0]=abc[lit%16];\r
+ outtextxy(176+8*(lit%16),24,ab);\r
+ ab[0]=abc[lit/16];\r
+ outtextxy(168,32+8*(lit/16),ab);\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB8[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,GREEN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB8[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,GREEN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BLACK);\r
+ }\r
+ }\r
+ else\r
+ {\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB8[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BROWN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB8[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BROWN);\r
+ else\r
+ putpixel(176+b+(l%16)*8,32+a+(l/16)*8,BLACK);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+void lin16()\r
+{\r
+ char ab[2]="X";\r
+ setcolor(RED);\r
+ outtextxy(496,103,"0123456789ABCDEF");\r
+ outtextxy(488,115,"0");\r
+ outtextxy(488,131,"1");\r
+ outtextxy(488,147,"2");\r
+ outtextxy(488,163,"3");\r
+ outtextxy(488,179,"4");\r
+ outtextxy(488,195,"5");\r
+ outtextxy(488,211,"6");\r
+ outtextxy(488,227,"7");\r
+ outtextxy(488,243,"8");\r
+ outtextxy(488,259,"9");\r
+ outtextxy(488,275,"A");\r
+ outtextxy(488,291,"B");\r
+ outtextxy(488,307,"C");\r
+ outtextxy(488,323,"D");\r
+ outtextxy(488,339,"E");\r
+ outtextxy(488,355,"F");\r
+\r
+ for(int l=0;l<256;++l)\r
+ {\r
+ for(int a=0;a<16;++a)\r
+ {\r
+ for(int b=0;b<8;++b)\r
+ {\r
+ if (l==lit&&wys==16)\r
+ {\r
+ setcolor(GREEN);\r
+ ab[0]=abc[lit%16];\r
+ outtextxy(496+8*(lit%16),103,ab);\r
+ ab[0]=abc[lit/16];\r
+ outtextxy(488,115+16*(lit/16),ab);\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB16[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,GREEN);\r
+ else\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB16[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,GREEN);\r
+ else\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,BLACK);\r
+ }\r
+ }\r
+ else\r
+ {\r
+\r
+ if(b>0)\r
+ {\r
+ if((SFB16[cp].lit[l].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,BROWN);\r
+ else\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,BLACK);\r
+ }\r
+ else\r
+ {\r
+ if((SFB16[cp].lit[l].lin[a]/0x80)==1)\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,BROWN);\r
+ else\r
+ putpixel(496+b+(l%16)*8,111+a+(l/16)*16,EGA_BLACK);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+void lit8()\r
+{\r
+ setcolor(BLACK);\r
+ for(int z=0;z<128;++z)\r
+ line(16,32+z,143,32+z);\r
+ setcolor(RED);\r
+ outtextxy(20,24,"0 1 2 3 4 5 6 7");\r
+ outtextxy(8,36,"0");\r
+ outtextxy(8,52,"1");\r
+ outtextxy(8,68,"2");\r
+ outtextxy(8,84,"3");\r
+ outtextxy(8,100,"4");\r
+ outtextxy(8,116,"5");\r
+ outtextxy(8,132,"6");\r
+ outtextxy(8,148,"7");\r
+\r
+ for(int a=0;a<8;++a)\r
+ {\r
+ char ab[2]="q";\r
+ setfillstyle(SOLID_FILL,BROWN);\r
+ for(int b=0;b<8;++b)\r
+ {\r
+\r
+\r
+ if (curx==b&&cury==a&&wys==8)\r
+ {\r
+ setcolor(GREEN);\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
+ rectangle(0x10+b*0x10,0x20+a*0x10,0x1f+b*0x10,0x2f+a*0x10);\r
+ if(b>0)\r
+ {\r
+ if((SFB8[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ floodfill(0x11+b*0x10,0x21+a*0x10,GREEN);\r
+ }\r
+ else\r
+ {\r
+ if((SFB8[cp].lit[lit].lin[a]/0x80)==1)\r
+ floodfill(0x11+b*0x10,0x21+a*0x10,GREEN);\r
+ }\r
+ setcolor(BLACK);\r
+ rectangle(0x11+b*0x10,0x21+a*0x10,0x1e+b*0x10,0x2e+a*0x10);\r
+ }\r
+ else\r
+ {\r
+\r
+ setcolor(BROWN);\r
+ if(b>0)\r
+ {\r
+ if((SFB8[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ {\r
+ rectangle(0x10+b*0x10,0x20+a*0x10,0x1f+b*0x10,0x2f+a*0x10);\r
+ floodfill(0x11+b*0x10,0x21+a*0x10,BROWN);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if((SFB8[cp].lit[lit].lin[a]/0x80)==1)\r
+ {\r
+ rectangle(0x10+b*0x10,0x20+a*0x10,0x1f+b*0x10,0x2f+a*0x10);\r
+ floodfill(0x11+b*0x10,0x21+a*0x10,BROWN);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+void lit14()\r
+{\r
+ setcolor(BLACK);\r
+ for(int z=0;z<224;++z)\r
+ line(16,223+z,143,223+z);\r
+ setcolor(RED);\r
+ outtextxy(20,215,"0 1 2 3 4 5 6 7");\r
+ outtextxy(8,227,"0");\r
+ outtextxy(8,243,"1");\r
+ outtextxy(8,259,"2");\r
+ outtextxy(8,275,"3");\r
+ outtextxy(8,291,"4");\r
+ outtextxy(8,307,"5");\r
+ outtextxy(8,323,"6");\r
+ outtextxy(8,339,"7");\r
+ outtextxy(8,355,"8");\r
+ outtextxy(8,371,"9");\r
+ outtextxy(8,387,"A");\r
+ outtextxy(8,403,"B");\r
+ outtextxy(8,419,"C");\r
+ outtextxy(8,435,"D");\r
+\r
+ for(int a=0;a<14;++a)\r
+ {\r
+ char ab[2]="q";\r
+ setfillstyle(SOLID_FILL,BROWN);\r
+ for(int b=0;b<8;++b)\r
+ {\r
+\r
+\r
+ if (curx==b&&cury==a&&wys==14)\r
+ {\r
+ setcolor(GREEN);\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
+ rectangle(16+b*16,223+a*16,31+b*16,238+a*16);\r
+ if(b>0)\r
+ {\r
+ if((SFB14[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ floodfill(17+b*16,224+a*16,GREEN);\r
+ }\r
+ else\r
+ {\r
+ if((SFB14[cp].lit[lit].lin[a]/0x80)==1)\r
+ floodfill(17+b*16,224+a*16,GREEN);\r
+ }\r
+ setcolor(BLACK);\r
+ rectangle(17+b*16,224+a*16,30+b*16,237+a*16);\r
+ }\r
+ else\r
+ {\r
+\r
+ setcolor(BROWN);\r
+ if(b>0)\r
+ {\r
+ if((SFB14[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ {\r
+ rectangle(16+b*16,223+a*16,31+b*16,238+a*16);\r
+ floodfill(17+b*16,224+a*16,BROWN);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if((SFB14[cp].lit[lit].lin[a]/0x80)==1)\r
+ {\r
+ rectangle(16+b*16,223+a*16,31+b*16,238+a*16);\r
+ floodfill(17+b*16,224+a*16,BROWN);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+void lit16()\r
+{\r
+ setcolor(BLACK);\r
+ for(int z=0;z<256;++z)\r
+ line(336,111+z,463,111+z);\r
+ setcolor(RED);\r
+ outtextxy(340,103,"0 1 2 3 4 5 6 7");\r
+ outtextxy(328,115,"0");\r
+ outtextxy(328,131,"1");\r
+ outtextxy(328,147,"2");\r
+ outtextxy(328,163,"3");\r
+ outtextxy(328,179,"4");\r
+ outtextxy(328,195,"5");\r
+ outtextxy(328,211,"6");\r
+ outtextxy(328,227,"7");\r
+ outtextxy(328,243,"8");\r
+ outtextxy(328,259,"9");\r
+ outtextxy(328,275,"A");\r
+ outtextxy(328,291,"B");\r
+ outtextxy(328,307,"C");\r
+ outtextxy(328,323,"D");\r
+ outtextxy(328,339,"E");\r
+ outtextxy(328,355,"F");\r
+\r
+ for(int a=0;a<16;++a)\r
+ {\r
+ char ab[2]="q";\r
+ setfillstyle(SOLID_FILL,BROWN);\r
+ for(int b=0;b<8;++b)\r
+ {\r
+\r
+\r
+ if (curx==b&&cury==a&&wys==16)\r
+ {\r
+ setcolor(GREEN);\r
+ ab[0]=abc[curx];\r
+ outtextxy(340+16*curx,103,ab);\r
+ ab[0]=abc[cury];\r
+ outtextxy(328,115+16*cury,ab);\r
+ rectangle(336+b*16,111+a*16,351+b*16,126+a*16);\r
+ if(b>0)\r
+ {\r
+ if((SFB16[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ floodfill(337+b*16,112+a*16,GREEN);\r
+ }\r
+ else\r
+ {\r
+ if((SFB16[cp].lit[lit].lin[a]/0x80)==1)\r
+ floodfill(337+b*16,112+a*16,GREEN);\r
+ }\r
+ setcolor(BLACK);\r
+ rectangle(337+b*16,112+a*16,350+b*16,125+a*16);\r
+ }\r
+ else\r
+ {\r
+\r
+ setcolor(BROWN);\r
+ if(b>0)\r
+ {\r
+ if((SFB16[cp].lit[lit].lin[a]%(0x80/pot(2,b)*2))/(0x80/pot(2,b))==1)\r
+ {\r
+ rectangle(336+b*16,111+a*16,351+b*16,126+a*16);\r
+ floodfill(337+b*16,112+a*16,BROWN);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if((SFB16[cp].lit[lit].lin[a]/0x80)==1)\r
+ {\r
+ rectangle(336+b*16,111+a*16,351+b*16,126+a*16);\r
+ floodfill(337+b*16,112+a*16,BROWN);\r
+\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+\r
+void spc8()\r
+{\r
+ if(SFB8[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB8[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+ else\r
+ SFB8[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+void bsp8()\r
+{\r
+ if(SFB8[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB8[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+}\r
+void ent8()\r
+{\r
+ if(SFB8[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))!=1)\r
+ SFB8[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+void spc14()\r
+{\r
+ if(SFB14[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB14[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+ else\r
+ SFB14[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+void bsp14()\r
+{\r
+ if(SFB14[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB14[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+}\r
+void ent14()\r
+{\r
+ if(SFB14[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))!=1)\r
+ SFB14[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+void spc16()\r
+{\r
+ if(SFB16[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB16[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+ else\r
+ SFB16[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+void bsp16()\r
+{\r
+ if(SFB16[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))==1)\r
+ SFB16[cp].lit[lit].lin[cury]-=(0x80/pot(2,curx));\r
+}\r
+void ent16()\r
+{\r
+ if(SFB16[cp].lit[lit].lin[cury]%(0x100/pot(2,curx))/(0x80/pot(2,curx))!=1)\r
+ SFB16[cp].lit[lit].lin[cury]+=(0x80/pot(2,curx));\r
+}\r
+int otw2()\r
+{\r
+ int a;\r
+ int b;\r
+ int c;\r
+ int d;\r
+ for(int z=0;z<6;++z)\r
+ {\r
+ byo8[z]=0;\r
+ byo14[z]=0;\r
+ byo16[z]=0;\r
+ }\r
+ CPI=fopen(nazwap,"rb");\r
+\r
+ if(CPI==NULL)\r
+ {\r
+ sprintf(err,"100: B\88¥d otwarcia pliku");\r
+ return 1;\r
+ }\r
+ else\r
+ sprintf(err,"OK");\r
+ fread(&FFH,0x19,1,CPI);\r
+// printf("FFH:\n");\r
+// printf("id0=%2x\n",FFH.id0);\r
+// printf("id=\"%c%c%c%c%c%c%c\"\n",FFH.id[0],FFH.id[1],FFH.id[2],FFH.id[3],FFH.id[4],FFH.id[5],FFH.id[6]);\r
+// printf("reserved=%2x%2x%2x%2x%2x%2x%2x%2x\n",FFH.reserved[0],FFH.reserved[1],FFH.reserved[2],FFH.reserved[3],FFH.reserved[4],FFH.reserved[5],FFH.reserved[6],FFH.reserved[7]);\r
+// printf("pnum=%d\n",FFH.pnum);\r
+// printf("ptyp=%2x\n",FFH.ptyp);\r
+// printf("fih_offset=%p\n\n",FFH.fih_offset);\r
+\r
+ if(FFH.id0!=0xff)\r
+ {\r
+ sprintf(err,"101: FFH.id0!=0xff");\r
+ fclose(CPI);\r
+ return 101;\r
+ }\r
+ if(FFH.id[0]!='F'||FFH.id[1]!='O'||FFH.id[2]!='N'||FFH.id[3]!='T'||FFH.id[4]!=' '||FFH.id[5]!=' '||FFH.id[6]!=' ')\r
+ {\r
+ sprintf(err,"102: FFH.id!=\"FONT \"");\r
+ fclose(CPI);\r
+ return 102;\r
+ }\r
+ if(FFH.pnum!=1)\r
+ {\r
+ sprintf(err,"103: FFH.pnum!=1\n");\r
+ fclose(CPI);\r
+ return 103;\r
+ }\r
+ if(FFH.ptyp!=1)\r
+ {\r
+ sprintf(err,"104: FFH.ptyp!=1\n");\r
+ fclose(CPI);\r
+ return 104;\r
+ }\r
+ fseek(CPI,FFH.fih_offset,0);\r
+ fread(&FIH,0x2,1,CPI);\r
+// printf("FFI:\n\n");\r
+// printf("num_codepages=%d\n\n",FIH.num_codepages);\r
+ if(FIH.num_codepages>6)\r
+ {\r
+ //FIH.num_codepages=6;\r
+ sprintf(err,"105: FIH.num_codepages>6\n");\r
+ fclose(CPI);\r
+ return 105;\r
+ }\r
+\r
+ for(a=0; a<FIH.num_codepages;++a)\r
+ {\r
+ if (a!=0)\r
+ fseek(CPI,CPEH[a-1].next_cpeh_offset,0);\r
+ fread(&CPEH[a],0x1c,1,CPI);\r
+// printf("CPEH[%d]:\n",a);\r
+// printf("cpeh_size=%x\n",CPEH[a].cpeh_size);\r
+// printf("next_cpeh_offset=%p\n",CPEH[a].next_cpeh_offset);\r
+// printf("device_type=%d\n",CPEH[a].device_type);\r
+// printf("device name=\"%c%c%c%c%c%c%c%c\"\n",CPEH[a].device_name[0],CPEH[a].device_name[1],CPEH[a].device_name[2],CPEH[a].device_name[3],CPEH[a].device_name[4],CPEH[a].device_name[5],CPEH[a].device_name[6],CPEH[a].device_name[7]);\r
+// printf("codepage=%d\n",CPEH[a].codepage);\r
+// printf("reserved=%2x%2x%2x%2x%2x%2x\n",CPEH[a].reserved[0],CPEH[a].reserved[1],CPEH[a].reserved[2],CPEH[a].reserved[3],CPEH[a].reserved[4],CPEH[a].reserved[5]);\r
+// printf("cpih_offset=%p\n\n",CPEH[a].cpih_offset);\r
+\r
+ if(CPEH[a].cpeh_size!=0x1c)\r
+ {\r
+ sprintf(err,"106: CPEH.cpeh_size!=0x1c\n");\r
+ fclose(CPI);\r
+ return 106;\r
+ }\r
+ if(CPEH[a].device_type!=1)\r
+ {\r
+ sprintf(err,"107: CPEH.device_type!=1\n");\r
+ fclose(CPI);\r
+ return 107;\r
+ }\r
+\r
+ fseek(CPI,CPEH[a].cpih_offset,0);\r
+ fread(&CPIH[a],0x6,1,CPI);\r
+// printf("CPIH[%d]:\n",a);\r
+// printf("version=%d\n",CPIH[a].version);\r
+// printf("num_fonts=%d\n",CPIH[a].num_fonts);\r
+// printf("size=%x\n\n",CPIH[a].size);\r
+\r
+ if(CPIH[a].version!=1)\r
+ {\r
+ sprintf(err,"108: CPIH.version!=1\n");\r
+ fclose(CPI);\r
+ return 108;\r
+ }\r
+ if(CPIH[a].num_fonts>3)\r
+ {\r
+ sprintf(err,"109: CPIH.numfonts>3\n");\r
+ fclose(CPI);\r
+ return 109;\r
+ }\r
+ for(b=0;b<CPIH[a].num_fonts;++b)\r
+ {\r
+ fread(&SFH[a][b],0x6,1,CPI);\r
+// printf("SFH[%d][%d]:\n",a,b);\r
+// printf("height=%d\n",SFH[a][b].height);\r
+// printf("width=%d\n",SFH[a][b].width);\r
+// printf("yaspect=%2x\n",SFH[a][b].yaspect);\r
+// printf("xaspect=%2x\n",SFH[a][b].xaspect);\r
+// printf("num_chars=%d\n\n",SFH[a][b].num_chars);\r
+ fseek(CPI,SFH[a][b].num_chars*SFH[a][b].height*((SFH[a][b].width+7)/8),1);\r
+ if(SFH[a][b].height==8)\r
+ {\r
+ if (byo8[a]!=0)\r
+ {\r
+ sprintf(err,"113: SFH.height==8 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 113;\r
+ }\r
+ byo8[a]=1;\r
+ }\r
+ if(SFH[a][b].height==14)\r
+ {\r
+ if (byo14[a]!=0)\r
+ {\r
+ sprintf(err,"114: SFH.height==14 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 114;\r
+ }\r
+ byo14[a]=1;\r
+ }\r
+ if(SFH[a][b].height==16)\r
+ {\r
+ if (byo16[a]!=0)\r
+ {\r
+ sprintf(err,"115: SFH.height==16 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 115;\r
+ }\r
+ byo16[a]=1;\r
+ }\r
+\r
+\r
+ if(SFH[a][b].height!=8&&SFH[a][b].height!=14&&SFH[a][b].height!=16)\r
+ {\r
+ sprintf(err,"110: SFH.height!=(8 || 14 || 16)\n");\r
+ fclose(CPI);\r
+ return 110;\r
+ }\r
+ if(SFH[a][b].width!=8)\r
+ {\r
+ sprintf(err,"111: SFH.width!=8\n");\r
+ fclose(CPI);\r
+ return 111;\r
+ }\r
+ if(SFH[a][b].num_chars!=256)\r
+ {\r
+ sprintf(err,"112: SFH.num_chars!=256\n");\r
+ fclose(CPI);\r
+ return 112;\r
+ }\r
+ }\r
+ for(b=0;b<CPIH[a].num_fonts;++b)\r
+ {\r
+ fseek(CPI,CPEH[a].cpih_offset+0xc,0);\r
+ if(b>0)\r
+ fseek(CPI,SFH[a][0].height*256+0x6,1);\r
+ if(b>1)\r
+ fseek(CPI,SFH[a][1].height*256+0x6,1);\r
+\r
+ if(SFH[a][b].height==16)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fread(&SFB16[a].lit[c],0x10,1,CPI);\r
+ }\r
+ if(SFH[a][b].height==14)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fread(&SFB14[a].lit[c],0x0e,1,CPI);\r
+ }\r
+ if(SFH[a][b].height==8)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fread(&SFB8[a].lit[c],0x08,1,CPI);\r
+ }\r
+ }\r
+ }\r
+\r
+ fclose(CPI);\r
+ return 0;\r
+}\r
+int zap2()\r
+{\r
+ int a;\r
+ int b;\r
+ int c;\r
+ int d;\r
+\r
+ CPI=fopen(nazwap,"wb");\r
+\r
+ if(CPI==NULL)\r
+ {\r
+ sprintf(err,"200: B\88¥d utworzenia pliku:");\r
+ return 200;\r
+ }\r
+ else\r
+ sprintf(err,"OK");\r
+ fwrite(&FFH,0x19,1,CPI);\r
+// printf("FFH:\n");\r
+// printf("id0=%2x\n",FFH.id0);\r
+// printf("id=\"%c%c%c%c%c%c%c\"\n",FFH.id[0],FFH.id[1],FFH.id[2],FFH.id[3],FFH.id[4],FFH.id[5],FFH.id[6]);\r
+// printf("reserved=%2x%2x%2x%2x%2x%2x%2x%2x\n",FFH.reserved[0],FFH.reserved[1],FFH.reserved[2],FFH.reserved[3],FFH.reserved[4],FFH.reserved[5],FFH.reserved[6],FFH.reserved[7]);\r
+// printf("pnum=%d\n",FFH.pnum);\r
+// printf("ptyp=%2x\n",FFH.ptyp);\r
+// printf("fih_offset=%p\n\n",FFH.fih_offset);\r
+\r
+ /*if(FFH.id0!=0xff)\r
+ {\r
+ sprintf(err,"101: FFH.id0!=0xff");\r
+ fclose(CPI);\r
+ return 101;\r
+ }\r
+ if(FFH.id[0]!='F'||FFH.id[1]!='O'||FFH.id[2]!='N'||FFH.id[3]!='T'||FFH.id[4]!=' '||FFH.id[5]!=' '||FFH.id[6]!=' ')\r
+ {\r
+ sprintf(err,"102: FFH.id!=\"FONT \"");\r
+ fclose(CPI);\r
+ return 102;\r
+ }\r
+ if(FFH.pnum!=1)\r
+ {\r
+ sprintf(err,"103: FFH.pnum!=1\n");\r
+ fclose(CPI);\r
+ return 103;\r
+ }\r
+ if(FFH.ptyp!=1)\r
+ {\r
+ sprintf(err,"104: FFH.ptyp!=1\n");\r
+ fclose(CPI);\r
+ return 104;\r
+ }*/\r
+ fseek(CPI,FFH.fih_offset,0);\r
+ fwrite(&FIH,0x2,1,CPI);\r
+// printf("FFI:\n\n");\r
+// printf("num_codepages=%d\n\n",FIH.num_codepages);\r
+ /*if(FIH.num_codepages>6)\r
+ {\r
+ //FIH.num_codepages=6;\r
+ sprintf(err,"105: FIH.num_codepages>6\n");\r
+ fclose(CPI);\r
+ return 105;\r
+ }*/\r
+\r
+ for(a=0; a<FIH.num_codepages;++a)\r
+ {\r
+ if (a!=0)\r
+ fseek(CPI,CPEH[a-1].next_cpeh_offset,0);\r
+ fwrite(&CPEH[a],0x1c,1,CPI);\r
+// printf("CPEH[%d]:\n",a);\r
+// printf("cpeh_size=%x\n",CPEH[a].cpeh_size);\r
+// printf("next_cpeh_offset=%p\n",CPEH[a].next_cpeh_offset);\r
+// printf("device_type=%d\n",CPEH[a].device_type);\r
+// printf("device name=\"%c%c%c%c%c%c%c%c\"\n",CPEH[a].device_name[0],CPEH[a].device_name[1],CPEH[a].device_name[2],CPEH[a].device_name[3],CPEH[a].device_name[4],CPEH[a].device_name[5],CPEH[a].device_name[6],CPEH[a].device_name[7]);\r
+// printf("codepage=%d\n",CPEH[a].codepage);\r
+// printf("reserved=%2x%2x%2x%2x%2x%2x\n",CPEH[a].reserved[0],CPEH[a].reserved[1],CPEH[a].reserved[2],CPEH[a].reserved[3],CPEH[a].reserved[4],CPEH[a].reserved[5]);\r
+// printf("cpih_offset=%p\n\n",CPEH[a].cpih_offset);\r
+\r
+ /*if(CPEH[a].cpeh_size!=0x1c)\r
+ {\r
+ sprintf(err,"106: CPEH.cpeh_size!=0x1c\n");\r
+ fclose(CPI);\r
+ return 106;\r
+ }\r
+ if(CPEH[a].device_type!=1)\r
+ {\r
+ sprintf(err,"107: CPEH.device_type!=1\n");\r
+ fclose(CPI);\r
+ return 107;\r
+ }*/\r
+\r
+ fseek(CPI,CPEH[a].cpih_offset,0);\r
+ fwrite(&CPIH[a],0x6,1,CPI);\r
+// printf("CPIH[%d]:\n",a);\r
+// printf("version=%d\n",CPIH[a].version);\r
+// printf("num_fonts=%d\n",CPIH[a].num_fonts);\r
+// printf("size=%x\n\n",CPIH[a].size);\r
+\r
+ /*if(CPIH[a].version!=1)\r
+ {\r
+ sprintf(err,"108: CPIH.version!=1\n");\r
+ fclose(CPI);\r
+ return 108;\r
+ }\r
+ if(CPIH[a].num_fonts>3)\r
+ {\r
+ sprintf(err,"109: CPIH.numfonts>3\n");\r
+ fclose(CPI);\r
+ return 109;\r
+ }*/\r
+ for(b=0;b<CPIH[a].num_fonts;++b)\r
+ {\r
+ fwrite(&SFH[a][b],0x6,1,CPI);\r
+// printf("SFH[%d][%d]:\n",a,b);\r
+// printf("height=%d\n",SFH[a][b].height);\r
+// printf("width=%d\n",SFH[a][b].width);\r
+// printf("yaspect=%2x\n",SFH[a][b].yaspect);\r
+// printf("xaspect=%2x\n",SFH[a][b].xaspect);\r
+// printf("num_chars=%d\n\n",SFH[a][b].num_chars);\r
+ fseek(CPI,SFH[a][b].num_chars*SFH[a][b].height*((SFH[a][b].width+7)/8),1);\r
+ /*if(SFH[a][b].height==8)\r
+ {\r
+ if (byo8[a]!=0)\r
+ {\r
+ sprintf(err,"113: SFH.height==8 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 113;\r
+ }\r
+ byo8[a]=1;\r
+ }\r
+ if(SFH[a][b].height==14)\r
+ {\r
+ if (byo14[a]!=0)\r
+ {\r
+ sprintf(err,"114: SFH.height==14 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 114;\r
+ }\r
+ byo14[a]=1;\r
+ }\r
+ if(SFH[a][b].height==16)\r
+ {\r
+ if (byo16[a]!=0)\r
+ {\r
+ sprintf(err,"115: SFH.height==16 ju¾ by\88o");\r
+ fclose(CPI);\r
+ return 115;\r
+ }\r
+ byo16[a]=1;\r
+ }\r
+\r
+\r
+ if(SFH[a][b].height!=8&&SFH[a][b].height!=14&&SFH[a][b].height!=16)\r
+ {\r
+ sprintf(err,"110: SFH.height!=(8 || 14 || 16)\n");\r
+ fclose(CPI);\r
+ return 110;\r
+ }\r
+ if(SFH[a][b].width!=8)\r
+ {\r
+ sprintf(err,"111: SFH.width!=8\n");\r
+ fclose(CPI);\r
+ return 111;\r
+ }\r
+ if(SFH[a][b].num_chars!=256)\r
+ {\r
+ sprintf(err,"112: SFH.num_chars!=256\n");\r
+ fclose(CPI);\r
+ return 112;\r
+ }*/\r
+ }\r
+ for(b=0;b<CPIH[a].num_fonts;++b)\r
+ {\r
+ fseek(CPI,CPEH[a].cpih_offset+0xc,0);\r
+ if(b>0)\r
+ fseek(CPI,SFH[a][0].height*256+0x6,1);\r
+ if(b>1)\r
+ fseek(CPI,SFH[a][1].height*256+0x6,1);\r
+\r
+ if(SFH[a][b].height==16)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fwrite(&SFB16[a].lit[c],0x10,1,CPI);\r
+ }\r
+ if(SFH[a][b].height==14)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fwrite(&SFB14[a].lit[c],0x0e,1,CPI);\r
+ }\r
+ if(SFH[a][b].height==8)\r
+ {\r
+ for(c=0;c<256;++c)\r
+ fwrite(&SFB8[a].lit[c],0x08,1,CPI);\r
+ }\r
+ }\r
+ }\r
+\r
+ fprintf(CPI,"\nTen plik zosta\88 wygenerowany za pomoc¥ Edytora napis¢w, wersja 1.0\n autor programu: Balthasar Szczepaäski%c",0x1a);\r
+\r
+ fclose(CPI);\r
+ return 0;\r
+}\r
+\r
+int otw()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(GREEN);\r
+\r
+ outtextxy(144,184," ±Nazwa pliku:±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+ scanf("%s",nazwap);\r
+\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return otw2();\r
+}\r
+int zap()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(GREEN);\r
+\r
+ outtextxy(144,184," ±Nazwa pliku:±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+ scanf("%s",nazwap);\r
+\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return zap2();\r
+}\r
+int zmn()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(GREEN);\r
+\r
+ outtextxy(144,184," ±Numer strony kodowej:±±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+\r
+ scanf("%d",&CPEH[cp].codepage);\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return CPEH[cp].codepage;\r
+}\r
+int bnd()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(BROWN);\r
+\r
+ outtextxy(144,184," ±Nie wczytano pliku CPI±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±jeszcze raz?(t/n)± ");\r
+\r
+ printf("%s",err);\r
+ int a;\r
+ for(;;)\r
+ {\r
+ a=bioskey(_KEYBRD_READ);\r
+ if(a/0x100==0x14)\r
+ {\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return 0;\r
+ }\r
+ if(a/0x100==0x31)\r
+ {\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return 1;\r
+ }\r
+\r
+ }\r
+\r
+\r
+}\r
+int bnd2()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(BROWN);\r
+\r
+ outtextxy(144,184," ±Nie zapisano pliku CPI±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±jeszcze raz?(t/n)± ");\r
+\r
+ printf("%s",err);\r
+ int a;\r
+ for(;;)\r
+ {\r
+ a=bioskey(_KEYBRD_READ);\r
+ if(a/0x100==0x14)\r
+ {\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return 0;\r
+ }\r
+ if(a/0x100==0x31)\r
+ {\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return 1;\r
+ }\r
+\r
+ }\r
+\r
+\r
+}\r
+int pmc()\r
+{\r
+ printf("\n\n\n\n\n\n\n\n\n\n\n\n ");\r
+ setcolor(BLACK);\r
+\r
+ outtextxy(144,184," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,192," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,200," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+ outtextxy(144,208," ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ");\r
+\r
+ setcolor(BROWN);\r
+\r
+ outtextxy(144,184," ±Pomoc niedost©pna±±±±±±±±±±±±±±±±±±±±±±±± ");\r
+ outtextxy(144,192," ± ± ");\r
+ outtextxy(144,200," ± ± ");\r
+ outtextxy(144,208," ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±anykey± ");\r
+\r
+ printf("%s",err);\r
+ bioskey(_KEYBRD_READ);\r
+ closegraph();\r
+ initgraph(&kart16,&tryb16,"");\r
+ return 0;\r
+\r
+\r
+\r
+}\r
+\r
+\r
+\r
+int main(int argc,char* argv[])\r
+{\r
+\r
+\r
+\r
+\r
+\r
+// registerbgidriver(CGA_driver);\r
+ registerbgidriver(EGAVGA_driver);\r
+ initgraph(&kart16,&tryb16,"");\r
+ wys=8;\r
+\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ setcolor(RED);\r
+ outtextxy(184,472,"odczyt");\r
+\r
+ if(argc>1)\r
+ {\r
+ sprintf(nazwap,"%s",argv[1]);\r
+ status=otw2();\r
+ }\r
+ else\r
+ status=otw();\r
+ while(status!=0)\r
+ {\r
+ if (bnd()==0)\r
+ status=otw();\r
+ else\r
+ return status;\r
+ }\r
+\r
+\r
+\r
+\r
+ new8();\r
+ menu8();\r
+ cpwys();\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+\r
+ for(;;)\r
+ {\r
+ key=bioskey(_KEYBRD_READ);\r
+ if(tab==0)\r
+ {\r
+ if(key/0x100==0x48)\r
+ {\r
+ //w g¢r©\r
+ if(cury==0)\r
+ cury=wys-1;\r
+ else\r
+ --cury;\r
+ if(wys==8)\r
+ lit8();\r
+ if(wys==14)\r
+ lit14();\r
+ if(wys==16)\r
+ lit16();\r
+ }\r
+ if(key/0x100==0x50)\r
+ {\r
+ //w d¢\88\r
+ if(cury==wys-1)\r
+ cury=0;\r
+ else\r
+ ++cury;\r
+ if(wys==8)\r
+ lit8();\r
+ if(wys==14)\r
+ lit14();\r
+ if(wys==16)\r
+ lit16();\r
+\r
+ }\r
+ if(key/0x100==0x4b)\r
+ {\r
+ //w lewo\r
+ if(curx==0)\r
+ curx=7;\r
+ else\r
+ --curx;\r
+ if(wys==8)\r
+ lit8();\r
+ if(wys==14)\r
+ lit14();\r
+ if(wys==16)\r
+ lit16();\r
+ }\r
+ if(key/0x100==0x4d)\r
+ {\r
+ //w prawo\r
+ if(curx==7)\r
+ curx=0;\r
+ else\r
+ ++curx;\r
+ if(wys==8)\r
+ lit8();\r
+ if(wys==14)\r
+ lit14();\r
+ if(wys==16)\r
+ lit16();\r
+ }\r
+ if (key/0x100==0x39)\r
+ {\r
+ //spacja\r
+ if(wys==8)\r
+ {\r
+ spc8();\r
+ lit8();\r
+ lin8();\r
+ }\r
+ if(wys==14)\r
+ {\r
+ spc14();\r
+ lit14();\r
+ lin14();\r
+ }\r
+ if(wys==16)\r
+ {\r
+ spc16();\r
+ lit16();\r
+ lin16();\r
+ }\r
+ }\r
+ if (key/0x100==0x0e)\r
+ {\r
+ //backspace\r
+ if(wys==8)\r
+ {\r
+ bsp8();\r
+ lit8();\r
+ lin8();\r
+ }\r
+ if(wys==14)\r
+ {\r
+ bsp14();\r
+ lit14();\r
+ lin14();\r
+ }\r
+ if(wys==16)\r
+ {\r
+ bsp16();\r
+ lit16();\r
+ lin16();\r
+ }\r
+ }\r
+ if (key/0x100==0x1c)\r
+ {\r
+ //enter\r
+ if(wys==8)\r
+ {\r
+ ent8();\r
+ lit8();\r
+ lin8();\r
+ }\r
+ if(wys==14)\r
+ {\r
+ ent14();\r
+ lit14();\r
+ lin14();\r
+ }\r
+ if(wys==16)\r
+ {\r
+ ent16();\r
+ lit16();\r
+ lin16();\r
+ }\r
+ }\r
+\r
+\r
+ }\r
+ else\r
+ {\r
+ if(key/0x100==0x48)\r
+ {\r
+ //w g¢r© l\r
+ if(lit<16)\r
+ lit=(0xf0+lit%16);\r
+ else\r
+ lit=((lit/16-1)*16+lit%16);\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ if (wys==8)\r
+ lin8();\r
+ if (wys==14)\r
+ lin14();\r
+ if (wys==16)\r
+ lin16();\r
+\r
+ }\r
+ if(key/0x100==0x50)\r
+ {\r
+ //w d¢\88 l\r
+ if(lit>=0xf0)\r
+ lit=(0+lit%16);\r
+ else\r
+ lit=((lit/16+1)*16+lit%16);\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ if (wys==8)\r
+ lin8();\r
+ if (wys==14)\r
+ lin14();\r
+ if (wys==16)\r
+ lin16();\r
+ }\r
+ if(key/0x100==0x4b)\r
+ {\r
+ //w lewo l\r
+ if(lit%16==0)\r
+ lit+=15;\r
+ else\r
+ --lit;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ if (wys==8)\r
+ lin8();\r
+ if (wys==14)\r
+ lin14();\r
+ if (wys==16)\r
+ lin16();\r
+ }\r
+ if(key/0x100==0x4d)\r
+ {\r
+\r
+ //w prawo l\r
+ if(lit%16==15)\r
+ lit-=15;\r
+ else\r
+ ++lit;\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ if (wys==8)\r
+ lin8();\r
+ if (wys==14)\r
+ lin14();\r
+ if (wys==16)\r
+ lin16();\r
+ }\r
+ }\r
+ if (key/0x100==0x0f)\r
+ {\r
+ //tab\r
+ if(tab==0)\r
+ tab=1;\r
+ else\r
+ tab=0;\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ }\r
+ if (key/0x100==0x51)\r
+ {\r
+ //cp++\r
+ if(cp==FIH.num_codepages-1)\r
+ cp=0;\r
+ else\r
+ ++cp;\r
+ cpwys();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+\r
+ }\r
+ if (key/0x100==0x49)\r
+ {\r
+ //cp--\r
+ if(cp==0)\r
+ cp=FIH.num_codepages-1;\r
+ else\r
+ --cp;\r
+ cpwys();\r
+ lin8();\r
+ lin14();\r
+ lin16();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+\r
+ }\r
+ if (key/0x100==0x52)\r
+ {\r
+ //wys--\r
+ if(wys==8)\r
+ {\r
+ if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ cury%=16;\r
+ }\r
+ else\r
+ {\r
+ if(byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if(wys==14)\r
+ {\r
+ if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ }\r
+ else\r
+ {\r
+ if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ cury%=16;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if(wys==16)\r
+ {\r
+ if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ }\r
+ else\r
+ {\r
+ if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ cpwys();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ }\r
+ if (key/0x100==0x53)\r
+ {\r
+ //wys++\r
+ if(wys==8)\r
+ {\r
+ if (byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ }\r
+ else\r
+ {\r
+ if(byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ cury%=16;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if(wys==14)\r
+ {\r
+ if (byo16[cp]!=0)\r
+ {\r
+ wys=16;\r
+ cury%=16;\r
+ }\r
+ else\r
+ {\r
+ if(byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if(wys==16)\r
+ {\r
+ if (byo8[cp]!=0)\r
+ {\r
+ wys=8;\r
+ cury%=8;\r
+ }\r
+ else\r
+ {\r
+ if(byo14[cp]!=0)\r
+ {\r
+ wys=14;\r
+ cury%=14;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ ramka8();\r
+ ramka14();\r
+ ramka16();\r
+ cpwys();\r
+ lit8();\r
+ lit14();\r
+ lit16();\r
+ }\r
+ if (key/0x100==0x3b)\r
+ {\r
+ //pomoc\r
+ setcolor(RED);\r
+ outtextxy(24,472,"pomoc");\r
+ sprintf(err,"Przeczytaj plik \"napisy.txt\"");\r
+ pmc();\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
+ if (key/0x100==0x3c)\r
+ {\r
+ //zapisz\r
+ setcolor(RED);\r
+ outtextxy(104,472,"zapis");\r
+ status=zap();\r
+ while(status!=0)\r
+ {\r
+ if (bnd2()==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/0x100==0x3d)\r
+ {\r
+ //wczytaj\r
+ setcolor(RED);\r
+ outtextxy(184,472,"odczyt");\r
+ status=otw();\r
+ while(status!=0)\r
+ {\r
+ if (bnd()==0)\r
+ status=otw();\r
+ else\r
+ return status;\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
+ cp=0;\r
+ cury%=8;\r
+\r
+\r
+ }\r
+ if(key/0x100==0x3e)\r
+ {\r
+ {\r
+ //zapisz+system\r
+ setcolor(RED);\r
+ outtextxy(104,472,"zapis u¾ycie w systemie");\r
+ status=zap();\r
+ while(status!=0)\r
+ {\r
+ if (bnd2()==0)\r
+ status=zap();\r
+ else\r
+ break;\r
+ }\r
+ if(status==0)\r
+ {\r
+ sprintf(err,"mode con:cp prep=((%d) %s )",CPEH[cp].codepage,nazwap);\r
+ system(err);\r
+ sprintf(err,"mode con:cp sel=%d",CPEH[cp].codepage);\r
+ system(err);\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
+ }\r
+\r
+\r
+\r
+ }\r
+ if (key/0x100==0x3f)\r
+ {\r
+ //zmiana numeru\r
+ setcolor(RED);\r
+ outtextxy(448,472,"zmiana numeru");\r
+ zmn();\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
+ if (key/0x100==0x40)\r
+ {\r
+ //koniec\r
+ setcolor(RED);\r
+ outtextxy(592,472,"koniec");\r
+ delay(1000);\r
+ break;\r
+ }\r
+ }\r
+\r
+\r
+ closegraph();\r
+ return 0;\r
+}
\ No newline at end of file
--- /dev/null
+ Edytor napis¢w. wersja 1.0 Balthasar Szczepaäski\r
+\r
+ 1.opis programu\r
+ 2.sterowanie\r
+ 3.zmiany\r
+ 4.co nie dzia\88a\r
+ 5.wyja\98nienie b\88©d¢w\r
+ 6.kontakt\r
+ 7.lista plik¢w\r
+\r
+ ==============================================================\r
+\r
+ 1.Opis programu\r
+\r
+ Program "Edytor napis¢w" s\88u¾y do edycji plik¢w .cpi, w\r
+ kt¢rych s¥ zapisane informacje o stronach kodowych i kszta\88cie\r
+ liter na ekranie w trybie tekstowym. Za pomoc¥ tego programu\r
+ mo¾na wczytywa\86 i zapisywa\86 pliki cpi, zmienia\86 kszta\88t liter,\r
+ i numer strony kodowej, oraz za\88adowa\86 czcionk© do systemu.\r
+ Program zosta\88 skompilowany za pomoc¥ Turbo C++ 3.0.\r
+\r
+ Program potrafi obs\88u¾y\86 format "FONT " wyst©puj¥cy w\r
+ systemach MS-DOS, IBM PC-DOS, Microsoft Windows 1.x, 2.x, 3.x,\r
+ 9x, ME i innych. Nie potrafi obs\88u¾y\86 formatu "DRFONT "\r
+ wyst©puj¥cego w systemie DR-DOS, ani "FONT.NT" wyst©puj¥cego w\r
+ systemach Microsoft Windows NT, 2000, XP, Vista, 7. Natomiast\r
+ w tych systemach b©d¥ dzia\88a\88y pliki w formacie "FONT ",\r
+ tak¾e te utworzone za pomoc¥ tego programu. Liczba stron\r
+ kodowych w pliku nie mo¾e przekroczy\86 6, szeroko\98\86 liter musi\r
+ wynosi\86 8, wysoko\98\86 liter nie mo¾e mie\86 innych warto\98ci ni¾\r
+ 8,14,albo 16,przy czym wysoko\98ci nie mog¥ si© powtarza\86 w\r
+ obr©bie jednej strony kodowej, liczba znak¢w musi wynosi\86 256.\r
+\r
+ Program powinien dzia\88a\86 w systemach DOS* i Windows** na\r
+ komputerze z kart¥ graficzn¥ VGA lub p¢«niejsz¥. Mo¾e dzia\88a\86\r
+ na emulatorze.***\r
+\r
+ *Nie wiem, czy zadzia\88a w DOSie starszym ni¾ 3.3, zreszt¥ nie\r
+ ma sensu u¾ywa\86 Edytora napis¢w w starszych wersjach DOSa,\r
+ poniewa¾ nie obs\88uguj¥ stron kodowych.\r
+\r
+ **W systemie Windows 98 i poprzednich nie by\88o ¾adnych\r
+ problem¢w.\r
+\r
+ W systemie Windows XP, przy niekt¢rych kartach graficznych\r
+ program wy\88¥cza\88 si© natychmiast po w\88¥czeniu, ale to by\88o w\r
+ wersji beta w trybie CGA, w tej wersji powinno dzia\88a\86. Je¾eli\r
+ nie dzia\88a trzeba uruchomi\86 system w trybie awaryjnym.\r
+\r
+ W systemie Windows Vista program mo¾e zosta\86 zamkni©ty przez\r
+ system z komentarzem "Ten system nie obs\88uguje trybu\r
+ pe\88noekranowego.OK". W takim razie nale¾y zast¥pi\86 sterownik\r
+ karty graficzej na wersj© przeznaczon¥ dla Windowsa XP, albo\r
+ u¾ywa\86 programu przy systemie w\88¥czonym w trybie awaryjnym.\r
+ Je¾eli system nie pozwala zainstalowa\86 sterownika, trzeba\r
+ w\88¥czy\86 system w trybie awaryjnym i zalogowa\86 si© jako\r
+ Administraktor, a dopiero wtedy instalowa\86 sterownik. Czasami\r
+ system potrafi podmieni\86 sterownik spowrotem na poprzedni¥,\r
+ je\98li ta jest jeszcze na dysku.\r
+\r
+ W systemie Windows 7 sytuacja jest identyczna jak w Windowsie\r
+ Vista.\r
+\r
+ ***Jedynym emulatorem, w kt¢rym pr¢bowa\88em uruchomi\86 program,\r
+ jest DOSBox w wersji 0.63. Program zawiesza si© w nim chwil©\r
+ po uruchomieniu, przed narysowaniem ekranu. Nie wiem czy i jak\r
+ dzia\88a w innych wersjach DOSBoxa/innych emulatorach.\r
+\r
+ ==============================================================\r
+\r
+ 2.Sterowanie\r
+\r
+ kursor w g¢re: strza\88ka w g¢r©\r
+ kursor w d¢\88: strza\88ka w d¢\88\r
+ kursor w lewo: strza\88ka w lewo\r
+ kursor w prawo: strza\88ka w prawo\r
+ prze\88¥cznik rysowania i wybierania: tabulator\r
+ zamalowanie kratki: enter\r
+ zmazanie kratki: backspace\r
+ zmiana stanu kratki: spacja\r
+ prze\88¥czanie stron kodowych: page up/page down\r
+ prze\88¥czanie wysoko\98ci liter: insert/delete\r
+\r
+ klawisze F:\r
+\r
+ F1: pomoc, w tej wersji nie dzia\88a.\r
+\r
+ F2: zapis pliku pod podan¥ nazw¥, w razie b\88©du zapisu mo¾na\r
+ spr¢bowa\86 kolejny raz pod inn¥ nazw¥.\r
+\r
+ F3: wczytanie pliku z podanej nazwy, w razie b\88¥du odczyt\r
+ mo¾na spr¢bowa\86 odczyta\86 inny plik. Je¾eli ¾aden plik nie\r
+ b©dzie wszytany,program zostanie zamkni©ty.\r
+\r
+ F4: zapis pliku tak, jak przy F2 i wczytanie do systemu przy\r
+ u¾yciu polecenia systemowego MODE. Je¾eli zostanie\r
+ nadpisany plik u¾uwany domy\98lnie przez system do \88adowania\r
+ liter zmiany w systemie b©d¥ trwa\88e, nawet przy zapisie za\r
+ pomoc¥ F2. w przeciwnym razie zmiany b©d¥ chwilowe. Na\r
+ przyk\88ad je¾eli program jest uruchomiony w DOSie, zmiany\r
+ b©d¥ widoczne do ponownego uruchomienia systemu. Je\98l\r
+ program zosta\88 uruchomiony w Windowsie z wiersza poleceä,\r
+ zmiany b©d¥ widoczne a¾ do zamkni©cia tego wiersza poleceä\r
+ i tylko w trybie pe\88noekranowym. Je¾eli program zosta\88\r
+ uruchomiony przez klikni©cie na jego ikon©, albo na ikon©\r
+ pliku CPI, zmiany w systemie b©d¥ widoczne tylko do\r
+ wy\88¥czenia programu. W emulatorze najprawdopodobniej nie\r
+ b©dzie wida\86 ¾adnych zmian.\r
+\r
+ F5: zmiana numeru aktualnie wybranej strony kodowej. Numery\r
+ wi©ksze ni¾ trzycyfrowe mog¥ nie dzia\88a\86 w niekt¢rych\r
+ systemach.\r
+\r
+ F6: koniec programu.\r
+\r
+ ==============================================================\r
+ \r
+ 3. Zmiany\r
+\r
+ beta:\r
+ To jest pierwsza dzia\88¥j¥ca wersja.\r
+ 1.0:\r
+ -zmiana trybu CGA na VGA\r
+ -dzia\88a wysoko\98\86 14 i 16\r
+ -wszystkie wysoko\98ci s¥ widoczne na jednym ekranie\r
+ -mo¾na zapisywa\86 pliki i za\88adowa\86 stron© do systemu\r
+ -mo¾na otworzy\86 poda\86 plik do otwarcia jako argument w\r
+ wierszu poleceä\r
+ -wczytywane dane nie s¥ ju¾ wypisywane na ekranie\r
+ -Funkcje klawiszy F zgadzaj¥ si© z opisem na dole ekranu\r
+\r
+ ==============================================================\r
+\r
+ 4. Co nie dzia\88a\r
+\r
+ -przy prze\88¥czaniu rozmiaru czcionki okna z zestawem\r
+ znak¢w nie s¥ aktualizowane\r
+ -nie ma pomocy wewn¥trz programu\r
+ -po wy\88¥czeniu z powodu b\88©du otwarcia pliku nie jest\r
+ wy\88¥czany tryb graficzny\r
+\r
+ ==============================================================\r
+\r
+ 5. Wyja\98nienie b\88©d¢w\r
+\r
+ 100: b\88¥d otwarcia pliku:\r
+ Nie da si© otworzy\86 pliku o podanej nazwie. \r
+\r
+ 101: FFH.id0!=0xff\r
+ Identyfikator id0 ma inn¥ warto\98\86 ni¾ 0xff. Plik jest w\r
+ formacie "DRFONT " lub nie jest plikiem cpi.\r
+\r
+ 102: FFH.id !="FONT "\r
+ Plik jest w formacie "FONT.NT" lub "DRFONT ", albo innym,\r
+ nieznanym formacie.\r
+\r
+ 103: FFH.pnum!=1\r
+ Jest wi©cej wska«nik¢w na FontInfoHeader - plik jest w\r
+ nowym, nieznanym formacie lub nie ma ¾adnego wska«nika -\r
+ plik nie zawiera danych.\r
+\r
+ 104: FFH.ptyp!=1\r
+ FontInfoHeader jest w nieznanym formacie.\r
+\r
+ 105: FIH.num_codepages>6\r
+ Plik zawiera wi©cej ni¾ 6 stron kodowych.\r
+\r
+ 106: CPEH.cpeh_size!=0x1c\r
+ CodePageEntryHeader ma nieprawid\88ow¥ d\88ugo\98\86.\r
+\r
+ 107: CPEH.cpeh_device_type!=1\r
+ Czcionka nie jest czcionk¥ ekranow¥, jest przeznaczona na\r
+ drukark© lub inne urz¥dzenie.\r
+\r
+ 108: CPIH.version!=1\r
+ W pliku w formacie "FONT " umieszczono czcionk© w\r
+ formacie "FONT.NT", "DRFONT ", albo innym, nieznanym\r
+ formacie.\r
+\r
+ 109: CPIH.num_fonts>3\r
+ Strona kodowa zawiera wi©cej ni¾ 3 czczionki.\r
+\r
+ 110: SFH.height!=(8 || 14 || 16)\r
+ Czcionka ma nieodpowiedni¥ wysoko\98\86 znak¢w.\r
+\r
+ 111: SFH.width!=8\r
+ Czcionka ma nieodpowiedni¥ szeroko\98\86 znak¢w.\r
+\r
+ 112: SFH.num_chars!=256\r
+ Czcionka ma nieodpowiedni¥ ilo\98\86 znak¢w.\r
+\r
+ 113: SFH.height==8 ju¾ by\88o\r
+ Wysoko\98\86 znak¢w==8 wyst©puje w tej stronie kodowej wi©cej\r
+ ni¾ raz\r
+\r
+ 114: SFH.height==14 ju¾ by\88o\r
+ Wysoko\98\86 znak¢w==14 wyst©puje w tej stronie kodowej wi©cej\r
+ ni¾ raz.\r
+\r
+ 115: SFH.height==16 ju¾ by\88o\r
+ Wysoko\98\86 znak¢w==16 wyst©puje w tej stronie kodowej wi©cej\r
+ ni¾ raz.\r
+\r
+ 200: B\88¥d utworzenia pliku:\r
+ Nie da si© utworzy\86/zmodyfikowa\86 pliku o podanej nazwie.\r
+\r
+ Przeczytaj plik "napisy.txt"\r
+ Pomoc wewn¥trz programu nie dzia\88a, nale¾y przeczyta\86 ten\r
+ plik.\r
+\r
+ ==============================================================\r
+\r
+ 6. Kontakt\r
+\r
+ e-mali: balthasar_s@interia.pl\r
+ telefon: +48664641394\r
+ www: http://www.baltixy.w.interia.pl\r
+\r
+ ==============================================================\r
+\r
+ 7. Lista plik¢w\r
+ \r
+ nazwa |rozmiar\r
+ ----------+-------\r
+ EGAVGA.OBJ| 5658\r
+ NAPISY.TXT| 9388\r
+ NAPISY.EXE| 137623\r
+ NAPISY.CPP| 37801\r
+ NAPISY.PRJ| 4540\r
+\r
+ ==============================================================\r