kolibrios/programs/media/zsea/win_opti.inc

1 line
8.9 KiB
PHP
Raw Normal View History

;--------------------------------------------------------------------- k_option: test dword [status],64 jnz still or dword [status],64 call get_memory_for_thread_stack mov [thread_stack_7],eax mcall 51,1,thread7 ; thread_stack_7 jmp still ;--------------------------------------------------------------------- get_memory_for_thread_stack: mcall 68,12,4096 mov edx,eax add edx,4096 ret ;--------------------------------------------------------------------- thread7: ; start of bgrd thread mcall 9, procinfo_threads, -1 mov eax,[ebx+30] mov [PID7],eax mcall 40,0x27 mov eax,[slide_show_delay] mov [slide_show_delay_old],eax mov eax,[arrows_offset] mov [arrows_offset_old],eax mov eax,[check1.flags] mov [show_file_name_old],eax mov eax,[check2.flags] mov [filtering_flag_old],eax xor eax,eax mov [option_pointer],eax call .set_pointers ;----------------------------------------- .red: call .draw_window ;----------------------------------------- .still: mcall 10 ; wait here for event cmp eax,1 ; redraw request ? je .red cmp eax,2 ; key in buffer ? je .key cmp eax,3 ; button in buffer ? je .button cmp eax,6 ; mouse in buffer ? je .mouse jmp .still ;--------------------------------------------------------------------- .mouse: mov ebx,[check1.flags] and ebx,10b push dword check1 call [check_box_mouse] mov eax,[check1.flags] and eax,10b cmp ebx,eax je @f ;.still mov [option_pointer],2 call .set_pointers call .draw_all_options_values jmp .still ;--------------------------------------------------------------------- @@: mov ebx,[check2.flags] and ebx,10b push dword check2 call [check_box_mouse] mov eax,[check2.flags] and eax,10b cmp ebx,eax je .still mov [option_pointer],3 call .set_pointers call .draw_all_options_values jmp .still ;--------------------------------------------------------------------- .key: mcall cmp ah,27 je .close cmp ah,13 je .kok cmp ah,32 je .select_space cmp ah,56 ;plus je .select_plus ;.plus_slide_show_delay cmp ah,43 ;plus je .select_plus ;.plus_slide_show_delay cmp ah,61 ;plus je .select_plus ;.plus_slide_show_delay cmp ah,54 ;minus je .select_minus ;.minus_slide_show_delay cmp ah,45 ;minus je .select_minus ;.minus_slide_show_delay cmp ah,95 ;minus je .select_minus ;.minus_slide_show_delay cmp ah,178 ;up arrow je .up_arrow cmp ah,177 ;down arrow je .down_arrow jmp .still ;--------------------------------------------------------------------- .button: ; button mov eax,17 ; get id mcall cmp ah,5 je .minus_arrows_offset cmp ah,4 je .plus_arrows_offset cmp ah,3 je .minus_slide_show_delay cmp ah,2 je .plus_slide_show_delay cmp ah,1 ; button id=1 ? jne .noclose ;----------------------------------- .close: mov eax,[slide_show_delay_old] mov [slide_show_delay],eax mov eax,[arrows_offset_old] mov [arrows_offset],eax mov eax,[show_file_name_old] mov [check1.flags],eax mov eax,[filtering_flag_old] mov [check2.flags],eax jmp .close_all ;--------------------------------------------------------------------- .close_1: mov eax,[check2.flags] test eax,10b jz @f mov [filtering_flag],1 jmp .redraw_flag ;--------------------------------------------------------------------- @@: mov [filtering_flag],0 .redraw_flag: mov [redraw_flag],byte 1 .close_all: xor dword [status],64 xor eax,eax mov [PID7],eax mcall 68,13,[thread_stack_7] mcall -1 ; close this program ;--------------------------------------------------------------------- .noclose: .kok: jmp .close_1 ;--------------------------------------------------------------------- .select_plus: jmp [plus_pointer] ;--------------------------------------------------------------------- .select_minus: jmp [minus_pointer] ;--------------------------------------------------------------------- .select_space: jmp [space_pointer] ;--------------------------------------------------------------------- .plus_slide_show_delay: cmp [option_pointer],0 je @f mov [option_pointer],0 call .draw_all_options_values @@: cmp