2011-08-22 04:17:55 +04:00
|
|
|
|
|
|
|
|
|
#include "imgs\icons.txt"
|
|
|
|
|
dword Put_icon(dword extension, yy)
|
|
|
|
|
{
|
2012-03-22 17:33:15 +04:00
|
|
|
|
dword ftype="", fnum=0; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2011-08-22 04:17:55 +04:00
|
|
|
|
|
2011-09-05 16:54:42 +04:00
|
|
|
|
IF (!strcmp(extension,"htm")) || (!strcmp(extension,"html")) ||
|
|
|
|
|
(!strcmp(extension,"mht")) {fnum = 2; ftype="Web-page";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
IF (!strcmp(extension,"ini")) || (!strcmp(extension,"conf")) {fnum = 3; ftype="Config";}
|
|
|
|
|
IF (!strcmp(extension,"xlt")) || (!strcmp(extension,"xls")) ||
|
|
|
|
|
(!strcmp(extension,"ods")) || (!strcmp(extension,"xlsx")) {fnum = 4; ftype="Table";}
|
|
|
|
|
IF (!strcmp(extension,"cmd")) || (!strcmp(extension,"bat")) || (!strcmp(extension,"sh")) {fnum = 5; ftype="Script";}
|
|
|
|
|
IF (!strcmp(extension,"com")) {fnum = 5; ftype="DOS Exec";}
|
|
|
|
|
IF (!strcmp(extension,"kex")) {fnum = 6; ftype="Program";}
|
|
|
|
|
IF (!strcmp(extension,"exe")) || (!strcmp(extension,"msi")) {fnum = 7; ftype="Win32 Exec";}
|
|
|
|
|
IF (!strcmp(extension,"sys")) || (!strcmp(extension,"ocx")) ||
|
|
|
|
|
(!strcmp(extension,"drv")) || (!strcmp(extension,"so")) fnum = 8;
|
|
|
|
|
IF (!strcmp(extension,"inc")) fnum = 9;
|
|
|
|
|
IF (!strcmp(extension,"chr")) || (!strcmp(extension,"mt")) ||
|
|
|
|
|
(!strcmp(extension,"ttf")) || (!strcmp(extension,"fon")) {fnum = 10; ftype="Font";}
|
|
|
|
|
IF (!strcmp(extension,"asm")) {fnum = 11; ftype="Source";}
|
|
|
|
|
IF (!strcmp(extension,"skn")) {fnum = 13; ftype="Skin";}
|
2012-05-27 15:37:20 +04:00
|
|
|
|
IF (!strcmp(extension,"djvu")) || (!strcmp(extension,"pdf")) || (!strcmp(extension,"fb2")) {fnum = 15; ftype="Book";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
IF (!strcmp(extension,"nes")) {fnum = 18; ftype="Cartridge";}
|
|
|
|
|
IF (!strcmp(extension,"img")) || (!strcmp(extension,"ima")) {fnum = 21; ftype="Image";}
|
|
|
|
|
IF (!strcmp(extension,"dll")) || (!strcmp(extension,"obj")) {fnum = 22; ftype="Library";}
|
|
|
|
|
IF (!strcmp(extension,"iso")) || (!strcmp(extension,"cue")) ||
|
|
|
|
|
(!strcmp(extension,"nrg")) || (!strcmp(extension,"mdf")) {fnum = 24; ftype="Disc image";}
|
|
|
|
|
|
|
|
|
|
//text
|
|
|
|
|
IF (!strcmp(extension,"txt")) || (!strcmp(extension,"doc")) ||
|
|
|
|
|
(!strcmp(extension,"rtf")) || (!strcmp(extension,"odt")) ||
|
2011-09-05 16:54:42 +04:00
|
|
|
|
(!strcmp(extension,"log")) || (!strcmp(extension,"docx")) {fnum = 1; ftype="Text";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
IF (!strcmp(extension,"gif")) || (!strcmp(extension,"bmp")) ||
|
|
|
|
|
(!strcmp(extension,"tga")) || (!strcmp(extension,"pcx")) ||
|
2011-08-28 01:37:45 +04:00
|
|
|
|
(!strcmp(extension,"png")) || (!strcmp(extension,"jpg")) {fnum = 19; ftype="Image";}
|
|
|
|
|
IF (!strcmp(extension,"xcf")) || (!strcmp(extension,"ai")) ||
|
|
|
|
|
(!strcmp(extension,"jpeg")) || (!strcmp(extension,"raw")) ||
|
|
|
|
|
(!strcmp(extension,"psd")) {fnum = 19; ftype="Image";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2011-09-05 16:54:42 +04:00
|
|
|
|
IF (!strcmp(extension,"ico")) {fnum = 20; ftype="Icon";}
|
|
|
|
|
IF (!strcmp(extension,"cur")) || (!strcmp(extension,"ani")) {fnum = 20; ftype="Cursor";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
IF (!strcmp(extension,"rar")) || (!strcmp(extension,"zip")) ||
|
|
|
|
|
(!strcmp(extension,"cab")) || (!strcmp(extension,"tar")) ||
|
|
|
|
|
(!strcmp(extension,"ajr")) || (!strcmp(extension,"jar")) ||
|
|
|
|
|
(!strcmp(extension,"7z")) ||(!strcmp(extension,"gz")) {fnum = 23; ftype="Archive";}
|
|
|
|
|
//audio
|
|
|
|
|
IF (!strcmp(extension,"mp3")) {fnum = 12; ftype="Music";}
|
|
|
|
|
IF (!strcmp(extension,"wav")) || (!strcmp(extension,"mid")) ||
|
|
|
|
|
(!strcmp(extension,"midi")) || (!strcmp(extension,"ogg")) ||
|
2011-08-28 01:37:45 +04:00
|
|
|
|
(!strcmp(extension,"wma")) || (!strcmp(extension,"flac")) {fnum = 12; ftype="Audio";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
//video
|
2011-08-28 01:37:45 +04:00
|
|
|
|
IF (!strcmp(extension,"avi")) || (!strcmp(extension,"flv")) ||
|
|
|
|
|
(!strcmp(extension,"mpg")) || (!strcmp(extension,"wmv")) ||
|
|
|
|
|
(!strcmp(extension,"mov")) || (!strcmp(extension,"mkv")) ||
|
|
|
|
|
(!strcmp(extension,"mp4")) || (!strcmp(extension,"vob")) {fnum = 14; ftype="Video";}
|
2011-08-22 04:17:55 +04:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
IF (!strcmp(extension,"<DIR>")) { fnum=16; WriteText(onLeft(145,0),yy+4,0x80,0,extension,0);}
|
|
|
|
|
IF (!strcmp(extension,"..")) fnum=17;
|
|
|
|
|
//
|
|
|
|
|
PutPaletteImage(fnum*16*15+#ficons,16,15,195,yy,#ficons_pal);
|
|
|
|
|
WriteText(onLeft(160,0),yy+4,0x80,0,ftype,0);
|
|
|
|
|
return fnum;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-26 05:02:31 +03:00
|
|
|
|
void IconFairing(int filenum, y)
|
2008-11-03 16:17:12 +03:00
|
|
|
|
{
|
2008-11-26 05:02:31 +03:00
|
|
|
|
switch(filenum)
|
|
|
|
|
{
|
2011-08-22 04:17:55 +04:00
|
|
|
|
case 0...1: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-12-19 05:44:13 +03:00
|
|
|
|
DrawBar(195,y,2,15,videlenie);
|
2011-08-22 04:17:55 +04:00
|
|
|
|
RIGHT_PAINT:
|
2008-12-19 05:44:13 +03:00
|
|
|
|
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 05:02:31 +03:00
|
|
|
|
return;
|
2011-08-22 04:17:55 +04:00
|
|
|
|
case 2: //html
|
2011-08-28 01:37:45 +04:00
|
|
|
|
DrawBar(195,y,1,7,videlenie);
|
|
|
|
|
DrawBar(196,y,1,6,videlenie);
|
|
|
|
|
DrawBar(195,y+10,1,5,videlenie);
|
|
|
|
|
DrawBar(196,y+11,1,4,videlenie);
|
2011-08-22 04:17:55 +04:00
|
|
|
|
GOTO RIGHT_PAINT;
|
2011-07-30 18:59:48 +04:00
|
|
|
|
case 3: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
DrawBar(195,y,2,7,videlenie);
|
|
|
|
|
DrawBar(195,y+7,1,2,videlenie);
|
|
|
|
|
DrawBar(195,y+12,1,3,videlenie);
|
|
|
|
|
PutPixel(196,y+14,videlenie);
|
2011-08-22 04:17:55 +04:00
|
|
|
|
GOTO RIGHT_PAINT;
|
|
|
|
|
case 9: //inc
|
|
|
|
|
DrawBar(195,y,1,12,videlenie);
|
|
|
|
|
DrawBar(196,y,1,11,videlenie);
|
|
|
|
|
DrawBar(197,y,1,10,videlenie);
|
|
|
|
|
DrawBar(198,y,1,5,videlenie);
|
|
|
|
|
DrawBar(199,y,1,4,videlenie);
|
|
|
|
|
DrawBar(200,y,1,3,videlenie);
|
|
|
|
|
DrawBar(201,y,1,2,videlenie);
|
|
|
|
|
DrawBar(202,y,1,3,videlenie);
|
|
|
|
|
DrawBar(203,y,1,2,videlenie);
|
|
|
|
|
PutPixel(204,y,videlenie);
|
|
|
|
|
PutPixel(205,y+4,videlenie);
|
|
|
|
|
PutPixel(206,y+3,videlenie);
|
|
|
|
|
PutPixel(207,y,videlenie);
|
|
|
|
|
PutPixel(207,y+2,videlenie);
|
|
|
|
|
DrawBar(208,y,1,3,videlenie);
|
|
|
|
|
DrawBar(209,y,2,4,videlenie);
|
|
|
|
|
DrawBar(210,y,1,15,videlenie);
|
|
|
|
|
PutPixel(198,y+14,videlenie);
|
|
|
|
|
DrawBar(199,y+13,1,2,videlenie);
|
|
|
|
|
DrawBar(200,y+12,10,3,videlenie);
|
|
|
|
|
PutPixel(205,y+11,videlenie);
|
|
|
|
|
DrawBar(206,y+10,1,2,videlenie);
|
|
|
|
|
DrawBar(207,y+9,1,3,videlenie);
|
|
|
|
|
PutPixel(207,y+7,videlenie);
|
|
|
|
|
DrawBar(208,y+6,2,7,videlenie);
|
|
|
|
|
PutPixel(209,y+5,videlenie);
|
2011-07-30 18:59:48 +04:00
|
|
|
|
return;
|
2011-08-28 01:37:45 +04:00
|
|
|
|
case 10: //font
|
|
|
|
|
DrawRegion_3D(195,y,15,14,videlenie,videlenie);
|
|
|
|
|
DrawBar(196,y+1,1,13,videlenie);
|
|
|
|
|
DrawBar(197,y+1,1,11,videlenie);
|
|
|
|
|
DrawBar(198,y+1,1,10,videlenie);
|
|
|
|
|
DrawBar(199,y+1,1,9,videlenie);
|
|
|
|
|
DrawBar(200,y+1,1,7,videlenie);
|
|
|
|
|
DrawBar(201,y+1,1,5,videlenie);
|
|
|
|
|
DrawBar(202,y+1,1,4,videlenie);
|
|
|
|
|
DrawBar(203,y+1,1,2,videlenie);
|
|
|
|
|
DrawBar(209,y+1,1,13,videlenie);
|
|
|
|
|
DrawBar(208,y+1,1,11,videlenie);
|
|
|
|
|
PutPixel(204,y+6,videlenie);
|
|
|
|
|
DrawBar(203,y+10,2,1,videlenie);
|
|
|
|
|
DrawBar(202,y+11,2,3,videlenie);
|
|
|
|
|
return;
|
2011-07-30 18:59:48 +04:00
|
|
|
|
case 11: //asm
|
|
|
|
|
DrawBar(195,y,1,15,videlenie);
|
|
|
|
|
return;
|
2011-08-28 01:37:45 +04:00
|
|
|
|
case 12: //audio
|
|
|
|
|
DrawBar(195,y,16,1,videlenie);
|
|
|
|
|
DrawBar(195,y,1,15,videlenie);
|
|
|
|
|
DrawBar(196,y+1,4,8,videlenie);
|
|
|
|
|
DrawBar(196,y+9,1,2,videlenie);
|
|
|
|
|
PutPixel(197,y+9,videlenie);
|
|
|
|
|
PutPixel(196,y+14,videlenie);
|
|
|
|
|
DrawBar(210,y+1,1,14,videlenie);
|
|
|
|
|
DrawBar(202,y+4,6,4,videlenie);
|
|
|
|
|
DrawBar(202,y+8,4,1,videlenie);
|
|
|
|
|
DrawBar(202,y+9,3,1,videlenie);
|
|
|
|
|
DrawBar(202,y+10,2,3,videlenie);
|
|
|
|
|
DrawBar(201,y+13,4,1,videlenie);
|
|
|
|
|
DrawBar(200,y+14,14,1,videlenie);
|
|
|
|
|
DrawBar(209,y+12,1,2,videlenie);
|
|
|
|
|
PutPixel(208,y+13,videlenie);
|
|
|
|
|
return;
|
2011-07-30 18:59:48 +04:00
|
|
|
|
case 13: //skin
|
|
|
|
|
PutPixel(210,y,videlenie);
|
|
|
|
|
return;
|
|
|
|
|
case 14...15: //video, book
|
|
|
|
|
DrawBar(195,y,1,15,videlenie);
|
|
|
|
|
DrawBar(210,y,1,15,videlenie);
|
|
|
|
|
return;
|
2008-11-26 05:02:31 +03:00
|
|
|
|
case 16...17: //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
2008-12-19 05:44:13 +03: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 05:02:31 +03:00
|
|
|
|
return;
|
2011-07-30 18:59:48 +04:00
|
|
|
|
case 18: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-12-19 05:44:13 +03: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 05:02:31 +03:00
|
|
|
|
return;
|
2011-07-30 18:59:48 +04:00
|
|
|
|
case 19: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
case 20: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
DrawBar(195,y+14,16,1,videlenie);
|
|
|
|
|
return;
|
2008-11-26 05:02:31 +03:00
|
|
|
|
case 21: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-12-19 05:44:13 +03:00
|
|
|
|
PutPixel(195,y,videlenie);
|
|
|
|
|
PutPixel(210,y,videlenie);
|
2008-11-26 05:02:31 +03:00
|
|
|
|
return;
|
|
|
|
|
case 22: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-12-19 05:44:13 +03: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);
|
2011-07-30 18:59:48 +04:00
|
|
|
|
return;
|
|
|
|
|
case 23: //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PutPixel(195,y+3,videlenie);
|
|
|
|
|
PutPixel(195,y+11,videlenie);
|
|
|
|
|
PutPixel(210,y+3,videlenie);
|
|
|
|
|
PutPixel(210,y+11,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195,y,7,1,videlenie);
|
|
|
|
|
DrawBar(204,y,7,1,videlenie);
|
|
|
|
|
DrawBar(195,y+14,7,1,videlenie);
|
|
|
|
|
DrawBar(204,y+14,7,1,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195,y+1,5,1,videlenie);
|
|
|
|
|
DrawBar(206,y+1,5,1,videlenie);
|
|
|
|
|
DrawBar(195,y+13,5,1,videlenie);
|
|
|
|
|
DrawBar(206,y+13,5,1,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195,y+2,3,1,videlenie);
|
|
|
|
|
DrawBar(208,y+2,3,1,videlenie);
|
|
|
|
|
DrawBar(195,y+12,3,1,videlenie);
|
|
|
|
|
DrawBar(208,y+12,3,1,videlenie);
|
|
|
|
|
return;
|
|
|
|
|
case 24: //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
DrawBar(195,y,6,1,videlenie);
|
|
|
|
|
DrawBar(195,y+1,4,1,videlenie);
|
|
|
|
|
DrawBar(195,y+2,3,1,videlenie);
|
|
|
|
|
DrawBar(195,y+3,2,2,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195,y+5,1,5,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195,y+10,2,2,videlenie);
|
|
|
|
|
DrawBar(195,y+12,3,1,videlenie);
|
|
|
|
|
DrawBar(195,y+13,4,1,videlenie);
|
|
|
|
|
DrawBar(195,y+14,6,1,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195+11,y,5,1,videlenie);
|
|
|
|
|
DrawBar(195+13,y+1,3,1,videlenie);
|
|
|
|
|
DrawBar(195+14,y+2,2,1,videlenie);
|
|
|
|
|
DrawBar(195+15,y+3,1,2,videlenie);
|
|
|
|
|
|
|
|
|
|
DrawBar(195+15,y+10,1,2,videlenie);
|
|
|
|
|
DrawBar(195+14,y+12,2,1,videlenie);
|
|
|
|
|
DrawBar(195+13,y+13,3,1,videlenie);
|
|
|
|
|
DrawBar(195+11,y+14,5,1,videlenie);
|
|
|
|
|
|
2008-11-26 05:02:31 +03:00
|
|
|
|
return;
|
|
|
|
|
}
|
2008-11-03 16:17:12 +03:00
|
|
|
|
}
|