Quake II RTX doxygen
1.0 dev
|
|
#include "sw.h"
#include "adivtab.h"
Go to the source code of this file.
◆ DPS_MAXSPANS
◆ FloorDivMod()
static void FloorDivMod |
( |
float |
numer, |
|
|
float |
denom, |
|
|
int * |
quotient, |
|
|
int * |
rem |
|
) |
| |
|
static |
Definition at line 232 of file polyset.c.
238 x = floor(numer / denom);
240 r = (
int)floor(numer - (x * denom));
245 x = floor(-numer / denom);
247 r = (
int)floor(-numer - (x * denom));
Referenced by R_PolysetSetUpForLineScan().
◆ R_DrawTriangle()
◆ R_PolysetCalcGradients()
static void R_PolysetCalcGradients |
( |
int |
skinwidth | ) |
|
|
static |
Definition at line 297 of file polyset.c.
299 float xstepdenominv, ystepdenominv, t0, t1;
300 float p01_minus_p21, p11_minus_p21, p00_minus_p20, p10_minus_p20;
307 xstepdenominv = 1.0 / (float)
d_xdenom;
309 ystepdenominv = -xstepdenominv;
317 ceil((t1 * p01_minus_p21 - t0 * p11_minus_p21) * xstepdenominv);
319 ceil((t1 * p00_minus_p20 - t0 * p10_minus_p20) * ystepdenominv);
323 r_sstepx = (
int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
325 r_sstepy = (
int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
330 r_tstepx = (
int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
332 r_tstepy = (
int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
337 r_zistepx = (
int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
339 r_zistepy = (
int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
Referenced by R_RasterizeAliasPolySmooth().
◆ R_PolysetDrawSpans8_Blended()
Definition at line 348 of file polyset.c.
371 lpdest = pspanpackage->
pdest;
372 lptex = pspanpackage->
ptex;
373 lpz = pspanpackage->
pz;
374 lsfrac = pspanpackage->
sfrac;
375 ltfrac = pspanpackage->
tfrac;
376 llight = pspanpackage->
light;
377 lzi = pspanpackage->
zi;
380 if ((lzi >> 16) >= *lpz) {
384 if (tmp[0] > 255) tmp[0] = 255;
385 if (tmp[1] > 255) tmp[1] = 255;
386 if (tmp[2] > 255) tmp[2] = 255;
387 tmp[0] = (lptex[0] * tmp[0]) >> 8;
388 tmp[1] = (lptex[1] * tmp[1]) >> 8;
389 tmp[2] = (lptex[2] * tmp[2]) >> 8;
404 if (ltfrac & 0x10000) {
412 }
while (pspanpackage->
count != -999999);
Referenced by R_AliasSetupBlend().
◆ R_PolysetDrawSpans8_Opaque()
Definition at line 454 of file polyset.c.
478 lpdest = pspanpackage->
pdest;
479 lptex = pspanpackage->
ptex;
480 lpz = pspanpackage->
pz;
481 lsfrac = pspanpackage->
sfrac;
482 ltfrac = pspanpackage->
tfrac;
483 llight = pspanpackage->
light;
484 lzi = pspanpackage->
zi;
487 if ((lzi >> 16) >= *lpz) {
491 if (tmp[0] > 255) tmp[0] = 255;
492 if (tmp[1] > 255) tmp[1] = 255;
493 if (tmp[2] > 255) tmp[2] = 255;
494 lpdest[0] = (lptex[2] * tmp[2]) >> 8;
495 lpdest[1] = (lptex[1] * tmp[1]) >> 8;
496 lpdest[2] = (lptex[0] * tmp[0]) >> 8;
508 if (ltfrac & 0x10000) {
516 }
while (pspanpackage->
count != -999999);
Referenced by R_AliasSetupBlend().
◆ R_PolysetDrawSpansConstant8_Blended()
Definition at line 415 of file polyset.c.
434 lpdest = pspanpackage->
pdest;
435 lpz = pspanpackage->
pz;
436 lzi = pspanpackage->
zi;
439 if ((lzi >> 16) >= *lpz) {
451 }
while (pspanpackage->
count != -999999);
Referenced by R_AliasSetupBlend().
◆ R_PolysetScanLeftEdge()
static void R_PolysetScanLeftEdge |
( |
int |
height | ) |
|
|
static |
◆ R_PolysetSetEdgeTable()
static void R_PolysetSetEdgeTable |
( |
void |
| ) |
|
|
static |
◆ R_PolysetSetUpAndScanLeftEdge()
static void R_PolysetSetUpAndScanLeftEdge |
( |
int * |
plefttop, |
|
|
int * |
pleftbottom |
|
) |
| |
|
static |
◆ R_PolysetSetUpForLineScan()
static void R_PolysetSetUpForLineScan |
( |
fixed8_t |
startvertu, |
|
|
fixed8_t |
startvertv, |
|
|
fixed8_t |
endvertu, |
|
|
fixed8_t |
endvertv |
|
) |
| |
|
static |
◆ R_RasterizeAliasPolySmooth()
static void R_RasterizeAliasPolySmooth |
( |
void |
| ) |
|
|
static |
Definition at line 595 of file polyset.c.
597 int initialrightheight;
598 int *plefttop, *prighttop, *pleftbottom, *prightbottom;
608 initialrightheight = prightbottom[1] - prighttop[1];
633 plefttop = pleftbottom;
646 prightbottom[0], prightbottom[1]);
658 pstart =
a_spans + initialrightheight;
659 pstart->
count = originalcount;
663 prighttop = prightbottom;
666 height = prightbottom[1] - prighttop[1];
669 prightbottom[0], prightbottom[1]);
673 (*d_pdrawspans)(pstart);
Referenced by R_DrawTriangle().
◆ a_spans
◆ a_sstepxfrac
◆ a_ststepxwhole
◆ a_tstepxfrac
◆ adivtab
◆ aliastriangleparms
◆ d_aspancount
◆ d_countextrastep
◆ d_light
◆ d_lightbasestep
◆ d_lightextrastep
◆ d_pdest
◆ d_pdestbasestep
◆ d_pdestextrastep
◆ d_pdrawspans
◆ d_pedgespanpackage
◆ d_ptex
◆ d_ptexbasestep
◆ d_ptexextrastep
◆ d_pz
◆ d_pzbasestep
◆ d_pzextrastep
◆ d_sfrac
◆ d_sfracbasestep
◆ d_sfracextrastep
◆ d_tfrac
◆ d_tfracbasestep
◆ d_tfracextrastep
◆ d_xdenom
◆ d_zi
◆ d_zibasestep
◆ d_ziextrastep
◆ edgetables
◆ erroradjustdown
◆ erroradjustup
◆ errorterm
◆ pedgetable
◆ r_lstepx
◆ r_lstepy
◆ r_p0
◆ r_p1
◆ r_p2
◆ r_sstepx
◆ r_sstepy
◆ r_tstepx
◆ r_tstepy
◆ r_zistepx
◆ r_zistepy
◆ ubasestep
static int d_countextrastep
static void R_PolysetScanLeftEdge(int height)
static int d_sfracextrastep
static int d_ptexbasestep
static void R_PolysetSetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv, fixed8_t endvertu, fixed8_t endvertv)
static int erroradjustdown
fixed8_t r_aliasblendcolor[3]
static void R_RasterizeAliasPolySmooth(void)
static const edgetable_t * pedgetable
static const edgetable_t edgetables[12]
static int d_lightbasestep
static int a_ststepxwhole
static int d_pdestextrastep
static const adivtab_t adivtab[32 *32]
static spanpackage_t * d_pedgespanpackage
static void R_PolysetSetUpAndScanLeftEdge(int *plefttop, int *pleftbottom)
byte * d_spantable[MAXHEIGHT]
static spanpackage_t * a_spans
static int d_tfracextrastep
short * d_zspantable[MAXHEIGHT]
static int d_sfracbasestep
static void R_PolysetCalcGradients(int skinwidth)
static int d_lightextrastep
static int d_pdestbasestep
int r_alias_one_minus_alpha
static int d_ptexextrastep
affinetridesc_t r_affinetridesc
CONST PIXELFORMATDESCRIPTOR int
static int d_tfracbasestep
aliastriangleparms_t aliastriangleparms
static void FloorDivMod(float numer, float denom, int *quotient, int *rem)
static void R_PolysetSetEdgeTable(void)