Rev 6172 | Rev 6523 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6172 | Rev 6243 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | CLIP_ZMIN equ (1<<4) |
8 | CLIP_ZMIN equ (1<<4) |
9 | CLIP_ZMAX equ (1<<5) |
9 | CLIP_ZMAX equ (1<<5) |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | align 16 |
11 | align 16 |
12 | proc gl_transform_to_viewport uses eax ebx ecx, context:dword,v:dword |
- | |
13 | locals |
- | |
14 | point dd ? |
- | |
15 | endl |
12 | proc gl_transform_to_viewport uses eax ebx ecx, context:dword,v:dword |
16 | mov eax,[context] |
13 | mov eax,[context] |
Line 17... | Line 14... | ||
17 | mov ebx,[v] |
14 | mov ebx,[v] |
18 | 15 | ||
Line 62... | Line 59... | ||
62 | .end_if: |
59 | .end_if: |
Line 63... | Line 60... | ||
63 | 60 | ||
64 | ; texture |
61 | ; texture |
65 | cmp dword[eax+offs_cont_texture_2d_enabled],0 |
62 | cmp dword[eax+offs_cont_texture_2d_enabled],0 |
- | 63 | je @f |
|
66 | je @f |
64 | mov eax,[eax+offs_cont_current_texture] ;eax = &context.current_texture |
- | 65 | mov eax,[eax] ;eax = context.current_texture |
|
- | 66 | ;[eax+offs_text_images] = im = &context.current_texture.images[0] |
|
67 | mov dword[point],dword(ZB_POINT_S_MAX - ZB_POINT_S_MIN) |
67 | |
68 | fild dword[point] |
68 | fild dword[eax+offs_text_images+offs_imag_s_bound] |
69 | fmul dword[ebx+offs_vert_tex_coord] ;st0 *= v.tex_coord.X |
69 | fmul dword[ebx+offs_vert_tex_coord+offs_X] |
70 | fistp dword[ebx+offs_vert_zp+offs_zbup_s] |
70 | fistp dword[ebx+offs_vert_zp+offs_zbup_s] |
Line 71... | Line 71... | ||
71 | add dword[ebx+offs_vert_zp+offs_zbup_s],ZB_POINT_S_MIN |
71 | ;v.zp.s=(int)(v.tex_coord.X * im.s_bound) |
72 | - | ||
73 | mov dword[point],dword(ZB_POINT_T_MAX - ZB_POINT_T_MIN) |
72 | |
74 | fild dword[point] |
73 | fild dword[eax+offs_text_images+offs_imag_t_bound] |
75 | fmul dword[ebx+offs_vert_tex_coord+offs_Y] ;st0 *= v.tex_coord.Y |
74 | fmul dword[ebx+offs_vert_tex_coord+offs_Y] |
76 | fistp dword[ebx+offs_vert_zp+offs_zbup_t] |
75 | fistp dword[ebx+offs_vert_zp+offs_zbup_t] |
77 | add dword[ebx+offs_vert_zp+offs_zbup_t],ZB_POINT_T_MIN |
76 | ;v.zp.t=(int)(v.tex_coord.Y * im.t_bound) |
78 | @@: |
77 | @@: |
Line 79... | Line 78... | ||
79 | ret |
78 | ret |
Line 1040... | Line 1039... | ||
1040 | je .els_i |
1039 | je .els_i |
1041 | ;if (context.texture_2d_enabled) |
1040 | ;if (context.texture_2d_enabled) |
1042 | if PROFILE eq 1 |
1041 | if PROFILE eq 1 |
1043 | inc dword[count_triangles_textured] |
1042 | inc dword[count_triangles_textured] |
1044 | end if |
1043 | end if |
1045 | mov eax,dword[edx+offs_cont_current_texture] |
1044 | mov eax,[edx+offs_cont_current_texture] |
1046 | mov eax,[eax] ;переход по указателю |
1045 | mov eax,[eax] ;переход по указателю |
1047 | ;так как offs_text_images+offs_imag_pixmap = 0 то context.current_texture.images[0].pixmap = [eax] |
1046 | ;так как offs_text_images+offs_imag_pixmap = 0 то context.current_texture.images[0].pixmap = [eax] |
1048 | stdcall ZB_setTexture, dword[edx+offs_cont_zb],dword[eax] |
1047 | stdcall ZB_setTexture, [edx+offs_cont_zb], [eax],\ |
- | 1048 | [eax+offs_imag_s_bound],[eax+offs_imag_t_bound],[eax+offs_imag_xsize_log2] |
|
1049 | mov eax,[p0] |
1049 | mov eax,[p0] |
1050 | add eax,offs_vert_zp |
1050 | add eax,offs_vert_zp |
1051 | push ecx |
1051 | push ecx |
1052 | push ebx |
1052 | push ebx |
1053 | push eax |
1053 | push eax |