From 11fcf4b4ff0993a8ebedb90b65d01dafcf99c7d7 Mon Sep 17 00:00:00 2001 From: IgorA Date: Wed, 19 Apr 2017 14:07:11 +0000 Subject: [PATCH] update 'info3ds', add new button git-svn-id: svn://kolibrios.org@6889 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/info3ds/info3ds.asm | 12 +- programs/develop/info3ds/info3ds_u.asm | 30 +- programs/develop/info3ds/info_o3d.inc | 396 ++++++++++-------- programs/develop/info3ds/info_wnd_coords.inc | 16 +- programs/develop/info3ds/toolbar.png | Bin 3658 -> 3914 bytes programs/fs/kfar/trunk/zlib/trees.asm | 26 +- .../media/voxel_editor/utilites/vox_tgl.asm | 4 +- 7 files changed, 266 insertions(+), 218 deletions(-) diff --git a/programs/develop/info3ds/info3ds.asm b/programs/develop/info3ds/info3ds.asm index 12d35ab5ed..5aebaae1d8 100644 --- a/programs/develop/info3ds/info3ds.asm +++ b/programs/develop/info3ds/info3ds.asm @@ -8,6 +8,7 @@ version_edit equ 1 include '../../macros.inc' include '../../proc32.inc' include '../../KOSfuncs.inc' +include '../../develop/libraries/libs-dev/libimg/libimg.inc' include '../../load_img.inc' include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc' @@ -1022,7 +1023,7 @@ Filter: dd Filter.end - Filter.1 .1: db '3DS',0 -db 'TXT',0 +db 'PNG',0 .end: db 0 @@ -1038,7 +1039,7 @@ system_dir_3 db '/sys/lib/' lib_name_3 db 'buf2d.obj',0 system_dir_4 db '/sys/lib/' lib_name_4 db 'kmenu.obj',0 -system_dir_5 db '/kolibrios/lib/' +system_dir_5 db '/sys/lib/' lib_name_5 db 'tinygl.obj',0 system_dir_6 db '/sys/lib/' lib_name_6 db 'libini.obj',0 @@ -1336,7 +1337,8 @@ 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 +.w: dd 3d_wnd_w +.h: dd 3d_wnd_h dd 0,24 ;+16 color,bit in pixel align 4 @@ -1371,9 +1373,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru -capt db 'info 3ds версия 05.09.16',0 ;подпись окна +capt db 'info 3ds версия 18.04.17',0 ;подпись окна else -capt db 'info 3ds version 05.09.16',0 ;window caption +capt db 'info 3ds version 18.04.17',0 ;window caption end if align 16 diff --git a/programs/develop/info3ds/info3ds_u.asm b/programs/develop/info3ds/info3ds_u.asm index 77a3cd3e83..ac3de39836 100644 --- a/programs/develop/info3ds/info3ds_u.asm +++ b/programs/develop/info3ds/info3ds_u.asm @@ -1,5 +1,5 @@ use32 - org 0x0 + org 0 db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт dd 1, start, i_end, mem, stacktop, file_name, sys_path @@ -8,6 +8,7 @@ version_edit equ 0 include '../../macros.inc' include '../../proc32.inc' include '../../KOSfuncs.inc' +include '../../develop/libraries/libs-dev/libimg/libimg.inc' include '../../load_img.inc' include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc' @@ -392,13 +393,13 @@ timer_funct: cmp word[eax],CHUNK_OBJBLOCK jne .end_oblo - cmp dword[edi+offs_obj_poi_count],2 + cmp dword[edi+obj_3d.poi_count],2 jl .ini_oblo stdcall draw_3d,edi jmp .end_f .ini_oblo: stdcall obj_init,edi ;попытка настроить переменные объекта - cmp dword[edi+offs_obj_poi_count],2 + cmp dword[edi+obj_3d.poi_count],2 jl .end_f call mnu_reset_settings ;сброс углов поворота и режимов рисования jmp .end_f @@ -406,13 +407,13 @@ timer_funct: cmp word[eax],CHUNK_MATERIAL jne .end_mblo - cmp dword[edi+offs_mat_name],0 + cmp dword[edi+material.name],0 je .ini_mblo stdcall draw_material,edi jmp .end_f .ini_mblo: stdcall mat_init,edi,eax ;попытка настроить данные материала - cmp dword[edi+offs_mat_name],0 + cmp dword[edi+material.name],0 je .end_f stdcall draw_material,edi jmp .end_f @@ -461,6 +462,7 @@ pushad mcall ,((3d_wnd_l+100) shl 16)+20,,0x40000009 ;свет вкл./выкл. mcall ,((3d_wnd_l+125) shl 16)+20,,0x4000000a ;сглаживание mcall ,((3d_wnd_l+150) shl 16)+20,,0x4000000b ;сброс + mcall ,((3d_wnd_l+175) shl 16)+20,,0x4000000c ;скрин из 3d окна mcall SF_PUT_IMAGE,[image_data_toolbar],(21 shl 16)+21,(5 shl 16)+24 ;new add ebx,IMAGE_TOOLBAR_ICON_SIZE @@ -479,6 +481,8 @@ pushad mcall ,,,((3d_wnd_l+75) shl 16)+24 ;грани по материалам вкл. add ebx,IMAGE_TOOLBAR_ICON_SIZE mcall ,,,((3d_wnd_l+125) shl 16)+24 ;сглаживание + add ebx,IMAGE_TOOLBAR_ICON_SIZE + mcall ,,,((3d_wnd_l+175) shl 16)+24 ;скрин из 3d окна mov dword[w_scr_t1.all_redraw],1 stdcall [tl_draw], tree1 @@ -601,6 +605,11 @@ button: call mnu_reset_settings jmp still @@: + cmp ah,12 + jne @f + call mnu_make_scrshot + jmp still + @@: cmp ah,1 jne still @@ -1085,7 +1094,7 @@ Filter: dd Filter.end - Filter.1 .1: db '3DS',0 -db 'TXT',0 +db 'PNG',0 .end: db 0 @@ -1101,7 +1110,7 @@ system_dir_3 db '/sys/lib/' lib_name_3 db 'buf2d.obj',0 system_dir_4 db '/sys/lib/' lib_name_4 db 'kmenu.obj',0 -system_dir_5 db '/kolibrios/lib/' +system_dir_5 db '/sys/lib/' lib_name_5 db 'tinygl.obj',0 system_dir_6 db '/sys/lib/' lib_name_6 db 'libini.obj',0 @@ -1393,7 +1402,8 @@ 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 +.w: dd 3d_wnd_w +.h: dd 3d_wnd_h .color: dd 0xffffd0 dd 24 ;+16 color,bit in pixel @@ -1429,9 +1439,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru -capt db 'info 3ds [user] версия 05.09.16',0 ;подпись окна +capt db 'info 3ds [user] версия 18.04.17',0 ;подпись окна else -capt db 'info 3ds [user] version 05.09.16',0 ;window caption +capt db 'info 3ds [user] version 18.04.17',0 ;window caption end if align 16 diff --git a/programs/develop/info3ds/info_o3d.inc b/programs/develop/info3ds/info_o3d.inc index a803569965..300667b4d1 100644 --- a/programs/develop/info3ds/info_o3d.inc +++ b/programs/develop/info3ds/info_o3d.inc @@ -28,28 +28,6 @@ struct obj_3d mat1_data dd ? ;данные 1-го материала в объекте ends -offs_obj_poi_data equ 0 ;указатель на координаты вершин -offs_obj_poi_count equ 4 ;колличество вершин -offs_obj_tri_data equ 8 ;указатель на данные треугольников -offs_obj_tri_count equ 12 ;колличество треугольников -offs_obj_normals_poi_data equ 16 -offs_obj_normals_poi_count equ 20 -offs_obj_normals_tri_data equ 24 -offs_obj_normals_tri_count equ 28 -offs_obj_x_max equ 32 -offs_obj_x_min equ 36 -offs_obj_x_centr equ 40 -offs_obj_x_scale equ 44 -offs_obj_y_max equ 48 -offs_obj_y_min equ 52 -offs_obj_y_centr equ 56 -offs_obj_y_scale equ 60 -offs_obj_z_max equ 64 -offs_obj_z_min equ 68 -offs_obj_z_centr equ 72 -offs_obj_z_scale equ 76 -offs_obj_mat1_data equ 80 - struct material name dd ? col_ambient dd ? ;цвет материала @@ -57,11 +35,6 @@ struct material col_specular dd ? ends -offs_mat_name equ 0 -offs_mat_col_ambient equ 4 -offs_mat_col_diffuse equ 8 -offs_mat_col_specular equ 12 - bit_vertexes equ 0 bit_faces equ 1 ;грани рисуются контурами bit_faces_fill equ 2 ;грани с заливкой @@ -85,8 +58,17 @@ key_vert db 'col_vertices',0 key_face db 'col_faces',0 key_select db 'col_select',0 +txt_err_save_img_file: +if lang eq ru + db 'Не могу сохранить файл.',0 +else + db 'Can',39,'t save file.',0 +end if +align 4 rad_c dd 150 ;для вычисления радиуса +png_data dd ? +png_size dd ? align 4 proc hex_in_str, buf:dword,val:dword,zif:dword @@ -118,22 +100,22 @@ align 4 proc obj_clear_param uses edi, o_data:dword mov edi,[o_data] ;обнуление указателей на данные объектов - mov dword[edi+offs_obj_poi_data],0 - mov dword[edi+offs_obj_poi_count],0 - mov dword[edi+offs_obj_tri_data],0 - 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 - mov dword[edi+offs_obj_mat1_data],0 - cmp dword[edi+offs_obj_normals_tri_data],0 + mov dword[edi+obj_3d.poi_data],0 + mov dword[edi+obj_3d.poi_count],0 + mov dword[edi+obj_3d.tri_data],0 + mov dword[edi+obj_3d.tri_count],0 + mov dword[edi+obj_3d.normals_tri_count],0 + mov dword[edi+obj_3d.normals_poi_count],0 + mov dword[edi+obj_3d.mat1_data],0 + cmp dword[edi+obj_3d.normals_tri_data],0 je @f - stdcall mem.Free,[edi+offs_obj_normals_tri_data] - mov dword[edi+offs_obj_normals_tri_data],0 + stdcall mem.Free,[edi+obj_3d.normals_tri_data] + mov dword[edi+obj_3d.normals_tri_data],0 @@: - cmp dword[edi+offs_obj_normals_poi_data],0 + cmp dword[edi+obj_3d.normals_poi_data],0 je @f - stdcall mem.Free,[edi+offs_obj_normals_poi_data] - mov dword[edi+offs_obj_normals_poi_data],0 + stdcall mem.Free,[edi+obj_3d.normals_poi_data] + mov dword[edi+obj_3d.normals_poi_data],0 @@: ret endp @@ -167,43 +149,43 @@ endp align 4 proc obj_set_sizes uses eax ebx esi edi, o_data:dword mov edi,[o_data] - cmp dword[edi+offs_obj_poi_count],0 + cmp dword[edi+obj_3d.poi_count],0 je .end finit - mov eax,[edi+offs_obj_poi_data] + mov eax,[edi+obj_3d.poi_data] mov ebx,dword[eax] - mov [edi+offs_obj_x_min],ebx - mov [edi+offs_obj_x_max],ebx + mov [edi+obj_3d.x_min],ebx + mov [edi+obj_3d.x_max],ebx mov ebx,dword[eax+4] - mov [edi+offs_obj_y_min],ebx - mov [edi+offs_obj_y_max],ebx + mov [edi+obj_3d.y_min],ebx + mov [edi+obj_3d.y_max],ebx mov ebx,dword[eax+8] - mov [edi+offs_obj_z_min],ebx - mov [edi+offs_obj_z_max],ebx + mov [edi+obj_3d.z_min],ebx + mov [edi+obj_3d.z_max],ebx - mov ebx,[edi+offs_obj_poi_data] - mov esi,[edi+offs_obj_poi_count] + mov ebx,[edi+obj_3d.poi_data] + mov esi,[edi+obj_3d.poi_count] align 4 .cycle_0: ;работа с координатой x fld dword[ebx] - fld dword[edi+offs_obj_x_min] + fld dword[edi+obj_3d.x_min] fcomp fstsw ax sahf jb @f mov eax,[ebx] - mov [edi+offs_obj_x_min],eax + mov [edi+obj_3d.x_min],eax ffree st0 fincstp jmp .next_x @@: - fld dword[edi+offs_obj_x_max] + fld dword[edi+obj_3d.x_max] fcompp fstsw ax sahf ja .next_x mov eax,[ebx] - mov [edi+offs_obj_x_max],eax + mov [edi+obj_3d.x_max],eax .next_x: add ebx,12 @@ -211,44 +193,44 @@ align 4 jnz .cycle_0 fld1 - fld dword[edi+offs_obj_x_max] - fsub dword[edi+offs_obj_x_min] - fst dword[edi+offs_obj_x_centr] + fld dword[edi+obj_3d.x_max] + fsub dword[edi+obj_3d.x_min] + fst dword[edi+obj_3d.x_centr] fdivp ;1/size.x - fstp dword[edi+offs_obj_x_scale] + fstp dword[edi+obj_3d.x_scale] - fld dword[edi+offs_obj_x_centr] + fld dword[edi+obj_3d.x_centr] fld1 fld1 faddp fdivp ;centr.x = size.x/2 - fadd dword[edi+offs_obj_x_min] + fadd dword[edi+obj_3d.x_min] fchs - fstp dword[edi+offs_obj_x_centr] + fstp dword[edi+obj_3d.x_centr] - mov ebx,[edi+offs_obj_poi_data] - mov esi,[edi+offs_obj_poi_count] + mov ebx,[edi+obj_3d.poi_data] + mov esi,[edi+obj_3d.poi_count] align 4 .cycle_1: ;работа с координатой y fld dword[ebx+4] - fld dword[edi+offs_obj_y_min] + fld dword[edi+obj_3d.y_min] fcomp fstsw ax sahf jb @f mov eax,[ebx+4] - mov [edi+offs_obj_y_min],eax + mov [edi+obj_3d.y_min],eax ffree st0 fincstp jmp .next_y @@: - fld dword[edi+offs_obj_y_max] + fld dword[edi+obj_3d.y_max] fcompp fstsw ax sahf ja .next_y mov eax,[ebx+4] - mov [edi+offs_obj_y_max],eax + mov [edi+obj_3d.y_max],eax .next_y: add ebx,12 @@ -256,44 +238,44 @@ align 4 jnz .cycle_1 fld1 - fld dword[edi+offs_obj_y_max] - fsub dword[edi+offs_obj_y_min] - fst dword[edi+offs_obj_y_centr] + fld dword[edi+obj_3d.y_max] + fsub dword[edi+obj_3d.y_min] + fst dword[edi+obj_3d.y_centr] fdivp ;1/size.y - fstp dword[edi+offs_obj_y_scale] + fstp dword[edi+obj_3d.y_scale] - fld dword[edi+offs_obj_y_centr] + fld dword[edi+obj_3d.y_centr] fld1 fld1 faddp fdivp ;centr.y = size.y/2 - fadd dword[edi+offs_obj_y_min] + fadd dword[edi+obj_3d.y_min] fchs - fstp dword[edi+offs_obj_y_centr] + fstp dword[edi+obj_3d.y_centr] - mov ebx,[edi+offs_obj_poi_data] - mov esi,[edi+offs_obj_poi_count] + mov ebx,[edi+obj_3d.poi_data] + mov esi,[edi+obj_3d.poi_count] align 4 .cycle_2: ;работа с координатой z fld dword[ebx+8] - fld dword[edi+offs_obj_z_min] + fld dword[edi+obj_3d.z_min] fcomp fstsw ax sahf jb @f mov eax,[ebx+8] - mov [edi+offs_obj_z_min],eax + mov [edi+obj_3d.z_min],eax ffree st0 fincstp jmp .next_z @@: - fld dword[edi+offs_obj_z_max] + fld dword[edi+obj_3d.z_max] fcompp fstsw ax sahf ja .next_z mov eax,[ebx+8] - mov [edi+offs_obj_z_max],eax + mov [edi+obj_3d.z_max],eax .next_z: add ebx,12 @@ -301,48 +283,48 @@ align 4 jnz .cycle_2 fld1 - fld dword[edi+offs_obj_z_max] - fsub dword[edi+offs_obj_z_min] - fst dword[edi+offs_obj_z_centr] + fld dword[edi+obj_3d.z_max] + fsub dword[edi+obj_3d.z_min] + fst dword[edi+obj_3d.z_centr] fdivp ;1/size.z - fstp dword[edi+offs_obj_z_scale] + fstp dword[edi+obj_3d.z_scale] - fld dword[edi+offs_obj_z_centr] + fld dword[edi+obj_3d.z_centr] fld1 fld1 faddp fdivp ;centr.z = size.z/2 - fadd dword[edi+offs_obj_z_min] + fadd dword[edi+obj_3d.z_min] fchs - fstp dword[edi+offs_obj_z_centr] + fstp dword[edi+obj_3d.z_centr] ;находим радиус для сферы - fld dword[edi+offs_obj_x_max] - fsub dword[edi+offs_obj_x_min] - fld dword[edi+offs_obj_y_max] - fsub dword[edi+offs_obj_y_min] + fld dword[edi+obj_3d.x_max] + fsub dword[edi+obj_3d.x_min] + fld dword[edi+obj_3d.y_max] + fsub dword[edi+obj_3d.y_min] faddp fild dword[rad_c] fdivp ;radius=(size.x+size.y)/rad_c fstp dword[sph_radius] ;делаем одинаковый масштаб по осям x и y, что-бы не нарушались пропорции изображения - fld dword[edi+offs_obj_y_scale] + fld dword[edi+obj_3d.y_scale] fdiv dword[ratio] ;приведение масштаба по оси y учитывая что по высоте экран меньше - fcomp dword[edi+offs_obj_x_scale] + fcomp dword[edi+obj_3d.x_scale] fstsw ax sahf jb @f ;сжатие масштаба по y - fld dword[edi+offs_obj_x_scale] + fld dword[edi+obj_3d.x_scale] fmul dword[ratio] - fstp dword[edi+offs_obj_y_scale] ;масштаб по оси y = масштаб по оси x + fstp dword[edi+obj_3d.y_scale] ;масштаб по оси y = масштаб по оси x jmp .end @@: ;сжатие масштаба по x >...< - fld dword[edi+offs_obj_x_scale] + fld dword[edi+obj_3d.x_scale] fdiv dword[ratio] - fstp dword[edi+offs_obj_x_scale] + fstp dword[edi+obj_3d.x_scale] .end: ret endp @@ -358,20 +340,20 @@ locals endl pushad mov ecx,[o_data] - cmp dword[ecx+offs_obj_poi_count],0 + cmp dword[ecx+obj_3d.poi_count],0 je .end - mov eax,[ecx+offs_obj_tri_count] - mov [ecx+offs_obj_normals_tri_count],eax ;на каждый треугольник 1 нормаль + mov eax,[ecx+obj_3d.tri_count] + mov [ecx+obj_3d.normals_tri_count],eax ;на каждый треугольник 1 нормаль cmp eax,0 je .end finit imul eax,12 stdcall mem.Alloc, eax - mov [ecx+offs_obj_normals_tri_data],eax + mov [ecx+obj_3d.normals_tri_data],eax - mov edx,[ecx+offs_obj_tri_data] - mov ebx,[ecx+offs_obj_tri_count] - mov ecx,[ecx+offs_obj_poi_data] + mov edx,[ecx+obj_3d.tri_data] + mov ebx,[ecx+obj_3d.tri_count] + mov ecx,[ecx+obj_3d.poi_data] align 4 @@: mov edi,ebp @@ -462,24 +444,24 @@ align 4 ;нормали к вершинам mov ebx,[o_data] - mov ecx,[ebx+offs_obj_poi_count] - mov [ebx+offs_obj_normals_poi_count],ecx + mov ecx,[ebx+obj_3d.poi_count] + mov [ebx+obj_3d.normals_poi_count],ecx cmp ecx,0 je .end imul ecx,12 stdcall mem.Alloc,ecx - mov [ebx+offs_obj_normals_poi_data],eax + mov [ebx+obj_3d.normals_poi_data],eax mov edi,eax mov eax,0.0 shr ecx,2 rep stosd ;очистка 0-ми float - mov edx,[ebx+offs_obj_tri_count] - mov edi,[ebx+offs_obj_tri_data] - mov eax,[ebx+offs_obj_normals_tri_data] - mov ecx,[ebx+offs_obj_poi_data] - mov ebx,[ebx+offs_obj_normals_poi_data] + mov edx,[ebx+obj_3d.tri_count] + mov edi,[ebx+obj_3d.tri_data] + mov eax,[ebx+obj_3d.normals_tri_data] + mov ecx,[ebx+obj_3d.poi_data] + mov ebx,[ebx+obj_3d.normals_poi_data] align 4 .cycle_0: ;по граням movzx esi,word[edi] ;1-я вершина @@ -636,8 +618,8 @@ proc obj_init, o_data:dword 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 + mov [edi+obj_3d.poi_data],ebx + mov [edi+obj_3d.poi_count],edx .cycle_0: ;цикл для поиска треугольников add esi,dword[esi+2] @@ -649,16 +631,16 @@ proc obj_init, o_data:dword @@: ;если нашли треугольники movzx edx,word[esi+6] - mov [edi+offs_obj_tri_count],edx + mov [edi+obj_3d.tri_count],edx add esi,8 ;2+4+2 (chunk+size+count) - mov [edi+offs_obj_tri_data],esi + mov [edi+obj_3d.tri_data],esi ;поиск материалов граней shl edx,3 add esi,edx cmp word[esi],CHUNK_FACEMAT jne .end_points - mov [edi+offs_obj_mat1_data],esi + mov [edi+obj_3d.mat1_data],esi .end_points: stdcall obj_set_sizes, edi @@ -681,10 +663,10 @@ proc mat_init, m_data:dword, f_data:dword mov edi,[m_data] ;... clear edi ... - mov dword[edi+offs_mat_name],0 - mov dword[edi+offs_mat_col_ambient],0 - mov dword[edi+offs_mat_col_diffuse],0 - mov dword[edi+offs_mat_col_specular],0 + mov dword[edi+material.name],0 + mov dword[edi+material.col_ambient],0 + mov dword[edi+material.col_diffuse],0 + mov dword[edi+material.col_specular],0 xor edx,edx mov ebx,[f_data] @@ -699,7 +681,7 @@ proc mat_init, m_data:dword, f_data:dword ;*** (0) *** mov esi,ebx add ebx,6 - mov [edi+offs_mat_name],ebx + mov [edi+material.name],ebx sub ebx,6 ;*** (1) *** .cycle_0: ;цикл для поиска цвета материала @@ -716,10 +698,10 @@ proc mat_init, m_data:dword, f_data:dword jne .end_material add esi,6 mov dl,byte[esi] - mov [edi+offs_mat_col_ambient+2],dl + mov byte[edi+material.col_ambient+2],dl mov dx,word[esi+1] ror dx,8 - mov [edi+offs_mat_col_ambient],dx + mov word[edi+material.col_ambient],dx ;*** (2) *** mov esi,ebx .cycle_1: ;цикл для поиска цвета материала @@ -736,10 +718,10 @@ proc mat_init, m_data:dword, f_data:dword jne .end_material add esi,6 mov dl,byte[esi] - mov [edi+offs_mat_col_diffuse+2],dl + mov byte[edi+material.col_diffuse+2],dl mov dx,word[esi+1] ror dx,8 - mov [edi+offs_mat_col_diffuse],dx + mov word[edi+material.col_diffuse],dx ;*** (3) *** mov esi,ebx .cycle_2: ;цикл для поиска цвета материала @@ -756,10 +738,10 @@ proc mat_init, m_data:dword, f_data:dword jne .end_material add esi,6 mov dl,byte[esi] - mov [edi+offs_mat_col_specular+2],dl + mov byte[edi+material.col_specular+2],dl mov dx,word[esi+1] ror dx,8 - mov [edi+offs_mat_col_specular],dx + mov word[edi+material.col_specular],dx .end_material: .no_material: @@ -787,10 +769,10 @@ proc draw_material uses edi, m_data:dword stdcall buf_draw_beg, buf_ogl stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_afff,5,35,0xff - stdcall [buf2d_draw_text], buf_ogl,buf_1,[edi+offs_mat_name],15,45,0 ;имя материала - stdcall draw_color, [edi+offs_mat_col_ambient], txt_a010,2,55 ;окружающий цвет - stdcall draw_color, [edi+offs_mat_col_diffuse], txt_a020,2,75 ;дифузный цвет - stdcall draw_color, [edi+offs_mat_col_specular],txt_a030,2,95 ;зеркальный цвет + stdcall [buf2d_draw_text], buf_ogl,buf_1,[edi+material.name],15,45,0 ;имя материала + stdcall draw_color, [edi+material.col_ambient], txt_a010,2,55 ;окружающий цвет + stdcall draw_color, [edi+material.col_diffuse], txt_a020,2,75 ;дифузный цвет + stdcall draw_color, [edi+material.col_specular],txt_a030,2,95 ;зеркальный цвет stdcall [buf2d_draw], buf_ogl ret @@ -819,7 +801,7 @@ endp align 4 proc draw_3d uses eax ebx ecx edi, o_data:dword mov edi,[o_data] - cmp dword[edi+offs_obj_poi_count],2 + cmp dword[edi+obj_3d.poi_count],2 jl .end_f stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины stdcall [glPushMatrix] @@ -831,18 +813,18 @@ proc draw_3d uses eax ebx ecx edi, o_data:dword stdcall [glDisable],GL_LIGHTING .end_l: stdcall [glTranslatef], 0.0,0.0,0.5 ;correct for z - stdcall [glScalef], [edi+offs_obj_x_scale],[edi+offs_obj_y_scale],[edi+offs_obj_z_scale] + stdcall [glScalef], [edi+obj_3d.x_scale],[edi+obj_3d.y_scale],[edi+obj_3d.z_scale] stdcall [glScalef], 1.0,1.0,0.7 ;correct for z stdcall [glRotatef], [angle_z],0.0,0.0,1.0 stdcall [glRotatef], [angle_y],0.0,1.0,0.0 stdcall [glRotatef], [angle_x],1.0,0.0,0.0 - stdcall [glTranslatef], [edi+offs_obj_x_centr],[edi+offs_obj_y_centr],[edi+offs_obj_z_centr] + stdcall [glTranslatef], [edi+obj_3d.x_centr],[edi+obj_3d.y_centr],[edi+obj_3d.z_centr] if version_edit eq 0 ;рисование граней с использованием цветов материалов bt dword[draw_mode],bit_faces_mat jnc @f - mov eax,[edi+offs_obj_mat1_data] + mov eax,[edi+obj_3d.mat1_data] .b_found: cmp eax,0 je .end_points @@ -857,9 +839,9 @@ end if ;рисование граней без цветов материалов bt dword[draw_mode],bit_faces jnc .end_triangles - cmp dword[edi+offs_obj_tri_count],0 + cmp dword[edi+obj_3d.tri_count],0 je .end_triangles - cmp dword[edi+offs_obj_poi_count],0 + cmp dword[edi+obj_3d.poi_count],0 je .end_triangles bt dword[draw_mode],bit_faces_fill jc @f @@ -877,31 +859,31 @@ end if jnc .triangles_flat ;triangles smooth stdcall [glBegin],GL_TRIANGLES - mov eax,[edi+offs_obj_tri_data] - mov ecx,[edi+offs_obj_tri_count] - mov edx,[edi+offs_obj_normals_tri_data] + mov eax,[edi+obj_3d.tri_data] + mov ecx,[edi+obj_3d.tri_count] + mov edx,[edi+obj_3d.normals_tri_data] align 4 @@: movzx ebx,word[eax] ;1-я вершина imul ebx,12 - add ebx,[edi+offs_obj_normals_poi_data] + add ebx,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], ebx - sub ebx,[edi+offs_obj_normals_poi_data] - add ebx,[edi+offs_obj_poi_data] + sub ebx,[edi+obj_3d.normals_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] movzx ebx,word[eax+2] ;2-я вершина imul ebx,12 - add ebx,[edi+offs_obj_normals_poi_data] + add ebx,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], ebx - sub ebx,[edi+offs_obj_normals_poi_data] - add ebx,[edi+offs_obj_poi_data] + sub ebx,[edi+obj_3d.normals_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] movzx ebx,word[eax+4] ;3-я вершина imul ebx,12 - add ebx,[edi+offs_obj_normals_poi_data] + add ebx,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], ebx - sub ebx,[edi+offs_obj_normals_poi_data] - add ebx,[edi+offs_obj_poi_data] + sub ebx,[edi+obj_3d.normals_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] add eax,8 ;размер треугольника = (3 вершины (по 2б) + свойства (2б)) dec ecx @@ -911,9 +893,9 @@ align 4 .triangles_flat: stdcall [glBegin],GL_TRIANGLES - mov eax,[edi+offs_obj_tri_data] - mov ecx,[edi+offs_obj_tri_count] - mov edx,[edi+offs_obj_normals_tri_data] + mov eax,[edi+obj_3d.tri_data] + mov ecx,[edi+obj_3d.tri_count] + mov edx,[edi+obj_3d.normals_tri_data] align 4 @@: ; @@ -924,15 +906,15 @@ align 4 .norm1: movzx ebx,word[eax] ;1-я вершина imul ebx,12 - add ebx,[edi+offs_obj_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] movzx ebx,word[eax+2] ;2-я вершина imul ebx,12 - add ebx,[edi+offs_obj_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] movzx ebx,word[eax+4] ;3-я вершина imul ebx,12 - add ebx,[edi+offs_obj_poi_data] + add ebx,[edi+obj_3d.poi_data] stdcall [glVertex3f], [ebx],[ebx+4],[ebx+8] add eax,8 ;размер треугольника = (3 вершины (по 2б) + свойства (2б)) dec ecx @@ -946,9 +928,9 @@ align 4 jnc .end_points stdcall [glColor3ub],[color_vert+2],[color_vert+1],[color_vert] stdcall [glBegin],GL_POINTS - mov eax,[edi+offs_obj_poi_data] - mov ebx,[edi+offs_obj_poi_count] - mov edx,[edi+offs_obj_normals_poi_data] + mov eax,[edi+obj_3d.poi_data] + mov ebx,[edi+obj_3d.poi_count] + mov edx,[edi+obj_3d.normals_poi_data] align 4 @@: bt dword[draw_mode],bit_light @@ -973,14 +955,14 @@ if version_edit eq 1 stdcall [glBegin],GL_LINES stdcall [glColor3ub], [color_ox+2],[color_ox+1],[color_ox] - stdcall [glVertex3f], [edi+offs_obj_x_min],[eax+4],[eax+8] - stdcall [glVertex3f], [edi+offs_obj_x_max],[eax+4],[eax+8] + stdcall [glVertex3f], [edi+obj_3d.x_min],[eax+4],[eax+8] + stdcall [glVertex3f], [edi+obj_3d.x_max],[eax+4],[eax+8] stdcall [glColor3ub], [color_oy+2],[color_oy+1],[color_oy] - stdcall [glVertex3f], [eax],[edi+offs_obj_y_min],[eax+8] - stdcall [glVertex3f], [eax],[edi+offs_obj_y_max],[eax+8] + stdcall [glVertex3f], [eax],[edi+obj_3d.y_min],[eax+8] + stdcall [glVertex3f], [eax],[edi+obj_3d.y_max],[eax+8] stdcall [glColor3ub], [color_oz+2],[color_oz+1],[color_oz] - stdcall [glVertex3f], [eax],[eax+4],[edi+offs_obj_z_min] - stdcall [glVertex3f], [eax],[eax+4],[edi+offs_obj_z_max] + stdcall [glVertex3f], [eax],[eax+4],[edi+obj_3d.z_min] + stdcall [glVertex3f], [eax],[eax+4],[edi+obj_3d.z_max] stdcall [glEnd] stdcall [glColor3ub],[color_select+2],[color_select+1],[color_select] @@ -1093,6 +1075,64 @@ mnu_reset_settings: call update_obj ret +align 4 +mnu_make_scrshot: + pushad + copy_path open_dialog_name,communication_area_default_path,file_name,0 + mov [OpenDialog_data.type],1 + stdcall [OpenDialog_Start],OpenDialog_data + cmp [OpenDialog_data.status],2 + je .end_save_file + ;код при удачном открытии диалога + mov dword[png_data],0 + + ;create image struct + stdcall [img_create], [buf_ogl.w], [buf_ogl.h], Image.bpp24 + mov ebx,eax + test eax,eax + jz @f + ;copy foto to image buffer + mov edi,[eax+Image.Data] + mov esi,[buf_ogl] + mov ecx,[buf_ogl.w] + mov edx,[buf_ogl.h] + imul ecx,edx + imul ecx,3 + shr ecx,2 ;OpenGL buffer align to 4 + rep movsd + + ;encode image + stdcall [img_encode], eax, LIBIMG_FORMAT_PNG, 0 + test eax,eax + jz @f + mov [png_data],eax + mov [png_size],ecx + @@: + stdcall [img_destroy],ebx + + ; заполняем структуру для сохранения файла + mov ebx,run_file_70 + mov dword[ebx],SSF_CREATE_FILE + mov eax,[png_size] + mov [ebx+12],eax ;file size + mov eax,[png_data] + mov [ebx+16],eax + mov dword[ebx+FileInfoBlock.FileName], openfile_path + + mcall SF_FILE,run_file_70 + test eax,eax + jnz .save_error + ;notify_window_run openfile_path + jmp @f + .save_error: + ;сообщение о неудачном сохранении + notify_window_run txt_err_save_img_file + @@: + mcall SF_SYS_MISC, SSF_MEM_FREE, [png_data] + .end_save_file: + popad + ret + if version_edit eq 1 align 4 @@ -1151,12 +1191,12 @@ proc get_mat_color uses ebx ecx edx edi esi, p_mat:dword cmp word[ebx],CHUNK_MATERIAL jne .end_add_p3 add eax,list_offs_obj3d - mov esi,[eax+offs_mat_name] + mov esi,[eax+material.name] cmp esi,0 jne @f ;init material stdcall mat_init,eax,ebx - mov esi,[eax+offs_mat_name] + mov esi,[eax+material.name] @@: mov edi,[p_mat] mov eax,5 @@ -1181,7 +1221,7 @@ align 4 .found: stdcall [tl_node_poi_get_data], tree1,ecx add eax,list_offs_obj3d - mov eax,[eax+offs_mat_col_diffuse] + mov eax,[eax+material.col_diffuse] .end_f: ret endp @@ -1200,7 +1240,7 @@ pushad cmp al,0 jne @b movzx ecx,word[esi] ;ecx - число граней с данным материалом - mov edx,[edi+offs_obj_poi_data] + mov edx,[edi+obj_3d.poi_data] bt dword[draw_mode],bit_smooth jnc @f @@ -1213,29 +1253,29 @@ align 4 movzx ebx,word[esi] shl ebx,3 - add ebx,[edi+offs_obj_tri_data] + add ebx,[edi+obj_3d.tri_data] movzx eax,word[ebx] ;1-я вершина imul eax,12 ;float(x,y,z) - add eax,[edi+offs_obj_normals_poi_data] + add eax,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], eax - sub eax,[edi+offs_obj_normals_poi_data] + sub eax,[edi+obj_3d.normals_poi_data] add eax,edx stdcall [glVertex3f], [eax],[eax+4],[eax+8] movzx eax,word[ebx+2] ;2-я вершина imul eax,12 ;float(x,y,z) - add eax,[edi+offs_obj_normals_poi_data] + add eax,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], eax - sub eax,[edi+offs_obj_normals_poi_data] + sub eax,[edi+obj_3d.normals_poi_data] add eax,edx stdcall [glVertex3f], [eax],[eax+4],[eax+8] movzx eax,word[ebx+4] ;3-я вершина imul eax,12 ;float(x,y,z) - add eax,[edi+offs_obj_normals_poi_data] + add eax,[edi+obj_3d.normals_poi_data] stdcall [glNormal3fv], eax - sub eax,[edi+offs_obj_normals_poi_data] + sub eax,[edi+obj_3d.normals_poi_data] add eax,edx stdcall [glVertex3f], [eax],[eax+4],[eax+8] @@ -1254,12 +1294,12 @@ align 4 jnc .norm mov eax,ebx imul eax,12 - add eax,[edi+offs_obj_normals_tri_data] + add eax,[edi+obj_3d.normals_tri_data] stdcall [glNormal3fv], eax .norm: shl ebx,3 - add ebx,[edi+offs_obj_tri_data] + add ebx,[edi+obj_3d.tri_data] movzx eax,word[ebx] ;1-я вершина imul eax,12 ;float(x,y,z) diff --git a/programs/develop/info3ds/info_wnd_coords.inc b/programs/develop/info3ds/info_wnd_coords.inc index 34c7a5c4e0..1596ef181f 100644 --- a/programs/develop/info3ds/info_wnd_coords.inc +++ b/programs/develop/info3ds/info_wnd_coords.inc @@ -85,14 +85,14 @@ pushad ;jmp .set_points @@: .set_points: - mov [edi+offs_obj_poi_data],ebx - mov [edi+offs_obj_poi_count],edx + mov [edi+obj_3d.poi_data],ebx + mov [edi+obj_3d.poi_count],edx .no_points: ;настройка списка объектов - mov ebx,[edi+offs_obj_poi_data] + mov ebx,[edi+obj_3d.poi_data] mov dword[tree3.info_max_count],2 - mov edx,[edi+offs_obj_poi_count] + mov edx,[edi+obj_3d.poi_count] add dword[tree3.info_max_count],edx ;ставим число узлов, равное колличеству точек (+2 на начало и конец списка) stdcall dword[tl_data_init], tree3 mov eax,dword[icon_tl_sys] @@ -523,10 +523,10 @@ prop_button: mov dword[tree3.data_img_sys],0 ;т. к. они еще используються в других элементах stdcall dword[tl_data_clear], tree3 mov edi,o3d - 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 + stdcall mem.Free,[edi+obj_3d.normals_tri_data] + stdcall mem.Free,[edi+obj_3d.normals_poi_data] + mov dword[edi+obj_3d.normals_tri_data],0 + mov dword[edi+obj_3d.normals_poi_data],0 mov byte[prop_wnd_run],0 ;обнуляем счетчик окон mcall SF_TERMINATE_PROCESS ;выход из программы diff --git a/programs/develop/info3ds/toolbar.png b/programs/develop/info3ds/toolbar.png index 9fffdce3dd0ad56baabce647fad5869216e72800..6335c5dce7981e321cddb67910bffa80ccec837b 100644 GIT binary patch delta 3877 zcmY*cc{tRI_jcP6-R#*LV-{qR-Jpzh#y&u%Zo|oY1 z;^N}(`mKq0XN_ng3#iZE*tb5c^rMXoa1pL+g+P$-)QA3+Hjkp<jq;VZWC#roD|ehNgXI4Q8Fdk(P8f&z*p_jtq&nT){EQOpS!Dm zZY}p{V0{0yDAxVyvGV%$AMQax7ll&Q&%)X_XYH_9y9sfaHJndj$iY)?wRWM^y;GO+ zz30s3-jg!FdXCOEOs}J?N4W{_^T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jRF%YD}a8$g*FWGuyM0>Ng^{HCTc%h$b)#~%p{(%%w16i25=PU)0w>``O zk+SPVM}3)c0;lNs%!Kx(qAP#-b(M@qTk4&w|9oplPg*0bNwt?_kqohCKN;hT8nnA* z?i}1p6Dwk-nspd#RspsHupTrv$DX}14UU`c!Z}(a8j{uf@*{fO8^4A`cC21>OYGt# zRE70hbG3{xA;AY345_L~$8JP(AoIa`?t{2k)MAKDx^? zpL~W5I_{3*mNi}0?b~I{MSU$KQYut^xqgnUPx>94_NUJOdv@`@i?gsr1?&N6t^K9} zZ^ipUy8P-VZT`|_nZrrTZZX$Uz~#i&=ON+Pq@lwNv9m)5U+APXtV|ONIhnSU%j?KM zH?AJ~Ft0ZJryzr<5nNM1qM#20TB2$M=w09ac?QtJV$YfVFWOxI)qpJVqP-ipKO6gE zZx)nb@NdvXtQ(h_(3EIMeagsA_T=zsOuee%GrBrjnp*j-lq+D;6~UkIftNyt8$*C0 zO{aINFj`Y*KQ)hE!KS7oC)6_7>1qK~IUnWD$YeIs$nasSLH;Cm@uo+cre=..;..) - dec dword[max_blindex] + dec ebx @@: - cmp dword[max_blindex],3 + cmp ebx,3 jl .cycle0end - mov ecx,[max_blindex] - movzx eax,byte[ecx+bl_order] - movzx ecx,word[edi+sizeof.ct_data*eax+deflate_state.bl_tree+Len] + movzx ecx,byte[ebx+bl_order] + movzx ecx,word[edi+sizeof.ct_data*ecx+deflate_state.bl_tree+Len] jecxz .cycle0 - jmp .cycle0end align 4 .cycle0end: ; Update opt_len to include the bit length tree and counts - mov eax,[max_blindex] + mov eax,ebx inc eax imul eax,3 add eax,5+5+4 add [edi+deflate_state.opt_len],eax ; Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", s->opt_len, s->static_len)); - mov eax,[max_blindex] + mov eax,ebx ret endp @@ -1343,8 +1340,7 @@ endp ; lengths of the bit length codes, the literal tree and the distance tree. ; IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. -;void (s, lcodes, dcodes, blcodes) -; deflate_state* s +;void (deflate_state* s, lcodes, dcodes, blcodes) ; int lcodes, dcodes, blcodes ;number of codes for each tree align 4 proc send_all_trees uses eax ebx ecx edi, s:dword, lcodes:dword, dcodes:dword, blcodes:dword diff --git a/programs/media/voxel_editor/utilites/vox_tgl.asm b/programs/media/voxel_editor/utilites/vox_tgl.asm index adb4e445cb..67a8143702 100644 --- a/programs/media/voxel_editor/utilites/vox_tgl.asm +++ b/programs/media/voxel_editor/utilites/vox_tgl.asm @@ -12,7 +12,7 @@ include 'vox_3d.inc' include '../trunk/str.inc' @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load -caption db 'Voxel viewer 19.02.16',0 ;подпись окна +caption db 'Voxel viewer 18.04.17',0 ;подпись окна 3d_wnd_l equ 5 ;отступ для tinygl буфера слева 3d_wnd_t equ 30 ;отступ для tinygl буфера сверху @@ -854,7 +854,7 @@ lib_name_2 db 'buf2d.obj',0 err_msg_found_lib_2 db 'Не найдена библиотека ',39,'buf2d.obj',39,0 err_msg_import_2 db 'Ошибка при импорте библиотеки ',39,'buf2d',39,0 -system_dir_3 db '/kolibrios/lib/' +system_dir_3 db '/sys/lib/' lib_name_3 db 'tinygl.obj',0 err_msg_found_lib_3 db 'Не найдена библиотека ',39,'tinygl.obj',39,0 err_msg_import_3 db 'Ошибка при импорте библиотеки ',39,'tinygl',39,0