Rev 8408 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8408 | Rev 8442 | ||
---|---|---|---|
1 | format MS COFF |
1 | format MS COFF |
2 | public EXPORTS |
2 | public EXPORTS |
3 | section '.flat' code readable align 16 |
3 | section '.flat' code readable align 16 |
4 | 4 | ||
5 | include '../../../../proc32.inc' |
5 | include '../../../../proc32.inc' |
6 | include '../../../../macros.inc' |
6 | include '../../../../macros.inc' |
7 | include '../../../../KOSfuncs.inc' |
7 | include '../../../../KOSfuncs.inc' |
8 | 8 | ||
9 | DEBUG equ 0 |
9 | DEBUG equ 0 |
10 | 10 | ||
11 | include 'zgl.inc' |
11 | include 'zgl.inc' |
12 | include 'zmath.asm' |
12 | include 'zmath.asm' |
13 | include 'clip.asm' |
13 | include 'clip.asm' |
14 | include 'vertex.asm' |
14 | include 'vertex.asm' |
15 | include 'api.asm' |
15 | include 'api.asm' |
16 | include 'list.asm' ;gl_add_op |
16 | include 'list.asm' ;gl_add_op |
17 | include 'init.asm' |
17 | include 'init.asm' |
18 | include 'matrix.asm' ;gl_print_matrix |
18 | include 'matrix.asm' ;gl_print_matrix |
19 | include 'texture.asm' |
19 | include 'texture.asm' |
20 | include 'misc.asm' |
20 | include 'misc.asm' |
21 | include 'clear.asm' |
21 | include 'clear.asm' |
22 | include 'light.asm' |
22 | include 'light.asm' |
23 | include 'select.asm' |
23 | include 'select.asm' |
24 | ;include 'get.asm' |
24 | include 'get.asm' |
25 | ;include 'error.asm' |
25 | ;include 'error.asm' |
26 | include 'zbuffer.asm' |
26 | include 'zbuffer.asm' |
27 | include 'zline.asm' |
27 | include 'zline.asm' |
28 | ;include 'zdither.asm' |
28 | ;include 'zdither.asm' |
29 | include 'ztriangle.asm' |
29 | include 'ztriangle.asm' |
30 | include 'image_util.asm' |
30 | include 'image_util.asm' |
31 | ;include 'msghandling.asm' |
31 | ;include 'msghandling.asm' |
32 | include 'arrays.asm' |
32 | include 'arrays.asm' |
33 | include 'specbuf.asm' |
33 | include 'specbuf.asm' |
34 | 34 | ||
35 | include 'kosgl.asm' |
35 | include 'kosgl.asm' |
36 | include 'glu.asm' |
36 | include 'glu.asm' |
37 | 37 | ||
38 | if DEBUG |
38 | if DEBUG |
39 | include 'info_fun_float.inc' |
39 | include 'info_fun_float.inc' |
40 | 40 | ||
41 | align 4 |
41 | align 4 |
42 | txt_nl db 13,10,0 |
42 | txt_nl db 13,10,0 |
43 | txt_sp db ' ',0 |
43 | txt_sp db ' ',0 |
44 | txt_op db 'Op_code',0 |
44 | txt_op db 'Op_code',0 |
45 | txt_zp_sp db ', ',0 |
45 | txt_zp_sp db ', ',0 |
46 | m_1 db '(1)',13,10,0 |
46 | m_1 db '(1)',13,10,0 |
47 | m_2 db '(2)',13,10,0 |
47 | m_2 db '(2)',13,10,0 |
48 | m_3 db '(3)',13,10,0 |
48 | m_3 db '(3)',13,10,0 |
49 | m_4 db '(4)',13,10,0 |
49 | m_4 db '(4)',13,10,0 |
50 | m_5 db '(5)',13,10,0 |
50 | m_5 db '(5)',13,10,0 |
51 | m_6 db '(6)',13,10,0 |
51 | m_6 db '(6)',13,10,0 |
52 | m_7 db '(7)',13,10,0 |
52 | m_7 db '(7)',13,10,0 |
53 | m_8 db '(8)',13,10,0 |
53 | m_8 db '(8)',13,10,0 |
54 | m_9 db '(9)',13,10,0 |
54 | m_9 db '(9)',13,10,0 |
- | 55 | f_fill_tr_nl db ' lines',0 |
|
- | 56 | f_zbz db ' ZB_line_z',0 |
|
- | 57 | f_zb db ' ZB_line',0 |
|
55 | 58 | ||
56 | buf_param rb 80 |
59 | buf_param rb 80 |
57 | 60 | ||
58 | align 4 |
61 | align 4 |
59 | proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n_len:dword |
62 | proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n_len:dword |
60 | mov esi,dword[str2] |
63 | mov esi,[str2] |
61 | mov ecx,dword[n_len] |
64 | mov ecx,[n_len] |
62 | mov edi,dword[str1] |
65 | mov edi,[str1] |
63 | stdcall str_len,edi |
66 | stdcall str_len,edi |
64 | add edi,eax |
67 | add edi,eax |
65 | cld |
68 | cld |
66 | repne movsb |
69 | repne movsb |
67 | mov byte[edi],0 |
70 | mov byte[edi],0 |
68 | ret |
71 | ret |
69 | endp |
72 | endp |
70 | 73 | ||
71 | ;input: |
74 | ;input: |
72 | ; eax - число |
75 | ; eax - число |
73 | ; edi - буфер для строки |
76 | ; edi - буфер для строки |
74 | ; len - длинна буфера |
77 | ; len - длинна буфера |
75 | ;output: |
78 | ;output: |
76 | align 4 |
79 | align 4 |
77 | proc convert_int_to_str, len:dword |
80 | proc convert_int_to_str, len:dword |
78 | pushad |
81 | pushad |
79 | mov esi,[len] |
82 | mov esi,[len] |
80 | add esi,edi |
83 | add esi,edi |
81 | dec esi |
84 | dec esi |
82 | call .str |
85 | call .str |
83 | popad |
86 | popad |
84 | ret |
87 | ret |
85 | endp |
88 | endp |
86 | 89 | ||
87 | align 4 |
90 | align 4 |
88 | .str: |
91 | .str: |
89 | mov ecx,10 |
92 | mov ecx,10 |
90 | cmp eax,ecx |
93 | cmp eax,ecx |
91 | jb @f |
94 | jb @f |
92 | xor edx,edx |
95 | xor edx,edx |
93 | div ecx |
96 | div ecx |
94 | push edx |
97 | push edx |
95 | call .str |
98 | call .str |
96 | pop eax |
99 | pop eax |
97 | @@: |
100 | @@: |
98 | cmp edi,esi |
101 | cmp edi,esi |
99 | jge @f |
102 | jge @f |
100 | or al,0x30 |
103 | or al,0x30 |
101 | stosb |
104 | stosb |
102 | mov byte[edi],0 |
105 | mov byte[edi],0 |
103 | @@: |
106 | @@: |
104 | ret |
107 | ret |
105 | end if |
108 | end if |
106 | 109 | ||
107 | ; *** |
110 | ; *** |
108 | glColor3d: ;(double ,double ,double) |
- | |
109 | glColor3dv: ;(double *) |
- | |
110 | glColor4d: ;(double ,double ,double, double ) |
- | |
111 | glColor4dv: ;(double *) |
- | |
112 | glNormal3d: ;(double ,double ,double) |
- | |
113 | glNormal3dv: ;(double *) |
- | |
114 | glTexCoord1f: ;(float) |
- | |
115 | glTexCoord1d: ;(double) |
- | |
116 | glTexCoord1fv: ;(float *) |
- | |
117 | glTexCoord1dv: ;(double *) |
- | |
118 | glTexCoord2d: ;(double ,double) |
- | |
119 | glTexCoord2dv: ;(double *) |
- | |
120 | glTexCoord3f: ;(float ,float ,float) |
- | |
121 | glTexCoord3d: ;(double ,double ,double) |
- | |
122 | glTexCoord3fv: ;(float *) |
- | |
123 | glTexCoord3dv: ;(double *) |
- | |
124 | glTexCoord4d: ;(double ,double ,double, double ) |
- | |
125 | glTexCoord4fv: ;(float *) |
- | |
126 | glTexCoord4dv: ;(double *) |
- | |
127 | glGetIntegerv: ;(int pname,int *params) |
- | |
128 | glGetFloatv: ;(int pname, float *v) |
111 | glGetFloatv: ;(int pname, float *v) |
129 | 112 | ||
130 | align 4 |
113 | align 4 |
131 | err_0 db 'Error while initializing Z buffer',13,10,0 |
114 | err_0 db 'Error while initializing Z buffer',13,10,0 |
132 | f_zb_opn db ' ZB_open',0 |
115 | f_zb_opn db ' ZB_open',0 |
133 | err_1 db 'gl_malloc(sizeof.ZBuffer)==0',13,10,0 |
116 | err_1 db 'gl_malloc(sizeof.ZBuffer)==0',13,10,0 |
134 | err_2 db 'gl_malloc(xsize*ysize*4)==0',13,10,0 |
117 | err_2 db 'gl_malloc(xsize*ysize*4)==0',13,10,0 |
135 | err_3 db 'bit mode not correct',13,10,0 |
118 | err_3 db 'bit mode not correct',13,10,0 |
136 | err_4 db 'error while resizing display',13,10,0 |
119 | err_4 db 'error while resizing display',13,10,0 |
137 | err_5 db 'size too small',13,10,0 |
120 | err_5 db 'size too small',13,10,0 |
138 | err_6 db 'unsupported option',13,10,0 |
121 | err_6 db 'unsupported option',13,10,0 |
139 | err_7 db 'assert(target == GL_TEXTURE_2D && texture >= 0)',13,10,0 |
122 | err_7 db 'assert(target == GL_TEXTURE_2D && texture >= 0)',13,10,0 |
140 | err_8 db 'combinaison of parameters not handled',13,10,0 |
123 | err_8 db 'combinaison of parameters not handled',13,10,0 |
141 | err_9 db 'GL_INVALID_ENUM',13,10,0 |
124 | err_9 db 'GL_INVALID_ENUM',13,10,0 |
142 | f_zbz db ' ZB_line_z',0 |
- | |
143 | f_zb db ' ZB_line',0 |
- | |
144 | f_find_l db 'find_list',0 |
- | |
145 | f_alloc_l db 'alloc_list',0 |
- | |
146 | f_fill_tr db 'ZB_fillTriangle...',0 |
125 | err_glGet db 'glGet: option not implemented',0 |
147 | f_fill_tr_nl db ' lines',0 |
- | |
148 | f_fill_tr_nll db ' len',0 |
- | |
149 | 126 | ||
150 | align 4 |
127 | align 4 |
151 | proc dbg_print, fun:dword, mes:dword |
128 | proc dbg_print, fun:dword, mes:dword |
152 | pushad |
129 | pushad |
153 | mov eax,SF_BOARD |
130 | mov eax,SF_BOARD |
154 | mov ebx,SSF_DEBUG_WRITE |
131 | mov ebx,SSF_DEBUG_WRITE |
155 | 132 | ||
156 | mov esi,[fun] |
133 | mov esi,[fun] |
157 | @@: |
134 | @@: |
158 | mov cl,byte[esi] |
135 | mov cl,byte[esi] |
159 | int 0x40 |
136 | int 0x40 |
160 | inc esi |
137 | inc esi |
161 | cmp byte[esi],0 |
138 | cmp byte[esi],0 |
162 | jne @b |
139 | jne @b |
163 | mov cl,':' |
140 | mov cl,':' |
164 | int 0x40 |
141 | int 0x40 |
165 | mov cl,' ' |
142 | mov cl,' ' |
166 | int 0x40 |
143 | int 0x40 |
167 | mov esi,[mes] |
144 | mov esi,[mes] |
168 | @@: |
145 | @@: |
169 | mov cl,byte[esi] |
146 | mov cl,byte[esi] |
170 | int 0x40 |
147 | int 0x40 |
171 | inc esi |
148 | inc esi |
172 | cmp byte[esi],0 |
149 | cmp byte[esi],0 |
173 | jne @b |
150 | jne @b |
174 | popad |
151 | popad |
175 | ret |
152 | ret |
176 | endp |
153 | endp |
177 | 154 | ||
178 | align 16 |
155 | align 16 |
179 | EXPORTS: |
156 | EXPORTS: |
180 | macro E_LIB n |
157 | macro E_LIB n |
181 | { |
158 | { |
182 | dd sz_#n, n |
159 | dd sz_#n, n |
183 | } |
160 | } |
184 | include 'export.inc' |
161 | include 'export.inc' |
185 | dd 0,0 |
162 | dd 0,0 |
186 | macro E_LIB n |
163 | macro E_LIB n |
187 | { |
164 | { |
188 | sz_#n db `n,0 |
165 | sz_#n db `n,0 |
189 | } |
166 | } |
190 | include 'export.inc' |
167 | include 'export.inc' |