Subversion Repositories Kolibri OS

Rev

Rev 2482 | Rev 2501 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2482 Rev 2487
Line 27... Line 27...
27
el_offs_nam equ 0 ;ᬥ饭¨¥ ¤«ï ­ ç «  ¨¬¥­¨ í«¥¬¥­â 
27
el_offs_nam equ 0 ;ᬥ饭¨¥ ¤«ï ­ ç «  ¨¬¥­¨ í«¥¬¥­â 
28
el_offs_col equ 16 ;梥â í«¥¬¥­â 
28
el_offs_col equ 16 ;梥â í«¥¬¥­â 
29
el_offs_box_x equ 20 ;è¨à¨­  ª®à®¡ª¨ í«¥¬¥­â 
29
el_offs_box_x equ 20 ;è¨à¨­  ª®à®¡ª¨ í«¥¬¥­â 
30
el_offs_box_y equ 21 ;¢ëá®â  ª®à®¡ª¨ í«¥¬¥­â 
30
el_offs_box_y equ 21 ;¢ëá®â  ª®à®¡ª¨ í«¥¬¥­â 
31
el_offs_table equ 22 ;㪠§ â¥«ì ­  â ¡«¨æã à ¡®âë í«¥¬¥­â 
31
el_offs_table equ 22 ;㪠§ â¥«ì ­  â ¡«¨æã à ¡®âë í«¥¬¥­â 
32
el_offs_legs_inp equ 26 ;ᬥ饭¨¥ ­  ®¯¨á ­¨¥ ¢å®¤­ëå ­®£
32
el_offs_legs_inp equ 26 ;㪠§ â¥«ì ­  â ¡«¨æã ®¯¨á ­¨ï ¢å®¤­ëå ­®£
33
el_offs_legs_out equ 30 ;ᬥ饭¨¥ ­  ®¯¨á ­¨¥ ¢ë室­ëå ­®£
33
el_offs_legs_out equ 30 ;ᬥ饭¨¥ ­  ®¯¨á ­¨¥ ¢ë室­ëå ­®£
Line -... Line 34...
-
 
34
 
34
 
35
sp_offs_el_angle equ 8 ;ᬥ饭¨¥ ¤«ï 㣫  ¯®¢®à®â  í«¥¬¥­â  ¢ ᯨ᪥
Line 35... Line 36...
35
sp_offs_el_type equ 9 ;ᬥ饭¨¥ ¤«ï ⨯  í«¥¬¥­â  ¢ ᯨ᪥
36
sp_offs_el_type equ 9 ;ᬥ饭¨¥ ¤«ï ⨯  í«¥¬¥­â  ¢ ᯨ᪥
36
 
37
 
Line 45... Line 46...
45
include 'dll.inc'
46
include 'dll.inc'
46
include 'le_pole.inc'
47
include 'le_pole.inc'
47
include 'le_signal.inc'
48
include 'le_signal.inc'
Line 48... Line 49...
48
 
49
 
49
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
50
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 50... Line 51...
50
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 20.03.12',0 ;¯®¤¯¨áì ®ª­ 
51
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 21.03.12',0 ;¯®¤¯¨áì ®ª­ 
51
 
52
 
52
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
53
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
53
panel_1_coord_top equ 35
54
panel_1_coord_top equ 35
Line 80... Line 81...
80
	Buffer	 dd ?
81
	Buffer	 dd ?
81
		db ?
82
		db ?
82
	FileName dd ?
83
	FileName dd ?
83
ends
84
ends
Line 84... Line 85...
84
 
85
 
85
macro elOpt nam,col,box_x,box_y,table, il0, il1, il2, ol0, ol1, ol2
86
macro elOpt nam,col,box_x,box_y,table, tbl_i_legs, ol0, ol1, ol2
86
{
87
{
87
	@@: db nam
88
	@@: db nam
88
	rb @b+16-$
89
	rb @b+16-$
89
	dd col
90
	dd col
90
	db box_x
91
	db box_x
91
	db box_y
92
	db box_y
92
	dd table+0 ;+el_offs_table
-
 
93
;+26
93
	dd table+0 ;+el_offs_table
94
	db il0+0 ;0-ï ¢å®¤­ ï ­®£ 
94
	dd tbl_i_legs+0 ;+26 ¢å®¤­ë¥ ­®£¨
95
	db il1+0 ;1-ï ¢å®¤­ ï ­®£ 
-
 
96
	db il2+0
-
 
97
	db 0
-
 
98
;+30
-
 
99
	db ol0+0
-
 
100
	db ol1+0
95
;+30 ¢ë室­ë¥ ­®£¨
101
	db ol2+0
-
 
102
	db 0
96
	db ol0+0, ol1+0, ol2+0, 0
Line 103... Line 97...
103
}
97
}
104
 
98
 
105
align 4
99
align 4
106
el_opt_beg:
100
el_opt_beg:
-
 
101
elOpt 'or[2]', 0xff00ff,5,5,tbl_or, tbl_il_2, 2
107
elOpt 'or[2]', 0xff00ff,5,5,tbl_or, 1,2,, 2
102
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, tbl_il_3, 3
108
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, 1,2,2, 3
103
elOpt 'or[4]', 0xff00ff,5,9,tbl_or, tbl_il_4, 4
-
 
104
elOpt 'and[2]',0xffff00,5,5,tbl_and.2, tbl_il_2, 2
109
elOpt 'and[2]',0xffff00,5,5,tbl_and.2, 1,2,, 2
105
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, tbl_il_3, 3
110
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, 1,2,2, 3
106
elOpt 'and[4]',0xffff00,5,9,tbl_and.4, tbl_il_4, 4
111
elOpt 'not',   0xffff,3,3,tbl_not, 1,,, 1
107
elOpt 'not',   0xffff,  3,3,tbl_not, tbl_il_1, 1
-
 
108
elOpt 'xor',   0x8000ff,5,5,tbl_xor, tbl_il_2, 2
112
elOpt 'xor',   0x8000ff,5,5,tbl_xor, 1,2,, 2
109
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm,  tbl_il_3, 1,4
113
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm, 1,2,2, 1,4
110
;elOpt 'cd[8]', 0x8000, 7,17,tbl_cd_8,tbl_il_8, 6,2,2 ;è¨äà â®à ­  8 ¢å®¤®¢
Line 114... Line 111...
114
.end:
111
.end:
115
elOpt '???', 0x808080,3,3,tbl_and.3, 1,,, 1 ;­¥ ®¯®§­ ­­ë© í«¥¬¥­â
112
elOpt '???', 0x808080,3,3,tbl_and.3, tbl_il_1, 1 ;­¥ ®¯®§­ ­­ë© í«¥¬¥­â
116
 
113
 
-
 
114
;â ¡«¨æë ¯® ª®â®àë¬ § ¤ îâáï ¯à ¢¨«  à ¡®âë í«¥¬¥­â®¢
117
;â ¡«¨æë ¯® ª®â®àë¬ § ¤ îâáï ¯à ¢¨«  à ¡®âë í«¥¬¥­â®¢
115
align 4
-
 
116
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3
118
align 4
117
	db 1,1,1,1,1,1,1,1 ;or4
119
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3
118
tbl_and:
120
tbl_and:
119
.4: dq 0
121
.3: db 0,0,0,0
120
.3: dd 0
122
.2: db 0,0,0,1
121
.2: db 0,0,0,1
-
 
122
tbl_xor db 0,1,1,0
-
 
123
tbl_sm db 0,2,2,1, 2,1,1,3
-
 
124
tbl_not db 1,0 ;not
-
 
125
;tbl_cd_8 db ;256=2^8
-
 
126
 
-
 
127
;â ¡«¨æë ¤«ï ¢å®¤­ëå ­®£
-
 
128
tbl_il_1 db 1,0   ;ª®à¯ãá ­  1 ­®£ã
-
 
129
tbl_il_2 db 1,2,0 ;ª®à¯ãá ­  2 ­®£¨
Line 123... Line 130...
123
tbl_xor db 0,1,1,0
130
tbl_il_3 db 1,2,2,0
124
tbl_sm db 0,2,2,1, 2,1,1,3
131
tbl_il_4 db 1,2,2,2,0
125
tbl_not db 1,0 ;not
132
;tbl_il_8 db 1,2,2,2,2,2,2,2,0
126
 
133
 
Line 222... Line 229...
222
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
229
	stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
223
	load_image_file 'toolbar.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE
230
	load_image_file 'toolbar.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE
Line 224... Line 231...
224
 
231
 
225
	stdcall pole_init, pole
232
	stdcall pole_init, pole
-
 
233
	stdcall dword[tl_data_init], tree1
Line 226... Line 234...
226
	stdcall dword[tl_data_init], tree1
234
	stdcall dword[tl_data_init], tree2
227
 
235
 
228
	;á¨á⥬­ë¥ ¨ª®­ª¨ 16*16 ¤«ï tree_list
236
	;á¨á⥬­ë¥ ¨ª®­ª¨ 16*16 ¤«ï tree_list
229
	load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
237
	load_image_file 'tl_sys_16.png', icon_tl_sys,TREE_ICON_SYS16_BMP_SIZE
230
	;¥á«¨ ¨§®¡à ¦¥­¨¥ ­¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
238
	;¥á«¨ ¨§®¡à ¦¥­¨¥ ­¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ
231
	;­¥ ¨­¨æ¨ «¨§¨à®¢ ­­ë¥ ¤ ­­ë¥, ­® ®è¨¡ª¨ ­¥ ¡ã¤¥â, â. ª. ¡ãä¥à ­ã¦­®£® à §¬¥à 
239
	;­¥ ¨­¨æ¨ «¨§¨à®¢ ­­ë¥ ¤ ­­ë¥, ­® ®è¨¡ª¨ ­¥ ¡ã¤¥â, â. ª. ¡ãä¥à ­ã¦­®£® à §¬¥à 
-
 
240
	mov eax,dword[icon_tl_sys]
Line 232... Line 241...
232
	mov eax,dword[icon_tl_sys]
241
	mov dword[tree1.data_img_sys],eax
233
	mov dword[tree1.data_img_sys],eax
242
	mov dword[tree2.data_img_sys],eax
234
 
243
 
-
 
244
	load_image_file 'objects.png', icon_toolbar,TOOLBAR_ICON_BMP_SIZE
Line 235... Line 245...
235
	load_image_file 'objects.png', icon_toolbar,TOOLBAR_ICON_BMP_SIZE
245
	mov eax,dword[icon_toolbar]
236
	mov eax,dword[icon_toolbar]
246
	mov dword[tree1.data_img],eax
237
	mov dword[tree1.data_img],eax
247
	mov dword[tree2.data_img],eax
238
 
248
 
Line 255... Line 265...
255
 
265
 
256
	stdcall [buf2d_conv_24_to_8], buf_curs_8,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8¡¨â
266
	stdcall [buf2d_conv_24_to_8], buf_curs_8,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8¡¨â
Line 257... Line 267...
257
	stdcall [buf2d_conv_24_to_32],buf_curs,buf_curs_8 ;¤¥« ¥¬ ¡ãä¥à rgba 32¡¨â
267
	stdcall [buf2d_conv_24_to_32],buf_curs,buf_curs_8 ;¤¥« ¥¬ ¡ãä¥à rgba 32¡¨â
-
 
268
 
-
 
269
	stdcall sign_init, 3000
-
 
270
	mov eax,el_opt_beg+el_offs_nam
-
 
271
	mov ecx,(el_opt_beg.end-el_opt_beg)/size_el_opt ;ª®««¨ç¥á⢮ ⨯®¢ í«¥¬¥­â®¢
-
 
272
	cld
-
 
273
	@@:
-
 
274
		stdcall [tl_node_add], eax, el_icon_elems shl 16, tree2
-
 
275
		stdcall [tl_cur_next], tree2
-
 
276
		add eax,size_el_opt
Line 258... Line 277...
258
 
277
		loop @b
259
	stdcall sign_init, 3000
278
	stdcall [tl_cur_beg], tree2
Line 260... Line 279...
260
 
279
 
Line 316... Line 335...
316
	jmp still
335
	jmp still
Line 317... Line 336...
317
 
336
 
318
align 4
337
align 4
319
mouse:
338
mouse:
-
 
339
	stdcall [tl_mouse], tree1
Line 320... Line 340...
320
	stdcall [tl_mouse], tree1
340
	stdcall [tl_mouse], tree2
321
 
341
 
322
	push eax ebx ecx edx
342
	push eax ebx ecx edx
323
	mcall 37,2 ;­ ¦ âë¥ ª­®¯ª¨ ¬ëè¨
343
	mcall 37,2 ;­ ¦ âë¥ ª­®¯ª¨ ¬ëè¨
Line 360... Line 380...
360
		cmp eax,[shem_w]
380
		cmp eax,[shem_w]
361
		jge .end_buf_wnd
381
		jge .end_buf_wnd
362
		cmp ebx,[shem_h]
382
		cmp ebx,[shem_h]
363
		jge .end_buf_wnd
383
		jge .end_buf_wnd
Line -... Line 384...
-
 
384
 
-
 
385
		cmp byte[pen_mode],0
-
 
386
		jne .end_mode_0
-
 
387
			;०¨¬ ªãàá®à  (¢ë¡®à í«¥¬¥­â  ¯à¨ ­ ¦ â¨¨)
-
 
388
			stdcall element_is_click,eax,ebx
-
 
389
			test eax,eax
-
 
390
			jz .end_buf_wnd ;¯à¨ ­ ¦ â¨¨ ­¥ ¯®¯ «¨ ­¨ ­  ®¤¨­ ¨§ í«¥¬¥­â®¢
-
 
391
				stdcall [tl_node_get_data], tree1
-
 
392
				pop ebx
-
 
393
				cmp eax,ebx
-
 
394
				je .end_buf_wnd ;¥á«¨ 㦥 ªãàá®à á⮨â â ¬ £¤¥ ­ã¦­®
-
 
395
				
-
 
396
				stdcall [tl_cur_beg], tree1
-
 
397
				.cycle0:
-
 
398
				stdcall [tl_node_get_data], tree1
-
 
399
				pop ebx
-
 
400
				test ebx,ebx
-
 
401
				jz .end_buf_wnd
-
 
402
				cmp eax,ebx
-
 
403
				je @f
-
 
404
					stdcall [tl_cur_next], tree1
-
 
405
					jmp .cycle0
-
 
406
				@@:
-
 
407
				stdcall [tl_draw], tree1
-
 
408
			jmp .end_buf_wnd
364
 
409
		.end_mode_0:
365
		cmp byte[pen_mode],1
410
		cmp byte[pen_mode],1
366
		jne .end_mode_1
411
		jne .end_mode_1
367
			;०¨¬ à¨á®¢ ­¨ï ¯à®¢®¤ 
412
			;०¨¬ à¨á®¢ ­¨ï ¯à®¢®¤ 
368
			cmp dword[pen_coord_x],0
413
			cmp dword[pen_coord_x],0
Line 435... Line 480...
435
 
480
 
436
	.end_buf_wnd:
481
	.end_buf_wnd:
437
	pop edx ecx ebx eax 
482
	pop edx ecx ebx eax 
Line -... Line 483...
-
 
483
	ret
-
 
484
 
-
 
485
;output:
-
 
486
; eax - pointer to element data
-
 
487
align 4
-
 
488
proc element_is_click uses ebx ecx edx esi edi, coord_x:dword, coord_y:dword
-
 
489
	stdcall dword[tl_node_poi_get_info],0,tree1
-
 
490
	pop esi
-
 
491
	@@:
-
 
492
		cmp esi,0
-
 
493
		je @f
-
 
494
		cmp word[esi],el_icon_elems ;¯®«ã祭¨¥ ç¥à¥§ esi ⨯ ¨ª®­ª¨
-
 
495
		jne .end_add_p1
-
 
496
			stdcall [tl_node_poi_get_data], esi, tree1
-
 
497
			pop ecx
-
 
498
 
-
 
499
			movzx edx,byte[ecx+sp_offs_el_type]
-
 
500
			imul edx,size_el_opt
-
 
501
			add edx,el_opt_beg ;­ å®¤¨¬ ®¯æ¨î ᮠ᢮©á⢠¬¨ ¤ ­­®£® í«¥¬¥­â 
-
 
502
 
-
 
503
			mov eax,[ecx] ;element coord x
-
 
504
			mov ebx,[ecx+4] ;element coord y
-
 
505
			movzx edi,byte[ecx+sp_offs_el_angle]
-
 
506
			push edi
-
 
507
			movzx edi,byte[edx+el_offs_box_y]
-
 
508
			dec edi
-
 
509
			push edi
-
 
510
			movzx edi,byte[edx+el_offs_box_x]
-
 
511
			dec edi
-
 
512
			push edi
-
 
513
			stdcall move_rotate_n90 ;,[edx+el_offs_box_x],[edx+el_offs_box_y],[ecx+sp_offs_el_angle]
-
 
514
			;Rect(eax,ebx,[ecx],[ecx+4])
-
 
515
			stdcall point_in_rect, [coord_x],[coord_y], eax,ebx,[ecx],[ecx+4]
-
 
516
			test eax,eax
-
 
517
			jz .end_add_p1
-
 
518
				mov eax,ecx
-
 
519
				jmp .end_f
-
 
520
		.end_add_p1:
-
 
521
		stdcall dword[tl_node_poi_get_next_info],esi,tree1
-
 
522
		pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
-
 
523
		jmp @b
-
 
524
	@@:
-
 
525
		xor eax,eax ;¥á«¨ ­¥ ­ è«¨
-
 
526
	.end_f:
-
 
527
	ret
-
 
528
endp
-
 
529
 
-
 
530
;¯à®¢¥àª  ¯®¯ ¤¥­¨ï â®çª¨ ¢ ¯àאַ㣮«ì­¨ª
-
 
531
;१ã«ìâ â:
-
 
532
; ¥á«¨ ­¥ ¯®¯ ¤ ¥â â® eax=0
-
 
533
; ¥á«¨ ¯®¯ ¤ ¥â â® eax=1
-
 
534
align 4
-
 
535
proc point_in_rect uses ebx ecx, px:dword, py:dword, rx0:dword, ry0:dword, rx1:dword, ry1:dword
-
 
536
	xor eax,eax
-
 
537
 
-
 
538
	;¯à®¢¥àª  ¯® ®á¨ x
-
 
539
	mov ebx,[rx0]
-
 
540
	mov ecx,[rx1]
-
 
541
	cmp ebx,ecx
-
 
542
	jle @f
-
 
543
		xchg ebx,ecx
-
 
544
	@@:
-
 
545
	cmp ebx,[px]
-
 
546
	jg .no_contains
-
 
547
	cmp ecx,[px]
-
 
548
	jl .no_contains
-
 
549
 
-
 
550
	;¯à®¢¥àª  ¯® ®á¨ y
-
 
551
	mov ebx,[ry0]
-
 
552
	mov ecx,[ry1]
-
 
553
	cmp ebx,ecx
-
 
554
	jle @f
-
 
555
		xchg ebx,ecx
-
 
556
	@@:
-
 
557
	cmp ebx,[py]
-
 
558
	jg .no_contains
-
 
559
	cmp ecx,[py]
-
 
560
	jl .no_contains
-
 
561
 
-
 
562
	;¥á«¨ ¯®¯ «¨ â® eax=1
-
 
563
		inc eax
-
 
564
		;stdcall draw_scaled_rect, [rx0],[ry0],[rx1],[ry1], 0xffffff
-
 
565
		;stdcall [buf2d_draw], buf_0
-
 
566
	.no_contains:
-
 
567
	ret
438
	ret
568
endp
439
 
569
 
440
align 4
570
align 4
441
draw_window:
571
draw_window:
Line 539... Line 669...
539
	add edx,(30 shl 16) ;center
669
	add edx,(30 shl 16) ;center
540
	int 0x40
670
	int 0x40
Line 541... Line 671...
541
 
671
 
542
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
672
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
543
	stdcall [buf2d_draw], buf_0
673
	stdcall [buf2d_draw], buf_0
544
	mov dword[wScrObj.all_redraw],1
674
	mov dword[wScr1.all_redraw],1
-
 
675
	stdcall [tl_draw], tree1
-
 
676
	mov dword[wScr2.all_redraw],1
545
	stdcall [tl_draw], tree1
677
	stdcall [tl_draw], tree2
Line 546... Line 678...
546
	stdcall pole_draw_pok, pole
678
	stdcall pole_draw_pok, pole
547
 
679
 
548
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ãáâ ­®¢ª¨ ᨣ­ «®¢ set_0 ¨ set_1 ***
680
	; *** ᮧ¤ ­¨¥ ª­®¯®ª ãáâ ­®¢ª¨ ᨣ­ «®¢ set_0 ¨ set_1 ***
Line 661... Line 793...
661
 
793
 
662
align 4
794
align 4
663
key:
795
key:
664
	mcall 2
796
	mcall 2
-
 
797
	stdcall [tl_key], dword tree1
665
	stdcall [tl_key], dword tree1
798
	stdcall [tl_key], dword tree2
Line 666... Line 799...
666
	jmp still
799
	jmp still
667
 
800
 
Line 741... Line 874...
741
	jne @f
874
	jne @f
742
		call but_set_none
875
		call but_set_none
743
	@@:
876
	@@:
744
	cmp ah,31
877
	cmp ah,31
745
	jne @f
878
	jne @f
746
		stdcall set_pen_mode,1,0 ;ãáâ ­®¢ª  ०¨¬  à¨á®¢ ­¨ï ¯à®¢®¤ 
879
		stdcall set_pen_mode,1,0,((9 shl 8)+9) shl 16 ;ãáâ ­®¢ª  ०¨¬  à¨á®¢ ­¨ï ¯à®¢®¤ 
747
	@@:
880
	@@:
748
	cmp ah,32
881
	cmp ah,32
749
	jne @f
882
	jne @f
750
		stdcall set_pen_mode,2,1
883
		stdcall set_pen_mode,2,1,((9 shl 8)+9) shl 16
751
	@@:
884
	@@:
752
	cmp ah,33
885
	cmp ah,33
753
	jne @f
886
	jne @f
754
		stdcall set_pen_mode,3,2 ;ãáâ ­®¢ª  ०¨¬  áâ¨à ­¨ï ¯à®¢®¤ 
887
		stdcall set_pen_mode,3,2,((15 shl 8)+9) shl 16 ;ãáâ ­®¢ª  ०¨¬  áâ¨à ­¨ï ¯à®¢®¤ 
755
	@@:
888
	@@:
756
	cmp ah,34
889
	cmp ah,34
757
	jne @f
890
	jne @f
758
		stdcall set_pen_mode,4,3 ;ãáâ ­®¢ª  ०¨¬  ᮧ¤ ­¨ï í«¥¬¥­â®¢
891
		stdcall set_pen_mode,4,3,((9 shl 8)+9) shl 16 ;ãáâ ­®¢ª  ०¨¬  ᮧ¤ ­¨ï í«¥¬¥­â®¢
759
	@@:
892
	@@:
760
	cmp ah,1
893
	cmp ah,1
761
	jne still
894
	jne still
762
.exit:
895
.exit:
763
	stdcall [buf2d_delete],buf_0
896
	stdcall [buf2d_delete],buf_0
Line 765... Line 898...
765
	stdcall [buf2d_delete],buf_curs
898
	stdcall [buf2d_delete],buf_curs
766
	stdcall mem.Free,[image_data_toolbar]
899
	stdcall mem.Free,[image_data_toolbar]
767
	stdcall pole_delete, pole
900
	stdcall pole_delete, pole
768
	call sign_delete
901
	call sign_delete
769
	stdcall [tl_data_clear], tree1
902
	stdcall [tl_data_clear], tree1
-
 
903
	;ç¨á⨬ 㪠§ â¥«¨ ­  ¨§®¡à ¦¥­¨ï, ª®â®àë¥ ¡ë«¨ ®¡é¨¬¨ ¤«ï «¨á⮢ ¨ 㤠«¥­ë «¨á⮬ tree1
-
 
904
	mov dword[tree2.data_img_sys],0
-
 
905
	mov dword[tree2.data_img],0
-
 
906
	stdcall [tl_data_clear], tree2
770
	cmp [cursor_pointer],0
907
	cmp [cursor_pointer],0
771
	je @f
908
	je @f
772
		mcall 37,6,[cursor_pointer]
909
		mcall 37,6,[cursor_pointer]
773
	@@:
910
	@@:
774
	mcall -1
911
	mcall -1
Line 878... Line 1015...
878
				call str_next_val
1015
				call str_next_val
879
				stdcall conv_str_to_int,edi
1016
				stdcall conv_str_to_int,edi
880
				mov dword[txt_buf+4],eax ;ª®®à¤¨­ â  y
1017
				mov dword[txt_buf+4],eax ;ª®®à¤¨­ â  y
881
				call str_next_val
1018
				call str_next_val
882
				stdcall conv_str_to_int,edi
1019
				stdcall conv_str_to_int,edi
883
				mov byte[txt_buf+8],al ;­ ¯à ¢«¥­¨¥
1020
				mov byte[txt_buf+sp_offs_el_angle],al ;­ ¯à ¢«¥­¨¥
884
				call str_next_val
1021
				call str_next_val
885
				;¯®  ¤à¥áã edi ­ §¢ ­¨¥ í«¥¬¥­â 
1022
				;¯®  ¤à¥áã edi ­ §¢ ­¨¥ í«¥¬¥­â 
886
				stdcall el_get_name, edi
1023
				stdcall el_get_name, edi
887
				mov byte[txt_buf+sp_offs_el_type],al ;⨯ í«¥¬¥­â 
1024
				mov byte[txt_buf+sp_offs_el_type],al ;⨯ í«¥¬¥­â 
Line 1316... Line 1453...
1316
			stdcall convert_int_to_str
1453
			stdcall convert_int_to_str
1317
			stdcall str_cat,edi,txt_space
1454
			stdcall str_cat,edi,txt_space
Line 1318... Line 1455...
1318
 
1455
 
1319
			stdcall str_len,edi
1456
			stdcall str_len,edi
1320
			add edi,eax
1457
			add edi,eax
1321
			movzx eax,byte[ecx+8] ;angle
1458
			movzx eax,byte[ecx+sp_offs_el_angle] ;angle
1322
			stdcall convert_int_to_str
1459
			stdcall convert_int_to_str
Line 1323... Line 1460...
1323
			stdcall str_cat,edi,txt_space
1460
			stdcall str_cat,edi,txt_space
1324
 
1461
 
Line 1568... Line 1705...
1568
;¯à¨ ¤®¡ ¢«¥­¨¨ ¨á¯®«ì§ãîâáï áâ ­¤ àâ­ë¥ ­ áâனª¨
1705
;¯à¨ ¤®¡ ¢«¥­¨¨ ¨á¯®«ì§ãîâáï áâ ­¤ àâ­ë¥ ­ áâனª¨
1569
align 4
1706
align 4
1570
proc shem_element_creat uses eax ebx, coord_x:dword, coord_y:dword
1707
proc shem_element_creat uses eax ebx, coord_x:dword, coord_y:dword
1571
	mov eax,dword[coord_x]
1708
	mov eax,dword[coord_x]
1572
	mov dword[txt_buf],eax ;ª®®à¤¨­ â  x
1709
	mov dword[txt_buf],eax ;ª®®à¤¨­ â  x
1573
	mov eax,dword[coord_y]
1710
	mov ebx,dword[coord_y]
1574
	mov dword[txt_buf+4],eax ;ª®®à¤¨­ â  y
-
 
Line -... Line 1711...
-
 
1711
 
-
 
1712
	stdcall element_is_click,eax,ebx ;¯à®¢¥à塞 ¥áâì «¨ ¢ ¤ ­­®© â®çª¥ ¤à㣮© í«¥¬¥­â ᮧ¤ ­­ë© à ­ìè¥
-
 
1713
	test eax,eax
-
 
1714
	jnz .end_f ;¯à¨ ­ ¦ â¨¨ ¯®¯ «¨ ­  ®¤¨­ ¨§ í«¥¬¥­â®¢
-
 
1715
	mov dword[txt_buf+4],ebx ;ª®®à¤¨­ â  y
1575
 
1716
 
1576
	xor eax,eax
1717
	;xor eax,eax
-
 
1718
	mov byte[txt_buf+sp_offs_el_angle],al ;­ ¯à ¢«¥­¨¥
-
 
1719
 
-
 
1720
	stdcall [tl_node_get_data], tree2
-
 
1721
	pop ebx
-
 
1722
	test ebx,ebx
1577
	mov byte[txt_buf+8],al ;­ ¯à ¢«¥­¨¥
1723
	jnz @f
-
 
1724
		mov ebx,el_opt_beg+el_offs_nam ;¥á«¨ ­¥ ¢§ï«®áì ¨¬ï í«¥¬¥­â , â® ¯® 㬮«ç ­¨î ¡¥à¥¬ 1-© ¨§ ᯨ᪠
1578
	;¯®  ¤à¥áã edi ­ §¢ ­¨¥ í«¥¬¥­â 
1725
	@@:
1579
	;stdcall el_get_name, edi
1726
	stdcall el_get_name, ebx
Line 1580... Line -...
1580
	mov byte[txt_buf+sp_offs_el_type],al ;⨯ í«¥¬¥­â 
-
 
1581
 
-
 
1582
	movzx ebx,al
-
 
1583
	imul ebx,size_el_opt
1727
	mov byte[txt_buf+sp_offs_el_type],al ;⨯ í«¥¬¥­â 
1584
	add ebx,el_opt_beg+el_offs_nam
1728
 
1585
	stdcall make_list_capts,txt_buf,ebx
1729
	stdcall make_list_capts,txt_buf,ebx
1586
	stdcall [tl_node_add], txt_buf,(el_icon_elems shl 16)+1, tree1
1730
	stdcall [tl_node_add], txt_buf,(el_icon_elems shl 16)+1, tree1
-
 
1731
	stdcall [tl_cur_next], tree1
1587
	stdcall [tl_cur_next], tree1
1732
	stdcall [tl_draw], tree1
1588
	stdcall [tl_draw], tree1
1733
	.end_f:
Line 1589... Line 1734...
1589
	ret
1734
	ret
1590
endp
1735
endp
Line 1620... Line 1765...
1620
proc el_get_leg_coords uses ecx edx edi esi, el_data:dword, l_opt:dword
1765
proc el_get_leg_coords uses ecx edx edi esi, el_data:dword, l_opt:dword
1621
	mov edi,[el_data] ;¤ ­­ë¥ í«¥¬¥­â 
1766
	mov edi,[el_data] ;¤ ­­ë¥ í«¥¬¥­â 
1622
	movzx esi,byte[edi+sp_offs_el_type] ;⨯ í«¥¬¥­â 
1767
	movzx esi,byte[edi+sp_offs_el_type] ;⨯ í«¥¬¥­â 
1623
	imul esi,size_el_opt
1768
	imul esi,size_el_opt
1624
	add esi,el_opt_beg
1769
	add esi,el_opt_beg
1625
	;esi+el_offs_legs_inp - 㪠§ â¥«ì ­  ¯ à ¬¥âàë 0-© ¢å®¤­®© ­®£¨
1770
	;esi+el_offs_legs_inp - 㪠§ â¥«ì ­  â ¡«¨æã á ¯ à ¬¥âà ¬¨ ¢å®¤­ëå ­®£
Line 1626... Line 1771...
1626
 
1771
 
1627
	mov eax,[edi+0]
1772
	mov eax,[edi+0]
1628
	mov ebx,[edi+4]
1773
	mov ebx,[edi+4]
1629
	mov edx,[l_opt]
1774
	mov edx,[l_opt]
Line 1630... Line 1775...
1630
	movzx edi,byte[edi+8] ;㣮« ¯®¢®à®â  / 90 (®â 0-3)
1775
	movzx edi,byte[edi+sp_offs_el_angle] ;㣮« ¯®¢®à®â  / 90 (®â 0-3)
1631
 
1776
 
Line 1632... Line 1777...
1632
	btr edx,16 ;¢å®¤­ ï/¢ë室­ ï ­®£ 
1777
	btr edx,16 ;¢å®¤­ ï/¢ë室­ ï ­®£ 
1633
	jc .output_leg
1778
	jc .output_leg
1634
 
1779
 
1635
	;¥á«¨ ­®£  ¢å®¤­ ï
1780
	;¥á«¨ ­®£  ¢å®¤­ ï
1636
	inc edx ;­®¬¥à æ¨ï ­®£ ­ ç¨­ ¥âáï á ­ã«ï, ¯®â®¬ã ¤®¡ ¢«ï¥¬ 1
1781
	inc edx ;­®¬¥à æ¨ï ­®£ ­ ç¨­ ¥âáï á ­ã«ï, ¯®â®¬ã ¤®¡ ¢«ï¥¬ 1
1637
	stdcall move_rotate_x_n90, -2,edi
1782
	stdcall move_rotate_x_n90, -2,edi
1638
	add esi,el_offs_legs_inp
1783
	mov esi,[esi+el_offs_legs_inp]
1639
	@@:
1784
	@@:
1640
		movzx ecx,byte[esi]
1785
		movzx ecx,byte[esi]
Line 1978... Line 2123...
1978
		pop ecx ebx eax
2123
		pop ecx ebx eax
1979
	@@:
2124
	@@:
1980
	ret
2125
	ret
1981
endp
2126
endp
Line -... Line 2127...
-
 
2127
 
1982
 
2128
;hot_p - ª®®à¤¨­ âë £®àï祩 â®çª¨ ªãàá®à , ᬥ饭­ë¥ ­  ¡¨â 16 ((cx shl 8) + cy) shl 16
1983
align 4
2129
align 4
1984
proc set_pen_mode uses eax ebx ecx edx, mode:dword, icon:dword
2130
proc set_pen_mode uses eax ebx ecx edx, mode:dword, icon:dword, hot_p:dword
1985
	mov eax,[mode]
2131
	mov eax,[mode]
1986
	cmp byte[pen_mode],al
2132
	cmp byte[pen_mode],al
1987
	je @f
2133
	je @f
1988
		mov byte[pen_mode],al
2134
		mov byte[pen_mode],al
1989
		;mov edx,((cx shl 8) + cy) shl 16
2135
		mov edx,[hot_p]
1990
		mov edx,2 ;LOAD_INDIRECT
2136
		mov dx,2 ;LOAD_INDIRECT
1991
		mov ecx,[icon]
2137
		mov ecx,[icon]
1992
		shl ecx,12 ;㬭®¦ ¥¬ ­  4 ª¡
2138
		shl ecx,12 ;㬭®¦ ¥¬ ­  4 ª¡
1993
		add ecx,[buf_curs.data]
2139
		add ecx,[buf_curs.data]
Line 2092... Line 2238...
2092
 
2238
 
Line 2093... Line 2239...
2093
cursor_pointer dd 0 ;㪠§ â¥«ì ­  ¤ ­­ë¥ ¤«ï ªãàá®à 
2239
cursor_pointer dd 0 ;㪠§ â¥«ì ­  ¤ ­­ë¥ ¤«ï ªãàá®à 
2094
 
2240
 
2095
el_focus dd 0
2241
el_focus dd 0
-
 
2242
tree1 tree_list 32,points_max+2, tl_key_no_edit, 16,16,\
-
 
2243
    0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top+85,145,170, 0,capt_offs,0,\
-
 
2244
    el_focus, wScr1,0
2096
tree1 tree_list 32,points_max+2, tl_key_no_edit, 16,16,\
2245
tree2 tree_list el_offs_col-el_offs_nam,100+2, tl_key_no_edit+tl_list_box_mode, 16,16,\
-
 
2246
    0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top,145,80, 0,0,0,\
-
 
2247
    el_focus, wScr2,0
-
 
2248
 
-
 
2249
align 4
-
 
2250
wScr1:
-
 
2251
.x:
-
 
2252
.size_x     dw 16 ;+0
-
 
2253
.start_x    dw 0 ;+2
-
 
2254
.y:
-
 
2255
.size_y     dw 150 ;+4
-
 
2256
.start_y    dw 0 ;+6
-
 
2257
.btn_high   dd 15 ;+8
-
 
2258
.type	    dd 1  ;+12
-
 
2259
.max_area   dd 100  ;+16
-
 
2260
.cur_area   dd 30  ;+20
-
 
2261
.position   dd 0  ;+24
-
 
2262
.bckg_col   dd 0xeeeeee ;+28
-
 
2263
.frnt_col   dd 0xbbddff ;+32
-
 
2264
.line_col   dd 0  ;+36
-
 
2265
.redraw     dd 0  ;+40
-
 
2266
.delta	    dw 0  ;+44
-
 
2267
.delta2     dw 0  ;+46
-
 
2268
.run_x:
-
 
2269
.r_size_x   dw 0  ;+48
-
 
2270
.r_start_x  dw 0  ;+50
-
 
2271
.run_y:
-
 
2272
.r_size_y   dw 0 ;+52
-
 
2273
.r_start_y  dw 0 ;+54
-
 
2274
.m_pos	    dd 0 ;+56
-
 
2275
.m_pos_2    dd 0 ;+60
-
 
2276
.m_keys     dd 0 ;+64
-
 
2277
.run_size   dd 0 ;+68
-
 
2278
.position2  dd 0 ;+72
-
 
2279
.work_size  dd 0 ;+76
-
 
2280
.all_redraw dd 0 ;+80
2097
    0x8080ff,0x0000ff,0xffffff, 5,panel_3_coord_top,145,250, 0,capt_offs,0,\
2281
.ar_offset  dd 1 ;+84
2098
    el_focus, wScrObj,0
2282
 
2099
align 4
2283
align 4
2100
wScrObj:
2284
wScr2:
2101
.x:
2285
.x:
2102
.size_x     dw 16 ;+0
2286
.size_x     dw 16 ;+0
2103
.start_x    dw 0 ;+2
2287
.start_x    dw 0 ;+2