mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 22:05:20 -04:00
minor code clean-up
This commit is contained in:
parent
33af43d5ba
commit
a1ae302ca7
@ -2375,7 +2375,7 @@ byte *G_ReadOptions(byte *demo_p)
|
||||
for (i=0; i < COMP_TOTAL; i++)
|
||||
comp[i] = compatibility;
|
||||
|
||||
// [FG] Boom did never have the 3-key door bug
|
||||
// [FG] Boom never had the 3-key door bug
|
||||
comp[comp_3keydoor] = 1;
|
||||
|
||||
monster_infighting = 1; // killough 7/19/98
|
||||
|
@ -479,15 +479,15 @@ void R_DrawSpan (void)
|
||||
unsigned spot;
|
||||
unsigned xtemp;
|
||||
unsigned ytemp;
|
||||
|
||||
|
||||
source = ds_source;
|
||||
colormap = ds_colormap;
|
||||
dest = ylookup[ds_y] + columnofs[ds_x1];
|
||||
count = ds_x2 - ds_x1 + 1;
|
||||
|
||||
// [FG] fix flat distortion towards the right of the screen
|
||||
while (count >= 4)
|
||||
{
|
||||
// [FG] fix flat distortion towards the right of the screen
|
||||
ytemp = (ds_yfrac >> 10) & 0x0FC0;
|
||||
xtemp = (ds_xfrac >> 16) & 0x003F;
|
||||
spot = xtemp | ytemp;
|
||||
|
@ -214,7 +214,7 @@ angle_t R_PointToAngleCrispy(fixed_t x, fixed_t y)
|
||||
ANG270+tantoangle[SlopeDivCrispy(x,y)] : // octant 7
|
||||
y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDivCrispy(y,x)] : // octant 3
|
||||
ANG90 + tantoangle[SlopeDivCrispy(x,y)] : // octant 2
|
||||
(x = -x) > (y = -y) ? ANG180+tantoangle[ SlopeDivCrispy(y,x)] : // octant 4
|
||||
(x = -x) > (y = -y) ? ANG180+tantoangle[SlopeDivCrispy(y,x)] : // octant 4
|
||||
ANG270-1-tantoangle[SlopeDivCrispy(x,y)] : // octant 5
|
||||
0;
|
||||
}
|
||||
|
@ -365,24 +365,6 @@ static void R_RenderSegLoop (void)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// killough 5/2/98: move from r_main.c, made static, simplified
|
||||
|
||||
static fixed_t R_PointToDist(fixed_t x, fixed_t y)
|
||||
{
|
||||
fixed_t dx = abs(x - viewx);
|
||||
fixed_t dy = abs(y - viewy);
|
||||
if (dy > dx)
|
||||
{
|
||||
fixed_t t = dx;
|
||||
dx = dy;
|
||||
dy = t;
|
||||
}
|
||||
return dx ? FixedDiv(dx, finesine[(tantoangle[FixedDiv(dy,dx) >> DBITS]
|
||||
+ ANG90) >> ANGLETOFINESHIFT]) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// R_StoreWallRange
|
||||
// A wall segment will be drawn
|
||||
|
@ -386,7 +386,6 @@ static patch_t** lnames;
|
||||
// [FG] number of level name graphics
|
||||
static int num_lnames;
|
||||
|
||||
|
||||
//
|
||||
// CODE
|
||||
//
|
||||
@ -428,7 +427,7 @@ static void WI_drawLF(void)
|
||||
int y = WI_TITLEY;
|
||||
|
||||
// [FG] prevent crashes for levels without name graphics
|
||||
if (wbs->last < num_lnames && lnames[wbs->last])
|
||||
if (wbs->last < num_lnames)
|
||||
{
|
||||
// draw <LevelName>
|
||||
V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2,
|
||||
@ -458,7 +457,7 @@ static void WI_drawEL(void)
|
||||
y, FB, entering);
|
||||
|
||||
// [FG] prevent crashes for levels without name graphics
|
||||
if (wbs->next < num_lnames && lnames[wbs->next])
|
||||
if (wbs->next < num_lnames)
|
||||
{
|
||||
// draw level
|
||||
y += (5*SHORT(lnames[wbs->next]->height))/4;
|
||||
@ -1850,8 +1849,7 @@ static void WI_loadData(void)
|
||||
for (i=0 ; i<NUMCMAPS ; i++)
|
||||
{
|
||||
snprintf(name, sizeof(name), "CWILV%2.2d", i);
|
||||
// [FG] prevent crashes for levels without name graphics
|
||||
lnames[i] = W_CheckNumForName(name) > -1 ? W_CacheLumpName(name, PU_STATIC) : NULL;
|
||||
lnames[i] = W_CacheLumpName(name, PU_STATIC);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1861,8 +1859,7 @@ static void WI_loadData(void)
|
||||
for (i=0 ; i<NUMMAPS ; i++)
|
||||
{
|
||||
sprintf(name, "WILV%d%d", wbs->epsd, i);
|
||||
// [FG] prevent crashes for levels without name graphics
|
||||
lnames[i] = W_CheckNumForName(name) > -1 ? W_CacheLumpName(name, PU_STATIC) : NULL;
|
||||
lnames[i] = W_CacheLumpName(name, PU_STATIC);
|
||||
}
|
||||
|
||||
// you are here
|
||||
|
Loading…
x
Reference in New Issue
Block a user