2013-07-28 15:06:02 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_buttons_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ecx,[skin_high]
|
|
|
|
|
add ecx,19
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,18
|
|
|
|
|
mov ebx,[window_width]
|
|
|
|
|
sub ebx,9
|
|
|
|
|
add ebx,5 shl 16
|
|
|
|
|
mcall 13,,,0xffffff
|
2020-05-05 01:50:41 +02:00
|
|
|
|
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,15 shl 16+20
|
|
|
|
|
add edx,[skin_high]
|
2020-05-05 01:50:41 +02:00
|
|
|
|
mcall 7,buttons_file_data,<198,16>
|
|
|
|
|
|
|
|
|
|
mov ecx, 20
|
|
|
|
|
add ecx, [skin_high]
|
|
|
|
|
shl ecx, 16
|
|
|
|
|
add ecx, 16
|
|
|
|
|
mcall 8,<15,16>,,150+0x40000000
|
|
|
|
|
|
|
|
|
|
_new_but:
|
|
|
|
|
add ebx,26 shl 16
|
|
|
|
|
inc edx
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall
|
2020-05-05 01:50:41 +02:00
|
|
|
|
cmp edx, 157+0x40000000
|
|
|
|
|
jl _new_but
|
|
|
|
|
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.calculate_button:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ebx,edx
|
|
|
|
|
mov bx,15
|
|
|
|
|
mov ecx,edx
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,bx
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_left_sort_button:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[left_panel_x.start_x]
|
|
|
|
|
add bx,[left_panel_x.size_x]
|
2022-02-23 00:36:17 +01:00
|
|
|
|
sub ebx,50+15+12
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov cx,[left_panel_y.start_y]
|
|
|
|
|
call calclulate_sort_button_1
|
|
|
|
|
mov edx,145
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov esi,0xffffff
|
|
|
|
|
dec ebp
|
|
|
|
|
cmp [left_sort_flag],ebp
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
mov esi,0xccccff
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call calclulate_sort_button_2
|
|
|
|
|
jnz .start
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
calclulate_sort_button_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,50
|
|
|
|
|
sub cx,14
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,12
|
|
|
|
|
mov eax,8
|
|
|
|
|
mov ebp,4
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
calclulate_sort_button_2:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
inc ebp
|
|
|
|
|
mcall
|
|
|
|
|
pusha
|
|
|
|
|
push ebx
|
|
|
|
|
mov eax,ebx
|
|
|
|
|
inc eax
|
|
|
|
|
shl eax,16
|
|
|
|
|
add ebx,eax
|
|
|
|
|
cmp ebp,4
|
|
|
|
|
jne @f
|
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov bx,15+12
|
2013-07-28 15:06:02 +02:00
|
|
|
|
jmp .continue
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.continue:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
inc ecx
|
|
|
|
|
mcall 13,,,0xcccccc
|
|
|
|
|
pop ebx
|
|
|
|
|
cmp ebp,1
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
mov eax,[temp_panel_end]
|
|
|
|
|
shl eax,16
|
|
|
|
|
add eax,[temp_panel_end]
|
|
|
|
|
shr eax,16
|
|
|
|
|
shr ebx,16
|
|
|
|
|
sub ebx,eax
|
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,ax
|
|
|
|
|
rol ebx,16
|
|
|
|
|
mcall 13
|
|
|
|
|
mov [temp_panel_end],ebx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
pusha
|
|
|
|
|
shr ecx,16
|
|
|
|
|
mov bx,cx
|
|
|
|
|
add ebx,3 shl 16+2
|
|
|
|
|
mov edx,ebp
|
|
|
|
|
dec edx
|
|
|
|
|
shl edx,2
|
|
|
|
|
add edx,sort_button_name
|
|
|
|
|
mov eax,4
|
2015-11-06 17:17:27 +01:00
|
|
|
|
xor ecx,ecx
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov esi,eax
|
2015-11-06 17:17:27 +01:00
|
|
|
|
mcall
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
dec edx
|
|
|
|
|
sub ebx,38 shl 16
|
|
|
|
|
mov bx,36
|
|
|
|
|
dec ebp
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_right_sort_button:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[right_panel_x.start_x]
|
|
|
|
|
add bx,[right_panel_x.size_x]
|
2022-02-23 00:36:17 +01:00
|
|
|
|
sub ebx,50+15+12
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov cx,[right_panel_y.start_y]
|
|
|
|
|
call calclulate_sort_button_1
|
|
|
|
|
mov edx,149
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov esi,0xffffff
|
|
|
|
|
dec ebp
|
|
|
|
|
cmp [right_sort_flag],ebp
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
mov esi,0xccccff
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call calclulate_sort_button_2
|
|
|
|
|
jnz .start
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_left_select_disk_button:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[left_panel_x.start_x]
|
|
|
|
|
mov cx,[left_panel_y.start_y]
|
|
|
|
|
mov ebp,read_folder_name ;read_folder.name
|
|
|
|
|
mov edx,0x40000000+140
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,60
|
|
|
|
|
sub cx,14
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,13
|
|
|
|
|
mcall 8,,,,0xffffff
|
|
|
|
|
mcall 13,,,0xffffff
|
|
|
|
|
pusha
|
|
|
|
|
mov esi,ebp
|
|
|
|
|
add esi,2
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
inc esi
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
cmp [esi],byte '/'
|
|
|
|
|
jne @r
|
|
|
|
|
|
|
|
|
|
add esi,2
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
sub esi,ebp ;read_folder.name
|
|
|
|
|
add ebx,1 shl 16
|
|
|
|
|
shr ecx,16
|
|
|
|
|
mov bx,cx
|
|
|
|
|
add ebx,3
|
|
|
|
|
mov edx,ebp
|
|
|
|
|
mcall 4,,0 ;,read_folder.name
|
|
|
|
|
popa
|
|
|
|
|
add ebx,50 shl 16
|
|
|
|
|
mov bx,10
|
|
|
|
|
mcall ,,,0x6060ff
|
|
|
|
|
mov [temp_panel_end],ebx
|
|
|
|
|
add ebx,1 shl 16
|
|
|
|
|
shr ecx,16
|
|
|
|
|
mov bx,cx
|
|
|
|
|
add ebx,3
|
|
|
|
|
mcall 4, ,0x80ffffff,select_disk_char
|
|
|
|
|
add ebx,1 shl 16
|
|
|
|
|
mcall
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_right_select_disk_button:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[right_panel_x.start_x]
|
|
|
|
|
mov cx,[right_panel_y.start_y]
|
|
|
|
|
mov ebp,read_folder_1_name ;read_folder_1.name
|
|
|
|
|
mov edx,0x40000000+141
|
|
|
|
|
jmp draw_left_select_disk_button.1
|
|
|
|
|
;------------------------------------------------------------------------------
|
2014-03-12 03:26:12 +01:00
|
|
|
|
;draw_ATAPI_tray_control:
|
|
|
|
|
; ret
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
calc_max_panel_line:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ax,[left_panel_y.size_y]
|
|
|
|
|
mov ebx,10
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ebx
|
|
|
|
|
mov [max_panel_line],eax
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_icon:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pusha
|
|
|
|
|
test [edx-40],byte 0x10
|
|
|
|
|
jnz .draw_dir_pic
|
|
|
|
|
|
|
|
|
|
call get_icon_number
|
|
|
|
|
imul ebx,270
|
2020-05-28 18:00:42 +02:00
|
|
|
|
add ebx,icons_file_data
|
2013-07-28 15:06:02 +02:00
|
|
|
|
jmp .draw
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.draw_dir_pic:
|
2020-05-28 18:00:42 +02:00
|
|
|
|
mov ebx,icons_file_data
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [edx],word '..'
|
|
|
|
|
jne .draw
|
|
|
|
|
|
|
|
|
|
add ebx,270 ;*17
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.draw:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,[esp+16] ;ebx
|
|
|
|
|
ror edx,16
|
|
|
|
|
sub edx,12
|
|
|
|
|
rol edx,16
|
2021-12-23 13:27:15 +01:00
|
|
|
|
dec edx
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall 7, ,<10,9>
|
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 10-<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|
|
|
|
; AX - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; EBX - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
decimal_string_2:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
push eax ebx ecx edx
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov [ebx],byte '0'
|
|
|
|
|
inc ebx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.p3:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
xor edx,edx
|
|
|
|
|
push ebx
|
|
|
|
|
mov ebx,10
|
|
|
|
|
div ebx
|
|
|
|
|
pop ebx
|
|
|
|
|
add edx,48
|
|
|
|
|
push edx
|
|
|
|
|
inc ecx
|
|
|
|
|
cmp ax,0
|
|
|
|
|
jne .p3
|
|
|
|
|
|
|
|
|
|
cmp ecx,1
|
|
|
|
|
jbe .p4
|
|
|
|
|
|
|
|
|
|
mov ecx,2
|
|
|
|
|
dec ebx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.p4:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pop edx
|
|
|
|
|
mov [ebx],dl
|
|
|
|
|
inc ebx
|
|
|
|
|
loop .p4
|
|
|
|
|
pop edx ecx ebx eax
|
2011-01-29 19:25:55 +01:00
|
|
|
|
ret
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2022-02-23 00:36:17 +01:00
|
|
|
|
decimal_string:
|
|
|
|
|
push eax ebx ecx edx
|
|
|
|
|
mov ecx,10
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.p3:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
xor edx,edx
|
2022-02-23 00:36:17 +01:00
|
|
|
|
div ecx
|
2013-07-28 15:06:02 +02:00
|
|
|
|
add edx,48
|
|
|
|
|
mov [ebx],dl
|
2022-02-23 00:36:17 +01:00
|
|
|
|
dec ebx
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz .p3
|
2013-07-28 15:06:02 +02:00
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
pop edx ecx ebx eax
|
2011-01-29 19:25:55 +01:00
|
|
|
|
ret
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_type_size_date:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pusha
|
|
|
|
|
test [edx-40],byte 0x10
|
|
|
|
|
jz .copy_type
|
|
|
|
|
|
|
|
|
|
mov [type_table],dword '<DIR'
|
|
|
|
|
mov [type_table+4],word '> '
|
|
|
|
|
mov [file_name_length],0
|
|
|
|
|
mov [extension_size],0
|
|
|
|
|
jmp .start ;.size
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.copy_type:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov [type_table],dword ' '
|
|
|
|
|
mov [type_table+4],word ' '
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov esi,edx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cld
|
|
|
|
|
lodsb
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz @b
|
|
|
|
|
|
|
|
|
|
mov [file_name_length],esi
|
|
|
|
|
sub [file_name_length],edx
|
|
|
|
|
mov [temp_counter_1],esi
|
|
|
|
|
test [edx-40],byte 0x10
|
|
|
|
|
jnz .size
|
|
|
|
|
|
|
|
|
|
dec esi
|
|
|
|
|
dec edx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
std
|
|
|
|
|
lodsb
|
|
|
|
|
cmp esi,edx
|
|
|
|
|
je .extension_size_0
|
|
|
|
|
|
|
|
|
|
cmp al,'.'
|
|
|
|
|
jnz @b
|
|
|
|
|
|
|
|
|
|
add esi,2
|
|
|
|
|
mov [extension_start],esi
|
|
|
|
|
mov ecx,[temp_counter_1]
|
|
|
|
|
sub ecx,esi
|
|
|
|
|
inc ecx
|
|
|
|
|
mov [extension_size],ecx
|
|
|
|
|
sub [file_name_length],ecx
|
|
|
|
|
cmp ecx,2
|
|
|
|
|
ja @f
|
|
|
|
|
|
|
|
|
|
inc [file_name_length]
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
sub ecx,2
|
|
|
|
|
cmp ecx,4
|
|
|
|
|
jbe @f
|
|
|
|
|
|
|
|
|
|
mov ecx,4
|
|
|
|
|
mov [type_table+4],word '..'
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edi,type_table ;+1
|
|
|
|
|
cld
|
|
|
|
|
rep movsb
|
|
|
|
|
mov [edi],byte ' '
|
|
|
|
|
inc edx
|
|
|
|
|
jmp .size
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.extension_size_0:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
inc edx
|
|
|
|
|
mov [extension_size],0
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.size:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
test [edx-40],byte 0x10
|
|
|
|
|
jz .copy_size
|
|
|
|
|
|
|
|
|
|
mov [size_table],dword '----'
|
|
|
|
|
mov [size_table+4],word '- '
|
|
|
|
|
jmp .date
|
|
|
|
|
;--------------------------------------
|
2022-02-06 21:05:54 +01:00
|
|
|
|
.qword_div:
|
|
|
|
|
mov eax,[edx-40+32]
|
|
|
|
|
mov ebx,[edx-40+32+4]
|
|
|
|
|
@@: ; /1024
|
|
|
|
|
shrd eax,ebx,5 ; /32
|
|
|
|
|
shr ebx,5 ; /32
|
|
|
|
|
shrd eax,ebx,5 ; /32
|
|
|
|
|
shr ebx,5 ; /32
|
|
|
|
|
dec ecx
|
|
|
|
|
jnz @b
|
|
|
|
|
; /(1024*1024)
|
|
|
|
|
shr eax,20
|
|
|
|
|
test eax,eax
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.copy_size:
|
2022-02-06 21:05:54 +01:00
|
|
|
|
;/0x1000000000000000 - EB
|
|
|
|
|
;/0x4000000000000 - PB
|
|
|
|
|
;/0x10000000000 - TB
|
|
|
|
|
;/0x40000000 - GB
|
|
|
|
|
;/0x100000 - MB
|
|
|
|
|
;/0x400 - KB
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov [size_table],dword ' '
|
|
|
|
|
mov [size_table+4],word ' '
|
2022-02-06 21:05:54 +01:00
|
|
|
|
push ebx edx
|
|
|
|
|
push ecx
|
|
|
|
|
mov ecx,4
|
|
|
|
|
call .qword_div
|
|
|
|
|
pop ecx
|
|
|
|
|
jz @f
|
2013-07-28 15:06:02 +02:00
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'E' ; Exa Byte
|
2013-07-28 15:06:02 +02:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2022-02-06 21:05:54 +01:00
|
|
|
|
push ecx
|
|
|
|
|
mov ecx,3
|
|
|
|
|
call .qword_div
|
|
|
|
|
pop ecx
|
|
|
|
|
jz @f
|
2013-07-28 15:06:02 +02:00
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'P' ; Peta Byte
|
2013-07-28 15:06:02 +02:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2022-02-06 21:05:54 +01:00
|
|
|
|
push ecx
|
|
|
|
|
mov ecx,2
|
|
|
|
|
call .qword_div
|
|
|
|
|
pop ecx
|
|
|
|
|
jz @f
|
2013-07-28 15:06:02 +02:00
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'T' ; Tera Byte
|
2022-02-06 21:05:54 +01:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
@@:
|
|
|
|
|
push ecx
|
|
|
|
|
mov ecx,1
|
|
|
|
|
call .qword_div
|
|
|
|
|
pop ecx
|
|
|
|
|
jz @f
|
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'G' ; Giga Byte
|
2013-07-28 15:06:02 +02:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov eax,[edx-40+32]
|
2022-02-06 21:05:54 +01:00
|
|
|
|
mov ebx,eax
|
|
|
|
|
shr eax,20 ; /(1024*1024)
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'M' ; Mega Byte
|
2022-02-06 21:05:54 +01:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
@@:
|
|
|
|
|
mov eax,ebx
|
|
|
|
|
shr eax,10 ; /1024
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
|
|
|
|
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+3
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov [ebx+1],byte 'K' ; Kilo Byte
|
2022-02-06 21:05:54 +01:00
|
|
|
|
jmp .size_convert_end
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
@@:
|
|
|
|
|
mov eax,ebx
|
2011-01-29 19:25:55 +01:00
|
|
|
|
;.size_convert:
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mov ebx,size_table+4
|
|
|
|
|
call decimal_string
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.size_convert_end:
|
2022-02-06 21:05:54 +01:00
|
|
|
|
pop edx ebx
|
2013-07-28 15:06:02 +02:00
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.date:
|
2022-02-23 00:36:17 +01:00
|
|
|
|
cmp [edx],word '..'
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
cmp [edx+2],byte 0
|
|
|
|
|
je .not_show_date
|
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov al,[edx-40+28]
|
|
|
|
|
push ebx
|
|
|
|
|
mov ebx,date_table
|
|
|
|
|
call decimal_string_2
|
|
|
|
|
mov al,[edx-40+29]
|
|
|
|
|
mov ebx,date_table+3
|
|
|
|
|
call decimal_string_2
|
|
|
|
|
mov ax,[edx-40+30]
|
2022-02-23 00:36:17 +01:00
|
|
|
|
lea ebx,[year_table+4]
|
|
|
|
|
mov [ebx-4], dword '0000'
|
|
|
|
|
mov [ebx], byte '0'
|
|
|
|
|
call decimal_string
|
|
|
|
|
mov eax,[year_table+1]
|
|
|
|
|
mov [date_table+6],eax
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pop ebx
|
|
|
|
|
ror ebx,16
|
|
|
|
|
add bx,[left_panel_x.size_x]
|
2022-02-23 00:36:17 +01:00
|
|
|
|
sub ebx,161 ;122+12+15
|
2013-07-28 15:06:02 +02:00
|
|
|
|
rol ebx,16
|
|
|
|
|
mov ecx,0
|
|
|
|
|
cmp [marked_file],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
mov ecx,0xff0000
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2022-02-23 00:36:17 +01:00
|
|
|
|
mcall 4,,,type_table,22
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
.not_show_date:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_folder_data:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [drawing_panel_folder],1
|
|
|
|
|
jne .right_panel
|
|
|
|
|
|
|
|
|
|
mov eax,[left_folder_block]
|
|
|
|
|
sub eax,[max_panel_line]
|
|
|
|
|
test eax,0x8000000
|
|
|
|
|
jz .ok_left
|
|
|
|
|
|
|
|
|
|
mov [left_start_draw_line],0
|
|
|
|
|
jmp @f
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.ok_left:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp eax,[left_start_draw_line]
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov [left_start_draw_line],eax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[left_panel_x.start_x]
|
|
|
|
|
add bx,12
|
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,[left_panel_y.start_y]
|
|
|
|
|
inc bx
|
|
|
|
|
mov edx,[left_start_draw_line]
|
|
|
|
|
imul edx,304
|
|
|
|
|
add edx,[left_folder_data]
|
|
|
|
|
add edx,32+40
|
|
|
|
|
mov [temp_counter],0
|
|
|
|
|
jmp .type_folder
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.right_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov eax,[right_folder_block]
|
|
|
|
|
sub eax,[max_panel_line]
|
|
|
|
|
test eax,0x8000000
|
|
|
|
|
jz .ok_right
|
|
|
|
|
|
|
|
|
|
mov [right_start_draw_line],0
|
|
|
|
|
jmp @f
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.ok_right:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp eax,[right_start_draw_line]
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov [right_start_draw_line],eax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[right_panel_x.start_x]
|
|
|
|
|
add bx,12
|
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,[right_panel_y.start_y]
|
|
|
|
|
inc bx
|
|
|
|
|
mov edx,[right_start_draw_line]
|
|
|
|
|
imul edx,304
|
|
|
|
|
add edx,[right_folder_data]
|
|
|
|
|
add edx,32+40
|
|
|
|
|
mov [temp_counter],1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_folder:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pusha
|
|
|
|
|
mov eax,edx
|
|
|
|
|
cmp [temp_counter],1
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
sub eax,[left_folder_data]
|
|
|
|
|
sub eax,32+40
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov ebx,304
|
|
|
|
|
div ebx
|
|
|
|
|
cmp eax,[left_folder_block]
|
|
|
|
|
je .end_1
|
|
|
|
|
|
|
|
|
|
jmp .continue_1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
sub eax,[right_folder_data]
|
|
|
|
|
sub eax,32+40
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov ebx,304
|
|
|
|
|
div ebx
|
|
|
|
|
cmp eax,[right_folder_block]
|
|
|
|
|
je .end_1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.continue_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
cmp eax,[max_panel_line] ; 20
|
|
|
|
|
je .end_2
|
|
|
|
|
|
|
|
|
|
mov [marked_file],0
|
|
|
|
|
cmp [edx+299-40],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
mov [marked_file],1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call clear_line
|
|
|
|
|
call draw_type_size_date
|
|
|
|
|
call draw_icon
|
|
|
|
|
push eax
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ax,[left_panel_x.size_x]
|
|
|
|
|
push ebx edx
|
|
|
|
|
mov ebx,6
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ebx
|
|
|
|
|
pop edx ebx
|
2022-02-23 00:36:17 +01:00
|
|
|
|
sub eax,23+2+2+2
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov esi,[file_name_length]
|
|
|
|
|
mov [temp_counter_1],0
|
|
|
|
|
cmp esi,eax
|
|
|
|
|
jbe @f
|
|
|
|
|
|
|
|
|
|
mov esi,eax
|
|
|
|
|
mov [temp_counter_1],1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ecx,0
|
|
|
|
|
cmp [marked_file],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
mov ecx,0xff0000
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall 4
|
|
|
|
|
cmp [temp_counter_1],0
|
|
|
|
|
je .continue
|
|
|
|
|
|
|
|
|
|
mov eax,esi ;[file_name_length]
|
|
|
|
|
imul eax,6
|
|
|
|
|
shl eax,16
|
|
|
|
|
push ebx edx
|
|
|
|
|
add ebx,eax
|
|
|
|
|
mcall 4,,0xff0000,truncated_filename_char,2
|
|
|
|
|
add ebx,1 shl 16
|
|
|
|
|
mcall
|
|
|
|
|
pop edx ebx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.continue:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
add ebx,10
|
|
|
|
|
add edx,304 ;10
|
|
|
|
|
pop eax
|
|
|
|
|
inc eax
|
|
|
|
|
jmp .start
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end_2:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ax,[left_panel_y.start_y]
|
|
|
|
|
add ax,[left_panel_y.size_y]
|
|
|
|
|
mov cx,bx
|
|
|
|
|
dec cx
|
|
|
|
|
rol ecx,16
|
|
|
|
|
mov cx,ax
|
|
|
|
|
mov eax,ecx
|
|
|
|
|
shr eax,16
|
|
|
|
|
sub cx,ax
|
|
|
|
|
cmp cx,0
|
|
|
|
|
jbe @f
|
2011-01-29 19:25:55 +01:00
|
|
|
|
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov bx,[left_panel_x.size_x]
|
|
|
|
|
sub ebx,12 shl 16
|
|
|
|
|
mcall 13,,,0xffffff
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
@@:
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [drawing_panel_folder],1
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
call draw_scroll_bar_left
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call draw_scroll_bar_right
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
clear_line:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [not_clear_lines],0
|
|
|
|
|
jne .end_1
|
|
|
|
|
|
|
|
|
|
pusha
|
|
|
|
|
shl ebx,16
|
|
|
|
|
shr ebx,16
|
|
|
|
|
dec ebx
|
|
|
|
|
cmp [drawing_panel_folder],1
|
|
|
|
|
jne .right
|
|
|
|
|
|
|
|
|
|
cmp [select_panel_counter],0
|
|
|
|
|
jne .continue
|
|
|
|
|
|
|
|
|
|
mov ax,[left_start_draw_cursor_line]
|
|
|
|
|
add ax,[left_panel_y.start_y]
|
|
|
|
|
cmp bx,ax
|
|
|
|
|
je .end
|
|
|
|
|
|
|
|
|
|
jmp .continue
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.right:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [select_panel_counter],0
|
|
|
|
|
je .continue
|
|
|
|
|
|
|
|
|
|
mov ax,[right_start_draw_cursor_line]
|
|
|
|
|
add ax,[right_panel_y.start_y]
|
|
|
|
|
cmp bx,ax
|
|
|
|
|
je .end
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.continue:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ebx,[esp+16]
|
|
|
|
|
mov cx,bx
|
|
|
|
|
dec cx
|
|
|
|
|
rol ecx,16
|
|
|
|
|
mov cx,10
|
|
|
|
|
mov bx,[left_panel_x.size_x]
|
|
|
|
|
cmp [drawing_panel_folder],1
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
dec ebx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
sub ebx,12 shl 16+15
|
|
|
|
|
mcall 13,,,0xffffff
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
popa
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_left_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call clear_left_panel
|
|
|
|
|
call calc_max_panel_line
|
|
|
|
|
call draw_left_panel_selection
|
|
|
|
|
mov [drawing_panel_folder],1
|
|
|
|
|
call draw_folder_data
|
|
|
|
|
call draw_left_panel_patch
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_right_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call clear_right_panel
|
|
|
|
|
call calc_max_panel_line
|
|
|
|
|
call draw_right_panel_selection
|
|
|
|
|
mov [drawing_panel_folder],2
|
|
|
|
|
call draw_folder_data
|
|
|
|
|
call draw_right_panel_patch
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_left_panel_patch:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [select_panel_counter],0
|
|
|
|
|
jne .end
|
|
|
|
|
|
|
|
|
|
mov edx,read_folder_name ;read_folder.name
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
call clear_patch_area
|
|
|
|
|
mov ebx,[window_high]
|
|
|
|
|
sub ebx,33
|
|
|
|
|
add ebx,8 shl 16
|
|
|
|
|
mcall 4,,0x80000000 ; ,read_folder.name
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_right_panel_patch:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [select_panel_counter],1
|
|
|
|
|
jne draw_left_panel_patch.end
|
|
|
|
|
|
|
|
|
|
mov edx,read_folder_1_name ;read_folder_1.name
|
|
|
|
|
jmp draw_left_panel_patch.1
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
clear_patch_area:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
push edx
|
|
|
|
|
mov ebx,[window_width]
|
|
|
|
|
sub ebx,9
|
|
|
|
|
add ebx,5 shl 16
|
|
|
|
|
mov ecx,[window_high]
|
|
|
|
|
sub ecx,35
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,12
|
|
|
|
|
mcall 13,,,0xffffcc
|
|
|
|
|
pop edx
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_left_panel_selection:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [select_panel_counter],0
|
|
|
|
|
jne .end
|
2015-08-05 14:32:13 +02:00
|
|
|
|
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov eax,[left_folder_block]
|
|
|
|
|
sub eax,[left_start_draw_line]
|
|
|
|
|
mov edx,left_start_draw_cursor_line
|
|
|
|
|
mov cx,[edx]
|
|
|
|
|
call for_all_panel_selection
|
|
|
|
|
mov eax,[left_folder_block]
|
|
|
|
|
dec eax
|
|
|
|
|
imul eax,10
|
|
|
|
|
cmp ax,cx
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov cx,ax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov [edx],cx
|
|
|
|
|
mov ebx,[left_panel_x]
|
|
|
|
|
add cx,[left_panel_y.start_y]
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,10
|
|
|
|
|
sub ebx,15
|
|
|
|
|
mcall 13,,,0xbbddff
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.end:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_right_panel_selection:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [select_panel_counter],1
|
|
|
|
|
jne draw_left_panel_selection.end
|
|
|
|
|
|
|
|
|
|
mov eax,[right_folder_block]
|
|
|
|
|
sub eax,[right_start_draw_line]
|
|
|
|
|
mov edx,right_start_draw_cursor_line
|
|
|
|
|
mov cx,[edx]
|
|
|
|
|
call for_all_panel_selection
|
|
|
|
|
mov eax,[right_folder_block]
|
|
|
|
|
dec eax
|
|
|
|
|
imul eax,10
|
|
|
|
|
cmp ax,cx
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov cx,ax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov [edx],cx
|
|
|
|
|
mov ebx,[right_panel_x]
|
|
|
|
|
add cx,[right_panel_y.start_y]
|
|
|
|
|
jmp draw_left_panel_selection.1
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
for_all_panel_selection:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
imul eax,10
|
|
|
|
|
cmp ax,cx
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov cx,ax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov eax,[max_panel_line]
|
|
|
|
|
dec eax
|
|
|
|
|
imul eax,10
|
|
|
|
|
cmp ax,cx
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov cx,ax
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
clear_left_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ebx,7 shl 16
|
|
|
|
|
add ebx,[window_width]
|
|
|
|
|
shr bx,1
|
|
|
|
|
sub ebx,6+1
|
|
|
|
|
mov [left_panel_x],ebx
|
|
|
|
|
call calculate_panel_1
|
|
|
|
|
mov [left_panel_y],ecx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ax,cx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov ebx,10
|
|
|
|
|
div ebx
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 10
|
|
|
|
|
shl eax,1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2
|
|
|
|
|
lea eax,[eax+eax*4] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 5
|
|
|
|
|
mov [left_panel_y_correct_size_y],ax
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
calculate_panel_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ecx,[skin_high]
|
|
|
|
|
add ecx,70
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,[window_high]
|
|
|
|
|
sub ecx,129
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
clear_right_panel:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ebx,[window_width]
|
|
|
|
|
shr ebx,1
|
|
|
|
|
add ebx,3
|
|
|
|
|
shl ebx,16
|
|
|
|
|
add ebx,[window_width]
|
|
|
|
|
shr bx,1
|
|
|
|
|
sub bx,2+6
|
|
|
|
|
mov [right_panel_x],ebx
|
|
|
|
|
call calculate_panel_1
|
|
|
|
|
mov [right_panel_y],ecx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ax,cx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov ebx,10
|
|
|
|
|
div ebx
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 10
|
|
|
|
|
shl eax,1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2
|
|
|
|
|
lea eax,[eax+eax*4] ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 5
|
|
|
|
|
mov [right_panel_y_correct_size_y],ax
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
erase_fbutton:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,0x80000065
|
|
|
|
|
mov eax,8
|
|
|
|
|
mov ebp,12
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall
|
|
|
|
|
dec ebp
|
|
|
|
|
jnz .start
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_fbutton:
|
2012-04-07 17:21:20 +02:00
|
|
|
|
test [window_status],100b ; window is rolled up
|
|
|
|
|
jnz .exit
|
|
|
|
|
|
|
|
|
|
test [window_status],10b ; window is minimized to panel
|
|
|
|
|
jnz .exit
|
|
|
|
|
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ecx,[window_high]
|
|
|
|
|
sub ecx,20
|
|
|
|
|
shl ecx,16
|
|
|
|
|
add ecx,15
|
|
|
|
|
mov eax,[window_width]
|
|
|
|
|
mov ebx,12
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ebx
|
|
|
|
|
mov [fbutton_width],eax
|
|
|
|
|
mov ebx,5 shl 16
|
|
|
|
|
add ebx,eax
|
|
|
|
|
sub ebx,2
|
|
|
|
|
mov esi,0xaa00
|
|
|
|
|
mov edx,101
|
|
|
|
|
mov eax,8
|
|
|
|
|
mov ebp,12
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.start:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp ebp,1
|
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
mov eax,ebx
|
|
|
|
|
shr eax,16
|
|
|
|
|
mov bx,ax
|
|
|
|
|
mov eax,[window_width]
|
|
|
|
|
sub ax,bx
|
|
|
|
|
sub ax,5
|
|
|
|
|
mov bx,ax
|
|
|
|
|
mov eax,8
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall
|
|
|
|
|
push eax ebx edx
|
|
|
|
|
mov edx,0x6060ff
|
|
|
|
|
mov bx,10
|
|
|
|
|
cmp ebp,4
|
|
|
|
|
jae @f
|
|
|
|
|
|
|
|
|
|
mov bx,18
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall 13
|
|
|
|
|
cmp ebp,1
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
ror ebx,16
|
|
|
|
|
add ebx,[fbutton_width]
|
|
|
|
|
dec ebx
|
|
|
|
|
rol ebx,16
|
|
|
|
|
mov bx,1
|
|
|
|
|
inc ecx
|
|
|
|
|
mcall ,,,0xcccccc
|
|
|
|
|
dec ecx
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
@@:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
pop edx ebx eax
|
|
|
|
|
call .rol_ror
|
|
|
|
|
inc edx
|
|
|
|
|
dec ebp
|
|
|
|
|
jnz .start
|
|
|
|
|
|
|
|
|
|
call draw_fbutton_name
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.rol_ror:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
rol ebx,16
|
|
|
|
|
add ebx,[fbutton_width]
|
|
|
|
|
ror ebx,16
|
|
|
|
|
;--------------------------------------
|
2012-04-07 17:21:20 +02:00
|
|
|
|
.exit:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
draw_fbutton_name:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov ebx, 7 shl 16
|
|
|
|
|
add ebx,[window_high]
|
2015-11-06 17:17:27 +01:00
|
|
|
|
sub ebx,19
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov eax,4
|
|
|
|
|
mov ecx,0x90000000
|
|
|
|
|
push ebx
|
|
|
|
|
call .type_1
|
|
|
|
|
pop ebx
|
|
|
|
|
mov ecx,0x90ffffff
|
|
|
|
|
sub ebx,1 shl 16 + 1
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_1:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
cmp [shift_flag],1
|
|
|
|
|
je .type_shift
|
|
|
|
|
|
|
|
|
|
cmp [ctrl_flag],1
|
|
|
|
|
je .type_ctrl
|
|
|
|
|
|
|
|
|
|
cmp [alt_flag],1
|
|
|
|
|
je .type_alt
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,fbutton_name.f1
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f2
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f3
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f4
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f5
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f6
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f7
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f8
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f9
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f10
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f11
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name.f12
|
|
|
|
|
mcall
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_shift:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,fbutton_name_shift.f1
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f2
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f3
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f4
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f5
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f6
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f7
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f8
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f9
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f10
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f11
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_shift.f12
|
|
|
|
|
mcall
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_ctrl:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,fbutton_name_ctrl.f1
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f2
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f3
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f4
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f5
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f6
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f7
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f8
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f9
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f10
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f11
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_ctrl.f12
|
|
|
|
|
mcall
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_alt:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mov edx,fbutton_name_alt.f1
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f2
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f3
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f4
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f5
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f6
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f7
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f8
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f9
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f10
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f11
|
|
|
|
|
call .type_all
|
|
|
|
|
mov edx,fbutton_name_alt.f12
|
|
|
|
|
;--------------------------------------
|
2011-01-29 19:25:55 +01:00
|
|
|
|
.type_all:
|
2013-07-28 15:06:02 +02:00
|
|
|
|
mcall
|
|
|
|
|
call draw_fbutton.rol_ror
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|