Subversion Repositories Kolibri OS

Rev

Rev 3899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3899 Rev 4336
Line 1... Line 1...
1
proc MovingWnd
1
proc MovingWnd
2
local MySlot:DWORD
2
local MySlot:DWORD
3
        mcall	40,0	;SetMaskMessage 000b
3
	mcall	40,0	;SetMaskMessage 000b
Line 4... Line 4...
4
 
4
 
Line 5... Line 5...
5
        mcall	12,1	;RedrawWinBeg
5
	mcall	12,1	;RedrawWinBeg
6
 
6
 
7
        mcall   14
7
	mcall	14
8
        xor     ebx,ebx
8
	xor	ebx,ebx
9
        xor     ecx,ecx
9
	xor	ecx,ecx
10
        mov     cx,ax
10
	mov	cx,ax
11
        shr     eax,16
11
	shr	eax,16
12
        mov     cx,ax
12
	mov	cx,ax
13
        dec     ebx
13
	dec	ebx
14
        dec     ecx
-
 
15
        mcall   0,,,01000000h
14
	dec	ecx
16
        ;mcall   0,IMG_SIZE,IMG_SIZE,01000000h
15
	mcall	0,,,01000000h
17
        mcall	12,2	;RedrawWinEnd
16
	mcall	12,2	;RedrawWinEnd
18
 
17
 
19
 
18
 
20
        mov     eax,[SelIcon]
19
	mov	eax,[SelIcon]
21
        call    DrawIconToArea
20
	call	DrawIconToArea
22
 
21
 
23
        mcall   37,4,IconArea,10100002h
22
	mcall	37,4,IconArea,10100002h
24
        push    eax
23
	push	eax
25
        test    eax,eax
24
	test	eax,eax
26
        jz      @f
25
	jz	@f
Line 27... Line 26...
27
        mov     ecx,eax
26
	mov	ecx,eax
28
        mcall   37,5
27
	mcall	37,5
29
 
28
 
30
     @@:
29
     @@:
Line 31... Line 30...
31
        mcall   9,RBProcInfo,-1    ;+30
30
	mcall	9,RBProcInfo,-1    ;+30
32
        mcall   18,21,dword[RBProcInfo+30]
31
	mcall	18,21,dword[RBProcInfo+30]
33
        mov     [MySlot],eax
32
	mov	[MySlot],eax
34
 
33
 
35
  .messages:
34
  .messages:
36
        cmp     [MovingActiv],1
35
	cmp	[MovingActiv],1
37
        jne     .close
36
	jne	.close
38
        mcall   18,7
37
	mcall	18,7
Line 39... Line 38...
39
        cmp     eax,[MySlot]
38
	cmp	eax,[MySlot]
40
        je      @f
39
	je	@f
Line 41... Line 40...
41
        mcall   18,3,[MySlot]
40
	mcall	18,3,[MySlot]
42
     @@:
41
     @@:
43
 
42
 
44
        mcall	5,1	;Yield
43
	mcall	5,1	;Yield
45
        jmp     .messages
44
	jmp	.messages
46
 
45
 
Line 47... Line 46...
47
.close:
46
.close:
Line 48... Line 47...
48
        pop     ecx
47
	pop	ecx
Line 49... Line 48...
49
        test    ecx,ecx
48
	test	ecx,ecx
50
        jz      @f
49
	jz	@f
51
        mcall   37,6
50
	mcall	37,6
Line 52... Line 51...
52
     @@:
51
     @@:
53
 
52
 
54
 
53
 
55
        mcall   -1
54
	mcall	-1
56
 
55
 
57
endp
56
endp
58
 
57
 
59
 
58
 
60
 
59
 
61
;eax = NumIcon
60
;eax = NumIcon
62
proc DrawIconToArea  ;¯à¥¤­ §­ ç¥­ ¤«ï ¨ª®­®ª à §¬¥à®¬ = 32x32
61
proc DrawIconToArea  ;¯à¥¤­ §­ ç¥­ ¤«ï ¨ª®­®ª à §¬¥à®¬ = 32x32
63
        push    edi esi
62
	push	edi esi
64
 
63
 
65
        ;mov     eax,[NumIcon]
64
	;mov     eax,[NumIcon]
66
        mov     edi,[IconsOffs+eax*4]
65
	mov	edi,[IconsOffs+eax*4]
67
        xor     al,al
66
	xor	al,al
68
        or      ecx,-1
67
	or	ecx,-1
69
        repne   scasb
68
	repne	scasb
70
        repne   scasb
69
	repne	scasb
71
        repne   scasb
70
	repne	scasb
72
        mov     al,[edi]
71
	mov	al,[edi]
73
        cmp     al,'9'
72
	cmp	al,'9'
74
        ja      .PathToIcon
73
	ja	.PathToIcon
75
        cmp     al,'/'
74
	cmp	al,'/'
76
        jne     .GetIconInd
75
	jne	.GetIconInd
77
   .PathToIcon:
76
   .PathToIcon:
78
        mov     al,30h           ;§ £«ã誠!!!!!!!!!!!!!
77
	mov	al,30h		 ;§ £«ã誠!!!!!!!!!!!!!
79
        mov     byte[edi+1],0
78
	mov	byte[edi+1],0
80
   .GetIconInd:
79
   .GetIconInd:
81
;int3
80
;int3
82
        sub     al,30h
81
	sub	al,30h
83
        cmp     byte[edi+1],0
82
	cmp	byte[edi+1],0
84
        je      @f
83
	je	@f
85
        shl     eax,1
84
	shl	eax,1
86
        lea     eax,[eax*4+eax]
85
	lea	eax,[eax*4+eax]
87
        xor     edx,edx
86
	xor	edx,edx
88
        mov     dl,[edi+1]
87
	mov	dl,[edi+1]
89
        sub     dl,30h
88
	sub	dl,30h
90
        add     eax,edx
89
	add	eax,edx
91
     @@:             ;eax=num icon
90
     @@:	     ;eax=num icon
92
        cmp     eax,[icon_count]
91
	cmp	eax,[icon_count]
93
        jb      @f
92
	jb	@f
Line 94... Line 93...
94
        xor     eax,eax
93
	xor	eax,eax
95
     @@:
94
     @@:
96
        test    eax,eax
95
	test	eax,eax
97
        je      .DIA
96
	je	.DIA
98
        mov     ecx,eax
97
	mov	ecx,eax
99
        xor     eax,eax
98
	xor	eax,eax
100
      @@:
99
      @@:
101
        add     eax,32*32*4;IMG_SIZE*IMG_SIZE*4
100
	add	eax,32*32*4;IMG_SIZE*IMG_SIZE*4
102
        loop    @b
101
	loop	@b
103
     .DIA:
102
     .DIA:
Line 104... Line 103...
104
        mov     esi,eax
103
	mov	esi,eax
105
        add     esi,[raw_pointer]
104
	add	esi,[raw_pointer]
106
        add     esi,44
105
	add	esi,44