2008-11-26 03:02:31 +01:00
void IconFairing(int filenum, y)
2008-11-03 14:17:12 +01:00
{
2008-11-26 03:02:31 +01:00
switch(filenum)
{
case 0...4: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
DrawBar(195,y,2,15,videlenie);
DrawBar(209,y,2,15,videlenie);
DrawBar(205,y,4,1,videlenie);
DrawBar(206,y+1,3,1,videlenie);
DrawBar(207,y+2,2,1,videlenie);
PutPixel(208,y+3,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 16...17: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
DrawBar(195,y,1,15,videlenie);
DrawBar(203,y,8,2,videlenie);
IF (filenum==17) PutPixel(206,y+1,0x1A7B17); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
DrawBar(196,y+13,15,2,videlenie);
PutPixel(196,y,videlenie); //.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD>
PutPixel(202,y,videlenie);
PutPixel(210,y+2,videlenie);
PutPixel(196,y+12,videlenie);
PutPixel(210,y+12,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 13: //skin
2008-12-19 03:44:13 +01:00
PutPixel(210,y,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 11: //asm
2008-12-19 03:44:13 +01:00
DrawBar(196,y,1,15,videlenie);
2008-11-26 03:02:31 +01:00
case 14: //video
2008-12-19 03:44:13 +01:00
DrawBar(195,y,1,15,videlenie);
DrawBar(210,y,1,15,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 15: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
PutPixel(195,y,videlenie); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
DrawBar(208,y,3,1,videlenie);
DrawBar(209,y+1,2,1,videlenie);
PutPixel(210,y+2,videlenie);
PutPixel(195,y+11,videlenie);
DrawBar(195,y+12,2,1,videlenie);
DrawBar(195,y+13,3,1,videlenie);
DrawBar(195,y+14,4,1,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 19: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
DrawBar(195,y+14,16,1,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 20: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
DrawBar(195,y,16,2,videlenie);
DrawBar(195,y+11,1,2,videlenie);
DrawBar(210,y+11,1,2,videlenie);
DrawBar(195,y+13,16,2,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 21: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
PutPixel(195,y,videlenie);
PutPixel(210,y,videlenie);
2008-11-26 03:02:31 +01:00
return;
case 22: //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
DrawBar(195,y,16,1,videlenie); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
DrawBar(195,y+1,3,1,videlenie);
DrawBar(195,y+2,2,1,videlenie);
PutPixel(195,y+3,videlenie);
PutPixel(210,y+11,videlenie); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
DrawBar(209,y+12,2,1,videlenie);
DrawBar(208,y+13,3,1,videlenie);
DrawBar(207,y+14,4,1,videlenie);
2008-11-26 03:02:31 +01:00
return;
}
2008-11-03 14:17:12 +01:00
}
2008-11-26 03:02:31 +01:00
2008-11-24 01:49:58 +01:00
#include "imgs\icons.txt"
2008-11-03 14:17:12 +01:00
dword Put_icon(dword extension, yy)
{
dword ftype="", fnum=0; //<2F> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".kex")) {fnum = 6; ftype="Program";}
IF (!strcmp(extension,".cvs")) {fnum = 18; ftype="Graph";}
2008-12-19 03:44:13 +01:00
IF (!strcmp(extension,".cmd")) || (!strcmp(extension,".bat")) {fnum = 5; ftype="Script";}
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".skn")) {fnum = 13; ftype="Skin";}
IF (!strcmp(extension,".chr"))|| (!strcmp(extension+1,".mt")) || (!strcmp(extension,".ttf")) || (!strcmp(extension,".fon")) {fnum = 10; ftype="Font";}
IF (!strcmp(extension,".asm")) {fnum = 11; ftype="Source";}
IF (!strcmp(extension,".inc")) fnum = 9;
IF (!strcmp(extension,".exe")) || (!strcmp(extension,".msi")) {fnum = 7; ftype="Win32 Exec";}
2008-12-19 03:44:13 +01:00
IF (!strcmp(extension,".com")) {fnum = 5; ftype="DOS Exec";}
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".cpp")) {fnum = 3; ftype="C++ code";}
IF (!strcmp(extension,".nes")) {fnum = 20; ftype="Cartridge";}
IF (!strcmp(extension,".img")) || (!strcmp(extension,".ima")) {fnum = 21; ftype="Image";}
IF (!strcmp(extension,".dll")) || (!strcmp(extension,".obj")) {fnum = 22; ftype="Library";}
2008-12-19 03:44:13 +01:00
IF (!strcmp(extension,".sys")) || (!strcmp(extension,".ocx")) || (!strcmp(extension,".drv")) fnum = 8;
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".ini")) || (!strcmp(extension,"conf")) {fnum = 4; ftype="Config";}
IF (!strcmp(extension,".htm")) || (!strcmp(extension,"html")) {fnum = 2; ftype="Web-page";}
2008-11-03 14:17:12 +01:00
//text
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".txt")) || (!strcmp(extension,".doc")) ||
2008-12-19 03:44:13 +01:00
(!strcmp(extension,".rtf")) || (!strcmp(extension,".pdf")) {fnum = 1; ftype="Text";}
2008-11-03 14:17:12 +01:00
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".gif")) || (!strcmp(extension,".bmp")) ||
(!strcmp(extension,".tga")) || (!strcmp(extension,".pcx")) ||
(!strcmp(extension,".png")) || (!strcmp(extension,".jpg")) ||
(!strcmp(extension,"jpeg")) || (!strcmp(extension,".raw")) {fnum = 19; ftype="Image";}
2008-11-03 14:17:12 +01:00
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".rar")) || (!strcmp(extension,".zip")) ||
(!strcmp(extension,".cab")) || (!strcmp(extension,".tar")) ||
(!strcmp(extension,".ajr")) || (!strcmp(extension,".jar")) ||
(!strcmp(extension+1,".7z")){fnum = 15; ftype="Archive";}
2008-11-03 14:17:12 +01:00
//audio
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,".mp3")) {fnum = 12; ftype="Music";}
2008-12-19 03:44:13 +01:00
IF (!strcmp(extension,".wav")) || (!strcmp(extension,".mid")) ||
(!strcmp(extension,"midi")) || (!strcmp(extension,".ogg")) ||
(!strcmp(extension,".wma")) {fnum = 12; ftype="Audio";}
2008-11-24 01:49:58 +01:00
//video
IF (!strcmp(extension,".avi")) || (!strcmp(extension,".flv")) || (!strcmp(extension,".mpg")) ||
2008-12-19 03:44:13 +01:00
(!strcmp(extension,".wmv")) || (!strcmp(extension,".mov")) {fnum = 14; ftype="Video";}
2008-11-24 01:49:58 +01:00
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD>
2008-12-19 03:44:13 +01:00
IF (!strcmp(extension,"<DIR>")) { fnum=16; WriteText(onLeft(145,0),yy+4,0x80,0,extension,0);}
2008-11-24 01:49:58 +01:00
IF (!strcmp(extension,"..")) fnum=17;
2008-11-03 14:17:12 +01:00
//
2008-12-19 03:44:13 +01:00
PutPaletteImage(fnum*16*15+#ficons,16,15,195,yy,#ficons_pal);
WriteText(onLeft(160,0),yy+4,0x80,0,ftype,0);
2008-11-03 14:17:12 +01:00
return fnum;
}