- renamed everything back

This commit is contained in:
Christoph Oelckers 2022-10-08 00:02:10 +02:00
parent 81341ce4a6
commit 3c6b64d621
16 changed files with 68 additions and 68 deletions

View file

@ -249,25 +249,25 @@ void TGetFlatSpritePosition(const spritetypebase* spr, const DVector2& pos, DVec
double width, height, leftofs, topofs;
double sloperatio = sqrt(heinum * heinum + SLOPEVAL_FACTOR * SLOPEVAL_FACTOR) * (1. / SLOPEVAL_FACTOR);
double _xrepeat = spr->scale.X;
double _yrepeat = spr->scale.Y;
double xrepeat = spr->scale.X;
double yrepeat = spr->scale.Y;
int xo = heinum ? 0 : spr->xoffset;
int yo = heinum ? 0 : spr->yoffset;
if (render && hw_hightile && TileFiles.tiledata[spr->picnum].hiofs.xsize)
{
width = TileFiles.tiledata[spr->picnum].hiofs.xsize * _xrepeat;
height = TileFiles.tiledata[spr->picnum].hiofs.ysize * _yrepeat;
leftofs = (TileFiles.tiledata[spr->picnum].hiofs.xoffs + xo) * _xrepeat;
topofs = (TileFiles.tiledata[spr->picnum].hiofs.yoffs + yo) * _yrepeat;
width = TileFiles.tiledata[spr->picnum].hiofs.xsize * xrepeat;
height = TileFiles.tiledata[spr->picnum].hiofs.ysize * yrepeat;
leftofs = (TileFiles.tiledata[spr->picnum].hiofs.xoffs + xo) * xrepeat;
topofs = (TileFiles.tiledata[spr->picnum].hiofs.yoffs + yo) * yrepeat;
}
else
{
width = (int)tex->GetDisplayWidth() * _xrepeat;
height = (int)tex->GetDisplayHeight() * _yrepeat;
leftofs = ((int)tex->GetDisplayLeftOffset() + xo) * _xrepeat;
topofs = ((int)tex->GetDisplayTopOffset() + yo) * _yrepeat;
width = (int)tex->GetDisplayWidth() * xrepeat;
height = (int)tex->GetDisplayHeight() * yrepeat;
leftofs = ((int)tex->GetDisplayLeftOffset() + xo) * xrepeat;
topofs = ((int)tex->GetDisplayTopOffset() + yo) * yrepeat;
}
if (spr->cstat & CSTAT_SPRITE_XFLIP) leftofs = -leftofs;

View file

@ -191,8 +191,8 @@ static void ReadWallV7(FileReader& fr, walltype& wall)
wall.overpicnum = fr.ReadInt16();
wall.shade = fr.ReadInt8();
wall.pal = fr.ReadUInt8();
wall._xrepeat = fr.ReadUInt8();
wall._yrepeat = fr.ReadUInt8();
wall.xrepeat = fr.ReadUInt8();
wall.yrepeat = fr.ReadUInt8();
wall.xpan_ = fr.ReadUInt8();
wall.ypan_ = fr.ReadUInt8();
wall.lotag = fr.ReadInt16();
@ -213,8 +213,8 @@ static void ReadWallV6(FileReader& fr, walltype& wall)
wall.shade = fr.ReadInt8();
wall.pal = fr.ReadUInt8();
wall.cstat = EWallFlags::FromInt(fr.ReadUInt16());
wall._xrepeat = fr.ReadUInt8();
wall._yrepeat = fr.ReadUInt8();
wall.xrepeat = fr.ReadUInt8();
wall.yrepeat = fr.ReadUInt8();
wall.xpan_ = fr.ReadUInt8();
wall.ypan_ = fr.ReadUInt8();
wall.lotag = fr.ReadInt16();
@ -232,8 +232,8 @@ static void ReadWallV5(FileReader& fr, walltype& wall)
wall.overpicnum = fr.ReadInt16();
wall.shade = fr.ReadInt8();
wall.cstat = EWallFlags::FromInt(fr.ReadUInt16());
wall._xrepeat = fr.ReadUInt8();
wall._yrepeat = fr.ReadUInt8();
wall.xrepeat = fr.ReadUInt8();
wall.yrepeat = fr.ReadUInt8();
wall.xpan_ = fr.ReadUInt8();
wall.ypan_ = fr.ReadUInt8();

View file

@ -393,8 +393,8 @@ struct walltype
int8_t shade;
uint8_t pal;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
// extensions not from the binary map format.
angle_t clipangle;

View file

@ -747,13 +747,13 @@ void HWWall::DoTexture(HWDrawInfo* di, walltype* wal, walltype* refwall, float r
if (pow2size < th) pow2size *= 2;
float ypanning = refwall->ypan_ ? pow2size * refwall->ypan_ / (256.0f * th) : 0;
tcs[LOLFT].u = tcs[UPLFT].u = ((leftdist * 8.f * wal->_xrepeat) + refwall->xpan_) / tw;
tcs[LORGT].u = tcs[UPRGT].u = ((rightdist * 8.f * wal->_xrepeat) + refwall->xpan_) / tw;
tcs[LOLFT].u = tcs[UPLFT].u = ((leftdist * 8.f * wal->xrepeat) + refwall->xpan_) / tw;
tcs[LORGT].u = tcs[UPRGT].u = ((rightdist * 8.f * wal->xrepeat) + refwall->xpan_) / tw;
auto setv = [=](float hl, float hr, float frac) -> float
{
float h = hl + (hr - hl) * frac;
h = (-(float)((refheight + h) * 256) / ((th * 2048.0f) / (float)(wal->_yrepeat))) + ypanning;
h = (-(float)((refheight + h) * 256) / ((th * 2048.0f) / (float)(wal->yrepeat))) + ypanning;
if (refwall->cstat & CSTAT_WALL_YFLIP) h = -h;
return h;
};

View file

@ -609,8 +609,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, walltype &c, walltype
("overpicnum", c.overpicnum, def->overpicnum)
("shade", c.shade, def->shade)
("pal", c.pal, def->pal)
("xrepeat", c._xrepeat, def->_xrepeat)
("yrepeat", c._yrepeat, def->_yrepeat)
("xrepeat", c.xrepeat, def->xrepeat)
("yrepeat", c.yrepeat, def->yrepeat)
("xpanning", c.xpan_, def->xpan_)
("ypanning", c.ypan_, def->ypan_)
("lotag", c.lotag, def->lotag)

View file

@ -78,8 +78,8 @@ DEFINE_FIELD_X(walltype, walltype, hitag)
DEFINE_FIELD_X(walltype, walltype, extra)
DEFINE_FIELD_X(walltype, walltype, shade)
DEFINE_FIELD_X(walltype, walltype, pal)
DEFINE_FIELD_NAMED_X(walltype, walltype, _xrepeat, xrepeat)
DEFINE_FIELD_NAMED_X(walltype, walltype, _yrepeat, yrepeat)
DEFINE_FIELD_NAMED_X(walltype, walltype, xrepeat, xrepeat)
DEFINE_FIELD_NAMED_X(walltype, walltype, yrepeat, yrepeat)
DEFINE_FIELD_NAMED_X(tspritetype, tspritetype, sectp, sector)
DEFINE_FIELD_X(tspritetype, tspritetype, cstat)

View file

@ -2746,7 +2746,7 @@ static DBloodActor* actDropAmmo(DBloodActor* actor, int nType)
act2->spr.type = nType;
act2->spr.picnum = pAmmo->picnum;
act2->spr.shade = pAmmo->shade;
act2->spr.scale = DVector2(pAmmo->_xrepeat * REPEAT_SCALE, pAmmo->_yrepeat * REPEAT_SCALE);
act2->spr.scale = DVector2(pAmmo->xrepeat * REPEAT_SCALE, pAmmo->yrepeat * REPEAT_SCALE);
return act2;
}
return nullptr;
@ -2762,7 +2762,7 @@ static DBloodActor* actDropWeapon(DBloodActor* actor, int nType)
act2->spr.type = nType;
act2->spr.picnum = pWeapon->picnum;
act2->spr.shade = pWeapon->shade;
act2->spr.scale = DVector2(pWeapon->_xrepeat * REPEAT_SCALE, pWeapon->_yrepeat * REPEAT_SCALE);
act2->spr.scale = DVector2(pWeapon->xrepeat * REPEAT_SCALE, pWeapon->yrepeat * REPEAT_SCALE);
return act2;
}
return nullptr;
@ -2778,7 +2778,7 @@ static DBloodActor* actDropItem(DBloodActor* actor, int nType)
act2->spr.type = nType;
act2->spr.picnum = pItem->picnum;
act2->spr.shade = pItem->shade;
act2->spr.scale = DVector2(pItem->_xrepeat * REPEAT_SCALE, pItem->_yrepeat * REPEAT_SCALE);
act2->spr.scale = DVector2(pItem->xrepeat * REPEAT_SCALE, pItem->yrepeat * REPEAT_SCALE);
return act2;
}
return nullptr;
@ -6249,8 +6249,8 @@ DBloodActor* actSpawnThing(sectortype* pSector, const DVector3& pos, int nThingT
actor->spr.picnum = pThingInfo->picnum;
actor->spr.shade = pThingInfo->shade;
actor->spr.pal = pThingInfo->pal;
if (pThingInfo->_xrepeat) actor->spr.scale.X = (pThingInfo->_xrepeat * REPEAT_SCALE);
if (pThingInfo->_yrepeat) actor->spr.scale.Y = (pThingInfo->_yrepeat * REPEAT_SCALE);
if (pThingInfo->xrepeat) actor->spr.scale.X = (pThingInfo->xrepeat * REPEAT_SCALE);
if (pThingInfo->yrepeat) actor->spr.scale.Y = (pThingInfo->yrepeat * REPEAT_SCALE);
actor->spr.cstat2 |= CSTAT2_SPRITE_MAPPED;
switch (nThingType)
{
@ -6464,7 +6464,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
spawned->clipdist = pMissileInfo->fClipDist();
spawned->spr.flags = 1;
spawned->spr.scale = DVector2(pMissileInfo->_xrepeat * REPEAT_SCALE, pMissileInfo->_yrepeat * REPEAT_SCALE);
spawned->spr.scale = DVector2(pMissileInfo->xrepeat * REPEAT_SCALE, pMissileInfo->yrepeat * REPEAT_SCALE);
spawned->spr.picnum = pMissileInfo->picnum;
spawned->spr.angle = actor->spr.angle += mapangle(pMissileInfo->angleOfs);
spawned->vel = dv * pMissileInfo->fVelocity();

View file

@ -76,8 +76,8 @@ struct THINGINFO
int16_t picnum;
int8_t shade;
uint8_t pal;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
int dmgControl[kDamageMax]; // damage
double fClipdist() const { return clipdist * 0.25; }
@ -89,8 +89,8 @@ struct AMMOITEMDATA
int16_t picnum;
int8_t shade;
uint8_t pal;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
int16_t count;
uint8_t type;
uint8_t weaponType;
@ -102,8 +102,8 @@ struct WEAPONITEMDATA
int16_t picnum;
int8_t shade;
uint8_t pal;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
int16_t type;
int16_t ammoType;
int16_t count;
@ -115,8 +115,8 @@ struct ITEMDATA
int16_t picnum;
int8_t shade;
uint8_t pal;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
int16_t packSlot;
};
@ -125,8 +125,8 @@ struct MissileType
int16_t picnum;
int velocity;
int angleOfs;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
int8_t shade;
uint8_t clipDist;

View file

@ -400,9 +400,9 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur
pWall->extra = LittleShort(load.extra);
pWall->shade = load.shade;
pWall->pal = load.pal;
pWall->_xrepeat = load._xrepeat;
pWall->xrepeat = load.xrepeat;
pWall->xpan_ = load.xpanning;
pWall->_yrepeat = load._yrepeat;
pWall->yrepeat = load.yrepeat;
pWall->ypan_ = load.ypanning;
if (pWall->extra > 0)
@ -485,7 +485,7 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur
pSprite->extra = LittleShort(load.extra);
pSprite->pal = load.pal;
pSprite->clipdist = load.clipdist;
pSprite->scale = DVector2(load._xrepeat * REPEAT_SCALE, load._yrepeat * REPEAT_SCALE);
pSprite->scale = DVector2(load.xrepeat * REPEAT_SCALE, load.yrepeat * REPEAT_SCALE);
pSprite->xoffset = load.xoffset;
pSprite->yoffset = load.yoffset;
pSprite->detail = load.detail;

View file

@ -40,8 +40,8 @@ struct FXDATA {
int32_t drag; // air drag
int32_t defangle;
int16_t picnum;
uint8_t _xrepeat;
uint8_t _yrepeat;
uint8_t xrepeat;
uint8_t yrepeat;
ESpriteFlags cstat;
int8_t shade;
uint8_t pal;
@ -171,10 +171,10 @@ DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& p
actor->spr.shade = pFX->shade;
actor->spr.pal = pFX->pal;
actor->spr.detail = pFX->detail;
if (pFX->_xrepeat > 0)
actor->spr.scale.X = (pFX->_xrepeat * REPEAT_SCALE);
if (pFX->_yrepeat > 0)
actor->spr.scale.Y = (pFX->_yrepeat * REPEAT_SCALE);
if (pFX->xrepeat > 0)
actor->spr.scale.X = (pFX->xrepeat * REPEAT_SCALE);
if (pFX->yrepeat > 0)
actor->spr.scale.Y = (pFX->yrepeat * REPEAT_SCALE);
if ((pFX->flags & 1) && Chance(0x8000))
actor->spr.cstat |= CSTAT_SPRITE_XFLIP;
if ((pFX->flags & 2) && Chance(0x8000))

View file

@ -348,7 +348,7 @@ int VectorScan(DBloodActor* actor, double nOffset, double nZOffset, const DVecto
if (!nSizX || !nSizY)
return 0;
int nnOfs = int((nOfs * pWall->_yrepeat) / 8);
int nnOfs = int((nOfs * pWall->yrepeat) / 8);
nnOfs += int((nSizY * pWall->ypan_) / 256);
double nLength = (pWall->pos - pWall->point2Wall()->pos).Length();
double fHOffset;
@ -357,7 +357,7 @@ int VectorScan(DBloodActor* actor, double nOffset, double nZOffset, const DVecto
else
fHOffset = (gHitInfo.hitpos.XY() - pWall->pos).Length();
int nHOffset = int(pWall->xpan_ + ((fHOffset * pWall->_xrepeat) * 8) / nLength) % nSizX;
int nHOffset = int(pWall->xpan_ + ((fHOffset * pWall->xrepeat) * 8) / nLength) % nSizX;
nnOfs %= nSizY;
auto pData = tilePtr(nPicnum);
int nPixel = nHOffset * nSizY + nnOfs;

View file

@ -12,7 +12,7 @@ struct spritetypedisk
int16_t picnum;
int8_t shade;
uint8_t pal, clipdist, detail;
uint8_t _xrepeat, _yrepeat;
uint8_t xrepeat, yrepeat;
int8_t xoffset, yoffset;
int16_t sectnum, statnum;
int16_t ang, owner;
@ -46,7 +46,7 @@ struct walltypedisk
uint16_t cstat;
int16_t picnum, overpicnum;
int8_t shade;
uint8_t pal, _xrepeat, _yrepeat, xpanning, ypanning;
uint8_t pal, xrepeat, yrepeat, xpanning, ypanning;
int16_t type;
int16_t hitag;
int16_t extra;

View file

@ -2483,10 +2483,10 @@ void useObjResizer(DBloodActor* sourceactor, int targType, sectortype* targSect,
case OBJ_WALL:
if (!targWall) return;
if (valueIsBetween(sourceactor->xspr.data1, -1, 32767))
targWall->_xrepeat = ClipRange(sourceactor->xspr.data1, 0, 255);
targWall->xrepeat = ClipRange(sourceactor->xspr.data1, 0, 255);
if (valueIsBetween(sourceactor->xspr.data2, -1, 32767))
targWall->_yrepeat = ClipRange(sourceactor->xspr.data2, 0, 255);
targWall->yrepeat = ClipRange(sourceactor->xspr.data2, 0, 255);
if (valueIsBetween(sourceactor->xspr.data3, -1, 32767))
targWall->xpan_ = (float)ClipRange(sourceactor->xspr.data3, 0, 255);
@ -3966,9 +3966,9 @@ bool condCheckMixed(DBloodActor* aCond, const EVENT& event, int cmpOp, bool PUSH
case 27: return condCmp(pObj->shade, arg1, arg2, cmpOp);
case 28: return (arg3) ? condCmp((pObj->cstat & EWallFlags::FromInt(arg3)), arg1, arg2, cmpOp) : (pObj->cstat & EWallFlags::FromInt(arg1));
case 29: return (arg3) ? condCmp((pObj->hitag & arg3), arg1, arg2, cmpOp) : (pObj->hitag & arg1);
case 30: return condCmp(pObj->_xrepeat, arg1, arg2, cmpOp);
case 30: return condCmp(pObj->xrepeat, arg1, arg2, cmpOp);
case 31: return condCmp(pObj->xpan(), arg1, arg2, cmpOp);
case 32: return condCmp(pObj->_yrepeat, arg1, arg2, cmpOp);
case 32: return condCmp(pObj->yrepeat, arg1, arg2, cmpOp);
case 33: return condCmp(pObj->ypan(), arg1, arg2, cmpOp);
}
}

View file

@ -3865,8 +3865,8 @@ void destroyit(DDukeActor *actor)
destwal->picnum = srcwal->picnum;
destwal->overpicnum = srcwal->overpicnum;
destwal->shade = srcwal->shade;
destwal->_xrepeat = srcwal->_xrepeat;
destwal->_yrepeat = srcwal->_yrepeat;
destwal->xrepeat = srcwal->xrepeat;
destwal->yrepeat = srcwal->yrepeat;
destwal->xpan_ = srcwal->xpan_;
destwal->ypan_ = srcwal->ypan_;
if (isRRRA() && destwal->twoSided())

View file

@ -988,12 +988,12 @@ void DoWall(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, i
else SetGameVarID(lVar2, wallp->pal, sActor, sPlayer);
break;
case WALL_XREPEAT:
if (bSet) wallp->_xrepeat = lValue;
else SetGameVarID(lVar2, wallp->_xrepeat, sActor, sPlayer);
if (bSet) wallp->xrepeat = lValue;
else SetGameVarID(lVar2, wallp->xrepeat, sActor, sPlayer);
break;
case WALL_YREPEAT:
if (bSet) wallp->_yrepeat = lValue;
else SetGameVarID(lVar2, wallp->_yrepeat, sActor, sPlayer);
if (bSet) wallp->yrepeat = lValue;
else SetGameVarID(lVar2, wallp->yrepeat, sActor, sPlayer);
break;
case WALL_XPANNING:
if (bSet) wallp->xpan_ = (float)(lValue & 255);

View file

@ -60,8 +60,8 @@ void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect)
{
dwall->picnum = swall->picnum;
dwall->_xrepeat = swall->_xrepeat;
dwall->_yrepeat = swall->_yrepeat;
dwall->xrepeat = swall->xrepeat;
dwall->yrepeat = swall->yrepeat;
dwall->overpicnum = swall->overpicnum;
dwall->pal = swall->pal;
dwall->cstat = swall->cstat;
@ -77,8 +77,8 @@ void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect)
auto const dest_nextwall = dwall->nextWall();
auto const src_nextwall = swall->nextWall();
dest_nextwall->picnum = src_nextwall->picnum;
dest_nextwall->_xrepeat = src_nextwall->_xrepeat;
dest_nextwall->_yrepeat = src_nextwall->_yrepeat;
dest_nextwall->xrepeat = src_nextwall->xrepeat;
dest_nextwall->yrepeat = src_nextwall->yrepeat;
dest_nextwall->overpicnum = src_nextwall->overpicnum;
dest_nextwall->pal = src_nextwall->pal;
dest_nextwall->cstat = src_nextwall->cstat;