16,6 → 16,7 |
include 'info_fun_float.inc' |
include 'info_menu.inc' |
include 'data.inc' |
include 'convert_stl_3ds.inc' |
|
3d_wnd_l equ 205 ;®âáâ㯠¤«ï tinygl ¡ãä¥à á«¥¢ |
3d_wnd_t equ 47 ;®âáâ㯠¤«ï tinygl ¡ãä¥à ᢥàåã |
78,8 → 79,8 |
mov edi,openfile_path |
@@: |
lodsd |
cmp eax,0 |
je @f ;¢ë室, ¥á«¨ 0 |
or eax,eax |
jz @f ;¢ë室, ¥á«¨ 0 |
stosd |
jmp @b |
@@: |
130,9 → 131,9 |
stdcall [ksubmenu_add], [main_menu], eax |
|
mov dword[w_scr_t1.type],1 |
stdcall dword[tl_data_init], tree1 |
stdcall [tl_data_init], tree1 |
;á¨áâ¥¬ë¥ ¨ª®ª¨ 16*16 ¤«ï tree_list |
load_image_file 'tl_sys_16.png', icon_tl_sys |
include_image_file 'tl_sys_16.png', icon_tl_sys |
;¥á«¨ ¨§®¡à ¦¥¨¥ ¥ ®âªàë«®áì, â® ¢ icon_tl_sys ¡ã¤ãâ |
;¥ ¨¨æ¨ «¨§¨à®¢ ë¥ ¤ ë¥, ® ®è¨¡ª¨ ¥ ¡ã¤¥â, â. ª. ¡ãä¥à 㦮£® à §¬¥à |
mov eax,dword[icon_tl_sys] |
252,8 → 253,8 |
@@: |
sub ebx,eax |
mcall SF_WAIT_EVENT_TIMEOUT |
cmp eax,0 |
je timer_funct |
or eax,eax |
jz timer_funct |
|
cmp al,1 |
jne @f |
284,8 → 285,8 |
jne .end_m |
|
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end_d |
or eax,eax |
jz .end_d |
mov ebx,dword[eax] |
add ebx,dword[open_file_data] ;¯®«ãç ¥¬ § 票¥ ᤢ¨£ ¢ ¯ ¬ï⨠|
cmp word[ebx],CHUNK_OBJBLOCK |
375,8 → 376,8 |
|
;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥ë© ¡«®ª ¤ ëå |
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end_f |
or eax,eax |
jz .end_f |
mov edi,eax |
add edi,list_offs_obj3d |
mov ebx,eax |
422,8 → 423,8 |
stdcall buf_draw_beg, buf_ogl |
stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_3ds_offs,5,35,0xb000 |
mov edx,dword[ebx+list_offs_p_data] |
cmp edx,0 ;ᬮâਬ ¥áâì «¨ ®¯¨á ¨¥ ¡«®ª |
je .no_info |
or edx,edx ;ᬮâਬ ¥áâì «¨ ®¯¨á ¨¥ ¡«®ª |
jz .no_info |
stdcall [buf2d_draw_text], buf_ogl, buf_1,edx,5,45,0xb000 |
.no_info: |
stdcall [buf2d_draw], buf_ogl ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥ |
508,8 → 509,8 |
fadd dword[delt_size] |
fstp dword[angle_x] |
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end |
or eax,eax |
jz .end |
add eax,list_offs_obj3d |
stdcall draw_3d, eax |
jmp .end |
520,8 → 521,8 |
fsub dword[delt_size] |
fstp dword[angle_x] |
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end |
or eax,eax |
jz .end |
add eax,list_offs_obj3d |
stdcall draw_3d, eax |
jmp .end |
532,8 → 533,8 |
fadd dword[delt_size] |
fstp dword[angle_y] |
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end |
or eax,eax |
jz .end |
add eax,list_offs_obj3d |
stdcall draw_3d, eax |
jmp .end |
544,8 → 545,8 |
fsub dword[delt_size] |
fstp dword[angle_y] |
stdcall [tl_node_get_data],tree1 |
cmp eax,0 |
je .end |
or eax,eax |
jz .end |
add eax,list_offs_obj3d |
stdcall draw_3d, eax |
;jmp .end |
627,17 → 628,17 |
align 4 |
but_new_file: |
push eax ebx |
stdcall dword[tl_node_poi_get_info], tree1,0 |
stdcall [tl_node_poi_get_info], tree1,0 |
@@: |
cmp eax,0 |
je @f |
or eax,eax |
jz @f |
mov ebx,eax |
stdcall [tl_node_poi_get_data], tree1,ebx |
add eax,list_offs_obj3d |
stdcall obj_clear_param, eax |
stdcall dword[tl_node_poi_get_next_info], tree1,ebx |
cmp eax,0 |
jne @b |
stdcall [tl_node_poi_get_next_info], tree1,ebx |
or eax,eax |
jnz @b |
@@: |
pop ebx eax |
stdcall [tl_info_clear], tree1 ;®ç¨á⪠ᯨ᪠®¡ê¥ªâ®¢ |
694,25 → 695,38 |
align 4 |
init_tree: |
;ç¨á⨬ ¯ ¬ïâì § ïâãî ®¡ê¥ªâ ¬¨ |
stdcall dword[tl_node_poi_get_info], tree1,0 |
stdcall [tl_node_poi_get_info], tree1,0 |
@@: |
cmp eax,0 |
je @f |
or eax,eax |
jz @f |
mov ebx,eax |
stdcall [tl_node_poi_get_data], tree1,ebx |
cmp eax,0 |
je @f |
or eax,eax |
jz @f |
add eax,list_offs_obj3d |
stdcall obj_clear_param, eax |
stdcall dword[tl_node_poi_get_next_info], tree1,ebx |
cmp eax,0 |
jne @b |
stdcall [tl_node_poi_get_next_info], tree1,ebx |
or eax,eax |
jnz @b |
@@: |
stdcall [tl_info_clear], tree1 ;®ç¨á⪠ᯨ᪠®¡ê¥ªâ®¢ |
|
mov esi,dword[open_file_data] |
mov esi,[open_file_data] |
stdcall convert_stl_3ds, esi,[open_file_size] ;¯à®¢¥à塞 ä ©« ä®à¬ â *.stl ? |
or eax,eax |
jz @f |
;¥á«¨ ä ©« ¢ ä®à¬ ⥠*.stl |
mov [open_file_size],ecx |
mov esi,eax |
stdcall mem.Free,[open_file_data] |
mov [open_file_data],esi |
mov byte[can_save],1 |
@@: |
cmp word[esi],CHUNK_MAIN |
je @f |
mov eax,[esi] |
bswap eax |
stdcall hex_in_str, txt_no_3ds.zag, eax,8 |
stdcall buf_draw_beg, buf_ogl |
stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_no_3ds,5,25,0xff0000 ;à¨á㥬 áâபã á ⥪á⮬ |
jmp .end_open |
725,8 → 739,8 |
stdcall add_3ds_object, ID_ICON_CHUNK_MAIN,0,dword[esi+2],0 |
call block_children ;¢å®¤ ¢ ¤®ç¥à¨© ¡«®ª |
|
mov edi,dword[file_3ds.offs] |
add edi,dword[file_3ds.size] |
mov edi,[file_3ds.offs] |
add edi,[file_3ds.size] |
.cycle_main: |
cmp dword[level_stack],0 |
jle .end_cycle |
734,7 → 748,7 |
cmp esi,edi ;¥á«¨ ª®¥æ ä ©« |
jge .end_cycle |
|
mov edx,dword[esi+2] ;à §¬¥à ¡«®ª |
mov edx,[esi+2] ;à §¬¥à ¡«®ª |
call block_analiz |
cmp word[esi],CHUNK_MATERIAL |
je @f |
796,8 → 810,8 |
; esi - new memory pointer |
align 4 |
proc block_analiz_data uses ebx ecx edx edi |
mov dx,word[esi] |
mov ecx,dword[esi+2] |
mov dx,[esi] |
mov ecx,[esi+2] |
sub ecx,6 ;à §¬¥à ¤ ëå ¢ ¡«®ª¥ |
add esi,6 |
mov ebx,dword[level_stack] |
902,11 → 916,10 |
block_children: |
push ecx |
;¯à®¢¥àª ¯à ¢¨«ì®áâ¨ à §¬¥à®¢ ¤®ç¥à¥£® ¡«®ª |
mov ebx,esi |
add ebx,6 ;¯¥à¥å®¤ ç «® ¤®ç¥à¥£® ¡«®ª |
add ebx,dword[ebx+2] ;¤®¡ ¢«ï¥¬ à §¬¥à ¤®ç¥à¥£® ¡«®ª |
lea ebx,[esi+6] ;¯¥à¥å®¤ ç «® ¤®ç¥à¥£® ¡«®ª |
add ebx,[ebx+2] ;¤®¡ ¢«ï¥¬ à §¬¥à ¤®ç¥à¥£® ¡«®ª |
mov ecx,esi |
add ecx,dword[esi+2] ;¤®¡ ¢«ï¥¬ à §¬¥à த¨â¥«ì᪮£® ¡«®ª |
add ecx,[esi+2] ;¤®¡ ¢«ï¥¬ à §¬¥à த¨â¥«ì᪮£® ¡«®ª |
cmp ebx,ecx ;ãç¨âë¢ âì § £®«®¢ª¨ ¥ 㦮, â. ª. áà ¢¨¢ îâáï ⮫쪮 ¤ ë¥ ¡«®ª®¢ |
jle @f |
;¤¨ £®áâ¨à®¢ «¨ ®è¨¡ªã ä ©« , ¤®ç¥à¨© ¡«®ª ¢ë室¨â § ¯à¥¤¥«ë த¨â¥«ì᪮£® |
913,9 → 926,9 |
mov dword[level_stack],FILE_ERROR_CHUNK_SIZE |
jmp .end_f |
@@: |
mov dword[eax],esi ;㪠§ ⥫ì ç «® ¡«®ª |
mov ebx,dword[esi+2] |
mov dword[eax+4],ebx ;à §¬¥à ¡«®ª |
mov [eax],esi ;㪠§ ⥫ì ç «® ¡«®ª |
mov ebx,[esi+2] |
mov [eax+4],ebx ;à §¬¥à ¡«®ª |
add esi,6 ;¯¥à¥å®¤¨¬ ª ¤ ë¬ ¡«®ª |
inc dword[level_stack] |
add eax,8 |
972,8 → 985,10 |
|
;input: |
; esi - 㪠§ â¥«ì «¨§¨àã¥¬ë¥ ¤ ë¥ |
; icon - ®¬¥à ¨ª®ª¨ |
; level - ã஢¥ì ¢«®¦¥®á⨠㧫 |
; size_bl - à §¬¥à ¡«®ª |
; info_bl - áâப á ®¯¨á ¨¥¬ ¡«®ª |
align 4 |
proc add_3ds_object, icon:dword,level:dword,size_bl:dword,info_bl:dword |
pushad |
987,8 → 1002,8 |
mov ecx,dword[size_bl] |
mov dword[buffer+4],ecx ;à §¬¥à ¡«®ª (¨á¯®«ì§ã¥âáï ¢ äãªæ¨¨ buf_draw_hex_table ¤«ï à¨á®¢ ¨ï «¨¨¨) |
mov ecx,dword[bl_found] |
cmp ecx,0 |
je @f |
or ecx,ecx |
jz @f |
;... §¤¥áì 㦥 ¤à㣮© «£®à¨â¬ § é¨âë ®â 㤠«¥¨ï |
mov cl,byte[ecx+4] |
@@: |
999,8 → 1014,8 |
mov dword[buffer+list_offs_p_data],ecx |
stdcall hex_in_str, buffer+list_offs_text,dword[esi+1],2 |
stdcall hex_in_str, buffer+list_offs_text+2,dword[esi],2 ;ª®¤ 3ds ¡«®ª |
cmp ecx,0 |
jne @f |
or ecx,ecx |
jnz @f |
mov byte[buffer+list_offs_text+4],0 ;0 - ᨬ¢®« ª®æ áâப¨ |
jmp .no_capt |
@@: |
1042,7 → 1057,7 |
|
align 4 |
.str: |
mov ecx,0x0a |
mov ecx,10 |
cmp eax,ecx |
jb @f |
xor edx,edx |
1094,6 → 1109,7 |
dd Filter.end - Filter.1 |
.1: |
db '3DS',0 |
db 'STL',0 |
db 'PNG',0 |
.end: |
db 0 |
1117,38 → 1133,38 |
|
if lang eq ru |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
err_msg_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,0 |
err_msg_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0 |
err_msg_found_lib_1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,0 |
err_msg_import_1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0 |
err_msg_found_lib_2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,0 |
err_msg_import_2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,0 |
err_msg_found_lib_3 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,0 |
err_msg_import_3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0 |
err_msg_found_lib_4 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'kmenu.obj',39,0 |
err_msg_import_4 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,0 |
err_msg_found_lib_5 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'tinygl.obj',39,0 |
err_msg_import_5 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,0 |
err_msg_found_lib_6 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libini.obj',39,0 |
err_msg_import_6 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini',39,0 |
head_f_l db '"¨á⥬ ï ®è¨¡ª ',0 |
err_msg_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,'" -tE',0 |
err_msg_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tW',0 |
err_msg_found_lib_1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,'" -tE',0 |
err_msg_import_1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tW',0 |
err_msg_found_lib_2 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,'" -tE',0 |
err_msg_import_2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,'" -tW',0 |
err_msg_found_lib_3 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,'" -tE',0 |
err_msg_import_3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tW',0 |
err_msg_found_lib_4 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'kmenu.obj',39,'" -tE',0 |
err_msg_import_4 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,'" -tW',0 |
err_msg_found_lib_5 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'tinygl.obj',39,'" -tE',0 |
err_msg_import_5 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,'" -tW',0 |
err_msg_found_lib_6 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libini.obj',39,'" -tE',0 |
err_msg_import_6 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libini',39,'" -tW',0 |
else |
head_f_i: |
head_f_l db 'System error',0 |
err_msg_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0 |
err_msg_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,0 |
err_msg_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,0 |
err_msg_import_1 db 'Error on load import library ',39,'libimg.obj',39,0 |
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0 |
err_msg_import_2 db 'Error on load import library ',39,'box_lib.obj',39,0 |
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'buf2d.obj',39,0 |
err_msg_import_3 db 'Error on load import library ',39,'buf2d.obj',39,0 |
err_msg_found_lib_4 db 'Sorry I cannot found library ',39,'kmenu.obj',39,0 |
err_msg_import_4 db 'Error on load import library ',39,'kmenu.obj',39,0 |
err_msg_found_lib_5 db 'Sorry I cannot found library ',39,'tinygl.obj',39,0 |
err_msg_import_5 db 'Error on load import library ',39,'tinygl',39,0 |
err_msg_found_lib_6 db 'Sorry I cannot found library ',39,'libini.obj',39,0 |
err_msg_import_6 db 'Error on load import library ',39,'libini',39,0 |
head_f_l db '"System error',0 |
err_msg_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0 |
err_msg_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tW',0 |
err_msg_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0 |
err_msg_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tW',0 |
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'box_lib.obj',39,'" -tE',0 |
err_msg_import_2 db 'Error on load import library ',39,'box_lib.obj',39,'" -tW',0 |
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0 |
err_msg_import_3 db 'Error on load import library ',39,'buf2d.obj',39,'" -tW',0 |
err_msg_found_lib_4 db 'Sorry I cannot found library ',39,'kmenu.obj',39,'" -tE',0 |
err_msg_import_4 db 'Error on load import library ',39,'kmenu.obj',39,'" -tW',0 |
err_msg_found_lib_5 db 'Sorry I cannot found library ',39,'tinygl.obj',39,'" -tE',0 |
err_msg_import_5 db 'Error on load import library ',39,'tinygl',39,'" -tW',0 |
err_msg_found_lib_6 db 'Sorry I cannot found library ',39,'libini.obj',39,'" -tE',0 |
err_msg_import_6 db 'Error on load import library ',39,'libini',39,'" -tW',0 |
end if |
|
align 4 |
1439,9 → 1455,9 |
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï |
|
if lang eq ru |
capt db 'info 3ds [user] ¢¥àá¨ï 18.04.17',0 ;¯®¤¯¨áì ®ª |
capt db 'info 3ds [user] ¢¥àá¨ï 14.03.19',0 ;¯®¤¯¨áì ®ª |
else |
capt db 'info 3ds [user] version 18.04.17',0 ;window caption |
capt db 'info 3ds [user] version 14.03.19',0 ;window caption |
end if |
|
align 16 |