Subversion Repositories Kolibri OS

Rev

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

Rev 2501 Rev 2507
Line 48... Line 48...
48
include 'dll.inc'
48
include 'dll.inc'
49
include 'le_pole.inc'
49
include 'le_pole.inc'
50
include 'le_signal.inc'
50
include 'le_signal.inc'
Line 51... Line 51...
51
 
51
 
52
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
52
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 53... Line 53...
53
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 23.03.12',0 ;¯®¤¯¨áì ®ª­ 
53
caption db '‹®£¨ç¥áª¨¥ í«¥¬¥­âë 26.03.12',0 ;¯®¤¯¨áì ®ª­ 
54
 
54
 
55
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
55
panel_0_coord_top equ 5 ;¢¥àå­ïï ª®®à¤¨­ â  0-£® à鸞 ¯ ­¥«¨ ¨­áâà㬥­â®¢
56
panel_1_coord_top equ 35
56
panel_1_coord_top equ 35
Line 162... Line 162...
162
 
162
 
163
run_file_70 FileInfoBlock
163
run_file_70 FileInfoBlock
Line 164... Line 164...
164
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
164
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
165
 
165
 
166
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
166
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
Line 167... Line 167...
167
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*20
167
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*24
168
image_data_toolbar dd 0
168
image_data_toolbar dd 0
169
 
169
 
Line 496... Line 496...
496
			jmp .end_buf_wnd
496
			jmp .end_buf_wnd
497
		@@:
497
		@@:
498
		cmp byte[pen_mode],4
498
		cmp byte[pen_mode],4
499
		jne @f
499
		jne @f
500
			bt esi,1
500
			bt esi,1
501
			jc @f
501
			jc .rotate
502
			;०¨¬ ᮧ¤ ­¨ï í«¥¬¥­â®¢
502
			;०¨¬ ᮧ¤ ­¨ï í«¥¬¥­â®¢
503
			stdcall shem_element_creat, eax,ebx
503
			stdcall shem_element_creat, eax,ebx
504
			stdcall pole_paint, pole
504
			stdcall pole_paint, pole
505
			stdcall [buf2d_draw], buf_0
505
			stdcall [buf2d_draw], buf_0
506
			jmp .end_buf_wnd
506
			jmp .end_buf_wnd
-
 
507
			.rotate:
-
 
508
			;¯®¢®à®â í«¥¬¥­â®¢ ­  90 £à ¤ãᮢ
-
 
509
			stdcall element_is_click,eax,ebx
-
 
510
			test eax,eax
-
 
511
			jz .end_buf_wnd
-
 
512
				inc byte[eax+sp_offs_el_angle]
-
 
513
				and byte[eax+sp_offs_el_angle],3 ;¤«ï ª®­âà®«ï ­  ¯¥à¥¯®«­¥­¨¥
-
 
514
				call redraw_pole
-
 
515
			jmp .end_buf_wnd
507
		@@:
516
		@@:
Line 508... Line 517...
508
 
517
 
509
	.end_buf_wnd:
518
	.end_buf_wnd:
510
if debug
519
if debug
Line 603... Line 612...
603
pushad
612
pushad
604
	mcall 12,1
613
	mcall 12,1
Line 605... Line 614...
605
 
614
 
606
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
615
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
607
	xor eax,eax
616
	xor eax,eax
608
	mov ebx,(20 shl 16)+520
617
	mov ebx,(20 shl 16)+580
609
	mov ecx,(20 shl 16)+415
618
	mov ecx,(20 shl 16)+415
610
	mov edx,[sc.work]
619
	mov edx,[sc.work]
611
	or  edx,(3 shl 24)+0x10000000+0x20000000
620
	or  edx,(3 shl 24)+0x10000000+0x20000000
612
	mov edi,caption
621
	mov edi,caption
Line 713... Line 722...
713
	int 0x40
722
	int 0x40
Line 714... Line 723...
714
 
723
 
715
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
724
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
716
	add edx,(30 shl 16) ;center
725
	add edx,(30 shl 16) ;center
-
 
726
	int 0x40
-
 
727
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
-
 
728
	add edx,(25 shl 16) ;m
-
 
729
	int 0x40
-
 
730
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
-
 
731
	add edx,(25 shl 16) ;m
-
 
732
	int 0x40
-
 
733
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
-
 
734
	add edx,(25 shl 16) ;m
-
 
735
	int 0x40
-
 
736
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
-
 
737
	add edx,(25 shl 16) ;m
Line 717... Line 738...
717
	int 0x40
738
	int 0x40
718
 
739
 
719
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
740
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
720
	stdcall [buf2d_draw], buf_0
741
	stdcall [buf2d_draw], buf_0
Line 768... Line 789...
768
	mov eax,7
789
	mov eax,7
769
	mov ebx,[image_data_toolbar]
790
	mov ebx,[image_data_toolbar]
770
	mov ecx,(16 shl 16)+16
791
	mov ecx,(16 shl 16)+16
771
	mov edx,(62 shl 16)+panel_1_coord_top+2
792
	mov edx,(62 shl 16)+panel_1_coord_top+2
Line 772... Line 793...
772
 
793
 
773
	add ebx,IMAGE_TOOLBAR_ICON_SIZE*16
794
	add ebx,IMAGE_TOOLBAR_ICON_SIZE*15
Line 774... Line 795...
774
	int 0x40
795
	int 0x40
775
 
796
 
776
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
797
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
Line 813... Line 834...
813
	mov eax,7
834
	mov eax,7
814
	mov ebx,[image_data_toolbar]
835
	mov ebx,[image_data_toolbar]
815
	mov ecx,(16 shl 16)+16
836
	mov ecx,(16 shl 16)+16
816
	mov edx,(7 shl 16)+panel_2_coord_top+2 ;¨ª®­ª  áâ५ 
837
	mov edx,(7 shl 16)+panel_2_coord_top+2 ;¨ª®­ª  áâ५ 
Line 817... Line 838...
817
 
838
 
818
	add ebx,IMAGE_TOOLBAR_ICON_SIZE*11
839
	add ebx,IMAGE_TOOLBAR_ICON_SIZE*19
Line 819... Line 840...
819
	int 0x40
840
	int 0x40
820
 
841
 
821
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
842
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
Line 1449... Line 1470...
1449
	.cycle1:
1470
	.cycle1:
1450
		cmp esi,0
1471
		cmp esi,0
1451
		je .cycle1_end
1472
		je .cycle1_end
1452
		cmp word[esi],el_icon_elems ;¯®«ã祭¨¥ ç¥à¥§ esi ⨯ ¨ª®­ª¨
1473
		cmp word[esi],el_icon_elems ;¯®«ã祭¨¥ ç¥à¥§ esi ⨯ ¨ª®­ª¨
1453
		jne .end_add_p1
1474
		jne .end_add_p1
1454
			stdcall [tl_node_poi_get_data], esi, tree1
1475
;			stdcall [tl_node_poi_get_data], esi, tree1
1455
			pop ecx
1476
;			pop ecx
1456
			inc dword[shem_elems]
1477
			inc dword[shem_elems]
1457
 
1478
if 0
1458
			xor edx,edx ;edx - ­®¬¥à ¢å®¤­®© ­®£¨
1479
			xor edx,edx ;edx - ­®¬¥à ¢å®¤­®© ­®£¨
1459
			@@:
1480
			@@:
1460
				stdcall el_get_leg_coords, ecx,edx
1481
				stdcall el_get_leg_coords, ecx,edx
1461
				test eax,eax
1482
				test eax,eax
1462
				jz @f ;¥á«¨ ª®®à¤¨­ âë ­¥ ¢§ï«¨áì (eax=0 && ebx=0)
1483
				jz @f ;¥á«¨ ª®®à¤¨­ âë ­¥ ¢§ï«¨áì (eax=0 && ebx=0)
Line 1471... Line 1492...
1471
				.no_erase:
1492
				.no_erase:
1472
				inc edx
1493
				inc edx
1473
				jmp @b
1494
				jmp @b
1474
			@@:
1495
			@@:
1475
			;mov edx,(1 shl 16) ;edx - ­®¬¥à ¢ë室­®© ­®£¨
1496
			;mov edx,(1 shl 16) ;edx - ­®¬¥à ¢ë室­®© ­®£¨
1476
 
1497
end if
1477
		.end_add_p1:
1498
		.end_add_p1:
1478
		stdcall dword[tl_node_poi_get_next_info],esi,tree1
1499
		stdcall dword[tl_node_poi_get_next_info],esi,tree1
1479
		pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
1500
		pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
1480
		jmp .cycle1
1501
		jmp .cycle1
1481
	.cycle1_end:
1502
	.cycle1_end:
Line 2284... Line 2305...
2284
 
2305
 
2285
align 4
2306
align 4
2286
buf_0: dd 0 ;
2307
buf_0: dd 0 ;
2287
.l: dw 170 ;+4 left
2308
.l: dw 170 ;+4 left
2288
.t: dw panel_1_coord_top ;+6 top
2309
.t: dw panel_1_coord_top ;+6 top
2289
.w: dd 335 ;+8 w
2310
.w: dd 395 ;+8 w
2290
.h: dd 340 ;+12 h
2311
.h: dd 340 ;+12 h
2291
.color: dd 0 ;+16 color
2312
.color: dd 0 ;+16 color
Line 2292... Line 2313...
2292
	db 24 ;+20 bit in pixel
2313
	db 24 ;+20 bit in pixel
Line 2527... Line 2548...
2527
;input:
2548
;input:
2528
; eax = value
2549
; eax = value
2529
; edi = string buffer
2550
; edi = string buffer
2530
;output:
2551
;output:
2531
align 4
2552
align 4
2532
convert_int_to_str:
2553
proc convert_int_to_str uses eax ecx edx edi
2533
	pushad
-
 
2534
		mov dword[edi+1],0;0x20202020
2554
	mov dword[edi+1],0
2535
		call .str
2555
	call .str
2536
	popad
-
 
2537
	ret
2556
	ret
-
 
2557
endp
Line 2538... Line 2558...
2538
 
2558
 
2539
align 4
2559
align 4
2540
.str:
2560
.str:
2541
	mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
2561
	mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
2542
    ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®©
2562
    ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®©
2543
	cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
2563
	cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
2544
	jb @f
2564
	jb @f
2545
		xor edx,edx  ;®ç¨áâ¨âì edx
2565
		xor edx,edx  ;®ç¨áâ¨âì edx