- these parts were missed somehow.

This commit is contained in:
Christoph Oelckers 2020-10-02 22:42:54 +02:00
parent e0717e30b4
commit 89d5d18b9e
4 changed files with 25 additions and 24 deletions

View file

@ -453,7 +453,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
//int nXSprite = pTSprite->extra; //int nXSprite = pTSprite->extra;
int nXSprite = sprite[pTSprite->owner].extra; int nXSprite = sprite[pTSprite->owner].extra;
XSPRITE *pTXSprite = NULL; XSPRITE *pTXSprite = NULL;
if (sprite[pTSprite->owner].deteil > gDetail) if (sprite[pTSprite->owner].detail > gDetail)
{ {
pTSprite->xrepeat = 0; pTSprite->xrepeat = 0;
continue; continue;

View file

@ -63,26 +63,34 @@ typedef struct
// bits 12-15: reserved (14: temp use by editor) // bits 12-15: reserved (14: temp use by editor)
//32 bytes //32 bytes
typedef struct struct walltypev7
{ {
union { union {
struct struct
{ {
StructTracker(Wall, int32_t) x, y; int32_t x, y;
}; };
vec2_t pos; vec2_t pos;
}; };
StructTracker(Wall, int16_t) point2, nextwall, nextsector; int16_t point2, nextwall, nextsector;
StructTracker(Wall, uint16_t) cstat; uint16_t cstat;
StructTracker(Wall, int16_t) picnum, overpicnum; int16_t picnum, overpicnum;
StructTracker(Wall, int8_t) shade; int8_t shade;
StructTracker(Wall, uint8_t) pal, xrepeat, yrepeat, xpanning, ypanning; uint8_t pal, xrepeat, yrepeat, xpanning, ypanning;
union { union {
StructTracker(Wall, int16_t) lotag, type; int16_t lotag, type;
};
int16_t hitag;
int16_t extra;
#if 0
// make sure we do not accidentally copy this
walltypev7() = default;
walltypev7(const walltypev7&) = delete;
walltypev7& operator=(const walltypev7&) = delete;
#endif
}; };
StructTracker(Wall, int16_t) hitag;
StructTracker(Wall, int16_t) extra;
} StructName(walltypev7);
//cstat: //cstat:
// bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B" // bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
@ -205,15 +213,16 @@ struct spritetype : public spritetypev7
{ {
int16_t detail; int16_t detail;
#if 0
// make sure we do not accidentally copy this // make sure we do not accidentally copy this
spritetype() = default; spritetype() = default;
spritetype(const spritetype&) = delete; spritetype(const spritetype&) = delete;
spritetype& operator=(const spritetype&) = delete; spritetype& operator=(const spritetype&) = delete;
#endif
void clear() void clear()
{ {
memset(this, 0, sizeof(*this)); memset(this, 0, sizeof(*this));
} }
}; };
using tspritetype = spritetype; using tspritetype = spritetype;

View file

@ -259,7 +259,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr)
spr.lotag = fr.ReadInt16(); spr.lotag = fr.ReadInt16();
spr.hitag = fr.ReadInt16(); spr.hitag = fr.ReadInt16();
spr.extra = fr.ReadInt16(); spr.extra = fr.ReadInt16();
spr.deteil = 0; spr.detail = 0;
ValidateSprite(spr); ValidateSprite(spr);
} }
@ -288,7 +288,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr)
spr.hitag = fr.ReadInt16(); spr.hitag = fr.ReadInt16();
spr.extra = fr.ReadInt16(); spr.extra = fr.ReadInt16();
spr.blend = 0; spr.blend = 0;
spr.deteil = 0; spr.detail = 0;
ValidateSprite(spr); ValidateSprite(spr);
} }
@ -323,7 +323,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr)
spr.clipdist = 32; spr.clipdist = 32;
spr.xoffset = 0; spr.xoffset = 0;
spr.yoffset = 0; spr.yoffset = 0;
spr.deteil = 0; spr.detail = 0;
ValidateSprite(spr); ValidateSprite(spr);
} }

View file

@ -90,14 +90,6 @@ inline int ldist(const spritetype* s1, const spritetype* s2)
return(FindDistance2D(vx, vy) + 1); return(FindDistance2D(vx, vy) + 1);
} }
inline int ldist(const spritetype* s1, const tspritetype* s2)
{
int vx, vy;
vx = s1->x - s2->x;
vy = s1->y - s2->y;
return(FindDistance2D(vx, vy) + 1);
}
inline int dist(const spritetype* s1, const spritetype* s2) inline int dist(const spritetype* s1, const spritetype* s2)
{ {
int vx, vy, vz; int vx, vy, vz;