Rev 8408 | 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' |
||
8442 | IgorA | 24 | include 'get.asm' |
5153 | IgorA | 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 |
||
8442 | IgorA | 55 | f_fill_tr_nl db ' lines',0 |
56 | f_zbz db ' ZB_line_z',0 |
||
57 | f_zb db ' ZB_line',0 |
||
5153 | IgorA | 58 | |
59 | buf_param rb 80 |
||
60 | |||
61 | align 4 |
||
5175 | IgorA | 62 | proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n_len:dword |
8442 | IgorA | 63 | mov esi,[str2] |
64 | mov ecx,[n_len] |
||
65 | mov edi,[str1] |
||
5153 | IgorA | 66 | stdcall str_len,edi |
67 | add edi,eax |
||
68 | cld |
||
69 | repne movsb |
||
70 | mov byte[edi],0 |
||
71 | ret |
||
72 | endp |
||
73 | |||
74 | ;input: |
||
75 | ; eax - число |
||
76 | ; edi - буфер для строки |
||
77 | ; len - длинна буфера |
||
78 | ;output: |
||
79 | align 4 |
||
80 | proc convert_int_to_str, len:dword |
||
81 | pushad |
||
82 | mov esi,[len] |
||
83 | add esi,edi |
||
84 | dec esi |
||
85 | call .str |
||
86 | popad |
||
87 | ret |
||
88 | endp |
||
89 | |||
90 | align 4 |
||
91 | .str: |
||
8069 | IgorA | 92 | mov ecx,10 |
93 | cmp eax,ecx |
||
5153 | IgorA | 94 | jb @f |
8069 | IgorA | 95 | xor edx,edx |
96 | div ecx |
||
97 | push edx |
||
98 | call .str |
||
5153 | IgorA | 99 | pop eax |
8069 | IgorA | 100 | @@: |
5153 | IgorA | 101 | cmp edi,esi |
102 | jge @f |
||
8069 | IgorA | 103 | or al,0x30 |
104 | stosb |
||
105 | mov byte[edi],0 |
||
5153 | IgorA | 106 | @@: |
8069 | IgorA | 107 | ret |
5153 | IgorA | 108 | end if |
109 | |||
5353 | IgorA | 110 | ; *** |
111 | glGetFloatv: ;(int pname, float *v) |
||
112 | |||
5153 | IgorA | 113 | align 4 |
114 | err_0 db 'Error while initializing Z buffer',13,10,0 |
||
115 | f_zb_opn db ' ZB_open',0 |
||
116 | err_1 db 'gl_malloc(sizeof.ZBuffer)==0',13,10,0 |
||
117 | err_2 db 'gl_malloc(xsize*ysize*4)==0',13,10,0 |
||
118 | err_3 db 'bit mode not correct',13,10,0 |
||
119 | err_4 db 'error while resizing display',13,10,0 |
||
120 | err_5 db 'size too small',13,10,0 |
||
6108 | IgorA | 121 | err_6 db 'unsupported option',13,10,0 |
122 | err_7 db 'assert(target == GL_TEXTURE_2D && texture >= 0)',13,10,0 |
||
123 | err_8 db 'combinaison of parameters not handled',13,10,0 |
||
124 | err_9 db 'GL_INVALID_ENUM',13,10,0 |
||
8442 | IgorA | 125 | err_glGet db 'glGet: option not implemented',0 |
5153 | IgorA | 126 | |
127 | align 4 |
||
128 | proc dbg_print, fun:dword, mes:dword |
||
129 | pushad |
||
8069 | IgorA | 130 | mov eax,SF_BOARD |
131 | mov ebx,SSF_DEBUG_WRITE |
||
5153 | IgorA | 132 | |
133 | mov esi,[fun] |
||
134 | @@: |
||
135 | mov cl,byte[esi] |
||
136 | int 0x40 |
||
137 | inc esi |
||
138 | cmp byte[esi],0 |
||
139 | jne @b |
||
140 | mov cl,':' |
||
141 | int 0x40 |
||
142 | mov cl,' ' |
||
143 | int 0x40 |
||
144 | mov esi,[mes] |
||
145 | @@: |
||
146 | mov cl,byte[esi] |
||
147 | int 0x40 |
||
148 | inc esi |
||
149 | cmp byte[esi],0 |
||
150 | jne @b |
||
151 | popad |
||
152 | ret |
||
153 | endp |
||
154 | |||
155 | align 16 |
||
156 | EXPORTS: |
||
157 | macro E_LIB n |
||
158 | { |
||
159 | dd sz_#n, n |
||
160 | } |
||
161 | include 'export.inc' |
||
162 | dd 0,0 |
||
163 | macro E_LIB n |
||
164 | { |
||
165 | sz_#n db `n,0 |
||
166 | } |
||
167 | include 'export.inc' |