mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- Blood: gave FXDATA meaningful member names
This commit is contained in:
parent
42b87362ee
commit
839547a9fc
1 changed files with 29 additions and 29 deletions
|
@ -32,18 +32,18 @@ CFX gFX;
|
||||||
|
|
||||||
struct FXDATA {
|
struct FXDATA {
|
||||||
CALLBACK_ID funcID; // callback
|
CALLBACK_ID funcID; // callback
|
||||||
char at1; // detail
|
uint8_t detail; // detail
|
||||||
short at2; // seq
|
short seq; // seq
|
||||||
short Kills; // flags
|
short flags; // flags
|
||||||
int at6; // gravity
|
int gravity; // gravity
|
||||||
int ata; // air drag
|
int drag; // air drag
|
||||||
int ate;
|
int ate;
|
||||||
short at12; // picnum
|
short picnum; // picnum
|
||||||
unsigned char at14; // xrepeat
|
uint8_t xrepeat; // xrepeat
|
||||||
unsigned char at15; // yrepeat
|
uint8_t yrepeat; // yrepeat
|
||||||
short at16; // cstat
|
short cstat; // cstat
|
||||||
signed char at18; // shade
|
int8_t shade; // shade
|
||||||
char at19; // pal
|
uint8_t pal; // pal
|
||||||
};
|
};
|
||||||
|
|
||||||
FXDATA gFXData[] = {
|
FXDATA gFXData[] = {
|
||||||
|
@ -166,23 +166,23 @@ spritetype * CFX::fxSpawn(FX_ID nFx, int nSector, int x, int y, int z, unsigned
|
||||||
}
|
}
|
||||||
spritetype *pSprite = actSpawnSprite(nSector, x, y, z, 1, 0);
|
spritetype *pSprite = actSpawnSprite(nSector, x, y, z, 1, 0);
|
||||||
pSprite->type = nFx;
|
pSprite->type = nFx;
|
||||||
pSprite->picnum = pFX->at12;
|
pSprite->picnum = pFX->picnum;
|
||||||
pSprite->cstat |= pFX->at16;
|
pSprite->cstat |= pFX->cstat;
|
||||||
pSprite->shade = pFX->at18;
|
pSprite->shade = pFX->shade;
|
||||||
pSprite->pal = pFX->at19;
|
pSprite->pal = pFX->pal;
|
||||||
sprite[pSprite->index].detail = pFX->at1;
|
sprite[pSprite->index].detail = pFX->detail;
|
||||||
if (pFX->at14 > 0)
|
if (pFX->xrepeat > 0)
|
||||||
pSprite->xrepeat = pFX->at14;
|
pSprite->xrepeat = pFX->xrepeat;
|
||||||
if (pFX->at15 > 0)
|
if (pFX->yrepeat > 0)
|
||||||
pSprite->yrepeat = pFX->at15;
|
pSprite->yrepeat = pFX->yrepeat;
|
||||||
if ((pFX->Kills & 1) && Chance(0x8000))
|
if ((pFX->flags & 1) && Chance(0x8000))
|
||||||
pSprite->cstat |= 4;
|
pSprite->cstat |= 4;
|
||||||
if ((pFX->Kills & 2) && Chance(0x8000))
|
if ((pFX->flags & 2) && Chance(0x8000))
|
||||||
pSprite->cstat |= 8;
|
pSprite->cstat |= 8;
|
||||||
if (pFX->at2)
|
if (pFX->seq)
|
||||||
{
|
{
|
||||||
int nXSprite = dbInsertXSprite(pSprite->index);
|
int nXSprite = dbInsertXSprite(pSprite->index);
|
||||||
seqSpawn(pFX->at2, 3, nXSprite, -1);
|
seqSpawn(pFX->seq, 3, nXSprite, -1);
|
||||||
}
|
}
|
||||||
if (a6 == 0)
|
if (a6 == 0)
|
||||||
a6 = pFX->ate;
|
a6 = pFX->ate;
|
||||||
|
@ -203,7 +203,7 @@ void CFX::fxProcess(void)
|
||||||
assert(nSector >= 0 && nSector < kMaxSectors);
|
assert(nSector >= 0 && nSector < kMaxSectors);
|
||||||
assert(pSprite->type < kFXMax);
|
assert(pSprite->type < kFXMax);
|
||||||
FXDATA *pFXData = &gFXData[pSprite->type];
|
FXDATA *pFXData = &gFXData[pSprite->type];
|
||||||
actAirDrag(pSprite, pFXData->ata);
|
actAirDrag(pSprite, pFXData->drag);
|
||||||
if (xvel[nSprite])
|
if (xvel[nSprite])
|
||||||
pSprite->x += xvel[nSprite]>>12;
|
pSprite->x += xvel[nSprite]>>12;
|
||||||
if (yvel[nSprite])
|
if (yvel[nSprite])
|
||||||
|
@ -257,7 +257,7 @@ void CFX::fxProcess(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zvel[nSprite] += pFXData->at6;
|
zvel[nSprite] += pFXData->gravity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,9 +349,9 @@ void fxPrecache()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < kFXMax; i++)
|
for (int i = 0; i < kFXMax; i++)
|
||||||
{
|
{
|
||||||
tilePrecacheTile(gFXData[i].at12, 0, 0);
|
tilePrecacheTile(gFXData[i].picnum, 0, 0);
|
||||||
if (gFXData[i].at2)
|
if (gFXData[i].seq)
|
||||||
seqPrecacheId(gFXData[i].at2, 0);
|
seqPrecacheId(gFXData[i].seq, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue