Subversion Repositories Kolibri OS

Rev

Rev 5388 | Rev 5415 | 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 '../../../../programs/macros.inc'
  13. include '../../../../programs/proc32.inc'
  14. include '../../../../programs/develop/libraries/box_lib/load_lib.mac'
  15. include '../../../../programs/dll.inc'
  16. include '../../../../programs/develop/libraries/TinyGL/asm_fork/opengl_const.inc'
  17. include 'vox_3d.inc'
  18. include '../trunk/str.inc'
  19.  
  20. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  21. caption db 'Voxel viewer 11.02.15',0 ;¯®¤¯¨áì ®ª­ 
  22.  
  23. struct FileInfoBlock
  24.         Function dd ?
  25.         Position dd ?
  26.         Flags    dd ?
  27.         Count    dd ?
  28.         Buffer   dd ?
  29.                 db ?
  30.         FileName dd ?
  31. ends
  32.  
  33. run_file_70 FileInfoBlock
  34. image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  35.  
  36. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  37. IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10
  38. image_data_toolbar dd 0
  39.  
  40. offs_zbuf_pbuf equ 24
  41.  
  42. macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
  43.         ;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
  44.         if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
  45.                 jmp @f
  46.                         local .path_str
  47.                         .path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
  48.                         db 0
  49.                 @@:
  50.                 ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
  51.                 copy_path .path_str,[32],file_name,0x0
  52.         else
  53.                 copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
  54.         end if
  55.  
  56.         stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
  57.         mov [buf],eax
  58.  
  59.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  60.         mov [run_file_70.Function], 0
  61.         mov [run_file_70.Position], 0
  62.         mov [run_file_70.Flags], 0
  63.         mov [run_file_70.Count], dword size
  64.         m2m [run_file_70.Buffer], [buf]
  65.         mov byte[run_file_70+20], 0
  66.         mov [run_file_70.FileName], file_name
  67.         mov ebx,run_file_70
  68.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  69.         cmp ebx,0xffffffff
  70.         je @f
  71.                 ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
  72.                 stdcall dword[img_decode], dword[buf],ebx,0
  73.                 mov dword[image_data],eax
  74.                 ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  75.                 stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
  76.                 ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
  77.                 stdcall dword[img_destroy], dword[image_data]
  78.         @@:
  79. }
  80.  
  81.  
  82.  
  83. align 4
  84. start:
  85.         load_libraries l_libs_start,l_libs_end
  86.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  87.         mov     ebp,lib_0
  88.         cmp     dword [ebp+ll_struc_size-4],0
  89.         jz      @f
  90.                 mcall -1 ;exit not correct
  91.         @@:
  92.         mcall 48,3,sc,sizeof.system_colors
  93.         mcall 40,0x27
  94.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  95.  
  96.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
  97.  
  98.         load_image_file 'toolbar_t.png', image_data_toolbar,IMAGE_TOOLBAR_SIZE*2 ;*2 for gray icons
  99.         mov eax,[image_data_toolbar]
  100.         add eax,IMAGE_TOOLBAR_SIZE
  101.         stdcall img_to_gray, [image_data_toolbar],eax,(IMAGE_TOOLBAR_SIZE)/3
  102.  
  103.         mcall 26,9
  104.         mov [last_time],eax
  105.  
  106.         stdcall [kosglMakeCurrent], 5,30,512,512,ctx1
  107.         stdcall [glEnable], GL_DEPTH_TEST
  108.         stdcall [glEnable], GL_NORMALIZE ;¤¥« ¬ ­®à¬ «¨ ®¤¨­ ª®¢®© ¢¥«¨ç¨­ë ¢® ¨§¡¥¦ ­¨¥  àâ¥ä ªâ®¢
  109.         stdcall [glClearColor], 0.0,0.0,0.0,0.0
  110.         stdcall [glShadeModel], GL_SMOOTH
  111.  
  112.         call but_new_file
  113.  
  114.  
  115. align 4
  116. red_win:
  117.         call draw_window
  118.  
  119. align 4
  120. still:
  121.         mcall 26,9
  122.         mov ebx,[last_time]
  123.         add ebx,50 ;§ ¤¥à¦ª 
  124.         cmp ebx,eax
  125.         jge @f
  126.                 mov ebx,eax
  127.         @@:
  128.         sub ebx,eax
  129.         mcall 23
  130.         bt word[opt_auto_rotate],0
  131.         jnc @f
  132.                 or eax,eax
  133.                 jz timer_funct
  134.         @@:
  135.  
  136.         cmp al,1
  137.         jz red_win
  138.         cmp al,2
  139.         jz key
  140.         cmp al,3
  141.         jz button
  142.  
  143.         jmp still
  144.  
  145. align 4
  146. timer_funct:
  147.         pushad
  148.         mcall 26,9
  149.         mov [last_time],eax
  150.  
  151.         ; ¢â®¬ â¨ç¥áª®¥ ¨§¬¥­¥­¨¥ 㣫  ®¡§®à 
  152.         fld dword[angle_y]
  153.         fsub dword[delt_size]
  154.         fstp dword[angle_y]
  155.         call draw_3d
  156.         stdcall [kosglSwapBuffers]
  157.  
  158.         popad
  159.         jmp still
  160.  
  161. align 4
  162. draw_window:
  163. pushad
  164.         mcall 12,1
  165.  
  166.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  167.         xor eax,eax
  168.         mov edx,[sc.work]
  169.         or  edx,(3 shl 24)+0x30000000
  170.         mcall ,(20 shl 16)+800,(20 shl 16)+570,,,caption
  171.  
  172.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  173.         mov esi,[sc.work_button]
  174.         mcall 8,(5 shl 16)+20,(5 shl 16)+20,3
  175.  
  176.         mov ebx,(30 shl 16)+20
  177.         mov edx,4
  178.         int 0x40
  179.         add ebx,25 shl 16
  180.         mov edx,5
  181.         int 0x40
  182.         add ebx,30 shl 16
  183.         mov edx,6
  184.         int 0x40
  185.         add ebx,25 shl 16
  186.         mov edx,7
  187.         int 0x40
  188.         add ebx,25 shl 16
  189.         mov edx,8
  190.         int 0x40
  191.         add ebx,25 shl 16
  192.         mov edx,9
  193.         int 0x40
  194.         add ebx,25 shl 16
  195.         mov edx,10
  196.         int 0x40
  197.         add ebx,25 shl 16
  198.         mov edx,11
  199.         int 0x40
  200.         add ebx,25 shl 16
  201.         mov edx,12
  202.         int 0x40
  203.  
  204.         call draw_toolbar_i
  205.  
  206.         stdcall [buf2d_draw], buf_0
  207.         stdcall [kosglSwapBuffers]
  208.  
  209.         mcall 12,2
  210. popad
  211.         ret
  212.  
  213.  
  214. align 4
  215. draw_toolbar_i:
  216.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  217.         mov edx,(7 shl 16)+7 ;icon new
  218.         mcall 7,[image_data_toolbar],(16 shl 16)+16
  219.  
  220.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  221.         add edx,(25 shl 16) ;icon open
  222.         int 0x40
  223.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  224.         add edx,(25 shl 16) ;icon save
  225.         int 0x40
  226.  
  227.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  228.         add edx,(30 shl 16) ;zoom +
  229.         int 0x40
  230.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  231.         add edx,(25 shl 16) ;zoom -
  232.         int 0x40
  233.  
  234.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  235.         cmp word[opt_light],0
  236.         jne @f
  237.                 add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
  238.         @@:
  239.         add edx,(25 shl 16) ;light on/off
  240.         int 0x40
  241.         cmp word[opt_light],0
  242.         jne @f
  243.                 sub ebx,IMAGE_TOOLBAR_SIZE
  244.         @@:
  245.  
  246.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  247.         cmp word[opt_cube_box],0
  248.         jne @f
  249.                 add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
  250.         @@:
  251.         add edx,(25 shl 16) ;box on/off
  252.         int 0x40
  253.         cmp word[opt_cube_box],0
  254.         jne @f
  255.                 sub ebx,IMAGE_TOOLBAR_SIZE
  256.         @@:
  257.  
  258.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  259.         cmp word[opt_auto_rotate],0
  260.         jne @f
  261.                 add ebx,IMAGE_TOOLBAR_SIZE ;make gray icon
  262.         @@:
  263.         add edx,(25 shl 16) ;auto rotate on/off
  264.         int 0x40
  265.         cmp word[opt_auto_rotate],0
  266.         jne @f
  267.                 sub ebx,IMAGE_TOOLBAR_SIZE
  268.         @@:
  269.  
  270.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  271.         add edx,(25 shl 16) ;info voxels
  272.         int 0x40
  273.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  274.         add edx,(25 shl 16) ;refresh
  275.         int 0x40
  276.         ret
  277.  
  278.  
  279. align 4
  280. key:
  281.         mcall 2
  282.  
  283.         cmp ah,178 ;Up
  284.         jne @f
  285.                 fld dword[angle_x]
  286.                 fadd dword[delt_size]
  287.                 fstp dword[angle_x]
  288.                 call draw_3d
  289.                 stdcall [kosglSwapBuffers]
  290.         @@:
  291.         cmp ah,177 ;Down
  292.         jne @f
  293.                 fld dword[angle_x]
  294.                 fsub dword[delt_size]
  295.                 fstp dword[angle_x]
  296.                 call draw_3d
  297.                 stdcall [kosglSwapBuffers]
  298.         @@:
  299.         cmp ah,176 ;Left
  300.         jne @f
  301.                 fld dword[angle_y]
  302.                 fadd dword[delt_size]
  303.                 fstp dword[angle_y]
  304.                 call draw_3d
  305.                 stdcall [kosglSwapBuffers]
  306.         @@:
  307.         cmp ah,179 ;Right
  308.         jne @f
  309.                 fld dword[angle_y]
  310.                 fsub dword[delt_size]
  311.                 fstp dword[angle_y]
  312.                 call draw_3d
  313.                 stdcall [kosglSwapBuffers]
  314.         @@:
  315.  
  316.         jmp still
  317.  
  318.  
  319. align 4
  320. button:
  321.         mcall 17
  322.         cmp ah,3
  323.         jne @f
  324.                 call but_new_file
  325.         @@:
  326.         cmp ah,4
  327.         jne @f
  328.                 call but_open_file
  329.         @@:
  330.         cmp ah,5
  331.         jne @f
  332.                 call but_save_file
  333.         @@:
  334.         cmp ah,6
  335.         jne @f
  336.                 call but_zoom_p
  337.         @@:
  338.         cmp ah,7
  339.         jne @f
  340.                 call but_zoom_m
  341.         @@:
  342.         cmp ah,8
  343.         jne @f
  344.                 call but_3
  345.         @@:
  346.         cmp ah,9
  347.         jne @f
  348.                 call but_4
  349.         @@:
  350.         cmp ah,10
  351.         jne @f
  352.                 call but_5
  353.         @@:
  354.         cmp ah,11
  355.         jne @f
  356.                 call but_6
  357.         @@:
  358.         cmp ah,12
  359.         jne @f
  360.                 call but_draw_cadr
  361.         @@:
  362.         cmp ah,1
  363.         jne still
  364. .exit:
  365.         stdcall [buf2d_delete],buf_0
  366.         stdcall mem.Free,[image_data_toolbar]
  367.         stdcall mem.Free,[open_file_data]
  368.         stdcall mem.Free,[open_file_ogl]
  369.         mcall -1
  370.  
  371.  
  372. align 4
  373. but_new_file:
  374.         mov dword[angle_x], 30.0
  375.         mov dword[angle_y], 180.0
  376.         mov dword[angle_z], 180.0
  377.         ret
  378.  
  379. align 4
  380. open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  381. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
  382. open_b rb 560
  383. open_file_ogl dd 0 ;¤«ï § ¯¨á¨ ª®®à¤¨­ â èà ­¥© ¢®ªá¥«¥© ¢ ¯®ª §¥ opengl
  384. v_zoom dd 0
  385.  
  386. align 4
  387. but_open_file:
  388. pushad
  389.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  390.         mov [OpenDialog_data.type],0
  391.         stdcall [OpenDialog_Start],OpenDialog_data
  392.         cmp [OpenDialog_data.status],2
  393.         je .end_open_file
  394.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  395.  
  396.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  397.         mov [run_file_70.Function], 5
  398.         mov [run_file_70.Position], 0
  399.         mov [run_file_70.Flags], 0
  400.         mov dword[run_file_70.Count], 0
  401.         mov dword[run_file_70.Buffer], open_b
  402.         mov byte[run_file_70+20], 0
  403.         mov dword[run_file_70.FileName], openfile_path
  404.         mov ebx,run_file_70
  405.         int 0x40
  406.  
  407.         ;mov eax,dword[open_b+32]
  408.         ;mov edi,txt_buf
  409.         ;call conv_int_to_str
  410.         ;notify_window_run txt_buf
  411.  
  412.         mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
  413.         stdcall mem.ReAlloc,[open_file_data],ecx
  414.         mov [open_file_data],eax
  415.        
  416.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  417.         mov [run_file_70.Function], 0
  418.         mov [run_file_70.Position], 0
  419.         mov [run_file_70.Flags], 0
  420.         mov dword[run_file_70.Count], ecx
  421.         m2m dword[run_file_70.Buffer], dword[open_file_data]
  422.         mov byte[run_file_70+20], 0
  423.         mov dword[run_file_70.FileName], openfile_path
  424.         mov ebx,run_file_70
  425.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  426.         cmp ebx,0xffffffff
  427.         je .end_open_file
  428.  
  429.         mov [open_file_size],ebx
  430.         mcall 71,1,openfile_path
  431.  
  432.         mov eax,[open_file_data]
  433.         movzx eax,byte[eax]
  434.         mov dword[v_zoom],eax ;¡¥à¥¬ ¬ áèâ ¡ ¯® 㬮«ç ­¨î
  435.         mov ecx,[open_file_size]
  436.         sub ecx,vox_offs_data
  437.         shr ecx,2
  438.         imul ecx,vox_ogl_size
  439.         add ecx,4 ;ecx = à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ª®®à¤¨­ â
  440.         stdcall mem.ReAlloc,[open_file_ogl],ecx
  441.         or eax,eax
  442.         jz .end_open_file
  443.                 mov [open_file_ogl],eax
  444.                 stdcall buf_vox_obj_create_3d,[open_file_data],eax,0,0,[v_zoom]
  445.                 call draw_cadr_8
  446.         .end_open_file:
  447. popad
  448.         ret
  449.  
  450. ;description:
  451. ; à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢ ¯®¤ à §­ë¬¨ 㣫 ¬¨ ¯®¢®à®â 
  452. align 4
  453. draw_cadr_8:
  454.         call but_new_file ;ãáâ ­®¢ª  㣫®¢ ¯®¢®à®â  ¯® 㬮«ç ­¨î
  455.         stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
  456.  
  457.         ;à¨á®¢ ­¨¥ 8-¬¨ ª ¤à®¢
  458.         fild dword[rot_angles+4]
  459.         fstp dword[angle_y]
  460.         call draw_3d
  461.         call draw_cadr
  462.         stdcall [buf2d_bit_blt], buf_0, 128, 0, buf_1
  463.  
  464.         fild dword[rot_angles+8]
  465.         fstp dword[angle_y]
  466.         call draw_3d
  467.         call draw_cadr
  468.         stdcall [buf2d_bit_blt], buf_0, 0, 128, buf_1
  469.        
  470.         fild dword[rot_angles+12]
  471.         fstp dword[angle_y]
  472.         call draw_3d
  473.         call draw_cadr
  474.         stdcall [buf2d_bit_blt], buf_0, 128, 128, buf_1
  475.  
  476.         fild dword[rot_angles+16]
  477.         fstp dword[angle_y]
  478.         call draw_3d
  479.         call draw_cadr
  480.         stdcall [buf2d_bit_blt], buf_0, 0, 256, buf_1
  481.        
  482.         fild dword[rot_angles+20]
  483.         fstp dword[angle_y]
  484.         call draw_3d
  485.         call draw_cadr
  486.         stdcall [buf2d_bit_blt], buf_0, 128, 256, buf_1
  487.  
  488.         fild dword[rot_angles+24]
  489.         fstp dword[angle_y]
  490.         call draw_3d
  491.         call draw_cadr
  492.         stdcall [buf2d_bit_blt], buf_0, 0, 384, buf_1
  493.        
  494.         fild dword[rot_angles+28]
  495.         fstp dword[angle_y]
  496.         call draw_3d
  497.         call draw_cadr
  498.         stdcall [buf2d_bit_blt], buf_0, 128, 384, buf_1
  499.  
  500.         ; *** ¯®á«¥¤­¨© ª ¤à ***
  501.         fild dword[rot_angles]
  502.         fstp dword[angle_y]
  503.         call draw_3d
  504.         call draw_cadr
  505.         stdcall [buf2d_bit_blt], buf_0, 0, 0, buf_1
  506.        
  507.         call draw_3d
  508.         ; ***
  509.  
  510.         stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  511.         ret
  512.  
  513. align 4
  514. rot_angles dd 180,225,270,315,0,45,90,135
  515.  
  516. align 4
  517. draw_cadr:
  518.         mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
  519.         mov eax,[eax] ;eax -> ZBuffer
  520.         mov eax,[eax+offs_zbuf_pbuf] ;eax -> ZBuffer.pbuf
  521.         mov dword[buf_1],eax
  522.  
  523.         mov dword[buf_1.w],512
  524.         mov dword[buf_1.h],512
  525.         stdcall [buf2d_img_hdiv2],buf_1
  526.         mov dword[buf_1.h],256
  527.         stdcall [buf2d_img_hdiv2],buf_1
  528.         mov dword[buf_1.h],128
  529.         stdcall [buf2d_img_wdiv2],buf_1
  530.         mov dword[buf_1.w],256
  531.         stdcall [buf2d_img_wdiv2],buf_1
  532.         mov dword[buf_1.w],128
  533.         ret
  534.  
  535. align 4
  536. but_save_file:
  537.         pushad
  538.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  539.         mov [OpenDialog_data.type],1
  540.         stdcall [OpenDialog_Start],OpenDialog_data
  541.         cmp [OpenDialog_data.status],2
  542.         je .end_save_file
  543.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  544.  
  545.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  546.         mov [run_file_70.Function], 2
  547.         mov [run_file_70.Position], 0
  548.         mov [run_file_70.Flags], 0
  549.         mov ebx, dword[open_file_data]
  550.         ;¯¨è¥¬ ¢ ä ©« ­®¢ë© ¬ áèâ ¡
  551.         mov edx,dword[v_zoom]
  552.         mov byte[ebx],dl
  553.         ;
  554.         mov [run_file_70.Buffer], ebx
  555.         mov ebx,[open_file_size]
  556.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  557.         mov byte[run_file_70+20], 0
  558.         mov dword[run_file_70.FileName], openfile_path
  559.         mov ebx,run_file_70
  560.         int 0x40 ;á®å࠭塞 ä ©«
  561.         ;cmp ebx,0xffffffff
  562.         ;je .end_save_file
  563.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  564.  
  565.         .end_save_file:
  566.         popad
  567.         ret
  568.  
  569. align 4
  570. proc but_zoom_p uses eax
  571.     cmp dword[v_zoom],11 ;max=2^11=2048
  572.     jge @f
  573.         inc dword[v_zoom]
  574.         stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
  575.                 call draw_3d
  576.                 stdcall [kosglSwapBuffers]
  577.     @@:
  578.     ret
  579. endp
  580.  
  581. align 4
  582. proc but_zoom_m uses eax
  583.     cmp dword[v_zoom],1
  584.     jle @f
  585.         dec dword[v_zoom]
  586.         stdcall buf_vox_obj_create_3d,[open_file_data],[open_file_ogl],0,0,[v_zoom]
  587.                 call draw_3d
  588.                 stdcall [kosglSwapBuffers]
  589.     @@:
  590.     ret
  591. endp
  592.  
  593. align 4
  594. proc but_3 uses eax ebx ecx edx
  595.         xor word[opt_light],1
  596.         cmp word[opt_light],0
  597.         je @f
  598.                 stdcall [glEnable], GL_LIGHTING
  599.                 stdcall [glEnable], GL_LIGHT0
  600.                 jmp .end_light
  601.         @@:
  602.                 stdcall [glDisable], GL_LIGHTING
  603.                 stdcall [glDisable], GL_LIGHT0
  604.         .end_light:
  605.         call draw_toolbar_i
  606.         call draw_3d
  607.         stdcall [kosglSwapBuffers]
  608.         ret
  609. endp
  610.  
  611. align 4
  612. proc but_4 uses eax ebx ecx edx
  613.         xor word[opt_cube_box],1
  614.         call draw_toolbar_i
  615.         call draw_3d
  616.         stdcall [kosglSwapBuffers]
  617.         ret
  618. endp
  619.  
  620. align 4
  621. proc but_5 uses eax ebx ecx edx
  622.         xor word[opt_auto_rotate],1
  623.         call draw_toolbar_i
  624.         ret
  625. endp
  626.  
  627. align 4
  628. proc but_6 uses eax ebx ecx edx edi
  629.         ;¢ëç¨á«¥­¨¥ áâ â¨á⨪¨ ¯® ¢®ªá¥«ï¬
  630.         mov eax,[open_file_ogl]
  631.         or eax,eax
  632.         jz .end_stat
  633.                 mov ebx,[eax]
  634.                 mov ecx,ebx
  635.                 mov edx,ebx
  636.                 imul ebx,6
  637.                 add eax,4
  638. align 4
  639.                 .cycle_0:
  640.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_z0
  641.                         jc @f
  642.                         dec ebx
  643.                         @@:
  644.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_z1
  645.                         jc @f
  646.                         dec ebx
  647.                         @@:
  648.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_y0
  649.                         jc @f
  650.                         dec ebx
  651.                         @@:
  652.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_y1
  653.                         jc @f
  654.                         dec ebx
  655.                         @@:
  656.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_x0
  657.                         jc @f
  658.                         dec ebx
  659.                         @@:
  660.                         bt word[eax+vox_ogl_planes],vox_ogl_gran_x1
  661.                         jc @f
  662.                         dec ebx
  663.                         @@:
  664.                         add eax,vox_ogl_size
  665.                 loop .cycle_0
  666.  
  667.                 mov eax,edx
  668.                 mov edi,txt_stat_m1.v
  669.                 stdcall convert_int_to_str,20
  670.  
  671.                 ;mov eax,ebx
  672.                 ;mov edi,txt_stat_m2.v
  673.                 ;stdcall convert_int_to_str,20
  674.  
  675.                 ;stdcall str_n_cat,txt_stat_m1.v,txt_stat_m2,50
  676.                 notify_window_run txt_stat_m1
  677.         .end_stat:
  678.         ret
  679. endp
  680.  
  681. align 4
  682. txt_stat_m1:
  683.         db '‘â â¨á⨪ ',13,10,'‚®ªá¥«¥©: '
  684. .v: rb 50
  685. txt_stat_m2:
  686.         db 13,10,'Žâ®¡à ¦ ¥¬ëå £à ­¥©: '
  687. .v: rb 20
  688.  
  689. align 4
  690. proc but_draw_cadr uses eax ebx ecx edx
  691.         mov ebx,[angle_x]
  692.         mov ecx,[angle_y]
  693.         mov edx,[angle_z]
  694.         call draw_cadr_8
  695.         mov [angle_x],ebx
  696.         mov [angle_y],ecx
  697.         mov [angle_z],edx
  698.         cmp word[opt_auto_rotate],0
  699.         jne @f
  700.                 call draw_3d
  701.                 ;stdcall [kosglSwapBuffers]
  702.         @@:
  703.         ret
  704. endp
  705.  
  706. align 4
  707. draw_3d:
  708.         stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à æ¢¥â  ¨ £«ã¡¨­ë
  709.         stdcall [glPushMatrix]
  710.  
  711.         cmp word[opt_light],0
  712.         je @f
  713.                 call SetLight
  714.         @@:
  715.         stdcall [glTranslatef], 0.0,0.0,0.5 ;ª®®à¤¨­ âë ¯® ®á¨ z ¤®«¦­ë ¡ëâì ¢ ¯à¥¤¥« å ®â 0.0 ¤® 1.0, ¨­ ç¥ ¨§®¡à ¦¥­¨¥ ¡ã¤¥â ®âᥪ âìáï
  716.                 ;¢®ªá¥«ì­ë© ®¡ê¥ªâ ¨¬¥¥â ª®®à¤¨­ âë ¯® ®áï¬ ®â -0.5 ¤® 0.5, ¯®â®¬ã ¥£® ¤¢¨£ ¥¬ ­  +0.5
  717.                 ;­® ¢á¥ ¦¥ ¯à¨ ¯®¢®à®â å ¡ã¤ãâ ®âᥪ âáï ªà ï, ª®â®àë¥ ¢ë«¥§ãâ §  ¯à¥¤¥«ë ¯«®áª®á⥩ ®âá¥ç¥­¨ï
  718.                 ;¢ ¢¥àᨨ opengl ¯®¤ Win ª®®à¤¨­ âë ¨¤ãâ ®â -1.0 ¤® 1.0 ¯®â®¬ã â ¬ í⮣® ¤¥« âì ­¥ ­ã¦­®
  719.         stdcall [glScalef], [scale], [scale], [scale] ;㢥«¨ç¨¢ ¥¬ ¢®ªá¥«ì­ë© ®¡ê¥ªâ, çâ®-¡ë ­¥ ¡ë« ®ç¥­ì ¬ «¥­ìª¨¬
  720.         stdcall [glRotatef], [angle_x],1.0,0.0,0.0
  721.         stdcall [glRotatef], [angle_y],0.0,1.0,0.0
  722.         stdcall [glRotatef], [angle_z],0.0,0.0,1.0
  723.         stdcall draw_voxels_3d,[open_file_ogl]
  724.  
  725.         stdcall [glPopMatrix]
  726. ret
  727.  
  728. align 4
  729. proc SetLight
  730.     stdcall [glLightfv], GL_LIGHT0, GL_POSITION, light_position
  731.     stdcall [glLightfv], GL_LIGHT0, GL_SPOT_DIRECTION, light_dir
  732.  
  733.     stdcall [glLightfv], GL_LIGHT0, GL_DIFFUSE, white_light
  734.     stdcall [glLightfv], GL_LIGHT0, GL_SPECULAR, white_light
  735.  
  736.     stdcall [glEnable], GL_COLOR_MATERIAL
  737.     stdcall [glColorMaterial], GL_FRONT, GL_AMBIENT_AND_DIFFUSE
  738.     stdcall [glMaterialfv], GL_FRONT, GL_SPECULAR, mat_specular
  739.     stdcall [glMaterialf], GL_FRONT, GL_SHININESS, mat_shininess
  740.     stdcall [glLightModelfv], GL_LIGHT_MODEL_AMBIENT, lmodel_ambient
  741.  
  742.     stdcall [glEnable], GL_LIGHTING
  743.     stdcall [glEnable], GL_LIGHT0
  744.    
  745.     ;;;stdcall [glLightModeli], GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE
  746.     ret
  747. endp
  748.  
  749. align 4
  750. proc img_to_gray, buf_rgb:dword, buf_g24:dword, pixels:dword
  751. pushad
  752.         mov esi,[buf_rgb]
  753.         mov edi,[buf_g24]
  754.         mov ecx,[pixels]
  755.         mov ebx,3
  756. align 4
  757.         @@:
  758.                 movzx eax,byte[esi]
  759.                 movzx edx,byte[esi+1]
  760.                 add eax,edx
  761.                 movzx edx,byte[esi+2]
  762.                 add eax,edx
  763.                 xor edx,edx
  764.                 div ebx ;shr eax,2
  765.                 mov ah,al
  766.                 mov word[edi],ax
  767.                 mov byte[edi+2],al
  768.                 add esi,3
  769.                 add edi,3
  770.                 loop @b
  771. popad
  772.         ret
  773. endp
  774.  
  775.  
  776. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  777. align 4
  778. OpenDialog_data:
  779. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  780. .procinfo               dd procinfo     ;+4
  781. .com_area_name          dd communication_area_name      ;+8
  782. .com_area               dd 0    ;+12
  783. .opendir_path           dd plugin_path  ;+16
  784. .dir_default_path       dd default_dir ;+20
  785. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  786. .draw_window            dd draw_window  ;+28
  787. .status                 dd 0    ;+32
  788. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  789. .filename_area          dd filename_area        ;+40
  790. .filter_area            dd Filter
  791. .x:
  792. .x_size                 dw 420 ;+48 ; Window X size
  793. .x_start                dw 10 ;+50 ; Window X position
  794. .y:
  795. .y_size                 dw 320 ;+52 ; Window y size
  796. .y_start                dw 10 ;+54 ; Window Y position
  797.  
  798. default_dir db '/rd/1',0
  799.  
  800. communication_area_name:
  801.         db 'FFFFFFFF_open_dialog',0
  802. open_dialog_name:
  803.         db 'opendial',0
  804. communication_area_default_path:
  805.         db '/rd/1/File managers/',0
  806.  
  807. Filter:
  808. dd Filter.end - Filter ;.1
  809. .1:
  810. db 'VOX',0
  811. db 'TXT',0
  812. .end:
  813. db 0
  814.  
  815.  
  816.  
  817. head_f_i:
  818. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  819.  
  820. system_dir_0 db '/sys/lib/'
  821. lib_name_0 db 'proc_lib.obj',0
  822. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  823. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  824.  
  825. system_dir_1 db '/sys/lib/'
  826. lib_name_1 db 'libimg.obj',0
  827. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  828. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  829.  
  830. system_dir_2 db '/sys/lib/'
  831. lib_name_2 db 'buf2d.obj',0
  832. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  833. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  834.  
  835. l_libs_start:
  836.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  837.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  838.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  839.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  840.         lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
  841.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  842.         lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
  843.                 err_msg_found_lib_3,head_f_l,import_lib_tinygl,err_msg_import_3,head_f_i
  844. l_libs_end:
  845.  
  846. align 4
  847. import_libimg:
  848.         dd alib_init1
  849.         img_is_img  dd aimg_is_img
  850.         img_info    dd aimg_info
  851.         img_from_file dd aimg_from_file
  852.         img_to_file dd aimg_to_file
  853.         img_from_rgb dd aimg_from_rgb
  854.         img_to_rgb  dd aimg_to_rgb
  855.         img_to_rgb2 dd aimg_to_rgb2
  856.         img_decode  dd aimg_decode
  857.         img_encode  dd aimg_encode
  858.         img_create  dd aimg_create
  859.         img_destroy dd aimg_destroy
  860.         img_destroy_layer dd aimg_destroy_layer
  861.         img_count   dd aimg_count
  862.         img_lock_bits dd aimg_lock_bits
  863.         img_unlock_bits dd aimg_unlock_bits
  864.         img_flip    dd aimg_flip
  865.         img_flip_layer dd aimg_flip_layer
  866.         img_rotate  dd aimg_rotate
  867.         img_rotate_layer dd aimg_rotate_layer
  868.         img_draw    dd aimg_draw
  869.  
  870.         dd 0,0
  871.         alib_init1   db 'lib_init',0
  872.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  873.         aimg_info    db 'img_info',0
  874.         aimg_from_file db 'img_from_file',0
  875.         aimg_to_file db 'img_to_file',0
  876.         aimg_from_rgb db 'img_from_rgb',0
  877.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  878.         aimg_to_rgb2 db 'img_to_rgb2',0
  879.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  880.         aimg_encode  db 'img_encode',0
  881.         aimg_create  db 'img_create',0
  882.         aimg_destroy db 'img_destroy',0
  883.         aimg_destroy_layer db 'img_destroy_layer',0
  884.         aimg_count   db 'img_count',0
  885.         aimg_lock_bits db 'img_lock_bits',0
  886.         aimg_unlock_bits db 'img_unlock_bits',0
  887.         aimg_flip    db 'img_flip',0
  888.         aimg_flip_layer db 'img_flip_layer',0
  889.         aimg_rotate  db 'img_rotate',0
  890.         aimg_rotate_layer db 'img_rotate_layer',0
  891.         aimg_draw    db 'img_draw',0
  892.  
  893. align 4
  894. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  895.         OpenDialog_Init dd aOpenDialog_Init
  896.         OpenDialog_Start dd aOpenDialog_Start
  897. dd 0,0
  898.         aOpenDialog_Init db 'OpenDialog_init',0
  899.         aOpenDialog_Start db 'OpenDialog_start',0
  900.  
  901. align 4
  902. import_buf2d:
  903.         init dd sz_init
  904.         buf2d_create dd sz_buf2d_create
  905.         buf2d_create_f_img dd sz_buf2d_create_f_img
  906.         buf2d_clear dd sz_buf2d_clear
  907.         buf2d_draw dd sz_buf2d_draw
  908.         buf2d_delete dd sz_buf2d_delete
  909.         buf2d_line dd sz_buf2d_line
  910.         buf2d_rect_by_size dd sz_buf2d_rect_by_size
  911.         buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
  912.         buf2d_circle dd sz_buf2d_circle
  913.         buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
  914.         buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
  915.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  916.         buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
  917.         buf2d_bit_blt dd sz_buf2d_bit_blt
  918.         buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
  919.         buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
  920.         buf2d_curve_bezier dd sz_buf2d_curve_bezier
  921.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  922.         buf2d_draw_text dd sz_buf2d_draw_text
  923.         buf2d_crop_color dd sz_buf2d_crop_color
  924.         buf2d_offset_h dd sz_buf2d_offset_h
  925.         buf2d_flood_fill dd sz_buf2d_flood_fill
  926.         buf2d_set_pixel dd sz_buf2d_set_pixel
  927.         dd 0,0
  928.         sz_init db 'lib_init',0
  929.         sz_buf2d_create db 'buf2d_create',0
  930.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  931.         sz_buf2d_clear db 'buf2d_clear',0
  932.         sz_buf2d_draw db 'buf2d_draw',0
  933.         sz_buf2d_delete db 'buf2d_delete',0
  934.         sz_buf2d_line db 'buf2d_line',0
  935.         sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
  936.         sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
  937.         sz_buf2d_circle db 'buf2d_circle',0
  938.         sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
  939.         sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
  940.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  941.         sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
  942.         sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  943.         sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
  944.         sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
  945.         sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
  946.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  947.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  948.         sz_buf2d_crop_color db 'buf2d_crop_color',0
  949.         sz_buf2d_offset_h db 'buf2d_offset_h',0
  950.         sz_buf2d_flood_fill db 'buf2d_flood_fill',0
  951.         sz_buf2d_set_pixel db 'buf2d_set_pixel',0
  952.  
  953. ;--------------------------------------------------
  954. align 4
  955. import_lib_tinygl:
  956.  
  957. macro E_LIB n
  958. {
  959.         n dd sz_#n
  960. }
  961. include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
  962.         dd 0,0
  963. macro E_LIB n
  964. {
  965.         sz_#n db `n,0
  966. }
  967. include '../../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
  968.  
  969. ;--------------------------------------------------
  970. system_dir_3 db '/sys/lib/'
  971. lib_name_3 db 'tinygl.obj',0
  972. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'tinygl.obj',39,0
  973. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,0
  974. ;--------------------------------------------------
  975.  
  976. sc system_colors
  977. last_time dd 0
  978.  
  979. align 16
  980. procinfo process_information
  981.  
  982. align 4
  983. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  984.         dw 530 ;+4 left
  985.         dw 30 ;+6 top
  986. .w: dd 256 ;+8 w
  987. .h: dd 512 ;+12 h
  988. .color: dd 0xffffd0 ;+16 color
  989.         db 24 ;+20 bit in pixel
  990.  
  991. align 4
  992. buf_1: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  993.         dw 0 ;+4 left
  994.         dw 0 ;+6 top
  995. .w: dd 512 ;+8 w
  996. .h: dd 512 ;+12 h
  997. .color: dd 0xffffff ;+16 color
  998.         db 24 ;+20 bit in pixel
  999.  
  1000. align 4
  1001. ctx1 db 28 dup (0) ;TinyGLContext or KOSGLContext
  1002. ;sizeof.TinyGLContext = 28
  1003.  
  1004. scale dd 1.414213562
  1005. angle_x dd 0.0
  1006. angle_y dd 0.0
  1007. angle_z dd 0.0
  1008. delt_size dd 3.0
  1009.  
  1010. opt_light dw 0 ;®¯æ¨ï ¤«ï ¢ª«î祭¨ï/¢ëª«î祭¨ï ᢥâ 
  1011. opt_cube_box dw 1 ;®¯æ¨ï ¤«ï à¨á®¢ ­¨ï à ¬ª¨ ¢®ªà㣠®¡ê¥ªâ 
  1012. opt_auto_rotate dw 0 ;®¯æ¨ï ¤«ï  ¢â®¬ â¨ç¥áª®£® ¯®¢®à®â  ®¡ê¥ªâ 
  1013.  
  1014. light_position dd 0.0, 0.0, 2.0, 1.0 ;  á¯®«®¦¥­¨¥ ¨áâ®ç­¨ª  [0][1][2]
  1015.         ;[3] = (0.0 - ¡¥áª®­¥ç­® 㤠«¥­­ë© ¨áâ®ç­¨ª, 1.0 - ¨áâ®ç­¨ª á¢¥â  ­  ®¯à¥¤¥«¥­­®¬ à ááâ®ï­¨¨)
  1016. light_dir dd 0.0,0.0,0.0 ;­ ¯à ¢«¥­¨¥ « ¬¯ë
  1017.  
  1018. mat_specular dd 0.3, 0.3, 0.3, 1.0 ; –¢¥â ¡«¨ª 
  1019. mat_shininess dd 3.0 ;  §¬¥à ¡«¨ª  (®¡à â­ ï ¯à®¯®àæ¨ï)
  1020. white_light dd 0.8, 0.8, 0.8, 1.0 ; –¢¥â ¨ ¨­â¥­á¨¢­®áâì ®á¢¥é¥­¨ï, £¥­¥à¨à㥬®£® ¨áâ®ç­¨ª®¬
  1021. lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ;  à ¬¥âàë ä®­®¢®£® ®á¢¥é¥­¨ï
  1022.  
  1023.  
  1024. align 16
  1025. i_end:
  1026.         rb 4096
  1027. stacktop:
  1028.         sys_path rb 1024
  1029.         file_name:
  1030.                 rb 1024 ;4096
  1031.         library_path rb 1024
  1032.         plugin_path rb 4096
  1033.         openfile_path rb 4096
  1034.         filename_area rb 256
  1035. mem:
  1036.