forked from KolibriOS/kolibrios
zSea - cleaning and preparing the source code
git-svn-id: svn://kolibrios.org@2000 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8222dd469c
commit
3dee3b0598
43
programs/media/zsea/backgrnd.inc
Normal file
43
programs/media/zsea/backgrnd.inc
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
;---------------------------------------------------------------------
|
||||||
|
; ÓÑÒÀÍÎÂÈÒÜ ÔÎÍ
|
||||||
|
background:
|
||||||
|
cmp [soi],0
|
||||||
|
je .end
|
||||||
|
cmp [bgrmode],dword 2
|
||||||
|
jbe @f
|
||||||
|
jmp .end
|
||||||
|
@@:
|
||||||
|
mov ecx,[img_width] ; øèðèíà
|
||||||
|
test ecx,ecx
|
||||||
|
jz .end
|
||||||
|
mov edx,[img_high] ; âûñîòà
|
||||||
|
test edx,edx
|
||||||
|
jz .end
|
||||||
|
mcall 15,1 ; set size
|
||||||
|
|
||||||
|
mov esi,ecx
|
||||||
|
imul esi,edx
|
||||||
|
lea esi,[esi*3]
|
||||||
|
mov ecx,[soi]
|
||||||
|
|
||||||
|
xor edx,edx
|
||||||
|
|
||||||
|
cmp [img_resolution],24
|
||||||
|
je @f
|
||||||
|
push dword image_file
|
||||||
|
call [convert_Conv_24b]
|
||||||
|
mov ecx,[raw_pointer_2]
|
||||||
|
mcall 15,5 ;15,5 set data
|
||||||
|
mov ecx,[raw_pointer_2]
|
||||||
|
mcall 68,13
|
||||||
|
jmp .set_mode
|
||||||
|
@@:
|
||||||
|
mcall 15,5 ; 15,5 set data
|
||||||
|
.set_mode:
|
||||||
|
mov ecx,[bgrmode]
|
||||||
|
mcall 15,4 ; 15,4 set mode
|
||||||
|
dec ebx ; 15,3 redraw background
|
||||||
|
mcall
|
||||||
|
.end:
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
@ -1,8 +1,8 @@
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
clear_thread:
|
clear_thread:
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [clear_thread_stack],eax
|
mov [clear_thread_stack],eax
|
||||||
mcall 51, 1, clear_thread_start ;, clear_thread_stack
|
mcall 51,1,clear_thread_start ;, clear_thread_stack
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
clear_thread_start:
|
clear_thread_start:
|
||||||
|
@ -38,7 +38,7 @@ lsz fitext,\
|
|||||||
db 0
|
db 0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
Authors_text:
|
Authors_text:
|
||||||
.1: db 'zSea version: 1.00 RC3 Date: 14/06/2011',0
|
.1: db 'zSea version: 1.00 RC3 Date: 07/07/2011',0
|
||||||
.2: db 'Authors:',0
|
.2: db 'Authors:',0
|
||||||
.3: db 'Marat Zakiyanov aka Mario(Mario79)',0
|
.3: db 'Marat Zakiyanov aka Mario(Mario79)',0
|
||||||
.4: db 'zSea program, modules: cnv_bmp.obj,',0
|
.4: db 'zSea program, modules: cnv_bmp.obj,',0
|
||||||
@ -860,6 +860,8 @@ align 4
|
|||||||
; option_boxes_bcgr:
|
; option_boxes_bcgr:
|
||||||
op1 option_box option_group1,60,40,6,12,0xFFFFFF,0,0xffffff,op_text.1,op_text.e1-op_text.1
|
op1 option_box option_group1,60,40,6,12,0xFFFFFF,0,0xffffff,op_text.1,op_text.e1-op_text.1
|
||||||
op2 option_box option_group1,60,55,6,12,0xFFFFFF,0,0xffffff,op_text.2,op_text.e2-op_text.2
|
op2 option_box option_group1,60,55,6,12,0xFFFFFF,0,0xffffff,op_text.2,op_text.e2-op_text.2
|
||||||
|
op3 option_box option_group1,60,70,6,12,0xFFFFFF,0,0xffffff,op_text.3,op_text.e3-op_text.3
|
||||||
|
op4 option_box option_group1,60,85,6,12,0xFFFFFF,0,0xffffff,op_text.4,op_text.e4-op_text.4
|
||||||
option_boxes_bcgr_end:
|
option_boxes_bcgr_end:
|
||||||
|
|
||||||
op_text:
|
op_text:
|
||||||
@ -867,10 +869,14 @@ op_text:
|
|||||||
.e1:
|
.e1:
|
||||||
.2 db 'Stretch'
|
.2 db 'Stretch'
|
||||||
.e2:
|
.e2:
|
||||||
|
.3 db 'Stretch + V crop'
|
||||||
|
.e3:
|
||||||
|
.4 db 'Stretch + H crop'
|
||||||
|
.e4:
|
||||||
|
|
||||||
option_group1 dd op1
|
option_group1 dd op1
|
||||||
|
|
||||||
option_boxes_bcgr: dd op1, op2,0
|
option_boxes_bcgr: dd op1,op2,op3,op4,0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;option_boxes_sort:
|
;option_boxes_sort:
|
||||||
|
@ -1,128 +1,87 @@
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
kabout:
|
kabout:
|
||||||
test dword [status],4
|
test dword [status],4
|
||||||
jnz still
|
jnz still
|
||||||
or dword [status],4
|
or dword [status],4
|
||||||
|
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_3],eax
|
mov [thread_stack_3],eax
|
||||||
mcall 51,1,thread3 ;,thread_stack_3
|
mcall 51,1,thread3 ;thread_stack_3
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
thread3: ; start of bgrd thread
|
thread3: ; start of bgrd thread
|
||||||
mcall 9, procinfo_threads, -1
|
mcall 9, procinfo_threads, -1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID3],eax
|
mov [PID3],eax
|
||||||
mcall 40, 0x7
|
mcall 40,0x7
|
||||||
|
;------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
;------------------------------
|
||||||
.still:
|
.still:
|
||||||
|
mcall 10 ; wait here for event
|
||||||
mov eax,10 ; wait here for event
|
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .close ;.key
|
je .close ;.key
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
; .key:
|
;.key:
|
||||||
; mcall
|
; mcall
|
||||||
; cmp ah,27
|
; cmp ah,27
|
||||||
; je .close
|
; je .close
|
||||||
; jmp .still
|
; jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
|
||||||
.button: ; button
|
.button: ; button
|
||||||
mov eax,17 ; get id
|
mcall 17 ; get id
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
cmp ah,2
|
cmp ah,2
|
||||||
jne .still ;noclose3
|
jne .still ;noclose3
|
||||||
|
|
||||||
.close:
|
.close:
|
||||||
; btr dword [status],3
|
|
||||||
; bts dword [status],2
|
|
||||||
xor dword [status],4
|
xor dword [status],4
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID3],eax
|
mov [PID3],eax
|
||||||
mcall 68,13,[thread_stack_3]
|
mcall 68,13,[thread_stack_3]
|
||||||
mov eax,-1 ; close this program
|
mcall -1 ; close this program
|
||||||
mcall
|
;---------------------------------------------------------------------
|
||||||
; .noclose:
|
|
||||||
; jmp still3
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
|
mcall 12,1
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
|
||||||
mov ebx,1 ; 1, start of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
|
xor esi,esi
|
||||||
mov ecx,100*65536+240 ; [y start] *65536 + [y size]
|
mcall ,<100,300>,<100,240>,0x13eeeeee,,labelt3
|
||||||
mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl
|
mcall 8,<120,40>,<210,20>,2,0xdddddd
|
||||||
mcall
|
add ebx,15 shl 16
|
||||||
|
shr ecx,16
|
||||||
mov ebx,120*65536+40
|
mov bx,cx
|
||||||
mov ecx,210*65536+20
|
add ebx,6
|
||||||
mov edx,2
|
xor ecx,ecx
|
||||||
mov esi,0xdddddd
|
mcall 4,,,ok_btn,ok_btn.size
|
||||||
mcall 8
|
mcall ,<20,30>,0x80000000,Authors_text.1
|
||||||
|
|
||||||
pusha
|
|
||||||
mcall 4,<20,30>,0x80000000,Authors_text.1
|
|
||||||
mcall ,<30,45>, ,Authors_text.2
|
mcall ,<30,45>, ,Authors_text.2
|
||||||
|
|
||||||
mcall ,<30,60>, ,Authors_text.3
|
mcall ,<30,60>, ,Authors_text.3
|
||||||
mcall ,<60,70>, ,Authors_text.4
|
mcall ,<60,70>, ,Authors_text.4
|
||||||
mcall ,<60,80>, ,Authors_text.5
|
mcall ,<60,80>, ,Authors_text.5
|
||||||
mcall ,<60,90>, ,Authors_text.6
|
mcall ,<60,90>, ,Authors_text.6
|
||||||
mcall ,<60,100>, ,Authors_text.7
|
mcall ,<60,100>, ,Authors_text.7
|
||||||
|
|
||||||
mcall ,<30,115>, ,Authors_text.8
|
mcall ,<30,115>, ,Authors_text.8
|
||||||
mcall ,<60,125>, ,Authors_text.9
|
mcall ,<60,125>, ,Authors_text.9
|
||||||
mcall ,<60,135>, ,Authors_text.10
|
mcall ,<60,135>, ,Authors_text.10
|
||||||
|
|
||||||
mcall ,<30,150>, ,Authors_text.11
|
mcall ,<30,150>, ,Authors_text.11
|
||||||
mcall ,<60,160>, ,Authors_text.12
|
mcall ,<60,160>, ,Authors_text.12
|
||||||
|
|
||||||
mcall ,<30,175>, ,Authors_text.13
|
mcall ,<30,175>, ,Authors_text.13
|
||||||
mcall ,<60,185>, ,Authors_text.14
|
mcall ,<60,185>, ,Authors_text.14
|
||||||
popa
|
|
||||||
|
|
||||||
add ebx,15 shl 16
|
|
||||||
shr ecx,16
|
|
||||||
mov bx,cx
|
|
||||||
add ebx,6
|
|
||||||
|
|
||||||
mov ecx,0
|
|
||||||
mov edx, ok_btn
|
|
||||||
mov esi, ok_btn.size ;2
|
|
||||||
mcall 4
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mcall 71,1, labelt3
|
|
||||||
; mcall 47,0x80000,[PID3],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID3],<200, 5>,0xffffff
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
mcall 12,2
|
||||||
mov ebx,2 ; 2, end of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
@ -1,15 +1,19 @@
|
|||||||
|
;---------------------------------------------------------------------
|
||||||
error_window:
|
error_window:
|
||||||
test dword [status],32
|
test dword [status],32
|
||||||
jnz still
|
jnz still
|
||||||
|
|
||||||
or dword [status],32
|
or dword [status],32
|
||||||
mcall 9, procinfo, -1
|
mcall 9,procinfo,-1
|
||||||
mov eax,[ebx+46]
|
mov eax,[ebx+46]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
mov eax,100
|
mov eax,100
|
||||||
mov [error_window_y+2],ax
|
mov [error_window_y+2],ax
|
||||||
mov [error_window_x+2],ax
|
mov [error_window_x+2],ax
|
||||||
jmp .end
|
jmp .end
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
shr eax,1
|
shr eax,1
|
||||||
add eax,[ebx+38]
|
add eax,[ebx+38]
|
||||||
@ -21,65 +25,81 @@ error_window:
|
|||||||
sub eax,150
|
sub eax,150
|
||||||
mov [error_window_x+2],ax
|
mov [error_window_x+2],ax
|
||||||
.end:
|
.end:
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_6],eax
|
mov [thread_stack_6],eax
|
||||||
mcall 51,1,thread6 ;,thread_stack_6
|
mcall 51,1,thread6 ; thread_stack_6
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
thread6:
|
thread6:
|
||||||
mcall 9, procinfo_threads, -1
|
mcall 9,procinfo_threads,-1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID6],eax
|
mov [PID6],eax
|
||||||
mcall 40, 0x7
|
mcall 40,0x7
|
||||||
mov [error_pointer],string
|
mov [error_pointer],string
|
||||||
|
;--------------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_error_window
|
call .draw_error_window
|
||||||
|
;--------------------------------------
|
||||||
.still:
|
.still:
|
||||||
mcall 10
|
mcall 10
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .key
|
je .key
|
||||||
|
|
||||||
cmp eax,3
|
cmp eax,3
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.key: ; key
|
.key: ; key
|
||||||
.button:
|
.button:
|
||||||
xor dword [status],32
|
xor dword [status],32
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID6],eax
|
mov [PID6],eax
|
||||||
|
|
||||||
mcall 68,13,[thread_stack_6]
|
mcall 68,13,[thread_stack_6]
|
||||||
mcall -1
|
mcall -1
|
||||||
jmp .still
|
jmp .still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
; *********************************************
|
||||||
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
|
; *********************************************
|
||||||
.draw_error_window:
|
.draw_error_window:
|
||||||
mcall 12, 1
|
mcall 12, 1
|
||||||
mcall 0,[error_window_x] ,[error_window_y], 0x03ff0000
|
mcall 0,[error_window_x],[error_window_y],0x03ff0000
|
||||||
mcall 71,1, errortext
|
mcall 71,1, errortext
|
||||||
mcall 4,<10,30>,0x80ffffff,[error_pointer]
|
mcall 4,<10,30>,0x80ffffff,[error_pointer]
|
||||||
cmp [return_code],0
|
cmp [return_code],0
|
||||||
je .continue
|
je .continue
|
||||||
|
|
||||||
cmp [return_code],1
|
cmp [return_code],1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mcall 4,<10,50>,0x90ffffff,error_not_supported_file
|
mcall 4,<10,50>,0x90ffffff,error_not_supported_file
|
||||||
jmp .end
|
jmp .end
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [return_code],2
|
cmp [return_code],2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mcall 4,<10,50>,0x90ffffff,error_not_enough_memory
|
mcall 4,<10,50>,0x90ffffff,error_not_enough_memory
|
||||||
jmp .end
|
jmp .end
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mcall 4,<10,50>,0x90ffffff,error_unknown
|
mcall 4,<10,50>,0x90ffffff,error_unknown
|
||||||
jmp .end
|
jmp .end
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.continue:
|
.continue:
|
||||||
mcall 4,<10,50>,0x90ffffff,error_type
|
mcall 4,<10,50>,0x90ffffff,error_type
|
||||||
mcall 47,0x800a0000,[error_fs],<140,50>,0x10ffffff
|
mcall 47,0x800a0000,[error_fs],<140,50>,0x10ffffff
|
||||||
mov edx,[error_fs]
|
mov edx,[error_fs]
|
||||||
cmp edx,0
|
cmp edx,0
|
||||||
jb .end
|
jb .end
|
||||||
|
|
||||||
cmp edx,11
|
cmp edx,11
|
||||||
ja .end
|
ja .end
|
||||||
|
|
||||||
shl edx,2
|
shl edx,2
|
||||||
add edx,error_fs_text_pointers
|
add edx,error_fs_text_pointers
|
||||||
mov edx,[edx]
|
mov edx,[edx]
|
||||||
@ -87,6 +107,6 @@ thread6:
|
|||||||
; mcall 47,0x800a0000,[error_locate],<140,5>,0x10ffffff
|
; mcall 47,0x800a0000,[error_locate],<140,5>,0x10ffffff
|
||||||
.end:
|
.end:
|
||||||
; mcall 47,0x80000,[PID6],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID6],<200, 5>,0xffffff
|
||||||
mcall 12, 2
|
mcall 12,2
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
@ -4,7 +4,7 @@ k_background:
|
|||||||
jnz still
|
jnz still
|
||||||
or dword [status],8
|
or dword [status],8
|
||||||
|
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_4],eax
|
mov [thread_stack_4],eax
|
||||||
mcall 51,1,thread4 ;, thread_stack_4
|
mcall 51,1,thread4 ;, thread_stack_4
|
||||||
jmp still
|
jmp still
|
||||||
@ -16,22 +16,24 @@ thread4: ; start of bgrd thread
|
|||||||
mcall 40, 0x27
|
mcall 40, 0x27
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
|
||||||
.still:
|
.still:
|
||||||
|
|
||||||
mov eax,10 ; wait here for event
|
mov eax,10 ; wait here for event
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .key
|
je .key
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
cmp eax,6 ; mouse in buffer ?
|
cmp eax,6 ; mouse in buffer ?
|
||||||
je .mouse
|
je .mouse
|
||||||
jmp .still
|
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.mouse:
|
.mouse:
|
||||||
push dword option_boxes_bcgr
|
push dword option_boxes_bcgr
|
||||||
call [option_box_mouse]
|
call [option_box_mouse]
|
||||||
@ -40,42 +42,65 @@ thread4: ; start of bgrd thread
|
|||||||
jne @f
|
jne @f
|
||||||
mov [bgrmode],dword 1
|
mov [bgrmode],dword 1
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mov [bgrmode],dword 2
|
mov [bgrmode],dword 2
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.key:
|
.key:
|
||||||
mcall
|
mcall
|
||||||
cmp ah,27
|
cmp ah,27
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
cmp ah,13
|
cmp ah,13
|
||||||
je .kok
|
je .kok
|
||||||
|
|
||||||
cmp ah,178 ;up
|
cmp ah,178 ;up
|
||||||
jne .nofup
|
jne .nofup
|
||||||
|
|
||||||
cmp dword [bgrmode],1
|
cmp dword [bgrmode],1
|
||||||
je .fdn
|
je .fdn
|
||||||
.fup:
|
.fup:
|
||||||
dec dword [bgrmode]
|
dec dword [bgrmode]
|
||||||
jmp .flagcont
|
jmp .flagcont
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.nofup:
|
.nofup:
|
||||||
cmp ah,177 ;down
|
cmp ah,177 ;down
|
||||||
jne .still
|
jne .still
|
||||||
cmp dword [bgrmode],2
|
|
||||||
|
cmp dword [bgrmode],4
|
||||||
je .fup
|
je .fup
|
||||||
.fdn:
|
.fdn:
|
||||||
inc dword [bgrmode]
|
inc dword [bgrmode]
|
||||||
.flagcont:
|
.flagcont:
|
||||||
cmp [bgrmode],dword 1
|
cmp [bgrmode],dword 1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group1],op1
|
mov [option_group1],op1
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
|
cmp [bgrmode],dword 2
|
||||||
|
jne @f
|
||||||
|
|
||||||
mov [option_group1],op2
|
mov [option_group1],op2
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
@@:
|
||||||
|
cmp [bgrmode],dword 3
|
||||||
|
jne @f
|
||||||
|
|
||||||
|
mov [option_group1],op3
|
||||||
|
call .draw_opt_boxes
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
@@:
|
||||||
|
mov [option_group1],op4
|
||||||
|
call .draw_opt_boxes
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.button: ; button
|
.button: ; button
|
||||||
mov eax,17 ; get id
|
mov eax,17 ; get id
|
||||||
mcall
|
mcall
|
||||||
@ -94,47 +119,23 @@ thread4: ; start of bgrd thread
|
|||||||
.kok:
|
.kok:
|
||||||
call background
|
call background
|
||||||
jmp .close
|
jmp .close
|
||||||
|
;---------------------------------------------------------------------
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
mcall 12,1
|
mcall 12,1
|
||||||
; DRAW WINDOW
|
xor eax,eax
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor esi,esi
|
||||||
mov ebx,100*65536+200 ; [x start] *65536 + [x size]
|
mcall ,<100,200>,<100,200>,0x13909090,,labelt4
|
||||||
mov ecx,100*65536+100 ; [y start] *65536 + [y size]
|
mcall 8,<70,40>,<110,20>,4,0xdddddd
|
||||||
mov edx,0x03909090 ; color of work area RRGGBB,8->color gl
|
mcall 4,<46,28>,0xffffff,bgrdtext,bgrdtext.size
|
||||||
mcall
|
add ebx,40*65536+88
|
||||||
|
xor ecx,ecx
|
||||||
mov eax,8
|
mcall ,,,ok_btn,ok_btn.size
|
||||||
mov ebx,70*65536+40
|
|
||||||
mov ecx,70*65536+20
|
|
||||||
mov edx,4
|
|
||||||
mov esi,0xdddddd
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mcall 71,1, labelt4
|
|
||||||
|
|
||||||
mov eax,4 ; function 4 : write text to window
|
|
||||||
mov ebx,46*65536+28 ; [x start] *65536 + [y start]
|
|
||||||
mov ecx,0xffffff
|
|
||||||
mov edx, bgrdtext
|
|
||||||
mov esi, bgrdtext.size
|
|
||||||
mcall
|
|
||||||
add ebx,40*65536+48
|
|
||||||
mov edx, ok_btn
|
|
||||||
mov esi, ok_btn.size ;2
|
|
||||||
mov ecx,0
|
|
||||||
mcall
|
|
||||||
|
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
; mcall 47,0x80000,[PID4],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID4],<200, 5>,0xffffff
|
||||||
mcall 12,2
|
mcall 12,2
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.draw_opt_boxes:
|
.draw_opt_boxes:
|
||||||
|
@ -5,14 +5,12 @@ kfile:
|
|||||||
or dword [status],1
|
or dword [status],1
|
||||||
|
|
||||||
call load_directory.copy_dir_path
|
call load_directory.copy_dir_path
|
||||||
|
|
||||||
; call get_filter_data
|
|
||||||
|
|
||||||
|
|
||||||
cmp [OpenDialog_path],dword 'NoKe'
|
cmp [OpenDialog_path],dword 'NoKe'
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [OpenDialog_data.start_path],dword OpenDialog_path
|
mov [OpenDialog_data.start_path],dword OpenDialog_path
|
||||||
jmp .start_OpenDialog
|
jmp .start_OpenDialog
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mov ebx,open_dialog_name
|
mov ebx,open_dialog_name
|
||||||
mov esi,path
|
mov esi,path
|
||||||
@ -20,176 +18,108 @@ kfile:
|
|||||||
call copy_file_path
|
call copy_file_path
|
||||||
|
|
||||||
.start_OpenDialog:
|
.start_OpenDialog:
|
||||||
|
|
||||||
;start_OpenDialog OpenDialog_data
|
|
||||||
push dword OpenDialog_data
|
push dword OpenDialog_data
|
||||||
call [OpenDialog_Start]
|
call [OpenDialog_Start]
|
||||||
|
|
||||||
call clear_control_key_flag
|
call clear_control_key_flag
|
||||||
|
|
||||||
cmp [OpenDialog_data.status],2
|
cmp [OpenDialog_data.status],2
|
||||||
je thread1_start
|
je thread1_start
|
||||||
|
|
||||||
cmp [OpenDialog_data.status],1
|
cmp [OpenDialog_data.status],1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
xor dword [status],1
|
xor dword [status],1
|
||||||
jmp kopen_1
|
jmp kopen_1
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
xor dword [status],1
|
xor dword [status],1
|
||||||
jmp still
|
jmp still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
thread1_start:
|
thread1_start:
|
||||||
|
call get_memory_for_thread_stack
|
||||||
call get_memory_for_tread_stack
|
|
||||||
mov [thread_stack],eax
|
mov [thread_stack],eax
|
||||||
mcall 51,1,thread1 ;, thread_stack
|
mcall 51,1,thread1 ; thread_stack
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
get_filter_data:
|
|
||||||
mov edi,Filter+4
|
|
||||||
xor eax,eax
|
|
||||||
mov ecx,10
|
|
||||||
cld
|
|
||||||
@@:
|
|
||||||
mov esi,10
|
|
||||||
sub esi,ecx
|
|
||||||
lea esi,[esi+esi*2] ; x 3
|
|
||||||
shl esi,3 ; x 8
|
|
||||||
add esi,dword Convert_plugin_0.Assoc
|
|
||||||
mov esi,[esi]
|
|
||||||
add esi,4
|
|
||||||
|
|
||||||
test esi,esi
|
|
||||||
jz @f
|
|
||||||
call .start
|
|
||||||
dec ecx
|
|
||||||
jnz @r
|
|
||||||
@@:
|
|
||||||
mov [edi],byte 0
|
|
||||||
mov eax,Filter
|
|
||||||
sub edi,eax
|
|
||||||
mov [eax],edi
|
|
||||||
|
|
||||||
ret
|
|
||||||
.start:
|
|
||||||
@@:
|
|
||||||
lodsb
|
|
||||||
stosb
|
|
||||||
test eax,eax
|
|
||||||
jnz @r
|
|
||||||
cmp [esi],ah
|
|
||||||
jne @r
|
|
||||||
ret
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
thread1: ; start of thread1
|
thread1: ; start of thread1
|
||||||
mcall 9, procinfo_threads, -1
|
mcall 9,procinfo_threads, -1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID1],eax
|
mov [PID1],eax
|
||||||
mcall 40, 0x27
|
mcall 40,0x27
|
||||||
|
|
||||||
or ecx,-1 ; get information about me
|
or ecx,-1 ; get information about me
|
||||||
call getappinfo
|
call getappinfo
|
||||||
|
|
||||||
mov esi,string
|
mov esi,string
|
||||||
@@:
|
;-------------------------------------
|
||||||
cld
|
cld
|
||||||
|
@@:
|
||||||
lodsb
|
lodsb
|
||||||
test al,al
|
test al,al
|
||||||
jne @r
|
jne @r
|
||||||
|
;-------------------------------------
|
||||||
sub esi,string
|
sub esi,string
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
dec eax
|
dec eax
|
||||||
mov edi, edit1
|
mov edi, edit1
|
||||||
mov [edi+48], eax ;ed_size
|
mov [edi+48], eax ;ed_size
|
||||||
mov [edi+52], eax ;ed_pos
|
mov [edi+52], eax ;ed_pos
|
||||||
|
;-------------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
;-------------------------------------
|
||||||
.still:
|
.still:
|
||||||
|
|
||||||
mcall 10 ; wait here for event
|
mcall 10 ; wait here for event
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .key
|
je .key
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
push dword name_editboxes
|
push dword name_editboxes
|
||||||
call [edit_box_mouse]
|
call [edit_box_mouse]
|
||||||
; mouse_edit_box name_editboxes
|
|
||||||
; mouse_menubar menu_data_2
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.key: ; key
|
.key: ; key
|
||||||
mcall 2
|
mcall
|
||||||
cmp ah,13
|
cmp ah,13
|
||||||
je .close_with_open_file
|
je .close_with_open_file
|
||||||
|
|
||||||
cmp ah,27
|
cmp ah,27
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
push dword name_editboxes
|
push dword name_editboxes
|
||||||
call [edit_box_key]
|
call [edit_box_key]
|
||||||
; key_edit_box name_editboxes
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.close_with_open_file:
|
.close_with_open_file:
|
||||||
mov [open_file_flag],byte 1
|
mov [open_file_flag],byte 1
|
||||||
jmp .close
|
jmp .close
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.button: ; button
|
.button: ; button
|
||||||
mov eax,17 ; get id
|
mcall 17 ; get id
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
jne .still
|
jne .still
|
||||||
.close:
|
.close:
|
||||||
; bts dword [status],2
|
|
||||||
; btr dword [status],0
|
|
||||||
xor dword [status],1
|
xor dword [status],1
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID1],eax
|
mov [PID1],eax
|
||||||
mcall 68,13,[thread_stack]
|
mcall 68,13,[thread_stack]
|
||||||
mov eax,-1 ; close this program
|
mcall -1 ; close this program
|
||||||
mcall
|
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
|
mcall 12,1
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
|
||||||
mov ebx,1 ; 1, start of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
|
xor esi,esi
|
||||||
mov ecx,100*65536+80 ; [y start] *65536 + [y size]
|
mcall ,<100,300>,<100,80>,0x13eeeeee,,labelt1
|
||||||
mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
|
|
||||||
mcall 71,1, labelt1
|
|
||||||
|
|
||||||
push dword name_editboxes
|
push dword name_editboxes
|
||||||
call [edit_box_draw]
|
call [edit_box_draw]
|
||||||
; draw_edit_box name_editboxes
|
|
||||||
; mcall 47,0x80000,[PID1],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID1],<200, 5>,0xffffff
|
||||||
; mcall 71,1, proverka
|
mcall 12,2
|
||||||
; mcall 47,0x80001,0,<300, 5>,0xffffff
|
|
||||||
; draw_menu_bar menu_data_2
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
|
||||||
mov ebx,2 ; 2, end of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
@ -1,84 +1,56 @@
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
kinfo:
|
kinfo:
|
||||||
test dword [status],2
|
test dword [status],2
|
||||||
jnz still
|
jnz still
|
||||||
or dword [status],2
|
or dword [status],2
|
||||||
|
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_2],eax
|
mov [thread_stack_2],eax
|
||||||
mcall 51,1,thread2 ;, thread_stack_2
|
mcall 51,1,thread2 ;, thread_stack_2
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
thread2: ; start of info thread
|
thread2: ; start of info thread
|
||||||
mcall 9, procinfo_threads, -1
|
mcall 9,procinfo_threads,-1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID2],eax
|
mov [PID2],eax
|
||||||
mcall 40, 0x7
|
mcall 40,0x7
|
||||||
call load_directory.copy_dir_path
|
call load_directory.copy_dir_path
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.still:
|
.still:
|
||||||
|
mcall 10 ; wait here for event
|
||||||
mov eax,10 ; wait here for event
|
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.button: ; button
|
.button: ; button
|
||||||
mov eax,17 ; get id
|
mcall 17 ; get id
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
jne .still ;.noclose
|
jne .still ;.noclose
|
||||||
.close:
|
.close:
|
||||||
; btr dword [status],1
|
|
||||||
; bts dword [status],2
|
|
||||||
xor dword [status],2
|
xor dword [status],2
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID2],eax
|
mov [PID2],eax
|
||||||
mcall 68,13,[thread_stack_2]
|
mcall 68,13,[thread_stack_2]
|
||||||
mov eax,-1 ; close this program
|
mcall -1 ; close this program
|
||||||
mcall
|
;---------------------------------------------------------------------
|
||||||
;.noclose:
|
|
||||||
; jmp .still
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
|
mcall 12,2
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
|
||||||
mov ebx,1 ; 1, start of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,100*65536+330 ; [x start] *65536 + [x size]
|
xor esi,esi
|
||||||
mov ecx,100*65536+120 ;290 ; [y start] *65536 + [y size]
|
mcall ,<100,330>,<100,120>,0x13eeeeee,,labelt2
|
||||||
mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mcall 71,1, labelt2
|
|
||||||
|
|
||||||
; mov ecx,0x80000000 ; font 1 & color ( 0xF0RRGGBB )
|
|
||||||
; mov ebx,120*65536+30
|
|
||||||
; mov edx,file_name ;string
|
|
||||||
; mov esi,1 ;43
|
|
||||||
mcall 4,<120,30>,0x80000000,file_name
|
mcall 4,<120,30>,0x80000000,file_name
|
||||||
mov edx,fitext
|
mov edx,fitext
|
||||||
mov esi,14
|
mov esi,14
|
||||||
@ -90,180 +62,23 @@ thread2: ; start of info thread
|
|||||||
add edx,esi
|
add edx,esi
|
||||||
cmp ebx,10*65536+80
|
cmp ebx,10*65536+80
|
||||||
jbe @r
|
jbe @r
|
||||||
mov eax,47
|
|
||||||
mov edx,120*65536+40
|
|
||||||
mov esi,ecx
|
mov esi,ecx
|
||||||
mov ecx, [img_size]
|
mcall 47,0x800a0000,[img_size],<120,40>
|
||||||
mov ebx,0x800a0000
|
|
||||||
mcall
|
|
||||||
add edx,10
|
add edx,10
|
||||||
mov ecx,[img_width_2]
|
mcall ,,[img_width_2]
|
||||||
mcall
|
|
||||||
add edx,10
|
add edx,10
|
||||||
mov ecx,[img_high_2]
|
mcall ,,[img_high_2]
|
||||||
mcall
|
|
||||||
add edx,10
|
add edx,10
|
||||||
mov ecx,[img_resolution_2]
|
mcall ,,[img_resolution_2]
|
||||||
mcall
|
|
||||||
add edx,10
|
add edx,10
|
||||||
mov ecx,[Total_Repeat_N]
|
mcall ,,[Total_Repeat_N]
|
||||||
mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[communication_area]
|
|
||||||
; mov ecx,[ecx+4096]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[communication_area]
|
|
||||||
; mov ecx,[ecx+4096+4]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ecx,[zoom_auto_factor]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ecx,[scroll_bar_data_vertical.max_area] ;[img_resolution]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[scroll_bar_data_vertical.cur_area] ;[return_code]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[scroll_bar_data_vertical.position]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; xor ecx,ecx
|
|
||||||
; mov cx,[scroll_bar_data_vertical.size_y]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mcall 47,0x80000,[OpenDialog_Init]
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mcall 47,0x80000,[OpenDialog_Start]
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mcall 47,0x80000,[OpenDialog_data.com_area]
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mcall 47,0x80000,I_END
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ecx,[scroll_bar_data_horizontal.max_area] ;[img_resolution]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[scroll_bar_data_horizontal.cur_area] ;[return_code]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[scroll_bar_data_horizontal.position]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; xor ecx,ecx
|
|
||||||
; mov cx,[scroll_bar_data_horizontal.size_x]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[raw_pointer] ;[deflate_unpack]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ebp,test1 ;raw_pointer_2
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ebp,size_before_open_dir ;lib_init ;test1 ;raw_pointer_2
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[ebp]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; add ebp,4
|
|
||||||
; mov ecx,[version_lib_ini]
|
|
||||||
;; mov ecx,[ecx]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [image_draw_size.x]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [image_draw_size.y]
|
|
||||||
; mcall
|
|
||||||
; add edx,10+10
|
|
||||||
; movzx ecx,word [wa_width]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [wa_high]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [wa_width_1]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [wa_width_2]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [wa_high_1]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; movzx ecx,word [wa_high_2]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10+10
|
|
||||||
; mov ecx,[window_width]
|
|
||||||
; mcall
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[window_high]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; xor ecx,ecx
|
|
||||||
; mov cl,[Disposal_Method]
|
|
||||||
; mcall
|
|
||||||
|
|
||||||
; add edx,10
|
|
||||||
; mov ecx,[soi]
|
|
||||||
; mcall
|
|
||||||
; mcall 47,0x80000,[PID2],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID2],<200, 5>,0xffffff
|
||||||
; mcall 47,0x800a0000,[error_locate],<140,5>,0x10ffffff
|
; mcall 47,0x800a0000,[error_locate],<140,5>,0x10ffffff
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
mcall 12,2
|
||||||
mov ebx,2 ; 2, end of draw
|
|
||||||
mcall
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;--------------------------------------------------------------------
|
||||||
|
@ -4,12 +4,12 @@ k_option:
|
|||||||
jnz still
|
jnz still
|
||||||
or dword [status],64
|
or dword [status],64
|
||||||
|
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_7],eax
|
mov [thread_stack_7],eax
|
||||||
mcall 51,1,thread7 ;,thread_stack_7
|
mcall 51,1,thread7 ; thread_stack_7
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
get_memory_for_tread_stack:
|
get_memory_for_thread_stack:
|
||||||
mcall 68,12,4096
|
mcall 68,12,4096
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
add edx,4096
|
add edx,4096
|
||||||
@ -19,7 +19,7 @@ thread7: ; start of bgrd thread
|
|||||||
mcall 9, procinfo_threads, -1
|
mcall 9, procinfo_threads, -1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID7],eax
|
mov [PID7],eax
|
||||||
mcall 40, 0x27
|
mcall 40,0x27
|
||||||
mov eax,[slide_show_delay]
|
mov eax,[slide_show_delay]
|
||||||
mov [slide_show_delay_old],eax
|
mov [slide_show_delay_old],eax
|
||||||
mov eax,[arrows_offset]
|
mov eax,[arrows_offset]
|
||||||
@ -31,24 +31,27 @@ thread7: ; start of bgrd thread
|
|||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [option_pointer],eax
|
mov [option_pointer],eax
|
||||||
call .set_pointers
|
call .set_pointers
|
||||||
|
;-----------------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
;-----------------------------------------
|
||||||
.still:
|
.still:
|
||||||
|
mcall 10 ; wait here for event
|
||||||
mov eax,10 ; wait here for event
|
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .key
|
je .key
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
cmp eax,6 ; mouse in buffer ?
|
cmp eax,6 ; mouse in buffer ?
|
||||||
je .mouse
|
je .mouse
|
||||||
jmp .still
|
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.mouse:
|
.mouse:
|
||||||
mov ebx,[check1+32]
|
mov ebx,[check1+32]
|
||||||
and ebx,10b
|
and ebx,10b
|
||||||
@ -58,10 +61,12 @@ thread7: ; start of bgrd thread
|
|||||||
and eax,10b
|
and eax,10b
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
je @f ;.still
|
je @f ;.still
|
||||||
|
|
||||||
mov [option_pointer],2
|
mov [option_pointer],2
|
||||||
call .set_pointers
|
call .set_pointers
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mov ebx,[check2+32]
|
mov ebx,[check2+32]
|
||||||
and ebx,10b
|
and ebx,10b
|
||||||
@ -71,6 +76,7 @@ thread7: ; start of bgrd thread
|
|||||||
and eax,10b
|
and eax,10b
|
||||||
cmp ebx,eax
|
cmp ebx,eax
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
mov [option_pointer],3
|
mov [option_pointer],3
|
||||||
call .set_pointers
|
call .set_pointers
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
@ -80,26 +86,37 @@ thread7: ; start of bgrd thread
|
|||||||
mcall
|
mcall
|
||||||
cmp ah,27
|
cmp ah,27
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
cmp ah,13
|
cmp ah,13
|
||||||
je .kok
|
je .kok
|
||||||
|
|
||||||
cmp ah,32
|
cmp ah,32
|
||||||
je .select_space
|
je .select_space
|
||||||
|
|
||||||
cmp ah,56 ;plus
|
cmp ah,56 ;plus
|
||||||
je .select_plus ;.plus_slide_show_delay
|
je .select_plus ;.plus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,43 ;plus
|
cmp ah,43 ;plus
|
||||||
je .select_plus ;.plus_slide_show_delay
|
je .select_plus ;.plus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,61 ;plus
|
cmp ah,61 ;plus
|
||||||
je .select_plus ;.plus_slide_show_delay
|
je .select_plus ;.plus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,54 ;minus
|
cmp ah,54 ;minus
|
||||||
je .select_minus ;.minus_slide_show_delay
|
je .select_minus ;.minus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,45 ;minus
|
cmp ah,45 ;minus
|
||||||
je .select_minus ;.minus_slide_show_delay
|
je .select_minus ;.minus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,95 ;minus
|
cmp ah,95 ;minus
|
||||||
je .select_minus ;.minus_slide_show_delay
|
je .select_minus ;.minus_slide_show_delay
|
||||||
|
|
||||||
cmp ah,178 ;up arrow
|
cmp ah,178 ;up arrow
|
||||||
je .up_arrow
|
je .up_arrow
|
||||||
|
|
||||||
cmp ah,177 ;down arrow
|
cmp ah,177 ;down arrow
|
||||||
je .down_arrow
|
je .down_arrow
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.button: ; button
|
.button: ; button
|
||||||
@ -120,6 +137,7 @@ thread7: ; start of bgrd thread
|
|||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
jne .noclose
|
jne .noclose
|
||||||
|
;-----------------------------------
|
||||||
.close:
|
.close:
|
||||||
mov eax,[slide_show_delay_old]
|
mov eax,[slide_show_delay_old]
|
||||||
mov [slide_show_delay],eax
|
mov [slide_show_delay],eax
|
||||||
@ -130,12 +148,15 @@ thread7: ; start of bgrd thread
|
|||||||
mov eax,[filtering_flag_old]
|
mov eax,[filtering_flag_old]
|
||||||
mov [check2+32],eax
|
mov [check2+32],eax
|
||||||
jmp .close_all
|
jmp .close_all
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.close_1:
|
.close_1:
|
||||||
mov eax,[check2+32]
|
mov eax,[check2+32]
|
||||||
test eax,10b
|
test eax,10b
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov [filtering_flag],1
|
mov [filtering_flag],1
|
||||||
jmp .redraw_flag
|
jmp .redraw_flag
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mov [filtering_flag],0
|
mov [filtering_flag],0
|
||||||
.redraw_flag:
|
.redraw_flag:
|
||||||
@ -144,15 +165,11 @@ thread7: ; start of bgrd thread
|
|||||||
xor dword [status],64
|
xor dword [status],64
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID7],eax
|
mov [PID7],eax
|
||||||
|
|
||||||
mcall 68,13,[thread_stack_7]
|
mcall 68,13,[thread_stack_7]
|
||||||
|
mcall -1 ; close this program
|
||||||
mov eax,-1 ; close this program
|
;---------------------------------------------------------------------
|
||||||
mcall
|
|
||||||
.noclose:
|
.noclose:
|
||||||
|
|
||||||
.kok:
|
.kok:
|
||||||
|
|
||||||
jmp .close_1
|
jmp .close_1
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.select_plus:
|
.select_plus:
|
||||||
@ -167,11 +184,13 @@ thread7: ; start of bgrd thread
|
|||||||
.plus_slide_show_delay:
|
.plus_slide_show_delay:
|
||||||
cmp [option_pointer],0
|
cmp [option_pointer],0
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [option_pointer],0
|
mov [option_pointer],0
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
@@:
|
@@:
|
||||||
cmp [slide_show_delay],99990
|
cmp [slide_show_delay],99990
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
add [slide_show_delay],10
|
add [slide_show_delay],10
|
||||||
call .draw_slide_show_delay
|
call .draw_slide_show_delay
|
||||||
jmp .still
|
jmp .still
|
||||||
@ -179,11 +198,13 @@ thread7: ; start of bgrd thread
|
|||||||
.minus_slide_show_delay:
|
.minus_slide_show_delay:
|
||||||
cmp [option_pointer],0
|
cmp [option_pointer],0
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [option_pointer],0
|
mov [option_pointer],0
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
@@:
|
@@:
|
||||||
cmp [slide_show_delay],0
|
cmp [slide_show_delay],0
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
sub [slide_show_delay],10
|
sub [slide_show_delay],10
|
||||||
call .draw_slide_show_delay
|
call .draw_slide_show_delay
|
||||||
jmp .still
|
jmp .still
|
||||||
@ -191,11 +212,13 @@ thread7: ; start of bgrd thread
|
|||||||
.plus_arrows_offset:
|
.plus_arrows_offset:
|
||||||
cmp [option_pointer],1
|
cmp [option_pointer],1
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [option_pointer],1
|
mov [option_pointer],1
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
@@:
|
@@:
|
||||||
cmp [arrows_offset],100
|
cmp [arrows_offset],100
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
inc [arrows_offset]
|
inc [arrows_offset]
|
||||||
call .draw_arrows_offset
|
call .draw_arrows_offset
|
||||||
call calculate_arrows_offset
|
call calculate_arrows_offset
|
||||||
@ -204,11 +227,13 @@ thread7: ; start of bgrd thread
|
|||||||
.minus_arrows_offset:
|
.minus_arrows_offset:
|
||||||
cmp [option_pointer],1
|
cmp [option_pointer],1
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
mov [option_pointer],1
|
mov [option_pointer],1
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
@@:
|
@@:
|
||||||
cmp [arrows_offset],1
|
cmp [arrows_offset],1
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
dec [arrows_offset]
|
dec [arrows_offset]
|
||||||
call .draw_arrows_offset
|
call .draw_arrows_offset
|
||||||
call calculate_arrows_offset
|
call calculate_arrows_offset
|
||||||
@ -217,8 +242,10 @@ thread7: ; start of bgrd thread
|
|||||||
.space_check1:
|
.space_check1:
|
||||||
test [check1+32],dword 10b
|
test [check1+32],dword 10b
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
or [check1+32],dword 10b
|
or [check1+32],dword 10b
|
||||||
jmp .space_check1_1
|
jmp .space_check1_1
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
xor [check1+32],dword 10b
|
xor [check1+32],dword 10b
|
||||||
.space_check1_1:
|
.space_check1_1:
|
||||||
@ -228,8 +255,10 @@ thread7: ; start of bgrd thread
|
|||||||
.space_check2:
|
.space_check2:
|
||||||
test [check2+32],dword 10b
|
test [check2+32],dword 10b
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
or [check2+32],dword 10b
|
or [check2+32],dword 10b
|
||||||
jmp .space_check2_1
|
jmp .space_check2_1
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
xor [check2+32],dword 10b
|
xor [check2+32],dword 10b
|
||||||
.space_check2_1:
|
.space_check2_1:
|
||||||
@ -239,6 +268,7 @@ thread7: ; start of bgrd thread
|
|||||||
.down_arrow:
|
.down_arrow:
|
||||||
cmp [option_pointer],3
|
cmp [option_pointer],3
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
inc [option_pointer]
|
inc [option_pointer]
|
||||||
.draw_all_points:
|
.draw_all_points:
|
||||||
call .set_pointers
|
call .set_pointers
|
||||||
@ -248,12 +278,14 @@ thread7: ; start of bgrd thread
|
|||||||
.up_arrow:
|
.up_arrow:
|
||||||
cmp [option_pointer],0
|
cmp [option_pointer],0
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
dec [option_pointer]
|
dec [option_pointer]
|
||||||
jmp .draw_all_points
|
jmp .draw_all_points
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.set_pointers:
|
.set_pointers:
|
||||||
cmp [option_pointer],0
|
cmp [option_pointer],0
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [plus_pointer],thread7.plus_slide_show_delay
|
mov [plus_pointer],thread7.plus_slide_show_delay
|
||||||
mov [minus_pointer],thread7.minus_slide_show_delay
|
mov [minus_pointer],thread7.minus_slide_show_delay
|
||||||
mov [space_pointer],thread7.still
|
mov [space_pointer],thread7.still
|
||||||
@ -261,6 +293,7 @@ thread7: ; start of bgrd thread
|
|||||||
@@:
|
@@:
|
||||||
cmp [option_pointer],1
|
cmp [option_pointer],1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [plus_pointer],thread7.plus_arrows_offset
|
mov [plus_pointer],thread7.plus_arrows_offset
|
||||||
mov [minus_pointer],thread7.minus_arrows_offset
|
mov [minus_pointer],thread7.minus_arrows_offset
|
||||||
mov [space_pointer],thread7.still
|
mov [space_pointer],thread7.still
|
||||||
@ -268,6 +301,7 @@ thread7: ; start of bgrd thread
|
|||||||
@@:
|
@@:
|
||||||
cmp [option_pointer],2
|
cmp [option_pointer],2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [plus_pointer],thread7.still
|
mov [plus_pointer],thread7.still
|
||||||
mov [minus_pointer],thread7.still
|
mov [minus_pointer],thread7.still
|
||||||
mov [space_pointer],thread7.space_check1
|
mov [space_pointer],thread7.space_check1
|
||||||
@ -288,17 +322,11 @@ thread7: ; start of bgrd thread
|
|||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
mcall 12,1
|
mcall 12,1
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
|
xor esi,esi
|
||||||
mov ecx,100*65536+120 ; [y start] *65536 + [y size]
|
mcall ,<100,300>,<100,120>,0x13909090,,optiontext
|
||||||
mov edx,0x03909090 ; color of work area RRGGBB,8->color gl
|
|
||||||
mcall
|
|
||||||
|
|
||||||
mcall 8,<15,10>,<50,11>,2,0xdddddd
|
mcall 8,<15,10>,<50,11>,2,0xdddddd
|
||||||
inc edx
|
inc edx
|
||||||
mcall ,<77,10>
|
mcall ,<77,10>
|
||||||
@ -311,43 +339,21 @@ thread7: ; start of bgrd thread
|
|||||||
inc edx
|
inc edx
|
||||||
mcall ,<250,40>,<50,20>
|
mcall ,<250,40>,<50,20>
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
|
|
||||||
; mcall 13,<50,45>,<25,12>,0xffffff
|
|
||||||
; mov ecx,[ch_flag_en]
|
|
||||||
; mcall 47,0x800a0000,,<72,27>,0x10000000; 0x40000000,0xffffff
|
|
||||||
; WINDOW LABEL
|
|
||||||
mcall 71,1, optiontext
|
|
||||||
|
|
||||||
; mov eax,4 ; function 4 : write text to window
|
|
||||||
; mov ebx,46*65536+28 ; [x start] *65536 + [y start]
|
|
||||||
; mov ecx,0xffffff
|
|
||||||
; mov edx, sorttext
|
|
||||||
; mov esi, sorttext.size
|
|
||||||
; mcall
|
|
||||||
; mov ebx,135*65536+57
|
|
||||||
; mov edx, ok_btn
|
|
||||||
; mov esi, ok_btn.size ;2
|
|
||||||
mcall 4,<10,35>,0x80ffffff,slide_show_delay_title
|
mcall 4,<10,35>,0x80ffffff,slide_show_delay_title
|
||||||
mcall ,<17,53>,0x90000000,slide_show_delay_text
|
mcall ,<17,53>,0x90000000,slide_show_delay_text
|
||||||
mcall ,<10,75>,0x80ffffff,arrows_offset_title
|
mcall ,<10,75>,0x80ffffff,arrows_offset_title
|
||||||
mcall ,<17,93>,0x90000000,slide_show_delay_text
|
mcall ,<17,93>,0x90000000,slide_show_delay_text
|
||||||
mcall ,<265,57>, ,ok_btn
|
mcall ,<265,57>, ,ok_btn
|
||||||
|
|
||||||
call .draw_all_options_values
|
call .draw_all_options_values
|
||||||
|
|
||||||
; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
|
||||||
mcall 12,2
|
mcall 12,2
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
;.draw_opt_boxes:
|
|
||||||
; draw_option_boxes option_boxes_sort,option_boxes_sort_end
|
|
||||||
; ret
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
.draw_slide_show_delay:
|
.draw_slide_show_delay:
|
||||||
mov edx,0xffffff
|
mov edx,0xffffff
|
||||||
cmp [option_pointer],0
|
cmp [option_pointer],0
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov edx,0xffff80
|
mov edx,0xffff80
|
||||||
@@:
|
@@:
|
||||||
mcall 13,<29,45>,<50,12>,
|
mcall 13,<29,45>,<50,12>,
|
||||||
@ -358,6 +364,7 @@ thread7: ; start of bgrd thread
|
|||||||
mov edx,0xffffff
|
mov edx,0xffffff
|
||||||
cmp [option_pointer],1
|
cmp [option_pointer],1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov edx,0xffff80
|
mov edx,0xffff80
|
||||||
@@:
|
@@:
|
||||||
mcall 13,<29,45>,<90,12>,
|
mcall 13,<29,45>,<90,12>,
|
||||||
@ -368,6 +375,7 @@ thread7: ; start of bgrd thread
|
|||||||
mov [check1+12],dword 0xffffff
|
mov [check1+12],dword 0xffffff
|
||||||
cmp [option_pointer],2
|
cmp [option_pointer],2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [check1+12],dword 0xffff80
|
mov [check1+12],dword 0xffff80
|
||||||
@@:
|
@@:
|
||||||
push dword check1
|
push dword check1
|
||||||
@ -378,6 +386,7 @@ thread7: ; start of bgrd thread
|
|||||||
mov [check2+12],dword 0xffffff
|
mov [check2+12],dword 0xffffff
|
||||||
cmp [option_pointer],3
|
cmp [option_pointer],3
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [check2+12],dword 0xffff80
|
mov [check2+12],dword 0xffff80
|
||||||
@@:
|
@@:
|
||||||
push dword check2
|
push dword check2
|
||||||
|
@ -4,136 +4,159 @@ k_sort_directory:
|
|||||||
jnz still
|
jnz still
|
||||||
or dword [status],16
|
or dword [status],16
|
||||||
|
|
||||||
call get_memory_for_tread_stack
|
call get_memory_for_thread_stack
|
||||||
mov [thread_stack_5],eax
|
mov [thread_stack_5],eax
|
||||||
mcall 51, 1, thread5 ;, thread_stack_5
|
mcall 51,1,thread5 ; thread_stack_5
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
thread5: ; start of bgrd thread
|
thread5: ; start of bgrd thread
|
||||||
mcall 9, procinfo_threads, -1
|
mcall 9,procinfo_threads,-1
|
||||||
mov eax,[ebx+30]
|
mov eax,[ebx+30]
|
||||||
mov [PID5],eax
|
mov [PID5],eax
|
||||||
mcall 40, 0x27
|
mcall 40,0x27
|
||||||
mov eax,[sort_type]
|
mov eax,[sort_type]
|
||||||
cmp [sort_type],dword 0
|
cmp [sort_type],dword 0
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort0
|
mov [option_group2],sort0
|
||||||
jmp .thread5
|
jmp .thread5
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [sort_type],dword 2
|
cmp [sort_type],dword 2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort2
|
mov [option_group2],sort2
|
||||||
jmp .thread5
|
jmp .thread5
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [sort_type],dword 4
|
cmp [sort_type],dword 4
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort4
|
mov [option_group2],sort4
|
||||||
jmp .thread5
|
jmp .thread5
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
; cmp [sort_type],dword 6
|
|
||||||
; jne @f
|
|
||||||
mov [option_group2],sort6
|
mov [option_group2],sort6
|
||||||
; jmp .thread5
|
;-----------------------------------
|
||||||
;@@:
|
|
||||||
.thread5:
|
.thread5:
|
||||||
mov [sort_type_old],eax
|
mov [sort_type_old],eax
|
||||||
mov eax,[option_group2]
|
mov eax,[option_group2]
|
||||||
mov [option_group2_old],eax
|
mov [option_group2_old],eax
|
||||||
|
;-----------------------------------
|
||||||
.red:
|
.red:
|
||||||
call .draw_window
|
call .draw_window
|
||||||
|
;-----------------------------------
|
||||||
.still:
|
.still:
|
||||||
|
mcall 10 ; wait here for event
|
||||||
mov eax,10 ; wait here for event
|
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
je .red
|
je .red
|
||||||
|
|
||||||
cmp eax,2 ; key in buffer ?
|
cmp eax,2 ; key in buffer ?
|
||||||
je .key
|
je .key
|
||||||
|
|
||||||
cmp eax,3 ; button in buffer ?
|
cmp eax,3 ; button in buffer ?
|
||||||
je .button
|
je .button
|
||||||
|
|
||||||
cmp eax,6 ; mouse in buffer ?
|
cmp eax,6 ; mouse in buffer ?
|
||||||
je .mouse
|
je .mouse
|
||||||
jmp .still
|
|
||||||
|
|
||||||
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.mouse:
|
.mouse:
|
||||||
push dword option_boxes_sort
|
push dword option_boxes_sort
|
||||||
call [option_box_mouse]
|
call [option_box_mouse]
|
||||||
|
|
||||||
cmp [option_group2],sort0
|
cmp [option_group2],sort0
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [sort_type],dword 0
|
mov [sort_type],dword 0
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [option_group2],sort2
|
cmp [option_group2],sort2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [sort_type],dword 2
|
mov [sort_type],dword 2
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [option_group2],sort4
|
cmp [option_group2],sort4
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [sort_type],dword 4
|
mov [sort_type],dword 4
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [option_group2],sort6
|
cmp [option_group2],sort6
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [sort_type],dword 6
|
mov [sort_type],dword 6
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.key:
|
.key:
|
||||||
mcall
|
mcall
|
||||||
cmp ah,27
|
cmp ah,27
|
||||||
je .close
|
je .close
|
||||||
|
|
||||||
cmp ah,13
|
cmp ah,13
|
||||||
je .kok
|
je .kok
|
||||||
|
|
||||||
cmp ah,177 ;down
|
cmp ah,177 ;down
|
||||||
je .fdn
|
je .fdn
|
||||||
|
|
||||||
cmp ah,178 ;up
|
cmp ah,178 ;up
|
||||||
jne .still
|
jne .still
|
||||||
|
|
||||||
cmp [sort_type],0
|
cmp [sort_type],0
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
sub [sort_type],2
|
sub [sort_type],2
|
||||||
jmp .flagcont
|
jmp .flagcont
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.fdn:
|
.fdn:
|
||||||
cmp [sort_type],6
|
cmp [sort_type],6
|
||||||
je .still
|
je .still
|
||||||
|
|
||||||
add [sort_type],2
|
add [sort_type],2
|
||||||
|
|
||||||
.flagcont:
|
.flagcont:
|
||||||
cmp [sort_type],dword 0
|
cmp [sort_type],dword 0
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort0
|
mov [option_group2],sort0
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [sort_type],dword 2
|
cmp [sort_type],dword 2
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort2
|
mov [option_group2],sort2
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [sort_type],dword 4
|
cmp [sort_type],dword 4
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov [option_group2],sort4
|
mov [option_group2],sort4
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
@@:
|
@@:
|
||||||
cmp [sort_type],dword 6
|
cmp [sort_type],dword 6
|
||||||
jne .still ;@f
|
jne .still ;@f
|
||||||
|
|
||||||
mov [option_group2],sort6
|
mov [option_group2],sort6
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
jmp .still
|
jmp .still
|
||||||
|
;---------------------------------------------------------------------
|
||||||
.button: ; button
|
.button: ; button
|
||||||
mov eax,17 ; get id
|
mcall 17 ; get id
|
||||||
mcall
|
|
||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
jne .noclose
|
jne .noclose
|
||||||
|
;-------------------------------
|
||||||
.close:
|
.close:
|
||||||
mov eax,[sort_type_old]
|
mov eax,[sort_type_old]
|
||||||
mov [sort_type],eax
|
mov [sort_type],eax
|
||||||
@ -143,64 +166,39 @@ thread5: ; start of bgrd thread
|
|||||||
xor dword [status],16
|
xor dword [status],16
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [PID5],eax
|
mov [PID5],eax
|
||||||
|
|
||||||
mcall 68,13,[thread_stack_5]
|
mcall 68,13,[thread_stack_5]
|
||||||
mov eax,-1 ; close this program
|
mcall -1 ; close this program
|
||||||
mcall
|
;---------------------------------------------------------------------
|
||||||
.noclose:
|
.noclose:
|
||||||
.kok:
|
.kok:
|
||||||
mov eax,[load_directory_pointer]
|
mov eax,[load_directory_pointer]
|
||||||
cmp [eax+4],dword 0
|
cmp [eax+4],dword 0
|
||||||
je .close_1
|
je .close_1
|
||||||
|
|
||||||
call load_directory.copy_dir_path
|
call load_directory.copy_dir_path
|
||||||
call load_directory.sort
|
call load_directory.sort
|
||||||
mov [sort_directory_flag],byte 1
|
mov [sort_directory_flag],byte 1
|
||||||
jmp .close_1
|
jmp .close_1
|
||||||
|
;---------------------------------------------------------------------
|
||||||
; *********************************************
|
; *********************************************
|
||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******** WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
|
|
||||||
|
|
||||||
.draw_window:
|
.draw_window:
|
||||||
mcall 12,1
|
mcall 12,1
|
||||||
|
|
||||||
; DRAW WINDOW
|
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
|
xor esi,esi
|
||||||
mov ecx,100*65536+110 ; [y start] *65536 + [y size]
|
mcall ,<100,300>,<100,110>,0x13909090,,labelt5
|
||||||
mov edx,0x03909090 ; color of work area RRGGBB,8->color gl
|
mcall 8,<120,40>,<50,20>,4,0xdddddd
|
||||||
mcall
|
mcall 4,<46,28>,0xffffff,sorttext,sorttext.size
|
||||||
|
xor ecx,ecx
|
||||||
mov eax,8
|
mcall ,<135,57>,,ok_btn,ok_btn.size
|
||||||
mov ebx,120*65536+40
|
|
||||||
mov ecx,50*65536+20
|
|
||||||
mov edx,4
|
|
||||||
mov esi,0xdddddd
|
|
||||||
mcall
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mcall 71,1, labelt5
|
|
||||||
|
|
||||||
mov eax,4 ; function 4 : write text to window
|
|
||||||
mov ebx,46*65536+28 ; [x start] *65536 + [y start]
|
|
||||||
mov ecx,0xffffff
|
|
||||||
mov edx, sorttext
|
|
||||||
mov esi, sorttext.size
|
|
||||||
mcall
|
|
||||||
mov ebx,135*65536+57
|
|
||||||
mov edx, ok_btn
|
|
||||||
mov esi, ok_btn.size ;2
|
|
||||||
mov ecx,0
|
|
||||||
mcall
|
|
||||||
|
|
||||||
call .draw_opt_boxes
|
call .draw_opt_boxes
|
||||||
; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
|
; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
|
||||||
mcall 12,2
|
mcall 12,2
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.draw_opt_boxes:
|
.draw_opt_boxes:
|
||||||
push dword option_boxes_sort
|
push dword option_boxes_sort
|
||||||
call [option_box_draw]
|
call [option_box_draw]
|
||||||
ret
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
;*****************************************************************************
|
;*****************************************************************************
|
||||||
; v.1.0 rñ3 14.06.2011
|
; v.1.0 rñ3 07.07.2011
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
use32
|
use32
|
||||||
org 0x0
|
org 0x0
|
||||||
@ -303,6 +303,42 @@ button: ; button
|
|||||||
je slide_show.3 ;still
|
je slide_show.3 ;still
|
||||||
jmp slide_show
|
jmp slide_show
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
get_filter_data:
|
||||||
|
mov edi,Filter+4
|
||||||
|
xor eax,eax
|
||||||
|
mov ecx,10
|
||||||
|
cld
|
||||||
|
@@:
|
||||||
|
mov esi,10
|
||||||
|
sub esi,ecx
|
||||||
|
lea esi,[esi+esi*2] ; x 3
|
||||||
|
shl esi,3 ; x 8
|
||||||
|
add esi,dword Convert_plugin_0.Assoc
|
||||||
|
mov esi,[esi]
|
||||||
|
add esi,4
|
||||||
|
|
||||||
|
test esi,esi
|
||||||
|
jz @f
|
||||||
|
call .start
|
||||||
|
dec ecx
|
||||||
|
jnz @r
|
||||||
|
@@:
|
||||||
|
mov [edi],byte 0
|
||||||
|
mov eax,Filter
|
||||||
|
sub edi,eax
|
||||||
|
mov [eax],edi
|
||||||
|
|
||||||
|
ret
|
||||||
|
.start:
|
||||||
|
@@:
|
||||||
|
lodsb
|
||||||
|
stosb
|
||||||
|
test eax,eax
|
||||||
|
jnz @r
|
||||||
|
cmp [esi],ah
|
||||||
|
jne @r
|
||||||
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
kopen_1:
|
kopen_1:
|
||||||
|
|
||||||
mov [open_file_flag],0
|
mov [open_file_flag],0
|
||||||
@ -351,51 +387,6 @@ getappinfo:
|
|||||||
mcall
|
mcall
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
; ÓÑÒÀÍÎÂÈÒÜ ÔÎÍ
|
|
||||||
background:
|
|
||||||
cmp [soi],0
|
|
||||||
je .end
|
|
||||||
mov ecx,[img_width] ; øèðèíà
|
|
||||||
test ecx,ecx
|
|
||||||
jz .end
|
|
||||||
mov edx,[img_high] ; âûñîòà
|
|
||||||
test edx,edx
|
|
||||||
jz .end
|
|
||||||
mcall 15,1 ; set size
|
|
||||||
|
|
||||||
mov esi,ecx
|
|
||||||
imul esi,edx
|
|
||||||
lea esi,[esi*3]
|
|
||||||
; mov ebx,5
|
|
||||||
mov ecx,[soi]
|
|
||||||
|
|
||||||
xor edx,edx
|
|
||||||
|
|
||||||
cmp [img_resolution],24
|
|
||||||
je @f
|
|
||||||
; mov eax,image_file
|
|
||||||
push dword image_file
|
|
||||||
; call [plugin_convert_background]
|
|
||||||
call [convert_Conv_24b]
|
|
||||||
mov ecx,[raw_pointer_2]
|
|
||||||
mcall 15,5 ;15,5 set data
|
|
||||||
mov ecx,[raw_pointer_2]
|
|
||||||
mcall 68,13
|
|
||||||
jmp .set_mode
|
|
||||||
@@:
|
|
||||||
|
|
||||||
mcall 15,5 ; 15,5 set data
|
|
||||||
.set_mode:
|
|
||||||
; dec ebx ;tile/stretch
|
|
||||||
mov ecx,[bgrmode]
|
|
||||||
mcall 15,4 ; 15,4 set mode
|
|
||||||
|
|
||||||
dec ebx ; 15,3 redraw background
|
|
||||||
mcall
|
|
||||||
|
|
||||||
.end:
|
|
||||||
ret
|
|
||||||
;---------------------------------------------------------------------
|
|
||||||
get_window_param:
|
get_window_param:
|
||||||
mcall 9, procinfo, -1
|
mcall 9, procinfo, -1
|
||||||
mov eax,[ebx+34]
|
mov eax,[ebx+34]
|
||||||
@ -422,6 +413,7 @@ get_window_param:
|
|||||||
; popa
|
; popa
|
||||||
; ret
|
; ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
include 'backgrnd.inc'
|
||||||
include 'draw_win.inc'
|
include 'draw_win.inc'
|
||||||
include 'full_win.inc'
|
include 'full_win.inc'
|
||||||
include 'mouse.inc'
|
include 'mouse.inc'
|
||||||
|
Loading…
Reference in New Issue
Block a user