This commit is contained in:
Christoph Oelckers 2021-11-22 23:45:19 +01:00
parent 7713723045
commit a58548c2f9
3 changed files with 79 additions and 83 deletions

View file

@ -295,8 +295,8 @@ int BuildArrow(DExhumedActor* nSprite, int nVal);
int BuildFireBall(DExhumedActor*, int a, int b);
void BuildDrip(DExhumedActor* nSprite);
DExhumedActor* BuildEnergyBlock(int nSector);
int BuildElevC(int arg1, int nChannel, int nSector, DExhumedActor* nWallSprite, int arg5, int arg6, int nCount, ...);
int BuildElevF(int nChannel, int nSector, DExhumedActor* nWallSprite, int arg_4, int arg_5, int nCount, ...);
int BuildElevC(int arg1, int nChannel, sectortype* nSector, DExhumedActor* nWallSprite, int arg5, int arg6, int nCount, ...);
int BuildElevF(int nChannel, sectortype* nSector, DExhumedActor* nWallSprite, int arg_4, int arg_5, int nCount, ...);
int BuildWallFace(int nChannel, walltype* pWall, int nCount, ...);
int BuildSlide(int nChannel, walltype* edx, walltype* ebx, walltype* ecx, walltype* arg1, walltype* arg2, walltype* arg3);

View file

@ -75,9 +75,9 @@ struct Drip
struct Elev
{
DExhumedActor* pActor;
sectortype* pSector;
int16_t nFlags;
int16_t nChannel;
int nSector;
int nParam1;
int nParam2;
int16_t nCountZOffsets; // count of items in zOffsets
@ -229,7 +229,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Elev& w, Elev* def
{
arc("at0", w.nFlags)
("channel", w.nChannel)
("sector", w.nSector)
("sector", w.pSector)
("at6", w.nParam1)
("ata", w.nParam2)
("countz", w.nCountZOffsets)
@ -376,15 +376,15 @@ void InitElev()
}
// done
DExhumedActor* BuildWallSprite(int nSector)
DExhumedActor* BuildWallSprite(sectortype* pSector)
{
auto wal = sector[nSector].firstWall();
auto wal = pSector->firstWall();
auto pActor = insertActor(nSector, 401);
auto pActor = insertActor(pSector, 401);
auto pSprite = &pActor->s();
pSprite->pos.vec2 = wal->center();
pSprite->z = (sector[nSector].floorz + sector[nSector].ceilingz) / 2;
pSprite->z = (pSector->floorz + pSector->ceilingz) / 2;
pSprite->cstat = 0x8000;
return pActor;
@ -447,12 +447,12 @@ DExhumedActor* FindWallSprites(int nSector)
if (pAct == nullptr)
{
pAct = insertActor(nSector, 401);
pAct = insertActor(pSector, 401);
auto pSprite = &pAct->s();
pSprite->x = (var_24 + esi) / 2;
pSprite->y = (ecx + edi) / 2;
pSprite->z = sector[nSector].floorz;
pSprite->z = pSector->floorz;
pSprite->cstat = 0x8000;
pSprite->owner = -1;
pSprite->lotag = 0;
@ -462,7 +462,7 @@ DExhumedActor* FindWallSprites(int nSector)
return pAct;
}
int BuildElevF(int nChannel, int nSector, DExhumedActor* nWallSprite, int arg_4, int arg_5, int nCount, ...)
int BuildElevF(int nChannel, sectortype* pSector, DExhumedActor* nWallSprite, int arg_4, int arg_5, int nCount, ...)
{
auto ElevCount = Elevator.Reserve(1);
@ -471,12 +471,12 @@ int BuildElevF(int nChannel, int nSector, DExhumedActor* nWallSprite, int arg_4,
Elevator[ElevCount].nRunRec = -1;
Elevator[ElevCount].nParam2 = arg_5;
Elevator[ElevCount].nChannel = nChannel;
Elevator[ElevCount].nSector = nSector;
Elevator[ElevCount].pSector = pSector;
Elevator[ElevCount].nCountZOffsets = 0;
Elevator[ElevCount].nCurZOffset = 0;
if (nWallSprite == nullptr) {
nWallSprite = BuildWallSprite(nSector);
nWallSprite = BuildWallSprite(pSector);
}
Elevator[ElevCount].pActor = nWallSprite;
@ -501,7 +501,7 @@ int BuildElevF(int nChannel, int nSector, DExhumedActor* nWallSprite, int arg_4,
return ElevCount;
}
int BuildElevC(int arg1, int nChannel, int nSector, DExhumedActor* nWallSprite, int arg5, int arg6, int nCount, ...)
int BuildElevC(int arg1, int nChannel, sectortype* pSector, DExhumedActor* nWallSprite, int arg5, int arg6, int nCount, ...)
{
int edi = arg5;
@ -520,10 +520,10 @@ int BuildElevC(int arg1, int nChannel, int nSector, DExhumedActor* nWallSprite,
Elevator[ElevCount].nParam2 = arg6;
Elevator[ElevCount].nRunRec = -1;
Elevator[ElevCount].nChannel = nChannel;
Elevator[ElevCount].nSector = nSector;
Elevator[ElevCount].pSector = pSector;
if (nWallSprite == nullptr) {
nWallSprite = BuildWallSprite(nSector);
nWallSprite = BuildWallSprite(pSector);
}
Elevator[ElevCount].pActor = nWallSprite;
@ -577,15 +577,15 @@ int LongSeek(int* pZVal, int a2, int a3, int a4)
}
// done
int CheckSectorSprites(int nSector, int nVal)
int CheckSectorSprites(sectortype* pSector, int nVal)
{
int b = 0;
if (nVal)
{
int nZDiff = sector[nSector].floorz - sector[nSector].ceilingz;
int nZDiff = pSector->floorz - pSector->ceilingz;
ExhumedSectIterator it(nSector);
ExhumedSectIterator it(pSector);
while (auto pActor= it.Next())
{
auto pSprite = &pActor->s();
@ -612,7 +612,7 @@ int CheckSectorSprites(int nSector, int nVal)
}
else
{
ExhumedSectIterator it(nSector);
ExhumedSectIterator it(pSector);
while (auto pActor = it.Next())
{
if (pActor->s().cstat & 0x101) {
@ -750,7 +750,7 @@ void AIElev::Tick(RunListEvent* ev)
assert(nChannel >= 0 && nChannel < kMaxChannels);
int nSector =Elevator[nElev].nSector;
auto pSector =Elevator[nElev].pSector;
auto pElevSpr = Elevator[nElev].pActor;
int ebp = 0; // initialise to *something*
@ -760,10 +760,8 @@ void AIElev::Tick(RunListEvent* ev)
int nZOffset = Elevator[nElev].nCurZOffset;
int nZVal = Elevator[nElev].zOffsets[nZOffset];
int nSectorB = nSector;
StartInterpolation(nSector, Interp_Sect_Floorz);
int nVal = LongSeek((int*)&sector[nSector].floorz, nZVal, Elevator[nElev].nParam1, Elevator[nElev].nParam2);
StartInterpolation(pSector, Interp_Sect_Floorz);
int nVal = LongSeek((int*)&pSector->floorz, nZVal, Elevator[nElev].nParam1, Elevator[nElev].nParam2);
ebp = nVal;
if (!nVal)
@ -785,10 +783,9 @@ void AIElev::Tick(RunListEvent* ev)
}
else
{
assert(nSector == nSectorB);
MoveSectorSprites(&sector[nSector], nVal);
MoveSectorSprites(pSector, nVal);
if (nVal < 0 && CheckSectorSprites(nSector, 2))
if (nVal < 0 && CheckSectorSprites(pSector, 2))
{
runlist_ChangeChannel(nChannel, sRunChannels[nChannel].c == 0);
return;
@ -798,13 +795,12 @@ void AIElev::Tick(RunListEvent* ev)
else
{
// loc_20FC3:
int ceilZ = sector[nSector].ceilingz;
sectortype* cursect = &sector[nSector];
int ceilZ = pSector->ceilingz;
int nZOffset = Elevator[nElev].nCurZOffset;
int zVal = Elevator[nElev].zOffsets[nZOffset];
StartInterpolation(nSector, Interp_Sect_Ceilingz);
StartInterpolation(pSector, Interp_Sect_Ceilingz);
int nVal = LongSeek(&ceilZ, zVal, Elevator[nElev].nParam1, Elevator[nElev].nParam2);
ebp = nVal;
@ -841,13 +837,13 @@ void AIElev::Tick(RunListEvent* ev)
if (var_18 & 0x4)
{
if (CheckSectorSprites(nSector, 1)) {
if (CheckSectorSprites(pSector, 1)) {
return;
}
}
else
{
if (CheckSectorSprites(nSector, 0))
if (CheckSectorSprites(pSector, 0))
{
runlist_ChangeChannel(nChannel, sRunChannels[nChannel].c == 0);
return;
@ -855,8 +851,8 @@ void AIElev::Tick(RunListEvent* ev)
}
}
StartInterpolation(nSector, Interp_Sect_Ceilingz);
cursect->ceilingz = ceilZ;
StartInterpolation(pSector, Interp_Sect_Ceilingz);
pSector->ceilingz = ceilZ;
}
// maybe this doesn't go here?

View file

@ -667,7 +667,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
auto nextSectorP = nextsectorneighborzptr(nSector, sectp->ceilingz, -1, -1);
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -686,7 +686,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
auto nextSectorP = nextsectorneighborzptr(nSector, sectp->floorz, 1, 1);
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -735,7 +735,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
auto nextSectorP = nextsectorneighborzptr(nSector, sectp->floorz + 1, -1, -1);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -747,7 +747,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 400, 400, 2, nextSectorP->floorz, sectp->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 400, 400, 2, nextSectorP->floorz, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -765,7 +765,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -785,7 +785,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -797,7 +797,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -813,7 +813,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -843,7 +843,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
zVal = nextSectorP->floorz;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -863,7 +863,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
zVal = nextSectorP->floorz;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -887,7 +887,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
zVal = nextSectorP->floorz;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -903,7 +903,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -911,7 +911,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
case 16: // Stuttering noise (floor makes noise)
{
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, sectp->floorz - 8);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, sectp->floorz - 8);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -927,7 +927,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
case 17: // Reserved?
{
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, sectp->floorz - 8);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, sectp->floorz - 8);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -941,13 +941,13 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
{
int ebx = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->floorz, ebx);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->floorz, ebx);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
int ebx2 = (((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz) - 8;
int nElev2 = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, ebx2);
int nElev2 = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, ebx2);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev2, 0);
@ -979,7 +979,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
zVal = nextSectorP->floorz;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 32767, 200, 2, sectp->floorz, zVal);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 32767, 200, 2, sectp->floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -995,7 +995,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1011,7 +1011,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1027,7 +1027,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1043,7 +1043,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1059,7 +1059,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1075,7 +1075,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1091,7 +1091,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1103,7 +1103,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(20, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, sectp->floorz);
int nElev = BuildElevC(20, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1115,7 +1115,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(28, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, sectp->floorz);
int nElev = BuildElevC(28, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1141,7 +1141,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1153,7 +1153,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1217,7 +1217,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
zVal = nextSectorP->ceilingz;
}
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, zVal);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1229,7 +1229,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1241,7 +1241,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 200, 2, nextSectorP->floorz, sectp->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 0x7FFF, 200, 2, nextSectorP->floorz, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1251,13 +1251,13 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
{
int edx = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->floorz, edx);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->floorz, edx);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
int eax = (((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz) - 8;
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, eax);
nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), 200, nSpeed * 100, 2, sectp->ceilingz, eax);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1271,13 +1271,13 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
{
int eax = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
eax = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->ceilingz);
nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1295,13 +1295,13 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
{
int eax = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->floorz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
eax = ((sectp->floorz - sectp->ceilingz) / 2) + sectp->ceilingz;
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->ceilingz);
nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sectp->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1317,7 +1317,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1333,7 +1333,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1349,7 +1349,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1361,7 +1361,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->ceilingz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1385,7 +1385,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
auto nextSectorP = nextsectorneighborzptr(nSector, sectp->ceilingz, -1, -1);
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1397,7 +1397,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1428,7 +1428,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
var_1C++;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_1C,
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_1C,
zListB[0], zListB[1], zListB[2], zListB[3], zListB[4], zListB[5], zListB[6], zListB[7]);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1452,7 +1452,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
var_20++;
}
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_20,
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_20,
zListA[0], zListA[1], zListA[2], zListA[3], zListA[4], zListA[5], zListA[6], zListA[7]);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1472,7 +1472,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sectp->floorz, nextSectorP->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1485,7 +1485,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sectp->floorz, (int)nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sectp->floorz, (int)nextSectorP->ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1501,7 +1501,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
case 75:
{
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sectp->ceilingz, (int)sectp->floorz);
int nElev = BuildElevC(0, nChannel, sectp, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sectp->ceilingz, (int)sectp->floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;