mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- sector[tspr->sectnum] globally replaced.
This commit is contained in:
parent
02ef323086
commit
2aefe4398b
5 changed files with 23 additions and 23 deletions
|
@ -1360,7 +1360,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
continue;
|
||||
|
||||
int palid = TRANSLATION(Translation_Remap + curbasepal, globalpal);
|
||||
GLInterface.SetFade(sector[tspr->sectnum].floorpal);
|
||||
GLInterface.SetFade(tspr->sector()->floorpal);
|
||||
GLInterface.SetTexture(tex, palid, CLAMP_XY);
|
||||
|
||||
if (tspr->clipdist & TSPR_FLAGS_MDHACK)
|
||||
|
|
|
@ -2633,7 +2633,7 @@ void polymost_deletesprite(int num)
|
|||
static inline int32_t polymost_findwall(tspritetype const * const tspr, vec2_t const * const tsiz, int32_t * rd)
|
||||
{
|
||||
int32_t dist = 4, closest = -1;
|
||||
auto const sect = §or[tspr->sectnum];
|
||||
auto const sect = tspr->sector();
|
||||
vec2_t n;
|
||||
|
||||
for (intptr_t i=sect->wallptr; i<sect->wallptr + sect->wallnum; i++)
|
||||
|
@ -2716,7 +2716,7 @@ void polymost_drawsprite(int32_t snum)
|
|||
globalpicnum = tspr->picnum;
|
||||
globalshade = tspr->shade;
|
||||
globalpal = tspr->pal;
|
||||
globalfloorpal = sector[tspr->sectnum].floorpal;
|
||||
globalfloorpal = tspr->sector()->floorpal;
|
||||
globalorientation = tspr->cstat;
|
||||
|
||||
GLInterface.SetVisibility(sectorVisibility(tspr->sectnum));
|
||||
|
@ -2740,7 +2740,7 @@ void polymost_drawsprite(int32_t snum)
|
|||
drawpoly_alpha = spriteext[spritenum].alpha;
|
||||
drawpoly_blend = tspr->blend;
|
||||
|
||||
sec = (usectorptr_t)§or[tspr->sectnum];
|
||||
sec = (usectorptr_t)tspr->sector();
|
||||
|
||||
while (!(spriteext[spritenum].flags & SPREXT_NOTMD))
|
||||
{
|
||||
|
@ -2881,16 +2881,16 @@ void polymost_drawsprite(int32_t snum)
|
|||
}
|
||||
|
||||
// Clip sprites to ceilings/floors when no parallaxing and not sloped
|
||||
if (!(sector[tspr->sectnum].ceilingstat & 3))
|
||||
if (!(tspr->sector()->ceilingstat & 3))
|
||||
{
|
||||
s0.Y = ((float) (sector[tspr->sectnum].ceilingz - globalposz)) * gyxscale * ryp0 + ghoriz;
|
||||
s0.Y = ((float) (tspr->sector()->ceilingz - globalposz)) * gyxscale * ryp0 + ghoriz;
|
||||
if (pxy[0].Y < s0.Y)
|
||||
pxy[0].Y = pxy[1].Y = s0.Y;
|
||||
}
|
||||
|
||||
if (!(sector[tspr->sectnum].floorstat & 3))
|
||||
if (!(tspr->sector()->floorstat & 3))
|
||||
{
|
||||
s0.Y = ((float) (sector[tspr->sectnum].floorz - globalposz)) * gyxscale * ryp0 + ghoriz;
|
||||
s0.Y = ((float) (tspr->sector()->floorz - globalposz)) * gyxscale * ryp0 + ghoriz;
|
||||
if (pxy[2].Y > s0.Y)
|
||||
pxy[2].Y = pxy[3].Y = s0.Y;
|
||||
}
|
||||
|
@ -3054,20 +3054,20 @@ void polymost_drawsprite(int32_t snum)
|
|||
}
|
||||
|
||||
// Clip sprites to ceilings/floors when no parallaxing
|
||||
if (!(sector[tspr->sectnum].ceilingstat & 1))
|
||||
if (!(tspr->sector()->ceilingstat & 1))
|
||||
{
|
||||
if (sector[tspr->sectnum].ceilingz > pos.z - (float)((tspr->yrepeat * tsiz.y) << 2))
|
||||
if (tspr->sector()->ceilingz > pos.z - (float)((tspr->yrepeat * tsiz.y) << 2))
|
||||
{
|
||||
sc0 = (float)(sector[tspr->sectnum].ceilingz - globalposz) * ryp0 + ghoriz;
|
||||
sc1 = (float)(sector[tspr->sectnum].ceilingz - globalposz) * ryp1 + ghoriz;
|
||||
sc0 = (float)(tspr->sector()->ceilingz - globalposz) * ryp0 + ghoriz;
|
||||
sc1 = (float)(tspr->sector()->ceilingz - globalposz) * ryp1 + ghoriz;
|
||||
}
|
||||
}
|
||||
if (!(sector[tspr->sectnum].floorstat & 1))
|
||||
if (!(tspr->sector()->floorstat & 1))
|
||||
{
|
||||
if (sector[tspr->sectnum].floorz < pos.z)
|
||||
if (tspr->sector()->floorz < pos.z)
|
||||
{
|
||||
sf0 = (float)(sector[tspr->sectnum].floorz - globalposz) * ryp0 + ghoriz;
|
||||
sf1 = (float)(sector[tspr->sectnum].floorz - globalposz) * ryp1 + ghoriz;
|
||||
sf0 = (float)(tspr->sector()->floorz - globalposz) * ryp0 + ghoriz;
|
||||
sf1 = (float)(tspr->sector()->floorz - globalposz) * ryp1 + ghoriz;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3924,7 +3924,7 @@ int32_t polymost_voxdraw(voxmodel_t* m, tspriteptr_t const tspr, bool rotate)
|
|||
GLInterface.SetMatrix(Matrix_Model, mat);
|
||||
|
||||
GLInterface.SetPalswap(globalpal);
|
||||
GLInterface.SetFade(sector[tspr->sectnum].floorpal);
|
||||
GLInterface.SetFade(tspr->sector()->floorpal);
|
||||
|
||||
auto tex = TexMan.GetGameTexture(m->model->GetPaletteTexture());
|
||||
GLInterface.SetTexture(tex, TRANSLATION(Translation_Remap + curbasepal, globalpal), CLAMP_NOFILTER_XY, true);
|
||||
|
|
|
@ -309,7 +309,7 @@ void HWDrawInfo::DispatchSprites()
|
|||
{
|
||||
HWSprite hwsprite;
|
||||
int num = tilenum;
|
||||
hwsprite.ProcessVoxel(this, voxmodels[tspr->picnum], tspr, §or[tspr->sectnum], voxrotate[num]);
|
||||
hwsprite.ProcessVoxel(this, voxmodels[tspr->picnum], tspr, tspr->sector(), voxrotate[num]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -331,21 +331,21 @@ void HWDrawInfo::DispatchSprites()
|
|||
case CSTAT_SPRITE_ALIGNMENT_FACING:
|
||||
{
|
||||
HWSprite sprite;
|
||||
sprite.Process(this, tspr, §or[tspr->sectnum], false);
|
||||
sprite.Process(this, tspr, tspr->sector(), false);
|
||||
break;
|
||||
}
|
||||
|
||||
case CSTAT_SPRITE_ALIGNMENT_WALL:
|
||||
{
|
||||
HWWall wall;
|
||||
wall.ProcessWallSprite(this, tspr, §or[tspr->sectnum]);
|
||||
wall.ProcessWallSprite(this, tspr, tspr->sector());
|
||||
break;
|
||||
}
|
||||
|
||||
case CSTAT_SPRITE_ALIGNMENT_FLOOR:
|
||||
{
|
||||
HWFlat flat;
|
||||
flat.ProcessFlatSprite(this, tspr, §or[tspr->sectnum]);
|
||||
flat.ProcessFlatSprite(this, tspr, tspr->sector());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static int GetClosestPointOnWall(spritetype* spr, walltype* wal, vec2_t* const n
|
|||
static int IsOnWall(spritetype* tspr, int height)
|
||||
{
|
||||
int dist = 3, closest = -1;
|
||||
auto sect = §or[tspr->sectnum];
|
||||
auto sect = tspr->sector();
|
||||
vec2_t n;
|
||||
|
||||
int topz = (tspr->z - ((height * tspr->yrepeat) << 2));
|
||||
|
|
|
@ -1098,7 +1098,7 @@ void lotsofglass(DDukeActor *actor, walltype* wal, int n)
|
|||
for (j = n - 1; j >= 0; j--)
|
||||
{
|
||||
a = sp->ang - 256 + (krand() & 511) + 1024;
|
||||
EGS(sp->sector(), sp->x, sp->y, sp->z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), 1024 - (krand() & 1023), &hittype[j], 5);
|
||||
EGS(sp->sector(), sp->x, sp->y, sp->z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), 1024 - (krand() & 1023), actor, 5);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue