SCRSHOOT - Support for boot parameter 'DIRECT'

git-svn-id: svn://kolibrios.org@2628 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-04-18 14:36:32 +00:00
parent d123dd899e
commit 2f09cfb23e
3 changed files with 50 additions and 2 deletions

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en >lang.inc
@fasm scrshoot.asm scrshoot
@fasm -m 16384 scrshoot.asm scrshoot
@kpack scrshoot
@erase lang.inc
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm scrshoot.asm scrshoot
@fasm -m 16384 scrshoot.asm scrshoot
@kpack scrshoot
@erase lang.inc
@pause

View File

@ -158,6 +158,51 @@ red:
edit_boxes_set_sys_color editboxes,editboxes_end,sc ; /
get_screen_prop scr ; 祚怒<E7A59A>布 身銈酮䭾制 恣 磲<>
;------------------------------------------------------------------------------
; Boot with "DIRECT" parameter - get screen and save
mov eax,cmdstr
cmp [eax],byte 0
je no_boot
cmp [eax],dword 'DIRE'
jne no_boot
cmp [eax+4],word 'CT'
jne no_boot
and [ch2.flags],dword 0
or [ch5.flags],dword 1
and [ch3.flags],dword 0
mov [OpenDialog_data.draw_window],dword draw_window_direct
call shoot
jmp close
;------------------------------------------------------------------------------
draw_window_direct:
mcall 12,1
mcall 14
; eax = [xsize]*65536 + [ysize]
mov ebx,eax
shr ebx,17
sub ebx,100
shl ebx,16
mov bx,200
mov ecx,eax
and ecx,0xffff
shr ecx,1
sub ecx,50
shl ecx,16
mov cx,100
xor eax,eax
xor esi,esi
mcall ,,,0x34ffffff,,grab_text
mcall 4,<10,30>,0x90000000,saving
mcall 12,2
ret
;------------------------------------------------------------------------------
no_boot:
call draw_window ; 砲鄍鄖嵼<E5B5BC>布 悚陋
still:
wait_event red,key,button,mouse,ipc,still ; 忖布 嵼㏑漼<E38F91>
@ -412,6 +457,7 @@ shoot:
bt dword [ch5.flags],1 ; ◥恃蟡陋 咧 𨯂漅嵼樈<E5B5BC>平言 ?
jnc @f
call [OpenDialog_data.draw_window]
; invoke OpenDialog
push dword OpenDialog_data
call [OpenDialog_Start]
@ -422,6 +468,8 @@ shoot:
; prepare for PathShow
push dword PathShow_data_1
call [PathShow_prepare]
call [OpenDialog_data.draw_window]
call save_file
@@: