Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ed8821346 | ||
|
|
7c9ad9dde9 | ||
|
|
c8cf7a834f | ||
|
|
3b8dc9662d | ||
|
|
a8412100b4 |
No files matched your search
@@ -170,9 +170,6 @@ fb_draw_panel_selection:
|
||||
mov eax,fb_folder_block
|
||||
test eax,eax
|
||||
jz .end
|
||||
xor eax,eax
|
||||
cmp fb_select_panel_counter,eax
|
||||
je .end
|
||||
mov eax,fb_folder_block
|
||||
sub eax,fb_start_draw_line
|
||||
mov cx,fb_start_draw_cursor_line
|
||||
@@ -199,7 +196,29 @@ fb_draw_panel_selection:
|
||||
shl eax,16
|
||||
push eax
|
||||
add ebx,eax
|
||||
mcall SF_DRAW_RECT
|
||||
cmp fb_select_panel_counter,0 ; is the cursor in an inactive state?
|
||||
jne @f
|
||||
push ecx
|
||||
mov cx,2
|
||||
mcall SF_DRAW_RECT ; display the cursor in the inactive state
|
||||
ror ecx,16
|
||||
add cx,fb_line_size_y
|
||||
sub cx,2
|
||||
ror ecx,16
|
||||
mcall
|
||||
pop ecx
|
||||
mov bx,2
|
||||
mcall
|
||||
ror ebx,16
|
||||
add bx,fb_size_x
|
||||
sub bx,fb_icon_size_x
|
||||
sub bx,2+2 ; cursor border + text margin
|
||||
ror ebx,16
|
||||
mcall
|
||||
jmp .no_frame
|
||||
@@:
|
||||
mcall SF_DRAW_RECT ; display the cursor in the active state
|
||||
.no_frame:
|
||||
pop ebx
|
||||
cmp fb_all_redraw,0
|
||||
je .end
|
||||
@@ -286,7 +305,7 @@ fb_draw_folder_data:
|
||||
xor edx,edx
|
||||
div ebx
|
||||
pop edx ebx
|
||||
sub eax,23+2+2+2
|
||||
sub eax,25+2+2+2
|
||||
mov esi,fb_file_name_length
|
||||
mov fb_temp_counter,0
|
||||
mov fb_display_name_max_length,eax
|
||||
@@ -323,13 +342,14 @@ fb_draw_folder_data:
|
||||
xor eax,eax
|
||||
mov ax,fb_font_size_x
|
||||
imul eax,fb_display_name_max_length
|
||||
inc eax
|
||||
shl eax,16
|
||||
push edx
|
||||
add ebx,eax
|
||||
mov esi,2
|
||||
mov ecx,fb_reduct_text_color
|
||||
mov edx,dword fb_truncated_filename_char
|
||||
mcall SF_DRAW_TEXT
|
||||
mcall SF_DRAW_TEXT ; .. two dots
|
||||
pop edx
|
||||
.continue:
|
||||
pop ebx
|
||||
@@ -375,7 +395,8 @@ align 4
|
||||
mov eax,fb_select_color
|
||||
@@:
|
||||
mov edi,eax
|
||||
mcall SF_DRAW_TEXT
|
||||
add ebx,1 shl 16
|
||||
mcall SF_DRAW_TEXT ; file name
|
||||
popa
|
||||
ret
|
||||
;--------------------------------------
|
||||
@@ -432,6 +453,19 @@ fb_clear_line:
|
||||
sub bx,fb_icon_size_x
|
||||
sub bx,3
|
||||
rol ebx,16
|
||||
cmp fb_select_panel_counter,0 ; is the cursor in an inactive state?
|
||||
jne @f
|
||||
mov ax,fb_start_draw_cursor_line
|
||||
add ax,fb_start_y
|
||||
shl eax,16
|
||||
mov ax,fb_line_size_y
|
||||
cmp ecx,eax
|
||||
jne @f
|
||||
add ebx,2 shl 16
|
||||
sub ebx,4
|
||||
add ecx,2 shl 16
|
||||
sub ecx,4
|
||||
@@:
|
||||
mcall SF_DRAW_RECT,,,fb_background_color
|
||||
.end:
|
||||
popa
|
||||
@@ -444,13 +478,13 @@ fb_draw_type_size_date:
|
||||
test [edx-40],byte 0x10
|
||||
jz .copy_type
|
||||
mov [eax],dword '<DIR'
|
||||
mov [eax+4],word '> '
|
||||
mov [eax+4],dword '> '
|
||||
mov fb_file_name_length,0
|
||||
mov fb_extension_size,0
|
||||
jmp .start
|
||||
.copy_type:
|
||||
mov [eax],dword ' '
|
||||
mov [eax+4],word ' '
|
||||
mov [eax+4],dword ' '
|
||||
.start:
|
||||
mov esi,edx
|
||||
xor eax,eax
|
||||
@@ -505,16 +539,16 @@ fb_draw_type_size_date:
|
||||
mov eax,fb_type_table
|
||||
test [edx-40],byte 0x10
|
||||
jz .copy_size
|
||||
mov [eax+6],dword '----'
|
||||
mov [eax+6+4],word '- '
|
||||
mov [eax+7],dword '----'
|
||||
mov [eax+7+4],dword '-- '
|
||||
jmp .date
|
||||
;-----------------------------------------
|
||||
align 4
|
||||
.call_decimal_string:
|
||||
mov ebx,fb_type_table
|
||||
add ebx,9
|
||||
add ebx,10
|
||||
call fb_decimal_string
|
||||
mov [ebx+1],dl
|
||||
mov [ebx+1],dx
|
||||
jmp .size_convert_end
|
||||
;-----------------------------------------
|
||||
.qword_div:
|
||||
@@ -548,7 +582,7 @@ align 4
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'E' ; Exa Byte
|
||||
mov dx,'E ' ; Exa Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
push ecx
|
||||
@@ -556,7 +590,7 @@ align 4
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'P' ; Peta Byte
|
||||
mov dx,'P ' ; Peta Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
push ecx
|
||||
@@ -564,7 +598,7 @@ align 4
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'T' ; Tera Byte
|
||||
mov dx,'T ' ; Tera Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
push ecx
|
||||
@@ -572,7 +606,7 @@ align 4
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'G' ; Giga Byte
|
||||
mov dx,'G ' ; Giga Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,[edx-40+32]
|
||||
@@ -580,19 +614,20 @@ align 4
|
||||
shr eax,20 ; /(1024*1024)
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov dl,byte 'M' ; Mega Byte
|
||||
mov dx,'M ' ; Mega Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,ebx
|
||||
shr eax,10 ; /1024
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov dl,byte 'K' ; Kilo Byte
|
||||
mov dx,'K ' ; Kilo Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,ebx
|
||||
mov ebx,fb_type_table
|
||||
add ebx,10
|
||||
mov dword[ebx+1],' ' ; clear K, M, ..., E
|
||||
call fb_decimal_string
|
||||
.size_convert_end:
|
||||
pop edx ebx
|
||||
@@ -608,22 +643,22 @@ align 4
|
||||
mov al,[edx-40+28]
|
||||
push ebx
|
||||
mov ebx,fb_type_table
|
||||
add ebx,12
|
||||
add ebx,14
|
||||
call fb_decimal_string_2 ; day
|
||||
mov al,[edx-40+29]
|
||||
mov ebx,fb_type_table
|
||||
add ebx,12+3
|
||||
add ebx,14+3
|
||||
call fb_decimal_string_2 ; month
|
||||
mov ax,[edx-40+30]
|
||||
mov ebx,fb_type_table
|
||||
add ebx,12+9
|
||||
add ebx,14+9
|
||||
mov [ebx-3], dword '0000'
|
||||
call fb_decimal_string ; year
|
||||
pop ebx
|
||||
;-----------------------------------------
|
||||
ror ebx,16
|
||||
add bx,fb_size_x
|
||||
sub ebx,161 ; 122+12+15
|
||||
sub ebx,173 ; 122+18+21
|
||||
rol ebx,16
|
||||
mov ecx,fb_text_color
|
||||
cmp fb_marked_file,0
|
||||
@@ -631,7 +666,7 @@ align 4
|
||||
mov ecx,fb_reduct_text_color
|
||||
@@:
|
||||
mov edx,fb_type_table
|
||||
mov esi,22
|
||||
mov esi,24 ; text length
|
||||
mov ax,fb_line_size_y
|
||||
sub ax,fb_font_size_y
|
||||
push ebx
|
||||
@@ -650,14 +685,41 @@ align 4
|
||||
mov eax,fb_select_color
|
||||
@@:
|
||||
mov edi,eax
|
||||
mcall SF_DRAW_TEXT
|
||||
mcall SF_DRAW_TEXT ; type size date
|
||||
.not_show_date:
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_icon:
|
||||
pusha
|
||||
pushad
|
||||
cmp fb_icon_raw_area,0
|
||||
jne .not_draw_null
|
||||
mov bx,[esp+18] ;coord x
|
||||
sub bx,2
|
||||
sub bx,fb_icon_size_x
|
||||
shl ebx,16
|
||||
mov bx,fb_icon_size_x
|
||||
mov cx,[esp+16] ;coord y
|
||||
shl ecx,16
|
||||
mov cx,fb_icon_size_y
|
||||
test [edx-40],byte 0x10
|
||||
jz @f
|
||||
mov edx,fb_select_color
|
||||
jmp .draw_r
|
||||
@@:
|
||||
mov edx,fb_background_color
|
||||
.draw_r:
|
||||
mcall SF_DRAW_RECT
|
||||
shr ebx,16
|
||||
shr ecx,16
|
||||
movzx eax,fb_icon_size_x
|
||||
movzx edx,fb_icon_size_y
|
||||
stdcall draw_edge, ebx, ecx, eax, edx,\
|
||||
fb_background_color, fb_select_color, fb_text_color
|
||||
popad
|
||||
ret
|
||||
.not_draw_null:
|
||||
xor eax,eax
|
||||
mov ax,fb_icon_size_y
|
||||
mov ebx,fb_resolution_raw
|
||||
@@ -698,11 +760,9 @@ fb_draw_icon:
|
||||
add dx,ax
|
||||
mov esi,fb_resolution_raw
|
||||
xor ebp,ebp
|
||||
push edi
|
||||
mov edi,fb_palette_raw
|
||||
mcall SF_PUT_IMAGE_EXT
|
||||
pop edi
|
||||
popa
|
||||
popad
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
; Convert of a binary number in decimal string form
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
format MS COFF
|
||||
public EXPORTS
|
||||
include '../../../KOSfuncs.inc'
|
||||
section '.flat' code readable align 16
|
||||
; void __stdcall START(dword state);
|
||||
DLL_ENTRY equ 1
|
||||
@@ -60,6 +61,7 @@ START:
|
||||
; SORT_BY_ACCESSED = 12, SORT_BY_ACCESSED_REV = 13 };
|
||||
; int __stdcall sort_dir(BDFE* folder_data, unsigned num_folder_entries, sort_mode mode);
|
||||
; return: 0 = ok, 1 = error
|
||||
align 4
|
||||
sort_dir:
|
||||
cmp dword [esp+12], num_compare_fns
|
||||
jae .error
|
||||
@@ -73,9 +75,9 @@ sort_dir:
|
||||
jz .done
|
||||
cmp eax, ecx
|
||||
jae .memok
|
||||
push 68
|
||||
push SF_SYS_MISC
|
||||
pop eax
|
||||
push 12
|
||||
push SSF_MEM_ALLOC
|
||||
pop ebx
|
||||
int 0x40
|
||||
test eax, eax
|
||||
@@ -103,6 +105,8 @@ sort_dir:
|
||||
pop ecx
|
||||
mov ebx, edx
|
||||
sub esp, 304
|
||||
cld
|
||||
align 4
|
||||
.moveloop:
|
||||
mov esi, [ebx]
|
||||
test esi, esi
|
||||
@@ -139,9 +143,9 @@ sort_dir:
|
||||
.done_free:
|
||||
cmp edx, ptr_table
|
||||
jz .done
|
||||
push 68
|
||||
push SF_SYS_MISC
|
||||
pop eax
|
||||
push 13
|
||||
push SSF_MEM_FREE
|
||||
pop ebx
|
||||
mov ecx, edx
|
||||
int 0x40
|
||||
@@ -269,6 +273,7 @@ compare_name_rev:
|
||||
stc
|
||||
ret
|
||||
|
||||
align 4
|
||||
strcmpi:
|
||||
push eax
|
||||
@@:
|
||||
|
||||
+53
-32
@@ -1,6 +1,7 @@
|
||||
;------------------------------------------------------------------------------
|
||||
align 16
|
||||
button:
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
;--------------------------------------
|
||||
.1:
|
||||
cmp ah,101
|
||||
@@ -46,8 +47,8 @@ button:
|
||||
add eax,retrieved_devices_table+1
|
||||
mov esi,eax ; selected path
|
||||
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
|
||||
call copy_folder_name
|
||||
jmp left_panel_read_folder
|
||||
@@ -105,22 +106,32 @@ button:
|
||||
cmp ah,157
|
||||
je delete_file
|
||||
|
||||
cmp ah,170
|
||||
je key_insert.1
|
||||
|
||||
cmp ah,171
|
||||
je symbol_a_up.ctrl
|
||||
|
||||
cmp ah,172
|
||||
je NumPad_minus_Up.ctrl
|
||||
|
||||
cmp ah,173
|
||||
je NumPad_sneg_Up.ctrl
|
||||
|
||||
cmp ah, 1
|
||||
jne still
|
||||
;--------------------------------------
|
||||
.exit:
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
;---------------------------------------------------------------------
|
||||
reload_dir:
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
call proc_read_left_folder
|
||||
; mov [left_panel_clear_all],1
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
@@:
|
||||
call proc_read_right_folder
|
||||
; mov [right_panel_clear_all],1
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
@@ -134,38 +145,43 @@ exit_dir_1:
|
||||
jmp key_28.1
|
||||
;---------------------------------------------------------------------
|
||||
left_panel_read_folder:
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
jmp proc_read_folder
|
||||
;---------------------------------------------------------------------
|
||||
right_panel_read_folder:
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
jmp proc_read_folder_1
|
||||
;---------------------------------------------------------------------
|
||||
left_sort_name:
|
||||
xor eax,eax
|
||||
cmp [left_sort_flag],eax
|
||||
je still
|
||||
je left_sort_date.2
|
||||
mov [left_sort_flag],eax
|
||||
jmp left_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
left_sort_type:
|
||||
cmp [left_sort_flag],1
|
||||
je still
|
||||
mov [left_sort_flag],1
|
||||
jmp left_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
left_sort_size:
|
||||
cmp [left_sort_flag],2
|
||||
je still
|
||||
je left_sort_date.2
|
||||
mov [left_sort_flag],2
|
||||
jmp left_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
left_sort_size:
|
||||
cmp [left_sort_flag],6
|
||||
je left_sort_date.2
|
||||
mov [left_sort_flag],6
|
||||
jmp left_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
left_sort_date:
|
||||
cmp [left_sort_flag],3
|
||||
je still
|
||||
mov [left_sort_flag],3
|
||||
cmp [left_sort_flag],4
|
||||
je left_sort_date.2
|
||||
mov [left_sort_flag],4
|
||||
jmp left_sort_date.1
|
||||
.2:
|
||||
xor [left_sort_flag],1
|
||||
.1:
|
||||
call draw_left_select_disk_button
|
||||
mov edx,0x80000000+142
|
||||
call clear_sort_buttons
|
||||
call draw_left_sort_button
|
||||
call left_sort_files
|
||||
call draw_left_panel
|
||||
@@ -174,28 +190,33 @@ left_sort_date:
|
||||
right_sort_name:
|
||||
xor eax,eax
|
||||
cmp [right_sort_flag],eax
|
||||
je still
|
||||
je right_sort_date.2
|
||||
mov [right_sort_flag],eax
|
||||
jmp right_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
right_sort_type:
|
||||
cmp [right_sort_flag],1
|
||||
je still
|
||||
mov [right_sort_flag],1
|
||||
jmp right_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
right_sort_size:
|
||||
cmp [right_sort_flag],2
|
||||
je still
|
||||
je right_sort_date.2
|
||||
mov [right_sort_flag],2
|
||||
jmp right_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
right_sort_size:
|
||||
cmp [right_sort_flag],6
|
||||
je right_sort_date.2
|
||||
mov [right_sort_flag],6
|
||||
jmp right_sort_date.1
|
||||
;---------------------------------------------------------------------
|
||||
right_sort_date:
|
||||
cmp [right_sort_flag],3
|
||||
je still
|
||||
mov [right_sort_flag],3
|
||||
cmp [right_sort_flag],4
|
||||
je right_sort_date.2
|
||||
mov [right_sort_flag],4
|
||||
jmp right_sort_date.1
|
||||
.2:
|
||||
xor [right_sort_flag],1
|
||||
.1:
|
||||
call draw_right_select_disk_button
|
||||
mov edx,0x80000000+146
|
||||
call clear_sort_buttons
|
||||
call draw_right_sort_button
|
||||
call right_sort_files
|
||||
call draw_right_panel
|
||||
|
||||
+14
-12
@@ -12,17 +12,17 @@ confirmation_action:
|
||||
call draw_confirmation_menu
|
||||
;--------------------------------------
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red_1
|
||||
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je key_menu_confirmation
|
||||
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
jne .still
|
||||
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah,161
|
||||
je .no_del
|
||||
|
||||
@@ -32,7 +32,7 @@ confirmation_action:
|
||||
cmp ah,1
|
||||
jne .still
|
||||
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
;--------------------------------------
|
||||
.del:
|
||||
mov [work_confirmation_yes],1
|
||||
@@ -47,13 +47,14 @@ draw_confirmation_button:
|
||||
mov ecx,[window_high]
|
||||
mov ebx,[window_width]
|
||||
shr ecx,1
|
||||
sub ecx,[skin_high]
|
||||
shr ebx,1
|
||||
sub ebx,45
|
||||
sub ebx,50
|
||||
shl ecx,16
|
||||
shl ebx,16
|
||||
mov cx,15
|
||||
mov bx,40
|
||||
mcall 8,,,0x40000000+160,0xffffff
|
||||
mcall SF_DEFINE_BUTTON, ,,0x40000000+160,0xffffff
|
||||
add ebx,50 shl 16
|
||||
inc edx
|
||||
mcall
|
||||
@@ -65,12 +66,13 @@ draw_confirmation_menu:
|
||||
shr ecx,1
|
||||
shr ebx,1
|
||||
sub ecx,22
|
||||
sub ebx,60
|
||||
sub ecx,[skin_high]
|
||||
sub ebx,65
|
||||
shl ecx,16
|
||||
shl ebx,16
|
||||
mov cx,44
|
||||
mov bx,120
|
||||
mcall 13,,,0x6060ff
|
||||
mcall SF_DRAW_RECT, ,,0x6060ff
|
||||
push ebx ecx
|
||||
add ebx,15 shl 16
|
||||
add ecx,22 shl 16
|
||||
@@ -104,7 +106,7 @@ draw_confirmation_menu:
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
add ebx,7 shl 16+2
|
||||
mcall 4,,0x90ffffff,[confirmation_type]
|
||||
mcall SF_DRAW_TEXT, ,0x90ffffff,[confirmation_type]
|
||||
add ebx,15 shl 16+20
|
||||
mcall ,,,type_yes
|
||||
add ebx,56 shl 16
|
||||
@@ -112,7 +114,7 @@ draw_confirmation_menu:
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
key_menu_confirmation:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
cmp [extended_key],1
|
||||
je .extended_key
|
||||
|
||||
|
||||
+101
-74
@@ -8,30 +8,30 @@ copy_file_f5:
|
||||
; mov byte [copy_many_files],al
|
||||
mov [current_progress_value],eax
|
||||
mov [current_progress_value_1],eax
|
||||
cmp [select_panel_counter],al
|
||||
jne .right_1
|
||||
cmp [left_marked_counter],eax
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
cmp [fb_left.marked_counter],eax
|
||||
jne .confirmation_action
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
mov ax,[fb_left.start_draw_cursor_line]
|
||||
movzx ebx,[fb_left.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[left_start_draw_line]
|
||||
mov ebx,[fb_left.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
call prepare_data_7
|
||||
call .copy_name
|
||||
jmp editbox_copy_name
|
||||
.right_1:
|
||||
cmp [right_marked_counter],eax
|
||||
cmp [fb_right.marked_counter],eax
|
||||
jne .confirmation_action
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
mov ax,[fb_right.start_draw_cursor_line]
|
||||
movzx ebx,[fb_right.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[right_start_draw_line]
|
||||
mov ebx,[fb_right.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
call prepare_data_7
|
||||
call .copy_name
|
||||
jmp editbox_copy_name
|
||||
@@ -65,9 +65,9 @@ copy_file_f5:
|
||||
mov edi, edit1
|
||||
mov ed_size, eax
|
||||
mov ed_pos, eax
|
||||
default_box
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_2
|
||||
and word ed_flags,ed_shift_cl
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_2
|
||||
mov esi,read_folder_name
|
||||
jmp @f
|
||||
.right_2:
|
||||
@@ -78,26 +78,29 @@ default_box
|
||||
ret
|
||||
;-------------------------------------------------------------
|
||||
editbox_copy_name:
|
||||
mcall 66, 1, 0
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 0
|
||||
jmp .red
|
||||
.red_1:
|
||||
call draw_window
|
||||
.red:
|
||||
call draw_editbox_copy_name
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red_1
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je .key_copy
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je .button_copy
|
||||
mouse_edit_box copy_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_mouse], copy_editboxes
|
||||
else
|
||||
stdcall edit_box_mouse, copy_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
.button_copy:
|
||||
mov eax,17
|
||||
mcall
|
||||
mcall SF_GET_BUTTON
|
||||
test ah,ah
|
||||
jz .still
|
||||
cmp ah,160
|
||||
@@ -106,7 +109,7 @@ editbox_copy_name:
|
||||
je .exit_without_copy
|
||||
cmp ah,1
|
||||
jne .still
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
.exit_with_copy:
|
||||
mov [max_progress_value],1
|
||||
mov [draw_all_progressbar],1
|
||||
@@ -121,18 +124,21 @@ editbox_copy_name:
|
||||
call proc_read_left_folder
|
||||
call proc_read_right_folder
|
||||
.exit_without_copy:
|
||||
mcall 66, 1, 1
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
|
||||
mov [move_file_flag],0
|
||||
jmp red
|
||||
;-------------------------------------------------------------
|
||||
.key_copy:
|
||||
mov eax,2
|
||||
mcall
|
||||
mcall SF_GET_KEY
|
||||
cmp ah,13
|
||||
je .exit_with_copy
|
||||
cmp ah,27
|
||||
je .exit_without_copy
|
||||
key_edit_box copy_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_key], copy_editboxes
|
||||
else
|
||||
stdcall edit_box_key, copy_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
draw_editbox_copy_name:
|
||||
@@ -146,7 +152,7 @@ draw_editbox_copy_name:
|
||||
shl ebx,16
|
||||
mov cx,60
|
||||
mov bx,174
|
||||
mcall 13, , ,0x6060ff ;0xff
|
||||
mcall SF_DRAW_RECT, , ,0x6060ff ;0xff
|
||||
pusha
|
||||
shr ebx,16
|
||||
add ebx,10
|
||||
@@ -155,7 +161,11 @@ draw_editbox_copy_name:
|
||||
mov eax,copy_editboxes
|
||||
mov dword [eax+4],ebx
|
||||
mov dword [eax+8],ecx
|
||||
draw_edit_box copy_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_draw], copy_editboxes
|
||||
else
|
||||
stdcall edit_box_draw, copy_editboxes
|
||||
end if
|
||||
popa
|
||||
pusha
|
||||
add ebx,70 shl 16
|
||||
@@ -164,8 +174,7 @@ draw_editbox_copy_name:
|
||||
mov bx,40
|
||||
mov esi,0xffffff
|
||||
mov edx,0x40000000+160
|
||||
mov eax,8
|
||||
mcall
|
||||
mcall SF_DEFINE_BUTTON
|
||||
add ebx,50 shl 16
|
||||
inc edx
|
||||
mcall
|
||||
@@ -176,7 +185,7 @@ draw_editbox_copy_name:
|
||||
add ecx,37 shl 16
|
||||
mov bx,40
|
||||
mov cx,15
|
||||
mov edx,0
|
||||
xor edx,edx
|
||||
push ebx ecx
|
||||
sub ecx,1 shl 16
|
||||
sub ebx,1 shl 16
|
||||
@@ -198,12 +207,12 @@ draw_editbox_copy_name:
|
||||
add ebx,60 shl 16+1
|
||||
cmp [move_file_flag],0
|
||||
je .copy
|
||||
mov edx,move_type_1
|
||||
mov edx,sz_Move_file
|
||||
jmp @f
|
||||
.copy:
|
||||
mov edx,copy_type_1
|
||||
mov edx,sz_Copy_file
|
||||
@@:
|
||||
mcall 4, ,0x90ffffff
|
||||
mcall SF_DRAW_TEXT, ,0x90ffffff
|
||||
add ebx,18 shl 16+36
|
||||
mov edx,type_yes
|
||||
mcall
|
||||
@@ -215,31 +224,31 @@ draw_editbox_copy_name:
|
||||
copy_file_1:
|
||||
mov ebx,create_dir_name
|
||||
.1:
|
||||
mov [error_pointer],ebx
|
||||
cmp [select_panel_counter],0
|
||||
je .right_2
|
||||
mov esi,read_folder_name
|
||||
mov [error_pointer],ebx
|
||||
cmp [fb_left.select_panel_counter],1
|
||||
je .right_2
|
||||
mov esi,read_folder_name
|
||||
jmp @f
|
||||
.right_2:
|
||||
mov esi,read_folder_1_name
|
||||
mov esi,read_folder_1_name
|
||||
@@:
|
||||
mov edi,start_parameter
|
||||
call copy_path_1
|
||||
call get_file_size
|
||||
mov edi,start_parameter
|
||||
call copy_path_1
|
||||
call get_file_size
|
||||
test eax,eax
|
||||
jnz .error
|
||||
mov [read_file.Offset],eax
|
||||
mov [add_save_file.Offset],eax
|
||||
mov eax,[appl_memory]
|
||||
xor eax,eax
|
||||
mov [read_file.return],eax
|
||||
mov [save_file.pointer],eax
|
||||
mov [add_save_file.pointer],eax
|
||||
mcall 18,16
|
||||
mcall SF_SYSTEM, SSF_GET_FREE_RAM
|
||||
mov ebx,[file_features_temp_area+32]
|
||||
shr ebx,10
|
||||
shr eax,2
|
||||
cmp ebx,eax
|
||||
jb .copy_for_one
|
||||
jb .copy_for_one
|
||||
shl eax,10
|
||||
mov ecx,eax
|
||||
mov [read_file.size],eax
|
||||
@@ -263,10 +272,16 @@ copy_file_1:
|
||||
popa
|
||||
.continue_5:
|
||||
call progress_bar_copy ;_1
|
||||
call add_application_memory.1
|
||||
add ecx,[tm_size]
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [tmp_memory]
|
||||
mov [tmp_memory],eax
|
||||
mov [tm_size],ecx
|
||||
mov [read_file.return],eax
|
||||
mov [save_file.pointer],eax
|
||||
mov [add_save_file.pointer],eax
|
||||
cmp [copy_many_files],byte 0
|
||||
jne @f
|
||||
inc [current_progress_value]
|
||||
inc [current_progress_value]
|
||||
call progress_bar_copy ;_1
|
||||
@@:
|
||||
call load_file
|
||||
@@ -274,7 +289,7 @@ copy_file_1:
|
||||
jnz .error
|
||||
cmp [copy_many_files],byte 0
|
||||
jne @f
|
||||
inc [current_progress_value_1]
|
||||
inc [current_progress_value_1]
|
||||
call progress_bar_copy ;_1
|
||||
@@:
|
||||
call write_file
|
||||
@@ -302,7 +317,7 @@ copy_file_1:
|
||||
inc [current_progress_value_1]
|
||||
call progress_bar_copy ;_1
|
||||
@@:
|
||||
call add_write_file
|
||||
mcall SF_FILE, add_save_file
|
||||
test eax,eax
|
||||
jnz .error_1
|
||||
jmp .continue
|
||||
@@ -319,66 +334,78 @@ copy_file_1:
|
||||
jnz .error_1
|
||||
inc [current_progress_value_1]
|
||||
call progress_bar_copy
|
||||
call add_write_file
|
||||
mcall SF_FILE, add_save_file
|
||||
test eax,eax
|
||||
jnz .error_1
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,[save_file.size]
|
||||
call sub_application_memory.1
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
.exit:
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
.copy_for_one:
|
||||
call add_application_memory
|
||||
mov ecx,[file_features_temp_area+32]
|
||||
add ecx,[tm_size]
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [tmp_memory]
|
||||
mov [tmp_memory],eax
|
||||
mov [tm_size],ecx
|
||||
mov [read_file.return],eax
|
||||
mov [save_file.pointer],eax
|
||||
mov [add_save_file.pointer],eax
|
||||
mov eax,[file_features_temp_area+32]
|
||||
mov [read_file.size],eax
|
||||
inc [current_progress_value]
|
||||
inc [current_progress_value]
|
||||
call progress_bar_copy
|
||||
call load_file
|
||||
test eax,eax
|
||||
jnz .error
|
||||
mov [save_file.size],ebx
|
||||
inc [current_progress_value_1]
|
||||
inc [current_progress_value_1]
|
||||
call progress_bar_copy
|
||||
call write_file
|
||||
test eax,eax
|
||||
jnz .error
|
||||
call sub_application_memory
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
ret
|
||||
|
||||
.error:
|
||||
call start_error_window_thread
|
||||
call sub_application_memory
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
add esp,4
|
||||
mov [move_file_flag],0
|
||||
jmp editbox_copy_name.exit_without_copy
|
||||
|
||||
.error_1:
|
||||
call start_error_window_thread
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,[save_file.size]
|
||||
call sub_application_memory.1
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
add esp,4
|
||||
mov [move_file_flag],0
|
||||
jmp editbox_copy_name.exit_without_copy
|
||||
;-------------------------------------------------------------
|
||||
align 4
|
||||
copy_marked_files:
|
||||
mov [copy_many_files],byte 1
|
||||
mov [draw_all_progressbar],1
|
||||
xor eax,eax
|
||||
mov [current_progress_value],eax
|
||||
mov [current_progress_value_1],eax
|
||||
cmp [select_panel_counter],al
|
||||
jne .right_1
|
||||
mov eax,[left_marked_counter]
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
mov eax,[fb_left.marked_counter]
|
||||
mov [max_progress_value],eax
|
||||
mov ebp,[left_folder_block]
|
||||
mov ebp,[fb_left.folder_block]
|
||||
.start:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
add ebx,32+40
|
||||
test [ebx-40],byte 0x10
|
||||
jnz @f
|
||||
@@ -409,20 +436,20 @@ copy_marked_files:
|
||||
jnz .start
|
||||
cmp [move_file_flag],0
|
||||
je reload_dir_all
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
mov [move_file_flag],0
|
||||
mov [copy_many_files],byte 0
|
||||
jmp reload_dir_all
|
||||
|
||||
.right_1:
|
||||
mov eax,[right_marked_counter]
|
||||
mov eax,[fb_right.marked_counter]
|
||||
mov [max_progress_value],eax
|
||||
mov ebp,[right_folder_block]
|
||||
mov ebp,[fb_right.folder_block]
|
||||
.start_1:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
add ebx,32+40
|
||||
test [ebx-40],byte 0x10
|
||||
jnz @f
|
||||
@@ -453,7 +480,7 @@ copy_marked_files:
|
||||
jnz .start_1
|
||||
cmp [move_file_flag],0
|
||||
je reload_dir_all
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
mov [move_file_flag],0
|
||||
mov [copy_many_files],byte 0
|
||||
jmp reload_dir_all
|
||||
|
||||
@@ -4,28 +4,31 @@ create_directory:
|
||||
mov edi, edit1
|
||||
mov ed_size, dword 0
|
||||
mov ed_pos, dword 0
|
||||
default_box
|
||||
and word ed_flags,ed_shift_cl
|
||||
mov [create_dir_name],byte 0
|
||||
mcall 66, 1, 0
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 0
|
||||
jmp .red
|
||||
.red_1:
|
||||
call draw_window
|
||||
.red:
|
||||
call draw_create_dir
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red_1
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je .key_create
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je .button_create
|
||||
mouse_edit_box create_editboxes
|
||||
jmp .still
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_mouse], create_editboxes
|
||||
else
|
||||
stdcall edit_box_mouse, create_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
.button_create:
|
||||
mov eax,17
|
||||
mcall
|
||||
mcall SF_GET_BUTTON
|
||||
test ah,ah
|
||||
jz .still
|
||||
cmp ah,160
|
||||
@@ -34,27 +37,30 @@ default_box
|
||||
je .exit_without_create
|
||||
cmp ah,1
|
||||
jne .still
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
.exit_with_create:
|
||||
call create_directory_1
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
call proc_read_left_folder
|
||||
jmp .exit_without_create
|
||||
@@:
|
||||
call proc_read_right_folder
|
||||
.exit_without_create:
|
||||
mcall 66, 1, 1
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
|
||||
jmp red
|
||||
;-------------------------------------------------------------
|
||||
.key_create:
|
||||
mov eax,2
|
||||
mcall
|
||||
mcall SF_GET_KEY
|
||||
cmp ah,13
|
||||
je .exit_with_create
|
||||
cmp ah,27
|
||||
je .exit_without_create
|
||||
key_edit_box create_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_key], create_editboxes
|
||||
else
|
||||
stdcall edit_box_key, create_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
draw_create_dir:
|
||||
@@ -68,7 +74,7 @@ draw_create_dir:
|
||||
shl ebx,16
|
||||
mov cx,60
|
||||
mov bx,174
|
||||
mcall 13, , ,0x6060ff ;0xff
|
||||
mcall SF_DRAW_RECT, , ,0x6060ff ;0xff
|
||||
pusha
|
||||
shr ebx,16
|
||||
add ebx,10
|
||||
@@ -77,7 +83,11 @@ draw_create_dir:
|
||||
mov eax,create_editboxes
|
||||
mov dword [eax+4],ebx
|
||||
mov dword [eax+8],ecx
|
||||
draw_edit_box create_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_draw], create_editboxes
|
||||
else
|
||||
stdcall edit_box_draw, create_editboxes
|
||||
end if
|
||||
popa
|
||||
pusha
|
||||
add ebx,70 shl 16
|
||||
@@ -86,8 +96,7 @@ draw_create_dir:
|
||||
mov bx,40
|
||||
mov esi,0xffffff
|
||||
mov edx,0x40000000+160
|
||||
mov eax,8
|
||||
mcall
|
||||
mcall SF_DEFINE_BUTTON
|
||||
add ebx,50 shl 16
|
||||
inc edx
|
||||
mcall
|
||||
@@ -98,7 +107,7 @@ draw_create_dir:
|
||||
add ecx,37 shl 16
|
||||
mov bx,40
|
||||
mov cx,15
|
||||
mov edx,0
|
||||
xor edx,edx
|
||||
push ebx ecx
|
||||
sub ecx,1 shl 16
|
||||
sub ebx,1 shl 16
|
||||
@@ -118,7 +127,7 @@ draw_create_dir:
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
add ebx,30 shl 16+1
|
||||
mcall 4, ,0x90ffffff,create_dir ;[confirmation_type]
|
||||
mcall SF_DRAW_TEXT, ,0x90ffffff,sz_Create_dir ;[confirmation_type]
|
||||
add ebx,48 shl 16+36
|
||||
mov edx,type_yes
|
||||
mcall
|
||||
@@ -129,8 +138,8 @@ draw_create_dir:
|
||||
;-------------------------------------------------------------
|
||||
create_directory_1:
|
||||
mov edx,create_dir_name
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
mov esi,read_folder_name
|
||||
jmp .start
|
||||
@@:
|
||||
@@ -153,15 +162,11 @@ create_directory_1:
|
||||
stosb
|
||||
test eax,eax
|
||||
jnz @b
|
||||
call create_directory_f70
|
||||
mcall SF_FILE, create_dir_file_data
|
||||
cmp eax,0
|
||||
je @f
|
||||
; mov ebx,0
|
||||
; sub ebx,eax
|
||||
; mov eax,ebx
|
||||
call start_error_window_thread
|
||||
@@:
|
||||
; call create_directory_f70
|
||||
ret
|
||||
;-------------------------------------------------------------
|
||||
clear_file_buffer:
|
||||
|
||||
@@ -4,28 +4,31 @@ create_new_file:
|
||||
mov edi, edit1
|
||||
mov ed_size, dword 0
|
||||
mov ed_pos, dword 0
|
||||
default_box
|
||||
and word ed_flags,ed_shift_cl
|
||||
mov [create_dir_name],byte 0
|
||||
mcall 66, 1, 0
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 0
|
||||
jmp .red
|
||||
.red_1:
|
||||
call draw_window
|
||||
.red:
|
||||
call draw_create_file
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red_1
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je .key_create
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je .button_create
|
||||
mouse_edit_box create_editboxes
|
||||
jmp .still
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_mouse], create_editboxes
|
||||
else
|
||||
stdcall edit_box_mouse, create_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
.button_create:
|
||||
mov eax,17
|
||||
mcall
|
||||
mcall SF_GET_BUTTON
|
||||
test ah,ah
|
||||
jz .still
|
||||
cmp ah,160
|
||||
@@ -34,27 +37,30 @@ default_box
|
||||
je .exit_without_create
|
||||
cmp ah,1
|
||||
jne .still
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
.exit_with_create:
|
||||
call create_new_file_1
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
call proc_read_left_folder
|
||||
jmp .exit_without_create
|
||||
@@:
|
||||
call proc_read_right_folder
|
||||
.exit_without_create:
|
||||
mcall 66, 1, 1
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
|
||||
jmp red
|
||||
;-------------------------------------------------------------
|
||||
.key_create:
|
||||
mov eax,2
|
||||
mcall
|
||||
mcall SF_GET_KEY
|
||||
cmp ah,13
|
||||
je .exit_with_create
|
||||
cmp ah,27
|
||||
je .exit_without_create
|
||||
key_edit_box create_editboxes
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_key], create_editboxes
|
||||
else
|
||||
stdcall edit_box_key, create_editboxes
|
||||
end if
|
||||
jmp .still
|
||||
;-------------------------------------------------------------
|
||||
draw_create_file:
|
||||
@@ -68,7 +74,7 @@ draw_create_file:
|
||||
shl ebx,16
|
||||
mov cx,60
|
||||
mov bx,174
|
||||
mcall 13, , ,0x6060ff ;0xff
|
||||
mcall SF_DRAW_RECT, , ,0x6060ff ;0xff
|
||||
pusha
|
||||
shr ebx,16
|
||||
add ebx,10
|
||||
@@ -77,17 +83,20 @@ draw_create_file:
|
||||
mov eax,create_editboxes
|
||||
mov dword [eax+4],ebx
|
||||
mov dword [eax+8],ecx
|
||||
draw_edit_box create_editboxes
|
||||
popa
|
||||
pusha
|
||||
add ebx,70 shl 16
|
||||
add ecx,37 shl 16
|
||||
if USE_STATIC_LIBS eq 0
|
||||
stdcall [edit_box_draw], create_editboxes
|
||||
else
|
||||
stdcall edit_box_draw, create_editboxes
|
||||
end if
|
||||
popa
|
||||
pusha
|
||||
add ebx,70 shl 16
|
||||
add ecx,37 shl 16
|
||||
mov cx,15
|
||||
mov bx,40
|
||||
mov esi,0xffffff
|
||||
mov edx,0x40000000+160
|
||||
mov eax,8
|
||||
mcall
|
||||
mcall SF_DEFINE_BUTTON
|
||||
add ebx,50 shl 16
|
||||
inc edx
|
||||
mcall
|
||||
@@ -98,7 +107,7 @@ draw_create_file:
|
||||
add ecx,37 shl 16
|
||||
mov bx,40
|
||||
mov cx,15
|
||||
mov edx,0
|
||||
xor edx,edx
|
||||
push ebx ecx
|
||||
sub ecx,1 shl 16
|
||||
sub ebx,1 shl 16
|
||||
@@ -118,7 +127,7 @@ draw_create_file:
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
add ebx,30 shl 16+1
|
||||
mcall 4, ,0x90ffffff,create_file ;[confirmation_type]
|
||||
mcall SF_DRAW_TEXT, ,0x90ffffff,sz_Create_file ;[confirmation_type]
|
||||
add ebx,48 shl 16+36
|
||||
mov edx,type_yes
|
||||
mcall
|
||||
@@ -129,8 +138,8 @@ draw_create_file:
|
||||
;-------------------------------------------------------------
|
||||
create_new_file_1:
|
||||
mov edx,create_dir_name
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
mov esi,read_folder_name
|
||||
jmp .start
|
||||
@@:
|
||||
@@ -156,12 +165,8 @@ create_new_file_1:
|
||||
call write_file
|
||||
cmp eax,0
|
||||
je @f
|
||||
; mov ebx,0
|
||||
; sub ebx,eax
|
||||
; mov eax,ebx
|
||||
call start_error_window_thread
|
||||
@@:
|
||||
; call create_directory_f70
|
||||
ret
|
||||
;-------------------------------------------------------------
|
||||
;clear_file_buffer:
|
||||
|
||||
+24
-69
@@ -1,4 +1,11 @@
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
if USE_STATIC_LIBS eq 0
|
||||
icons_max_size dd 0
|
||||
buttons_file_data:
|
||||
rb ICON_SIZE*numimages
|
||||
end if
|
||||
|
||||
align 4
|
||||
files_counter rd 1
|
||||
directories_counter rd 1
|
||||
@@ -35,53 +42,21 @@ date:
|
||||
open_param rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
PID rd 1
|
||||
active_process rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
window_high rd 1
|
||||
window_width rd 1
|
||||
window_status rd 1
|
||||
skin_high rd 1
|
||||
fbutton_width rd 1
|
||||
|
||||
left_panel_x:
|
||||
.size_x rw 1
|
||||
.start_x rw 1
|
||||
|
||||
left_panel_y:
|
||||
.size_y rw 1
|
||||
.start_y rw 1
|
||||
|
||||
right_panel_x:
|
||||
.size_x rw 1
|
||||
.start_x rw 1
|
||||
|
||||
right_panel_y:
|
||||
.size_y rw 1
|
||||
.start_y rw 1
|
||||
|
||||
left_panel_y_correct_size_y rw 1
|
||||
right_panel_y_correct_size_y rw 1
|
||||
|
||||
drawing_panel_folder rb 1 ; 1-left, 2 right
|
||||
window_status rb 1
|
||||
m_lost rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
mouse_position:
|
||||
.y rw 1
|
||||
.x rw 1
|
||||
mouse_keys rd 1
|
||||
mouse_keys_tick rd 1
|
||||
mouse_scroll_data:
|
||||
.vertical rw 1
|
||||
.horizontal rw 1
|
||||
left_scroll_compens rd 1
|
||||
right_scroll_compens rd 1
|
||||
mouse_keys_delta rb 1
|
||||
mouse_keys_delta_1 rb 1
|
||||
scroll_bar_event rb 1
|
||||
scroll_pointer rb 1
|
||||
scroll_pointer_1 rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
max_progress_value rd 1
|
||||
@@ -95,39 +70,15 @@ copy_many_files:
|
||||
rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
max_panel_line rd 1
|
||||
temp_panel_end rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
left_start_draw_line rd 1
|
||||
left_folder_block rd 1
|
||||
left_start_draw_cursor_line rw 1
|
||||
left_folder_block_1 rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
right_start_draw_line rd 1
|
||||
right_folder_block rd 1
|
||||
right_start_draw_cursor_line rw 1
|
||||
right_folder_block_1 rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sort_counter rd 1
|
||||
sorting_low_limit rd 1
|
||||
sorting_high_limit rd 1
|
||||
dir_temp_counter rd 1
|
||||
dir_temp_counter_1 rd 1
|
||||
draw_scroll_character rb 1
|
||||
nesting_direction rb 1
|
||||
dir_or_file rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
left_marked_counter rd 1
|
||||
right_marked_counter rd 1
|
||||
confirmation_type rd 1
|
||||
recursive_pointer rd 1
|
||||
marked_file rb 1
|
||||
marked_action rb 1
|
||||
mark_action_counter rb 1
|
||||
work_confirmation rb 1
|
||||
work_confirmation_yes rb 1
|
||||
delete_marked_yes rb 1
|
||||
@@ -137,8 +88,6 @@ move_file_flag rb 1
|
||||
align 4
|
||||
start_draw_menu_cursor_line rd 1
|
||||
search_pre_folder rb 1
|
||||
not_clear_lines rb 1
|
||||
select_panel_counter rb 1
|
||||
extended_key rb 1
|
||||
press_enter_menu rb 1
|
||||
close_menu rb 1
|
||||
@@ -150,19 +99,17 @@ file_name_length rd 1
|
||||
temp_counter_dword rd 1
|
||||
error_pointer rd 1
|
||||
file_system_error rd 1
|
||||
end_tag rd 1
|
||||
icons_end_tag rd 1
|
||||
exit_to_dir rb 1
|
||||
exit_dir rb 1
|
||||
use_patch rb 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
appl_memory rd 1
|
||||
appl_memory_old rd 1
|
||||
buttons_img_start rd 1
|
||||
ini_file_start rd 1
|
||||
left_folder_data rd 1
|
||||
right_folder_data rd 1
|
||||
ini_size rd 1
|
||||
lfd_size rd 1
|
||||
rfd_size rd 1
|
||||
tmp_memory rd 1
|
||||
tm_size rd 1
|
||||
;---------------------------------------------------------------------
|
||||
shift_flag rb 1
|
||||
ctrl_flag rb 1
|
||||
@@ -198,9 +145,13 @@ align 4
|
||||
retrieved_devices_table:
|
||||
rb 10*100
|
||||
;---------------------------------------------------------------------
|
||||
converted_ini_buffer:
|
||||
rb 8192
|
||||
ini_src_end:
|
||||
rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
procinfo:
|
||||
rb 1024
|
||||
procinfo process_information
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
type_name:
|
||||
@@ -221,6 +172,8 @@ delete_dir_data:
|
||||
align 4
|
||||
extension_temp_storage:
|
||||
rb 256
|
||||
name_temp_area rb 256
|
||||
keymap_area rb 128
|
||||
;---------------------------------------------------------------------
|
||||
;stack
|
||||
align 4
|
||||
@@ -267,3 +220,5 @@ align 4
|
||||
read_folder_3_name:
|
||||
rb 64
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sc system_colors
|
||||
+71
-77
@@ -1,8 +1,9 @@
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
delete_file:
|
||||
; call progress_bar
|
||||
; jmp still
|
||||
mov [confirmation_type],delete_type
|
||||
mov [confirmation_type],sz_Delete_files
|
||||
call confirmation_action
|
||||
cmp [work_confirmation_yes],1
|
||||
jne red ;reload_dir
|
||||
@@ -16,30 +17,30 @@ delete_file:
|
||||
|
||||
call delete_marked_files
|
||||
cmp [delete_marked_yes],1
|
||||
je .end_1 ;reload_dir_all
|
||||
je .end_1 ;reload_dir_all
|
||||
|
||||
xor eax,eax
|
||||
xor edx,edx
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
mov ax,[fb_left.start_draw_cursor_line]
|
||||
movzx ebx,[fb_left.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[left_start_draw_line]
|
||||
mov ebx,[fb_left.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
call prepare_data_7
|
||||
mov esi,read_folder_name ;read_folder.name
|
||||
jmp .end
|
||||
.right_1:
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
mov ax,[fb_right.start_draw_cursor_line]
|
||||
movzx ebx,[fb_right.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[right_start_draw_line]
|
||||
mov ebx,[fb_right.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
call prepare_data_7
|
||||
mov esi,read_folder_1_name ;read_folder_1.name
|
||||
.end:
|
||||
@@ -47,7 +48,7 @@ delete_file:
|
||||
mov edi,file_name ;delete_file_data.name
|
||||
call copy_path_1
|
||||
test [ebx-40],byte 0x10
|
||||
jz @f
|
||||
jz @f
|
||||
push eax ebx
|
||||
xor eax,eax
|
||||
mov [current_progress_value],eax
|
||||
@@ -63,14 +64,15 @@ delete_file:
|
||||
call start_error_window_thread
|
||||
jmp reload_dir_all
|
||||
.end_1:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right
|
||||
call proc_read_left_folder
|
||||
jmp red
|
||||
.right:
|
||||
call proc_read_right_folder
|
||||
jmp red
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
delete_marked_files:
|
||||
mov eax,[directories_counter]
|
||||
add eax,[files_counter]
|
||||
@@ -81,16 +83,14 @@ delete_marked_files:
|
||||
mov [delete_marked_yes],al
|
||||
mov [draw_all_progressbar],1
|
||||
|
||||
cmp [select_panel_counter],al
|
||||
jne .right_1
|
||||
; mov eax,[left_marked_counter]
|
||||
; mov [max_progress_value],eax
|
||||
mov ebp,[left_folder_block]
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
mov ebp,[fb_left.folder_block]
|
||||
.start:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx+299-40],byte 0
|
||||
je @f
|
||||
@@ -108,18 +108,16 @@ delete_marked_files:
|
||||
jnz .start
|
||||
cmp [delete_marked_yes],0
|
||||
je @f
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
@@:
|
||||
ret
|
||||
.right_1:
|
||||
; mov eax,[right_marked_counter]
|
||||
; mov [max_progress_value],eax
|
||||
mov ebp,[right_folder_block]
|
||||
mov ebp,[fb_right.folder_block]
|
||||
.start_1:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx+299-40],byte 0
|
||||
je @f
|
||||
@@ -137,10 +135,11 @@ delete_marked_files:
|
||||
jnz .start_1
|
||||
cmp [delete_marked_yes],0
|
||||
je @f
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
prepare_data_6:
|
||||
mov [error_pointer],ebx
|
||||
mov edi,file_name ;delete_file_data.name
|
||||
@@ -162,6 +161,7 @@ prepare_data_6:
|
||||
.continue:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
prepare_data_7:
|
||||
add ebx,32+40
|
||||
cmp [ebx],word '..'
|
||||
@@ -173,88 +173,82 @@ prepare_data_7:
|
||||
.continue:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
delete_dir:
|
||||
pusha
|
||||
mov [recursive_pointer],0
|
||||
mov eax,[appl_memory]
|
||||
mov [appl_memory_old],eax
|
||||
.1:
|
||||
mov [read_delete_dir_data.size],0
|
||||
mov [read_delete_dir_data.return],delete_dir_data
|
||||
call read_delete_dir
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov [read_delete_dir_data.size],0
|
||||
mov [read_delete_dir_data.return],delete_dir_data
|
||||
mcall SF_FILE, read_delete_dir_data
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov [error_pointer],file_name
|
||||
call start_error_window_thread
|
||||
call start_error_window_thread
|
||||
popa
|
||||
add esp,8+4
|
||||
jmp still
|
||||
add esp,8+4
|
||||
jmp still
|
||||
@@:
|
||||
mov eax,[delete_dir_data+8]
|
||||
test eax,eax
|
||||
jnz @f
|
||||
inc [current_progress_value]
|
||||
call progress_bar_delete
|
||||
call del_file
|
||||
test eax,eax
|
||||
jz .end
|
||||
mov eax,[delete_dir_data+8]
|
||||
test eax,eax
|
||||
jnz @f
|
||||
inc [current_progress_value]
|
||||
call progress_bar_delete
|
||||
call del_file
|
||||
test eax,eax
|
||||
jz .end
|
||||
mov [error_pointer],file_name
|
||||
call start_error_window_thread
|
||||
call start_error_window_thread
|
||||
popa
|
||||
add esp,8+4
|
||||
jmp still
|
||||
add esp,8+4
|
||||
jmp still
|
||||
@@:
|
||||
imul eax,304
|
||||
add eax,32
|
||||
mov ebx,eax
|
||||
add ebx,[appl_memory_old]
|
||||
cmp ebx,[appl_memory]
|
||||
jbe @f
|
||||
mov ecx,[appl_memory]
|
||||
mov ecx,ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
@@:
|
||||
mov eax,[delete_dir_data+8]
|
||||
mov [read_delete_dir_data.size],eax
|
||||
mov eax,[appl_memory_old]
|
||||
mov [read_delete_dir_data.return],eax
|
||||
call read_delete_dir
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov ecx,eax
|
||||
add ecx,[tm_size]
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [tmp_memory]
|
||||
mov [tmp_memory],eax
|
||||
mov [tm_size],ecx
|
||||
|
||||
mov [read_delete_dir_data.return],eax
|
||||
mov eax,[delete_dir_data+8]
|
||||
mov [read_delete_dir_data.size],eax
|
||||
mcall SF_FILE, read_delete_dir_data
|
||||
test eax,eax
|
||||
jz @f
|
||||
mov [error_pointer],file_name
|
||||
call start_error_window_thread
|
||||
call start_error_window_thread
|
||||
popa
|
||||
add esp,8+4
|
||||
jmp still
|
||||
add esp,8+4
|
||||
jmp still
|
||||
@@:
|
||||
call delete_dir_1
|
||||
jc .1
|
||||
call delete_dir_1
|
||||
jc .1
|
||||
.end:
|
||||
call return_delete_path
|
||||
dec [recursive_pointer]
|
||||
cmp [recursive_pointer],0
|
||||
jge .1
|
||||
@@:
|
||||
mov ecx,[appl_memory_old]
|
||||
cmp [appl_memory],ecx
|
||||
je @f
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
@@:
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
delete_dir_1:
|
||||
mov ebp,[appl_memory_old]
|
||||
mov ebp,[tmp_memory]
|
||||
mov ebp,[ebp+8]
|
||||
align 4
|
||||
.start:
|
||||
test ebp,ebp
|
||||
jz .continue_4
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[appl_memory_old]
|
||||
add ebx,[tmp_memory]
|
||||
add ebx,32+40
|
||||
cmp [ebx],byte '.'
|
||||
jne @f
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
device_detect_f70:
|
||||
mov ax,[select_disk_char]
|
||||
mov [read_folder_2_name],ax
|
||||
mov [read_folder_3_name],ax
|
||||
; mov eax,left_folder_data_1
|
||||
; mov [read_folder_2.return],eax
|
||||
mcall 70, read_folder_2
|
||||
mcall SF_FILE, read_folder_2
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
@@ -21,7 +22,7 @@ device_detect_f70:
|
||||
call copy_folder_name_3
|
||||
; mov eax,right_folder_data_1
|
||||
; mov [read_folder_3.return],eax
|
||||
mcall 70, read_folder_3
|
||||
mcall SF_FILE, read_folder_3
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
@@ -56,7 +57,8 @@ device_detect_f70:
|
||||
cmp eax,[left_folder_block_1]
|
||||
jb .start_temp_counter_1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
select_starting_directories:
|
||||
mov esi,retrieved_devices_table+1
|
||||
call copy_folder_name
|
||||
@@ -84,6 +86,7 @@ select_starting_directories:
|
||||
; mov [read_folder_1_name+6],byte 0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
proc_copy_patch:
|
||||
@@:
|
||||
cld
|
||||
|
||||
+233
-759
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1,11 @@
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
draw_device_button:
|
||||
call device_detect_f70
|
||||
mov edi,[retrieved_devices_table_counter]
|
||||
mov edx,120
|
||||
mov bx,[left_panel_x.start_x]
|
||||
mov cx,[left_panel_y.start_y]
|
||||
mov bx,[fb_left.start_x]
|
||||
mov cx,[fb_left.start_y]
|
||||
shl ebx,16
|
||||
sub cx,30
|
||||
shl ecx,16
|
||||
@@ -22,12 +23,11 @@ draw_device_button:
|
||||
jnz @b
|
||||
|
||||
sub esi,ebp
|
||||
lea esi,[esi*3]
|
||||
shl esi,1
|
||||
shl esi,3
|
||||
mov bx,si
|
||||
pop esi
|
||||
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
|
||||
pusha
|
||||
mov eax,ebx
|
||||
@@ -36,7 +36,7 @@ draw_device_button:
|
||||
add ebx,eax
|
||||
mov bx,2
|
||||
inc ecx
|
||||
mcall 13,,,0xcccccc
|
||||
mcall SF_DRAW_RECT, ,,[sc.work]
|
||||
popa
|
||||
|
||||
pusha
|
||||
@@ -44,8 +44,8 @@ draw_device_button:
|
||||
inc edx
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
add ebx,4 shl 16
|
||||
mcall 4,,0x90000000
|
||||
add ebx,8 shl 16
|
||||
mcall SF_DRAW_TEXT, ,0x90000000
|
||||
sub ebx,1 shl 16 + 1
|
||||
mcall ,,0x90ffffff
|
||||
popa
|
||||
@@ -60,17 +60,16 @@ draw_device_button:
|
||||
dec edi
|
||||
jnz .loop
|
||||
|
||||
xor eax,eax
|
||||
mov ax,[right_panel_x.start_x]
|
||||
add ax,[right_panel_x.size_x]
|
||||
movzx eax,[fb_right.start_x]
|
||||
add ax,[fb_right.size_x]
|
||||
add ax,[sb_right.x_size]
|
||||
ror ebx,16
|
||||
sub ax,bx
|
||||
rol ebx,16
|
||||
inc ax
|
||||
mov bx,ax
|
||||
|
||||
add ecx,1
|
||||
add ebx,1
|
||||
mcall 13,,,0xcccccc
|
||||
mcall SF_DRAW_RECT, ,,[sc.work]
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -1,278 +0,0 @@
|
||||
; SEE YOU File FAQ.txt and HISTORY. Good Like!
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
include 'editbox.mac' ;макрос который должен облегчить жизнь :) специально для editbox
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
macro use_edit_box procinfo,scr_h,scr_w
|
||||
{
|
||||
edit_box:
|
||||
ed_width equ [edi] ;ширина компонента
|
||||
ed_left equ [edi+4] ;положение по оси х
|
||||
ed_top equ [edi+8] ;положение по оси у
|
||||
ed_color equ [edi+12] ;цвет фона компонента
|
||||
shift_color equ [edi+16] ;=0x6a9480
|
||||
ed_focus_border_color equ [edi+20] ;цвет рамки компонента
|
||||
ed_blur_border_color equ [edi+24] ;цвет не активного компонента
|
||||
ed_text_color equ [edi+28] ;цвет текста
|
||||
ed_max equ [edi+32] ;кол-во символов которые можно максимально ввести
|
||||
ed_text equ [edi+36] ;указатель на буфер
|
||||
ed_flags equ [edi+40] ;флаги
|
||||
ed_size equ [edi+42] ;кол-во символов
|
||||
ed_pos equ [edi+46] ;позиция курсора
|
||||
ed_offset equ [edi+50] ;смещение
|
||||
cl_curs_x equ [edi+54] ;предыдущее координата курсора по х
|
||||
cl_curs_y equ [edi+58] ;предыдущее координата курсора по у
|
||||
ed_shift_pos equ [edi+62] ;положение курсора
|
||||
ed_shift_pos_old equ [edi+66] ;старое положение курсора
|
||||
;==========================================================
|
||||
;=== процедура прорисовки =================================
|
||||
;==========================================================
|
||||
.draw:
|
||||
pusha
|
||||
;--- рисуем рамку ---
|
||||
call .draw_border ; Функция стабильна
|
||||
.draw_bg_cursor_text:
|
||||
;--- изменяем смещение, если надо ---
|
||||
call .check_offset ;вычисление позиции курсора стабильна
|
||||
;--- рисуем внутреннюю область ---
|
||||
call .draw_bg ;нарисовать прямоугольник рабочей области
|
||||
;---- рисуем выделение, по shift если есть
|
||||
call .draw_shift
|
||||
.draw_cursor_text:
|
||||
;--- рисуем курсор ---
|
||||
;--- может его не надо рисовать ----
|
||||
test word ed_flags,ed_focus
|
||||
je @f
|
||||
call .draw_cursor
|
||||
@@:
|
||||
call .draw_text
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Общий выход из editbox для всех функций и пост обработчиков
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.editbox_exit:
|
||||
edit_ex
|
||||
;==========================================================
|
||||
;=== обработка клавиатуры =================================
|
||||
;==========================================================
|
||||
.key:
|
||||
pusha
|
||||
test word ed_flags,ed_focus ; если не в фокусе, выходим
|
||||
je .editbox_exit
|
||||
test word ed_flags,ed_mouse_on
|
||||
jne .editbox_exit
|
||||
|
||||
;Проверка нажат shift ?
|
||||
call .check_shift
|
||||
;----------------------------------------------------------
|
||||
;--- проверяем, что нажато --------------------------------
|
||||
;----------------------------------------------------------
|
||||
use_key_process backspase,delete,left,right,home,end,insert
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Заглушка на обработку клавиш вверх и вниз т.е. при обнаружении этих кодов происходит выход из обработчика
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_no_process up,down,esc
|
||||
;--- нажата другая клавиша ---
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Проверка установлен ли флаг при котором нужно выводить только цифры в нужном боксе если такойнеобходимости нет нужно закоментировать макрос
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_figures_only
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;проверка на shift был ли нажат
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
are_key_shift_press
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; проверяем, находится ли курсор в конце + дальнейшая обработка
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
are_key_cur_end
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Обработка клавиш insert,delete.backspase,home,end,left,right
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_work_key
|
||||
;==========================================================
|
||||
;=== обработка мыши =======================================
|
||||
;==========================================================
|
||||
.mouse:
|
||||
pusha
|
||||
;debug
|
||||
;----------------------------------------------------------
|
||||
;--- получаем состояние кнопок мыши -----------------------
|
||||
;----------------------------------------------------------
|
||||
mcall 37,2
|
||||
;----------------------------------------------------------
|
||||
;--- проверяем состояние ----------------------------------
|
||||
;----------------------------------------------------------
|
||||
test eax,1
|
||||
jnz .mouse_left_button
|
||||
and word ed_flags,ed_mouse_on_off
|
||||
xor ebx,ebx
|
||||
mov dword [mouse_flag],ebx
|
||||
jmp .editbox_exit
|
||||
.mouse_left_button:
|
||||
;----------------------------------------------------------
|
||||
;--- блокировка от фокусировки в других боксах при попадании на них курсора
|
||||
;----------------------------------------------------------
|
||||
mov eax,dword [mouse_flag]
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,edi
|
||||
je @f
|
||||
jmp ._blur
|
||||
;----------------------------------------------------------
|
||||
;--- получаем координаты мыши относительно 0 т.е всей области экрана
|
||||
;----------------------------------------------------------
|
||||
@@: mcall 37,0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Функция обработки мышки получение координат и проверка их + выделения
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_work_mause scr_h,scr_w
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Общие функции обработки
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_general_func
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Функции для работы с key
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_key_func
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Функции для работы с mouse
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
use_mouse_func scr_w
|
||||
}
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Bit mask from editbox
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ed_figure_only= 1000000000000000b ;одни символы
|
||||
ed_always_focus= 100000000000000b
|
||||
ed_focus= 10b ;фокус приложения
|
||||
ed_shift_on= 1000b ;если не установлен -значит впервые нажат shift,если был установлен, значит мы уже что - то делали удерживая shift
|
||||
ed_shift_on_off=1111111111110111b
|
||||
ed_shift= 100b ;включается при нажатии на shift т.е. если нажимаю
|
||||
ed_shift_off= 1111111111111011b
|
||||
ed_shift_bac= 10000b ;бит для очистки выделеного shift т.е. при установке говорит что есть выделение
|
||||
ed_shift_bac_cl=1111111111101111b ;очистка при удалении выделения
|
||||
ed_shift_cl= 1111111111100011b
|
||||
ed_shift_mcl= 1111111111111011b
|
||||
ed_left_fl= 100000b
|
||||
ed_right_fl= 1111111111011111b
|
||||
ed_offset_fl= 1000000b
|
||||
ed_offset_cl= 1111111110111111b
|
||||
ed_insert= 10000000b
|
||||
ed_insert_cl= 1111111101111111b
|
||||
ed_mouse_on = 100000000b
|
||||
ed_mous_adn_b= 100011000b
|
||||
ed_mouse_on_off=1111111011111111b
|
||||
ed_height=14 ; высота
|
||||
macro draw_edit_boxes start,_end,use_f9,procinfo
|
||||
{
|
||||
if use_f9 eq
|
||||
else
|
||||
mcall 9,procinfo,-1
|
||||
end if
|
||||
mov edi,start
|
||||
mov ecx,((_end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.draw
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro mouse_edit_boxes start,_end
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((_end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.mouse
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro key_edit_boxes start,end
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ed_struc_size)
|
||||
@@:
|
||||
call edit_box.key
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
ed_struc_size=70
|
||||
struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,flags,size,pos
|
||||
{
|
||||
.width dd width
|
||||
.left dd left
|
||||
.top dd top
|
||||
.color dd color
|
||||
.shift_color dd shift_color
|
||||
.focus_border_color dd focus_border_color
|
||||
.blur_border_color dd blur_border_color
|
||||
.text_color dd text_color
|
||||
.max dd max
|
||||
.text dd text
|
||||
.flags dw flags+0
|
||||
.size dd size+0
|
||||
.pos dd pos+0
|
||||
.offset dd 0
|
||||
.cl_curs_x dd 0
|
||||
.cl_curs_y dd 0
|
||||
.shift dd 0
|
||||
.shift_old dd 0
|
||||
}
|
||||
|
||||
|
||||
macro edit_boxes_set_sys_color start,end,color_table
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ed_struc_size)
|
||||
mov esi,color_table
|
||||
@@:
|
||||
mov eax,[esi+36]
|
||||
mov ebx,[esi+20]
|
||||
mov ed_focus_border_color,eax
|
||||
shr bh,1
|
||||
shr bl,1
|
||||
shr ah,1
|
||||
shr al,1
|
||||
add ah,bh
|
||||
add al,bl
|
||||
ror eax,16
|
||||
ror ebx,16
|
||||
shr bl,1
|
||||
shr al,1
|
||||
add al,bl
|
||||
ror eax,16
|
||||
mov ed_blur_border_color,eax
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro draw_edit_box ed_ptr,use_f9,procinfo
|
||||
{
|
||||
if use_f9 eq
|
||||
else
|
||||
mcall 9,procinfo,-1
|
||||
end if
|
||||
mov edi,ed_ptr
|
||||
call edit_box.draw
|
||||
}
|
||||
|
||||
macro mouse_edit_box ed_ptr
|
||||
{
|
||||
mov edi,ed_ptr
|
||||
call edit_box.mouse
|
||||
}
|
||||
|
||||
macro key_edit_box ed_ptr
|
||||
{
|
||||
mov edi,ed_ptr
|
||||
call edit_box.key
|
||||
}
|
||||
macro default_box ed_ptr
|
||||
{
|
||||
pusha
|
||||
; xor eax,eax
|
||||
; mov ed_shift_pos,eax
|
||||
; mov ed_shift_pos_old,eax
|
||||
and word ed_flags,ed_shift_cl
|
||||
; mov ed_offset,eax
|
||||
popa
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -4,36 +4,33 @@ read_folder_error:
|
||||
read_folder_1_error:
|
||||
mov [error_pointer],read_folder_1_name ;read_folder_1.name
|
||||
jmp error_window
|
||||
initiation_error:
|
||||
mov [error_pointer],ini_file_name
|
||||
jmp error_window
|
||||
error_window:
|
||||
mov [file_system_error],eax
|
||||
.red:
|
||||
call draw_error_window
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je .button
|
||||
jmp .still
|
||||
.button:
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
jmp .still
|
||||
;---------------------------------------------------------------------
|
||||
draw_error_window:
|
||||
mcall 12, 1
|
||||
mcall 0,[error_window_x] ,[error_window_y], 0x03D22F36
|
||||
mcall 4,<10,30>,0x90ffffff,[error_pointer]
|
||||
mcall 4,<10,50>, ,error_type
|
||||
mcall 47,0xa0000,[file_system_error],<148,50>,0x10ffffff
|
||||
mcall 12, 2
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
mcall SF_CREATE_WINDOW, [error_window_x] ,[error_window_y], 0x03D22F36
|
||||
mcall SF_DRAW_TEXT, <10,30>,0x90ffffff,[error_pointer]
|
||||
mcall SF_DRAW_TEXT, <10,50>, ,error_type
|
||||
mcall SF_DRAW_NUMBER, 0x800a0000,[file_system_error],<154,50>,0x10ffffff
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
start_error_window_thread:
|
||||
mov [file_system_error],eax
|
||||
mcall 9, procinfo, -1
|
||||
mcall SF_THREAD_INFO, procinfo, -1
|
||||
mov eax,[ebx+46]
|
||||
shr eax,1
|
||||
add eax,[ebx+38]
|
||||
@@ -44,7 +41,7 @@ start_error_window_thread:
|
||||
add eax,[ebx+34]
|
||||
sub eax,ERR_WINW/2
|
||||
mov [error_window_x+2],ax
|
||||
mcall 51,1,thread_start,thread_stack
|
||||
mcall SF_THREAD_CONTROL, SSF_CREATE_THREAD,thread_start,thread_stack
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
thread_start:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
align 4
|
||||
files_information:
|
||||
xor eax,eax
|
||||
mov [alt_flag],al
|
||||
@@ -10,23 +11,23 @@ files_information:
|
||||
jmp still
|
||||
;------------------------------------------------------------------------------
|
||||
start_files_information_thread:
|
||||
mcall 9,procinfo,-1
|
||||
mov eax,[ebx+46]
|
||||
mcall SF_THREAD_INFO, procinfo,-1
|
||||
mov eax,[procinfo.box.height]
|
||||
shr eax,1
|
||||
add eax,[ebx+38]
|
||||
add eax,[procinfo.box.top]
|
||||
sub eax,INF_WINH/2
|
||||
mov [files_information_window_y+2],ax
|
||||
mov eax,[ebx+42]
|
||||
mov eax,[procinfo.box.width]
|
||||
shr eax,1
|
||||
add eax,[ebx+34]
|
||||
add eax,[procinfo.box.left]
|
||||
sub eax,INF_WINW/2
|
||||
mov [files_information_window_x+2],ax
|
||||
mcall 51,1,thread_files_information_start,thread_stack
|
||||
mcall SF_THREAD_CONTROL, SSF_CREATE_THREAD,thread_files_information_start,thread_stack
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
draw_files_information_window:
|
||||
mcall 12,1
|
||||
mcall 0,[files_information_window_x],[files_information_window_y],0x33ffffcc,,infowin_title
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
mcall SF_CREATE_WINDOW, [files_information_window_x],[files_information_window_y],0x33ffffcc,,infowin_title
|
||||
mov edx,INF_DATAX shl 16+INF_DATAY+INF_LINEH
|
||||
mov ebx,0x800a0000
|
||||
mov esi,0x10000000
|
||||
@@ -40,7 +41,7 @@ draw_files_information_window:
|
||||
;--------------------------------------
|
||||
.continue_4:
|
||||
; show files counter
|
||||
mcall 47,,[files_counter]
|
||||
mcall SF_DRAW_NUMBER, ,[files_counter]
|
||||
;--------------------------------------
|
||||
@@:
|
||||
cmp [inf_marked_yes],1
|
||||
@@ -60,7 +61,7 @@ draw_files_information_window:
|
||||
@@:
|
||||
; show file or directory size
|
||||
add edx,INF_LINEH
|
||||
mcall 47,0xc0140001,files_size
|
||||
mcall SF_DRAW_NUMBER, 0xc0140001,files_size
|
||||
;--------------------------------------
|
||||
mov ebp,date.create
|
||||
call show_date_and_time_of_files_information
|
||||
@@ -71,8 +72,8 @@ draw_files_information_window:
|
||||
mov ebp,date.access
|
||||
call show_date_and_time_of_files_information
|
||||
;--------------------------------------
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
|
||||
mov edx,read_folder_name
|
||||
jmp @f
|
||||
@@ -81,7 +82,7 @@ draw_files_information_window:
|
||||
mov edx,read_folder_1_name
|
||||
;--------------------------------------
|
||||
@@:
|
||||
mcall 4,<INF_DATAX,INF_DATAY>,0x90000000, ;file_name
|
||||
mcall SF_DRAW_TEXT, <INF_DATAX,INF_DATAY>,0x90000000, ;file_name
|
||||
mcall ,<10,INF_DATAY>,0x90000000,type_location
|
||||
cmp [inf_marked_yes],1
|
||||
je .continue
|
||||
@@ -139,7 +140,7 @@ draw_files_information_window:
|
||||
add ebx,INF_LINEH
|
||||
mcall
|
||||
|
||||
mcall 12,2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
show_date_and_time_of_files_information:
|
||||
@@ -173,28 +174,29 @@ thread_files_information_start:
|
||||
call draw_files_information_window
|
||||
;--------------------------------------
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je .red
|
||||
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je .key
|
||||
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je .button
|
||||
|
||||
jmp .still
|
||||
;--------------------------------------
|
||||
.key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
;--------------------------------------
|
||||
.button:
|
||||
mcall -1
|
||||
jmp .still
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
;jmp .still
|
||||
;------------------------------------------------------------------------------
|
||||
; фхыхэшх 64-сшЄэюую ўшёыр divident эр 16-сшЄэюх ўшёыю divisor.
|
||||
; ╫рёЄэюх яюьх∙рхЄё т 64-сшЄэє■ яхЁхьхээє■ quotent,
|
||||
; р юёЄрЄюъ - т 16-сшЄэє■ яхЁхьхээє■ modulo
|
||||
align 4
|
||||
Division_64bit:
|
||||
mov ax,[ebp+6]
|
||||
xor dx,dx
|
||||
@@ -222,6 +224,7 @@ quotent:
|
||||
;modulo:
|
||||
; rb 2
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
copy_type_name:
|
||||
push esi
|
||||
mov esi,ebx
|
||||
@@ -237,6 +240,7 @@ copy_type_name:
|
||||
pop esi
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
get_files_information:
|
||||
call get_information_marked_files
|
||||
cmp [inf_marked_yes],1
|
||||
@@ -244,28 +248,28 @@ get_files_information:
|
||||
|
||||
xor eax,eax
|
||||
xor edx,edx
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
mov ax,[fb_left.start_draw_cursor_line]
|
||||
movzx ebx,[fb_left.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[left_start_draw_line]
|
||||
mov ebx,[fb_left.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
call prepare_data_8
|
||||
mov esi,read_folder_name
|
||||
jmp .end
|
||||
;--------------------------------------
|
||||
.right_1:
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
mov ebx,10
|
||||
mov ax,[fb_right.start_draw_cursor_line]
|
||||
movzx ebx,[fb_right.line_size_y]
|
||||
div ebx
|
||||
mov ebx,[right_start_draw_line]
|
||||
mov ebx,[fb_right.start_draw_line]
|
||||
add ebx,eax
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
call prepare_data_8
|
||||
mov esi,read_folder_1_name
|
||||
;--------------------------------------
|
||||
@@ -327,19 +331,20 @@ get_files_information:
|
||||
.end_2:
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
get_information_marked_files:
|
||||
xor eax,eax
|
||||
mov [inf_marked_yes],al
|
||||
cmp [select_panel_counter],al
|
||||
jne .right_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
|
||||
mov ebp,[left_folder_block]
|
||||
mov ebp,[fb_left.folder_block]
|
||||
;--------------------------------------
|
||||
.start:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,[fb_left.folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx+299-40],byte 0
|
||||
je @f
|
||||
@@ -363,14 +368,15 @@ get_information_marked_files:
|
||||
|
||||
ret
|
||||
;--------------------------------------
|
||||
align 4
|
||||
.right_1:
|
||||
mov ebp,[right_folder_block]
|
||||
mov ebp,[fb_right.folder_block]
|
||||
;--------------------------------------
|
||||
.start_1:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,[fb_right.folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx+299-40],byte 0
|
||||
je @f
|
||||
@@ -394,6 +400,9 @@ get_information_marked_files:
|
||||
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
; in:
|
||||
; ebp = ..._folder_block
|
||||
align 4
|
||||
prepare_data_9:
|
||||
mov [error_pointer],ebx
|
||||
mov edi,file_name
|
||||
@@ -423,6 +432,7 @@ prepare_data_9:
|
||||
.continue_1:
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
prepare_data_8:
|
||||
add ebx,32+40
|
||||
cmp [ebx],word '..'
|
||||
@@ -432,8 +442,8 @@ prepare_data_8:
|
||||
jne .continue
|
||||
|
||||
add esp,4+4
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
|
||||
call proc_read_left_folder
|
||||
jmp red
|
||||
@@ -445,17 +455,18 @@ prepare_data_8:
|
||||
.continue:
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
; in:
|
||||
; ebp = ..._folder_block
|
||||
align 4
|
||||
get_inf_dir:
|
||||
mov [nesting_direction],0
|
||||
pusha
|
||||
mov [recursive_pointer],0
|
||||
mov eax,[appl_memory]
|
||||
mov [appl_memory_old],eax
|
||||
;--------------------------------------
|
||||
.1:
|
||||
mov [read_delete_dir_data.size],0
|
||||
mov [read_delete_dir_data.return],delete_dir_data
|
||||
call read_delete_dir
|
||||
mcall SF_FILE, read_delete_dir_data
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
@@ -469,22 +480,17 @@ get_inf_dir:
|
||||
mov eax,[delete_dir_data+8]
|
||||
imul eax,304
|
||||
add eax,32
|
||||
mov ebx,eax
|
||||
add ebx,[appl_memory_old]
|
||||
cmp ebx,[appl_memory]
|
||||
jbe @f
|
||||
|
||||
mov ecx,[appl_memory]
|
||||
mov ecx,ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
;--------------------------------------
|
||||
@@:
|
||||
mov ecx,eax
|
||||
add ecx,[tm_size]
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [tmp_memory]
|
||||
mov [tmp_memory],eax
|
||||
mov [tm_size],ecx
|
||||
|
||||
mov [read_delete_dir_data.return],eax
|
||||
mov eax,[delete_dir_data+8]
|
||||
mov [read_delete_dir_data.size],eax
|
||||
mov eax,[appl_memory_old]
|
||||
mov [read_delete_dir_data.return],eax
|
||||
call read_delete_dir
|
||||
mcall SF_FILE, read_delete_dir_data
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
@@ -498,7 +504,8 @@ get_inf_dir:
|
||||
cmp [nesting_direction],0
|
||||
je @f
|
||||
|
||||
call get_inf_dir_2
|
||||
pop ebp
|
||||
call get_inf_dir_1.start
|
||||
jnc .end
|
||||
|
||||
dec ebp
|
||||
@@ -518,26 +525,16 @@ get_inf_dir:
|
||||
cmp [recursive_pointer],0
|
||||
jge .1
|
||||
|
||||
mov ecx,[appl_memory_old]
|
||||
cmp [appl_memory],ecx
|
||||
je @f
|
||||
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
;--------------------------------------
|
||||
@@:
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [tmp_memory]
|
||||
mov [tmp_memory],0
|
||||
mov [tm_size],0
|
||||
popa
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
get_inf_dir_2:
|
||||
pop eax
|
||||
pop ebp
|
||||
push eax
|
||||
jmp get_inf_dir_1.start
|
||||
;--------------------------------------
|
||||
align 4
|
||||
get_inf_dir_1:
|
||||
inc [directories_counter]
|
||||
mov ebp,[appl_memory_old]
|
||||
mov ebp,[tmp_memory]
|
||||
mov ebp,[ebp+8]
|
||||
;--------------------------------------
|
||||
.start:
|
||||
@@ -546,7 +543,7 @@ get_inf_dir_1:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[appl_memory_old]
|
||||
add ebx,[tmp_memory]
|
||||
add ebx,32+40
|
||||
cmp [ebx],byte '.'
|
||||
jne @f
|
||||
@@ -591,19 +588,3 @@ get_inf_dir_1:
|
||||
mov [nesting_direction],0
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
;type_patch_test:
|
||||
; pusha
|
||||
; mcall 5,200
|
||||
; mcall 13,<290,300>,<3,13>,0x0
|
||||
; mcall 4,<300,5>,0x80FFFFFF,file_name ;[error_pointer]
|
||||
; mcall 47,0x160100,[recursive_pointer],<300,5>,0xffffff
|
||||
; mcall 47,0x160100,ebp,<300,5>,0xffffff
|
||||
; mcall 5,1
|
||||
; popa
|
||||
; ret
|
||||
;temp_value_1 db '1',0
|
||||
;temp_value_2 db '2',0
|
||||
;temp_value_3 db '3',0
|
||||
;temp_value_4 db '4',0
|
||||
;temp_value_5 db '5',0
|
||||
;------------------------------------------------------------------------------
|
||||
+138
-250
@@ -1,130 +1,86 @@
|
||||
read_delete_dir:
|
||||
mcall 70, read_delete_dir_data
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
create_directory_f70:
|
||||
mcall 70, create_dir_file_data
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
del_file:
|
||||
mcall 70, delete_file_data
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
start_appl:
|
||||
mcall 70, start_file_data
|
||||
mcall SF_FILE, delete_file_data
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
get_file_size:
|
||||
mcall 70, read_file_features
|
||||
mcall SF_FILE, read_file_features
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
load_file:
|
||||
mcall 70, read_file
|
||||
mcall SF_FILE, read_file
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
write_file:
|
||||
mcall 70, save_file
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
add_write_file:
|
||||
mcall 70, add_save_file
|
||||
mcall SF_FILE, save_file
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
; out:
|
||||
; eax - 0 or error code
|
||||
align 4
|
||||
proc_read_left_folder:
|
||||
mov ebx,304
|
||||
push ebx ecx
|
||||
mov ecx,[appl_memory]
|
||||
add ecx,ebx
|
||||
mov [esp],ebx
|
||||
mov ebx,[appl_memory]
|
||||
mov [esp+4],ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
call move_up_right_table
|
||||
pop ecx ebx
|
||||
push ebx ecx edx
|
||||
mov ecx,[lfd_size]
|
||||
add ecx,304
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [fb_left.folder_data]
|
||||
mov [fb_left.folder_data],eax
|
||||
mov [lfd_size],ecx
|
||||
stdcall mark_file_clear_all, eax, ecx
|
||||
pop edx ecx ebx
|
||||
|
||||
xor eax,eax
|
||||
mov [left_marked_counter],eax
|
||||
mov [fb_left.marked_counter],eax
|
||||
mov [read_folder.start],eax ;dword 0
|
||||
inc eax
|
||||
mov [read_folder.size],eax ;dword 1
|
||||
mov eax,[left_folder_data]
|
||||
push eax
|
||||
mov eax,[fb_left.folder_data]
|
||||
mov [read_folder.return],eax
|
||||
mcall 70, read_folder
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error_1
|
||||
@@:
|
||||
mov eax,[esp]
|
||||
cmp [eax+32+40],word 2Eh
|
||||
jne @f
|
||||
mov [read_folder.start],dword 1
|
||||
@@:
|
||||
mov ebx,[eax+8]
|
||||
mov [read_folder.size],ebx ;dword 10 ;5000
|
||||
imul ebx,304
|
||||
add ebx,32
|
||||
mov ecx,[right_folder_data]
|
||||
sub ecx,[left_folder_data]
|
||||
push ebx ecx
|
||||
cmp ebx,ecx
|
||||
je .continue
|
||||
sub ebx,ecx
|
||||
js .sub_mem
|
||||
.add_mem:
|
||||
mov ecx,[appl_memory]
|
||||
add ecx,ebx
|
||||
mov [esp],ebx
|
||||
mov ebx,[appl_memory]
|
||||
mov [esp+4],ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
call move_up_right_table
|
||||
; mov [temp_znak],1
|
||||
jmp .continue
|
||||
.sub_mem:
|
||||
mov ebx,[esp]
|
||||
mov ecx,[esp+4]
|
||||
sub ebx,ecx
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,ebx
|
||||
mov [esp],ebx
|
||||
mov ebx,[appl_memory]
|
||||
mov [esp+4],ebx
|
||||
mov [appl_memory],ecx
|
||||
call move_down_right_table
|
||||
mcall 64,1
|
||||
; mov [temp_znak],2
|
||||
.continue:
|
||||
; mov edi,eax ;folder_data
|
||||
; call clear_folder_data_area
|
||||
mcall 70, read_folder
|
||||
mov [left_folder_block],ebx
|
||||
add esp,4*3
|
||||
|
||||
mcall SF_FILE, read_folder
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error
|
||||
@@:
|
||||
mov eax,[fb_left.folder_data]
|
||||
cmp [eax+32+40],word 2Eh
|
||||
jne @f
|
||||
mov [read_folder.start],dword 1
|
||||
@@:
|
||||
mov ecx,[eax+8] ; число файлов и папок
|
||||
mov [read_folder.size],ecx
|
||||
mov [sb_left.max_area],ecx
|
||||
imul ecx,304
|
||||
add ecx,32
|
||||
|
||||
push edx
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [fb_left.folder_data]
|
||||
mov [fb_left.folder_data],eax
|
||||
mov [lfd_size],ecx
|
||||
mov [read_folder.return],eax
|
||||
stdcall mark_file_clear_all, eax, ecx
|
||||
pop edx
|
||||
|
||||
mcall SF_FILE, read_folder
|
||||
mov [fb_left.folder_block],ebx
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error
|
||||
align 4
|
||||
@@:
|
||||
push eax
|
||||
; call left_files_name_normalize
|
||||
call left_prepare_extension_start
|
||||
call left_sort_files
|
||||
pop eax
|
||||
; pusha
|
||||
; call draw_window
|
||||
; popa
|
||||
ret
|
||||
.error_1:
|
||||
add esp,4
|
||||
align 4
|
||||
.error:
|
||||
mov [left_folder_block],dword 2
|
||||
mov edi,[left_folder_data]
|
||||
mov [fb_left.folder_block],dword 2
|
||||
mov edi,[fb_left.folder_data]
|
||||
call error_handler
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
error_handler:
|
||||
push eax
|
||||
xor eax,eax
|
||||
@@ -154,193 +110,132 @@ error_handler:
|
||||
pop eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
; out:
|
||||
; eax - 0 or error code
|
||||
proc_read_right_folder:
|
||||
mov ecx,[appl_memory]
|
||||
push ebx ecx edx
|
||||
mov ecx,[rfd_size]
|
||||
add ecx,304
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [fb_right.folder_data]
|
||||
mov [fb_right.folder_data],eax
|
||||
mov [rfd_size],ecx
|
||||
stdcall mark_file_clear_all, eax, ecx
|
||||
pop edx ecx ebx
|
||||
|
||||
xor eax,eax
|
||||
mov [right_marked_counter],eax
|
||||
mov [fb_right.marked_counter],eax
|
||||
mov [read_folder_1.start],eax ;dword 0
|
||||
inc eax
|
||||
mov [read_folder_1.size],eax ;dword 1
|
||||
mov eax,[right_folder_data]
|
||||
push eax
|
||||
mov eax,[fb_right.folder_data]
|
||||
mov [read_folder_1.return],eax
|
||||
mcall 70, read_folder_1
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error_1
|
||||
@@:
|
||||
mov eax,[esp]
|
||||
cmp [eax+32+40],word 2Eh
|
||||
jne @f
|
||||
mov [read_folder_1.start],dword 1
|
||||
@@:
|
||||
mov ebx,[eax+8]
|
||||
mov [read_folder_1.size],ebx ;dword 10 ;5000
|
||||
imul ebx,304
|
||||
add ebx,32
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,[right_folder_data]
|
||||
push ebx ecx
|
||||
cmp ebx,ecx
|
||||
je .continue
|
||||
sub ebx,ecx
|
||||
js .sub_mem
|
||||
.add_mem:
|
||||
mov ecx,[appl_memory]
|
||||
add ecx,ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
; mov [temp_znak],1
|
||||
jmp .continue
|
||||
.sub_mem:
|
||||
mov ebx,[esp]
|
||||
mov ecx,[esp+4]
|
||||
sub ebx,ecx
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
; mov [temp_znak],2
|
||||
.continue:
|
||||
; mov edi,eax ;folder_data_1
|
||||
; call clear_folder_data_area
|
||||
mcall 70, read_folder_1
|
||||
mov [right_folder_block],ebx
|
||||
add esp,4*3
|
||||
mcall SF_FILE, read_folder_1
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error
|
||||
@@:
|
||||
mov eax,[fb_right.folder_data]
|
||||
cmp [eax+32+40],word 2Eh
|
||||
jne @f
|
||||
mov [read_folder_1.start],dword 1
|
||||
@@:
|
||||
mov ecx,[eax+8] ; число файлов и папок
|
||||
mov [read_folder_1.size],ecx
|
||||
mov [sb_right.max_area],ecx
|
||||
imul ecx,304
|
||||
add ecx,32
|
||||
|
||||
push edx
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [fb_right.folder_data]
|
||||
mov [fb_right.folder_data],eax
|
||||
mov [rfd_size],ecx
|
||||
mov [read_folder_1.return],eax
|
||||
stdcall mark_file_clear_all, eax, ecx
|
||||
pop edx
|
||||
|
||||
mcall SF_FILE, read_folder_1
|
||||
mov [fb_right.folder_block],ebx
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne .error
|
||||
align 4
|
||||
@@:
|
||||
push eax
|
||||
; call right_files_name_normalize
|
||||
call right_prepare_extension_start
|
||||
call right_sort_files
|
||||
pop eax
|
||||
; pusha
|
||||
; call draw_window
|
||||
; popa
|
||||
ret
|
||||
.error_1:
|
||||
add esp,4
|
||||
align 4
|
||||
.error:
|
||||
mov [right_folder_block],dword 2
|
||||
mov edi,[right_folder_data]
|
||||
mov [fb_right.folder_block],dword 2
|
||||
mov edi,[fb_right.folder_data]
|
||||
call error_handler
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
move_up_right_table:
|
||||
mov esi,[esp+8]
|
||||
mov ecx,esi
|
||||
sub ecx,[right_folder_data]
|
||||
mov edi,esi
|
||||
add edi,[esp+4]
|
||||
shr ecx,2
|
||||
std
|
||||
; rep movsb
|
||||
rep movsd
|
||||
mov eax,[esp+4]
|
||||
add [right_folder_data],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
move_down_right_table:
|
||||
mov esi,[right_folder_data]
|
||||
mov edi,esi
|
||||
sub edi,[esp+4]
|
||||
push ecx
|
||||
mov ecx,[esp+12]
|
||||
sub ecx,[right_folder_data]
|
||||
shr ecx,2
|
||||
cld
|
||||
; rep movsb
|
||||
rep movsd
|
||||
pop ecx
|
||||
mov eax,[esp+4]
|
||||
sub [right_folder_data],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;clear_folder_data_area:
|
||||
; mov ecx,4096*10/4
|
||||
; xor eax,eax
|
||||
; cld
|
||||
; rep stosd
|
||||
; ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
proc_read_folder:
|
||||
call proc_read_left_folder
|
||||
; mov [left_panel_clear_all],1
|
||||
cmp [search_pre_folder],0
|
||||
jne @f
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [left_start_draw_line],0
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_line],0
|
||||
mov [sb_left.position],0
|
||||
jmp .continue
|
||||
@@:
|
||||
mov edi,[left_folder_data]
|
||||
mov edi,[fb_left.folder_data]
|
||||
add edi,32+40
|
||||
sub edi,304
|
||||
xor ebp,ebp
|
||||
.search_file:
|
||||
cmp [left_folder_block],ebp
|
||||
cmp [fb_left.folder_block],ebp
|
||||
jbe .end_folder
|
||||
mov esi,[temp_counter_dword]
|
||||
mov ecx,[extension_size]
|
||||
add edi,304
|
||||
inc ebp
|
||||
cld
|
||||
; mov [temp_counter_dword_1],edi
|
||||
push edi
|
||||
rep cmpsb
|
||||
pop edi
|
||||
jne .search_file
|
||||
dec ebp
|
||||
mov eax,[left_folder_block]
|
||||
cmp [max_panel_line],eax
|
||||
mov eax,[fb_left.folder_block]
|
||||
cmp [fb_left.max_panel_line],eax
|
||||
js @f
|
||||
mov eax,ebp
|
||||
imul eax,10
|
||||
mov [left_start_draw_cursor_line],ax
|
||||
mov [left_start_draw_line],0
|
||||
movzx eax,[fb_left.line_size_y]
|
||||
imul eax,ebp
|
||||
mov [fb_left.start_draw_cursor_line],ax
|
||||
mov [fb_left.start_draw_line],0
|
||||
mov [sb_left.position],0
|
||||
jmp .end_folder
|
||||
@@:
|
||||
; sub eax,ebp
|
||||
; push eax
|
||||
; sub eax,[max_panel_line]
|
||||
; jns @f
|
||||
; mov eax,[max_panel_line]
|
||||
; sub eax,[esp]
|
||||
; imul eax,10
|
||||
; mov [left_start_draw_cursor_line],ax
|
||||
;@@:
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [left_start_draw_line],ebp
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_line],ebp
|
||||
mov [sb_left.position],ebp
|
||||
.end_folder:
|
||||
mov [search_pre_folder],0
|
||||
.continue:
|
||||
call draw_left_panel
|
||||
call draw_left_select_disk_button
|
||||
; call draw_window
|
||||
; pop eax
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
proc_read_folder_1:
|
||||
call proc_read_right_folder
|
||||
; mov [right_panel_clear_all],1
|
||||
cmp [search_pre_folder],0
|
||||
jne @f
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [right_start_draw_line],0
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_line],0
|
||||
mov [sb_right.position],0
|
||||
jmp .continue
|
||||
@@:
|
||||
mov edi,[right_folder_data]
|
||||
mov edi,[fb_right.folder_data]
|
||||
add edi,32+40
|
||||
sub edi,304
|
||||
xor ebp,ebp
|
||||
.search_file:
|
||||
cmp [right_folder_block],ebp
|
||||
cmp [fb_right.folder_block],ebp
|
||||
jbe .end_folder
|
||||
mov esi,[temp_counter_dword]
|
||||
mov ecx,[extension_size]
|
||||
@@ -353,26 +248,19 @@ proc_read_folder_1:
|
||||
pop edi
|
||||
jne .search_file
|
||||
dec ebp
|
||||
mov eax,[right_folder_block]
|
||||
cmp [max_panel_line],eax
|
||||
mov eax,[fb_right.folder_block]
|
||||
cmp [fb_right.max_panel_line],eax
|
||||
js @f
|
||||
mov eax,ebp
|
||||
imul eax,10
|
||||
mov [right_start_draw_cursor_line],ax
|
||||
mov [right_start_draw_line],0
|
||||
movzx eax,[fb_right.line_size_y]
|
||||
imul eax,ebp
|
||||
mov [fb_right.start_draw_cursor_line],ax
|
||||
mov [fb_right.start_draw_line],0
|
||||
mov [sb_right.position],0
|
||||
jmp .end_folder
|
||||
@@:
|
||||
; sub eax,ebp
|
||||
; push eax
|
||||
; sub eax,[max_panel_line]
|
||||
; jns @f
|
||||
; mov eax,[max_panel_line]
|
||||
; sub eax,[esp]
|
||||
; imul eax,10
|
||||
; mov [right_start_draw_cursor_line],ax
|
||||
;@@:
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [right_start_draw_line],ebp
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_line],ebp
|
||||
mov [sb_right.position],ebp
|
||||
.end_folder:
|
||||
mov [search_pre_folder],0
|
||||
.continue:
|
||||
@@ -404,7 +292,7 @@ copy_folder_name_3:
|
||||
jmp copy_folder_name.1
|
||||
;---------------------------------------------------------------------
|
||||
read_folder:
|
||||
.subfunction dd 1
|
||||
.subfunction dd SSF_READ_FOLDER
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
@@ -413,7 +301,7 @@ read_folder:
|
||||
.name: dd read_folder_name
|
||||
;---------------------------------------------------------------------
|
||||
read_folder_1:
|
||||
.subfunction dd 1
|
||||
.subfunction dd SSF_READ_FOLDER
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
@@ -422,7 +310,7 @@ read_folder_1:
|
||||
.name: dd read_folder_1_name
|
||||
;---------------------------------------------------------------------
|
||||
read_folder_2:
|
||||
.subfunction dd 1
|
||||
.subfunction dd SSF_READ_FOLDER
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
@@ -431,7 +319,7 @@ read_folder_2:
|
||||
.name: dd read_folder_2_name
|
||||
;---------------------------------------------------------------------
|
||||
read_folder_3:
|
||||
.subfunction dd 1
|
||||
.subfunction dd SSF_READ_FOLDER
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
@@ -440,7 +328,7 @@ read_folder_3:
|
||||
.name: dd read_folder_3_name
|
||||
;---------------------------------------------------------------------
|
||||
read_file_features:
|
||||
.subfunction dd 5
|
||||
.subfunction dd SSF_GET_INFO
|
||||
.Offset dd 0
|
||||
.Offset_1 dd 0
|
||||
.size dd 0
|
||||
@@ -449,7 +337,7 @@ read_file_features:
|
||||
.name: dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
read_file:
|
||||
.subfunction dd 0
|
||||
.subfunction dd SSF_READ_FILE
|
||||
.Offset dd 0
|
||||
.Offset_1 dd 0
|
||||
.size dd 0
|
||||
@@ -458,7 +346,7 @@ read_file:
|
||||
.name: dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
save_file:
|
||||
.subfunction dd 2
|
||||
.subfunction dd SSF_CREATE_FILE
|
||||
.Offset dd 0
|
||||
.Offset_1 dd 0
|
||||
.size dd 0
|
||||
@@ -467,7 +355,7 @@ save_file:
|
||||
.name: dd start_parameter
|
||||
;---------------------------------------------------------------------
|
||||
add_save_file:
|
||||
.subfunction dd 3
|
||||
.subfunction dd SSF_WRITE_FILE
|
||||
.Offset dd 0
|
||||
.Offset_1 dd 0
|
||||
.size dd 0
|
||||
@@ -476,7 +364,7 @@ add_save_file:
|
||||
.name: dd start_parameter
|
||||
;---------------------------------------------------------------------
|
||||
create_dir_file_data:
|
||||
.subfunction dd 9
|
||||
.subfunction dd SSF_CREATE_FOLDER
|
||||
.flags dd 0
|
||||
.param dd 0
|
||||
.rezerv dd 0
|
||||
@@ -485,7 +373,7 @@ create_dir_file_data:
|
||||
.name: dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
start_file_data:
|
||||
.subfunction dd 7
|
||||
.subfunction dd SSF_START_APP
|
||||
.flags dd 0
|
||||
.param dd 0
|
||||
.rezerv dd 0
|
||||
@@ -494,7 +382,7 @@ start_file_data:
|
||||
.name: dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
delete_file_data:
|
||||
.subfunction dd 8
|
||||
.subfunction dd SSF_DELETE
|
||||
.flags dd 0
|
||||
.param dd 0
|
||||
.rezerv dd 0
|
||||
@@ -503,7 +391,7 @@ delete_file_data:
|
||||
.name: dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
read_delete_dir_data:
|
||||
.subfunction dd 1
|
||||
.subfunction dd SSF_READ_FOLDER
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 0
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
+130
-323
@@ -1,5 +1,6 @@
|
||||
align 4
|
||||
key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
cmp [extended_key],1
|
||||
je .extended_key
|
||||
test al, al
|
||||
@@ -11,8 +12,8 @@ key:
|
||||
@@:
|
||||
cmp ah,15
|
||||
jne .no_tab
|
||||
inc [select_panel_counter]
|
||||
and [select_panel_counter],1b
|
||||
xor [fb_left.select_panel_counter],1
|
||||
xor [fb_right.select_panel_counter],1
|
||||
call draw_left_panel
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
@@ -81,323 +82,45 @@ key_80:
|
||||
cmp ah,80 ; arrow down
|
||||
jne key_72
|
||||
.1:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov eax,[left_folder_block]
|
||||
dec eax
|
||||
imul eax,10
|
||||
cmp ax,[left_start_draw_cursor_line]
|
||||
jbe .marked_action ;still
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
add ax,10
|
||||
cmp ax,[left_panel_y_correct_size_y]
|
||||
jae @f
|
||||
.add_1:
|
||||
add [left_start_draw_cursor_line],10
|
||||
call draw_left_panel
|
||||
mov [drawing_panel_folder],1
|
||||
jmp still
|
||||
.all:
|
||||
sub ecx,10 shl 16
|
||||
mov edx,0xffffff
|
||||
mcall
|
||||
mov [not_clear_lines],1
|
||||
call draw_folder_data
|
||||
mov [not_clear_lines],0
|
||||
jmp still
|
||||
.marked_action:
|
||||
cmp [marked_action],0
|
||||
je still
|
||||
mov [marked_action],0
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.marked_action_1:
|
||||
cmp [marked_action],0
|
||||
je still
|
||||
mov [marked_action],0
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
@@:
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
test eax,0x80000000
|
||||
jz @f
|
||||
xor eax,eax
|
||||
@@:
|
||||
cmp [marked_action],0
|
||||
jne @f
|
||||
cmp [left_start_draw_line],eax
|
||||
je still
|
||||
@@:
|
||||
mov [marked_action],0
|
||||
inc [left_start_draw_line]
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.right_1:
|
||||
mov eax,[right_folder_block]
|
||||
dec eax
|
||||
imul eax,10
|
||||
cmp ax,[right_start_draw_cursor_line]
|
||||
jbe .marked_action_1 ;still
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
add ax,10
|
||||
cmp ax,[right_panel_y_correct_size_y]
|
||||
jae @f
|
||||
.add_2:
|
||||
add [right_start_draw_cursor_line],10
|
||||
call draw_right_panel
|
||||
mov [drawing_panel_folder],2
|
||||
jmp still
|
||||
@@:
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
test eax,0x80000000
|
||||
jz @f
|
||||
xor eax,eax
|
||||
@@:
|
||||
cmp [marked_action],0
|
||||
jne @f
|
||||
cmp [right_start_draw_line],eax
|
||||
je still
|
||||
@@:
|
||||
mov [marked_action],0
|
||||
inc [right_start_draw_line]
|
||||
call draw_right_panel
|
||||
mov bx,1
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;-------------------------------------------------------------
|
||||
key_72:
|
||||
cmp ah,72 ;arrow up
|
||||
jne key_81
|
||||
.1:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
add ax,[left_panel_y.start_y]
|
||||
cmp [left_panel_y.start_y],ax
|
||||
je @f
|
||||
sub [left_start_draw_cursor_line],10
|
||||
call draw_left_panel
|
||||
mov [drawing_panel_folder],1
|
||||
jmp still
|
||||
.all:
|
||||
add ecx,10 shl 16
|
||||
mov edx,0xffffff
|
||||
mcall
|
||||
mov [not_clear_lines],1
|
||||
call draw_folder_data
|
||||
mov [not_clear_lines],0
|
||||
jmp still
|
||||
@@:
|
||||
cmp [left_start_draw_line],0
|
||||
je still
|
||||
dec [left_start_draw_line]
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.right_1:
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
add ax,[right_panel_y.start_y]
|
||||
cmp [right_panel_y.start_y],ax
|
||||
je @f
|
||||
sub [right_start_draw_cursor_line],10
|
||||
call draw_right_panel
|
||||
mov [drawing_panel_folder],2
|
||||
jmp still
|
||||
@@:
|
||||
cmp [right_start_draw_line],0
|
||||
je still
|
||||
dec [right_start_draw_line]
|
||||
call draw_right_panel
|
||||
mov bx,2
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;-------------------------------------------------------------
|
||||
key_81:
|
||||
cmp ah,81 ; PageDown
|
||||
jne key_73
|
||||
mov eax,[max_panel_line]
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov ebx,[left_folder_block]
|
||||
sub ebx,eax
|
||||
test ebx,0x80000000
|
||||
jnz .left_2
|
||||
sub ebx,[left_start_draw_line]
|
||||
cmp ebx,eax
|
||||
ja .ok_1
|
||||
mov ebx,[left_folder_block]
|
||||
sub ebx,eax
|
||||
call prepare_data_left_down
|
||||
ja @f
|
||||
cmp ebx,[left_start_draw_line]
|
||||
je still
|
||||
@@:
|
||||
mov [left_start_draw_line],ebx
|
||||
.left_3:
|
||||
dec eax
|
||||
imul eax,10
|
||||
.left_1:
|
||||
mov [left_start_draw_cursor_line],ax
|
||||
call draw_left_panel
|
||||
mov bx,3
|
||||
call fb_on_key
|
||||
jmp still
|
||||
.left_2:
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[left_start_draw_line]
|
||||
dec eax
|
||||
imul eax,10
|
||||
cmp ax,[left_start_draw_cursor_line]
|
||||
jbe still
|
||||
jmp .left_1
|
||||
.ok_1:
|
||||
add [left_start_draw_line],eax
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.right_1:
|
||||
mov ebx,[right_folder_block]
|
||||
sub ebx,eax
|
||||
test ebx,0x80000000
|
||||
jnz .right_3
|
||||
sub ebx,[right_start_draw_line]
|
||||
cmp ebx,eax
|
||||
jae .ok_2
|
||||
mov ebx,[right_folder_block]
|
||||
sub ebx,eax
|
||||
call prepare_data_right_down
|
||||
ja @f
|
||||
cmp ebx,[right_start_draw_line]
|
||||
je still
|
||||
@@:
|
||||
mov [right_start_draw_line],ebx
|
||||
.right_4:
|
||||
dec eax
|
||||
imul eax,10
|
||||
.right_2:
|
||||
mov [right_start_draw_cursor_line],ax
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
.right_3:
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[right_start_draw_line]
|
||||
dec eax
|
||||
imul eax,10
|
||||
cmp ax,[right_start_draw_cursor_line]
|
||||
jbe still
|
||||
jmp .right_2
|
||||
.ok_2:
|
||||
add [right_start_draw_line],eax
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
;-------------------------------------------------------------
|
||||
prepare_data_right_down:
|
||||
mov ecx,[right_folder_block]
|
||||
sub ecx,[right_start_draw_line]
|
||||
dec ecx
|
||||
imul ecx,10
|
||||
cmp cx,[right_start_draw_cursor_line]
|
||||
ret
|
||||
;-------------------------------------------------------------
|
||||
prepare_data_left_down:
|
||||
mov ecx,[left_folder_block]
|
||||
sub ecx,[left_start_draw_line]
|
||||
dec ecx
|
||||
imul ecx,10
|
||||
cmp cx,[left_start_draw_cursor_line]
|
||||
ret
|
||||
;-------------------------------------------------------------
|
||||
key_73:
|
||||
cmp ah,73 ; PageUp
|
||||
jne key_71
|
||||
mov eax,[max_panel_line]
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov ebx,[left_start_draw_line]
|
||||
sub ebx,eax
|
||||
test ebx,0x8000000
|
||||
jz @f
|
||||
cmp [left_start_draw_line],0
|
||||
jne .draw_line_1
|
||||
cmp [left_start_draw_cursor_line],0
|
||||
je still
|
||||
mov [left_start_draw_cursor_line],0
|
||||
.draw_line_1:
|
||||
mov [left_start_draw_line],0
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
@@:
|
||||
sub [left_start_draw_line],eax
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.right_1:
|
||||
mov ebx,[right_start_draw_line]
|
||||
sub ebx,eax
|
||||
test ebx,0x80000000
|
||||
jz @f
|
||||
cmp [right_start_draw_line],0
|
||||
jne .draw_line_2
|
||||
cmp [right_start_draw_cursor_line],0
|
||||
je still
|
||||
mov [right_start_draw_cursor_line],0
|
||||
.draw_line_2:
|
||||
mov [right_start_draw_line],0
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
@@:
|
||||
sub [right_start_draw_line],eax
|
||||
call draw_right_panel
|
||||
mov bx,4
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;-------------------------------------------------------------
|
||||
key_71:
|
||||
cmp ah,71 ; Home
|
||||
jne key_79
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
cmp [left_start_draw_line],0
|
||||
jne .draw_left_panel
|
||||
cmp [left_start_draw_cursor_line],0
|
||||
je still
|
||||
.draw_left_panel:
|
||||
mov [left_start_draw_line],0
|
||||
mov [left_start_draw_cursor_line],0
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
.right_1:
|
||||
cmp [right_start_draw_line],0
|
||||
jne .draw_right_panel
|
||||
cmp [right_start_draw_cursor_line],0
|
||||
je still
|
||||
.draw_right_panel:
|
||||
mov [right_start_draw_line],0
|
||||
mov [right_start_draw_cursor_line],0
|
||||
call draw_right_panel
|
||||
mov bx,5
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;-------------------------------------------------------------
|
||||
key_79:
|
||||
cmp ah,79 ; End
|
||||
jne key_28
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
test eax,0x80000000
|
||||
jnz key_81.left_2
|
||||
call prepare_data_left_down
|
||||
ja @f
|
||||
cmp eax,[left_start_draw_line]
|
||||
je still
|
||||
@@:
|
||||
mov [left_start_draw_line],eax
|
||||
mov eax,[max_panel_line]
|
||||
jmp key_81.left_3
|
||||
.right_1:
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
test eax,0x80000000
|
||||
jnz key_81.right_3
|
||||
call prepare_data_right_down
|
||||
ja @f
|
||||
cmp eax,[right_start_draw_line]
|
||||
je still
|
||||
@@:
|
||||
mov [right_start_draw_line],eax
|
||||
mov eax,[max_panel_line]
|
||||
jmp key_81.right_4
|
||||
mov bx,6
|
||||
call fb_on_key
|
||||
je still
|
||||
;-------------------------------------------------------------
|
||||
key_28:
|
||||
cmp ah,28 ; Enter
|
||||
@@ -412,8 +135,8 @@ key_28:
|
||||
|
||||
mov [open_param],0
|
||||
.2:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
mov ebp,read_folder_name ;read_folder.name
|
||||
call calculate_left_data_1
|
||||
add esi,32
|
||||
@@ -431,8 +154,9 @@ key_28:
|
||||
je .up_patch
|
||||
@@:
|
||||
call calculate_key_28_1
|
||||
mov [left_start_draw_cursor_line],0
|
||||
mov [left_start_draw_line],0
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
mov [fb_left.start_draw_line],0
|
||||
mov [sb_left.position],0
|
||||
jmp proc_read_folder
|
||||
.up_patch:
|
||||
call calculate_key_28_2
|
||||
@@ -453,8 +177,9 @@ key_28:
|
||||
je .up_patch_1
|
||||
@@:
|
||||
call calculate_key_28_1
|
||||
mov [right_start_draw_cursor_line],0
|
||||
mov [right_start_draw_line],0
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
mov [fb_right.start_draw_line],0
|
||||
mov [sb_right.position],0
|
||||
jmp proc_read_folder_1
|
||||
.up_patch_1:
|
||||
call calculate_key_28_2
|
||||
@@ -530,48 +255,52 @@ symbol_a_up:
|
||||
je still
|
||||
cmp [ctrl_flag],1
|
||||
je .ctrl
|
||||
cmp [alt_flag],1
|
||||
je still
|
||||
;cmp [alt_flag],1
|
||||
;je still
|
||||
jmp still
|
||||
.ctrl:
|
||||
mov [mark_action_counter],0
|
||||
jmp mark_all_file
|
||||
mov bx,9
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
NumPad_plus_Up:
|
||||
cmp [shift_flag],1
|
||||
je still
|
||||
cmp [ctrl_flag],1
|
||||
je .ctrl
|
||||
cmp [alt_flag],1
|
||||
je still
|
||||
;cmp [alt_flag],1
|
||||
;je still
|
||||
jmp still
|
||||
.ctrl:
|
||||
mov [mark_action_counter],0
|
||||
jmp mark_all_file
|
||||
mov bx,9
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
NumPad_minus_Up:
|
||||
cmp [shift_flag],1
|
||||
je still
|
||||
cmp [ctrl_flag],1
|
||||
je .ctrl
|
||||
cmp [alt_flag],1
|
||||
je still
|
||||
;cmp [alt_flag],1
|
||||
;je still
|
||||
jmp still
|
||||
.ctrl:
|
||||
mov [mark_action_counter],1
|
||||
jmp mark_all_file
|
||||
mov bx,10
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
NumPad_sneg_Up:
|
||||
cmp [shift_flag],1
|
||||
je still
|
||||
cmp [ctrl_flag],1
|
||||
je .ctrl
|
||||
cmp [alt_flag],1
|
||||
je still
|
||||
;cmp [alt_flag],1
|
||||
;je still
|
||||
jmp still
|
||||
.ctrl:
|
||||
mov [mark_action_counter],2
|
||||
jmp mark_all_file
|
||||
mov bx,11
|
||||
call fb_on_key
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
f_key_f1:
|
||||
;sort_name:
|
||||
@@ -599,11 +328,11 @@ f_key_f3:
|
||||
je still
|
||||
cmp [ctrl_flag],1
|
||||
je .ctrl
|
||||
cmp [alt_flag],1
|
||||
je still
|
||||
;cmp [alt_flag],1
|
||||
;je still
|
||||
jmp still
|
||||
.ctrl:
|
||||
cmp [select_panel_counter],1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je right_sort_name
|
||||
jmp left_sort_name
|
||||
;---------------------------------------------------------------------
|
||||
@@ -617,7 +346,7 @@ f_key_f4:
|
||||
je still
|
||||
jmp open_file_f4
|
||||
.ctrl:
|
||||
cmp [select_panel_counter],1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je right_sort_type
|
||||
jmp left_sort_type
|
||||
;---------------------------------------------------------------------
|
||||
@@ -631,7 +360,7 @@ f_key_f5:
|
||||
je still
|
||||
jmp copy_file_f5
|
||||
.ctrl:
|
||||
cmp [select_panel_counter],1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je right_sort_size
|
||||
jmp left_sort_size
|
||||
;---------------------------------------------------------------------
|
||||
@@ -647,7 +376,7 @@ f_key_f6:
|
||||
.shift:
|
||||
jmp still
|
||||
.ctrl:
|
||||
cmp [select_panel_counter],1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je right_sort_date
|
||||
jmp left_sort_date
|
||||
;---------------------------------------------------------------------
|
||||
@@ -734,9 +463,87 @@ key_alt_down:
|
||||
;---------------------------------------------------------------------
|
||||
key_insert:
|
||||
cmp ah,82 ; Insert
|
||||
je mark_file
|
||||
jne @f
|
||||
.1:
|
||||
mov bx,8 ; mark file
|
||||
call fb_on_key
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,83
|
||||
je f_key_f8 ;delete_file
|
||||
key_end:
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
;in:
|
||||
; ax - key
|
||||
; bx - 1...12
|
||||
align 4
|
||||
fb_on_key:
|
||||
shr ax,8
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
mov [fb_left.key_action],bx
|
||||
mov [fb_left.key_action_num],ax
|
||||
stdcall [FileBrowser_key], fb_left
|
||||
call sb_left_update
|
||||
ret
|
||||
.right_1:
|
||||
mov [fb_right.key_action],bx
|
||||
mov [fb_right.key_action_num],ax
|
||||
stdcall [FileBrowser_key], fb_right
|
||||
call sb_right_update
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;in:
|
||||
; ax - key
|
||||
; bx - 1...12
|
||||
; esi
|
||||
align 4
|
||||
fb_on_key_1:
|
||||
shr ax,8
|
||||
or esi,esi
|
||||
jnz .right_1
|
||||
mov [fb_left.key_action],bx
|
||||
mov [fb_left.key_action_num],ax
|
||||
stdcall [FileBrowser_key], fb_left
|
||||
call sb_left_update
|
||||
ret
|
||||
.right_1:
|
||||
mov [fb_right.key_action],bx
|
||||
mov [fb_right.key_action_num],ax
|
||||
stdcall [FileBrowser_key], fb_right
|
||||
call sb_right_update
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sb_left_update:
|
||||
cmp [fb_left.draw_scroll_bar],0
|
||||
je @f
|
||||
mov eax,[fb_left.start_draw_line]
|
||||
mov [sb_left.position],eax
|
||||
;mov eax,[sb_left.max_area]
|
||||
;cmp eax,[sb_left.cur_area]
|
||||
;jbe @f
|
||||
;cmp [sb_left.cur_area],0
|
||||
;je @f
|
||||
stdcall [scrollbar_v_draw], sb_left
|
||||
mov [fb_left.draw_scroll_bar],0
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sb_right_update:
|
||||
cmp [fb_right.draw_scroll_bar],0
|
||||
je @f
|
||||
mov eax,[fb_right.start_draw_line]
|
||||
mov [sb_right.position],eax
|
||||
;mov eax,[sb_right.max_area]
|
||||
;cmp eax,[sb_right.cur_area]
|
||||
;jbe @f
|
||||
;cmp [sb_right.cur_area],0
|
||||
;je @f
|
||||
stdcall [scrollbar_v_draw], sb_right
|
||||
mov [fb_right.draw_scroll_bar],0
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
+708
-125
@@ -3,7 +3,7 @@
|
||||
|
||||
;*****************************************************************************
|
||||
; KFM - Kolibri File Manager
|
||||
; Copyright (c) 2006 - 2014, Marat Zakiyanov aka Mario79, aka Mario
|
||||
; Copyright (c) 2006 - 2026, Marat Zakiyanov aka Mario79, aka Mario
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
@@ -28,55 +28,114 @@
|
||||
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;*****************************************************************************
|
||||
; KFM v0.48d 23/12/2021
|
||||
; KFM v0.49 05/10/2026
|
||||
;---------------------------------------------------------------------
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd I_END
|
||||
dd mem
|
||||
dd stacktop
|
||||
dd 0x0
|
||||
dd path
|
||||
db 'MENUET01'
|
||||
dd 1, START, I_END, mem, stacktop, 0, path
|
||||
|
||||
;include 'lang.inc'
|
||||
;include 'kglobals.inc'
|
||||
;include 'macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../config.inc' ;for nightbuild
|
||||
;include '../../debug.inc' ;for nightbuild
|
||||
include '../../KOSfuncs.inc'
|
||||
|
||||
;define __DEBUG__ 1
|
||||
;define __DEBUG_LEVEL__ 1
|
||||
;include '../../debug-fdo.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/box_lib.mac'
|
||||
|
||||
USE_STATIC_LIBS equ 0
|
||||
|
||||
F_BUT_PANEL_H equ 23
|
||||
FILE_BR_TOP_LINE equ F_BUT_PANEL_H+52
|
||||
FILE_BR_SEL_DR_W equ 60
|
||||
FILE_BR_COL_LEFT equ 60+15 ;ширина списка + отступ до кнопки name
|
||||
file_br_col_w1 dd ? ;name
|
||||
FILE_BR_COL_W2 equ 45 ;type
|
||||
FILE_BR_COL_W3 equ 45 ;size
|
||||
FILE_BR_COL_W4 equ 70 ;date
|
||||
|
||||
ICON_TOP_B = 1 ; top border
|
||||
ICON_BOT_B = 1
|
||||
ICON_LEFT_B = 1 ; left border
|
||||
ICON_RIGHT_B = 1
|
||||
BUTTON_SIZE_W = (18+ICON_LEFT_B+ICON_RIGHT_B)
|
||||
BUTTON_SIZE_H = (18+ICON_TOP_B+ICON_BOT_B)
|
||||
BUTTON_W_SP = (BUTTON_SIZE_W+6)
|
||||
ICON_SIZE = BUTTON_SIZE_W*BUTTON_SIZE_H*3
|
||||
|
||||
include 'editbox.inc'
|
||||
;use_edit_box
|
||||
use_edit_box procinfo
|
||||
;include 'ASCGL.INC'
|
||||
;---------------------------------------------------------------------
|
||||
include 'files.inc'
|
||||
;---------------------------------------------------------------------
|
||||
STRLEN = 1024
|
||||
|
||||
@use_library
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
START:
|
||||
mcall 9,procinfo,-1
|
||||
mov ecx,[ebx+30] ; PID
|
||||
mcall 18,21
|
||||
mov [active_process],eax ; WINDOW SLOT
|
||||
mov [appl_memory],mem
|
||||
load_libraries l_libs_start,end_l_libs
|
||||
purge copy_path
|
||||
|
||||
if USE_STATIC_LIBS eq 0
|
||||
cmp [library01.status_lib],0 ;boxlib
|
||||
jnz exit_apl.t_p
|
||||
end if
|
||||
cmp [library02.status_lib],0 ;sort
|
||||
jz @f
|
||||
mov [sort_init], f_null_1
|
||||
mov [sort_dir], f_null_3
|
||||
@@:
|
||||
cmp [library03.status_lib],0 ;menu
|
||||
jz @f
|
||||
mov [kmainmenu_dispatch_cursorevent], f_null_1
|
||||
mov [kmainmenu_draw], f_null_1
|
||||
@@:
|
||||
|
||||
stdcall [sort_init], 1
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
mcall SF_SYS_MISC, SSF_MEM_OPEN, str_icon_18,, 0
|
||||
mov [fb_left.icon_raw_area],eax
|
||||
mov [fb_left.resolution_raw],32
|
||||
mov [fb_right.icon_raw_area],eax
|
||||
mov [fb_right.resolution_raw],32
|
||||
|
||||
if USE_STATIC_LIBS eq 0
|
||||
; read icons
|
||||
mcall SF_SYS_MISC, SSF_MEM_OPEN, str_icon_18w,, 0
|
||||
or eax, eax
|
||||
jz @f
|
||||
mov [icons_max_size], edx
|
||||
mov esi, eax
|
||||
stdcall copy_icon, buttons_file_data,esi,1
|
||||
stdcall copy_icon, eax,esi,66
|
||||
stdcall copy_icon, eax,esi,0
|
||||
stdcall copy_icon, eax,esi,20
|
||||
stdcall copy_icon, eax,esi,31 ;30?
|
||||
stdcall copy_icon, eax,esi,55
|
||||
stdcall copy_icon, eax,esi,56
|
||||
stdcall copy_icon, eax,esi,67
|
||||
end if
|
||||
|
||||
mcall SF_THREAD_INFO, procinfo,-1
|
||||
mov ecx,[procinfo.PID]
|
||||
mcall SF_SYSTEM, SSF_GET_THREAD_SLOT
|
||||
mov [active_process],eax ; WINDOW SLOT
|
||||
|
||||
mov ax,[select_disk_char]
|
||||
mov [read_folder_name],ax
|
||||
mov [read_folder_1_name],ax
|
||||
call load_initiation_file
|
||||
|
||||
call init_menu
|
||||
call add_memory_for_folders
|
||||
call device_detect_f70
|
||||
call select_starting_directories
|
||||
mcall 66, 1, 1
|
||||
mov eax,1
|
||||
mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1
|
||||
mov eax,2
|
||||
mov [left_sort_flag],eax
|
||||
mov [right_sort_flag],eax
|
||||
|
||||
@@ -103,9 +162,10 @@ START:
|
||||
cmp eax,6
|
||||
jne read_folder_1_error
|
||||
@@:
|
||||
mcall 40, 0x27
|
||||
mcall SF_SET_EVENTS_MASK, EVM_MOUSE + EVM_BUTTON + EVM_KEY + EVM_REDRAW
|
||||
jmp red_1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
red:
|
||||
call get_window_param
|
||||
test [window_status],10b
|
||||
@@ -115,33 +175,35 @@ red:
|
||||
cmp [window_high],180
|
||||
ja @f
|
||||
mov esi,180
|
||||
mcall 67,-1,ebx,ebx
|
||||
mcall SF_CHANGE_WINDOW, -1,ebx,ebx
|
||||
@@:
|
||||
cmp [window_width],495
|
||||
ja red_1
|
||||
mov edx,495
|
||||
mcall 67,-1,ebx, ,ebx
|
||||
mcall SF_CHANGE_WINDOW, -1,ebx, ,ebx
|
||||
red_1:
|
||||
call draw_window
|
||||
;---------------------------------------------------------------------
|
||||
align 16
|
||||
still:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
call check_active_process_for_clear_all_flags
|
||||
|
||||
cmp eax,1
|
||||
cmp eax,EV_REDRAW
|
||||
je red
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je key
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je button
|
||||
cmp eax,6
|
||||
cmp eax,EV_MOUSE
|
||||
je mouse
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
check_active_process_for_clear_all_flags:
|
||||
push eax
|
||||
mcall 18,7
|
||||
mcall SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
|
||||
cmp [active_process],eax
|
||||
je .exit
|
||||
|
||||
@@ -166,43 +228,33 @@ check_active_process_for_clear_all_flags:
|
||||
pop eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
get_window_param:
|
||||
mcall 9, procinfo, -1
|
||||
mov eax,[ebx+46]
|
||||
mcall SF_THREAD_INFO, procinfo, -1
|
||||
mov eax,[procinfo.box.height]
|
||||
mov [window_high],eax
|
||||
mov eax,[ebx+42]
|
||||
mov eax,[procinfo.box.width]
|
||||
mov [window_width],eax
|
||||
mov eax,[ebx+70]
|
||||
mov [window_status],eax
|
||||
mcall 48,4
|
||||
mov al,[procinfo.wnd_state]
|
||||
mov [window_status],al
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
mov [skin_high],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
draw_window:
|
||||
mcall 12, 1
|
||||
xor esi,esi
|
||||
mcall 0, <20,728>, <20,460>, 0x43cccccc ; 0x805080D0, 0x005080D0
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
xor esi,esi
|
||||
mcall SF_CREATE_WINDOW, <20,728>, <20,460>, 0x63cccccc ; 0x805080D0, 0x005080D0
|
||||
call get_window_param
|
||||
|
||||
mcall 71, 1, header_text
|
||||
mcall SF_SET_CAPTION, 1, header_text
|
||||
|
||||
test [window_status],100b ; window is rolled up
|
||||
jnz .exit
|
||||
test [window_status],100b ; window is rolled up
|
||||
jnz .exit
|
||||
|
||||
test [window_status],10b ; window is minimized to panel
|
||||
jnz .exit
|
||||
|
||||
; create_dir_name
|
||||
; start_parameter
|
||||
; file_name
|
||||
; [temp_edi]
|
||||
; header
|
||||
; delete_file_data.name
|
||||
; start_file_data.name
|
||||
; start_parameter
|
||||
; start_file_data.name
|
||||
; read_icon_file.name
|
||||
; read_file_features.name ;path ;header
|
||||
test [window_status],10b ; window is minimized to panel
|
||||
jnz .exit
|
||||
|
||||
cmp [window_high],180
|
||||
jb .exit
|
||||
@@ -220,66 +272,159 @@ draw_window:
|
||||
call draw_menu_bar
|
||||
call draw_buttons_panel
|
||||
.exit:
|
||||
mcall 12, 2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_load_data:
|
||||
mov esi,path
|
||||
align 4
|
||||
load_initiation_file:
|
||||
mov esi,ini_file_name
|
||||
mov edi,file_name
|
||||
call copy_path
|
||||
call proc_copy_patch
|
||||
call get_file_size
|
||||
test eax,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_load_data_1:
|
||||
mov [read_file.return],eax
|
||||
mov ebp,eax
|
||||
prepare_load_data_4:
|
||||
call load_file
|
||||
test eax,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_load_data_2:
|
||||
call add_application_memory
|
||||
prepare_load_data_3:
|
||||
call add_application_memory
|
||||
mov eax,[file_features_temp_area+32]
|
||||
mov [read_file.size],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
load_initiation_file:
|
||||
mov ebx,ini_file_name
|
||||
call prepare_load_data
|
||||
jnz initiation_error
|
||||
call prepare_load_data_3
|
||||
mov eax,[appl_memory]
|
||||
mov [left_folder_data],eax
|
||||
sub eax,[read_file.size]
|
||||
mov [read_file.return],eax
|
||||
jnz .err_msg
|
||||
mov ecx,[file_features_temp_area+32]
|
||||
or ecx,ecx
|
||||
jz .err_msg
|
||||
push edx
|
||||
mcall SF_SYS_MISC, SSF_MEM_REALLOC,, [ini_file_start]
|
||||
mov [ini_file_start],eax
|
||||
mov [ini_size],ecx
|
||||
mov [read_file.return],eax
|
||||
mov [read_file.size],ecx
|
||||
pop edx
|
||||
call load_file
|
||||
test eax,eax
|
||||
jnz initiation_error
|
||||
mov ebp,icons_associations
|
||||
call search_star_and_end_tags
|
||||
mov eax,[end_tag]
|
||||
mov [icons_end_tag],eax
|
||||
jnz .err_msg
|
||||
call calc_ini
|
||||
jmp @f
|
||||
.err_msg:
|
||||
notify_window_run error_open_ini_file
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
add_memory_for_folders:
|
||||
mov ecx,[appl_memory]
|
||||
add ecx,304*32+32
|
||||
mov [right_folder_data],ecx
|
||||
add ecx,304*32+32
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
align 4
|
||||
calc_ini:
|
||||
; Convert the new "ID=ext,ext,..." icons18 layout from the loaded ini file into
|
||||
; the "ext=ID" CR/LF text that box_lib's FileBrowser expects, storing the result
|
||||
; in converted_ini_buffer. Every scan is bounded by ini_src_end, so a truncated
|
||||
; or malformed file can never read past the loaded buffer (it has no 0 terminator).
|
||||
pusha
|
||||
mov esi, [ini_file_start]
|
||||
mov eax, esi
|
||||
add eax, [ini_size]
|
||||
mov [ini_src_end], eax
|
||||
mov edi, converted_ini_buffer
|
||||
mov [fb_left.ini_file_start], edi
|
||||
mov [fb_right.ini_file_start], edi
|
||||
|
||||
mov eax,[left_folder_data]
|
||||
; find the "[icons18]" section header
|
||||
.find_section:
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
lodsb
|
||||
cmp al, '['
|
||||
jne .find_section
|
||||
cmp dword [esi], 'icon'
|
||||
jne .find_section
|
||||
.skip_header:
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
lodsb
|
||||
cmp al, 10
|
||||
jne .skip_header
|
||||
|
||||
; convert each "ID=ext,ext,..." line until the next section or EOF
|
||||
.parse_line:
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
cmp byte [esi], '['
|
||||
je .finished
|
||||
mov edx, esi ; edx = ID start
|
||||
.find_eq:
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
lodsb
|
||||
cmp al, '='
|
||||
jne .find_eq
|
||||
lea ebx, [esi-1]
|
||||
sub ebx, edx ; ebx = ID length
|
||||
|
||||
.next_ext:
|
||||
mov ebp, esi ; ebp = extension start
|
||||
.scan_ext:
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
lodsb
|
||||
cmp al, ','
|
||||
je .ext_sep
|
||||
cmp al, 13
|
||||
je .ext_eol
|
||||
cmp al, 10
|
||||
je .ext_eol
|
||||
jmp .scan_ext
|
||||
.ext_sep:
|
||||
call .emit_ext
|
||||
jmp .next_ext
|
||||
.ext_eol:
|
||||
call .emit_ext
|
||||
.skip_eol: ; absorb the whole CR/LF run (and blank lines)
|
||||
cmp esi, [ini_src_end]
|
||||
jae .finished
|
||||
lodsb
|
||||
cmp al, 13
|
||||
je .skip_eol
|
||||
cmp al, 10
|
||||
je .skip_eol
|
||||
dec esi
|
||||
jmp .parse_line
|
||||
|
||||
.finished:
|
||||
mov [fb_left.ini_file_end], edi
|
||||
mov [fb_right.ini_file_end], edi
|
||||
popa
|
||||
ret
|
||||
|
||||
; Emit one "ext=ID\r\n" record. esi-1 = delimiter just consumed, ebp = ext start,
|
||||
; edx/ebx = ID start/length. Empty extensions are skipped, esi is preserved.
|
||||
.emit_ext:
|
||||
push esi
|
||||
lea ecx, [esi-1]
|
||||
sub ecx, ebp ; ecx = extension length
|
||||
jecxz .emit_done ; drop empty extension
|
||||
mov esi, ebp
|
||||
rep movsb ; ext
|
||||
mov al, '='
|
||||
stosb
|
||||
mov esi, edx
|
||||
mov ecx, ebx
|
||||
rep movsb ; ID
|
||||
mov ax, 0x0A0D
|
||||
stosw ; CR, LF
|
||||
.emit_done:
|
||||
pop esi
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
add_memory_for_folders:
|
||||
mov ecx,304*32+32
|
||||
mov [lfd_size],ecx
|
||||
mov [rfd_size],ecx
|
||||
mcall SF_SYS_MISC, SSF_MEM_ALLOC
|
||||
mov [fb_left.folder_data],eax
|
||||
mov [read_folder.return],eax
|
||||
mov eax,[right_folder_data]
|
||||
mcall SF_SYS_MISC, SSF_MEM_ALLOC
|
||||
mov [fb_right.folder_data],eax
|
||||
mov [read_folder_1.return],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;in:
|
||||
; ebx - file name1
|
||||
; edi - buffer
|
||||
; esi - file path + '/' + file name0
|
||||
;out:
|
||||
; edi = file path + '/' + file name1
|
||||
align 4
|
||||
copy_path:
|
||||
xor eax,eax
|
||||
@@:
|
||||
@@ -305,6 +450,13 @@ copy_path:
|
||||
jnz @b
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;in:
|
||||
; ebx - file name
|
||||
; edi - buffer
|
||||
; esi - file path
|
||||
;out:
|
||||
; edi = file path + '/' + file name
|
||||
align 4
|
||||
copy_path_1:
|
||||
xor eax,eax
|
||||
@@:
|
||||
@@ -323,28 +475,13 @@ copy_path_1:
|
||||
jnz @b
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
add_application_memory:
|
||||
mov ecx,[file_features_temp_area+32]
|
||||
.1:
|
||||
add ecx,[appl_memory]
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
sub_application_memory:
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,[file_features_temp_area+32]
|
||||
.1:
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
exit_apl:
|
||||
mov [confirmation_type],exit_type
|
||||
call confirmation_action
|
||||
cmp [work_confirmation_yes],1
|
||||
jne red
|
||||
mcall -1
|
||||
.t_p:
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
;---------------------------------------------------------------------
|
||||
include 'key.inc'
|
||||
;---------------------------------------------------------------------
|
||||
@@ -388,15 +525,461 @@ include 'sort.inc'
|
||||
;---------------------------------------------------------------------
|
||||
include 'progrbar.inc'
|
||||
;---------------------------------------------------------------------
|
||||
include 'scroll.inc'
|
||||
;---------------------------------------------------------------------
|
||||
include 'file_inf.inc'
|
||||
;---------------------------------------------------------------------
|
||||
include 'text.inc'
|
||||
;---------------------------------------------------------------------
|
||||
;include_debug_strings
|
||||
plugins_directory db 0
|
||||
|
||||
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
|
||||
system_dir_Sort db '/sys/lib/sort.obj',0
|
||||
system_dir_Kmenu db '/sys/lib/kmenu.obj',0
|
||||
|
||||
align 4
|
||||
l_libs_start:
|
||||
if USE_STATIC_LIBS eq 0
|
||||
library01 l_libs system_dir_Boxlib+9,file_name,system_dir_Boxlib,\
|
||||
import_box_lib,plugins_directory
|
||||
end if
|
||||
|
||||
library02 l_libs system_dir_Sort+9,file_name,system_dir_Sort,\
|
||||
Sort_import,plugins_directory
|
||||
|
||||
library03 l_libs system_dir_Kmenu+9,file_name,system_dir_Kmenu,\
|
||||
import_libkmenu,plugins_directory
|
||||
end_l_libs:
|
||||
|
||||
if USE_STATIC_LIBS eq 0
|
||||
include '../../develop/libraries/box_lib/import.inc'
|
||||
else
|
||||
include '../../develop/libraries/box_lib/keys.inc'
|
||||
include '../../develop/libraries/box_lib/editbox.asm'
|
||||
include '../../develop/libraries/box_lib/scrollbar.asm'
|
||||
include '../../develop/libraries/box_lib/filebrowser.asm'
|
||||
scrollbar_v_draw dd scroll_bar_vertical.draw
|
||||
scrollbar_v_mouse dd scroll_bar_vertical.mouse
|
||||
FileBrowser_draw dd fb_draw_panel
|
||||
FileBrowser_mouse dd fb_mouse
|
||||
FileBrowser_key dd fb_key
|
||||
end if
|
||||
|
||||
align 4
|
||||
f_null_3:
|
||||
ret 8
|
||||
align 4
|
||||
f_null_1:
|
||||
ret 4
|
||||
|
||||
align 4
|
||||
proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dword, box_h:dword,\
|
||||
col_0:dword, col_1:dword, col_2:dword
|
||||
|
||||
mov esi,[col_1]
|
||||
and esi,111111101111111011111110b
|
||||
|
||||
mov eax,SF_DRAW_RECT
|
||||
;bottom line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
inc ebx ;для заливки диагональных пикселей
|
||||
mov ecx,[box_t]
|
||||
add ecx,[box_h]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move up and ->...<-
|
||||
sub ecx,1 shl 16 ;move up
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;right line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
add ebx,[box_w]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
sub ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;top line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move down and ->...<-
|
||||
add ecx,1 shl 16 ;move down
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;left line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
add ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
Sort_import:
|
||||
sort_init dd aSort_init
|
||||
sort_version dd aSort_version
|
||||
sort_dir dd aSort_SortDir
|
||||
sort_strcmpi dd aSort_strcmpi
|
||||
dd 0,0
|
||||
aSort_init db 'START',0
|
||||
aSort_version db 'version',0
|
||||
aSort_SortDir db 'SortDir',0
|
||||
aSort_strcmpi db 'strcmpi',0
|
||||
|
||||
align 4
|
||||
import_libkmenu:
|
||||
kmenu_init dd akmenu_init
|
||||
kmainmenu_draw dd akmainmenu_draw
|
||||
kmainmenu_dispatch_cursorevent dd akmainmenu_dispatch_cursorevent
|
||||
ksubmenu_new dd aksubmenu_new
|
||||
ksubmenu_delete dd aksubmenu_delete
|
||||
ksubmenu_draw dd aksubmenu_draw
|
||||
ksubmenu_add dd aksubmenu_add
|
||||
kmenuitem_new dd akmenuitem_new
|
||||
kmenuitem_delete dd akmenuitem_delete
|
||||
kmenuitem_draw dd akmenuitem_draw
|
||||
dd 0,0
|
||||
akmenu_init db 'kmenu_init',0
|
||||
akmainmenu_draw db 'kmainmenu_draw',0
|
||||
akmainmenu_dispatch_cursorevent db 'kmainmenu_dispatch_cursorevent',0
|
||||
aksubmenu_new db 'ksubmenu_new',0
|
||||
aksubmenu_delete db 'ksubmenu_delete',0
|
||||
aksubmenu_draw db 'ksubmenu_draw',0
|
||||
aksubmenu_add db 'ksubmenu_add',0
|
||||
akmenuitem_new db 'kmenuitem_new',0
|
||||
akmenuitem_delete db 'kmenuitem_delete',0
|
||||
akmenuitem_draw db 'kmenuitem_draw',0
|
||||
|
||||
;in:
|
||||
; buf_d = pointer to destination buffer 24-bit
|
||||
; buf_s = pointer to source buffer 32-bit (with icons)
|
||||
; ind = icon index
|
||||
;out:
|
||||
; eax = pointer to destination buffer + icon size
|
||||
align 4
|
||||
proc copy_icon uses ebx ecx esi edi, buf_d:dword, buf_s:dword, ind:dword
|
||||
mov edi,[buf_d]
|
||||
mov esi,[ind]
|
||||
imul esi,18*18*4
|
||||
cmp esi,[icons_max_size]
|
||||
jge .quit
|
||||
; fill the whole button area with sc.work:
|
||||
; write the first pixel, then propagate the 3-byte pattern with overlapping movsb
|
||||
mov eax,[sc.work_light]
|
||||
mov [edi],ax ; B, G
|
||||
shr eax,16
|
||||
mov [edi+2],al ; R
|
||||
push esi
|
||||
mov esi,edi
|
||||
add edi,3
|
||||
mov ecx,ICON_SIZE-3
|
||||
rep movsb
|
||||
pop esi
|
||||
; copy icon into the center
|
||||
add esi,[buf_s]
|
||||
mov edi,[buf_d]
|
||||
add edi,(BUTTON_SIZE_W*ICON_TOP_B+ICON_LEFT_B)*3
|
||||
mov ebx,18
|
||||
.cycle0:
|
||||
mov ecx,18
|
||||
.cycle1:
|
||||
cmp byte[esi+3],255
|
||||
je @f
|
||||
add edi,3 ;skip
|
||||
add esi,4
|
||||
loop .cycle1
|
||||
jmp .cycle1e
|
||||
@@:
|
||||
movsw ;copy
|
||||
movsb
|
||||
inc esi ; skip transparent byte
|
||||
loop .cycle1
|
||||
.cycle1e:
|
||||
add edi,(ICON_RIGHT_B+ICON_LEFT_B)*3
|
||||
dec ebx
|
||||
jnz .cycle0
|
||||
|
||||
; draw shadow 1
|
||||
mov eax,[sc.work]
|
||||
mov esi,[ind]
|
||||
imul esi,18*18*4
|
||||
add esi,(18+1)*4
|
||||
add esi,[buf_s]
|
||||
mov edi,[buf_d]
|
||||
add edi,(BUTTON_SIZE_W*(ICON_TOP_B+1)+ICON_LEFT_B+1)*3
|
||||
mov ebx,18-1
|
||||
.cycle2:
|
||||
mov ecx,18-1
|
||||
.cycle3:
|
||||
cmp byte[esi+3],255
|
||||
je @f
|
||||
cmp byte[esi+3-(18+1)*4],255
|
||||
jne @f
|
||||
stosw
|
||||
stosb
|
||||
jmp .1
|
||||
@@:
|
||||
add edi,3
|
||||
.1:
|
||||
add esi,4
|
||||
loop .cycle3
|
||||
add edi,(ICON_RIGHT_B+ICON_LEFT_B+1)*3
|
||||
add esi,4
|
||||
dec ebx
|
||||
jnz .cycle2
|
||||
|
||||
; draw shadow 2
|
||||
;mov eax,[sc.work]
|
||||
mov edi,[buf_d]
|
||||
add edi,(BUTTON_SIZE_W*(ICON_TOP_B+1)+ICON_LEFT_B+1)*3
|
||||
mov esi,[ind]
|
||||
imul esi,18*18*4
|
||||
add esi,[buf_s]
|
||||
mov ebx,18
|
||||
.cycle4:
|
||||
mov ecx,18
|
||||
.cycle5:
|
||||
cmp ebx,1
|
||||
jle .2
|
||||
cmp ecx,1
|
||||
jg @f
|
||||
.2:
|
||||
cmp byte[esi+3],255
|
||||
jne @f
|
||||
stosw
|
||||
stosb
|
||||
jmp .3
|
||||
@@:
|
||||
add edi,3
|
||||
.3:
|
||||
add esi,4
|
||||
loop .cycle5
|
||||
add edi,(ICON_RIGHT_B+ICON_LEFT_B)*3
|
||||
dec ebx
|
||||
jnz .cycle4
|
||||
|
||||
.quit:
|
||||
mov eax,[buf_d]
|
||||
add eax,ICON_SIZE
|
||||
ret
|
||||
endp
|
||||
|
||||
str_icon_18 db 'ICONS18',0
|
||||
|
||||
if USE_STATIC_LIBS eq 0
|
||||
numimages = 8
|
||||
str_icon_18w db 'ICONS18W',0
|
||||
end if
|
||||
|
||||
align 4
|
||||
fb_left:
|
||||
.type dd 0 ;+0
|
||||
.x:
|
||||
.size_x dw 400 ;+4
|
||||
.start_x dw 10 ;+6
|
||||
.y:
|
||||
.size_y dw 550 ;+8
|
||||
.start_y dw FILE_BR_TOP_LINE ;+10
|
||||
.icon_size_y dw 18 ; +12
|
||||
.icon_size_x dw 18 ; +14
|
||||
.line_size_x dw 0 ; +16
|
||||
.line_size_y dw 18+1 ; +18
|
||||
.type_size_x dw 0 ; +20
|
||||
.size_size_x dw 0 ; +22
|
||||
.date_size_x dw 0 ; +24
|
||||
.attributes_size_x dw 0 ; +26
|
||||
.icon_assoc_area dd 0 ; +28
|
||||
.icon_raw_area dd 0 ; +32
|
||||
.resolution_raw dd 0 ; +36
|
||||
.palette_raw dd 0 ; +40
|
||||
.directory_path_area dd 0 ; +44
|
||||
.file_name_area dd 0 ; +48
|
||||
.select_flag dd 0 ; +52
|
||||
.background_color dd 0xffffff ; +56
|
||||
.select_color dd 0xbbddff ; +60
|
||||
.seclect_text_color dd 0 ; +64
|
||||
.text_color dd 0 ; +68
|
||||
.reduct_text_color dd 0xff0000 ; +72
|
||||
.marked_text_color dd 0 ; +76
|
||||
.max_panel_line dd 0 ; +80
|
||||
.select_panel_counter dd 1 ; +84
|
||||
.folder_block dd 0 ; +88
|
||||
.start_draw_line dd 0 ; +92
|
||||
.start_draw_cursor_line dw 0 ; +96 ; pixels
|
||||
.folder_data dd 0 ; +98
|
||||
.temp_counter dd 0 ; +102
|
||||
.file_name_length dd 0 ; +106
|
||||
.marked_file dd 0 ; +110
|
||||
.extension_size dd 0 ; +114
|
||||
.extension_start dd 0 ; +118
|
||||
.type_table dd type_table ; +122
|
||||
.ini_file_start dd 0 ; +126
|
||||
.ini_file_end dd 0 ; +130
|
||||
.draw_scroll_bar dd 0 ; +134
|
||||
.font_size_y dw 9 ; +138
|
||||
.font_size_x dw 6 ; +140
|
||||
.mouse_keys dd 0 ; +142
|
||||
.mouse_keys_old dd 0 ; +146
|
||||
.mouse_pos dd 0 ; +150
|
||||
.mouse_keys_delta dd 0 ; +154
|
||||
.mouse_key_delay dd 50 ; +158
|
||||
.mouse_keys_tick dd 0 ; +162
|
||||
.start_draw_cursor_line_2 dw 0 ;+166
|
||||
.all_redraw dd 0 ;+168 0 - lines, 1 - all, 2 - folders+lines
|
||||
.selected_BDVK_adress dd 0 ;+172
|
||||
.key_action dw 0 ;+176
|
||||
.key_action_num dw 0 ;+178
|
||||
.name_temp_area dd name_temp_area ;+180
|
||||
.max_name_temp_size dd 0 ;+184
|
||||
.display_name_max_length dd 0 ;+188
|
||||
.draw_panel_selection_flag dd 0 ;+192
|
||||
.mouse_pos_old dd 0 ;+196
|
||||
.marked_counter dd 0 ;+200
|
||||
.keymap_pointer dd keymap_area ;+204
|
||||
|
||||
align 4
|
||||
fb_right:
|
||||
.type dd 0 ;+0
|
||||
.x:
|
||||
.size_x dw 400 ;+4
|
||||
.start_x dw 10 ;+6
|
||||
.y:
|
||||
.size_y dw 550 ;+8
|
||||
.start_y dw FILE_BR_TOP_LINE ;+10
|
||||
.icon_size_y dw 18 ; +12
|
||||
.icon_size_x dw 18 ; +14
|
||||
.line_size_x dw 0 ; +16
|
||||
.line_size_y dw 18+1 ; +18
|
||||
.type_size_x dw 0 ; +20
|
||||
.size_size_x dw 0 ; +22
|
||||
.date_size_x dw 0 ; +24
|
||||
.attributes_size_x dw 0 ; +26
|
||||
.icon_assoc_area dd 0 ; +28
|
||||
.icon_raw_area dd 0 ; +32
|
||||
.resolution_raw dd 0 ; +36
|
||||
.palette_raw dd 0 ; +40
|
||||
.directory_path_area dd 0 ; +44
|
||||
.file_name_area dd 0 ; +48
|
||||
.select_flag dd 0 ; +52
|
||||
.background_color dd 0xffffff ; +56
|
||||
.select_color dd 0xbbddff ; +60
|
||||
.seclect_text_color dd 0 ; +64
|
||||
.text_color dd 0 ; +68
|
||||
.reduct_text_color dd 0xff0000 ; +72
|
||||
.marked_text_color dd 0 ; +76
|
||||
.max_panel_line dd 0 ; +80
|
||||
.select_panel_counter dd 0 ; +84
|
||||
.folder_block dd 0 ; +88
|
||||
.start_draw_line dd 0 ; +92
|
||||
.start_draw_cursor_line dw 0 ; +96 ; pixels
|
||||
.folder_data dd 0 ; +98
|
||||
.temp_counter dd 0 ; +102
|
||||
.file_name_length dd 0 ; +106
|
||||
.marked_file dd 0 ; +110
|
||||
.extension_size dd 0 ; +114
|
||||
.extension_start dd 0 ; +118
|
||||
.type_table dd type_table ; +122
|
||||
.ini_file_start dd 0 ; +126
|
||||
.ini_file_end dd 0 ; +130
|
||||
.draw_scroll_bar dd 0 ; +134
|
||||
.font_size_y dw 9 ; +138
|
||||
.font_size_x dw 6 ; +140
|
||||
.mouse_keys dd 0 ; +142
|
||||
.mouse_keys_old dd 0 ; +146
|
||||
.mouse_pos dd 0 ; +150
|
||||
.mouse_keys_delta dd 0 ; +154
|
||||
.mouse_key_delay dd 50 ; +158
|
||||
.mouse_keys_tick dd 0 ; +162
|
||||
.start_draw_cursor_line_2 dw 0 ;+166
|
||||
.all_redraw dd 0 ;+168
|
||||
.selected_BDVK_adress dd 0 ;+172
|
||||
.key_action dw 0 ;+176
|
||||
.key_action_num dw 0 ;+178
|
||||
.name_temp_area dd name_temp_area ;+180
|
||||
.max_name_temp_size dd 0 ;+184
|
||||
.display_name_max_length dd 0 ;+188
|
||||
.draw_panel_selection_flag dd 0 ;+192
|
||||
.mouse_pos_old dd 0 ;+196
|
||||
.marked_counter dd 0 ;+200
|
||||
.keymap_pointer dd keymap_area ;+204
|
||||
|
||||
align 4
|
||||
mouse_scroll_data:
|
||||
.vertical rw 1
|
||||
.horizontal rw 1
|
||||
align 4
|
||||
sb_left scrollbar 15, 348, 200, FILE_BR_TOP_LINE, 16, 5, 1, 0, 0xeeeeee, 0xbbddff, 0, 1
|
||||
sb_right scrollbar 15, 708, 200, FILE_BR_TOP_LINE, 16, 5, 1, 0, 0xeeeeee, 0xbbddff, 0, 1
|
||||
|
||||
align 16
|
||||
I_END:
|
||||
;---------------------------------------------------------------------
|
||||
include 'data.inc'
|
||||
;---------------------------------------------------------------------
|
||||
mem:
|
||||
mem:
|
||||
+29
-140
@@ -1,158 +1,47 @@
|
||||
;---------------------------------------------------------------------
|
||||
mark_file:
|
||||
mov [marked_action],1
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
call calculate_left_data_1
|
||||
jmp .for_all
|
||||
.right_1:
|
||||
call calculate_right_data_1
|
||||
.for_all:
|
||||
add esi,32+299
|
||||
mov al,[esi]
|
||||
and al,1
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_2
|
||||
test al,al
|
||||
jnz @f
|
||||
inc [left_marked_counter]
|
||||
jmp .for_all_1
|
||||
@@:
|
||||
dec [left_marked_counter]
|
||||
.for_all_1:
|
||||
mov al,[esi]
|
||||
inc al
|
||||
and al,1
|
||||
mov [esi],al
|
||||
jmp key_80.1
|
||||
.right_2:
|
||||
test al,al
|
||||
jnz @f
|
||||
inc [right_marked_counter]
|
||||
jmp .for_all_1
|
||||
@@:
|
||||
dec [right_marked_counter]
|
||||
jmp .for_all_1
|
||||
;---------------------------------------------------------------------
|
||||
;out:
|
||||
; esi = fb_left.folder_data + 304 *
|
||||
; * (fb_left.start_draw_line + fb_left.start_draw_cursor_line / fb_left.line_size_y)
|
||||
align 4
|
||||
calculate_left_data_1:
|
||||
xor eax,eax
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
movzx eax,[fb_left.start_draw_cursor_line]
|
||||
xor edx,edx
|
||||
mov ebx,10
|
||||
movzx ebx,[fb_left.line_size_y]
|
||||
div ebx
|
||||
mov esi,[left_start_draw_line]
|
||||
mov esi,[fb_left.start_draw_line]
|
||||
add esi,eax
|
||||
imul esi,304
|
||||
add esi,[left_folder_data]
|
||||
add esi,[fb_left.folder_data]
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;out:
|
||||
; esi = fb_right.folder_data + 304 *
|
||||
; * (fb_right.start_draw_line + fb_right.start_draw_cursor_line / fb_right.line_size_y)
|
||||
align 4
|
||||
calculate_right_data_1:
|
||||
xor eax,eax
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
movzx eax,[fb_right.start_draw_cursor_line]
|
||||
xor edx,edx
|
||||
mov ebx,10
|
||||
movzx ebx,[fb_right.line_size_y]
|
||||
div ebx
|
||||
mov esi,[right_start_draw_line]
|
||||
mov esi,[fb_right.start_draw_line]
|
||||
add esi,eax
|
||||
imul esi,304
|
||||
add esi,[right_folder_data]
|
||||
add esi,[fb_right.folder_data]
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
mark_all_file:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
mov ebp,[left_folder_block]
|
||||
.start:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[left_folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx],word '..'
|
||||
jne .continue
|
||||
cmp [ebx+2],byte 0
|
||||
je .continue_1
|
||||
.continue:
|
||||
call select_mark_action
|
||||
.continue_1:
|
||||
align 4
|
||||
proc mark_file_clear_all uses eax ecx edi, tmem:dword, tsize:dword
|
||||
xor al,al
|
||||
mov edi,[tmem]
|
||||
mov ecx,edi
|
||||
add ecx,[tsize]
|
||||
add edi,32+299
|
||||
cld
|
||||
@@:
|
||||
dec ebp
|
||||
jnz .start
|
||||
call draw_left_panel
|
||||
cmp [mark_action_counter],0
|
||||
jne @f
|
||||
mov eax,[left_folder_block]
|
||||
; dec eax
|
||||
; mov [left_marked_counter],eax
|
||||
; jmp still
|
||||
jmp .end
|
||||
@@:
|
||||
cmp [mark_action_counter],1
|
||||
jne @f
|
||||
mov [left_marked_counter],0
|
||||
jmp still
|
||||
@@:
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[left_marked_counter]
|
||||
.end:
|
||||
dec eax
|
||||
mov [left_marked_counter],eax
|
||||
jmp still
|
||||
.right_1:
|
||||
mov ebp,[right_folder_block]
|
||||
.start_1:
|
||||
mov ebx,ebp
|
||||
dec ebx
|
||||
imul ebx,304
|
||||
add ebx,[right_folder_data]
|
||||
add ebx,32+40
|
||||
cmp [ebx],word '..'
|
||||
jne .continue_2
|
||||
cmp [ebx+2],byte 0
|
||||
je .continue_3
|
||||
.continue_2:
|
||||
call select_mark_action
|
||||
.continue_3:
|
||||
@@:
|
||||
dec ebp
|
||||
jnz .start_1
|
||||
call draw_right_panel
|
||||
cmp [mark_action_counter],0
|
||||
jne @f
|
||||
mov eax,[right_folder_block]
|
||||
; dec eax
|
||||
; mov [right_marked_counter],eax
|
||||
; jmp still
|
||||
jmp .end_1
|
||||
@@:
|
||||
cmp [mark_action_counter],1
|
||||
jne @f
|
||||
mov [right_marked_counter],0
|
||||
jmp still
|
||||
@@:
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[right_marked_counter]
|
||||
.end_1:
|
||||
dec eax
|
||||
mov [right_marked_counter],eax
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
select_mark_action:
|
||||
add ebx,299-40
|
||||
cmp [mark_action_counter],0
|
||||
jne @f
|
||||
mov [ebx],byte 1
|
||||
jmp .continue
|
||||
@@:
|
||||
cmp [mark_action_counter],1
|
||||
jne @f
|
||||
mov [ebx],byte 0
|
||||
jmp .continue
|
||||
@@:
|
||||
mov al,[ebx]
|
||||
inc al
|
||||
and al,1
|
||||
mov [ebx],al
|
||||
.continue:
|
||||
stosb
|
||||
add edi,304-1
|
||||
cmp edi,ecx
|
||||
jl @b
|
||||
ret
|
||||
endp
|
||||
;---------------------------------------------------------------------
|
||||
+116
-21
@@ -1,40 +1,62 @@
|
||||
align 4
|
||||
main_menu dd 0
|
||||
main_menu_file dd 0
|
||||
main_menu_select dd 0
|
||||
main_menu_sort dd 0
|
||||
main_menu_help dd 0
|
||||
|
||||
KMENUITEM_NORMAL equ 0
|
||||
KMENUITEM_SUBMENU equ 1
|
||||
KMENUITEM_SEPARATOR equ 2
|
||||
|
||||
align 4
|
||||
draw_menu_bar:
|
||||
mov ecx,[skin_high]
|
||||
shl ecx,16
|
||||
mov cx,19
|
||||
pushad
|
||||
mov ecx,19
|
||||
mov ebx,[window_width]
|
||||
sub ebx,9
|
||||
add ebx,5 shl 16
|
||||
mcall 13,,,0xcccccc
|
||||
add ecx,37 shl 16
|
||||
mov cx,3
|
||||
mcall
|
||||
mcall SF_DRAW_RECT, ,,[sc.work]
|
||||
pushad
|
||||
cld
|
||||
stdcall [kmainmenu_draw], [main_menu]
|
||||
popad
|
||||
add ecx,(F_BUT_PANEL_H+19) shl 16
|
||||
mov cx,FILE_BR_TOP_LINE-F_BUT_PANEL_H-49
|
||||
mcall ; horizontal line before disk buttons
|
||||
push ecx
|
||||
add ecx,16 shl 16
|
||||
mcall
|
||||
ror ecx,16
|
||||
add cx,FILE_BR_TOP_LINE-F_BUT_PANEL_H-36
|
||||
ror ecx,16
|
||||
mov cx,3
|
||||
mcall ; horizontal line after disk buttons
|
||||
add ecx,16 shl 16
|
||||
mov cx,1
|
||||
mcall
|
||||
mcall ; horizontal line before sort buttons
|
||||
pop ecx
|
||||
add ecx,3 shl 16
|
||||
mov eax,[window_high]
|
||||
shr ecx,16
|
||||
add ecx,3
|
||||
mov eax,[window_high]
|
||||
sub eax,ecx
|
||||
sub eax,4
|
||||
shl ecx,16
|
||||
add ecx,eax
|
||||
mov bx,2
|
||||
sub ecx,33
|
||||
mcall 13
|
||||
sub ecx,[skin_high]
|
||||
mcall SF_DRAW_RECT ; left vertical line
|
||||
push ebx
|
||||
ror ebx,16
|
||||
mov bx,[right_panel_x.start_x]
|
||||
sub bx,2
|
||||
rol ebx,16
|
||||
movzx ebx,[fb_left.start_x]
|
||||
add bx,[fb_left.size_x]
|
||||
add bx,[sb_left.x_size]
|
||||
inc bx
|
||||
mov si,bx
|
||||
shl ebx,16
|
||||
add bx,[fb_right.start_x]
|
||||
sub bx,si
|
||||
push ecx
|
||||
sub ecx,13
|
||||
add ecx,13 shl 16
|
||||
mcall ; middle vertical line
|
||||
mcall ; middle vertical line
|
||||
pop ecx
|
||||
pop ebx
|
||||
mov ax,cx
|
||||
@@ -45,7 +67,80 @@ draw_menu_bar:
|
||||
mov eax,[window_width]
|
||||
mov bx,ax
|
||||
sub ebx,9
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT ; horizontal line before path to the current folder
|
||||
add ecx,15 shl 16
|
||||
mcall
|
||||
mcall ; horizontal line after path to the current folder
|
||||
popad
|
||||
ret
|
||||
|
||||
align 4
|
||||
init_menu:
|
||||
cmp [library03.status_lib],0 ; test load library
|
||||
jnz .end
|
||||
stdcall [kmenu_init], sc
|
||||
stdcall [ksubmenu_new]
|
||||
mov [main_menu], eax
|
||||
|
||||
stdcall [ksubmenu_new]
|
||||
mov [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Copy_file, 153
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Move_file, 154
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Create_dir, 152
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Delete_files, 157
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Exit, 112
|
||||
stdcall [ksubmenu_add], [main_menu_file], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_File, [main_menu_file]
|
||||
stdcall [ksubmenu_add], [main_menu], eax
|
||||
|
||||
stdcall [ksubmenu_new]
|
||||
mov [main_menu_select], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_File_selection, 170
|
||||
stdcall [ksubmenu_add], [main_menu_select], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Select_all, 171
|
||||
stdcall [ksubmenu_add], [main_menu_select], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Clear_selection, 172
|
||||
stdcall [ksubmenu_add], [main_menu_select], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_Invert_selection, 173
|
||||
stdcall [ksubmenu_add], [main_menu_select], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Select, [main_menu_select]
|
||||
stdcall [ksubmenu_add], [main_menu], eax
|
||||
|
||||
cmp [sort_init], f_null_1
|
||||
je @f
|
||||
stdcall [ksubmenu_new]
|
||||
mov [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.name, 142
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.type, 143
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.size, 144
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.date, 145
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.name, 146
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.type, 147
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.size, 148
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sort_button_name.date, 149
|
||||
stdcall [ksubmenu_add], [main_menu_sort], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Sort, [main_menu_sort]
|
||||
stdcall [ksubmenu_add], [main_menu], eax
|
||||
@@:
|
||||
stdcall [ksubmenu_new]
|
||||
mov [main_menu_help], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_menu_About, 101
|
||||
stdcall [ksubmenu_add], [main_menu_help], eax
|
||||
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Help, [main_menu_help]
|
||||
stdcall [ksubmenu_add], [main_menu], eax
|
||||
.end:
|
||||
ret
|
||||
@@ -1,6 +1,6 @@
|
||||
;---------------------------------------------------------------------
|
||||
key_menu:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
cmp [extended_key],1
|
||||
je .extended_key
|
||||
test al, al
|
||||
@@ -59,15 +59,15 @@ key_menu:
|
||||
.end_2:
|
||||
cmp [alt_flag],0
|
||||
je .for_all
|
||||
cmp [select_panel_counter],0
|
||||
cmp [fb_left.select_panel_counter],1
|
||||
je .end_1
|
||||
mov [close_menu],2
|
||||
ret
|
||||
.end_3:
|
||||
cmp [alt_flag],0
|
||||
je .for_all
|
||||
cmp [select_panel_counter],0
|
||||
jne .end_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .end_1
|
||||
mov [close_menu],2
|
||||
ret
|
||||
.end_4:
|
||||
@@ -140,7 +140,7 @@ menu_key_82:
|
||||
xor ecx,ecx
|
||||
mov cl,[esi+2]
|
||||
sub ecx,0x30
|
||||
mcall 24,5
|
||||
mcall SF_CD, SSF_INSERT_TRAY
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
@@ -156,7 +156,7 @@ menu_key_83:
|
||||
xor ecx,ecx
|
||||
mov cl,[esi+2]
|
||||
sub ecx,0x30
|
||||
mcall 24,4
|
||||
mcall SF_CD, SSF_EJECT_TRAY
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
@@ -169,18 +169,17 @@ menu_key_28:
|
||||
menu_key_end:
|
||||
jmp key_menu.end
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
key_menu_left:
|
||||
mov [close_menu],0
|
||||
mov [press_enter_menu],0
|
||||
mov [press_enter_menu],0
|
||||
call key_menu
|
||||
cmp [press_enter_menu],1
|
||||
je .press_enter_menu
|
||||
cmp [close_menu],0
|
||||
je draw_left_select_disk_menu.red
|
||||
.1:
|
||||
; mov [left_panel_clear_all],1
|
||||
call draw_left_panel
|
||||
; mov [right_panel_clear_all],1
|
||||
call draw_right_panel
|
||||
cmp [alt_flag],0
|
||||
je still
|
||||
@@ -193,22 +192,21 @@ key_menu_left:
|
||||
add esi,retrieved_devices_table
|
||||
inc esi
|
||||
call copy_folder_name
|
||||
mov [left_start_draw_cursor_line],0
|
||||
call proc_read_folder
|
||||
jmp still
|
||||
mov [fb_left.start_draw_cursor_line],0
|
||||
jmp proc_read_folder
|
||||
;jmp still
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
key_menu_right:
|
||||
mov [close_menu],0
|
||||
mov [press_enter_menu],0
|
||||
mov [press_enter_menu],0
|
||||
call key_menu
|
||||
cmp [press_enter_menu],1
|
||||
je .press_enter_menu
|
||||
cmp [close_menu],0
|
||||
je draw_right_select_disk_menu.red
|
||||
.1:
|
||||
; mov [left_panel_clear_all],1
|
||||
call draw_left_panel
|
||||
; mov [right_panel_clear_all],1
|
||||
call draw_right_panel
|
||||
cmp [alt_flag],0
|
||||
je still
|
||||
@@ -221,27 +219,27 @@ key_menu_right:
|
||||
add esi,retrieved_devices_table
|
||||
inc esi
|
||||
call copy_folder_name_1
|
||||
mov [right_start_draw_cursor_line],0
|
||||
call proc_read_folder_1
|
||||
jmp still
|
||||
mov [fb_right.start_draw_cursor_line],0
|
||||
jmp proc_read_folder_1
|
||||
;jmp still
|
||||
;---------------------------------------------------------------------
|
||||
draw_left_select_disk_menu:
|
||||
call device_detect_f70
|
||||
mov [select_panel_counter],0
|
||||
mov [fb_left.select_panel_counter],1
|
||||
call draw_left_panel
|
||||
call draw_right_panel
|
||||
mov [start_draw_menu_cursor_line],0
|
||||
.red:
|
||||
call draw_left_menu
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je red
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je key_menu_left
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je @f
|
||||
cmp eax,6
|
||||
cmp eax,EV_MOUSE
|
||||
je mouse_menu_left
|
||||
jmp .still
|
||||
@@:
|
||||
@@ -250,21 +248,21 @@ draw_left_select_disk_menu:
|
||||
;---------------------------------------------------------------------
|
||||
draw_right_select_disk_menu:
|
||||
call device_detect_f70
|
||||
mov [select_panel_counter],1
|
||||
mov [fb_right.select_panel_counter],1
|
||||
call draw_left_panel
|
||||
call draw_right_panel
|
||||
mov [start_draw_menu_cursor_line],0
|
||||
.red:
|
||||
call draw_right_menu
|
||||
.still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,EV_REDRAW
|
||||
je red
|
||||
cmp eax,2
|
||||
cmp eax,EV_KEY
|
||||
je key_menu_right
|
||||
cmp eax,3
|
||||
cmp eax,EV_BUTTON
|
||||
je @f
|
||||
cmp eax,6
|
||||
cmp eax,EV_MOUSE
|
||||
je mouse_menu_right
|
||||
jmp .still
|
||||
@@:
|
||||
@@ -272,30 +270,28 @@ draw_right_select_disk_menu:
|
||||
jmp button
|
||||
;---------------------------------------------------------------------
|
||||
draw_left_menu:
|
||||
mov ebx,[left_panel_x]
|
||||
mov ebx,[fb_left.x]
|
||||
mov bx,60
|
||||
mov ecx,[left_panel_y]
|
||||
mov ecx,[fb_left.y]
|
||||
mov eax,[retrieved_devices_table_counter]
|
||||
mov cx,ax
|
||||
imul cx,10
|
||||
mov edx,0xffffcc
|
||||
dec ebx
|
||||
mov eax,13
|
||||
mcall
|
||||
dec ebx
|
||||
mcall SF_DRAW_RECT
|
||||
call draw_menu_Selection
|
||||
call draw_menu_data
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
draw_right_menu:
|
||||
mov ebx,[right_panel_x]
|
||||
mov ebx,[fb_right.x]
|
||||
mov bx,60
|
||||
mov ecx,[right_panel_y]
|
||||
mov ecx,[fb_right.y]
|
||||
mov eax,[retrieved_devices_table_counter]
|
||||
mov cx,ax
|
||||
imul cx,10
|
||||
mov edx,0xffffcc
|
||||
mov eax,13
|
||||
mcall
|
||||
mcall SF_DRAW_RECT
|
||||
call draw_menu_Selection
|
||||
call draw_menu_data
|
||||
ret
|
||||
@@ -306,7 +302,7 @@ draw_menu_data:
|
||||
mov bx,cx
|
||||
mov ebp,0
|
||||
.start:
|
||||
mcall 4, ,0x80000000
|
||||
mcall SF_DRAW_TEXT, ,0x80000000
|
||||
add ebx,10
|
||||
add edx,10
|
||||
inc ebp
|
||||
@@ -322,15 +318,14 @@ draw_menu_Selection:
|
||||
add ecx,eax
|
||||
mov cx,10
|
||||
mov edx,0xbbffbb
|
||||
mov eax,13
|
||||
mcall
|
||||
mcall SF_DRAW_RECT
|
||||
pop ecx ebx
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
mouse_menu_left:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET, SSF_BUTTON
|
||||
mov [mouse_keys],eax
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET, SSF_WINDOW_POSITION
|
||||
mov [mouse_position],eax
|
||||
test eax,0x80000000
|
||||
jnz draw_left_select_disk_menu.still
|
||||
@@ -345,7 +340,7 @@ mouse_menu_left:
|
||||
cmp eax,[window_high]
|
||||
ja draw_left_select_disk_menu.still
|
||||
xor ecx,ecx
|
||||
mov cx,[left_panel_y.start_y]
|
||||
mov cx,[fb_left.start_y]
|
||||
cmp ax,cx
|
||||
jbe .close
|
||||
mov edx,[retrieved_devices_table_counter]
|
||||
@@ -353,13 +348,13 @@ mouse_menu_left:
|
||||
add cx,dx
|
||||
cmp ax,cx
|
||||
jae .close
|
||||
mov cx,[left_panel_x.start_x]
|
||||
mov cx,[fb_left.start_x]
|
||||
cmp bx,cx
|
||||
jbe .close
|
||||
add cx,60
|
||||
cmp bx,cx
|
||||
jae .close
|
||||
sub ax,[left_panel_y.start_y]
|
||||
sub ax,[fb_left.start_y]
|
||||
mov ebx,10
|
||||
xor edx,edx
|
||||
div ebx
|
||||
@@ -370,14 +365,13 @@ mouse_menu_left:
|
||||
.close:
|
||||
cmp [mouse_keys],0
|
||||
je draw_left_select_disk_menu.still
|
||||
; mov [left_panel_clear_all],1
|
||||
call draw_left_panel
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
mouse_menu_right:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET, SSF_BUTTON
|
||||
mov [mouse_keys],eax
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET, SSF_WINDOW_POSITION
|
||||
mov [mouse_position],eax
|
||||
test eax,0x80000000
|
||||
jnz draw_right_select_disk_menu.still
|
||||
@@ -392,7 +386,7 @@ mouse_menu_right:
|
||||
cmp eax,[window_high]
|
||||
ja draw_right_select_disk_menu.still
|
||||
xor ecx,ecx
|
||||
mov cx,[right_panel_y.start_y]
|
||||
mov cx,[fb_right.start_y]
|
||||
cmp ax,cx
|
||||
jbe .close
|
||||
mov edx,[retrieved_devices_table_counter]
|
||||
@@ -400,13 +394,13 @@ mouse_menu_right:
|
||||
add cx,dx
|
||||
cmp ax,cx
|
||||
jae .close
|
||||
mov cx,[right_panel_x.start_x]
|
||||
mov cx,[fb_right.start_x]
|
||||
cmp bx,cx
|
||||
jbe .close
|
||||
add cx,60
|
||||
cmp bx,cx
|
||||
jae .close
|
||||
sub ax,[right_panel_y.start_y]
|
||||
sub ax,[fb_right.start_y]
|
||||
mov ebx,10
|
||||
xor edx,edx
|
||||
div ebx
|
||||
@@ -417,7 +411,6 @@ mouse_menu_right:
|
||||
.close:
|
||||
cmp [mouse_keys],0
|
||||
je draw_right_select_disk_menu.still
|
||||
; mov [right_panel_clear_all],1
|
||||
call draw_right_panel
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
+226
-254
@@ -1,266 +1,238 @@
|
||||
align 4
|
||||
mouse:
|
||||
mcall 18,7
|
||||
mcall SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
|
||||
cmp [active_process],eax
|
||||
jne still
|
||||
mcall 37,7
|
||||
mov [mouse_scroll_data],eax
|
||||
; test eax,eax
|
||||
; jnz .continue_2
|
||||
mcall 37,2
|
||||
cmp [mouse_keys],eax
|
||||
je @f
|
||||
mov [mouse_keys],eax
|
||||
mov [mouse_keys_delta],0
|
||||
jmp .continue_2
|
||||
@@:
|
||||
mov [mouse_keys_delta],1
|
||||
.continue_2:
|
||||
mcall 37,1
|
||||
mov [mouse_position],eax
|
||||
; mcall 18,7
|
||||
; cmp [active_process],eax
|
||||
; jne still
|
||||
mov eax,[mouse_position]
|
||||
test eax,0x80000000
|
||||
jnz still
|
||||
test eax,0x8000
|
||||
jnz still
|
||||
mov ebx,eax
|
||||
shr ebx,16
|
||||
shl eax,16
|
||||
shr eax,16
|
||||
cmp [mouse_keys_delta],0
|
||||
je @f
|
||||
cmp [scroll_pointer],0
|
||||
jne .check_scroll_bar_left
|
||||
@@:
|
||||
cmp ebx,[window_width]
|
||||
ja still
|
||||
cmp eax,[window_high]
|
||||
ja still
|
||||
.check_scroll_bar_left:
|
||||
xor ecx,ecx
|
||||
mov cx,[left_panel_y.start_y]
|
||||
cmp [mouse_keys_delta],0
|
||||
je @f
|
||||
cmp [scroll_pointer],1
|
||||
je .check_scroll_bar_left_event
|
||||
cmp [scroll_pointer],2
|
||||
je .check_scroll_bar_right_event
|
||||
@@:
|
||||
cmp ax,cx
|
||||
jbe .other
|
||||
add cx,[left_panel_y.size_y]
|
||||
cmp ax,cx
|
||||
jae .other
|
||||
mov cx,[left_panel_x.start_x]
|
||||
cmp bx,cx
|
||||
jbe .other
|
||||
add cx,[left_panel_x.size_x]
|
||||
cmp bx,cx
|
||||
jae .check_scroll_bar_right
|
||||
mov edx,[left_folder_block]
|
||||
cmp edx,[max_panel_line]
|
||||
jbe @f
|
||||
.check_scroll_bar_left_event:
|
||||
mov [scroll_bar_event],0
|
||||
call check_scroll_left_event
|
||||
cmp [scroll_bar_event],0
|
||||
jne still
|
||||
mov [scroll_bar_event],0
|
||||
call check_scroll_bar_left_event
|
||||
cmp [scroll_bar_event],0
|
||||
jne still ;.continue
|
||||
; cmp [scroll_pointer],1
|
||||
; je .continue
|
||||
@@:
|
||||
call check_left_panel_mouse_event
|
||||
; jmp still
|
||||
.continue:
|
||||
; mov [temp_edx],mouse_left_panel
|
||||
; call mouse.draw_data
|
||||
; mov [scroll_pointer],0
|
||||
; mov [mouse_keys_delta_1],0
|
||||
jmp still
|
||||
cmp [library03.status_lib],0 ; test load library
|
||||
jnz .m_end
|
||||
cld
|
||||
stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
|
||||
|
||||
.check_scroll_bar_right:
|
||||
xor ecx,ecx
|
||||
mov cx,[right_panel_x.start_x]
|
||||
cmp bx,cx
|
||||
jbe .other
|
||||
add cx,[right_panel_x.size_x]
|
||||
cmp bx,cx
|
||||
jae .other
|
||||
mov edx,[right_folder_block]
|
||||
cmp edx,[max_panel_line]
|
||||
jbe @f
|
||||
.check_scroll_bar_right_event:
|
||||
mov [scroll_bar_event],0
|
||||
call check_scroll_right_event
|
||||
cmp [scroll_bar_event],0
|
||||
jne still
|
||||
mov [scroll_bar_event],0
|
||||
call check_scroll_bar_right_event
|
||||
cmp [scroll_bar_event],0
|
||||
jne still ;.continue_1
|
||||
mov eax,[main_menu]
|
||||
cmp dword[eax+16],-1
|
||||
je @f
|
||||
mov [m_lost],1
|
||||
jmp still
|
||||
@@:
|
||||
call check_right_panel_mouse_event
|
||||
.continue_1:
|
||||
; mov [temp_edx],mouse_right_panel
|
||||
; call mouse.draw_data
|
||||
jmp still
|
||||
cmp [m_lost],0
|
||||
je .m_end
|
||||
dec [m_lost]
|
||||
jmp still
|
||||
.m_end:
|
||||
|
||||
.other:
|
||||
; mov [temp_edx],mouse_other_panel
|
||||
; call mouse.draw_data
|
||||
jmp still
|
||||
mcall SF_MOUSE_GET, SSF_SCROLL_DATA
|
||||
mov [mouse_scroll_data],eax
|
||||
mcall SF_MOUSE_GET, SSF_WINDOW_POSITION
|
||||
mov [mouse_position],eax
|
||||
|
||||
;.draw_data:
|
||||
; pusha
|
||||
; mov [temp_eax],eax
|
||||
; mcall 13,<190,400>,<3,15>,0x0
|
||||
; xor ecx,ecx
|
||||
; mov cx,[mouse_position.x]
|
||||
; mcall 47,0x80000, ,<200, 5>,0xffffff
|
||||
; mov cx,[mouse_position.y]
|
||||
; mcall 47,0x80000, ,<300, 5>,0xffffff
|
||||
; mcall 47,0x80000,[mouse_keys],<400, 5>,0xffffff
|
||||
; mcall 4,<500,5>,0xffffff,[temp_edx],5
|
||||
; mcall 47,0x80000,[mouse_keys],<200, 5>,0xffffff
|
||||
; popa
|
||||
; ret
|
||||
cmp [sb_left.delta2],0
|
||||
jnz .scrollbar_l
|
||||
cmp [sb_right.delta2],0
|
||||
jnz .scrollbar_r
|
||||
|
||||
mov [fb_left.select_flag],0
|
||||
stdcall [FileBrowser_mouse], fb_left
|
||||
cmp [fb_left.select_flag],0
|
||||
jz @f
|
||||
mov eax,fb_left.mouse_keys_delta
|
||||
cmp [eax],dword 3
|
||||
jne .scrollbar_l
|
||||
mov [eax],dword 0
|
||||
jmp key_28.1
|
||||
@@:
|
||||
mov [fb_right.select_flag],0
|
||||
stdcall [FileBrowser_mouse], fb_right
|
||||
cmp [fb_right.select_flag],0
|
||||
jz @f
|
||||
mov eax,fb_right.mouse_keys_delta
|
||||
cmp [eax],dword 3
|
||||
jne .scrollbar_r
|
||||
mov [eax],dword 0
|
||||
jmp key_28.1
|
||||
@@:
|
||||
|
||||
stdcall [scrollbar_v_mouse], sb_left
|
||||
cmp [sb_left.delta2],0
|
||||
jz @f
|
||||
cmp [fb_left.select_panel_counter],1
|
||||
je @f
|
||||
mov [fb_left.select_panel_counter],1
|
||||
mov [fb_right.select_panel_counter],0
|
||||
call on_fb_focus_change
|
||||
@@:
|
||||
cmp [sb_left.redraw],0
|
||||
jnz .check_scroll_event
|
||||
|
||||
stdcall [scrollbar_v_mouse], sb_right
|
||||
cmp [sb_right.delta2],0
|
||||
jz @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
mov [fb_left.select_panel_counter],0
|
||||
mov [fb_right.select_panel_counter],1
|
||||
call on_fb_focus_change
|
||||
@@:
|
||||
cmp [sb_right.redraw],0
|
||||
jnz .check_scroll_event
|
||||
;---------------------------------------------------
|
||||
align 4
|
||||
.scrollbar_l:
|
||||
mov eax,[sb_left.max_area]
|
||||
cmp eax,[sb_left.cur_area]
|
||||
jbe .check_scroll_event
|
||||
|
||||
stdcall [scrollbar_v_mouse], sb_left
|
||||
cmp [sb_left.redraw],0
|
||||
je .check_scroll_event
|
||||
mov [sb_left.redraw],0
|
||||
|
||||
mov [fb_left.all_redraw],2
|
||||
mov eax,[sb_left.position]
|
||||
mov ebx,fb_left
|
||||
call on_sb_change_fb_update
|
||||
mov [fb_left.start_draw_line],eax
|
||||
|
||||
stdcall [FileBrowser_draw], fb_left
|
||||
xor eax,eax
|
||||
mov [fb_left.all_redraw],eax
|
||||
jmp still
|
||||
;---------------------------------------------------
|
||||
align 4
|
||||
.scrollbar_r:
|
||||
mov eax,[sb_right.max_area]
|
||||
cmp eax,[sb_right.cur_area]
|
||||
jbe .check_scroll_event
|
||||
|
||||
stdcall [scrollbar_v_mouse], sb_right
|
||||
cmp [sb_right.redraw],0
|
||||
je .check_scroll_event
|
||||
mov [sb_right.redraw],0
|
||||
|
||||
mov [fb_right.all_redraw],2
|
||||
mov eax,[sb_right.position]
|
||||
mov ebx,fb_right
|
||||
call on_sb_change_fb_update
|
||||
mov [fb_right.start_draw_line],eax
|
||||
|
||||
stdcall [FileBrowser_draw], fb_right
|
||||
xor eax,eax
|
||||
mov [fb_right.all_redraw],eax
|
||||
jmp still
|
||||
;---------------------------------------------------
|
||||
align 4
|
||||
.check_scroll_event:
|
||||
mov eax,[mouse_position]
|
||||
movzx ebx,ax ; ebx mouse y
|
||||
shr eax,16 ; eax mouse x
|
||||
|
||||
mov cx,[fb_right.start_x]
|
||||
mov dx,[fb_left.start_y]
|
||||
|
||||
cmp bx,dx
|
||||
jb still ; min y
|
||||
|
||||
add dx,[fb_left.size_y]
|
||||
cmp bx,dx
|
||||
ja still ; max y
|
||||
|
||||
xor esi,esi
|
||||
cmp ax,cx
|
||||
jb @f ; coord x
|
||||
inc esi
|
||||
@@:
|
||||
cmp [fb_right.select_panel_counter],esi
|
||||
je .no_click
|
||||
mcall SF_MOUSE_GET, SSF_BUTTON_EXT
|
||||
bt eax,8
|
||||
jc @f
|
||||
bt eax,9
|
||||
jnc .no_click
|
||||
@@:
|
||||
mov [fb_right.select_panel_counter],esi
|
||||
xor esi,1
|
||||
mov [fb_left.select_panel_counter],esi
|
||||
xor esi,1
|
||||
call on_fb_focus_change
|
||||
.no_click:
|
||||
|
||||
mov eax,[mouse_scroll_data]
|
||||
test eax,eax
|
||||
jz still
|
||||
|
||||
test ax,0x8000
|
||||
jnz .decr
|
||||
shr eax,16
|
||||
test ax,0x8000
|
||||
jnz .decr_1
|
||||
|
||||
movzx ecx,[mouse_scroll_data.vertical]
|
||||
test ecx,ecx
|
||||
jnz @f
|
||||
mov cx,[mouse_scroll_data.horizontal]
|
||||
test ecx,ecx
|
||||
jz still
|
||||
@@:
|
||||
push ebx ecx
|
||||
mov ebx,1
|
||||
call fb_on_key_1
|
||||
pop ecx ebx
|
||||
dec ecx
|
||||
jnz @b
|
||||
jmp still
|
||||
;----------------------------------------
|
||||
.decr:
|
||||
movzx ebx,[mouse_scroll_data.vertical]
|
||||
jmp @f
|
||||
.decr_1:
|
||||
movzx ebx,[mouse_scroll_data.horizontal]
|
||||
@@:
|
||||
mov ecx,0xffff
|
||||
sub ecx,ebx
|
||||
inc ecx
|
||||
@@:
|
||||
push ebx ecx
|
||||
mov ebx,2
|
||||
call fb_on_key_1
|
||||
pop ecx ebx
|
||||
dec ecx
|
||||
jnz @b
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
check_left_panel_mouse_event:
|
||||
; cmp [scroll_pointer],0
|
||||
; je @f
|
||||
mov [scroll_pointer],0
|
||||
; ret
|
||||
;in:
|
||||
; eax - scrool bar position
|
||||
; ebx - pointer to file browser
|
||||
align 4
|
||||
on_sb_change_fb_update:
|
||||
cmp [ebx+fb_left.start_draw_line-fb_left],eax
|
||||
je .end
|
||||
push ecx edx
|
||||
mov ecx,eax
|
||||
sub ecx,[ebx+fb_left.start_draw_line-fb_left]
|
||||
movzx edx,word[ebx+fb_left.line_size_y-fb_left]
|
||||
imul ecx,edx
|
||||
mov dx,[ebx+fb_left.start_draw_cursor_line-fb_left]
|
||||
sub dx,cx
|
||||
cmp dx,0
|
||||
jge @f
|
||||
xor dx,dx
|
||||
@@:
|
||||
cmp [mouse_keys_delta],0
|
||||
jz .start
|
||||
cmp [mouse_keys],0
|
||||
jz .end
|
||||
.start:
|
||||
sub ax,[left_panel_y.start_y]
|
||||
mov ebx,10
|
||||
xor edx,edx
|
||||
div ebx
|
||||
imul eax,10
|
||||
cmp [select_panel_counter],0
|
||||
je @f
|
||||
mov [select_panel_counter],0
|
||||
mov [mouse_keys_delta_1],0
|
||||
push eax
|
||||
call draw_right_panel
|
||||
pop eax
|
||||
jmp .continue
|
||||
@@:
|
||||
cmp [left_start_draw_cursor_line],ax
|
||||
jne @f
|
||||
cmp [mouse_keys],0
|
||||
jnz .continue
|
||||
cmp [mouse_keys_delta],0
|
||||
je .enter
|
||||
@@:
|
||||
mov [mouse_keys_delta_1],0
|
||||
.continue:
|
||||
imul ebx,[left_folder_block],10
|
||||
cmp eax,ebx
|
||||
jb @f
|
||||
sub ebx,10
|
||||
mov [left_start_draw_cursor_line],bx
|
||||
jmp .continue_1
|
||||
@@:
|
||||
mov [left_start_draw_cursor_line],ax
|
||||
.continue_1:
|
||||
call draw_left_panel
|
||||
mov [ebx+fb_left.start_draw_cursor_line-fb_left],dx
|
||||
mov [ebx+fb_left.all_redraw-fb_left],1
|
||||
pop edx ecx
|
||||
.end:
|
||||
ret
|
||||
.enter:
|
||||
cmp [mouse_keys_delta_1],1
|
||||
je .enter_1
|
||||
mcall 26,9
|
||||
add eax,[mouse_key_delay]
|
||||
mov [mouse_keys_tick],eax
|
||||
mov [mouse_keys_delta_1],1
|
||||
jmp .continue_1
|
||||
.enter_1:
|
||||
mov [mouse_keys_delta_1],0
|
||||
mcall 26,9
|
||||
cmp eax,[mouse_keys_tick]
|
||||
jbe @f
|
||||
ret
|
||||
@@:
|
||||
add esp,4
|
||||
; call draw_left_panel
|
||||
jmp key_28.1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
check_right_panel_mouse_event:
|
||||
; cmp [scroll_pointer],0
|
||||
; je @f
|
||||
mov [scroll_pointer],0
|
||||
; ret
|
||||
@@:
|
||||
cmp [mouse_keys_delta],0
|
||||
jz .start
|
||||
cmp [mouse_keys],0
|
||||
jz .end
|
||||
.start:
|
||||
sub ax,[right_panel_y.start_y]
|
||||
mov ebx,10
|
||||
xor edx,edx
|
||||
div ebx
|
||||
imul eax,10
|
||||
cmp [select_panel_counter],1
|
||||
je @f
|
||||
mov [select_panel_counter],1
|
||||
mov [mouse_keys_delta_1],0
|
||||
push eax
|
||||
call draw_left_panel
|
||||
pop eax
|
||||
jmp .continue
|
||||
@@:
|
||||
cmp [right_start_draw_cursor_line],ax
|
||||
jne @f
|
||||
cmp [mouse_keys],0
|
||||
jnz .continue
|
||||
cmp [mouse_keys_delta],0
|
||||
je .enter
|
||||
@@:
|
||||
mov [mouse_keys_delta_1],0
|
||||
; cmp [mouse_keys_delta],1
|
||||
; je .continue
|
||||
; cmp [right_start_draw_cursor_line],ax
|
||||
; je .enter
|
||||
.continue:
|
||||
imul ebx,[right_folder_block],10
|
||||
cmp eax,ebx
|
||||
jb @f
|
||||
sub ebx,10
|
||||
mov [right_start_draw_cursor_line],bx
|
||||
jmp .continue_1
|
||||
@@:
|
||||
mov [right_start_draw_cursor_line],ax
|
||||
.continue_1:
|
||||
call draw_right_panel
|
||||
.end:
|
||||
ret
|
||||
.enter:
|
||||
cmp [mouse_keys_delta_1],1
|
||||
je .enter_1
|
||||
mcall 26,9
|
||||
add eax,[mouse_key_delay]
|
||||
mov [mouse_keys_tick],eax
|
||||
mov [mouse_keys_delta_1],1
|
||||
jmp .continue_1
|
||||
.enter_1:
|
||||
mov [mouse_keys_delta_1],0
|
||||
mcall 26,9
|
||||
cmp eax,[mouse_keys_tick]
|
||||
jbe @f
|
||||
ret
|
||||
@@:
|
||||
add esp,4
|
||||
; call draw_right_panel
|
||||
jmp key_28.1
|
||||
align 4
|
||||
on_fb_focus_change:
|
||||
pushad
|
||||
call draw_left_panel_patch
|
||||
call draw_right_panel_patch
|
||||
popad
|
||||
mov [fb_left.all_redraw], 1
|
||||
mov [fb_right.all_redraw], 1
|
||||
stdcall [FileBrowser_draw], fb_left
|
||||
stdcall [FileBrowser_draw], fb_right
|
||||
mov [fb_left.all_redraw],0
|
||||
mov [fb_right.all_redraw],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
@@ -1,34 +1,35 @@
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
open_file_f4:
|
||||
cmp [select_panel_counter],0
|
||||
jne .right_1
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je .right_1
|
||||
.left_1:
|
||||
xor eax,eax
|
||||
mov ax,[left_start_draw_cursor_line]
|
||||
mov ax,[fb_left.start_draw_cursor_line]
|
||||
xor edx,edx
|
||||
mov ebx,10
|
||||
movzx ebx,[fb_left.line_size_y]
|
||||
div ebx
|
||||
mov esi,[left_start_draw_line]
|
||||
mov esi,[fb_left.start_draw_line]
|
||||
add esi,eax
|
||||
imul esi,304
|
||||
add esi,[left_folder_data]
|
||||
add esi,[fb_left.folder_data]
|
||||
add esi,32
|
||||
test [esi],byte 0x10
|
||||
jz file_no_folder_1
|
||||
jz file_no_folder_1
|
||||
jmp still
|
||||
.right_1:
|
||||
xor eax,eax
|
||||
mov ax,[right_start_draw_cursor_line]
|
||||
mov ax,[fb_right.start_draw_cursor_line]
|
||||
xor edx,edx
|
||||
mov ebx,10
|
||||
movzx ebx,[fb_right.line_size_y]
|
||||
div ebx
|
||||
mov esi,[right_start_draw_line]
|
||||
mov esi,[fb_right.start_draw_line]
|
||||
add esi,eax
|
||||
imul esi,304
|
||||
add esi,[right_folder_data]
|
||||
add esi,[fb_right.folder_data]
|
||||
add esi,32
|
||||
test [esi],byte 0x10
|
||||
jz file_no_folder_1
|
||||
jz file_no_folder_1
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
file_no_folder_1:
|
||||
@@ -37,7 +38,7 @@ file_no_folder_1:
|
||||
std
|
||||
lodsb
|
||||
cmp esi,edx
|
||||
je still
|
||||
je still
|
||||
cmp al,'.'
|
||||
jnz @b
|
||||
call calculate_file_no_folder_2
|
||||
@@ -73,7 +74,7 @@ file_no_folder:
|
||||
std
|
||||
lodsb
|
||||
cmp esi,edx
|
||||
je start_file
|
||||
je start_file
|
||||
cmp al,'.'
|
||||
jnz @b
|
||||
call calculate_file_no_folder_2
|
||||
@@ -85,8 +86,8 @@ file_no_folder:
|
||||
start_file:
|
||||
inc edx
|
||||
.1:
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
mov esi,read_folder_name ;read_folder.name
|
||||
jmp .start
|
||||
@@:
|
||||
@@ -110,7 +111,7 @@ start_file:
|
||||
test eax,eax
|
||||
jnz @b
|
||||
mov [start_file_data.param],eax
|
||||
call start_appl
|
||||
mcall SF_FILE, start_file_data
|
||||
cmp eax,0
|
||||
jge @f
|
||||
mov ebx,0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
progress_bar_delete:
|
||||
pusha
|
||||
cmp [max_progress_value],0
|
||||
@@ -17,17 +18,18 @@ progress_bar_delete:
|
||||
mov bx,cx
|
||||
sub ebx,13
|
||||
call clear_text_area_1
|
||||
mcall 4, ,0x90ffffff,file_name
|
||||
mcall SF_DRAW_TEXT, ,0x90ffffff,file_name
|
||||
cmp [draw_all_progressbar],0
|
||||
je .end
|
||||
sub ebx,13
|
||||
mov edx,delete_type
|
||||
mov edx,sz_Delete_files
|
||||
mcall
|
||||
.end:
|
||||
popa
|
||||
mov [draw_all_progressbar],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
progress_bar_copy:
|
||||
pusha
|
||||
call calculate_progress_data_4
|
||||
@@ -53,25 +55,26 @@ progress_bar_copy:
|
||||
@@:
|
||||
mov edx,0xff0000
|
||||
.continue_1:
|
||||
mcall
|
||||
mcall
|
||||
call calculate_progress_data_2
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
sub ebx,11
|
||||
call clear_text_area_1
|
||||
mcall 4, ,0x80ffffff,start_parameter
|
||||
mcall SF_DRAW_TEXT, ,0x80ffffff,start_parameter
|
||||
sub ebx,[skin_high]
|
||||
sub ebx,30
|
||||
call clear_text_area_1
|
||||
mcall 4, ,0x80ffffff,file_name
|
||||
mcall SF_DRAW_TEXT, ,0x80ffffff,file_name
|
||||
cmp [draw_all_progressbar],0
|
||||
je .end
|
||||
sub ebx,13
|
||||
cmp [move_file_flag],1
|
||||
je @f
|
||||
mov edx,copy_type_1
|
||||
mov edx,sz_Copy_file
|
||||
jmp .continue
|
||||
@@:
|
||||
mov edx,move_type_1
|
||||
mov edx,sz_Move_file
|
||||
.continue:
|
||||
|
||||
mcall
|
||||
@@ -90,7 +93,7 @@ clear_text_area_1:
|
||||
mov eax,[window_width]
|
||||
sub eax,70
|
||||
mov bx,ax
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
mov edx, 0x6060ff
|
||||
mcall
|
||||
pop ebx
|
||||
@@ -131,7 +134,7 @@ calculate_progress_data_2:
|
||||
;---------------------------------------------------------------------
|
||||
calculate_progress_data_3:
|
||||
mov bx,ax
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
cmp [draw_all_progressbar],0
|
||||
je @f
|
||||
mov edx, 0x6060ff
|
||||
@@ -142,7 +145,7 @@ calculate_progress_data_3:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_progress_data_4:
|
||||
mcall 11
|
||||
mcall SF_CHECK_EVENT
|
||||
cmp eax,1
|
||||
jne .1
|
||||
call draw_window
|
||||
|
||||
@@ -67,4 +67,8 @@
|
||||
; confirmation button
|
||||
; 160 - Yes
|
||||
; 161 - No
|
||||
;
|
||||
;
|
||||
; 170 - File selection
|
||||
; 171 - Select all
|
||||
; 172 - Clear selection
|
||||
; 173 - Invert selection
|
||||
@@ -1,543 +0,0 @@
|
||||
;---------------------------------------------------------------------
|
||||
check_scroll_left_event:
|
||||
pusha
|
||||
mov eax,[mouse_scroll_data]
|
||||
test eax,eax
|
||||
jz .end
|
||||
test ax,0x8000
|
||||
jnz .decr
|
||||
shr eax,16
|
||||
test ax,0x8000
|
||||
jnz .decr_1
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
cmp [left_start_draw_line],eax
|
||||
jae .end
|
||||
movzx eax,[mouse_scroll_data.vertical]
|
||||
test eax,eax
|
||||
jnz @f
|
||||
movzx eax,[mouse_scroll_data.horizontal]
|
||||
@@:
|
||||
add [left_start_draw_line],eax
|
||||
jmp .draw
|
||||
.decr:
|
||||
movzx eax,[mouse_scroll_data.vertical]
|
||||
jmp @f
|
||||
.decr_1:
|
||||
movzx eax,[mouse_scroll_data.horizontal]
|
||||
@@:
|
||||
cmp [left_start_draw_line],0
|
||||
je .end
|
||||
mov ebx,0xffff
|
||||
sub ebx,eax
|
||||
inc ebx
|
||||
sub [left_start_draw_line],ebx
|
||||
cmp [left_start_draw_line],0
|
||||
jae .draw
|
||||
mov [left_start_draw_line],0
|
||||
.draw:
|
||||
call draw_left_panel
|
||||
mov [scroll_bar_event],1
|
||||
.end:
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
check_scroll_right_event:
|
||||
pusha
|
||||
mov eax,[mouse_scroll_data]
|
||||
test eax,eax
|
||||
jz .end
|
||||
test ax,0x8000
|
||||
jnz .decr
|
||||
shr eax,16
|
||||
test ax,0x8000
|
||||
jnz .decr_1
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
cmp [right_start_draw_line],eax
|
||||
jae .end
|
||||
movzx eax,[mouse_scroll_data.vertical]
|
||||
test eax,eax
|
||||
jnz @f
|
||||
movzx eax,[mouse_scroll_data.horizontal]
|
||||
@@:
|
||||
add [right_start_draw_line],eax
|
||||
jmp .draw
|
||||
.decr:
|
||||
movzx eax,[mouse_scroll_data.vertical]
|
||||
jmp @f
|
||||
.decr_1:
|
||||
movzx eax,[mouse_scroll_data.horizontal]
|
||||
@@:
|
||||
cmp [right_start_draw_line],0
|
||||
je .end
|
||||
mov ebx,0xffff
|
||||
sub ebx,eax
|
||||
inc ebx
|
||||
sub [right_start_draw_line],ebx
|
||||
cmp [right_start_draw_line],0
|
||||
jae .draw
|
||||
mov [right_start_draw_line],0
|
||||
.draw:
|
||||
call draw_right_panel
|
||||
mov [scroll_bar_event],1
|
||||
.end:
|
||||
popa
|
||||
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
check_scroll_bar_left_event:
|
||||
mov [scroll_pointer],1
|
||||
cmp [mouse_keys_delta],0
|
||||
je @f
|
||||
cmp [mouse_keys],0
|
||||
jz .exit
|
||||
@@:
|
||||
sub ecx,15
|
||||
cmp bx,cx
|
||||
jb .exit
|
||||
@@:
|
||||
cmp [select_panel_counter],0
|
||||
je @f
|
||||
mov [select_panel_counter],0
|
||||
call draw_all_panels_for_scroll_bar
|
||||
@@:
|
||||
mov [scroll_bar_event],1
|
||||
mov cx,[left_panel_y.start_y]
|
||||
add cx,15
|
||||
cmp ax,cx
|
||||
ja .scroll
|
||||
cmp [left_start_draw_line],0
|
||||
jne @f
|
||||
ret
|
||||
@@:
|
||||
dec [left_start_draw_line]
|
||||
jmp .all
|
||||
.scroll:
|
||||
add cx,[left_panel_y.size_y]
|
||||
sub cx,30
|
||||
cmp ax,cx
|
||||
ja .down
|
||||
mov ebx,16 ;15
|
||||
add bx,[left_panel_y.start_y]
|
||||
sub cx,bx
|
||||
sub ax,bx
|
||||
mov ebx,eax
|
||||
mov eax,[left_folder_block]
|
||||
call calculate_for_scroll_bar
|
||||
cmp [left_start_draw_line],eax
|
||||
je .exit
|
||||
mov [left_start_draw_line],eax
|
||||
.all:
|
||||
call draw_left_panel
|
||||
.exit:
|
||||
ret
|
||||
.down:
|
||||
mov eax,[left_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
cmp [left_start_draw_line],eax
|
||||
jb @f
|
||||
ret
|
||||
@@:
|
||||
inc [left_start_draw_line]
|
||||
jmp .all
|
||||
;---------------------------------------------------------------------
|
||||
draw_all_panels_for_scroll_bar:
|
||||
push eax
|
||||
push ebx
|
||||
call draw_right_panel
|
||||
call draw_left_panel
|
||||
pop ebx
|
||||
pop eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_for_scroll_bar:
|
||||
sub eax,[max_panel_line]
|
||||
inc eax
|
||||
shl eax,10
|
||||
xor edx,edx
|
||||
div ecx
|
||||
shl edx,1
|
||||
cmp edx,ebx
|
||||
jb @f
|
||||
inc eax
|
||||
@@:
|
||||
imul eax,ebx
|
||||
shr eax,10
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
check_scroll_bar_right_event:
|
||||
mov [scroll_pointer],2
|
||||
cmp [mouse_keys_delta],0
|
||||
je @f
|
||||
cmp [mouse_keys],0
|
||||
jz .exit
|
||||
@@:
|
||||
sub ecx,15
|
||||
cmp bx,cx
|
||||
jb .exit
|
||||
@@:
|
||||
cmp [select_panel_counter],1
|
||||
je @f
|
||||
mov [select_panel_counter],1
|
||||
call draw_all_panels_for_scroll_bar
|
||||
@@:
|
||||
mov [scroll_bar_event],1
|
||||
mov cx,[right_panel_y.start_y]
|
||||
add cx,15
|
||||
cmp ax,cx
|
||||
ja .scroll
|
||||
cmp [right_start_draw_line],0
|
||||
jne @f
|
||||
ret
|
||||
@@:
|
||||
dec [right_start_draw_line]
|
||||
jmp .all
|
||||
.scroll:
|
||||
add cx,[right_panel_y.size_y]
|
||||
sub cx,30
|
||||
cmp ax,cx
|
||||
ja .down
|
||||
mov ebx,16 ;15
|
||||
add bx,[right_panel_y.start_y]
|
||||
sub cx,bx
|
||||
sub ax,bx
|
||||
mov ebx,eax
|
||||
mov eax,[right_folder_block]
|
||||
call calculate_for_scroll_bar
|
||||
cmp [right_start_draw_line],eax
|
||||
je .exit
|
||||
mov [right_start_draw_line],eax
|
||||
.all:
|
||||
call draw_right_panel
|
||||
.exit:
|
||||
ret
|
||||
.down:
|
||||
mov eax,[right_folder_block]
|
||||
sub eax,[max_panel_line]
|
||||
cmp [right_start_draw_line],eax
|
||||
jb @f
|
||||
ret
|
||||
@@:
|
||||
inc [right_start_draw_line]
|
||||
jmp .all
|
||||
;---------------------------------------------------------------------
|
||||
draw_scroll_bar_left:
|
||||
pusha
|
||||
mov eax,[left_folder_block]
|
||||
cmp eax,0
|
||||
jne @f
|
||||
inc eax
|
||||
@@:
|
||||
mov ebx,[max_panel_line]
|
||||
xor edx,edx
|
||||
div ebx
|
||||
cmp eax,0
|
||||
jne @f
|
||||
inc eax
|
||||
@@:
|
||||
mov ebx,eax
|
||||
xor eax,eax
|
||||
mov ax,[left_panel_x.size_x]
|
||||
sub eax,30
|
||||
xor edx,edx
|
||||
div ebx
|
||||
shr eax,1
|
||||
cmp eax,5
|
||||
jae @f
|
||||
mov eax,5
|
||||
@@:
|
||||
mov [left_scroll_compens],eax
|
||||
popa
|
||||
|
||||
mov [scroll_pointer_1],1
|
||||
pusha
|
||||
mov bx,[left_panel_x.start_x]
|
||||
add bx,[left_panel_x.size_x]
|
||||
sub bx,15
|
||||
shl ebx,16
|
||||
mov bx,15
|
||||
mov ecx,[left_panel_y]
|
||||
call calculate_for_draw_scroll_bar
|
||||
push ecx
|
||||
mov ax,[left_panel_y.size_y]
|
||||
sub eax,30 ;45
|
||||
sub eax,[left_scroll_compens]
|
||||
sub eax,[left_scroll_compens]
|
||||
shl eax,10
|
||||
push ebx
|
||||
mov ebx,[left_folder_block]
|
||||
call calculate_for_draw_scroll_bar_2
|
||||
mov ebx,[left_start_draw_line]
|
||||
imul eax,ebx
|
||||
pop ebx
|
||||
call calculate_for_draw_scroll_bar_1
|
||||
pop ecx
|
||||
ror ecx,16
|
||||
add cx,[left_panel_y.size_y]
|
||||
call calculate_for_draw_scroll_bar_3
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
draw_scroll_bar_right:
|
||||
pusha
|
||||
mov eax,[right_folder_block]
|
||||
cmp eax,0
|
||||
jne @f
|
||||
inc eax
|
||||
@@:
|
||||
mov ebx,[max_panel_line]
|
||||
xor edx,edx
|
||||
div ebx
|
||||
cmp eax,0
|
||||
jne @f
|
||||
inc eax
|
||||
@@:
|
||||
mov ebx,eax
|
||||
xor eax,eax
|
||||
mov ax,[right_panel_x.size_x]
|
||||
sub eax,30
|
||||
xor edx,edx
|
||||
div ebx
|
||||
shr eax,1
|
||||
cmp eax,5
|
||||
jae @f
|
||||
mov eax,5
|
||||
@@:
|
||||
mov [right_scroll_compens],eax
|
||||
popa
|
||||
mov [scroll_pointer_1],2
|
||||
pusha
|
||||
mov bx,[right_panel_x.start_x]
|
||||
add bx,[right_panel_x.size_x]
|
||||
sub bx,15
|
||||
shl ebx,16
|
||||
mov bx,15
|
||||
mov ecx,[right_panel_y]
|
||||
call calculate_for_draw_scroll_bar
|
||||
push ecx
|
||||
mov ax,[right_panel_y.size_y]
|
||||
sub eax,30 ;45
|
||||
sub eax,[right_scroll_compens]
|
||||
sub eax,[right_scroll_compens]
|
||||
shl eax,10
|
||||
push ebx
|
||||
mov ebx,[right_folder_block]
|
||||
call calculate_for_draw_scroll_bar_2
|
||||
mov ebx,[right_start_draw_line]
|
||||
imul eax,ebx
|
||||
pop ebx
|
||||
call calculate_for_draw_scroll_bar_1
|
||||
pop ecx
|
||||
ror ecx,16
|
||||
add cx,[right_panel_y.size_y]
|
||||
call calculate_for_draw_scroll_bar_3
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_for_draw_scroll_bar:
|
||||
mov edx,0xeeeeee
|
||||
mov eax,13
|
||||
pusha
|
||||
add ebx,1 shl 16
|
||||
mov bx,14
|
||||
add ecx,16 shl 16
|
||||
sub cx,31
|
||||
mcall
|
||||
popa
|
||||
xor edx,edx
|
||||
push ebx
|
||||
mov bx,1
|
||||
mcall
|
||||
push ecx
|
||||
add ebx,15 shl 16
|
||||
mcall
|
||||
pop ecx
|
||||
pop ebx
|
||||
mov [draw_scroll_character],1
|
||||
call draw_scroll_bar_srectangle
|
||||
xor eax,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_for_draw_scroll_bar_1:
|
||||
shr eax,10
|
||||
ror ecx,16
|
||||
add cx,15
|
||||
cmp [scroll_pointer_1],1
|
||||
jne .right
|
||||
add ecx,[left_scroll_compens]
|
||||
jmp @f
|
||||
.right:
|
||||
add ecx,[right_scroll_compens]
|
||||
@@:
|
||||
add cx,ax
|
||||
rol ecx,16
|
||||
mov [draw_scroll_character],2
|
||||
call draw_scroll_bar_srectangle
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_for_draw_scroll_bar_2:
|
||||
sub ebx,[max_panel_line]
|
||||
cmp ebx,0
|
||||
ja @f
|
||||
mov ebx,1
|
||||
@@:
|
||||
xor edx,edx
|
||||
div ebx
|
||||
shl edx,1
|
||||
cmp edx,ebx
|
||||
jb @f
|
||||
inc eax
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
calculate_for_draw_scroll_bar_3:
|
||||
sub cx,16
|
||||
rol ecx,16
|
||||
mov [draw_scroll_character],3
|
||||
call draw_scroll_bar_srectangle
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;calculate_for_draw_scroll_bar_4:
|
||||
; push eax
|
||||
; push ebx
|
||||
;; shr eax,10
|
||||
; mov ebx,eax
|
||||
; xor eax,eax
|
||||
; mov ax,[left_panel_y.size_y]
|
||||
; xor edx,edx
|
||||
; div ebx
|
||||
;; mov esi,eax
|
||||
; pop ebx
|
||||
; pop eax
|
||||
; ret
|
||||
;---------------------------------------------------------------------
|
||||
draw_scroll_bar_srectangle:
|
||||
push ecx
|
||||
xor edx,edx
|
||||
mov eax,13
|
||||
mov cx,1
|
||||
cmp [draw_scroll_character],2
|
||||
je .draw_center
|
||||
mcall
|
||||
pusha
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov cx,14
|
||||
mov bx,14
|
||||
mov edx,0xbbddff
|
||||
mcall
|
||||
xor edx,edx
|
||||
cmp [draw_scroll_character],1
|
||||
jne .draw_down
|
||||
add ebx,3 shl 16
|
||||
mov bx,7
|
||||
add ecx,8 shl 16
|
||||
mov cx,1
|
||||
mcall
|
||||
sub ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,5
|
||||
mcall
|
||||
sub ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,3
|
||||
mcall
|
||||
sub ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,1
|
||||
mcall
|
||||
jmp .continue
|
||||
.draw_down:
|
||||
add ebx,3 shl 16
|
||||
mov bx,7
|
||||
add ecx,5 shl 16
|
||||
mov cx,1
|
||||
mcall
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,5
|
||||
mcall
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,3
|
||||
mcall
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,1
|
||||
mcall
|
||||
.continue:
|
||||
popa
|
||||
add ecx,15 shl 16
|
||||
mcall
|
||||
pop ecx
|
||||
ret
|
||||
|
||||
.draw_center:
|
||||
pusha
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
push ecx
|
||||
cmp [scroll_pointer_1],1
|
||||
jne .right
|
||||
ror ecx,16
|
||||
sub ecx,[left_scroll_compens]
|
||||
rol ecx,16
|
||||
xor cx,cx
|
||||
add ecx,[left_scroll_compens]
|
||||
shl cx,1
|
||||
jmp .draw_center_continue
|
||||
.right:
|
||||
ror ecx,16
|
||||
sub ecx,[right_scroll_compens]
|
||||
rol ecx,16
|
||||
xor cx,cx
|
||||
add ecx,[right_scroll_compens]
|
||||
shl cx,1
|
||||
.draw_center_continue:
|
||||
mov bx,14
|
||||
mov edx,0xbbddff
|
||||
mcall
|
||||
xor edx,edx
|
||||
mov cx,1
|
||||
sub ecx,1 shl 16
|
||||
mcall
|
||||
pop ecx
|
||||
cmp [scroll_pointer_1],1
|
||||
jne .right_1
|
||||
cmp [left_scroll_compens],8
|
||||
jb .continue_1
|
||||
jmp .draw_center_continue_1
|
||||
.right_1:
|
||||
cmp [right_scroll_compens],8
|
||||
jb .continue_1
|
||||
.draw_center_continue_1:
|
||||
sub ecx,8 shl 16
|
||||
add ebx,2 shl 16
|
||||
mov bx,10
|
||||
add ecx,4 shl 16
|
||||
mov cx,1
|
||||
mcall
|
||||
add ecx,3 shl 16
|
||||
sub ebx,1 shl 16
|
||||
mov bx,12
|
||||
mcall
|
||||
add ebx,1 shl 16
|
||||
mov bx,10
|
||||
add ecx,3 shl 16
|
||||
mcall
|
||||
.continue_1:
|
||||
popa
|
||||
ror ecx,16
|
||||
cmp [scroll_pointer_1],1
|
||||
jne @f
|
||||
add ecx,[left_scroll_compens]
|
||||
jmp .draw_center_continue_2
|
||||
@@:
|
||||
add ecx,[right_scroll_compens]
|
||||
.draw_center_continue_2:
|
||||
rol ecx,16
|
||||
mcall
|
||||
pop ecx
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
+26
-879
@@ -1,888 +1,35 @@
|
||||
; in:
|
||||
; sort_type - 0=шь , 2=Ёрё°шЁхэшх, 4=тЁхь яюёыхфэхщ ьюфшЇшърЎшш, 6=ЁрчьхЁ,
|
||||
; 10=тЁхь ёючфрэш , 12=тЁхь яюёыхфэхую фюёЄєяр
|
||||
align 4
|
||||
proc sort_directory uses eax ebx, tmem:dword, sort_type:dword
|
||||
mov eax,[tmem]
|
||||
mov ebx,[eax+4] ; number of files
|
||||
add eax,32
|
||||
cmp [eax+40],word '..'
|
||||
jne @f
|
||||
cmp [eax+40+2],byte 0
|
||||
jne @f
|
||||
dec ebx
|
||||
add eax,304
|
||||
@@:
|
||||
stdcall [sort_dir], eax, ebx, [sort_type]
|
||||
ret
|
||||
endp
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
left_sort_files:
|
||||
; mcall 26,9
|
||||
; mov [timer_tick],eax
|
||||
cmp [left_folder_block], 0
|
||||
jz .nothing
|
||||
mov eax,[left_folder_data]
|
||||
add eax,32+40
|
||||
cmp [eax],word '..'
|
||||
jne @f
|
||||
cmp [eax+2],byte 0
|
||||
jne @f
|
||||
add [left_folder_data],304
|
||||
dec [left_folder_block]
|
||||
mov [exit_to_dir],1
|
||||
jz .return_exit_to_dir
|
||||
@@:
|
||||
; add memory for sorting
|
||||
mov ecx,[right_folder_data]
|
||||
sub ecx,[left_folder_data]
|
||||
mov ebx,[appl_memory]
|
||||
add ecx,ebx
|
||||
add ecx,4 ; фы ёЄЁрїютъш
|
||||
push ebx
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
mov edi,[esp]
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,edi
|
||||
shr ecx,2
|
||||
mov eax,0xffffffff
|
||||
cld
|
||||
rep stosd
|
||||
cmp [left_sort_flag],0
|
||||
je left_name_sort
|
||||
cmp [left_sort_flag],1
|
||||
je left_type_sort
|
||||
jmp left_size_date_sort
|
||||
.move_sorted_file:
|
||||
; move sorted file area in folder area
|
||||
mov esi,[esp]
|
||||
mov edi,[left_folder_data]
|
||||
add edi,32
|
||||
mov ecx,[right_folder_data]
|
||||
sub ecx,edi
|
||||
shr ecx,2
|
||||
cld
|
||||
rep movsd
|
||||
; sub memory for sorting
|
||||
pop ecx
|
||||
add ecx,4 ; фы ёЄЁрїютъш
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
cmp [exit_to_dir],0
|
||||
je @f
|
||||
.return_exit_to_dir:
|
||||
sub [left_folder_data],304
|
||||
inc [left_folder_block]
|
||||
mov [exit_to_dir],0
|
||||
@@:
|
||||
.nothing:
|
||||
; mcall 26,9
|
||||
; sub eax,[timer_tick]
|
||||
; mov [timer_tick],eax
|
||||
; call draw_window
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
left_name_sort:
|
||||
; sorting of files
|
||||
call prepare_data_1
|
||||
call left_name_sort_1
|
||||
call prepare_data_2
|
||||
call left_name_sort_1
|
||||
.1:
|
||||
call prepare_data_4
|
||||
jmp left_sort_files.move_sorted_file
|
||||
left_name_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_1
|
||||
je .file
|
||||
test [esi],byte 0x10
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
test [esi],byte 0x10
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
call sort_by_name.start
|
||||
jae .add_counter
|
||||
.no_add_counter:
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[left_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
left_type_sort:
|
||||
; sorting of files
|
||||
call left_prepare_extension_start_1
|
||||
call prepare_data_1
|
||||
call left_type_sort_1
|
||||
call prepare_data_2
|
||||
call left_type_sort_1
|
||||
jmp left_name_sort.1
|
||||
left_type_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_1
|
||||
je .file
|
||||
; test [esi],byte 0x10
|
||||
test al,ah
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
; test [esi],byte 0x10
|
||||
test al,ah
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
cmp [dir_or_file],1
|
||||
je @f
|
||||
call prepare_data_5
|
||||
@@:
|
||||
call sort_by_name.start
|
||||
je .1
|
||||
ja .add_counter
|
||||
.no_add_counter:
|
||||
; pushad
|
||||
; pushfd
|
||||
; dps 'left_type_sort'
|
||||
; newline
|
||||
; popfd
|
||||
; popad
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
.1:
|
||||
cmp [dir_or_file],1
|
||||
je .add_counter
|
||||
call sort_by_name
|
||||
jbe .no_add_counter
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[left_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
left_size_date_sort:
|
||||
; sorting of files
|
||||
call prepare_data_1
|
||||
call left_size_date_sort_1
|
||||
call prepare_data_2
|
||||
call left_size_date_sort_1
|
||||
jmp left_name_sort.1
|
||||
left_size_date_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_1
|
||||
je .file
|
||||
test [esi],byte 0x10
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
test [esi],byte 0x10
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
mov eax,[left_sort_flag]
|
||||
cmp eax,2
|
||||
je .size_sort
|
||||
call sort_by_date
|
||||
; je .1
|
||||
jae .add_counter
|
||||
jmp .no_add_counter
|
||||
.size_sort:
|
||||
cmp [dir_or_file],0
|
||||
je .file_1
|
||||
call sort_by_name.start
|
||||
jmp @f
|
||||
.file_1:
|
||||
call sort_by_size
|
||||
@@:
|
||||
jae .add_counter
|
||||
.no_add_counter:
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
;.1:
|
||||
; call sort_by_name.start
|
||||
; jbe .no_add_counter
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[left_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
left_prepare_extension_start:
|
||||
xor ebp,ebp
|
||||
cmp [left_folder_block],ebp
|
||||
je .exit
|
||||
mov esi,[left_folder_data]
|
||||
add esi,32+40
|
||||
.start:
|
||||
call prepare_extension_start_all
|
||||
cmp ebp,[left_folder_block]
|
||||
jb .start
|
||||
.exit:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_extension_start_all:
|
||||
push esi
|
||||
call search_extension_start
|
||||
mov eax,esi
|
||||
pop esi
|
||||
sub eax,esi
|
||||
sub ebx,esi
|
||||
shl eax,16
|
||||
mov ax,bx
|
||||
mov [esi+300-40],eax
|
||||
mov [esi+299-40],byte 0
|
||||
add esi,304
|
||||
inc ebp
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
left_prepare_extension_start_1:
|
||||
xor ebp,ebp
|
||||
mov edi,[esp+4]
|
||||
.start:
|
||||
xor eax,eax
|
||||
mov [edi+300],eax
|
||||
add edi,304
|
||||
inc ebp
|
||||
cmp ebp,[left_folder_block]
|
||||
jb .start
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
;left_files_name_normalize:
|
||||
; xor ebp,ebp
|
||||
; mov esi,[left_folder_data]
|
||||
; add esi,32+40
|
||||
;.start:
|
||||
; push esi
|
||||
; mov al,[esi]
|
||||
; call char_toupper
|
||||
; mov [esi],al
|
||||
;@@:
|
||||
; inc esi
|
||||
; mov al,[esi]
|
||||
; test al,al
|
||||
; jz @f
|
||||
; call char_todown
|
||||
; mov [esi],al
|
||||
; jmp @b
|
||||
;@@:
|
||||
; pop esi
|
||||
; add esi,304
|
||||
; inc ebp
|
||||
; cmp ebp,[left_folder_block]
|
||||
; jb .start
|
||||
; ret
|
||||
;---------------------------------------------------------------------
|
||||
;right_files_name_normalize:
|
||||
; xor ebp,ebp
|
||||
; mov esi,[right_folder_data]
|
||||
; add esi,32+40
|
||||
;.start:
|
||||
; push esi
|
||||
; mov al,[esi]
|
||||
; call char_toupper
|
||||
; mov [esi],al
|
||||
;@@:
|
||||
; inc esi
|
||||
; mov al,[esi]
|
||||
; test al,al
|
||||
; jz @f
|
||||
; call char_todown
|
||||
; mov [esi],al
|
||||
; jmp @b
|
||||
;@@:
|
||||
; pop esi
|
||||
; add esi,304
|
||||
; inc ebp
|
||||
; cmp ebp,[right_folder_block]
|
||||
; jb .start
|
||||
; ret
|
||||
;---------------------------------------------------------------------
|
||||
right_prepare_extension_start:
|
||||
xor ebp,ebp
|
||||
cmp [right_folder_block],ebp
|
||||
je .exit
|
||||
mov esi,[right_folder_data]
|
||||
add esi,32+40
|
||||
.start:
|
||||
call prepare_extension_start_all
|
||||
cmp ebp,[right_folder_block]
|
||||
jb .start
|
||||
.exit:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
right_prepare_extension_start_1:
|
||||
xor ebp,ebp
|
||||
mov edi,[esp+4]
|
||||
.start:
|
||||
xor eax,eax
|
||||
mov [edi+300],eax
|
||||
add edi,304
|
||||
inc ebp
|
||||
cmp ebp,[right_folder_block]
|
||||
jb .start
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_data_1:
|
||||
mov [dir_or_file],1
|
||||
mov [dir_temp_counter],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_data_2:
|
||||
mov eax,[dir_temp_counter]
|
||||
mov [dir_temp_counter_1],eax
|
||||
imul eax,304
|
||||
add [esp+4],eax
|
||||
mov [dir_or_file],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_data_3:
|
||||
mov edi,[esp+4+4]
|
||||
add esi,40
|
||||
add edi,40
|
||||
mov [sort_counter],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_data_4:
|
||||
mov eax,[dir_temp_counter_1]
|
||||
imul eax,304
|
||||
sub [esp+4],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
prepare_data_5:
|
||||
xor eax,eax
|
||||
mov ax,[esi+302-40]
|
||||
add esi,eax
|
||||
mov ax,[edi+302-40]
|
||||
add edi,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
sort_by_name:
|
||||
mov esi,[esp+8]
|
||||
mov edi,[esp+4]
|
||||
.start:
|
||||
cld
|
||||
lodsd
|
||||
mov ebx,[edi] ; bufer
|
||||
add edi,4
|
||||
cmp al,bl
|
||||
jnz @f
|
||||
test bl, bl
|
||||
jz @f
|
||||
cmp ah,bh
|
||||
jnz @f
|
||||
test bh, bh
|
||||
jz @f
|
||||
ror eax,16
|
||||
ror ebx,16
|
||||
cmp al,bl
|
||||
jnz @f
|
||||
test bl, bl
|
||||
jz @f
|
||||
cmp ah, bh
|
||||
jnz @f
|
||||
test bh, bh
|
||||
jnz .start
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
sort_by_name_3:
|
||||
mov esi,[esp+8]
|
||||
mov edi,[esp+4]
|
||||
.start:
|
||||
cld
|
||||
lodsd
|
||||
mov ecx,4
|
||||
rep scasb
|
||||
jz .start
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
sort_by_name_1:
|
||||
mov esi,[esp+8]
|
||||
mov edi,[esp+4]
|
||||
cmp [edi],byte 255
|
||||
je @f
|
||||
.start:
|
||||
cld
|
||||
lodsb
|
||||
mov ah,[edi] ; bufer
|
||||
inc edi
|
||||
cmp al,ah
|
||||
jnz @f
|
||||
test ah, ah
|
||||
jnz .start
|
||||
cmp [fb_left.folder_block], 0
|
||||
jz @f
|
||||
stdcall sort_directory, [fb_left.folder_data], [left_sort_flag]
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sort_by_date:
|
||||
mov eax,[esi-12] ;+28-40]
|
||||
cmp eax,[edi-12] ;+28-40]
|
||||
jnz .end
|
||||
mov eax,[esi-16] ;+24-40]
|
||||
cmp eax,[edi-16] ;+24-40]
|
||||
.end:
|
||||
ret
|
||||
|
||||
;mov eax,[esi-12]
|
||||
;cmp eax,[edi-12]
|
||||
;jz @f
|
||||
;ret
|
||||
;@@:
|
||||
;mov eax,[esi-16]
|
||||
;cmp eax,[edi-16]
|
||||
;ret
|
||||
|
||||
;push ecx ; ьюцэю юяєёЄшЄ№, хёыш ecx эх црыъю
|
||||
;mov eax,[esi-12]
|
||||
;cmp eax,[edi-12]
|
||||
;setnz ch
|
||||
;adc ch,-2
|
||||
;mov eax,[esi-16]
|
||||
;cmp eax,[edi-16]
|
||||
;setnz cl
|
||||
;adc cl,-2
|
||||
;cmp cx,0xFEFE
|
||||
;pop ecx
|
||||
;ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sort_by_size:
|
||||
mov eax,[esi-4] ;+36-40]
|
||||
cmp eax,[edi-4] ;+36-40]
|
||||
jnz .end
|
||||
mov eax,[esi-8] ;+32-40]
|
||||
cmp eax,[edi-8] ;+32-40]
|
||||
.end:
|
||||
ret
|
||||
|
||||
;mov eax,[esi-4]
|
||||
;cmp eax,[edi-4]
|
||||
;jz @f
|
||||
;ret
|
||||
;@@:
|
||||
;mov eax,[esi-8]
|
||||
;cmp eax,[edi-8]
|
||||
;ret
|
||||
|
||||
;push ecx ; ьюцэю юяєёЄшЄ№, хёыш ecx эх црыъю
|
||||
;mov eax,[esi-4]
|
||||
;cmp eax,[edi-4]
|
||||
;setnz ch
|
||||
;adc ch,-2
|
||||
;mov eax,[esi-8]
|
||||
;cmp eax,[edi-8]
|
||||
;setnz cl
|
||||
;adc cl,-2
|
||||
;cmp cx,0xFEFE
|
||||
;pop ecx
|
||||
;ret
|
||||
;---------------------------------------------------------------------
|
||||
add_counter:
|
||||
add edi,304
|
||||
mov eax,[appl_memory]
|
||||
sub eax,304-40
|
||||
cmp eax,edi
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
copy_folders_1:
|
||||
mov edi,ebp
|
||||
call multiple_304
|
||||
; imul edi,304
|
||||
mov esi,edi
|
||||
add esi,[left_folder_data]
|
||||
add esi,32
|
||||
mov ah,0x10
|
||||
mov al,[esi]
|
||||
cmp [dir_or_file],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
copy_folders_2:
|
||||
mov edi,ebp
|
||||
call multiple_304
|
||||
; imul edi,304
|
||||
mov esi,edi
|
||||
add esi,[right_folder_data]
|
||||
add esi,32
|
||||
cmp [dir_or_file],0
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
move_bdvk:
|
||||
sub esi,40
|
||||
mov edi,[sort_counter]
|
||||
call multiple_304
|
||||
add edi,[esp+4+4]
|
||||
call move_bdvk_1
|
||||
inc [dir_temp_counter]
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
move_bdvk_1:
|
||||
mov eax,[esi+300]
|
||||
mov [edi+300],eax
|
||||
mov ecx,0
|
||||
mov [edi+299],cl
|
||||
mov cx,[esi+300]
|
||||
add ecx,41
|
||||
ror ecx,2
|
||||
mov ax,cx
|
||||
xor cx,cx
|
||||
rol ecx,2
|
||||
mov bx,cx
|
||||
mov cx,ax
|
||||
cld
|
||||
rep movsd
|
||||
mov cx,bx
|
||||
rep movsb
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
multiple_304:
|
||||
shl edi,4
|
||||
mov eax,edi
|
||||
mov ebx,eax
|
||||
shl edi,5
|
||||
shl eax,3
|
||||
sub edi,eax
|
||||
mov eax,ebx
|
||||
shl ebx,2
|
||||
sub edi,ebx
|
||||
sub edi,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
move_area_for_bdvk:
|
||||
mov eax,[dir_temp_counter]
|
||||
mov edi,[sort_counter]
|
||||
test eax,eax
|
||||
je .end
|
||||
cmp eax,edi
|
||||
jbe .end
|
||||
call multiple_304
|
||||
; imul edi,304
|
||||
mov ecx,edi
|
||||
mov edi,[dir_temp_counter]
|
||||
add edi,2
|
||||
call multiple_304
|
||||
; imul edi,304
|
||||
mov eax,ecx
|
||||
mov ebx,[esp+12+4]
|
||||
add edi,ebx
|
||||
mov edx,[appl_memory]
|
||||
cmp edi,edx
|
||||
jbe @f
|
||||
mov edi,edx
|
||||
@@:
|
||||
mov esi,edi
|
||||
sub esi,304
|
||||
mov ecx,edi
|
||||
sub ecx,ebx
|
||||
sub ecx,eax
|
||||
shr ecx,2
|
||||
; pushad
|
||||
; pushfd
|
||||
; dph [appl_memory]
|
||||
; newline
|
||||
; dps 'ECX:'
|
||||
; dpd ecx
|
||||
; newline
|
||||
; dps 'ESI:'
|
||||
; dpd esi
|
||||
; newline
|
||||
; dps 'EDI:'
|
||||
; dpd edi
|
||||
; newline
|
||||
; popfd
|
||||
; popad
|
||||
std
|
||||
rep movsd
|
||||
; pushad
|
||||
; pushfd
|
||||
; dps 'move_area_for_bdvk END'
|
||||
; newline
|
||||
; popfd
|
||||
; popad
|
||||
; mov eax,ecx
|
||||
; mov ebx,304
|
||||
; mov edx,0
|
||||
; div ebx
|
||||
; mov ecx,eax
|
||||
; sub ecx,2
|
||||
; mov eax,[appl_memory]
|
||||
; mov [temp_ecx],edi
|
||||
; mov [temp_ebx],esi
|
||||
; mov [temp_eax],eax
|
||||
; pusha
|
||||
; call draw_window
|
||||
; mcall 5,300
|
||||
; popa
|
||||
; sub edi,303
|
||||
; sub esi,303
|
||||
;@@:
|
||||
; push ecx esi edi
|
||||
; call move_bdvk_1
|
||||
; pop edi esi ecx
|
||||
; sub edi,304
|
||||
; sub esi,304
|
||||
; dec ecx
|
||||
; jnz @b
|
||||
.end:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
search_extension_start:
|
||||
mov edx,esi
|
||||
xor eax,eax
|
||||
@@:
|
||||
cld
|
||||
lodsb
|
||||
test eax,eax
|
||||
jnz @b
|
||||
dec esi
|
||||
dec edx
|
||||
push esi
|
||||
@@:
|
||||
std
|
||||
lodsb
|
||||
cmp esi,edx
|
||||
je .end
|
||||
cmp al,'.'
|
||||
jnz @b
|
||||
add esi,2
|
||||
pop ebx
|
||||
ret
|
||||
.end:
|
||||
pop esi
|
||||
mov ebx,esi
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
right_sort_files:
|
||||
cmp [right_folder_block], 0
|
||||
jz .nothing
|
||||
mov eax,[right_folder_data]
|
||||
add eax,32+40
|
||||
cmp [eax],word '..'
|
||||
jne @f
|
||||
cmp [eax+2],byte 0
|
||||
jne @f
|
||||
add [right_folder_data],304
|
||||
dec [right_folder_block]
|
||||
mov [exit_to_dir],1
|
||||
jz .return_exit_to_dir
|
||||
cmp [fb_right.folder_block], 0
|
||||
jz @f
|
||||
stdcall sort_directory, [fb_right.folder_data], [right_sort_flag]
|
||||
@@:
|
||||
; add memory for sorting
|
||||
mov ecx,[appl_memory]
|
||||
push ecx
|
||||
sub ecx,[right_folder_data]
|
||||
add ecx,[esp]
|
||||
add ecx,4 ; фы ёЄЁрїютъш
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
mov edi,[esp]
|
||||
mov ecx,[appl_memory]
|
||||
sub ecx,edi
|
||||
shr ecx,2
|
||||
mov eax,0xffffffff
|
||||
cld
|
||||
rep stosd
|
||||
cmp [right_sort_flag],0
|
||||
je right_name_sort
|
||||
cmp [right_sort_flag],1
|
||||
je right_type_sort
|
||||
jmp right_size_date_sort
|
||||
.move_sorted_file:
|
||||
; move sorted file area in folder area
|
||||
mov esi,[esp]
|
||||
mov ecx,esi
|
||||
mov edi,[right_folder_data]
|
||||
add edi,32
|
||||
sub ecx,edi
|
||||
shr ecx,2
|
||||
cld
|
||||
rep movsd
|
||||
; sub memory for sorting
|
||||
pop ecx
|
||||
add ecx,4 ; фы ёЄЁрїютъш
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
cmp [exit_to_dir],0
|
||||
je @f
|
||||
.return_exit_to_dir:
|
||||
sub [right_folder_data],304
|
||||
inc [right_folder_block]
|
||||
mov [exit_to_dir],0
|
||||
@@:
|
||||
.nothing:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
right_name_sort:
|
||||
; sorting of files
|
||||
call prepare_data_1
|
||||
call right_name_sort_1
|
||||
call prepare_data_2
|
||||
call right_name_sort_1
|
||||
.1:
|
||||
call prepare_data_4
|
||||
jmp right_sort_files.move_sorted_file
|
||||
right_name_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_2
|
||||
je .file
|
||||
test [esi],byte 0x10
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
test [esi],byte 0x10
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
call sort_by_name.start
|
||||
jae .add_counter
|
||||
.no_add_counter:
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[right_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
right_type_sort:
|
||||
; sorting of files
|
||||
call right_prepare_extension_start_1
|
||||
call prepare_data_1
|
||||
call right_type_sort_1
|
||||
call prepare_data_2
|
||||
call right_type_sort_1
|
||||
jmp right_name_sort.1
|
||||
right_type_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_2
|
||||
je .file
|
||||
test [esi],byte 0x10
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
test [esi],byte 0x10
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
cmp [dir_or_file],1
|
||||
je @f
|
||||
call prepare_data_5
|
||||
@@:
|
||||
call sort_by_name.start
|
||||
je .1
|
||||
ja .add_counter
|
||||
.no_add_counter:
|
||||
; pushad
|
||||
; pushfd
|
||||
; dps 'left_type_sort'
|
||||
; newline
|
||||
; popfd
|
||||
; popad
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
.1:
|
||||
cmp [dir_or_file],1
|
||||
je .add_counter
|
||||
call sort_by_name
|
||||
jbe .no_add_counter
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[right_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
right_size_date_sort:
|
||||
; sorting of files
|
||||
call prepare_data_1
|
||||
call right_size_date_sort_1
|
||||
call prepare_data_2
|
||||
call right_size_date_sort_1
|
||||
jmp right_name_sort.1
|
||||
right_size_date_sort_1:
|
||||
xor ebp,ebp
|
||||
.copy_folders:
|
||||
call copy_folders_2
|
||||
je .file
|
||||
test [esi],byte 0x10
|
||||
jz .continue
|
||||
jmp @f
|
||||
.file:
|
||||
test [esi],byte 0x10
|
||||
jnz .continue
|
||||
@@:
|
||||
call prepare_data_3
|
||||
.start:
|
||||
push esi edi
|
||||
cmp [right_sort_flag],2
|
||||
je .size_sort
|
||||
call sort_by_date
|
||||
je .1
|
||||
ja .add_counter
|
||||
jmp .no_add_counter
|
||||
.size_sort:
|
||||
cmp [dir_or_file],0
|
||||
je .file_1
|
||||
call sort_by_name.start
|
||||
jmp @f
|
||||
.file_1:
|
||||
call sort_by_size
|
||||
@@:
|
||||
jae .add_counter
|
||||
.no_add_counter:
|
||||
call move_area_for_bdvk
|
||||
pop edi esi
|
||||
jmp .end
|
||||
.1:
|
||||
call sort_by_name.start
|
||||
jbe .no_add_counter
|
||||
.add_counter:
|
||||
inc [sort_counter]
|
||||
pop edi esi
|
||||
call add_counter
|
||||
jae .start
|
||||
.end:
|
||||
call move_bdvk
|
||||
.continue:
|
||||
inc ebp
|
||||
cmp ebp,[right_folder_block]
|
||||
jb .copy_folders
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
+47
-23
@@ -1,4 +1,8 @@
|
||||
header_text db 'Kolibri File Manager v0.48e',0
|
||||
header_text db 'Kolibri File Manager v0.49'
|
||||
if USE_STATIC_LIBS eq 1
|
||||
db ' static'
|
||||
end if
|
||||
db 0
|
||||
;---------------------------------------------------------------------
|
||||
fbutton_name:
|
||||
.f1 db '1 Help',0
|
||||
@@ -62,16 +66,20 @@ select_disk_char:
|
||||
truncated_filename_char db '..'
|
||||
;---------------------------------------------------------------------
|
||||
sort_button_name:
|
||||
.name db 'Name'
|
||||
.type db 'Type'
|
||||
.size db 'Size'
|
||||
.date db 'Date'
|
||||
.name db 'Name '
|
||||
.name_e db ' ',0
|
||||
.type db 'Type '
|
||||
.type_e db ' ',0
|
||||
.size db 'Size '
|
||||
.size_e db ' ',0
|
||||
.date db 'Date '
|
||||
.date_e db ' ',0
|
||||
;---------------------------------------------------------------------
|
||||
type_table:
|
||||
db '<DIR> '
|
||||
db '<DIR> '
|
||||
;---------------------------------------------------------------------
|
||||
size_table:
|
||||
db '1023b '
|
||||
db '1023b '
|
||||
;---------------------------------------------------------------------
|
||||
date_table:
|
||||
db ' . . 22:00 '
|
||||
@@ -80,36 +88,39 @@ year_table:
|
||||
db ' '
|
||||
;---------------------------------------------------------------------
|
||||
ini_file_name:
|
||||
db 'kfm.ini',0
|
||||
db '/sys/File managers/icon2ext.ini',0
|
||||
error_open_ini_file:
|
||||
db '"Initialization error',13,10,\
|
||||
'Error opening file ',39,'icon2ext.ini',39,'!" -tW',0
|
||||
;---------------------------------------------------------------------
|
||||
error_type:
|
||||
db 'File system error',0
|
||||
;---------------------------------------------------------------------
|
||||
delete_type:
|
||||
sz_Delete_files:
|
||||
db 'Delete file(s)',0
|
||||
;---------------------------------------------------------------------
|
||||
copy_type:
|
||||
db ' Copy files',0
|
||||
;---------------------------------------------------------------------
|
||||
copy_type_1:
|
||||
sz_Copy_file:
|
||||
db 'Copy file',0
|
||||
;---------------------------------------------------------------------
|
||||
move_type:
|
||||
db ' Move files',0
|
||||
;---------------------------------------------------------------------
|
||||
move_type_1:
|
||||
sz_Move_file:
|
||||
db 'Move file',0
|
||||
;---------------------------------------------------------------------
|
||||
rename_type:
|
||||
db ' Rename files',0
|
||||
;---------------------------------------------------------------------
|
||||
rename_type_1:
|
||||
sz_Rename_file:
|
||||
db 'Rename file',0
|
||||
;---------------------------------------------------------------------
|
||||
create_dir:
|
||||
sz_Create_dir:
|
||||
db 'Create directory',0
|
||||
;---------------------------------------------------------------------
|
||||
create_file:
|
||||
sz_Create_file:
|
||||
db 'Create file',0
|
||||
;---------------------------------------------------------------------
|
||||
exit_type:
|
||||
@@ -148,6 +159,23 @@ type_change:
|
||||
type_access:
|
||||
db 'Access date:',0
|
||||
;---------------------------------------------------------------------
|
||||
sz_main_menu_File db 'File',0
|
||||
sz_main_menu_Select db 'Select',0
|
||||
sz_main_menu_Sort db 'Sort',0
|
||||
sz_main_menu_Help db 'Help',0
|
||||
|
||||
sz_menu_File_selection db 'File selection Insert',0
|
||||
sz_menu_Select_all db 'Select all Ctrl+A',0
|
||||
sz_menu_Clear_selection db 'Clear selection Ctrl+Num-',0
|
||||
sz_menu_Invert_selection db 'Invert selection Ctrl+Num*',0
|
||||
|
||||
sz_menu_Copy_file db 'Copy file F5',0
|
||||
sz_menu_Move_file db 'Move file F6',0
|
||||
sz_menu_Create_dir db 'Create directory F7',0
|
||||
sz_menu_Delete_files db 'Delete file(s) F8',0
|
||||
sz_menu_Exit db 'Exit F12',0
|
||||
sz_menu_About db 'About KFM F1',0
|
||||
;---------------------------------------------------------------------
|
||||
type_limiters_data_time:
|
||||
db '/ / : :',0
|
||||
;---------------------------------------------------------------------
|
||||
@@ -200,19 +228,15 @@ mouse_key_delay dd 100
|
||||
;---------------------------------------------------------------------
|
||||
copy_editboxes:
|
||||
create_editboxes:
|
||||
edit1 edit_box 150,10,10,0xffffff,0xbbddff,0,0,0,255,create_dir_name,ed_focus+ed_always_focus,0
|
||||
copy_editboxes_end:
|
||||
create_editboxes_end:
|
||||
;---------------------------------------------------------------------
|
||||
;copy_editboxes:
|
||||
;edit2 edit_box 150,10,10,0xffffff,0,0,0,0,255,create_dir_name,ed_focus,0
|
||||
;copy_editboxes_end:
|
||||
edit1 edit_box 150,10,10, 0xffffff,0xbbddff,0,0,0,\
|
||||
255,create_dir_name,mouse_flag,ed_focus+ed_always_focus,0
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sysopen:
|
||||
dd 7,0,start_parameter,0,0
|
||||
dd SSF_START_APP,0,start_parameter,0,0
|
||||
db '/sys/@open',0
|
||||
;---------------------------------------------------------------------
|
||||
if USE_STATIC_LIBS eq 1
|
||||
buttons_file_data file 'images/buttons.raw'
|
||||
icons_file_data file 'images/icons.raw'
|
||||
end if
|
||||
;---------------------------------------------------------------------
|
||||
@@ -1,60 +1,5 @@
|
||||
;---------------------------------------------------------------------
|
||||
get_icon_number:
|
||||
mov ebp,[extension_size] ;[icons_end_tag]
|
||||
test ebp,ebp
|
||||
jz .end
|
||||
call normalize_extension_of_file
|
||||
mov edx,[icons_end_tag]
|
||||
mov edi,[ini_file_start]
|
||||
dec edi
|
||||
.search_association:
|
||||
cmp edx,edi
|
||||
jbe .end
|
||||
mov esi,extension_temp_storage
|
||||
mov ecx,ebp
|
||||
test ecx,ecx
|
||||
je @f
|
||||
sub ecx,2
|
||||
@@:
|
||||
inc edi
|
||||
mov ebx,edi
|
||||
cld
|
||||
rep cmpsb
|
||||
mov edi,ebx
|
||||
jne .search_association
|
||||
mov esi,edi
|
||||
add esi,ebp
|
||||
test ebp,ebp
|
||||
je @f
|
||||
sub esi,2
|
||||
@@:
|
||||
cmp [esi],byte ' '
|
||||
jne .search_association
|
||||
inc esi
|
||||
xor ebx,ebx
|
||||
call .calculate
|
||||
imul eax,1000
|
||||
call .calculate_1
|
||||
imul eax,100
|
||||
call .calculate_1
|
||||
imul eax,10
|
||||
call .calculate_1
|
||||
add ebx,eax
|
||||
ret
|
||||
.end:
|
||||
mov ebx,2
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.calculate_1:
|
||||
add ebx,eax
|
||||
.calculate:
|
||||
xor eax,eax
|
||||
cld
|
||||
lodsb
|
||||
sub eax,0x30
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
normalize_extension_of_file:
|
||||
proc normalize_extension_of_file
|
||||
push edi
|
||||
mov esi,[extension_start]
|
||||
mov edi,extension_temp_storage
|
||||
@@ -67,6 +12,7 @@ normalize_extension_of_file:
|
||||
jnz @b
|
||||
pop edi
|
||||
ret
|
||||
endp
|
||||
;---------------------------------------------------------------------
|
||||
open_file_with_appl_1:
|
||||
mov ebp,files_associations_1
|
||||
@@ -120,8 +66,8 @@ open_file_with_appl:
|
||||
|
||||
.run_sysopen:
|
||||
@@:
|
||||
cmp [select_panel_counter],0
|
||||
jne @f
|
||||
cmp [fb_right.select_panel_counter],1
|
||||
je @f
|
||||
mov esi,read_folder_name ;read_folder.name
|
||||
jmp .start
|
||||
@@:
|
||||
@@ -156,8 +102,7 @@ open_file_with_appl:
|
||||
jnz @b
|
||||
.continue:
|
||||
mov [start_file_data.param],start_parameter
|
||||
;call start_appl ;Leency
|
||||
mcall 70,sysopen ;Leency
|
||||
mcall SF_FILE, sysopen ;Leency
|
||||
cmp eax,0
|
||||
jge @f
|
||||
mov ebx,0
|
||||
@@ -170,38 +115,4 @@ open_file_with_appl:
|
||||
.end:
|
||||
mov eax,1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
search_star_and_end_tags:
|
||||
mov edi,[ini_file_start]
|
||||
dec edi
|
||||
.search_tag1:
|
||||
cmp [left_folder_data],edi
|
||||
jbe .end
|
||||
mov esi,ebp
|
||||
mov ecx,22
|
||||
inc edi
|
||||
cld
|
||||
push edi
|
||||
rep cmpsb
|
||||
pop edi
|
||||
jne .search_tag1
|
||||
dec edi
|
||||
push edi
|
||||
.search_end_tag:
|
||||
cmp [left_folder_data],edi
|
||||
jbe .end
|
||||
mov esi,end_section_tag
|
||||
mov ecx,7
|
||||
inc edi
|
||||
cld
|
||||
push edi
|
||||
rep cmpsb
|
||||
pop edi
|
||||
jne .search_end_tag
|
||||
mov [end_tag],edi
|
||||
pop edi
|
||||
ret
|
||||
.end:
|
||||
mov ebp,-1
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
Reference in new issue
Block a user