Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 832 → Rev 833

/programs/config.inc
1,0 → 0,0
__CPU_type fix p5
__CPU_type fix p6
/programs/media/scrshoot/macros.inc
3,28 → 3,28
include 'txtbut.inc'
;include 'gp.inc'
include 'label.inc'
;include '..\..\develop\examples\checkbox\trunk\checkbox.inc'
;include '..\..\develop\examples\checkbox\trunk\check.inc'
include 'check.inc'
include 'file_sys.inc'
include 'textwork.inc'
;include 'ini.inc'
 
__CPU_type equ p5
SYSENTER_VAR equ 0
__CPU_type equ p5
SYSENTER_VAR equ 0
 
 
macro movr reg,val
{
if val < 65536
push val
pop reg
push val
pop reg
else
mov reg,val
mov reg,val
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls
local ..ret_point
local ..ret_point
__mov eax,a
__mov ebx,b
__mov ecx,c
33,31 → 33,31
__mov edi,f
 
if __CPU_type eq p5
int 0x40
int 0x40
else
if __CPU_type eq p6
push ebp
mov ebp, esp
push ..ret_point ; it may be 2 or 5 byte
sysenter
push ebp
mov ebp, esp
push ..ret_point ; it may be 2 or 5 byte
sysenter
..ret_point:
pop edx
pop ecx
pop edx
pop ecx
 
else
if __CPU_type eq k6
push ecx
syscall
pop ecx
push ecx
syscall
pop ecx
else
display 'ERROR : unknown CPU type'
int 0x40
display 'ERROR : unknown CPU type'
int 0x40
end if
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
69,24 → 69,24
;--- § £®«®¢®ª ---
macro meos_header par_buf,cur_dir_buf
{
use32
org 0x0
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __app_start
dd __app_end
dd __app_end
dd __app_end
db 'MENUET01'
dd 0x01
dd __app_start
dd __app_end
dd __app_end
dd __app_end
if <par_buf> eq <>
dd 0x0
dd 0x0
else
dd par_buf
dd par_buf
end if
if <cur_dir_buf> eq <>
dd 0x0
dd 0x0
else
dd cur_dir_buf
dd cur_dir_buf
end if
}
 
100,9 → 100,9
macro app_end stack_size
{
if <stack_size> eq <>
rb 1024
rb 1024
else
rb stack_size
rb stack_size
end if
__app_end:
}
110,186 → 110,186
;--- § ¢¥àè¨âì ⥪ã騩 ¯®â®ª ---
macro app_close
{
xor eax,eax
dec eax
int 0x40
xor eax,eax
dec eax
int 0x40
}
 
;--- ¯®«ãç¨âì ª®¤ ­ ¦ â®© ª« ¢¨è¨ ---
macro get_key
{
;mov eax,2
push 2
pop eax
int 0x40
;mov eax,2
push 2
pop eax
int 0x40
}
 
;--- ¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨ ---
macro get_pressed_button
{
;mov eax,17
push 17
pop eax
int 0x40
;mov eax,17
push 17
pop eax
int 0x40
}
 
;--- á®®¡é¨âì á¨á⥬¥ ® ­ ç «¥ ¯¥à¥à¨á®¢ª¨ ®ª­  ---
macro start_draw_window
{
;mov eax,12
push 12
pop eax
xor ebx,ebx
inc ebx
int 0x40
;mov eax,12
push 12
pop eax
xor ebx,ebx
inc ebx
int 0x40
}
 
;--- á®®¡é¨âì á¨á⥬¥ ® § ¢¥à襭¨¨ ¯¥à¥à¨á®¢ª¨ ®ª­  ---
macro stop_draw_window
{
;mov eax,12
push 12
pop eax
;mov ebx,2
push 2
pop ebx
int 0x40
;mov eax,12
push 12
pop eax
;mov ebx,2
push 2
pop ebx
int 0x40
}
 
;--- ãáâ ­®¢¨âì ¬ áªã ®¦¨¤ ¥¬ëå ᮡë⨩ ---
macro set_events_mask mask
{
;mov eax,40
push 40
pop eax
;mov ebx,mask
push mask
pop ebx
int 0x40
;mov eax,40
push 40
pop eax
;mov ebx,mask
push mask
pop ebx
int 0x40
}
 
;--- ¯®«ãç¨âì ¨­ä®à¬ æ¨î ® ¯à®æ¥áᥠ---
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
;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
xor ecx,ecx
dec ecx
else
;mov ecx,slot_num
push slot_num
pop ecx
;mov ecx,slot_num
push slot_num
pop ecx
end if
int 0x40
int 0x40
}
 
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
int 0x40
;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
int 0x40
}
 
macro get_grab_area
{
movr eax,48
movr ebx,7
int 0x40
movr eax,48
movr ebx,7
int 0x40
}
 
macro get_skin_height
{
movr eax,48
movr ebx,4
int 0x40
movr eax,48
movr ebx,4
int 0x40
}
 
macro min_window
{
movr eax,18
movr ebx,10
int 0x40
movr eax,18
movr ebx,10
int 0x40
}
 
macro activ_window slot_n
{
movr eax,18
movr ebx,3
movr eax,18
movr ebx,3
if <slot_n> eq <>
else
movr ecx,slot_n
movr ecx,slot_n
end if
int 0x40
int 0x40
}
 
macro get_active_window
{
movr eax,18
movr ebx,7
int 0x40
movr eax,18
movr ebx,7
int 0x40
}
 
macro delay time
{
movr eax,5
movr eax,5
if <time> eq <>
else
movr ebx,time
movr ebx,time
end if
int 0x40
int 0x40
}
 
;--- ®¦¨¤ âì ᮡëâ¨ï ---
macro wait_event redraw,key,button,mouse,ipc,other
{
movr eax,10
int 0x40
dec ax
movr eax,10
int 0x40
dec ax
if <redraw> eq <>
else
jz redraw
jz redraw
end if
dec ax
dec ax
if <key> eq <>
else
jz key
jz key
end if
dec ax
dec ax
if <button> eq <>
else
jz button
jz button
end if
dec ax
dec ax
dec ax
dec ax
dec ax
dec ax
if <mouse> eq <>
else
jz mouse
jz mouse
end if
if <ipc> eq <>
else
dec ax
jz ipc
dec ax
jz ipc
end if
if <other> eq <>
jmp still
jmp still
else
jmp other
jmp other
end if
}
 
296,38 → 296,38
;--- ¯®«ãç¨âì à §¬¥àë íªà ­  ---
macro get_screen_size
{
movr eax,14
int 0x40
movr eax,14
int 0x40
}
 
macro get_screen_prop struc_ptr
{
movr eax,61
push eax eax
xor ebx,ebx
inc ebx
int 0x40
mov [struc_ptr],eax
pop eax
inc ebx
int 0x40
mov [struc_ptr+4],ax
pop eax
inc ebx
int 0x40
mov [struc_ptr+6],eax
movr eax,61
push eax eax
xor ebx,ebx
inc ebx
int 0x40
mov [struc_ptr],eax
pop eax
inc ebx
int 0x40
mov [struc_ptr+4],ax
pop eax
inc ebx
int 0x40
mov [struc_ptr+6],eax
}
 
macro resize_mem mem_size
{
movr eax,64
xor ebx,ebx
inc ebx
movr eax,64
xor ebx,ebx
inc ebx
if <mem_size> eq <>
else
movr ecx,mem_size
movr ecx,mem_size
end if
int 0x40
int 0x40
}
 
evm_redraw equ 1
362,11 → 362,11
.grab_button: dd ? ;+8
.grab_button_text: dd ? ;+12
.grab_text: dd ? ;+16
.work: dd ? ;+20
.work: dd ? ;+20
.work_button: dd ?;+24
.work_button_text: dd ? ;+28
.work_text: dd ? ;+32
.work_graph: dd ? ;+36
.work_text: dd ? ;+32
.work_graph: dd ? ;+36
}
 
struc screen_size
/programs/media/scrshoot/scrshoot.asm
1,267 → 1,268
; €¢â®à ¯à®£à ¬¬ë …¢â¨å®¢ Œ ªá¨¬ (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
mov [status.text],dword text_ptr
call send_draw_status
}
 
 
title equ 'Screenshooter v 0.9' ; ‡ £®«®¢®ª ®ª­ 
include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë
meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë
meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë
include 'scrwin.inc' ; ¢áâ ¢«ï¥¬ ª®¤ ®ª­  ¯à¤¯à®á¬®âà 
include 'scrsavef.inc'; ¢áâ ¢«ï¥¬ ¯à®æ¥¤ãàã á®åà ­¥­¨ï ä ©« 
use_edit_box structure_of_potock,22,5 ; \
use_txt_button ; |
use_label ; |-- GUI ª®¬¯®­¥­âë ¨ ­¥ª®â®àë¥ ¯à®æ¥¤ãàë
use_check_box ; |
use_text_work ; /
use_edit_box ; \
use_txt_button ; |
use_label ; |-- GUI ª®¬¯®­¥­âë ¨ ­¥ª®â®àë¥ ¯à®æ¥¤ãàë
use_check_box ; |
use_text_work ; /
include 'gp.inc'
include 'srectwin.inc'
include 'lang.inc'
;--- ­ ç «® ¯à®£à ¬¬ë ---
app_start
;mov al,[gs:1280*4*1024]
; ãáâ ­ ¢«¨¢ ¥¬ ipc ¡ãää¥à
push 60
pop eax
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,app_ipc
mov edx,32
int 0x40
app_start
;mov al,[gs:1280*4*1024]
; ãáâ ­ ¢«¨¢ ¥¬ ipc ¡ãää¥à
push 60
pop eax
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,app_ipc
mov edx,32
int 0x40
 
push 66 ; ãáâ ­ ¢«¨¢ ¥¬ £«®¡ «ì­ãî £®àïçãî ª« ¢¨èã
pop eax
push eax
mov ebx,4
mov cl,55 ; 55 - PrintScrn
xor edx,edx
int 0x40
push 66 ; ãáâ ­ ¢«¨¢ ¥¬ £«®¡ «ì­ãî £®àïçãî ª« ¢¨èã
pop eax
push eax
mov ebx,4
mov cl,55 ; 55 - PrintScrn
xor edx,edx
int 0x40
 
mov ebx,app
call get_slot_n
mov [slot_n],ecx
mov ebx,app
call get_slot_n
mov [slot_n],ecx
 
; ãáâ ­ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩
set_events_mask (evm_redraw+evm_key+evm_button+evm_mouse+evm_ipc)
; ãáâ ­ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩
set_events_mask (evm_redraw+evm_key+evm_button+evm_mouse+evm_ipc)
 
; á ¯à룠¥¬ ¯à¨ ª ¦¤®© ¯¥à¥à¨á®¢ª¥
red:
get_procinfo app ; ¯®«ãç ¥¬ ¨­ä®à¬ æ¨î ® ¯à®æ¥áá¥
get_sys_colors sc ; ¯®«ãç ¥¬ á¨á⥬­ë¥ 梥â 
get_procinfo app ; ¯®«ãç ¥¬ ¨­ä®à¬ æ¨î ® ¯à®æ¥áá¥
get_sys_colors sc ; ¯®«ãç ¥¬ á¨á⥬­ë¥ 梥â 
 
; ãáâ ­ ¢«¨¢ ¥¬ á¨á⥬­ë¥ æ¢¥â  ã GUI ª®¬¯®­¥­â®¢
txt_but_set_sys_color buttons,buttons_end,sc ; \
labels_set_sys_color labels,labels_end,sc ; |
check_boxes_set_sys_color check_boxes,check_boxes_end,sc ; |
edit_boxes_set_sys_color editboxes,editboxes_end,sc ; /
; ãáâ ­ ¢«¨¢ ¥¬ á¨á⥬­ë¥ æ¢¥â  ã GUI ª®¬¯®­¥­â®¢
txt_but_set_sys_color buttons,buttons_end,sc ; \
labels_set_sys_color labels,labels_end,sc ; |
check_boxes_set_sys_color check_boxes,check_boxes_end,sc ; |
edit_boxes_set_sys_color editboxes,editboxes_end,sc ; /
 
get_screen_prop scr ; ¯®«ãç ¥¬ ¨­ä®à¬ æ¨î ®¡ íªà ­¥
call draw_window ; ¯¥à¥à¨á®¢ë¢ ¥¬ ®ª­®
get_screen_prop scr ; ¯®«ãç ¥¬ ¨­ä®à¬ æ¨î ®¡ íªà ­¥
call draw_window ; ¯¥à¥à¨á®¢ë¢ ¥¬ ®ª­®
still:
wait_event red,key,button,mouse,ipc,still ; ¦¤¥¬ ᮡë⨩
wait_event red,key,button,mouse,ipc,still ; ¦¤¥¬ ᮡë⨩
 
key:
get_key
cmp al,2
jne @f
cmp ah,55
jne @f
call shoot
jmp still
get_key
cmp al,2
jne @f
cmp ah,55
jne @f
call shoot
jmp still
@@:
key_edit_boxes editboxes,editboxes_end
jmp still
key_edit_boxes editboxes,editboxes_end
jmp still
button:
get_pressed_button
cmp ah,1
je p_close
txt_but_ev buttons,buttons_end
jmp still
get_pressed_button
cmp ah,1
je p_close
txt_but_ev buttons,buttons_end
jmp still
mouse:
get_active_window
cmp eax,[slot_n]
jne still
mouse_check_boxes check_boxes,check_boxes_end
mouse_edit_boxes editboxes,editboxes_end
jmp still
get_active_window
cmp eax,[slot_n]
jne still
mouse_check_boxes check_boxes,check_boxes_end
mouse_edit_boxes editboxes,editboxes_end
jmp still
ipc:
cmp word [app_ipc+8],2
jne @f
min_window
jmp .clear_ipc
cmp word [app_ipc+8],2
jne @f
min_window
jmp .clear_ipc
@@:
 
call draw_number
call dr_st
call draw_number
call dr_st
 
.clear_ipc:
cld
xor eax,eax
movr ecx,32
mov edi,app_ipc
rep stosb
jmp still
cld
xor eax,eax
movr ecx,32
mov edi,app_ipc
rep stosb
jmp still
 
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
bt dword [flags],3
jnc @f
movr eax,18
mov ebx,eax
mov ecx,[set_rect_window_pid]
int 0x40
@@:
 
close:
app_close
app_close
 
;--------------------------------------------------------------------
;--- ¯à®®æ¥¤ãà  ¯¥à¥à¨á®¢ª¨ £« ¢­®£® ®ª­  ---------------------------
;--------------------------------------------------------------------
draw_window:
start_draw_window ; ­ ç «® ¯¥à¥à¨á®¢ª¨
; ®¯à¥¤¥«ï¥¬ ®ª­®
get_skin_height
mov ebx,100*65536+320
mov ecx,100*65536+220
add cx,ax
mov edx,[sc.work]
add edx,0x34000000;0x33000000
xor esi,esi
;xor edi,edi
mov edi,grab_text
xor eax,eax
int 0x40
start_draw_window ; ­ ç «® ¯¥à¥à¨á®¢ª¨
; ®¯à¥¤¥«ï¥¬ ®ª­®
get_skin_height
mov ebx,100*65536+320
mov ecx,100*65536+220
add cx,ax
mov edx,[sc.work]
add edx,0x34000000;0x33000000
xor esi,esi
;xor edi,edi
mov edi,grab_text
xor eax,eax
int 0x40
 
movr eax,47 ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
mov bx,4
shl ebx,16
movsx ecx,word [scr.width] ; è¨à¨­  íªà ­ 
mov dx,95
shl edx,16
mov dx,[label1.top]
push dx
mov esi,[sc.work_text]
int 0x40
movsx ecx,word [scr.height] ; ¢ëá®â  íªà ­ 
mov dx,[label2.top]
int 0x40
mov bx,2
shl ebx,16
movsx ecx,word [scr.bitspp] ; ¡¨â ­  ¯¨ªá¥«ì
mov dx,240
shl edx,16
pop dx
int 0x40
mov bx,6
shl ebx,16
mov ecx,[scr.bytesps] ; ¡ ©â ­  áâபã
mov dx,[label2.top]
int 0x40
movr eax,47 ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
mov bx,4
shl ebx,16
movsx ecx,word [scr.width] ; è¨à¨­  íªà ­ 
mov dx,95
shl edx,16
mov dx,[label1.top]
push dx
mov esi,[sc.work_text]
int 0x40
movsx ecx,word [scr.height] ; ¢ëá®â  íªà ­ 
mov dx,[label2.top]
int 0x40
mov bx,2
shl ebx,16
movsx ecx,word [scr.bitspp] ; ¡¨â ­  ¯¨ªá¥«ì
mov dx,240
shl edx,16
pop dx
int 0x40
mov bx,6
shl ebx,16
mov ecx,[scr.bytesps] ; ¡ ©â ­  áâபã
mov dx,[label2.top]
int 0x40
 
call draw_number ; ¯à®à¨á®¢ë¢ ¥¬ ­®¬¥à á­¨¬ª 
call dr_st
call draw_number ; ¯à®à¨á®¢ë¢ ¥¬ ­®¬¥à á­¨¬ª 
call dr_st
 
draw_labels labels,labels_end ; ¬¥âª¨
draw_edit_boxes editboxes,editboxes_end ; edit_box
draw_txt_buttons buttons,buttons_end ; ª­®¯ª¨
draw_check_boxes check_boxes,check_boxes_end ; ä« ¦ª¨
draw_labels labels,labels_end ; ¬¥âª¨
draw_edit_boxes editboxes,editboxes_end ; edit_box
draw_txt_buttons buttons,buttons_end ; ª­®¯ª¨
draw_check_boxes check_boxes,check_boxes_end ; ä« ¦ª¨
stop_draw_window ; ª®­¥æ ¯¥à¥à¨á®¢ª¨
ret
 
shoot:
bt dword [ch4.flags],1 ; ¢ª«î祭  «¨ § ¤¥à¦ª  ?
jnc @f
draw_status delay_now
mov edi,ed_buffer.2
call zstr_to_int
mov ebx,eax
delay
bt dword [ch4.flags],1 ; ¢ª«î祭  «¨ § ¤¥à¦ª  ?
jnc @f
draw_status delay_now
mov edi,ed_buffer.2
call zstr_to_int
mov ebx,eax
delay
@@:
call get_mem_for_shoot; ¯®«ãç ¥¬ ¯ ¬ïâì ¤«ï á­¨¬ª 
call get_mem_for_shoot; ¯®«ãç ¥¬ ¯ ¬ïâì ¤«ï á­¨¬ª 
 
 
bts dword [flags],0 ; ­ã«¥¢®© ä« £ - á­¨¬®ª ¥áâì ¢ ¯ ¬ïâ¨
bts dword [flags],0 ; ­ã«¥¢®© ä« £ - á­¨¬®ª ¥áâì ¢ ¯ ¬ïâ¨
 
; ¤¥« ¥¬ á­¨¬®ª
draw_status shooting
mov esi,scr
mov edi,[scr_buf.ptr]
call copy_screen_to_image
; ¤¥« ¥¬ á­¨¬®ª
draw_status shooting
mov esi,scr
mov edi,[scr_buf.ptr]
call copy_screen_to_image
 
bt dword [use_rect.flags],1
jc .use_rect
push dword [scr]
jmp @f
bt dword [use_rect.flags],1
jc .use_rect
push dword [scr]
jmp @f
.use_rect:
push dword [rect.height]
push dword [rect.height]
@@:
pop dword [scr_buf.size]
pop dword [scr_buf.size]
 
bt dword [ch5.flags],1 ; ¢ª«î祭® «¨  ¢â®á®åà ­¥­¨¥ ?
jnc @f
call save_file
bt dword [ch5.flags],1 ; ¢ª«î祭® «¨  ¢â®á®åà ­¥­¨¥ ?
jnc @f
call save_file
@@:
draw_status shooted_ok
draw_status shooted_ok
 
bt dword [flags],1
jnc @f
ret
bt dword [flags],1
jnc @f
ret
@@:
 
bt dword [ch2.flags],1 ; ¯®ª § âì ®ª­® ¯à¥¤¯à®á¬®âà  ?
jnc @f
call show_scr_window
bt dword [ch2.flags],1 ; ¯®ª § âì ®ª­® ¯à¥¤¯à®á¬®âà  ?
jnc @f
call show_scr_window
@@:
bt word [ch3.flags],1 ; ¢®ááâ ­®¢¨âì ®ª­® ?
jnc @f
bt word [ch3.flags],1 ; ¢®ááâ ­®¢¨âì ®ª­® ?
jnc @f
 
delay 100
mov ecx,[slot_n]
activ_window
delay 100
mov ecx,[slot_n]
activ_window
@@:
ret
 
;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï á­¨¬ª  ---
get_mem_for_shoot:
mov [scr_buf.ptr],dword __app_end
bt dword [use_rect.flags],1 ; ä®âª âì ®¡« áâì íªà ­ 
jc .use_area
movzx ecx, word [scr.width]
movzx ebx, word [scr.height]
jmp @f
mov [scr_buf.ptr],dword __app_end
bt dword [use_rect.flags],1 ; ä®âª âì ®¡« áâì íªà ­ 
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]
call read_rect
movzx ecx, word [rect.width]
movzx ebx, word [rect.height]
@@:
imul ecx,ebx
lea ecx,[ecx*3]
add ecx,__app_end
mov [scr_buf.end_ptr],ecx
xor ebx,ebx
inc ebx
mov eax,64
int 0x40
imul ecx,ebx
lea ecx,[ecx*3]
add ecx,__app_end
mov [scr_buf.end_ptr],ecx
xor ebx,ebx
inc ebx
mov eax,64
int 0x40
ret
 
;--- ᮤ âì ®ª­® ¯à®¥¤¯à®á¬®âà  ---
show_scr_window:
pusha
bt dword [flags],0
jnc @f
mov eax,51
xor ebx,ebx
inc ebx
movr ecx,scr_window
mov edx,__app_end-1000
int 0x40
bt dword [flags],0
jnc @f
mov eax,51
xor ebx,ebx
inc ebx
movr ecx,scr_window
mov edx,__app_end-1000
int 0x40
@@:
popa
ret
268,87 → 269,87
 
;--- ¯à®ç¨â âì ¨ ­ à¨á®¢ âì ⥪ã騩 ­®¬¥à ---
apply_number:
mov edi,ed_buffer.3
call zstr_to_int
mov [cur_number],eax
call draw_number
mov edi,ed_buffer.3
call zstr_to_int
mov [cur_number],eax
call draw_number
ret
 
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪ã饣® ­®¬¥à  ---
draw_number:
mov edi,sign_n_input
call zstr_to_int
mov [sign_n],al
movr 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
movsx bx,byte [sign_n]
shl ebx,16
mov ecx,[cur_number]
mov dx,150
shl edx,16
mov dx,[label9.top]
mov esi,[sc.work_text]
int 0x40
mov edi,sign_n_input
call zstr_to_int
mov [sign_n],al
movr 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
movsx bx,byte [sign_n]
shl ebx,16
mov ecx,[cur_number]
mov dx,150
shl edx,16
mov dx,[label9.top]
mov esi,[sc.work_text]
int 0x40
ret
 
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª  ¢â®áꥬª¨ ---
start_autoshoot:
bts dword [flags],1
jc @f
movr eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,autoshoot
mov edx,__app_end-512
int 0x40
bts dword [flags],1
jc @f
movr eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,autoshoot
mov edx,__app_end-512
int 0x40
@@:
ret
 
;--- ®áâ ­ ¢«¨¢ ¥â íâ®â ¯®â®ª ---
stop_autoshoot:
btr dword [flags],1
btr dword [flags],1
ret
 
;--- 横« ¯®â®ª   ¢â®áꥬª¨ ---
autoshoot:
mov ecx,[slot_n]
activ_window
mov ecx,[slot_n]
activ_window
.next:
bt dword [flags],1
jnc close
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_number
mov esi,2
int 0x40
call shoot
jmp autoshoot.next
bt dword [flags],1
jnc close
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_number
mov esi,2
int 0x40
call shoot
jmp autoshoot.next
 
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ áâப¨ á®áâ®ï­¨ï ---
; (¤®«¦­  ¢ë§ë¢ âìáï ¯®â®ª®¬ £« ¢­®£® ®ª­ )
dr_st:
movr eax,38 ; ®â१®ª
mov ebx,0*65536+310
mov ecx,198*65536+198
mov edx,[sc.work_graph]
int 0x40
movr eax,38 ; ®â१®ª
mov ebx,0*65536+310
mov ecx,198*65536+198
mov edx,[sc.work_graph]
int 0x40
 
movr eax,13 ; ¯®«®áª 
mov bx,310
mov ecx,199*65536+15
mov edx,[sc.work]
int 0x40
movr eax,13 ; ¯®«®áª 
mov bx,310
mov ecx,199*65536+15
mov edx,[sc.work]
int 0x40
 
mov edi,status
call draw_label
mov edi,status
call draw_label
ret
 
;--- ¯à®æ¥¤ãà  ¯®«ã祭¨ï ­®¬¥à  á«®â  ¯®â®ª  ---
355,114 → 356,114
; ¢å®¤ ebx - ¡ãää¥à 1024 ¡ ©â
; ¢ë室 ecx - ­®¬¥à á«®â 
get_slot_n:
movr eax,9
xor ecx,ecx
dec ecx
int 0x40
movr eax,9
xor ecx,ecx
dec ecx
int 0x40
 
mov edx,[ebx+30]
xor ecx,ecx
mov edx,[ebx+30]
xor ecx,ecx
@@:
movr eax,9
inc ecx
int 0x40
cmp [ebx+30],edx
je @f
jmp @b
movr eax,9
inc ecx
int 0x40
cmp [ebx+30],edx
je @f
jmp @b
@@:
ret
 
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª, ¤¥« î騩 1 á­¨¬®ª ---
one_shoot:
mov ecx,one_shoot_thread
mov edx,shoot_esp
jmp @f
mov ecx,one_shoot_thread
mov edx,shoot_esp
jmp @f
;--- ¯à®æ¥¤à , § ¯ã᪠îé ï ¯®â®ª, á®åà ­ïî騩 á­¨¬®ª ---
save_shoot:
mov ecx,save_shoot_thread
mov edx,shoot_esp
mov ecx,save_shoot_thread
mov edx,shoot_esp
@@:
bts dword [flags],2
jc .running
bt dword [flags],1
jc .running
bts dword [flags],2
jc .running
bt dword [flags],1
jc .running
 
movr eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
int 0x40
movr eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
int 0x40
.running:
ret
 
;--- ¯®â®ª, ¤¥« î騩 1 á­¨¬®ª ---
one_shoot_thread:
mov ecx,[slot_n]
activ_window
bt dword [ch1.flags],1 ; ¬¨­¨¬¨§¨à®¢ âì ®ª­® ?
jnc @f
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.min_window
mov esi,2
int 0x40
mov ecx,[slot_n]
activ_window
bt dword [ch1.flags],1 ; ¬¨­¨¬¨§¨à®¢ âì ®ª­® ?
jnc @f
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.min_window
mov esi,2
int 0x40
@@:
call shoot
btr dword [flags],2
jmp close
call shoot
btr dword [flags],2
jmp close
 
;--- ¯à®æ¥¤ãà , ®â¯à ¢«ïîé ï £« ¢­®¬ã ®ª­ã á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥
; áâப¨ á®áâ®ï­¨ï ---
send_draw_status:
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_status
mov esi,2
int 0x40
movr eax,60
movr ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_status
mov esi,2
int 0x40
ret
 
;--- ¯®â®ª, á®åà ­ï ä ©« ---
save_shoot_thread:
mov ecx,[slot_n]
activ_window
call save_file
btr dword [flags],2
jmp close
mov ecx,[slot_n]
activ_window
call save_file
btr dword [flags],2
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
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
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
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
movr eax,18
movr ebx,7
int 0x40
 
mov ecx,eax
movr eax,9
mov ebx,active_app
int 0x40
mov ecx,eax
movr eax,9
mov ebx,active_app
int 0x40
ret
 
;====================================================================
475,7 → 476,7
 
 
grab_text:
db title,0
db title,0
 
labels:
label1 label 5,5,0,text.1 ; è¨à¨­  íªà ­ 
492,19 → 493,19
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 ; § ¤¥à¦ª 
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
edit4 edit_box 16,165,181,cl_white,0xaabbcc,0,0,0,1,sign_n_input,ed_figure_only,1
editboxes_end:
 
buttons:
but1 txt_button 150,5,15,65,2,0,0,but_text.1,one_shoot ; ᤥ« âì á­¨¬®ª
but2 txt_button 145,160,15,65,3,0,0,but_text.2,save_shoot ; á®åà ­¨âì á­¨¬®ª
but1 txt_button 150,5,15,65,2,0,0,but_text.1,one_shoot ; ᤥ« âì á­¨¬®ª
but2 txt_button 145,160,15,65,3,0,0,but_text.2,save_shoot ; á®åà ­¨âì á­¨¬®ª
but3 txt_button 140,115,12,120,4,0,0,but_text.3,show_scr_window ; ¯®ª § âì á­¨¬®ª
but4 txt_button 80,205,15,163,5,0,0,but_text.4,apply_number ; ¯à¨¬¥­¨âì ­®¬¥à
but5 txt_button 150,5,15,85,6,0,0,but_text.5,start_autoshoot ; ­ ç âì  ¢â®áêñ¬ªã
but6 txt_button 145,160,15,85,7,0,0,but_text.6,stop_autoshoot ; ®áâ ­®¢¨âì  ¢â®áêñ¬ªã
but4 txt_button 80,205,15,163,5,0,0,but_text.4,apply_number ; ¯à¨¬¥­¨âì ­®¬¥à
but5 txt_button 150,5,15,85,6,0,0,but_text.5,start_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:
 
616,7 → 617,7
end if
 
sign_n_input:
db '2',0
db '2',0
 
app_ipc ipc_buffer 32
 
624,33 → 625,33
structure_of_potock:
rb 100
 
cur_number dd ?
cur_number dd ?
 
sign_n db ?
sign_n db ?
 
slot_n dd ?
slot_n dd ?
 
flags dd ?
flags dd ?
 
scr_buf:
.ptr dd ?
.end_ptr dd ?
.ptr dd ?
.end_ptr dd ?
.size:
.height dw ?
.width dw ?
.width dw ?
 
fs_struc:
.funk_n dd ?
dd ?
dd ?
.bytes_to_write dd ?
.data_ptr dd ?,?
dd ?
dd ?
.bytes_to_write dd ?
.data_ptr dd ?,?
.fn_ptr dd ?
 
sf_buf:
.bmp_header dd ?
.bmp_area dd ?
.end dd ?
.end dd ?
 
set_rect_window_pid dd ?
set_rect_window_slot dd ?
658,7 → 659,7
rect_input_buffer:
.left rb 6
.top rb 6
.width rb 6
.width rb 6
.height rb 6
 
cmdstr rb 257
669,7 → 670,7
.3: rb 10
 
file_name:
rb 1058
rb 1058
 
scr screen_prop
rect:
680,9 → 681,9
 
 
sc sys_color_table
app procinfo ; ¨­ä®à¬ æ¨ï ® £« ¢­®¬ ®ª­¥
app procinfo ; ¨­ä®à¬ æ¨ï ® £« ¢­®¬ ®ª­¥
active_app procinfo ; ¨­ä®à¬ æ¨ï ®¡  ªâ¨¢­®¬ ®ª­¥
set_rect_window_procinfo procinfo ; ¨­ä®à¬ æ¨ï ®¡ ®ª­¥ ®¡« áâ¨
shoot_esp rb 512 ; á⥪ ¯®â®ª  ä®âª ­ìï
set_rect_window_esp rb 512 ; á⥪ ®ª­  ®¡« áâ¨
app_end ; ª®­¥æ ¯à®£à ¬¬ë
shoot_esp rb 512 ; á⥪ ¯®â®ª  ä®âª ­ìï
set_rect_window_esp rb 512 ; á⥪ ®ª­  ®¡« áâ¨
app_end ; ª®­¥æ ¯à®£à ¬¬ë
/programs/system/rdsave/trunk/rdsave.asm
20,13 → 20,13
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd 0x2000 ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd 0x2000 ;  ¤à¥á ¢¥à設ë áâíª 
dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd I_END ;  ¤à¥á ¢¥à設ë áâíª 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
 
include '..\..\..\develop\examples\editbox\trunk\editbox.inc'
use_edit_box procinfo,22,5
use_edit_box
al equ eax ; \ decrease kpack'ed size
purge mov ; /
 
170,7 → 170,7
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ€
mcall
 
draw_edit_box editbox,use_f9,procinfo ;à¨á®¢ ­¨¥ edit box'®¢
draw_edit_box editbox ;à¨á®¢ ­¨¥ edit box
 
mov al,13 ;®âà¨á®¢ª  ⥭¥© ª­®¯®ª
mov ebx,194 shl 16 + 60
316,12 → 316,11
path4 db '/hd0/1/kolibri/kolibri.img',0 ;¤«ï १¥à¢­®£® á®åà ­¥­¨ï
 
;---------------------------------------------------------------------
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
 
rb 514
 
sc system_colors
 
procinfo process_information
 
 
align 4
rb 0x100 ; for stack
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
/programs/system/run/trunk/run.asm
1,3 → 1,4
; 24.07.2008 <Lrz> ®¡­®¢«¥­ Edit ¡®ªá
; 01.02.07 - ®¡­®¢«ñ­ editbox
; 31.01.07 - ¨á¯à ¢«¥­  ­¥ª®àà¥ªâ­ ï ®âà¨á®¢ª  ¯à¨ ¡®«ì讬 §­ ç¥­¨¨ ¢ëá®âë ᪨­ 
; ¢ëà ¢­¨¢ ­¨¥ á­¨§ã ®â­®á¨â¥«ì­® à ¡®ç¥© ®¡« á⨠íªà ­ 
13,7 → 14,7
include 'run.mac'
include 'lang.inc'
meos_app_start
use_edit_box procinfo,22,5
use_edit_box
use_txt_button
code
cmp [par],byte 0