2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
k_sort_directory:
|
|
|
|
test dword [status],16
|
|
|
|
jnz still
|
|
|
|
or dword [status],16
|
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
call get_memory_for_thread_stack
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [thread_stack_5],eax
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 51,1,thread5 ; thread_stack_5
|
2011-06-12 00:16:26 +02:00
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
thread5: ; start of bgrd thread
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 9,procinfo_threads,-1
|
2011-06-12 00:16:26 +02:00
|
|
|
mov eax,[ebx+30]
|
|
|
|
mov [PID5],eax
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 40,0x27
|
2011-06-12 00:16:26 +02:00
|
|
|
mov eax,[sort_type]
|
|
|
|
cmp [sort_type],dword 0
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort0
|
|
|
|
jmp .thread5
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [sort_type],dword 2
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort2
|
|
|
|
jmp .thread5
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [sort_type],dword 4
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort4
|
|
|
|
jmp .thread5
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
mov [option_group2],sort6
|
2011-07-07 21:18:51 +02:00
|
|
|
;-----------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.thread5:
|
|
|
|
mov [sort_type_old],eax
|
|
|
|
mov eax,[option_group2]
|
|
|
|
mov [option_group2_old],eax
|
2011-07-07 21:18:51 +02:00
|
|
|
;-----------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.red:
|
|
|
|
call .draw_window
|
2011-07-07 21:18:51 +02:00
|
|
|
;-----------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.still:
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 10 ; wait here for event
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
cmp eax,1 ; redraw request ?
|
2011-06-12 00:16:26 +02:00
|
|
|
je .red
|
2011-07-07 21:18:51 +02:00
|
|
|
|
|
|
|
cmp eax,2 ; key in buffer ?
|
2011-06-12 00:16:26 +02:00
|
|
|
je .key
|
2011-07-07 21:18:51 +02:00
|
|
|
|
|
|
|
cmp eax,3 ; button in buffer ?
|
2011-06-12 00:16:26 +02:00
|
|
|
je .button
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp eax,6 ; mouse in buffer ?
|
|
|
|
je .mouse
|
|
|
|
|
2011-07-07 21:18:51 +02:00
|
|
|
jmp .still
|
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.mouse:
|
|
|
|
push dword option_boxes_sort
|
|
|
|
call [option_box_mouse]
|
|
|
|
|
|
|
|
cmp [option_group2],sort0
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [sort_type],dword 0
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [option_group2],sort2
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [sort_type],dword 2
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [option_group2],sort4
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [sort_type],dword 4
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [option_group2],sort6
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [sort_type],dword 6
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.key:
|
|
|
|
mcall
|
|
|
|
cmp ah,27
|
|
|
|
je .close
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp ah,13
|
|
|
|
je .kok
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp ah,177 ;down
|
|
|
|
je .fdn
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp ah,178 ;up
|
|
|
|
jne .still
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp [sort_type],0
|
|
|
|
je .still
|
|
|
|
|
|
|
|
sub [sort_type],2
|
|
|
|
jmp .flagcont
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.fdn:
|
|
|
|
cmp [sort_type],6
|
|
|
|
je .still
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
add [sort_type],2
|
|
|
|
|
|
|
|
.flagcont:
|
|
|
|
cmp [sort_type],dword 0
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort0
|
|
|
|
call .draw_opt_boxes
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [sort_type],dword 2
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort2
|
|
|
|
call .draw_opt_boxes
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [sort_type],dword 4
|
|
|
|
jne @f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort4
|
|
|
|
call .draw_opt_boxes
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cmp [sort_type],dword 6
|
|
|
|
jne .still ;@f
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
mov [option_group2],sort6
|
|
|
|
call .draw_opt_boxes
|
|
|
|
jmp .still
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.button: ; button
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall 17 ; get id
|
2011-06-12 00:16:26 +02:00
|
|
|
cmp ah,1 ; button id=1 ?
|
|
|
|
jne .noclose
|
2011-07-07 21:18:51 +02:00
|
|
|
;-------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.close:
|
|
|
|
mov eax,[sort_type_old]
|
|
|
|
mov [sort_type],eax
|
|
|
|
mov eax,[option_group2_old]
|
|
|
|
mov [option_group2],eax
|
|
|
|
.close_1:
|
|
|
|
xor dword [status],16
|
|
|
|
xor eax,eax
|
|
|
|
mov [PID5],eax
|
|
|
|
mcall 68,13,[thread_stack_5]
|
2011-07-07 21:18:51 +02:00
|
|
|
mcall -1 ; close this program
|
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
.noclose:
|
|
|
|
.kok:
|
|
|
|
mov eax,[load_directory_pointer]
|
|
|
|
cmp [eax+4],dword 0
|
|
|
|
je .close_1
|
2011-07-07 21:18:51 +02:00
|
|
|
|
2011-06-12 00:16:26 +02:00
|
|
|
call load_directory.copy_dir_path
|
|
|
|
call load_directory.sort
|
|
|
|
mov [sort_directory_flag],byte 1
|
|
|
|
jmp .close_1
|
2011-07-07 21:18:51 +02:00
|
|
|
;---------------------------------------------------------------------
|
2011-06-12 00:16:26 +02:00
|
|
|
; *********************************************
|
2011-07-07 21:18:51 +02:00
|
|
|
; ******** WINDOW DEFINITIONS AND DRAW ********
|
2011-06-12 00:16:26 +02:00
|
|
|
; *********************************************
|
|
|
|
.draw_window:
|
|
|
|
mcall 12,1
|
|
|
|
xor eax,eax ; function 0 : define and draw window
|
2011-07-07 21:18:51 +02:00
|
|
|
xor esi,esi
|
|
|
|
mcall ,<100,300>,<100,110>,0x13909090,,labelt5
|
|
|
|
mcall 8,<120,40>,<50,20>,4,0xdddddd
|
|
|
|
mcall 4,<46,28>,0xffffff,sorttext,sorttext.size
|
|
|
|
xor ecx,ecx
|
|
|
|
mcall ,<135,57>,,ok_btn,ok_btn.size
|
2011-06-12 00:16:26 +02:00
|
|
|
call .draw_opt_boxes
|
|
|
|
; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
|
|
|
|
mcall 12,2
|
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.draw_opt_boxes:
|
|
|
|
push dword option_boxes_sort
|
|
|
|
call [option_box_draw]
|
2011-07-07 21:18:51 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|