Subversion Repositories Kolibri OS

Rev

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

Rev 2469 Rev 2475
Line 3... Line 3...
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
Line 48... Line 73...
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
Line 62... Line 87...
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
Line 69... Line 94...
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
Line 145... Line 170...
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
Line 159... Line 184...
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
Line 179... Line 204...
179
 
204
 
180
	cmp	esi,eax
205
	cmp	esi,eax
Line 181... Line 206...
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
Line 193... Line 218...
193
	cmp	eax,[ebx+42]	;[I_END+42]
218
	cmp	eax,[ebx+42]
194
	jne	newread
219
	jne	newread
Line 195... Line 220...
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
-
 
222
        rb 31-($-.path)
246
	db ICON_STRIP,0
223
;------------------------------------------------------------------------------
247
	rb 31-($-.path)
224
align 4
248
;------------------------------------------------------------------------------
225
all_terminated:
249
align 4
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
;------------------------------------------------------------------------------
Line 234... Line 258...
234
align 4
258
align 4
235
no_apply:
259
no_apply:
Line 248... Line 272...
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
Line 252... Line 276...
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
Line 294... Line 317...
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
Line 301... Line 324...
301
	
324
	
302
	mov	ebx,24*65536+250+8*14
325
	mov	ebx,24*65536+250+8*14
Line 307... Line 330...
307
	jne	no_f;ound
330
	jne	no_f;ound
Line 308... Line 331...
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
Line 313... Line 336...
313
	sub	eax,40
336
	sub	eax,40
314
	
337
	
315
	xor	edx,edx
338
	xor	edx,edx
316
	mov	ebx,16
-
 
317
	div	ebx
339
	mov	ebx,16
318
;	imul	eax,10
340
	div	ebx
319
; multiply x10
341
; multiply x10
320
	shl	eax,1		; multiply x2
342
	shl	eax,1		; multiply x2
Line 372... Line 394...
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
Line 414... Line 436...
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:
Line 438... Line 460...
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
Line 448... Line 470...
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:
Line 567... Line 589...
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
Line 586... Line 608...
586
 
608
 
Line 647... Line 669...
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
;--------------------------------------
Line 757... Line 779...
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,   ' Žƒ€ŒŒ€                                     '
Line 845... Line 867...
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
Line 854... Line 876...
854
 
876
 
855
	shl	eax,6	;imul eax,64
877
	shl	eax,6	;imul eax,64
Line 867... Line 889...
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
Line 876... Line 898...
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
;--------------------------------------
Line 908... Line 930...
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
Line 921... Line 943...
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
Line -... Line 947...
-
 
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
-
 
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
947
;------------------------------------------------------------------------------
978
;------------------------------------------------------------------------------
948
align 4
979
align 4
949
thread:
-
 
950
;   pop  ebp ;ebp - address of our icon
980
thread:
951
	sub	esp,12
981
	sub	esp,12
952
	mov	ebp,esp
982
	mov	ebp,esp
-
 
983
	sub	esp,16
953
	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
;------------------------------------------------------------------------------
Line 963... Line 994...
963
 
994
 
964
	cmp	eax,3
995
	cmp	eax,3
Line 965... Line 996...
965
	je	button2
996
	je	button2
966
	
-
 
967
	call	get_bg_info
-
 
968
	mov	eax,5
997
	
Line 969... Line 998...
969
	mov	ebx,1
998
	call	get_bg_info
970
	call	draw_icon2
999
	call	draw_icon2_1
971
	
1000
	
972
	jmp	still2
1001
	jmp	still2
Line 980... Line 1009...
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
@@:
Line 1004... Line 1033...
1004
button2:
1033
button2:
1005
	mcall	17
1034
	mcall	17
1006
	cmp	ah, 2
1035
	cmp	ah, 2
1007
	jnz	still2
1036
	jnz	still2
Line 1008... Line 1037...
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
Line 1062... Line 1091...
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
;--------------------------------------
Line 1112... Line 1141...
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
Line 1125... Line 1155...
1125
	shl	eax,10		; multiply x1024
1155
	shl	eax,10		; multiply x1024
Line 1126... Line 1156...
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
Line 1130... Line 1160...
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
;--------------------------------------
Line 1146... Line 1176...
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
;--------------------------------------
-
 
1151
align 4
-
 
1152
no_correction_pixpos:
1180
;--------------------------------------
1153
	add	[pixpos],3
1181
	add	[pixpos],3
1154
	mov	eax,[esi]
1182
	mov	eax,[esi]
Line 1155... Line 1183...
1155
	and	eax,0xffffff
1183
	and	eax,0xffffff
Line 1216... Line 1244...
1216
	pop	ecx
1244
	pop	ecx
1217
	pop	ebx
1245
	pop	ebx
Line 1218... Line 1246...
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
-
 
1252
	ror	edx,8
1224
	ror	edx,8
1253
	
1225
	mov	[eax],dl
1254
	mov	[eax],dl
1226
	inc	eax
1255
	inc	eax
-
 
1256
	ror	edx,8
1227
	ror	edx,8
1257
	
-
 
1258
	mov	[eax],dl
1228
	mov	[eax],dl
1259
	
1229
	inc	eax
1260
	inc	eax
1230
	mov	[image],eax
1261
	mov	[image],eax
-
 
1262
	inc	ebx
1231
	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
-
 
1267
	jb	newb
1235
	jnz	newb
1268
	
Line 1236... Line 1269...
1236
	xor	ebx,ebx
1269
	xor	ebx,ebx
1237
 
1270
 
1238
	inc	ecx
1271
	inc	ecx
Line 1251... Line 1284...
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
Line 1264... Line 1297...
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
Line 1287... Line 1317...
1287
founde:
1317
founde:
1288
	sub	eax,title
1318
	sub	eax,title
1289
	mov	[tl],eax
1319
	mov	[tl],eax
Line 1290... Line 1320...
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
Line 1293... Line 1323...
1293
	shl	eax,16
1323
	shl	eax,16
1294
	
1324
	
Line 1295... Line 1325...
1295
	mov	ebx,27 shl 16+40
1325
	mov	ebx,27 shl 16+40
1296
	sub	ebx,eax
1326
	sub	ebx,eax
1297
	
1327
	
Line 1298... Line 1328...
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
Line 1323... Line 1353...
1323
	add	ebx,1 shl 16
1353
	add	ebx,1 shl 16
1324
	mcall
1354
	mcall
Line 1325... Line 1355...
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:
Line 1336... Line 1366...
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]
Line 1344... Line 1374...
1344
	mov	edx,0x41000000        ; color of work area RRGGBB,8->color gl
1374
	mov	edx,0x41000000	; color of work area RRGGBB,8->color gl
-
 
1375
	mcall
1345
	mcall
1376
	
-
 
1377
	mcall	8,51,50,0x40000002 ; button
-
 
1378
;--------------------------------------
1346
	
1379
align 4
1347
	mcall	8,51,50,0x40000002 ; button
1380
draw_icon2_1:
1348
	
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
-
 
1392
;--------------------------------------
1359
;--------------------------------------
1393
align 4
1360
align 4
1394
draw_icon_end:
1361
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
;--------------------------------------
-
 
1373
align 4
1406
;--------------------------------------
1374
draw_icon_end_2:
1407
align 4
1375
	mcall	9,process_table,-1
1408
draw_icon_end_2:
1376
	call	draw_picture
1409
	call	draw_picture
1377
	call	draw_text
1410
	call	draw_text
-
 
1411
	mcall	12,2
-
 
1412
	ret
-
 
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,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,1,1,1,1,1,1,1,1,1,1,1,1,1
-
 
1477
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
-
 
1478
 
1378
	mcall	12,2
1479
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
1379
	ret
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 
1380
;------------------------------------------------------------------------------
1481
;------------------------------------------------------------------------------
1381
tl	dd 8
1482
tl	dd 8
Line 1382... Line 1483...
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
Line 1385... Line 1486...
1385
 
1486
 
Line 1386... Line 1487...
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
-
 
1394
stack_area = I_END+0x3400-4
-
 
1395
process_table = I_END+0x3400
-
 
Line 1396... Line 1494...
1396
 
1494
;------------------------------------------------------------------------------
1397
bgrx	dd ?
1495
IM_END:
1398
bgry	dd ?
1496
;------------------------------------------------------------------------------
1399
param_str	rb 31
1497
align 4
Line 1417... Line 1515...
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