Subversion Repositories Kolibri OS

Rev

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

Rev 2469 Rev 2475
1
;********************************
1
;********************************
2
;*                              *
2
;*                              *
3
;*     DESKTOP ICON MANAGER     *
3
;*     DESKTOP ICON MANAGER     *
4
;*                              *
4
;*                              *
5
;*  Compile with flat assembler *
5
;*  Compile with flat assembler *
6
;*                              *
6
;*                              *
7
;********************************
7
;********************************
-
 
8
;---------------------------------------------------------------------
-
 
9
; version:	2.1
-
 
10
; last update:  17/03/2012
-
 
11
; changed by:   Marat Zakiyanov aka Mario79, aka Mario
-
 
12
; changes:      Global optimization! The program uses
8
;  22.02.05 was modified for work with new multi-thread ICON.
13
;               only 161 KB of memory instead of 603 kb is now.
-
 
14
;---------------------------------------------------------------------
-
 
15
; version:	2.02
-
 
16
; last update:  15/03/2012
-
 
17
; changed by:   Marat Zakiyanov aka Mario79, aka Mario
-
 
18
; changes:      some optimisations and code refactoring
-
 
19
;---------------------------------------------------------------------
-
 
20
; version:	2.01
-
 
21
; last update:  27/09/2011
9
;  8.03.07 ïåðåõîä íà 70 ôóíêöèþ by SPraid
22
; changed by:   Marat Zakiyanov aka Mario79, aka Mario
-
 
23
; changes:      deactivate the window after click
-
 
24
;              (working to kernel r.2244 and above)
-
 
25
;---------------------------------------------------------------------
-
 
26
; Many fix's and changes created by:
-
 
27
;               Halyavin, Diamond, Heavyiron, 
-
 
28
;               SPraid, Dunkaist
-
 
29
;---------------------------------------------------------------------
-
 
30
; version:	2.00
-
 
31
; last update:  22|02|2005
-
 
32
; changed by:   Willow and Mario79
-
 
33
; changes:      modified for work with new multi-thread ICON.
10
;******************************************************************************
34
;******************************************************************************
11
RAW_SIZE equ 350000
-
 
12
ICON_SIZE equ 32*32*3
35
ICON_SIZE equ 32*32*3
-
 
36
RAW_SIZE equ ICON_SIZE*32	;350000
13
GIF_SIZE equ 45000
37
GIF_SIZE equ 12*1024	;45000
14
REC_SIZE equ 80
38
REC_SIZE equ 80
15
ICONS_DAT equ '/sys/ICONS.DAT'
39
ICONS_DAT equ '/sys/ICONS.DAT'
16
ICON_APP equ '/sys/ICON'
40
ICON_APP equ '/sys/ICON'
17
ICON_STRIP equ '/sys/ICONSTRP.GIF'
41
ICON_STRIP equ '/sys/ICONSTRP.GIF'
18
;------------------------------------------------------------------------------
42
;------------------------------------------------------------------------------
19
	use32
43
	use32
20
	org 0x0
44
	org 0x0
21
	db 'MENUET01'     ; 8 byte id
45
	db 'MENUET01'	; 8 byte id
22
	dd 0x01           ; header version
46
	dd 0x01		; header version
23
	dd START          ; start of code
47
	dd START	; start of code
24
	dd I_END          ; size of image
48
	dd IM_END	; size of image
25
	dd icon_data+0x30000        ; memory for app
49
	dd I_END	; memory for app
26
	dd stack_area        ; esp
50
	dd stack_area	; esp
27
	dd I_Param , 0x0  ; I_Param , I_Icon
51
	dd I_Param	; boot parameters
-
 
52
	dd 0x0		; path
28
;------------------------------------------------------------------------------
53
;------------------------------------------------------------------------------
29
include '../../../macros.inc'
54
include '../../../macros.inc'
30
include 'lang.inc'
55
include 'lang.inc'
31
COLOR_ORDER equ MENUETOS
56
COLOR_ORDER equ MENUETOS
32
include 'gif_lite.inc'
57
include 'gif_lite.inc'
33
;include 'debug.inc'
58
;include 'debug.inc'
34
purge newline
59
purge newline
35
;------------------------------------------------------------------------------
60
;------------------------------------------------------------------------------
36
START:                       ; start of execution
61
START:		; start of execution
37
	mcall	70,finfo
62
	mcall	70,finfo
38
	cmp	ebx,GIF_SIZE
63
	cmp	ebx,GIF_SIZE
39
	ja	close
64
	ja	close
40
	mov	esi,gif_file
65
	mov	esi,gif_file
41
	mov	edi,strip_file
66
	mov	edi,strip_file
42
	mov	eax,icon_data
67
	mov	eax,icon_data
43
	call	ReadGIF
68
	call	ReadGIF
44
	mov	eax,dword[edi+4]
69
	mov	eax,dword[edi+4]
45
	shr	eax,5
70
	shr	eax,5
46
	mov	[icon_count],eax
71
	mov	[icon_count],eax
47
	call	load_ic
72
	call	load_ic
48
boot_str:
73
boot_str:
49
	cmp	[I_Param],dword 'BOOT'
74
	cmp	[I_Param],dword 'BOOT'
50
	je	load_icon_list2
75
	je	load_icon_list2
51
	call	load_icon_list
76
	call	load_icon_list
52
red:
77
red:
53
	call	draw_window         ; at first, draw the window
78
	call	draw_window	; at first, draw the window
54
	mov	esi,[current_icon]
79
	mov	esi,[current_icon]
55
	jmp	band
80
	jmp	band
56
;------------------------------------------------------------------------------
81
;------------------------------------------------------------------------------
57
align 4
82
align 4
58
still:
83
still:
59
	mcall	10	; wait here for event
84
	mcall	10	; wait here for event
60
	dec	eax                   ; redraw request ?
85
	dec	eax	; redraw request ?
61
	jz	red
86
	jz	red
62
	
87
	
63
	dec	eax                   ; key in buffer ?
88
	dec	eax	; key in buffer ?
64
	jz	key
89
	jz	key
65
;------------------------------------------------------------------------------
90
;------------------------------------------------------------------------------
66
align 4
91
align 4
67
button:                    ; button
92
button:
68
	mcall	17	; get id
93
	mcall	17	; get id
69
	shr	eax,8
94
	shr	eax,8
70
 
95
 
71
;	dps	"button id: "
96
;	dps	"button id: "
72
;	dpd	eax
97
;	dpd	eax
73
;	newline_1
98
;	newline_1
74
  
99
 
75
	cmp	eax,1               ; button id=1 ?
100
	cmp	eax,1	; button id=1 ?
76
	je	close
101
	je	close
77
;--------------------------------------
102
;--------------------------------------
78
align 4
103
align 4
79
noclose:
104
noclose:
80
	mov	esi,[current_icon]
105
	mov	esi,[current_icon]
81
	add	esi,12
106
	add	esi,12
82
	mov	ebx,[cur_band]	;eax
107
	mov	ebx,[cur_band]	;eax
83
	cmp	eax,31	; right arrow to icons bar
108
	cmp	eax,31	; right arrow to icons bar
84
	jne	.no_back
109
	jne	.no_back
85
 
110
 
86
	add	ebx,8
111
	add	ebx,8
87
	mov	eax,[icon_count]
112
	mov	eax,[icon_count]
88
	cmp	eax,ebx
113
	cmp	eax,ebx
89
	jae	.drwic2
114
	jae	.drwic2
90
 
115
 
91
	xor	ebx,ebx
116
	xor	ebx,ebx
92
	jmp	.drwic2
117
	jmp	.drwic2
93
;--------------------------------------
118
;--------------------------------------
94
align 4
119
align 4
95
.no_back:
120
.no_back:
96
	cmp	eax,30	; left arrow to icons bar
121
	cmp	eax,30	; left arrow to icons bar
97
	jne	.no_side
122
	jne	.no_side
98
 
123
 
99
	test	ebx,ebx
124
	test	ebx,ebx
100
	jnz	.dec
125
	jnz	.dec
101
 
126
 
102
	mov	ebx,[icon_count]
127
	mov	ebx,[icon_count]
103
	and	ebx,0xfffffff8
128
	and	ebx,0xfffffff8
104
	add	ebx,8
129
	add	ebx,8
105
;--------------------------------------
130
;--------------------------------------
106
align 4
131
align 4
107
.dec:
132
.dec:
108
	sub	ebx,8
133
	sub	ebx,8
109
;--------------------------------------
134
;--------------------------------------
110
align 4
135
align 4
111
.drwic2:
136
.drwic2:
112
	mov	[cur_band],ebx
137
	mov	[cur_band],ebx
113
;--------------------------------------
138
;--------------------------------------
114
align 4
139
align 4
115
.drwic1:
140
.drwic1:
116
	call	draw_icon
141
	call	draw_icon
117
	jmp	still
142
	jmp	still
118
;--------------------------------------
143
;--------------------------------------
119
align 4
144
align 4
120
.no_side:
145
.no_side:
121
	cmp	eax,32
146
	cmp	eax,32
122
	jne	.no_ico
147
	jne	.no_ico
123
	push	ebx
148
	push	ebx
124
	mcall	37,1
149
	mcall	37,1
125
	pop	ebx
150
	pop	ebx
126
	shr	eax,16
151
	shr	eax,16
127
	sub	eax,33-19
152
	sub	eax,33-19
128
	mov	edi,34
153
	mov	edi,34
129
	xor	edx,edx
154
	xor	edx,edx
130
	div	edi
155
	div	edi
131
	lea	ecx,[ebx+eax]
156
	lea	ecx,[ebx+eax]
132
	cmp	ecx,[icon_count]
157
	cmp	ecx,[icon_count]
133
	jae	still
158
	jae	still
134
 
159
 
135
	mov	[sel_icon1],eax
160
	mov	[sel_icon1],eax
136
	mov	ecx,eax
161
	mov	ecx,eax
137
	add	eax,ebx
162
	add	eax,ebx
138
	call	itoa
163
	call	itoa
139
	jmp	.drwic1
164
	jmp	.drwic1
140
;--------------------------------------
165
;--------------------------------------
141
align 4
166
align 4
142
.no_ico:
167
.no_ico:
143
	cmp	eax,11
168
	cmp	eax,11
144
	jb	no_str
169
	jb	no_str
145
	cmp	eax,13
170
	cmp	eax,13
146
	jg	no_str
171
	jg	no_str
147
	call	read_string
172
	call	read_string
148
	jmp	still
173
	jmp	still
149
;--------------------------------------
174
;--------------------------------------
150
align 4    
175
align 4 
151
no_str:
176
no_str:
152
	cmp	eax,21              ; apply changes
177
	cmp	eax,21	; apply changes
153
	jne	no_apply
178
	jne	no_apply
154
	; (1) save list
179
	; (1) save list
155
	mov	ebx,finfo	; Change by spraid
180
	mov	ebx,finfo	; Change by spraid
156
	mov	dword[ebx],2
181
	mov	dword[ebx],2
157
	mov	edx,REC_SIZE
182
	mov	edx,REC_SIZE
158
	imul	edx,dword [icons]
183
	imul	edx,dword [icons]
159
	mov	[ebx+12],edx
184
	mov	[ebx+12],edx
160
	mov	esi,iconlst
185
	mov	esi,iconlst
161
	call	lst_path
186
	call	lst_path
162
	mcall	70
187
	mcall	70
163
	; (2) terminate all icons
188
	; (2) terminate all icons
164
	or      ecx,-1
189
	or	ecx,-1
165
	mcall	9,I_END
190
	mcall	9,process_table
166
	mov	edi,[ebx+30]
191
	mov	edi,[ebx+30]
167
;--------------------------------------
192
;--------------------------------------
168
align 4
193
align 4
169
newread2:
194
newread2:
170
	mov	esi,1
195
	mov	esi,1
171
;--------------------------------------
196
;--------------------------------------
172
align 4
197
align 4
173
newread:
198
newread:
174
	inc	esi
199
	inc	esi
175
	mov	ecx,esi
200
	mov	ecx,esi
176
	mcall	9,I_END
201
	mcall	9,process_table
177
	cmp	edi,[ebx+30]
202
	cmp	edi,[ebx+30]
178
	je	newread
203
	je	newread
179
 
204
 
180
	cmp	esi,eax
205
	cmp	esi,eax
181
	jg	all_terminated
206
	jg	apply_changes
182
 
207
 
183
	mov	eax,[ebx+10]	;[I_END+10]
208
	mov	eax,[ebx+10]
184
	and	eax,not 20202020h
209
	and	eax,not 20202020h
185
	cmp	eax,'@ICO'
210
	cmp	eax,'@ICO'
186
	jz	@f
211
	jz	@f
187
	cmp	eax,'ICON'
212
	cmp	eax,'ICON'
188
	jne	newread
213
	jne	newread
189
;--------------------------------------
214
;--------------------------------------
190
align 4
215
align 4
191
@@:
216
@@:
192
	mov	eax,51
217
	mov	eax,51
193
	cmp	eax,[ebx+42]	;[I_END+42]
218
	cmp	eax,[ebx+42]
194
	jne	newread
219
	jne	newread
195
 
220
 
196
	cmp	eax,[ebx+46]	;[I_END+46]
221
	cmp	eax,[ebx+46]
197
	jne	newread
222
	jne	newread
198
 
223
 
199
	mov	ecx,esi
224
	mov	ecx,esi
200
	mcall	18,2
225
	mcall	18,2
201
	jmp	newread2
226
	jmp	newread2
202
;------------------------------------------------------------------------------
227
;------------------------------------------------------------------------------
203
align 4
228
align 4
204
finfo_start:
229
finfo_start:
205
        dd      7
230
	dd 7
206
        dd      0
231
	dd 0
207
.params dd      0
232
.params	dd 0
208
        dd      0
233
	dd 0
209
        dd      0
234
	dd 0
210
        db      0
235
	db 0
211
        dd      finfo.path
236
	dd finfo.path
212
;------------------------------------------------------------------------------
237
;------------------------------------------------------------------------------
213
align 4
238
align 4
214
finfo:
239
finfo:
215
        dd 0
240
	dd 0
216
        dd 0
241
	dd 0
217
        dd 0
242
	dd 0
218
        dd GIF_SIZE
243
	dd GIF_SIZE
219
        dd gif_file
244
	dd gif_file
220
.path:
245
.path:
221
        db ICON_STRIP,0
246
	db ICON_STRIP,0
222
        rb 31-($-.path)
247
	rb 31-($-.path)
223
;------------------------------------------------------------------------------
248
;------------------------------------------------------------------------------
224
align 4
249
align 4
225
all_terminated:
-
 
226
;apply_changes:
250
apply_changes:
227
	mov	ebx, finfo_start
251
	mov	ebx, finfo_start
228
	mov	dword [ebx+8], boot_str+6
252
	mov	dword [ebx+8], boot_str+6
229
	mov	esi, iconname
253
	mov	esi, iconname
230
	call	lst_path
254
	call	lst_path
231
	mcall	70
255
	mcall	70
232
	jmp	still
256
	jmp	still
233
;------------------------------------------------------------------------------
257
;------------------------------------------------------------------------------
234
align 4
258
align 4
235
no_apply:
259
no_apply:
236
	cmp	eax,22                 ; user pressed the 'add icon' button
260
	cmp	eax,22		; user pressed the 'add icon' button
237
	jne	no_add_icon
261
	jne	no_add_icon
238
 
262
 
239
	mov	ebx,24*65536+250+8*14
263
	mov	ebx,24*65536+250+8*14
240
	mcall	4,,0xc0ff0000,add_text,,0xffffff
264
	mcall	4,,0xc0ff0000,add_text,,0xffffff
241
 
265
 
242
	mcall	10
266
	mcall	10
243
	cmp	eax,3
267
	cmp	eax,3
244
	jne	still
268
	jne	still
245
 
269
 
246
	mcall	17
270
	mcall	17
247
	shr	eax,8
271
	shr	eax,8
248
	cmp	eax,40
272
	cmp	eax,40
249
	jb	no_f
273
	jb	no_f
250
	mov	edi,eax
274
	mov	edi,eax
251
	sub	eax,40
275
	sub	eax,40
252
	
276
	
253
	xor	edx,edx  ; bcd -> 10
277
	xor	edx,edx		; bcd -> 10
254
	mov	ebx,16
278
	mov	ebx,16
255
	div	ebx
-
 
256
;	imul	eax,10
279
	div	ebx
257
; multiply x10
280
; multiply x10
258
	shl	eax,1		; multiply x2
281
	shl	eax,1		; multiply x2
259
	lea	eax,[eax+eax*4] ; multiply x5
282
	lea	eax,[eax+eax*4] ; multiply x5
260
	add	eax,edx
283
	add	eax,edx
261
	
284
	
262
	mov	ebx,eax
285
	mov	ebx,eax
263
	add	ebx,icons_reserved
286
	add	ebx,icons_reserved
264
	cmp	[ebx],byte 'x'
287
	cmp	[ebx],byte 'x'
265
	je	no_f
288
	je	no_f
266
	mov	[ebx],byte 'x'
289
	mov	[ebx],byte 'x'
267
	
290
	
268
	mov	[cur_btn],edi
291
	mov	[cur_btn],edi
269
	xor	edx,edx
292
	xor	edx,edx
270
	mov	ebx,10
293
	mov	ebx,10
271
	div	ebx
294
	div	ebx
272
	add	eax,65
295
	add	eax,65
273
	add	edx,65
296
	add	edx,65
274
	mov	[icon_default+0],dl
297
	mov	[icon_default+0],dl
275
	mov	[icon_default+1],al
298
	mov	[icon_default+1],al
276
	
299
	
277
	inc	dword [icons]
300
	inc	dword [icons]
278
	mov	edi,[icons]
301
	mov	edi,[icons]
279
	dec	edi
302
	dec	edi
280
	imul	edi,REC_SIZE
303
	imul	edi,REC_SIZE
281
	add	edi,icon_data
304
	add	edi,icon_data
282
	
305
	
283
	mov	[current_icon],edi
306
	mov	[current_icon],edi
284
 
307
 
285
	mov	esi,icon_default
308
	mov	esi,icon_default
286
	mov	ecx,REC_SIZE
309
	mov	ecx,REC_SIZE
287
	cld
310
	cld
288
	rep	movsb
311
	rep	movsb
289
	mov	esi,[current_icon]
312
	mov	esi,[current_icon]
290
	jmp	band
313
	jmp	band
291
;--------------------------------------
314
;--------------------------------------
292
align 4
315
align 4
293
no_f:
316
no_f:
294
	call	draw_btns	;draw_window
317
	call	draw_btns	;draw_window
295
	jmp	still
318
	jmp	still
296
;--------------------------------------
319
;--------------------------------------
297
align 4
320
align 4
298
no_add_icon:
321
no_add_icon:
299
	cmp	eax,23                     ; user pressed the remove icon button
322
	cmp	eax,23	; user pressed the remove icon button
300
	jne	no_remove_icon
323
	jne	no_remove_icon
301
	
324
	
302
	mov	ebx,24*65536+250+8*14
325
	mov	ebx,24*65536+250+8*14
303
	mcall	4,,0xc0ff0000,rem_text,,0xffffff
326
	mcall	4,,0xc0ff0000,rem_text,,0xffffff
304
	
327
	
305
	mcall	10
328
	mcall	10
306
	cmp	eax,3
329
	cmp	eax,3
307
	jne	no_f;ound
330
	jne	no_f;ound
308
 
331
 
309
	mcall	17
332
	mcall	17
310
	shr	eax,8
333
	shr	eax,8
311
	cmp	eax,40
334
	cmp	eax,40
312
	jb	red;no_f;ound
335
	jb	red
313
	sub	eax,40
336
	sub	eax,40
314
	
337
	
315
	xor	edx,edx
338
	xor	edx,edx
316
	mov	ebx,16
339
	mov	ebx,16
317
	div	ebx
340
	div	ebx
318
;	imul	eax,10
-
 
319
; multiply x10
341
; multiply x10
320
	shl	eax,1		; multiply x2
342
	shl	eax,1		; multiply x2
321
	lea	eax,[eax+eax*4] ; multiply x5
343
	lea	eax,[eax+eax*4] ; multiply x5
322
	add	eax,edx
344
	add	eax,edx
323
	
345
	
324
	mov	ebx,eax
346
	mov	ebx,eax
325
	add	ebx,icons_reserved
347
	add	ebx,icons_reserved
326
	cmp	[ebx],byte 'x'
348
	cmp	[ebx],byte 'x'
327
	jne	red
349
	jne	red
328
	mov	[ebx],byte ' '
350
	mov	[ebx],byte ' '
329
	
351
	
330
	xor	edx,edx
352
	xor	edx,edx
331
	mov	ebx,10
353
	mov	ebx,10
332
	div	ebx
354
	div	ebx
333
	shl	eax,8
355
	shl	eax,8
334
	mov	al,dl
356
	mov	al,dl
335
	
357
	
336
	add	eax,65*256+65
358
	add	eax,65*256+65
337
	
359
	
338
	mov	esi,icon_data
360
	mov	esi,icon_data
339
	mov	edi,REC_SIZE
361
	mov	edi,REC_SIZE
340
	imul	edi,[icons]
362
	imul	edi,[icons]
341
	add	edi,icon_data
363
	add	edi,icon_data
342
;--------------------------------------
364
;--------------------------------------
343
align 4 
365
align 4 
344
news:
366
news:
345
	cmp	word [esi],ax
367
	cmp	word [esi],ax
346
	je	foundi
368
	je	foundi
347
	add	esi,REC_SIZE
369
	add	esi,REC_SIZE
348
	cmp	esi,edi
370
	cmp	esi,edi
349
	jb	news
371
	jb	news
350
	jmp	red
372
	jmp	red
351
;--------------------------------------
373
;--------------------------------------
352
align 4
374
align 4
353
foundi:
375
foundi:
354
	mov	ecx,edi
376
	mov	ecx,edi
355
	sub	ecx,esi
377
	sub	ecx,esi
356
	
378
	
357
	mov	edi,esi
379
	mov	edi,esi
358
	add	esi,REC_SIZE
380
	add	esi,REC_SIZE
359
	
381
	
360
	cld
382
	cld
361
	rep	movsb
383
	rep	movsb
362
	
384
	
363
	dec	[icons]
385
	dec	[icons]
364
	
386
	
365
	mov	eax,icon_data
387
	mov	eax,icon_data
366
	mov	[current_icon],eax
388
	mov	[current_icon],eax
367
	movzx	ebx,word[eax]
389
	movzx	ebx,word[eax]
368
	sub	bx,'AA'
390
	sub	bx,'AA'
369
	shl	bl,4
391
	shl	bl,4
370
	shr	ebx,4
392
	shr	ebx,4
371
	add	ebx,40
393
	add	ebx,40
372
	mov	[cur_btn],ebx
394
	mov	[cur_btn],ebx
373
	jmp	red
395
	jmp	red
374
;--------------------------------------
396
;--------------------------------------
375
align 4
397
align 4
376
no_remove_icon:
398
no_remove_icon:
377
	cmp	eax,40                 ; user pressed button for icon position
399
	cmp	eax,40	; user pressed button for icon position
378
	jb	still
400
	jb	still
379
	mov	edi,eax
401
	mov	edi,eax
380
	sub	eax,40
402
	sub	eax,40
381
	mov	edx,eax
403
	mov	edx,eax
382
	shl	eax,4
404
	shl	eax,4
383
	and	edx,0xf
405
	and	edx,0xf
384
	mov	dh,ah
406
	mov	dh,ah
385
	add	edx,65*256+65
407
	add	edx,65*256+65
386
	mov	esi,icon_data
408
	mov	esi,icon_data
387
	mov	ecx,[icons]
409
	mov	ecx,[icons]
388
	cld
410
	cld
389
;--------------------------------------
411
;--------------------------------------
390
align 4
412
align 4
391
findl1:
413
findl1:
392
	cmp	dx,[esi]
414
	cmp	dx,[esi]
393
	je	foundl1
415
	je	foundl1
394
	add	esi,REC_SIZE
416
	add	esi,REC_SIZE
395
	loop	findl1
417
	loop	findl1
396
	jmp	still
418
	jmp	still
397
;--------------------------------------
419
;--------------------------------------
398
align 4
420
align 4
399
foundl1:
421
foundl1:
400
	mov	[current_icon],esi
422
	mov	[current_icon],esi
401
	mov	[cur_btn],edi
423
	mov	[cur_btn],edi
402
;--------------------------------------
424
;--------------------------------------
403
align 4
425
align 4
404
band:
426
band:
405
	add	esi,12
427
	add	esi,12
406
	call	atoi
428
	call	atoi
407
	and	eax,0xfffff8
429
	and	eax,0xfffff8
408
	mov	[cur_band],eax
430
	mov	[cur_band],eax
409
	call	draw_btns
431
	call	draw_btns
410
	jmp	still
432
	jmp	still
411
;------------------------------------------------------------------------------
433
;------------------------------------------------------------------------------
412
current_icon	dd icon_data
434
current_icon	dd icon_data
413
;------------------------------------------------------------------------------
435
;------------------------------------------------------------------------------
414
align 4
436
align 4
415
print_strings:
437
print_strings:
416
	pusha
438
	pusha
417
	mcall	13,<100,180>,<278+12,40>,0xffffff	; clear text area
439
	mcall	13,<100,180>,<278+12,40>,0xffffff	; clear text area
418
	xor	edi,edi
440
	xor	edi,edi
419
	mov	eax,4               ; icon text
441
	mov	eax,4		; icon text
420
	mov	ebx,100*65536+278+14
442
	mov	ebx,100*65536+278+14
421
	mov	ecx,3
443
	mov	ecx,3
422
;--------------------------------------
444
;--------------------------------------
423
align 4
445
align 4
424
.ll:
446
.ll:
425
	push	ecx
447
	push	ecx
426
	mov	ecx,0x000000
448
	mov	ecx,0x000000
427
	mov	edx,[current_icon]
449
	mov	edx,[current_icon]
428
	add	edx,[positions+edi*4]
450
	add	edx,[positions+edi*4]
429
	movzx	esi,byte[str_lens+edi]
451
	movzx	esi,byte[str_lens+edi]
430
	inc	edi
452
	inc	edi
431
	mcall
453
	mcall
432
	add	ebx,14
454
	add	ebx,14
433
	pop	ecx
455
	pop	ecx
434
	loop	.ll
456
	loop	.ll
435
 
457
 
436
	popa
458
	popa
437
	ret
459
	ret
438
;------------------------------------------------------------------------------
460
;------------------------------------------------------------------------------
439
iconlst	db ICONS_DAT,0
461
iconlst	db ICONS_DAT,0
440
;------------------------------------------------------------------------------
462
;------------------------------------------------------------------------------
441
align 4
463
align 4
442
load_icon_list:
464
load_icon_list:
443
	mov	edi,icons_reserved   ; clear reserved area
465
	mov	edi,icons_reserved	; clear reserved area
444
	mov	eax,32
466
	mov	eax,32
445
	mov	ecx,10*9
467
	mov	ecx,10*9
446
	cld
468
	cld
447
	rep	stosb
469
	rep	stosb
448
 
470
 
449
	mov	ecx,[icons]          ; set used icons to reserved area
471
	mov	ecx,[icons]	; set used icons to reserved area
450
	mov	esi,icon_data
472
	mov	esi,icon_data
451
;--------------------------------------
473
;--------------------------------------
452
align 4
474
align 4
453
ldl1:
475
ldl1:
454
	movzx	ebx,byte [esi+1]
476
	movzx	ebx,byte [esi+1]
455
	sub	ebx,65
477
	sub	ebx,65
456
;	imul	ebx,10
478
;	imul	ebx,10
457
; multiply x10
479
; multiply x10
458
	shl	ebx,1		; multiply x2
480
	shl	ebx,1		; multiply x2
459
	lea	ebx,[ebx+ebx*4] ; multiply x5
481
	lea	ebx,[ebx+ebx*4] ; multiply x5
460
	movzx	eax,byte [esi]
482
	movzx	eax,byte [esi]
461
	add	ebx,eax
483
	add	ebx,eax
462
	sub	ebx,65
484
	sub	ebx,65
463
	add	ebx,icons_reserved
485
	add	ebx,icons_reserved
464
	mov	[ebx],byte 'x'
486
	mov	[ebx],byte 'x'
465
	add	esi,REC_SIZE
487
	add	esi,REC_SIZE
466
	loop	ldl1
488
	loop	ldl1
467
	ret
489
	ret
468
;------------------------------------------------------------------------------
490
;------------------------------------------------------------------------------
469
align 4
491
align 4
470
lst_path:
492
lst_path:
471
	mov	ecx,30
493
	mov	ecx,30
472
	mov	edi,finfo.path
494
	mov	edi,finfo.path
473
	rep	movsb
495
	rep	movsb
474
	ret
496
	ret
475
;------------------------------------------------------------------------------
497
;------------------------------------------------------------------------------
476
align 4
498
align 4
477
load_ic:
499
load_ic:
478
	mov	ebx,finfo
500
	mov	ebx,finfo
479
	mov	dword[ebx+12],48*REC_SIZE
501
	mov	dword[ebx+12],48*REC_SIZE
480
	mov	dword[ebx+16],icon_data
502
	mov	dword[ebx+16],icon_data
481
	mov	esi,iconlst
503
	mov	esi,iconlst
482
	call	lst_path
504
	call	lst_path
483
	mcall	70
505
	mcall	70
484
	lea	eax,[ebx+10]
506
	lea	eax,[ebx+10]
485
	xor	edx,edx
507
	xor	edx,edx
486
	mov	ebx,REC_SIZE
508
	mov	ebx,REC_SIZE
487
	div	ebx
509
	div	ebx
488
	mov	[icons],eax
510
	mov	[icons],eax
489
	ret
511
	ret
490
;------------------------------------------------------------------------------
512
;------------------------------------------------------------------------------
491
align 4
513
align 4
492
positions	dd 3,16,47
514
positions	dd 3,16,47
493
str_lens	db 8,30,30
515
str_lens	db 8,30,30
494
;------------------------------------------------------------------------------
516
;------------------------------------------------------------------------------
495
align 4
517
align 4
496
read_string:
518
read_string:
497
	pusha
519
	pusha
498
	sub	eax,11
520
	sub	eax,11
499
	movzx	ecx,byte[str_lens+eax]
521
	movzx	ecx,byte[str_lens+eax]
500
	mov	[cur_str],ecx
522
	mov	[cur_str],ecx
501
	mov	eax,[positions+eax*4]
523
	mov	eax,[positions+eax*4]
502
	mov	edi,[current_icon]
524
	mov	edi,[current_icon]
503
	add	edi,eax
525
	add	edi,eax
504
	mov	[addr],edi
526
	mov	[addr],edi
505
	add	edi,ecx
527
	add	edi,ecx
506
;--------------------------------------
528
;--------------------------------------
507
align 4
529
align 4
508
.l1:
530
.l1:
509
	dec	edi
531
	dec	edi
510
	cmp	byte[edi],' '
532
	cmp	byte[edi],' '
511
	jne	.found
533
	jne	.found
512
 
534
 
513
	mov	byte[edi],'_'
535
	mov	byte[edi],'_'
514
	loop	.l1
536
	loop	.l1
515
 
537
 
516
	dec	edi
538
	dec	edi
517
;--------------------------------------
539
;--------------------------------------
518
align 4
540
align 4
519
.found:
541
.found:
520
	inc	edi
542
	inc	edi
521
	push	edi
543
	push	edi
522
	call	print_strings
544
	call	print_strings
523
	pop	edi
545
	pop	edi
524
;--------------------------------------
546
;--------------------------------------
525
align 4
547
align 4
526
f11:
548
f11:
527
	mcall	10
549
	mcall	10
528
	cmp	eax,2
550
	cmp	eax,2
529
	jz	fbu
551
	jz	fbu
530
	jmp	rs_done
552
	jmp	rs_done
531
;--------------------------------------
553
;--------------------------------------
532
align 4
554
align 4
533
fbu:
555
fbu:
534
	mcall	2
556
	mcall	2
535
	shr	eax,8
557
	shr	eax,8
536
	cmp	eax,13
558
	cmp	eax,13
537
	je	rs_done
559
	je	rs_done
538
	cmp	eax,8
560
	cmp	eax,8
539
	jnz	nobsl
561
	jnz	nobsl
540
	cmp	edi,[addr]
562
	cmp	edi,[addr]
541
	jz	f11
563
	jz	f11
542
	dec	edi
564
	dec	edi
543
	mov	[edi],byte '_'
565
	mov	[edi],byte '_'
544
	call	print_strings
566
	call	print_strings
545
	jmp	f11
567
	jmp	f11
546
;--------------------------------------
568
;--------------------------------------
547
align 4
569
align 4
548
nobsl:
570
nobsl:
549
	cmp	eax,31
571
	cmp	eax,31
550
	jbe	f11
572
	jbe	f11
551
	mov	[edi],al
573
	mov	[edi],al
552
	call	print_strings
574
	call	print_strings
553
	inc	edi
575
	inc	edi
554
	mov	esi,[addr]
576
	mov	esi,[addr]
555
	add	esi,[cur_str]
577
	add	esi,[cur_str]
556
	cmp	esi,edi
578
	cmp	esi,edi
557
	jnz	f11
579
	jnz	f11
558
;--------------------------------------
580
;--------------------------------------
559
align 4
581
align 4
560
rs_done:
582
rs_done:
561
	mov	ecx,[addr]
583
	mov	ecx,[addr]
562
	add	ecx,[cur_str]
584
	add	ecx,[cur_str]
563
	sub	ecx,edi
585
	sub	ecx,edi
564
	mov	eax,32
586
	mov	eax,32
565
	cld
587
	cld
566
	rep	stosb
588
	rep	stosb
567
	call	print_strings
589
	call	print_strings
568
	popa
590
	popa
569
	ret
591
	ret
570
;------------------------------------------------------------------------------
592
;------------------------------------------------------------------------------
571
align 4
593
align 4
572
key:                       ; key
594
key:
573
	mcall	2               ; just read it and ignore
595
	mcall	2	; just read it and ignore
574
	jmp	still
596
	jmp	still
575
;------------------------------------------------------------------------------
597
;------------------------------------------------------------------------------
576
;   *********************************************
598
;   *********************************************
577
;   *******  WINDOW DEFINITIONS AND DRAW ********
599
;   *******  WINDOW DEFINITIONS AND DRAW ********
578
;   *********************************************
600
;   *********************************************
579
align 4
601
align 4
580
draw_window:
602
draw_window:
581
	mcall	12,1
603
	mcall	12,1
582
                                   ; DRAW WINDOW
604
	; DRAW WINDOW
583
	xor	eax,eax
605
	xor	eax,eax
584
	xor	esi,esi
606
	xor	esi,esi
585
	mcall	,<210,300>,<30,(390-14)>,0x14ffffff,,title
607
	mcall	,<210,300>,<30,(390-14)>,0x14ffffff,,title
586
 
608
 
587
	mcall	13,<20,260>,<35,200>,0x3366cc	; WINDOW AREA
609
	mcall	13,<20,260>,<35,200>,0x3366cc	; WINDOW AREA
588
 
610
 
589
	mcall	38,<150,150>,<35,235>,0xffffff	; VERTICAL LINE ON WINDOW AREA
611
	mcall	38,<150,150>,<35,235>,0xffffff	; VERTICAL LINE ON WINDOW AREA
590
 
612
 
591
	mcall	,<20,280>,<135,135>	; HOROZONTAL LINE ON WINDOW AREA
613
	mcall	,<20,280>,<135,135>	; HOROZONTAL LINE ON WINDOW AREA
592
 
614
 
593
	mcall	8,<20,72>,<(275+1+14),(13-2)>,11,[bcolor]	;id 11 TEXT ENTER BUTTONS
615
	mcall	8,<20,72>,<(275+1+14),(13-2)>,11,[bcolor]	;id 11 TEXT ENTER BUTTONS
594
	
616
	
595
	inc	edx
617
	inc	edx
596
	add	ecx,14*65536
618
	add	ecx,14*65536
597
	mcall			; id 12
619
	mcall			; id 12
598
	
620
	
599
	inc	edx
621
	inc	edx
600
	add	ecx,14*65536
622
	add	ecx,14*65536
601
	mcall			; id 13
623
	mcall			; id 13
602
 
624
 
603
	mcall	,<20,259>,<(329+2),(15-4)>,21	; id 21 APPLY AND SAVE CHANGES BUTTON
625
	mcall	,<20,259>,<(329+2),(15-4)>,21	; id 21 APPLY AND SAVE CHANGES BUTTON
604
 
626
 
605
	add	ecx,14*65536
627
	add	ecx,14*65536
606
	inc	edx
628
	inc	edx
607
	mcall	,<20,(129-2)>	; id 22 ADD ICON BUTTON
629
	mcall	,<20,(129-2)>	; id 22 ADD ICON BUTTON
608
 
630
 
609
	add	ebx,(130+2)*65536
631
	add	ebx,(130+2)*65536
610
	inc	edx
632
	inc	edx
611
	mcall			; id 23 REMOVE ICON BUTTON
633
	mcall			; id 23 REMOVE ICON BUTTON
612
 
634
 
613
	mcall	,<(20-14),8>,<(260-23),32>,30 + 1 shl 30	; id 30 IMAGE BUTTON
635
	mcall	,<(20-14),8>,<(260-23),32>,30 + 1 shl 30	; id 30 IMAGE BUTTON
614
 
636
 
615
	inc	edx
637
	inc	edx
616
	add	ebx,(36*7+26) shl 16
638
	add	ebx,(36*7+26) shl 16
617
	mcall		; id 31
639
	mcall		; id 31
618
 
640
 
619
	add	edx,1 + 1 shl 29
641
	add	edx,1 + 1 shl 29
620
	mcall	,<(33-19),(34*8)>	; id 32
642
	mcall	,<(33-19),(34*8)>	; id 32
621
	
643
	
622
	mcall	4,<(23-15),(273-24)>,0,arrows,1
644
	mcall	4,<(23-15),(273-24)>,0,arrows,1
623
 
645
 
624
	add	ebx,(36*7+27)shl 16
646
	add	ebx,(36*7+27)shl 16
625
	add	edx,2
647
	add	edx,2
626
	mcall
648
	mcall
627
 
649
 
628
	dec	edx
650
	dec	edx
629
	mcall	,<120,250>
651
	mcall	,<120,250>
630
 
652
 
631
	lea	edx,[ebx+8 shl 16]
653
	lea	edx,[ebx+8 shl 16]
632
	mcall	47,0x30000,[icon_count],,0
654
	mcall	47,0x30000,[icon_count],,0
633
 
655
 
634
	mov	eax,4
656
	mov	eax,4
635
	mov	ebx,24 shl 16+(250+14+14+14)
657
	mov	ebx,24 shl 16+(250+14+14+14)
636
	mov	ecx,0xffffff
658
	mov	ecx,0xffffff
637
	mov	edx,text
659
	mov	edx,text
638
	mov	esi,47
660
	mov	esi,47
639
;--------------------------------------
661
;--------------------------------------
640
align 4
662
align 4
641
newline:
663
newline:
642
	mov	ecx,[edx]
664
	mov	ecx,[edx]
643
	add	edx,4
665
	add	edx,4
644
	mcall
666
	mcall
645
	add	ebx,14
667
	add	ebx,14
646
	add	edx,47
668
	add	edx,47
647
	cmp	[edx],byte 'x'
669
	cmp	[edx],byte 'x'
648
	jne	newline
670
	jne	newline
649
;--------------------------------------
671
;--------------------------------------
650
align 4
672
align 4
651
draw_btns:
673
draw_btns:
652
	mov	eax,0                     ; DRAW BUTTONS ON WINDOW AREA
674
	mov	eax,0	; DRAW BUTTONS ON WINDOW AREA
653
	mov	ebx,20 shl 16+25
675
	mov	ebx,20 shl 16+25
654
	mov	ecx,35 shl 16+19
676
	mov	ecx,35 shl 16+19
655
	mov	edi,icon_table
677
	mov	edi,icon_table
656
	mov	edx,40
678
	mov	edx,40
657
;--------------------------------------
679
;--------------------------------------
658
align 4
680
align 4
659
newbline:
681
newbline:
660
	cmp	[edi],byte 'x'
682
	cmp	[edi],byte 'x'
661
	jne	no_button
683
	jne	no_button
662
 
684
 
663
	mov	esi,0x5577cc
685
	mov	esi,0x5577cc
664
	cmp	[edi+90],byte 'x'
686
	cmp	[edi+90],byte 'x'
665
	jne	nores
687
	jne	nores
666
 
688
 
667
	mov	esi,0xcc5555
689
	mov	esi,0xcc5555
668
	cmp	edx,[cur_btn]
690
	cmp	edx,[cur_btn]
669
	jne	nores
691
	jne	nores
670
 
692
 
671
	mov	esi,0xe7e05a
693
	mov	esi,0xe7e05a
672
;--------------------------------------
694
;--------------------------------------
673
align 4
695
align 4
674
nores:
696
nores:
675
	push	eax
697
	push	eax
676
	mcall	8
698
	mcall	8
677
	pop	eax
699
	pop	eax
678
;--------------------------------------
700
;--------------------------------------
679
align 4
701
align 4
680
no_button:
702
no_button:
681
	add	ebx,26 shl 16
703
	add	ebx,26 shl 16
682
 
704
 
683
	inc	edi
705
	inc	edi
684
	inc	edx
706
	inc	edx
685
	inc	al
707
	inc	al
686
	cmp	al,9
708
	cmp	al,9
687
	jbe	newbline
709
	jbe	newbline
688
	
710
	
689
	mov	al,0
711
	mov	al,0
690
	add	edx,6
712
	add	edx,6
691
	ror	ebx,16
713
	ror	ebx,16
692
	mov	bx,20
714
	mov	bx,20
693
	ror	ebx,16
715
	ror	ebx,16
694
	add	ecx,20 shl 16
716
	add	ecx,20 shl 16
695
	inc	ah
717
	inc	ah
696
	cmp	ah,8	;9
718
	cmp	ah,8	;9
697
	jbe	newbline
719
	jbe	newbline
698
 
720
 
699
	call	print_strings
721
	call	print_strings
700
	call	draw_icon
722
	call	draw_icon
701
	mcall	12,2
723
	mcall	12,2
702
	ret
724
	ret
703
;------------------------------------------------------------------------------
725
;------------------------------------------------------------------------------
704
align 4
726
align 4
705
draw_icon:
727
draw_icon:
706
	mcall	13,<(33-20),(34*8+2)>,<(260-24),(37+15-2)>,0xffffff
728
	mcall	13,<(33-20),(34*8+2)>,<(260-24),(37+15-2)>,0xffffff
707
	mov	esi,[current_icon]
729
	mov	esi,[current_icon]
708
	add	esi,12
730
	add	esi,12
709
	call	atoi
731
	call	atoi
710
	push	eax
732
	push	eax
711
	cmp	eax,[cur_band]
733
	cmp	eax,[cur_band]
712
	jb	.nou
734
	jb	.nou
713
	sub	eax,[cur_band]
735
	sub	eax,[cur_band]
714
	cmp	eax,7
736
	cmp	eax,7
715
	ja	.nou
737
	ja	.nou
716
	imul	eax,34 shl 16
738
	imul	eax,34 shl 16
717
	lea	ebx,[eax+(33-19) shl 16]
739
	lea	ebx,[eax+(33-19) shl 16]
718
	mov	bx,34
740
	mov	bx,34
719
	mcall	13,,<(236+35),3>,0xff0000
741
	mcall	13,,<(236+35),3>,0xff0000
720
	mov	eax,[esp]
742
	mov	eax,[esp]
721
;--------------------------------------
743
;--------------------------------------
722
align 4
744
align 4
723
.nou:
745
.nou:
724
	mov	eax,[cur_band]
746
	mov	eax,[cur_band]
725
	and	eax,0xfffffff8
747
	and	eax,0xfffffff8
726
	push	eax
748
	push	eax
727
	imul	eax,ICON_SIZE
749
	imul	eax,ICON_SIZE
728
	lea	ebx,[strip_file+8+eax]
750
	lea	ebx,[strip_file+8+eax]
729
	mov	ecx,8
751
	mov	ecx,8
730
	mov	edx,(33-18) shl 16+238
752
	mov	edx,(33-18) shl 16+238
731
;--------------------------------------
753
;--------------------------------------
732
align 4
754
align 4
733
.nxt:
755
.nxt:
734
	push	ecx
756
	push	ecx
735
	mcall	7,,<32,32>
757
	mcall	7,,<32,32>
736
	pop	ecx
758
	pop	ecx
737
	add	ebx,ICON_SIZE
759
	add	ebx,ICON_SIZE
738
	add	edx,34 shl 16
760
	add	edx,34 shl 16
739
	loop	.nxt
761
	loop	.nxt
740
 
762
 
741
	mcall	4,<45,280-2>,0,rep_text,rep_text_len-rep_text
763
	mcall	4,<45,280-2>,0,rep_text,rep_text_len-rep_text
742
	lea	edx,[ebx+(8*5)shl 16]
764
	lea	edx,[ebx+(8*5)shl 16]
743
	pop	ecx
765
	pop	ecx
744
	mcall	47,0x30000,,,0xff
766
	mcall	47,0x30000,,,0xff
745
	
767
	
746
	add	ecx,7
768
	add	ecx,7
747
	add	edx,(3*8+4)shl 16
769
	add	edx,(3*8+4)shl 16
748
	mcall
770
	mcall
749
	
771
	
750
	add	edx,(5*8+4)shl 16
772
	add	edx,(5*8+4)shl 16
751
	mcall	,,[icon_count]
773
	mcall	,,[icon_count]
752
	
774
	
753
	pop	ecx
775
	pop	ecx
754
	add	edx,(10*8+4)shl 16
776
	add	edx,(10*8+4)shl 16
755
	mcall	,,,,0xff0000
777
	mcall	,,,,0xff0000
756
	ret
778
	ret
757
;------------------------------------------------------------------------------
779
;------------------------------------------------------------------------------
758
; DATA AREA
780
; DATA AREA
759
bcolor dd 0x335599
781
bcolor dd 0x335599
760
;------------------------------------------------------------------------------
782
;------------------------------------------------------------------------------
761
icon_table:
783
icon_table:
762
	times 4  db  'xxxx  xxxx'
784
 times 4  db 'xxxx  xxxx'
763
	times 2  db  '          '
785
 times 2  db '          '
764
	times 1  db  '          '
786
 times 1  db '          '
765
	times 2  db  'xxxx  xxxx'
787
 times 2  db 'xxxx  xxxx'
766
;	times 1  db  '          '
788
; times 1  db '          '
767
;------------------------------------------------------------------------------
789
;------------------------------------------------------------------------------
768
icons_reserved:
790
icons_reserved:
769
	times 9  db  '          '
791
	times 9  db '          '
770
;------------------------------------------------------------------------------
792
;------------------------------------------------------------------------------
771
if lang eq ru
793
if lang eq ru
772
text:
794
text:
773
	db 255,255,255,0,   '   ’…Š‘’                                       '
795
	db 255,255,255,0,   '   ’…Š‘’                                       '
774
	db 255,255,255,0,   ' Žƒ€ŒŒ€                                     '
796
	db 255,255,255,0,   ' Žƒ€ŒŒ€                                     '
775
	db 255,255,255,0,   ' €€Œ…’›                                     '
797
	db 255,255,255,0,   ' €€Œ…’›                                     '
776
	db 255,255,255,0,   '                 ˆŒ…ˆ’œ                     '
798
	db 255,255,255,0,   '                 ˆŒ…ˆ’œ                     '
777
	db 255,255,255,0,   '      „Ž€‚ˆ’œ              “„€‹ˆ’œ            '
799
	db 255,255,255,0,   '      „Ž€‚ˆ’œ              “„€‹ˆ’œ            '
778
	db 0,0,0,0,         '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ   '
800
	db 0,0,0,0,         '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ   '
779
	db                  'x' ; <- END MARKER, DONT DELETE
801
	db                  'x' ; <- END MARKER, DONT DELETE
780
 
802
 
781
add_text	db '€†Œˆ’… € Ž‡ˆ–ˆž …ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ     ',0
803
add_text	db '€†Œˆ’… € Ž‡ˆ–ˆž …ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ     ',0
782
rem_text	db '€†Œˆ’… € Ž‡ˆ–ˆž ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ       ',0
804
rem_text	db '€†Œˆ’… € Ž‡ˆ–ˆž ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ       ',0
783
title		db 'Œ¥­¥¤¦¥à ¨ª®­®ª',0
805
title		db 'Œ¥­¥¤¦¥à ¨ª®­®ª',0
784
 
806
 
785
else if lang eq ge
807
else if lang eq ge
786
text:
808
text:
787
	db 255,255,255,0,   '   TITLE                                       '
809
	db 255,255,255,0,   '   TITLE                                       '
788
	db 255,255,255,0,   '  APP NAME                                     '
810
	db 255,255,255,0,   '  APP NAME                                     '
789
	db 255,255,255,0,   ' PARAMETER                                     '
811
	db 255,255,255,0,   ' PARAMETER                                     '
790
	db 255,255,255,0,   '                ANWENDEN                       '
812
	db 255,255,255,0,   '                ANWENDEN                       '
791
	db 255,255,255,0,   '     HINZUFUEGEN              ENTFERNEN        '
813
	db 255,255,255,0,   '     HINZUFUEGEN              ENTFERNEN        '
792
	db 0,0,0,0,         'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN       '
814
	db 0,0,0,0,         'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN       '
793
	db                  'x' ; <- END MARKER, DONT DELETE
815
	db                  'x' ; <- END MARKER, DONT DELETE
794
 
816
 
795
add_text	db 'AUF UNBENUTZTE ICONPOSITION KLICKEN          ',0
817
add_text	db 'AUF UNBENUTZTE ICONPOSITION KLICKEN          ',0
796
rem_text	db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL    ',0
818
rem_text	db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL    ',0
797
title		db 'Icon Manager',0
819
title		db 'Icon Manager',0
798
 
820
 
799
else
821
else
800
text:
822
text:
801
	db 255,255,255,0,   '   TITLE                                       '
823
	db 255,255,255,0,   '   TITLE                                       '
802
	db 255,255,255,0,   '  APP NAME                                     '
824
	db 255,255,255,0,   '  APP NAME                                     '
803
	db 255,255,255,0,   ' PARAMETERS                                    '
825
	db 255,255,255,0,   ' PARAMETERS                                    '
804
	db 255,255,255,0,   '                APPLY CHANGES                  '
826
	db 255,255,255,0,   '                APPLY CHANGES                  '
805
	db 255,255,255,0,   '      ADD ICON              REMOVE ICON        '
827
	db 255,255,255,0,   '      ADD ICON              REMOVE ICON        '
806
	db 0,0,0,0,         'CLICK BUTTON ON ICON POSITION FOR EDIT         '
828
	db 0,0,0,0,         'CLICK BUTTON ON ICON POSITION FOR EDIT         '
807
	db                  'x' ; <- END MARKER, DONT DELETE
829
	db                  'x' ; <- END MARKER, DONT DELETE
808
add_text	db 'CLICK ON A NOT USED POSITION                 ',0
830
add_text	db 'CLICK ON A NOT USED POSITION                 ',0
809
rem_text	db 'CLICK ICON POSITION; YOU WANT TO DELETE      ',0
831
rem_text	db 'CLICK ICON POSITION; YOU WANT TO DELETE      ',0
810
title		db 'Icon Manager',0
832
title		db 'Icon Manager',0
811
 
833
 
812
end if
834
end if
813
;------------------------------------------------------------------------------
835
;------------------------------------------------------------------------------
814
arrows	db ''
836
arrows	db ''
815
;------------------------------------------------------------------------------
837
;------------------------------------------------------------------------------
816
iconname:
838
iconname:
817
	db ICON_APP,0
839
	db ICON_APP,0
818
;------------------------------------------------------------------------------
840
;------------------------------------------------------------------------------
819
icon_default:
841
icon_default:
820
	db 'AA-SYSXTREE-000-/RD/1/SYSXTREE                '
842
	db 'AA-SYSXTREE-000-/RD/1/SYSXTREE                '
821
	db '-                              *'
843
	db '-                              *'
822
	db 13,10
844
	db 13,10
823
;------------------------------------------------------------------------------
845
;------------------------------------------------------------------------------
824
rep_text:
846
rep_text:
825
if lang eq ru
847
if lang eq ru
826
	db '‡€—Šˆ    -     ˆ‡    , ‚›€ #'
848
	db '‡€—Šˆ    -     ˆ‡    , ‚›€ #'
827
else
849
else
828
	db 'ICONS     -     OF    , SELECTED'
850
	db 'ICONS     -     OF    , SELECTED'
829
end if
851
end if
830
 
852
 
831
rep_text_len:
853
rep_text_len:
832
;------------------------------------------------------------------------------
854
;------------------------------------------------------------------------------
833
align 4
855
align 4
834
get_bg_info:
856
get_bg_info:
835
	mcall	39,4
857
	mcall	39,4
836
	mov	[bgrdrawtype],eax
858
	mov	[bgrdrawtype],eax
837
 
859
 
838
	mcall	39,1	; get background size
860
	mcall	39,1	; get background size
839
	mov	[bgrxy],eax
861
	mov	[bgrxy],eax
840
 
862
 
841
	mov	ebx,eax
863
	mov	ebx,eax
842
	shr	eax,16
864
	shr	eax,16
843
	and	ebx,0xffff
865
	and	ebx,0xffff
844
	mov	[bgrx],eax
866
	mov	[bgrx],eax
845
	mov	[bgry],ebx
867
	mov	[bgry],ebx
846
	ret
868
	ret
847
;------------------------------------------------------------------------------
869
;------------------------------------------------------------------------------
848
align 4
870
align 4
849
calc_icon_pos:
871
calc_icon_pos:
850
	movzx	eax,byte [ebp-20]    ; x position
872
	movzx	eax,byte [ebp-20]	; x position
851
	sub	eax,'A'        ;eax - number of letter
873
	sub	eax,'A'		;eax - number of letter
852
	cmp	eax,4
874
	cmp	eax,4
853
	jg	no_left
875
	jg	no_left
854
 
876
 
855
	shl	eax,6	;imul eax,64
877
	shl	eax,6	;imul eax,64
856
	add	eax,16
878
	add	eax,16
857
	movzx	ebx,[warea.left]
879
	movzx	ebx,[warea.left]
858
	add	eax,ebx
880
	add	eax,ebx
859
	jmp	x_done
881
	jmp	x_done
860
;--------------------------------------
882
;--------------------------------------
861
align 4
883
align 4
862
no_left:
884
no_left:
863
	sub	eax,9
885
	sub	eax,9
864
	sal	eax,6	;imul eax,64
886
	sal	eax,6	;imul eax,64
865
	sub	eax,16+52-1
887
	sub	eax,16+52-1
866
	movzx	ebx,[warea.right]
888
	movzx	ebx,[warea.right]
867
	add	eax,ebx
889
	add	eax,ebx
868
;--------------------------------------
890
;--------------------------------------
869
align 4
891
align 4
870
x_done:
892
x_done:
871
	mov	[ebp-12],eax
893
	mov	[ebp-12],eax
872
	movzx	eax,byte [ebp-20+1]  ; y position
894
	movzx	eax,byte [ebp-20+1]	; y position
873
	sub	eax,'A'        ; eax - number of letter
895
	sub	eax,'A'		; eax - number of letter
874
	cmp	eax,4
896
	cmp	eax,4
875
	jg	no_up
897
	jg	no_up
876
 
898
 
877
	shl	eax,6            ;imul eax,80
899
	shl	eax,6		;imul eax,80
878
	add	eax,16
900
	add	eax,16
879
	movzx	ebx,[warea.top]
901
	movzx	ebx,[warea.top]
880
	add	eax,ebx
902
	add	eax,ebx
881
	jmp	y_done
903
	jmp	y_done
882
;--------------------------------------
904
;--------------------------------------
883
align 4
905
align 4
884
no_up:
906
no_up:
885
	sub	eax,9
907
	sub	eax,9
886
	shl	eax,6            ;imul eax,80
908
	shl	eax,6		;imul eax,80
887
	sub	eax,16-1
909
	sub	eax,16-1
888
	movzx	ebx,[warea.bottom]
910
	movzx	ebx,[warea.bottom]
889
	add	eax,ebx
911
	add	eax,ebx
890
;--------------------------------------
912
;--------------------------------------
891
align 4
913
align 4
892
y_done:
914
y_done:
893
	mov	[ebp-8],eax
915
	mov	[ebp-8],eax
894
	ret
916
	ret
895
;--------------------------------------
917
;--------------------------------------
896
align 4
918
align 4
897
;START2:
919
;START2:
898
load_icon_list2:
920
load_icon_list2:
899
	call	get_bg_info
921
	call	get_bg_info
900
 
922
 
901
	mcall	48,5
923
	mcall	48,5
902
	mov	[warea.by_x],eax
924
	mov	[warea.by_x],eax
903
	mov	[warea.by_y],ebx
925
	mov	[warea.by_y],ebx
904
 
926
 
905
	mcall	14
927
	mcall	14
906
	add	eax,0x00010001
928
	add	eax,0x00010001
907
	mov	[scrxy],eax
929
	mov	[scrxy],eax
908
;--------------------------------------
930
;--------------------------------------
909
align 4
931
align 4
910
apply_changes2:
932
apply_changes2:
911
	mov	edi,[icons]
933
	mov	edi,[icons]
912
	mov	esi,icon_data
934
	mov	esi,icon_data
913
	mov	ebp,0x5000	; threads stack starting point
935
	mov	ebp,thread_stack+0x100	;0x5000	; threads stack starting point
914
;--------------------------------------
936
;--------------------------------------
915
align 4
937
align 4
916
start_new:
938
start_new:
917
	mov	eax,[esi]
939
	mov	eax,[esi]
918
	mov	[ebp-20],eax
940
	mov	[ebp-20],eax
919
	call	calc_icon_pos
941
	call	calc_icon_pos
920
 
942
 
921
	mov	edx,ebp
943
	mov	edx,ebp
922
	mov	dword[ebp-4],esi
944
	mov	dword[ebp-4],esi
923
	mcall	51,1,thread
945
	mcall	51,1,thread
924
	add	ebp,0x100
946
	add	ebp,0x100
-
 
947
 
925
 
948
; change to next thread if mutex is blocked
926
	mov	eax,5
949
	mov	eax,68
927
	mov	ebx,1
950
	mov	ebx,1
928
;--------------------------------------
951
;--------------------------------------
929
align 4
952
align 4
930
wait_thread_start:         ;wait until thread draw itself first time
953
wait_thread_start:		;wait until thread draw itself first time
931
	cmp	[create_thread_event],bl
954
	cmp	[create_thread_event],bl	;mutex
932
	jz	wait_thread_end
955
	jz	wait_thread_end
933
	mcall
956
	mcall
934
	jmp	wait_thread_start
957
	jmp	wait_thread_start
935
;--------------------------------------
958
;--------------------------------------
936
align 4
959
align 4
937
wait_thread_end:
960
wait_thread_end:
938
	dec	[create_thread_event]     ;reset event
961
	dec	[create_thread_event]	;reset event
939
	add	esi,REC_SIZE
962
	add	esi,REC_SIZE
940
	dec	edi
963
	dec	edi
941
	jnz	start_new
964
	jnz	start_new
942
;--------------------------------------
965
;--------------------------------------
943
align 4
966
align 4
944
close:
967
close:
945
	or	eax,-1
968
	or	eax,-1
946
	mcall
969
	mcall
947
;------------------------------------------------------------------------------
970
;------------------------------------------------------------------------------
-
 
971
; esp-28 = start of thread stack
-
 
972
; esp-24 = ???
-
 
973
; esp-20 = 'AA-F' or...
-
 
974
; esp-16 = ???  SHL greedy maniac mode on!
-
 
975
; esp-12 = ebp+0 = X
-
 
976
; esp-8  = ebp+4 = Y
-
 
977
; esp-4  = ebp+8 = adress of icon_data
-
 
978
;------------------------------------------------------------------------------
948
align 4
979
align 4
949
thread:
980
thread:
950
;   pop  ebp ;ebp - address of our icon
-
 
951
	sub	esp,12
981
	sub	esp,12
952
	mov	ebp,esp
982
	mov	ebp,esp
953
	sub	esp,16
983
	sub	esp,16
-
 
984
	call	shape_window
954
	call	draw_window2
985
	call	draw_window2
955
	mov	[create_thread_event],1
986
	mov	[create_thread_event],1
956
	mcall	40,010101b
987
	mcall	40,010101b
957
;------------------------------------------------------------------------------
988
;------------------------------------------------------------------------------
958
align 4
989
align 4
959
still2:
990
still2:
960
	mcall	10
991
	mcall	10
961
	cmp	eax,1
992
	cmp	eax,1
962
	je	red2
993
	je	red2
963
 
994
 
964
	cmp	eax,3
995
	cmp	eax,3
965
	je	button2
996
	je	button2
966
	
997
	
967
	call	get_bg_info
998
	call	get_bg_info
968
	mov	eax,5
-
 
969
	mov	ebx,1
-
 
970
	call	draw_icon2
999
	call	draw_icon2_1
971
	
1000
	
972
	jmp	still2
1001
	jmp	still2
973
;------------------------------------------------------------------------------
1002
;------------------------------------------------------------------------------
974
align 4
1003
align 4
975
red2:
1004
red2:
976
	mcall	14
1005
	mcall	14
977
	add	eax,0x00010001
1006
	add	eax,0x00010001
978
	mov	[scrxy],eax
1007
	mov	[scrxy],eax
979
	mcall	48,5
1008
	mcall	48,5
980
	mov	[warea.by_x],eax
1009
	mov	[warea.by_x],eax
981
	mov	[warea.by_y],ebx
1010
	mov	[warea.by_y],ebx
982
	add	ebp,+12
1011
	add	ebp,+12
983
	call	calc_icon_pos
1012
	call	calc_icon_pos
984
	add	ebp,-12
1013
	add	ebp,-12
985
	mcall	9,I_END,-1
1014
	mcall	9,process_table,-1
986
	mov	eax,[I_END+process_information.box.left]
1015
	mov	eax,[process_table+process_information.box.left]
987
	cmp	eax,[ebp+0]
1016
	cmp	eax,[ebp+0]
988
	jne	@f
1017
	jne	@f
989
	mov	eax,[I_END+process_information.box.top]
1018
	mov	eax,[process_table+process_information.box.top]
990
	cmp	eax,[ebp+4]
1019
	cmp	eax,[ebp+4]
991
	je	.lp1
1020
	je	.lp1
992
;--------------------------------------
1021
;--------------------------------------
993
align 4
1022
align 4
994
@@:
1023
@@:
995
	call	get_bg_info
1024
	call	get_bg_info
996
	mcall	67,[ebp+0],[ebp+4],51,51
1025
	mcall	67,[ebp+0],[ebp+4],51,51
997
;--------------------------------------
1026
;--------------------------------------
998
align 4
1027
align 4
999
.lp1:
1028
.lp1:
1000
	call	draw_window2
1029
	call	draw_window2
1001
	jmp	still2
1030
	jmp	still2
1002
;------------------------------------------------------------------------------
1031
;------------------------------------------------------------------------------
1003
align 4
1032
align 4
1004
button2:
1033
button2:
1005
	mcall	17
1034
	mcall	17
1006
	cmp	ah, 2
1035
	cmp	ah, 2
1007
	jnz	still2
1036
	jnz	still2
1008
 
1037
 
1009
	mcall	9,I_END,-1
1038
	mcall	9,process_table,-1
1010
	mov	ecx,[ebx+30]	; PID
1039
	mov	ecx,[ebx+30]	; PID
1011
	mcall	18,21
1040
	mcall	18,21
1012
	mov	edx,eax		; SLOT
1041
	mov	edx,eax		; SLOT
1013
	mcall	18,7
1042
	mcall	18,7
1014
	cmp	edx,eax	; compare with active SLOT
1043
	cmp	edx,eax	; compare with active SLOT
1015
	jne	@f
1044
	jne	@f
1016
	mov	ecx,edx
1045
	mov	ecx,edx
1017
	mcall	18,1	; set to down
1046
	mcall	18,1	; set to down
1018
	call	draw_window2
1047
	call	draw_window2
1019
;--------------------------------------
1048
;--------------------------------------
1020
align 4
1049
align 4
1021
@@:
1050
@@:
1022
	mov	esi,[ebp+8]
1051
	mov	esi,[ebp+8]
1023
	mov	ebx,1
1052
	mov	ebx,1
1024
	mov	edi,finfo.path
1053
	mov	edi,finfo.path
1025
	call	fill_paths
1054
	call	fill_paths
1026
	inc	ebx
1055
	inc	ebx
1027
	mov	edi,param_str
1056
	mov	edi,param_str
1028
	mov	dword[finfo_start+8],edi
1057
	mov	dword[finfo_start+8],edi
1029
	call	fill_paths
1058
	call	fill_paths
1030
	cmp	byte[edi],0
1059
	cmp	byte[edi],0
1031
	jne	.no0
1060
	jne	.no0
1032
	and	dword[finfo_start+8],0
1061
	and	dword[finfo_start+8],0
1033
;--------------------------------------
1062
;--------------------------------------
1034
align 4
1063
align 4
1035
.no0:
1064
.no0:
1036
	mov	ebx,finfo_start
1065
	mov	ebx,finfo_start
1037
	mcall	70
1066
	mcall	70
1038
	jmp	still2
1067
	jmp	still2
1039
;------------------------------------------------------------------------------
1068
;------------------------------------------------------------------------------
1040
align 4
1069
align 4
1041
fill_paths:
1070
fill_paths:
1042
	push	esi edi
1071
	push	esi edi
1043
;	dps	'>'
1072
;	dps	'>'
1044
	movzx	ecx,byte[str_lens+ebx]
1073
	movzx	ecx,byte[str_lens+ebx]
1045
	add	esi,[positions+ebx*4]
1074
	add	esi,[positions+ebx*4]
1046
	push	esi
1075
	push	esi
1047
	add	esi,ecx
1076
	add	esi,ecx
1048
;--------------------------------------
1077
;--------------------------------------
1049
align 4
1078
align 4
1050
.l1:
1079
.l1:
1051
	dec	esi
1080
	dec	esi
1052
	cmp	byte[esi],' '
1081
	cmp	byte[esi],' '
1053
	jnz	.found
1082
	jnz	.found
1054
	loop	.l1
1083
	loop	.l1
1055
	pop	esi
1084
	pop	esi
1056
	jmp	.noms
1085
	jmp	.noms
1057
;--------------------------------------
1086
;--------------------------------------
1058
align 4
1087
align 4
1059
.found:
1088
.found:
1060
	lea	ecx,[esi+1]
1089
	lea	ecx,[esi+1]
1061
	pop	esi
1090
	pop	esi
1062
	sub	ecx,esi
1091
	sub	ecx,esi
1063
	rep	movsb
1092
	rep	movsb
1064
;--------------------------------------
1093
;--------------------------------------
1065
align 4
1094
align 4
1066
.noms:
1095
.noms:
1067
        and	byte[edi],0
1096
	and	byte[edi],0
1068
;	call	debug_outstr
1097
;	call	debug_outstr
1069
;	dps	<'<',13,10>
1098
;	dps	<'<',13,10>
1070
	pop	edi esi
1099
	pop	edi esi
1071
	ret
1100
	ret
1072
;--------------------------------------
1101
;--------------------------------------
1073
align 4
1102
align 4
1074
atoi:
1103
atoi:
1075
	push	esi
1104
	push	esi
1076
	xor	eax,eax
1105
	xor	eax,eax
1077
	xor	ebx,ebx
1106
	xor	ebx,ebx
1078
;--------------------------------------
1107
;--------------------------------------
1079
align 4
1108
align 4
1080
.nxt:
1109
.nxt:
1081
	lodsb
1110
	lodsb
1082
	cmp	al,'0'
1111
	cmp	al,'0'
1083
	jb	.done
1112
	jb	.done
1084
	cmp	al,'9'
1113
	cmp	al,'9'
1085
	ja	.done
1114
	ja	.done
1086
	sub	eax,'0'
1115
	sub	eax,'0'
1087
; multiply x10
1116
; multiply x10
1088
	shl	ebx,1		; multiply x2
1117
	shl	ebx,1		; multiply x2
1089
	lea	ebx,[ebx+ebx*4] ; multiply x5
1118
	lea	ebx,[ebx+ebx*4] ; multiply x5
1090
	add	ebx,eax
1119
	add	ebx,eax
1091
	jmp	.nxt
1120
	jmp	.nxt
1092
;--------------------------------------
1121
;--------------------------------------
1093
align 4
1122
align 4
1094
.done:
1123
.done:
1095
	pop	esi
1124
	pop	esi
1096
	mov	eax,ebx
1125
	mov	eax,ebx
1097
	ret
1126
	ret
1098
;--------------------------------------
1127
;--------------------------------------
1099
align 4
1128
align 4
1100
itoa:
1129
itoa:
1101
	add	esi,2
1130
	add	esi,2
1102
	mov	ebx,10
1131
	mov	ebx,10
1103
	mov	ecx,3
1132
	mov	ecx,3
1104
;--------------------------------------
1133
;--------------------------------------
1105
align 4
1134
align 4
1106
.l0:
1135
.l0:
1107
	xor	edx,edx
1136
	xor	edx,edx
1108
	div	ebx
1137
	div	ebx
1109
	add	dl,'0'
1138
	add	dl,'0'
1110
	mov	[esi],dl
1139
	mov	[esi],dl
1111
	dec	esi
1140
	dec	esi
1112
	loop	.l0
1141
	loop	.l0
1113
	ret
1142
	ret
1114
;------------------------------------------------------------------------------
1143
;------------------------------------------------------------------------------
1115
align 4
1144
align 4
1116
draw_picture:
1145
draw_picture:
1117
	mov	[image],0x3000
1146
	mov	[image],image_area
-
 
1147
 
1118
	mov	edi,[ebp+8]
1148
	mov	edi,[ebp+8]
1119
	lea	esi,[edi+12]
1149
	lea	esi,[edi+12]
1120
	call	atoi
1150
	call	atoi
1121
	cmp	eax,[icon_count]
1151
	cmp	eax,[icon_count]
1122
	ja	toponly.ex
1152
	ja	toponly.ex
1123
;	imul	eax,(32*3*32)
1153
;	imul	eax,(32*3*32)
1124
	lea	eax,[eax+eax*2]	; multiply x3
1154
	lea	eax,[eax+eax*2]	; multiply x3
1125
	shl	eax,10		; multiply x1024
1155
	shl	eax,10		; multiply x1024
1126
	
1156
	
1127
	lea	edi,[eax+strip_file+8]
1157
	lea	edi,[eax+strip_file+8]
1128
	xor	ebx,ebx
1158
	xor	ebx,ebx
1129
	xor	ecx,ecx
1159
	xor	ecx,ecx
1130
	mov	esi,edi;strip_file+8+(32*3*32)*2
1160
	mov	esi,edi
1131
 
1161
 
1132
	mov	[pixpos],0
1162
	mov	[pixpos],0
1133
;--------------------------------------
1163
;--------------------------------------
1134
; loop start
1164
; loop start
1135
align 4
1165
align 4
1136
newb:
1166
newb:
1137
	push	ebx
1167
	push	ebx
1138
	push	ecx
1168
	push	ecx
1139
 
1169
 
1140
	cmp	ebx,10
1170
	cmp	ebx,10
1141
	jb	yesbpix
1171
	jb	yesbpix
1142
	cmp	ebx,42
1172
	cmp	ebx,42
1143
	jge	yesbpix
1173
	jge	yesbpix
1144
	cmp	ecx,31	;2
1174
	cmp	ecx,31	;2
1145
	jg	yesbpix
1175
	jg	yesbpix
1146
 
1176
 
1147
	push	esi
1177
	push	esi
1148
	mov	esi,edi
1178
	mov	esi,edi
1149
	add	esi,[pixpos]
1179
	add	esi,[pixpos]
1150
;--------------------------------------
1180
;--------------------------------------
1151
align 4
-
 
1152
no_correction_pixpos:
-
 
1153
	add	[pixpos],3
1181
	add	[pixpos],3
1154
	mov	eax,[esi]
1182
	mov	eax,[esi]
1155
	and	eax,0xffffff
1183
	and	eax,0xffffff
1156
 
1184
 
1157
	pop	esi
1185
	pop	esi
1158
 
1186
 
1159
	cmp	eax,0
1187
	cmp	eax,0
1160
	je	yesbpix
1188
	je	yesbpix
1161
	cmp	eax,0xfffcff	;f5f5f5
1189
	cmp	eax,0xfffcff	;f5f5f5
1162
	je	yesbpix
1190
	je	yesbpix
1163
	jmp	nobpix
1191
	jmp	nobpix
1164
;--------------------------------------
1192
;--------------------------------------
1165
align 4
1193
align 4
1166
yesbpix:
1194
yesbpix:
1167
stretch:
1195
stretch:
1168
	cmp	[bgrdrawtype],dword 2
1196
	cmp	[bgrdrawtype],dword 2
1169
	jne	nostretch
1197
	jne	nostretch
1170
	mov	eax,[ebp+4]
1198
	mov	eax,[ebp+4]
1171
	add	eax,ecx
1199
	add	eax,ecx
1172
	imul	eax,[bgry]
1200
	imul	eax,[bgry]
1173
	cdq
1201
	cdq
1174
	movzx	ebx,word [scrxy]
1202
	movzx	ebx,word [scrxy]
1175
	div	ebx
1203
	div	ebx
1176
	imul	eax,[bgrx]
1204
	imul	eax,[bgrx]
1177
	push	eax
1205
	push	eax
1178
	mov	eax,[ebp+0]
1206
	mov	eax,[ebp+0]
1179
	add	eax,[esp+8]
1207
	add	eax,[esp+8]
1180
	imul	eax,[bgrx]
1208
	imul	eax,[bgrx]
1181
	cdq
1209
	cdq
1182
	movzx	ebx,word [scrxy+2]
1210
	movzx	ebx,word [scrxy+2]
1183
	div	ebx
1211
	div	ebx
1184
	add	eax,[esp]
1212
	add	eax,[esp]
1185
	add	esp,4
1213
	add	esp,4
1186
	jmp	notiled
1214
	jmp	notiled
1187
;--------------------------------------
1215
;--------------------------------------
1188
align 4
1216
align 4
1189
nostretch:
1217
nostretch:
1190
	cmp	[bgrdrawtype],dword 1
1218
	cmp	[bgrdrawtype],dword 1
1191
	jne	notiled
1219
	jne	notiled
1192
	mov	eax,[ebp+4]
1220
	mov	eax,[ebp+4]
1193
	add	eax,ecx
1221
	add	eax,ecx
1194
	cdq
1222
	cdq
1195
	movzx	ebx,word [bgrxy]
1223
	movzx	ebx,word [bgrxy]
1196
	div	ebx
1224
	div	ebx
1197
	mov	eax,edx
1225
	mov	eax,edx
1198
	imul	eax,[bgrx]
1226
	imul	eax,[bgrx]
1199
	push	eax
1227
	push	eax
1200
	mov	eax,[ebp+0]
1228
	mov	eax,[ebp+0]
1201
	add	eax,[esp+8]
1229
	add	eax,[esp+8]
1202
	movzx	ebx,word [bgrxy+2]
1230
	movzx	ebx,word [bgrxy+2]
1203
	cdq
1231
	cdq
1204
	div	ebx
1232
	div	ebx
1205
	mov	eax,edx
1233
	mov	eax,edx
1206
	add	eax,[esp]
1234
	add	eax,[esp]
1207
	add	esp,4
1235
	add	esp,4
1208
;--------------------------------------
1236
;--------------------------------------
1209
align 4
1237
align 4
1210
notiled:
1238
notiled:
1211
	lea	ecx,[eax+eax*2]
1239
	lea	ecx,[eax+eax*2]
1212
	mcall	39,2
1240
	mcall	39,2
1213
;--------------------------------------
1241
;--------------------------------------
1214
align 4
1242
align 4
1215
nobpix:
1243
nobpix:
1216
	pop	ecx
1244
	pop	ecx
1217
	pop	ebx
1245
	pop	ebx
1218
 
1246
 
1219
	mov	edx,eax
1247
	mov	edx,eax
1220
	mov	eax,[image]
1248
	mov	eax,[image]
1221
	mov	[eax],edx
1249
 
1222
	mov	[eax],dl
1250
	mov	[eax],dl
1223
	inc	eax
1251
	inc	eax
1224
	ror	edx,8
1252
	ror	edx,8
-
 
1253
	
1225
	mov	[eax],dl
1254
	mov	[eax],dl
1226
	inc	eax
1255
	inc	eax
1227
	ror	edx,8
1256
	ror	edx,8
-
 
1257
	
1228
	mov	[eax],dl
1258
	mov	[eax],dl
-
 
1259
	
1229
	inc	eax
1260
	inc	eax
1230
	mov	[image],eax
1261
	mov	[image],eax
1231
	inc	ebx
1262
	inc	ebx
-
 
1263
	
1232
	mov	eax,[yw]
1264
	mov	eax,[yw]
1233
	inc	eax
1265
	inc	eax
1234
	cmp	ebx,eax
1266
	cmp	ebx,eax
1235
	jnz	newb
1267
	jb	newb
-
 
1268
	
1236
	xor	ebx,ebx
1269
	xor	ebx,ebx
1237
 
1270
 
1238
	inc	ecx
1271
	inc	ecx
1239
	mov	eax,[ya]
1272
	mov	eax,[ya]
1240
	add	[pixpos],eax
1273
	add	[pixpos],eax
1241
 
1274
 
1242
	cmp	[top],1
1275
	cmp	[top],1
1243
	jne	notop
1276
	jne	notop
1244
 
1277
 
1245
	cmp	ecx,38
1278
	cmp	ecx,38
1246
	je	toponly
1279
	je	toponly
1247
;--------------------------------------
1280
;--------------------------------------
1248
align 4
1281
align 4
1249
notop:
1282
notop:
1250
	cmp	ecx,52
1283
	cmp	ecx,52
1251
	jnz	newb
1284
	jnz	newb
1252
;--------------------------------------
1285
;--------------------------------------
1253
align 4
1286
align 4
1254
toponly:
1287
toponly:
1255
	xor	edx,edx
1288
	xor	edx,edx
1256
	mcall	7,0x3000,<52,52>
1289
	mcall	7,image_area,<52,52>
1257
;--------------------------------------
1290
;--------------------------------------
1258
align 4	
1291
align 4	
1259
.ex:
1292
.ex:
1260
	mov	[load_pic],0
1293
	mov	[load_pic],0
1261
	ret
1294
	ret
1262
;------------------------------------------------------------------------------
1295
;------------------------------------------------------------------------------
1263
align 4
1296
align 4
1264
draw_text:
1297
draw_text:
1265
	mov	esi,[ebp+8]
1298
	mov	esi,[ebp+8]
1266
	add	esi,3
1299
	add	esi,3
1267
	push	edi
1300
	push	edi
1268
	mov	edi,title
1301
	mov	edi,title
1269
;	mov	ecx,8
-
 
1270
;	cld
-
 
1271
;	rep	movsb
-
 
1272
	mov	ecx,8/4
1302
	mov	ecx,8/4
1273
	cld
1303
	cld
1274
	rep	movsd
1304
	rep	movsd
1275
	pop	edi
1305
	pop	edi
1276
	mov	eax,title
1306
	mov	eax,title
1277
;--------------------------------------
1307
;--------------------------------------
1278
align 4
1308
align 4
1279
news2:
1309
news2:
1280
	cmp	[eax],byte 33
1310
	cmp	[eax],byte 33
1281
	jb	founde
1311
	jb	founde
1282
	inc	eax
1312
	inc	eax
1283
	cmp	eax,title+8	;11
1313
	cmp	eax,title+8	;11
1284
	jb	news2
1314
	jb	news2
1285
;--------------------------------------
1315
;--------------------------------------
1286
align 4
1316
align 4
1287
founde:
1317
founde:
1288
	sub	eax,title
1318
	sub	eax,title
1289
	mov	[tl],eax
1319
	mov	[tl],eax
1290
	
1320
	
1291
	mov	eax,[tl]
1321
	mov	eax,[tl]
1292
	lea	eax,[eax+eax*2]  ; eax *= char_width/2
1322
	lea	eax,[eax+eax*2]		; eax *= char_width/2
1293
	shl	eax,16
1323
	shl	eax,16
1294
	
1324
	
1295
	mov	ebx,27 shl 16+40
1325
	mov	ebx,27 shl 16+40
1296
	sub	ebx,eax
1326
	sub	ebx,eax
1297
	
1327
	
1298
	xor	ecx,ecx         ; black shade of text
1328
	xor	ecx,ecx		; black shade of text
1299
	add	ebx,1 shl 16      ;*65536+1
1329
	add	ebx,1 shl 16	;*65536+1
1300
	mcall	4,,,title,[tl]
1330
	mcall	4,,,title,[tl]
1301
 
1331
 
1302
	inc	ebx
1332
	inc	ebx
1303
	mcall
1333
	mcall
1304
 
1334
 
1305
	add	ebx,1 shl 16
1335
	add	ebx,1 shl 16
1306
	mcall
1336
	mcall
1307
 
1337
 
1308
	inc	ebx
1338
	inc	ebx
1309
	mcall
1339
	mcall
1310
 
1340
 
1311
	sub	ebx,1 shl 16
1341
	sub	ebx,1 shl 16
1312
	mcall
1342
	mcall
1313
 
1343
 
1314
	dec	ebx
1344
	dec	ebx
1315
	sub	ebx,1 shl 16
1345
	sub	ebx,1 shl 16
1316
	mcall
1346
	mcall
1317
 
1347
 
1318
	sub	ebx,1 shl 16
1348
	sub	ebx,1 shl 16
1319
	dec	ebx
1349
	dec	ebx
1320
	mcall
1350
	mcall
1321
 
1351
 
1322
	dec	ebx
1352
	dec	ebx
1323
	add	ebx,1 shl 16
1353
	add	ebx,1 shl 16
1324
	mcall
1354
	mcall
1325
 
1355
 
1326
	inc	ebx
1356
	inc	ebx
1327
	mcall	,,0xffffff
1357
	mcall	,,0xffffff
1328
	mov   [draw_pic],0
1358
	mov	[draw_pic],0
1329
	ret
1359
	ret
1330
;------------------------------------------------------------------------------
1360
;------------------------------------------------------------------------------
1331
;   *********************************************
1361
;   *********************************************
1332
;   *******  WINDOW DEFINITIONS AND DRAW ********
1362
;   *******  WINDOW DEFINITIONS AND DRAW ********
1333
;   *********************************************
1363
;   *********************************************
1334
align 4
1364
align 4
1335
draw_window2:
1365
draw_window2:
1336
	mcall	12,1
1366
	mcall	12,1
1337
 
1367
 
1338
	; DRAW WINDOW
1368
	; DRAW WINDOW
1339
	xor	eax,eax             ; function 0 : define and draw window
1369
	xor	eax,eax		; function 0 : define and draw window
1340
	mov	ebx,[ebp+0-2]
1370
	mov	ebx,[ebp+0-2]
1341
	mov	ecx,[ebp+4-2]
1371
	mov	ecx,[ebp+4-2]
1342
	add	ebx,[yw]           ; [x start] *65536 + [x size]
1372
	mov	bx,[yw]		; [x start] *65536 + [x size]
1343
	add	ecx,51            ; [y start] *65536 + [y size]
1373
	mov	cx,51		; [y start] *65536 + [y size]
1344
	mov	edx,0x41000000        ; color of work area RRGGBB,8->color gl
1374
	mov	edx,0x41000000	; color of work area RRGGBB,8->color gl
1345
	mcall
1375
	mcall
1346
	
1376
	
1347
	mcall	8,51,50,0x40000002 ; button
1377
	mcall	8,51,50,0x40000002 ; button
-
 
1378
;--------------------------------------
1348
	
1379
align 4
-
 
1380
draw_icon2_1:
-
 
1381
; change to next thread if mutex is blocked
1349
	mov	eax,5
1382
	mov	eax,68
1350
	mov	ebx,1
1383
	mov	ebx,1
1351
;--------------------------------------
1384
;--------------------------------------
1352
align 4
1385
align 4
1353
draw_icon2:
1386
draw_icon2:
1354
	xchg	[load_pic],bl
1387
	xchg	[load_pic],bl	;mutex
1355
	test	bl,bl
1388
	test	bl,bl
1356
	je	draw_icon_end
1389
	je	draw_icon_end
1357
	mcall
1390
	mcall
1358
	jmp	draw_icon2
1391
	jmp	draw_icon2
1359
;--------------------------------------
1392
;--------------------------------------
1360
align 4
1393
align 4
1361
draw_icon_end:
1394
draw_icon_end:
-
 
1395
; change to next thread if mutex is blocked
1362
	mov	eax,5
1396
	mov	eax,68
1363
	mov	ebx,1
1397
	mov	ebx,1
1364
;--------------------------------------
1398
;--------------------------------------
1365
align 4
1399
align 4
1366
draw_icon_2:
1400
draw_icon_2:
1367
	xchg	[draw_pic],bl
1401
	xchg	[draw_pic],bl	;mutex
1368
	test	bl,bl
1402
	test	bl,bl
1369
	je	draw_icon_end_2
1403
	je	draw_icon_end_2
1370
	mcall
1404
	mcall
1371
	jmp	draw_icon_2
1405
	jmp	draw_icon_2
1372
;--------------------------------------
1406
;--------------------------------------
1373
align 4
1407
align 4
1374
draw_icon_end_2:
1408
draw_icon_end_2:
1375
	mcall	9,process_table,-1
-
 
1376
	call	draw_picture
1409
	call	draw_picture
1377
	call	draw_text
1410
	call	draw_text
1378
	mcall	12,2
1411
	mcall	12,2
1379
	ret
1412
	ret
1380
;------------------------------------------------------------------------------
1413
;------------------------------------------------------------------------------
-
 
1414
shape_window:
-
 
1415
; give the shape reference area
-
 
1416
	mcall	50,0,shape_reference
-
 
1417
; give the shape scale  32 x 32  ->  128 x 128  ecx = 2
-
 
1418
; you dont have to give this, scale is 1:1 by default
-
 
1419
;	mcall	50,1,2
-
 
1420
	ret
-
 
1421
;------------------------------------------------------------------------------
-
 
1422
shape_reference:	;  32 x 32 ( window_size_X + 1 ) * ( window_size_Y + 1 )
-
 
1423
 
-
 
1424
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
-
 
1425
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
-
 
1426
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
-
 
1427
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
-
 
1428
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0
-
 
1429
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
 
1480
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 
-
 
1481
;------------------------------------------------------------------------------
1381
tl	dd 8
1482
tl	dd 8
1382
yw	dd 51
1483
yw:	dd 51
1383
ya	dd 0
1484
ya	dd 0
1384
cur_btn	dd 40
1485
cur_btn	dd 40
1385
 
1486
 
1386
draw_pic	db 0
1487
draw_pic	db 0
1387
load_pic	db 0
1488
load_pic	db 0
1388
create_thread_event	db 0
1489
create_thread_event	db 0
1389
 
1490
 
1390
image	dd 0x3000
1491
image	dd image_area
1391
 
1492
 
1392
I_Param:
1493
IncludeUGlobals
1393
icon_data = I_END+0x1400
1494
;------------------------------------------------------------------------------
1394
stack_area = I_END+0x3400-4
1495
IM_END:
1395
process_table = I_END+0x3400
1496
;------------------------------------------------------------------------------
1396
 
1497
align 4
1397
bgrx	dd ?
-
 
1398
bgry	dd ?
-
 
1399
param_str	rb 31
-
 
1400
 
1498
bgrx	dd ?
1401
;//////////////////////////
1499
bgry	dd ?
1402
 
1500
 
1403
bgrxy	dd ?
1501
bgrxy	dd ?
1404
warea:
1502
warea:
1405
 .by_x:
1503
 .by_x:
1406
  .right	dw ?
1504
  .right	dw ?
1407
  .left		dw ?
1505
  .left		dw ?
1408
 .by_y:
1506
 .by_y:
1409
  .bottom	dw ?
1507
  .bottom	dw ?
1410
  .top		dw ?
1508
  .top		dw ?
1411
scrxy		dd ?
1509
scrxy		dd ?
1412
bgrdrawtype	dd ?
1510
bgrdrawtype	dd ?
1413
 
1511
 
1414
pixpos	dd ?
1512
pixpos	dd ?
1415
top	dd ?
1513
top	dd ?
1416
icons	dd ?
1514
icons	dd ?
1417
addr	dd ?
1515
addr	dd ?
1418
cur_str		dd ?
1516
cur_str		dd ?
1419
cur_band	dd ?
1517
cur_band	dd ?
1420
sel_icon1	rd 1
1518
sel_icon1	rd 1
1421
icon_count	rd 1
1519
icon_count	rd 1
-
 
1520
;------------------------------------------------------------------------------
-
 
1521
align 4
-
 
1522
param_str	rb 31
-
 
1523
;------------------------------------------------------------------------------
-
 
1524
align 4
1422
gif_file	rb	GIF_SIZE
1525
gif_file	rb	GIF_SIZE
-
 
1526
;------------------------------------------------------------------------------
-
 
1527
align 4
1423
strip_file	rb	RAW_SIZE
1528
strip_file	rb	RAW_SIZE
-
 
1529
;------------------------------------------------------------------------------
1424
 
1530
align 4
1425
IncludeUGlobals
1531
process_table:
-
 
1532
	rb 0x400
-
 
1533
;------------------------------------------------------------------------------	
-
 
1534
align 4
-
 
1535
icon_data:
-
 
1536
	rb 0x1000
-
 
1537
;------------------------------------------------------------------------------
-
 
1538
align 4
-
 
1539
	rb 0x1000
-
 
1540
stack_area:
-
 
1541
;------------------------------------------------------------------------------
-
 
1542
align 4
-
 
1543
I_Param:
-
 
1544
	rb 0x100	; max 256 
-
 
1545
;------------------------------------------------------------------------------
-
 
1546
align 4
-
 
1547
thread_stack:
-
 
1548
	rb 0x100*48	; max 48 icons
-
 
1549
;------------------------------------------------------------------------------
1426
 
1550
align 4
-
 
1551
image_area:
-
 
1552
	rb 52*52*3
-
 
1553
;------------------------------------------------------------------------------
-
 
1554
;align 4
-
 
1555
;shape_reference_0:
-
 
1556
;	rb 52*52	;  ( window_size_X + 1 ) * ( window_size_Y + 1 )
-
 
1557
;------------------------------------------------------------------------------ 
1427
I_END:
1558
I_END:
1428
;------------------------------------------------------------------------------
-
 
1429
1559