Subversion Repositories Kolibri OS

Rev

Rev 7016 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7016 Rev 7437
Line 346... Line 346...
346
	mov	eax,ebx
346
	mov	eax,ebx
Line 347... Line 347...
347
 
347
 
348
	cmp	eax,[icon_count]
348
	cmp	eax,[icon_count]
Line 349... Line -...
349
	jae	DMessages
-
 
350
 
-
 
351
	mov	bl,10
-
 
352
	div	bl
-
 
353
 
-
 
354
	add	ah,30h
-
 
355
	test	al,al
-
 
356
	jz	@f
-
 
357
 
349
	jae	DMessages
358
	add	al,30h
-
 
359
	mov	byte[DAreaIcon],al
-
 
360
	mov	byte[DAreaIcon+1],ah
-
 
361
	mov	byte[DAreaIcon+2],0
-
 
362
	mov	dword[edtIcon.size],2
-
 
363
	jmp	.RedrawNum
-
 
364
 
350
 
365
      @@:
-
 
366
	mov	byte[DAreaIcon],ah
351
;       stdcall byteToHex,al,DAreaIcon  ;2
367
	mov	byte[DAreaIcon+1],0
-
 
368
	mov	dword[edtIcon.size],1
-
 
Line 369... Line 352...
369
	jmp	.RedrawNum
352
	stdcall intToStr,eax,DAreaIcon
Line 370... Line 353...
370
    .RedrawNum:
353
	mov	dword[edtIcon.size],edx
371
	
354
 
Line 645... Line 628...
645
 
628
 
646
	ret
629
	ret
Line 647... Line 630...
647
endp
630
endp
648
 
-
 
649
proc DrawSelIcon
-
 
650
 
631
 
651
	
632
proc DrawSelIcon
Line 652... Line 633...
652
	mov	edx,[sc.work]
633
	mov	edx,[sc.work]
653
	mcall 13,,<59,12>
634
	mcall 13,,<59,12>
Line 660... Line 641...
660
	cmp	byte[edi],0
641
	cmp	byte[edi],0
661
	jne	@f
642
	jne	@f
662
	ret
643
	ret
663
      @@:
644
      @@:
Line 664... Line -...
664
 
-
 
665
	mov	al,[edi]
-
 
666
	cmp	al,'9'
645
 
667
	ja	.PathToIcon
-
 
668
	cmp	al,'/'
646
	;stdcall hexToInt, edi
669
	jne	.GetIconInd
-
 
670
   .PathToIcon:
-
 
671
	mov	al,30h		 ;§ £«ã誠!!!!!!!!!!!!!
-
 
672
	mov	byte[edi+1],0
-
 
673
   .GetIconInd:
-
 
674
;int3
-
 
675
	sub	al,30h
-
 
676
	cmp	byte[edi+1],0
-
 
677
	je	@f
-
 
678
	shl	eax,1
-
 
679
	lea	eax,[eax*4+eax]
-
 
680
	xor	edx,edx
-
 
681
	mov	dl,[edi+1]
-
 
682
	sub	dl,30h
-
 
683
	add	eax,edx
647
	stdcall strToInt, edi
684
     @@:	     ;eax=num icon
648
     @@:	     ;eax=num icon
685
	cmp	eax,[icon_count]
649
	cmp	eax,[icon_count]
686
	jb	@f
650
	jb	@f
687
	xor	eax,eax
651
	xor	eax,eax
Line 723... Line 687...
723
 
687
 
Line 724... Line 688...
724
	mcall	7,DlgBufImg,,<30,15>
688
	mcall	7,DlgBufImg,,<30,15>
725
 
689
 
726
	ret
690
	ret
-
 
691
endp
-
 
692
 
-
 
693
;NOT USED
-
 
694
proc hexToInt strz:DWORD
-
 
695
	push	ebx
-
 
696
	mov	ebx,[strz]
-
 
697
	mov	al,[ebx]
-
 
698
	xor	edx,edx
-
 
699
.loop:
-
 
700
	xor	ecx,ecx
-
 
701
	inc	ebx
-
 
702
	shl	edx,4
-
 
703
	cmp	al,'0'
-
 
704
	jb	.err
-
 
705
	cmp	al,'9'
-
 
706
	jbe	.conv
-
 
707
	mov	ecx,10
-
 
708
	sub	al,11h
-
 
709
	cmp	al,'0'
-
 
710
	jb	.err
-
 
711
	cmp	al,'6'
-
 
712
	ja	.err
-
 
713
.conv:
-
 
714
	sub	al,30h
-
 
715
	add	dl,al
-
 
716
	mov	al,[ebx]
-
 
717
	add	dl,cl
-
 
718
	test	al,al
-
 
719
	jnz	.loop
-
 
720
	mov	eax,edx
-
 
721
	pop	ebx
-
 
722
	ret
-
 
723
.err:
-
 
724
	xor	eax,eax
-
 
725
	pop	ebx
-
 
726
	ret
-
 
727
endp
-
 
728
 
-
 
729
 
-
 
730
;NOT USED
-
 
731
proc byteToHex byti:BYTE,target:DWORD
-
 
732
	push	ebx
-
 
733
	mov	ebx,[target]
-
 
734
	mov	dl,[byti]
-
 
735
	rol	dl,4
-
 
736
	mov	ecx,2
-
 
737
.loop:
-
 
738
	mov	al,dl
-
 
739
	and	al,0xF
-
 
740
	cmp	al,10
-
 
741
	jae	@f
-
 
742
	add	al,0x30
-
 
743
	jmp	.n
-
 
744
@@:
-
 
745
	add	al,0x41-10
-
 
746
.n:
-
 
747
	mov	[ebx],al
-
 
748
	inc	ebx
-
 
749
	rol	dl,4
-
 
750
	loop	.loop
-
 
751
 
-
 
752
	mov	byte[ebx],0
-
 
753
@@:	pop	ebx
-
 
754
	ret
-
 
755
	jmp	@b
-
 
756
endp
-
 
757
 
-
 
758
 
-
 
759
proc strToInt strz:DWORD
-
 
760
	push	ebx edi esi
-
 
761
	stdcall strLen, [strz]
-
 
762
	xor	edx,edx
-
 
763
	xor	ebx,ebx
-
 
764
	xor	edi,edi
-
 
765
	std
-
 
766
	inc	ebx
-
 
767
	mov	esi,[strz]
-
 
768
	lea	esi,[esi+eax-2]
-
 
769
.loop:
-
 
770
	xor	eax,eax
-
 
771
	lodsb
-
 
772
	cmp	al,'0'
-
 
773
	jb	.err
-
 
774
	cmp	al,'9'
-
 
775
	ja	.err
-
 
776
 
-
 
777
	sub	al,0x30
-
 
778
	mul	ebx
-
 
779
	lea	ebx,[ebx*4+ebx] 	;ebx = ebx*10
-
 
780
	shl	ebx,1
-
 
781
	add	edi,eax
-
 
782
	cmp	esi,[strz]
-
 
783
	jae	.loop
-
 
784
	cld
-
 
785
	mov	eax,edi
-
 
786
	pop	esi edi ebx
-
 
787
	ret
-
 
788
.err:
-
 
789
	cld
-
 
790
	or	eax,-1
-
 
791
	pop	esi edi ebx
-
 
792
	ret
-
 
793
endp
-
 
794
 
-
 
795
 
-
 
796
;ret: target - string, edx - length string
-
 
797
proc intToStr inti:DWORD, target:DWORD
-
 
798
locals
-
 
799
   resl rb 16
-
 
800
endl
-
 
801
	lea	edi,[resl]
-
 
802
	mov	eax,[inti]
-
 
803
	xor	ecx,ecx
-
 
804
	mov	ebx,10
-
 
805
	jmp	.stlp
-
 
806
.loop:
-
 
807
	xor	edx,edx
-
 
808
	div	ebx
-
 
809
	mov	[edi],dl
-
 
810
	inc	edi
-
 
811
	inc	ecx
-
 
812
.stlp:	cmp	eax,10
-
 
813
	jae	.loop
-
 
814
	mov	[edi],al
-
 
815
	inc	ecx
-
 
816
	mov	edx,ecx
-
 
817
	mov	ebx,[target]
-
 
818
.conv:
-
 
819
	mov	al,[edi]
-
 
820
	add	al,0x30
-
 
821
	mov	[ebx],al
-
 
822
	inc	ebx
-
 
823
	dec	edi
-
 
824
	loop	.conv
-
 
825
	mov	byte[ebx],0
-
 
826
	ret
-
 
827
endp
-
 
828
 
-
 
829
;for 'ab',0  strLen = 3
-
 
830
proc strLen stringZ:DWORD
-
 
831
	push	edi
-
 
832
	xor	al,al
-
 
833
	mov	edi,[stringZ]
-
 
834
	or	ecx,-1
-
 
835
	repne	scasb
-
 
836
	sub	edi,[stringZ]
-
 
837
	mov	eax,edi
-
 
838
	pop	edi
-
 
839
	ret
-
 
840
endp
-
 
841