Subversion Repositories Kolibri OS

Rev

Rev 3899 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3853 GerdtR 1
proc MovingWnd
2
local MySlot:DWORD
4336 GerdtR 3
	mcall	40,0	;SetMaskMessage 000b
3853 GerdtR 4
 
4336 GerdtR 5
	mcall	12,1	;RedrawWinBeg
3853 GerdtR 6
 
4336 GerdtR 7
	mcall	14
8
	xor	ebx,ebx
9
	xor	ecx,ecx
10
	mov	cx,ax
11
	shr	eax,16
12
	mov	cx,ax
13
	dec	ebx
14
	dec	ecx
15
	mcall	0,,,01000000h
16
	mcall	12,2	;RedrawWinEnd
3853 GerdtR 17
 
18
 
4336 GerdtR 19
	mov	eax,[SelIcon]
20
	call	DrawIconToArea
3853 GerdtR 21
 
4336 GerdtR 22
	mcall	37,4,IconArea,10100002h
23
	push	eax
24
	test	eax,eax
25
	jz	@f
26
	mov	ecx,eax
27
	mcall	37,5
3853 GerdtR 28
 
29
     @@:
4336 GerdtR 30
	mcall	9,RBProcInfo,-1    ;+30
31
	mcall	18,21,dword[RBProcInfo+30]
32
	mov	[MySlot],eax
3853 GerdtR 33
 
34
  .messages:
4336 GerdtR 35
	cmp	[MovingActiv],1
36
	jne	.close
37
	mcall	18,7
38
	cmp	eax,[MySlot]
39
	je	@f
40
	mcall	18,3,[MySlot]
3853 GerdtR 41
     @@:
42
 
4336 GerdtR 43
	mcall	5,1	;Yield
44
	jmp	.messages
3853 GerdtR 45
 
46
.close:
4336 GerdtR 47
	pop	ecx
48
	test	ecx,ecx
49
	jz	@f
50
	mcall	37,6
3853 GerdtR 51
     @@:
52
 
53
 
4336 GerdtR 54
	mcall	-1
3853 GerdtR 55
 
56
endp
57
 
58
 
59
 
60
;eax = NumIcon
61
proc DrawIconToArea  ;предназначен для иконок размером = 32x32
4336 GerdtR 62
	push	edi esi
3853 GerdtR 63
 
4336 GerdtR 64
	;mov     eax,[NumIcon]
65
	mov	edi,[IconsOffs+eax*4]
66
	xor	al,al
67
	or	ecx,-1
68
	repne	scasb
69
	repne	scasb
70
	repne	scasb
71
	mov	al,[edi]
72
	cmp	al,'9'
73
	ja	.PathToIcon
74
	cmp	al,'/'
75
	jne	.GetIconInd
3853 GerdtR 76
   .PathToIcon:
4336 GerdtR 77
	mov	al,30h		 ;заглушка!!!!!!!!!!!!!
78
	mov	byte[edi+1],0
3853 GerdtR 79
   .GetIconInd:
80
;int3
4336 GerdtR 81
	sub	al,30h
82
	cmp	byte[edi+1],0
83
	je	@f
84
	shl	eax,1
85
	lea	eax,[eax*4+eax]
86
	xor	edx,edx
87
	mov	dl,[edi+1]
88
	sub	dl,30h
89
	add	eax,edx
90
     @@:	     ;eax=num icon
91
	cmp	eax,[icon_count]
92
	jb	@f
93
	xor	eax,eax
3853 GerdtR 94
     @@:
4336 GerdtR 95
	test	eax,eax
96
	je	.DIA
97
	mov	ecx,eax
98
	xor	eax,eax
3853 GerdtR 99
      @@:
4336 GerdtR 100
	add	eax,32*32*4;IMG_SIZE*IMG_SIZE*4
101
	loop	@b
3853 GerdtR 102
     .DIA:
4336 GerdtR 103
	mov	esi,eax
104
	add	esi,[raw_pointer]
105
	add	esi,44
3853 GerdtR 106
 
4336 GerdtR 107
	mov	edi,IconArea;+((IMAGE_TOP_Y*ICON_SIZE)+((ICON_SIZE-IMG_SIZE)/2))*4
3853 GerdtR 108
;int3
4336 GerdtR 109
	mov	eax,32;IMG_SIZE
110
	mov	edx,eax
3853 GerdtR 111
      @@:
4336 GerdtR 112
	mov	ecx,eax
113
	rep	movsd
3853 GerdtR 114
     ;   add     edi,32*4
4336 GerdtR 115
	dec	edx
116
	jnz	@b
3853 GerdtR 117
 
4336 GerdtR 118
	pop	esi edi
119
	ret
3853 GerdtR 120
endp