Subversion Repositories Kolibri OS

Rev

Rev 2758 | 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 'd:/kolibri/svn/programs/macros.inc'
  13. include 'd:/kolibri/svn/programs/proc32.inc'
  14. include 'd:/kolibri/svn/programs/develop/libraries/box_lib/load_lib.mac'
  15. include 'mem.inc'
  16. include 'dll.inc'
  17. include 'vox_draw.inc'
  18.  
  19. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  20. caption db 'Voxel editor 5.06.12',0 ;¯®¤¯¨áì ®ª­ 
  21.  
  22. struct FileInfoBlock
  23.         Function dd ?
  24.         Position dd ?
  25.         Flags    dd ?
  26.         Count    dd ?
  27.         Buffer   dd ?
  28.                 db ?
  29.         FileName dd ?
  30. ends
  31.  
  32. run_file_70 FileInfoBlock
  33. image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  34.  
  35. fn_toolbar db 'toolbar.png',0
  36. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  37. IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*14
  38. image_data_toolbar dd 0
  39.  
  40. max_open_file_size equ 64*1024 ;64 Kb
  41.  
  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. OT_MAP_X  equ  0
  83. OT_MAP_Y  equ  0
  84. TILE_SIZE equ 10
  85.  
  86. align 4
  87. start:
  88.         load_libraries l_libs_start,l_libs_end
  89.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  90.         mov     ebp,lib_2
  91.         cmp     dword [ebp+ll_struc_size-4],0
  92.         jz      @f
  93.                 mcall -1 ;exit not correct
  94.         @@:
  95.         mcall 48,3,sc,sizeof.system_colors
  96.         mcall 40,0x27
  97.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  98.  
  99.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à  ¨§®¡à ¦¥­¨ï
  100.         stdcall [buf2d_create], buf_0z ;ᮧ¤ ­¨¥ ¡ãä¥à  £«ã¡¨­ë
  101.         stdcall [buf2d_create], buf_pl ;ᮧ¤ ­¨¥ ¡ãä¥à  ¤«ï á¥ç¥­¨ï
  102.  
  103.         stdcall [buf2d_vox_brush_create], buf_vox, vox_6_7_z
  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_vox],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.                 mcall 9,procinfo,-1
  129.                 cmp ax,word[procinfo+4]
  130.                 jne @f ;®ª­® ­¥  ªâ¨¢­®
  131.                 call mouse
  132.         @@:
  133.         jmp still
  134.  
  135. align 4
  136. mouse:
  137.         pushad
  138.         mcall 37,2
  139.         bt eax,0 ;left button
  140.         jnc .end_f
  141.                 mcall 37,1 ;get mouse coords
  142.  
  143.                 mov ebx,eax
  144.                 and eax,0xffff
  145.  
  146.                 cmp dword[v_pen_mode],2 ;select color
  147.                 jne .end_2
  148.                         stdcall get_buf_color, buf_0
  149.                         stdcall get_buf_color, buf_pl
  150.                         jmp .end_f
  151.                 .end_2:
  152.  
  153.                 movzx edx,word[buf_pl.t]
  154.                 add edx,OT_MAP_Y
  155.                 cmp eax,edx
  156.                 jl .end_f
  157.                         sub eax,edx
  158.                         xor edx,edx
  159.                         mov ecx,TILE_SIZE ;H
  160.                         div ecx
  161.                 shr ebx,16
  162.                 movzx edx,word[buf_pl.l]
  163.                 add edx,OT_MAP_X
  164.                 cmp ebx,edx
  165.                 jl .end_f
  166.                         call convert_y ;¯à¥®¡à §®¢ ­¨¥ ª®®à¤¨­ âë y
  167.                         cmp eax,0
  168.                         jge .end_0 ;®£à ­¨ç¥­¨¥ ¯® ­¨¦­¥© ª®®à¤¨­ â¥ y
  169.                                 cmp eax,-1
  170.                                 jne .end_f
  171.                                 ;¬¥­ï¥¬ á¥ç¥­¨¥, ¯®¯ «¨ ­  ª¢ ¤à â¨ª
  172.                                 sub ebx,edx
  173.                                 mov eax,ebx
  174.                                 xor edx,edx
  175.                                 mov ecx,TILE_SIZE ;W
  176.                                 div ecx
  177.                                 mov [n_plane],eax
  178.                                 jmp .end_1
  179.                         .end_0:
  180.                         mov [v_cur_y],eax ;Y-coord
  181.                         sub ebx,edx
  182.                         mov eax,ebx
  183.                         xor edx,edx
  184.                         mov ecx,TILE_SIZE ;W
  185.                         div ecx
  186.                         mov [v_cur_x],eax ;X-coord
  187.  
  188.                         cmp dword[v_pen_mode],0
  189.                         jne @f
  190.                         stdcall buf2d_vox_obj_delete_node, [open_file_vox], [v_cur_x],[n_plane],[v_cur_y], [v_zoom]
  191.                         @@:
  192.                         cmp dword[v_pen_mode],1
  193.                         jne .end_1
  194.                         stdcall buf2d_vox_obj_create_node, [open_file_vox], [v_cur_x],[n_plane],[v_cur_y], [v_color], [v_zoom]
  195.                         .end_1:
  196.                         call draw_objects
  197.                         call draw_pok
  198.         .end_f:
  199.         popad
  200.         ret
  201.  
  202. align 4
  203. proc get_buf_color uses eax ebx edi, buf:dword
  204.         mov edi,[buf]
  205.         cmp ax,buf2d_t
  206.         jl .end_f
  207.         sub ax,buf2d_t
  208.         cmp eax,buf2d_h
  209.         jg .end_f
  210.         shr ebx,16
  211.         cmp bx,buf2d_l
  212.         jl .end_f
  213.         sub bx,buf2d_l
  214.         cmp ebx,buf2d_w
  215.         jg .end_f
  216.                 stdcall [buf2d_get_pixel], edi,ebx,eax
  217.                 mov [v_color],eax
  218.                 stdcall [buf2d_filled_rect_by_size], buf_0, 5,3, 8,8,eax
  219.                 stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  220.         .end_f:
  221.         ret
  222. endp
  223.  
  224. ;¯à¥®¡à §®¢ë¢ ¥¬ ª®®à¤¨­ âã y (§­ ç¥­¨¥ ¤®«¦­® 㢥«¨ç¨¢ âìáï á ­¨§ã ¢¢¥àå)
  225. align 4
  226. convert_y:
  227.         push ecx edx
  228.         mov ecx,[v_zoom]
  229.         mov edx,1
  230.         cmp ecx,1
  231.         jl .end_0
  232.         cld
  233.         @@:
  234.                 shl edx,1
  235.                 loop @b
  236.         .end_0:
  237.         sub edx,eax
  238.         dec edx
  239.         mov eax,edx
  240.         pop edx ecx
  241.         ret
  242.  
  243. align 4
  244. draw_window:
  245. pushad
  246.         mcall 12,1
  247.  
  248.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  249.         xor eax,eax
  250.         mov ebx,(20 shl 16)+540
  251.         mov ecx,(20 shl 16)+415
  252.         mov edx,[sc.work]
  253.         or  edx,(3 shl 24)+0x30000000
  254.         mov edi,caption
  255.         int 0x40
  256.  
  257.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  258.         mov eax,8
  259.         mov ebx,(5 shl 16)+20
  260.         mov ecx,(5 shl 16)+20
  261.         mov edx,3
  262.         mov esi,[sc.work_button]
  263.         int 0x40
  264.  
  265.         mov ebx,(30 shl 16)+20
  266.         mov edx,4
  267.         int 0x40
  268.         add ebx,25 shl 16
  269.         mov edx,5
  270.         int 0x40
  271.         add ebx,30 shl 16
  272.         mov edx,6
  273.         int 0x40
  274.         add ebx,25 shl 16
  275.         mov edx,7
  276.         int 0x40
  277.         add ebx,25 shl 16
  278.         mov edx,8
  279.         int 0x40
  280.         add ebx,25 shl 16
  281.         mov edx,9
  282.         int 0x40
  283.         add ebx,25 shl 16
  284.         mov edx,10
  285.         int 0x40
  286.         add ebx,25 shl 16
  287.         mov edx,11
  288.         int 0x40
  289.         add ebx,25 shl 16
  290.         mov edx,12
  291.         int 0x40
  292.         add ebx,25 shl 16
  293.         mov edx,13
  294.         int 0x40
  295.         add ebx,25 shl 16
  296.         mov edx,14
  297.         int 0x40
  298.         add ebx,25 shl 16
  299.         mov edx,15
  300.         int 0x40
  301.         add ebx,25 shl 16
  302.         mov edx,16
  303.         int 0x40
  304.  
  305.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  306.         mov eax,7
  307.         mov ebx,[image_data_toolbar]
  308.         mov ecx,(16 shl 16)+16
  309.         mov edx,(7 shl 16)+7 ;icon new
  310.         int 0x40
  311.  
  312.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  313.         add edx,(25 shl 16) ;icon open
  314.         int 0x40
  315.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  316.         add edx,(25 shl 16) ;icon save
  317.         int 0x40
  318.  
  319.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  320.         add edx,(30 shl 16) ;
  321.         int 0x40
  322.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  323.         add edx,(25 shl 16) ;
  324.         int 0x40
  325.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  326.         add edx,(25 shl 16) ;
  327.         int 0x40
  328.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  329.         add edx,(25 shl 16) ;
  330.         int 0x40
  331.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  332.         add edx,(25 shl 16) ;
  333.         int 0x40
  334.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  335.         add edx,(25 shl 16) ;
  336.         int 0x40
  337.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  338.         add edx,(25 shl 16) ;
  339.         int 0x40
  340.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  341.         add edx,(25 shl 16) ;
  342.         int 0x40
  343.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  344.         add edx,(25 shl 16) ;
  345.         int 0x40
  346.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  347.         add edx,(25 shl 16) ;
  348.         int 0x40
  349.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  350.         add edx,(25 shl 16) ;
  351.         int 0x40
  352.  
  353.         ; *** à¨á®¢ ­¨¥ ¡ãä¥à®¢ ***
  354.         call draw_objects
  355.         call draw_pok
  356.  
  357.         mcall 12,2
  358. popad
  359.         ret
  360.  
  361. align 4
  362. draw_pok:
  363.         mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
  364.         mov ebx,(365 shl 16)+5
  365.         mov ecx,[sc.work_text]
  366.         or  ecx,0x80000000 ;or (1 shl 30)
  367.         mov edx,txt_zoom
  368.         ;mov edi,[sc.work]
  369.         int 0x40
  370.         add bx,9
  371.         mov edx,txt_cur_x
  372.         int 0x40
  373.         add bx,9
  374.         mov edx,txt_cur_y
  375.         int 0x40
  376.         add bx,9
  377.         mov edx,txt_n_plane
  378.         int 0x40
  379.  
  380.         mov eax,47
  381.         mov ecx,[v_zoom]
  382.         mov ebx,(2 shl 16)
  383.         mov edx,((365+6*9) shl 16)+5
  384.         mov esi,[sc.work_button_text]
  385.         or  esi,(1 shl 30)
  386.         mov edi,[sc.work_button]
  387.         int 0x40 ;¬ áèâ ¡
  388.         mov ebx,(5 shl 16)
  389.         mov ecx,[v_cur_x]
  390.         add edx,(6*2)*65536+9
  391.         int 0x40 ;
  392.         mov ebx,(5 shl 16)
  393.         mov ecx,[v_cur_y]
  394.         add edx,(6*0)*65536+9
  395.         int 0x40 ;
  396.  
  397.         mov ebx,(5 shl 16)
  398.         mov ecx,[n_plane]
  399.         add edx,(6*0)*65536+9
  400.         int 0x40 ;
  401.  
  402.         ret
  403.  
  404. align 4
  405. key:
  406.         mcall 2
  407.         jmp still
  408.  
  409.  
  410. align 4
  411. button:
  412.         mcall 17
  413.         cmp ah,3
  414.         jne @f
  415.                 call but_new_file
  416.                 call draw_objects
  417.                 call draw_pok
  418.         @@:
  419.         cmp ah,4
  420.         jne @f
  421.                 call but_open_file
  422.         @@:
  423.         cmp ah,5
  424.         jne @f
  425.                 call but_save_file
  426.         @@:
  427.         cmp ah,6
  428.         jne @f
  429.                 call but_1
  430.         @@:
  431.         cmp ah,7
  432.         jne @f
  433.                 call but_2
  434.         @@:
  435.         cmp ah,8
  436.         jne @f
  437.                 call but_3
  438.         @@:
  439.         cmp ah,9
  440.         jne @f
  441.                 call but_4
  442.         @@:
  443.         cmp ah,10
  444.         jne @f
  445.                 call but_5
  446.         @@:
  447.         cmp ah,11
  448.         jne @f
  449.                 call but_6
  450.         @@:
  451.         cmp ah,12
  452.         jne @f
  453.                 call but_7
  454.         @@:
  455.         cmp ah,13
  456.         jne @f
  457.                 call but_8
  458.         @@:
  459.         cmp ah,14
  460.         jne @f
  461.                 mov dword[v_pen_mode],2 ;select color
  462.                 call draw_palete
  463.         @@:
  464.         cmp ah,15
  465.         jne @f
  466.                 call but_light
  467.         @@:
  468.         cmp ah,16
  469.         jne @f
  470.                 call but_rend_2_2
  471.         @@:
  472.         cmp ah,1
  473.         jne still
  474. .exit:
  475.         stdcall [buf2d_delete],buf_0
  476.         stdcall [buf2d_delete],buf_0z
  477.         cmp dword[buf_r_img],0
  478.         je @f
  479.                 stdcall [buf2d_delete],buf_r_img
  480.                 stdcall [buf2d_delete],buf_r_z
  481.         @@:
  482.         stdcall [buf2d_vox_brush_delete], buf_vox
  483.         stdcall mem.Free,[image_data_toolbar]
  484.         stdcall mem.Free,[open_file_vox]
  485.         mcall -1
  486.  
  487. align 4
  488. vox_new_data:
  489.         db 2,0,0,0
  490.         db 000b,001b,010b,011b, 100b,101b,110b,111b ;default table
  491.         dd 0 ;null node
  492.  
  493. align 4
  494. proc but_new_file uses ecx edi esi
  495.         mov ecx,vox_offs_data+4
  496.         mov esi,vox_new_data
  497.         mov edi,[open_file_vox]
  498.         cld
  499.         rep movsb
  500.         ret
  501. endp
  502.  
  503. align 4
  504. open_file_vox dd 0 ;㪠§ â¥«ì ­  ®¡« áâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  505.  
  506. align 4
  507. but_open_file:
  508.         pushad
  509.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  510.         mov [OpenDialog_data.type],0
  511.         stdcall [OpenDialog_Start],OpenDialog_data
  512.         cmp [OpenDialog_data.status],2
  513.         je .end_open_file
  514.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  515.  
  516.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  517.         mov [run_file_70.Function], 0
  518.         mov [run_file_70.Position], 0
  519.         mov [run_file_70.Flags], 0
  520.         mov dword[run_file_70.Count], max_open_file_size
  521.         m2m [run_file_70.Buffer], [open_file_vox]
  522.         mov byte[run_file_70+20], 0
  523.         mov dword[run_file_70.FileName], openfile_path
  524.         mov ebx,run_file_70
  525.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  526.         cmp ebx,0xffffffff
  527.         je .end_open_file
  528.  
  529.         add ebx,[open_file_vox]
  530.         mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
  531.         mcall 71,1,openfile_path
  532.  
  533.         ;---
  534.         ;
  535.         mov eax,[open_file_vox]
  536.         movzx eax,byte[eax]
  537.         and eax,0xff ;¡¥à¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
  538.         mov dword[v_zoom],eax ;¡¥à¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
  539.         call draw_objects
  540.         .end_open_file:
  541.         popad
  542.         ret
  543.  
  544. align 4
  545. but_save_file:
  546.         pushad
  547.                 copy_path open_dialog_name,communication_area_default_path,file_name,0
  548.                 mov [OpenDialog_data.type],1
  549.                 stdcall [OpenDialog_Start],OpenDialog_data
  550.                 cmp [OpenDialog_data.status],2
  551.                 je .end_save_file
  552.                 ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  553.  
  554.                 mov eax,dword[v_zoom] ;§ ¤ ¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
  555.                 mov ebx,[open_file_vox]
  556.                 mov byte[ebx],al
  557.  
  558.                 stdcall buf2d_vox_obj_get_size, ebx
  559.                 mov dword[run_file_70.Count], eax ;à §¬¥à ä ©« 
  560.                 mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  561.                 mov [run_file_70.Function], 2
  562.                 mov [run_file_70.Position], 0
  563.                 mov [run_file_70.Flags], 0
  564.                 mov ebx, dword[open_file_vox]
  565.                 mov [run_file_70.Buffer], ebx
  566.                 mov byte[run_file_70+20], 0
  567.                 mov dword[run_file_70.FileName], openfile_path
  568.                 mov ebx,run_file_70
  569.                 int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  570.                 cmp ebx,0xffffffff
  571.                 je .end_save_file
  572.  
  573.                 .end_save_file:
  574.         popad
  575.         ret
  576.  
  577. align 4
  578. but_1:
  579.         cmp dword[v_zoom],7
  580.         jge @f
  581.                 inc dword[v_zoom]
  582.                 shl dword[n_plane],1
  583.                 call draw_objects
  584.                 call draw_pok
  585.         @@:
  586.         ret
  587.  
  588. align 4
  589. but_2:
  590.         cmp dword[v_zoom],-1
  591.         jl @f
  592.                 dec dword[v_zoom]
  593.                 shr dword[n_plane],1
  594.                 call draw_objects
  595.                 call draw_pok
  596.         @@:
  597.         ret
  598.  
  599. align 4
  600. but_3:
  601.         stdcall vox_obj_rot_z, [open_file_vox]
  602.         call draw_objects
  603.         ret
  604.  
  605. align 4
  606. but_4:
  607.         stdcall vox_obj_rot_x, [open_file_vox]
  608.         call draw_objects
  609.         ret
  610.  
  611. align 4
  612. but_5:
  613.         inc dword[n_plane]
  614.         call draw_objects
  615.         call draw_pok
  616.         ret
  617.  
  618. align 4
  619. but_6:
  620.         cmp dword[n_plane],0
  621.         jle @f
  622.                 dec dword[n_plane]
  623.                 call draw_objects
  624.                 call draw_pok
  625.         @@:
  626.         ret
  627.  
  628. align 4
  629. but_7:
  630.         push eax
  631.         mov eax,dword[v_pen_mode]
  632.         mov dword[v_pen_mode],1 ;draw
  633.         cmp eax,2
  634.         jne @f
  635.                 call draw_objects
  636.         @@:
  637.         pop eax
  638.         ret
  639.  
  640. align 4
  641. but_8:
  642.         push eax
  643.         mov eax,dword[v_pen_mode]
  644.         mov dword[v_pen_mode],0 ;clear
  645.         cmp eax,2
  646.         jne @f
  647.                 call draw_objects
  648.         @@:
  649.         pop eax
  650.         ret
  651.  
  652. align 4
  653. but_light:
  654.         xor dword[mode_light],1
  655.         call draw_objects
  656.         ret
  657.  
  658. align 4
  659. but_rend_2_2:
  660. push edi
  661.         cmp dword[buf_r_img],0
  662.         jne @f
  663.                 ;ᮧ¤ ­¨¥ ¡ãä¥à  ¤«ï ७¤¥à 
  664.                 push ecx esi
  665.                 mov edi,buf_r_img
  666.                 mov esi,buf_0
  667.                 mov ecx,BUF_STRUCT_SIZE
  668.                 cld
  669.                 rep movsb ;ª®¯¨à㥬 ¢á¥ ¯ à ¬¥âàë á ®á­®¢­®£® ¡ãä¥à 
  670.                 mov edi,buf_r_img
  671.                 mov buf2d_data,0
  672.                 shl buf2d_w,1 ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¡ãä¥à 
  673.                 shl buf2d_h,1
  674.                 stdcall [buf2d_create],buf_r_img
  675.  
  676.                 mov edi,buf_r_z
  677.                 mov esi,buf_0z
  678.                 mov ecx,BUF_STRUCT_SIZE
  679.                 cld
  680.                 rep movsb ;ª®¯¨à㥬 ¢á¥ ¯ à ¬¥âàë á ®á­®¢­®£® ¡ãä¥à 
  681.                 mov edi,buf_r_z
  682.                 mov buf2d_data,0
  683.                 shl buf2d_w,1 ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¡ãä¥à 
  684.                 shl buf2d_h,1
  685.                 stdcall [buf2d_create],buf_r_z
  686.                 pop esi ecx
  687.         @@:
  688.         stdcall [buf2d_clear], buf_r_img, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
  689.         stdcall [buf2d_clear], buf_r_z, 0 ;ç¨á⨬ ¡ãä¥à
  690.  
  691.         push eax ebx ecx
  692.                 mov eax,[v_zoom]
  693.                 inc eax
  694.  
  695.                 stdcall buf2d_vox_obj_draw_3g, buf_r_img, buf_r_z, buf_vox, [open_file_vox], 0,0, 0, eax
  696.                 bt dword[mode_light],0
  697.                 jnc @f
  698.                         stdcall buf2d_vox_obj_draw_3g_shadows, buf_r_img, buf_r_z, buf_vox, 0,0, 0, eax, 3
  699.                 @@:
  700.  
  701.                 mov edi,buf_r_img
  702.                 stdcall [buf2d_img_hdiv2], edi
  703.                 shr buf2d_h,1
  704.                 stdcall [buf2d_img_wdiv2], edi
  705.                 shr buf2d_w,1
  706.  
  707.                 stdcall buf2d_vox_obj_get_img_w_3g, buf_vox,[v_zoom]
  708.                 mov ebx,[buf_0.w]
  709.                 sub ebx,eax
  710.                 shr ebx,1 ;ebx - ¤«ï 業â஢ª¨ ¬ «¥­ìª¨å ¨§®¡à ¦¥­¨© ¯® £®à¨§®­â «¨
  711.                 stdcall buf2d_vox_obj_get_img_h_3g, buf_vox,[v_zoom]
  712.                 cmp eax,[buf_0.h]
  713.                 jg @f
  714.                         mov ecx,[buf_0.h]
  715.                         sub ecx,eax
  716.                         shr ecx,1 ;ecx - ¤«ï 業â஢ª¨ ¬ «¥­ìª¨å ¨§®¡à ¦¥­¨© ¯®
  717.                 @@:            
  718.                 stdcall [buf2d_bit_blt], buf_0, ebx,ecx, edi
  719.                 shl buf2d_h,1
  720.                 shl buf2d_w,1
  721.         pop ecx ebx eax
  722. pop edi
  723.         stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  724.         ret
  725.  
  726. align 4
  727. draw_palete:
  728.         stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
  729.         stdcall [buf2d_filled_rect_by_size], buf_0, 5,3, 8,8,[v_color]
  730.         stdcall buf2d_draw_palete, buf_0, 5,14, 9,6, 18, 512
  731.         stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  732.         ret
  733.  
  734. v_zoom dd 2 ;⥪ã騩 ¬ áèâ ¡
  735. v_cur_x dd 0 ;ª®®à¤¨­ â  ªãàá®à  x
  736. v_cur_y dd 0 ;ª®®à¤¨­ â  ªãàá®à  y (­® ®áì ¢ ®¡ê¥ªâ¥ z)
  737. n_plane dd 0 ;¯«®áª®áâì á¥ç¥­¨ï
  738. v_color dd 0xff ;梥⠪ à ­¤ è 
  739. v_pen_mode dd 1 ;०¨¬: 0-áâ¨à ­¨ï, 1-à¨á®¢ ­¨ï
  740. mode_light dd 1 ;०¨¬ ®á¢¥é¥­¨ï
  741.  
  742. txt_zoom db 'Œ áèâ ¡:',0
  743. txt_cur_x db 'x:',0
  744. txt_cur_y db 'y:',0
  745. txt_n_plane db '‘¥ç¥­¨¥:',0
  746.  
  747. align 4
  748. draw_objects:
  749.         stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
  750.         stdcall [buf2d_clear], buf_0z, 0 ;ç¨á⨬ ¡ãä¥à
  751.         stdcall [buf2d_clear], buf_pl, [buf_pl.color] ;ç¨á⨬ ¡ãä¥à
  752.  
  753.         cmp dword[v_pen_mode],2
  754.         jne @f
  755.                 call draw_palete
  756.                 jmp .end_f
  757.         @@:
  758.                 push eax ebx ecx
  759.                 stdcall buf2d_vox_obj_get_img_w_3g, buf_vox,[v_zoom]
  760.                 mov ebx,[buf_0.w]
  761.                 sub ebx,eax
  762.                 shr ebx,1 ;ebx - ¤«ï 業â஢ª¨ ¬ «¥­ìª¨å ¨§®¡à ¦¥­¨© ¯® £®à¨§®­â «¨
  763.  
  764.                 xor ecx,ecx
  765.                 stdcall buf2d_vox_obj_get_img_h_3g, buf_vox,[v_zoom]
  766.                 cmp eax,[buf_0.h]
  767.                 jg @f
  768.                         mov ecx,[buf_0.h]
  769.                         sub ecx,eax
  770.                         shr ecx,1 ;ecx - ¤«ï 業â஢ª¨ ¬ «¥­ìª¨å ¨§®¡à ¦¥­¨© ¯®
  771.                 @@:
  772.  
  773.                 stdcall buf2d_vox_obj_draw_3g, buf_0, buf_0z, buf_vox, [open_file_vox], ebx,ecx, 0, [v_zoom]
  774.                 bt dword[mode_light],0
  775.                 jnc @f
  776.                         stdcall buf2d_vox_obj_draw_3g_shadows, buf_0, buf_0z, buf_vox, ebx,ecx, 0, [v_zoom], 3
  777.                 @@:
  778.                 pop ecx ebx eax
  779.         .end_0:
  780.  
  781.         stdcall buf2d_vox_obj_draw_pl, buf_pl, [open_file_vox], OT_MAP_X,OT_MAP_Y,TILE_SIZE, [v_zoom], [n_plane], 0xd0d0d0
  782.  
  783.         stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  784.         stdcall [buf2d_draw], buf_pl ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  785.         .end_f:
  786.         ret
  787.  
  788. if 0
  789. ;input:
  790. ; buf - 㪠§ â¥«ì ­  áâபã, ç¨á«® ¤®«¦­® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç­®¬ ¢¨¤¥
  791. ;output:
  792. ; eax - ç¨á«®
  793. align 4
  794. proc conv_str_to_int, buf:dword
  795.         xor eax,eax
  796.         push ebx ecx esi
  797.         xor ebx,ebx
  798.         mov esi,[buf]
  799.         ;®¯à¥¤¥«¥­¨¥ ®âà¨æ â¥«ì­ëå ç¨á¥«
  800.         xor ecx,ecx
  801.         inc ecx
  802.         cmp byte[esi],'-'
  803.         jne @f
  804.                 dec ecx
  805.                 inc esi
  806.         @@:
  807.  
  808.         cmp word[esi],'0x'
  809.         je .load_digit_16
  810.  
  811.         .load_digit_10: ;áç¨â뢠­¨¥ 10-â¨ç­ëå æ¨äà
  812.                 mov bl,byte[esi]
  813.                 cmp bl,'0'
  814.                 jl @f
  815.                 cmp bl,'9'
  816.                 jg @f
  817.                         sub bl,'0'
  818.                         imul eax,10
  819.                         add eax,ebx
  820.                         inc esi
  821.                         jmp .load_digit_10
  822.         jmp @f
  823.  
  824.         .load_digit_16: ;áç¨â뢠­¨¥ 16-à¨ç­ëå æ¨äà
  825.                 add esi,2
  826.         .cycle_16:
  827.                 mov bl,byte[esi]
  828.                 cmp bl,'0'
  829.                 jl @f
  830.                 cmp bl,'f'
  831.                 jg @f
  832.                 cmp bl,'9'
  833.                 jle .us1
  834.                         cmp bl,'A'
  835.                         jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A'
  836.                 .us1: ;á®áâ ¢­®¥ ãá«®¢¨¥
  837.                 cmp bl,'F'
  838.                 jle .us2
  839.                         cmp bl,'a'
  840.                         jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a'
  841.                         sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥àå­¨© ॣ¨áâà, ¤«ï ã¯à®é¥­¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨
  842.                 .us2: ;á®áâ ¢­®¥ ãá«®¢¨¥
  843.                         sub bl,'0'
  844.                         cmp bl,9
  845.                         jle .cor1
  846.                                 sub bl,7 ;convert 'A' to '10'
  847.                         .cor1:
  848.                         shl eax,4
  849.                         add eax,ebx
  850.                         inc esi
  851.                         jmp .cycle_16
  852.         @@:
  853.         cmp ecx,0 ;¥á«¨ ç¨á«® ®âà¨æ â¥«ì­®¥
  854.         jne @f
  855.                 sub ecx,eax
  856.                 mov eax,ecx
  857.         @@:
  858.         pop esi ecx ebx
  859.         ret
  860. endp
  861. end if
  862.  
  863. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  864. align 4
  865. OpenDialog_data:
  866. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  867. .procinfo               dd procinfo     ;+4
  868. .com_area_name          dd communication_area_name      ;+8
  869. .com_area               dd 0    ;+12
  870. .opendir_path           dd plugin_path  ;+16
  871. .dir_default_path       dd default_dir ;+20
  872. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  873. .draw_window            dd draw_window  ;+28
  874. .status                 dd 0    ;+32
  875. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  876. .filename_area          dd filename_area        ;+40
  877. .filter_area            dd Filter
  878. .x:
  879. .x_size                 dw 420 ;+48 ; Window X size
  880. .x_start                dw 10 ;+50 ; Window X position
  881. .y:
  882. .y_size                 dw 320 ;+52 ; Window y size
  883. .y_start                dw 10 ;+54 ; Window Y position
  884.  
  885. default_dir db '/rd/1',0
  886.  
  887. communication_area_name:
  888.         db 'FFFFFFFF_open_dialog',0
  889. open_dialog_name:
  890.         db 'opendial',0
  891. communication_area_default_path:
  892.         db '/rd/1/File managers/',0
  893.  
  894. Filter:
  895. dd Filter.end - Filter ;.1
  896. .1:
  897. db 'VOX',0
  898. .end:
  899. db 0
  900.  
  901.  
  902.  
  903. head_f_i:
  904. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  905.  
  906. system_dir_0 db '/sys/lib/'
  907. lib_name_0 db 'proc_lib.obj',0
  908. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  909. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  910.  
  911. system_dir_1 db '/sys/lib/'
  912. lib_name_1 db 'libimg.obj',0
  913. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  914. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  915.  
  916. system_dir_2 db '/sys/lib/'
  917. lib_name_2 db 'buf2d.obj',0
  918. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  919. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  920.  
  921. l_libs_start:
  922.         lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  923.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  924.         lib1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  925.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  926.         lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
  927.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  928. l_libs_end:
  929.  
  930. align 4
  931. import_libimg:
  932.         dd alib_init1
  933.         img_is_img  dd aimg_is_img
  934.         img_info    dd aimg_info
  935.         img_from_file dd aimg_from_file
  936.         img_to_file dd aimg_to_file
  937.         img_from_rgb dd aimg_from_rgb
  938.         img_to_rgb  dd aimg_to_rgb
  939.         img_to_rgb2 dd aimg_to_rgb2
  940.         img_decode  dd aimg_decode
  941.         img_encode  dd aimg_encode
  942.         img_create  dd aimg_create
  943.         img_destroy dd aimg_destroy
  944.         img_destroy_layer dd aimg_destroy_layer
  945.         img_count   dd aimg_count
  946.         img_lock_bits dd aimg_lock_bits
  947.         img_unlock_bits dd aimg_unlock_bits
  948.         img_flip    dd aimg_flip
  949.         img_flip_layer dd aimg_flip_layer
  950.         img_rotate  dd aimg_rotate
  951.         img_rotate_layer dd aimg_rotate_layer
  952.         img_draw    dd aimg_draw
  953.  
  954.         dd 0,0
  955.         alib_init1   db 'lib_init',0
  956.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  957.         aimg_info    db 'img_info',0
  958.         aimg_from_file db 'img_from_file',0
  959.         aimg_to_file db 'img_to_file',0
  960.         aimg_from_rgb db 'img_from_rgb',0
  961.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  962.         aimg_to_rgb2 db 'img_to_rgb2',0
  963.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  964.         aimg_encode  db 'img_encode',0
  965.         aimg_create  db 'img_create',0
  966.         aimg_destroy db 'img_destroy',0
  967.         aimg_destroy_layer db 'img_destroy_layer',0
  968.         aimg_count   db 'img_count',0
  969.         aimg_lock_bits db 'img_lock_bits',0
  970.         aimg_unlock_bits db 'img_unlock_bits',0
  971.         aimg_flip    db 'img_flip',0
  972.         aimg_flip_layer db 'img_flip_layer',0
  973.         aimg_rotate  db 'img_rotate',0
  974.         aimg_rotate_layer db 'img_rotate_layer',0
  975.         aimg_draw    db 'img_draw',0
  976.  
  977. align 4
  978. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  979.         OpenDialog_Init dd aOpenDialog_Init
  980.         OpenDialog_Start dd aOpenDialog_Start
  981. dd 0,0
  982.         aOpenDialog_Init db 'OpenDialog_init',0
  983.         aOpenDialog_Start db 'OpenDialog_start',0
  984.  
  985. align 4
  986. import_buf2d:
  987.         init dd sz_init
  988.         buf2d_create dd sz_buf2d_create
  989.         buf2d_create_f_img dd sz_buf2d_create_f_img
  990.         buf2d_clear dd sz_buf2d_clear
  991.         buf2d_draw dd sz_buf2d_draw
  992.         buf2d_delete dd sz_buf2d_delete
  993.         buf2d_line dd sz_buf2d_line
  994.         buf2d_rect_by_size dd sz_buf2d_rect_by_size
  995.         buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
  996.         buf2d_circle dd sz_buf2d_circle
  997.         buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
  998.         buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
  999.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  1000.         buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
  1001.         buf2d_bit_blt dd sz_buf2d_bit_blt
  1002.         buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
  1003.         buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
  1004.         buf2d_curve_bezier dd sz_buf2d_curve_bezier
  1005.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  1006.         buf2d_draw_text dd sz_buf2d_draw_text
  1007.         buf2d_crop_color dd sz_buf2d_crop_color
  1008.         buf2d_offset_h dd sz_buf2d_offset_h
  1009.         buf2d_flood_fill dd sz_buf2d_flood_fill
  1010.         buf2d_set_pixel dd sz_buf2d_set_pixel
  1011.         buf2d_get_pixel dd sz_buf2d_get_pixel
  1012.         buf2d_vox_brush_create dd sz_buf2d_vox_brush_create
  1013.         buf2d_vox_brush_delete dd sz_buf2d_vox_brush_delete
  1014.         dd 0,0
  1015.         sz_init db 'lib_init',0
  1016.         sz_buf2d_create db 'buf2d_create',0
  1017.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  1018.         sz_buf2d_clear db 'buf2d_clear',0
  1019.         sz_buf2d_draw db 'buf2d_draw',0
  1020.         sz_buf2d_delete db 'buf2d_delete',0
  1021.         sz_buf2d_line db 'buf2d_line',0
  1022.         sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
  1023.         sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
  1024.         sz_buf2d_circle db 'buf2d_circle',0
  1025.         sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
  1026.         sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
  1027.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  1028.         sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
  1029.         sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  1030.         sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
  1031.         sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
  1032.         sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
  1033.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  1034.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  1035.         sz_buf2d_crop_color db 'buf2d_crop_color',0
  1036.         sz_buf2d_offset_h db 'buf2d_offset_h',0
  1037.         sz_buf2d_flood_fill db 'buf2d_flood_fill',0
  1038.         sz_buf2d_set_pixel db 'buf2d_set_pixel',0
  1039.         sz_buf2d_get_pixel db 'buf2d_get_pixel',0
  1040.         sz_buf2d_vox_brush_create db 'buf2d_vox_brush_create',0
  1041.         sz_buf2d_vox_brush_delete db 'buf2d_vox_brush_delete',0
  1042.  
  1043. mouse_dd dd 0x0
  1044. sc system_colors
  1045.  
  1046. align 16
  1047. procinfo process_information
  1048.  
  1049. ;¡ãä¥à ®á­®¢­®£® ¨§®¡à ¦¥­¨ï
  1050. align 4
  1051. buf_0: dd 0 ;㪠§ â¥«ì ­  ¤a­ë¥ ¨§®¡à ¦¥­¨ï
  1052. .l: dw 5 ;+4 left
  1053. .t: dw 45 ;+6 top
  1054. .w: dd 192 ;+8 w
  1055. .h: dd 224 ;+12 h
  1056. .color: dd 0xffffff ;+16 color
  1057.         db 24 ;+20 bit in pixel
  1058.  
  1059. ;¡ãä¥à £«ã¡¨­ë ®á­®¢­®£® ¨§®¡à ¦¥­¨ï
  1060. align 4
  1061. buf_0z: dd 0
  1062.         dw 0 ;+4 left
  1063.         dw 0 ;+6 top
  1064. .w: dd 192 ;+8 w
  1065. .h: dd 224 ;+12 h
  1066. .color: dd 0 ;+16 color
  1067.         db 32 ;+20 bit in pixel
  1068.  
  1069. ;¡ãä¥à ¤«ï à¨á®¢ ­¨ï á१  ®¡ê¥ªâ 
  1070. align 4
  1071. buf_pl: dd 0
  1072. .l: dw 10+192 ;+4 left
  1073. .t: dw 45 ;+6 top
  1074. .w: dd 320 ;+8 w
  1075. .h: dd 330 ;+12 h
  1076. .color: dd 0xffffff ;+16 color
  1077.         db 24 ;+20 bit in pixel
  1078.  
  1079. ;¡ãä¥à ¤«ï ã«ãç襭®£® ७¤¥à 
  1080. align 4
  1081. buf_r_img:
  1082.         rb BUF_STRUCT_SIZE
  1083. align 4
  1084. buf_r_z:
  1085.         rb BUF_STRUCT_SIZE
  1086.  
  1087. ;¤ ­­ë¥ ¤«ï ᮧ¤ ­¨ï ¬¨­¨¬ «ì­®£® ¥¤¨­¨ç­®£® ¢®ªá¥«ï
  1088. align 4
  1089. vox_6_7_z:
  1090. dd 0,0,1,1,0,0,\
  1091.    0,2,2,2,2,0,\
  1092.    2,2,2,2,2,2,\
  1093.    2,3,2,2,3,2,\
  1094.    2,3,3,3,3,2,\
  1095.    0,3,3,3,3,0,\
  1096.    0,0,3,3,0,0
  1097.  
  1098. align 4
  1099. buf_vox:
  1100.         db 6,7,4,3 ;w,h,h_osn,n
  1101.         rb BUF_STRUCT_SIZE*(2+1)
  1102.  
  1103.  
  1104. i_end:
  1105.         rb 2048
  1106. stacktop:
  1107.         sys_path rb 1024
  1108.         file_name:
  1109.                 rb 1024 ;4096
  1110.         library_path rb 1024
  1111.         plugin_path rb 4096
  1112.         openfile_path rb 4096
  1113.         filename_area rb 256
  1114. mem:
  1115.