Subversion Repositories Kolibri OS

Rev

Rev 5009 | Rev 6313 | 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 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 23.07.14',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*6
  37. image_data_toolbar dd 0
  38.  
  39. IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
  40.  
  41. memory_file_size dd 512*1024 ;à §¬¥à ¯ ¬ï⨠¤«ï ®âªàëâ¨ï ä ©«®¢ (¢ ­ ç «¥ 512 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,[memory_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)+540
  141.         mov edx,[sc.work]
  142.         or  edx,(3 shl 24)+0x30000000
  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.         mov ebx,(135 shl 16)+20
  171.         mov edx,8
  172.         int 0x40
  173.  
  174.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  175.         mov eax,7
  176.         mov ebx,[image_data_toolbar]
  177.         mov ecx,(16 shl 16)+16
  178.         mov edx,(7 shl 16)+7 ;icon new
  179.         int 0x40
  180.  
  181.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  182.         add edx,(25 shl 16) ;icon open
  183.         int 0x40
  184.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  185.         add edx,(25 shl 16) ;icon save
  186.         int 0x40
  187.  
  188.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  189.         add edx,(30 shl 16) ;
  190.         int 0x40
  191.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  192.         add edx,(25 shl 16) ;
  193.         int 0x40
  194.         ;add ebx,IMAGE_TOOLBAR_ICON_SIZE
  195.         ;add edx,(25 shl 16) ;
  196.         ;int 0x40
  197.  
  198.         ; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
  199.         stdcall [buf2d_draw], buf_0
  200.  
  201.         mcall 12,2
  202. popad
  203.         ret
  204.  
  205. align 4
  206. key:
  207.         mcall 2
  208.         jmp still
  209.  
  210. align 4
  211. mouse:
  212.  
  213.         jmp still
  214.  
  215. align 4
  216. button:
  217.         mcall 17
  218.         cmp ah,3
  219.         jne @f
  220.                 call but_new_file
  221.         @@:
  222.         cmp ah,4
  223.         jne @f
  224.                 call but_open_file
  225.         @@:
  226.         cmp ah,5
  227.         jne @f
  228.                 call but_save_file
  229.         @@:
  230.         cmp ah,6
  231.         jne @f
  232.                 call but_1
  233.         @@:
  234.         cmp ah,7
  235.         jne @f
  236.                 call but_2
  237.         @@:
  238.         cmp ah,8
  239.         jne @f
  240.                 call but_3
  241.         @@:
  242.         cmp ah,1
  243.         jne still
  244. .exit:
  245.         stdcall [buf2d_delete],buf_0
  246.         stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
  247.         stdcall mem.Free,[image_data_toolbar]
  248.         stdcall mem.Free,[open_file]
  249.         mcall -1
  250.  
  251.  
  252. align 4
  253. but_new_file:
  254.         mov dword[open_file_size],0
  255.         call draw_file_1
  256.         ret
  257.  
  258. align 4
  259. open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  260. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ memory_file_size)
  261.  
  262. align 4
  263. but_open_file:
  264.         pushad
  265.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  266.         mov [OpenDialog_data.type],0
  267.         stdcall [OpenDialog_Start],OpenDialog_data
  268.         cmp [OpenDialog_data.status],2
  269.         je .end_open_file
  270.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  271.  
  272.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  273.         mov [run_file_70.Function], 5
  274.         mov [run_file_70.Position], 0
  275.         mov [run_file_70.Flags], 0
  276.         mov dword[run_file_70.Count], 0
  277.         m2m [run_file_70.Buffer], [open_file]
  278.         mov byte[run_file_70+20], 0
  279.         mov dword[run_file_70.FileName], openfile_path
  280.         mov ebx,run_file_70
  281.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  282.         cmp eax,0
  283.         jne .end_open_file
  284.  
  285.         mov eax,[open_file]
  286.         mov ebx,dword[eax+32] ;dword[eax+32] - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  287.         mov dword[open_file_size],ebx ;ebx - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  288.         ;memory_file_size - à §¬¥à ¢ë¤¥«¥­­®© ¯ ¬ï⨠¤«ï ä ©« 
  289.         cmp dword[memory_file_size],ebx
  290.         jge @f
  291.                 ;㢥«¨ç¨¢ ¥¬ ¯ ¬ïâì ¥á«¨ ­¥ 墠⨫®
  292.                 mov dword[memory_file_size],ebx
  293.                 stdcall mem.ReAlloc, dword[open_file],ebx
  294.         @@:
  295.  
  296.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  297.         mov [run_file_70.Function], 0
  298.         mov [run_file_70.Position], 0
  299.         mov [run_file_70.Flags], 0
  300.         m2m dword[run_file_70.Count], dword[open_file_size]
  301.         m2m dword[run_file_70.Buffer],dword[open_file]
  302.         mov byte[run_file_70+20], 0
  303.         mov dword[run_file_70.FileName], openfile_path
  304.         mov ebx,run_file_70
  305.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  306.         cmp ebx,0xffffffff
  307.         je .end_open_file
  308.  
  309.         mov [open_file_size],ebx
  310.         ;add ebx,dword[open_file]
  311.         ;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
  312.         stdcall [exif_get_app1], [open_file],h_app1
  313.         mcall 71,1,openfile_path
  314.  
  315.         call draw_file_1
  316.         .end_open_file:
  317.         popad
  318.         ret
  319.  
  320. align 4
  321. draw_file_1:
  322. pushad
  323.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  324.         cmp dword[open_file_size],0
  325.         je .open_file
  326.  
  327.         mov eax,1
  328.         mov ebx,1
  329.         .cycle_0:
  330.                 stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
  331.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  332.                 inc eax
  333.                 add ebx,10
  334.                 cmp byte[txt_buf],0
  335.                 jne .cycle_0
  336.  
  337.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
  338.         stdcall [exif_get_app1_child], h_app1,h_child,0x8769
  339.         cmp dword[h_child],0
  340.         je .no_found_child
  341.  
  342.         mov eax,1
  343.         sub ebx,5
  344.         .cycle_1:
  345.                 stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
  346.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  347.                 inc eax
  348.                 add ebx,10
  349.                 cmp byte[txt_buf],0
  350.                 jne .cycle_1
  351.  
  352.         jmp @f
  353.         .no_found_child:
  354.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  355.                 jmp @f
  356.         .open_file:
  357.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  358.         @@:
  359.         stdcall [buf2d_draw], buf_0
  360. popad
  361.         ret
  362.  
  363. align 4
  364. draw_file_2:
  365. pushad
  366.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  367.         cmp dword[open_file_size],0
  368.         je .open_file
  369.  
  370.         mov eax,1
  371.         mov ebx,1
  372.         .cycle_0:
  373.                 stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
  374.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  375.                 inc eax
  376.                 add ebx,10
  377.                 cmp byte[txt_buf],0
  378.                 jne .cycle_0
  379.  
  380.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
  381.         stdcall [exif_get_app1_child], h_app1,h_child,0x8825
  382.         cmp dword[h_child],0
  383.         je .no_found_child
  384.  
  385.         mov eax,1
  386.         sub ebx,5
  387.         .cycle_1:
  388.                 stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
  389.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  390.                 inc eax
  391.                 add ebx,10
  392.                 cmp byte[txt_buf],0
  393.                 jne .cycle_1
  394.  
  395.         jmp @f
  396.         .no_found_child:
  397.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  398.                 jmp @f
  399.         .open_file:
  400.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  401.         @@:
  402.         stdcall [buf2d_draw], buf_0
  403. popad
  404.         ret
  405.  
  406. align 4
  407. draw_file_3:
  408. pushad
  409.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  410.         cmp dword[open_file_size],0
  411.         je .open_file
  412.  
  413.         mov eax,1
  414.         mov ebx,1
  415.         .cycle_0:
  416.                 stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
  417.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  418.                 inc eax
  419.                 add ebx,10
  420.                 cmp byte[txt_buf],0
  421.                 jne .cycle_0
  422.  
  423.         ;­ å®¤¨¬ app2
  424.         stdcall [exif_get_app2], h_app1,h_child
  425.         cmp dword[h_child],0
  426.         je .no_found_child
  427.  
  428.         mov eax,1
  429.         sub ebx,5
  430.         .cycle_1:
  431.                 stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
  432.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  433.                 inc eax
  434.                 add ebx,10
  435.                 cmp byte[txt_buf],0
  436.                 jne .cycle_1
  437.  
  438.         jmp @f
  439.         .no_found_child:
  440.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  441.                 jmp @f
  442.         .open_file:
  443.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  444.         @@:
  445.         stdcall [buf2d_draw], buf_0
  446. popad
  447.         ret
  448.  
  449. align 4
  450. but_save_file:
  451.         pushad
  452.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  453.         mov [OpenDialog_data.type],1
  454.         stdcall [OpenDialog_Start],OpenDialog_data
  455.         cmp [OpenDialog_data.status],2
  456.         je .end_save_file
  457.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  458.  
  459.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  460.         mov [run_file_70.Function], 2
  461.         mov [run_file_70.Position], 0
  462.         mov [run_file_70.Flags], 0
  463.         mov ebx, dword[open_file]
  464.         mov [run_file_70.Buffer], ebx
  465.         mov ebx,[open_file_size]
  466.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  467.         mov byte[run_file_70+20], 0
  468.         mov dword[run_file_70.FileName], openfile_path
  469.         mov ebx,run_file_70
  470.         int 0x40 ;á®å࠭塞 ä ©« ¨§®¡à ¦¥­¨ï
  471.         ;cmp ebx,0xffffffff
  472.         ;je .end_save_file
  473.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  474.  
  475.         .end_save_file:
  476.         popad
  477.         ret
  478.  
  479. align 4
  480. but_1:
  481.         call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
  482.         ret
  483.  
  484. align 4
  485. but_2:
  486.         call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
  487.         ret
  488.  
  489. align 4
  490. but_3:
  491.         call draw_file_3 ;¨­ä®à¬ æ¨ï app2
  492.         ret
  493.  
  494. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  495. align 4
  496. OpenDialog_data:
  497. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  498. .procinfo               dd procinfo     ;+4
  499. .com_area_name          dd communication_area_name      ;+8
  500. .com_area               dd 0    ;+12
  501. .opendir_path           dd plugin_path  ;+16
  502. .dir_default_path       dd default_dir ;+20
  503. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  504. .draw_window            dd draw_window  ;+28
  505. .status                 dd 0    ;+32
  506. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  507. .filename_area          dd filename_area        ;+40
  508. .filter_area            dd Filter
  509. .x:
  510. .x_size                 dw 420 ;+48 ; Window X size
  511. .x_start                dw 10 ;+50 ; Window X position
  512. .y:
  513. .y_size                 dw 320 ;+52 ; Window y size
  514. .y_start                dw 10 ;+54 ; Window Y position
  515.  
  516. default_dir db '/rd/1',0
  517.  
  518. communication_area_name:
  519.         db 'FFFFFFFF_open_dialog',0
  520. open_dialog_name:
  521.         db 'opendial',0
  522. communication_area_default_path:
  523.         db '/rd/1/File managers/',0
  524.  
  525. Filter:
  526. dd Filter.end - Filter ;.1
  527. .1:
  528. db 'JPG',0
  529. db 'JPEG',0
  530. .end:
  531. db 0
  532.  
  533.  
  534.  
  535. head_f_i:
  536. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  537.  
  538. system_dir_0 db '/sys/lib/'
  539. lib_name_0 db 'proc_lib.obj',0
  540. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  541. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  542.  
  543. system_dir_1 db '/sys/lib/'
  544. lib_name_1 db 'libimg.obj',0
  545. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  546. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  547.  
  548. system_dir_2 db '/sys/lib/'
  549. lib_name_2 db 'buf2d.obj',0
  550. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  551. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  552.  
  553. system_dir_3 db '/sys/lib/'
  554. lib_name_3 db 'exif.obj',0
  555. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'exif.obj',39,0
  556. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
  557.  
  558. l_libs_start:
  559.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  560.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  561.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  562.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  563.         lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
  564.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  565.         lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
  566.                 err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
  567. l_libs_end:
  568.  
  569. align 4
  570. import_libimg:
  571.         dd alib_init1
  572.         img_is_img  dd aimg_is_img
  573.         img_info    dd aimg_info
  574.         img_from_file dd aimg_from_file
  575.         img_to_file dd aimg_to_file
  576.         img_from_rgb dd aimg_from_rgb
  577.         img_to_rgb  dd aimg_to_rgb
  578.         img_to_rgb2 dd aimg_to_rgb2
  579.         img_decode  dd aimg_decode
  580.         img_encode  dd aimg_encode
  581.         img_create  dd aimg_create
  582.         img_destroy dd aimg_destroy
  583.         img_destroy_layer dd aimg_destroy_layer
  584.         img_count   dd aimg_count
  585.         img_lock_bits dd aimg_lock_bits
  586.         img_unlock_bits dd aimg_unlock_bits
  587.         img_flip    dd aimg_flip
  588.         img_flip_layer dd aimg_flip_layer
  589.         img_rotate  dd aimg_rotate
  590.         img_rotate_layer dd aimg_rotate_layer
  591.         img_draw    dd aimg_draw
  592.  
  593.         dd 0,0
  594.         alib_init1   db 'lib_init',0
  595.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  596.         aimg_info    db 'img_info',0
  597.         aimg_from_file db 'img_from_file',0
  598.         aimg_to_file db 'img_to_file',0
  599.         aimg_from_rgb db 'img_from_rgb',0
  600.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  601.         aimg_to_rgb2 db 'img_to_rgb2',0
  602.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  603.         aimg_encode  db 'img_encode',0
  604.         aimg_create  db 'img_create',0
  605.         aimg_destroy db 'img_destroy',0
  606.         aimg_destroy_layer db 'img_destroy_layer',0
  607.         aimg_count   db 'img_count',0
  608.         aimg_lock_bits db 'img_lock_bits',0
  609.         aimg_unlock_bits db 'img_unlock_bits',0
  610.         aimg_flip    db 'img_flip',0
  611.         aimg_flip_layer db 'img_flip_layer',0
  612.         aimg_rotate  db 'img_rotate',0
  613.         aimg_rotate_layer db 'img_rotate_layer',0
  614.         aimg_draw    db 'img_draw',0
  615.  
  616. align 4
  617. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  618.         OpenDialog_Init dd aOpenDialog_Init
  619.         OpenDialog_Start dd aOpenDialog_Start
  620. dd 0,0
  621.         aOpenDialog_Init db 'OpenDialog_init',0
  622.         aOpenDialog_Start db 'OpenDialog_start',0
  623.  
  624. align 4
  625. import_buf2d:
  626.         init dd sz_init
  627.         buf2d_create dd sz_buf2d_create
  628.         buf2d_create_f_img dd sz_buf2d_create_f_img
  629.         buf2d_clear dd sz_buf2d_clear
  630.         buf2d_draw dd sz_buf2d_draw
  631.         buf2d_delete dd sz_buf2d_delete
  632.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  633.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  634.         buf2d_draw_text dd sz_buf2d_draw_text
  635.         dd 0,0
  636.         sz_init db 'lib_init',0
  637.         sz_buf2d_create db 'buf2d_create',0
  638.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  639.         sz_buf2d_clear db 'buf2d_clear',0
  640.         sz_buf2d_draw db 'buf2d_draw',0
  641.         sz_buf2d_delete db 'buf2d_delete',0
  642.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  643.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  644.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  645.  
  646. align 4
  647. import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  648.         exif_get_app1 dd sz_exif_get_app1
  649.         exif_get_app1_tag dd sz_exif_get_app1_tag
  650.         exif_get_app1_child dd sz_exif_get_app1_child
  651.         exif_get_app2 dd sz_exif_get_app2
  652. dd 0,0
  653.         sz_exif_get_app1 db 'exif_get_app1',0
  654.         sz_exif_get_app1_tag db 'exif_get_app1_tag',0
  655.         sz_exif_get_app1_child db 'exif_get_app1_child',0
  656.         sz_exif_get_app2 db 'exif_get_app2',0
  657.  
  658. sc system_colors
  659.  
  660. align 16
  661. procinfo process_information
  662.  
  663. align 4
  664. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  665.         dw 5 ;+4 left
  666.         dw 31 ;+6 top
  667. .w: dd 456 ;+8 w
  668. .h: dd 480 ;+12 h
  669. .color: dd 0xffffd0 ;+16 color
  670.         db 24 ;+20 bit in pixel
  671.  
  672. align 4
  673. buf_1:
  674.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  675.         dw 25 ;+4 left
  676.         dw 25 ;+6 top
  677.         dd 128 ;+8 w
  678.         dd 144 ;+12 h
  679.         dd 0 ;+16 color
  680.         db 24 ;+20 bit in pixel
  681.  
  682. h_app1  dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
  683.         dw 0
  684. h_child dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
  685.         dw 0
  686. txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
  687. txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
  688. txt_buf rb 80
  689.  
  690. i_end:
  691.         rb 2048
  692. stacktop:
  693.         sys_path rb 1024
  694.         file_name:
  695.                 rb 1024 ;4096
  696.         library_path rb 1024
  697.         plugin_path rb 4096
  698.         openfile_path rb 4096
  699.         filename_area rb 256
  700. mem:
  701.