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