/programs/media/scrshoot/macros.inc |
---|
File deleted |
/programs/media/scrshoot/check.inc |
---|
File deleted |
\ No newline at end of file |
/programs/media/scrshoot/file_sys.inc |
---|
File deleted |
\ No newline at end of file |
/programs/media/scrshoot/label.inc |
---|
14,7 → 14,7 |
mov eax,4 |
mov ebx,[edi] |
mov ecx,[edi+4] |
int 0x40 |
mcall |
popa |
ret |
} |
/programs/media/scrshoot/readme.txt |
---|
1,3 → 1,7 |
<Lrz> - ¨á¯®«ì§ãîâáï ª®¬¯®¥âë ¨§ á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj. |
£à®¬ ï ¡« £®¤ à®áâì Mario79, § ᮢ¥âë, â¥áâ¨à®¢ ¨¥ ¨ subrutine ¯® á¡à®áã ¨§®¡à ¦¥¨ï ¢ ¡ãä¥à, ¤«ï ¤ «ì¥©è¥£® á®åà ¥¨ï |
HDD. |
¢â®à ¤®ªã¬¥â ¨ ¯à®£à ¬¬ë: ¢â¨å®¢ ªá¨¬ (Maxxxx32) |
« £®¤ à®áâ¨: |
à âã ª¨ï®¢ã (Mario79) § ¯®¬®éì, ᮢ¥âë, ªà¨â¨ªã; |
/programs/media/scrshoot/scrsavef.inc |
---|
45,13 → 45,21 |
jmp .next |
.str_end: |
;;;;clean memory |
mov ecx,dword [sf_buf.bmp_header] |
mov ebx,13 |
mov eax,68 |
mcall |
; ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â 㦮 ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥, |
; ç⮡ë á«¥¤ãîé ï ¡ë« ¢ëà ¢¥ 4 ¡ ©â . |
; ¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi. |
xor edx,edx |
movzx eax,word [scr_buf.width] ; eax = è¨à¨ ª à⨪¨ |
lea eax,[eax*3] ; eax = ¡ ©â áâப㠪 à⨪¨ |
movr ebx,4 ; ebx = 4 |
mov ebx,4 ; ebx = 4 |
mov edi,ebx ; edi = 4 |
div ebx ; eax = ¡ ©â áâப㠪 à⨪¨ div 4 edx = ¡ ©â... mod 4 |
sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â |
61,10 → 69,11 |
@@: |
; ¢ë¤¥«ï¥¬ ¯ ¬ïâì |
mov ecx,[scr_buf.end_ptr] |
mov [sf_buf.bmp_header],ecx |
add ecx,0x36 |
mov [sf_buf.bmp_area],ecx |
; mov ecx,[scr_buf.end_ptr] |
; mov [sf_buf.bmp_header],ecx |
; add ecx,0x36 |
; mov [sf_buf.bmp_area],ecx |
movsx ebx,word [scr_buf.width] |
movsx edx,word [scr_buf.height] |
;imul ebx,edx |
71,92 → 80,78 |
lea ebx,[ebx*3] |
add ebx,edi |
imul ebx,edx |
add ecx,ebx |
mov [sf_buf.end],ecx |
add ecx,4096 |
xor ebx,ebx |
inc ebx |
movr eax,64 |
int 0x40 |
mov ecx,ebx |
push edi |
; mov [sf_buf.end],ecx |
add ecx,0x36 |
mov ebx,12 |
mov eax,68 |
mcall |
mov [sf_buf.bmp_header],eax |
add eax,0x36 |
mov [sf_buf.bmp_area],eax |
add eax,ecx |
sub eax,0x36 |
mov [sf_buf.end],eax |
; push edi |
; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
mov edi,fs_struc |
mov [edi],dword 2 |
mov ebp,fs_struc |
mov [ebp],dword 2 |
mov eax,[sf_buf.bmp_header] |
mov ebx,[sf_buf.end] |
sub ebx,eax |
mov [edi+12],ebx |
mov [edi+16],eax |
mov [edi+21],dword file_name |
mov [ebp+12],ebx |
mov [ebp+16],eax |
mov [ebp+21],dword file_name |
; § ¯®«ï¥¬ § £®«®¢®ª bmp |
mov edi,[sf_buf.bmp_header] |
mov [edi],word 'BM' |
mov ebp,[sf_buf.bmp_header] |
mov [ebp],word 'BM' |
mov ebx,[sf_buf.end] |
sub ebx,[sf_buf.bmp_area] |
mov [edi+34],ebx ; à §¬¥à ª à⨪¨ |
mov [edi+10],dword 0x36 ; à §¬¥à § £®«®¢ª |
mov [ebp+34],ebx ; à §¬¥à ª à⨪¨ |
mov [ebp+10],dword 0x36 ; à §¬¥à § £®«®¢ª |
add ebx,0x36 |
mov [edi+2],ebx ; à §¬¥à ä ©« |
mov [edi+14],dword 0x28 |
mov [ebp+2],ebx ; à §¬¥à ä ©« |
mov [ebp+14],dword 0x28 |
movzx eax,word [scr_buf.width] |
mov [edi+18],eax ; £®à¨§®â «ìë© à §¬¥à |
mov [ebp+18],eax ; £®à¨§®â «ìë© à §¬¥à |
movzx eax,word [scr_buf.height] |
mov [edi+22],eax ; ¢¥à⨪«ìë© à §¬¥à |
mov [edi+26],word 1 |
mov [edi+28],word 24 |
mov [ebp+22],eax ; ¢¥à⨪«ìë© à §¬¥à |
mov [ebp+26],word 1 |
mov [ebp+28],word 24 |
; ª®¯¨à㥬 ¨ ¯¥à¥¢®à 稢 ¥¬ |
; mov esi,[scr_buf.ptr] |
; mov edi,[sf_buf.bmp_area] |
; mov edx,[sf_buf.end] |
; sub edx,edi |
; movsx ecx,word [scr_buf.height] |
;.next_str: |
;push ecx |
; |
; movsx ecx,word [scr_buf.width] |
; lea ecx,[ecx*3] |
; mov ebx,ecx |
;.next_byte: |
; mov ah,[esi+ebx] |
; mov [edi+edx],ah |
; dec ebx |
; dec edx |
; loop .next_byte |
; movsx ecx,word [scr_buf.width] |
; lea ecx,[ecx*3] |
; add esi,ecx |
;pop ecx |
; loop .next_str |
mov esi,[scr_buf.end_ptr] |
mov edi,[sf_buf.bmp_area] |
movzx ecx,word [scr_buf.height] |
; á®åà 塞 |
mov esi,[scr_buf.ptr] |
mov edi,[sf_buf.end] |
movzx edx,word [scr_buf.height] |
movzx ebx,word [scr_buf.width] |
lea ebx,[ebx*3] |
add edi,ebx |
test ebx,11b |
jz @f |
shr ebx,2 |
inc ebx |
shl ebx,2 |
@@: |
cld |
align 4 |
.next_str: |
mov edx,ebx |
.next_pixel: |
mov ah,[esi] |
mov [edi],ah |
dec esi |
dec edi |
sub edi,ebx |
mov ecx,ebx |
shr ecx,2 |
rep movsd |
sub edi,ebx |
dec edx |
jnz .next_pixel |
lea edi,[2*ebx+edi] |
add edi,[esp] |
loop .next_str |
jnz .next_str |
pop edi |
; á®åà 塞 |
draw_status saving |
mov eax,70 |
mov ebx,fs_struc |
int 0x40 |
mcall |
test eax,eax |
jne save_error |
/programs/media/scrshoot/scrshoot.asm |
---|
1,29 → 1,60 |
; 01.06.09 - ®¬¯®¥âë ¡¥àãâìáï ¨§ á¨á⥬®© ¡¨¡«¨®â¥ª¨ <Lrz> |
; ¢â®à ¯à®£à ¬¬ë ¢â¨å®¢ ªá¨¬ (Maxxxx32) |
; 24.07.2008 <Lrz> ®¡®¢«¥ editbox |
; 01.02.07 - ®¡®¢«ñ editbox |
; 31.01.07 - ¢áñ ⥯¥àì à¨áã¥âáï ®â®á¨â¥«ì® ª«¨¥â᪮© ®¡« á⨠|
macro draw_status text_ptr |
{ |
mov [status.text],dword text_ptr |
call send_draw_status |
} |
title equ 'Screenshooter v 0.91' ; £®«®¢®ª ®ª |
include '../../develop/libraries/box_lib/trunk/load_lib.mac' |
include '../../develop/libraries/box_lib/trunk/editbox_ex.mac' |
;include '../../develop/examples/editbox/trunk/editbox.inc' |
include '../../macros.inc' |
include 'scrshoot.mac' |
include 'txtbut.inc' |
include 'label.inc' |
include 'textwork.inc' |
title equ 'Screenshooter v 0.9' ; £®«®¢®ª ®ª |
include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë |
meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë |
;include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë |
; meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë |
use32 |
org 0x0 |
db 'MENUET01' |
dd 0x1 |
dd start |
dd i_end |
dd i_end |
dd i_end |
dd cmdstr |
dd cur_dir_path |
align 4 |
include 'scrwin.inc' ; ¢áâ ¢«ï¥¬ ª®¤ ®ª ¯à¤¯à®á¬®âà |
include 'scrsavef.inc'; ¢áâ ¢«ï¥¬ ¯à®æ¥¤ãàã á®åà ¥¨ï ä ©« |
use_edit_box ; \ |
@use_library |
use_txt_button ; | |
use_label ; |-- GUI ª®¬¯®¥âë ¨ ¥ª®â®àë¥ ¯à®æ¥¤ãàë |
use_check_box ; | |
use_text_work ; / |
include 'gp.inc' |
include 'srectwin.inc' |
include 'lang.inc' |
;--- ç «® ¯à®£à ¬¬ë --- |
app_start |
align 4 |
start: |
sys_load_library library_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i |
;if return code =-1 then exit, else nornary work |
; cmp eax,-1 |
inc eax |
test eax,eax |
jz close |
;;;;;;;;;;;;;;;; init memory 68/11 |
mov eax,68 |
mov ebx,11 |
mcall |
test eax,eax |
jz close |
;mov al,[gs:1280*4*1024] |
; ãáâ ¢«¨¢ ¥¬ ipc ¡ãää¥à |
push 60 |
33,7 → 64,7 |
inc ebx |
mov ecx,app_ipc |
mov edx,32 |
int 0x40 |
mcall |
push 66 ; ãáâ ¢«¨¢ ¥¬ £«®¡ «ìãî £®àïçãî ª« ¢¨èã |
pop eax |
41,7 → 72,7 |
mov ebx,4 |
mov cl,55 ; 55 - PrintScrn |
xor edx,edx |
int 0x40 |
mcall |
mov ebx,app |
call get_slot_n |
75,7 → 106,19 |
call shoot |
jmp still |
@@: |
key_edit_boxes editboxes,editboxes_end |
; key_edit_boxes editboxes,editboxes_end |
push dword edit1 |
call [edit_box_key] |
push dword edit2 |
call [edit_box_key] |
push dword edit3 |
call [edit_box_key] |
push dword edit4 |
call [edit_box_key] |
jmp still |
button: |
get_pressed_button |
87,8 → 130,33 |
get_active_window |
cmp eax,[slot_n] |
jne still |
mouse_check_boxes check_boxes,check_boxes_end |
mouse_edit_boxes editboxes,editboxes_end |
;---------------------------------- |
push dword edit1 |
call [edit_box_mouse] |
push dword edit2 |
call [edit_box_mouse] |
push dword edit3 |
call [edit_box_mouse] |
push dword edit4 |
call [edit_box_mouse] |
;---------------------------------- |
push dword ch1 |
call [check_box_mouse] |
push dword ch2 |
call [check_box_mouse] |
push dword ch3 |
call [check_box_mouse] |
push dword ch4 |
call [check_box_mouse] |
push dword ch5 |
call [check_box_mouse] |
push dword ch6 |
call [check_box_mouse] |
push dword use_rect |
call [check_box_mouse] |
;----------------------------------- |
; mouse_check_boxes check_boxes,check_boxes_end |
; mouse_edit_boxes editboxes,editboxes_end |
jmp still |
ipc: |
cmp word [app_ipc+8],2 |
103,7 → 171,7 |
.clear_ipc: |
cld |
xor eax,eax |
movr ecx,32 |
mov ecx,32 |
mov edi,app_ipc |
rep stosb |
jmp still |
113,10 → 181,10 |
bt dword [flags],3 |
jnc @f |
movr eax,18 |
mov eax,18 |
mov ebx,eax |
mov ecx,[set_rect_window_pid] |
int 0x40 |
mcall |
@@: |
close: |
133,14 → 201,14 |
mov ecx,100*65536+220 |
add cx,ax |
mov edx,[sc.work] |
add edx,0x34000000;0x33000000 |
or edx,0x34000000;0x33000000 |
xor esi,esi |
;xor edi,edi |
mov edi,grab_text |
xor eax,eax |
int 0x40 |
mcall |
movr eax,47 ; ¢ë¢®¤¨¬ ç¨á« ¢ ®ª® |
mov eax,47 ; ¢ë¢®¤¨¬ ç¨á« ¢ ®ª® |
mov bx,4 |
shl ebx,16 |
movsx ecx,word [scr.width] ; è¨à¨ íªà |
149,10 → 217,10 |
mov dx,[label1.top] |
push dx |
mov esi,[sc.work_text] |
int 0x40 |
mcall |
movsx ecx,word [scr.height] ; ¢ëá®â íªà |
mov dx,[label2.top] |
int 0x40 |
mcall |
mov bx,2 |
shl ebx,16 |
movsx ecx,word [scr.bitspp] ; ¡¨â ¯¨ªá¥«ì |
159,20 → 227,48 |
mov dx,240 |
shl edx,16 |
pop dx |
int 0x40 |
mcall |
mov bx,6 |
shl ebx,16 |
mov ecx,[scr.bytesps] ; ¡ ©â áâபã |
mov dx,[label2.top] |
int 0x40 |
mcall |
call draw_number ; ¯à®à¨á®¢ë¢ ¥¬ ®¬¥à ᨬª |
call dr_st |
draw_labels labels,labels_end ; ¬¥âª¨ |
draw_edit_boxes editboxes,editboxes_end ; edit_box |
; draw_edit_boxes editboxes,editboxes_end ; edit_box |
;------ show check editbox ----------- |
push dword edit1 |
call [edit_box_draw] |
push dword edit2 |
call [edit_box_draw] |
push dword edit3 |
call [edit_box_draw] |
push dword edit4 |
call [edit_box_draw] |
;------ end check all editbox ------- |
draw_txt_buttons buttons,buttons_end ; ª®¯ª¨ |
draw_check_boxes check_boxes,check_boxes_end ; ä« ¦ª¨ |
; draw_check_boxes check_boxes,check_boxes_end ; ä« ¦ª¨ |
;------ check all checkbox --------- |
push dword ch1 |
call [check_box_draw] |
push dword ch2 |
call [check_box_draw] |
push dword ch3 |
call [check_box_draw] |
push dword ch4 |
call [check_box_draw] |
push dword ch5 |
call [check_box_draw] |
push dword ch6 |
call [check_box_draw] |
push dword use_rect |
call [check_box_draw] |
;------ end check all checkbox ------ |
stop_draw_window ; ª®¥æ ¯¥à¥à¨á®¢ª¨ |
ret |
231,7 → 327,12 |
;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï ᨬª --- |
get_mem_for_shoot: |
mov [scr_buf.ptr],dword __app_end |
;clean memory |
mov ecx,dword [scr_buf.ptr] |
mov ebx,13 |
mov eax,68 |
mcall |
bt dword [use_rect.flags],1 ; ä®âª âì ®¡« áâì íªà |
jc .use_area |
movzx ecx, word [scr.width] |
244,12 → 345,13 |
@@: |
imul ecx,ebx |
lea ecx,[ecx*3] |
add ecx,__app_end |
; add ecx,i_end |
mov ebx,12 |
mov eax,68 |
mcall |
mov [scr_buf.ptr],eax |
add eax,ecx |
mov [scr_buf.end_ptr],ecx |
xor ebx,ebx |
inc ebx |
mov eax,64 |
int 0x40 |
ret |
;--- ᮤ âì ®ª® ¯à®¥¤¯à®á¬®âà --- |
260,9 → 362,9 |
mov eax,51 |
xor ebx,ebx |
inc ebx |
movr ecx,scr_window |
mov edx,__app_end-1000 |
int 0x40 |
mov ecx,scr_window |
mov edx,i_end_tread-1000 |
mcall |
@@: |
popa |
ret |
280,14 → 382,14 |
mov edi,sign_n_input |
call zstr_to_int |
mov [sign_n],al |
movr eax,13 |
mov eax,13 |
mov ebx,150*65536+96 |
mov cx,[label9.top] |
shl ecx,16 |
mov cx,10 |
mov edx,[sc.work] |
int 0x40 |
movr eax,47 |
mcall |
mov eax,47 |
movsx bx,byte [sign_n] |
shl ebx,16 |
mov ecx,[cur_number] |
295,7 → 397,7 |
shl edx,16 |
mov dx,[label9.top] |
mov esi,[sc.work_text] |
int 0x40 |
mcall |
ret |
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª ¢â®áꥬª¨ --- |
302,13 → 404,13 |
start_autoshoot: |
bts dword [flags],1 |
jc @f |
movr eax,51 |
mov eax,51 |
;mov ebx,1 |
xor ebx,ebx |
inc ebx |
mov ecx,autoshoot |
mov edx,__app_end-512 |
int 0x40 |
mov edx,i_end_tread-512 |
mcall |
@@: |
ret |
324,12 → 426,12 |
.next: |
bt dword [flags],1 |
jnc close |
movr eax,60 |
movr ebx,2 |
mov eax,60 |
mov ebx,2 |
mov ecx,[app.pid] |
mov edx,messages.draw_number |
mov esi,2 |
int 0x40 |
mcall |
call shoot |
jmp autoshoot.next |
336,17 → 438,17 |
;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ áâப¨ á®áâ®ï¨ï --- |
; (¤®«¦ ¢ë§ë¢ âìáï ¯®â®ª®¬ £« ¢®£® ®ª ) |
dr_st: |
movr eax,38 ; ®â१®ª |
mov eax,38 ; ®â१®ª |
mov ebx,0*65536+310 |
mov ecx,198*65536+198 |
mov edx,[sc.work_graph] |
int 0x40 |
mcall |
movr eax,13 ; ¯®«®áª |
mov eax,13 ; ¯®«®áª |
mov bx,310 |
mov ecx,199*65536+15 |
mov edx,[sc.work] |
int 0x40 |
mcall |
mov edi,status |
call draw_label |
356,17 → 458,17 |
; ¢å®¤ ebx - ¡ãää¥à 1024 ¡ ©â |
; ¢ë室 ecx - ®¬¥à á«®â |
get_slot_n: |
movr eax,9 |
mov eax,9 |
xor ecx,ecx |
dec ecx |
int 0x40 |
mcall |
mov edx,[ebx+30] |
xor ecx,ecx |
@@: |
movr eax,9 |
mov eax,9 |
inc ecx |
int 0x40 |
mcall |
cmp [ebx+30],edx |
je @f |
jmp @b |
388,11 → 490,11 |
bt dword [flags],1 |
jc .running |
movr eax,51 |
mov eax,51 |
;mov ebx,1 |
xor ebx,ebx |
inc ebx |
int 0x40 |
mcall |
.running: |
ret |
402,12 → 504,12 |
activ_window |
bt dword [ch1.flags],1 ; ¬¨¨¬¨§¨à®¢ âì ®ª® ? |
jnc @f |
movr eax,60 |
movr ebx,2 |
mov eax,60 |
mov ebx,2 |
mov ecx,[app.pid] |
mov edx,messages.min_window |
mov esi,2 |
int 0x40 |
mcall |
@@: |
call shoot |
btr dword [flags],2 |
416,12 → 518,12 |
;--- ¯à®æ¥¤ãà , ®â¯à ¢«ïîé ï £« ¢®¬ã ®ªã á®®¡é¥¨¥ ® ¯¥à¥à¨á®¢ª¥ |
; áâப¨ á®áâ®ï¨ï --- |
send_draw_status: |
movr eax,60 |
movr ebx,2 |
mov eax,60 |
mov ebx,2 |
mov ecx,[app.pid] |
mov edx,messages.draw_status |
mov esi,2 |
int 0x40 |
mcall |
ret |
;--- ¯®â®ª, á®åà ï ä ©« --- |
436,34 → 538,34 |
show_set_rect_window: |
bts dword [flags],3 |
jc @f |
movr eax,51 |
mov eax,51 |
xor ebx,ebx |
inc ebx |
mov ecx,set_rect_window |
mov edx,set_rect_window_esp |
int 0x40 |
mcall |
mov [set_rect_window_pid],eax |
ret |
@@: |
movr eax,18 |
mov eax,18 |
mov ebx,eax |
mov ecx,[set_rect_window_pid] |
int 0x40 |
mcall |
btr dword [flags],3 |
ret |
;--- ¯®«ã票¥ ¨ä®à¬ 樨 ®¡ ªâ¨¢®¬ ®ª¥ --- |
get_active_window_info: |
movr eax,18 |
movr ebx,7 |
int 0x40 |
mov eax,18 |
mov ebx,7 |
mcall |
mov ecx,eax |
movr eax,9 |
mov eax,9 |
mov ebx,active_app |
int 0x40 |
mcall |
ret |
;==================================================================== |
493,9 → 595,9 |
labels_end: |
editboxes: |
edit1 edit_box 300,5,35,cl_white,0xaabbcc,0,0,0,1024,ed_buffer.1,ed_focus ; ¯ãâì ª ä ©«ã |
edit2 edit_box 35,75,134,cl_white,0xaabbcc,0,0,0,9,ed_buffer.2,ed_figure_only ; § ¤¥à¦ª |
edit3 edit_box 35,165,164,cl_white,0xaabbcc,0,0,0,9,ed_buffer.3,ed_figure_only |
edit1 edit_box 300,5,35,cl_white,0xaabbcc,0,0,0,300,ed_buffer.1,ed_focus,10,10 ; ¯ãâì ª ä ©«ã |
edit2 edit_box 35,75,134,cl_white,0xaabbcc,0,0,0,9,ed_buffer.2,ed_figure_only,3,3 ; § ¤¥à¦ª |
edit3 edit_box 35,165,164,cl_white,0xaabbcc,0,0,0,9,ed_buffer.3,ed_figure_only ; ¢â®ã¬¥à æ¨ï |
edit4 edit_box 16,165,181,cl_white,0xaabbcc,0,0,0,1,sign_n_input,ed_figure_only,1 |
editboxes_end: |
510,13 → 612,13 |
buttons_end: |
check_boxes: |
ch1 check_box 5,105,cl_white,0,0,ch_text.1,(ch_text.2-ch_text.1) ; ᢥàãâì ®ª® |
ch2 check_box 5,120,cl_white,0,0,ch_text.2,(ch_text.3-ch_text.2) ; § ⥬ ᤥ« âì ªâ¨¢ë¬ |
ch3 check_box 145,105,cl_white,0,0,ch_text.3,(ch_text.4-ch_text.3) ; ¯®ª § âì ᨬ®ª |
ch4 check_box 5,135,cl_white,0,0,ch_text.4,(ch_text.5-ch_text.4) ; |
ch5 check_box 5,150,cl_white,0,0,ch_text.5,(ch_text.6-ch_text.5) |
ch6 check_box 5,165,cl_white,0,0,ch_text.6,(ch_text.7-ch_text.6) |
use_rect check_box 145,150,cl_white,0,0,ch_text.7,(ch_text.8-ch_text.7) ; ¨á¯. ®¡« áâì |
ch1 check_box 5,105,5,11,cl_white,0,0,ch_text.1,(ch_text.2-ch_text.1),ch_flag_en ; ᢥàãâì ®ª® |
ch2 check_box 5,120,5,11,cl_white,0,0,ch_text.2,(ch_text.3-ch_text.2),ch_flag_en ; § ⥬ ᤥ« âì ªâ¨¢ë¬ |
ch3 check_box 145,105,5,11,cl_white,0,0,ch_text.3,(ch_text.4-ch_text.3),ch_flag_en ; ¯®ª § âì ᨬ®ª |
ch4 check_box 5,135,5,11,cl_white,0,0,ch_text.4,(ch_text.5-ch_text.4),ch_flag_en ; § ¤¥à¦ª |
ch5 check_box 5,150,5,11,cl_white,0,0,ch_text.5,(ch_text.6-ch_text.5) |
ch6 check_box 5,165,5,11,cl_white,0,0,ch_text.6,(ch_text.7-ch_text.6),ch_flag_en |
use_rect check_box 145,150,5,11,cl_white,0,0,ch_text.7,(ch_text.8-ch_text.7) ; ¨á¯. ®¡« áâì |
; ¢â®ã¬¥à æ¨ï |
check_boxes_end: |
610,7 → 712,7 |
bad_fat_table db 'FAT table destroyed',0 |
ac_den db 'Access denied',0 |
device_er db 'Device error',0 |
not_shooted db 'Make photo !!!',0 |
not_shooted db 'Make a photo !!!',0 |
no_file_name db 'Enter file name !!!',0 |
invalid_rect db 'Wrong area size',0 |
620,11 → 722,14 |
db '2',0 |
app_ipc ipc_buffer 32 |
align 4 |
mouse_flag: dd 0x0 |
structure_of_potock: |
rb 100 |
align 4 |
cur_number dd ? |
sign_n db ? |
656,6 → 761,17 |
set_rect_window_pid dd ? |
set_rect_window_slot dd ? |
align 4 |
ed_buffer: |
.1: db '/sys/*.bmp',0 |
rb 287 |
.2: db '100',0 |
rb 6 |
.3: rb 10 |
align 4 |
rect_input_buffer: |
.left rb 6 |
.top rb 6 |
664,10 → 780,7 |
cmdstr rb 257 |
ed_buffer: |
.1: rb 1025 |
.2: rb 10 |
.3: rb 10 |
align 4 |
file_name: |
rb 1058 |
679,7 → 792,6 |
.height dw ? |
.width dw ? |
sc sys_color_table |
app procinfo ; ¨ä®à¬ æ¨ï ® £« ¢®¬ ®ª¥ |
active_app procinfo ; ¨ä®à¬ æ¨ï ®¡ ªâ¨¢®¬ ®ª¥ |
686,4 → 798,11 |
set_rect_window_procinfo procinfo ; ¨ä®à¬ æ¨ï ®¡ ®ª¥ ®¡« á⨠|
shoot_esp rb 512 ; á⥪ ¯®â®ª ä®âª ìï |
set_rect_window_esp rb 512 ; á⥪ ®ª ®¡« á⨠|
app_end ; ª®¥æ ¯à®£à ¬¬ë |
; app_end ; ª®¥æ ¯à®£à ¬¬ë |
align 4 |
cur_dir_path rb 4096 |
library_path rb 4096 |
i_end_tread: |
rb 1024 |
align 4 |
i_end: |
/programs/media/scrshoot/scrshoot.mac |
---|
0,0 → 1,312 |
;In this file content a macros need for compilation the scrshoot |
evm_redraw equ 1 |
evm_key equ 10b |
evm_button equ 100b |
evm_mouse equ 100000b |
evm_ipc equ 1000000b |
;--- ñîîáùèòü ñèñòåìå î íà÷àëå ïåðåðèñîâêè îêíà --- |
macro draw_status text_ptr |
{ |
mov [status.text],dword text_ptr |
call send_draw_status |
} |
macro start_draw_window |
{ |
;mov eax,12 |
push 12 |
pop eax |
xor ebx,ebx |
inc ebx |
mcall |
} |
;--- ñîîáùèòü ñèñòåìå î çàâåðøåíèè ïåðåðèñîâêè îêíà --- |
macro stop_draw_window |
{ |
;mov eax,12 |
push 12 |
pop eax |
;mov ebx,2 |
push 2 |
pop ebx |
mcall |
} |
;--- óñòàíîâèòü ìàñêó îæèäàåìûõ ñîáûòèé --- |
;--- îæèäàòü ñîáûòèÿ --- |
macro wait_event redraw,key,button,mouse,ipc,other |
{ |
mov eax,10 |
mcall |
dec ax |
if <redraw> eq <> |
else |
jz redraw |
end if |
dec ax |
if <key> eq <> |
else |
jz key |
end if |
dec ax |
if <button> eq <> |
else |
jz button |
end if |
dec ax |
dec ax |
dec ax |
if <mouse> eq <> |
else |
jz mouse |
end if |
if <ipc> eq <> |
else |
dec ax |
jz ipc |
end if |
if <other> eq <> |
jmp still |
else |
jmp other |
end if |
} |
;--- óñòàíîâèòü ìàñêó îæèäàåìûõ ñîáûòèé --- |
macro set_events_mask mask |
{ |
;mov eax,40 |
push 40 |
pop eax |
;mov ebx,mask |
push mask |
pop ebx |
mcall |
} |
macro check_boxes_set_sys_color start,end,color_table |
{ |
ch_left equ [edi] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî õ |
ch_top equ [edi+2] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî ó |
ch_text_margin equ [edi+4] ;=4 ðàññòîÿíèå îò ïðÿìîóãîëüíèêà ÷åê áîêñà äî íàäïèñè |
ch_size equ [edi+8] ;12 ðàçìåð êâàäðàòà ÷åê áîêñà |
ch_color equ [edi+12] ;öâåò âíóòðè checkbox |
ch_border_color equ [edi+16] ; or [edi+4] ;öâåò ðàìêè checkbox åå ìîæíî çàäàòü ñàìîñòîÿòåëüíî |
ch_text_color equ [edi+20];[edi+4] ;öâåò òåêñòà |
ch_text_ptr equ [edi+24] ;óêàçàòåëü íà íà÷àëî òåêñòîâîé ñòðîêè |
ch_text_length equ [edi+28] |
ch_flags equ [edi+32] ;ôëàãè |
;ch_left equ [edi] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî õ |
;ch_top equ [edi+2] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî ó |
;ch_color equ [edi+4] ;öâåò âíóòðè checkbox |
;ch_border_color equ [edi+8] ;öâåò ðàìêè checkbox |
;ch_text_color equ [edi+12] ;öâåò òåêñòà |
;ch_text_ptr equ [edi+16] ;óêàçàòåëü íà íà÷àëî òåêñòîâîé ñòðîêè |
;ch_text_length equ [edi+20] ;äëèíà íàäïèñè (2^64 òàêîé äëèíû ìîæåò áûòü òåêñò) |
;ch_flags equ [edi+24] ;ôëàãè |
mov edi,start |
mov ecx,((end-start)/ch_struc_size) |
mov esi,color_table |
@@: |
push dword [esi+32] |
pop dword ch_text_color |
push dword [esi+36] |
pop dword ch_border_color |
add edi,ch_struc_size |
loop @b |
} |
macro get_key |
{ |
;mov eax,2 |
push 2 |
pop eax |
mcall |
} |
macro edit_boxes_set_sys_color start,end,color_table |
{ |
ed_focus_border_color equ [edi+20] ;öâåò ðàìêè êîìïîíåíòà |
ed_blur_border_color equ [edi+24] ;öâåò íå àêòèâíîãî êîìïîíåíòà |
mov edi,start |
mov ecx,((end-start)/ed_struc_size) |
mov esi,color_table |
@@: |
mov eax,[esi+36] |
mov ebx,[esi+20] |
mov dword ed_focus_border_color,eax |
shr bh,1 |
shr bl,1 |
shr ah,1 |
shr al,1 |
add ah,bh |
add al,bl |
ror eax,16 |
ror ebx,16 |
shr bl,1 |
shr al,1 |
add al,bl |
ror eax,16 |
mov dword ed_blur_border_color,eax |
add edi,ed_struc_size |
loop @b |
} |
;--- ïîëó÷èòü êîä íàæàòîé êíîïêè --- |
macro get_pressed_button |
{ |
;mov eax,17 |
push 17 |
pop eax |
mcall |
} |
macro get_active_window |
{ |
mov eax,18 |
mov ebx,7 |
mcall |
} |
;--- ¯®«ãç¨âì ¨ä®à¬ æ¨î ® ¯à®æ¥áᥠ--- |
macro get_procinfo proc_inf_buf,slot_num |
{ |
;mov eax,9 |
push 9 |
pop eax |
;mov ebx,proc_inf_buf |
push proc_inf_buf |
pop ebx |
if <slot_num> eq <> |
xor ecx,ecx |
dec ecx |
else |
;mov ecx,slot_num |
push slot_num |
pop ecx |
end if |
mcall |
} |
macro get_sys_colors col_buf |
{ |
;mov eax,48 |
push 48 |
pop eax |
;mov ebx,3 |
push 3 |
pop ebx |
;mov ecx,col_buf |
push col_buf |
pop ecx |
;mov edx,40 |
push 40 |
pop edx |
mcall |
} |
macro get_screen_prop struc_ptr |
{ |
mov eax,61 |
push eax eax |
xor ebx,ebx |
inc ebx |
mcall |
mov [struc_ptr],eax |
pop eax |
inc ebx |
mcall |
mov [struc_ptr+4],ax |
pop eax |
inc ebx |
mcall |
mov [struc_ptr+6],eax |
} |
macro min_window |
{ |
mov eax,18 |
mov ebx,10 |
mcall |
} |
macro app_close |
{ |
or eax,-1 |
mcall |
} |
macro get_skin_height |
{ |
mov eax,48 |
mov ebx,4 |
mcall |
} |
macro delay time |
{ |
mov eax,5 |
if <time> eq <> |
else |
mov ebx,time |
end if |
mcall |
} |
macro activ_window slot_n |
{ |
mov eax,18 |
mov ebx,3 |
if <slot_n> eq <> |
else |
mov ecx,slot_n |
end if |
mcall |
} |
struc screen_prop |
{ |
.height: dw ? ;+0 |
.width: dw ? ;+2 |
.bitspp: dw ? ;+4 |
.bytesps: dd ?;+6 |
} |
struc sys_color_table |
{ |
.frames: dd ? ;+0 |
.grab: dd ? ;+4 |
.grab_button: dd ? ;+8 |
.grab_button_text: dd ? ;+12 |
.grab_text: dd ? ;+16 |
.work: dd ? ;+20 |
.work_button: dd ?;+24 |
.work_button_text: dd ? ;+28 |
.work_text: dd ? ;+32 |
.work_graph: dd ? ;+36 |
} |
struc procinfo |
{ |
.takts_per_second: dd ? |
.window_stack_pos: dw ? |
.slot_number: dw ? |
dw ? |
.name: rb 11 |
.align: db ? |
.addres: dd ? |
.use_mem: dd ? |
.pid: dd ? |
.left: dd ? |
.top: dd ? |
.width: dd ? |
.height: dd ? |
.slot_state: dw ? |
rb (1024-56) |
} |
struc ipc_buffer size |
{ |
.block: dd ? |
.in_use: dd ? |
.messages: rb size |
} |
;--- 梥â --- |
cl_white=0xffffff |
cl_black=0x000000 |
ch_struc_size=36 |
/programs/media/scrshoot/scrwin.inc |
---|
18,19 → 18,19 |
mov edx,0x01000000 |
xor esi,esi |
xor edi,edi |
int 0x40 |
mcall |
movr eax,7 |
mov ebx,[scr_buf.ptr] |
mov ecx,[scr_buf.size] |
mov eax,7 |
mov ebx,dword [scr_buf.ptr] |
mov ecx,dword [scr_buf.size] |
xor edx,edx |
int 0x40 |
mcall |
movr eax,13 |
mov eax,13 |
mov ebx,19*65536+231 |
mov ecx,19*65536+10 |
mov edx,0x00FF00 |
int 0x40 |
mcall |
mov edi,.label |
call draw_label |
38,4 → 38,5 |
stop_draw_window |
ret |
.label label 20,20,0x80000000,$+4 |
db 'â® ¢ è ᨬ®ª. ë室 - «î¡ ï ª« ¢¨è .',0 |
db 'â® ¢ è ᨬ®ª. ë室 - «î¡ ï ª« ¢¨è .',0 |
/programs/media/scrshoot/srectwin.inc |
---|
16,8 → 16,19 |
.key: |
get_key |
key_edit_boxes rect_input,rect_input_end |
push dword rect_input.left |
call [edit_box_key] |
push dword rect_input.top |
call [edit_box_key] |
push dword rect_input.width |
call [edit_box_key] |
push dword rect_input.height |
call [edit_box_key] |
; key_edit_boxes rect_input,rect_input_end |
call read_rect |
call draw_rect_on_screen |
39,9 → 50,25 |
cmp eax,[set_rect_window_slot] |
jne .still |
mouse_edit_boxes rect_input,rect_input_end |
mouse_check_boxes riw_check_boxes,riw_check_boxes_end |
push dword rect_input.left |
call [edit_box_mouse] |
push dword rect_input.top |
call [edit_box_mouse] |
push dword rect_input.width |
call [edit_box_mouse] |
push dword rect_input.height |
call [edit_box_mouse] |
;;;;;;;;;;;;;;;;;;;;;; |
push dword use_rect_active_window |
call [check_box_mouse] |
; mouse_edit_boxes rect_input,rect_input_end |
; mouse_check_boxes riw_check_boxes,riw_check_boxes_end |
jmp .still |
.draw_window: |
54,14 → 81,27 |
add edx,0x33000000 |
mov edi,riw_grab_text |
xor esi,esi |
int 0x40 |
mcall |
draw_labels rect_input_labels,rect_input_labels_end |
draw_edit_boxes rect_input,rect_input_end |
push dword rect_input.left |
call [edit_box_draw] |
draw_check_boxes riw_check_boxes,riw_check_boxes_end |
push dword rect_input.top |
call [edit_box_draw] |
push dword rect_input.width |
call [edit_box_draw] |
push dword rect_input.height |
call [edit_box_draw] |
;;;;;;;;;;;;;;;;;;;;;; |
push dword use_rect_active_window |
call [check_box_draw] |
; draw_edit_boxes rect_input,rect_input_end |
; draw_check_boxes riw_check_boxes,riw_check_boxes_end |
call read_rect |
call draw_rect_on_screen |
133,7 → 173,7 |
mov ebx,150*65536+80 |
mov ecx,5*65536+60 |
xor edx,edx |
int 0x40 |
mcall |
;movzx eax,word [rect.left] |
;mul word [scr.width] |
176,9 → 216,52 |
mov edx,0xffffff |
mov eax,13 |
int 0x40 |
mcall |
ret |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
;DATA ¤ ë¥ |
;ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨. |
system_path db '/sys/lib/' |
library_name db 'box_lib.obj',0 |
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library box_lib.obj',0 |
myimport: |
edit_box_draw dd aEdit_box_draw |
edit_box_key dd aEdit_box_key |
edit_box_mouse dd aEdit_box_mouse |
version_ed dd aVersion_ed |
check_box_draw dd aCheck_box_draw |
check_box_mouse dd aCheck_box_mouse |
version_ch dd aVersion_ch |
option_box_draw dd aOption_box_draw |
option_box_mouse dd aOption_box_mouse |
version_op dd aVersion_op |
dd 0 |
dd 0 |
aEdit_box_draw db 'edit_box',0 |
aEdit_box_key db 'edit_box_key',0 |
aEdit_box_mouse db 'edit_box_mouse',0 |
aVersion_ed db 'version_ed',0 |
aCheck_box_draw db 'check_box_draw',0 |
aCheck_box_mouse db 'check_box_mouse',0 |
aVersion_ch db 'version_ch',0 |
aOption_box_draw db 'option_box_draw',0 |
aOption_box_mouse db 'option_box_mouse',0 |
aVersion_op db 'version_op',0 |
rect_input: |
.left edit_box 35,95,5,cl_white,0,0,0,5,rect_input_buffer.left,\ |
ed_figure_only+ed_focus |
204,7 → 287,7 |
.height db 'ëá®â :',0 |
riw_check_boxes: |
use_rect_active_window check_box 10,85,cl_white,0,0,\ |
use_rect_active_window check_box 10,85,5,11,cl_white,0,0,\ |
riw_check_boxes_text.1,\ |
riw_check_boxes_text.2-riw_check_boxes_text.1 |
riw_check_boxes_end: |
/programs/media/scrshoot/txtbut.inc |
---|
12,7 → 12,7 |
mov ecx,[edi+4] ;[but.height] |
mov edx,[edi+8];[but.id] |
mov esi,[edi+12];[but.color] |
int 0x40 |
mcall |
;--- ⥪áâ ¥© --- |
; áç¨â ¥¬ ª®«¨ç¥á⢮ ᨬ¢®«®¢ |
mov edx,[edi+20] |
45,7 → 45,7 |
; à¨á㥬 áâபã ⥪áâ |
mov ecx,[edi+16] ;[but.text_color] |
shr eax,1 |
int 0x40 |
mcall |
popa |
ret |
} |