Subversion Repositories Kolibri OS

Rev

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

Rev 2487 Rev 2501
Line 14... Line 14...
14
color_s1 equ 0xffffff ;ᨣ­ « 1
14
color_s1 equ 0xffffff ;ᨣ­ « 1
15
color_s2 equ 0xff00 ;â®çª  ¡¥§ ¯¥à¥á¥ç¥­¨ï
15
color_s2 equ 0xff00 ;â®çª  ¡¥§ ¯¥à¥á¥ç¥­¨ï
16
color_s3 equ 0xff0000 ;¢à¥¬¥­­®¥ §­ ç¥­¨¥ ¤«ï á®åà ­¥­¨ï
16
color_s3 equ 0xff0000 ;¢à¥¬¥­­®¥ §­ ç¥­¨¥ ¤«ï á®åà ­¥­¨ï
17
color_caption equ 0x808080
17
color_caption equ 0x808080
Line -... Line 18...
-
 
18
 
-
 
19
debug equ 0
18
 
20
 
19
;­®¬ à  ¨ª®­®ª:
21
;­®¬ à  ¨ª®­®ª:
20
el_icon_group equ 0 ;£à㯯®¢ ï
22
el_icon_group equ 0 ;£à㯯®¢ ï
21
el_icon_points equ 1 ;â®çª¨
23
el_icon_points equ 1 ;â®çª¨
22
el_icon_sub_points equ 2 ;¨§®«ï樨
24
el_icon_sub_points equ 2 ;¨§®«ï樨
Line 46... Line 48...
46
include 'dll.inc'
48
include 'dll.inc'
47
include 'le_pole.inc'
49
include 'le_pole.inc'
48
include 'le_signal.inc'
50
include 'le_signal.inc'
Line 49... Line 51...
49
 
51
 
50
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
52
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 51... Line 53...
51
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 21.03.12',0 ;¯®¤¯¨áì ®ª­ 
53
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 23.03.12',0 ;¯®¤¯¨áì ®ª­ 
52
 
54
 
53
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
55
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
54
panel_1_coord_top equ 35
56
panel_1_coord_top equ 35
Line 102... Line 104...
102
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, tbl_il_3, 3
104
elOpt 'or[3]', 0xff00ff,5,7,tbl_or, tbl_il_3, 3
103
elOpt 'or[4]', 0xff00ff,5,9,tbl_or, tbl_il_4, 4
105
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
106
elOpt 'and[2]',0xffff00,5,5,tbl_and.2, tbl_il_2, 2
105
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, tbl_il_3, 3
107
elOpt 'and[3]',0xffff00,5,7,tbl_and.3, tbl_il_3, 3
106
elOpt 'and[4]',0xffff00,5,9,tbl_and.4, tbl_il_4, 4
108
elOpt 'and[4]',0xffff00,5,9,tbl_and.4, tbl_il_4, 4
-
 
109
elOpt 'and[5]',0xffff00,5,11,tbl_and.5, tbl_il_5, 5
107
elOpt 'not',   0xffff,  3,3,tbl_not, tbl_il_1, 1
110
elOpt 'not',   0xffff,  3,3,tbl_not, tbl_il_1, 1
108
elOpt 'xor',   0x8000ff,5,5,tbl_xor, tbl_il_2, 2
111
elOpt 'xor',   0x8000ff,5,5,tbl_xor, tbl_il_2, 2
109
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm,  tbl_il_3, 1,4
112
elOpt 'sm[1]', 0x8080ff,7,7,tbl_sm,  tbl_il_3, 1,4
110
;elOpt 'cd[8]', 0x8000, 7,17,tbl_cd_8,tbl_il_8, 6,2,2 ;è¨äà â®à ­  8 ¢å®¤®¢
113
;elOpt 'cd[8]', 0x8000, 7,17,tbl_cd_8,tbl_il_8, 6,2,2 ;è¨äà â®à ­  8 ¢å®¤®¢
111
.end:
114
.end:
Line 114... Line 117...
114
;â ¡«¨æë ¯® ª®â®àë¬ § ¤ îâáï ¯à ¢¨«  à ¡®âë í«¥¬¥­â®¢
117
;â ¡«¨æë ¯® ª®â®àë¬ § ¤ îâáï ¯à ¢¨«  à ¡®âë í«¥¬¥­â®¢
115
align 4
118
align 4
116
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3
119
tbl_or db 0,1,1,1, 1,1,1,1 ;or2, or3
117
	db 1,1,1,1,1,1,1,1 ;or4
120
	db 1,1,1,1,1,1,1,1 ;or4
118
tbl_and:
121
tbl_and:
-
 
122
.5: dq 0,0
119
.4: dq 0
123
.4: dq 0
120
.3: dd 0
124
.3: dd 0
121
.2: db 0,0,0,1
125
.2: db 0,0,0,1
122
tbl_xor db 0,1,1,0
126
tbl_xor db 0,1,1,0
123
tbl_sm db 0,2,2,1, 2,1,1,3
127
tbl_sm db 0,2,2,1, 2,1,1,3
Line 127... Line 131...
127
;â ¡«¨æë ¤«ï ¢å®¤­ëå ­®£
131
;â ¡«¨æë ¤«ï ¢å®¤­ëå ­®£
128
tbl_il_1 db 1,0   ;ª®à¯ãá ­  1 ­®£ã
132
tbl_il_1 db 1,0   ;ª®à¯ãá ­  1 ­®£ã
129
tbl_il_2 db 1,2,0 ;ª®à¯ãá ­  2 ­®£¨
133
tbl_il_2 db 1,2,0 ;ª®à¯ãá ­  2 ­®£¨
130
tbl_il_3 db 1,2,2,0
134
tbl_il_3 db 1,2,2,0
131
tbl_il_4 db 1,2,2,2,0
135
tbl_il_4 db 1,2,2,2,0
-
 
136
tbl_il_5 db 1,2,2,2,2,0
132
;tbl_il_8 db 1,2,2,2,2,2,2,2,0
137
;tbl_il_8 db 1,2,2,2,2,2,2,2,0
Line 133... Line 138...
133
 
138
 
134
time dd 0
139
time dd 0
135
tim_ch db 0
140
tim_ch db 0
Line 337... Line 342...
337
align 4
342
align 4
338
mouse:
343
mouse:
339
	stdcall [tl_mouse], tree1
344
	stdcall [tl_mouse], tree1
340
	stdcall [tl_mouse], tree2
345
	stdcall [tl_mouse], tree2
Line 341... Line 346...
341
 
346
 
342
	push eax ebx ecx edx
347
	pushad
343
	mcall 37,2 ;­ ¦ âë¥ ª­®¯ª¨ ¬ëè¨
348
	mcall 37,2 ;­ ¦ âë¥ ª­®¯ª¨ ¬ëè¨
344
	bt eax,0 ;«¥¢ ï ª­®¯ª  ­ ¦ â ?
349
	bt eax,0 ;«¥¢ ï ª­®¯ª  ­ ¦ â ?
-
 
350
	jc @f
-
 
351
	bt eax,1 ;¯à ¢ ï ª­®¯ª  ­ ¦ â ?
345
	jc @f
352
	jc @f
346
		xor eax,eax
353
		xor eax,eax
347
		mov [pen_coord_x],eax
354
		mov [pen_coord_x],eax
348
		mov [pen_coord_y],eax
355
		mov [pen_coord_y],eax
349
		jmp .end_buf_wnd
356
		jmp .end_buf_wnd
-
 
357
	@@:
Line 350... Line 358...
350
	@@:
358
	mov esi,eax
351
 
359
 
352
	mcall 37,1 ;eax = (x shl 16) + y
360
	mcall 37,1 ;eax = (x shl 16) + y
Line 382... Line 390...
382
		cmp ebx,[shem_h]
390
		cmp ebx,[shem_h]
383
		jge .end_buf_wnd
391
		jge .end_buf_wnd
Line 384... Line 392...
384
 
392
 
385
		cmp byte[pen_mode],0
393
		cmp byte[pen_mode],0
-
 
394
		jne .end_mode_0
-
 
395
			bt esi,1
386
		jne .end_mode_0
396
			jc .end_mode_0
387
			;०¨¬ ªãàá®à  (¢ë¡®à í«¥¬¥­â  ¯à¨ ­ ¦ â¨¨)
397
			;०¨¬ ªãàá®à  (¢ë¡®à í«¥¬¥­â  ¯à¨ ­ ¦ â¨¨)
388
			stdcall element_is_click,eax,ebx
398
			stdcall element_is_click,eax,ebx
389
			test eax,eax
399
			test eax,eax
390
			jz .end_buf_wnd ;¯à¨ ­ ¦ â¨¨ ­¥ ¯®¯ «¨ ­¨ ­  ®¤¨­ ¨§ í«¥¬¥­â®¢
400
			jz .end_buf_wnd ;¯à¨ ­ ¦ â¨¨ ­¥ ¯®¯ «¨ ­¨ ­  ®¤¨­ ¨§ í«¥¬¥­â®¢
Line 443... Line 453...
443
				jmp .beg_draw
453
				jmp .beg_draw
444
			@@:
454
			@@:
445
			mov eax,[pen_coord_x] ;¯à¨¢ï§ª  ª ª®®à¤¨­ â¥ x
455
			mov eax,[pen_coord_x] ;¯à¨¢ï§ª  ª ª®®à¤¨­ â¥ x
Line 446... Line 456...
446
 
456
 
-
 
457
			.beg_draw:
-
 
458
			bt esi,1
447
			.beg_draw:
459
			jc @f
448
			stdcall pole_cell_creat, pole,eax,ebx,0
460
				stdcall pole_cell_creat, pole,eax,ebx,0
449
			;­¨ç¥£® ­¥ ã¡à «®áì redraw_pole ­¥ ¯®¤å®¤¨â, â. ª. ç¨áâ¨âì ¯®«¥ ­¥ ­ã¦­®
461
				;­¨ç¥£® ­¥ ã¡à «®áì redraw_pole ­¥ ¯®¤å®¤¨â, â. ª. ç¨áâ¨âì ¯®«¥ ­¥ ­ã¦­®
450
			stdcall pole_paint, pole
462
				stdcall pole_paint, pole
-
 
463
				stdcall [buf2d_draw], buf_0
-
 
464
				jmp .end_buf_wnd
451
			stdcall [buf2d_draw], buf_0
465
			@@:
-
 
466
				stdcall pole_cell_delete, pole,eax,ebx
452
			;stdcall but_test_pole, pole
467
				call redraw_pole
453
			jmp .end_buf_wnd
468
				jmp .end_buf_wnd
454
		.end_mode_1:
469
		.end_mode_1:
455
		cmp byte[pen_mode],2
470
		cmp byte[pen_mode],2
456
		jne @f
471
		jne @f
-
 
472
			;०¨¬ à¨á®¢ ­¨ï ¨§®«ï樨 ¤«ï ¯à®¢®¤ 
-
 
473
			bt esi,1
457
			;०¨¬ à¨á®¢ ­¨ï ¨§®«ï樨 ¤«ï ¯à®¢®¤ 
474
			jc .mode_2_del
-
 
475
				stdcall pole_cell_creat, pole,eax,ebx,2
-
 
476
				jmp .mode_2_draw
-
 
477
			.mode_2_del:
-
 
478
				;áâ¨à ­¨¥ ¨§®«ï樨
-
 
479
				mov ecx,eax
-
 
480
				stdcall pole_cell_find, pole,ecx,ebx
-
 
481
				test eax,eax
-
 
482
				jz .end_buf_wnd
-
 
483
				stdcall pole_cell_creat, pole,ecx,ebx,0
458
			stdcall pole_cell_creat, pole,eax,ebx,2
484
			.mode_2_draw:
459
			stdcall pole_paint, pole
485
			stdcall pole_paint, pole
460
			stdcall [buf2d_draw], buf_0
-
 
461
			;stdcall but_test_pole, pole
486
			stdcall [buf2d_draw], buf_0
462
			jmp .end_buf_wnd
487
			jmp .end_buf_wnd
463
		@@:
488
		@@:
464
		cmp byte[pen_mode],3
489
		cmp byte[pen_mode],3
-
 
490
		jne @f
-
 
491
			bt esi,1
465
		jne @f
492
			jc @f
466
			;०¨¬ áâ¨à ­¨ï ¯à®¢®¤ 
493
			;०¨¬ áâ¨à ­¨ï ¯à®¢®¤ 
467
			stdcall pole_cell_delete, pole,eax,ebx
494
			stdcall pole_cell_delete, pole,eax,ebx
468
			call redraw_pole
-
 
469
			;stdcall but_test_pole, pole
495
			call redraw_pole
470
			jmp .end_buf_wnd
496
			jmp .end_buf_wnd
471
		@@:
497
		@@:
472
		cmp byte[pen_mode],4
498
		cmp byte[pen_mode],4
-
 
499
		jne @f
-
 
500
			bt esi,1
473
		jne @f
501
			jc @f
474
			;०¨¬ ᮧ¤ ­¨ï í«¥¬¥­â®¢
502
			;०¨¬ ᮧ¤ ­¨ï í«¥¬¥­â®¢
475
			stdcall shem_element_creat, eax,ebx
503
			stdcall shem_element_creat, eax,ebx
476
			stdcall pole_paint, pole
504
			stdcall pole_paint, pole
477
			stdcall [buf2d_draw], buf_0
505
			stdcall [buf2d_draw], buf_0
478
			jmp .end_buf_wnd
506
			jmp .end_buf_wnd
Line 479... Line 507...
479
		@@:
507
		@@:
-
 
508
 
480
 
509
	.end_buf_wnd:
-
 
510
if debug
-
 
511
stdcall but_test_pole, pole
481
	.end_buf_wnd:
512
end if
Line 482... Line 513...
482
	pop edx ecx ebx eax 
513
	popad
483
	ret
514
	ret
484
 
515
 
Line 587... Line 618...
587
	mov ecx,(panel_0_coord_top shl 16)+20
618
	mov ecx,(panel_0_coord_top shl 16)+20
588
	mov edx,3
619
	mov edx,3
589
	mov esi,[sc.work_button]
620
	mov esi,[sc.work_button]
590
	int 0x40
621
	int 0x40
Line 591... Line 622...
591
 
622
 
592
	mov ebx,(30 shl 16)+20
623
	add ebx,25 shl 16
593
	mov edx,4
624
	mov edx,4
Line 594... Line 625...
594
	int 0x40
625
	int 0x40
595
 
626
 
596
	mov ebx,(55 shl 16)+20
627
	add ebx,25 shl 16
Line 597... Line 628...
597
	mov edx,5
628
	mov edx,5
598
	int 0x40
629
	int 0x40
599
 
630
 
Line 600... Line 631...
600
	mov ebx,(85 shl 16)+20
631
	add ebx,30 shl 16
601
	mov edx,6
632
	mov edx,6 ;¯ã᪠| ®áâ ­®¢ª 
602
	int 0x40
633
	int 0x40
Line 603... Line 634...
603
 
634
 
604
	mov ebx,(110 shl 16)+20
635
	add ebx,25 shl 16
605
	mov edx,7
636
	mov edx,7
Line 606... Line 637...
606
	int 0x40
637
	int 0x40
607
 
638
 
608
	mov ebx,(135 shl 16)+20
639
	add ebx,25 shl 16
Line 609... Line 640...
609
	mov edx,8
640
	mov edx,8
610
	int 0x40
641
	int 0x40
611
 
642
 
Line 612... Line 643...
612
	mov ebx,(160 shl 16)+20
643
	add ebx,25 shl 16
613
	mov edx,9
644
	mov edx,9
614
	int 0x40
645
	int 0x40
Line 615... Line 646...
615
 
646
 
616
	mov ebx,(185 shl 16)+20
647
	add ebx,25 shl 16
617
	mov edx,10
648
	mov edx,10
Line -... Line 649...
-
 
649
	int 0x40
-
 
650
 
-
 
651
	add ebx,25 shl 16
-
 
652
	mov edx,11
618
	int 0x40
653
	int 0x40
-
 
654
 
-
 
655
	add ebx,25 shl 16
-
 
656
	mov edx,12
-
 
657
	int 0x40
619
 
658
 
-
 
659
	add ebx,30 shl 16
-
 
660
	mov edx,13 ;業â஢ª  á奬ë
-
 
661
	int 0x40
-
 
662
 
-
 
663
	add ebx,25 shl 16
-
 
664
	mov edx,14
-
 
665
	int 0x40
-
 
666
 
620
	mov ebx,(210 shl 16)+20
667
	add ebx,25 shl 16
Line 621... Line 668...
621
	mov edx,11
668
	mov edx,15
622
	int 0x40
669
	int 0x40
623
 
670
 
Line 844... Line 891...
844
	@@:
891
	@@:
845
	cmp ah,13
892
	cmp ah,13
846
	jne @f
893
	jne @f
847
		call but_center
894
		call but_center
848
	@@:
895
	@@:
-
 
896
 
-
 
897
	;¯¥à¥¤¢¨¦¥­¨¥ ¢á¥å ®¡ê¥ªâ®¢ á奬ë
-
 
898
	cmp byte[tim_ch],0
-
 
899
	jne .no_move
-
 
900
	cmp ah,14
-
 
901
	jne @f
-
 
902
		stdcall pole_move_all, pole, -1, 0
-
 
903
		call redraw_pole
-
 
904
	@@:
-
 
905
	cmp ah,15
-
 
906
	jne @f
-
 
907
		stdcall pole_move_all, pole, 1, 0
-
 
908
		call redraw_pole
-
 
909
	@@:
-
 
910
	cmp ah,16 ;ᤢ¨£ áå¥¬ë ¢¢¥àå
-
 
911
	jne @f
-
 
912
		stdcall pole_move_all, pole, 0, -1
-
 
913
		call redraw_pole
-
 
914
	@@:
-
 
915
	cmp ah,17 ;ᤢ¨£ áå¥¬ë ¢­¨§
-
 
916
	jne @f
-
 
917
		stdcall pole_move_all, pole, 0, 1
-
 
918
		call redraw_pole
-
 
919
	@@:
-
 
920
	.no_move:
-
 
921
 
849
	cmp ah,20
922
	cmp ah,20
850
	jne @f
923
	jne @f
851
		call but_set_0
924
		call but_set_0
852
	@@:
925
	@@:
853
	cmp ah,21
926
	cmp ah,21
Line 1273... Line 1346...
1273
 
1346
 
1274
align 4
1347
align 4
1275
proc but_save_file
1348
proc but_save_file
1276
locals
1349
locals
-
 
1350
	napr dd ?
1277
	napr dd ?
1351
	s_param dd ? ;¯ à ¬¥âà ¤«ï ªà á¨¢®£® á®åà ­¥­¨ï
1278
endl
1352
endl
1279
pushad
1353
pushad
1280
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
1354
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
1281
	copy_path open_dialog_name,communication_area_default_path,file_name,0
1355
	copy_path open_dialog_name,communication_area_default_path,file_name,0
Line 1547... Line 1621...
1547
	mov ebx,pole_data
1621
	mov ebx,pole_data
1548
	mov dword[napr],ebx
1622
	mov dword[napr],ebx
1549
	mov edi,eax
1623
	mov edi,eax
Line 1550... Line 1624...
1550
 
1624
 
-
 
1625
	mov ecx,dword[esi]
1551
	mov ecx,dword[esi]
1626
	mov dword[s_param],0
1552
	.cycle4: ;横« ¯® ¢á¥¬ â®çª ¬
1627
	.cycle4: ;横« ¯® ¢á¥¬ â®çª ¬
1553
		add esi,4
1628
		add esi,4
1554
		mov ebx,[esi]
1629
		mov ebx,[esi]
1555
		imul ebx,sizeof.Cell
1630
		imul ebx,sizeof.Cell
Line 1572... Line 1647...
1572
 
1647
 
1573
			stdcall str_len,edi
1648
			stdcall str_len,edi
1574
			add edi,eax
1649
			add edi,eax
1575
			movzx eax,dh
1650
			movzx eax,dh
-
 
1651
			stdcall convert_int_to_str
-
 
1652
 
-
 
1653
			cmp dword[s_param],7 ;¤«ï ä®à¬ â  áâப¨
-
 
1654
			je .new_line
1576
			stdcall convert_int_to_str
1655
				inc dword[s_param]
-
 
1656
				stdcall str_cat,edi,txt_space
-
 
1657
			jmp @f
-
 
1658
			.new_line:
1577
			stdcall str_cat,edi,txt_space
1659
				mov dword[s_param],0
1578
			;stdcall str_cat,edi,txt_nl
1660
				stdcall str_cat,edi,txt_nl
1579
		@@:
1661
		@@:
1580
		dec ecx
1662
		dec ecx
-
 
1663
		jnz .cycle4
-
 
1664
		cmp dword[s_param],0
1581
		jnz .cycle4
1665
		je @f
-
 
1666
			stdcall str_cat,edi,txt_nl
Line 1582... Line 1667...
1582
		stdcall str_cat,edi,txt_nl
1667
		@@:
1583
 
1668
 
1584
	;*** á®åà ­¥­¨¥ ¨§®«ï樮­­ëå â®ç¥ª ***
1669
	;*** á®åà ­¥­¨¥ ¨§®«ï樮­­ëå â®ç¥ª ***
1585
	stdcall str_cat,edi,txt_sub_points
1670
	stdcall str_cat,edi,txt_sub_points