Eolite 0.97.2
git-svn-id: svn://kolibrios.org@944 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
07cb3855b0
commit
31f5bf31ed
@ -9,8 +9,8 @@
|
||||
#include "imgs\left_p.txt"
|
||||
|
||||
//ëîêàëèçàöèÿ è íàñòðîéêè
|
||||
#define header "Eolite File Manager v0.97.1";
|
||||
#define videlenie 0xFEA4B7; //0x94AECE,,0x8BCDFF,0x9EACCA,0xB8C9B8}; //öâåò âûäåëåííîãî ýëåìåíòà èç ñïèñêà ôàéëîâ
|
||||
#define header "Eolite File Manager v0.97.2"
|
||||
#define videlenie 0x94AECE //0x94AECE,0xFEA4B7,0x8BCDFF,0xB8C9B8}; //öâåò âûäåëåííîãî ýëåìåíòà èç ñïèñêà ôàéëîâ
|
||||
byte toolbar_buttons_x[6]={14,51,90,139,172,208};
|
||||
//
|
||||
dword but_num, kolichestvo, za_kadrom, curbtn, razm_scrl;
|
||||
@ -35,7 +35,7 @@ dword devbuf=0, dev_num;
|
||||
|
||||
|
||||
//IPC
|
||||
/*#include "lib\Nable_lib.h--"
|
||||
#include "lib\Nable_lib.h--"
|
||||
#include "lib\ipc.h--"
|
||||
|
||||
int pLoadedImage;
|
||||
@ -44,7 +44,7 @@ void GetImage(dword ipath)
|
||||
IF (pLoadedImage) free(pLoadedImage);
|
||||
pLoadedImage=loadimage_viaIPC(ipath, #CurrentImage);
|
||||
SetEventMask(100111b); //restore normal event mask
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
@ -52,15 +52,12 @@ byte pressed, key, id;
|
||||
mouse m;
|
||||
int pressed_y;
|
||||
{
|
||||
devbuf= malloc(3112); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
|
||||
ReadDir(10, devbuf, "/");
|
||||
dev_num=EBX;
|
||||
devbuf= malloc(3112); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
|
||||
ReadDir(10, devbuf, "/");
|
||||
dev_num=EBX;
|
||||
load_dll(); //ïîäãðóæàåò ëèáó ñ åäèò_áîêñîì
|
||||
IF (param[0]<>'') {copystr(#param,#edit_path); Goto_edit_path();}
|
||||
Open_Dir(#path,2);
|
||||
//GetImage("/sys/wallpaper.gif");
|
||||
//DrawImage(#CurrentImage, 0*65536+0);
|
||||
//SetEventMask(100111b);
|
||||
loop()
|
||||
{
|
||||
switch(WaitEvent())
|
||||
@ -72,11 +69,8 @@ int pressed_y;
|
||||
//
|
||||
IF (vert==65535) IF (curbtn==0) FileList_ReDraw(-3); ELSE FileList_ReDraw(-1);
|
||||
IF (vert==1) IF (curbtn==but_num-1) FileList_ReDraw(3); ELSE FileList_ReDraw(1);
|
||||
//âûäåëåíèå èñïîëüçóÿ ÏÊÌ
|
||||
//IF (m.pkm==1) && (m.x>197) && (m.x<Form.width-22) && (m.y-skin_width>56)
|
||||
// && (m.y-skin_width-56/18<>curbtn) FileList_ReDraw(m.y-skin_width-56/18-curbtn);
|
||||
//ñêðîëë
|
||||
IF (m.y>Form.width) || (razm_scrl/2+57>m.y) m.y=razm_scrl/2+57; //åñëè êóðñîð íàä îêíîì
|
||||
IF (razm_scrl/2+57>m.y) || (m.y<0) || (m.y>4000) m.y=razm_scrl/2+57; //åñëè êóðñîð íàä îêíîì
|
||||
IF (m.lkm==0) pressed=0; ELSE
|
||||
IF (m.x>=Form.width-21) && (m.x<=Form.width-6) pressed=1;
|
||||
IF (pressed==1)
|
||||
@ -92,7 +86,7 @@ int pressed_y;
|
||||
case evButton:
|
||||
IF (edit1.flags<>64) {edit1.flags=64; edit_box_draw stdcall(#edit1);} //ñáðàñûâàåì âûäåëåíèå ïðè íàæàòèè íà áàòîí
|
||||
id=GetButtonID();
|
||||
IF (id==1) {IF(buf)free(buf); ExitProcess();}
|
||||
IF (id==1) ExitProcess();
|
||||
IF (del_active==1) {IF (id==301) || (id==302) Del_File(302-id); break;}
|
||||
switch(id)
|
||||
{
|
||||
@ -255,8 +249,6 @@ int pressed_y;
|
||||
}
|
||||
IF (rename_active==0) edit_box_mouse stdcall(#edit1); ELSE edit_box_mouse stdcall(#edit2);
|
||||
}
|
||||
free(buf); //free memory
|
||||
ExitProcess();
|
||||
}
|
||||
|
||||
|
||||
@ -305,6 +297,7 @@ inline fastcall void draw_window()
|
||||
FOR (j=0;j<but_num;j++) DefineButton(197,j*18+57,onLeft(22,197),18,201+j+BT_HIDE+BT_NOFRAME,0xFFFFFF); //íîâûå êíîïêè
|
||||
List_ReDraw();
|
||||
IF (del_active==1) Del_Form();
|
||||
//
|
||||
WindowRedrawStatus(2);
|
||||
}
|
||||
|
||||
@ -317,7 +310,9 @@ void KEdit()
|
||||
|
||||
|
||||
inline fastcall void TVScroll() { //Ïðîêðóòêà
|
||||
dword on_y = za_kadrom * onTop(22,57) / kolichestvo +57;
|
||||
dword on_y;
|
||||
IF (kolichestvo<=0) {DrawFlatButton(onLeft(22,0),57,16,onTop(22,58),0,0xE4DFE1,""); return;}
|
||||
on_y = za_kadrom * onTop(22,57) / kolichestvo +57;
|
||||
razm_scrl=onTop(22,57) * but_num - but_num / kolichestvo;
|
||||
IF (razm_scrl<20) razm_scrl = 20; //óñòàíàâëèâàåì ìèíèìàëüíûé ðàçìåð ñêðîëëà
|
||||
IF (razm_scrl>onTop(22,57)-on_y+56) || (za_kadrom+but_num>=kolichestvo) on_y=onTop(23+razm_scrl,0); //äëÿ áîëüøîãî ñïèñêà
|
||||
@ -422,26 +417,39 @@ void Line_ReDraw(dword color, filenum){
|
||||
temp_int = Put_icon(off+strlen(off)-4, y+2);
|
||||
WriteText(7-strlen(ConvertSize(ESDWORD[off-8]))*6+onLeft(75,0),y+6,0x80,0,ConvertSize(ESDWORD[off-8]),0); //size
|
||||
} ELSE IF (!strcmp("..",off)) temp_int=Put_icon("..", y+2); ELSE temp_int=Put_icon("<DIR>", y+2);
|
||||
IF (color==videlenie)
|
||||
if (color==videlenie)
|
||||
{
|
||||
IconFairing(temp_int, y+2); //çàêðàøèâàåì èêîíêó
|
||||
copystr(#path,#file_path);
|
||||
copystr(off,#file_name);
|
||||
copystr(off,#file_path+strlen(#file_path)); //èòàê, file_path=ôàéëó, ò.ê. ïî-óìîë÷àíèþ ýòî ïðîãà
|
||||
/*IF (show_preview) && (!isdir)
|
||||
{
|
||||
GetImage(#file_path);
|
||||
j=dev_num*16+123;
|
||||
j+=show_actions*51;
|
||||
IF (pLoadedImage<>0) DrawImage(#CurrentImage, 22*65536+j+skin_width+18);
|
||||
}*/
|
||||
}
|
||||
temp_int = onLeft(220,160)/6;
|
||||
IF (strlen(off)<temp_int) temp_int = strlen(off); //äëèííà íàçâàíèÿ ôàéëà
|
||||
WriteText(220,y+6,0,0,off,temp_int); //èìÿ ôàéëà
|
||||
DrawBar(onLeft(163,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 1
|
||||
DrawBar(onLeft(90,0),y,1,18,0xE4DFE1); //ïîëîñà ñåðàÿ âåðòèêàëüíàÿ 2
|
||||
//Preview();
|
||||
}
|
||||
|
||||
|
||||
void Open_Dir(dword path_,redraw){
|
||||
IF (buf) free(buf);
|
||||
buf = malloc(2097152);
|
||||
ReadDir(6898, buf, path_);
|
||||
//buf = malloc(2097152);
|
||||
//ReadDir(6898, buf, path_);
|
||||
buf = malloc(32);
|
||||
ReadDir(0, buf, path_);
|
||||
EAX = buf + 8;
|
||||
kolichestvo = ESDWORD[EAX];
|
||||
buf = realloc(kolichestvo * 304 + 32, buf);
|
||||
ReadDir(kolichestvo, buf, path_);
|
||||
//
|
||||
kolichestvo=EBX;
|
||||
//
|
||||
if (kolichestvo<>-1) && (redraw>0)
|
||||
@ -479,7 +487,6 @@ void FoldesGoUp()
|
||||
ELSE {file_mas[kolichestvo-l]=j; l++;}
|
||||
off += 304;
|
||||
}
|
||||
//k=0; l=kolichestvo;
|
||||
switch(sort_num)
|
||||
{
|
||||
CASE 1: //óïîðÿäî÷èâàåì ôàéëû ïî èìåíè
|
||||
@ -528,7 +535,7 @@ void Del_Form()
|
||||
del_active=1;
|
||||
}
|
||||
|
||||
//f70 del_file_70;
|
||||
|
||||
void Del_File(byte dodel)
|
||||
{
|
||||
IF (dodel==true)
|
||||
@ -591,8 +598,8 @@ void Devices()
|
||||
dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê
|
||||
copystr(i*304+ devbuf+72, #dev_name);
|
||||
IF (dev_name[0]=='f') { copystr("Floppy disk /",#drive_name); dev_icon=2; }
|
||||
IF (dev_name[0]=='h') { copystr("Hard disk drive /",#drive_name);}
|
||||
IF (dev_name[0]=='b') { copystr("SATA disk drive /",#drive_name);}
|
||||
IF (dev_name[0]=='h') copystr("Hard disk drive /",#drive_name);
|
||||
IF (dev_name[0]=='b') copystr("SATA disk drive /",#drive_name);
|
||||
IF (dev_name[0]=='c') {copystr("CD-drive /",#drive_name); dev_icon=1;}
|
||||
copystr(#dev_name,#drive_name+strlen(#drive_name));
|
||||
copystr("/",#drive_name+strlen(#drive_name));
|
||||
@ -664,20 +671,21 @@ void Preview()
|
||||
{
|
||||
Tip(top_pr,"Preview",78,"\x19");
|
||||
DrawBar(22,top_pr+18,160,100,0xFFFFFF); //áåëîå
|
||||
//WriteText(30,top_pr+30,0x80,0,"kolichestvo:",0); WriteText(105,top_pr+30,0x80,0,IntToStr(kolichestvo),0);
|
||||
//WriteText(30,top_pr+40,0x80,0,"but_num:",0); WriteText(105,top_pr+40,0x80,0,IntToStr(but_num),0);
|
||||
//WriteText(30,top_pr+50,0x80,0,"curbtn",0); WriteText(105,top_pr+50,0x80,0,IntToStr(curbtn),0);
|
||||
//WriteText(30,top_pr+60,0x80,0,"ra_kadrom:",0); WriteText(105,top_pr+60,0x80,0,IntToStr(za_kadrom),0);
|
||||
//WriteText(30,top_pr+70,0x80,0,#file_path,0);
|
||||
//WriteText(30,top_pr+80,0x80,0,#file_name,0);
|
||||
WriteText(30,top_pr+60,0x80,0,"Not realized... I think",0);
|
||||
WriteText(30,top_pr+70,0x80,0,"it will be realired soon.",0);
|
||||
/*WriteText(30,top_pr+30,0x80,0,"kolichestvo:",0); WriteText(105,top_pr+30,0x80,0,IntToStr(kolichestvo),0);
|
||||
WriteText(30,top_pr+40,0x80,0,"but_num:",0); WriteText(105,top_pr+40,0x80,0,IntToStr(but_num),0);
|
||||
WriteText(30,top_pr+50,0x80,0,"curbtn",0); WriteText(105,top_pr+50,0x80,0,IntToStr(curbtn),0);
|
||||
WriteText(30,top_pr+60,0x80,0,"ra_kadrom:",0); WriteText(105,top_pr+60,0x80,0,IntToStr(za_kadrom),0);
|
||||
WriteText(30,top_pr+70,0x80,0,#file_path,0);
|
||||
WriteText(30,top_pr+80,0x80,0,#file_name,0);*/
|
||||
//WriteText(30,top_pr+60,0x80,0,"Not realized... I think",0);
|
||||
//WriteText(30,top_pr+70,0x80,0,"it will be realired soon.",0);
|
||||
DrawBar(22,top_pr+118,160,onTop(top_pr+118,6),0x00699C); //ñèíåå
|
||||
}
|
||||
ELSE {
|
||||
ELSE
|
||||
{
|
||||
Tip(top_pr,"Preview",78,"\x18");
|
||||
DrawBar(22,top_pr+18,160,onTop(top_pr+18,6),0x00699C); //ñèíåå
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -13,7 +13,7 @@ void authors()
|
||||
DefineAndDrawWindow(500,200,181,256,0x04,0x10EFEBEF,0,0,"About Eolite");
|
||||
DrawBar(5,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
|
||||
PutPaletteImage(#logo,85,85,48,7,#logo_pal);
|
||||
WriteText(32,100,0x80,0xBF40BF,"Eolite v0.97.1 beta7",0);
|
||||
WriteText(32,100,0x80,0xBF40BF,"Eolite v0.97.2 beta7",0);
|
||||
WriteText(60,120,0x80,0,"Developers:",0);
|
||||
WriteText(44,130,0x80,0,"Leency & Veliant",0);
|
||||
WriteText(35,140,0x80,0,"Lrz, Diamond, Nable",0);
|
||||
|
@ -8,6 +8,41 @@ struct f70{
|
||||
dword name;
|
||||
};
|
||||
|
||||
////////////////////////////
|
||||
// Ďđî÷čňŕňü ôŕéë //
|
||||
////////////////////////////
|
||||
f70 read_file_70;
|
||||
void ReadFile(dword pos, file_size, read_buffer, file_path)
|
||||
{
|
||||
read_file_70.func = 0;
|
||||
read_file_70.param1 = pos;
|
||||
read_file_70.param2 = 0;
|
||||
read_file_70.param3 = file_size;
|
||||
read_file_70.param4 = read_buffer;
|
||||
read_file_70.rezerv = 0;
|
||||
read_file_70.name = file_path;
|
||||
$mov eax,70
|
||||
$mov ebx,#read_file_70.func
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// Ďđî÷čňŕňü ďŕďęó //
|
||||
///////////////////////////
|
||||
f70 read_dir_70;
|
||||
void ReadDir(dword file_count, read_buffer, read_dir_path)
|
||||
{
|
||||
read_dir_70.func = 1;
|
||||
read_dir_70.param1 = 0;
|
||||
read_dir_70.param2 = 0;
|
||||
read_dir_70.param3 = file_count;
|
||||
read_dir_70.param4 = read_buffer;
|
||||
read_dir_70.rezerv = 0;
|
||||
read_dir_70.name = read_dir_path;
|
||||
$mov eax,70
|
||||
$mov ebx,#read_dir_70.func
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// Çàïóñê ïðîãðàììû //
|
||||
@ -63,24 +98,6 @@ void DeleleFile(dword del_file_path)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// Ïðî÷èòàòü ïàïêó //
|
||||
///////////////////////////
|
||||
f70 read_dir_70;
|
||||
void ReadDir(dword file_count, read_buffer, read_dir_path)
|
||||
{
|
||||
read_dir_70.func = 1;
|
||||
read_dir_70.param1 =
|
||||
read_dir_70.param2 =
|
||||
read_dir_70.rezerv = 0;
|
||||
read_dir_70.param3 = file_count;
|
||||
read_dir_70.param4 = read_buffer;
|
||||
read_dir_70.name = read_dir_path;
|
||||
$mov eax,70
|
||||
$mov ebx,#read_dir_70.func
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// Ñêîïèðîâàòü ôàéë //
|
||||
///////////////////////////
|
||||
@ -103,16 +120,7 @@ inline fastcall dword CopyFile(dword EBX,ECX)
|
||||
if (!EAX)
|
||||
{
|
||||
cBufer = malloc(CopyFile_atr.sizelo);
|
||||
CopyFile_f.func = 0;
|
||||
CopyFile_f.param1 = 0;
|
||||
CopyFile_f.param2 = 0;
|
||||
CopyFile_f.param3 = CopyFile_atr.sizelo;
|
||||
CopyFile_f.param4 = cBufer;
|
||||
CopyFile_f.rezerv = 0;
|
||||
CopyFile_f.name = s;
|
||||
$mov eax, 70
|
||||
$mov ebx, #CopyFile_f
|
||||
$int 0x40
|
||||
ReadFile(dword 0, CopyFile_atr.sizelo, cBufer, s);
|
||||
|
||||
IF (!EAX)
|
||||
{
|
||||
|
@ -108,11 +108,11 @@ inline fastcall dword WaitEvent(){
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
/*inline fastcall void SetEventMask(dword EBX)
|
||||
inline fastcall void SetEventMask(dword EBX)
|
||||
{
|
||||
EAX = 40;
|
||||
$int 0x40
|
||||
} */
|
||||
}
|
||||
|
||||
inline fastcall word GetKey(){
|
||||
EAX = 2; // just read this key from buffer
|
||||
@ -331,3 +331,25 @@ void PutPaletteImage(dword EBX,w,h,x,y, EDI)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
inline fastcall dword WriteDebug(dword EDX)
|
||||
{
|
||||
$push ebx
|
||||
$push ecx
|
||||
$mov eax, 63
|
||||
$mov ebx, 1
|
||||
next_char:
|
||||
$mov ecx, DSDWORD[edx]
|
||||
$or cl, cl
|
||||
$jz done
|
||||
$int 0x40
|
||||
$inc edx
|
||||
$jmp next_char
|
||||
done:
|
||||
$mov cl, 13
|
||||
$int 0x40
|
||||
$mov cl, 10
|
||||
$int 0x40
|
||||
$pop ecx
|
||||
$pop ebx
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user