add multi select vertices & average coordinates: x,y,z
git-svn-id: svn://kolibrios.org@5944 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ffbaffb412
commit
3a5fd263ae
@ -13,6 +13,8 @@ include 'lang.inc'
|
|||||||
include 'info_fun_float.inc'
|
include 'info_fun_float.inc'
|
||||||
include 'info_menu.inc'
|
include 'info_menu.inc'
|
||||||
|
|
||||||
|
offs_zbuf_pbuf equ 24 ;const. from 'zbuffer.inc'
|
||||||
|
|
||||||
debug equ 0
|
debug equ 0
|
||||||
|
|
||||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||||
@ -44,7 +46,7 @@ image_data_toolbar dd 0
|
|||||||
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
||||||
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||||
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
||||||
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*8+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
||||||
;
|
;
|
||||||
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬
|
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬
|
||||||
|
|
||||||
@ -94,6 +96,8 @@ offs_last_timer dd 0 ;
|
|||||||
ID_ICON_CHUNK_MAIN equ 0 ;¨ª®ª £« ¢®£® ¡«®ª
|
ID_ICON_CHUNK_MAIN equ 0 ;¨ª®ª £« ¢®£® ¡«®ª
|
||||||
ID_ICON_CHUNK_NOT_FOUND equ 1 ;¨ª®ª ¥ ¨§¢¥á⮣® ¡«®ª
|
ID_ICON_CHUNK_NOT_FOUND equ 1 ;¨ª®ª ¥ ¨§¢¥á⮣® ¡«®ª
|
||||||
ID_ICON_DATA equ 2 ;¨ª®ª ¤«ï ¤ ëå ¡«®ª , ¥ ®¯à¥¤¥«¥®© áâàãªâãàë
|
ID_ICON_DATA equ 2 ;¨ª®ª ¤«ï ¤ ëå ¡«®ª , ¥ ®¯à¥¤¥«¥®© áâàãªâãàë
|
||||||
|
ID_ICON_POINT equ 8
|
||||||
|
ID_ICON_POINT_SEL equ 9
|
||||||
|
|
||||||
FILE_ERROR_CHUNK_SIZE equ -3 ;®è¨¡ª ¢ à §¬¥à¥ ¡«®ª
|
FILE_ERROR_CHUNK_SIZE equ -3 ;®è¨¡ª ¢ à §¬¥à¥ ¡«®ª
|
||||||
|
|
||||||
@ -149,10 +153,27 @@ start:
|
|||||||
stdcall [ksubmenu_add], [main_menu_view], eax
|
stdcall [ksubmenu_add], [main_menu_view], eax
|
||||||
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
|
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
|
||||||
stdcall [ksubmenu_add], [main_menu_view], eax
|
stdcall [ksubmenu_add], [main_menu_view], eax
|
||||||
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_View, [main_menu_view]
|
|
||||||
stdcall [ksubmenu_add], [main_menu], eax
|
|
||||||
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Veiw_Reset, 9
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Veiw_Reset, 9
|
||||||
stdcall [ksubmenu_add], [main_menu_view], eax
|
stdcall [ksubmenu_add], [main_menu_view], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_View, [main_menu_view]
|
||||||
|
stdcall [ksubmenu_add], [main_menu], eax
|
||||||
|
|
||||||
|
stdcall [ksubmenu_new]
|
||||||
|
mov [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Vertexes_Select, 10
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Vertexes_Deselect, 11
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Average_x, 12
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Average_y, 13
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_main_menu_Average_z, 14
|
||||||
|
stdcall [ksubmenu_add], [main_menu_vertexes], eax
|
||||||
|
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_main_menu_Vertexes, [main_menu_vertexes]
|
||||||
|
stdcall [ksubmenu_add], [main_menu], eax
|
||||||
|
|
||||||
mov dword[w_scr_t1.type],1
|
mov dword[w_scr_t1.type],1
|
||||||
stdcall dword[tl_data_init], tree1
|
stdcall dword[tl_data_init], tree1
|
||||||
@ -216,6 +237,8 @@ start:
|
|||||||
mov [color_vert],eax
|
mov [color_vert],eax
|
||||||
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
|
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
|
||||||
mov [color_face],eax
|
mov [color_face],eax
|
||||||
|
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
|
||||||
|
mov [color_select],eax
|
||||||
finit
|
finit
|
||||||
fild dword[color_bk+8]
|
fild dword[color_bk+8]
|
||||||
fdiv dword[fl255]
|
fdiv dword[fl255]
|
||||||
@ -1480,6 +1503,13 @@ buf_0: dd 0 ;㪠
|
|||||||
.color: dd 0xffffd0 ;+16 color
|
.color: dd 0xffffd0 ;+16 color
|
||||||
db 24 ;+20 bit in pixel
|
db 24 ;+20 bit in pixel
|
||||||
|
|
||||||
|
align 4
|
||||||
|
buf_ogl:
|
||||||
|
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï
|
||||||
|
dw 3d_wnd_l,3d_wnd_t ;+4 left,top
|
||||||
|
dd 3d_wnd_w,3d_wnd_h ;+8 w,h
|
||||||
|
dd 0,24 ;+16 color,bit in pixel
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
buf_1:
|
buf_1:
|
||||||
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï
|
dd 0 ;㪠§ â¥«ì ¡ãä¥à ¨§®¡à ¦¥¨ï
|
||||||
@ -1512,9 +1542,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
|||||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||||
|
|
||||||
if lang eq ru
|
if lang eq ru
|
||||||
capt db 'info 3ds ¢¥àá¨ï 29.11.15',0 ;¯®¤¯¨áì ®ª
|
capt db 'info 3ds ¢¥àá¨ï 02.12.15',0 ;¯®¤¯¨áì ®ª
|
||||||
else
|
else
|
||||||
capt db 'info 3ds version 29.11.15',0 ;window caption
|
capt db 'info 3ds version 02.12.15',0 ;window caption
|
||||||
end if
|
end if
|
||||||
|
|
||||||
align 16
|
align 16
|
||||||
@ -1532,6 +1562,7 @@ i_end:
|
|||||||
color_bk rd 3
|
color_bk rd 3
|
||||||
color_vert rd 1
|
color_vert rd 1
|
||||||
color_face rd 1
|
color_face rd 1
|
||||||
|
color_select rd 1
|
||||||
rb 2048
|
rb 2048
|
||||||
align 16
|
align 16
|
||||||
thread_coords:
|
thread_coords:
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
[Window 3d]
|
[Window 3d]
|
||||||
draw_vertices=1
|
draw_vertices=1
|
||||||
draw_faces=1
|
draw_faces=1
|
||||||
draw_faces_fill=0
|
draw_faces_fill=0 ;§ «¨¢ª £à ¥© (0-¢ëª«., 1-¢ª«.)
|
||||||
draw_light=0
|
draw_light=0 ;®á¢¥é¥¨¥ (0-¢ëª«., 1-¢ª«.)
|
||||||
col_ox=255,0,0
|
col_ox=255,0,0
|
||||||
col_oy=0,0,255
|
col_oy=0,0,255
|
||||||
col_oz=0,255,0
|
col_oz=0,255,0
|
||||||
col_bkgnd=0,32,64
|
col_bkgnd=0,32,64 ;梥â ä®
|
||||||
col_vertices=255,255,255
|
col_vertices=255,255,255 ;梥⠢¥àè¨
|
||||||
col_faces=128,192,192
|
col_faces=128,192,192 ;æ¢¥â £à ¥©
|
||||||
|
col_select=255,255,0 ;梥⠢뤥«¥ëå â®ç¥ª
|
||||||
|
@ -1 +1 @@
|
|||||||
if lang eq ru
sz_main_menu_View db '‚¨¤', 0
sz_main_menu_Veiw_Vertexes db '‚¥àè¨ë ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Faces db 'ƒà ¨ ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Faces_Fill db '‡ «¨¢ª £à ¥© ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Light db '‘¢¥â ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Reset db '‘¡à®á áâ஥ª', 0
else
sz_main_menu_View db 'View', 0
sz_main_menu_Veiw_Vertexes db 'Vertexes on/off', 0
sz_main_menu_Veiw_Faces db 'Faces on/off', 0
sz_main_menu_Veiw_Faces_Fill db 'Faces fill on/off', 0
sz_main_menu_Veiw_Light db 'Light on/off', 0
sz_main_menu_Veiw_Reset db 'Reset settings', 0
end if
main_menu dd 0
main_menu_file dd 0
else
dd 0
KMENUITEM_NORMAL equ 0
KMENUITEM_SUBMENU equ 1
KMENUITEM_SEPARATOR equ 2
|
if lang eq ru
sz_main_menu_View db '‚¨¤', 0
sz_main_menu_Veiw_Vertexes db '‚¥àè¨ë ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Faces db 'ƒà ¨ ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Faces_Fill db '‡ «¨¢ª £à ¥© ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Light db '‘¢¥â ¢ª«./¢ëª«.', 0
sz_main_menu_Veiw_Reset db '‘¡à®á áâ஥ª', 0
sz_main_menu_Vertexes db '‚¥àè¨ë', 0
sz_main_menu_Vertexes_Select db '‚뤥«¨âì ¢¥àè¨ã', 0
sz_main_menu_Vertexes_Deselect db 'Žâ¬¥¨âì ¢áñ ¢ë¤¥«¥¨¥', 0
sz_main_menu_Average_x db '‘।¥¥ x',0
sz_main_menu_Average_y db '‘।¥¥ y',0
sz_main_menu_Average_z db '‘।¥¥ z',0
else
sz_main_menu_View db 'View', 0
sz_main_menu_Veiw_Vertexes db 'Vertexes on/off', 0
sz_main_menu_Veiw_Faces db 'Faces on/off', 0
sz_main_menu_Veiw_Faces_Fill db 'Faces fill on/off', 0
sz_main_menu_Veiw_Light db 'Light on/off', 0
sz_main_menu_Veiw_Reset db 'Reset settings', 0
sz_main_menu_Vertexes db 'Vertexes', 0
sz_main_menu_Vertexes_Select db 'Select vertex', 0
sz_main_menu_Vertexes_Deselect db 'Deselect all', 0
sz_main_menu_Average_x db 'Average x',0
sz_main_menu_Average_y db 'Average y',0
sz_main_menu_Average_z db 'Average z',0
end if
main_menu dd 0
main_menu_file dd 0
main_menu_view dd 0
sz_main_menu_Veiw_Faces_Fill db 'Faces fill on/off', 0
dd 0
KMENUITEM_NORMAL equ 0
KMENUITEM_SUBMENU equ 1
KMENUITEM_SEPARATOR equ 2
|
@ -29,6 +29,7 @@ key_oz db 'col_oz',0
|
|||||||
key_bk db 'col_bkgnd',0
|
key_bk db 'col_bkgnd',0
|
||||||
key_vert db 'col_vertices',0
|
key_vert db 'col_vertices',0
|
||||||
key_face db 'col_faces',0
|
key_face db 'col_faces',0
|
||||||
|
key_select db 'col_select',0
|
||||||
|
|
||||||
prop_wnd_run db 0 ;¯¥à¥¬¥ ï á«¥¤ïé ï § ⥬ çâ®-¡ë ¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª ᮠ᢮©á⢠¬¨ ®¤®¢à¥¬¥®
|
prop_wnd_run db 0 ;¯¥à¥¬¥ ï á«¥¤ïé ï § ⥬ çâ®-¡ë ¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª ᮠ᢮©á⢠¬¨ ®¤®¢à¥¬¥®
|
||||||
|
|
||||||
@ -45,7 +46,13 @@ obj_point: ;
|
|||||||
.text:
|
.text:
|
||||||
rb MAX_OBJECT_SIZE
|
rb MAX_OBJECT_SIZE
|
||||||
|
|
||||||
|
if lang eq ru
|
||||||
|
txt_select_vert: db '‚ë¡à ®: '
|
||||||
|
else
|
||||||
|
txt_select_vert: db 'Select: '
|
||||||
|
end if
|
||||||
|
.count:
|
||||||
|
dq 0,0
|
||||||
|
|
||||||
;¤ ®¥ ®ª® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï äãªæ¨¥© but_wnd_coords
|
;¤ ®¥ ®ª® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï äãªæ¨¥© but_wnd_coords
|
||||||
align 4
|
align 4
|
||||||
@ -67,7 +74,7 @@ pushad
|
|||||||
cmp word[ebx],CHUNK_OBJBLOCK
|
cmp word[ebx],CHUNK_OBJBLOCK
|
||||||
jne .end_oblo
|
jne .end_oblo
|
||||||
mov dword[capt_p],txt_4000
|
mov dword[capt_p],txt_4000
|
||||||
call found_block_data
|
stdcall found_block_data, tree1
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
je .no_points
|
je .no_points
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
@ -90,7 +97,7 @@ pushad
|
|||||||
cmp word[ebx],CHUNK_TRIMESH
|
cmp word[ebx],CHUNK_TRIMESH
|
||||||
jne .end_trim
|
jne .end_trim
|
||||||
mov dword[capt_p],txt_4100
|
mov dword[capt_p],txt_4100
|
||||||
call found_block_data
|
stdcall found_block_data, tree1
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
je .no_points
|
je .no_points
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
@ -117,7 +124,7 @@ pushad
|
|||||||
movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
|
movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
|
||||||
add ebx,8
|
add ebx,8
|
||||||
;¯®¨áª ¤ ëå ¤«ï âà¥ã£®«ìª®¢
|
;¯®¨áª ¤ ëå ¤«ï âà¥ã£®«ìª®¢
|
||||||
call found_block_data
|
stdcall found_block_data, tree1
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
je .set_points
|
je .set_points
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
@ -198,7 +205,7 @@ pushad
|
|||||||
stdcall str_cat, obj_point.text,esi
|
stdcall str_cat, obj_point.text,esi
|
||||||
stdcall str_cat, obj_point.text,Data_String
|
stdcall str_cat, obj_point.text,Data_String
|
||||||
loop @b
|
loop @b
|
||||||
stdcall dword[tl_node_add], tree3,(ID_ICON_DATA shl 16),obj_point
|
stdcall dword[tl_node_add], tree3,(ID_ICON_POINT shl 16),obj_point
|
||||||
stdcall dword[tl_cur_next], tree3
|
stdcall dword[tl_cur_next], tree3
|
||||||
dec edx
|
dec edx
|
||||||
cmp edx,0
|
cmp edx,0
|
||||||
@ -228,6 +235,11 @@ pushad
|
|||||||
and ebx,0x3f3f3f
|
and ebx,0x3f3f3f
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
mov [edit3.color],eax
|
mov [edit3.color],eax
|
||||||
|
|
||||||
|
mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
|
||||||
|
mov eax,[eax] ;eax -> ZBuffer
|
||||||
|
mov eax,[eax+offs_zbuf_pbuf] ;eax -> ZBuffer.pbuf
|
||||||
|
mov dword[buf_ogl],eax
|
||||||
popad
|
popad
|
||||||
|
|
||||||
call prop_red_win
|
call prop_red_win
|
||||||
@ -318,6 +330,7 @@ prop_wnd_clear_param:
|
|||||||
;®¡ã«¥¨¥ 㪠§ ⥫¥© ¤ ë¥ ®¡ê¥ªâ®¢
|
;®¡ã«¥¨¥ 㪠§ ⥫¥© ¤ ë¥ ®¡ê¥ªâ®¢
|
||||||
mov dword[obj_poi_data],0
|
mov dword[obj_poi_data],0
|
||||||
mov dword[obj_poi_count],0
|
mov dword[obj_poi_count],0
|
||||||
|
mov dword[obj_poi_sel_c],0
|
||||||
mov dword[obj_tri_data],0
|
mov dword[obj_tri_data],0
|
||||||
mov dword[obj_tri_count],0
|
mov dword[obj_tri_count],0
|
||||||
ret
|
ret
|
||||||
@ -328,24 +341,24 @@ prop_wnd_clear_param:
|
|||||||
;output:
|
;output:
|
||||||
;eax - áâàãªâãà ⥪ã饣® 㧫 (¨«¨ 0 ¯à¨ ¥ã¤ ç¥)
|
;eax - áâàãªâãà ⥪ã饣® 㧫 (¨«¨ 0 ¯à¨ ¥ã¤ ç¥)
|
||||||
align 4
|
align 4
|
||||||
found_block_data:
|
proc found_block_data uses ebx ecx edx, tlist:dword
|
||||||
push ebx ecx
|
mov edx,[tlist]
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
stdcall [tl_node_poi_get_info], tree1,0
|
stdcall [tl_node_poi_get_info], edx,0
|
||||||
@@:
|
@@:
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
stdcall [tl_node_poi_get_data], tree1,ebx
|
stdcall [tl_node_poi_get_data], edx,ebx
|
||||||
cmp eax,ecx
|
cmp eax,ecx
|
||||||
je @f ;¥á«¨ ¯®¯ «¨ ¢ë¡à ë© ã§¥«
|
je @f ;¥á«¨ ¯®¯ «¨ ¢ë¡à ë© ã§¥«
|
||||||
stdcall [tl_node_poi_get_next_info], tree1,ebx
|
stdcall [tl_node_poi_get_next_info], edx,ebx
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
jne @b
|
jne @b
|
||||||
jmp .end
|
jmp .end
|
||||||
@@:
|
@@:
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
.end:
|
.end:
|
||||||
pop ecx ebx
|
|
||||||
ret
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
;ãáâ ®¢ª à §¬¥à®¢ ®¡ê¥ªâ
|
;ãáâ ®¢ª à §¬¥à®¢ ®¡ê¥ªâ
|
||||||
align 4
|
align 4
|
||||||
@ -549,7 +562,7 @@ draw_3d:
|
|||||||
stdcall [glEnd]
|
stdcall [glEnd]
|
||||||
.end_points:
|
.end_points:
|
||||||
|
|
||||||
;à¨á®¢ ¨¥ ¢ë¤¥«¥®© â®çª¨
|
;à¨á®¢ ¨¥ ªâ¨¢®© â®çª¨
|
||||||
stdcall [tl_node_get_data],tree3
|
stdcall [tl_node_get_data],tree3
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
je @f
|
je @f
|
||||||
@ -568,13 +581,38 @@ draw_3d:
|
|||||||
stdcall [glVertex3f], [eax],[eax+4],[obj_z_max]
|
stdcall [glVertex3f], [eax],[eax+4],[obj_z_max]
|
||||||
stdcall [glEnd]
|
stdcall [glEnd]
|
||||||
|
|
||||||
stdcall [glColor3f], 1.0, 1.0, 0.0
|
stdcall [glColor3ub],[color_select+2],[color_select+1],[color_select]
|
||||||
stdcall [glPushMatrix]
|
stdcall [glPushMatrix]
|
||||||
stdcall [glTranslatef], [eax],[eax+4],[eax+8]
|
stdcall [glTranslatef], [eax],[eax+4],[eax+8]
|
||||||
stdcall [gluSphere], [qObj], [sph_radius], 8,8
|
stdcall [gluSphere], [qObj], [sph_radius], 8,8
|
||||||
stdcall [glPopMatrix]
|
stdcall [glPopMatrix]
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
|
;à¨á®¢ ¨¥ ¢ë¤¥«¥ëå â®ç¥ª
|
||||||
|
cmp dword[obj_poi_sel_c],0
|
||||||
|
je .end_select
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall [glColor3ub],[color_select+2],[color_select+1],[color_select]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov eax,[eax]
|
||||||
|
stdcall [glPushMatrix]
|
||||||
|
stdcall [glTranslatef], [eax],[eax+4],[eax+8]
|
||||||
|
stdcall [gluSphere], [qObj], [sph_radius], 4,4
|
||||||
|
stdcall [glPopMatrix]
|
||||||
|
dec ecx
|
||||||
|
jz .end_select
|
||||||
|
.next_sel:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
.end_select:
|
||||||
|
|
||||||
;à¨á®¢ ¨¥ £à ¥©
|
;à¨á®¢ ¨¥ £à ¥©
|
||||||
bt dword[draw_mode],bit_faces
|
bt dword[draw_mode],bit_faces
|
||||||
jnc .end_triangles
|
jnc .end_triangles
|
||||||
@ -614,6 +652,10 @@ draw_3d:
|
|||||||
.end_triangles:
|
.end_triangles:
|
||||||
|
|
||||||
stdcall [glPopMatrix]
|
stdcall [glPopMatrix]
|
||||||
|
cmp dword[obj_poi_sel_c],0
|
||||||
|
je @f
|
||||||
|
stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_select_vert,5,3,[color_select]
|
||||||
|
@@:
|
||||||
stdcall [kosglSwapBuffers]
|
stdcall [kosglSwapBuffers]
|
||||||
.end_f:
|
.end_f:
|
||||||
ret
|
ret
|
||||||
@ -849,6 +891,7 @@ prop_button:
|
|||||||
stdcall str_cat, obj_point.text,esi
|
stdcall str_cat, obj_point.text,esi
|
||||||
stdcall str_cat, obj_point.text,Data_String
|
stdcall str_cat, obj_point.text,Data_String
|
||||||
loop .coord
|
loop .coord
|
||||||
|
mov byte[obj_point.text],'*' ;®â¬¥ç ¥¬ çâ® ¢¥àè¨ ¨§¬¥ï« áì
|
||||||
stdcall dword[tl_node_set_data], tree3,obj_point
|
stdcall dword[tl_node_set_data], tree3,obj_point
|
||||||
stdcall dword[tl_draw], tree3
|
stdcall dword[tl_draw], tree3
|
||||||
mov byte[can_save],1 ;¤«ï ¯®ª § ª®¯ª¨ '‘®åà ¨âì'
|
mov byte[can_save],1 ;¤«ï ¯®ª § ª®¯ª¨ '‘®åà ¨âì'
|
||||||
@ -883,6 +926,31 @@ prop_button:
|
|||||||
call mnu_reset_settings
|
call mnu_reset_settings
|
||||||
jmp prop_still.end
|
jmp prop_still.end
|
||||||
@@:
|
@@:
|
||||||
|
cmp ah,10
|
||||||
|
jne @f
|
||||||
|
call mnu_vertexes_select
|
||||||
|
jmp prop_still.end
|
||||||
|
@@:
|
||||||
|
cmp ah,11
|
||||||
|
jne @f
|
||||||
|
call mnu_vertexes_deselect
|
||||||
|
jmp prop_still.end
|
||||||
|
@@:
|
||||||
|
cmp ah,12
|
||||||
|
jne @f
|
||||||
|
call mnu_reset_average_x
|
||||||
|
jmp prop_still.end
|
||||||
|
@@:
|
||||||
|
cmp ah,13
|
||||||
|
jne @f
|
||||||
|
call mnu_reset_average_y
|
||||||
|
jmp prop_still.end
|
||||||
|
@@:
|
||||||
|
cmp ah,14
|
||||||
|
jne @f
|
||||||
|
call mnu_reset_average_z
|
||||||
|
jmp prop_still.end
|
||||||
|
@@:
|
||||||
|
|
||||||
cmp ah,1
|
cmp ah,1
|
||||||
jne prop_still.end
|
jne prop_still.end
|
||||||
@ -967,6 +1035,231 @@ mnu_reset_settings:
|
|||||||
m2m dword[draw_mode],dword[def_dr_mode]
|
m2m dword[draw_mode],dword[def_dr_mode]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc mnu_vertexes_select uses eax ebx
|
||||||
|
stdcall [tl_node_get_data],tree3
|
||||||
|
cmp eax,0
|
||||||
|
je .no_points
|
||||||
|
stdcall found_block_data,tree3
|
||||||
|
cmp eax,0
|
||||||
|
je .no_points
|
||||||
|
mov bx,word[eax]
|
||||||
|
cmp bx,ID_ICON_POINT_SEL
|
||||||
|
je @f
|
||||||
|
mov word[eax],ID_ICON_POINT_SEL
|
||||||
|
inc dword[obj_poi_sel_c]
|
||||||
|
jmp .change
|
||||||
|
@@:
|
||||||
|
mov word[eax],ID_ICON_POINT
|
||||||
|
dec dword[obj_poi_sel_c]
|
||||||
|
.change:
|
||||||
|
mov eax,[obj_poi_sel_c]
|
||||||
|
stdcall convert_int_to_str, txt_select_vert.count,16
|
||||||
|
.no_points:
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc mnu_vertexes_deselect uses eax
|
||||||
|
cmp dword[obj_poi_sel_c],0
|
||||||
|
je .no_points
|
||||||
|
mov dword[obj_poi_sel_c],0
|
||||||
|
stdcall [tl_node_poi_get_info], tree3,0
|
||||||
|
cmp eax,0
|
||||||
|
je .no_points
|
||||||
|
@@:
|
||||||
|
mov word[eax],ID_ICON_POINT
|
||||||
|
stdcall [tl_node_poi_get_next_info], tree3,eax
|
||||||
|
cmp eax,0
|
||||||
|
jne @b
|
||||||
|
.no_points:
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc mnu_reset_average_x uses eax ebx ecx edx edi
|
||||||
|
cmp dword[obj_poi_sel_c],2
|
||||||
|
jl .end_select
|
||||||
|
finit
|
||||||
|
fldz
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel0
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov eax,[eax]
|
||||||
|
fadd dword[eax]
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel0:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
fidiv dword[obj_poi_sel_c]
|
||||||
|
fstp dword[eax]
|
||||||
|
mov edx,[eax]
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel1
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov edi,eax
|
||||||
|
mov eax,[eax]
|
||||||
|
mov [eax],edx
|
||||||
|
stdcall update_tree, edi
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel1:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
.end_select:
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc mnu_reset_average_y uses eax ebx ecx edx edi
|
||||||
|
cmp dword[obj_poi_sel_c],2
|
||||||
|
jl .end_select
|
||||||
|
finit
|
||||||
|
fldz
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel0
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov eax,[eax]
|
||||||
|
fadd dword[eax+4]
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel0:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
fidiv dword[obj_poi_sel_c]
|
||||||
|
fstp dword[eax+4]
|
||||||
|
mov edx,[eax+4]
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel1
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov edi,eax
|
||||||
|
mov eax,[eax]
|
||||||
|
mov [eax+4],edx
|
||||||
|
stdcall update_tree, edi
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel1:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
.end_select:
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc mnu_reset_average_z uses eax ebx ecx edx edi
|
||||||
|
cmp dword[obj_poi_sel_c],2
|
||||||
|
jl .end_select
|
||||||
|
finit
|
||||||
|
fldz
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel0
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov eax,[eax]
|
||||||
|
fadd dword[eax+8]
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel0:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
fidiv dword[obj_poi_sel_c]
|
||||||
|
fstp dword[eax+8]
|
||||||
|
mov edx,[eax+8]
|
||||||
|
mov ecx,dword[obj_poi_sel_c]
|
||||||
|
stdcall dword[tl_node_poi_get_info], tree3,0
|
||||||
|
@@:
|
||||||
|
cmp eax,0
|
||||||
|
je .end_select
|
||||||
|
mov ebx,eax
|
||||||
|
cmp word[ebx],ID_ICON_POINT_SEL
|
||||||
|
jne .next_sel1
|
||||||
|
stdcall [tl_node_poi_get_data], tree3,ebx
|
||||||
|
mov edi,eax
|
||||||
|
mov eax,[eax]
|
||||||
|
mov [eax+8],edx
|
||||||
|
stdcall update_tree, edi
|
||||||
|
dec ecx
|
||||||
|
jz @f
|
||||||
|
.next_sel1:
|
||||||
|
stdcall dword[tl_node_poi_get_next_info], tree3,ebx
|
||||||
|
jmp @b
|
||||||
|
@@:
|
||||||
|
.end_select:
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
proc update_tree h_mem:dword
|
||||||
|
pushad
|
||||||
|
mov edi,[h_mem]
|
||||||
|
mov ebx,[edi]
|
||||||
|
finit
|
||||||
|
|
||||||
|
;®¡®¢«¥¨¥ ¨§¬¥¥®£® 㧫 ¢ ᯨ᪥ tree3 ¨ £« ¢®£® ®ª (¯® â ©¬¥àã)
|
||||||
|
mov word[NumberSymbolsAD],5
|
||||||
|
mov dword[obj_point.text],0
|
||||||
|
cld
|
||||||
|
mov ecx,3
|
||||||
|
.coord:
|
||||||
|
fld dword[ebx]
|
||||||
|
fstp qword[Data_Double]
|
||||||
|
call DoubleFloat_to_String
|
||||||
|
add ebx,4
|
||||||
|
stdcall str_len, Data_String
|
||||||
|
mov esi,txt_space
|
||||||
|
add esi,eax
|
||||||
|
cmp esi,txt_space.end
|
||||||
|
jl .normal_size
|
||||||
|
mov esi,txt_space.end-1 ;¬¨¨¬ã¬ 1 ¯à®¡¥« 㦮 ¤®¡ ¢¨âì, çâ®-¡ë æ¨äàë ¥ ᫨¯ «¨áì
|
||||||
|
.normal_size:
|
||||||
|
stdcall str_cat, obj_point.text,esi
|
||||||
|
stdcall str_cat, obj_point.text,Data_String
|
||||||
|
loop .coord
|
||||||
|
mov esi,obj_point.text
|
||||||
|
mov byte[esi],'*' ;®â¬¥ç ¥¬ çâ® ¢¥àè¨ ¨§¬¥ï« áì
|
||||||
|
mov byte[can_save],1 ;¤«ï ¯®ª § ª®¯ª¨ '‘®åà ¨âì'
|
||||||
|
add edi,4
|
||||||
|
mov ecx,MAX_OBJECT_SIZE-4
|
||||||
|
rep movsb
|
||||||
|
popad
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
def_dr_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ¯® 㬮«ç ¨î
|
def_dr_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ¯® 㬮«ç ¨î
|
||||||
delt_size dd 3.0 ;¨§¬¥¥¨¥ 㣫®¢ ¯à¨ ¯®¢®à®â å á ª«¨¢¨ âãàë
|
delt_size dd 3.0 ;¨§¬¥¥¨¥ 㣫®¢ ¯à¨ ¯®¢®à®â å á ª«¨¢¨ âãàë
|
||||||
@ -979,6 +1272,7 @@ angle_dym dd 1.3335 ;~ 3d_wnd_h/180
|
|||||||
draw_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ®¡ê¥ªâ
|
draw_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ®¡ê¥ªâ
|
||||||
obj_poi_data dd 0 ;㪠§ â¥«ì ª®®à¤¨ âë ¢¥àè¨
|
obj_poi_data dd 0 ;㪠§ â¥«ì ª®®à¤¨ âë ¢¥àè¨
|
||||||
obj_poi_count dd 0 ;ª®««¨ç¥á⢮ ¢¥àè¨
|
obj_poi_count dd 0 ;ª®««¨ç¥á⢮ ¢¥àè¨
|
||||||
|
obj_poi_sel_c dd 0 ;ª®««¨ç¥á⢮ ¢ë¤¥«¥ëå ¢¥àè¨
|
||||||
obj_tri_data dd 0 ;㪠§ â¥«ì ¤ ë¥ âà¥ã£®«ì¨ª®¢
|
obj_tri_data dd 0 ;㪠§ â¥«ì ¤ ë¥ âà¥ã£®«ì¨ª®¢
|
||||||
obj_tri_count dd 0 ;ª®««¨ç¥á⢮ âà¥ã£®«ì¨ª®¢
|
obj_tri_count dd 0 ;ª®««¨ç¥á⢮ âà¥ã£®«ì¨ª®¢
|
||||||
cursor_last_draw dd 0 ;¯®«®¦¥¨¥ ªãàá®à ¯à¨ ¯®á«¥¤¥© ¯à®à¨á®¢ª¥ 3d ®ª
|
cursor_last_draw dd 0 ;¯®«®¦¥¨¥ ªãàá®à ¯à¨ ¯®á«¥¤¥© ¯à®à¨á®¢ª¥ 3d ®ª
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user