Subversion Repositories Kolibri OS

Rev

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