Rev 6889 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6889 | Rev 7610 | ||
---|---|---|---|
Line 636... | Line 636... | ||
636 | mov [edi+obj_3d.tri_data],esi |
636 | mov [edi+obj_3d.tri_data],esi |
Line 637... | Line 637... | ||
637 | 637 | ||
638 | ;¯®¨áª ¬ â¥à¨ «®¢ £à ¥© |
638 | ;¯®¨áª ¬ â¥à¨ «®¢ £à ¥© |
639 | shl edx,3 |
639 | shl edx,3 |
- | 640 | add esi,edx |
|
- | 641 | cmp esi,ecx |
|
640 | add esi,edx |
642 | jge .end_points ;¥á«¨ ¥â ¡«®ª á ¬ â¥à¨ «®¬ |
641 | cmp word[esi],CHUNK_FACEMAT |
643 | cmp word[esi],CHUNK_FACEMAT |
642 | jne .end_points |
644 | jne .end_points |
643 | mov [edi+obj_3d.mat1_data],esi |
645 | mov [edi+obj_3d.mat1_data],esi |
Line 823... | Line 825... | ||
823 | if version_edit eq 0 |
825 | if version_edit eq 0 |
824 | ;à¨á®¢ ¨¥ £à ¥© á ¨á¯®«ì§®¢ ¨¥¬ 梥⮢ ¬ â¥à¨ «®¢ |
826 | ;à¨á®¢ ¨¥ £à ¥© á ¨á¯®«ì§®¢ ¨¥¬ 梥⮢ ¬ â¥à¨ «®¢ |
825 | bt dword[draw_mode],bit_faces_mat |
827 | bt dword[draw_mode],bit_faces_mat |
826 | jnc @f |
828 | jnc @f |
827 | mov eax,[edi+obj_3d.mat1_data] |
829 | mov eax,[edi+obj_3d.mat1_data] |
- | 830 | or eax,eax |
|
- | 831 | jnz .b_found |
|
- | 832 | stdcall [buf2d_draw_text], buf_ogl, buf_1,txt_mat_null,5,3,[color_select] |
|
- | 833 | jmp .mat_null ;¥á«¨ ¥â ¬ â¥à¨ « , à¨á㥬 ¢á¥ £à ¨ ®¤¨¬ 梥⮬ |
|
828 | .b_found: |
834 | .b_found: |
829 | cmp eax,0 |
- | |
830 | je .end_points |
- | |
831 | mov ebx,eax |
835 | mov ebx,eax |
832 | stdcall get_mat_color, eax |
836 | stdcall get_mat_color, eax |
833 | stdcall draw_3d_faces_color, edi,ebx,eax |
837 | stdcall draw_3d_faces_color, edi,ebx,eax |
834 | stdcall found_mat_faces, ebx |
838 | stdcall found_mat_faces, ebx |
- | 839 | or eax,eax |
|
835 | jmp .b_found |
840 | jnz .b_found |
- | 841 | jmp .end_points |
|
- | 842 | ||
836 | @@: |
843 | @@: |
837 | end if |
844 | end if |
Line 838... | Line 845... | ||
838 | 845 | ||
839 | ;à¨á®¢ ¨¥ £à ¥© ¡¥§ 梥⮢ ¬ â¥à¨ «®¢ |
846 | ;à¨á®¢ ¨¥ £à ¥© ¡¥§ 梥⮢ ¬ â¥à¨ «®¢ |
840 | bt dword[draw_mode],bit_faces |
847 | bt dword[draw_mode],bit_faces |
- | 848 | jnc .end_triangles |
|
841 | jnc .end_triangles |
849 | .mat_null: |
842 | cmp dword[edi+obj_3d.tri_count],0 |
850 | cmp dword[edi+obj_3d.tri_count],0 |
843 | je .end_triangles |
851 | je .end_triangles |
844 | cmp dword[edi+obj_3d.poi_count],0 |
852 | cmp dword[edi+obj_3d.poi_count],0 |
845 | je .end_triangles |
853 | je .end_triangles |
Line 933... | Line 941... | ||
933 | mov edx,[edi+obj_3d.normals_poi_data] |
941 | mov edx,[edi+obj_3d.normals_poi_data] |
934 | align 4 |
942 | align 4 |
935 | @@: |
943 | @@: |
936 | bt dword[draw_mode],bit_light |
944 | bt dword[draw_mode],bit_light |
937 | jnc .norm0 |
945 | jnc .norm0 |
- | 946 | or edx,edx |
|
- | 947 | jz .norm0 ;¥á«¨ ®à¬ «¥© ¥â |
|
938 | stdcall [glNormal3fv], edx |
948 | stdcall [glNormal3fv], edx |
939 | add edx,12 |
949 | add edx,12 |
940 | .norm0: |
950 | .norm0: |
941 | stdcall [glVertex3f], [eax],[eax+4],[eax+8] |
951 | stdcall [glVertex3f], [eax],[eax+4],[eax+8] |
942 | add eax,12 |
952 | add eax,12 |
Line 975... | Line 985... | ||
975 | ;à¨á®¢ ¨¥ ¢ë¤¥«¥ëå â®ç¥ª |
985 | ;à¨á®¢ ¨¥ ¢ë¤¥«¥ëå â®ç¥ª |
976 | cmp dword[obj_poi_sel_c],0 |
986 | cmp dword[obj_poi_sel_c],0 |
977 | je .end_select |
987 | je .end_select |
978 | mov ecx,dword[obj_poi_sel_c] |
988 | mov ecx,dword[obj_poi_sel_c] |
979 | stdcall [glColor3ub],[color_select+2],[color_select+1],[color_select] |
989 | stdcall [glColor3ub],[color_select+2],[color_select+1],[color_select] |
980 | stdcall dword[tl_node_poi_get_info], tree3,0 |
990 | stdcall [tl_node_poi_get_info], tree3,0 |
981 | align 4 |
991 | align 4 |
982 | @@: |
992 | @@: |
983 | cmp eax,0 |
993 | cmp eax,0 |
984 | je .end_select |
994 | je .end_select |
985 | mov ebx,eax |
995 | mov ebx,eax |
Line 992... | Line 1002... | ||
992 | stdcall [gluSphere], [qObj], [sph_radius], 4,4 |
1002 | stdcall [gluSphere], [qObj], [sph_radius], 4,4 |
993 | stdcall [glPopMatrix] |
1003 | stdcall [glPopMatrix] |
994 | dec ecx |
1004 | dec ecx |
995 | jz .end_select |
1005 | jz .end_select |
996 | .next_sel: |
1006 | .next_sel: |
997 | stdcall dword[tl_node_poi_get_next_info], tree3,ebx |
1007 | stdcall [tl_node_poi_get_next_info], tree3,ebx |
998 | jmp @b |
1008 | jmp @b |
999 | .end_select: |
1009 | .end_select: |
1000 | end if |
1010 | end if |
Line 1001... | Line 1011... | ||
1001 | 1011 | ||
Line 1168... | Line 1178... | ||
1168 | ;input: |
1178 | ;input: |
1169 | ; p_mat - 㪠§ â¥«ì ¤ ë¥ ¯à¥¤ë¤ã饣® ¬ â¥à¨ « |
1179 | ; p_mat - 㪠§ â¥«ì ¤ ë¥ ¯à¥¤ë¤ã饣® ¬ â¥à¨ « |
1170 | align 4 |
1180 | align 4 |
1171 | proc found_mat_faces uses ebx, p_mat:dword |
1181 | proc found_mat_faces uses ebx, p_mat:dword |
1172 | mov eax,[p_mat] |
1182 | mov eax,[p_mat] |
- | 1183 | or eax,eax |
|
- | 1184 | jz @f |
|
1173 | add eax,[eax+2] |
1185 | add eax,[eax+2] |
1174 | cmp word[eax],CHUNK_FACEMAT |
1186 | cmp word[eax],CHUNK_FACEMAT |
1175 | je @f |
1187 | je @f |
1176 | xor eax,eax |
1188 | xor eax,eax |
1177 | @@: |
1189 | @@: |