Subversion Repositories Kolibri OS

Rev

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

Rev 4061 Rev 4159
1
;*****************************************************************************
1
;*****************************************************************************
2
; Open Dialog - for Kolibri OS
2
; Open Dialog - for Kolibri OS
3
; Copyright (c) 2009-2013, Marat Zakiyanov aka Mario79, aka Mario
3
; Copyright (c) 2009-2013, Marat Zakiyanov aka Mario79, aka Mario
4
; All rights reserved.
4
; All rights reserved.
5
;
5
;
6
; Redistribution and use in source and binary forms, with or without
6
; Redistribution and use in source and binary forms, with or without
7
; modification, are permitted provided that the following conditions are met:
7
; modification, are permitted provided that the following conditions are met:
8
;        * Redistributions of source code must retain the above copyright
8
;        * Redistributions of source code must retain the above copyright
9
;          notice, this list of conditions and the following disclaimer.
9
;          notice, this list of conditions and the following disclaimer.
10
;        * Redistributions in binary form must reproduce the above copyright
10
;        * Redistributions in binary form must reproduce the above copyright
11
;          notice, this list of conditions and the following disclaimer in the
11
;          notice, this list of conditions and the following disclaimer in the
12
;          documentation and/or other materials provided with the distribution.
12
;          documentation and/or other materials provided with the distribution.
13
;        * Neither the name of the  nor the
13
;        * Neither the name of the  nor the
14
;          names of its contributors may be used to endorse or promote products
14
;          names of its contributors may be used to endorse or promote products
15
;          derived from this software without specific prior written permission.
15
;          derived from this software without specific prior written permission.
16
;
16
;
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
;*****************************************************************************
27
;*****************************************************************************
28
;---------------------------------------------------------------------
28
;---------------------------------------------------------------------
29
;Some documentation for memory
29
;Some documentation for memory
30
;
30
;
31
;area name db 'FFFFFFFF_open_dialog',0 ; FFFFFFFF = PID
31
;area name db 'FFFFFFFF_open_dialog',0 ; FFFFFFFF = PID
32
;
32
;
33
; communication area data
33
; communication area data
34
; flag  ; +0
34
; flag  ; +0
35
; dw 0   ; 0 - empty, 1 - file for open, 2 -folder for open,
35
; dw 0   ; 0 - empty, 1 - file for open, 2 -folder for open,
36
;          3 - cancel, 4 - path=name of area 6822.
36
;          3 - cancel, 4 - path=name of area 6822.
37
;
37
;
38
; type of dialog:  0-Open, 1-Save, 2-Dir
38
; type of dialog:  0-Open, 1-Save, 2-Dir
39
; dw 0 ; +2
39
; dw 0 ; +2
40
;
40
;
41
; window X size ; +4
41
; window X size ; +4
42
; dw 0
42
; dw 0
43
;
43
;
44
; window X position ; +6 
44
; window X position ; +6 
45
; dw 0
45
; dw 0
46
;
46
;
47
; window y size ; +8
47
; window y size ; +8
48
; dw 0
48
; dw 0
49
;
49
;
50
; window Y position ; +10
50
; window Y position ; +10
51
; dw 0
51
; dw 0
52
;
52
;
53
; OpenDialog WINDOW SLOT ; +12
53
; OpenDialog WINDOW SLOT ; +12
54
; dd 0
54
; dd 0
55
;
55
;
56
; file_path ; +16
56
; file_path ; +16
57
; rb 3824 ; path to file
57
; rb 3824 ; path to file
58
;
58
;
59
; file name ; +3840
59
; file name ; +3840
60
; rb 256
60
; rb 256
61
;
61
;
62
; filtration flag ; +4096
62
; filtration flag ; +4096
63
; dd 0 ; flag 0 - no filtration,  1 - filtering
63
; dd 0 ; flag 0 - no filtration,  1 - filtering
64
;
64
;
65
; area for storage of filtering values ; +4100
65
; area for storage of filtering values ; +4100
66
; rb 4092
66
; rb 4092
67
;---------------------------------------------------------------------
67
;---------------------------------------------------------------------
68
	use32
68
	use32
69
	org	0x0
69
	org	0x0
70
 
70
 
71
	db 'MENUET01'
71
	db 'MENUET01'
72
	dd 0x01
72
	dd 0x01
73
	dd START
73
	dd START
74
	dd IM_END
74
	dd IM_END
75
	dd I_END
75
	dd I_END
76
	dd stacktop
76
	dd stacktop
77
	dd param
77
	dd param
78
	dd path
78
	dd path
79
 
79
 
80
include '../../macros.inc'
80
include '../../macros.inc'
81
;define __DEBUG__ 1
81
;define __DEBUG__ 1
82
;define __DEBUG_LEVEL__ 1
82
;define __DEBUG_LEVEL__ 1
83
;include '../../debug-fdo.inc'
83
;include '../../debug-fdo.inc'
84
include '../../develop/libraries/box_lib/load_lib.mac'
84
include '../../develop/libraries/box_lib/load_lib.mac'
85
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
85
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
86
;include 'macros.inc'
86
;include 'macros.inc'
87
;include 'load_lib.mac'
87
;include 'load_lib.mac'
88
;include 'box_lib.mac'
88
;include 'box_lib.mac'
89
@use_library
89
@use_library
90
 
90
 
91
x_minimal_size equ 350
91
x_minimal_size equ 350
92
y_minimal_size equ 250
92
y_minimal_size equ 250
93
;---------------------------------------------------------------------
93
;---------------------------------------------------------------------
94
;---------------------------------------------------------------------
94
;---------------------------------------------------------------------
95
START:
95
START:
96
	mcall	68,11
96
	mcall	68,11
97
	mcall	66,1,1
97
	mcall	66,1,1
98
	mcall	40,0x27
98
	mcall	40,0x27
99
	call	get_communication_area
99
	call	get_communication_area
100
	
100
	
101
	call	get_active_pocess
101
	call	get_active_pocess
102
 
102
 
103
load_libraries	l_libs_start,end_l_libs
103
load_libraries	l_libs_start,end_l_libs
104
	test	eax,eax
104
	test	eax,eax
105
	jnz	button.exit
105
	jnz	button.exit
106
; initialize sort
106
; initialize sort
107
	push	dword 1
107
	push	dword 1
108
	call	dword [sort_init]
108
	call	dword [sort_init]
109
; unpack deflate
109
; unpack deflate
110
	mov	eax,[unpack_DeflateUnpack2]
110
	mov	eax,[unpack_DeflateUnpack2]
111
	mov	[deflate_unpack],eax
111
	mov	[deflate_unpack],eax
112
 
112
 
113
	mov	esi,start_pach
113
	mov	esi,start_pach
114
	mov	edi,previous_dir_path
114
	mov	edi,previous_dir_path
115
	call	copy_dir_name.1
115
	call	copy_dir_name.1
116
	
116
	
117
	call	load_root_directory
117
	call	load_root_directory
118
	call	load_start_directory
118
	call	load_start_directory
119
	call	sort_directory
119
	call	sort_directory
120
	call	load_icons
120
	call	load_icons
121
	call	convert_icons
121
	call	convert_icons
122
	call	load_ini
122
	call	load_ini
123
	call	calc_ini
123
	call	calc_ini
124
	jmp	red_1
124
	jmp	red_1
125
;---------------------------------------------------------------------
125
;---------------------------------------------------------------------
126
red:
126
red:
127
	call	control_minimal_window_size
127
	call	control_minimal_window_size
128
red_1:
128
red_1:
129
	call	draw_window
129
	call	draw_window
130
;---------------------------------------------------------------------
130
;---------------------------------------------------------------------
131
still:
131
still:
132
	mcall	10
132
	mcall	10
133
	cmp	eax,1
133
	cmp	eax,1
134
	je	red
134
	je	red
135
	cmp	eax,2
135
	cmp	eax,2
136
	je	key
136
	je	key
137
	cmp	eax,3
137
	cmp	eax,3
138
	je	button
138
	je	button
139
	cmp	eax,6
139
	cmp	eax,6
140
	je	mouse
140
	je	mouse
141
	jmp	still
141
	jmp	still
142
;---------------------------------------------------------------------
142
;---------------------------------------------------------------------
143
control_minimal_window_size:
143
control_minimal_window_size:
144
	pusha
144
	pusha
145
	call	get_window_param
145
	call	get_window_param
146
	test	[window_status],10b
146
	test	[window_status],10b
147
	jnz	.end	;red_1
147
	jnz	.end	;red_1
148
	test	[window_status],100b
148
	test	[window_status],100b
149
	jnz	.end	;red_1
149
	jnz	.end	;red_1
150
	test	[window_status],1b
150
	test	[window_status],1b
151
	jnz	.end	;red_1
151
	jnz	.end	;red_1
152
	mov	esi,-1
152
	mov	esi,-1
153
	mov	eax,procinfo
153
	mov	eax,procinfo
154
	mov	eax,[eax+46]
154
	mov	eax,[eax+46]
155
	cmp	eax,dword y_minimal_size ;200
155
	cmp	eax,dword y_minimal_size ;200
156
	jae	@f
156
	jae	@f
157
	mov	esi,dword y_minimal_size ;200
157
	mov	esi,dword y_minimal_size ;200
158
	mcall	67,-1,ebx,ebx
158
	mcall	67,-1,ebx,ebx
159
@@:
159
@@:
160
	mov	edx,-1
160
	mov	edx,-1
161
	mov	eax,procinfo
161
	mov	eax,procinfo
162
	mov	eax,[eax+42]
162
	mov	eax,[eax+42]
163
	cmp	eax,dword x_minimal_size ;300
163
	cmp	eax,dword x_minimal_size ;300
164
	jae	@f
164
	jae	@f
165
	mov	edx,dword x_minimal_size ;300
165
	mov	edx,dword x_minimal_size ;300
166
	mcall	67,-1,ebx,,ebx
166
	mcall	67,-1,ebx,,ebx
167
@@:
167
@@:
168
.end:
168
.end:
169
	popa
169
	popa
170
	ret
170
	ret
171
;---------------------------------------------------------------------
171
;---------------------------------------------------------------------
172
key:
172
key:
173
	mov	al,[focus_pointer]
173
	mov	al,[focus_pointer]
174
	test	al,al
174
	test	al,al
175
	jne	key_ASCII
175
	jne	key_ASCII
176
	mcall	2
176
	mcall	2
177
	xor	ebx,ebx
177
	xor	ebx,ebx
178
	cmp	[extended_key],1
178
	cmp	[extended_key],1
179
	je	.extended_key
179
	je	.extended_key
180
	test	al,al
180
	test	al,al
181
	jnz	still
181
	jnz	still
182
	cmp	ah,0xE0
182
	cmp	ah,0xE0
183
	jne	@f
183
	jne	@f
184
	mov	[extended_key],1
184
	mov	[extended_key],1
185
	jmp	still
185
	jmp	still
186
@@:
186
@@:
187
	cmp	ah,72	; arrow	up
187
	cmp	ah,72	; arrow	up
188
	je	.2
188
	je	.2
189
	cmp	ah,80	; arrow	down
189
	cmp	ah,80	; arrow	down
190
	je	.1
190
	je	.1
191
	cmp	ah,28	; Enter
191
	cmp	ah,28	; Enter
192
	je	.7
192
	je	.7
193
	cmp	ah,1	; Esc
193
	cmp	ah,1	; Esc
194
	je	button.exit
194
	je	button.exit
195
	cmp	ah,14	; Backspace
195
	cmp	ah,14	; Backspace
196
	je	button.exit_dir
196
	je	button.exit_dir
197
	cmp	ah,187	; F1
197
	cmp	ah,187	; F1
198
	je	select_disk
198
	je	select_disk
199
	cmp	ah,188	; F2
199
	cmp	ah,188	; F2
200
	je	select_sort
200
	je	select_sort
201
	cmp	ah,189	; F3
201
	cmp	ah,189	; F3
202
	je	select_filter
202
	je	select_filter
203
	cmp	ah,19	; R
203
	cmp	ah,19	; R
204
	je	button.reload_dir
204
	je	button.reload_dir
205
	cmp	ah,42
205
	cmp	ah,42
206
	je	key_shift_up
206
	je	key_shift_up
207
	cmp	ah,54
207
	cmp	ah,54
208
	je	key_shift_up
208
	je	key_shift_up
209
	cmp	ah,170
209
	cmp	ah,170
210
	je	key_shift_down
210
	je	key_shift_down
211
	cmp	ah,182
211
	cmp	ah,182
212
	je	key_shift_down
212
	je	key_shift_down
213
	cmp	ah,29
213
	cmp	ah,29
214
	je	key_ctrl_up
214
	je	key_ctrl_up
215
	cmp	ah,157
215
	cmp	ah,157
216
	je	key_ctrl_down
216
	je	key_ctrl_down
217
	cmp	ah,56
217
	cmp	ah,56
218
	je	key_alt_up
218
	je	key_alt_up
219
	cmp	ah,184
219
	cmp	ah,184
220
	je	key_alt_down
220
	je	key_alt_down
221
	cmp	ah,206	; NumPad+ Up
221
	cmp	ah,206	; NumPad+ Up
222
	je	NumPad_plus_Up
222
	je	NumPad_plus_Up
223
	cmp	ah,202	; NumPad- Up
223
	cmp	ah,202	; NumPad- Up
224
	je	NumPad_minus_Up
224
	je	NumPad_minus_Up
225
	cmp	ah,183	; NumPad* Up
225
	cmp	ah,183	; NumPad* Up
226
	je	NumPad_invert_Up
226
	je	NumPad_invert_Up
227
	cmp	ah,158
227
	cmp	ah,158
228
	je	symbol_a_up
228
	je	symbol_a_up
229
	cmp	ah,15	; Tab down
229
	cmp	ah,15	; Tab down
230
	je	change_focus_area_press_Tab_key
230
	je	change_focus_area_press_Tab_key
231
	cmp	ah,143	; Tab up
231
	cmp	ah,143	; Tab up
232
	je	change_focus_area_check_Tab_key
232
	je	change_focus_area_check_Tab_key
233
; compare for "1,2,3,4,5,6,7,8,9,0,(-),(=)"
233
; compare for "1,2,3,4,5,6,7,8,9,0,(-),(=)"
234
	cmp	ah,2
234
	cmp	ah,2
235
	jb	still
235
	jb	still
236
	cmp	ah,13
236
	cmp	ah,13
237
	jbe	.12
237
	jbe	.12
238
; compare for "q,w,e,r,t,y,u,i,o,p,([),(])"	
238
; compare for "q,w,e,r,t,y,u,i,o,p,([),(])"	
239
	cmp	ah,16
239
	cmp	ah,16
240
	jb	still
240
	jb	still
241
	cmp	ah,27
241
	cmp	ah,27
242
	jbe	.12
242
	jbe	.12
243
; compare for "a,s,d,f,g,h,j,k,l,(;),('),(`)"	
243
; compare for "a,s,d,f,g,h,j,k,l,(;),('),(`)"	
244
	cmp	ah,30
244
	cmp	ah,30
245
	jb	still
245
	jb	still
246
	cmp	ah,41
246
	cmp	ah,41
247
	jbe	.12
247
	jbe	.12
248
; compare for "(\),z,x,c,v,b,n,m,(,),(.),(/)"	
248
; compare for "(\),z,x,c,v,b,n,m,(,),(.),(/)"	
249
	cmp	ah,43
249
	cmp	ah,43
250
	jb	still
250
	jb	still
251
	cmp	ah,53
251
	cmp	ah,53
252
	jbe	.12	
252
	jbe	.12	
253
	jmp	still
253
	jmp	still
254
.extended_key:
254
.extended_key:
255
	mov	[extended_key],0
255
	mov	[extended_key],0
256
	cmp	ah,80	; arrow down
256
	cmp	ah,80	; arrow down
257
	je	.1
257
	je	.1
258
	cmp	ah,72	; arrow up
258
	cmp	ah,72	; arrow up
259
	je	.2
259
	je	.2
260
	cmp	ah,81	; PageDown
260
	cmp	ah,81	; PageDown
261
	je	.3
261
	je	.3
262
	cmp	ah,73	; PageUp
262
	cmp	ah,73	; PageUp
263
	je	.4
263
	je	.4
264
	cmp	ah,71	; Home
264
	cmp	ah,71	; Home
265
	je	.5
265
	je	.5
266
	cmp	ah,79	; End
266
	cmp	ah,79	; End
267
	je	.6
267
	je	.6
268
	cmp	ah,28	; Enter
268
	cmp	ah,28	; Enter
269
	je	.7
269
	je	.7
270
	cmp	ah,82	; Insert
270
	cmp	ah,82	; Insert
271
	je	.8
271
	je	.8
272
	
272
	
273
	cmp	ah,29
273
	cmp	ah,29
274
	je	key_ctrl_up
274
	je	key_ctrl_up
275
	cmp	ah,157
275
	cmp	ah,157
276
	je	key_ctrl_down
276
	je	key_ctrl_down
277
	cmp	ah,56
277
	cmp	ah,56
278
	je	key_alt_up
278
	je	key_alt_up
279
	cmp	ah,184
279
	cmp	ah,184
280
	je	key_alt_down
280
	je	key_alt_down
281
	jmp	still
281
	jmp	still
282
;---------------------------------
282
;---------------------------------
283
.12:
283
.12:
284
	inc	ebx	; 12 - Search with key
284
	inc	ebx	; 12 - Search with key
285
;---------------------------------
285
;---------------------------------
286
.11:
286
.11:
287
	inc	ebx	; 11 - Invert Mark
287
	inc	ebx	; 11 - Invert Mark
288
;---------------------------------
288
;---------------------------------
289
.10:
289
.10:
290
	inc	ebx	; 10 - Unmark All
290
	inc	ebx	; 10 - Unmark All
291
;---------------------------------
291
;---------------------------------
292
.9:
292
.9:
293
	inc	ebx	; 9 - Mark All
293
	inc	ebx	; 9 - Mark All
294
;---------------------------------
294
;---------------------------------
295
.8:
295
.8:
296
	inc	ebx	; 8 - Insert (Mark)
296
	inc	ebx	; 8 - Insert (Mark)
297
;---------------------------------
297
;---------------------------------
298
.7:
298
.7:
299
	inc	ebx	; 7 - Enter
299
	inc	ebx	; 7 - Enter
300
;---------------------------------
300
;---------------------------------
301
.6:
301
.6:
302
	inc	ebx	; 6 - End
302
	inc	ebx	; 6 - End
303
;---------------------------------
303
;---------------------------------
304
.5:
304
.5:
305
	inc	ebx	; 5 - Home
305
	inc	ebx	; 5 - Home
306
;---------------------------------
306
;---------------------------------
307
.4:
307
.4:
308
	inc	ebx	; 4 - PageUp
308
	inc	ebx	; 4 - PageUp
309
;---------------------------------
309
;---------------------------------
310
.3:
310
.3:
311
	inc	ebx	; 3 - PageDown
311
	inc	ebx	; 3 - PageDown
312
;---------------------------------
312
;---------------------------------
313
.2:
313
.2:
314
	inc	ebx	; 2 - arrow up
314
	inc	ebx	; 2 - arrow up
315
;---------------------------------
315
;---------------------------------
316
.1:
316
.1:
317
	inc	ebx	; 1 - arrow down
317
	inc	ebx	; 1 - arrow down
318
;---------------------------------
318
;---------------------------------
319
	call	.key_action
319
	call	.key_action
320
	
320
	
321
;	movzx	ecx,word [file_browser_data_1.start_draw_cursor_line]
321
;	movzx	ecx,word [file_browser_data_1.start_draw_cursor_line]
322
;	mcall	47,0x80000,,<50,0>,0x40000000,0xffffff
322
;	mcall	47,0x80000,,<50,0>,0x40000000,0xffffff
323
;	movzx	ecx,word [file_browser_data_1.size_y]
323
;	movzx	ecx,word [file_browser_data_1.size_y]
324
;	mcall	47,0x80000,,<150,0>,0x40000000,0xffffff
324
;	mcall	47,0x80000,,<150,0>,0x40000000,0xffffff
325
 
325
 
326
	mov	eax,file_browser_data_1.mouse_keys_delta
326
	mov	eax,file_browser_data_1.mouse_keys_delta
327
	cmp	[eax],dword 3
327
	cmp	[eax],dword 3
328
	jne	still
328
	jne	still
329
	xor	ebx,ebx
329
	xor	ebx,ebx
330
	mov	[eax],ebx
330
	mov	[eax],ebx
331
	call	load_next_dir
331
	call	load_next_dir
332
	jmp	still
332
	jmp	still
333
;-------------------------------------------------------
333
;-------------------------------------------------------
334
.key_action:
334
.key_action:
335
	mov	[file_browser_data_1.key_action],bx
335
	mov	[file_browser_data_1.key_action],bx
336
	shr	ax,8
336
	shr	ax,8
337
	mov	[file_browser_data_1.key_action_num],ax
337
	mov	[file_browser_data_1.key_action_num],ax
338
 
338
 
339
	push	dword file_browser_data_1
339
	push	dword file_browser_data_1
340
	call	[FileBrowser_key]
340
	call	[FileBrowser_key]
341
 
341
 
342
	call	draw_open_button_label
342
	call	draw_open_button_label
343
 
343
 
344
	cmp	[file_browser_data_1.draw_scroll_bar],0
344
	cmp	[file_browser_data_1.draw_scroll_bar],0
345
	je	@f
345
	je	@f
346
	call	draw_scrollbar1
346
	call	draw_scrollbar1
347
	mov	[file_browser_data_1.draw_scroll_bar],0
347
	mov	[file_browser_data_1.draw_scroll_bar],0
348
@@:
348
@@:
349
	ret
349
	ret
350
;---------------------------------------------------------------------
350
;---------------------------------------------------------------------
351
change_focus_area_Tab_key_ASCII:
351
change_focus_area_Tab_key_ASCII:
352
	xor	eax,eax
352
	xor	eax,eax
353
	inc	eax
353
	inc	eax
354
	mov	[Tab_key_block],al
354
	mov	[Tab_key_block],al
355
	jmp	change_focus_area
355
	jmp	change_focus_area
356
;---------------------------------------------------------------------
356
;---------------------------------------------------------------------
357
change_focus_area_press_Tab_key:
357
change_focus_area_press_Tab_key:
358
	cmp	[open_dialog_type],1
358
	cmp	[open_dialog_type],1
359
	jne	still
359
	jne	still
360
	mov	al,[Tab_key_block]
360
	mov	al,[Tab_key_block]
361
	test	al,al
361
	test	al,al
362
	jnz	still
362
	jnz	still
363
	xor	eax,eax
363
	xor	eax,eax
364
	inc	eax
364
	inc	eax
365
	mov	[Tab_key],al
365
	mov	[Tab_key],al
366
	jmp	still
366
	jmp	still
367
;---------------------------------------------------------------------
367
;---------------------------------------------------------------------
368
change_focus_area_check_Tab_key:
368
change_focus_area_check_Tab_key:
369
	cmp	[open_dialog_type],1
369
	cmp	[open_dialog_type],1
370
	jne	still
370
	jne	still
371
	xor	eax,eax
371
	xor	eax,eax
372
	mov	[Tab_key_block],al
372
	mov	[Tab_key_block],al
373
	mov	al,[Tab_key]
373
	mov	al,[Tab_key]
374
	test	al,al
374
	test	al,al
375
	jz	still
375
	jz	still
376
	xor	eax,eax
376
	xor	eax,eax
377
	mov	[Tab_key],al
377
	mov	[Tab_key],al
378
;---------------------------------------------------------------------
378
;---------------------------------------------------------------------
379
change_focus_area:
379
change_focus_area:
380
	mov	al,[focus_pointer]
380
	mov	al,[focus_pointer]
381
	inc	al
381
	inc	al
382
	and	al,1
382
	and	al,1
383
	mov	[focus_pointer],al
383
	mov	[focus_pointer],al
384
.1:
384
.1:
385
	mov	edi,edit1
385
	mov	edi,edit1
386
	test	al,al
386
	test	al,al
387
	jne	@f
387
	jne	@f
388
	mov	[file_browser_data_1.select_panel_counter],1
388
	mov	[file_browser_data_1.select_panel_counter],1
389
	and	[edi+44],dword 0xFFFFFFFD	; ed_focus
389
	and	[edi+44],dword 0xFFFFFFFD	; ed_focus
390
	mov	[edi+12],dword 0xffffff	; color white
390
	mov	[edi+12],dword 0xffffff	; color white
391
	call	draw_draw_file_browser1
391
	call	draw_draw_file_browser1
392
	mcall	66,1,1
392
	mcall	66,1,1
393
	jmp	still
393
	jmp	still
394
@@:
394
@@:
395
	mov	[file_browser_data_1.select_panel_counter],0
395
	mov	[file_browser_data_1.select_panel_counter],0
396
	or	[edi+44],dword ed_focus
396
	or	[edi+44],dword ed_focus
397
	mov	[edi+12],dword 0xffffb0	; color yellow
397
	mov	[edi+12],dword 0xffffb0	; color yellow
398
	call	draw_draw_file_browser1
398
	call	draw_draw_file_browser1
399
	mcall	66,1,0
399
	mcall	66,1,0
400
	jmp	still
400
	jmp	still
401
;---------------------------------------------------------------------
401
;---------------------------------------------------------------------
402
key_ASCII:
402
key_ASCII:
403
	mcall	2
403
	mcall	2
404
	cmp	ah,9
404
	cmp	ah,9
405
	je	change_focus_area_Tab_key_ASCII
405
	je	change_focus_area_Tab_key_ASCII
406
	cmp	ah,13
406
	cmp	ah,13
407
	je	.13
407
	je	.13
408
	cmp	ah,27
408
	cmp	ah,27
409
	je	button.exit
409
	je	button.exit
410
	push	dword name_editboxes
410
	push	dword name_editboxes
411
	call	[edit_box_key]
411
	call	[edit_box_key]
412
	jmp	still
412
	jmp	still
413
.13:
413
.13:
414
;	cmp [open_dialog_type],2	; Select dir
414
;	cmp [open_dialog_type],2	; Select dir
415
;	je	file_no_folder
415
;	je	file_no_folder
416
;	cmp	[open_dialog_type],1	; Save file
416
;	cmp	[open_dialog_type],1	; Save file
417
;	jne	user_selected_name_action	; load_dir
417
;	jne	user_selected_name_action	; load_dir
418
;	inc	[open_dialog_type]
418
;	inc	[open_dialog_type]
419
	jmp	file_no_folder
419
	jmp	file_no_folder
420
;.load_dir:
420
;.load_dir:
421
;	mov	[file_browser_data_1.select_panel_counter],1
421
;	mov	[file_browser_data_1.select_panel_counter],1
422
;	xor	eax,eax
422
;	xor	eax,eax
423
;	mov	[focus_pointer],al
423
;	mov	[focus_pointer],al
424
;	mcall	66,1,1
424
;	mcall	66,1,1
425
 
425
 
426
;	xor	eax,eax
426
;	xor	eax,eax
427
;	mov	esi,dir_path
427
;	mov	esi,dir_path
428
;	cld
428
;	cld
429
;@@:
429
;@@:
430
;	lodsb
430
;	lodsb
431
;	test	al,al
431
;	test	al,al
432
;	jne	@r
432
;	jne	@r
433
;	sub	esi,2
433
;	sub	esi,2
434
;	cmp	[esi],byte '/'
434
;	cmp	[esi],byte '/'
435
;	jne	@f
435
;	jne	@f
436
;	xor	eax,eax
436
;	xor	eax,eax
437
;	mov	[esi],al
437
;	mov	[esi],al
438
;@@:
438
;@@:
439
;	call	load_next_dir.1
439
;	call	load_next_dir.1
440
;	jmp	still
440
;	jmp	still
441
;---------------------------------------------------------------------
441
;---------------------------------------------------------------------
442
user_selected_name_action:
442
user_selected_name_action:
443
	mov	eax,[communication_area]
443
	mov	eax,[communication_area]
444
	test	eax,eax
444
	test	eax,eax
445
	jnz	@f
445
	jnz	@f
446
	call	control_minimal_window_size
446
	call	control_minimal_window_size
447
	call	draw_window
447
	call	draw_window
448
	ret
448
	ret
449
@@:
449
@@:
450
	add	eax,16	;12
450
	add	eax,16	;12
451
;copy_path	user_selected_name,dir_path,eax,0
451
;copy_path	user_selected_name,dir_path,eax,0
452
	mov	esi,dir_path
452
	mov	esi,dir_path
453
	mov	edi,eax
453
	mov	edi,eax
454
	call	copy_dir_name
454
	call	copy_dir_name
455
	mov	[edi-1],byte '/'
455
	mov	[edi-1],byte '/'
456
	mov	esi,user_selected_name
456
	mov	esi,user_selected_name
457
	call	copy_dir_name
457
	call	copy_dir_name
458
	
458
	
459
	mov	eax,[communication_area]
459
	mov	eax,[communication_area]
460
	mov	[eax],word 1
460
	mov	[eax],word 1
461
	jmp	button.exit
461
	jmp	button.exit
462
;---------------------------------------------------------------------	
462
;---------------------------------------------------------------------	
463
select_disk:
463
select_disk:
464
	call	check_alt
464
	call	check_alt
465
.1:
465
.1:
466
	call	load_root_directory
466
	call	load_root_directory
467
	xor	eax,eax
467
	xor	eax,eax
468
	mov	[menu_data_1.ret_key],eax
468
	mov	[menu_data_1.ret_key],eax
469
 
469
 
470
	push	dword menu_data_1
470
	push	dword menu_data_1
471
	call	[menu_bar_activate]
471
	call	[menu_bar_activate]
472
 
472
 
473
	call	clear_control_key_flag
473
	call	clear_control_key_flag
474
 
474
 
475
	mov	eax,[menu_data_1.ret_key]
475
	mov	eax,[menu_data_1.ret_key]
476
	mov	[menu_data_1.ret_key],dword 0
476
	mov	[menu_data_1.ret_key],dword 0
477
	cmp	eax,1
477
	cmp	eax,1
478
	je	select_filter.1
478
	je	select_filter.1
479
 
479
 
480
	cmp	eax,2
480
	cmp	eax,2
481
	je	select_sort.1
481
	je	select_sort.1
482
 
482
 
483
	cmp	[menu_data_1.click],dword 1
483
	cmp	[menu_data_1.click],dword 1
484
	jne	still
484
	jne	still
485
 
485
 
486
	cmp	[menu_data_1.cursor_out],dword 0
486
	cmp	[menu_data_1.cursor_out],dword 0
487
	jne	analyse_out_menu_1
487
	jne	analyse_out_menu_1
488
	jmp	still
488
	jmp	still
489
;---------------------------------------------------------------------
489
;---------------------------------------------------------------------
490
select_sort:
490
select_sort:
491
	call	check_alt
491
	call	check_alt
492
.1:
492
.1:
493
	xor	eax,eax
493
	xor	eax,eax
494
	mov	[menu_data_2.ret_key],eax
494
	mov	[menu_data_2.ret_key],eax
495
 
495
 
496
	push	dword menu_data_2
496
	push	dword menu_data_2
497
	call	[menu_bar_activate]
497
	call	[menu_bar_activate]
498
 
498
 
499
	call	clear_control_key_flag
499
	call	clear_control_key_flag
500
 
500
 
501
	mov	eax,[menu_data_2.ret_key]
501
	mov	eax,[menu_data_2.ret_key]
502
	mov	[menu_data_2.ret_key],dword 0
502
	mov	[menu_data_2.ret_key],dword 0
503
	cmp	eax,1
503
	cmp	eax,1
504
	je	select_disk.1
504
	je	select_disk.1
505
 
505
 
506
	cmp	eax,2
506
	cmp	eax,2
507
	je	select_filter.1
507
	je	select_filter.1
508
 
508
 
509
 
509
 
510
	cmp	[menu_data_2.click],dword 1
510
	cmp	[menu_data_2.click],dword 1
511
	jne	still
511
	jne	still
512
 
512
 
513
	cmp	[menu_data_2.cursor_out],dword 0
513
	cmp	[menu_data_2.cursor_out],dword 0
514
	jne	analyse_out_menu_2
514
	jne	analyse_out_menu_2
515
	jmp	still
515
	jmp	still
516
;---------------------------------------------------------------------
516
;---------------------------------------------------------------------
517
select_filter:
517
select_filter:
518
	call	check_alt
518
	call	check_alt
519
.1:
519
.1:
520
	xor	eax,eax
520
	xor	eax,eax
521
	mov	[menu_data_3.ret_key],eax
521
	mov	[menu_data_3.ret_key],eax
522
 
522
 
523
	push	dword menu_data_3
523
	push	dword menu_data_3
524
	call	[menu_bar_activate]
524
	call	[menu_bar_activate]
525
 
525
 
526
	call	clear_control_key_flag
526
	call	clear_control_key_flag
527
 
527
 
528
	mov	eax,[menu_data_3.ret_key]
528
	mov	eax,[menu_data_3.ret_key]
529
	mov	[menu_data_3.ret_key],dword 0
529
	mov	[menu_data_3.ret_key],dword 0
530
	cmp	eax,1
530
	cmp	eax,1
531
	je	select_sort.1
531
	je	select_sort.1
532
 
532
 
533
	cmp	eax,2
533
	cmp	eax,2
534
	je	select_disk.1
534
	je	select_disk.1
535
 
535
 
536
 
536
 
537
	cmp	[menu_data_3.click],dword 1
537
	cmp	[menu_data_3.click],dword 1
538
	jne	still
538
	jne	still
539
 
539
 
540
	cmp	[menu_data_3.cursor_out],dword 0
540
	cmp	[menu_data_3.cursor_out],dword 0
541
	jne	analyse_out_menu_3
541
	jne	analyse_out_menu_3
542
	jmp	still
542
	jmp	still
543
;---------------------------------------------------------------------
543
;---------------------------------------------------------------------
544
symbol_a_up:
544
symbol_a_up:
545
NumPad_plus_Up:
545
NumPad_plus_Up:
546
	call	check_ctrl
546
	call	check_ctrl
547
	jmp	key.9
547
	jmp	key.9
548
;---------------------------------------
548
;---------------------------------------
549
NumPad_minus_Up:
549
NumPad_minus_Up:
550
	call	check_ctrl
550
	call	check_ctrl
551
	jmp	key.10
551
	jmp	key.10
552
;---------------------------------------
552
;---------------------------------------
553
NumPad_invert_Up:
553
NumPad_invert_Up:
554
	call	check_ctrl
554
	call	check_ctrl
555
	jmp	key.11
555
	jmp	key.11
556
;---------------------------------------	
556
;---------------------------------------	
557
check_alt:
557
check_alt:
558
	xor	eax,eax
558
	xor	eax,eax
559
	mov	al,[alt_flag]
559
	mov	al,[alt_flag]
560
	test	eax,eax
560
	test	eax,eax
561
	jz	@f
561
	jz	@f
562
	xor	ebx,ebx
562
	xor	ebx,ebx
563
	ret
563
	ret
564
@@:
564
@@:
565
	add	esp,4
565
	add	esp,4
566
	jmp	still
566
	jmp	still
567
;---------------------------------------	
567
;---------------------------------------	
568
check_ctrl:
568
check_ctrl:
569
	xor	eax,eax
569
	xor	eax,eax
570
	mov	al,[ctrl_flag]
570
	mov	al,[ctrl_flag]
571
	test	eax,eax
571
	test	eax,eax
572
	jz	@f
572
	jz	@f
573
	xor	ebx,ebx
573
	xor	ebx,ebx
574
	ret
574
	ret
575
@@:
575
@@:
576
	add	esp,4
576
	add	esp,4
577
	jmp	still
577
	jmp	still
578
;---------------------------------------------------------------------
578
;---------------------------------------------------------------------
579
clear_control_key_flag:
579
clear_control_key_flag:
580
	xor	eax,eax
580
	xor	eax,eax
581
	mov	[shift_flag],al
581
	mov	[shift_flag],al
582
	mov	[ctrl_flag],al
582
	mov	[ctrl_flag],al
583
	mov	[alt_flag],al
583
	mov	[alt_flag],al
584
	ret
584
	ret
585
;---------------------------------------------------------------------
585
;---------------------------------------------------------------------
586
key_shift_up:
586
key_shift_up:
587
	mov	[shift_flag],1
587
	mov	[shift_flag],1
588
	jmp	still
588
	jmp	still
589
;---------------------------------------------------------------------
589
;---------------------------------------------------------------------
590
key_shift_down:
590
key_shift_down:
591
	mov	[shift_flag],0
591
	mov	[shift_flag],0
592
	jmp	still
592
	jmp	still
593
;---------------------------------------------------------------------
593
;---------------------------------------------------------------------
594
key_ctrl_up:
594
key_ctrl_up:
595
	mov	[ctrl_flag],1
595
	mov	[ctrl_flag],1
596
	jmp	still
596
	jmp	still
597
;---------------------------------------------------------------------
597
;---------------------------------------------------------------------
598
key_ctrl_down:
598
key_ctrl_down:
599
	mov	[ctrl_flag],0
599
	mov	[ctrl_flag],0
600
	jmp	still
600
	jmp	still
601
;---------------------------------------------------------------------
601
;---------------------------------------------------------------------
602
key_alt_up:
602
key_alt_up:
603
	mov	[alt_flag],1
603
	mov	[alt_flag],1
604
	jmp	still
604
	jmp	still
605
;---------------------------------------------------------------------
605
;---------------------------------------------------------------------
606
key_alt_down:
606
key_alt_down:
607
	mov	[alt_flag],0
607
	mov	[alt_flag],0
608
	jmp	still
608
	jmp	still
609
;---------------------------------------------------------------------
609
;---------------------------------------------------------------------
610
button:
610
button:
611
	mcall	17
611
	mcall	17
612
	cmp	ah,6
612
	cmp	ah,6
613
	je	.reload_dir_1
613
	je	.reload_dir_1
614
	cmp	ah,4
614
	cmp	ah,4
615
	je	.open_dir_or_file
615
	je	.open_dir_or_file
616
	cmp	ah,3
616
	cmp	ah,3
617
	je	.exit
617
	je	.exit
618
	cmp	ah,2
618
	cmp	ah,2
619
	je	.exit_dir
619
	je	.exit_dir
620
	cmp	ah,1
620
	cmp	ah,1
621
	jne	still
621
	jne	still
622
.exit:
622
.exit:
623
	mov	eax,[communication_area]
623
	mov	eax,[communication_area]
624
	test	eax,eax
624
	test	eax,eax
625
	jz	@f
625
	jz	@f
626
	cmp	[eax],word 1
626
	cmp	[eax],word 1
627
	je	@f
627
	je	@f
628
	mov	[eax],word 3
628
	mov	[eax],word 3
629
@@:
629
@@:
630
	mov	eax,[N_error]
630
	mov	eax,[N_error]
631
	test	eax,eax
631
	test	eax,eax
632
	jz	@f
632
	jz	@f
633
	call	start_error_window_thread
633
	call	start_error_window_thread
634
@@:
634
@@:
635
	call	get_window_param
635
	call	get_window_param
636
	mov	ebx,[communication_area]
636
	mov	ebx,[communication_area]
637
	mov	ecx,procinfo
637
	mov	ecx,procinfo
638
;	mov	eax,[window_x]
638
;	mov	eax,[window_x]
639
	mov	eax,[ecx+34]
639
	mov	eax,[ecx+34]
640
	shl	eax,16
640
	shl	eax,16
641
	add	eax,[ecx+42]
641
	add	eax,[ecx+42]
642
	mov	[ebx+4],eax
642
	mov	[ebx+4],eax
643
;	mov	eax,[window_y]
643
;	mov	eax,[window_y]
644
	mov	eax,[ecx+38]
644
	mov	eax,[ecx+38]
645
	shl	eax,16
645
	shl	eax,16
646
	add	eax,[ecx+46]
646
	add	eax,[ecx+46]
647
	mov	[ebx+8],eax
647
	mov	[ebx+8],eax
648
 
648
 
649
	mcall	-1
649
	mcall	-1
650
;---------------------------------------------------------------------
650
;---------------------------------------------------------------------
651
.reload_dir:
651
.reload_dir:
652
	cmp	[ctrl_flag],bl
652
	cmp	[ctrl_flag],bl
653
	je	key.12 ; Just symbol 'R' or 'r'
653
	je	key.12 ; Just symbol 'R' or 'r'
654
.reload_dir_1:
654
.reload_dir_1:
655
	call	load_next_dir.1
655
	call	load_next_dir.1
656
	jmp	still
656
	jmp	still
657
;---------------------------------------------------------------------
657
;---------------------------------------------------------------------
658
.exit_dir:
658
.exit_dir:
659
	call	load_next_dir.exit_dir
659
	call	load_next_dir.exit_dir
660
	jmp	still
660
	jmp	still
661
;---------------------------------------------------------------------
661
;---------------------------------------------------------------------
662
.open_dir_or_file:
662
.open_dir_or_file:
663
	cmp	[open_dialog_type],0	;Open file
663
	cmp	[open_dialog_type],0	;Open file
664
	jne	@f
664
	jne	@f
665
 
665
 
666
	mov	eax,[file_browser_data_1.folder_data]
666
	mov	eax,[file_browser_data_1.folder_data]
667
	mov	eax,[eax+4]
667
	mov	eax,[eax+4]
668
	test	eax,eax
668
	test	eax,eax
669
	jz	button.exit
669
	jz	button.exit
670
@@:
670
@@:
671
	cmp	[open_dialog_type],2	;Select	dir
671
	cmp	[open_dialog_type],2	;Select	dir
672
	je	file_no_folder
672
	je	file_no_folder
673
	
673
	
674
	cmp	[open_dialog_type],1	;Save file
674
	cmp	[open_dialog_type],1	;Save file
675
	jne	@f
675
	jne	@f
676
 
676
 
677
	mov	al,[focus_pointer]
677
	mov	al,[focus_pointer]
678
	test	al,al
678
	test	al,al
679
	jne	file_no_folder	
679
	jne	file_no_folder	
680
@@:
680
@@:
681
	xor	ebx,ebx
681
	xor	ebx,ebx
682
	jmp	key.7
682
	jmp	key.7
683
;---------------------------------------------------------------------
683
;---------------------------------------------------------------------
684
thread_start:
684
thread_start:
685
	mov	eax,[N_error]
685
	mov	eax,[N_error]
686
	cmp	al,1
686
	cmp	al,1
687
	jne	@f
687
	jne	@f
688
	mov	[N_error],load_ini_error_type
688
	mov	[N_error],load_ini_error_type
689
	mov	[error_path],file_name
689
	mov	[error_path],file_name
690
	jmp	.error_type
690
	jmp	.error_type
691
@@:
691
@@:
692
	cmp	al,2
692
	cmp	al,2
693
	jne	@f
693
	jne	@f
694
	mov	[N_error],load_icons_error_type
694
	mov	[N_error],load_icons_error_type
695
	mov	[error_path],file_name
695
	mov	[error_path],file_name
696
	jmp	.error_type
696
	jmp	.error_type
697
@@:
697
@@:
698
	cmp	al,3
698
	cmp	al,3
699
	jne	@f
699
	jne	@f
700
	mov	[N_error],memory_free_error_type
700
	mov	[N_error],memory_free_error_type
701
	xor	eax,eax
701
	xor	eax,eax
702
	mov	[error_path],eax
702
	mov	[error_path],eax
703
	mov	[error_type],eax
703
	mov	[error_type],eax
704
	jmp	.red
704
	jmp	.red
705
@@:
705
@@:
706
	cmp	al,4
706
	cmp	al,4
707
	jne	@f
707
	jne	@f
708
	mov	[N_error],memory_get_error_type
708
	mov	[N_error],memory_get_error_type
709
	xor	eax,eax
709
	xor	eax,eax
710
	mov	[error_path],eax
710
	mov	[error_path],eax
711
	mov	[error_type],eax
711
	mov	[error_type],eax
712
	jmp	.red
712
	jmp	.red
713
@@:
713
@@:
714
	cmp	al,5
714
	cmp	al,5
715
	jne	@f
715
	jne	@f
716
	mov	[N_error],load_directory_error_type
716
	mov	[N_error],load_directory_error_type
717
	mov	[error_path],dir_path
717
	mov	[error_path],dir_path
718
	jmp	.error_type
718
	jmp	.error_type
719
@@:
719
@@:
720
	cmp	al,6
720
	cmp	al,6
721
	jne	.button
721
	jne	.button
722
	mov	[N_error],convert_icons_error_type
722
	mov	[N_error],convert_icons_error_type
723
	mov	[error_path],file_name
723
	mov	[error_path],file_name
724
	xor	eax,eax
724
	xor	eax,eax
725
	mov	[error_type],eax
725
	mov	[error_type],eax
726
	jmp	.red
726
	jmp	.red
727
.error_type:
727
.error_type:
728
	mov	eax,[error_type]
728
	mov	eax,[error_type]
729
	shl	eax,2
729
	shl	eax,2
730
	add	eax,error_fs_text_pointers
730
	add	eax,error_fs_text_pointers
731
	mov	eax,[eax]
731
	mov	eax,[eax]
732
	mov	[error_type],eax
732
	mov	[error_type],eax
733
.red:
733
.red:
734
	call	draw_error_window
734
	call	draw_error_window
735
.still:
735
.still:
736
	mcall	10
736
	mcall	10
737
	cmp	eax,1
737
	cmp	eax,1
738
	je	.red
738
	je	.red
739
	cmp	eax,2
739
	cmp	eax,2
740
	je	.key
740
	je	.key
741
	cmp	eax,3
741
	cmp	eax,3
742
	je	.button
742
	je	.button
743
	jmp	.still
743
	jmp	.still
744
.key:
744
.key:
745
	mcall	2
745
	mcall	2
746
	jmp	.still
746
	jmp	.still
747
.button:
747
.button:
748
	mcall	-1
748
	mcall	-1
749
	jmp	.still
749
	jmp	.still
750
;---------------------------------------------------------------------
750
;---------------------------------------------------------------------
751
draw_error_window:
751
draw_error_window:
752
	mcall	12,1
752
	mcall	12,1
753
	mcall	0,[error_window_x],[error_window_y],0x03ff0000
753
	mcall	0,[error_window_x],[error_window_y],0x03ff0000
754
	call	type_title
754
	call	type_title
755
	mcall	4,<10,30>,0x90ffffff,[N_error]
755
	mcall	4,<10,30>,0x90ffffff,[N_error]
756
	mov	eax,[error_path]
756
	mov	eax,[error_path]
757
	test	eax,eax
757
	test	eax,eax
758
	jz	@f
758
	jz	@f
759
	mcall	4,<10,50>,,[error_path]
759
	mcall	4,<10,50>,,[error_path]
760
@@:
760
@@:
761
	mov	eax,[error_type]
761
	mov	eax,[error_type]
762
	test	eax,eax
762
	test	eax,eax
763
	jz	@f
763
	jz	@f
764
	mcall	4,<10,70>,,[error_type]
764
	mcall	4,<10,70>,,[error_type]
765
@@:
765
@@:
766
	mcall	12,2
766
	mcall	12,2
767
	ret
767
	ret
768
;---------------------------------------------------------------------
768
;---------------------------------------------------------------------
769
start_error_window_thread:
769
start_error_window_thread:
770
	mcall	9,procinfo,-1
770
	mcall	9,procinfo,-1
771
	mov	eax,[ebx+46]
771
	mov	eax,[ebx+46]
772
	shr	eax,1
772
	shr	eax,1
773
	add	eax,[ebx+38]
773
	add	eax,[ebx+38]
774
	sub	eax,40
774
	sub	eax,40
775
	mov	[error_window_y+2],ax
775
	mov	[error_window_y+2],ax
776
	mov	eax,[ebx+42]
776
	mov	eax,[ebx+42]
777
	shr	eax,1
777
	shr	eax,1
778
	add	eax,[ebx+34]
778
	add	eax,[ebx+34]
779
	sub	eax,125
779
	sub	eax,125
780
	mov	[error_window_x+2],ax
780
	mov	[error_window_x+2],ax
781
	mcall	51,1,thread_start,thread_stack
781
	mcall	51,1,thread_start,thread_stack
782
	ret
782
	ret
783
;---------------------------------------------------------------------
783
;---------------------------------------------------------------------
784
mouse:
784
mouse:
785
	mcall	18,7
785
	mcall	18,7
786
	cmp	[active_process],eax
786
	cmp	[active_process],eax
787
	jne	still
787
	jne	still
788
 
788
 
789
	mcall	37,7
789
	mcall	37,7
790
	mov	[mouse_scroll_data],eax
790
	mov	[mouse_scroll_data],eax
791
 
791
 
792
	mcall	37,1
792
	mcall	37,1
793
	mov	[mouse_position],eax
793
	mov	[mouse_position],eax
794
 
794
 
795
	cmp	[scroll_bar_data_vertical.delta2],0
795
	cmp	[scroll_bar_data_vertical.delta2],0
796
	jne	.scrollbar
796
	jne	.scrollbar
797
 
797
 
798
	mov	[file_browser_data_1.select_flag],0
798
	mov	[file_browser_data_1.select_flag],0
799
 
799
 
800
	push	dword file_browser_data_1
800
	push	dword file_browser_data_1
801
	call	[FileBrowser_mouse]
801
	call	[FileBrowser_mouse]
802
 
802
 
803
	call	draw_open_button_label
803
	call	draw_open_button_label
804
 
804
 
805
	mov	eax,file_browser_data_1.mouse_keys_delta
805
	mov	eax,file_browser_data_1.mouse_keys_delta
806
	cmp	[eax],dword 3
806
	cmp	[eax],dword 3
807
	jne	.check_focus	; scrollbar
807
	jne	.check_focus	; scrollbar
808
	mov	[eax],dword 0
808
	mov	[eax],dword 0
809
	call	load_next_dir
809
	call	load_next_dir
810
	jmp	still
810
	jmp	still
811
;---------------------------------------------------
811
;---------------------------------------------------
812
.check_focus:
812
.check_focus:
813
	mov	ebx,[file_browser_data_1.select_flag]
813
	mov	ebx,[file_browser_data_1.select_flag]
814
	test	ebx,ebx
814
	test	ebx,ebx
815
	jz	.scrollbar	;@f
815
	jz	.scrollbar	;@f
816
	mov	al,[focus_pointer]
816
	mov	al,[focus_pointer]
817
	test	al,al
817
	test	al,al
818
	jz	.scrollbar
818
	jz	.scrollbar
819
	xor	eax,eax
819
	xor	eax,eax
820
	mov	[focus_pointer],al
820
	mov	[focus_pointer],al
821
	jmp	change_focus_area.1
821
	jmp	change_focus_area.1
822
;---------------------------------------------------
822
;---------------------------------------------------
823
.scrollbar:
823
.scrollbar:
824
	mov	eax,[scroll_bar_data_vertical.max_area]
824
	mov	eax,[scroll_bar_data_vertical.max_area]
825
	cmp	eax,[scroll_bar_data_vertical.cur_area]
825
	cmp	eax,[scroll_bar_data_vertical.cur_area]
826
	jbe	.menu_bar	;still
826
	jbe	.menu_bar	;still
827
	
827
	
828
	push	dword scroll_bar_data_vertical
828
	push	dword scroll_bar_data_vertical
829
	call	[scrollbar_ver_mouse]
829
	call	[scrollbar_ver_mouse]
830
	
830
	
831
	cmp	[scroll_bar_data_vertical.redraw],0
831
	cmp	[scroll_bar_data_vertical.redraw],0
832
	je	.menu_bar	;still
832
	je	.menu_bar	;still
833
	mov	[scroll_bar_data_vertical.redraw],0
833
	mov	[scroll_bar_data_vertical.redraw],0
834
.draw:
834
.draw:
835
	call	draw_draw_file_browser2
835
	call	draw_draw_file_browser2
836
	jmp	still
836
	jmp	still
837
 
837
 
838
;---------------------------------------------------
838
;---------------------------------------------------
839
.menu_bar:
839
.menu_bar:
840
	cmp	[scroll_bar_data_vertical.delta2],0
840
	cmp	[scroll_bar_data_vertical.delta2],0
841
	jne	still
841
	jne	still
842
 
842
 
843
.menu_bar_1:
843
.menu_bar_1:
844
	call	.set_mouse_flag
844
	call	.set_mouse_flag
845
@@:
845
@@:
846
	push	dword menu_data_1
846
	push	dword menu_data_1
847
	call	[menu_bar_mouse]
847
	call	[menu_bar_mouse]
848
 
848
 
849
	cmp	[menu_data_1.click],dword 1
849
	cmp	[menu_data_1.click],dword 1
850
	jne	.menu_bar_2
850
	jne	.menu_bar_2
851
 
851
 
852
	cmp	[menu_data_1.cursor_out],dword 0
852
	cmp	[menu_data_1.cursor_out],dword 0
853
	jne	select_disk.1	;analyse_out_menu_1
853
	jne	select_disk.1	;analyse_out_menu_1
854
	jmp	.menu_bar_1
854
	jmp	.menu_bar_1
855
;--------------------------------------------
855
;--------------------------------------------
856
.menu_bar_2:
856
.menu_bar_2:
857
	push	dword menu_data_2
857
	push	dword menu_data_2
858
	call	[menu_bar_mouse]
858
	call	[menu_bar_mouse]
859
 
859
 
860
	cmp	[menu_data_2.click],dword 1
860
	cmp	[menu_data_2.click],dword 1
861
	jne	.menu_bar_3
861
	jne	.menu_bar_3
862
 
862
 
863
	cmp	[menu_data_2.cursor_out],dword 0
863
	cmp	[menu_data_2.cursor_out],dword 0
864
	jne	analyse_out_menu_2
864
	jne	analyse_out_menu_2
865
	jmp	.menu_bar_1
865
	jmp	.menu_bar_1
866
;---------------------------------------------------
866
;---------------------------------------------------
867
.menu_bar_3:
867
.menu_bar_3:
868
	push	dword menu_data_3
868
	push	dword menu_data_3
869
	call	[menu_bar_mouse]
869
	call	[menu_bar_mouse]
870
 
870
 
871
	cmp	[menu_data_3.click],dword 1
871
	cmp	[menu_data_3.click],dword 1
872
	jne	.check_editboxes
872
	jne	.check_editboxes
873
 
873
 
874
	cmp	[menu_data_3.cursor_out],dword 0
874
	cmp	[menu_data_3.cursor_out],dword 0
875
	jne	analyse_out_menu_3
875
	jne	analyse_out_menu_3
876
	jmp	.menu_bar_1
876
	jmp	.menu_bar_1
877
;---------------------------------------------------
877
;---------------------------------------------------
878
.check_editboxes:
878
.check_editboxes:
879
	cmp	[open_dialog_type],1
879
	cmp	[open_dialog_type],1
880
	jne	.check_scroll_event
880
	jne	.check_scroll_event
881
	mov	eax,[edit1+44]
881
	mov	eax,[edit1+44]
882
	and	eax,10b
882
	and	eax,10b
883
	push	dword name_editboxes
883
	push	dword name_editboxes
884
	call	[edit_box_mouse]
884
	call	[edit_box_mouse]
885
	mov	ebx,[edit1+44]
885
	mov	ebx,[edit1+44]
886
	and	ebx,10b
886
	and	ebx,10b
887
	cmp	eax,ebx
887
	cmp	eax,ebx
888
	je	.check_scroll_event
888
	je	.check_scroll_event
889
	mov	al,[focus_pointer]
889
	mov	al,[focus_pointer]
890
	test	al,al
890
	test	al,al
891
	jnz	.check_scroll_event
891
	jnz	.check_scroll_event
892
	xor	eax,eax
892
	xor	eax,eax
893
	test	ebx,10b
893
	test	ebx,10b
894
	jz	@f
894
	jz	@f
895
	inc	eax
895
	inc	eax
896
@@:
896
@@:
897
	mov	[focus_pointer],al
897
	mov	[focus_pointer],al
898
	jmp	change_focus_area.1
898
	jmp	change_focus_area.1
899
;---------------------------------------------------
899
;---------------------------------------------------
900
.check_scroll_event:
900
.check_scroll_event:
901
	mov	eax,[mouse_position]
901
	mov	eax,[mouse_position]
902
	xor	ebx,ebx
902
	xor	ebx,ebx
903
	mov	bx,ax	; EBX mouse y
903
	mov	bx,ax	; EBX mouse y
904
	shr	eax,16	; EAX mouse x
904
	shr	eax,16	; EAX mouse x
905
	
905
	
906
	mov	cx,[file_browser_data_1.start_x]
906
	mov	cx,[file_browser_data_1.start_x]
907
	mov	dx,[file_browser_data_1.start_y]
907
	mov	dx,[file_browser_data_1.start_y]
908
 
908
 
909
	cmp	ax,cx
909
	cmp	ax,cx
910
	jb	.mouse_next	; min x
910
	jb	.mouse_next	; min x
911
 
911
 
912
	cmp	bx,dx
912
	cmp	bx,dx
913
	jb	.mouse_next	; min y
913
	jb	.mouse_next	; min y
914
 
914
 
915
	add	cx,[file_browser_data_1.size_x]
915
	add	cx,[file_browser_data_1.size_x]
916
	cmp	ax,cx	
916
	cmp	ax,cx	
917
	ja	.mouse_next	; max x
917
	ja	.mouse_next	; max x
918
 
918
 
919
	add	dx,[file_browser_data_1.size_y]
919
	add	dx,[file_browser_data_1.size_y]
920
	cmp	bx,dx
920
	cmp	bx,dx
921
	ja	.mouse_next	; max y
921
	ja	.mouse_next	; max y
922
 
922
 
923
	xor	ecx,ecx
923
	xor	ecx,ecx
924
	xor	ebx,ebx
924
	xor	ebx,ebx
925
	mov	eax,[mouse_scroll_data]
925
	mov	eax,[mouse_scroll_data]
926
	test	eax,eax
926
	test	eax,eax
927
	jz	.mouse_next
927
	jz	.mouse_next
928
	test	ax,0x8000
928
	test	ax,0x8000
929
	jnz	.decr
929
	jnz	.decr
930
	shr	eax,16
930
	shr	eax,16
931
	test	ax,0x8000
931
	test	ax,0x8000
932
	jnz	.decr_1
932
	jnz	.decr_1
933
 
933
 
934
	mov	cx,[mouse_scroll_data.vertical]
934
	mov	cx,[mouse_scroll_data.vertical]
935
	test	ecx,ecx
935
	test	ecx,ecx
936
	jnz	@f
936
	jnz	@f
937
	mov	cx,[mouse_scroll_data.horizontal]
937
	mov	cx,[mouse_scroll_data.horizontal]
938
	test	ecx,ecx
938
	test	ecx,ecx
939
	jz	.mouse_next
939
	jz	.mouse_next
940
@@:
940
@@:
941
	mov	ebx,1
941
	mov	ebx,1
942
@@:
942
@@:
943
	push	ebx ecx
943
	push	ebx ecx
944
	call	key.key_action
944
	call	key.key_action
945
	pop	ecx ebx
945
	pop	ecx ebx
946
	dec	ecx
946
	dec	ecx
947
	jnz	@r
947
	jnz	@r
948
	jmp	still
948
	jmp	still
949
;----------------------------------------
949
;----------------------------------------
950
.decr:
950
.decr:
951
	mov	bx,[mouse_scroll_data.vertical]
951
	mov	bx,[mouse_scroll_data.vertical]
952
	jmp	@f
952
	jmp	@f
953
.decr_1:
953
.decr_1:
954
	mov	bx,[mouse_scroll_data.horizontal]
954
	mov	bx,[mouse_scroll_data.horizontal]
955
@@:
955
@@:
956
	mov	ecx,0xffff
956
	mov	ecx,0xffff
957
	sub	ecx,ebx
957
	sub	ecx,ebx
958
	inc	ecx
958
	inc	ecx
959
	mov	ebx,2
959
	mov	ebx,2
960
@@:
960
@@:
961
	push	ebx ecx
961
	push	ebx ecx
962
	call	key.key_action
962
	call	key.key_action
963
	pop	ecx ebx
963
	pop	ecx ebx
964
	dec	ecx
964
	dec	ecx
965
	jnz	@r
965
	jnz	@r
966
	jmp	still
966
	jmp	still
967
;---------------------------------------------------
967
;---------------------------------------------------
968
.mouse_next:
968
.mouse_next:
969
	jmp	still
969
	jmp	still
970
;---------------------------------------------------------------------
970
;---------------------------------------------------------------------
971
.set_mouse_flag:
971
.set_mouse_flag:
972
	xor	eax,eax
972
	xor	eax,eax
973
	inc	eax
973
	inc	eax
974
	mov	[menu_data_1.get_mouse_flag],eax
974
	mov	[menu_data_1.get_mouse_flag],eax
975
	mov	[menu_data_2.get_mouse_flag],eax
975
	mov	[menu_data_2.get_mouse_flag],eax
976
	ret
976
	ret
977
;---------------------------------------------------------------------
977
;---------------------------------------------------------------------
978
analyse_out_menu_1:
978
analyse_out_menu_1:
979
; Available disks
979
; Available disks
980
	mov	eax,[menu_data_1.cursor_out]
980
	mov	eax,[menu_data_1.cursor_out]
981
	dec	eax
981
	dec	eax
982
	imul	esi,eax,10
982
	imul	esi,eax,10
983
	add	esi,retrieved_devices_table
983
	add	esi,retrieved_devices_table
984
	mov	edi,dir_path
984
	mov	edi,dir_path
985
	call	copy_dir_name
985
	call	copy_dir_name
986
	call	load_next_dir.1
986
	call	load_next_dir.1
987
	jmp	still
987
	jmp	still
988
;---------------------------------------------------------------------
988
;---------------------------------------------------------------------
989
analyse_out_menu_2:
989
analyse_out_menu_2:
990
; Sort
990
; Sort
991
	mov	eax,[menu_data_2.cursor_out]
991
	mov	eax,[menu_data_2.cursor_out]
992
	xor	ebx,ebx
992
	xor	ebx,ebx
993
	cmp	eax,dword 1
993
	cmp	eax,dword 1
994
	je	.1
994
	je	.1
995
	cmp	eax,dword 2
995
	cmp	eax,dword 2
996
	je	.2
996
	je	.2
997
	cmp	eax,dword 3
997
	cmp	eax,dword 3
998
	je	.3
998
	je	.3
999
	cmp	eax,dword 4
999
	cmp	eax,dword 4
1000
	je	.4
1000
	je	.4
1001
	jmp	still
1001
	jmp	still
1002
.4:
1002
.4:
1003
	add	ebx,2
1003
	add	ebx,2
1004
.3:
1004
.3:
1005
	add	ebx,2
1005
	add	ebx,2
1006
.2:
1006
.2:
1007
	add	ebx,2
1007
	add	ebx,2
1008
.1:
1008
.1:
1009
	mov	[sort_type],ebx
1009
	mov	[sort_type],ebx
1010
	call	sort_directory
1010
	call	sort_directory
1011
	call	draw_draw_file_browser1
1011
	call	draw_draw_file_browser1
1012
	jmp	still
1012
	jmp	still
1013
;---------------------------------------------------------------------
1013
;---------------------------------------------------------------------
1014
analyse_out_menu_3:
1014
analyse_out_menu_3:
1015
; Filter
1015
; Filter
1016
	mov	eax,[menu_data_3.cursor_out]
1016
	mov	eax,[menu_data_3.cursor_out]
1017
	cmp	eax,dword 1
1017
	cmp	eax,dword 1
1018
	jne	@f
1018
	jne	@f
1019
	mov	[filter_flag],0
1019
	mov	[filter_flag],0
1020
	call	load_next_dir.1
1020
	call	load_next_dir.1
1021
	jmp	still
1021
	jmp	still
1022
@@:
1022
@@:
1023
	cmp	eax,dword 2
1023
	cmp	eax,dword 2
1024
	jne	still
1024
	jne	still
1025
	mov	[filter_flag],1
1025
	mov	[filter_flag],1
1026
	call	load_next_dir.1
1026
	call	load_next_dir.1
1027
	jmp	still	
1027
	jmp	still	
1028
;---------------------------------------------------------------------
1028
;---------------------------------------------------------------------
1029
get_communication_area:
1029
get_communication_area:
1030
	xor	eax,eax
1030
	xor	eax,eax
1031
	mov	al,[param]
1031
	mov	al,[param]
1032
	test	eax,eax
1032
	test	eax,eax
1033
	jz	.exit
1033
	jz	.exit
1034
	mcall	68,22,param,,0x01
1034
	mcall	68,22,param,,0x01
1035
	mov	[communication_area],eax
1035
	mov	[communication_area],eax
1036
	movzx	ebx,word [eax+2]
1036
	movzx	ebx,word [eax+2]
1037
	mov	[open_dialog_type],ebx
1037
	mov	[open_dialog_type],ebx
1038
	cmp	ebx,1
1038
	cmp	ebx,1
1039
	jne	@f
1039
	jne	@f
1040
	pushad
1040
	pushad
1041
	mov	[focus_pointer],bl
1041
	mov	[focus_pointer],bl
1042
	mov	edi,edit1
1042
	mov	edi,edit1
1043
	mov	[file_browser_data_1.select_panel_counter],0
1043
	mov	[file_browser_data_1.select_panel_counter],0
1044
	or	[edi+44],dword ed_focus
1044
	or	[edi+44],dword ed_focus
1045
	mov	[edi+12],dword 0xffffb0	; color yellow
1045
	mov	[edi+12],dword 0xffffb0	; color yellow
1046
	mcall	66,1,0
1046
	mcall	66,1,0
1047
	popad
1047
	popad
1048
@@:
1048
@@:
1049
	mov	ebx,[eax+4]
1049
	mov	ebx,[eax+4]
1050
	cmp	bx,word x_minimal_size ;300
1050
	cmp	bx,word x_minimal_size ;300
1051
	jb	@f
1051
	jb	@f
1052
	mov	[window_x],ebx
1052
	mov	[window_x],ebx
1053
	mov	ebx,[eax+8]
1053
	mov	ebx,[eax+8]
1054
	cmp	bx,word y_minimal_size ;200
1054
	cmp	bx,word y_minimal_size ;200
1055
	jb	@f
1055
	jb	@f
1056
	mov	[window_y],ebx
1056
	mov	[window_y],ebx
1057
.exit:
1057
.exit:
1058
	ret
1058
	ret
1059
;---------------------------------------------------------------------
1059
;---------------------------------------------------------------------
1060
load_start_directory:
1060
load_start_directory:
1061
	mov	eax,[communication_area]	
1061
	mov	eax,[communication_area]	
1062
	test	eax,eax
1062
	test	eax,eax
1063
	jz	.1
1063
	jz	.1
1064
	movzx	ebx,word [eax]
1064
	movzx	ebx,word [eax]
1065
	test	eax,eax
1065
	test	eax,eax
1066
	jz	.1
1066
	jz	.1
1067
	add	eax,16	;12 ;4
1067
	add	eax,16	;12 ;4
1068
	mov	esi,eax
1068
	mov	esi,eax
1069
	push	esi
1069
	push	esi
1070
	mov	esi,[communication_area]
1070
	mov	esi,[communication_area]
1071
	add	esi,3840 ;4096-256
1071
	add	esi,3840 ;4096-256
1072
	mov	eax,[esi]
1072
	mov	eax,[esi]
1073
	test	al,al
1073
	test	al,al
1074
	jnz	@f
1074
	jnz	@f
1075
	mov	esi,example_name_temp
1075
	mov	esi,example_name_temp
1076
@@:
1076
@@:
1077
	mov	edi,user_selected_name
1077
	mov	edi,user_selected_name
1078
	call	copy_dir_name
1078
	call	copy_dir_name
1079
	pop	esi
1079
	pop	esi
1080
	jmp	.2
1080
	jmp	.2
1081
.1:
1081
.1:
1082
	mov	esi,start_pach
1082
	mov	esi,start_pach
1083
.2:
1083
.2:
1084
	mov	edi,dir_path
1084
	mov	edi,dir_path
1085
	call	copy_dir_name
1085
	call	copy_dir_name
1086
	
1086
	
1087
;	call	load_directory
1087
;	call	load_directory
1088
;	mov	eax,[N_error]
1088
;	mov	eax,[N_error]
1089
;	test	eax,eax
1089
;	test	eax,eax
1090
;	jnz	button.exit
1090
;	jnz	button.exit
1091
.3:
1091
.3:
1092
	call	load_directory
1092
	call	load_directory
1093
	mov	eax,[N_error]
1093
	mov	eax,[N_error]
1094
	test	eax,eax
1094
	test	eax,eax
1095
	jz	@f
1095
	jz	@f
1096
	call	error_handler
1096
	call	error_handler
1097
	jmp	.3
1097
	jmp	.3
1098
@@:
1098
@@:
1099
	ret
1099
	ret
1100
;---------------------------------------------------------------------
1100
;---------------------------------------------------------------------
1101
load_next_dir:
1101
load_next_dir:
1102
	mov	ebx,[file_browser_data_1.folder_block]
1102
	mov	ebx,[file_browser_data_1.folder_block]
1103
	test	ebx,ebx
1103
	test	ebx,ebx
1104
	jz	.exit
1104
	jz	.exit
1105
 
1105
 
1106
	mov	ebx,[file_browser_data_1.selected_BDVK_adress]
1106
	mov	ebx,[file_browser_data_1.selected_BDVK_adress]
1107
	add	ebx,40
1107
	add	ebx,40
1108
	test	[ebx-40],byte 0x10
1108
	test	[ebx-40],byte 0x10
1109
	jz	file_no_folder
1109
	jz	file_no_folder
1110
	cmp	[ebx],word '..'
1110
	cmp	[ebx],word '..'
1111
	jne	@f
1111
	jne	@f
1112
	cmp	[ebx+2],byte 0
1112
	cmp	[ebx+2],byte 0
1113
	je	.exit_dir
1113
	je	.exit_dir
1114
@@:
1114
@@:
1115
	mov	esi,dir_path
1115
	mov	esi,dir_path
1116
	call	copy_dir_path
1116
	call	copy_dir_path
1117
 
1117
 
1118
@@:
1118
@@:
1119
.1:
1119
.1:
1120
	call	load_directory
1120
	call	load_directory
1121
	mov	eax,[N_error]
1121
	mov	eax,[N_error]
1122
	test	eax,eax
1122
	test	eax,eax
1123
	jz	@f
1123
	jz	@f
1124
	call	error_handler
1124
	call	error_handler
1125
	jmp	.1
1125
	jmp	.1
1126
@@:
1126
@@:
1127
	call	sort_directory
1127
	call	sort_directory
1128
 
1128
 
1129
	mov	ebx,[scroll_bar_data_vertical.x]
1129
	mov	ebx,[scroll_bar_data_vertical.x]
1130
	inc	ebx
1130
	inc	ebx
1131
	mov	ecx,[scroll_bar_data_vertical.y]
1131
	mov	ecx,[scroll_bar_data_vertical.y]
1132
	inc	ecx
1132
	inc	ecx
1133
	mcall	13,,,0xcccccc
1133
	mcall	13,,,0xcccccc
1134
	mov	edi,edit1
1134
	mov	edi,edit1
1135
	xor	eax,eax
1135
	xor	eax,eax
1136
	mov	[edi+44],eax
1136
	mov	[edi+44],eax
1137
	mov	[edi+12],dword 0xffffff	; color white
1137
	mov	[edi+12],dword 0xffffff	; color white
1138
	call	draw_draw_file_browser1
1138
	call	draw_draw_file_browser1
1139
.exit:
1139
.exit:
1140
	ret
1140
	ret
1141
.exit_dir:
1141
.exit_dir:
1142
	mov	esi,dir_path
1142
	mov	esi,dir_path
1143
	call	copy_exit_dir
1143
	call	copy_exit_dir
1144
	jmp	.1
1144
	jmp	.1
1145
;---------------------------------------------------------------------
1145
;---------------------------------------------------------------------
1146
error_handler:
1146
error_handler:
1147
	mcall	66,2
1147
	mcall	66,2
1148
	mov	[error_handler_store_input_mode],eax
1148
	mov	[error_handler_store_input_mode],eax
1149
	mcall	66,1,1
1149
	mcall	66,1,1
1150
.red:
1150
.red:
1151
	call	.draw_window
1151
	call	.draw_window
1152
;------------------------------------
1152
;------------------------------------
1153
.still:
1153
.still:
1154
	mcall	10
1154
	mcall	10
1155
	cmp	eax,1
1155
	cmp	eax,1
1156
	je	.red
1156
	je	.red
1157
	cmp	eax,2
1157
	cmp	eax,2
1158
	je	.key
1158
	je	.key
1159
	cmp	eax,3
1159
	cmp	eax,3
1160
	je	.button
1160
	je	.button
1161
	jmp	.still
1161
	jmp	.still
1162
;------------------------------------
1162
;------------------------------------
1163
.draw_window:
1163
.draw_window:
1164
	xor	eax,eax
1164
	xor	eax,eax
1165
	inc	eax
1165
	inc	eax
1166
	mov	[error_window],al
1166
	mov	[error_window],al
1167
	call	control_minimal_window_size
1167
	call	control_minimal_window_size
1168
	call	draw_window
1168
	call	draw_window
1169
	xor	eax,eax
1169
	xor	eax,eax
1170
	mov	[error_window],al
1170
	mov	[error_window],al
1171
	ret
1171
	ret
1172
;------------------------------------
1172
;------------------------------------
1173
.key:
1173
.key:
1174
	mcall	2
1174
	mcall	2
1175
	xor	ebx,ebx
1175
	xor	ebx,ebx
1176
	cmp	[extended_key],1
1176
	cmp	[extended_key],1
1177
	je	.extended_key
1177
	je	.extended_key
1178
	test	al,al
1178
	test	al,al
1179
	jnz	.still
1179
	jnz	.still
1180
	cmp	ah,0xE0
1180
	cmp	ah,0xE0
1181
	jne	@f
1181
	jne	@f
1182
	mov	[extended_key],1
1182
	mov	[extended_key],1
1183
	jmp	.still
1183
	jmp	.still
1184
@@:
1184
@@:
1185
	cmp	ah,129	; Esc
1185
	cmp	ah,129	; Esc
1186
	je	.exit
1186
	je	.exit
1187
	jmp	.still
1187
	jmp	.still
1188
.extended_key:
1188
.extended_key:
1189
	jmp	.still
1189
	jmp	.still
1190
;------------------------------------
1190
;------------------------------------
1191
.button:
1191
.button:
1192
	mcall	17
1192
	mcall	17
1193
	cmp	ah,5
1193
	cmp	ah,5
1194
	je	.exit
1194
	je	.exit
1195
	cmp	ah,1
1195
	cmp	ah,1
1196
	jne	.still
1196
	jne	.still
1197
	xor	eax,eax
1197
	xor	eax,eax
1198
	mov	[N_error],eax
1198
	mov	[N_error],eax
1199
	jmp	button.exit
1199
	jmp	button.exit
1200
;------------------------------------
1200
;------------------------------------
1201
.exit:
1201
.exit:
1202
	cmp	[open_dialog_type],1
1202
	cmp	[open_dialog_type],1
1203
	jne	@f
1203
	jne	@f
1204
 
1204
 
1205
	mov	esi,root_pach
1205
	mov	esi,root_pach
1206
	mov	edi,dir_path
1206
	mov	edi,dir_path
1207
	call	copy_dir_name.1
1207
	call	copy_dir_name.1
1208
	mov	esi,root_pach
1208
	mov	esi,root_pach
1209
	mov	edi,previous_dir_path
1209
	mov	edi,previous_dir_path
1210
	call	copy_dir_name.1
1210
	call	copy_dir_name.1
1211
	jmp	.restore_input_mode
1211
	jmp	.restore_input_mode
1212
@@:
1212
@@:
1213
	mov	esi,previous_dir_path
1213
	mov	esi,previous_dir_path
1214
	mov	edi,dir_path
1214
	mov	edi,dir_path
1215
	call	copy_dir_name.1
1215
	call	copy_dir_name.1
1216
	mov	esi,start_pach
1216
	mov	esi,start_pach
1217
	mov	edi,previous_dir_path
1217
	mov	edi,previous_dir_path
1218
	call	copy_dir_name.1
1218
	call	copy_dir_name.1
1219
.restore_input_mode:
1219
.restore_input_mode:
1220
	mcall	66,1,[error_handler_store_input_mode]
1220
	mcall	66,1,[error_handler_store_input_mode]
1221
	ret
1221
	ret
1222
;---------------------------------------------------------------------
1222
;---------------------------------------------------------------------
1223
file_no_folder:
1223
file_no_folder:
1224
	mov	esi,dir_path
1224
	mov	esi,dir_path
1225
	mov	edi,file_name
1225
	mov	edi,file_name
1226
	call	copy_dir_name
1226
	call	copy_dir_name
1227
	push	ebx
1227
	push	ebx
1228
	mov	al,[focus_pointer]
1228
	mov	al,[focus_pointer]
1229
	test	al,al
1229
	test	al,al
1230
	je	@f
1230
	je	@f
1231
	mov	ebx,user_selected_name
1231
	mov	ebx,user_selected_name
1232
	xor	eax,eax
1232
	xor	eax,eax
1233
	cmp	[ebx],al
1233
	cmp	[ebx],al
1234
	je	.exit
1234
	je	.exit
1235
@@:
1235
@@:
1236
	cmp	[open_dialog_type],2
1236
	cmp	[open_dialog_type],2
1237
	je	@f
1237
	je	@f
1238
	mov	esi,file_name
1238
	mov	esi,file_name
1239
	call	copy_dir_path
1239
	call	copy_dir_path
1240
@@:
1240
@@:
1241
	mov	eax,[communication_area]
1241
	mov	eax,[communication_area]
1242
	test	eax,eax
1242
	test	eax,eax
1243
	jnz	@f
1243
	jnz	@f
1244
	call	control_minimal_window_size
1244
	call	control_minimal_window_size
1245
	call	draw_window
1245
	call	draw_window
1246
	pop	ebx
1246
	pop	ebx
1247
	ret
1247
	ret
1248
@@:
1248
@@:
1249
	mov	edi,eax
1249
	mov	edi,eax
1250
	add	edi,16	;12
1250
	add	edi,16	;12
1251
	mov	esi,file_name	
1251
	mov	esi,file_name	
1252
	call	copy_dir_name
1252
	call	copy_dir_name
1253
	
1253
	
1254
	pop	esi
1254
	pop	esi
1255
	mov	al,[focus_pointer]
1255
	mov	al,[focus_pointer]
1256
	test	al,al
1256
	test	al,al
1257
	jz	@f
1257
	jz	@f
1258
	mov	esi,user_selected_name
1258
	mov	esi,user_selected_name
1259
@@:
1259
@@:
1260
	xor	eax,eax
1260
	xor	eax,eax
1261
	cmp	[esi],al
1261
	cmp	[esi],al
1262
	je	.exit
1262
	je	.exit
1263
	mov	edi,[communication_area]
1263
	mov	edi,[communication_area]
1264
	add	edi,3840 ;4096-256
1264
	add	edi,3840 ;4096-256
1265
	call	copy_dir_name
1265
	call	copy_dir_name
1266
.exit:
1266
.exit:
1267
	mov	eax,[communication_area]
1267
	mov	eax,[communication_area]
1268
	mov	[eax],word 1
1268
	mov	[eax],word 1
1269
	jmp	button.exit
1269
	jmp	button.exit
1270
;---------------------------------------------------------------------
1270
;---------------------------------------------------------------------
1271
load_root_directory:
1271
load_root_directory:
1272
	mov	[dirinfo.name],dword dir_path_temp
1272
	mov	[dirinfo.name],dword dir_path_temp
1273
	mov	eax,[dirinfo.return]
1273
	mov	eax,[dirinfo.return]
1274
	push	eax
1274
	push	eax
1275
	mov	eax,[file_browser_data_1.folder_data]
1275
	mov	eax,[file_browser_data_1.folder_data]
1276
	push	eax
1276
	push	eax
1277
	xor	eax,eax
1277
	xor	eax,eax
1278
	mov	[dirinfo.return],eax
1278
	mov	[dirinfo.return],eax
1279
	mov	[file_browser_data_1.folder_data],eax
1279
	mov	[file_browser_data_1.folder_data],eax
1280
	mov	esi,root_pach
1280
	mov	esi,root_pach
1281
	mov	edi,dir_path_temp
1281
	mov	edi,dir_path_temp
1282
	call	copy_dir_name
1282
	call	copy_dir_name
1283
	call	load_directory
1283
	call	load_directory
1284
	mov	eax,[N_error]
1284
	mov	eax,[N_error]
1285
	test	eax,eax
1285
	test	eax,eax
1286
	jnz	button.exit
1286
	jnz	button.exit
1287
 
1287
 
1288
	mov	eax,[dirinfo.return]
1288
	mov	eax,[dirinfo.return]
1289
	mov	[root_folder_area],eax
1289
	mov	[root_folder_area],eax
1290
	mov	eax,[eax+4]
1290
	mov	eax,[eax+4]
1291
	mov	[root_folder_block],eax
1291
	mov	[root_folder_block],eax
1292
 
1292
 
1293
	xor	eax,eax
1293
	xor	eax,eax
1294
	mov	[dirinfo.return],eax
1294
	mov	[dirinfo.return],eax
1295
	mov	[file_browser_data_1.folder_data],eax
1295
	mov	[file_browser_data_1.folder_data],eax
1296
	mov	[temp_counter_1],eax	;0
1296
	mov	[temp_counter_1],eax	;0
1297
 
1297
 
1298
	mov	[retrieved_devices_table_counter],eax	;0
1298
	mov	[retrieved_devices_table_counter],eax	;0
1299
.start_temp_counter_1:
1299
.start_temp_counter_1:
1300
	imul	esi,[temp_counter_1],304
1300
	imul	esi,[temp_counter_1],304
1301
	add	esi,[root_folder_area]
1301
	add	esi,[root_folder_area]
1302
	add	esi,32+40
1302
	add	esi,32+40
1303
	mov	edi,dir_path_temp+1
1303
	mov	edi,dir_path_temp+1
1304
	mov	[edi-1],byte '/'
1304
	mov	[edi-1],byte '/'
1305
	call	copy_dir_name
1305
	call	copy_dir_name
1306
	call	load_directory
1306
	call	load_directory
1307
	mov	eax,[N_error]
1307
	mov	eax,[N_error]
1308
	test	eax,eax
1308
	test	eax,eax
1309
	jnz	button.exit
1309
	jnz	button.exit
1310
 
1310
 
1311
	mov	eax,[dirinfo.return]
1311
	mov	eax,[dirinfo.return]
1312
	mov	[root1_folder_area],eax
1312
	mov	[root1_folder_area],eax
1313
	mov	eax,[eax+4]
1313
	mov	eax,[eax+4]
1314
	test	eax,eax
1314
	test	eax,eax
1315
	jz	.continue
1315
	jz	.continue
1316
	mov	[root1_folder_block],eax
1316
	mov	[root1_folder_block],eax
1317
	
1317
	
1318
	mov	ebp,0
1318
	mov	ebp,0
1319
.start_copy_device_patch:
1319
.start_copy_device_patch:
1320
	imul	edi,[retrieved_devices_table_counter],10
1320
	imul	edi,[retrieved_devices_table_counter],10
1321
	add	edi,retrieved_devices_table
1321
	add	edi,retrieved_devices_table
1322
	mov	[edi],byte '/'
1322
	mov	[edi],byte '/'
1323
	inc	edi
1323
	inc	edi
1324
	imul	esi,[temp_counter_1],304
1324
	imul	esi,[temp_counter_1],304
1325
	add	esi,[root_folder_area]
1325
	add	esi,[root_folder_area]
1326
	add	esi,32+40
1326
	add	esi,32+40
1327
 
1327
 
1328
	call	copy_dir_name
1328
	call	copy_dir_name
1329
 
1329
 
1330
	imul	esi,ebp,304
1330
	imul	esi,ebp,304
1331
	add	esi,[root1_folder_area]
1331
	add	esi,[root1_folder_area]
1332
	add	esi,32+40
1332
	add	esi,32+40
1333
	mov	[edi-1],byte '/'
1333
	mov	[edi-1],byte '/'
1334
 
1334
 
1335
	call	copy_dir_name
1335
	call	copy_dir_name
1336
 
1336
 
1337
	inc	[retrieved_devices_table_counter]
1337
	inc	[retrieved_devices_table_counter]
1338
	inc	ebp
1338
	inc	ebp
1339
	cmp	ebp,[root1_folder_block]
1339
	cmp	ebp,[root1_folder_block]
1340
	jb	.start_copy_device_patch
1340
	jb	.start_copy_device_patch
1341
.continue:
1341
.continue:
1342
	inc	[temp_counter_1]
1342
	inc	[temp_counter_1]
1343
	mov	eax,[temp_counter_1]
1343
	mov	eax,[temp_counter_1]
1344
	cmp	eax,[root_folder_block]
1344
	cmp	eax,[root_folder_block]
1345
	jb	.start_temp_counter_1
1345
	jb	.start_temp_counter_1
1346
 
1346
 
1347
	cmp	[root_folder_area],dword 0
1347
	cmp	[root_folder_area],dword 0
1348
	je	@f
1348
	je	@f
1349
	mcall	68,13,[root_folder_area]
1349
	mcall	68,13,[root_folder_area]
1350
	test	eax,eax
1350
	test	eax,eax
1351
	jz	memory_free_error
1351
	jz	memory_free_error
1352
@@:
1352
@@:
1353
 
1353
 
1354
	xor	ecx,ecx
1354
	xor	ecx,ecx
1355
	mov	edi,menu_text_area_1_1	;.1
1355
	mov	edi,menu_text_area_1_1	;.1
1356
@@:
1356
@@:
1357
	imul	esi,ecx,10
1357
	imul	esi,ecx,10
1358
	add	esi,retrieved_devices_table
1358
	add	esi,retrieved_devices_table
1359
	call	copy_dir_name
1359
	call	copy_dir_name
1360
	inc	ecx
1360
	inc	ecx
1361
	cmp	ecx,[retrieved_devices_table_counter]
1361
	cmp	ecx,[retrieved_devices_table_counter]
1362
	jb	@b
1362
	jb	@b
1363
	mov	[menu_data_1.text_end],edi
1363
	mov	[menu_data_1.text_end],edi
1364
	xor	eax,eax
1364
	xor	eax,eax
1365
	mov	[edi],eax
1365
	mov	[edi],eax
1366
	pop	eax
1366
	pop	eax
1367
	mov	[file_browser_data_1.folder_data],eax
1367
	mov	[file_browser_data_1.folder_data],eax
1368
	pop	eax
1368
	pop	eax
1369
	mov	[dirinfo.return],eax
1369
	mov	[dirinfo.return],eax
1370
	mov	[dirinfo.name],dword dir_path
1370
	mov	[dirinfo.name],dword dir_path
1371
	ret
1371
	ret
1372
;---------------------------------------------------------------------
1372
;---------------------------------------------------------------------
1373
memory_free_error:
1373
memory_free_error:
1374
	mov	[N_error],3
1374
	mov	[N_error],3
1375
	jmp	button.exit
1375
	jmp	button.exit
1376
;---------------------------------------------------------------------
1376
;---------------------------------------------------------------------
1377
memory_get_error:
1377
memory_get_error:
1378
	mov	[N_error],4
1378
	mov	[N_error],4
1379
	jmp	button.exit
1379
	jmp	button.exit
1380
;---------------------------------------------------------------------
1380
;---------------------------------------------------------------------
1381
type_title:
1381
type_title:
1382
	mov	ecx,[open_dialog_type]
1382
	mov	ecx,[open_dialog_type]
1383
	shl	ecx,2
1383
	shl	ecx,2
1384
	add	ecx,open_dialog_title_pointer
1384
	add	ecx,open_dialog_title_pointer
1385
	mov	ecx,[ecx]
1385
	mov	ecx,[ecx]
1386
	test	ecx,ecx
1386
	test	ecx,ecx
1387
	jz	@f
1387
	jz	@f
1388
	mcall	71,1,; title ;;param ;file_name ;dir_path
1388
	mcall	71,1,; title ;;param ;file_name ;dir_path
1389
@@:
1389
@@:
1390
	ret
1390
	ret
1391
;---------------------------------------------------------------------
1391
;---------------------------------------------------------------------
1392
draw_window:
1392
draw_window:
1393
 
1393
 
1394
	mcall	12,1
1394
	mcall	12,1
1395
	
1395
	
1396
	call	prepare_system_colors
1396
	call	prepare_system_colors
1397
 
1397
 
1398
;	mcall	0,<10,420>,<10,320>,0x63AABBCC,
1398
;	mcall	0,<10,420>,<10,320>,0x63AABBCC,
1399
	xor	esi,esi
1399
	xor	esi,esi
1400
;	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1400
;	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1401
;	or	edx,0x63000000
1401
;	or	edx,0x63000000
1402
	mcall	0,[window_x],[window_y],0x63AABBCC
1402
	mcall	0,[window_x],[window_y],0x63AABBCC
1403
 
1403
 
1404
;	mov	ecx,[communication_area]
1404
;	mov	ecx,[communication_area]
1405
;	add	ecx,4096+4+4
1405
;	add	ecx,4096+4+4
1406
	call	type_title
1406
	call	type_title
1407
	call	get_window_param
1407
	call	get_window_param
1408
	
1408
	
1409
	mov	eax,[procinfo+70] ;status of window
1409
	mov	eax,[procinfo+70] ;status of window
1410
	test	eax,100b
1410
	test	eax,100b
1411
	jne	.end
1411
	jne	.end
1412
	
1412
	
1413
	mov	eax,[window_high]
1413
	mov	eax,[window_high]
1414
	sub	eax,25+45
1414
	sub	eax,25+45
1415
	mov	[file_browser_data_1.size_y],ax
1415
	mov	[file_browser_data_1.size_y],ax
1416
	mov	[scroll_bar_data_vertical.size_y],ax
1416
	mov	[scroll_bar_data_vertical.size_y],ax
1417
	
1417
	
1418
	mov	eax,[window_width]
1418
	mov	eax,[window_width]
1419
	sub	eax,10+20
1419
	sub	eax,10+20
1420
	mov	[file_browser_data_1.size_x],ax
1420
	mov	[file_browser_data_1.size_x],ax
1421
	add	ax,10
1421
	add	ax,10
1422
	mov	[scroll_bar_data_vertical.start_x],ax
1422
	mov	[scroll_bar_data_vertical.start_x],ax
1423
	
1423
	
1424
	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1424
	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1425
	or	edx,0x63000000
1425
	or	edx,0x63000000
1426
	mcall	13,[window_width],45	;,0xcccccc
1426
	mcall	13,[window_width],45	;,0xcccccc
1427
 
1427
 
1428
	push	ecx
1428
	push	ecx
1429
	rol	ecx,16
1429
	rol	ecx,16
1430
	add	cx,[file_browser_data_1.size_y]
1430
	add	cx,[file_browser_data_1.size_y]
1431
	add	cx,45
1431
	add	cx,45
1432
	ror	ecx,16
1432
	ror	ecx,16
1433
	mov	cx,25
1433
	mov	cx,25
1434
	mcall
1434
	mcall
1435
	pop	ecx
1435
	pop	ecx
1436
	add	ecx,45 shl 16
1436
	add	ecx,45 shl 16
1437
	mov	cx,[file_browser_data_1.size_y]
1437
	mov	cx,[file_browser_data_1.size_y]
1438
	mov	bx,10
1438
	mov	bx,10
1439
	mcall
1439
	mcall
1440
	mov	bx,[file_browser_data_1.size_x]
1440
	mov	bx,[file_browser_data_1.size_x]
1441
	add	bx,10
1441
	add	bx,10
1442
	shl	ebx,16
1442
	shl	ebx,16
1443
	mov	bx,20
1443
	mov	bx,20
1444
	mcall
1444
	mcall
1445
 
1445
 
1446
	cmp	[error_window],0
1446
	cmp	[error_window],0
1447
	je	@f
1447
	je	@f
1448
	call	draw_for_fs_errors
1448
	call	draw_for_fs_errors
1449
	jmp	.1
1449
	jmp	.1
1450
@@:
1450
@@:
1451
	mov	[do_not_draw_open_button_label],1
1451
	mov	[do_not_draw_open_button_label],1
1452
	call	draw_draw_file_browser1
1452
	call	draw_draw_file_browser1
1453
	mov	[do_not_draw_open_button_label],0
1453
	mov	[do_not_draw_open_button_label],0
1454
.1:
1454
.1:
1455
	push	dword menu_data_1
1455
	push	dword menu_data_1
1456
	call	[menu_bar_draw]
1456
	call	[menu_bar_draw]
1457
	push	dword menu_data_2
1457
	push	dword menu_data_2
1458
	call	[menu_bar_draw]
1458
	call	[menu_bar_draw]
1459
	push	dword menu_data_3
1459
	push	dword menu_data_3
1460
	call	[menu_bar_draw]
1460
	call	[menu_bar_draw]
1461
 
1461
 
1462
	mov	ebx,[file_browser_data_1.x]
1462
	mov	ebx,[file_browser_data_1.x]
1463
	mov	ax,bx
1463
	mov	ax,bx
1464
	shl	eax,16
1464
	shl	eax,16
1465
	add	ebx,eax
1465
	add	ebx,eax
1466
	mov	eax,50
1466
	mov	eax,50
1467
	mov	bx,ax
1467
	mov	bx,ax
1468
	shl	eax,16
1468
	shl	eax,16
1469
	sub	ebx,eax
1469
	sub	ebx,eax
1470
	mov	ecx,26 shl 16+15
1470
	mov	ecx,26 shl 16+15
1471
 
1471
 
1472
	mcall	8,,,2,[w_work_button]	;0xffffff
1472
	mcall	8,,,2,[w_work_button]	;0xffffff
1473
 
1473
 
1474
	pusha
1474
	pusha
1475
	shr	ecx,16
1475
	shr	ecx,16
1476
	mov	bx,cx
1476
	mov	bx,cx
1477
	add	ebx,20 shl 16+2
1477
	add	ebx,20 shl 16+2
1478
	mov	ecx,[w_work_button_text]
1478
	mov	ecx,[w_work_button_text]
1479
	or	ecx,0x90000000
1479
	or	ecx,0x90000000
1480
	mcall	4,,,message_ExitDir_button
1480
	mcall	4,,,message_ExitDir_button
1481
	add	ebx,4
1481
	add	ebx,4
1482
	mcall
1482
	mcall
1483
	add	ebx,4
1483
	add	ebx,4
1484
	mcall
1484
	mcall
1485
	popa
1485
	popa
1486
 
1486
 
1487
	push	ebx
1487
	push	ebx
1488
	sub	ebx,70 shl 16
1488
	sub	ebx,70 shl 16
1489
	mov	bx,60
1489
	mov	bx,60
1490
	mcall	8,,,6
1490
	mcall	8,,,6
1491
 
1491
 
1492
	shr	ecx,16
1492
	shr	ecx,16
1493
	mov	bx,cx
1493
	mov	bx,cx
1494
	add	ebx,5 shl 16+4
1494
	add	ebx,5 shl 16+4
1495
	mov	ecx,[w_work_button_text]
1495
	mov	ecx,[w_work_button_text]
1496
	or	ecx,0x90000000
1496
	or	ecx,0x90000000
1497
	mcall	4,,,message_ReloadDir_button
1497
	mcall	4,,,message_ReloadDir_button
1498
	pop	ebx
1498
	pop	ebx
1499
 
1499
 
1500
	mov	ebx,[file_browser_data_1.x]
1500
	mov	ebx,[file_browser_data_1.x]
1501
	
1501
	
1502
	mov	ax,bx
1502
	mov	ax,bx
1503
	shl	eax,16
1503
	shl	eax,16
1504
	add	ebx,eax
1504
	add	ebx,eax
1505
	mov	eax,55
1505
	mov	eax,55
1506
	mov	bx,ax
1506
	mov	bx,ax
1507
	shl	eax,16
1507
	shl	eax,16
1508
	sub	ebx,eax
1508
	sub	ebx,eax
1509
 
1509
 
1510
	mov	ecx,[file_browser_data_1.y]
1510
	mov	ecx,[file_browser_data_1.y]
1511
	mov	ax,cx
1511
	mov	ax,cx
1512
	add	eax,3
1512
	add	eax,3
1513
	shl	eax,16
1513
	shl	eax,16
1514
	add	ecx,eax
1514
	add	ecx,eax
1515
	mov	cx,15
1515
	mov	cx,15
1516
 
1516
 
1517
	mcall	8,,,3
1517
	mcall	8,,,3
1518
 
1518
 
1519
	pusha
1519
	pusha
1520
 
1520
 
1521
	shr	ecx,16
1521
	shr	ecx,16
1522
	mov	bx,cx
1522
	mov	bx,cx
1523
	add	ebx,6 shl 16+ 4
1523
	add	ebx,6 shl 16+ 4
1524
	mov	ecx,[w_work_button_text]
1524
	mov	ecx,[w_work_button_text]
1525
	or	ecx,0x90000000
1525
	or	ecx,0x90000000
1526
	mcall	4,,,message_cancel_button
1526
	mcall	4,,,message_cancel_button
1527
	popa
1527
	popa
1528
 
1528
 
1529
	sub	ebx,65 shl 16
1529
	sub	ebx,65 shl 16
1530
	mcall	8,,,4
1530
	mcall	8,,,4
1531
	
1531
	
1532
	shr	ecx,16
1532
	shr	ecx,16
1533
	mov	bx,cx
1533
	mov	bx,cx
1534
	add	ebx,6 shl 16+4
1534
	add	ebx,6 shl 16+4
1535
	
1535
	
1536
	mov	edx,[open_dialog_type]
1536
	mov	edx,[open_dialog_type]
1537
	shl	edx,2
1537
	shl	edx,2
1538
	add	edx,message_open_dialog_button
1538
	add	edx,message_open_dialog_button
1539
	mov	edx,[edx]
1539
	mov	edx,[edx]
1540
;--------------------------------------	
1540
;--------------------------------------	
1541
	cmp	[open_dialog_type],1
1541
	cmp	[open_dialog_type],1
1542
	jne	@f
1542
	jne	@f
1543
 
1543
 
1544
	cmp	[focus_pointer],1
1544
	cmp	[focus_pointer],1
1545
	je	@f
1545
	je	@f
-
 
1546
 
-
 
1547
	cmp	[error_window],0
-
 
1548
	jne	@f
1546
	
1549
	
1547
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1550
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1548
	test	[eax],byte 0x10
1551
	test	[eax],byte 0x10
1549
	jz	@f
1552
	jz	@f
1550
 
1553
 
1551
	mov	edx,message_0 	; Open Dir
1554
	mov	edx,message_0 	; Open Dir
1552
@@:
1555
@@:
1553
;--------------------------------------
1556
;--------------------------------------
1554
	mov	[open_button_coordinates],ebx
1557
	mov	[open_button_coordinates],ebx
1555
	mov	ecx,[w_work_button_text]
1558
	mov	ecx,[w_work_button_text]
1556
	or	ecx,0x90000000
1559
	or	ecx,0x90000000
1557
	mcall	4	;message_open_button
1560
	mcall	4	;message_open_button
1558
	
1561
	
1559
;	mcall	47,0x80000,[file_browser_data_1.ini_file_start],<250,0>,0x0
1562
;	mcall	47,0x80000,[file_browser_data_1.ini_file_start],<250,0>,0x0
1560
;	mcall	4,<3,420>,0,fb_extension_start,3
1563
;	mcall	4,<3,420>,0,fb_extension_start,3
1561
.end:
1564
.end:
1562
	mcall	12,2
1565
	mcall	12,2
1563
 
1566
 
1564
	ret
1567
	ret
1565
;---------------------------------------------------------------------
1568
;---------------------------------------------------------------------
1566
draw_open_button_label:
1569
draw_open_button_label:
1567
	cmp	[do_not_draw_open_button_label],1
1570
	cmp	[do_not_draw_open_button_label],1
1568
	je	.exit_1	
1571
	je	.exit_1	
1569
 
1572
 
1570
	cmp	[open_dialog_type],1
1573
	cmp	[open_dialog_type],1
1571
	jne	.exit_1
1574
	jne	.exit_1
1572
 
1575
 
1573
	cmp	[focus_pointer],1
1576
	cmp	[focus_pointer],1
1574
	je	draw_save_button_label
1577
	je	draw_save_button_label
1575
	
1578
	
1576
	pusha
1579
	pusha
1577
	mov	ebx,[open_button_coordinates]
1580
	mov	ebx,[open_button_coordinates]
1578
	test	ebx,ebx
1581
	test	ebx,ebx
1579
	jz	.exit
1582
	jz	.exit
1580
 
1583
 
1581
	mov	edx,[open_dialog_type]
1584
	mov	edx,[open_dialog_type]
1582
	shl	edx,2
1585
	shl	edx,2
1583
	add	edx,message_open_dialog_button
1586
	add	edx,message_open_dialog_button
1584
	mov	edx,[edx]
1587
	mov	edx,[edx]
1585
	
1588
	
1586
	mov	eax,[file_browser_data_1.folder_block]
1589
	mov	eax,[file_browser_data_1.folder_block]
1587
	test	eax,eax
1590
	test	eax,eax
1588
	jz	.1
1591
	jz	.1
1589
	
1592
	
1590
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1593
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1591
	test	[eax],byte 0x10
1594
	test	[eax],byte 0x10
1592
	jz	@f
1595
	jz	@f
1593
	
1596
	
1594
	mov	edx,message_0	; Open Dir
1597
	mov	edx,message_0	; Open Dir
1595
	jmp	.1
1598
	jmp	.1
1596
@@:
1599
@@:
1597
	call	copy_new_file_name
1600
	call	copy_new_file_name
1598
.1:
1601
.1:
1599
	mov	ecx,[w_work_button_text]
1602
	mov	ecx,[w_work_button_text]
1600
	or	ecx,0xd0000000
1603
	or	ecx,0xd0000000
1601
	mov	edi,[w_work_button]
1604
	mov	edi,[w_work_button]
1602
	mcall	4	;message_open_button
1605
	mcall	4	;message_open_button
1603
.exit:
1606
.exit:
1604
	popa
1607
	popa
1605
.exit_1:
1608
.exit_1:
1606
	ret
1609
	ret
1607
;---------------------------------------------------------------------
1610
;---------------------------------------------------------------------
1608
draw_save_button_label:
1611
draw_save_button_label:
1609
	pusha
1612
	pusha
1610
	mov	ebx,[open_button_coordinates]
1613
	mov	ebx,[open_button_coordinates]
1611
 
1614
 
1612
	mov	edx,message_1	; Save
1615
	mov	edx,message_1	; Save
1613
 
1616
 
1614
	mov	ecx,[w_work_button_text]
1617
	mov	ecx,[w_work_button_text]
1615
	or	ecx,0xd0000000
1618
	or	ecx,0xd0000000
1616
	mov	edi,[w_work_button]
1619
	mov	edi,[w_work_button]
1617
	mcall	4	;message_open_button
1620
	mcall	4	;message_open_button
1618
	popa
1621
	popa
1619
	ret
1622
	ret
1620
;---------------------------------------------------------------------
1623
;---------------------------------------------------------------------
1621
copy_new_file_name:
1624
copy_new_file_name:
1622
	mov	esi,[file_browser_data_1.selected_BDVK_adress]
1625
	mov	esi,[file_browser_data_1.selected_BDVK_adress]
1623
	add	esi,40
1626
	add	esi,40
1624
	mov	edi,user_selected_name
1627
	mov	edi,user_selected_name
1625
	cld
1628
	cld
1626
	lodsb
1629
	lodsb
1627
	test	al,al
1630
	test	al,al
1628
	jnz	.1
1631
	jnz	.1
1629
	ret
1632
	ret
1630
@@:
1633
@@:
1631
	lodsb
1634
	lodsb
1632
.1:
1635
.1:
1633
	stosb
1636
	stosb
1634
	test	al,al
1637
	test	al,al
1635
	jnz	@r
1638
	jnz	@r
1636
	
1639
	
1637
	sub	edi,user_selected_name
1640
	sub	edi,user_selected_name
1638
	dec	edi
1641
	dec	edi
1639
	
1642
	
1640
	mov	esi,edit1
1643
	mov	esi,edit1
1641
	mov	[esi+48],edi ;ed_size
1644
	mov	[esi+48],edi ;ed_size
1642
	mov	[esi+52],edi ;ed_pos
1645
	mov	[esi+52],edi ;ed_pos
1643
 
1646
 
1644
	push	dword name_editboxes
1647
	push	dword name_editboxes
1645
	call	[edit_box_draw]
1648
	call	[edit_box_draw]
1646
	ret
1649
	ret
1647
;---------------------------------------------------------------------
1650
;---------------------------------------------------------------------
1648
prepare_system_colors:
1651
prepare_system_colors:
1649
	mcall	48,3,app_colours,10*4
1652
	mcall	48,3,app_colours,10*4
1650
 
1653
 
1651
	mov	eax,[w_work]
1654
	mov	eax,[w_work]
1652
	mov	[menu_data_1.bckg_col],eax
1655
	mov	[menu_data_1.bckg_col],eax
1653
	mov	[menu_data_2.bckg_col],eax
1656
	mov	[menu_data_2.bckg_col],eax
1654
	mov	[menu_data_3.bckg_col],eax
1657
	mov	[menu_data_3.bckg_col],eax
1655
 
1658
 
1656
	mov	[menu_data_1.menu_col],eax
1659
	mov	[menu_data_1.menu_col],eax
1657
	mov	[menu_data_2.menu_col],eax
1660
	mov	[menu_data_2.menu_col],eax
1658
	mov	[menu_data_3.menu_col],eax
1661
	mov	[menu_data_3.menu_col],eax
1659
	
1662
	
1660
	mov	[scroll_bar_data_vertical.bckg_col],eax	
1663
	mov	[scroll_bar_data_vertical.bckg_col],eax	
1661
 
1664
 
1662
	mov	eax,[w_work_button]
1665
	mov	eax,[w_work_button]
1663
	mov	[menu_data_1.frnt_col],eax
1666
	mov	[menu_data_1.frnt_col],eax
1664
	mov	[menu_data_2.frnt_col],eax
1667
	mov	[menu_data_2.frnt_col],eax
1665
	mov	[menu_data_3.frnt_col],eax
1668
	mov	[menu_data_3.frnt_col],eax
1666
 
1669
 
1667
	mov	[scroll_bar_data_vertical.frnt_col],eax	
1670
	mov	[scroll_bar_data_vertical.frnt_col],eax	
1668
 
1671
 
1669
	mov	eax,[w_work_button]
1672
	mov	eax,[w_work_button]
1670
	mov	[menu_data_1.menu_sel_col],eax
1673
	mov	[menu_data_1.menu_sel_col],eax
1671
	mov	[menu_data_2.menu_sel_col],eax
1674
	mov	[menu_data_2.menu_sel_col],eax
1672
	mov	[menu_data_3.menu_sel_col],eax
1675
	mov	[menu_data_3.menu_sel_col],eax
1673
 
1676
 
1674
	mov	eax,[w_work_text]
1677
	mov	eax,[w_work_text]
1675
	mov	[menu_data_1.bckg_text_col],eax
1678
	mov	[menu_data_1.bckg_text_col],eax
1676
	mov	[menu_data_2.bckg_text_col],eax
1679
	mov	[menu_data_2.bckg_text_col],eax
1677
	mov	[menu_data_3.bckg_text_col],eax
1680
	mov	[menu_data_3.bckg_text_col],eax
1678
	
1681
	
1679
	mov	eax,[w_work_button_text]
1682
	mov	eax,[w_work_button_text]
1680
	mov	[menu_data_1.frnt_text_col],eax
1683
	mov	[menu_data_1.frnt_text_col],eax
1681
	mov	[menu_data_2.frnt_text_col],eax
1684
	mov	[menu_data_2.frnt_text_col],eax
1682
	mov	[menu_data_3.frnt_text_col],eax
1685
	mov	[menu_data_3.frnt_text_col],eax
1683
	
1686
	
1684
	mov	[scroll_bar_data_vertical.line_col],eax	
1687
	mov	[scroll_bar_data_vertical.line_col],eax	
1685
	ret
1688
	ret
1686
;---------------------------------------------------------------------
1689
;---------------------------------------------------------------------
1687
draw_for_fs_errors:
1690
draw_for_fs_errors:
1688
	call	draw_dir_path
1691
	call	draw_dir_path
1689
 
1692
 
1690
	mov	ebx,[file_browser_data_1.x]
1693
	mov	ebx,[file_browser_data_1.x]
1691
	mov	ecx,[file_browser_data_1.y]
1694
	mov	ecx,[file_browser_data_1.y]
1692
	mcall	13,,,[file_browser_data_1.background_color]
1695
	mcall	13,,,[file_browser_data_1.background_color]
1693
	push	ebx ecx
1696
	push	ebx ecx
1694
	add	ebx,10 shl 16
1697
	add	ebx,10 shl 16
1695
	sub	ebx,20
1698
	sub	ebx,20
1696
	add	ecx,10 shl 16
1699
	add	ecx,10 shl 16
1697
	sub	ecx,20
1700
	sub	ecx,20
1698
 
1701
 
1699
	shr	ecx,16
1702
	shr	ecx,16
1700
	mov	bx,cx
1703
	mov	bx,cx
1701
	add	ebx,5 shl 16+15
1704
	add	ebx,5 shl 16+15
1702
	mcall	4,,0x90000000,load_directory_error_type
1705
	mcall	4,,0x90000000,load_directory_error_type
1703
 
1706
 
1704
	add	ebx,20
1707
	add	ebx,20
1705
	mcall	4,,,dir_path	
1708
	mcall	4,,,dir_path	
1706
 
1709
 
1707
	mov	eax,[error_type]
1710
	mov	eax,[error_type]
1708
	shl	eax,2
1711
	shl	eax,2
1709
	add	eax,error_fs_text_pointers
1712
	add	eax,error_fs_text_pointers
1710
	mov	edx,[eax]
1713
	mov	edx,[eax]
1711
	add	ebx,20
1714
	add	ebx,20
1712
	mcall	4
1715
	mcall	4
1713
	
1716
	
1714
	add	ebx,20
1717
	add	ebx,20
1715
	mcall	,,,error_help_text
1718
	mcall	,,,error_help_text
1716
 
1719
 
1717
	pop	ecx ebx
1720
	pop	ecx ebx
1718
 
1721
 
1719
	mov	ebx,[file_browser_data_1.x]
1722
	mov	ebx,[file_browser_data_1.x]
1720
	mov	ax,bx
1723
	mov	ax,bx
1721
	shr	eax,1
1724
	shr	eax,1
1722
	shl	eax,16
1725
	shl	eax,16
1723
	add	ebx,eax
1726
	add	ebx,eax
1724
	mov	eax,50
1727
	mov	eax,50
1725
	mov	bx,ax
1728
	mov	bx,ax
1726
	shr	eax,1
1729
	shr	eax,1
1727
	shl	eax,16
1730
	shl	eax,16
1728
	sub	ebx,eax
1731
	sub	ebx,eax
1729
 
1732
 
1730
	mov	ecx,[file_browser_data_1.y]
1733
	mov	ecx,[file_browser_data_1.y]
1731
	mov	ax,cx
1734
	mov	ax,cx
1732
	sub	eax,40
1735
	sub	eax,40
1733
	shl	eax,16
1736
	shl	eax,16
1734
	add	ecx,eax
1737
	add	ecx,eax
1735
	mov	cx,15
1738
	mov	cx,15
1736
 
1739
 
1737
	mcall	8,,,5,[w_work_button]	;0xffffff
1740
	mcall	8,,,5,[w_work_button]	;0xffffff
1738
 
1741
 
1739
	shr	ecx,16
1742
	shr	ecx,16
1740
	mov	bx,cx
1743
	mov	bx,cx
1741
	add	ebx,4 shl 16+4
1744
	add	ebx,4 shl 16+4
1742
	mov	ecx,[w_work_button_text]
1745
	mov	ecx,[w_work_button_text]
1743
	add	ecx,0x90000000
1746
	add	ecx,0x90000000
1744
	mcall	4,,,message_cancel_button
1747
	mcall	4,,,message_cancel_button
1745
 
1748
 
1746
	ret
1749
	ret
1747
;---------------------------------------------------------------------	
1750
;---------------------------------------------------------------------	
1748
draw_file_name:
1751
draw_file_name:
1749
	mov	esi,user_selected_name
1752
	mov	esi,user_selected_name
1750
	cld
1753
	cld
1751
@@:
1754
@@:
1752
	lodsb
1755
	lodsb
1753
	test	al,al
1756
	test	al,al
1754
	jne	@r
1757
	jne	@r
1755
	sub	esi,user_selected_name
1758
	sub	esi,user_selected_name
1756
	mov	eax,esi
1759
	mov	eax,esi
1757
	dec	eax
1760
	dec	eax
1758
	
1761
	
1759
	mov	edi,edit1
1762
	mov	edi,edit1
1760
	mov	[edi+48],eax ;ed_size
1763
	mov	[edi+48],eax ;ed_size
1761
	mov	[edi+52],eax ;ed_pos
1764
	mov	[edi+52],eax ;ed_pos
1762
;--------------------------------------
1765
;--------------------------------------
1763
	mov	eax,[file_browser_data_1.x]
1766
	mov	eax,[file_browser_data_1.x]
1764
	mov	ebx,eax
1767
	mov	ebx,eax
1765
	shr	ebx,16
1768
	shr	ebx,16
1766
	and	eax,0xffff
1769
	and	eax,0xffff
1767
	sub	eax,200
1770
	sub	eax,200
1768
	mov	[edi],eax
1771
	mov	[edi],eax
1769
	add	ebx,70
1772
	add	ebx,70
1770
	mov	[edi+4],ebx
1773
	mov	[edi+4],ebx
1771
	
1774
	
1772
	mov	eax,[file_browser_data_1.y]
1775
	mov	eax,[file_browser_data_1.y]
1773
	mov	ebx,eax
1776
	mov	ebx,eax
1774
	shr	ebx,16
1777
	shr	ebx,16
1775
	and	eax,0xffff
1778
	and	eax,0xffff
1776
	add	eax,ebx
1779
	add	eax,ebx
1777
	add	eax,5
1780
	add	eax,5
1778
	mov	[edi+8],eax
1781
	mov	[edi+8],eax
1779
	
1782
	
1780
	push	dword name_editboxes
1783
	push	dword name_editboxes
1781
	call	[edit_box_draw]	
1784
	call	[edit_box_draw]	
1782
	
1785
	
1783
	mov	bx,[file_browser_data_1.start_x]
1786
	mov	bx,[file_browser_data_1.start_x]
1784
	add	bx,5
1787
	add	bx,5
1785
	shl	ebx,16
1788
	shl	ebx,16
1786
	mov	bx,[file_browser_data_1.start_y]
1789
	mov	bx,[file_browser_data_1.start_y]
1787
	add	bx,[file_browser_data_1.size_y]
1790
	add	bx,[file_browser_data_1.size_y]
1788
	add	bx,9
1791
	add	bx,9
1789
	mcall	4,,0x80000000,message_file_name
1792
	mcall	4,,0x80000000,message_file_name
1790
	ret
1793
	ret
1791
;---------------------------------------------------------------------
1794
;---------------------------------------------------------------------
1792
draw_dir_path:
1795
draw_dir_path:
1793
	mov	eax,[file_browser_data_1.x]
1796
	mov	eax,[file_browser_data_1.x]
1794
	mov	ebx,eax
1797
	mov	ebx,eax
1795
	shr	ebx,16
1798
	shr	ebx,16
1796
	add	ebx,3
1799
	add	ebx,3
1797
	and	eax,0xffff
1800
	and	eax,0xffff
1798
	sub	eax,5
1801
	sub	eax,5
1799
	
1802
	
1800
	mov	[PathShow_data_1.area_size_x],ax
1803
	mov	[PathShow_data_1.area_size_x],ax
1801
	mov	[PathShow_data_1.start_x],bx
1804
	mov	[PathShow_data_1.start_x],bx
1802
;--------------------------------------
1805
;--------------------------------------
1803
;; top line
1806
;; top line
1804
;	mov	ebx,[file_browser_data_1.x]
1807
;	mov	ebx,[file_browser_data_1.x]
1805
;	mcall	13,,<7,1>,0x0
1808
;	mcall	13,,<7,1>,0x0
1806
; down line
1809
; down line
1807
;	push	ebx ecx
1810
;	push	ebx ecx
1808
;	mcall	,,<21,1>,
1811
;	mcall	,,<21,1>,
1809
;	pop	ecx ebx
1812
;	pop	ecx ebx
1810
; left line	
1813
; left line	
1811
;	push	ebx
1814
;	push	ebx
1812
;	mov	bx,1
1815
;	mov	bx,1
1813
;	mov	cx,15
1816
;	mov	cx,15
1814
;	mcall
1817
;	mcall
1815
;	pop	ebx
1818
;	pop	ebx
1816
; right line
1819
; right line
1817
;	mov	ax,bx
1820
;	mov	ax,bx
1818
;	shr	ebx,16
1821
;	shr	ebx,16
1819
;	add	bx,ax
1822
;	add	bx,ax
1820
;	dec	ebx
1823
;	dec	ebx
1821
;	shl	ebx,16
1824
;	shl	ebx,16
1822
;	mov	bx,1
1825
;	mov	bx,1
1823
;	mcall	13
1826
;	mcall	13
1824
;--------------------------------------	
1827
;--------------------------------------	
1825
	mov	ebx,[file_browser_data_1.x]
1828
	mov	ebx,[file_browser_data_1.x]
1826
	sub	ebx,2
1829
	sub	ebx,2
1827
	add	ebx,1 shl 16
1830
	add	ebx,1 shl 16
1828
	mcall	13,,<8,13>,0xffffcc
1831
	mcall	13,,<8,13>,0xffffcc
1829
;--------------------------------------
1832
;--------------------------------------
1830
; prepare for PathShow
1833
; prepare for PathShow
1831
	push	dword PathShow_data_1
1834
	push	dword PathShow_data_1
1832
	call	[PathShow_prepare]
1835
	call	[PathShow_prepare]
1833
	
1836
	
1834
; draw for PathShow
1837
; draw for PathShow
1835
	push	dword PathShow_data_1
1838
	push	dword PathShow_data_1
1836
	call	[PathShow_draw]
1839
	call	[PathShow_draw]
1837
	
1840
	
1838
	ret
1841
	ret
1839
;---------------------------------------------------------------------
1842
;---------------------------------------------------------------------
1840
draw_draw_file_browser1:
1843
draw_draw_file_browser1:
1841
	call	draw_dir_path
1844
	call	draw_dir_path
1842
	cmp	[open_dialog_type],1
1845
	cmp	[open_dialog_type],1
1843
	jne	@f	
1846
	jne	@f	
1844
	call	draw_file_name
1847
	call	draw_file_name
1845
@@:
1848
@@:
1846
	xor	eax,eax
1849
	xor	eax,eax
1847
	inc	eax
1850
	inc	eax
1848
	mov	[file_browser_data_1.all_redraw],eax
1851
	mov	[file_browser_data_1.all_redraw],eax
1849
	mov	[scroll_bar_data_vertical.all_redraw],eax
1852
	mov	[scroll_bar_data_vertical.all_redraw],eax
1850
	
1853
	
1851
	push	dword file_browser_data_1
1854
	push	dword file_browser_data_1
1852
	call	[FileBrowser_draw]
1855
	call	[FileBrowser_draw]
1853
 
1856
 
1854
	call	draw_open_button_label
1857
	call	draw_open_button_label
1855
	
1858
	
1856
	call	prepare_scrollbar_data
1859
	call	prepare_scrollbar_data
1857
 
1860
 
1858
	call	draw_scrollbar
1861
	call	draw_scrollbar
1859
 
1862
 
1860
	xor	eax,eax
1863
	xor	eax,eax
1861
	mov	[file_browser_data_1.all_redraw],eax
1864
	mov	[file_browser_data_1.all_redraw],eax
1862
	mov	[scroll_bar_data_vertical.all_redraw],eax
1865
	mov	[scroll_bar_data_vertical.all_redraw],eax
1863
	ret
1866
	ret
1864
;---------------------------------------------------------------------
1867
;---------------------------------------------------------------------
1865
draw_draw_file_browser2:
1868
draw_draw_file_browser2:
1866
	mov	eax,2
1869
	mov	eax,2
1867
	mov	[file_browser_data_1.all_redraw],eax
1870
	mov	[file_browser_data_1.all_redraw],eax
1868
 
1871
 
1869
	call	get_scrollbar_data
1872
	call	get_scrollbar_data
1870
 
1873
 
1871
	push	dword file_browser_data_1
1874
	push	dword file_browser_data_1
1872
	call	[FileBrowser_draw]
1875
	call	[FileBrowser_draw]
1873
 
1876
 
1874
	call	draw_open_button_label
1877
	call	draw_open_button_label
1875
 
1878
 
1876
	xor	eax,eax
1879
	xor	eax,eax
1877
	mov	[file_browser_data_1.all_redraw],eax
1880
	mov	[file_browser_data_1.all_redraw],eax
1878
	ret
1881
	ret
1879
;---------------------------------------------------------------------
1882
;---------------------------------------------------------------------
1880
draw_scrollbar1:
1883
draw_scrollbar1:
1881
	mov	eax,[file_browser_data_1.start_draw_line]
1884
	mov	eax,[file_browser_data_1.start_draw_line]
1882
	mov	[scroll_bar_data_vertical.position],eax
1885
	mov	[scroll_bar_data_vertical.position],eax
1883
 
1886
 
1884
	call	draw_scrollbar
1887
	call	draw_scrollbar
1885
 
1888
 
1886
	ret
1889
	ret
1887
;---------------------------------------------------------------------
1890
;---------------------------------------------------------------------
1888
draw_scrollbar:
1891
draw_scrollbar:
1889
	mov	eax,[scroll_bar_data_vertical.max_area]
1892
	mov	eax,[scroll_bar_data_vertical.max_area]
1890
	cmp	eax,[scroll_bar_data_vertical.cur_area]
1893
	cmp	eax,[scroll_bar_data_vertical.cur_area]
1891
	jbe	@f
1894
	jbe	@f
1892
	cmp	[scroll_bar_data_vertical.cur_area],0
1895
	cmp	[scroll_bar_data_vertical.cur_area],0
1893
	je	@f
1896
	je	@f
1894
	push	dword scroll_bar_data_vertical
1897
	push	dword scroll_bar_data_vertical
1895
	call	[scrollbar_ver_draw]
1898
	call	[scrollbar_ver_draw]
1896
@@:
1899
@@:
1897
	ret
1900
	ret
1898
;---------------------------------------------------------------------
1901
;---------------------------------------------------------------------
1899
get_scrollbar_data:
1902
get_scrollbar_data:
1900
	mov	eax,[scroll_bar_data_vertical.position]
1903
	mov	eax,[scroll_bar_data_vertical.position]
1901
	mov	[file_browser_data_1.start_draw_line],eax
1904
	mov	[file_browser_data_1.start_draw_line],eax
1902
	ret
1905
	ret
1903
;---------------------------------------------------------------------
1906
;---------------------------------------------------------------------
1904
prepare_scrollbar_data:
1907
prepare_scrollbar_data:
1905
	mov	eax,[file_browser_data_1.folder_block]
1908
	mov	eax,[file_browser_data_1.folder_block]
1906
	mov	[scroll_bar_data_vertical.max_area],eax
1909
	mov	[scroll_bar_data_vertical.max_area],eax
1907
	mov	eax,[file_browser_data_1.max_panel_line]
1910
	mov	eax,[file_browser_data_1.max_panel_line]
1908
	mov	[scroll_bar_data_vertical.cur_area],eax
1911
	mov	[scroll_bar_data_vertical.cur_area],eax
1909
	ret
1912
	ret
1910
;---------------------------------------------------------------------
1913
;---------------------------------------------------------------------
1911
get_active_pocess:
1914
get_active_pocess:
1912
	mcall	9,procinfo,-1
1915
	mcall	9,procinfo,-1
1913
	mov	ecx,[ebx+30]	; PID
1916
	mov	ecx,[ebx+30]	; PID
1914
	mcall	18,21
1917
	mcall	18,21
1915
	mov	[active_process],eax	; WINDOW SLOT
1918
	mov	[active_process],eax	; WINDOW SLOT
1916
	mov	ebx,[communication_area]	
1919
	mov	ebx,[communication_area]	
1917
	test	ebx,ebx
1920
	test	ebx,ebx
1918
	jz	.1
1921
	jz	.1
1919
	mov	[ebx+12],eax	; WINDOW SLOT to com. area
1922
	mov	[ebx+12],eax	; WINDOW SLOT to com. area
1920
.1:
1923
.1:
1921
	ret
1924
	ret
1922
;---------------------------------------------------------------------
1925
;---------------------------------------------------------------------
1923
get_window_param:
1926
get_window_param:
1924
	mcall	9,procinfo,-1
1927
	mcall	9,procinfo,-1
1925
	mov	eax,[ebx+66]
1928
	mov	eax,[ebx+66]
1926
	inc	eax
1929
	inc	eax
1927
	mov	[window_high],eax
1930
	mov	[window_high],eax
1928
	mov	eax,[ebx+62]
1931
	mov	eax,[ebx+62]
1929
	inc	eax
1932
	inc	eax
1930
	mov	[window_width],eax
1933
	mov	[window_width],eax
1931
	mov	eax,[ebx+70]
1934
	mov	eax,[ebx+70]
1932
	mov	[window_status],eax
1935
	mov	[window_status],eax
1933
	ret
1936
	ret
1934
;---------------------------------------------------------------------
1937
;---------------------------------------------------------------------
1935
convert_icons:
1938
convert_icons:
1936
	xor	eax,eax
1939
	xor	eax,eax
1937
	mov	[return_code],eax
1940
	mov	[return_code],eax
1938
;	mov	eax,image_file
1941
;	mov	eax,image_file
1939
	push	image_file
1942
	push	image_file
1940
	call	[cnv_png_import.Start]
1943
	call	[cnv_png_import.Start]
1941
 
1944
 
1942
	mov	ecx,[image_file]
1945
	mov	ecx,[image_file]
1943
	mcall	68,13,
1946
	mcall	68,13,
1944
	test	eax,eax
1947
	test	eax,eax
1945
	jz	memory_free_error
1948
	jz	memory_free_error
1946
 
1949
 
1947
	cmp	[return_code],dword 0
1950
	cmp	[return_code],dword 0
1948
	je	@f
1951
	je	@f
1949
	mov	[N_error],6
1952
	mov	[N_error],6
1950
	jmp	button.exit
1953
	jmp	button.exit
1951
@@:
1954
@@:
1952
 
1955
 
1953
	mov	ebx,[raw_pointer]
1956
	mov	ebx,[raw_pointer]
1954
	mov	eax,[ebx+4]
1957
	mov	eax,[ebx+4]
1955
; set of icon size x
1958
; set of icon size x
1956
	mov	[file_browser_data_1.icon_size_x],ax
1959
	mov	[file_browser_data_1.icon_size_x],ax
1957
; mov eax,[ebx+8]
1960
; mov eax,[ebx+8]
1958
; set of icon size y
1961
; set of icon size y
1959
	mov	[file_browser_data_1.icon_size_y],ax
1962
	mov	[file_browser_data_1.icon_size_y],ax
1960
	inc	ax
1963
	inc	ax
1961
	mov	[file_browser_data_1.line_size_y],ax
1964
	mov	[file_browser_data_1.line_size_y],ax
1962
	mov	eax,[ebx+12]
1965
	mov	eax,[ebx+12]
1963
; set of RAW resolution to pixel
1966
; set of RAW resolution to pixel
1964
	mov	[file_browser_data_1.resolution_raw],eax
1967
	mov	[file_browser_data_1.resolution_raw],eax
1965
 
1968
 
1966
	mov	eax,[ebx+20]
1969
	mov	eax,[ebx+20]
1967
	add	eax,ebx
1970
	add	eax,ebx
1968
; set RAW palette,use else resolution 8bit or less
1971
; set RAW palette,use else resolution 8bit or less
1969
	mov	[file_browser_data_1.palette_raw],eax
1972
	mov	[file_browser_data_1.palette_raw],eax
1970
 
1973
 
1971
	mov	eax,[ebx+28]
1974
	mov	eax,[ebx+28]
1972
	add	eax,ebx
1975
	add	eax,ebx
1973
; set RAW area for icon
1976
; set RAW area for icon
1974
	mov	[file_browser_data_1.icon_raw_area],eax
1977
	mov	[file_browser_data_1.icon_raw_area],eax
1975
	ret
1978
	ret
1976
;---------------------------------------------------------------------
1979
;---------------------------------------------------------------------
1977
calc_ini:
1980
calc_ini:
1978
	mov	eax,[image_file]
1981
	mov	eax,[image_file]
1979
	mov	[file_browser_data_1.ini_file_start],eax
1982
	mov	[file_browser_data_1.ini_file_start],eax
1980
	add	eax,[img_size]
1983
	add	eax,[img_size]
1981
	mov	[file_browser_data_1.ini_file_end],eax
1984
	mov	[file_browser_data_1.ini_file_end],eax
1982
	ret
1985
	ret
1983
;---------------------------------------------------------------------
1986
;---------------------------------------------------------------------
1984
load_ini:
1987
load_ini:
1985
	mov	ebx,ini_file_name
1988
	mov	ebx,ini_file_name
1986
	mov	esi,path
1989
	mov	esi,path
1987
	mov	edi,file_name
1990
	mov	edi,file_name
1988
	call	copy_file_path
1991
	call	copy_file_path
1989
 
1992
 
1990
	mov	[fileinfo.subfunction],dword 5
1993
	mov	[fileinfo.subfunction],dword 5
1991
	mov	[fileinfo.size],dword 0
1994
	mov	[fileinfo.size],dword 0
1992
	mov	[fileinfo.return],dword file_info
1995
	mov	[fileinfo.return],dword file_info
1993
	mcall	70,fileinfo
1996
	mcall	70,fileinfo
1994
	test	eax,eax
1997
	test	eax,eax
1995
	jnz	.error
1998
	jnz	.error
1996
 
1999
 
1997
	mov	[fileinfo.subfunction],dword 0
2000
	mov	[fileinfo.subfunction],dword 0
1998
 
2001
 
1999
	mov	ecx,[file_info+32]
2002
	mov	ecx,[file_info+32]
2000
	mov	[fileinfo.size],ecx
2003
	mov	[fileinfo.size],ecx
2001
	mov	[img_size],ecx
2004
	mov	[img_size],ecx
2002
	
2005
	
2003
	mcall	68,12
2006
	mcall	68,12
2004
	test	eax,eax
2007
	test	eax,eax
2005
	jz	memory_get_error
2008
	jz	memory_get_error
2006
 
2009
 
2007
	mov	[fileinfo.return],eax
2010
	mov	[fileinfo.return],eax
2008
	mov	[image_file],eax
2011
	mov	[image_file],eax
2009
 
2012
 
2010
	mcall	70,fileinfo
2013
	mcall	70,fileinfo
2011
	test	eax,eax
2014
	test	eax,eax
2012
	jnz	.error
2015
	jnz	.error
2013
	ret
2016
	ret
2014
.error:
2017
.error:
2015
	mov	[N_error],1
2018
	mov	[N_error],1
2016
	mov	[error_type],eax
2019
	mov	[error_type],eax
2017
	jmp	button.exit
2020
	jmp	button.exit
2018
;---------------------------------------------------------------------
2021
;---------------------------------------------------------------------
2019
load_icons:
2022
load_icons:
2020
	mov	ebx,icons_file_name_2
2023
	mov	ebx,icons_file_name_2
2021
	mov	esi,path
2024
	mov	esi,path
2022
	mov	edi,file_name
2025
	mov	edi,file_name
2023
	call	copy_file_path
2026
	call	copy_file_path
2024
 
2027
 
2025
	mov	[fileinfo.subfunction],dword 5
2028
	mov	[fileinfo.subfunction],dword 5
2026
	mov	[fileinfo.size],dword 0
2029
	mov	[fileinfo.size],dword 0
2027
	mov	[fileinfo.return],dword file_info
2030
	mov	[fileinfo.return],dword file_info
2028
	mcall	70,fileinfo
2031
	mcall	70,fileinfo
2029
	test	eax,eax
2032
	test	eax,eax
2030
	jz	@f
2033
	jz	@f
2031
	
2034
	
2032
	mov	ebx,icons_file_name
2035
	mov	ebx,icons_file_name
2033
	mov	esi,path
2036
	mov	esi,path
2034
	mov	edi,file_name
2037
	mov	edi,file_name
2035
	call	copy_file_path
2038
	call	copy_file_path
2036
 
2039
 
2037
	mov	[fileinfo.subfunction],dword 5
2040
	mov	[fileinfo.subfunction],dword 5
2038
	mov	[fileinfo.size],dword 0
2041
	mov	[fileinfo.size],dword 0
2039
	mov	[fileinfo.return],dword file_info
2042
	mov	[fileinfo.return],dword file_info
2040
	mcall	70,fileinfo
2043
	mcall	70,fileinfo
2041
	test	eax,eax
2044
	test	eax,eax
2042
	jnz	.error
2045
	jnz	.error
2043
@@:
2046
@@:
2044
	mov	[fileinfo.subfunction],dword 0
2047
	mov	[fileinfo.subfunction],dword 0
2045
 
2048
 
2046
	mov	ecx,[file_info+32]
2049
	mov	ecx,[file_info+32]
2047
	mov	[fileinfo.size],ecx
2050
	mov	[fileinfo.size],ecx
2048
	mov	[img_size],ecx
2051
	mov	[img_size],ecx
2049
	
2052
	
2050
	mcall	68,12
2053
	mcall	68,12
2051
	test	eax,eax
2054
	test	eax,eax
2052
	jz	memory_get_error
2055
	jz	memory_get_error
2053
 
2056
 
2054
	mov	[fileinfo.return],eax
2057
	mov	[fileinfo.return],eax
2055
	mov	[image_file],eax
2058
	mov	[image_file],eax
2056
 
2059
 
2057
	mcall	70,fileinfo
2060
	mcall	70,fileinfo
2058
	test	eax,eax
2061
	test	eax,eax
2059
	jnz	.error
2062
	jnz	.error
2060
	ret
2063
	ret
2061
.error:
2064
.error:
2062
	mov	[N_error],2
2065
	mov	[N_error],2
2063
	mov	[error_type],eax
2066
	mov	[error_type],eax
2064
	jmp	button.exit
2067
	jmp	button.exit
2065
;---------------------------------------------------------------------
2068
;---------------------------------------------------------------------
2066
sort_directory:
2069
sort_directory:
2067
	mov	eax,[file_browser_data_1.folder_data]
2070
	mov	eax,[file_browser_data_1.folder_data]
2068
	mov	ebx,[eax+4]	; number of files
2071
	mov	ebx,[eax+4]	; number of files
2069
	add	eax,32
2072
	add	eax,32
2070
	cmp	[eax+40],word '..'
2073
	cmp	[eax+40],word '..'
2071
	jne	@f
2074
	jne	@f
2072
	cmp	[eax+40+2],byte 0
2075
	cmp	[eax+40+2],byte 0
2073
	jne	@f
2076
	jne	@f
2074
	dec	ebx
2077
	dec	ebx
2075
	add	eax,304
2078
	add	eax,304
2076
@@:
2079
@@:
2077
	push	dword [sort_type]	; sort mode
2080
	push	dword [sort_type]	; sort mode
2078
	push	ebx	; number of files
2081
	push	ebx	; number of files
2079
	push	eax	; data files
2082
	push	eax	; data files
2080
	call	[sort_dir]
2083
	call	[sort_dir]
2081
	ret
2084
	ret
2082
;--------------------------------------------------------------------
2085
;--------------------------------------------------------------------
2083
load_directory:
2086
load_directory:
2084
	xor	eax,eax
2087
	xor	eax,eax
2085
	mov	[N_error],eax
2088
	mov	[N_error],eax
2086
	cmp	[file_browser_data_1.folder_data],eax
2089
	cmp	[file_browser_data_1.folder_data],eax
2087
	je	@f
2090
	je	@f
2088
	mcall	68,13,[file_browser_data_1.folder_data]
2091
	mcall	68,13,[file_browser_data_1.folder_data]
2089
	test	eax,eax
2092
	test	eax,eax
2090
	jz	memory_free_error
2093
	jz	memory_free_error
2091
 
2094
 
2092
@@:
2095
@@:
2093
	mov	[dirinfo.size],dword 0
2096
	mov	[dirinfo.size],dword 0
2094
	mov	[dirinfo.return],dir_header
2097
	mov	[dirinfo.return],dir_header
2095
	mcall	70,dirinfo
2098
	mcall	70,dirinfo
2096
	test	eax,eax
2099
	test	eax,eax
2097
	jz	@f
2100
	jz	@f
2098
;	mov	esi,previous_dir_path
2101
;	mov	esi,previous_dir_path
2099
;	mov	edi,dir_path
2102
;	mov	edi,dir_path
2100
;	call	copy_dir_name.1
2103
;	call	copy_dir_name.1
2101
;	mcall	70,dirinfo
2104
;	mcall	70,dirinfo
2102
;	test	eax,eax
2105
;	test	eax,eax
2103
;	jz	@f	
2106
;	jz	@f	
2104
	xor	ebx,ebx
2107
	xor	ebx,ebx
2105
	mov	[file_browser_data_1.folder_data],ebx
2108
	mov	[file_browser_data_1.folder_data],ebx
2106
	jmp	.error
2109
	jmp	.error
2107
@@:
2110
@@:
2108
	
2111
	
2109
	mov	ecx,[dir_header.totl_blocks]
2112
	mov	ecx,[dir_header.totl_blocks]
2110
	mov	[dirinfo.size],ecx
2113
	mov	[dirinfo.size],ecx
2111
	imul	ecx,304
2114
	imul	ecx,304
2112
	add	ecx,32
2115
	add	ecx,32
2113
	mcall	68,12
2116
	mcall	68,12
2114
	test	eax,eax
2117
	test	eax,eax
2115
	jz	memory_get_error
2118
	jz	memory_get_error
2116
 
2119
 
2117
	mov	[dirinfo.return],eax
2120
	mov	[dirinfo.return],eax
2118
	mov	[file_browser_data_1.folder_data],eax
2121
	mov	[file_browser_data_1.folder_data],eax
2119
 
2122
 
2120
	mcall	70,dirinfo
2123
	mcall	70,dirinfo
2121
	test	eax,eax
2124
	test	eax,eax
2122
	jnz	.error
2125
	jnz	.error
2123
	
2126
	
2124
; test for empty directory
2127
; test for empty directory
2125
	mov	eax,[dirinfo.return]
2128
	mov	eax,[dirinfo.return]
2126
	mov	eax,[eax+4]
2129
	mov	eax,[eax+4]
2127
	test	eax,eax
2130
	test	eax,eax
2128
	jz	@f
2131
	jz	@f
2129
	
2132
	
2130
	call	delete_point_dir
2133
	call	delete_point_dir
2131
;	call	files_name_normalize
2134
;	call	files_name_normalize
2132
	call	check_filter
2135
	call	check_filter
2133
	call	prepare_extension_and_mark
2136
	call	prepare_extension_and_mark
2134
	call	clear_data_fb_and_sb
2137
	call	clear_data_fb_and_sb
2135
@@:
2138
@@:
2136
	ret
2139
	ret
2137
 
2140
 
2138
.error:
2141
.error:
2139
	mov	[N_error],5
2142
	mov	[N_error],5
2140
	mov	[error_type],eax
2143
	mov	[error_type],eax
2141
	ret
2144
	ret
2142
;---------------------------------------------------------------------
2145
;---------------------------------------------------------------------
2143
clear_data_fb_and_sb:
2146
clear_data_fb_and_sb:
2144
	xor	eax,eax
2147
	xor	eax,eax
2145
	mov	[file_browser_data_1.start_draw_cursor_line],ax
2148
	mov	[file_browser_data_1.start_draw_cursor_line],ax
2146
	mov	[file_browser_data_1.start_draw_line],eax
2149
	mov	[file_browser_data_1.start_draw_line],eax
2147
	mov	[scroll_bar_data_vertical.position],eax	
2150
	mov	[scroll_bar_data_vertical.position],eax	
2148
	ret
2151
	ret
2149
;---------------------------------------------------------------------
2152
;---------------------------------------------------------------------
2150
check_filter:
2153
check_filter:
2151
	cmp [open_dialog_type],2	; Select dir
2154
	cmp [open_dialog_type],2	; Select dir
2152
	je	.1
2155
	je	.1
2153
	xor	eax,eax
2156
	xor	eax,eax
2154
	mov	al,[filter_flag]
2157
	mov	al,[filter_flag]
2155
	test	eax,eax
2158
	test	eax,eax
2156
	jz	@f
2159
	jz	@f
2157
 
2160
 
2158
	mov	eax,[communication_area]
2161
	mov	eax,[communication_area]
2159
	test	eax,eax
2162
	test	eax,eax
2160
	jz	@f
2163
	jz	@f
2161
	mov	eax,[eax+4096]
2164
	mov	eax,[eax+4096]
2162
	test	eax,eax
2165
	test	eax,eax
2163
	jz	@f
2166
	jz	@f
2164
.1:
2167
.1:
2165
	call	delete_unsupported_BDFE
2168
	call	delete_unsupported_BDFE
2166
@@:
2169
@@:
2167
	ret
2170
	ret
2168
;---------------------------------------------------------------------
2171
;---------------------------------------------------------------------
2169
delete_unsupported_BDFE:
2172
delete_unsupported_BDFE:
2170
	mov	ebx,[file_browser_data_1.folder_data]
2173
	mov	ebx,[file_browser_data_1.folder_data]
2171
	add	ebx,4
2174
	add	ebx,4
2172
	xor	ecx,ecx
2175
	xor	ecx,ecx
2173
	dec	ecx
2176
	dec	ecx
2174
	
2177
	
2175
	mov	eax,[file_browser_data_1.folder_data]
2178
	mov	eax,[file_browser_data_1.folder_data]
2176
	add	eax,32+40
2179
	add	eax,32+40
2177
	sub	eax,304
2180
	sub	eax,304
2178
.start:
2181
.start:
2179
	inc	ecx
2182
	inc	ecx
2180
	add	eax,304
2183
	add	eax,304
2181
.1:
2184
.1:
2182
	cmp	[ebx],ecx
2185
	cmp	[ebx],ecx
2183
	je	.end
2186
	je	.end
2184
	cmp	[eax],byte '.'
2187
	cmp	[eax],byte '.'
2185
	jne	@f
2188
	jne	@f
2186
	cmp	[eax+1],byte 0
2189
	cmp	[eax+1],byte 0
2187
	je	.delete
2190
	je	.delete
2188
@@:
2191
@@:
2189
	test	[eax-40],byte 0x10
2192
	test	[eax-40],byte 0x10
2190
	jnz	.start
2193
	jnz	.start
2191
	
2194
	
2192
	cmp	[open_dialog_type],2	; Select dir
2195
	cmp	[open_dialog_type],2	; Select dir
2193
	je	.delete
2196
	je	.delete
2194
	
2197
	
2195
	push	eax ebx
2198
	push	eax ebx
2196
	mov	esi,eax
2199
	mov	esi,eax
2197
	call	search_expansion
2200
	call	search_expansion
2198
	test	eax,eax
2201
	test	eax,eax
2199
	pop	ebx eax
2202
	pop	ebx eax
2200
	jnz	.delete
2203
	jnz	.delete
2201
	
2204
	
2202
	push	eax ebx ecx esi
2205
	push	eax ebx ecx esi
2203
	mov	edi,[communication_area]
2206
	mov	edi,[communication_area]
2204
	add	edi,4100
2207
	add	edi,4100
2205
	call	compare_expansion
2208
	call	compare_expansion
2206
	test	eax,eax
2209
	test	eax,eax
2207
	pop	esi ecx ebx eax
2210
	pop	esi ecx ebx eax
2208
	jz	.start
2211
	jz	.start
2209
	
2212
	
2210
;-------------------------------------------
2213
;-------------------------------------------
2211
.delete:
2214
.delete:
2212
	dec	dword [ebx]
2215
	dec	dword [ebx]
2213
	mov	esi,[ebx]
2216
	mov	esi,[ebx]
2214
	sub	esi,ecx
2217
	sub	esi,ecx
2215
 
2218
 
2216
	push	ecx
2219
	push	ecx
2217
	mov	ecx,esi
2220
	mov	ecx,esi
2218
	imul	ecx,304/4
2221
	imul	ecx,304/4
2219
	mov	edi,eax
2222
	mov	edi,eax
2220
	sub	edi,40
2223
	sub	edi,40
2221
	mov	esi,edi
2224
	mov	esi,edi
2222
	add	esi,304
2225
	add	esi,304
2223
	cld
2226
	cld
2224
	rep	movsd
2227
	rep	movsd
2225
	pop	ecx
2228
	pop	ecx
2226
	
2229
	
2227
	jmp	.1
2230
	jmp	.1
2228
.end:
2231
.end:
2229
	ret
2232
	ret
2230
;---------------------------------------------------------------------
2233
;---------------------------------------------------------------------
2231
search_expansion:
2234
search_expansion:
2232
	mov	edi,esi
2235
	mov	edi,esi
2233
	xor	eax,eax
2236
	xor	eax,eax
2234
@@:
2237
@@:
2235
	cld
2238
	cld
2236
	lodsb
2239
	lodsb
2237
	test	eax,eax
2240
	test	eax,eax
2238
	jnz	@b
2241
	jnz	@b
2239
	mov	ebx,esi
2242
	mov	ebx,esi
2240
	dec	esi
2243
	dec	esi
2241
@@:
2244
@@:
2242
	std
2245
	std
2243
	lodsb
2246
	lodsb
2244
	cmp	esi,edi
2247
	cmp	esi,edi
2245
	jb	.end_err
2248
	jb	.end_err
2246
	cmp	al,'.'
2249
	cmp	al,'.'
2247
	jne	@b
2250
	jne	@b
2248
	
2251
	
2249
	add	esi,2
2252
	add	esi,2
2250
	sub	ebx,esi
2253
	sub	ebx,esi
2251
	mov	[expansion_length],ebx
2254
	mov	[expansion_length],ebx
2252
	cld
2255
	cld
2253
	xor	eax,eax
2256
	xor	eax,eax
2254
	ret
2257
	ret
2255
	
2258
	
2256
.end_err:
2259
.end_err:
2257
	cld
2260
	cld
2258
	xor	eax,eax
2261
	xor	eax,eax
2259
	inc	eax
2262
	inc	eax
2260
	ret
2263
	ret
2261
;---------------------------------------------------------------------
2264
;---------------------------------------------------------------------
2262
compare_expansion:
2265
compare_expansion:
2263
	mov	ebx,[edi]
2266
	mov	ebx,[edi]
2264
	add	ebx,edi
2267
	add	ebx,edi
2265
	add	edi,3
2268
	add	edi,3
2266
.start:
2269
.start:
2267
	cmp	ebx,edi
2270
	cmp	ebx,edi
2268
	jb	.end_err
2271
	jb	.end_err
2269
	mov	ecx,[expansion_length]
2272
	mov	ecx,[expansion_length]
2270
	inc	edi
2273
	inc	edi
2271
	
2274
	
2272
	push	esi edi
2275
	push	esi edi
2273
@@:
2276
@@:
2274
	cld
2277
	cld
2275
	lodsb
2278
	lodsb
2276
	xchg	esi,edi
2279
	xchg	esi,edi
2277
	shl	eax,8
2280
	shl	eax,8
2278
	lodsb
2281
	lodsb
2279
	xchg	esi,edi
2282
	xchg	esi,edi
2280
	call	char_todown
2283
	call	char_todown
2281
	xchg	al,ah
2284
	xchg	al,ah
2282
	call	char_todown
2285
	call	char_todown
2283
	cmp	al,ah
2286
	cmp	al,ah
2284
	jne	@f
2287
	jne	@f
2285
	dec	ecx
2288
	dec	ecx
2286
	jnz	@b
2289
	jnz	@b
2287
	jmp	.end
2290
	jmp	.end
2288
@@:
2291
@@:
2289
	pop	edi esi
2292
	pop	edi esi
2290
	jmp	.start
2293
	jmp	.start
2291
.end:
2294
.end:
2292
	pop	edi esi
2295
	pop	edi esi
2293
	xor	eax,eax
2296
	xor	eax,eax
2294
	ret
2297
	ret
2295
	
2298
	
2296
.end_err:
2299
.end_err:
2297
	xor	eax,eax
2300
	xor	eax,eax
2298
	inc	eax
2301
	inc	eax
2299
	ret
2302
	ret
2300
;---------------------------------------------------------------------
2303
;---------------------------------------------------------------------
2301
prepare_extension_and_mark:
2304
prepare_extension_and_mark:
2302
	mov	esi,[dirinfo.return]
2305
	mov	esi,[dirinfo.return]
2303
	mov	ebp,[esi+4]
2306
	mov	ebp,[esi+4]
2304
	test	ebp,ebp
2307
	test	ebp,ebp
2305
	jz	.end
2308
	jz	.end
2306
 
2309
 
2307
	add	esi,32+40
2310
	add	esi,32+40
2308
.start:
2311
.start:
2309
	push	esi
2312
	push	esi
2310
	call	search_extension_start
2313
	call	search_extension_start
2311
	mov	eax,esi
2314
	mov	eax,esi
2312
	pop	esi
2315
	pop	esi
2313
	sub	eax,esi
2316
	sub	eax,esi
2314
	sub	ebx,esi
2317
	sub	ebx,esi
2315
	shl	eax,16
2318
	shl	eax,16
2316
	mov	ax,bx
2319
	mov	ax,bx
2317
	mov	[esi+300-40],eax
2320
	mov	[esi+300-40],eax
2318
	mov	[esi+299-40],byte 0
2321
	mov	[esi+299-40],byte 0
2319
	add	esi,304
2322
	add	esi,304
2320
	dec	ebp
2323
	dec	ebp
2321
	jnz	.start
2324
	jnz	.start
2322
.end:
2325
.end:
2323
	ret
2326
	ret
2324
;---------------------------------------------------------------------
2327
;---------------------------------------------------------------------
2325
search_extension_start:
2328
search_extension_start:
2326
	mov	edx,esi
2329
	mov	edx,esi
2327
	xor	eax,eax
2330
	xor	eax,eax
2328
	cld
2331
	cld
2329
@@:
2332
@@:
2330
	lodsb
2333
	lodsb
2331
	test	eax,eax
2334
	test	eax,eax
2332
	jnz	@b
2335
	jnz	@b
2333
	dec	esi
2336
	dec	esi
2334
	dec	edx
2337
	dec	edx
2335
	push	esi
2338
	push	esi
2336
	std
2339
	std
2337
@@:
2340
@@:
2338
	lodsb
2341
	lodsb
2339
	cmp	esi,edx
2342
	cmp	esi,edx
2340
	je	.end
2343
	je	.end
2341
	cmp	al,'.'
2344
	cmp	al,'.'
2342
	jnz	@b
2345
	jnz	@b
2343
	add	esi,2
2346
	add	esi,2
2344
	cld
2347
	cld
2345
	pop	ebx
2348
	pop	ebx
2346
	ret
2349
	ret
2347
.end:
2350
.end:
2348
	cld
2351
	cld
2349
	pop	esi
2352
	pop	esi
2350
	mov	ebx,esi
2353
	mov	ebx,esi
2351
	ret
2354
	ret
2352
;---------------------------------------------------------------------
2355
;---------------------------------------------------------------------
2353
delete_point_dir:
2356
delete_point_dir:
2354
	mov	eax,[dirinfo.return]
2357
	mov	eax,[dirinfo.return]
2355
	cmp	[eax+32+40],byte '.'
2358
	cmp	[eax+32+40],byte '.'
2356
	jne	@f
2359
	jne	@f
2357
	cmp	[eax+32+40+1],byte 0
2360
	cmp	[eax+32+40+1],byte 0
2358
	jne	@f
2361
	jne	@f
2359
	mov	edi,eax
2362
	mov	edi,eax
2360
	add	edi,32
2363
	add	edi,32
2361
	mov	esi,edi
2364
	mov	esi,edi
2362
	add	esi,304
2365
	add	esi,304
2363
	mov	ecx,[eax+4]
2366
	mov	ecx,[eax+4]
2364
	dec	ecx
2367
	dec	ecx
2365
	mov	[eax+4],ecx
2368
	mov	[eax+4],ecx
2366
	imul	ecx,304
2369
	imul	ecx,304
2367
	shr	ecx,2
2370
	shr	ecx,2
2368
	cld
2371
	cld
2369
	rep	movsd
2372
	rep	movsd
2370
@@:
2373
@@:
2371
	ret
2374
	ret
2372
;---------------------------------------------------------------------
2375
;---------------------------------------------------------------------
2373
;files_name_normalize:
2376
;files_name_normalize:
2374
;	mov	esi,[dirinfo.return]
2377
;	mov	esi,[dirinfo.return]
2375
;	mov	ebp,[esi+4]
2378
;	mov	ebp,[esi+4]
2376
;	add	esi,32+40
2379
;	add	esi,32+40
2377
;.start:
2380
;.start:
2378
;	push	esi
2381
;	push	esi
2379
;	mov	al,[esi]
2382
;	mov	al,[esi]
2380
;	call	char_toupper
2383
;	call	char_toupper
2381
;	mov	[esi],al
2384
;	mov	[esi],al
2382
;@@:
2385
;@@:
2383
;	inc	esi
2386
;	inc	esi
2384
;	mov	al,[esi]
2387
;	mov	al,[esi]
2385
;	test	al,al
2388
;	test	al,al
2386
;	jz	@f
2389
;	jz	@f
2387
;	call	char_todown
2390
;	call	char_todown
2388
;	mov	[esi],al
2391
;	mov	[esi],al
2389
;	jmp	@b
2392
;	jmp	@b
2390
;@@:
2393
;@@:
2391
;	pop	esi
2394
;	pop	esi
2392
;	add	esi,304
2395
;	add	esi,304
2393
;	dec	ebp
2396
;	dec	ebp
2394
;	jnz	.start
2397
;	jnz	.start
2395
;	ret
2398
;	ret
2396
;---------------------------------------------------------------------
2399
;---------------------------------------------------------------------
2397
char_toupper:
2400
char_toupper:
2398
; convert character to uppercase,using cp866 encoding
2401
; convert character to uppercase,using cp866 encoding
2399
; in: al=symbol
2402
; in: al=symbol
2400
; out: al=converted symbol
2403
; out: al=converted symbol
2401
	cmp	al,'a'
2404
	cmp	al,'a'
2402
	jb	.ret
2405
	jb	.ret
2403
	cmp	al,'z'
2406
	cmp	al,'z'
2404
	jbe	.az
2407
	jbe	.az
2405
	cmp	al,' '
2408
	cmp	al,' '
2406
	jb	.ret
2409
	jb	.ret
2407
	cmp	al,'à'
2410
	cmp	al,'à'
2408
	jb	.rus1
2411
	jb	.rus1
2409
	cmp	al,'ï'
2412
	cmp	al,'ï'
2410
	ja	.ret
2413
	ja	.ret
2411
; 0xE0-0xEF -> 0x90-0x9F
2414
; 0xE0-0xEF -> 0x90-0x9F
2412
	sub	al,'à'-''
2415
	sub	al,'à'-''
2413
.ret:
2416
.ret:
2414
	ret
2417
	ret
2415
.rus1:
2418
.rus1:
2416
; 0xA0-0xAF -> 0x80-0x8F
2419
; 0xA0-0xAF -> 0x80-0x8F
2417
.az:
2420
.az:
2418
	and	al,not	0x20
2421
	and	al,not	0x20
2419
	ret
2422
	ret
2420
;---------------------------------------------------------------------
2423
;---------------------------------------------------------------------
2421
char_todown:
2424
char_todown:
2422
; convert character to uppercase,using cp866 encoding
2425
; convert character to uppercase,using cp866 encoding
2423
; in: al=symbol
2426
; in: al=symbol
2424
; out: al=converted symbol
2427
; out: al=converted symbol
2425
	cmp	al,'A'
2428
	cmp	al,'A'
2426
	jb	.ret
2429
	jb	.ret
2427
	cmp	al,'Z'
2430
	cmp	al,'Z'
2428
	jbe	.az
2431
	jbe	.az
2429
	cmp	al,'€'
2432
	cmp	al,'€'
2430
	jb	.ret
2433
	jb	.ret
2431
	cmp	al,''
2434
	cmp	al,''
2432
	jb	.rus1
2435
	jb	.rus1
2433
	cmp	al,'Ÿ'
2436
	cmp	al,'Ÿ'
2434
	ja	.ret
2437
	ja	.ret
2435
; 0x90-0x9F -> 0xE0-0xEF
2438
; 0x90-0x9F -> 0xE0-0xEF
2436
	add	al,'à'-''
2439
	add	al,'à'-''
2437
.ret:
2440
.ret:
2438
	ret
2441
	ret
2439
.rus1:
2442
.rus1:
2440
; 0x80-0x8F -> 0xA0-0xAF
2443
; 0x80-0x8F -> 0xA0-0xAF
2441
.az:
2444
.az:
2442
	add	al,0x20
2445
	add	al,0x20
2443
	ret
2446
	ret
2444
;---------------------------------------------------------------------
2447
;---------------------------------------------------------------------
2445
copy_file_path:
2448
copy_file_path:
2446
	xor	eax,eax
2449
	xor	eax,eax
2447
	cld
2450
	cld
2448
@@:
2451
@@:
2449
	lodsb
2452
	lodsb
2450
	stosb
2453
	stosb
2451
	test	eax,eax
2454
	test	eax,eax
2452
	jnz	@b
2455
	jnz	@b
2453
	mov	esi,edi
2456
	mov	esi,edi
2454
	dec	esi
2457
	dec	esi
2455
	std
2458
	std
2456
@@:
2459
@@:
2457
	lodsb
2460
	lodsb
2458
	cmp	al,'/'
2461
	cmp	al,'/'
2459
	jnz	@b
2462
	jnz	@b
2460
	mov	edi,esi
2463
	mov	edi,esi
2461
	add	edi,2
2464
	add	edi,2
2462
	mov	esi,ebx
2465
	mov	esi,ebx
2463
	cld
2466
	cld
2464
@@:
2467
@@:
2465
	lodsb
2468
	lodsb
2466
	stosb
2469
	stosb
2467
	test	eax,eax
2470
	test	eax,eax
2468
	jnz	@b
2471
	jnz	@b
2469
	ret
2472
	ret
2470
;---------------------------------------------------------------------
2473
;---------------------------------------------------------------------
2471
copy_dir_path:
2474
copy_dir_path:
2472
	mov	ecx,esi
2475
	mov	ecx,esi
2473
	inc	ecx
2476
	inc	ecx
2474
	inc	ecx
2477
	inc	ecx
2475
	xor	eax,eax
2478
	xor	eax,eax
2476
	cld
2479
	cld
2477
@@:
2480
@@:
2478
	lodsb
2481
	lodsb
2479
	test	eax,eax
2482
	test	eax,eax
2480
	jnz	@b
2483
	jnz	@b
2481
 
2484
 
2482
	cmp	ecx,esi
2485
	cmp	ecx,esi
2483
	jb	@f
2486
	jb	@f
2484
	dec	esi
2487
	dec	esi
2485
@@:
2488
@@:
2486
	mov	[esi-1],byte '/'
2489
	mov	[esi-1],byte '/'
2487
	mov	edi,esi
2490
	mov	edi,esi
2488
	mov	esi,ebx
2491
	mov	esi,ebx
2489
@@:
2492
@@:
2490
	lodsb
2493
	lodsb
2491
	stosb
2494
	stosb
2492
	test	eax,eax
2495
	test	eax,eax
2493
	jnz	@b
2496
	jnz	@b
2494
	ret
2497
	ret
2495
;---------------------------------------------------------------------
2498
;---------------------------------------------------------------------
2496
copy_exit_dir:
2499
copy_exit_dir:
2497
	mov	ebx,esi
2500
	mov	ebx,esi
2498
	inc	ebx
2501
	inc	ebx
2499
	xor	eax,eax
2502
	xor	eax,eax
2500
	cld
2503
	cld
2501
@@:
2504
@@:
2502
	lodsb
2505
	lodsb
2503
	test	eax,eax
2506
	test	eax,eax
2504
	jnz	@b
2507
	jnz	@b
2505
	sub	esi,2
2508
	sub	esi,2
2506
	std
2509
	std
2507
@@:
2510
@@:
2508
	lodsb
2511
	lodsb
2509
	cmp	al,'/'
2512
	cmp	al,'/'
2510
	jnz	@b
2513
	jnz	@b
2511
	xor	eax,eax
2514
	xor	eax,eax
2512
	cmp	ebx,esi
2515
	cmp	ebx,esi
2513
	jb	@f
2516
	jb	@f
2514
	inc	esi
2517
	inc	esi
2515
@@:
2518
@@:
2516
	mov	[esi+1],al
2519
	mov	[esi+1],al
2517
	cld
2520
	cld
2518
	ret
2521
	ret
2519
;---------------------------------------------------------------------
2522
;---------------------------------------------------------------------
2520
copy_dir_name:
2523
copy_dir_name:
2521
	push	esi edi
2524
	push	esi edi
2522
	mov	esi,edi
2525
	mov	esi,edi
2523
	mov	edi,previous_dir_path
2526
	mov	edi,previous_dir_path
2524
	call	.1
2527
	call	.1
2525
	pop	edi esi
2528
	pop	edi esi
2526
.1:
2529
.1:
2527
	xor	eax,eax
2530
	xor	eax,eax
2528
	cmp	[esi],al
2531
	cmp	[esi],al
2529
	je	.exit
2532
	je	.exit
2530
	cld
2533
	cld
2531
@@:
2534
@@:
2532
	lodsb
2535
	lodsb
2533
	stosb
2536
	stosb
2534
	test	eax,eax
2537
	test	eax,eax
2535
	jnz	@b
2538
	jnz	@b
2536
.exit:
2539
.exit:
2537
	ret
2540
	ret
2538
;---------------------------------------------------------------------
2541
;---------------------------------------------------------------------
2539
;---------------------------------------------------------------------
2542
;---------------------------------------------------------------------
2540
 
2543
 
2541
;plugins_directory	db 'plugins/',0
2544
;plugins_directory	db 'plugins/',0
2542
plugins_directory	db 0
2545
plugins_directory	db 0
2543
 
2546
 
2544
system_dir_Boxlib	db '/sys/lib/box_lib.obj',0
2547
system_dir_Boxlib	db '/sys/lib/box_lib.obj',0
2545
system_dir_CnvPNG	db '/sys/lib/cnv_png.obj',0
2548
system_dir_CnvPNG	db '/sys/lib/cnv_png.obj',0
2546
system_dir_Sort		db '/sys/lib/sort.obj',0
2549
system_dir_Sort		db '/sys/lib/sort.obj',0
2547
system_dir_UNPACK	db '/sys/lib/archiver.obj',0
2550
system_dir_UNPACK	db '/sys/lib/archiver.obj',0
2548
 
2551
 
2549
ihead_f_i:
2552
ihead_f_i:
2550
ihead_f_l	db 'System	error',0
2553
ihead_f_l	db 'System	error',0
2551
 
2554
 
2552
er_message_found_lib	db 'box_lib.obj - Not found!',0
2555
er_message_found_lib	db 'box_lib.obj - Not found!',0
2553
er_message_import	db 'box_lib.obj - Wrong import!',0
2556
er_message_import	db 'box_lib.obj - Wrong import!',0
2554
 
2557
 
2555
er_message_found_lib2	db 'cnv_png.obj - Not found!',0
2558
er_message_found_lib2	db 'cnv_png.obj - Not found!',0
2556
er_message_import2	db 'cnv_png.obj - Wrong import!',0
2559
er_message_import2	db 'cnv_png.obj - Wrong import!',0
2557
 
2560
 
2558
err_message_found_lib3	db 'sort.obj - Not found!',0
2561
err_message_found_lib3	db 'sort.obj - Not found!',0
2559
err_message_import3	db 'sort.obj - Wrong import!',0
2562
err_message_import3	db 'sort.obj - Wrong import!',0
2560
 
2563
 
2561
err_message_found_lib4	db 'archiver.obj - Not found!',0
2564
err_message_found_lib4	db 'archiver.obj - Not found!',0
2562
err_message_import4	db 'archiver.obj - Wrong import!',0
2565
err_message_import4	db 'archiver.obj - Wrong import!',0
2563
 
2566
 
2564
align	4
2567
align	4
2565
l_libs_start:
2568
l_libs_start:
2566
library01	l_libs	system_dir_Boxlib+9,path,file_name,system_dir_Boxlib,\
2569
library01	l_libs	system_dir_Boxlib+9,path,file_name,system_dir_Boxlib,\
2567
er_message_found_lib,ihead_f_l,Box_lib_import,er_message_import,ihead_f_i,plugins_directory
2570
er_message_found_lib,ihead_f_l,Box_lib_import,er_message_import,ihead_f_i,plugins_directory
2568
 
2571
 
2569
library02	l_libs	system_dir_CnvPNG+9,path,file_name,system_dir_CnvPNG,\
2572
library02	l_libs	system_dir_CnvPNG+9,path,file_name,system_dir_CnvPNG,\
2570
er_message_found_lib2,ihead_f_l,cnv_png_import,er_message_import2,ihead_f_i,plugins_directory
2573
er_message_found_lib2,ihead_f_l,cnv_png_import,er_message_import2,ihead_f_i,plugins_directory
2571
 
2574
 
2572
library03	l_libs	system_dir_Sort+9,path,file_name,system_dir_Sort,\
2575
library03	l_libs	system_dir_Sort+9,path,file_name,system_dir_Sort,\
2573
err_message_found_lib3,ihead_f_l,Sort_import,err_message_import3,ihead_f_i,plugins_directory
2576
err_message_found_lib3,ihead_f_l,Sort_import,err_message_import3,ihead_f_i,plugins_directory
2574
 
2577
 
2575
library04	l_libs	system_dir_UNPACK+9,path,file_name,system_dir_UNPACK,\
2578
library04	l_libs	system_dir_UNPACK+9,path,file_name,system_dir_UNPACK,\
2576
err_message_found_lib4,ihead_f_l,UNPACK_import,err_message_import4,ihead_f_i,plugins_directory
2579
err_message_found_lib4,ihead_f_l,UNPACK_import,err_message_import4,ihead_f_i,plugins_directory
2577
 
2580
 
2578
end_l_libs:
2581
end_l_libs:
2579
 
2582
 
2580
;---------------------------------------------------------------------
2583
;---------------------------------------------------------------------
2581
align	4
2584
align	4
2582
UNPACK_import:
2585
UNPACK_import:
2583
;unpack_Version			dd aUnpack_Version
2586
;unpack_Version			dd aUnpack_Version
2584
;unpack_PluginLoad		dd aUnpack_PluginLoad	
2587
;unpack_PluginLoad		dd aUnpack_PluginLoad	
2585
;unpack_OpenFilePlugin		dd aUnpack_OpenFilePlugin
2588
;unpack_OpenFilePlugin		dd aUnpack_OpenFilePlugin
2586
;unpack_ClosePlugin		dd aUnpack_ClosePlugin
2589
;unpack_ClosePlugin		dd aUnpack_ClosePlugin
2587
;unpack_ReadFolder		dd aUnpack_ReadFolder	
2590
;unpack_ReadFolder		dd aUnpack_ReadFolder	
2588
;unpack_SetFolder		dd aUnpack_SetFolder
2591
;unpack_SetFolder		dd aUnpack_SetFolder
2589
;unpack_GetFiles		dd aUnpack_GetFiles
2592
;unpack_GetFiles		dd aUnpack_GetFiles
2590
;unpack_GetOpenPluginInfo	dd aUnpack_GetOpenPluginInfo
2593
;unpack_GetOpenPluginInfo	dd aUnpack_GetOpenPluginInfo
2591
;unpack_Getattr			dd aUnpack_Getattr
2594
;unpack_Getattr			dd aUnpack_Getattr
2592
;unpack_Open			dd aUnpack_Open
2595
;unpack_Open			dd aUnpack_Open
2593
;unpack_Read			dd aUnpack_Read
2596
;unpack_Read			dd aUnpack_Read
2594
;unpack_Setpos			dd aUnpack_Setpos
2597
;unpack_Setpos			dd aUnpack_Setpos
2595
;unpack_Close			dd aUnpack_Close
2598
;unpack_Close			dd aUnpack_Close
2596
;unpack_DeflateUnpack		dd aUnpack_DeflateUnpack
2599
;unpack_DeflateUnpack		dd aUnpack_DeflateUnpack
2597
unpack_DeflateUnpack2		dd aUnpack_DeflateUnpack2
2600
unpack_DeflateUnpack2		dd aUnpack_DeflateUnpack2
2598
	dd 0
2601
	dd 0
2599
	dd 0
2602
	dd 0
2600
 
2603
 
2601
;aUnpack_Version		db 'version',0
2604
;aUnpack_Version		db 'version',0
2602
;aUnpack_PluginLoad		db 'plugin_load',0
2605
;aUnpack_PluginLoad		db 'plugin_load',0
2603
;aUnpack_OpenFilePlugin		db 'OpenFilePlugin',0
2606
;aUnpack_OpenFilePlugin		db 'OpenFilePlugin',0
2604
;aUnpack_ClosePlugin		db 'ClosePlugin',0
2607
;aUnpack_ClosePlugin		db 'ClosePlugin',0
2605
;aUnpack_ReadFolder		db 'ReadFolder',0
2608
;aUnpack_ReadFolder		db 'ReadFolder',0
2606
;aUnpack_SetFolder		db 'SetFolder',0
2609
;aUnpack_SetFolder		db 'SetFolder',0
2607
;aUnpack_GetFiles		db 'GetFiles',0
2610
;aUnpack_GetFiles		db 'GetFiles',0
2608
;aUnpack_GetOpenPluginInfo	db 'GetOpenPluginInfo',0
2611
;aUnpack_GetOpenPluginInfo	db 'GetOpenPluginInfo',0
2609
;aUnpack_Getattr		db 'getattr',0
2612
;aUnpack_Getattr		db 'getattr',0
2610
;aUnpack_Open			db 'open',0
2613
;aUnpack_Open			db 'open',0
2611
;aUnpack_Read			db 'read',0
2614
;aUnpack_Read			db 'read',0
2612
;aUnpack_Setpos			db 'setpos',0
2615
;aUnpack_Setpos			db 'setpos',0
2613
;aUnpack_Close			db 'close',0
2616
;aUnpack_Close			db 'close',0
2614
;aUnpack_DeflateUnpack		db 'deflate_unpack',0
2617
;aUnpack_DeflateUnpack		db 'deflate_unpack',0
2615
aUnpack_DeflateUnpack2		db 'deflate_unpack2',0
2618
aUnpack_DeflateUnpack2		db 'deflate_unpack2',0
2616
 
2619
 
2617
;---------------------------------------------------------------------
2620
;---------------------------------------------------------------------
2618
;---------------------------------------------------------------------
2621
;---------------------------------------------------------------------
2619
align	4
2622
align	4
2620
Sort_import:
2623
Sort_import:
2621
sort_init	dd aSort_init
2624
sort_init	dd aSort_init
2622
sort_version	dd aSort_version
2625
sort_version	dd aSort_version
2623
sort_dir	dd aSort_SortDir
2626
sort_dir	dd aSort_SortDir
2624
sort_strcmpi	dd aSort_strcmpi
2627
sort_strcmpi	dd aSort_strcmpi
2625
	dd 0
2628
	dd 0
2626
	dd 0
2629
	dd 0
2627
 
2630
 
2628
aSort_init	db 'START',0
2631
aSort_init	db 'START',0
2629
aSort_version	db 'version',0
2632
aSort_version	db 'version',0
2630
aSort_SortDir	db 'SortDir',0
2633
aSort_SortDir	db 'SortDir',0
2631
aSort_strcmpi	db 'strcmpi',0
2634
aSort_strcmpi	db 'strcmpi',0
2632
 
2635
 
2633
;---------------------------------------------------------------------
2636
;---------------------------------------------------------------------
2634
align	4
2637
align	4
2635
cnv_png_import:
2638
cnv_png_import:
2636
.Start		dd aCP_Start
2639
.Start		dd aCP_Start
2637
.Version	dd aCP_Version
2640
.Version	dd aCP_Version
2638
.Check		dd aCP_Check
2641
.Check		dd aCP_Check
2639
.Assoc		dd aCP_Assoc
2642
.Assoc		dd aCP_Assoc
2640
	dd 0
2643
	dd 0
2641
	dd 0
2644
	dd 0
2642
aCP_Start	db 'START',0
2645
aCP_Start	db 'START',0
2643
aCP_Version	db 'version',0
2646
aCP_Version	db 'version',0
2644
aCP_Check	db 'Check_Header',0
2647
aCP_Check	db 'Check_Header',0
2645
aCP_Assoc	db 'Associations',0
2648
aCP_Assoc	db 'Associations',0
2646
;---------------------------------------------------------------------
2649
;---------------------------------------------------------------------
2647
align	4
2650
align	4
2648
Box_lib_import:	
2651
Box_lib_import:	
2649
;init_lib	dd a_init
2652
;init_lib	dd a_init
2650
;version_lib	dd a_version
2653
;version_lib	dd a_version
2651
 
2654
 
2652
 
2655
 
2653
edit_box_draw		dd aEdit_box_draw
2656
edit_box_draw		dd aEdit_box_draw
2654
edit_box_key		dd aEdit_box_key
2657
edit_box_key		dd aEdit_box_key
2655
edit_box_mouse		dd aEdit_box_mouse
2658
edit_box_mouse		dd aEdit_box_mouse
2656
;version_ed		dd aVersion_ed
2659
;version_ed		dd aVersion_ed
2657
 
2660
 
2658
;check_box_draw	dd aCheck_box_draw
2661
;check_box_draw	dd aCheck_box_draw
2659
;check_box_mouse	dd aCheck_box_mouse
2662
;check_box_mouse	dd aCheck_box_mouse
2660
;version_ch		dd aVersion_ch
2663
;version_ch		dd aVersion_ch
2661
 
2664
 
2662
;option_box_draw	dd aOption_box_draw
2665
;option_box_draw	dd aOption_box_draw
2663
;option_box_mouse	dd aOption_box_mouse
2666
;option_box_mouse	dd aOption_box_mouse
2664
;version_op		dd aVersion_op
2667
;version_op		dd aVersion_op
2665
 
2668
 
2666
scrollbar_ver_draw	dd aScrollbar_ver_draw
2669
scrollbar_ver_draw	dd aScrollbar_ver_draw
2667
scrollbar_ver_mouse	dd aScrollbar_ver_mouse
2670
scrollbar_ver_mouse	dd aScrollbar_ver_mouse
2668
;scrollbar_hor_draw	dd aScrollbar_hor_draw
2671
;scrollbar_hor_draw	dd aScrollbar_hor_draw
2669
;scrollbar_hor_mouse	dd aScrollbar_hor_mouse
2672
;scrollbar_hor_mouse	dd aScrollbar_hor_mouse
2670
;version_scrollbar	dd aVersion_scrollbar
2673
;version_scrollbar	dd aVersion_scrollbar
2671
 
2674
 
2672
;dinamic_button_draw	dd aDbutton_draw
2675
;dinamic_button_draw	dd aDbutton_draw
2673
;dinamic_button_mouse	dd aDbutton_mouse
2676
;dinamic_button_mouse	dd aDbutton_mouse
2674
;version_dbutton	dd aVersion_dbutton
2677
;version_dbutton	dd aVersion_dbutton
2675
 
2678
 
2676
menu_bar_draw		dd aMenu_bar_draw
2679
menu_bar_draw		dd aMenu_bar_draw
2677
menu_bar_mouse		dd aMenu_bar_mouse
2680
menu_bar_mouse		dd aMenu_bar_mouse
2678
menu_bar_activate	dd aMenu_bar_activate
2681
menu_bar_activate	dd aMenu_bar_activate
2679
;version_menu_bar	dd aVersion_menu_bar
2682
;version_menu_bar	dd aVersion_menu_bar
2680
 
2683
 
2681
FileBrowser_draw	dd aFileBrowser_draw
2684
FileBrowser_draw	dd aFileBrowser_draw
2682
FileBrowser_mouse	dd aFileBrowser_mouse
2685
FileBrowser_mouse	dd aFileBrowser_mouse
2683
FileBrowser_key		dd aFileBrowser_key
2686
FileBrowser_key		dd aFileBrowser_key
2684
;Version_FileBrowser	dd aVersion_FileBrowser
2687
;Version_FileBrowser	dd aVersion_FileBrowser
2685
 
2688
 
2686
PathShow_prepare	dd sz_PathShow_prepare
2689
PathShow_prepare	dd sz_PathShow_prepare
2687
PathShow_draw		dd sz_PathShow_draw
2690
PathShow_draw		dd sz_PathShow_draw
2688
;Version_path_show	dd szVersion_path_show
2691
;Version_path_show	dd szVersion_path_show
2689
	dd 0
2692
	dd 0
2690
	dd 0
2693
	dd 0
2691
 
2694
 
2692
;a_init			db 'lib_init',0
2695
;a_init			db 'lib_init',0
2693
;a_version		db 'version',0
2696
;a_version		db 'version',0
2694
 
2697
 
2695
aEdit_box_draw		db 'edit_box',0
2698
aEdit_box_draw		db 'edit_box',0
2696
aEdit_box_key		db 'edit_box_key',0
2699
aEdit_box_key		db 'edit_box_key',0
2697
aEdit_box_mouse		db 'edit_box_mouse',0
2700
aEdit_box_mouse		db 'edit_box_mouse',0
2698
;aVersion_ed		db 'version_ed',0
2701
;aVersion_ed		db 'version_ed',0
2699
 
2702
 
2700
;aCheck_box_draw	db 'check_box_draw',0
2703
;aCheck_box_draw	db 'check_box_draw',0
2701
;aCheck_box_mouse	db 'check_box_mouse',0
2704
;aCheck_box_mouse	db 'check_box_mouse',0
2702
;aVersion_ch		db 'version_ch',0
2705
;aVersion_ch		db 'version_ch',0
2703
 
2706
 
2704
;aOption_box_draw	db 'option_box_draw',0
2707
;aOption_box_draw	db 'option_box_draw',0
2705
;aOption_box_mouse	db 'option_box_mouse',0
2708
;aOption_box_mouse	db 'option_box_mouse',0
2706
;aVersion_op		db 'version_op',0
2709
;aVersion_op		db 'version_op',0
2707
 
2710
 
2708
aScrollbar_ver_draw	db 'scrollbar_v_draw',0
2711
aScrollbar_ver_draw	db 'scrollbar_v_draw',0
2709
aScrollbar_ver_mouse	db 'scrollbar_v_mouse',0
2712
aScrollbar_ver_mouse	db 'scrollbar_v_mouse',0
2710
;aScrollbar_hor_draw	db 'scrollbar_h_draw',0
2713
;aScrollbar_hor_draw	db 'scrollbar_h_draw',0
2711
;aScrollbar_hor_mouse	db 'scrollbar_h_mouse',0
2714
;aScrollbar_hor_mouse	db 'scrollbar_h_mouse',0
2712
;aVersion_scrollbar	db 'version_scrollbar',0
2715
;aVersion_scrollbar	db 'version_scrollbar',0
2713
 
2716
 
2714
;aDbutton_draw		db 'dbutton_draw',0
2717
;aDbutton_draw		db 'dbutton_draw',0
2715
;aDbutton_mouse		db 'dbutton_mouse',0
2718
;aDbutton_mouse		db 'dbutton_mouse',0
2716
;aVersion_dbutton	db 'version_dbutton',0
2719
;aVersion_dbutton	db 'version_dbutton',0
2717
 
2720
 
2718
aMenu_bar_draw		db 'menu_bar_draw',0
2721
aMenu_bar_draw		db 'menu_bar_draw',0
2719
aMenu_bar_mouse		db 'menu_bar_mouse',0
2722
aMenu_bar_mouse		db 'menu_bar_mouse',0
2720
aMenu_bar_activate	db 'menu_bar_activate',0
2723
aMenu_bar_activate	db 'menu_bar_activate',0
2721
;aVersion_menu_bar	db 'version_menu_bar',0
2724
;aVersion_menu_bar	db 'version_menu_bar',0
2722
 
2725
 
2723
aFileBrowser_draw	db 'FileBrowser_draw',0
2726
aFileBrowser_draw	db 'FileBrowser_draw',0
2724
aFileBrowser_mouse	db 'FileBrowser_mouse',0
2727
aFileBrowser_mouse	db 'FileBrowser_mouse',0
2725
aFileBrowser_key	db 'FileBrowser_key',0
2728
aFileBrowser_key	db 'FileBrowser_key',0
2726
;aVersion_FileBrowser	db 'version_FileBrowser',0
2729
;aVersion_FileBrowser	db 'version_FileBrowser',0
2727
 
2730
 
2728
sz_PathShow_prepare	db 'PathShow_prepare',0
2731
sz_PathShow_prepare	db 'PathShow_prepare',0
2729
sz_PathShow_draw	db 'PathShow_draw',0
2732
sz_PathShow_draw	db 'PathShow_draw',0
2730
;szVersion_path_show	db 'version_PathShow',0
2733
;szVersion_path_show	db 'version_PathShow',0
2731
;---------------------------------------------------------------------
2734
;---------------------------------------------------------------------
2732
;---------------------------------------------------------------------
2735
;---------------------------------------------------------------------
2733
align	4
2736
align	4
2734
window_high			dd 0
2737
window_high			dd 0
2735
window_width			dd 0
2738
window_width			dd 0
2736
window_status			dd 0
2739
window_status			dd 0
2737
 
2740
 
2738
active_process			dd 0
2741
active_process			dd 0
2739
PID				dd 0
2742
PID				dd 0
2740
sort_type			dd 2
2743
sort_type			dd 2
2741
root_folder_area		dd 0
2744
root_folder_area		dd 0
2742
root_folder_block		dd 0
2745
root_folder_block		dd 0
2743
root1_folder_area		dd 0
2746
root1_folder_area		dd 0
2744
root1_folder_block		dd 0
2747
root1_folder_block		dd 0
2745
temp_counter_1			dd 0
2748
temp_counter_1			dd 0
2746
retrieved_devices_table_counter	dd 0
2749
retrieved_devices_table_counter	dd 0
2747
communication_area		dd 0
2750
communication_area		dd 0
2748
open_dialog_type		dd 0
2751
open_dialog_type		dd 0
2749
 
2752
 
2750
open_dialog_title_pointer:
2753
open_dialog_title_pointer:
2751
	dd title_0
2754
	dd title_0
2752
	dd title_1
2755
	dd title_1
2753
	dd title_2
2756
	dd title_2
2754
	dd 0
2757
	dd 0
2755
	
2758
	
2756
message_open_dialog_button:
2759
message_open_dialog_button:
2757
	dd message_0
2760
	dd message_0
2758
	dd message_1
2761
	dd message_1
2759
	dd message_2
2762
	dd message_2
2760
	dd 0
2763
	dd 0
2761
;---------------------------------------------------------------------
2764
;---------------------------------------------------------------------
2762
expansion_length	dd 0
2765
expansion_length	dd 0
2763
;---------------------------------------------------------------------
2766
;---------------------------------------------------------------------
2764
N_error			dd 0
2767
N_error			dd 0
2765
error_type		dd 0
2768
error_type		dd 0
2766
error_path		dd 0
2769
error_path		dd 0
2767
error_window_x:		dd 100 shl 16+250
2770
error_window_x:		dd 100 shl 16+250
2768
error_window_y:		dd 100 shl 16+120
2771
error_window_y:		dd 100 shl 16+120
2769
;---------------------------------------------------------------------
2772
;---------------------------------------------------------------------
2770
mouse_scroll_data:
2773
mouse_scroll_data:
2771
.vertical	dw 0
2774
.vertical	dw 0
2772
.horizontal	dw 0
2775
.horizontal	dw 0
2773
 
2776
 
2774
mouse_position:
2777
mouse_position:
2775
.y	dw 0
2778
.y	dw 0
2776
.x	dw 0
2779
.x	dw 0
2777
;---------------------------------------------------------------------
2780
;---------------------------------------------------------------------
2778
; not	change	this	section!!!
2781
; not	change	this	section!!!
2779
; start	section
2782
; start	section
2780
;---------------------------------------------------------------------
2783
;---------------------------------------------------------------------
2781
align	4
2784
align	4
2782
image_file	dd 0
2785
image_file	dd 0
2783
raw_pointer	dd 0
2786
raw_pointer	dd 0
2784
return_code	dd 0
2787
return_code	dd 0
2785
img_size	dd 0
2788
img_size	dd 0
2786
deflate_unpack	dd 0
2789
deflate_unpack	dd 0
2787
raw_pointer_2	dd 0	;+20
2790
raw_pointer_2	dd 0	;+20
2788
;---------------------------------------------------------------------
2791
;---------------------------------------------------------------------
2789
; end	section
2792
; end	section
2790
;---------------------------------------------------------------------
2793
;---------------------------------------------------------------------
2791
align	4
2794
align	4
2792
fileinfo:
2795
fileinfo:
2793
.subfunction	dd 5
2796
.subfunction	dd 5
2794
.Offset		dd 0
2797
.Offset		dd 0
2795
.Offset_1	dd 0
2798
.Offset_1	dd 0
2796
.size		dd 0
2799
.size		dd 0
2797
.return		dd file_info
2800
.return		dd file_info
2798
		db 0
2801
		db 0
2799
.name:		dd file_name
2802
.name:		dd file_name
2800
;---------------------------------------------------------------------
2803
;---------------------------------------------------------------------
2801
align	4
2804
align	4
2802
dirinfo:
2805
dirinfo:
2803
.subfunction	dd 1
2806
.subfunction	dd 1
2804
.start		dd 0
2807
.start		dd 0
2805
.flags		dd 0
2808
.flags		dd 0
2806
.size		dd 0
2809
.size		dd 0
2807
.return		dd 0
2810
.return		dd 0
2808
		db 0
2811
		db 0
2809
.name:		dd dir_path
2812
.name:		dd dir_path
2810
;---------------------------------------------------------------------
2813
;---------------------------------------------------------------------
2811
align	4
2814
align	4
2812
dir_header:
2815
dir_header:
2813
.version	dd 0	;+0
2816
.version	dd 0	;+0
2814
.curn_blocks	dd 0	;+4
2817
.curn_blocks	dd 0	;+4
2815
.totl_blocks	dd 0	;+8
2818
.totl_blocks	dd 0	;+8
2816
.other	rb	20
2819
.other	rb	20
2817
;---------------------------------------------------------------------
2820
;---------------------------------------------------------------------
2818
load_ini_error_type:
2821
load_ini_error_type:
2819
	db 'Error loading INI file',0
2822
	db 'Error loading INI file',0
2820
 
2823
 
2821
load_icons_error_type:
2824
load_icons_error_type:
2822
	db 'Error loading of icons file',0
2825
	db 'Error loading of icons file',0
2823
 
2826
 
2824
memory_free_error_type:
2827
memory_free_error_type:
2825
	db 'Error of free memory',0
2828
	db 'Error of free memory',0
2826
 
2829
 
2827
memory_get_error_type:
2830
memory_get_error_type:
2828
	db 'Memory allocation error',0
2831
	db 'Memory allocation error',0
2829
 
2832
 
2830
load_directory_error_type:
2833
load_directory_error_type:
2831
	db 'Error loading directory',0
2834
	db 'Error loading directory',0
2832
 
2835
 
2833
convert_icons_error_type:
2836
convert_icons_error_type:
2834
	db 'Unsupported or corrupt data for icons file',0
2837
	db 'Unsupported or corrupt data for icons file',0
2835
;---------------------------------------------------------------------
2838
;---------------------------------------------------------------------
2836
error_help_text:
2839
error_help_text:
2837
	db 'For continue press  key or ',0
2840
	db 'For continue press  key or ',0
2838
;---------------------------------------------------------------------
2841
;---------------------------------------------------------------------
2839
align	4
2842
align	4
2840
error_fs_text_pointers:
2843
error_fs_text_pointers:
2841
	dd error_fs_text_0
2844
	dd error_fs_text_0
2842
	dd error_fs_text_1
2845
	dd error_fs_text_1
2843
	dd error_fs_text_2
2846
	dd error_fs_text_2
2844
	dd error_fs_text_3
2847
	dd error_fs_text_3
2845
	dd error_fs_text_4
2848
	dd error_fs_text_4
2846
	dd error_fs_text_5
2849
	dd error_fs_text_5
2847
	dd error_fs_text_6
2850
	dd error_fs_text_6
2848
	dd error_fs_text_7
2851
	dd error_fs_text_7
2849
	dd error_fs_text_8
2852
	dd error_fs_text_8
2850
	dd error_fs_text_9
2853
	dd error_fs_text_9
2851
	dd error_fs_text_10
2854
	dd error_fs_text_10
2852
	dd error_fs_text_11
2855
	dd error_fs_text_11
2853
 
2856
 
2854
error_fs_text_0:	db '0 - Success full',0
2857
error_fs_text_0:	db '0 - Success full',0
2855
error_fs_text_1:	db '1 - Base and/or partition of a hard disk is not defined',0
2858
error_fs_text_1:	db '1 - Base and/or partition of a hard disk is not defined',0
2856
error_fs_text_2:	db '2 - Function is not supported for the given file system',0
2859
error_fs_text_2:	db '2 - Function is not supported for the given file system',0
2857
error_fs_text_3:	db '3 - Unknown file system',0
2860
error_fs_text_3:	db '3 - Unknown file system',0
2858
error_fs_text_4:	db '4 - Reserved, is never returned in the current implementation',0
2861
error_fs_text_4:	db '4 - Reserved, is never returned in the current implementation',0
2859
error_fs_text_5:	db '5 - File not found',0
2862
error_fs_text_5:	db '5 - File not found',0
2860
error_fs_text_6:	db '6 - End of file, EOF',0
2863
error_fs_text_6:	db '6 - End of file, EOF',0
2861
error_fs_text_7:	db '7 - Pointer lies outside of application memory',0
2864
error_fs_text_7:	db '7 - Pointer lies outside of application memory',0
2862
error_fs_text_8:	db '8 - Disk is full',0
2865
error_fs_text_8:	db '8 - Disk is full',0
2863
error_fs_text_9:	db '9 - FAT table is destroyed',0
2866
error_fs_text_9:	db '9 - FAT table is destroyed',0
2864
error_fs_text_10:	db '10 - Access denied',0
2867
error_fs_text_10:	db '10 - Access denied',0
2865
error_fs_text_11:	db '11 - Device error',0
2868
error_fs_text_11:	db '11 - Device error',0
2866
;---------------------------------------------------------------------
2869
;---------------------------------------------------------------------
2867
 
2870
 
2868
extended_key	db 0
2871
extended_key	db 0
2869
 
2872
 
2870
shift_flag	db 0
2873
shift_flag	db 0
2871
ctrl_flag	db 0
2874
ctrl_flag	db 0
2872
alt_flag	db 0
2875
alt_flag	db 0
2873
 
2876
 
2874
error_window	db 0
2877
error_window	db 0
2875
 
2878
 
2876
Tab_key		db 0
2879
Tab_key		db 0
2877
Tab_key_block	db 0
2880
Tab_key_block	db 0
2878
 
2881
 
2879
filter_flag	db 1
2882
filter_flag	db 1
2880
 
2883
 
2881
focus_pointer	db 0
2884
focus_pointer	db 0
2882
;---------------------------------------------------------------------
2885
;---------------------------------------------------------------------
2883
start_pach:
2886
start_pach:
2884
	db '/rd/1',0
2887
	db '/rd/1',0
2885
 
2888
 
2886
root_pach:
2889
root_pach:
2887
	db '/',0
2890
	db '/',0
2888
 
2891
 
2889
icons_file_name_2	db 'buttons/'
2892
icons_file_name_2	db 'buttons/'
2890
icons_file_name		db 'z_icons.png',0
2893
icons_file_name		db 'z_icons.png',0
2891
ini_file_name		db 'icons.ini',0
2894
ini_file_name		db 'icons.ini',0
2892
;---------------------------------------------------------------------
2895
;---------------------------------------------------------------------
2893
 
2896
 
2894
message:
2897
message:
2895
	db 'Press any key...',0
2898
	db 'Press any key...',0
2896
 
2899
 
2897
message_cancel_button:
2900
message_cancel_button:
2898
	db 'Cancel',0
2901
	db 'Cancel',0
2899
 
2902
 
2900
message_ReloadDir_button:
2903
message_ReloadDir_button:
2901
	db 'Refresh',0
2904
	db 'Refresh',0
2902
 
2905
 
2903
message_ExitDir_button:
2906
message_ExitDir_button:
2904
	db '^',0
2907
	db '^',0
2905
 
2908
 
2906
message_file_name:
2909
message_file_name:
2907
	db 'File name:',0
2910
	db 'File name:',0
2908
	
2911
	
2909
message_0:
2912
message_0:
2910
	db ' Open ',0
2913
	db ' Open ',0
2911
message_1:
2914
message_1:
2912
	db ' Save ',0
2915
	db ' Save ',0
2913
message_2:
2916
message_2:
2914
	db 'Select',0
2917
	db 'Select',0
2915
	
2918
	
2916
title_0:
2919
title_0:
2917
	db 'Open Dialog',0
2920
	db 'Open Dialog',0
2918
title_1:
2921
title_1:
2919
	db 'Save Dialog',0
2922
	db 'Save Dialog',0
2920
title_2:
2923
title_2:
2921
	db 'Select Dir',0
2924
	db 'Select Dir',0
2922
;---------------------------------------------------------------------
2925
;---------------------------------------------------------------------
2923
align 4
2926
align 4
2924
menu_data_1:
2927
menu_data_1:
2925
.type:		dd 1   ;+0
2928
.type:		dd 1   ;+0
2926
.x:
2929
.x:
2927
.size_x 	dw 80  ;+4
2930
.size_x 	dw 80  ;+4
2928
.start_x	dw 10	;+6
2931
.start_x	dw 10	;+6
2929
.y:
2932
.y:
2930
.size_y 	dw 15	;+8
2933
.size_y 	dw 15	;+8
2931
.start_y	dw 26  ;+10
2934
.start_y	dw 26  ;+10
2932
.text_pointer:	dd menu_text_area_1  ;0 ;+12
2935
.text_pointer:	dd menu_text_area_1  ;0 ;+12
2933
.pos_pointer:	dd menu_text_area_1_1 ;0 ;+16
2936
.pos_pointer:	dd menu_text_area_1_1 ;0 ;+16
2934
.text_end	dd menu_text_area_1_1 ;0 ;+20
2937
.text_end	dd menu_text_area_1_1 ;0 ;+20
2935
.ret_key	dd 0  ;+24
2938
.ret_key	dd 0  ;+24
2936
.mouse_keys	dd 0  ;+28
2939
.mouse_keys	dd 0  ;+28
2937
.x1:
2940
.x1:
2938
.size_x1	dw 80  ;+32
2941
.size_x1	dw 80  ;+32
2939
.start_x1	dw 10	;+34
2942
.start_x1	dw 10	;+34
2940
.y1:
2943
.y1:
2941
.size_y1	dw 100	 ;+36
2944
.size_y1	dw 100	 ;+36
2942
.start_y1	dw 41  ;+38
2945
.start_y1	dw 41  ;+38
2943
.bckg_col	dd 0xffffff  ;0xe5e5e5 ;+40
2946
.bckg_col	dd 0xffffff  ;0xe5e5e5 ;+40
2944
.frnt_col	dd 0xff ;+44
2947
.frnt_col	dd 0xff ;+44
2945
.menu_col	dd 0xeef0ff ;0xffffff ;+48
2948
.menu_col	dd 0xeef0ff ;0xffffff ;+48
2946
.select 	dd 0 ;+52
2949
.select 	dd 0 ;+52
2947
.out_select	dd 0 ;+56
2950
.out_select	dd 0 ;+56
2948
.buf_adress	dd 0 ;+60
2951
.buf_adress	dd 0 ;+60
2949
.procinfo	dd procinfo ;+64
2952
.procinfo	dd procinfo ;+64
2950
.click		dd 0 ;+68
2953
.click		dd 0 ;+68
2951
.cursor 	dd 0 ;+72
2954
.cursor 	dd 0 ;+72
2952
.cursor_old	dd 0 ;+76
2955
.cursor_old	dd 0 ;+76
2953
.interval	dd 16 ;+80
2956
.interval	dd 16 ;+80
2954
.cursor_max	dd 0 ;+84
2957
.cursor_max	dd 0 ;+84
2955
.extended_key	dd 0 ;+88
2958
.extended_key	dd 0 ;+88
2956
.menu_sel_col	dd 0x00cc00 ;+92
2959
.menu_sel_col	dd 0x00cc00 ;+92
2957
.bckg_text_col	dd 0 ; +96
2960
.bckg_text_col	dd 0 ; +96
2958
.frnt_text_col	dd 0xffffff ;+100
2961
.frnt_text_col	dd 0xffffff ;+100
2959
.mouse_keys_old dd 0 ;+104
2962
.mouse_keys_old dd 0 ;+104
2960
.font_height	dd 8 ;+108
2963
.font_height	dd 8 ;+108
2961
.cursor_out	dd 0 ;+112
2964
.cursor_out	dd 0 ;+112
2962
.get_mouse_flag dd 0 ;+116
2965
.get_mouse_flag dd 0 ;+116
2963
;---------------------------------------------------------------------
2966
;---------------------------------------------------------------------
2964
menu_text_area_1:
2967
menu_text_area_1:
2965
db 'Select Disk',0
2968
db 'Select Disk',0
2966
;---------------------------------------------------------------------
2969
;---------------------------------------------------------------------
2967
align 4
2970
align 4
2968
menu_data_2:
2971
menu_data_2:
2969
.type:		dd 0   ;+0
2972
.type:		dd 0   ;+0
2970
.x:
2973
.x:
2971
.size_x 	dw 30  ;+4
2974
.size_x 	dw 30  ;+4
2972
.start_x	dw 95	;+6
2975
.start_x	dw 95	;+6
2973
.y:
2976
.y:
2974
.size_y 	dw 15	;+8
2977
.size_y 	dw 15	;+8
2975
.start_y	dw 26  ;+10
2978
.start_y	dw 26  ;+10
2976
.text_pointer:	dd menu_text_area_2  ;0 ;+12
2979
.text_pointer:	dd menu_text_area_2  ;0 ;+12
2977
.pos_pointer:	dd menu_text_area_2.1 ;0 ;+16
2980
.pos_pointer:	dd menu_text_area_2.1 ;0 ;+16
2978
.text_end	dd menu_text_area_2.end ;0 ;+20
2981
.text_end	dd menu_text_area_2.end ;0 ;+20
2979
.ret_key	dd 0  ;+24
2982
.ret_key	dd 0  ;+24
2980
.mouse_keys	dd 0  ;+28
2983
.mouse_keys	dd 0  ;+28
2981
.x1:
2984
.x1:
2982
.size_x1	dw 30  ;+32
2985
.size_x1	dw 30  ;+32
2983
.start_x1	dw 95	;+34
2986
.start_x1	dw 95	;+34
2984
.y1:
2987
.y1:
2985
.size_y1	dw 100	 ;+36
2988
.size_y1	dw 100	 ;+36
2986
.start_y1	dw 41  ;+38
2989
.start_y1	dw 41  ;+38
2987
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
2990
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
2988
.frnt_col	dd 0xff ;+44
2991
.frnt_col	dd 0xff ;+44
2989
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
2992
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
2990
.select 	dd 0 ;+52
2993
.select 	dd 0 ;+52
2991
.out_select	dd 0 ;+56
2994
.out_select	dd 0 ;+56
2992
.buf_adress	dd 0 ;+60
2995
.buf_adress	dd 0 ;+60
2993
.procinfo	dd procinfo ;+64
2996
.procinfo	dd procinfo ;+64
2994
.click		dd 0 ;+68
2997
.click		dd 0 ;+68
2995
.cursor 	dd 0 ;+72
2998
.cursor 	dd 0 ;+72
2996
.cursor_old	dd 0 ;+76
2999
.cursor_old	dd 0 ;+76
2997
.interval	dd 16 ;+80
3000
.interval	dd 16 ;+80
2998
.cursor_max	dd 0 ;+84
3001
.cursor_max	dd 0 ;+84
2999
.extended_key	dd 0 ;+88
3002
.extended_key	dd 0 ;+88
3000
.menu_sel_col	dd 0x00cc00 ;+92
3003
.menu_sel_col	dd 0x00cc00 ;+92
3001
.bckg_text_col	dd 0 ; +96
3004
.bckg_text_col	dd 0 ; +96
3002
.frnt_text_col	dd 0xffffff ;+100
3005
.frnt_text_col	dd 0xffffff ;+100
3003
.mouse_keys_old dd 0 ;+104
3006
.mouse_keys_old dd 0 ;+104
3004
.font_height	dd 8 ;+108
3007
.font_height	dd 8 ;+108
3005
.cursor_out	dd 0 ;+112
3008
.cursor_out	dd 0 ;+112
3006
.get_mouse_flag dd 0 ;+116
3009
.get_mouse_flag dd 0 ;+116
3007
;---------------------------------------------------------------------
3010
;---------------------------------------------------------------------
3008
menu_text_area_2:
3011
menu_text_area_2:
3009
db 'Sort',0
3012
db 'Sort',0
3010
.1:
3013
.1:
3011
db 'Name',0
3014
db 'Name',0
3012
db 'Type',0
3015
db 'Type',0
3013
db 'Date',0
3016
db 'Date',0
3014
db 'Size',0
3017
db 'Size',0
3015
.end:
3018
.end:
3016
db 0
3019
db 0
3017
;---------------------------------------------------------------------
3020
;---------------------------------------------------------------------
3018
align 4
3021
align 4
3019
menu_data_3:
3022
menu_data_3:
3020
.type:		dd 0   ;+0
3023
.type:		dd 0   ;+0
3021
.x:
3024
.x:
3022
.size_x 	dw 45  ;+4
3025
.size_x 	dw 45  ;+4
3023
.start_x	dw 130	 ;+6
3026
.start_x	dw 130	 ;+6
3024
.y:
3027
.y:
3025
.size_y 	dw 15	;+8
3028
.size_y 	dw 15	;+8
3026
.start_y	dw 26  ;+10
3029
.start_y	dw 26  ;+10
3027
.text_pointer:	dd menu_text_area_3  ;0 ;+12
3030
.text_pointer:	dd menu_text_area_3  ;0 ;+12
3028
.pos_pointer:	dd menu_text_area_3.1 ;0 ;+16
3031
.pos_pointer:	dd menu_text_area_3.1 ;0 ;+16
3029
.text_end	dd menu_text_area_3.end ;0 ;+20
3032
.text_end	dd menu_text_area_3.end ;0 ;+20
3030
.ret_key	dd 0  ;+24
3033
.ret_key	dd 0  ;+24
3031
.mouse_keys	dd 0  ;+28
3034
.mouse_keys	dd 0  ;+28
3032
.x1:
3035
.x1:
3033
.size_x1	dw 95  ;+32
3036
.size_x1	dw 95  ;+32
3034
.start_x1	dw 130	 ;+34
3037
.start_x1	dw 130	 ;+34
3035
.y1:
3038
.y1:
3036
.size_y1	dw 100	 ;+36
3039
.size_y1	dw 100	 ;+36
3037
.start_y1	dw 41  ;+38
3040
.start_y1	dw 41  ;+38
3038
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
3041
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
3039
.frnt_col	dd 0xff ;+44
3042
.frnt_col	dd 0xff ;+44
3040
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
3043
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
3041
.select 	dd 0 ;+52
3044
.select 	dd 0 ;+52
3042
.out_select	dd 0 ;+56
3045
.out_select	dd 0 ;+56
3043
.buf_adress	dd 0 ;+60
3046
.buf_adress	dd 0 ;+60
3044
.procinfo	dd procinfo ;+64
3047
.procinfo	dd procinfo ;+64
3045
.click		dd 0 ;+68
3048
.click		dd 0 ;+68
3046
.cursor 	dd 0 ;+72
3049
.cursor 	dd 0 ;+72
3047
.cursor_old	dd 0 ;+76
3050
.cursor_old	dd 0 ;+76
3048
.interval	dd 16 ;+80
3051
.interval	dd 16 ;+80
3049
.cursor_max	dd 0 ;+84
3052
.cursor_max	dd 0 ;+84
3050
.extended_key	dd 0 ;+88
3053
.extended_key	dd 0 ;+88
3051
.menu_sel_col	dd 0x00cc00 ;+92
3054
.menu_sel_col	dd 0x00cc00 ;+92
3052
.bckg_text_col	dd 0 ; +96
3055
.bckg_text_col	dd 0 ; +96
3053
.frnt_text_col	dd 0xffffff ;+100
3056
.frnt_text_col	dd 0xffffff ;+100
3054
.mouse_keys_old dd 0 ;+104
3057
.mouse_keys_old dd 0 ;+104
3055
.font_height	dd 8 ;+108
3058
.font_height	dd 8 ;+108
3056
.cursor_out	dd 0 ;+112
3059
.cursor_out	dd 0 ;+112
3057
.get_mouse_flag dd 0 ;+116
3060
.get_mouse_flag dd 0 ;+116
3058
;---------------------------------------------------------------------
3061
;---------------------------------------------------------------------
3059
menu_text_area_3:
3062
menu_text_area_3:
3060
db 'Filter',0
3063
db 'Filter',0
3061
.1:
3064
.1:
3062
db '*.* - show all',0
3065
db '*.* - show all',0
3063
db 'Only supported',0
3066
db 'Only supported',0
3064
.end:
3067
.end:
3065
db 0
3068
db 0
3066
;---------------------------------------------------------------------
3069
;---------------------------------------------------------------------
3067
 
3070
 
3068
align 4
3071
align 4
3069
scroll_bar_data_vertical:
3072
scroll_bar_data_vertical:
3070
.x:
3073
.x:
3071
.size_x 	dw 15 ;+0
3074
.size_x 	dw 15 ;+0
3072
.start_x	dw 500 ;+2
3075
.start_x	dw 500 ;+2
3073
.y:
3076
.y:
3074
.size_y 	dw 300 ;+4
3077
.size_y 	dw 300 ;+4
3075
.start_y	dw 45 ;+6
3078
.start_y	dw 45 ;+6
3076
.btn_high	dd 15 ;+8
3079
.btn_high	dd 15 ;+8
3077
.type		dd 2  ;+12
3080
.type		dd 2  ;+12
3078
.max_area	dd 10  ;+16
3081
.max_area	dd 10  ;+16
3079
.cur_area	dd 2  ;+20
3082
.cur_area	dd 2  ;+20
3080
.position	dd 0  ;+24
3083
.position	dd 0  ;+24
3081
.bckg_col	dd 0xeeeeee ;+28
3084
.bckg_col	dd 0xeeeeee ;+28
3082
.frnt_col	dd 0xbbddff ;+32 ;0x8aeaa0
3085
.frnt_col	dd 0xbbddff ;+32 ;0x8aeaa0
3083
.line_col	dd 0  ;+36
3086
.line_col	dd 0  ;+36
3084
.redraw 	dd 0  ;+40
3087
.redraw 	dd 0  ;+40
3085
.delta		dw 0  ;+44
3088
.delta		dw 0  ;+44
3086
.delta2 	dw 0  ;+46
3089
.delta2 	dw 0  ;+46
3087
.run_x:
3090
.run_x:
3088
.r_size_x	dw 0  ;+48
3091
.r_size_x	dw 0  ;+48
3089
.r_start_x	dw 0  ;+50
3092
.r_start_x	dw 0  ;+50
3090
.run_y:
3093
.run_y:
3091
.r_size_y	dw 0 ;+52
3094
.r_size_y	dw 0 ;+52
3092
.r_start_y	dw 0 ;+54
3095
.r_start_y	dw 0 ;+54
3093
.m_pos		dd 0 ;+56
3096
.m_pos		dd 0 ;+56
3094
.m_pos_2	dd 0 ;+60
3097
.m_pos_2	dd 0 ;+60
3095
.m_keys 	dd 0 ;+64
3098
.m_keys 	dd 0 ;+64
3096
.run_size	dd 0 ;+68
3099
.run_size	dd 0 ;+68
3097
.position2	dd 0 ;+72
3100
.position2	dd 0 ;+72
3098
.work_size	dd 0 ;+76
3101
.work_size	dd 0 ;+76
3099
.all_redraw	dd 0 ;+80
3102
.all_redraw	dd 0 ;+80
3100
.ar_offset	dd 1 ;+84
3103
.ar_offset	dd 1 ;+84
3101
;---------------------------------------------------------------------
3104
;---------------------------------------------------------------------
3102
align 4
3105
align 4
3103
file_browser_data_1:
3106
file_browser_data_1:
3104
.type				dd 0 ;+0
3107
.type				dd 0 ;+0
3105
.x:
3108
.x:
3106
.size_x 			dw 400 ;+4
3109
.size_x 			dw 400 ;+4
3107
.start_x			dw 10 ;+6
3110
.start_x			dw 10 ;+6
3108
.y:
3111
.y:
3109
.size_y 			dw 550 ;+8
3112
.size_y 			dw 550 ;+8
3110
.start_y			dw 45 ;+10
3113
.start_y			dw 45 ;+10
3111
.icon_size_y			dw 16 ; +12
3114
.icon_size_y			dw 16 ; +12
3112
.icon_size_x			dw 16 ; +14
3115
.icon_size_x			dw 16 ; +14
3113
.line_size_x			dw 0 ; +16
3116
.line_size_x			dw 0 ; +16
3114
.line_size_y			dw 18 ; +18
3117
.line_size_y			dw 18 ; +18
3115
.type_size_x			dw 0 ; +20
3118
.type_size_x			dw 0 ; +20
3116
.size_size_x			dw 0 ; +22
3119
.size_size_x			dw 0 ; +22
3117
.date_size_x			dw 0 ; +24
3120
.date_size_x			dw 0 ; +24
3118
.attributes_size_x		dw 0 ; +26
3121
.attributes_size_x		dw 0 ; +26
3119
.icon_assoc_area		dd 0 ; +28
3122
.icon_assoc_area		dd 0 ; +28
3120
.icon_raw_area			dd 0 ; +32
3123
.icon_raw_area			dd 0 ; +32
3121
.resolution_raw 		dd 0 ; +36
3124
.resolution_raw 		dd 0 ; +36
3122
.palette_raw			dd 0 ; +40
3125
.palette_raw			dd 0 ; +40
3123
.directory_path_area		dd 0 ; +44
3126
.directory_path_area		dd 0 ; +44
3124
.file_name_area 		dd 0 ; +48
3127
.file_name_area 		dd 0 ; +48
3125
.select_flag			dd 0 ; +52
3128
.select_flag			dd 0 ; +52
3126
.background_color		dd 0xffffff ; +56
3129
.background_color		dd 0xffffff ; +56
3127
.select_color			dd 0xbbddff ; +60
3130
.select_color			dd 0xbbddff ; +60
3128
.seclect_text_color		dd 0 ; +64
3131
.seclect_text_color		dd 0 ; +64
3129
.text_color			dd 0 ; +68
3132
.text_color			dd 0 ; +68
3130
.reduct_text_color		dd 0xff0000 ; +72
3133
.reduct_text_color		dd 0xff0000 ; +72
3131
.marked_text_color		dd 0 ; +76
3134
.marked_text_color		dd 0 ; +76
3132
.max_panel_line 		dd 0 ; +80
3135
.max_panel_line 		dd 0 ; +80
3133
.select_panel_counter		dd 1 ; +84
3136
.select_panel_counter		dd 1 ; +84
3134
.folder_block			dd 0 ; +88
3137
.folder_block			dd 0 ; +88
3135
.start_draw_line		dd 0 ; +92
3138
.start_draw_line		dd 0 ; +92
3136
.start_draw_cursor_line 	dw 0 ; +96 ; pixels
3139
.start_draw_cursor_line 	dw 0 ; +96 ; pixels
3137
.folder_data			dd 0 ; +98
3140
.folder_data			dd 0 ; +98
3138
.temp_counter			dd 0 ; +102
3141
.temp_counter			dd 0 ; +102
3139
.file_name_length		dd 0 ; +106
3142
.file_name_length		dd 0 ; +106
3140
.marked_file			dd 0 ; +110
3143
.marked_file			dd 0 ; +110
3141
.extension_size 		dd 0 ; +114
3144
.extension_size 		dd 0 ; +114
3142
.extension_start		dd 0 ; +118
3145
.extension_start		dd 0 ; +118
3143
.type_table			dd features_table ; +122
3146
.type_table			dd features_table ; +122
3144
.ini_file_start 		dd 0 ; +126
3147
.ini_file_start 		dd 0 ; +126
3145
.ini_file_end			dd 0 ; +130
3148
.ini_file_end			dd 0 ; +130
3146
.draw_scroll_bar		dd 0 ; +134
3149
.draw_scroll_bar		dd 0 ; +134
3147
.font_size_y			dw 9 ; +138
3150
.font_size_y			dw 9 ; +138
3148
.font_size_x			dw 6 ; +140
3151
.font_size_x			dw 6 ; +140
3149
.mouse_keys			dd 0 ; +142
3152
.mouse_keys			dd 0 ; +142
3150
.mouse_keys_old 		dd 0 ; +146
3153
.mouse_keys_old 		dd 0 ; +146
3151
.mouse_pos			dd 0 ; +150
3154
.mouse_pos			dd 0 ; +150
3152
.mouse_keys_delta		dd 0 ; +154
3155
.mouse_keys_delta		dd 0 ; +154
3153
.mouse_key_delay		dd 50 ; +158
3156
.mouse_key_delay		dd 50 ; +158
3154
.mouse_keys_tick		dd 0 ; +162
3157
.mouse_keys_tick		dd 0 ; +162
3155
.start_draw_cursor_line_2	dw 0 ;+166
3158
.start_draw_cursor_line_2	dw 0 ;+166
3156
.all_redraw			dd 0 ;+168
3159
.all_redraw			dd 0 ;+168
3157
.selected_BDVK_adress		dd 0 ;+172
3160
.selected_BDVK_adress		dd 0 ;+172
3158
.key_action			dw 0 ;+176
3161
.key_action			dw 0 ;+176
3159
.key_action_num			dw 0 ;+178
3162
.key_action_num			dw 0 ;+178
3160
.name_temp_area 		dd name_temp_area ;+180
3163
.name_temp_area 		dd name_temp_area ;+180
3161
.max_name_temp_size		dd 0 ;+184
3164
.max_name_temp_size		dd 0 ;+184
3162
.display_name_max_length	dd 0 ;+188
3165
.display_name_max_length	dd 0 ;+188
3163
.draw_panel_selection_flag	dd 0 ;+192
3166
.draw_panel_selection_flag	dd 0 ;+192
3164
.mouse_pos_old			dd 0 ;+196
3167
.mouse_pos_old			dd 0 ;+196
3165
.marked_counter 		dd 0 ;+200
3168
.marked_counter 		dd 0 ;+200
3166
.keymap_pointer 		dd keymap_area ;+204
3169
.keymap_pointer 		dd keymap_area ;+204
3167
;---------------------------------------------------------------------
3170
;---------------------------------------------------------------------
3168
PathShow_data_1:
3171
PathShow_data_1:
3169
.type			dd 0	;+0
3172
.type			dd 0	;+0
3170
.start_y		dw 11	;+4
3173
.start_y		dw 11	;+4
3171
.start_x		dw 10	;+6
3174
.start_x		dw 10	;+6
3172
.font_size_x		dw 6	;+8	; 6 - for font 0, 8 - for font 1
3175
.font_size_x		dw 6	;+8	; 6 - for font 0, 8 - for font 1
3173
.area_size_x		dw 200	;+10
3176
.area_size_x		dw 200	;+10
3174
.font_number		dd 0	;+12	; 0 - monospace, 1 - variable
3177
.font_number		dd 0	;+12	; 0 - monospace, 1 - variable
3175
.background_flag	dd 0	;+16
3178
.background_flag	dd 0	;+16
3176
.font_color		dd 0x0	;+20
3179
.font_color		dd 0x0	;+20
3177
.background_color	dd 0x0	;+24
3180
.background_color	dd 0x0	;+24
3178
.text_pointer		dd dir_path	;+28
3181
.text_pointer		dd dir_path	;+28
3179
.work_area_pointer	dd text_work_area	;+32
3182
.work_area_pointer	dd text_work_area	;+32
3180
.temp_text_length	dd 0	;+36
3183
.temp_text_length	dd 0	;+36
3181
;---------------------------------------------------------------------
3184
;---------------------------------------------------------------------
3182
; for EDITBOX
3185
; for EDITBOX
3183
align	4
3186
align	4
3184
name_editboxes:
3187
name_editboxes:
3185
edit1	edit_box 200,10,7,0xffffff,0xbbddff,0,0,0,4095,user_selected_name,mouse_dd,,0
3188
edit1	edit_box 200,10,7,0xffffff,0xbbddff,0,0,0,4095,user_selected_name,mouse_dd,,0
3186
name_editboxes_end:
3189
name_editboxes_end:
3187
 
3190
 
3188
;mouse_flag:	dd 0x0
3191
;mouse_flag:	dd 0x0
3189
 
3192
 
3190
mouse_dd rd	1
3193
mouse_dd rd	1
3191
;---------------------------------------------------------------------
3194
;---------------------------------------------------------------------
3192
window_x:
3195
window_x:
3193
.x_size		dw 420
3196
.x_size		dw 420
3194
.x_start	dw 10
3197
.x_start	dw 10
3195
window_y:
3198
window_y:
3196
.y_size		dw 320
3199
.y_size		dw 320
3197
.y_start	dw 10
3200
.y_start	dw 10
3198
;---------------------------------------------------------------------
3201
;---------------------------------------------------------------------
3199
features_table:
3202
features_table:
3200
.type_table:
3203
.type_table:
3201
	db ' '
3204
	db ' '
3202
;---------------------------------------------------------------------
3205
;---------------------------------------------------------------------
3203
.size_table:
3206
.size_table:
3204
	db '1023b '
3207
	db '1023b '
3205
;---------------------------------------------------------------------
3208
;---------------------------------------------------------------------
3206
.date_table:
3209
.date_table:
3207
	db '00.00.00 00:00 '
3210
	db '00.00.00 00:00 '
3208
;---------------------------------------------------------------------
3211
;---------------------------------------------------------------------
3209
.year_table:
3212
.year_table:
3210
	db '    '
3213
	db '    '
3211
;---------------------------------------------------------------------
3214
;---------------------------------------------------------------------
3212
example_name_temp:	
3215
example_name_temp:	
3213
	db 'temp1.asm',0
3216
	db 'temp1.asm',0
3214
;---------------------------------------------------------------------
3217
;---------------------------------------------------------------------
3215
IM_END:
3218
IM_END:
3216
;---------------------------------------------------------------------
3219
;---------------------------------------------------------------------
3217
do_not_draw_open_button_label	rb 1
3220
do_not_draw_open_button_label	rb 1
3218
;---------------------------------------------------------------------
3221
;---------------------------------------------------------------------
3219
;include_debug_strings
3222
;include_debug_strings
3220
;---------------------------------------------------------------------
3223
;---------------------------------------------------------------------
3221
align 4
3224
align 4
3222
app_colours:
3225
app_colours:
3223
 
3226
 
3224
w_frame			rd 1
3227
w_frame			rd 1
3225
w_grab			rd 1
3228
w_grab			rd 1
3226
w_grab_button		rd 1
3229
w_grab_button		rd 1
3227
w_grab_button_text	rd 1
3230
w_grab_button_text	rd 1
3228
w_grab_text		rd 1
3231
w_grab_text		rd 1
3229
w_work			rd 1
3232
w_work			rd 1
3230
w_work_button		rd 1
3233
w_work_button		rd 1
3231
w_work_button_text	rd 1
3234
w_work_button_text	rd 1
3232
w_work_text		rd 1
3235
w_work_text		rd 1
3233
w_work_graph		rd 1
3236
w_work_graph		rd 1
3234
;---------------------------------------------------------------------
3237
;---------------------------------------------------------------------
3235
open_button_coordinates	rd 1
3238
open_button_coordinates	rd 1
3236
;---------------------------------------------------------------------
3239
;---------------------------------------------------------------------
3237
error_handler_store_input_mode rd 1
3240
error_handler_store_input_mode rd 1
3238
;---------------------------------------------------------------------
3241
;---------------------------------------------------------------------
3239
menu_text_area_1_1:
3242
menu_text_area_1_1:
3240
rb 256
3243
rb 256
3241
;---------------------------------------------------------------------
3244
;---------------------------------------------------------------------
3242
	rb 1024
3245
	rb 1024
3243
stacktop:
3246
stacktop:
3244
;---------------------------------------------------------------------
3247
;---------------------------------------------------------------------
3245
; window error message
3248
; window error message
3246
	rb 1024
3249
	rb 1024
3247
thread_stack:
3250
thread_stack:
3248
;---------------------------------------------------------------------
3251
;---------------------------------------------------------------------
3249
retrieved_devices_table:
3252
retrieved_devices_table:
3250
	rb 200
3253
	rb 200
3251
;---------------------------------------------------------------------
3254
;---------------------------------------------------------------------
3252
keymap_area:
3255
keymap_area:
3253
	rb 128
3256
	rb 128
3254
;---------------------------------------------------------------------
3257
;---------------------------------------------------------------------
3255
name_temp_area:
3258
name_temp_area:
3256
	rb 256
3259
	rb 256
3257
;---------------------------------------------------------------------
3260
;---------------------------------------------------------------------
3258
user_selected_name:
3261
user_selected_name:
3259
	rb 256
3262
	rb 256
3260
;---------------------------------------------------------------------
3263
;---------------------------------------------------------------------
3261
param:
3264
param:
3262
	rb 256
3265
	rb 256
3263
;---------------------------------------------------------------------
3266
;---------------------------------------------------------------------
3264
path:
3267
path:
3265
	rb 4096
3268
	rb 4096
3266
;---------------------------------------------------------------------
3269
;---------------------------------------------------------------------
3267
file_name:
3270
file_name:
3268
	rb 4096
3271
	rb 4096
3269
;---------------------------------------------------------------------
3272
;---------------------------------------------------------------------
3270
previous_dir_path:
3273
previous_dir_path:
3271
	rb 4096
3274
	rb 4096
3272
;---------------------------------------------------------------------
3275
;---------------------------------------------------------------------
3273
dir_path:
3276
dir_path:
3274
	rb 4096
3277
	rb 4096
3275
;---------------------------------------------------------------------
3278
;---------------------------------------------------------------------
3276
dir_path_temp:
3279
dir_path_temp:
3277
	rb 4096
3280
	rb 4096
3278
;---------------------------------------------------------------------
3281
;---------------------------------------------------------------------
3279
text_work_area:
3282
text_work_area:
3280
	rb 1024
3283
	rb 1024
3281
;---------------------------------------------------------------------
3284
;---------------------------------------------------------------------
3282
procinfo:
3285
procinfo:
3283
process_info:
3286
process_info:
3284
	rb 1024
3287
	rb 1024
3285
;----------------------
3288
;----------------------
3286
file_info:
3289
file_info:
3287
	rb 40
3290
	rb 40
3288
I_END:
3291
I_END: