Subversion Repositories Kolibri OS

Rev

Rev 9568 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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