Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 7415 → Rev 7414

/programs/other/cnc_editor/cnc_editor.asm
14,7 → 14,7
include '../../develop/info3ds/info_fun_float.inc'
 
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'CNC editor 24.09.18',0 ;¯®¤¯¨áì ®ª­ 
caption db 'CNC editor 14.09.18',0 ;¯®¤¯¨áì ®ª­ 
 
run_file_70 FileInfoBlock
 
380,6 → 380,7
add ebx,25 shl 16
mov edx,7
int 0x40 ;figure move up
 
add ebx,25 shl 16
mov edx,8
int 0x40 ;figure move down
391,6 → 392,7
add ebx,25 shl 16
mov edx,10
int 0x40 ;sel points move up
 
add ebx,25 shl 16
mov edx,11
int 0x40 ;sel points move down
397,38 → 399,26
 
add ebx,25 shl 16
mov edx,12
int 0x40 ;align sel points left
int 0x40 ;copy to clipboard
 
add ebx,25 shl 16
mov edx,13
int 0x40 ;align sel points right
add ebx,25 shl 16
mov edx,14
int 0x40 ;align sel points top
add ebx,25 shl 16
mov edx,15
int 0x40 ;align sel points bottom
 
add ebx,25 shl 16
mov edx,16
int 0x40 ;copy to clipboard
add ebx,25 shl 16
mov edx,17
int 0x40 ;paste from clipboard
 
add ebx,25 shl 16
mov edx,18
mov edx,14
int 0x40 ;sel points del
 
add ebx,30 shl 16
mov edx,19
mov edx,15
int 0x40 ;restore zoom
 
add ebx,30 shl 16
mov edx,20
mov edx,16
int 0x40 ;.png
 
add ebx,25 shl 16
mov edx,21
mov edx,17
int 0x40 ;options scale
 
; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
460,18 → 450,6
add edx,(25 shl 16) ;sel points move down
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;aling sel points left
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;aling sel points right
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;aling sel points top
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;aling sel points bottom
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;copy to clipboard
int 0x40
add ebx,IMAGE_TOOLBAR_ICON_SIZE
611,55 → 589,36
@@:
cmp ah,12
jne @f
call but_sel_points_align_coord_xmin
call but_clipboard_copy_points
jmp still
@@:
cmp ah,13
jne @f
call but_sel_points_align_coord_xmax
call but_clipboard_paste_points
jmp still
@@:
cmp ah,14
jne @f
call but_sel_points_align_coord_ymax
call but_sel_points_del
jmp still
@@:
cmp ah,15
jne @f
call but_sel_points_align_coord_ymin
@@:
cmp ah,16
jne @f
call but_clipboard_copy_points
jmp still
@@:
cmp ah,17
jne @f
call but_clipboard_paste_points
jmp still
@@:
cmp ah,18
jne @f
call but_sel_points_del
jmp still
@@:
cmp ah,19
jne @f
call but_restore_zoom
jmp still
@@:
cmp ah,20
cmp ah,16
jne @f
call but_save_png
jmp still
@@:
cmp ah,21
cmp ah,17
jne @f
call but_dlg_opt_scale
jmp still
@@:
 
;cmp ah,22
;cmp ah,18
;jne @f
;call but_...
;jmp still
706,6 → 665,11
mov dword[run_file_70.FileName], openfile_path
mcall SF_FILE,run_file_70
 
;mov eax,dword[open_b+32]
;mov edi,txt_buf
;stdcall convert_int_to_str,20
;notify_window_run txt_buf
 
mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
inc ecx ;for text files
stdcall mem.ReAlloc,[open_file_data],ecx
1492,11 → 1456,12
cmp [eax+Figure.OType],'Fig'
jne .no_point
 
;¯à®¢¥à塞 ¢ë¤¥«¥­­ë¥ â®çª¨
mov ecx,[eax+Figure.PoiCount]
or ecx,ecx
jz .no_point
mov eax,[eax+Figure.PoiData]
.cycle0: ;横« ¤«ï ¢ë¤¥«¥­­¨ï â®ç¥ª
.cycle0: ;1-ï ¢ë¤¥«¥­­ ï â®çª 
bts dword[eax+Point.Prop],PROP_BIT_SELECT
add eax,sizeof.Point
loop .cycle0
1507,298 → 1472,6
endp
 
align 4
proc but_sel_points_align_coord_xmin
pushad
stdcall [tl_node_get_data],tree1
or eax,eax
jz .no_point
cmp [eax+Figure.OType],'Fig'
jne .no_point
 
mov ebx,eax
stdcall sel_points_get_count,eax
cmp eax,1
jle .no_point
mov ecx,[ebx+Figure.PoiCount]
or ecx,ecx
jz .no_point
cmp eax,ecx
je .no_point ;¥á«¨ ¢ë¤¥«¥­­ë ¢á¥ â®çª¨, çâ®-¡ë ­¥ ¯®àâ¨âì ª®­âãà
 
mov edx,ecx
imul edx,sizeof.Point
mov ebx,[ebx+Figure.PoiData]
add edx,ebx
align 4
.cycle0: ;1-ï ¢ë¤¥«¥­­ ï â®çª 
cmp ebx,edx
jge .no_point
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jc .cycle0end
add ebx,sizeof.Point
jmp .cycle0
.cycle0end:
lea esi,[ebx+Point.CoordX]
mov edi,Data_Double
movsd
movsd
finit
fld qword[Data_Double]
align 4
.cycle1: ;横« ¤«ï ­ å®¦¤¥­¨ï min(Point.CoordX)
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jnc .no_sel
fcom qword[ebx+Point.CoordX]
fstsw ax
sahf
jbe .no_sel
;if (st0>Point.CoordX)
ffree st0
fincstp
fld qword[ebx+Point.CoordX]
.no_sel:
add ebx,sizeof.Point
cmp ebx,edx
jl .cycle1
fstp qword[Data_Double]
align 4
.cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ­¨ï ¢á¥¬ Point.CoordX = min(Point.CoordX)
sub edx,sizeof.Point
bt dword[edx+Point.Prop],PROP_BIT_SELECT
jnc @f
mov esi,Data_Double
lea edi,[edx+Point.CoordX]
movsd
movsd
@@:
loop .cycle2
;¤«ï ®¡­®¢«¥­¨ï ¯® â ©¬¥àã
mov dword[offs_last_timer],0
.no_point:
popad
ret
endp
 
align 4
proc but_sel_points_align_coord_ymin
pushad
stdcall [tl_node_get_data],tree1
or eax,eax
jz .no_point
cmp [eax+Figure.OType],'Fig'
jne .no_point
 
mov ebx,eax
stdcall sel_points_get_count,eax
cmp eax,1
jle .no_point
mov ecx,[ebx+Figure.PoiCount]
or ecx,ecx
jz .no_point
cmp eax,ecx
je .no_point ;¥á«¨ ¢ë¤¥«¥­­ë ¢á¥ â®çª¨, çâ®-¡ë ­¥ ¯®àâ¨âì ª®­âãà
 
mov edx,ecx
imul edx,sizeof.Point
mov ebx,[ebx+Figure.PoiData]
add edx,ebx
align 4
.cycle0: ;1-ï ¢ë¤¥«¥­­ ï â®çª 
cmp ebx,edx
jge .no_point
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jc .cycle0end
add ebx,sizeof.Point
jmp .cycle0
.cycle0end:
lea esi,[ebx+Point.CoordY]
mov edi,Data_Double
movsd
movsd
finit
fld qword[Data_Double]
align 4
.cycle1: ;横« ¤«ï ­ å®¦¤¥­¨ï min(Point.CoordY)
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jnc .no_sel
fcom qword[ebx+Point.CoordY]
fstsw ax
sahf
jbe .no_sel
;if (st0>Point.CoordY)
ffree st0
fincstp
fld qword[ebx+Point.CoordY]
.no_sel:
add ebx,sizeof.Point
cmp ebx,edx
jl .cycle1
fstp qword[Data_Double]
align 4
.cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ­¨ï ¢á¥¬ Point.CoordY = min(Point.CoordY)
sub edx,sizeof.Point
bt dword[edx+Point.Prop],PROP_BIT_SELECT
jnc @f
mov esi,Data_Double
lea edi,[edx+Point.CoordY]
movsd
movsd
@@:
loop .cycle2
;¤«ï ®¡­®¢«¥­¨ï ¯® â ©¬¥àã
mov dword[offs_last_timer],0
.no_point:
popad
ret
endp
 
align 4
proc but_sel_points_align_coord_xmax
pushad
stdcall [tl_node_get_data],tree1
or eax,eax
jz .no_point
cmp [eax+Figure.OType],'Fig'
jne .no_point
 
mov ebx,eax
stdcall sel_points_get_count,eax
cmp eax,1
jle .no_point
mov ecx,[ebx+Figure.PoiCount]
or ecx,ecx
jz .no_point
cmp eax,ecx
je .no_point ;¥á«¨ ¢ë¤¥«¥­­ë ¢á¥ â®çª¨, çâ®-¡ë ­¥ ¯®àâ¨âì ª®­âãà
 
mov edx,ecx
imul edx,sizeof.Point
mov ebx,[ebx+Figure.PoiData]
add edx,ebx
align 4
.cycle0: ;1-ï ¢ë¤¥«¥­­ ï â®çª 
cmp ebx,edx
jge .no_point
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jc .cycle0end
add ebx,sizeof.Point
jmp .cycle0
.cycle0end:
lea esi,[ebx+Point.CoordX]
mov edi,Data_Double
movsd
movsd
finit
fld qword[Data_Double]
align 4
.cycle1: ;横« ¤«ï ­ å®¦¤¥­¨ï max(Point.CoordX)
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jnc .no_sel
fcom qword[ebx+Point.CoordX]
fstsw ax
sahf
jae .no_sel
;if (st0<Point.CoordX)
ffree st0
fincstp
fld qword[ebx+Point.CoordX]
.no_sel:
add ebx,sizeof.Point
cmp ebx,edx
jl .cycle1
fstp qword[Data_Double]
align 4
.cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ­¨ï ¢á¥¬ Point.CoordX = max(Point.CoordX)
sub edx,sizeof.Point
bt dword[edx+Point.Prop],PROP_BIT_SELECT
jnc @f
mov esi,Data_Double
lea edi,[edx+Point.CoordX]
movsd
movsd
@@:
loop .cycle2
;¤«ï ®¡­®¢«¥­¨ï ¯® â ©¬¥àã
mov dword[offs_last_timer],0
.no_point:
popad
ret
endp
 
align 4
proc but_sel_points_align_coord_ymax
pushad
stdcall [tl_node_get_data],tree1
or eax,eax
jz .no_point
cmp [eax+Figure.OType],'Fig'
jne .no_point
 
mov ebx,eax
stdcall sel_points_get_count,eax
cmp eax,1
jle .no_point
mov ecx,[ebx+Figure.PoiCount]
or ecx,ecx
jz .no_point
cmp eax,ecx
je .no_point ;¥á«¨ ¢ë¤¥«¥­­ë ¢á¥ â®çª¨, çâ®-¡ë ­¥ ¯®àâ¨âì ª®­âãà
 
mov edx,ecx
imul edx,sizeof.Point
mov ebx,[ebx+Figure.PoiData]
add edx,ebx
align 4
.cycle0: ;1-ï ¢ë¤¥«¥­­ ï â®çª 
cmp ebx,edx
jge .no_point
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jc .cycle0end
add ebx,sizeof.Point
jmp .cycle0
.cycle0end:
lea esi,[ebx+Point.CoordY]
mov edi,Data_Double
movsd
movsd
finit
fld qword[Data_Double]
align 4
.cycle1: ;横« ¤«ï ­ å®¦¤¥­¨ï max(Point.CoordY)
bt dword[ebx+Point.Prop],PROP_BIT_SELECT
jnc .no_sel
fcom qword[ebx+Point.CoordY]
fstsw ax
sahf
jae .no_sel
;if (st0<Point.CoordY)
ffree st0
fincstp
fld qword[ebx+Point.CoordY]
.no_sel:
add ebx,sizeof.Point
cmp ebx,edx
jl .cycle1
fstp qword[Data_Double]
align 4
.cycle2: ;横« ¤«ï ¯à¨á¢ ¨¢ ­¨ï ¢á¥¬ Point.CoordY = max(Point.CoordY)
sub edx,sizeof.Point
bt dword[edx+Point.Prop],PROP_BIT_SELECT
jnc @f
mov esi,Data_Double
lea edi,[edx+Point.CoordY]
movsd
movsd
@@:
loop .cycle2
;¤«ï ®¡­®¢«¥­¨ï ¯® â ©¬¥àã
mov dword[offs_last_timer],0
.no_point:
popad
ret
endp
 
align 4
proc but_restore_zoom uses eax
stdcall [tl_node_get_data],tree1
or eax,eax
/programs/other/cnc_editor/cnc_editor.inc
294,6 → 294,7
mov ecx,[ebx+Object.FigCount]
jecxz .cycle2end
mov edi,[ebx+Object.FigData]
push edi esi ;copy first min X
@@:
mov eax,[edi]
dec ecx
303,7 → 304,6
jz @b
cmp [eax+Figure.PoiCount],0
je @b
push edi esi ;copy first min X
lea esi,[eax+Figure.MinX]
lea edi,[ebx+Object.MinX]
movsd
320,7 → 320,7
fcomp qword[ebx+Object.MinX]
fstsw ax
sahf
jae @f
ja @f
push edi esi
mov eax,[edi]
lea esi,[eax+Figure.MinX]
337,6 → 337,7
mov ecx,[ebx+Object.FigCount]
jecxz .cycle3end
mov edi,[ebx+Object.FigData]
push edi esi ;copy first min Y
@@:
mov eax,[edi]
dec ecx
346,7 → 347,6
jz @b
cmp [eax+Figure.PoiCount],0
je @b
push edi esi ;copy first min Y
lea esi,[eax+Figure.MinY]
lea edi,[ebx+Object.MinY]
movsd
363,7 → 363,7
fcomp qword[ebx+Object.MinY]
fstsw ax
sahf
jae @f
ja @f
push edi esi
mov eax,[edi]
lea esi,[eax+Figure.MinY]
/programs/other/cnc_editor/doc/but_16.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/programs/other/cnc_editor/doc/readme_ru.htm
36,7 → 36,7
</style>
</head>
<body>
<h1>CNC_editor âåðñèÿ 24.09.18</h1>
<h1>CNC_editor âåðñèÿ 14.09.18</h1>
 
<h2>Îãëàâëåíèå</h2>
<ul>
88,7 → 88,6
<p>Ðèñ. 5. Îêíî ðåäàêòèðîâàíèÿ òî÷êè</p>
 
<p><img src="but_08.png">, <img src="but_09.png"> ïåðåìåùåíèå âûäåëåííûõ òî÷åê ââåðõ èëè âíèç â ïðåäåëàõ âûáðàííîé òðàýêòîðèè</p>
<p><img src="but_16.png"> âûðàâíèâàíèå âûäåëåííûõ òî÷åê ïî ëåâîìó, ïðàâîìó, âåðõíåìó è íèæíåìó êðàþ</p>
<p><img src="but_10.png"> êîïèðîâàíèå êîîðäèíàò âûäåëåííûõ òî÷åê â áóôåðà îáìåíà</p>
<p><img src="but_11.png"> âñòàâêà òî÷åê èç áóôåðà îáìåíà. Ôîðìàò òåêñòà äëÿ âñòàâêè â áóôåðå îáìåíà: 'X_ Y_\n...\0'.</p>
<p><img src="but_12.png"> óäàëåíèå âûäåëåííûõ òî÷åê</p>
/programs/other/cnc_editor/toolbar.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream