1 ;---------------------------------------------------------------------
\r
4 load_libraries l_libs_start,end_l_libs
\r
8 ;---------------------------------------------------------------------
\r
12 ;---------------------------------------------------------------------
\r
13 ; mov [cnv_plugin_name_pointer],plugin_0_name
\r
14 load_convert_plugins:
\r
18 mov esi,[cnv_plugin_name_pointer]
\r
19 cmp [esi],dword 'NoKe'
\r
20 je clear_current_load_convert_plugins_area ;last_plugin
\r
21 mov edi,system_path.1
\r
26 load_library system_path.1, library_path, system_path, \
\r
27 [cnv_plugin_import_pointer], plugins_directory
\r
31 load_convert_plugins_next:
\r
32 add [cnv_plugin_import_pointer],dword 24
\r
33 add [cnv_plugin_name_pointer],128
\r
36 jnz load_convert_plugins.1
\r
38 ; jmp load_convert_plugins
\r
43 call dword [sort_init]
\r
45 mov eax,[unpack_DeflateUnpack2]
\r
46 mov [deflate_unpack],eax
\r
48 ;-----------------------------------------
\r
49 clear_current_load_convert_plugins_area:
\r
51 mov edi,[cnv_plugin_import_pointer]
\r
57 jmp load_convert_plugins_next
\r
58 ;---------------------------------------------------------------------
\r
91 ;---------------------------------------------------------------------
\r
95 mov [fileinfo+0],dword 5
\r
96 mov [fileinfo+12],dword 0
\r
97 mov [fileinfo+16],dword process_info
\r
101 mov ecx,[raw_pointer]
\r
105 ; cmp [raw_pointer_2],dword 0
\r
107 ; mov ecx,[raw_pointer_2] ;[soi]
\r
109 ; mov [raw_pointer_2],0
\r
116 mov [fileinfo+0],dword 0
\r
118 mov ecx,[process_info+32]
\r
120 ; for Diamond emulator, and broken files - size = 0
\r
128 mov [fileinfo+12],ecx
\r
133 mov [fileinfo+16],eax
\r
134 mov [image_file],eax
\r
141 ;---------------------------------------------------------------------
\r
143 cmp [RAW1_pointer],0
\r
147 mcall 68, 13,[previous_frame_pointer]
\r
154 add edx,[RAW1_pointer]
\r
160 cmp [Total_Repeat_N],eax
\r
163 mov ecx,[RAW1_pointer]
\r
167 mov [RAW1_pointer],eax
\r
172 ;---------------------------------------------------------------------
\r
176 mov edi,plugin_pach
\r
177 mov ebx,buttons_directory
\r
178 mov ecx,button_name ;buttons_passive_name
\r
181 mov [fileinfo.name], dword plugin_pach
\r
184 mov [raw_pointer_2],eax
\r
191 call convert_plugin_invoke
\r
192 mov eax,[return_code]
\r
197 mov ebx,[raw_pointer]
\r
199 mov [dinamic_button_data_1.size_x],ax
\r
200 mov [dinamic_button_data_1.size_y],ax
\r
201 mov [dinamic_button_data_2.size_x],ax
\r
202 mov [dinamic_button_data_2.size_y],ax
\r
203 mov [dinamic_button_data_3.size_x],ax
\r
204 mov [dinamic_button_data_3.size_y],ax
\r
205 mov [dinamic_button_data_4.size_x],ax
\r
206 mov [dinamic_button_data_4.size_y],ax
\r
207 mov [dinamic_button_data_5.size_x],ax
\r
208 mov [dinamic_button_data_5.size_y],ax
\r
209 mov [dinamic_button_data_6.size_x],ax
\r
210 mov [dinamic_button_data_6.size_y],ax
\r
211 mov [dinamic_button_data_7.size_x],ax
\r
212 mov [dinamic_button_data_7.size_y],ax
\r
213 mov [dinamic_button_data_8.size_x],ax
\r
214 mov [dinamic_button_data_8.size_y],ax
\r
215 mov [dinamic_button_data_9.size_x],ax
\r
216 mov [dinamic_button_data_9.size_y],ax
\r
217 mov [dinamic_button_data_10.size_x],ax
\r
218 mov [dinamic_button_data_10.size_y],ax
\r
219 mov [dinamic_button_data_11.size_x],ax
\r
220 mov [dinamic_button_data_11.size_y],ax
\r
221 mov [dinamic_button_data_12.size_x],ax
\r
222 mov [dinamic_button_data_12.size_y],ax
\r
223 mov [dinamic_button_data_13.size_x],ax
\r
224 mov [dinamic_button_data_13.size_y],ax
\r
225 mov [dinamic_button_data_14.size_x],ax
\r
226 mov [dinamic_button_data_14.size_y],ax
\r
227 mov [dinamic_button_data_15.size_x],ax
\r
228 mov [dinamic_button_data_15.size_y],ax
\r
230 mov [dinamic_button_data_1.resolution_raw],eax
\r
231 mov [dinamic_button_data_2.resolution_raw],eax
\r
232 mov [dinamic_button_data_3.resolution_raw],eax
\r
233 mov [dinamic_button_data_4.resolution_raw],eax
\r
234 mov [dinamic_button_data_5.resolution_raw],eax
\r
235 mov [dinamic_button_data_6.resolution_raw],eax
\r
236 mov [dinamic_button_data_7.resolution_raw],eax
\r
237 mov [dinamic_button_data_8.resolution_raw],eax
\r
238 mov [dinamic_button_data_9.resolution_raw],eax
\r
239 mov [dinamic_button_data_10.resolution_raw],eax
\r
240 mov [dinamic_button_data_11.resolution_raw],eax
\r
241 mov [dinamic_button_data_12.resolution_raw],eax
\r
242 mov [dinamic_button_data_13.resolution_raw],eax
\r
243 mov [dinamic_button_data_14.resolution_raw],eax
\r
244 mov [dinamic_button_data_15.resolution_raw],eax
\r
247 mov [dinamic_button_data_1.palette_raw],eax
\r
248 mov [dinamic_button_data_2.palette_raw],eax
\r
249 mov [dinamic_button_data_3.palette_raw],eax
\r
250 mov [dinamic_button_data_4.palette_raw],eax
\r
251 mov [dinamic_button_data_5.palette_raw],eax
\r
252 mov [dinamic_button_data_6.palette_raw],eax
\r
253 mov [dinamic_button_data_7.palette_raw],eax
\r
254 mov [dinamic_button_data_8.palette_raw],eax
\r
255 mov [dinamic_button_data_9.palette_raw],eax
\r
256 mov [dinamic_button_data_10.palette_raw],eax
\r
257 mov [dinamic_button_data_11.palette_raw],eax
\r
258 mov [dinamic_button_data_12.palette_raw],eax
\r
259 mov [dinamic_button_data_13.palette_raw],eax
\r
260 mov [dinamic_button_data_14.palette_raw],eax
\r
261 mov [dinamic_button_data_15.palette_raw],eax
\r
265 mov [dinamic_button_data_1.passive_raw],eax
\r
271 mov [dinamic_button_data_2.passive_raw],eax
\r
273 mov [dinamic_button_data_3.passive_raw],eax
\r
275 mov [dinamic_button_data_4.passive_raw],eax
\r
277 mov [dinamic_button_data_5.passive_raw],eax
\r
279 mov [dinamic_button_data_6.passive_raw],eax
\r
281 mov [dinamic_button_data_7.passive_raw],eax
\r
283 mov [dinamic_button_data_8.passive_raw],eax
\r
285 mov [dinamic_button_data_9.passive_raw],eax
\r
287 mov [dinamic_button_data_10.passive_raw],eax
\r
289 mov [dinamic_button_data_11.passive_raw],eax
\r
291 mov [dinamic_button_data_12.passive_raw],eax
\r
293 mov [dinamic_button_data_13.passive_raw],eax
\r
295 mov [dinamic_button_data_14.passive_raw],eax
\r
297 mov [dinamic_button_data_15.passive_raw],eax
\r
298 ;------------------------------------
\r
299 movzx ebx,word [dinamic_button_data_1.size_x]
\r
300 movzx eax,word [dinamic_button_data_1.size_y]
\r
303 mov ebx,[dinamic_button_data_1.resolution_raw]
\r
310 mov [dinamic_button_data_1.active_raw],eax
\r
312 mov [dinamic_button_data_2.active_raw],eax
\r
314 mov [dinamic_button_data_3.active_raw],eax
\r
316 mov [dinamic_button_data_4.active_raw],eax
\r
318 mov [dinamic_button_data_5.active_raw],eax
\r
320 mov [dinamic_button_data_6.active_raw],eax
\r
322 mov [dinamic_button_data_7.active_raw],eax
\r
324 mov [dinamic_button_data_8.active_raw],eax
\r
326 mov [dinamic_button_data_9.active_raw],eax
\r
328 mov [dinamic_button_data_10.active_raw],eax
\r
330 mov [dinamic_button_data_11.active_raw],eax
\r
332 mov [dinamic_button_data_12.active_raw],eax
\r
334 mov [dinamic_button_data_13.active_raw],eax
\r
336 mov [dinamic_button_data_14.active_raw],eax
\r
338 mov [dinamic_button_data_15.active_raw],eax
\r
339 ;------------------------------------
\r
342 mov [dinamic_button_data_1.click_raw],eax
\r
344 mov [dinamic_button_data_2.click_raw],eax
\r
346 mov [dinamic_button_data_3.click_raw],eax
\r
348 mov [dinamic_button_data_4.click_raw],eax
\r
350 mov [dinamic_button_data_5.click_raw],eax
\r
352 mov [dinamic_button_data_6.click_raw],eax
\r
354 mov [dinamic_button_data_7.click_raw],eax
\r
356 mov [dinamic_button_data_8.click_raw],eax
\r
358 mov [dinamic_button_data_9.click_raw],eax
\r
360 mov [dinamic_button_data_10.click_raw],eax
\r
362 mov [dinamic_button_data_11.click_raw],eax
\r
364 mov [dinamic_button_data_12.click_raw],eax
\r
366 mov [dinamic_button_data_13.click_raw],eax
\r
368 mov [dinamic_button_data_14.click_raw],eax
\r
370 mov [dinamic_button_data_15.click_raw],eax
\r
371 ;------------------------------------
\r
372 mov [fileinfo.name], dword string
\r
376 ;---------------------------------------------------------------------
\r
378 cmp [load_directory_pointer],dir_header ;dword 0
\r
380 mcall 68, 13, [load_directory_pointer]
\r
382 call .copy_dir_path
\r
383 mov [dirinfo.size],dword 0
\r
384 mov [dirinfo.return],dir_header ;procinfo
\r
389 mov ecx,[dir_header.totl_blocks] ;[procinfo+8]
\r
390 mov [dirinfo.size],ecx
\r
394 mov [dirinfo.return],eax
\r
395 mov [load_directory_pointer],eax
\r
400 call delete_unsupported_BDFE
\r
402 call sort_directory
\r
403 ; add [load_directory_pointer],2*304+32+40
\r
404 mov ebp,[load_directory_pointer]
\r
414 mov ecx,[file_name_length]
\r
417 add edi,[load_directory_pointer]
\r
438 mov [load_file_number],eax
\r
441 mov [load_file_number],ebp
\r
445 ;-------------------------------------------
\r
447 mov esi,string ;path
\r
448 mov edi,plugin_pach
\r
451 mov [file_name_length],ebx
\r
453 ;---------------------------------------------------------------------
\r
456 push dword [sort_type] ;2 ; ðåæèì ñîðòèðîâêè
\r
457 mov eax,[load_directory_pointer]
\r
458 push dword [eax+4] ;[dirdata+4] ; ÷èñëî ôàéëîâ
\r
459 ; ìîæíî ïèñàòü push ebx, åñëè
\r
460 ; äåëî ïðîèñõîäèò íåïîñðåäñòâåííî ïîñëå int 0x40
\r
462 push eax ;dirdata+32 ; äàííûå ôàéëîâ
\r
463 ; call [plugin_sort]
\r
467 ;---------------------------------------------------------------------
\r
468 delete_unsupported_BDFE:
\r
470 mov [fileinfo.subfunction],dword 0
\r
471 mov [fileinfo.size],dword 32
\r
472 mov [fileinfo.name], dword plugin_pach
\r
474 mov eax,process_info
\r
475 mov [fileinfo.return],eax
\r
476 mov [image_file],eax
\r
478 mov ebx,[load_directory_pointer]
\r
483 mov eax,[load_directory_pointer]
\r
497 cmp [eax],word '..'
\r
502 test [eax-40],byte 0x10
\r
507 call search_expansion
\r
512 ; mov edi,[test_area+4]
\r
516 mov edi,plugin_0_name
\r
517 cmp [edi],dword 'NoKe'
\r
520 push eax ebx ecx esi
\r
521 mov edi,[Convert_plugin_0.Assoc]
\r
524 pop esi ecx ebx eax
\r
527 call compare_expansion
\r
529 pop esi ecx ebx eax
\r
532 mov edi,plugin_1_name
\r
533 cmp [edi],dword 'NoKe'
\r
536 push eax ebx ecx esi
\r
537 mov edi,[Convert_plugin_1.Assoc]
\r
540 pop esi ecx ebx eax
\r
543 call compare_expansion
\r
545 pop esi ecx ebx eax
\r
548 mov edi,plugin_2_name
\r
549 cmp [edi],dword 'NoKe'
\r
552 push eax ebx ecx esi
\r
553 mov edi,[Convert_plugin_2.Assoc]
\r
556 pop esi ecx ebx eax
\r
559 call compare_expansion
\r
561 pop esi ecx ebx eax
\r
564 mov edi,plugin_3_name
\r
565 cmp [edi],dword 'NoKe'
\r
568 push eax ebx ecx esi
\r
569 mov edi,[Convert_plugin_3.Assoc]
\r
572 pop esi ecx ebx eax
\r
575 call compare_expansion
\r
577 pop esi ecx ebx eax
\r
580 mov edi,plugin_4_name
\r
581 cmp [edi],dword 'NoKe'
\r
584 push eax ebx ecx esi
\r
585 mov edi,[Convert_plugin_4.Assoc]
\r
588 pop esi ecx ebx eax
\r
591 call compare_expansion
\r
593 pop esi ecx ebx eax
\r
596 mov edi,plugin_5_name
\r
597 cmp [edi],dword 'NoKe'
\r
600 push eax ebx ecx esi
\r
601 mov edi,[Convert_plugin_5.Assoc]
\r
604 pop esi ecx ebx eax
\r
607 call compare_expansion
\r
609 pop esi ecx ebx eax
\r
612 mov edi,plugin_6_name
\r
613 cmp [edi],dword 'NoKe'
\r
616 push eax ebx ecx esi
\r
617 mov edi,[Convert_plugin_6.Assoc]
\r
620 pop esi ecx ebx eax
\r
623 call compare_expansion
\r
625 pop esi ecx ebx eax
\r
628 mov edi,plugin_7_name
\r
629 cmp [edi],dword 'NoKe'
\r
632 push eax ebx ecx esi
\r
633 mov edi,[Convert_plugin_7.Assoc]
\r
636 pop esi ecx ebx eax
\r
639 call compare_expansion
\r
641 pop esi ecx ebx eax
\r
644 mov edi,plugin_8_name
\r
645 cmp [edi],dword 'NoKe'
\r
648 push eax ebx ecx esi
\r
649 mov edi,[Convert_plugin_8.Assoc]
\r
652 pop esi ecx ebx eax
\r
655 call compare_expansion
\r
657 pop esi ecx ebx eax
\r
660 mov edi,plugin_9_name
\r
661 cmp [edi],dword 'NoKe'
\r
664 push eax ebx ecx esi
\r
665 mov edi,[Convert_plugin_9.Assoc]
\r
668 pop esi ecx ebx eax
\r
671 call compare_expansion
\r
673 pop esi ecx ebx eax
\r
675 ;-------------------------------------------
\r
694 mov [fileinfo.name], dword string
\r
696 ;---------------------------------------------------------------------
\r
698 mov [start_appl.parameter],dword string
\r
699 mov [start_appl.name],dword Editor_path
\r
700 mcall 70, start_appl
\r
702 ;---------------------------------------------------------------------
\r
704 mov ebx,key_help_name
\r
706 mov edi,library_path
\r
707 call copy_file_path
\r
708 mov [start_appl.parameter],dword library_path
\r
709 mov [start_appl.name],dword Help_path
\r
710 mcall 70, start_appl
\r
712 ;---------------------------------------------------------------------
\r
714 ; convert character to uppercase, using cp866 encoding
\r
716 ; out: al=converted symbol
\r
727 ; 0x90-0x9F -> 0xE0-0xEF
\r
732 ; 0x80-0x8F -> 0xA0-0xAF
\r
736 ;---------------------------------------------------------------------
\r
762 mov edi,ebx ;file_name
\r
773 mov [esi+1], byte 0
\r
776 ;---------------------------------------------------------------------
\r
802 ;---------------------------------------------------------------------
\r
824 mov [expansion_length],ebx
\r
834 ;---------------------------------------------------------------------
\r
842 mov ecx,[expansion_length]
\r
875 ;---------------------------------------------------------------------