mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[sw] Clean up a bunch of unnecessary casts
They won't affect performance, but they cluttered the code making it harder to read.
This commit is contained in:
parent
d54f146089
commit
4a917449b7
5 changed files with 8 additions and 11 deletions
|
@ -81,7 +81,7 @@ D_DrawSolidSurface (surf_t *surf, int color)
|
|||
|
||||
pix = (color << 24) | (color << 16) | (color << 8) | color;
|
||||
for (span = surf->spans; span; span = span->pnext) {
|
||||
pdest = (byte *) d_viewbuffer + screenwidth * span->v;
|
||||
pdest = d_viewbuffer + screenwidth * span->v;
|
||||
u = span->u;
|
||||
u2 = span->u + span->count - 1;
|
||||
((byte *) pdest)[u] = pix;
|
||||
|
|
|
@ -767,7 +767,7 @@ D_RasterizeAliasPolySmooth (void)
|
|||
|
||||
d_pdestbasestep = screenwidth + ubasestep;
|
||||
d_pdestextrastep = d_pdestbasestep + 1;
|
||||
d_pdest = (byte *) d_viewbuffer + ystart * screenwidth + plefttop[0];
|
||||
d_pdest = d_viewbuffer + ystart * screenwidth + plefttop[0];
|
||||
#ifdef USE_INTEL_ASM
|
||||
d_pzbasestep = (d_zwidth + ubasestep) << 1;
|
||||
d_pzextrastep = d_pzbasestep + 2;
|
||||
|
|
|
@ -141,8 +141,7 @@ Turbulent (espan_t *pspan)
|
|||
zi16stepu = d_zistepu * 16;
|
||||
|
||||
do {
|
||||
r_turb_pdest = (byte *) d_viewbuffer + (screenwidth * pspan->v) +
|
||||
pspan->u;
|
||||
r_turb_pdest = d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
|
||||
|
||||
count = pspan->count;
|
||||
|
||||
|
@ -251,7 +250,7 @@ void
|
|||
D_DrawSpans8 (espan_t *pspan)
|
||||
{
|
||||
int count, spancount;
|
||||
unsigned char *pbase, *pdest;
|
||||
byte *pbase, *pdest;
|
||||
fixed16_t s, t, snext, tnext, sstep, tstep;
|
||||
float sdivz, tdivz, zi, z, du, dv, spancountminus1;
|
||||
float sdivz8stepu, tdivz8stepu, zi8stepu;
|
||||
|
@ -266,8 +265,7 @@ D_DrawSpans8 (espan_t *pspan)
|
|||
zi8stepu = d_zistepu * 8;
|
||||
|
||||
do {
|
||||
pdest = (unsigned char *) ((byte *) d_viewbuffer +
|
||||
(screenwidth * pspan->v) + pspan->u);
|
||||
pdest = d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
|
||||
|
||||
count = pspan->count;
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void
|
|||
D_DrawSkyScans (espan_t *pspan)
|
||||
{
|
||||
int count, spancount, u, v;
|
||||
unsigned char *pdest;
|
||||
byte *pdest;
|
||||
fixed16_t s, t, snext, tnext, sstep, tstep;
|
||||
int spancountminus1;
|
||||
|
||||
|
@ -78,8 +78,7 @@ D_DrawSkyScans (espan_t *pspan)
|
|||
tnext = 0; // ditto
|
||||
|
||||
do {
|
||||
pdest = (unsigned char *) ((byte *) d_viewbuffer +
|
||||
(screenwidth * pspan->v) + pspan->u);
|
||||
pdest = d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
|
||||
|
||||
count = pspan->count;
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ D_SpriteDrawSpans (sspan_t *pspan)
|
|||
izistep = (int) (d_zistepu * 0x8000 * 0x10000);
|
||||
|
||||
do {
|
||||
pdest = (byte *) d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
|
||||
pdest = d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
|
||||
pz = d_zbuffer + (d_zwidth * pspan->v) + pspan->u;
|
||||
|
||||
count = pspan->count;
|
||||
|
|
Loading…
Reference in a new issue