/programs/develop/info3ds/info3ds_u.asm |
---|
File deleted |
/programs/develop/info3ds/info3ds.asm |
---|
12,7 → 12,6 |
include 'lang.inc' |
include 'info_fun_float.inc' |
include 'info_menu.inc' |
include 'data.inc' |
version_edit equ 1 |
49,13 → 48,13 |
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*12+54 |
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*7 |
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 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢ |
IMAGE_CHUNKS_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢ |
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*10+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢ |
; |
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬ |
97,6 → 96,8 |
} |
;-------------------------------------- |
include 'data.inc' |
level_stack dd 0 |
offs_last_timer dd 0 ;¯®á«¥¤¨© ᤢ¨£ ¯®ª § ë© ¢ äãªæ¨¨ â ©¬¥à |
183,7 → 184,7 |
mov eax,dword[icon_tl_sys] |
mov dword[tree1.data_img_sys],eax |
load_image_file 'objects.png', icon_toolbar,IMAGE_CHUNKS_SIZE |
load_image_file 'objects.png', icon_toolbar,TOOLBAR_ICON_BMP_SIZE |
mov eax,dword[icon_toolbar] |
mov dword[tree1.data_img],eax |
423,7 → 424,7 |
@@: |
sub eax,65 |
mov dword[tree1.box_height],eax |
mov word[w_scr_t1.y_size],ax ;®¢ë¥ à §¬¥àë áªà®««¨£ |
mov word[w_scr_t1+4],ax ;®¢ë¥ à §¬¥àë áªà®««¨£ |
cmp eax,dword[buf_0.h] ;㢥«¨ç¨¢ ¥¬ ¢ëá®âã ¡ãä¥à |
jle @f |
stdcall [buf2d_resize],buf_0,0,eax |
439,7 → 440,7 |
sub eax,41 |
mov dword[tree1.box_width],eax |
add ax,word[tree1.box_left] |
mov word[w_scr_t1.x_pos],ax |
mov word[w_scr_t1+sb_offs_start_x],ax |
add ax,16+5 |
mov word[buf_0.l],ax |
707,7 → 708,8 |
jne @f |
stdcall add_3ds_object, ID_ICON_DATA,ebx,2,txt_count ;ç¨á«® £à ¥© |
push eax |
movzx eax,word[esi] |
xor eax,eax |
mov ax,[esi] |
shl eax,3 |
add esi,2 |
sub ecx,2 |
766,20 → 768,16 |
ret |
;¢å®¤ ¢ 1-© ¤®ç¥à¨© ¡«®ª |
;input: |
; eax - 㪠§ â¥«ì ¢à¥¬¥ë© á⥪ ä ©« file_3ds |
; esi - ç «® த¨â¥«ì᪮£® ¡«®ª |
;output: |
; ebx - destroy |
; esi - ç «® ¤ ëå த¨â¥«ì᪮£® ¡«®ª |
; edx - destroy |
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 |
1230,10 → 1228,12 |
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,15 → 1254,19 |
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 |
1296,6 → 1300,8 |
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 |
1407,8 → 1413,8 |
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 |
1429,9 → 1435,9 |
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; à ¬¥âàë ä®®¢®£® ®á¢¥é¥¨ï |
if lang eq ru |
capt db 'info 3ds ¢¥àá¨ï 16.01.16',0 ;¯®¤¯¨áì ®ª |
capt db 'info 3ds ¢¥àá¨ï 09.01.16',0 ;¯®¤¯¨áì ®ª |
else |
capt db 'info 3ds version 16.01.16',0 ;window caption |
capt db 'info 3ds version 09.01.16',0 ;window caption |
end if |
align 16 |
/programs/develop/info3ds/info_o3d.inc |
---|
83,16 → 83,13 |
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 |
cmp dword[edi+offs_obj_normals_tri_data],0 |
je @f |
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 |
@@: |
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 |
@@: |
;ãáâ ®¢ª ¯ à ¬¥â஢ ®â®¡à ¦¥¨ï |
call mnu_reset_settings |
ret |
endp |
438,83 → 435,10 |
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 ;®ç¨á⨬ ¡ãä¥à 梥⠨ £«ã¡¨ë |
679,28 → 603,26 |
stdcall [glEnable],GL_LIGHT0 |
ret |
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ¢¥àè¨ |
;¨§¬¥ï¥¬ ०¨¬ à¨á®¢ ¨ï ¢¥àè¨ |
align 4 |
mnu_vertexes_on: |
or dword[draw_mode], 1 shl bit_vertexes |
and dword[draw_mode], not (1 shl bit_faces) ;¢ëª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï £à ¥© (çâ®-¡ë ¥ ¬¥è «¨) |
call update_obj |
mnu_vertexes_on_off: |
xor dword[draw_mode], 1 shl bit_vertexes |
stdcall draw_3d, o3d |
ret |
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ª ઠáëå £à ¥© |
;¨§¬¥ï¥¬ ०¨¬ à¨á®¢ ¨ï £à ¥© |
align 4 |
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 |
mnu_faces_on_off: |
xor dword[draw_mode], 1 shl bit_faces |
stdcall draw_3d, o3d |
ret |
;¢ª«îç ¥¬ ०¨¬ à¨á®¢ ¨ï ᯫ®èëå £à ¥© |
;¨§¬¥ï¥¬ ª ઠáë¥ ¨«¨ ᯫ®èë¥ £à ¨ |
align 4 |
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 |
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 |
ret |
;¢ª«îç ¥¬ ¨«¨ ®âª«îç ¥¬ ®á¢¥é¥¨¥ |
707,7 → 629,7 |
align 4 |
mnu_light_on_off: |
xor dword[draw_mode], 1 shl bit_light |
call update_obj |
stdcall draw_3d, o3d |
ret |
align 4 |
716,33 → 638,10 |
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 ;०¨¬ à¨á®¢ ¨ï ¯® 㬮«ç ¨î |
delt_size dd 3.0 ;¨§¬¥¥¨¥ 㣫®¢ ¯à¨ ¯®¢®à®â å á ª«¨¢¨ âãàë |
/programs/develop/info3ds/info_wnd_coords.inc |
---|
42,13 → 42,7 |
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 |
mov dword[capt_p],txt_q |
60,20 → 54,84 |
cmp word[ebx],CHUNK_OBJBLOCK |
jne .end_oblo |
mov dword[capt_p],txt_4000 |
stdcall obj_init,edi |
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 |
jmp .no_points |
.end_oblo: |
cmp word[ebx],CHUNK_TRIMESH |
jne .end_trim |
mov dword[capt_p],txt_4100 |
stdcall obj_init,edi |
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 |
jmp .no_points |
.end_trim: |
cmp word[ebx],CHUNK_VERTLIST |
jne .end_vlist |
mov dword[capt_p],txt_4110 |
stdcall obj_init,edi |
jmp .no_points |
.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 |
.end_vlist: |
cmp word[ebx],CHUNK_TRACKPIVOT |
jne @f |
95,9 → 153,7 |
.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] |
109,7 → 165,6 |
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 |
135,7 → 190,6 |
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 |
162,7 → 216,13 |
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 |
;¥ ®âàë¢ âì íâã äãªæ¨î ®â ¯à¥¤ë¤ã饩 |
467,17 → 527,17 |
@@: |
cmp ah,5 |
jne @f |
call mnu_vertexes_on |
call mnu_vertexes_on_off |
jmp prop_still.end |
@@: |
cmp ah,6 |
jne @f |
call mnu_edges_on |
call mnu_faces_on_off |
jmp prop_still.end |
@@: |
cmp ah,7 |
jne @f |
call mnu_faces_on |
call mnu_faces_fill_on_off |
jmp prop_still.end |
@@: |
cmp ah,8 |
/programs/develop/info3ds/info_menu.inc |
---|
@@ -18,9 +18,9 @@ |
/programs/develop/info3ds/build_en.bat |
---|
10,6 → 10,4 |
@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 |
/programs/develop/info3ds/build_ru.bat |
---|
10,6 → 10,4 |
@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 |
/programs/develop/info3ds/toolbar.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |