mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- renamed yet another bunch of repeat variables.
This commit is contained in:
parent
78bf99434e
commit
f5e1709c37
6 changed files with 28 additions and 28 deletions
|
@ -2304,7 +2304,7 @@ bool genDudePrepare(DBloodActor* actor, int propId)
|
|||
// to ensure mass gets updated, let's clear all cache
|
||||
SPRITEMASS* pMass = &actor->spriteMass;
|
||||
pMass->seqId = pMass->picnum = 0;
|
||||
pMass->xrepeat = pMass->yrepeat = 0;
|
||||
pMass->scalex = pMass->scaley = 0;
|
||||
pMass->clipDist = 0;
|
||||
pMass->mass = pMass->airVel = pMass->fraction = 0;
|
||||
getSpriteMassBySize(actor);
|
||||
|
|
|
@ -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.xrepeat = pFX->xrepeat;
|
||||
if (pFX->yrepeat > 0)
|
||||
actor->spr.yrepeat = pFX->yrepeat;
|
||||
if (pFX->_xrepeat > 0)
|
||||
actor->spr.xrepeat = pFX->_xrepeat;
|
||||
if (pFX->_yrepeat > 0)
|
||||
actor->spr.yrepeat = pFX->_yrepeat;
|
||||
if ((pFX->flags & 1) && Chance(0x8000))
|
||||
actor->spr.cstat |= CSTAT_SPRITE_XFLIP;
|
||||
if ((pFX->flags & 2) && Chance(0x8000))
|
||||
|
|
|
@ -1432,8 +1432,8 @@ int getSpriteMassBySize(DBloodActor* actor)
|
|||
}
|
||||
|
||||
SPRITEMASS* cached = &actor->spriteMass;
|
||||
if (((seqId >= 0 && seqId == cached->seqId) || actor->spr.picnum == cached->picnum) && actor->spr.xrepeat == cached->xrepeat &&
|
||||
actor->spr.yrepeat == cached->yrepeat && clipDist == cached->clipDist)
|
||||
if (((seqId >= 0 && seqId == cached->seqId) || actor->spr.picnum == cached->picnum) && actor->spr.xrepeat == cached->scalex &&
|
||||
actor->spr.yrepeat == cached->scaley && clipDist == cached->clipDist)
|
||||
{
|
||||
return cached->mass;
|
||||
}
|
||||
|
@ -1513,8 +1513,8 @@ int getSpriteMassBySize(DBloodActor* actor)
|
|||
cached->airVel = ClipRange(400 - cached->mass, 32, 400);
|
||||
cached->fraction = ClipRange(60000 - (cached->mass << 7), 8192, 60000);
|
||||
|
||||
cached->xrepeat = actor->spr.xrepeat;
|
||||
cached->yrepeat = actor->spr.yrepeat;
|
||||
cached->scalex = actor->spr.xrepeat;
|
||||
cached->scaley = actor->spr.yrepeat;
|
||||
cached->picnum = actor->spr.picnum;
|
||||
cached->seqId = seqId;
|
||||
cached->clipDist = actor->clipdist;
|
||||
|
@ -6520,8 +6520,8 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
for (int i = 0; i < pSeq->nFrames; i++)
|
||||
{
|
||||
if ((canInherit & 0x4) && pSeq->frames[i].palette != 0) canInherit &= ~0x4;
|
||||
if ((canInherit & 0x2) && pSeq->frames[i].xrepeat != 0) canInherit &= ~0x2;
|
||||
if ((canInherit & 0x1) && pSeq->frames[i].yrepeat != 0) canInherit &= ~0x1;
|
||||
if ((canInherit & 0x2) && pSeq->frames[i].scalex != 0) canInherit &= ~0x2;
|
||||
if ((canInherit & 0x1) && pSeq->frames[i].scaley != 0) canInherit &= ~0x1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9349,8 +9349,8 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SPRITEMASS& w, SPR
|
|||
{
|
||||
arc("seq", w.seqId, &nul.seqId)
|
||||
("picnum", w.picnum, &nul.picnum)
|
||||
("xrepeat", w.xrepeat, &nul.xrepeat)
|
||||
("yrepeat", w.yrepeat, &nul.yrepeat)
|
||||
("scalex", w.scalex, &nul.scalex)
|
||||
("scaley", w.scaley, &nul.scaley)
|
||||
("clipdist", w.clipDist)
|
||||
("mass", w.mass)
|
||||
("airvel", w.airVel)
|
||||
|
|
|
@ -194,8 +194,8 @@ enum {
|
|||
struct SPRITEMASS { // sprite mass info for getSpriteMassBySize();
|
||||
int seqId;
|
||||
int16_t picnum; // mainly needs for moving debris
|
||||
int16_t xrepeat;
|
||||
int16_t yrepeat;
|
||||
int16_t scalex;
|
||||
int16_t scaley;
|
||||
int16_t airVel; // mainly needs for moving debris
|
||||
double clipDist; // mass multiplier
|
||||
int mass;
|
||||
|
|
|
@ -245,7 +245,7 @@ void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame)
|
|||
if (actor->spr.flags & 2)
|
||||
{
|
||||
if (tileHeight(actor->spr.picnum) != tileHeight(seqGetTile(pFrame)) || tileTopOffset(actor->spr.picnum) != tileTopOffset(seqGetTile(pFrame))
|
||||
|| (pFrame->yrepeat && pFrame->yrepeat != actor->spr.yrepeat))
|
||||
|| (pFrame->scaley && pFrame->scaley != actor->spr.yrepeat))
|
||||
actor->spr.flags |= 4;
|
||||
}
|
||||
actor->spr.picnum = seqGetTile(pFrame);
|
||||
|
@ -254,14 +254,14 @@ void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame)
|
|||
actor->spr.shade = pFrame->shade;
|
||||
|
||||
int scale = actor->xspr.scale; // SEQ size scaling
|
||||
if (pFrame->xrepeat) {
|
||||
if (scale) actor->spr.xrepeat = ClipRange(MulScale(pFrame->xrepeat, scale, 8), 0, 255);
|
||||
else actor->spr.xrepeat = pFrame->xrepeat;
|
||||
if (pFrame->scalex) {
|
||||
if (scale) actor->spr.xrepeat = ClipRange(MulScale(pFrame->scalex, scale, 8), 0, 255);
|
||||
else actor->spr.xrepeat = pFrame->scalex;
|
||||
}
|
||||
|
||||
if (pFrame->yrepeat) {
|
||||
if (scale) actor->spr.yrepeat = ClipRange(MulScale(pFrame->yrepeat, scale, 8), 0, 255);
|
||||
else actor->spr.yrepeat = pFrame->yrepeat;
|
||||
if (pFrame->scaley) {
|
||||
if (scale) actor->spr.yrepeat = ClipRange(MulScale(pFrame->scaley, scale, 8), 0, 255);
|
||||
else actor->spr.yrepeat = pFrame->scaley;
|
||||
}
|
||||
|
||||
if (pFrame->transparent)
|
||||
|
@ -528,8 +528,8 @@ static void ByteSwapSEQ(Seq* pSeq)
|
|||
swapFrame.transparent2 = bitReader.readBit();
|
||||
swapFrame.blockable = bitReader.readBit();
|
||||
swapFrame.hittable = bitReader.readBit();
|
||||
swapFrame.xrepeat = bitReader.readUnsigned(8);
|
||||
swapFrame.yrepeat = bitReader.readUnsigned(8);
|
||||
swapFrame.scalex = bitReader.readUnsigned(8);
|
||||
swapFrame.scaley = bitReader.readUnsigned(8);
|
||||
swapFrame.shade = bitReader.readSigned(8);
|
||||
swapFrame.palette = bitReader.readUnsigned(5);
|
||||
swapFrame.trigger = bitReader.readBit();
|
||||
|
|
|
@ -33,8 +33,8 @@ struct SEQFRAME
|
|||
unsigned int transparent2 : 1;
|
||||
unsigned int blockable : 1;
|
||||
unsigned int hittable : 1;
|
||||
unsigned int xrepeat : 8;
|
||||
unsigned int yrepeat : 8;
|
||||
unsigned int scalex : 8;
|
||||
unsigned int scaley : 8;
|
||||
signed int shade : 8;
|
||||
unsigned int palette : 5;
|
||||
unsigned int trigger : 1;
|
||||
|
|
Loading…
Reference in a new issue