From 89d5d18b9e67823554f4fe1fe8fe3ebddb007d50 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 2 Oct 2020 22:42:54 +0200 Subject: [PATCH] - these parts were missed somehow. --- source/blood/src/animatesprite.cpp | 2 +- source/build/include/buildtypes.h | 33 +++++++++++++++++++----------- source/core/maploader.cpp | 6 +++--- source/games/duke/src/inlines.h | 8 -------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/source/blood/src/animatesprite.cpp b/source/blood/src/animatesprite.cpp index 365e8c953..2a34619b6 100644 --- a/source/blood/src/animatesprite.cpp +++ b/source/blood/src/animatesprite.cpp @@ -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 = sprite[pTSprite->owner].extra; XSPRITE *pTXSprite = NULL; - if (sprite[pTSprite->owner].deteil > gDetail) + if (sprite[pTSprite->owner].detail > gDetail) { pTSprite->xrepeat = 0; continue; diff --git a/source/build/include/buildtypes.h b/source/build/include/buildtypes.h index a8ac0b2a6..e7c97574c 100644 --- a/source/build/include/buildtypes.h +++ b/source/build/include/buildtypes.h @@ -63,26 +63,34 @@ typedef struct // bits 12-15: reserved (14: temp use by editor) //32 bytes -typedef struct +struct walltypev7 { union { struct { - StructTracker(Wall, int32_t) x, y; + int32_t x, y; }; vec2_t pos; }; - StructTracker(Wall, int16_t) point2, nextwall, nextsector; - StructTracker(Wall, uint16_t) cstat; - StructTracker(Wall, int16_t) picnum, overpicnum; - StructTracker(Wall, int8_t) shade; - StructTracker(Wall, uint8_t) pal, xrepeat, yrepeat, xpanning, ypanning; + int16_t point2, nextwall, nextsector; + uint16_t cstat; + int16_t picnum, overpicnum; + int8_t shade; + uint8_t pal, xrepeat, yrepeat, xpanning, ypanning; union { - StructTracker(Wall, int16_t) lotag, type; + int16_t lotag, type; }; - StructTracker(Wall, int16_t) hitag; - StructTracker(Wall, int16_t) extra; -} StructName(walltypev7); + 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 + +}; //cstat: // bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B" @@ -205,15 +213,16 @@ struct spritetype : public spritetypev7 { int16_t detail; +#if 0 // make sure we do not accidentally copy this spritetype() = default; spritetype(const spritetype&) = delete; spritetype& operator=(const spritetype&) = delete; +#endif void clear() { memset(this, 0, sizeof(*this)); } - }; using tspritetype = spritetype; diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index dab18510c..ebbff0f41 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -259,7 +259,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr) spr.lotag = fr.ReadInt16(); spr.hitag = fr.ReadInt16(); spr.extra = fr.ReadInt16(); - spr.deteil = 0; + spr.detail = 0; ValidateSprite(spr); } @@ -288,7 +288,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr) spr.hitag = fr.ReadInt16(); spr.extra = fr.ReadInt16(); spr.blend = 0; - spr.deteil = 0; + spr.detail = 0; ValidateSprite(spr); } @@ -323,7 +323,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr) spr.clipdist = 32; spr.xoffset = 0; spr.yoffset = 0; - spr.deteil = 0; + spr.detail = 0; ValidateSprite(spr); } diff --git a/source/games/duke/src/inlines.h b/source/games/duke/src/inlines.h index 69a032489..d51800a40 100644 --- a/source/games/duke/src/inlines.h +++ b/source/games/duke/src/inlines.h @@ -90,14 +90,6 @@ inline int ldist(const spritetype* s1, const spritetype* s2) 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) { int vx, vy, vz;