Subversion Repositories Kolibri OS

Rev

Rev 3321 | Rev 9568 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. use32
  2.         org 0x0
  3.         db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
  4.         dd 0x1
  5.         dd start
  6.         dd i_end ;à §¬¥à ¯à¨«®¦¥­¨ï
  7.         dd mem
  8.         dd stacktop
  9.         dd 0
  10.         dd sys_path
  11.  
  12. include '../../../../macros.inc'
  13. include '../../../../proc32.inc'
  14. include '../../../../develop/libraries/box_lib/load_lib.mac'
  15. include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
  16. include '../../../../dll.inc'
  17.  
  18. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  19. caption db '˜¨ä஢ ­¨¥  «£®à¨â¬®¬ DES 05.03.13',0 ;¯®¤¯¨áì ®ª­ 
  20.  
  21. struct FileInfoBlock
  22.         Function dd ?
  23.         Position dd ?
  24.         Flags    dd ?
  25.         Count    dd ?
  26.         Buffer   dd ?
  27.                 db ?
  28.         FileName dd ?
  29. ends
  30.  
  31. run_file_70 FileInfoBlock
  32. image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  33.  
  34. fn_toolbar db 'toolbar.png',0
  35. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  36. IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
  37. image_data_toolbar dd 0
  38.  
  39. IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
  40.  
  41. max_open_file_size equ 64*1024 ;64 Kb
  42.  
  43. macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
  44.         ;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
  45.         if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
  46.                 jmp @f
  47.                         local .path_str
  48.                         .path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
  49.                         db 0
  50.                 @@:
  51.                 ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
  52.                 copy_path .path_str,[32],file_name,0x0
  53.         else
  54.                 copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
  55.         end if
  56.  
  57.         stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
  58.         mov [buf],eax
  59.  
  60.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  61.         mov [run_file_70.Function], 0
  62.         mov [run_file_70.Position], 0
  63.         mov [run_file_70.Flags], 0
  64.         mov [run_file_70.Count], dword size
  65.         m2m [run_file_70.Buffer], [buf]
  66.         mov byte[run_file_70+20], 0
  67.         mov [run_file_70.FileName], file_name
  68.         mov ebx,run_file_70
  69.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  70.         cmp ebx,0xffffffff
  71.         je @f
  72.                 ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
  73.                 stdcall dword[img_decode], dword[buf],ebx,0
  74.                 mov dword[image_data],eax
  75.                 ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  76.                 stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
  77.                 ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
  78.                 stdcall dword[img_destroy], dword[image_data]
  79.         @@:
  80. }
  81.  
  82.  
  83.  
  84. align 4
  85. start:
  86.         load_libraries l_libs_start,l_libs_end
  87.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  88.         mov     ebp,lib_0
  89.         cmp     dword [ebp+ll_struc_size-4],0
  90.         jz      @f
  91.                 mcall -1 ;exit not correct
  92.         @@:
  93.         mcall 48,3,sc,sizeof.system_colors
  94.         mcall 40,0xC0000027
  95.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  96.  
  97.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
  98.  
  99.         load_image_file 'font8x9.bmp', image_data_toolbar,IMAGE_FILE1_SIZE
  100.         stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
  101.         stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
  102.         stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
  103.         stdcall [buf2d_convert_text_matrix], buf_1
  104.  
  105.         load_image_file fn_toolbar, image_data_toolbar,IMAGE_TOOLBAR_SIZE
  106.  
  107.         stdcall mem.Alloc,max_open_file_size
  108.         mov dword[open_file],eax
  109.  
  110.         call but_new_file
  111.  
  112. align 4
  113. red_win:
  114.         call draw_window
  115.  
  116. align 4
  117. still:
  118.         mcall 10
  119.  
  120.         cmp al,1
  121.         jz red_win
  122.         cmp al,2
  123.         jz key
  124.         cmp al,3
  125.         jz button
  126.         cmp al,6 ;¬ëèì
  127.         jne @f
  128.                 jmp mouse
  129.         @@:
  130.         jmp still
  131.  
  132. align 4
  133. draw_window:
  134. pushad
  135.         mcall 12,1
  136.  
  137.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  138.         xor eax,eax
  139.         mov ebx,(20 shl 16)+480
  140.         mov ecx,(20 shl 16)+410
  141.         mov edx,[sc.work]
  142.         or  edx,(3 shl 24)+0x10000000+0x20000000
  143.         mov edi,caption
  144.         int 0x40
  145.  
  146.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  147.         mov eax,8
  148.         mov ebx,(5 shl 16)+20
  149.         mov ecx,(5 shl 16)+20
  150.         mov edx,3
  151.         mov esi,[sc.work_button]
  152.         int 0x40
  153.  
  154.         mov ebx,(30 shl 16)+20
  155.         mov edx,4
  156.         int 0x40
  157.  
  158.         mov ebx,(55 shl 16)+20
  159.         mov edx,5
  160.         int 0x40
  161.  
  162.         mov ebx,(85 shl 16)+20
  163.         mov edx,6
  164.         int 0x40
  165.  
  166.         mov ebx,(110 shl 16)+20
  167.         mov edx,7
  168.         int 0x40
  169.  
  170.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  171.         mov eax,7
  172.         mov ebx,[image_data_toolbar]
  173.         mov ecx,(16 shl 16)+16
  174.         mov edx,(7 shl 16)+7 ;icon new
  175.         int 0x40
  176.  
  177.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  178.         add edx,(25 shl 16) ;icon open
  179.         int 0x40
  180.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  181.         add edx,(25 shl 16) ;icon save
  182.         int 0x40
  183.  
  184.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  185.         add edx,(30 shl 16) ;
  186.         int 0x40
  187.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  188.         add edx,(25 shl 16) ;
  189.         int 0x40
  190.  
  191.         stdcall [edit_box_draw], edit1
  192.  
  193.         ; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
  194.         stdcall [buf2d_draw], buf_0
  195.  
  196.         mcall 12,2
  197. popad
  198.         ret
  199.  
  200. align 4
  201. key:
  202.         mcall 2
  203.         stdcall [edit_box_key], dword edit1
  204.         jmp still
  205.  
  206. align 4
  207. mouse:
  208.         stdcall [edit_box_mouse], edit1
  209.         jmp still
  210.  
  211. align 4
  212. button:
  213.         mcall 17
  214.         cmp ah,3
  215.         jne @f
  216.                 call but_new_file
  217.         @@:
  218.         cmp ah,4
  219.         jne @f
  220.                 call but_open_file
  221.         @@:
  222.         cmp ah,5
  223.         jne @f
  224.                 call but_save_file
  225.         @@:
  226.         cmp ah,6
  227.         jne @f
  228.                 call but_1
  229.         @@:
  230.         cmp ah,7
  231.         jne @f
  232.                 call but_2
  233.         @@:
  234.         cmp ah,1
  235.         jne still
  236. .exit:
  237.         stdcall [buf2d_delete],buf_0
  238.         stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
  239.         stdcall mem.Free,[image_data_toolbar]
  240.         stdcall mem.Free,[open_file]
  241.         mcall -1
  242.  
  243.  
  244. align 4
  245. but_new_file:
  246.         mov dword[open_file_size],0
  247.         call draw_file
  248.         ret
  249.  
  250. align 4
  251. open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  252. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ max_open_file_size)
  253.  
  254. align 4
  255. but_open_file:
  256.         pushad
  257.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  258.         mov [OpenDialog_data.type],0
  259.         stdcall [OpenDialog_Start],OpenDialog_data
  260.         cmp [OpenDialog_data.status],2
  261.         je .end_open_file
  262.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  263.  
  264.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  265.         mov [run_file_70.Function], 0
  266.         mov [run_file_70.Position], 0
  267.         mov [run_file_70.Flags], 0
  268.         mov dword[run_file_70.Count], max_open_file_size
  269.         m2m [run_file_70.Buffer], [open_file]
  270.         mov byte[run_file_70+20], 0
  271.         mov dword[run_file_70.FileName], openfile_path
  272.         mov ebx,run_file_70
  273.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  274.         cmp ebx,0xffffffff
  275.         je .end_open_file
  276.  
  277.         mov [open_file_size],ebx
  278.         add ebx,dword[open_file]
  279.         mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
  280.         mcall 71,1,openfile_path
  281.  
  282.         call draw_file
  283.         .end_open_file:
  284.         popad
  285.         ret
  286.  
  287. align 4
  288. draw_file:
  289. pushad
  290.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  291.         cmp dword[open_file_size],0
  292.         je .open_file
  293.         mov eax,[open_file]
  294.         mov ebx,3
  295.         mov edx,dword[open_file_size]
  296.         .cycle_0:
  297.                 mov edi,txt_buf
  298.                 mov esi,eax
  299.                 mov ecx,56
  300.                 ;cld
  301.                 rep movsb
  302.                 mov byte[edi],0
  303.                 mov edi,txt_buf
  304.                 mov ecx,56
  305.                 .cycle_1:
  306.                         cmp byte[edi],0
  307.                         je @f
  308.                         cmp byte[edi],13
  309.                         je @f
  310.                         jmp .ok
  311.                         @@:
  312.                                 mov byte[edi],' ' ;­¥¯¥ç â­ë¥ ᨬ¢®«ë § ¬¥­ï¥¬ ­  ¯à®¡¥«
  313.                         .ok:
  314.                         inc edi
  315.                         loop .cycle_1
  316.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,4,ebx,0xb0
  317.                 sub edx,56
  318.                 cmp edx,1
  319.                 jl @f
  320.                 add eax,56
  321.                 add ebx,10
  322.                 cmp ebx,dword[buf_0.h]
  323.                 jl .cycle_0
  324.         jmp @f
  325.         .open_file:
  326.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  327.         @@:
  328.         stdcall [buf2d_draw], buf_0
  329. popad
  330.         ret
  331.  
  332. align 4
  333. but_save_file:
  334.         pushad
  335.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  336.         mov [OpenDialog_data.type],1
  337.         stdcall [OpenDialog_Start],OpenDialog_data
  338.         cmp [OpenDialog_data.status],2
  339.         je .end_save_file
  340.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  341.  
  342.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  343.         mov [run_file_70.Function], 2
  344.         mov [run_file_70.Position], 0
  345.         mov [run_file_70.Flags], 0
  346.         mov ebx, dword[open_file]
  347.         mov [run_file_70.Buffer], ebx
  348.         mov ebx,[open_file_size]
  349.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  350.         mov byte[run_file_70+20], 0
  351.         mov dword[run_file_70.FileName], openfile_path
  352.         mov ebx,run_file_70
  353.         int 0x40 ;á®å࠭塞 ä ©« ¨§®¡à ¦¥­¨ï
  354.         ;cmp ebx,0xffffffff
  355.         ;je .end_save_file
  356.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  357.  
  358.         .end_save_file:
  359.         popad
  360.         ret
  361.  
  362. align 4
  363. but_1:
  364. push eax
  365.         mov eax,[open_file_size]
  366.         shr eax,3
  367.         stdcall [des_encryption], txt_key,mem_key,[open_file],eax
  368. pop eax
  369.         call draw_file
  370.         ret
  371.  
  372. align 4
  373. but_2:
  374. push eax
  375.         mov eax,[open_file_size]
  376.         shr eax,3
  377.         stdcall [des_decryption], txt_key,mem_key,[open_file],eax
  378. pop eax
  379.         call draw_file
  380.         ret
  381.  
  382. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  383. align 4
  384. OpenDialog_data:
  385. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  386. .procinfo               dd procinfo     ;+4
  387. .com_area_name          dd communication_area_name      ;+8
  388. .com_area               dd 0    ;+12
  389. .opendir_path           dd plugin_path  ;+16
  390. .dir_default_path       dd default_dir ;+20
  391. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  392. .draw_window            dd draw_window  ;+28
  393. .status                 dd 0    ;+32
  394. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  395. .filename_area          dd filename_area        ;+40
  396. .filter_area            dd Filter
  397. .x:
  398. .x_size                 dw 420 ;+48 ; Window X size
  399. .x_start                dw 10 ;+50 ; Window X position
  400. .y:
  401. .y_size                 dw 320 ;+52 ; Window y size
  402. .y_start                dw 10 ;+54 ; Window Y position
  403.  
  404. default_dir db '/rd/1',0
  405.  
  406. communication_area_name:
  407.         db 'FFFFFFFF_open_dialog',0
  408. open_dialog_name:
  409.         db 'opendial',0
  410. communication_area_default_path:
  411.         db '/rd/1/File managers/',0
  412.  
  413. Filter:
  414. dd Filter.end - Filter ;.1
  415. .1:
  416. db 'TXT',0
  417. db 'ASM',0
  418. .end:
  419. db 0
  420.  
  421.  
  422.  
  423. head_f_i:
  424. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  425.  
  426. system_dir_0 db '/sys/lib/'
  427. lib_name_0 db 'proc_lib.obj',0
  428. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  429. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  430.  
  431. system_dir_1 db '/sys/lib/'
  432. lib_name_1 db 'libimg.obj',0
  433. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  434. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  435.  
  436. system_dir_2 db '/sys/lib/'
  437. lib_name_2 db 'buf2d.obj',0
  438. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  439. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  440.  
  441. system_dir_3 db '/sys/lib/'
  442. lib_name_3 db 'crypt_des.obj',0
  443. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'crypt_des.obj',39,0
  444. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'crypt_des',39,0
  445.  
  446. system_dir_4 db '/sys/lib/'
  447. lib_name_4 db 'box_lib.obj',0
  448. err_msg_found_lib_4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'box_lib.obj',39,0
  449. err_msg_import_4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,0
  450.  
  451. l_libs_start:
  452.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  453.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  454.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  455.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  456.         lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
  457.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  458.         lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
  459.                 err_msg_found_lib_3,head_f_l,import_des,err_msg_import_3,head_f_i
  460.         lib_4 l_libs lib_name_4, sys_path, library_path, system_dir_4,\
  461.                 err_msg_found_lib_4,head_f_l,import_box_lib,err_msg_import_4,head_f_i
  462. l_libs_end:
  463.  
  464. align 4
  465. import_libimg:
  466.         dd alib_init1
  467.         img_is_img  dd aimg_is_img
  468.         img_info    dd aimg_info
  469.         img_from_file dd aimg_from_file
  470.         img_to_file dd aimg_to_file
  471.         img_from_rgb dd aimg_from_rgb
  472.         img_to_rgb  dd aimg_to_rgb
  473.         img_to_rgb2 dd aimg_to_rgb2
  474.         img_decode  dd aimg_decode
  475.         img_encode  dd aimg_encode
  476.         img_create  dd aimg_create
  477.         img_destroy dd aimg_destroy
  478.         img_destroy_layer dd aimg_destroy_layer
  479.         img_count   dd aimg_count
  480.         img_lock_bits dd aimg_lock_bits
  481.         img_unlock_bits dd aimg_unlock_bits
  482.         img_flip    dd aimg_flip
  483.         img_flip_layer dd aimg_flip_layer
  484.         img_rotate  dd aimg_rotate
  485.         img_rotate_layer dd aimg_rotate_layer
  486.         img_draw    dd aimg_draw
  487.  
  488.         dd 0,0
  489.         alib_init1   db 'lib_init',0
  490.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  491.         aimg_info    db 'img_info',0
  492.         aimg_from_file db 'img_from_file',0
  493.         aimg_to_file db 'img_to_file',0
  494.         aimg_from_rgb db 'img_from_rgb',0
  495.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  496.         aimg_to_rgb2 db 'img_to_rgb2',0
  497.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  498.         aimg_encode  db 'img_encode',0
  499.         aimg_create  db 'img_create',0
  500.         aimg_destroy db 'img_destroy',0
  501.         aimg_destroy_layer db 'img_destroy_layer',0
  502.         aimg_count   db 'img_count',0
  503.         aimg_lock_bits db 'img_lock_bits',0
  504.         aimg_unlock_bits db 'img_unlock_bits',0
  505.         aimg_flip    db 'img_flip',0
  506.         aimg_flip_layer db 'img_flip_layer',0
  507.         aimg_rotate  db 'img_rotate',0
  508.         aimg_rotate_layer db 'img_rotate_layer',0
  509.         aimg_draw    db 'img_draw',0
  510.  
  511. align 4
  512. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  513.         OpenDialog_Init dd aOpenDialog_Init
  514.         OpenDialog_Start dd aOpenDialog_Start
  515. dd 0,0
  516.         aOpenDialog_Init db 'OpenDialog_init',0
  517.         aOpenDialog_Start db 'OpenDialog_start',0
  518.  
  519. align 4
  520. import_buf2d:
  521.         init dd sz_init
  522.         buf2d_create dd sz_buf2d_create
  523.         buf2d_create_f_img dd sz_buf2d_create_f_img
  524.         buf2d_clear dd sz_buf2d_clear
  525.         buf2d_draw dd sz_buf2d_draw
  526.         buf2d_delete dd sz_buf2d_delete
  527.         ;buf2d_line dd sz_buf2d_line
  528.         ;buf2d_rect_by_size dd sz_buf2d_rect_by_size
  529.         ;buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
  530.         ;buf2d_circle dd sz_buf2d_circle
  531.         ;buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
  532.         ;buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
  533.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  534.         ;buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
  535.         ;buf2d_bit_blt dd sz_buf2d_bit_blt
  536.         ;buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
  537.         ;buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
  538.         ;buf2d_curve_bezier dd sz_buf2d_curve_bezier
  539.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  540.         buf2d_draw_text dd sz_buf2d_draw_text
  541.         ;buf2d_crop_color dd sz_buf2d_crop_color
  542.         ;buf2d_offset_h dd sz_buf2d_offset_h
  543.         ;buf2d_flood_fill dd sz_buf2d_flood_fill
  544.         ;buf2d_set_pixel dd sz_buf2d_set_pixel
  545.         dd 0,0
  546.         sz_init db 'lib_init',0
  547.         sz_buf2d_create db 'buf2d_create',0
  548.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  549.         sz_buf2d_clear db 'buf2d_clear',0
  550.         sz_buf2d_draw db 'buf2d_draw',0
  551.         sz_buf2d_delete db 'buf2d_delete',0
  552.         ;sz_buf2d_line db 'buf2d_line',0
  553.         ;sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
  554.         ;sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
  555.         ;sz_buf2d_circle db 'buf2d_circle',0
  556.         ;sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
  557.         ;sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
  558.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  559.         ;sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
  560.         ;sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  561.         ;sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
  562.         ;sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
  563.         ;sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
  564.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  565.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  566.         ;sz_buf2d_crop_color db 'buf2d_crop_color',0
  567.         ;sz_buf2d_offset_h db 'buf2d_offset_h',0
  568.         ;sz_buf2d_flood_fill db 'buf2d_flood_fill',0
  569.         ;sz_buf2d_set_pixel db 'buf2d_set_pixel',0
  570.  
  571. align 4
  572. import_des: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  573.         des_encryption dd sz_des_encryption
  574.         des_decryption dd sz_des_decryption
  575. dd 0,0
  576.         sz_des_encryption db 'des_encryption',0
  577.         sz_des_decryption db 'des_decryption',0
  578.  
  579. align 4
  580. import_box_lib:
  581.         ;dd sz_init1
  582.         edit_box_draw dd sz_edit_box_draw
  583.         edit_box_key dd sz_edit_box_key
  584.         edit_box_mouse dd sz_edit_box_mouse
  585.         ;edit_box_set_text dd sz_edit_box_set_text
  586.  
  587.         dd 0,0
  588.         ;sz_init1 db 'lib_init',0
  589.         sz_edit_box_draw db 'edit_box',0
  590.         sz_edit_box_key db 'edit_box_key',0
  591.         sz_edit_box_mouse db 'edit_box_mouse',0
  592.         ;sz_edit_box_set_text db 'edit_box_set_text',0
  593.  
  594. mouse_dd dd 0x0
  595. sc system_colors
  596.  
  597. align 16
  598. procinfo process_information
  599.  
  600. align 4
  601. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  602.         dw 5 ;+4 left
  603.         dw 31 ;+6 top
  604. .w: dd 456 ;+8 w
  605. .h: dd 350 ;+12 h
  606. .color: dd 0xffffd0 ;+16 color
  607.         db 24 ;+20 bit in pixel
  608.  
  609. align 4
  610. buf_1:
  611.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  612.         dw 25 ;+4 left
  613.         dw 25 ;+6 top
  614.         dd 128 ;+8 w
  615.         dd 144 ;+12 h
  616.         dd 0 ;+16 color
  617.         db 24 ;+20 bit in pixel
  618.  
  619. edit1 edit_box 58, 140,8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 8, txt_key, mouse_dd, ed_focus+ed_always_focus,8,8
  620.  
  621. txt_openfile db 'Žâªà®©â¥ ä ©« ¤«ï è¨ä஢ ­¨ï ¨«¨ ¤¥è¨ä஢ ­¨ï.',0
  622. txt_buf rb 80
  623. txt_key db 'des_0123',0
  624. mem_key rb 120
  625.  
  626. i_end:
  627.         rb 2048
  628. stacktop:
  629.         sys_path rb 1024
  630.         file_name:
  631.                 rb 1024 ;4096
  632.         library_path rb 1024
  633.         plugin_path rb 4096
  634.         openfile_path rb 4096
  635.         filename_area rb 256
  636. mem:
  637.