Subversion Repositories Kolibri OS

Rev

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

Rev 3475 Rev 5917
Line 19... Line 19...
19
include 'strlen.inc'
19
include 'strlen.inc'
20
include 'obj_codes.inc'
20
include 'obj_codes.inc'
Line 21... Line 21...
21
 
21
 
Line 22... Line 22...
22
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
22
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
Line 23... Line 23...
23
 
23
 
Line 24... Line 24...
24
hed db 'kol_f_edit 17.04.13',0
24
hed db 'kol_f_edit 16.11.15',0
25
 
25
 
Line 73... Line 73...
73
			local .path_str
73
			local .path_str
74
			.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
74
			.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
75
			db 0
75
			db 0
76
		@@:
76
		@@:
77
		;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
77
		;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
78
		copy_path .path_str,[32],file_name,0x0
78
		copy_path .path_str,[32],file_name,0
79
	else
79
	else
80
		copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
80
		copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
81
	end if
81
	end if
Line 82... Line 82...
82
 
82
 
83
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
83
	stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
Line 84... Line -...
84
	mov [buf],eax
-
 
85
 
84
	mov [buf],eax
86
	mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
85
 
87
	mov [run_file_70.Function], 0
86
	mov [run_file_70.Function], 0
88
	mov [run_file_70.Position], 0
87
	mov [run_file_70.Position], 0
89
	mov [run_file_70.Flags], 0
88
	mov [run_file_70.Flags], 0
90
	mov [run_file_70.Count], dword size
89
	mov [run_file_70.Count], dword size
91
	m2m [run_file_70.Buffer], [buf]
90
	m2m [run_file_70.Buffer], eax
92
	mov byte[run_file_70+20], 0
-
 
93
	mov [run_file_70.FileName], file_name
91
	mov byte[run_file_70+20], 0
94
	mov ebx,run_file_70
92
	mov [run_file_70.FileName], file_name
95
	int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
93
	mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
96
	cmp ebx,0xffffffff
94
	cmp ebx,0xffffffff
97
	je @f
95
	je @f
98
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
96
		;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
Line 214... Line 212...
214
	mcall 40,0x27
212
	mcall 40,0x27
Line 215... Line 213...
215
 
213
 
216
	stdcall dword[tl_data_init], tree1
214
	stdcall dword[tl_data_init], tree1
Line 217... Line 215...
217
	stdcall dword[tl_data_init], tree2
215
	stdcall dword[tl_data_init], tree2
218
 
-
 
219
	copy_path fn_icon,sys_path,file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
216
 
220
	mov eax,70 ;load icon file
217
	copy_path fn_icon,sys_path,file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
221
	mov [run_file_70.Function], 0
218
	mov [run_file_70.Function], 0
222
	mov [run_file_70.Position], 54
219
	mov [run_file_70.Position], 54
223
	mov [run_file_70.Flags], 0
220
	mov [run_file_70.Flags], 0
224
	mov [run_file_70.Count], 0x300*count_main_icons
221
	mov [run_file_70.Count], 0x300*count_main_icons
225
	mov [run_file_70.Buffer], bmp_icon
222
	mov [run_file_70.Buffer], bmp_icon
226
	mov [run_file_70.rezerv], 0
223
	mov [run_file_70.rezerv], 0
227
	mov [run_file_70.FileName], file_name
-
 
Line 228... Line 224...
228
	mov ebx,run_file_70
224
	mov [run_file_70.FileName], file_name
229
	int 0x40
225
	mcall 70,run_file_70
230
 
226
 
231
	cmp ebx,-1
227
	cmp ebx,-1
Line 263... Line 259...
263
	stdcall mem.Free,[icon_font_s1] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
259
	stdcall mem.Free,[icon_font_s1] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
264
	stdcall [buf2d_conv_24_to_8], buf_font,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
260
	stdcall [buf2d_conv_24_to_8], buf_font,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
265
	stdcall [buf2d_convert_text_matrix], buf_font
261
	stdcall [buf2d_convert_text_matrix], buf_font
Line 266... Line 262...
266
 
262
 
267
 
263
 
268
	copy_path fn_obj_opt,sys_path,fp_obj_opt,0x0
-
 
269
	;load options file
264
	copy_path fn_obj_opt,sys_path,fp_obj_opt,0
270
	mov eax,70
265
	;load options file
271
	mov [run_file_70.Position], 0
266
	mov [run_file_70.Position], 0
272
	mov [run_file_70.Count], sizeof.ObjOpt*MAX_OBJ_TYPES+MAX_OBJ_CAPTIONS
267
	mov [run_file_70.Count], sizeof.ObjOpt*MAX_OBJ_TYPES+MAX_OBJ_CAPTIONS
273
	mov [run_file_70.Buffer], obj_opt
268
	mov [run_file_70.Buffer], obj_opt
274
	mov [run_file_70.FileName], fp_obj_opt
-
 
Line 275... Line 269...
275
	mov ebx,run_file_70
269
	mov [run_file_70.FileName], fp_obj_opt
276
	int 0x40
270
	mcall 70,run_file_70
277
 
271
 
278
	cmp ebx,-1
272
	cmp ebx,-1
Line 290... Line 284...
290
			cmp cx,0
284
			cmp cx,0
291
			jge .zero
285
			jge .zero
292
				xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
286
				xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
293
			.zero:
287
			.zero:
294
			shl ecx,16
288
			shl ecx,16
295
			stdcall dword[tl_node_add], eax, ecx, tree1 ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ®¡ê¥ªâ 
289
			stdcall dword[tl_node_add], tree1,ecx,eax ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ®¡ê¥ªâ 
296
			stdcall dword[tl_cur_next], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
290
			stdcall dword[tl_cur_next], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
297
			add eax,sizeof.ObjOpt ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ
291
			add eax,sizeof.ObjOpt ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ
298
			jmp @b
292
			jmp @b
299
		@@:
293
		@@:
300
		stdcall dword[tl_cur_beg], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢¢¥àå
294
		stdcall dword[tl_cur_beg], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢¢¥àå
Line 301... Line 295...
301
 
295
 
Line -... Line 296...
-
 
296
	.open_end:
302
	.open_end:
297
 
303
 
298
	stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
Line 304... Line 299...
304
	stdcall [ted_init], tedit0
299
	stdcall [ted_init], tedit0
305
	copy_path fn_syntax,sys_path,file_name,0x0
300
	copy_path fn_syntax,sys_path,file_name,0
306
 
-
 
307
	; *** init syntax file ***
301
 
308
	; ¯à®¢¥à塞 à §¬¥à ä ©«  ᨭ⠪á¨á 
302
	; *** init syntax file ***
309
	mov eax,70
303
	; ¯à®¢¥à塞 à §¬¥à ä ©«  ᨭ⠪á¨á 
310
	mov [run_file_70.Function], 5
304
	mov [run_file_70.Function], 5
311
	mov [run_file_70.Position], 0
305
	mov [run_file_70.Position], 0
312
	mov [run_file_70.Flags], 0
306
	mov [run_file_70.Flags], 0
313
	mov dword[run_file_70.Count], 0
307
	mov dword[run_file_70.Count], 0
314
	mov dword[run_file_70.Buffer], open_b
308
	mov dword[run_file_70.Buffer], open_b
315
	mov byte[run_file_70+20], 0
-
 
316
	mov dword[run_file_70.FileName], file_name
309
	mov byte[run_file_70+20], 0
317
	mov ebx,run_file_70
310
	mov dword[run_file_70.FileName], file_name
Line 318... Line 311...
318
	int 0x40
311
	mcall 70,run_file_70
319
	cmp eax,0
312
	cmp eax,0
Line 486... Line 479...
486
 
479
 
Line 487... Line 480...
487
; 10 30 50 70 90
480
; 10 30 50 70 90
488
 
481
 
489
	cmp [err_opn],1
-
 
490
	jne @f
-
 
491
		mov eax,4
-
 
492
		mov ebx,10*65536+35
482
	cmp [err_opn],1
493
		mov ecx,0x80ff0000
-
 
494
		mov edx,txtErrOpen
483
	jne @f
Line 495... Line 484...
495
		int 0x40
484
		mcall 4,10*65536+35,0x80ff0000,txtErrOpen
496
	@@:
485
	@@:
Line 544... Line 533...
544
button:
533
button:
545
	mcall 17
534
	mcall 17
546
	cmp ah,5
535
	cmp ah,5
547
	jne @f
536
	jne @f
548
		call but_open_proj
537
		call but_open_proj
-
 
538
		jmp still
549
	@@:
539
	@@:
550
	cmp ah,6
540
	cmp ah,6
551
	jne @f
541
	jne @f
552
		call but_save_proj
542
		call but_save_proj
-
 
543
		jmp still
553
	@@:
544
	@@:
554
	;cmp ah,10
545
	;cmp ah,10
555
	;jne @f
546
	;jne @f
556
		;call but_element_change
547
		;call but_element_change
557
	;@@:
548
	;@@:
558
	cmp ah,11
549
	cmp ah,11
559
	jne @f
550
	jne @f
560
		call but_show_constructor
551
		call but_show_constructor
-
 
552
		jmp still
561
	@@:
553
	@@:
562
	cmp ah,12
554
	cmp ah,12
563
	jne @f
555
	jne @f
564
		call but_show_code
556
		call but_show_code
-
 
557
		jmp still
565
	@@:
558
	@@:
566
	cmp ah,13
559
	cmp ah,13
567
	jne @f
560
	jne @f
568
		call but_update
561
		call but_update
-
 
562
		jmp still
569
	@@:
563
	@@:
570
	cmp ah,14
564
	cmp ah,14
571
	jne @f
565
	jne @f
572
		call but_save_asm
566
		call but_save_asm
-
 
567
		jmp still
573
	@@:
568
	@@:
574
	cmp ah,15
569
	cmp ah,15
575
	jne @f
570
	jne @f
576
		call but_show_invis
571
		call but_show_invis
-
 
572
		jmp still
577
	@@:
573
	@@:
578
	cmp ah,16
574
	cmp ah,16
579
	jne @f
575
	jne @f
580
		call but_show_syntax
576
		call but_show_syntax
-
 
577
		jmp still
581
	@@:
578
	@@:
582
	cmp ah,21
579
	cmp ah,21
583
	jne @f
580
	jne @f
584
		call but_obj_move_up
581
		call but_obj_move_up
-
 
582
		jmp still
585
	@@:
583
	@@:
586
	cmp ah,22
584
	cmp ah,22
587
	jne @f
585
	jne @f
588
		call but_obj_move_down
586
		call but_obj_move_down
-
 
587
		jmp still
589
	@@:
588
	@@:
590
	cmp ah,23
589
	cmp ah,23
591
	jne @f
590
	jne @f
592
		call but_obj_copy
591
		call but_obj_copy
-
 
592
		jmp still
593
	@@:
593
	@@:
594
	cmp ah,24
594
	cmp ah,24
595
	jne @f
595
	jne @f
596
		call but_obj_paste
596
		call but_obj_paste
-
 
597
		jmp still
597
	@@:
598
	@@:
598
	cmp ah,25
599
	cmp ah,25
599
	jne @f
600
	jne @f
600
		call on_file_object_select
601
		call on_file_object_select
-
 
602
		jmp still
601
	@@:
603
	@@:
602
	cmp ah,26
604
	cmp ah,26
603
	jne @f
605
	jne @f
604
		stdcall [tl_info_undo], tree2
606
		stdcall [tl_info_undo], tree2
605
		stdcall [tl_draw], tree2
607
		stdcall [tl_draw], tree2
-
 
608
		jmp still
606
	@@:
609
	@@:
607
	cmp ah,27
610
	cmp ah,27
608
	jne @f
611
	jne @f
609
		stdcall [tl_info_redo], tree2
612
		stdcall [tl_info_redo], tree2
610
		stdcall [tl_draw], tree2
613
		stdcall [tl_draw], tree2
-
 
614
		jmp still
611
	@@:
615
	@@:
612
	cmp ah,31
616
	cmp ah,31
613
	jne @f
617
	jne @f
614
		call on_add_object
618
		call on_add_object
-
 
619
		jmp still
615
	@@:
620
	@@:
616
	cmp ah,1
621
	cmp ah,1
617
	jne still
622
	jne still
618
.exit:
623
.exit:
619
	stdcall mem.Free,[icon_tl_sys]
624
	stdcall mem.Free,[icon_tl_sys]
Line 634... Line 639...
634
		stdcall mem.Free,[unpac_mem]
639
		stdcall mem.Free,[unpac_mem]
635
	@@:
640
	@@:
636
	mcall -1
641
	mcall -1
Line 637... Line 642...
637
 
642
 
-
 
643
align 4
-
 
644
open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
-
 
645
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
-
 
646
 
638
align 4
647
align 4
-
 
648
but_open_proj:
639
but_open_proj:
649
	copy_path open_dialog_name,communication_area_default_path,file_name,0
-
 
650
	pushad
-
 
651
	mov [OpenDialog_data.type],0
-
 
652
	stdcall [OpenDialog_Start],OpenDialog_data
640
	pushad
653
	cmp [OpenDialog_data.status],2
-
 
654
	je .open_end
-
 
655
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
641
	mov eax,70
656
 
642
	mov [run_file_70.Function], 0
657
	mov [run_file_70.Function], 5
643
	mov [run_file_70.Position], 0
658
	mov [run_file_70.Position], 0
644
	mov [run_file_70.Flags], 0
659
	mov [run_file_70.Flags], 0
645
	mov [run_file_70.Count], sizeof.object*MAX_CED_OBJECTS
660
	mov dword[run_file_70.Count], 0
646
	mov [run_file_70.Buffer], ced_info
661
	mov dword[run_file_70.Buffer], open_b
647
	mov [run_file_70.rezerv], 0
-
 
648
	push [edit1.text]
662
	mov byte[run_file_70+20], 0
649
	pop [run_file_70.FileName]
663
	mov dword[run_file_70.FileName], openfile_path
650
	mov ebx,run_file_70
-
 
Line -... Line 664...
-
 
664
	mcall 70,run_file_70
-
 
665
 
-
 
666
	mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
-
 
667
	mov [open_file_size],ecx
-
 
668
	stdcall mem.ReAlloc,[open_file_data],ecx
-
 
669
	mov [open_file_data],eax
-
 
670
	
-
 
671
	mov [run_file_70.Function], 0
-
 
672
	mov [run_file_70.Position], 0
-
 
673
	mov [run_file_70.Flags], 0
-
 
674
	mov dword[run_file_70.Count], ecx
-
 
675
	m2m dword[run_file_70.Buffer], eax
-
 
676
	mov byte[run_file_70+20], 0
651
	int 0x40
677
	mov dword[run_file_70.FileName], openfile_path
652
 
678
	mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©«
653
	cmp ebx,-1
679
	cmp ebx,0xffffffff
654
	mov [err_opn],1
-
 
655
	je .open_end ;if open file
-
 
656
		mov ecx,ced_info
-
 
657
		add ecx,ebx
680
	mov [err_opn],1
-
 
681
	je .open_end ;if open file
Line 658... Line 682...
658
		mov byte [ecx],0
682
		mov [err_opn],0
659
		mov [err_opn],0
683
		stdcall [edit_box_set_text], edit1,openfile_path
660
 
684
 
661
		stdcall dword[tl_info_clear], tree2
685
		stdcall dword[tl_info_clear], tree2
662
		mov eax,ced_info ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
686
		mov eax,[open_file_data] ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
663
		@@:
687
		@@:
Line 671... Line 695...
671
			cmp cx,0
695
			cmp cx,0
672
			jge .zero
696
			jge .zero
673
				xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
697
				xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
674
			.zero:
698
			.zero:
675
			shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨
699
			shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨
676
			mov cl,byte[eax++u_object.lvl-u_object] ;ã஢¥­ì ®¡ê¥ªâ 
700
			mov cl,byte[eax+u_object.lvl-u_object] ;ã஢¥­ì ®¡ê¥ªâ 
Line 677... Line 701...
677
 
701
 
678
			;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥
702
			;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥
Line 679... Line 703...
679
			mov ch,byte[eax++u_object.clo-u_object] ;§ ªàëâë©/®âªàëâë©
703
			mov ch,byte[eax+u_object.clo-u_object] ;§ ªàëâë©/®âªàëâë©
Line 680... Line 704...
680
 
704
 
681
			stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
705
			stdcall dword[tl_node_add], tree2,ecx,eax ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
682
 
706
 
683
			stdcall dword[tl_cur_next], tree2 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
707
			stdcall dword[tl_cur_next], tree2 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
Line 695... Line 719...
695
	ret
719
	ret
Line 696... Line 720...
696
 
720
 
697
;á®åà ­¥­¨¥ ä ©«  ¯à®íªâ  ­  ¤¨áª
721
;á®åà ­¥­¨¥ ä ©«  ¯à®íªâ  ­  ¤¨áª
698
align 4
722
align 4
-
 
723
but_save_proj:
699
but_save_proj:
724
	copy_path open_dialog_name,communication_area_default_path,file_name,0
-
 
725
	pushad
-
 
726
	mov [OpenDialog_data.type],1
-
 
727
	stdcall [OpenDialog_Start],OpenDialog_data
-
 
728
	cmp [OpenDialog_data.status],2
-
 
729
	je .end_save_file
Line -... Line 730...
-
 
730
	;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
700
	pushad
731
 
-
 
732
	;¡¥à¥¬ à §¬¥à ¯ ¬ïâ¨, ­¥®¡å®¤¨¬®© ¤«ï á®åà ­¥­¨ï ä ©« 
-
 
733
	xor ecx,ecx
-
 
734
	stdcall [tl_node_poi_get_info], tree2,0
-
 
735
	@@:
-
 
736
		cmp eax,0
-
 
737
		je @f
-
 
738
		inc ecx
-
 
739
		stdcall [tl_node_poi_get_next_info], tree2,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
-
 
740
		jmp @b
-
 
741
	@@:
-
 
742
	;movzx eax,word[tree2.info_size]
-
 
743
	imul ecx,sizeof.object ;eax
-
 
744
	add ecx,4 ;¬¥âª  ª®­æ  ä ©« 
-
 
745
	mov [open_file_size],ecx
701
 
746
	stdcall mem.ReAlloc,[open_file_data],ecx
-
 
747
	mov [open_file_data],eax
702
	mov edi,ced_info
748
 
703
 
749
	mov edi,[open_file_data]
704
	stdcall [tl_node_poi_get_info], 0,tree2
750
	stdcall [tl_node_poi_get_info], tree2,0
705
	pop edx
751
	mov edx,eax
706
	@@:
752
	@@:
707
		cmp edx,0
753
		cmp edx,0
708
		je @f
754
		je @f
Line 709... Line 755...
709
		stdcall [tl_node_poi_get_data], edx,tree2
755
		stdcall [tl_node_poi_get_data], tree2,edx
710
		pop esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
756
		mov esi,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
711
 
757
 
712
		mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ 
758
		mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ 
Line 722... Line 768...
722
			add ebx,[tree2.data_nodes] ;ebx - 㪠§ â¥«ì ®¡ê¥ªâ 㪠§ë¢ î騩 ⨯
768
			add ebx,[tree2.data_nodes] ;ebx - 㪠§ â¥«ì ®¡ê¥ªâ 㪠§ë¢ î騩 ⨯
723
			stdcall get_obj_npp,ebx
769
			stdcall get_obj_npp,ebx
724
			mov [esi+u_object.typid-u_object],eax
770
			mov [esi+u_object.typid-u_object],eax
725
			mov eax,esi
771
			mov eax,esi
726
			;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï
772
			;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï
727
			xor ecx,ecx
-
 
728
			mov cx,word[tree2.info_size]
773
			movzx ecx,word[tree2.info_size]
729
			cld
774
			cld
730
			rep movsb
775
			rep movsb
731
		;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ 
776
		;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ 
732
		pop dword[eax+u_object.typid-u_object]
777
		pop dword[eax+u_object.typid-u_object]
Line 733... Line 778...
733
 
778
 
734
		stdcall [tl_node_poi_get_next_info], edx,tree2
779
		stdcall [tl_node_poi_get_next_info], tree2,edx
735
		pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
780
		mov edx,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
736
		jmp @b
781
		jmp @b
737
	@@:
782
	@@:
738
	mov dword[edi],0 ;¬¥âª  ª®­æ  ä ©« 
783
	mov dword[edi],0 ;¬¥âª  ª®­æ  ä ©« 
739
	add edi,4
-
 
740
	mov ecx,edi
-
 
Line 741... Line 784...
741
	sub ecx,ced_info ;ecx - à §¬¥à á®å࠭塞®£® ä ©«        
784
	add edi,4
-
 
785
 
742
 
786
	stdcall [edit_box_set_text], edit1,openfile_path
743
	mov eax,70
787
	mov ecx,[open_file_size] ;ecx - à §¬¥à á®å࠭塞®£® ä ©«        
744
	mov [run_file_70.Function], 2
788
	mov [run_file_70.Function], 2
745
	mov [run_file_70.Position], 0
789
	mov [run_file_70.Position], 0
746
	mov [run_file_70.Flags], 0
790
	mov [run_file_70.Flags], 0
747
	mov [run_file_70.Count], ecx
791
	mov [run_file_70.Count], ecx
748
	mov [run_file_70.Buffer], ced_info
-
 
749
	mov [run_file_70.rezerv], 0
792
	m2m [run_file_70.Buffer], [open_file_data]
750
	push [edit1.text]
793
	mov [run_file_70.rezerv], 0
751
	pop [run_file_70.FileName]
-
 
Line -... Line 794...
-
 
794
	mov dword[run_file_70.FileName], openfile_path
752
	mov ebx,run_file_70
795
	mcall 70,run_file_70
753
	int 0x40
796
 
Line 754... Line 797...
754
 
797
	.end_save_file:
755
	popad
798
	popad
756
	ret
799
	ret
757
 
800
 
758
;¡¥à¥â ­®¬¥à ¯® ¯®à浪㠯® 㪠§ â¥«î ­  áâàãªâãàã ®¡ê¥ªâ 
801
;¡¥à¥â ­®¬¥à ¯® ¯®à浪㠯® 㪠§ â¥«î ­  áâàãªâãàã ®¡ê¥ªâ 
759
;output:
802
;output:
760
; eax - ­®¬¥à ®¡ê¥ªâ 
-
 
761
align 4
803
; eax - ­®¬¥à ®¡ê¥ªâ 
Line 762... Line 804...
762
proc get_obj_npp, p_obj_str:dword
804
align 4
763
	mov eax,2
-
 
764
	push ebx edx
805
proc get_obj_npp uses ebx ecx, p_obj_str:dword
765
	mov ebx,[p_obj_str]
806
	mov ecx,2
766
 
807
	mov ebx,[p_obj_str]
767
	stdcall [tl_node_poi_get_info], 0,tree2
808
 
768
	pop edx
809
	stdcall [tl_node_poi_get_info], tree2,0
Line 769... Line 810...
769
	@@:
810
	@@:
770
		cmp edx,0
-
 
771
		je .no_exist
811
		cmp eax,0
772
		cmp edx,ebx
812
		je .no_exist
773
		je @f
813
		cmp eax,ebx
774
 
814
		je @f
775
		inc eax
815
 
776
		stdcall [tl_node_poi_get_next_info], edx,tree2
816
		inc ecx
777
		pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
817
		stdcall [tl_node_poi_get_next_info], tree2,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
778
		jmp @b
818
		jmp @b
Line 779... Line 819...
779
	.no_exist: ;ª®£¤  ¨¤¥â áá뫪  ­  ­¥ áãé¥áâ¢ãî騩 ®¡ê¥ªâ
819
	.no_exist: ;ª®£¤  ¨¤¥â áá뫪  ­  ­¥ áãé¥áâ¢ãî騩 ®¡ê¥ªâ
780
		xor eax,eax ;®¡­ã«ï¥¬ 㪠§ â¥«ì, çâ®-¡ë ­¥ á®åà ­ïâì ¢ ä ©« ¬ãá®à
820
		xor ecx,ecx ;®¡­ã«ï¥¬ 㪠§ â¥«ì, çâ®-¡ë ­¥ á®åà ­ïâì ¢ ä ©« ¬ãá®à
781
	@@:
821
	@@:
782
	pop edx ebx
-
 
783
	ret
822
	mov eax,ecx
784
endp
823
	ret
Line 785... Line 824...
785
 
824
endp
786
;äã­ªæ¨ï ¤«ï á®åà ­¥­¨ï ᮧ¤ ­­®£® asm ä ©« 
825
 
787
align 4
826
;äã­ªæ¨ï ¤«ï á®åà ­¥­¨ï ᮧ¤ ­­®£® asm ä ©« 
788
but_save_asm:
827
align 4
789
	;stdcall [ted_but_save_file], tedit0,run_file_70,[edit_sav.text]
828
but_save_asm:
790
	push edi
829
	push edi
Line 839... Line 878...
839
on_file_object_select:
878
on_file_object_select:
840
	cmp byte[prop_wnd_run],0
879
	cmp byte[prop_wnd_run],0
841
	jne @f
880
	jne @f
842
		mov byte[prop_wnd_run],1
881
		mov byte[prop_wnd_run],1
843
		stdcall [tl_node_get_data], tree2
882
		stdcall [tl_node_get_data], tree2
844
		pop dword[foc_obj]
883
		mov dword[foc_obj],eax
845
		cmp dword[foc_obj],0
884
		cmp eax,0
846
		je @f
885
		je @f
847
			pushad
886
			pushad
848
			;¢á¥ ¤¥©áâ¢¨ï ¯® ­ áâனª¥ í«¥¬¥­â®¢ ã¯à ¢«¥­¨ï ¢ë¯®«­ïîâáï ¢ ®ª­¥ ᮠ᢮©á⢠¬¨
887
			;¢á¥ ¤¥©áâ¢¨ï ¯® ­ áâனª¥ í«¥¬¥­â®¢ ã¯à ¢«¥­¨ï ¢ë¯®«­ïîâáï ¢ ®ª­¥ ᮠ᢮©á⢠¬¨
849
			mcall 51,1,prop_start,prop_thread
888
			mcall 51,1,prop_start,prop_thread
850
			popad
889
			popad
Line 856... Line 895...
856
;¤®¡ ¢«ï¥â ­®¢ë© ®¡ê¥ªâ ¢ ®ª­® tree2
895
;¤®¡ ¢«ï¥â ­®¢ë© ®¡ê¥ªâ ¢ ®ª­® tree2
857
align 4
896
align 4
858
on_add_object:
897
on_add_object:
859
push eax ebx ecx
898
push eax ebx ecx
860
	stdcall [tl_node_get_data], tree1
899
	stdcall [tl_node_get_data], tree1
861
	pop eax
-
 
862
	cmp eax,0
900
	cmp eax,0
863
	je @f
901
	je @f
864
		xor ecx,ecx
902
		xor ecx,ecx
865
		mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ 
903
		mov cx,word[eax+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ 
Line 872... Line 910...
872
 
910
 
873
		shl ecx,16
911
		shl ecx,16
874
		stdcall mem_clear, u_object,sizeof.object
912
		stdcall mem_clear, u_object,sizeof.object
875
		mov ebx,dword[eax]
913
		mov ebx,dword[eax]
876
		mov dword[u_object.id],ebx
914
		mov dword[u_object.id],ebx
877
		stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
915
		stdcall dword[tl_node_add], tree2,ecx,u_object ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
878
	@@:
916
	@@:
879
pop ecx ebx eax
917
pop ecx ebx eax
880
	call draw_window
918
	call draw_window
Line 1237... Line 1275...
1237
.run_x:
1275
.run_x:
1238
rb 32
1276
rb 32
1239
.all_redraw dd 0 ;+80
1277
.all_redraw dd 0 ;+80
1240
.ar_offset  dd 1 ;+84
1278
.ar_offset  dd 1 ;+84
Line -... Line 1279...
-
 
1279
 
-
 
1280
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
-
 
1281
align 4
-
 
1282
OpenDialog_data:
-
 
1283
.type			dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
-
 
1284
.procinfo		dd procinfo	;+4
-
 
1285
.com_area_name		dd communication_area_name	;+8
-
 
1286
.com_area		dd 0	;+12
-
 
1287
.opendir_path		dd plugin_path	;+16
-
 
1288
.dir_default_path	dd default_dir ;+20
-
 
1289
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
-
 
1290
.draw_window		dd draw_window	;+28
-
 
1291
.status 		dd 0	;+32
-
 
1292
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
-
 
1293
.filename_area		dd filename_area	;+40
-
 
1294
.filter_area		dd Filter
-
 
1295
.x:
-
 
1296
.x_size 		dw 420 ;+48 ; Window X size
-
 
1297
.x_start		dw 10 ;+50 ; Window X position
-
 
1298
.y:
-
 
1299
.y_size 		dw 320 ;+52 ; Window y size
-
 
1300
.y_start		dw 10 ;+54 ; Window Y position
-
 
1301
 
-
 
1302
default_dir db '/rd/1',0
-
 
1303
 
-
 
1304
communication_area_name:
-
 
1305
	db 'FFFFFFFF_open_dialog',0
-
 
1306
open_dialog_name:
-
 
1307
	db 'opendial',0
-
 
1308
communication_area_default_path:
-
 
1309
	db '/rd/1/File managers/',0
-
 
1310
 
-
 
1311
Filter:
-
 
1312
dd Filter.end - Filter ;.1
-
 
1313
.1:
-
 
1314
db 'CED',0
-
 
1315
db 'ASM',0
-
 
1316
.end:
-
 
1317
db 0
-
 
1318
 
1241
 
1319
 
1242
data_of_code dd 0
1320
data_of_code dd 0
Line 1243... Line 1321...
1243
sc system_colors
1321
sc system_colors
Line 1244... Line -...
1244
 
-
 
1245
image_data dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg
-
 
1246
 
-
 
1247
ced_info object 0 ;on start == 0
1322
 
1248
	rb sizeof.object*(MAX_CED_OBJECTS-1)
1323
image_data dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg
1249
 
1324
 
1250
text_buffer db BUF_SIZE dup(0)
1325
text_buffer db BUF_SIZE dup(0)
1251
fn_obj_opt db 'ob_o.opt',0
1326
fn_obj_opt db 'ob_o.opt',0
Line 1393... Line 1468...
1393
	tl_node_lev_dec dd sz_tl_node_lev_dec
1468
	tl_node_lev_dec dd sz_tl_node_lev_dec
1394
	tl_node_poi_get_info dd sz_tl_node_poi_get_info
1469
	tl_node_poi_get_info dd sz_tl_node_poi_get_info
1395
	tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
1470
	tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
1396
	tl_node_poi_get_data dd sz_tl_node_poi_get_data
1471
	tl_node_poi_get_data dd sz_tl_node_poi_get_data
Line 1397... Line -...
1397
 
-
 
1398
	ted_but_save_file dd sz_ted_but_save_file
1472
 
1399
	ted_but_sumb_upper dd sz_ted_but_sumb_upper
1473
	ted_but_sumb_upper dd sz_ted_but_sumb_upper
1400
	ted_but_sumb_lover dd sz_ted_but_sumb_lover
1474
	ted_but_sumb_lover dd sz_ted_but_sumb_lover
1401
	ted_can_save dd sz_ted_can_save
1475
	ted_can_save dd sz_ted_can_save
1402
	ted_clear dd sz_ted_clear
1476
	ted_clear dd sz_ted_clear
Line 1407... Line 1481...
1407
	ted_init_syntax_file dd sz_ted_init_syntax_file
1481
	ted_init_syntax_file dd sz_ted_init_syntax_file
1408
	ted_is_select dd sz_ted_is_select
1482
	ted_is_select dd sz_ted_is_select
1409
	ted_key dd sz_ted_key
1483
	ted_key dd sz_ted_key
1410
	ted_mouse dd sz_ted_mouse
1484
	ted_mouse dd sz_ted_mouse
1411
	ted_open_file dd sz_ted_open_file
1485
	ted_open_file dd sz_ted_open_file
-
 
1486
	ted_save_file dd sz_ted_save_file
1412
	ted_text_add dd sz_ted_text_add
1487
	ted_text_add dd sz_ted_text_add
1413
	ted_but_select_word dd sz_ted_but_select_word
1488
	ted_but_select_word dd sz_ted_but_select_word
1414
	ted_but_cut dd sz_ted_but_cut
1489
	ted_but_cut dd sz_ted_but_cut
1415
	ted_but_copy dd sz_ted_but_copy
1490
	ted_but_copy dd sz_ted_but_copy
1416
	ted_but_paste dd sz_ted_but_paste
1491
	ted_but_paste dd sz_ted_but_paste
Line 1459... Line 1534...
1459
	sz_tl_node_lev_dec db 'tl_node_lev_dec',0
1534
	sz_tl_node_lev_dec db 'tl_node_lev_dec',0
1460
	sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
1535
	sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
1461
	sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
1536
	sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
1462
	sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
1537
	sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
Line 1463... Line -...
1463
 
-
 
1464
	sz_ted_but_save_file	db 'ted_but_save_file',0
1538
 
1465
	sz_ted_but_sumb_upper	db 'ted_but_sumb_upper',0
1539
	sz_ted_but_sumb_upper	db 'ted_but_sumb_upper',0
1466
	sz_ted_but_sumb_lover	db 'ted_but_sumb_lover',0
1540
	sz_ted_but_sumb_lover	db 'ted_but_sumb_lover',0
1467
	sz_ted_can_save 		db 'ted_can_save',0
1541
	sz_ted_can_save 		db 'ted_can_save',0
1468
	sz_ted_clear			db 'ted_clear',0
1542
	sz_ted_clear			db 'ted_clear',0
Line 1473... Line 1547...
1473
	sz_ted_init_syntax_file db 'ted_init_syntax_file',0
1547
	sz_ted_init_syntax_file db 'ted_init_syntax_file',0
1474
	sz_ted_is_select		db 'ted_is_select',0
1548
	sz_ted_is_select		db 'ted_is_select',0
1475
	sz_ted_key				db 'ted_key',0
1549
	sz_ted_key				db 'ted_key',0
1476
	sz_ted_mouse			db 'ted_mouse',0
1550
	sz_ted_mouse			db 'ted_mouse',0
1477
	sz_ted_open_file		db 'ted_open_file',0
1551
	sz_ted_open_file		db 'ted_open_file',0
-
 
1552
	sz_ted_save_file		db 'ted_save_file',0
1478
	sz_ted_text_add 		db 'ted_text_add',0
1553
	sz_ted_text_add 		db 'ted_text_add',0
1479
	sz_ted_but_select_word	db 'ted_but_select_word',0
1554
	sz_ted_but_select_word	db 'ted_but_select_word',0
1480
	sz_ted_but_cut			db 'ted_but_cut',0
1555
	sz_ted_but_cut			db 'ted_but_cut',0
1481
	sz_ted_but_copy 		db 'ted_but_copy',0
1556
	sz_ted_but_copy 		db 'ted_but_copy',0
1482
	sz_ted_but_paste		db 'ted_but_paste',0
1557
	sz_ted_but_paste		db 'ted_but_paste',0
Line 1562... Line 1637...
1562
	lib4 l_libs lib4_name, sys_path, library_path, system_dir4, err_message_found_lib4, head_f_l, import_msgbox_lib, err_message_import4, head_f_i
1637
	lib4 l_libs lib4_name, sys_path, library_path, system_dir4, err_message_found_lib4, head_f_l, import_msgbox_lib, err_message_import4, head_f_i
1563
load_lib_end:
1638
load_lib_end:
Line 1564... Line 1639...
1564
 
1639
 
1565
 
-
 
1566
align 16
1640
 
1567
procinfo process_information
1641
align 16
Line 1568... Line 1642...
1568
run_file_70 FileInfoBlock
1642
run_file_70 FileInfoBlock
1569
open_b rb 560
1643
open_b rb 560
1570
 
1644
 
-
 
1645
IncludeIGlobals
1571
IncludeIGlobals
1646
i_end:
1572
i_end:
1647
IncludeUGlobals
1573
IncludeUGlobals
1648
	procinfo process_information
1574
	buf_cmd_lin rb 1024
1649
	buf_cmd_lin rb 1024
1575
	file_name rb 1024 ;icon file path
1650
	file_name rb 1024 ;icon file path
Line 1580... Line 1655...
1580
	thread: ;¢¢¥àåã ¤®ç¥à­¨© á⥪ ¤«ï ®ª­  á®®¡é¥­¨ï
1655
	thread: ;¢¢¥àåã ¤®ç¥à­¨© á⥪ ¤«ï ®ª­  á®®¡é¥­¨ï
1581
	rb 1024
1656
	rb 1024
1582
stacktop: ;¢¢¥àåã á⥪ ®á­®¢­®© ¯à®£à ¬¬ë
1657
stacktop: ;¢¢¥àåã á⥪ ®á­®¢­®© ¯à®£à ¬¬ë
1583
	sys_path rb 1024
1658
	sys_path rb 1024
1584
	library_path rb 1024
1659
	library_path rb 1024
-
 
1660
	plugin_path rb 4096
-
 
1661
	openfile_path rb 4096
-
 
1662
	filename_area rb 256
1585
mem:
1663
mem: