mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
add a new program for users (it has a simple interface)
git-svn-id: svn://kolibrios.org@6060 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
228094c871
commit
7833219ec0
@ -10,4 +10,6 @@ if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.b
|
||||
@kpack bin\tinygl.obj
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
@kpack bin\info3ds_u.kex
|
||||
pause
|
@ -10,4 +10,6 @@ if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.b
|
||||
@kpack bin\tinygl.obj
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
@kpack bin\info3ds_u.kex
|
||||
pause
|
@ -12,6 +12,7 @@ include '../../dll.inc'
|
||||
include 'lang.inc'
|
||||
include 'info_fun_float.inc'
|
||||
include 'info_menu.inc'
|
||||
include 'data.inc'
|
||||
|
||||
version_edit equ 1
|
||||
|
||||
@ -48,13 +49,13 @@ open_b rb 560
|
||||
main_wnd_height equ 460 ;¢ëá®â £« ¢®£® ®ª ¯à®£à ¬¬ë
|
||||
fn_toolbar db 'toolbar.png',0
|
||||
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
|
||||
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*7
|
||||
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*12+54
|
||||
image_data_toolbar dd 0
|
||||
;
|
||||
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
||||
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
||||
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
||||
IMAGE_CHUNKS_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
||||
;
|
||||
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬
|
||||
|
||||
@ -96,8 +97,6 @@ macro load_image_file path,buf,size { ;
|
||||
}
|
||||
|
||||
;--------------------------------------
|
||||
include 'data.inc'
|
||||
|
||||
level_stack dd 0
|
||||
offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à
|
||||
|
||||
@ -184,7 +183,7 @@ start:
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
|
||||
load_image_file 'objects.png', icon_toolbar,TOOLBAR_ICON_BMP_SIZE
|
||||
load_image_file 'objects.png', icon_toolbar,IMAGE_CHUNKS_SIZE
|
||||
mov eax,dword[icon_toolbar]
|
||||
mov dword[tree1.data_img],eax
|
||||
|
||||
@ -424,7 +423,7 @@ pushad
|
||||
@@:
|
||||
sub eax,65
|
||||
mov dword[tree1.box_height],eax
|
||||
mov word[w_scr_t1+4],ax ;®¢ë¥ à §¬¥àë áªà®««¨£
|
||||
mov word[w_scr_t1.y_size],ax ;®¢ë¥ à §¬¥àë áªà®««¨£
|
||||
cmp eax,dword[buf_0.h] ;㢥«¨ç¨¢ ¥¬ ¢ëá®âã ¡ãä¥à
|
||||
jle @f
|
||||
stdcall [buf2d_resize],buf_0,0,eax
|
||||
@ -440,7 +439,7 @@ pushad
|
||||
sub eax,41
|
||||
mov dword[tree1.box_width],eax
|
||||
add ax,word[tree1.box_left]
|
||||
mov word[w_scr_t1+sb_offs_start_x],ax
|
||||
mov word[w_scr_t1.x_pos],ax
|
||||
add ax,16+5
|
||||
mov word[buf_0.l],ax
|
||||
|
||||
@ -708,8 +707,7 @@ block_analiz_data:
|
||||
jne @f
|
||||
stdcall add_3ds_object, ID_ICON_DATA,ebx,2,txt_count ;ç¨á«® £à ¥©
|
||||
push eax
|
||||
xor eax,eax
|
||||
mov ax,[esi]
|
||||
movzx eax,word[esi]
|
||||
shl eax,3
|
||||
add esi,2
|
||||
sub ecx,2
|
||||
@ -768,16 +766,20 @@ block_analiz_data:
|
||||
ret
|
||||
|
||||
;¢å®¤ ¢ 1-© ¤®ç¥à¨© ¡«®ª
|
||||
;input:
|
||||
; eax - 㪠§ â¥«ì ¢à¥¬¥ë© á⥪ ä ©« file_3ds
|
||||
; esi - ç «® த¨â¥«ì᪮£® ¡«®ª
|
||||
;output:
|
||||
; edx - destroy
|
||||
; ebx - destroy
|
||||
; esi - ç «® ¤ ëå த¨â¥«ì᪮£® ¡«®ª
|
||||
align 4
|
||||
block_children:
|
||||
push ecx
|
||||
;¯à®¢¥àª ¯à ¢¨«ì®áâ¨ à §¬¥à®¢ ¤®ç¥à¥£® ¡«®ª
|
||||
mov ebx,esi ;ᬥ饨¥ ç « த¨â¥«ì᪮£® ¡«®ª
|
||||
mov ebx,esi
|
||||
add ebx,6 ;¯¥à¥å®¤ ç «® ¤®ç¥à¥£® ¡«®ª
|
||||
add ebx,dword[ebx+2] ;¤®¡ ¢«ï¥¬ à §¬¥à ¤®ç¥à¥£® ¡«®ª
|
||||
mov ecx,esi ;ᬥ饨¥ ç « த¨â¥«ì᪮£® ¡«®ª
|
||||
mov ecx,esi
|
||||
add ecx,dword[esi+2] ;¤®¡ ¢«ï¥¬ à §¬¥à த¨â¥«ì᪮£® ¡«®ª
|
||||
cmp ebx,ecx ;ãç¨âë¢ âì § £®«®¢ª¨ ¥ 㦮, â. ª. áà ¢¨¢ îâáï ⮫쪮 ¤ ë¥ ¡«®ª®¢
|
||||
jle @f
|
||||
@ -1228,12 +1230,10 @@ import_buf2d:
|
||||
buf2d_bit_blt dd sz_buf2d_bit_blt
|
||||
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
|
||||
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
|
||||
buf2d_curve_bezier dd sz_buf2d_curve_bezier
|
||||
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
|
||||
buf2d_draw_text dd sz_buf2d_draw_text
|
||||
buf2d_crop_color dd sz_buf2d_crop_color
|
||||
buf2d_offset_h dd sz_buf2d_offset_h
|
||||
buf2d_flood_fill dd sz_buf2d_flood_fill
|
||||
buf2d_set_pixel dd sz_buf2d_set_pixel
|
||||
dd 0,0
|
||||
sz_init0 db 'lib_init',0
|
||||
@ -1254,19 +1254,15 @@ import_buf2d:
|
||||
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
|
||||
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
|
||||
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
|
||||
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
|
||||
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
|
||||
sz_buf2d_draw_text db 'buf2d_draw_text',0
|
||||
sz_buf2d_crop_color db 'buf2d_crop_color',0
|
||||
sz_buf2d_offset_h db 'buf2d_offset_h',0
|
||||
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
|
||||
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
|
||||
|
||||
align 4
|
||||
import_box_lib:
|
||||
dd sz_init1
|
||||
init_checkbox dd sz_init_checkbox
|
||||
check_box_draw dd sz_check_box_draw
|
||||
edit_box_draw dd sz_edit_box_draw
|
||||
edit_box_key dd sz_edit_box_key
|
||||
edit_box_mouse dd sz_edit_box_mouse
|
||||
@ -1300,8 +1296,6 @@ import_box_lib:
|
||||
|
||||
dd 0,0
|
||||
sz_init1 db 'lib_init',0
|
||||
sz_init_checkbox db 'init_checkbox2',0
|
||||
sz_check_box_draw db 'check_box_draw2',0
|
||||
sz_edit_box_draw db 'edit_box',0
|
||||
sz_edit_box_key db 'edit_box_key',0
|
||||
sz_edit_box_mouse db 'edit_box_mouse',0
|
||||
@ -1413,8 +1407,8 @@ buf_1:
|
||||
align 4
|
||||
el_focus dd tree1
|
||||
tree1 tree_list size_one_list,300+2, tl_key_no_edit+tl_draw_par_line,\
|
||||
16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,250, 16,list_offs_text,0, el_focus,\
|
||||
w_scr_t1,0
|
||||
16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,250, 16,list_offs_text,0,\
|
||||
el_focus,w_scr_t1,0
|
||||
|
||||
align 4
|
||||
w_scr_t1 scrollbar 16,0, 3,0, 15, 100, 0,0, 0,0,0, 1
|
||||
@ -1435,9 +1429,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
|
||||
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20> à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï
|
||||
|
||||
if lang eq ru
|
||||
capt db 'info 3ds ¢¥àá¨ï 09.01.16',0 ;¯®¤¯¨áì ®ª
|
||||
capt db 'info 3ds ¢¥àá¨ï 16.01.16',0 ;¯®¤¯¨áì ®ª
|
||||
else
|
||||
capt db 'info 3ds version 09.01.16',0 ;window caption
|
||||
capt db 'info 3ds version 16.01.16',0 ;window caption
|
||||
end if
|
||||
|
||||
align 16
|
||||
|
1483
programs/develop/info3ds/info3ds_u.asm
Normal file
1483
programs/develop/info3ds/info3ds_u.asm
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
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
main_menu_vertexes 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', 0
sz_main_menu_Veiw_Faces db 'Edges on', 0
sz_main_menu_Veiw_Faces_Fill db 'Faces on', 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
main_menu_vertexes dd 0
KMENUITEM_NORMAL equ 0
KMENUITEM_SUBMENU equ 1
KMENUITEM_SEPARATOR equ 2
|
@ -83,13 +83,16 @@ proc obj_clear_param uses edi, o_data:dword
|
||||
mov dword[edi+offs_obj_tri_count],0
|
||||
mov dword[edi+offs_obj_normals_tri_count],0
|
||||
mov dword[edi+offs_obj_normals_poi_count],0
|
||||
stdcall mem.Free,[edi+offs_obj_normals_tri_data]
|
||||
stdcall mem.Free,[edi+offs_obj_normals_poi_data]
|
||||
mov dword[edi+offs_obj_normals_tri_data],0
|
||||
mov dword[edi+offs_obj_normals_poi_data],0
|
||||
|
||||
;ãáâ ®¢ª ¯ à ¬¥â஢ ®â®¡à ¦¥¨ï
|
||||
call mnu_reset_settings
|
||||
cmp dword[edi+offs_obj_normals_tri_data],0
|
||||
je @f
|
||||
stdcall mem.Free,[edi+offs_obj_normals_tri_data]
|
||||
mov dword[edi+offs_obj_normals_tri_data],0
|
||||
@@:
|
||||
cmp dword[edi+offs_obj_normals_poi_data],0
|
||||
je @f
|
||||
stdcall mem.Free,[edi+offs_obj_normals_poi_data]
|
||||
mov dword[edi+offs_obj_normals_poi_data],0
|
||||
@@:
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -435,10 +438,83 @@ popad
|
||||
ret
|
||||
endp
|
||||
|
||||
; áâனª áâàãªâãàë 3d ®¡ê¥ªâ
|
||||
align 4
|
||||
proc obj_init, o_data:dword
|
||||
pushad
|
||||
mov edi,[o_data]
|
||||
stdcall obj_clear_param, edi
|
||||
stdcall [tl_node_get_data],tree1
|
||||
xor edx,edx
|
||||
cmp eax,0
|
||||
je .no_points
|
||||
mov ebx,[eax] ;¯®«ãç ¥¬ § 票¥ ᤢ¨£ ¢ë¡à ®£® ¡«®ª
|
||||
add ebx,[open_file_data]
|
||||
xor ecx,ecx
|
||||
cmp word[ebx],CHUNK_OBJBLOCK
|
||||
jne @f
|
||||
mov ecx,ebx
|
||||
add ecx,dword[ecx+2] ;£à ¨æ ¡«®ª
|
||||
push eax edi
|
||||
mov edi,ebx
|
||||
add edi,6
|
||||
cld
|
||||
xor al,al
|
||||
repne scasb ;¯à®¯ã᪠¨¬¥¨ ®¡ê¥ªâ
|
||||
mov ebx,edi
|
||||
pop edi eax
|
||||
@@:
|
||||
cmp word[ebx],CHUNK_TRIMESH
|
||||
jne @f
|
||||
mov ecx,ebx
|
||||
add ecx,dword[ecx+2] ;£à ¨æ ¡«®ª
|
||||
add ebx,6
|
||||
@@:
|
||||
cmp word[ebx],CHUNK_VERTLIST
|
||||
jne .no_points
|
||||
mov esi,ebx
|
||||
movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
|
||||
add ebx,8
|
||||
mov [edi+offs_obj_poi_data],ebx
|
||||
mov [edi+offs_obj_poi_count],edx
|
||||
|
||||
.cycle_0: ;横« ¤«ï ¯®¨áª âà¥ã£®«ì¨ª®¢
|
||||
add esi,dword[esi+2]
|
||||
cmp word[esi],CHUNK_FACELIST
|
||||
je @f
|
||||
cmp ecx,esi
|
||||
jg .cycle_0 ;¯®ª ¥ ¤®á⨣ãâ £à¨æ áâ à襣® ¡«®ª
|
||||
jmp .end_points ;¥á«¨ ¥ 諨 âà¥ã£®«ì¨ª¨
|
||||
@@:
|
||||
;¥á«¨ 諨 âà¥ã£®«ì¨ª¨
|
||||
movzx edx,word[esi+6]
|
||||
mov [edi+offs_obj_tri_count],edx
|
||||
add esi,8 ;2+4+2 (chunk+size+count)
|
||||
mov [edi+offs_obj_tri_data],esi
|
||||
.end_points:
|
||||
|
||||
stdcall obj_set_sizes, edi
|
||||
stdcall obj_set_normals, edi
|
||||
if version_edit eq 0
|
||||
stdcall draw_3d, edi
|
||||
end if
|
||||
.no_points:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
;à¨á®¢ ¨¥ â®ç¥ª ¢ 3d
|
||||
align 4
|
||||
proc draw_3d uses eax ebx ecx edi, o_data:dword
|
||||
mov edi,[o_data]
|
||||
if 0 ;debug
|
||||
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT
|
||||
mov eax,[edi+offs_obj_poi_data]
|
||||
stdcall convert_int_to_str, txt_select_vert.count,16
|
||||
stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_select_vert,5,3,[color_select]
|
||||
stdcall [kosglSwapBuffers]
|
||||
jmp .end_f
|
||||
end if
|
||||
cmp dword[edi+offs_obj_poi_count],2
|
||||
jl .end_f
|
||||
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;®ç¨á⨬ ¡ãä¥à 梥⠨ £«ã¡¨ë
|
||||
@ -603,33 +679,35 @@ SetLight:
|
||||
stdcall [glEnable],GL_LIGHT0
|
||||
ret
|
||||
|
||||
;¨§¬¥ï¥¬ ०¨¬ à¨á®¢ ¨ï ¢¥àè¨
|
||||
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ¢¥àè¨
|
||||
align 4
|
||||
mnu_vertexes_on_off:
|
||||
xor dword[draw_mode], 1 shl bit_vertexes
|
||||
stdcall draw_3d, o3d
|
||||
mnu_vertexes_on:
|
||||
or dword[draw_mode], 1 shl bit_vertexes
|
||||
and dword[draw_mode], not (1 shl bit_faces) ;¢ëª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï £à ¥© (çâ®-¡ë ¥ ¬¥è «¨)
|
||||
call update_obj
|
||||
ret
|
||||
|
||||
;¨§¬¥ï¥¬ ०¨¬ à¨á®¢ ¨ï £à ¥©
|
||||
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ª ઠáëå £à ¥©
|
||||
align 4
|
||||
mnu_faces_on_off:
|
||||
xor dword[draw_mode], 1 shl bit_faces
|
||||
stdcall draw_3d, o3d
|
||||
mnu_edges_on:
|
||||
or dword[draw_mode], 1 shl bit_faces
|
||||
and dword[draw_mode], not ((1 shl bit_vertexes)+(1 shl bit_faces_fill))
|
||||
call update_obj
|
||||
ret
|
||||
|
||||
;¨§¬¥ï¥¬ ª ઠáë¥ ¨«¨ ᯫ®èë¥ £à ¨
|
||||
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ᯫ®èëå £à ¥©
|
||||
align 4
|
||||
mnu_faces_fill_on_off:
|
||||
xor dword[draw_mode], 1 shl bit_faces_fill
|
||||
or dword[draw_mode], 1 shl bit_faces ;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï £à ¥© (¥á«¨ ¢¤à㣠¡ë« ®âª«îç¥)
|
||||
stdcall draw_3d, o3d
|
||||
mnu_faces_on:
|
||||
or dword[draw_mode], (1 shl bit_faces)+(1 shl bit_faces_fill)
|
||||
and dword[draw_mode], not (1 shl bit_vertexes)
|
||||
call update_obj
|
||||
ret
|
||||
|
||||
;¢ª«îç ¥¬ ¨«¨ ®âª«îç ¥¬ ®á¢¥é¥¨¥
|
||||
align 4
|
||||
mnu_light_on_off:
|
||||
xor dword[draw_mode], 1 shl bit_light
|
||||
stdcall draw_3d, o3d
|
||||
call update_obj
|
||||
ret
|
||||
|
||||
align 4
|
||||
@ -638,9 +716,32 @@ mnu_reset_settings:
|
||||
mov dword[angle_y],0.0
|
||||
mov dword[angle_z],0.0
|
||||
m2m dword[draw_mode],dword[def_dr_mode]
|
||||
call update_obj
|
||||
ret
|
||||
|
||||
if version_edit eq 1
|
||||
|
||||
align 4
|
||||
update_obj:
|
||||
stdcall draw_3d, o3d
|
||||
ret
|
||||
|
||||
else
|
||||
|
||||
align 4
|
||||
update_obj:
|
||||
push eax
|
||||
stdcall [tl_node_get_data],tree1
|
||||
cmp eax,0
|
||||
je @f
|
||||
add eax,14 ;14=list_offs_obj3d
|
||||
stdcall draw_3d, eax
|
||||
@@:
|
||||
pop eax
|
||||
ret
|
||||
|
||||
end if
|
||||
|
||||
align 4
|
||||
draw_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ®¡ê¥ªâ
|
||||
def_dr_mode dd 0 ;०¨¬ à¨á®¢ ¨ï ¯® 㬮«ç ¨î
|
||||
|
@ -42,6 +42,12 @@ pushad
|
||||
mov dword[w_scr_t3.type],1
|
||||
mov edi,o3d
|
||||
stdcall obj_clear_param, edi
|
||||
call mnu_reset_settings
|
||||
|
||||
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
|
||||
|
||||
stdcall [tl_node_get_data],tree1
|
||||
xor edx,edx
|
||||
@ -54,84 +60,20 @@ pushad
|
||||
cmp word[ebx],CHUNK_OBJBLOCK
|
||||
jne .end_oblo
|
||||
mov dword[capt_p],txt_4000
|
||||
stdcall found_block_data, tree1
|
||||
cmp eax,0
|
||||
je .no_points
|
||||
mov esi,eax
|
||||
movzx ecx,byte[esi+2] ;cl - ã஢¥ì ¢ë¡à ®£® 㧫
|
||||
.cycle_0:
|
||||
stdcall [tl_node_poi_get_next_info], tree1,esi
|
||||
cmp eax,0
|
||||
je .no_points
|
||||
cmp byte[eax+2],cl
|
||||
jle .no_points
|
||||
mov esi,eax
|
||||
stdcall [tl_node_poi_get_data], tree1,esi
|
||||
mov ebx,[eax]
|
||||
add ebx,[open_file_data]
|
||||
cmp word[ebx],CHUNK_VERTLIST
|
||||
je .ini_vlist
|
||||
jmp .cycle_0
|
||||
stdcall obj_init,edi
|
||||
jmp .no_points
|
||||
.end_oblo:
|
||||
cmp word[ebx],CHUNK_TRIMESH
|
||||
jne .end_trim
|
||||
mov dword[capt_p],txt_4100
|
||||
stdcall found_block_data, tree1
|
||||
cmp eax,0
|
||||
je .no_points
|
||||
mov esi,eax
|
||||
movzx ecx,byte[esi+2] ;cl - ã஢¥ì ¢ë¡à ®£® 㧫
|
||||
.cycle_1:
|
||||
stdcall [tl_node_poi_get_next_info], tree1,esi
|
||||
cmp eax,0
|
||||
je .no_points
|
||||
cmp byte[eax+2],cl
|
||||
jle .no_points
|
||||
mov esi,eax
|
||||
stdcall [tl_node_poi_get_data], tree1,esi
|
||||
mov ebx,[eax]
|
||||
add ebx,[open_file_data]
|
||||
cmp word[ebx],CHUNK_VERTLIST
|
||||
je .ini_vlist
|
||||
jmp .cycle_1
|
||||
stdcall obj_init,edi
|
||||
jmp .no_points
|
||||
.end_trim:
|
||||
cmp word[ebx],CHUNK_VERTLIST
|
||||
jne .end_vlist
|
||||
mov dword[capt_p],txt_4110
|
||||
.ini_vlist:
|
||||
movzx edx,word[ebx+6] ;ª®««¨ç¥á⢮ â®ç¥ª
|
||||
add ebx,8
|
||||
;¯®¨áª ¤ ëå ¤«ï âà¥ã£®«ìª®¢
|
||||
stdcall found_block_data, tree1
|
||||
cmp eax,0
|
||||
je .set_points
|
||||
mov esi,eax
|
||||
;¥á«¨ 諨 ¢ë¡à ë© ã§¥«, â® ¤ «¥¥ ¯ëâ ¥¬áï ©â¨ ã§¥« á âà¥ã£®«ì¨ª ¬¨
|
||||
movzx ecx,byte[esi+2] ;cl - ã஢¥ì ¢ë¡à ®£® 㧫
|
||||
.cycle_2:
|
||||
stdcall [tl_node_poi_get_next_info], tree1,esi
|
||||
cmp eax,0
|
||||
je .set_points
|
||||
mov esi,eax
|
||||
stdcall [tl_node_poi_get_data], tree1,esi
|
||||
cmp byte[esi+2],cl
|
||||
jl .set_points
|
||||
je .found
|
||||
jmp .cycle_2
|
||||
.found: ;¥á«¨ 諨 㧥« ⮣®¦¥ ã஢ï çâ® ¨ ¢ë¡à ë© ã§¥«
|
||||
cmp eax,0
|
||||
je .set_points
|
||||
mov eax,[eax]
|
||||
add eax,[open_file_data]
|
||||
cmp word[eax],CHUNK_FACELIST
|
||||
jne .cycle_2
|
||||
movzx ecx,word[eax+6]
|
||||
mov [edi+offs_obj_tri_count],ecx
|
||||
add eax,8 ;2+4+2 (chunk+size+count)
|
||||
mov [edi+offs_obj_tri_data],eax
|
||||
jmp .set_points
|
||||
stdcall obj_init,edi
|
||||
jmp .no_points
|
||||
.end_vlist:
|
||||
cmp word[ebx],CHUNK_TRACKPIVOT
|
||||
jne @f
|
||||
@ -153,7 +95,9 @@ pushad
|
||||
.no_points:
|
||||
|
||||
; áâனª ᯨ᪠®¡ê¥ªâ®¢
|
||||
mov ebx,[edi+offs_obj_poi_data]
|
||||
mov dword[tree3.info_max_count],2
|
||||
mov edx,[edi+offs_obj_poi_count]
|
||||
add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢®¥ ª®««¨ç¥áâ¢ã â®ç¥ª (+2 ç «® ¨ ª®¥æ ᯨ᪠)
|
||||
stdcall dword[tl_data_init], tree3
|
||||
mov eax,dword[icon_tl_sys]
|
||||
@ -165,6 +109,7 @@ pushad
|
||||
je .no_object
|
||||
mov word[NumberSymbolsAD],5
|
||||
finit
|
||||
mov dword[w_scr_t3.redraw],0
|
||||
.new_point:
|
||||
mov dword[obj_point],ebx
|
||||
mov dword[obj_point.text],0
|
||||
@ -190,6 +135,7 @@ pushad
|
||||
dec edx
|
||||
cmp edx,0
|
||||
jg .new_point
|
||||
mov dword[w_scr_t3.redraw],1
|
||||
stdcall dword[tl_cur_beg], tree3
|
||||
.no_object:
|
||||
stdcall obj_set_sizes, o3d
|
||||
@ -216,13 +162,7 @@ pushad
|
||||
and ebx,0x3f3f3f
|
||||
add eax,ebx
|
||||
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
|
||||
|
||||
call prop_red_win
|
||||
|
||||
;¥ ®âàë¢ âì íâã äãªæ¨î ®â ¯à¥¤ë¤ã饩
|
||||
@ -527,17 +467,17 @@ prop_button:
|
||||
@@:
|
||||
cmp ah,5
|
||||
jne @f
|
||||
call mnu_vertexes_on_off
|
||||
call mnu_vertexes_on
|
||||
jmp prop_still.end
|
||||
@@:
|
||||
cmp ah,6
|
||||
jne @f
|
||||
call mnu_faces_on_off
|
||||
call mnu_edges_on
|
||||
jmp prop_still.end
|
||||
@@:
|
||||
cmp ah,7
|
||||
jne @f
|
||||
call mnu_faces_fill_on_off
|
||||
call mnu_faces_on
|
||||
jmp prop_still.end
|
||||
@@:
|
||||
cmp ah,8
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue
Block a user