fixed English build

git-svn-id: svn://kolibrios.org@310 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2007-02-01 13:37:49 +00:00
parent 487569711c
commit c5afda25bd
4 changed files with 266 additions and 3 deletions

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@fasm scrshot.asm scrshot
@fasm scrshoot.asm scrshoot
@erase lang.inc
@pause

View File

@ -9,8 +9,6 @@ include 'file_sys.inc'
include 'textwork.inc'
;include 'ini.inc'
lang fix ru;en
macro movr reg,val
{
if val < 65536

View File

@ -20,6 +20,7 @@ include 'scrsavef.inc';
use_text_work ; /
include 'gp.inc'
include 'srectwin.inc'
include 'lang.inc'
;--- ­ ç «® ¯à®£à ¬¬ë ---
app_start
;mov al,[gs:1280*4*1024]
@ -564,6 +565,54 @@ device_er db '
not_shooted db '‘¤¥« ©â¥ á­¨¬®ª !!!',0
no_file_name db '‚¢¥¤¨â¥ ¨¬ï ä ©«  !!!',0
invalid_rect db '<27>¥¤®¯ãáâ¨¬ë¥ à §¬¥àë ®¡« áâ¨',0
else
text:
.2 db 'Screen width:',0
.1 db 'Screen height:',0
.3 db 'Enter full path to the file:',0
.4 db 'Bits per pixel:',0
.5 db 'Bytes per line:',0
.6 db '100 = 1 second',0
;.7: db 'Enter name of file:',0
;.8: db 'Instead of "*" in filename the number will be included.',0
.9 db 'Current photo number:',0
.10 db 'Amount of digits in number:',0
but_text:
.1 db 'Make screen photo',0
.2 db 'Save screen photo',0
.3 db 'Show photo now',0
.4 db 'Apply',0
.5 db 'Start autoshooting',0
.6 db 'Stop autoshooting',0
.7 db 'Set',0
ch_text:
.1 db 'Minimize window';,0
.2 db 'Show photo';,0
.3 db 'then make active';,0
.4 db 'Delay:';,0
.5 db 'Autosave';,0
.6 db 'Start numeration from';,0
.7 db 'Area'
.8:
no_shoot db 'There is no photo',0
shooting db 'Photographing...',0
shooted_ok db 'Photo created',0
saving db 'Saving...',0
saved_ok db 'Photo saved',0
delay_now db 'Delay...',0
bad_file_name db 'File name is wrong',0
disk_filled db 'Disk is full',0
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
no_file_name db 'Enter file name !!!',0
invalid_rect db 'Wrong area size',0
end if
sign_n_input:

View File

@ -0,0 +1,216 @@
set_rect_window:
mov ebx,set_rect_window_procinfo
call get_slot_n
mov [set_rect_window_slot],ecx
set_events_mask (evm_redraw+evm_key+evm_button+evm_mouse)
.red:
edit_boxes_set_sys_color rect_input,rect_input_end,sc
labels_set_sys_color rect_input_labels,rect_input_labels_end,sc
check_boxes_set_sys_color riw_check_boxes,riw_check_boxes_end,sc
call .draw_window
.still:
wait_event .red,.key,.button,.mouse
.key:
get_key
key_edit_boxes rect_input,rect_input_end
call read_rect
call draw_rect_on_screen
jmp .still
.button:
get_pressed_button
cmp ah,1
jne @f
btr dword [flags],3
jmp close
@@:
jmp .still
.mouse:
get_active_window
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
jmp .still
.draw_window:
start_draw_window
xor eax,eax
mov ebx,100*65536+250
mov ecx,100*65536+130
mov edx,[sc.work]
add edx,0x33000000
mov edi,riw_grab_text
xor esi,esi
int 0x40
draw_labels rect_input_labels,rect_input_labels_end
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
stop_draw_window
ret
;--------------------------------------------------------------------
;--- ‘ç¨â뢠­¨¥ ®¡« â¨ ----------------------------------------------
;--------------------------------------------------------------------
read_rect:
bt dword [use_rect_active_window.flags],1
jc read_rect_from_active_window
mov edi,rect_input_buffer.left
call zstr_to_int
cmp ax,[scr.width]
jb @f
mov ax,[scr.width]
@@:
mov [rect.left],ax
mov edi,rect_input_buffer.top
call zstr_to_int
cmp ax,[scr.height]
jb @f
mov ax,[scr.height]
@@:
mov [rect.top],ax
mov edi,rect_input_buffer.width
call zstr_to_int
mov bx,[scr.width]
sub bx,[rect.left]
cmp ax,bx
jb @f
mov ax,bx
@@:
mov [rect.width],ax
mov edi,rect_input_buffer.height
call zstr_to_int
mov bx,[scr.height]
sub bx,[rect.top]
cmp ax,bx
jb @f
mov ax,bx
@@:
mov [rect.height],ax
ret
read_rect_from_active_window:
call get_active_window_info
mov eax,[active_app.left]
mov [rect.left],ax
mov eax,[active_app.top]
mov [rect.top],ax
mov eax,[active_app.width]
inc eax
mov [rect.width],ax
mov eax,[active_app.height]
inc eax
mov [rect.height],ax
ret
draw_rect_on_screen:
mov eax,13
mov ebx,150*65536+80
mov ecx,5*65536+60
xor edx,edx
int 0x40
;movzx eax,word [rect.left]
;mul word [scr.width]
xor edx,edx
movzx eax,word [scr.width]
mov ebx,80
div ebx
mov ebx,eax
xor edx,edx
movzx eax,word [rect.height]
div ebx
push ax
xor edx,edx
movzx eax,word [rect.width]
div ebx
push ax
xor edx,edx
movzx eax,word [rect.top]
div ebx
push ax
xor edx,edx
movzx eax,word [rect.left]
div ebx
push ax
pop bx
add bx,150
shl ebx,16
pop cx
add cx,5
shl ecx,16
pop bx
pop cx
mov edx,0xffffff
mov eax,13
int 0x40
ret
rect_input:
.left edit_box 35,95,5,cl_white,0,0,0,5,rect_input_buffer.left,\
ed_figure_only+ed_focus
.top edit_box 35,95,25,cl_white,0,0,0,5,rect_input_buffer.top,\
ed_figure_only
.width edit_box 35,95,45,cl_white,0,0,0,5,rect_input_buffer.width,\
ed_figure_only
.height edit_box 35,95,65,cl_white,0,0,0,5,rect_input_buffer.height,\
ed_figure_only
rect_input_end:
rect_input_labels:
.left label 10,10,0,rect_input_labels_text.left
.top label 10,30,0,rect_input_labels_text.top
.width label 10,50,0,rect_input_labels_text.width
.height label 10,70,0,rect_input_labels_text.height
rect_input_labels_end:
rect_input_labels_text:
.left db 'Žâáâ㯠᫥¢ :',0
.top db 'Žâáâ㯠ᢥàåã:',0
.width db '˜¨à¨­ :',0
.height db '‚ëá®â :',0
riw_check_boxes:
use_rect_active_window check_box 10,85,cl_white,0,0,\
riw_check_boxes_text.1,\
riw_check_boxes_text.2-riw_check_boxes_text.1
riw_check_boxes_end:
riw_check_boxes_text:
.1 db 'ˆá¯®«ì§®¢ âì ®¡« áâì  ªâ¨¢­®£® ®ª­ '
.2 db ''
riw_grab_text db 'Š®®à¤¨­ âë ¨ à §¬¥àë ®¡« áâ¨:',0