diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index 9ee8ec4fe..074b71f03 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -32,18 +32,18 @@ CFX gFX; struct FXDATA { CALLBACK_ID funcID; // callback - char at1; // detail - short at2; // seq - short Kills; // flags - int at6; // gravity - int ata; // air drag + uint8_t detail; // detail + short seq; // seq + short flags; // flags + int gravity; // gravity + int drag; // air drag int ate; - short at12; // picnum - unsigned char at14; // xrepeat - unsigned char at15; // yrepeat - short at16; // cstat - signed char at18; // shade - char at19; // pal + short picnum; // picnum + uint8_t xrepeat; // xrepeat + uint8_t yrepeat; // yrepeat + short cstat; // cstat + int8_t shade; // shade + uint8_t pal; // pal }; 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); pSprite->type = nFx; - pSprite->picnum = pFX->at12; - pSprite->cstat |= pFX->at16; - pSprite->shade = pFX->at18; - pSprite->pal = pFX->at19; - sprite[pSprite->index].detail = pFX->at1; - if (pFX->at14 > 0) - pSprite->xrepeat = pFX->at14; - if (pFX->at15 > 0) - pSprite->yrepeat = pFX->at15; - if ((pFX->Kills & 1) && Chance(0x8000)) + pSprite->picnum = pFX->picnum; + pSprite->cstat |= pFX->cstat; + pSprite->shade = pFX->shade; + pSprite->pal = pFX->pal; + sprite[pSprite->index].detail = pFX->detail; + if (pFX->xrepeat > 0) + pSprite->xrepeat = pFX->xrepeat; + if (pFX->yrepeat > 0) + pSprite->yrepeat = pFX->yrepeat; + if ((pFX->flags & 1) && Chance(0x8000)) pSprite->cstat |= 4; - if ((pFX->Kills & 2) && Chance(0x8000)) + if ((pFX->flags & 2) && Chance(0x8000)) pSprite->cstat |= 8; - if (pFX->at2) + if (pFX->seq) { int nXSprite = dbInsertXSprite(pSprite->index); - seqSpawn(pFX->at2, 3, nXSprite, -1); + seqSpawn(pFX->seq, 3, nXSprite, -1); } if (a6 == 0) a6 = pFX->ate; @@ -203,7 +203,7 @@ void CFX::fxProcess(void) assert(nSector >= 0 && nSector < kMaxSectors); assert(pSprite->type < kFXMax); FXDATA *pFXData = &gFXData[pSprite->type]; - actAirDrag(pSprite, pFXData->ata); + actAirDrag(pSprite, pFXData->drag); if (xvel[nSprite]) pSprite->x += xvel[nSprite]>>12; if (yvel[nSprite]) @@ -257,7 +257,7 @@ void CFX::fxProcess(void) continue; } } - zvel[nSprite] += pFXData->at6; + zvel[nSprite] += pFXData->gravity; } } @@ -349,9 +349,9 @@ void fxPrecache() { for (int i = 0; i < kFXMax; i++) { - tilePrecacheTile(gFXData[i].at12, 0, 0); - if (gFXData[i].at2) - seqPrecacheId(gFXData[i].at2, 0); + tilePrecacheTile(gFXData[i].picnum, 0, 0); + if (gFXData[i].seq) + seqPrecacheId(gFXData[i].seq, 0); } }