1 ; $Header: x:/prj/tech/libsrc/g2/RCS/ptlinear.asm 1.2 1998/03/23 14:56:29 KEVIN Exp $
3 ; PORTAL Texture Mappers
7 ; linear outer (per 8 pixel) loops
20 assume cs:_TEXT
, ds:_DATA
35 _DATA
segment dword public USE32
'DATA'
54 _TEXT
segment para
public USE32
'CODE'
57 ;extn g2ptmap_flat_run_
58 ;extn g2ptmap_lit_run_
59 ;extn g2ptmap_setup_uv
60 extn g2ptmap_setup_duv
61 extn g2ptmap_setup_uvduv
62 extn g2pt_compute_light_n
63 extn g2pt_compute_light_8
69 _FUNCDEF g2ptmap_affine_duv
,2
93 _FUNCDEF g2ptmap_run
,4
109 ; check if whole thing is short
112 jg pr_handle_long_case
124 ; now pick up a leading run of 1-7 pixels
125 ; the length is equal to 8-(edi&7), except
126 ; we want 0 if edi&7 is 0. This is just
136 ; stuff length of leading run
138 sub pixel_count
,ecx ; SLOW!
164 jz pr_no_trailing_run
179 ; This has two entry points,
180 ; one for C and one for assembly.
182 ; This is broken under MSVC, cause it
183 ; takes 6 parameters. Can we not change
184 ; this calling convention, like CDECL it
185 ; or pass in a structure pointer or something
186 ; or even write a separate entry point
187 ; for MSVC and ifdef it?
188 ; BROKEN BROKEN BROKEN
205 _FUNCDEF g2ptmap_lit_run
,4
218 jg pl_handle_long_case
220 call g2pt_compute_light_n
222 mov edx,save_edx
; du,dv
234 ; now pick up a leading run of 1-7 pixels
235 ; the length is equal to 8-(edi&7), except
236 ; we want 0 if edi&7 is 0. This is just
246 ; stuff length of leading run
248 sub pixel_count
,ecx ; SLOW!
249 call g2pt_compute_light_n
269 call g2pt_compute_light_8
286 jz pl_no_trailing_run
288 call g2pt_compute_light_n