From 6dbb5a0b8c06608baef984582e205c3af2567d23 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Sep 2022 20:19:18 +0200 Subject: [PATCH] - renamed 4 fields in XSECTOR --- source/games/blood/src/db.cpp | 8 ++++---- source/games/blood/src/loadsave.cpp | 8 ++++---- source/games/blood/src/mapstructs.h | 8 ++++---- source/games/blood/src/nnexts.cpp | 8 ++++---- source/games/blood/src/triggers.cpp | 28 ++++++++++++++-------------- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/source/games/blood/src/db.cpp b/source/games/blood/src/db.cpp index 85faf224c..ed677d36d 100644 --- a/source/games/blood/src/db.cpp +++ b/source/games/blood/src/db.cpp @@ -348,10 +348,10 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur pXSector->stopOn = bitReader.readUnsigned(1); pXSector->stopOff = bitReader.readUnsigned(1); pXSector->ceilpal = bitReader.readUnsigned(4); - pXSector->offCeilZ = bitReader.readSigned(32); - pXSector->onCeilZ = bitReader.readSigned(32); - pXSector->offFloorZ = bitReader.readSigned(32); - pXSector->onFloorZ = bitReader.readSigned(32); + pXSector->_offCeilZ = bitReader.readSigned(32); + pXSector->_onCeilZ = bitReader.readSigned(32); + pXSector->_offFloorZ = bitReader.readSigned(32); + pXSector->_onFloorZ = bitReader.readSigned(32); /*pXSector->marker0 =*/ bitReader.readUnsigned(16); /*pXSector->marker1 =*/ bitReader.readUnsigned(16); pXSector->Crush = bitReader.readUnsigned(1); diff --git a/source/games/blood/src/loadsave.cpp b/source/games/blood/src/loadsave.cpp index 814166a40..c2c746ff0 100644 --- a/source/games/blood/src/loadsave.cpp +++ b/source/games/blood/src/loadsave.cpp @@ -559,10 +559,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XSECTOR& w, XSECTO ("data", w.data, def->data) ("txid", w.txID, def->txID) ("rxid", w.rxID, def->rxID) - ("offceilz", w.offCeilZ, def->offCeilZ) - ("onceilz", w.onCeilZ, def->onCeilZ) - ("offloorz", w.offFloorZ, def->offFloorZ) - ("onloorz", w.onFloorZ, def->onFloorZ) + ("offceilz", w._offCeilZ, def->_offCeilZ) + ("onceilz", w._onCeilZ, def->_onCeilZ) + ("offloorz", w._offFloorZ, def->_offFloorZ) + ("onloorz", w._onFloorZ, def->_onFloorZ) ("windvel", w.windVel, def->windVel) ("busytimea", w.busyTimeA, def->busyTimeA) ("busytimeb", w.busyTimeB, def->busyTimeB) diff --git a/source/games/blood/src/mapstructs.h b/source/games/blood/src/mapstructs.h index b58f34537..2dcedef96 100644 --- a/source/games/blood/src/mapstructs.h +++ b/source/games/blood/src/mapstructs.h @@ -190,10 +190,10 @@ struct XSECTOR { DBloodActor* actordata; uint32_t busy; - int32_t offCeilZ; - int32_t onCeilZ; - int32_t offFloorZ; - int32_t onFloorZ; + int32_t _offCeilZ; + int32_t _onCeilZ; + int32_t _offFloorZ; + int32_t _onFloorZ; uint32_t windVel; // Wind vel (changed from 10 bit to use higher velocity values) uint16_t data; // Data diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index f75bc64d5..1b2924323 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -4232,13 +4232,13 @@ bool condCheckSector(DBloodActor* aCond, int cmpOp, bool PUSH) case kSectorSlide: if (cond == 55)// 60) { - h = ClipLow(abs(pXSect->onFloorZ - pXSect->offFloorZ), 1); - curH = abs(pSect->int_floorz() - pXSect->offFloorZ); + h = ClipLow(abs(pXSect->_onFloorZ - pXSect->_offFloorZ), 1); + curH = abs(pSect->int_floorz() - pXSect->_offFloorZ); } else { - h = ClipLow(abs(pXSect->onCeilZ - pXSect->offCeilZ), 1); - curH = abs(pSect->int_ceilingz() - pXSect->offCeilZ); + h = ClipLow(abs(pXSect->_onCeilZ - pXSect->_offCeilZ), 1); + curH = abs(pSect->int_ceilingz() - pXSect->_offCeilZ); } return condCmp((kPercFull * curH) / h, arg1, arg2, cmpOp); default: diff --git a/source/games/blood/src/triggers.cpp b/source/games/blood/src/triggers.cpp index ed3089463..292e3f7b8 100644 --- a/source/games/blood/src/triggers.cpp +++ b/source/games/blood/src/triggers.cpp @@ -1001,8 +1001,8 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4) { viewInterpolateSector(pSector); - int dfz = pXSector->onFloorZ - pXSector->offFloorZ; - int dcz = pXSector->onCeilZ - pXSector->offCeilZ; + int dfz = pXSector->_onFloorZ - pXSector->_offFloorZ; + int dcz = pXSector->_onCeilZ - pXSector->_offCeilZ; #ifdef NOONE_EXTENSIONS // get pointer to sprites near outside walls before translation @@ -1013,7 +1013,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4) if (dfz != 0) { double old_Z = pSector->floorz; - pSector->set_int_floorz((pXSector->offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16))); + pSector->set_int_floorz((pXSector->_offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16))); pSector->baseFloor = pSector->floorz; pSector->velFloor += (pSector->floorz - old_Z); @@ -1061,7 +1061,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4) if (dcz != 0) { double old_Z = pSector->ceilingz; - pSector->set_int_ceilingz((pXSector->offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16))); + pSector->set_int_ceilingz((pXSector->_offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16))); pSector->baseCeil = pSector->ceilingz; pSector->velCeil += pSector->ceilingz - old_Z; @@ -1174,12 +1174,12 @@ int VCrushBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator) nWave = pXSector->busyWaveA; else nWave = pXSector->busyWaveB; - int dz1 = pXSector->onCeilZ - pXSector->offCeilZ; - int vc = pXSector->offCeilZ; + int dz1 = pXSector->_onCeilZ - pXSector->_offCeilZ; + int vc = pXSector->_offCeilZ; if (dz1 != 0) vc += MulScale(dz1, GetWaveValue(a2, nWave), 16); - int dz2 = pXSector->onFloorZ - pXSector->offFloorZ; - int v10 = pXSector->offFloorZ; + int dz2 = pXSector->_onFloorZ - pXSector->_offFloorZ; + int v10 = pXSector->_offFloorZ; if (dz2 != 0) v10 += MulScale(dz2, GetWaveValue(a2, nWave), 16); int v18; @@ -1217,7 +1217,7 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator) nWave = pXSector->busyWaveA; else nWave = pXSector->busyWaveB; - int dz1 = pXSector->onFloorZ - pXSector->offFloorZ; + int dz1 = pXSector->_onFloorZ - pXSector->_offFloorZ; if (dz1 != 0) { BloodSectIterator it(pSector); @@ -1230,7 +1230,7 @@ int VSpriteBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator) } } } - int dz2 = pXSector->onCeilZ - pXSector->offCeilZ; + int dz2 = pXSector->_onCeilZ - pXSector->_offCeilZ; if (dz2 != 0) { BloodSectIterator it(pSector); @@ -1275,7 +1275,7 @@ int VDoorBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator) if (actor && a2 > pXSector->busy) { assert(actor->hasX()); - if (pXSector->onCeilZ > pXSector->offCeilZ || pXSector->onFloorZ < pXSector->offFloorZ) + if (pXSector->_onCeilZ > pXSector->_offCeilZ || pXSector->_onFloorZ < pXSector->_offFloorZ) { if (pXSector->interruptable) { @@ -1307,7 +1307,7 @@ int VDoorBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator) else if (actor && a2 < pXSector->busy) { assert(actor->hasX()); - if (pXSector->offCeilZ > pXSector->onCeilZ || pXSector->offFloorZ < pXSector->onFloorZ) + if (pXSector->_offCeilZ > pXSector->_onCeilZ || pXSector->_offFloorZ < pXSector->_onFloorZ) { if (pXSector->interruptable) { @@ -1678,8 +1678,8 @@ void OperatePath(sectortype* pSector, EVENT event) } pXSector->marker1 = actor; - pXSector->offFloorZ = marker0->int_pos().Z; - pXSector->onFloorZ = actor->int_pos().Z; + pXSector->_offFloorZ = marker0->int_pos().Z; + pXSector->_onFloorZ = actor->int_pos().Z; switch (event.cmd) { case kCmdOn: pXSector->state = 0;