diff --git a/programs/fs/Eolite/trunk/Eolite.c-- b/programs/fs/Eolite/trunk/Eolite.c-- index a0eeda4a65..9d2a447f7e 100644 --- a/programs/fs/Eolite/trunk/Eolite.c-- +++ b/programs/fs/Eolite/trunk/Eolite.c-- @@ -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.x56) - // && (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;jonTop(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("", 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)-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)); @@ -656,7 +663,7 @@ void Dir_Up() void Preview() -{ +{ dword top_pr=dev_num*16+123; top_pr+=show_actions*51; //начинаем ниже, если Экшнс видимы DeleteButton(78); @@ -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); - DrawBar(22,top_pr+118,160,onTop(top_pr+118,6),0x00699C); //синее + /*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); //синее - } + } } diff --git a/programs/fs/Eolite/trunk/imgs/imgs.zip b/programs/fs/Eolite/trunk/imgs/imgs.zip index eb2b59e14f..3cdda3b26d 100644 Binary files a/programs/fs/Eolite/trunk/imgs/imgs.zip and b/programs/fs/Eolite/trunk/imgs/imgs.zip differ diff --git a/programs/fs/Eolite/trunk/include/LVabout.c-- b/programs/fs/Eolite/trunk/include/LVabout.c-- index 74e053e5a5..400c77d594 100644 --- a/programs/fs/Eolite/trunk/include/LVabout.c-- +++ b/programs/fs/Eolite/trunk/include/LVabout.c-- @@ -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); diff --git a/programs/fs/Eolite/trunk/lib/file_system.h-- b/programs/fs/Eolite/trunk/lib/file_system.h-- index 316e62b3d2..870edb7a6b 100644 --- a/programs/fs/Eolite/trunk/lib/file_system.h-- +++ b/programs/fs/Eolite/trunk/lib/file_system.h-- @@ -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 +} /////////////////////////// // Запуск программы // @@ -61,24 +96,6 @@ void DeleleFile(dword del_file_path) $mov eax,70 $mov ebx,#del_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 = - 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) { diff --git a/programs/fs/Eolite/trunk/lib/kolibri.h-- b/programs/fs/Eolite/trunk/lib/kolibri.h-- index e09c9ebb13..3df248d1fd 100644 --- a/programs/fs/Eolite/trunk/lib/kolibri.h-- +++ b/programs/fs/Eolite/trunk/lib/kolibri.h-- @@ -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 +}