- more spritetype references eliminated.

This commit is contained in:
Christoph Oelckers 2021-12-30 12:29:17 +01:00
parent 4bc32e2777
commit eb00fe52db
6 changed files with 13 additions and 31 deletions

View file

@ -21,12 +21,6 @@ void polymost_drawsprite(int32_t snum);
void polymost_drawmaskwall(int32_t damaskwallcnt);
void polymost_dorotatespritemodel(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, uint8_t dapalnum, int32_t dastat, uint8_t daalpha, uint8_t dablend, int32_t uniqid);
void polymost_initosdfuncs(void);
void polymost_drawrooms(void);
void polymost_prepareMirror(int32_t dax, int32_t day, int32_t daz, fixed_t daang, fixed_t dahoriz, int16_t mirrorWall);
void polymost_completeMirror();
int32_t polymost_maskWallHasTranslucency(walltype const * const wall);
int32_t polymost_spriteHasTranslucency(spritetype const * const tspr);
void polymost_glreset(void);
void polymost_scansector(int32_t sectnum);

View file

@ -1337,8 +1337,6 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
int32_t x1, y1=0, z1=0, x2, y2, intx, inty, intz;
int32_t i, k, daz;
const spritetype* curspr = NULL;
// tmp: { (int32_t)curidx, (spritetype *)curspr, (!=0 if outer sector) }
const int32_t dawalclipmask = (cliptype&65535);
const int32_t dasprclipmask = (cliptype >> 16);
@ -1365,7 +1363,6 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
auto wal2 = wal->point2Wall();
auto const nextsect = wal->nextSector();
if (curspr && !wal->twoSided()) continue;
x1 = wal->pos.X; y1 = wal->pos.Y; x2 = wal2->pos.X; y2 = wal2->pos.Y;
@ -1376,22 +1373,20 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
if (abs(intx-sv->X)+abs(inty-sv->Y) >= abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.Y)-sv->Y))
continue;
if (!curspr)
if ((!wal->twoSided()) || (wal->cstat & EWallFlags::FromInt(dawalclipmask)))
{
if ((!wal->twoSided()) || (wal->cstat & EWallFlags::FromInt(dawalclipmask)))
{
hit_set(&hitinfo, sec, wal, nullptr, intx, inty, intz);
continue;
}
int32_t daz2;
getzsofslopeptr(nextsect,intx,inty,&daz,&daz2);
if (intz <= daz || intz >= daz2)
{
hit_set(&hitinfo, sec, wal, nullptr, intx, inty, intz);
continue;
}
hit_set(&hitinfo, sec, wal, nullptr, intx, inty, intz);
continue;
}
int32_t daz2;
getzsofslopeptr(nextsect,intx,inty,&daz,&daz2);
if (intz <= daz || intz >= daz2)
{
hit_set(&hitinfo, sec, wal, nullptr, intx, inty, intz);
continue;
}
search.Add(nextsect);
}

View file

@ -603,7 +603,7 @@ void renderDrawMapView(int cposx, int cposy, int czoom, int cang)
LegacyRenderStyles[STYLE_Translucent], windowxy1.X, windowxy1.Y, windowxy2.X + 1, windowxy2.Y + 1);
}
}
qsort(floorsprites.Data(), floorsprites.Size(), sizeof(spritetype*), [](const void* a, const void* b)
qsort(floorsprites.Data(), floorsprites.Size(), sizeof(DCoreActor*), [](const void* a, const void* b)
{
auto A = *(DCoreActor**)a;
auto B = *(DCoreActor**)b;

View file

@ -264,11 +264,6 @@ inline int shadeToLight(int shade)
return PalEntry(255, light, light, light);
}
inline void copyfloorpal(spritetype* spr, const sectortype* sect)
{
if (!lookups.noFloorPal(sect->floorpal)) spr->pal = sect->floorpal;
}
inline void copyfloorpal(tspritetype* spr, const sectortype* sect)
{
if (!lookups.noFloorPal(sect->floorpal)) spr->pal = sect->floorpal;

View file

@ -12,7 +12,6 @@ bool System_WantGuiCapture(); // During playing this tells us whether the game m
class FSerializer;
struct FRenderViewpoint;
struct spritetype;
struct sectortype;
struct tspritetype;
class DCoreActor;

View file

@ -182,7 +182,6 @@ public:
//HWHorizonInfo * horizon; // for horizon information
PortalDesc * portal; // stacked sector portals
const int * planemirror; // for plane mirrors
spritetype* teleport; // SW's teleport-views
};
unsigned int vertindex;