upgrade scrshoot

git-svn-id: svn://kolibrios.org@307 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2007-02-01 09:46:48 +00:00
parent e7be690de5
commit a17b90b7b3
7 changed files with 1022 additions and 641 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,20 @@
macro use_gp
{
;esi - screen size ;esi - screen size
;edi - pointer to image ;edi - pointer to image
csi_width equ [esi+2] csi_width equ [esi+2]
csi_height equ [esi] csi_height equ [esi]
csi_bitspp equ [esi+4] csi_bitspp equ [esi+4]
csi_bytesps equ [esi+6] csi_bytesps equ [esi+6]
copy_screen_to_image: copy_screen_to_image:
pusha pusha
xor edx,edx xor edx,edx
xor ecx,ecx xor ecx,ecx
xor ebx,ebx xor ebx,ebx
bt dword [use_rect.flags],1
jc copy_area
cmp csi_bitspp,word 24 cmp csi_bitspp,word 24
je .next_str_24 je .next_str_24
@ -60,4 +63,32 @@ ret
jl .next_str_24 jl .next_str_24
popa popa
ret ret
}
copy_area:
mov eax,[scr.bytesps]
mov ebx,eax
movzx ecx,word [rect.top]
mul ecx
movzx ecx,word [rect.width]
shl ecx,2
sub ebx,ecx
movzx ecx,word [rect.left]
shl ecx,2
add eax,ecx
movzx ecx,word [rect.height]
mov edx,eax
.next_str:
movzx esi,word [rect.width]
.next_pixel:
mov eax,[gs:edx]
mov [edi],ax
shr eax,8
mov [edi+2],ah
add edx,4
add edi,3
dec esi
jnz .next_pixel
add edx,ebx
loop .next_str
popa
ret

View File

@ -1,7 +1,7 @@
;--- ¤à㣨¥ ¬ ªà®áë --- ;--- ¤à㣨¥ ¬ ªà®áë ---
include 'editbox.inc' include 'editbox.inc'
include 'txtbut.inc' include 'txtbut.inc'
include 'gp.inc' ;include 'gp.inc'
include 'label.inc' include 'label.inc'
;include 'checkbox.inc' ;include 'checkbox.inc'
include 'check.inc' include 'check.inc'
@ -167,7 +167,7 @@ macro get_grab_area
int 0x40 int 0x40
} }
macro get_scin_height macro get_skin_height
{ {
movr eax,48 movr eax,48
movr ebx,4 movr ebx,4
@ -347,4 +347,8 @@ struc ipc_buffer size
;--- æ¢¥â  --- ;--- æ¢¥â  ---
cl_white=0xffffff cl_white=0xffffff
cl_black=0x000000 cl_black=0x000000
;==============================================================================
;============== Š®­áâ ­âë =====================================================
;==============================================================================

View File

@ -1,7 +1,7 @@
€¢â®à ¤®ªã¬¥­â  ¨ ¯à®£à ¬¬ë: …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32) €¢â®à ¤®ªã¬¥­â  ¨ ¯à®£à ¬¬ë: …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32)
<EFBFBD>« £®¤ à­®áâ¨: <EFBFBD>« £®¤ à­®áâ¨:
Œ à âã ‡ ª¨ï­®¢ã (Mario79) §  ¯®¬®éì, ᮢ¥âë, ªà¨â¨ªã; Œ à âã ‡ ª¨ï­®¢ã (Mario79) §  ¯®¬®éì, ᮢ¥âë, ªà¨â¨ªã;
¢á¥¬ ãç áâ­¨ª ¬ ¯à®¥ªâ . ¢á¥¬ ãç áâ­¨ª ¬ ¯à®¥ªâ  KolibriOS.
Screenshooter - ¯à®£à ¬¬ , ¯à¥¤­ §­ ç¥­­ ï ¤«ï ä®â®£à ä¨à®¢ ­¨ï íªà ­  ¨ Screenshooter - ¯à®£à ¬¬ , ¯à¥¤­ §­ ç¥­­ ï ¤«ï ä®â®£à ä¨à®¢ ­¨ï íªà ­  ¨
á®åà ­¥­¨ï ä®â®£à ä¨¨ ¢¢¨¤¥ ä ©«  BMP. á®åà ­¥­¨ï ä®â®£à ä¨¨ ¢¢¨¤¥ ä ©«  BMP.
@ -15,7 +15,7 @@
*  ¢â®¬ â¨ç¥áª ï ­ã¬¥à æ¨ï ä ©«®¢; *  ¢â®¬ â¨ç¥áª ï ­ã¬¥à æ¨ï ä ©«®¢;
*  ¢â®áꥬª . *  ¢â®áꥬª .
„«¨­­ë¥ ¨¬¥­  ä ©«®¢. „«¨­­ë¥ ¨¬¥­  ä ©«®¢.
<20>ਠá®åà ­¥­¨¨ ä ©«®¢ ¯à®£à ¬¬  ¨á¯®«ì§ã¥â 70-î äã­ªæ¨î, á«¥¤®¢ â¥«ì­® <20>ਠá®åà ­¥­¨¨ ä ©«®¢ ¯à®£à ¬¬  ¨á¯®«ì§ã¥â 70-î äã­ªæ¨î, á«¥¤®¢ â¥«ì­®
¨¬¥­  ä ©«®¢ ¬®£ãâ ᮤ¥à¦ âì ¤® 260 ᨬ¢®«®¢. ¨¬¥­  ä ©«®¢ ¬®£ãâ ᮤ¥à¦ âì ¤® 260 ᨬ¢®«®¢.
@ -23,22 +23,22 @@
…᫨ ¢ª«îç¨âì äã­ªæ¨î "‘¢¥à­ãâì ®ª­®", ¯®á«¥ ­ ¦ â¨ï ­  ª­®¯ªã …᫨ ¢ª«îç¨âì äã­ªæ¨î "‘¢¥à­ãâì ®ª­®", ¯®á«¥ ­ ¦ â¨ï ­  ª­®¯ªã
"‘¤¥« âì á­¨¬®ª íªà ­ " á­ ç «  ᢥ୥âáï ®ª­®, ¯®â®¬ ¡ã¤¥â ᤥ« ­ á­¨¬®ª. "‘¤¥« âì á­¨¬®ª íªà ­ " á­ ç «  ᢥ୥âáï ®ª­®, ¯®â®¬ ¡ã¤¥â ᤥ« ­ á­¨¬®ª.
<20>à®á¬®âà á­¨¬ª . <20>à®á¬®âà á­¨¬ª .
…᫨ ¢ª«îç¨âì äã­ªæ¨î "<22>®ª § âì á­¨¬®ª", ¯®á«¥ áꥬª¨ ¡ã¤¥â ¯®ª § ­ …᫨ ¢ª«îç¨âì äã­ªæ¨î "<22>®ª § âì á­¨¬®ª", ¯®á«¥ áꥬª¨ ¡ã¤¥â ¯®ª § ­
⥪ã騩 á­¨¬®ª. …᫨ ­ ¦ âì ­  ª­®¯ªã "<22>®ª § âì á­¨¬®ª ᥩç á", ¡ã¤¥â ⥪ã騩 á­¨¬®ª. …᫨ ­ ¦ âì ­  ª­®¯ªã "<22>®ª § âì á­¨¬®ª ᥩç á", ¡ã¤¥â
¯®ª § ­ ¯®á«¥¤­¨© ᤥ« ­­ë© á­¨¬®ª. —â®¡ë § ªàëâì ¯à®á¬®âà, ­ ¤® ¯®ª § ­ ¯®á«¥¤­¨© ᤥ« ­­ë© á­¨¬®ª. —â®¡ë § ªàëâì ¯à®á¬®âà, ­ ¤®
­ ¦ âì «î¡ãî ª« ¢¨èã. ­ ¦ âì «î¡ãî ª« ¢¨èã.
‡ ¤¥à¦ª . ‡ ¤¥à¦ª .
…᫨ ¢ª«îç¨âì äã­ªæ¨î "‡ ¤¥à¦ª ", ¯¥à¥¤ áꥬª®© ¡ã¤¥â § ¤¥à¦ª , à ¢­ ï …᫨ ¢ª«îç¨âì äã­ªæ¨î "‡ ¤¥à¦ª ", ¯¥à¥¤ áꥬª®© ¡ã¤¥â § ¤¥à¦ª , à ¢­ ï
¢¢¥¤¥­­®¬ã ç¨á«ã. …᫨ ç¨á«® ­¥ ¢¢¥¤¥­®, § ¤¥à¦ª  ¡ã¤¥â áç¨â âìáï à ¢­®© ¢¢¥¤¥­­®¬ã ç¨á«ã. …᫨ ç¨á«® ­¥ ¢¢¥¤¥­®, § ¤¥à¦ª  ¡ã¤¥â áç¨â âìáï à ¢­®©
­ã«î. 1 = 1/100 ᥪ㭤ë, 100 = 1 ᥪ㭤 , 1000 = 10 ᥪ㭤. ­ã«î. 1 = 1/100 ᥪ㭤ë, 100 = 1 ᥪ㭤 , 1000 = 10 ᥪ㭤.
€¢â®á®åà ­¥­¨¥. €¢â®á®åà ­¥­¨¥.
…᫨ ¢ª«îç¨âì äã­ªæ¨î  ¢â®á®åà ­¥­¨¥, áࠧ㠯®á«¥ áꥬª¨ ä ©« á®åà ­¨âáï …á«¨ ¢ª«îç¨âì äã­ªæ¨î  ¢â®á®åà ­¥­¨¥, áࠧ㠯®á«¥ áꥬª¨ ä ©« á®åà ­¨âáï
­  ¦¥á⪨© ¤¨áª. ­  ¦¥á⪨© ¤¨áª.
€¢â®­ã¬¥à æ¨ï. €¢â®­ã¬¥à æ¨ï.
…᫨ ¢ª«îç¨âì äã­ªæ¨î "€¢â®­ã¬¥à æ¨ï" ¢¬¥áâ® "*" ¢ ¨¬¥­¨ ä ©«  ¡ã¤¥â …᫨ ¢ª«îç¨âì äã­ªæ¨î "€¢â®­ã¬¥à æ¨ï" ¢¬¥áâ® "*" ¢ ¨¬¥­¨ ä ©«  ¡ã¤¥â
¢áâ ¢«¥­ ⥪ã騩 ­®¬¥à á­¨¬ª , ¯à¨ í⮬ ­¥®¡å®¤¨¬® § ¤ âì ª®«¨ç¥á⢮ ¢áâ ¢«¥­ ⥪ã騩 ­®¬¥à á­¨¬ª , ¯à¨ í⮬ ­¥®¡å®¤¨¬® § ¤ âì ª®«¨ç¥á⢮
§­ ª®¢ ¢ ­®¬¥à¥. …᫨ ­¥ § ¤ âì ­ ç «ì­ë© ­®¬¥à, ®­ ¡ã¤¥â áç¨â âìáï §­ ª®¢ ¢ ­®¬¥à¥. …᫨ ­¥ § ¤ âì ­ ç «ì­ë© ­®¬¥à, ®­ ¡ã¤¥â áç¨â âìáï
@ -49,7 +49,7 @@
…᫨ äã­ªæ¨ï "€¢â®­ã¬¥à æ¨ï ­¥ ¡ã¤¥â ¢ª«î祭 , §­ ç®ª "*" …᫨ äã­ªæ¨ï "€¢â®­ã¬¥à æ¨ï ­¥ ¡ã¤¥â ¢ª«î祭 , §­ ç®ª "*"
¨£­®à¨àã¥âáï. ¨£­®à¨àã¥âáï.
€¢â®áꥬª . €¢â®áꥬª .
—â®¡ë ­ ç âì  ¢â®áꥬªã, ­¥®¡å®¤¨¬®: —â®¡ë ­ ç âì  ¢â®áꥬªã, ­¥®¡å®¤¨¬®:
1) ¢¢¥á⨠¯®«­ë© ¯ãâì ª ä ©«ã, £¤¥ ¢¬¥áâ® "*" ¡ã¤¥â ¢áâ ¢«ïâìáï ­®¬¥à 1) ¢¢¥á⨠¯®«­ë© ¯ãâì ª ä ©«ã, £¤¥ ¢¬¥áâ® "*" ¡ã¤¥â ¢áâ ¢«ïâìáï ­®¬¥à
ª ¤à ; ª ¤à ;
@ -60,5 +60,5 @@
6) ­ ¦ âì ª­®¯ªã "<22> ç âì  ¢â®áꥬªã". 6) ­ ¦ âì ª­®¯ªã "<22> ç âì  ¢â®áꥬªã".
„«ï ®áâ ­®¢ª¨  ¢â®áꥬª¨ ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã "Žáâ ­®¢¨âì  ¢â®áꥬªã". „«ï ®áâ ­®¢ª¨  ¢â®áꥬª¨ ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã "Žáâ ­®¢¨âì  ¢â®áꥬªã".
ƒ®àï稥 ª« ¢¨è¨: ƒ®àï稥 ª« ¢¨è¨:
PrintScrn - ᤥ« âì á­¨¬®ª íªà ­  (£«®¡ «ì­ ï). PrintScrn - ᤥ« âì á­¨¬®ª íªà ­  (£«®¡ «ì­ ï).

View File

@ -45,6 +45,21 @@ pusha
jmp .next jmp .next
.str_end: .str_end:
; ‚ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â ­ã¦­® ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥,
; ç⮡ë á«¥¤ãîé ï ¡ë«  ¢ëà ¢­¥­  ­  4 ¡ ©â .
; <EFBFBD>¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi.
xor edx,edx
movzx eax,word [scr_buf.width] ; eax = è¨à¨­  ª à⨭ª¨
lea eax,[eax*3] ; eax = ¡ ©â ­  áâப㠪 à⨭ª¨
movr ebx,4 ; ebx = 4
mov edi,ebx ; edi = 4
div ebx ; eax = ¡ ©â ­  áâப㠪 à⨭ª¨ div 4 edx = ¡ ©â... mod 4
sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â
test edx,edx
jnz @f
xor edi,edi
@@:
; ¢ë¤¥«ï¥¬ ¯ ¬ïâì ; ¢ë¤¥«ï¥¬ ¯ ¬ïâì
mov ecx,[scr_buf.end_ptr] mov ecx,[scr_buf.end_ptr]
mov [sf_buf.bmp_header],ecx mov [sf_buf.bmp_header],ecx
@ -52,8 +67,10 @@ pusha
mov [sf_buf.bmp_area],ecx mov [sf_buf.bmp_area],ecx
movsx ebx,word [scr_buf.width] movsx ebx,word [scr_buf.width]
movsx edx,word [scr_buf.height] movsx edx,word [scr_buf.height]
imul ebx,edx ;imul ebx,edx
lea ebx,[ebx*3] lea ebx,[ebx*3]
add ebx,edi
imul ebx,edx
add ecx,ebx add ecx,ebx
mov [sf_buf.end],ecx mov [sf_buf.end],ecx
add ecx,4096 add ecx,4096
@ -62,6 +79,7 @@ pusha
movr eax,64 movr eax,64
int 0x40 int 0x40
push edi
; § ¯®«­ï¥¬ áâàãªâãàã ¤«ï á®åà ­¥­¨ï ä ©«  ; § ¯®«­ï¥¬ áâàãªâãàã ¤«ï á®åà ­¥­¨ï ä ©« 
mov edi,fs_struc mov edi,fs_struc
mov [edi],dword 2 mov [edi],dword 2
@ -82,37 +100,58 @@ pusha
add ebx,0x36 add ebx,0x36
mov [edi+2],ebx ; à §¬¥à ä ©«  mov [edi+2],ebx ; à §¬¥à ä ©« 
mov [edi+14],dword 0x28 mov [edi+14],dword 0x28
movsx eax,word [scr_buf.width] movzx eax,word [scr_buf.width]
mov [edi+18],eax ; £®à¨§®­â «ì­ë© à §¬¥à mov [edi+18],eax ; £®à¨§®­â «ì­ë© à §¬¥à
movsx eax,word [scr_buf.height] movzx eax,word [scr_buf.height]
mov [edi+22],eax ; ¢¥à⨪«ì­ë© à §¬¥à mov [edi+22],eax ; ¢¥à⨪«ì­ë© à §¬¥à
mov [edi+26],word 1 mov [edi+26],word 1
mov [edi+28],word 24 mov [edi+28],word 24
; ª®¯¨à㥬 ¨ ¯¥à¥¢®à ç¨¢ ¥¬ ; ª®¯¨à㥬 ¨ ¯¥à¥¢®à ç¨¢ ¥¬
mov esi,[scr_buf.ptr] ; mov esi,[scr_buf.ptr]
mov edi,[sf_buf.bmp_area] ; mov edi,[sf_buf.bmp_area]
mov edx,[sf_buf.end] ; mov edx,[sf_buf.end]
sub edx,edi ; sub edx,edi
movsx ecx,word [scr_buf.height] ; movsx ecx,word [scr_buf.height]
.next_str: ;.next_str:
push ecx ;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
movsx ecx,word [scr_buf.width] mov esi,[scr_buf.end_ptr]
lea ecx,[ecx*3] mov edi,[sf_buf.bmp_area]
mov ebx,ecx movzx ecx,word [scr_buf.height]
.next_byte: movzx ebx,word [scr_buf.width]
mov ah,[esi+ebx] lea ebx,[ebx*3]
mov [edi+edx],ah add edi,ebx
dec ebx .next_str:
mov edx,ebx
.next_pixel:
mov ah,[esi]
mov [edi],ah
dec esi
dec edi
dec edx dec edx
loop .next_byte jnz .next_pixel
movsx ecx,word [scr_buf.width] lea edi,[2*ebx+edi]
lea ecx,[ecx*3] add edi,[esp]
add esi,ecx
pop ecx
loop .next_str loop .next_str
pop edi
; á®å࠭塞 ; á®å࠭塞
draw_status saving draw_status saving
mov eax,70 mov eax,70
@ -126,6 +165,7 @@ pop ecx
call draw_number call draw_number
draw_status saved_ok draw_status saved_ok
popa popa
ret ret

View File

@ -1,5 +1,6 @@
; €¢â®à ¯à®£à ¬¬ë …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32) ; €¢â®à ¯à®£à ¬¬ë …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32)
; „ â  ¯®á«¥¤­¥£® ¨§¬¥­¥­¨ï: 20.07.06 18:05 ; 01.02.07 - ®¡­®¢«ñ­ editbox
; 31.01.07 - ¢áñ ⥯¥àì à¨áã¥âáï ®â­®á¨â¥«ì­® ª«¨¥­â᪮© ®¡« áâ¨
macro draw_status text_ptr macro draw_status text_ptr
{ {
mov [status.text],dword text_ptr mov [status.text],dword text_ptr
@ -7,20 +8,21 @@ macro draw_status text_ptr
} }
title equ 'Maxxxx32 Screenshooter v 0.78' ; ‡ £®«®¢®ª ®ª­  title equ 'Screenshooter v 0.9' ; ‡ £®«®¢®ª ®ª­ 
include 'lang.inc'
include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë
meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë
include 'scrwin.inc' ; ¢áâ ¢«ï¥¬ ª®¤ ®ª­  ¯à¤¯à®á¬®âà  include 'scrwin.inc' ; ¢áâ ¢«ï¥¬ ª®¤ ®ª­  ¯à¤¯à®á¬®âà 
include 'scrsavef.inc'; ¢áâ ¢«ï¥¬ ¯à®æ¥¤ãàã á®åà ­¥­¨ï ä ©«  include 'scrsavef.inc'; ¢áâ ¢«ï¥¬ ¯à®æ¥¤ãàã á®åà ­¥­¨ï ä ©« 
use_edit_box ; \ use_edit_box ; \
use_txt_button ; | use_txt_button ; |
use_label ; | use_label ; |-- GUI ª®¬¯®­¥­âë ¨ ­¥ª®â®àë¥ ¯à®æ¥¤ãàë
use_gp ; |-- GUI ª®¬¯®­¥­âë ¨ ­¥ª®â®àë¥ ¯à®æ¥¤ãàë
use_check_box ; | use_check_box ; |
use_text_work ; / use_text_work ; /
include 'gp.inc'
include 'srectwin.inc'
;--- ­ ç «® ¯à®£à ¬¬ë --- ;--- ­ ç «® ¯à®£à ¬¬ë ---
app_start app_start
;mov al,[gs:1280*4*1024]
; ãáâ ­ ¢«¨¢ ¥¬ ipc ¡ãää¥à ; ãáâ ­ ¢«¨¢ ¥¬ ipc ¡ãää¥à
push 60 push 60
pop eax pop eax
@ -106,6 +108,15 @@ ipc:
p_close: p_close:
btr dword [flags],1 btr dword [flags],1
bt dword [flags],3
jnc @f
movr eax,18
mov ebx,eax
mov ecx,[set_rect_window_pid]
int 0x40
@@:
close: close:
app_close app_close
@ -114,27 +125,17 @@ close:
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
draw_window: draw_window:
start_draw_window ; ­ ç «® ¯¥à¥à¨á®¢ª¨ start_draw_window ; ­ ç «® ¯¥à¥à¨á®¢ª¨
xor eax,eax ; ®¯à¥¤¥«ï¥¬ ®ª­® ; ®¯à¥¤¥«ï¥¬ ®ª­®
get_skin_height
mov ebx,100*65536+320 mov ebx,100*65536+320
mov ecx,100*65536+240 mov ecx,100*65536+220
add cx,ax
mov edx,[sc.work] mov edx,[sc.work]
add edx,0x03000000 add edx,0x33000000;0x33000000
xor esi,esi xor esi,esi
xor edi,edi ;xor edi,edi
int 0x40 mov edi,grab_text
xor eax,eax
get_scin_height ; ¯®«ãç ¥¬ ¢ëá®âã § £®«®¢ª  ®ª­  ¨ à áç¨â뢠¥¬
sub ax,4 ; ¯®«®¦¥­¨¥ ⥪áâ  § £®«®¢ª 
shr ax,1
mov bx,10
shl ebx,16
mov bx,ax
mov eax,4 ; à¨á㥬 ⥪áâ § £®®«®¢ª 
mov ecx,[sc.grab_text]
bts ecx,28
mov edx,grab_text
mov esi,grab_text_end-grab_text
int 0x40 int 0x40
movr eax,47 ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­® movr eax,47 ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
@ -193,7 +194,13 @@ shoot:
mov edi,[scr_buf.ptr] mov edi,[scr_buf.ptr]
call copy_screen_to_image call copy_screen_to_image
bt dword [use_rect.flags],1
jc .use_rect
push dword [scr] push dword [scr]
jmp @f
.use_rect:
push dword [rect.height]
@@:
pop dword [scr_buf.size] pop dword [scr_buf.size]
bt dword [ch5.flags],1 ; ¢ª«î祭® «¨  ¢â®á®åà ­¥­¨¥ ? bt dword [ch5.flags],1 ; ¢ª«î祭® «¨  ¢â®á®åà ­¥­¨¥ ?
@ -220,10 +227,19 @@ shoot:
@@: @@:
ret ret
;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï á­¨¬ª  ---
get_mem_for_shoot: get_mem_for_shoot:
mov [scr_buf.ptr],dword __app_end mov [scr_buf.ptr],dword __app_end
movsx ecx, word [scr.width] bt dword [use_rect.flags],1 ; ä®âª âì ®¡« áâì íªà ­ 
movsx ebx, word [scr.height] jc .use_area
movzx ecx, word [scr.width]
movzx ebx, word [scr.height]
jmp @f
.use_area:
call read_rect
movzx ecx, word [rect.width]
movzx ebx, word [rect.height]
@@:
imul ecx,ebx imul ecx,ebx
lea ecx,[ecx*3] lea ecx,[ecx*3]
add ecx,__app_end add ecx,__app_end
@ -263,7 +279,7 @@ draw_number:
call zstr_to_int call zstr_to_int
mov [sign_n],al mov [sign_n],al
movr eax,13 movr eax,13
mov ebx,140*65536+96 mov ebx,150*65536+96
mov cx,[label9.top] mov cx,[label9.top]
shl ecx,16 shl ecx,16
mov cx,10 mov cx,10
@ -273,7 +289,7 @@ draw_number:
movsx bx,byte [sign_n] movsx bx,byte [sign_n]
shl ebx,16 shl ebx,16
mov ecx,[cur_number] mov ecx,[cur_number]
mov dx,140 mov dx,150
shl edx,16 shl edx,16
mov dx,[label9.top] mov dx,[label9.top]
mov esi,[sc.work_text] mov esi,[sc.work_text]
@ -319,14 +335,14 @@ autoshoot:
; (¤®«¦­  ¢ë§ë¢ âìáï ¯®â®ª®¬ £« ¢­®£® ®ª­ ) ; (¤®«¦­  ¢ë§ë¢ âìáï ¯®â®ª®¬ £« ¢­®£® ®ª­ )
dr_st: dr_st:
movr eax,38 ; ®â१®ª movr eax,38 ; ®â१®ª
mov ebx,5*65536+315 mov ebx,0*65536+310
mov ecx,222*65536+222 mov ecx,198*65536+198
mov edx,[sc.work_graph] mov edx,[sc.work_graph]
int 0x40 int 0x40
movr eax,13 ; ¯®«®áª  movr eax,13 ; ¯®«®áª 
mov bx,310 mov bx,310
mov ecx,223*65536+12 mov ecx,199*65536+15
mov edx,[sc.work] mov edx,[sc.work]
int 0x40 int 0x40
@ -343,22 +359,24 @@ get_slot_n:
dec ecx dec ecx
int 0x40 int 0x40
mov edx,[app.pid] mov edx,[ebx+30]
xor ecx,ecx xor ecx,ecx
@@: @@:
movr eax,9 movr eax,9
inc ecx inc ecx
int 0x40 int 0x40
cmp [app.pid],edx cmp [ebx+30],edx
je @f je @f
jmp @b jmp @b
@@: @@:
ret ret
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª, ¤¥« î騩 1 á­¨¬®ª ---
one_shoot: one_shoot:
mov ecx,one_shoot_thread mov ecx,one_shoot_thread
mov edx,shoot_esp mov edx,shoot_esp
jmp @f jmp @f
;--- ¯à®æ¥¤à , § ¯ã᪠îé ï ¯®â®ª, á®åà ­ïî騩 á­¨¬®ª ---
save_shoot: save_shoot:
mov ecx,save_shoot_thread mov ecx,save_shoot_thread
mov edx,shoot_esp mov edx,shoot_esp
@ -376,6 +394,7 @@ save_shoot:
.running: .running:
ret ret
;--- ¯®â®ª, ¤¥« î騩 1 á­¨¬®ª ---
one_shoot_thread: one_shoot_thread:
mov ecx,[slot_n] mov ecx,[slot_n]
activ_window activ_window
@ -392,6 +411,8 @@ one_shoot_thread:
btr dword [flags],2 btr dword [flags],2
jmp close jmp close
;--- ¯à®æ¥¤ãà , ®â¯à ¢«ïîé ï £« ¢­®¬ã ®ª­ã á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥
; áâப¨ á®áâ®ï­¨ï ---
send_draw_status: send_draw_status:
movr eax,60 movr eax,60
movr ebx,2 movr ebx,2
@ -401,6 +422,7 @@ send_draw_status:
int 0x40 int 0x40
ret ret
;--- ¯®â®ª, á®åà ­ï ä ©« ---
save_shoot_thread: save_shoot_thread:
mov ecx,[slot_n] mov ecx,[slot_n]
activ_window activ_window
@ -408,6 +430,40 @@ save_shoot_thread:
btr dword [flags],2 btr dword [flags],2
jmp close jmp close
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª ®ª­  ãáâ ­®¢ª¨ ®¡« á⨠áꥬª¨ ---
show_set_rect_window:
bts dword [flags],3
jc @f
movr eax,51
xor ebx,ebx
inc ebx
mov ecx,set_rect_window
mov edx,set_rect_window_esp
int 0x40
mov [set_rect_window_pid],eax
ret
@@:
movr eax,18
mov ebx,eax
mov ecx,[set_rect_window_pid]
int 0x40
btr dword [flags],3
ret
;--- ¯®«ã祭¨¥ ¨­ä®à¬ æ¨¨ ®¡  ªâ¨¢­®¬ ®ª­¥ ---
get_active_window_info:
movr eax,18
movr ebx,7
int 0x40
mov ecx,eax
movr eax,9
mov ebx,active_app
int 0x40
ret
;==================================================================== ;====================================================================
;=== ¤ ­­ë¥ ¯à®£à ¬¬ë =============================================== ;=== ¤ ­­ë¥ ¯à®£à ¬¬ë ===============================================
;==================================================================== ;====================================================================
@ -418,77 +474,81 @@ messages:
grab_text: grab_text:
db title db title,0
grab_text_end:
labels: labels:
label1 label 10,30,0,text.1 ; ¢ëá®â  íªà ­  label1 label 5,5,0,text.1 ; è¨à¨­  íªà ­ 
label2 label 10,40,0,text.2 ; è¨à¨­  íªà ­  label2 label 5,15,0,text.2 ; ¢ëá®â  íªà ­ 
label3 label 10,50,0,text.3 ; ¢¢¥¤¨â¥ ¨¬ï ä ©«  label3 label 5,25,0,text.3 ; ¢¢¥¤¨â¥ ¨¬ï ä ©« 
label4 label 150,30,0,text.4 ; ¡¨â ­  ¯¨ªá¥«ì label4 label 150,5,0,text.4 ; ¡¨â ­  ¯¨ªá¥«ì
label5 label 150,40,0,text.5 ; ¡ ©â ­  áâபã label5 label 150,15,0,text.5 ; ¡ ©â ­  áâபã
label6 label 120,163,0,text.6 label6 label 115,138,0,text.6 ; 100 = 1 ᥪ.
;label7 label 10,190,0,text.7 ;label7 label 10,190,0,text.7
;label8 label 10,225,0,text.8 ;label8 label 10,225,0,text.8
label9 label 10,78,0,text.9 ; ⥪ã騩 label9 label 5,52,0,text.9 ; ­®¬¥à ⥪ã饣® ᨬª 
label10 label 10,210,0,text.10 label10 label 5,185,0,text.10
status label 10,226,0,no_shoot status label 5,201,0,no_shoot
labels_end: labels_end:
editboxes: editboxes:
edit1 edit_box 300,10,60,cl_white,0,0,0,1024,ed_buffer.1,ed_focus edit1 edit_box 300,5,35,cl_white,0,0,0,1024,ed_buffer.1,ed_focus ; ¯ãâì ª ä ©«ã
edit2 edit_box 35,80,159,cl_white,0,0,0,9,ed_buffer.2,ed_figure_only edit2 edit_box 35,75,134,cl_white,0,0,0,9,ed_buffer.2,ed_figure_only ; § ¤¥à¦ª 
edit3 edit_box 35,170,189,cl_white,0,0,0,9,ed_buffer.3,ed_figure_only edit3 edit_box 35,165,164,cl_white,0,0,0,9,ed_buffer.3,ed_figure_only
edit4 edit_box 16,170,206,cl_white,0,0,0,1,sign_n_input,ed_figure_only,1 edit4 edit_box 16,165,181,cl_white,0,0,0,1,sign_n_input,ed_figure_only,1
editboxes_end: editboxes_end:
buttons: buttons:
but1 txt_button 150,10,15,90,2,0,0,but_text.1,one_shoot but1 txt_button 150,5,15,65,2,0,0,but_text.1,one_shoot ; ᤥ« âì á­¨¬®ª
but2 txt_button 145,165,15,90,3,0,0,but_text.2,save_shoot but2 txt_button 145,160,15,65,3,0,0,but_text.2,save_shoot ; á®åà ­¨âì á­¨¬®ª
but3 txt_button 140,120,12,145,4,0,0,but_text.3,show_scr_window but3 txt_button 140,115,12,120,4,0,0,but_text.3,show_scr_window ; ¯®ª § âì á­¨¬®ª
but4 txt_button 80,210,15,188,5,0,0,but_text.4,apply_number but4 txt_button 80,205,15,163,5,0,0,but_text.4,apply_number ; ¯à¨¬¥­¨âì ­®¬¥à
but5 txt_button 150,10,15,110,6,0,0,but_text.5,start_autoshoot but5 txt_button 150,5,15,85,6,0,0,but_text.5,start_autoshoot ; ­ ç âì  ¢â®áêñ¬ªã
but6 txt_button 145,165,15,110,7,0,0,but_text.6,stop_autoshoot but6 txt_button 145,160,15,85,7,0,0,but_text.6,stop_autoshoot ; ®áâ ­®¢¨âì  ¢â®áêñ¬ªã
but7 txt_button 40,205,10,150,8,0,0,but_text.7,show_set_rect_window ; § ¤ âì ®¡« áâì
buttons_end: buttons_end:
check_boxes: check_boxes:
ch1 check_box 10,130,cl_white,0,0,ch_text.1,(ch_text.2-ch_text.1) ch1 check_box 5,105,cl_white,0,0,ch_text.1,(ch_text.2-ch_text.1) ; ᢥà­ãâì ®ª­®
ch2 check_box 10,145,cl_white,0,0,ch_text.2,(ch_text.3-ch_text.2) ch2 check_box 5,120,cl_white,0,0,ch_text.2,(ch_text.3-ch_text.2) ; § â¥¬ ᤥ« âì  ªâ¨¢­ë¬
ch3 check_box 150,130,cl_white,0,0,ch_text.3,(ch_text.4-ch_text.3) ch3 check_box 145,105,cl_white,0,0,ch_text.3,(ch_text.4-ch_text.3) ; ¯®ª § âì á­¨¬®ª
ch4 check_box 10,160,cl_white,0,0,ch_text.4,(ch_text.5-ch_text.4) ch4 check_box 5,135,cl_white,0,0,ch_text.4,(ch_text.5-ch_text.4) ;
ch5 check_box 10,175,cl_white,0,0,ch_text.5,(ch_text.6-ch_text.5) ch5 check_box 5,150,cl_white,0,0,ch_text.5,(ch_text.6-ch_text.5)
ch6 check_box 10,190,cl_white,0,0,ch_text.6,(ch_text.7-ch_text.6) 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) ; ¨á¯. ®¡« áâì
;  ¢â®­ã¬¥à æ¨ï ;  ¢â®­ã¬¥à æ¨ï
check_boxes_end: check_boxes_end:
if lang eq ru if lang eq ru
text: text:
.2: db '‚ëá®â  íªà ­ :',0 .2 db '‚ëá®â  íªà ­ :',0
.1: db '˜¨à¨­  íªà ­ :',0 .1 db '˜¨à¨­  íªà ­ :',0
.3: db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã:',0 .3 db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã:',0
.4: db '<27>¨â ­  ¯¨ªá¥«ì:',0 .4 db '<27>¨â ­  ¯¨ªá¥«ì:',0
.5: db '<27> ©â ­  áâபã:',0 .5 db '<27> ©â ­  áâபã:',0
.6: db '100 = 1 ᥪ㭤 ',0 .6 db '100 = 1 ᥪ㭤 ',0
;.7: db '‚¢¥¤¨â¥ ¨¬ï ä ©« :',0 ;.7: db '‚¢¥¤¨â¥ ¨¬ï ä ©« :',0
;.8: db '‚¬¥áâ® "*" ¢ ¨¬¥­¨ ä ©«  ¡ã¤¥â ¢áâ ¢«ïâìáï ­®¬¥à.',0 ;.8: db '‚¬¥áâ® "*" ¢ ¨¬¥­¨ ä ©«  ¡ã¤¥â ¢áâ ¢«ïâìáï ­®¬¥à.',0
.9: db '’¥ªã騩 ­®¬¥à á­¨¬ª :',0 .9 db '<27>®¬¥à ⥪ã饣® á­¨¬ª :',0
.10: db 'Š®«¨ç¥á⢮ §­ ª®¢ ¢ ­®¬¥à¥:',0 .10 db 'Š®«¨ç¥á⢮ §­ ª®¢ ¢ ­®¬¥à¥:',0
but_text: but_text:
.1: db '‘¤¥« âì á­¨¬®ª íªà ­ ',0 .1 db '‘¤¥« âì á­¨¬®ª íªà ­ ',0
.2: db '‘®åà ­¨âì á­¨¬®ª íªà ­ ',0 .2 db '‘®åà ­¨âì á­¨¬®ª íªà ­ ',0
.3: db '<27>®ª § âì á­¨¬®ª ᥩç á',0 .3 db '<27>®ª § âì á­¨¬®ª ᥩç á',0
.4: db '<27>ਬ¥­¨âì',0 .4 db '<27>ਬ¥­¨âì',0
.5: db '<27> ç âì  ¢â®áꥬªã',0 .5 db '<27> ç âì  ¢â®áꥬªã',0
.6: db 'Žáâ ­®¢¨âì  ¢â®áꥬªã',0 .6 db 'Žáâ ­®¢¨âì  ¢â®áꥬªã',0
.7 db '§ ¤ âì',0
ch_text: ch_text:
.1 db '‘¢¥à­ãâì ®ª­®';,0 .1 db '‘¢¥à­ãâì ®ª­®';,0
.2 db '<27>®ª § âì á­¨¬®ª';,0 .2 db '<27>®ª § âì á­¨¬®ª';,0
.3 db '§ â¥¬ ᤥ« âì  ªâ¨¢­ë¬';,0 .3 db '§ â¥¬ ᤥ« âì  ªâ¨¢­ë¬';,0
.4: db '‡ ¤¥à¦ª :';,0 .4 db '‡ ¤¥à¦ª :';,0
.5: db '€¢â®á®åà ­¥­¨¥';,0 .5 db '€¢â®á®åà ­¥­¨¥';,0
.6: db '€¢â®­ã¬¥à æ¨ï, ­ ç¨­ ï á';,0 .6 db '€¢â®­ã¬¥à æ¨ï, ­ ç¨­ ï á';,0
.7: .7 db 'Ž¡« áâì'
.8:
no_shoot db '‘­¨¬®ª ­¥ ᤥ« ­',0 no_shoot db '‘­¨¬®ª ­¥ ᤥ« ­',0
shooting db '”®â®£à ä¨à®¢ ­¨¥...',0 shooting db '”®â®£à ä¨à®¢ ­¨¥...',0
@ -503,6 +563,7 @@ ac_den db '
device_er db 'Žè¨¡ª  ãáâனá⢠',0 device_er db 'Žè¨¡ª  ãáâனá⢠',0
not_shooted db '‘¤¥« ©â¥ á­¨¬®ª !!!',0 not_shooted db '‘¤¥« ©â¥ á­¨¬®ª !!!',0
no_file_name db '‚¢¥¤¨â¥ ¨¬ï ä ©«  !!!',0 no_file_name db '‚¢¥¤¨â¥ ¨¬ï ä ©«  !!!',0
invalid_rect db '<27>¥¤®¯ãáâ¨¬ë¥ à §¬¥àë ®¡« áâ¨',0
end if end if
sign_n_input: sign_n_input:
@ -538,6 +599,15 @@ sf_buf:
.bmp_area dd ? .bmp_area dd ?
.end dd ? .end dd ?
set_rect_window_pid dd ?
set_rect_window_slot dd ?
rect_input_buffer:
.left rb 6
.top rb 6
.width rb 6
.height rb 6
cmdstr rb 257 cmdstr rb 257
ed_buffer: ed_buffer:
@ -549,7 +619,17 @@ file_name:
rb 1058 rb 1058
scr screen_prop scr screen_prop
rect:
.left dw ?
.top dw ?
.height dw ?
.width dw ?
sc sys_color_table sc sys_color_table
app procinfo app procinfo ; ¨­ä®à¬ æ¨ï ® £« ¢­®¬ ®ª­¥
shoot_esp rb 512 active_app procinfo ; ¨­ä®à¬ æ¨ï ®¡  ªâ¨¢­®¬ ®ª­¥
set_rect_window_procinfo procinfo ; ¨­ä®à¬ æ¨ï ®¡ ®ª­¥ ®¡« áâ¨
shoot_esp rb 512 ; á⥪ ¯®â®ª  ä®âª ­ìï
set_rect_window_esp rb 512 ; á⥪ ®ª­  ®¡« áâ¨
app_end ; ª®­¥æ ¯à®£à ¬¬ë app_end ; ª®­¥æ ¯à®£à ¬¬ë

View File

@ -1,3 +1,6 @@
;====================================================================
;===== 帄崕 彁厔彁帒寧拹€ ===========================================
;====================================================================
scr_window: scr_window:
.start: .start:
.red: .red: