12
EXTRN _centeryclipped:DWORD
15
EXTRN _dc_iscale:DWORD
16
EXTRN _dc_texturemid:DWORD
18
;EXTRN _dc_firstsource:DWORD
19
EXTRN _dc_source:DWORD
20
EXTRN _shadingtable:DWORD
36
add edi,[_ylookup+ebx*4]
39
sub eax,ebp ; pixel count
40
mov [pixelcount],eax ; save for final pixel
41
js done ; nothing to scale
42
shr eax,1 ; double pixel count
50
mov ebp,[_dc_texturemid]
57
mov eax,OFFSET patch1+2 ; convice tasm to modify code...
59
mov eax,OFFSET patch2+2 ; convice tasm to modify code...
62
; eax aligned colormap
63
; ebx aligned colormap
66
; edi moving destination pointer
69
mov ecx,ebp ; begin calculating first pixel
70
add ebp,ebx ; advance frac pointer
71
shr ecx,16 ; finish calculation for first pixel
72
mov edx,ebp ; begin calculating second pixel
73
add ebp,ebx ; advance frac pointer
74
shr edx,16 ; finish calculation for second pixel
75
mov eax,[_shadingtable]
77
;mov [_dc_firstsource],esi
78
;add [_dc_firstsource],ecx
79
mov al,[esi+ecx] ; get first pixel
80
mov bl,[esi+edx] ; get second pixel
81
mov al,[eax] ; color translate first pixel
82
mov bl,[ebx] ; color translate second pixel
84
test [pixelcount],0fffffffeh
85
jnz doubleloop ; at least two pixels to map
90
mov ecx,ebp ; begin calculating third pixel
92
add ebp,12345678h ; advance frac pointer
93
mov [edi],al ; write first pixel
94
shr ecx,16 ; finish calculation for third pixel
95
mov edx,ebp ; begin calculating fourth pixel
97
add ebp,12345678h ; advance frac pointer
98
mov [edi+SCREENWIDTH],bl ; write second pixel
99
shr edx,16 ; finish calculation for fourth pixel
100
mov al,[esi+ecx] ; get third pixel
101
add edi,SCREENWIDTH*2 ; advance to third pixel destination
102
mov bl,[esi+edx] ; get fourth pixel
103
dec [loopcount] ; done with loop?
104
mov al,[eax] ; color translate third pixel
105
mov bl,[ebx] ; color translate fourth pixel
108
; check for final pixel
112
mov [edi],al ; write final pixel
125
PROC R_DrawSolidColumn_
126
PUBLIC R_DrawSolidColumn_
129
add edi,[_ylookup+eax*4]
132
sub eax,ecx ; pixel count
133
mov [pixelcount],eax ; save for final pixel
134
js soliddone ; nothing to scale
135
shr eax,1 ; double pixel count
138
test [pixelcount],0fffffffeh
139
jnz soliddoubleloop ; at least two pixels to map
144
mov [edi],bl ; write first pixel
145
add edi,SCREENWIDTH ; advance to third pixel destination
146
mov [edi],bl ; write second pixel
147
add edi,SCREENWIDTH ; advance to fourth pixel destination
148
dec [loopcount] ; done with loop?
151
; check for final pixel
155
mov [edi],bl ; write final pixel
168
PUBLIC R_TransColumn_
171
add edi,[_ylookup+ebx*4]
173
sub eax,ebx ; pixel count
174
mov [pixelcount],eax ; save for final pixel
175
js tdone ; nothing to scale
176
shr eax,1 ; double pixel count
179
; eax aligned colormap
180
; ebx aligned colormap
181
; esi moving destination pointer
182
; edi moving destination pointer
184
mov eax,[_shadingtable]
188
mov al,[BYTE PTR edi] ; get first pixel
189
mov bl,[BYTE PTR esi] ; get second pixel
190
mov al,[BYTE PTR eax] ; color translate first pixel
191
mov bl,[BYTE PTR ebx] ; color translate second pixel
193
test [pixelcount],0fffffffeh
194
jnz tdoubleloop ; at least two pixels to map
199
mov [edi],al ; write first pixel
200
mov [esi],bl ; write second pixel
201
add edi,SCREENWIDTH*2 ; advance to third pixel destination
202
add esi,SCREENWIDTH*2 ; advance to third pixel destination
203
mov al,[edi] ; get third pixel
204
mov bl,[esi] ; get fourth pixel
205
mov al,[eax] ; color translate third pixel
206
dec [loopcount] ; done with loop?
207
mov bl,[ebx] ; color translate fourth pixel
210
; check for final pixel
214
mov [edi],al ; write final pixel
229
; R_DrawClippedColumn
232
PROC R_DrawClippedColumn_
233
PUBLIC R_DrawClippedColumn_
237
add edi,[_ylookup+ebx*4]
240
sub eax,ebp ; pixel count
241
mov [pixelcount],eax ; save for final pixel
242
js adone ; nothing to scale
243
shr eax,1 ; double pixel count
248
mov eax,[_centeryclipped]
251
mov ebp,[_dc_texturemid]
258
mov eax,OFFSET apatch1+2 ; convice tasm to modify code...
260
mov eax,OFFSET apatch2+2 ; convice tasm to modify code...
263
; eax aligned colormap
264
; ebx aligned colormap
267
; edi moving destination pointer
270
mov ecx,ebp ; begin calculating first pixel
271
add ebp,ebx ; advance frac pointer
272
shr ecx,16 ; finish calculation for first pixel
273
mov edx,ebp ; begin calculating second pixel
274
add ebp,ebx ; advance frac pointer
275
shr edx,16 ; finish calculation for second pixel
276
mov eax,[_shadingtable]
278
mov al,[esi+ecx] ; get first pixel
279
mov bl,[esi+edx] ; get second pixel
280
mov al,[eax] ; color translate first pixel
281
mov bl,[ebx] ; color translate second pixel
283
test [pixelcount],0fffffffeh
284
jnz adoubleloop ; at least two pixels to map
289
mov ecx,ebp ; begin calculating third pixel
291
add ebp,12345678h ; advance frac pointer
292
mov [edi],al ; write first pixel
293
shr ecx,16 ; finish calculation for third pixel
294
mov edx,ebp ; begin calculating fourth pixel
296
add ebp,12345678h ; advance frac pointer
297
mov [edi+SCREENWIDTH],bl ; write second pixel
298
shr edx,16 ; finish calculation for fourth pixel
299
mov al,[esi+ecx] ; get third pixel
300
add edi,SCREENWIDTH*2 ; advance to third pixel destination
301
mov bl,[esi+edx] ; get fourth pixel
302
dec [loopcount] ; done with loop?
303
mov al,[eax] ; color translate third pixel
304
mov bl,[ebx] ; color translate fourth pixel
307
; check for final pixel
311
mov [edi],al ; write final pixel
324
PROC R_DrawWallColumn_
325
PUBLIC R_DrawWallColumn_
329
add edi,[_ylookup+ebx*4]
332
sub eax,ebp ; pixel count
333
mov [pixelcount],eax ; save for final pixel
334
js wcdone ; nothing to scale
335
shr eax,1 ; double pixel count
343
mov ebp,[_dc_texturemid]
352
mov eax,OFFSET wcpatch1+2 ; convice tasm to modify code...
354
mov eax,OFFSET wcpatch2+2 ; convice tasm to modify code...
357
; eax aligned colormap
358
; ebx aligned colormap
361
; edi moving destination pointer
364
mov ecx,ebp ; begin calculating first pixel
365
add ebp,ebx ; advance frac pointer
366
shr ecx,26 ; finish calculation for first pixel
367
mov edx,ebp ; begin calculating second pixel
369
add ebp,ebx ; advance frac pointer
370
shr edx,26 ; finish calculation for second pixel
371
mov eax,[_shadingtable]
374
mov al,[esi+ecx] ; get first pixel
375
mov bl,[esi+edx] ; get second pixel
376
mov al,[eax] ; color translate first pixel
377
mov bl,[ebx] ; color translate second pixel
379
test [pixelcount],0fffffffeh
380
jnz wcdoubleloop ; at least two pixels to map
385
mov ecx,ebp ; begin calculating third pixel
387
add ebp,12345678h ; advance frac pointer
388
mov [edi],al ; write first pixel
389
shr ecx,26 ; finish calculation for third pixel
390
mov edx,ebp ; begin calculating fourth pixel
393
add ebp,12345678h ; advance frac pointer
394
mov [edi+SCREENWIDTH],bl ; write second pixel
395
shr edx,26 ; finish calculation for fourth pixel
396
mov al,[esi+ecx] ; get third pixel
398
add edi,SCREENWIDTH*2 ; advance to third pixel destination
399
mov bl,[esi+edx] ; get fourth pixel
400
dec [loopcount] ; done with loop?
401
mov al,[eax] ; color translate third pixel
402
mov bl,[ebx] ; color translate fourth pixel
405
; check for final pixel
409
mov [edi],al ; write final pixel