Subversion Repositories Kolibri OS

Rev

Rev 4146 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4146 Rev 4336
1
DELTA_COLOR  equ 70
1
DELTA_COLOR	equ 70
2
COLOR_SEL_BUT equ 00F7092Dh
2
COLOR_SEL_BUT	equ 00F7092Dh
3
MAX_USER_BUTTONS equ 30
3
MAX_USER_BUTTONS equ 30
4
 
4
 
5
;---- thread for rbutton -----------------------------------------------------------------------
5
;---- thread for rbutton -----------------------------------------------------------------------
6
RButtonWin:
6
RButtonWin:
7
       if lang eq ru
7
	mcall	40,100101b	;SetMaskMessage 100101b
8
	mov	[MinRMenuW],18*6+10
-
 
9
       else
-
 
10
	mov	[MinRMenuW],15*6+10
-
 
11
       end if
-
 
12
 
-
 
13
 
-
 
14
 
-
 
15
	mcall	40,100101b	;SetMaskMessage 100101b
-
 
16
	mcall	48,3,sc,40
8
	mcall	48,3,sc,40
17
 
9
 
18
	mov	eax,[sc.work]	  ;¢ëç¨á«ï¥¬ 梥â ᢥ⫥¥ ä®­®¢®£®
10
	mov	eax,[sc.work]	  ;¢ëç¨á«ï¥¬ 梥â ᢥ⫥¥ ä®­®¢®£®
19
	rol	eax,16
11
	rol	eax,16
20
	add	al,DELTA_COLOR
12
	add	al,DELTA_COLOR
21
	jnc	@f
13
	jnc	@f
22
	mov	al,0FFh
14
	mov	al,0FFh
23
      @@:
15
      @@:
24
	rol	eax,16
16
	rol	eax,16
25
	add	al,DELTA_COLOR
17
	add	al,DELTA_COLOR
26
	jnc	@f
18
	jnc	@f
27
	mov	al,0FFh
19
	mov	al,0FFh
28
      @@:
20
      @@:
29
	add	ah,DELTA_COLOR
21
	add	ah,DELTA_COLOR
30
	jnc	@f
22
	jnc	@f
31
	mov	ah,0FFh
23
	mov	ah,0FFh
32
      @@:
24
      @@:
33
	mov	[sc.workH],eax
25
	mov	[sc.workH],eax
34
 
26
 
35
	mov	eax,[sc.work]	  ;¢ëç¨á«ï¥¬ 梥â ⥬­¥¥ ä®­®¢®£®
27
	mov	eax,[sc.work]	  ;¢ëç¨á«ï¥¬ 梥â ⥬­¥¥ ä®­®¢®£®
36
	rol	eax,16
28
	rol	eax,16
37
	sub	al,DELTA_COLOR
29
	sub	al,DELTA_COLOR
38
	jnc	@f
30
	jnc	@f
39
	mov	al,0FFh
31
	mov	al,0FFh
40
      @@:
32
      @@:
41
	rol	eax,16
33
	rol	eax,16
42
	sub	al,DELTA_COLOR
34
	sub	al,DELTA_COLOR
43
	jnc	@f
35
	jnc	@f
44
	mov	al,0FFh
36
	mov	al,0FFh
45
      @@:
37
      @@:
46
	sub	ah,DELTA_COLOR
38
	sub	ah,DELTA_COLOR
47
	jnc	@f
39
	jnc	@f
48
	mov	ah,0FFh
40
	mov	ah,0FFh
49
      @@:
41
      @@:
50
	mov	[sc.workL],eax
42
	mov	[sc.workL],eax
51
 
43
 
52
 
44
 
53
 
45
 
54
	stdcall GetNumIcon,[MouseX],[MouseY],-1
46
	stdcall GetNumIcon,[MouseX],[MouseY],-1
55
	mov	[SelIcon],eax
47
	mov	[SelIcon],eax
56
 
48
 
57
		      ;¢ëáâ ¢«ï¥¬ ¯¥à¢®­ ç «ì­ë¥ §­ ç¥­¨ï
49
		      ;¢ëáâ ¢«ï¥¬ ¯¥à¢®­ ç «ì­ë¥ §­ ç¥­¨ï
58
	m2m	[RMenuW],[MinRMenuW]
50
	m2m	[RMenuW],[MinRMenuW]
59
 
51
 
60
	cmp	[SelIcon],-1
52
	cmp	[SelIcon],-1
61
	jne	.RBW1
53
	jne	.RBW1
62
;----------- ¥á«¨ ª«¨ª ­¥ ¯® ¨ª®­ª¥ ------------------------------------------------
54
;----------- ¥á«¨ ª«¨ª ­¥ ¯® ¨ª®­ª¥ ------------------------------------------------
63
	mov	[NumMenuButt],0
55
	mov	[NumMenuButt],0
64
 
56
 
65
	mcall	70,fiIni
57
	mcall	70,fiIni
66
	mcall	68,12,dword[bufIni+32]	;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¯®¤¯¨á¥© ¨ ¯ã⥩ § ¯ã᪠
58
	mcall	68,12,dword[bufIni+32]	;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¯®¤¯¨á¥© ¨ ¯ã⥩ § ¯ã᪠
67
	mov	[RBMenuCP],eax		;GetUserBut ¡¥àñâ ®âá ¯¥à¢®­ ç «ì­ë© 㪠§ â¥«ì ­  ¯ ¬ïâì
59
	mov	[RBMenuCP],eax		;GetUserBut ¡¥àñâ ®âá ¯¥à¢®­ ç «ì­ë© 㪠§ â¥«ì ­  ¯ ¬ïâì
68
	stdcall [ini_enum_keys],IconIni,secRButt,GetUserBut
60
	stdcall [ini_enum_keys],IconIni,secRButt,GetUserBut
69
 
61
 
70
	mov	ebx,[NumMenuButt]
62
	mov	ebx,[NumMenuButt]
71
	add	[NumMenuButt],4
63
	add	[NumMenuButt],4
72
 
64
 
73
	mov	[RBMenuCP+ebx*8],RMenuRedrawFon
65
	mov	[RBMenuCP+ebx*8],RMenuRedrawFon
74
	mov	[RBMenuCP+ebx*8+8],RMenuAlign
66
	mov	[RBMenuCP+ebx*8+8],RMenuAlign
75
	cmp	[bFixIcons],1
67
	cmp	[bFixIcons],1
76
	je	@f
68
	je	@f
77
	mov	[RBMenuCP+ebx*8+16],RMenuOffMoving
69
	mov	[RBMenuCP+ebx*8+16],RMenuOffMoving
78
	jmp	.RBW11
70
	jmp	.RBW11
79
    @@:
71
    @@:
80
	mov	[RBMenuCP+ebx*8+16],RMenuOnMoving
72
	mov	[RBMenuCP+ebx*8+16],RMenuOnMoving
81
    .RBW11:
73
    .RBW11:
82
 
74
 
83
	mov	[RBMenuCP+ebx*8+24],RMenuAdd
75
	mov	[RBMenuCP+ebx*8+24],RMenuAdd
84
 
76
 
85
	mov	[RBMenuCP+ebx*8+4],0
77
	mov	[RBMenuCP+ebx*8+4],0
86
	mov	[RBMenuCP+ebx*8+8+4],0
78
	mov	[RBMenuCP+ebx*8+8+4],0
87
	mov	[RBMenuCP+ebx*8+16+4],0
79
	mov	[RBMenuCP+ebx*8+16+4],0
88
	mov	[RBMenuCP+ebx*8+24+4],0
80
	mov	[RBMenuCP+ebx*8+24+4],0
89
 
81
 
90
 
82
 
91
	jmp	.RBW2
83
	jmp	.RBW2
92
;----------- ¥á«¨ ª«¨ª ¯® ¨ª®­ª¥ ------------------------------------------------
84
;----------- ¥á«¨ ª«¨ª ¯® ¨ª®­ª¥ ------------------------------------------------
93
.RBW1:
85
.RBW1:
94
	xor	ebx,ebx
86
	xor	ebx,ebx
95
	mov	[NumMenuButt],5
87
	mov	[NumMenuButt],5
96
 
88
 
97
	mov	[RBMenuCP+ebx*8],RMenuRedrawFon
89
	mov	[RBMenuCP+ebx*8],RMenuRedrawFon
98
	mov	[RBMenuCP+ebx*8+8],RMenuAlign
90
	mov	[RBMenuCP+ebx*8+8],RMenuAlign
99
	cmp	[bFixIcons],1
91
	cmp	[bFixIcons],1
100
	je	@f
92
	je	@f
101
	mov	[RBMenuCP+ebx*8+16],RMenuOffMoving
93
	mov	[RBMenuCP+ebx*8+16],RMenuOffMoving
102
	jmp	.RBW21
94
	jmp	.RBW21
103
    @@:
95
    @@:
104
	mov	[RBMenuCP+ebx*8+16],RMenuOnMoving
96
	mov	[RBMenuCP+ebx*8+16],RMenuOnMoving
105
    .RBW21:
97
    .RBW21:
106
	mov	[RBMenuCP+ebx*8+24],RMenuDel
98
	mov	[RBMenuCP+ebx*8+24],RMenuDel
107
	mov	[RBMenuCP+ebx*8+32],RMenuProp
99
	mov	[RBMenuCP+ebx*8+32],RMenuProp
108
 
100
 
109
	mov	[RBMenuCP+ebx*8+4],0
101
	mov	[RBMenuCP+ebx*8+4],0
110
	mov	[RBMenuCP+ebx*8+8+4],0
102
	mov	[RBMenuCP+ebx*8+8+4],0
111
	mov	[RBMenuCP+ebx*8+16+4],0
103
	mov	[RBMenuCP+ebx*8+16+4],0
112
	mov	[RBMenuCP+ebx*8+24+4],0
104
	mov	[RBMenuCP+ebx*8+24+4],0
113
	mov	[RBMenuCP+ebx*8+32+4],0
105
	mov	[RBMenuCP+ebx*8+32+4],0
114
 
106
 
115
;-------------------------------------------------------------------------------
107
;-------------------------------------------------------------------------------
116
.RBW2:
108
.RBW2:
117
 
109
 
118
	cmp	[SelIcon],-1
110
	cmp	[SelIcon],-1
119
	jne	@f
111
	jne	@f
120
	mov	eax,[NumMenuButt]
112
	mov	eax,[NumMenuButt]
121
	shl	eax,4
113
	shl	eax,4
122
	mov	[RMenuH],ax
114
	mov	[RMenuH],ax
123
	jmp	.rbw1
115
	jmp	.rbw1
124
      @@:
116
      @@:
125
	mov	[RMenuH],16*5
117
	mov	[RMenuH],16*5
126
    .rbw1:
118
    .rbw1:
127
 
119
 
128
	add	[RMenuW],3		;­  à ¬ªã
120
	add	[RMenuW],3		;­  à ¬ªã
129
	add	[RMenuH],3		;­  à ¬ªã
121
	add	[RMenuH],3		;­  à ¬ªã
130
 
122
 
131
RBWRedraw:
123
RBWRedraw:
132
	mcall	12,1	;RedrawWinBeg
124
	mcall	12,1	;RedrawWinBeg
133
	mov	ebx,[MouseX]
125
	mov	ebx,[MouseX]
134
	shl	ebx,16
126
	shl	ebx,16
135
	mov	bx,[RMenuW]
127
	mov	bx,[RMenuW]
136
 
128
 
137
	mov	ecx,[MouseY]
129
	mov	ecx,[MouseY]
138
	shl	ecx,16
130
	shl	ecx,16
139
	mov	cx,[RMenuH]
131
	mov	cx,[RMenuH]
140
 
132
 
141
	mov	edx,01000000h
133
	mov	edx,01000000h
142
	mov	esi,01000000h
134
	mov	esi,01000000h
143
	xor	eax,eax
135
	xor	eax,eax
144
	int	40h
136
	int	40h
145
 
137
 
146
	and	ebx,0FFFFh	;ä®­®¢ë© ¯àאַ㣮«ì­¨ª
138
	and	ebx,0FFFFh	;ä®­®¢ë© ¯àאַ㣮«ì­¨ª
147
	inc	bx
139
	inc	bx
148
	and	ecx,0FFFFh
140
	and	ecx,0FFFFh
149
	inc	cx
141
	inc	cx
150
	mcall	13,,,[sc.work]
142
	mcall	13,,,[sc.work]
151
 
143
 
152
       ;----------- ®¯à¥¤¥«ï¥¬ ¨ à¨á㥬 ª­®¯ª¨
144
       ;----------- ®¯à¥¤¥«ï¥¬ ¨ à¨á㥬 ª­®¯ª¨
153
	mov	ecx,[NumMenuButt]
145
	mov	ecx,[NumMenuButt]
154
  .DrawUB:
146
  .DrawUB:
155
	push	ecx
147
	push	ecx
156
 
148
 
157
		mov	eax,[NumMenuButt]
149
		mov	eax,[NumMenuButt]
158
	sub	eax,ecx
150
	sub	eax,ecx
159
	mov	edx,eax      ;button ID = ®â 0 ¤® NumMenuButt
151
	mov	edx,eax      ;button ID = ®â 0 ¤® NumMenuButt
160
	or	edx,60000000h
152
	or	edx,60000000h
161
	shl	eax,4+16	  ;*16*10000h
153
	shl	eax,4+16	  ;*16*10000h
162
	mov	ecx,eax
154
	mov	ecx,eax
163
	mov	cx,16
155
	mov	cx,16
164
 
156
 
165
	xor	ebx,ebx
157
	xor	ebx,ebx
166
	mov	bx,[RMenuW]
158
	mov	bx,[RMenuW]
167
	mov	esi,[sc.work]
159
	mov	esi,[sc.work]
168
	mcall	8			;®¯à¥¤¥«¨«¨
160
	mcall	8			;®¯à¥¤¥«¨«¨
169
 
161
 
170
	mov	ebx,70000h
162
	mov	ebx,70000h
171
	shr	ecx,16
163
	shr	ecx,16
172
	mov	bx,cx
164
	mov	bx,cx
173
	add	bx,7
165
	add	bx,7
174
 
166
 
175
	mov	ecx,[sc.work_text]
167
	mov	ecx,[sc.work_text]
176
	or	ecx,80000000h
168
	or	ecx,80000000h
177
 
169
 
178
	mov	eax,[NumMenuButt]
170
	mov	eax,[NumMenuButt]
179
	sub	eax,[esp]
171
	sub	eax,[esp]
180
	mov	edx,[RBMenuCP+eax*8]
172
	mov	edx,[RBMenuCP+eax*8]
181
	mcall	4
173
	mcall	4
182
 
174
 
183
 
175
 
184
	pop	ecx
176
	pop	ecx
185
	loop	.DrawUB
177
	loop	.DrawUB
186
  ;---------------
178
  ;---------------
187
 
179
 
188
; ®¡à ¬«ïî騩 ¯àאַ㣮«ì­¨ª
180
; ®¡à ¬«ïî騩 ¯àאַ㣮«ì­¨ª
189
	xor	ebx,ebx 	   ;¢¥àå
181
	xor	ebx,ebx 	   ;¢¥àå
190
	mov	bx,[RMenuW]
182
	mov	bx,[RMenuW]
191
	xor	ecx,ecx
183
	xor	ecx,ecx
192
	mcall	38,,,[sc.workL]
184
	mcall	38,,,[sc.workL]
193
 
185
 
194
	mov	bx,[RMenuW]	    ;¯à ¢®
186
	mov	bx,[RMenuW]	    ;¯à ¢®
195
	shl	ebx,16
187
	shl	ebx,16
196
	mov	bx,[RMenuW]
188
	mov	bx,[RMenuW]
197
	xor	ecx,ecx
189
	xor	ecx,ecx
198
	mov	cx,[RMenuH]
190
	mov	cx,[RMenuH]
199
	mcall
191
	mcall
200
 
192
 
201
	xor	ebx,ebx 		 ;­¨§
193
	xor	ebx,ebx 		 ;­¨§
202
	mov	bx,[RMenuW]
194
	mov	bx,[RMenuW]
203
	mov	cx,[RMenuH]
195
	mov	cx,[RMenuH]
204
	shl	ecx,16
196
	shl	ecx,16
205
	mov	cx,[RMenuH]
197
	mov	cx,[RMenuH]
206
	mcall
198
	mcall
207
 
199
 
208
	xor	ebx,ebx 	      ;«¥¢®
200
	xor	ebx,ebx 	      ;«¥¢®
209
	xor	ecx,ecx
201
	xor	ecx,ecx
210
	mov	cx,[RMenuH]
202
	mov	cx,[RMenuH]
211
	mcall
203
	mcall
212
 
204
 
213
 
205
 
214
; ᢥâ«ë© «¥¢ë© ¢¥àå­¨© 㣮«
206
; ᢥâ«ë© «¥¢ë© ¢¥àå­¨© 㣮«
215
	xor	ebx,ebx
207
	xor	ebx,ebx
216
	mov	bx,[RMenuW]
208
	mov	bx,[RMenuW]
217
	add	ebx,1*10000h-1
209
	add	ebx,1*10000h-1
218
	mov	ecx,00010001h
210
	mov	ecx,00010001h
219
	mcall	 ,,,[sc.workH]
211
	mcall	 ,,,[sc.workH]
220
 
212
 
221
	mov	ebx,00010001h
213
	mov	ebx,00010001h
222
	xor	ecx,ecx
214
	xor	ecx,ecx
223
	mov	cx,[RMenuH]
215
	mov	cx,[RMenuH]
224
	add	ecx,1*10000h-1
216
	add	ecx,1*10000h-1
225
	mcall
217
	mcall
226
 
218
 
227
 
219
 
228
;ª®­¥æ à¨á®¢ ­¨ï
220
;ª®­¥æ à¨á®¢ ­¨ï
229
	mcall	12,2	;RedrawWinEnd
221
	mcall	12,2	;RedrawWinEnd
230
;-------------------------------------------------------------------
222
;-------------------------------------------------------------------
231
 
223
 
232
	mcall	9,RBProcInfo,-1 	;GetThreadInfo RBProcInfo,-1
224
	mcall	9,RBProcInfo,-1 	;GetThreadInfo RBProcInfo,-1
233
	mcall	18,21,dword[RBProcInfo+30]
225
	mcall	18,21,dword[RBProcInfo+30]
234
	m2m	dword[RBSlot],eax
226
	m2m	dword[RBSlot],eax
235
 
227
 
236
RBWMessages:
228
RBWMessages:
237
	mcall	10		;WaitMessage
229
	mcall	10		;WaitMessage
238
	dec	eax
230
	dec	eax
239
	jz	RBWRedraw
231
	jz	RBWRedraw
240
	sub	eax,2
232
	sub	eax,2
241
	jz	RBWButton
233
	jz	RBWButton
242
	sub	eax,3
234
	sub	eax,3
243
	jz	RBWMouse
235
	jz	RBWMouse
244
	jmp	RBWMessages
236
	jmp	RBWMessages
245
 
237
 
246
RBWButton:
238
RBWButton:
247
	mcall	17		;GetButtonPressed
239
	mcall	17		;GetButtonPressed
248
	shr	eax,8
240
	shr	eax,8
249
 
241
 
250
	mov	ebx,eax
242
	mov	ebx,eax
251
	mov	eax,[RBMenuCP+ebx*8+4] ;¥á«¨ ᤥáì 0, â® ª«¨ª ¯® áâ ­¤ àâ­®© ª­®¯ª¥(ª®â®à ï ­¥ ¢ ini)
243
	mov	eax,[RBMenuCP+ebx*8+4] ;¥á«¨ ᤥáì 0, â® ª«¨ª ¯® áâ ­¤ àâ­®© ª­®¯ª¥(ª®â®à ï ­¥ ¢ ini)
252
	test	eax,eax
244
	test	eax,eax
253
	jnz	.RBWB
245
	jnz	.RBWB
254
	mov	eax,[RBMenuCP+ebx*8]  ;ᬮâਬ, 㪠§ â¥«ì ­  ª ªãî ­ ¤¯¨áì ¢ ¯®¤¯¨á¨
246
	mov	eax,[RBMenuCP+ebx*8]  ;ᬮâਬ, 㪠§ â¥«ì ­  ª ªãî ­ ¤¯¨áì ¢ ¯®¤¯¨á¨
255
	cmp	eax,RMenuRedrawFon		    ; ¨ ¯® ­¥© ¢ë¡¨à ¥¬ ¤¥©á⢨¥
247
	cmp	eax,RMenuRedrawFon		    ; ¨ ¯® ­¥© ¢ë¡¨à ¥¬ ¤¥©á⢨¥
256
	jz	RBRedrawFon
248
	jz	RBRedrawFon
257
	cmp	eax,RMenuAlign
249
	cmp	eax,RMenuAlign
258
	jz	RBAlign
250
	jz	RBAlign
259
	cmp	eax,RMenuOffMoving
251
	cmp	eax,RMenuOffMoving
260
	jz	RBFixIcons
252
	jz	RBFixIcons
261
	cmp	eax,RMenuOnMoving
253
	cmp	eax,RMenuOnMoving
262
	jz	RBFixIcons
254
	jz	RBFixIcons
263
	cmp	eax,RMenuAdd
255
	cmp	eax,RMenuAdd
264
	jz	RBAdd
256
	jz	RBAdd
265
	cmp	eax,RMenuDel
257
	cmp	eax,RMenuDel
266
	jz	RBDelete
258
	jz	RBDelete
267
	cmp	eax,RMenuProp
259
	cmp	eax,RMenuProp
268
	jz	RBPropeties
260
	jz	RBPropeties
269
 
261
 
270
	jmp	RBWExit
262
	jmp	RBWExit
271
   .RBWB:
263
   .RBWB:
272
	mov	dword[fiRunProg+8],0
264
	mov	dword[fiRunProg+8],0
273
	mov	dword[fiRunProg+21],eax
265
	mov	dword[fiRunProg+21],eax
274
	mcall	70,fiRunProg
266
	mcall	70,fiRunProg
275
 
267
 
276
	jmp	RBWExit
268
	jmp	RBWExit
277
 
269
 
278
RBWMouse:
270
RBWMouse:
279
	call	MouseInWin
271
	call	MouseInWin
280
	jnc	.RBWMnoInWin	      ;¥á«¨ ¢­¥ ®ª­ , â® ¯à®áâ® ¢®ááâ ­ ¢«¨¢ ¥¬ ¯à¥¤ë¤ãéãî ª­®¯ªã
272
	jnc	.RBWMnoInWin	      ;¥á«¨ ¢­¥ ®ª­ , â® ¯à®áâ® ¢®ááâ ­ ¢«¨¢ ¥¬ ¯à¥¤ë¤ãéãî ª­®¯ªã
281
 
273
 
282
	mcall	37,1	      ;¯®«®¦¥­¨¥ ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
274
	mcall	37,1	      ;¯®«®¦¥­¨¥ ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
283
	and	eax,0FFF0h	;­ã¦¥­ ⮫쪮 Y, ¯à¨çñ¬ ®ªà㣫ñ­­ë© ¤® ¢¥àå­¥© â®çª¨ ªà â­®© 16(¢ëá®â  ª­®¯ª¨)
275
	and	eax,0FFF0h	;­ã¦¥­ ⮫쪮 Y, ¯à¨çñ¬ ®ªà㣫ñ­­ë© ¤® ¢¥àå­¥© â®çª¨ ªà â­®© 16(¢ëá®â  ª­®¯ª¨)
284
	cmp	[PredItem],eax
276
	cmp	[PredItem],eax
285
	je	.RBWMendLightBut
277
	je	.RBWMendLightBut
286
 
278
 
287
	shr	eax,4		   ;¥á«¨ ¬ëèì ­  ­¨¦­¥© à ¬ª¥, â® â ª¦¥ ⮫쪮 ¢®ááâ ­®¢¨âì ¯à¥¤ë¤ãéãî ª­®¯ªã
279
	shr	eax,4		   ;¥á«¨ ¬ëèì ­  ­¨¦­¥© à ¬ª¥, â® â ª¦¥ ⮫쪮 ¢®ááâ ­®¢¨âì ¯à¥¤ë¤ãéãî ª­®¯ªã
288
	cmp	eax,[NumMenuButt]
280
	cmp	eax,[NumMenuButt]
289
	jae	.RBWMnoInWin
281
	jae	.RBWMnoInWin
290
 
282
 
291
	cmp	[PredItem],-1	   ;¢®ááâ ­®¢«¥­¨¥ ¯à¥¤ë¤ã饩 ª­®¯ª¨
283
	cmp	[PredItem],-1	   ;¢®ááâ ­®¢«¥­¨¥ ¯à¥¤ë¤ã饩 ª­®¯ª¨
292
	je	@f
284
	je	@f
293
 
285
 
294
	stdcall DrawRBLine,[PredItem],0
286
	stdcall DrawRBLine,[PredItem],0
295
 
287
 
296
      @@:
288
      @@:
297
 
289
 
298
	call	MouseInWin
290
	call	MouseInWin
299
	jnc	@f
291
	jnc	@f
300
	mcall	37,1	      ;¯®«®¦¥­¨¥ ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
292
	mcall	37,1	      ;¯®«®¦¥­¨¥ ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
301
	and	eax,0FFF0h	;­ã¦¥­ ⮫쪮 Y, ¯à¨çñ¬ ®ªà㣫ñ­­ë© ¤® ¢¥àå­¥© â®çª¨ ªà â­®© 16(¢ëá®â  ª­®¯ª¨)
293
	and	eax,0FFF0h	;­ã¦¥­ ⮫쪮 Y, ¯à¨çñ¬ ®ªà㣫ñ­­ë© ¤® ¢¥àå­¥© â®çª¨ ªà â­®© 16(¢ëá®â  ª­®¯ª¨)
302
	mov	[PredItem],eax
294
	mov	[PredItem],eax
303
	stdcall DrawRBLine,eax,1
295
	stdcall DrawRBLine,eax,1
304
 
296
 
305
      @@:
297
      @@:
306
	jmp	.RBWMendLightBut
298
	jmp	.RBWMendLightBut
307
 
299
 
308
 
300
 
309
  .RBWMnoInWin:
301
  .RBWMnoInWin:
310
	cmp	[PredItem],-1	   ;¢®ááâ ­®¢«¥­¨¥ ¯à¥¤ë¤ã饩 ª­®¯ª¨
302
	cmp	[PredItem],-1	   ;¢®ááâ ­®¢«¥­¨¥ ¯à¥¤ë¤ã饩 ª­®¯ª¨
311
	je	.RBWMendLightBut
303
	je	.RBWMendLightBut
312
 
304
 
313
	stdcall DrawRBLine,[PredItem],0
305
	stdcall DrawRBLine,[PredItem],0
314
	mov	[PredItem],-1
306
	mov	[PredItem],-1
315
 
307
 
316
  .RBWMendLightBut:
308
  .RBWMendLightBut:
317
	mcall	37,2		;GetMouseKey
309
	mcall	37,2		;GetMouseKey
318
	test	eax,111b
310
	test	eax,111b
319
	jz	RBWMessages
311
	jz	RBWMessages
320
 
312
 
321
	call	MouseInWin
313
	call	MouseInWin
322
	jc	RBWMessages
314
	jc	RBWMessages
323
 
315
 
324
RBWExit:
316
RBWExit:
325
	cmp	[SelIcon],-1
317
	cmp	[SelIcon],-1
326
	jne	@f
318
	jne	@f
327
	mcall	68,13,[RBMenuCP]			;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì á ¯®¤¯¨áﬨ ¨ ¯ãâﬨ ª ¯à®£ ¬
319
	mcall	68,13,[RBMenuCP]			;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì á ¯®¤¯¨áﬨ ¨ ¯ãâﬨ ª ¯à®£ ¬
328
      @@:
320
      @@:
329
	mov	[RButtonActiv],0
321
	mov	[RButtonActiv],0
330
	mcall	-1	;ExitProcess
322
	mcall	-1	;ExitProcess
331
 
323
 
332
 
324
 
333
RBRedrawFon:
325
RBRedrawFon:
334
	mcall	15,3
326
	mcall	15,3
335
	jmp	RBWExit
327
	jmp	RBWExit
336
 
328
 
337
RBAlign:
329
RBAlign:
338
	call	AlignIcons
330
	call	AlignIcons
339
 
331
 
340
	m2m	[PIcoDB],[BegData]
332
	m2m	[PIcoDB],[BegData]
341
	stdcall [ini_enum_sections],IconIni,Ini_SavePos
333
	stdcall [ini_enum_sections],IconIni,Ini_SavePos
342
 
334
 
343
	mov	dword[fiRunProg+8],WarningSave
335
	mov	dword[fiRunProg+8],WarningSave
344
	mov	dword[fiRunProg+21],pthNotify
336
	mov	dword[fiRunProg+21],pthNotify
345
	mcall	70,fiRunProg
337
	mcall	70,fiRunProg
346
	mov	[bNotSave],0
338
	mov	[bNotSave],0
347
 
339
 
348
	jmp	RBRedrawFon
340
	jmp	RBRedrawFon
349
 
341
 
350
RBFixIcons:
342
RBFixIcons:
351
	xor	dword[bFixIcons],1
343
	xor	dword[bFixIcons],1
352
 
344
 
353
	cmp	[bNotSave],0
345
	cmp	[bNotSave],0
354
	je	@f
346
	je	@f
355
 
347
 
356
	mov	dword[fiRunProg+8],WarningSave
348
	mov	dword[fiRunProg+8],WarningSave
357
	mov	dword[fiRunProg+21],pthNotify
349
	mov	dword[fiRunProg+21],pthNotify
358
	mcall	70,fiRunProg
350
	mcall	70,fiRunProg
359
	mov	[bNotSave],0
351
	mov	[bNotSave],0
360
 
352
 
361
      @@:
353
      @@:
362
	jmp	RBWExit
354
	jmp	RBWExit
363
 
355
 
364
RBAdd:
356
RBAdd:
365
	cmp	[DlgAddActiv],1
357
	cmp	[DlgAddActiv],1
366
	je	RBWSetActivWin
358
	je	RBWSetActivWin
367
	mov	[DlgAddActiv],1
359
	mov	[DlgAddActiv],1
368
 
360
 
369
	mcall	51,1,DlgAdd,stack_dlg		;CreateThread DlgAdd,stack_dlg
361
	mcall	51,1,DlgAdd,stack_dlg		;CreateThread DlgAdd,stack_dlg
370
	jmp	RBWExit
362
	jmp	RBWExit
371
 
363
 
372
RBDelete:
364
RBDelete:
373
	mov	eax,[SelIcon]
365
	mov	eax,[SelIcon]
374
	mov	eax,[IconsOffs+eax*4]
366
	lea	eax,[IconsID+eax*4]
375
	stdcall [ini_del_section],IconIni,eax
367
	stdcall [ini_del_section],IconIni,eax
376
 
368
 
377
	stdcall DelIcon,[SelIcon]
369
	stdcall DelIcon,[SelIcon]
378
 
370
	mov	ebx,[SelIcon]
-
 
371
	lea	edi,[IconsID+ebx*4-4]
-
 
372
	lea	esi,[edi+4]
-
 
373
	mov	ecx,[MaxNumIcon]
-
 
374
	sub	ecx,[SelIcon]
-
 
375
;dph ecx
-
 
376
	test	ecx,ecx
-
 
377
	jz	@f
-
 
378
	rep movsd
-
 
379
     @@:
-
 
380
;debug_newline
-
 
381
;dpsP IconsID+4*0
-
 
382
;dps ' '
-
 
383
;dpsP IconsID+4*1
-
 
384
;dps ' '
-
 
385
;dpsP IconsID+4*2
-
 
386
;dps ' '
-
 
387
;dpsP IconsID+4*3
-
 
388
;dps ' '
-
 
389
;dpsP IconsID+4*4
-
 
390
;dps ' '
-
 
391
;dpsP IconsID+4*5
-
 
392
;dps ' '
-
 
393
;dpsP IconsID+4*6
-
 
394
;dps ' '
-
 
395
;dpsP IconsID+4*7
-
 
396
;dps ' '
-
 
397
;dpsP IconsID+4*8
-
 
398
;dps ' '
-
 
399
;dpsP IconsID+4*9
-
 
400
;dps ' '
-
 
401
;dpsP IconsID+4*10
-
 
402
;dps ' '
-
 
403
;dpsP IconsID+4*11
-
 
404
;dps ' '
-
 
405
;dpsP IconsID+4*12
-
 
406
;dps ' '
-
 
407
;dpsP IconsID+4*13
-
 
408
;dps ' '
-
 
409
;dpsP IconsID+4*14
-
 
410
;dps ' '
-
 
411
;dpsP IconsID+4*15
-
 
412
;dps ' '
-
 
413
;dpsP IconsID+4*16
-
 
414
;dps ' '
-
 
415
;dpsP IconsID+4*17
-
 
416
;debug_newline
-
 
417
 
-
 
418
 
379
	mov	dword[fiRunProg+8],WarningSave
419
	mov	dword[fiRunProg+8],WarningSave
380
	mov	dword[fiRunProg+21],pthNotify
420
	mov	dword[fiRunProg+21],pthNotify
381
	mcall	70,fiRunProg
421
	mcall	70,fiRunProg
382
	mov	[bNotSave],0
422
	mov	[bNotSave],0
383
 
423
 
384
	jmp	RBRedrawFon
424
	jmp	RBRedrawFon
385
 
425
 
386
RBPropeties:
426
RBPropeties:
387
	cmp	[DlgAddActiv],1
427
	cmp	[DlgAddActiv],1
388
	je	RBWSetActivWin
428
	je	RBWSetActivWin
389
	mov	[DlgAddActiv],1
429
	mov	[DlgAddActiv],1
390
 
430
 
391
	mcall	51,1,DlgProp,stack_dlg		;CreateThread DlgProp,stack_dlg
431
	mcall	51,1,DlgProp,stack_dlg		;CreateThread DlgProp,stack_dlg
392
	jmp	RBWExit
432
	jmp	RBWExit
393
 
433
 
394
RBWSetActivWin:
434
RBWSetActivWin:
395
	mcall	18,3,[slotDlgAdd]
435
	mcall	18,3,[slotDlgAdd]
396
	jmp	RBWExit
436
	jmp	RBWExit
397
 
437
 
398
proc DrawRBLine y,active
438
proc DrawRBLine y,active
399
 
439
 
400
	xor	ebx,ebx
440
	xor	ebx,ebx
401
	mov	bx,[RMenuW]
441
	mov	bx,[RMenuW]
402
	add	ebx,2*10000h-3
442
	add	ebx,2*10000h-3
403
	mov	ecx,[y]
443
	mov	ecx,[y]
404
	add	ecx,2
444
	add	ecx,2
405
	shl	ecx,16
445
	shl	ecx,16
406
	mov	cx,16;-1-2
446
	mov	cx,16;-1-2
407
	cmp	[active],1
447
	cmp	[active],1
408
	jne	@f
448
	jne	@f
409
	mov	edx,[sc.work_button]
449
	mov	edx,[sc.work_button]
410
	jmp	.L1
450
	jmp	.L1
411
       @@:
451
       @@:
412
	mov	edx,[sc.work]
452
	mov	edx,[sc.work]
413
      .L1:
453
      .L1:
414
	mcall	13
454
	mcall	13
415
 
455
 
416
;----------------------------------------------
456
;----------------------------------------------
417
	xor	ebx,ebx 	   ;¢¥àå
457
	xor	ebx,ebx 	   ;¢¥àå
418
	mov	bx,[RMenuW]
458
	mov	bx,[RMenuW]
419
	add	ebx,2*10000h-3
459
	add	ebx,2*10000h-3
420
	mov	cx,word[y]
460
	mov	cx,word[y]
421
	shl	ecx,16
461
	shl	ecx,16
422
	mov	cx,word[y]
462
	mov	cx,word[y]
423
	add	ecx,00020002h
463
	add	ecx,00020002h
424
 
464
 
425
	cmp	[active],1
465
	cmp	[active],1
426
	jne	@f
466
	jne	@f
427
	mov	edx,[sc.workL]
467
	mov	edx,[sc.workL]
428
	jmp	.L3
468
	jmp	.L3
429
       @@:
469
       @@:
430
	mov	edx,[sc.work]
470
	mov	edx,[sc.work]
431
      .L3:
471
      .L3:
432
 
472
 
433
	mcall	38
473
	mcall	38
434
 
474
 
435
	mov	ebx,00020002h		 ;«¥¢®
475
	mov	ebx,00020002h		 ;«¥¢®
436
	mov	cx,word[y]
476
	mov	cx,word[y]
437
	shl	ecx,16
477
	shl	ecx,16
438
	mov	cx,word[y]
478
	mov	cx,word[y]
439
	add	ecx,00020002h+16
479
	add	ecx,00020002h+16
440
 
480
 
441
	cmp	[active],1
481
	cmp	[active],1
442
	jne	@f
482
	jne	@f
443
	mov	edx,[sc.workL]
483
	mov	edx,[sc.workL]
444
 
484
 
445
       @@:
485
       @@:
446
 
486
 
447
	mcall
487
	mcall
448
 
488
 
449
	xor	ebx,ebx 		 ;­¨§
489
	xor	ebx,ebx 		 ;­¨§
450
	mov	bx,[RMenuW]
490
	mov	bx,[RMenuW]
451
	add	ebx,2*10000h-3
491
	add	ebx,2*10000h-3
452
	mov	cx,word[y]
492
	mov	cx,word[y]
453
	shl	ecx,16
493
	shl	ecx,16
454
	mov	cx,word[y]
494
	mov	cx,word[y]
455
	add	ecx,16*10000h+16+00020002h
495
	add	ecx,16*10000h+16+00020002h
456
 
496
 
457
	cmp	[active],1
497
	cmp	[active],1
458
	jne	@f
498
	jne	@f
459
	mov	edx,[sc.workH]
499
	mov	edx,[sc.workH]
460
       @@:
500
       @@:
461
 
501
 
462
	mcall
502
	mcall
463
 
503
 
464
	mov	bx,[RMenuW]		    ;¯à ¢®
504
	mov	bx,[RMenuW]		    ;¯à ¢®
465
	shl	ebx,16
505
	shl	ebx,16
466
	mov	bx,[RMenuW]
506
	mov	bx,[RMenuW]
467
	add	ebx,-2*10000h-2
507
	add	ebx,-2*10000h-2
468
	mov	cx,word[y]
508
	mov	cx,word[y]
469
	shl	ecx,16
509
	shl	ecx,16
470
	mov	cx,word[y]
510
	mov	cx,word[y]
471
	add	ecx,00020002h+16
511
	add	ecx,00020002h+16
472
 
512
 
473
	cmp	[active],1
513
	cmp	[active],1
474
	jne	@f
514
	jne	@f
475
	mov	edx,[sc.workH]
515
	mov	edx,[sc.workH]
476
       @@:
516
       @@:
477
 
517
 
478
	mcall
518
	mcall
479
 
519
 
480
	mov	eax,[y]
520
	mov	eax,[y]
481
	shr	eax,4
521
	shr	eax,4
482
	mov	edx,[RBMenuCP+eax*8]
522
	mov	edx,[RBMenuCP+eax*8]
483
 
523
 
484
	xor	ebx,ebx
524
	xor	ebx,ebx
485
	mov	ebx,[y]
525
	mov	ebx,[y]
486
	add	ebx,7*10000h+7
526
	add	ebx,7*10000h+7
487
 
527
 
488
	cmp	[active],1
528
	cmp	[active],1
489
	jne	@f
529
	jne	@f
490
	mov	ecx,[sc.work_button_text]
530
	mov	ecx,[sc.work_button_text]
491
	jmp	.L2
531
	jmp	.L2
492
       @@:
532
       @@:
493
	mov	ecx,[sc.work_text]
533
	mov	ecx,[sc.work_text]
494
      .L2:
534
      .L2:
495
 
535
 
496
	or	ecx,80000000h
536
	or	ecx,80000000h
497
 
537
 
498
	mcall	4
538
	mcall	4
499
 
539
 
500
	ret
540
	ret
501
endp
541
endp
502
 
542
 
503
 
-
 
504
proc MouseInWin        ;Carry flag = 1, ¥á«¨ ª«¨ª ¢ ®ª­¥
543
proc MouseInWin        ;Carry flag = 1, ¥á«¨ ª«¨ª ¢ ®ª­¥
505
	mcall	37,0		;GetMousePos
544
	mcall	37,0		;GetMousePos
506
	xor	ebx,ebx
545
	xor	ebx,ebx
507
	mov	bx,ax		;y
546
	mov	bx,ax		;y
508
	shr	eax,16		;x
547
	shr	eax,16		;x
509
 
548
 
510
	xor	ecx,ecx
549
	xor	ecx,ecx
511
	mov	cx,bx
550
	mov	cx,bx
512
	mov	bx,ax
551
	mov	bx,ax
513
 
552
 
514
	mcall	34
553
	mcall	34
515
	cmp	eax,[RBSlot]
554
	cmp	eax,[RBSlot]
516
	jne	@f
555
	jne	@f
517
	stc
556
	stc
518
	ret
557
	ret
519
      @@:
558
      @@:
520
	clc
559
	clc
521
	ret
560
	ret
522
endp
561
endp
523
 
562
 
524
 
-
 
525
proc AlignIcons
563
proc AlignIcons
526
local posX:WORD,\
564
local posX:WORD,\
527
      posY:WORD,\
565
      posY:WORD,\
528
      negatX:WORD,\
566
      negatX:WORD,\
529
      negatY:WORD
567
      negatY:WORD
530
 
568
 
531
	xor	ebx,ebx
569
	xor	ebx,ebx
532
 
570
 
533
	mov	ecx,[MaxNumIcon]
571
	mov	ecx,[MaxNumIcon]
534
	test	ecx,ecx
572
	test	ecx,ecx
535
	jnz	.AlignIco
573
	jnz	.AlignIco
536
	ret
574
	ret
537
 .AlignIco:
575
 .AlignIco:
538
	push	ecx
576
	push	ecx
539
	or	ecx,-1
577
	or	ecx,-1
540
	mov	edi,dword[IconsOffs+ebx]
578
	mov	edi,dword[IconsOffs+ebx]
541
	xor	eax,eax
579
	xor	eax,eax
542
	repne	scasb
580
	repne	scasb
543
	repne	scasb
581
	repne	scasb
544
	repne	scasb
582
	repne	scasb
545
	repne	scasb
583
	repne	scasb
546
 
584
 
547
	mov	dword[negatX],0
585
	mov	dword[negatX],0
548
 
586
 
549
     ;-------- ¯à¥®¡à §ã¥¬ ª®®à¤¨­ âë ¢ ¯®«®¦¨â¥«ì­ë¥
587
     ;-------- ¯à¥®¡à §ã¥¬ ª®®à¤¨­ âë ¢ ¯®«®¦¨â¥«ì­ë¥
550
	mov	ax,[edi+2]
588
	mov	ax,[edi+2]
551
	test	ax,8000h
589
	test	ax,8000h
552
	jz	@f
590
	jz	@f
553
	neg	ax
591
	neg	ax
554
	mov	word[negatX],1
592
	mov	word[negatX],1
555
      @@:
593
      @@:
556
	mov	[posX],ax
594
	mov	[posX],ax
557
 
595
 
558
	mov	ax,[edi]
596
	mov	ax,[edi]
559
	test	ax,8000h
597
	test	ax,8000h
560
	jz	@f
598
	jz	@f
561
	neg	ax
599
	neg	ax
562
	mov	word[negatY],1
600
	mov	word[negatY],1
563
      @@:
601
      @@:
564
	mov	[posY],ax
602
	mov	[posY],ax
565
 
603
 
566
      ;-----
604
      ;-----
567
	mov	ax,[posY]
605
	mov	ax,[posY]
568
	mov	dx,ALIGN_SIZE
606
	mov	dx,ALIGN_SIZE
569
 
607
 
570
	cmp	ax,dx
608
	cmp	ax,dx
571
	jb	.AI0
609
	jb	.AI0
572
    @@: sub	ax,dx
610
    @@: sub	ax,dx
573
	cmp	ax,dx
611
	cmp	ax,dx
574
	jae	@b
612
	jae	@b
575
    .AI0:
613
    .AI0:
576
 
614
 
577
	mov	dx,ax
615
	mov	dx,ax
578
	cmp	dx,ALIGN_SIZE/2
616
	cmp	dx,ALIGN_SIZE/2
579
	jb	.AI1
617
	jb	.AI1
580
 
618
 
581
	mov	ax,ALIGN_SIZE
619
	mov	ax,ALIGN_SIZE
582
	sub	ax,dx
620
	sub	ax,dx
583
	add	[posY],ax
621
	add	[posY],ax
584
 
622
 
585
	jmp	.AI2
623
	jmp	.AI2
586
     .AI1:
624
     .AI1:
587
	sub	[posY],dx
625
	sub	[posY],dx
588
     .AI2:
626
     .AI2:
589
     ;-----
627
     ;-----
590
	mov	ax,[posX]
628
	mov	ax,[posX]
591
	mov	dx,ALIGN_SIZE
629
	mov	dx,ALIGN_SIZE
592
 
630
 
593
	cmp	ax,dx
631
	cmp	ax,dx
594
	jb	.AI3
632
	jb	.AI3
595
    @@: sub	ax,dx
633
    @@: sub	ax,dx
596
	cmp	ax,dx
634
	cmp	ax,dx
597
	jae	@b
635
	jae	@b
598
    .AI3:
636
    .AI3:
599
 
637
 
600
	mov	dx,ax
638
	mov	dx,ax
601
	cmp	dx,ALIGN_SIZE/2
639
	cmp	dx,ALIGN_SIZE/2
602
	jb	.AI4
640
	jb	.AI4
603
 
641
 
604
	mov	ax,ALIGN_SIZE
642
	mov	ax,ALIGN_SIZE
605
	sub	ax,dx
643
	sub	ax,dx
606
	add	[posX],ax
644
	add	[posX],ax
607
 
645
 
608
	jmp	.AI5
646
	jmp	.AI5
609
     .AI4:
647
     .AI4:
610
	sub	[posX],dx
648
	sub	[posX],dx
611
     .AI5:
649
     .AI5:
612
 
650
 
613
      ;----- ¯à¥®¡à §®¢ ­¨¥ ­ § ¤ ¨ ¯®¯à ¢ª  ¢ ®âà¨æ â¥«ì­ëå ª®®à¤¨­ â
651
      ;----- ¯à¥®¡à §®¢ ­¨¥ ­ § ¤ ¨ ¯®¯à ¢ª  ¢ ®âà¨æ â¥«ì­ëå ª®®à¤¨­ â
614
	mov	ax,[posX]
652
	mov	ax,[posX]
615
 
653
 
616
	cmp	[negatX],1
654
	cmp	[negatX],1
617
	jne	@f
655
	jne	@f
618
	neg	ax
656
	neg	ax
619
	inc	ax
657
	inc	ax
620
	jmp	.AI6
658
	jmp	.AI6
621
      @@:
659
      @@:
622
 
660
 
623
	mov	dx,[wsW]
661
	mov	dx,[wsW]
624
	shr	dx,1
662
	shr	dx,1
625
	add	dx,[wsX]
663
	add	dx,[wsX]
626
	cmp	ax,dx
664
	cmp	ax,dx
627
	jbe	.AI6
665
	jbe	.AI6
628
	sub	ax,[wsW]
666
	sub	ax,[wsW]
629
      .AI6:
667
      .AI6:
630
	mov	word[edi+2],ax
668
	mov	word[edi+2],ax
631
 
669
 
632
 
670
 
633
	mov	ax,[posY]
671
	mov	ax,[posY]
634
	cmp	[negatY],1
672
	cmp	[negatY],1
635
	jne	@f
673
	jne	@f
636
	neg	ax
674
	neg	ax
637
	inc	ax
675
	inc	ax
638
	jmp	.AI7
676
	jmp	.AI7
639
      @@:
677
      @@:
640
 
678
 
641
	mov	dx,[wsH]
679
	mov	dx,[wsH]
642
	shr	dx,1
680
	shr	dx,1
643
	add	dx,[wsY]
681
	add	dx,[wsY]
644
	cmp	ax,dx
682
	cmp	ax,dx
645
	jbe	.AI7
683
	jbe	.AI7
646
	sub	ax,[wsH]
684
	sub	ax,[wsH]
647
      .AI7:
685
      .AI7:
648
	 mov	 word[edi],ax
686
	 mov	 word[edi],ax
649
 
687
 
650
       ;--------
688
       ;--------
651
 
689
 
652
 
690
 
653
 
691
 
654
	pop	ecx
692
	pop	ecx
655
	add	ebx,4
693
	add	ebx,4
656
	dec	ecx
694
	dec	ecx
657
	jnz	.AlignIco
695
	jnz	.AlignIco
658
;        loop    .AlignIco
696
;        loop    .AlignIco
659
 
697
 
660
 
698
 
661
;        mov     dword[fInfo],2
699
;        mov     dword[fInfo],2
662
;        mcall   70,fInfo
700
;        mcall   70,fInfo
663
	ret
701
	ret
664
endp
702
endp
665
 
703
 
666
;-------------------------------------------------------------------------------
704
;-------------------------------------------------------------------------------
667
proc GetUserBut stdcall,f_name,sec_name,key_name,key_value
705
proc GetUserBut stdcall,f_name,sec_name,key_name,key_value
668
	cmp	[NumMenuButt],MAX_USER_BUTTONS
706
	cmp	[NumMenuButt],MAX_USER_BUTTONS
669
	jne	@f
707
	jne	@f
670
	ret
708
	ret
671
     @@:
709
     @@:
672
 
710
 
673
	push	ebx esi edi
711
	push	ebx esi edi
674
 
712
 
675
	mov	edi,[key_name]		 ;®¯à¥¤¥«ï¥¬ è¨à¨­ã ¬¥­î
713
	mov	edi,[key_name]		 ;®¯à¥¤¥«ï¥¬ è¨à¨­ã ¬¥­î
676
	xor	eax,eax
714
	xor	eax,eax
677
	or	ecx,-1
715
	or	ecx,-1
678
	repne	scasb
716
	repne	scasb
679
	sub	edi,[key_name]
717
	sub	edi,[key_name]
680
	mov	eax,edi
718
	mov	eax,edi
681
	shl	eax,1
719
	shl	eax,1
682
	lea	eax,[eax*2+eax+5*2]
720
	lea	eax,[eax*2+eax+5*2]
683
	cmp	ax,[RMenuW]
721
	cmp	ax,[RMenuW]
684
	jbe	@f
722
	jbe	@f
685
	mov	[RMenuW],ax
723
	mov	[RMenuW],ax
686
     @@:
724
     @@:
687
 
725
 
688
	mov	ebx,[NumMenuButt]
726
	mov	ebx,[NumMenuButt]
689
 
727
 
690
	mov	esi,[key_name]
728
	mov	esi,[key_name]
691
	mov	edi,[RBMenuCP+ebx*8]
729
	mov	edi,[RBMenuCP+ebx*8]
692
    @@: lodsb
730
    @@: lodsb
693
	stosb
731
	stosb
694
	test	al,al
732
	test	al,al
695
	jnz	@b
733
	jnz	@b
696
 
734
 
697
 
735
 
698
	mov	[RBMenuCP+ebx*8+4],edi
736
	mov	[RBMenuCP+ebx*8+4],edi
699
	mov	esi,[key_value]
737
	mov	esi,[key_value]
700
    @@: lodsb
738
    @@: lodsb
701
	stosb
739
	stosb
702
	test	al,al
740
	test	al,al
703
	jnz	@b
741
	jnz	@b
704
 
742
 
705
	mov	[RBMenuCP+ebx*8+8],edi
743
	mov	[RBMenuCP+ebx*8+8],edi
706
 
744
 
707
	inc	[NumMenuButt]
745
	inc	[NumMenuButt]
708
 
746
 
709
	pop	edi esi ebx
747
	pop	edi esi ebx
710
	mov	eax,1
748
	mov	eax,1
711
	ret
749
	ret
712
endp
750
endp
713
 
751
 
714
proc Ini_SavePos stdcall,f_name,sec_name
752
proc Ini_SavePos stdcall,f_name,sec_name
715
	push	ebx edi esi
753
	push	ebx edi esi
716
 
754
 
-
 
755
	mov	ebx,[sec_name]
-
 
756
	xor	eax,eax
-
 
757
	mov	ax,[ebx]
-
 
758
 
717
	xor	ebx,ebx
759
	xor	ebx,ebx
718
  .SearchSect:
760
  .SearchSect:
719
	mov	edi,[IconsOffs+ebx*4]
761
	cmp	eax,[IconsID+ebx*4]
720
	mov	esi,[sec_name]
-
 
721
      @@:
-
 
722
	lodsb
-
 
723
	scasb
-
 
724
	jne	@f
-
 
725
	test	al,al
-
 
726
	jnz	@b
-
 
727
 
-
 
728
	jmp	.IcoDataFound
762
	je	.IcoDataFound
729
      @@:
-
 
730
 
763
 
731
	inc	ebx
764
	inc	ebx
732
	cmp	ebx,[MaxNumIcon]
765
	cmp	ebx,[MaxNumIcon]
733
	jb	.SearchSect
766
	jb	.SearchSect
734
 
767
 
735
	mov	eax,1
768
	mov	eax,1
736
	pop	esi edi ebx
769
	pop	esi edi ebx
737
	ret
770
	ret
738
 
771
 
739
.IcoDataFound:
772
.IcoDataFound:
740
	or	ecx,-1
773
	xor	al,al
-
 
774
	mov	edi,[IconsOffs+ebx*4]
-
 
775
 
-
 
776
	or	ecx,-1
741
	repne	scasb
777
	repne	scasb
742
	repne	scasb
778
	repne	scasb
743
	repne	scasb
779
	repne	scasb
744
 
780
	repne	scasb
-
 
781
 
745
;int3
-
 
746
	movzx	eax,word[edi+2]
782
	movzx	eax,word[edi]
747
	test	eax,8000h
783
	test	eax,8000h
748
	jz	@f
784
	jz	@f
749
	or	eax,0FFFF0000h
785
	or	eax,0FFFF0000h
750
     @@:
786
     @@:
751
 
787
 
752
	stdcall [ini_set_int],[f_name],[sec_name],keyX,eax
788
	stdcall [ini_set_int],[f_name],[sec_name],keyY,eax
-
 
789
 
-
 
790
	movzx	eax,word[edi+2]
753
 
-
 
754
	movzx	eax,word[edi]
791
 
755
	test	eax,8000h
792
	test	eax,8000h
756
	jz	@f
793
	jz	@f
757
	or	eax,0FFFF0000h
794
	or	eax,0FFFF0000h
758
     @@:
795
     @@:
759
 
796
 
760
	stdcall [ini_set_int],[f_name],[sec_name],keyY,eax
797
	stdcall [ini_set_int],[f_name],[sec_name],keyX,eax
761
 
798
 
762
	mov	eax,1
799
	mov	eax,1
763
	pop	esi edi ebx
800
	pop	esi edi ebx
764
	ret
801
	ret
765
endp
802
endp