mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
-renamed spritetype’s owner field to ‚intowner‘
Mainly for easier searching. Also remove the duplicate ‚detail‘ field.
This commit is contained in:
parent
4278f0113b
commit
aab13addb7
41 changed files with 93 additions and 93 deletions
|
@ -500,7 +500,7 @@ DEFINE_FIELD_NAMED(DCoreActor, spr.xrepeat, xrepeat)
|
|||
DEFINE_FIELD_NAMED(DCoreActor, spr.yrepeat, yrepeat)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, spr.xoffset, xoffset)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, spr.yoffset, yoffset)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, spr.owner, owner)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, spr.intowner, owner)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, sprext.mdanimtims, mdanimtims)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, sprext.mdanimcur, mdanimcur)
|
||||
DEFINE_FIELD_NAMED(DCoreActor, sprext.angoff, angoff)
|
||||
|
|
|
@ -499,6 +499,7 @@ tspritetype* renderAddTsprite(tspritetype* tsprite, int& spritesortcnt, DCoreAct
|
|||
tspr->hitag = actor->spr.hitag;
|
||||
tspr->extra = actor->spr.extra;
|
||||
tspr->time = actor->time;
|
||||
tspr->cstat2 = actor->spr.cstat2;
|
||||
tspr->ownerActor = actor;
|
||||
|
||||
// need to copy the slope sprite flag around because for tsprites the bit combination means 'voxel'.
|
||||
|
|
|
@ -309,7 +309,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)
|
|||
secno = fr.ReadInt16();
|
||||
spr.statnum = fr.ReadInt16();
|
||||
spr.ang = fr.ReadInt16();
|
||||
spr.owner = fr.ReadInt16();
|
||||
spr.intowner = fr.ReadInt16();
|
||||
spr.xvel = fr.ReadInt16();
|
||||
spr.yvel = fr.ReadInt16();
|
||||
spr.zvel = fr.ReadInt16();
|
||||
|
@ -337,7 +337,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno)
|
|||
spr.xvel = fr.ReadInt16();
|
||||
spr.yvel = fr.ReadInt16();
|
||||
spr.zvel = fr.ReadInt16();
|
||||
spr.owner = fr.ReadInt16();
|
||||
spr.intowner = fr.ReadInt16();
|
||||
secno = fr.ReadInt16();
|
||||
spr.statnum = fr.ReadInt16();
|
||||
spr.lotag = fr.ReadInt16();
|
||||
|
@ -363,7 +363,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr, int& secno)
|
|||
spr.xvel = fr.ReadInt16();
|
||||
spr.yvel = fr.ReadInt16();
|
||||
spr.zvel = fr.ReadInt16();
|
||||
spr.owner = fr.ReadInt16();
|
||||
spr.intowner = fr.ReadInt16();
|
||||
secno = fr.ReadInt16();
|
||||
spr.statnum = fr.ReadInt16();
|
||||
spr.lotag = fr.ReadInt16();
|
||||
|
|
|
@ -459,6 +459,7 @@ struct spritetypebase
|
|||
union { int16_t hitag, flags; };
|
||||
int16_t extra;
|
||||
int16_t detail;
|
||||
uint16_t cstat2;
|
||||
|
||||
int8_t shade;
|
||||
uint8_t pal;
|
||||
|
@ -473,9 +474,7 @@ struct spritetypebase
|
|||
|
||||
struct spritetype : public spritetypebase
|
||||
{
|
||||
int16_t owner;
|
||||
int16_t detail;
|
||||
uint16_t cstat2;
|
||||
int16_t intowner;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -462,7 +462,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, spritetype &c, spritet
|
|||
("statnum", c.statnum)
|
||||
("sectnum", c.sectp)
|
||||
("ang", c.ang, def->ang)
|
||||
("owner", c.owner, def->owner)
|
||||
("owner", c.intowner, def->intowner)
|
||||
("xvel", c.xvel, def->xvel)
|
||||
("yvel", c.yvel, def->yvel)
|
||||
("zvel", c.zvel, def->zvel)
|
||||
|
|
|
@ -487,7 +487,7 @@ DEFINE_PROPERTY(yoffset, I, CoreActor)
|
|||
DEFINE_PROPERTY(owner, I, CoreActor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
bag.Info->ActorInfo()->defsprite.owner = i;
|
||||
bag.Info->ActorInfo()->defsprite.intowner = i;
|
||||
bag.Info->ActorInfo()->DefaultCstat |= DEFF_OWNER;
|
||||
}
|
||||
|
||||
|
|
|
@ -6653,7 +6653,7 @@ bool actCheckRespawn(DBloodActor* actor)
|
|||
if (nRespawnTime > 0)
|
||||
{
|
||||
if (actor->xspr.respawnPending == 1) nRespawnTime = MulScale(nRespawnTime, 0xa000, 16);
|
||||
actor->spr.owner = actor->spr.statnum;
|
||||
actor->spr.intowner = actor->spr.statnum;
|
||||
actPostSprite(actor, kStatRespawn);
|
||||
actor->spr.flags |= kHitagRespawn;
|
||||
|
||||
|
|
|
@ -746,7 +746,7 @@ void viewProcessSprites(tspritetype* tsprite, int& spritesortcnt, int32_t cX, in
|
|||
}
|
||||
nShade += tileShade[pTSprite->picnum];
|
||||
pTSprite->shade = ClipRange(nShade, -128, 127);
|
||||
if ((pTSprite->flags & kHitagRespawn) && pTSprite->ownerActor->spr.owner == 3 && owneractor->hasX()) // Where does this 3 come from? Nothing sets it.
|
||||
if ((pTSprite->flags & kHitagRespawn) && pTSprite->ownerActor->spr.intowner == 3 && owneractor->hasX()) // Where does this 3 come from? Nothing sets it.
|
||||
{
|
||||
pTSprite->xrepeat = 48;
|
||||
pTSprite->yrepeat = 48;
|
||||
|
|
|
@ -54,7 +54,7 @@ void ambProcess(void)
|
|||
BloodStatIterator it(kStatAmbience);
|
||||
while (DBloodActor* actor = it.Next())
|
||||
{
|
||||
if (actor->spr.owner < 0 || actor->spr.owner >= kMaxAmbChannel)
|
||||
if (actor->spr.intowner < 0 || actor->spr.intowner >= kMaxAmbChannel)
|
||||
continue;
|
||||
if (actor->hasX())
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ void ambProcess(void)
|
|||
dz >>= 8;
|
||||
int nDist = ksqrt(dx*dx+dy*dy+dz*dz);
|
||||
int vs = MulScale(actor->xspr.data4, actor->xspr.busy, 16);
|
||||
ambChannels[actor->spr.owner].distance += ClipRange(scale(nDist, actor->xspr.data1, actor->xspr.data2, vs, 0), 0, vs);
|
||||
ambChannels[actor->spr.intowner].distance += ClipRange(scale(nDist, actor->xspr.data1, actor->xspr.data2, vs, 0), 0, vs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ void ambInit(void)
|
|||
if (i == nAmbChannels) {
|
||||
|
||||
if (i >= kMaxAmbChannel) {
|
||||
actor->spr.owner = -1;
|
||||
actor->spr.intowner = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ void ambInit(void)
|
|||
|
||||
}
|
||||
|
||||
actor->spr.owner = i;
|
||||
actor->spr.intowner = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ void PropagateMarkerReferences(void)
|
|||
case kMarkerAxis:
|
||||
case kMarkerWarpDest:
|
||||
{
|
||||
int nOwner = actor->spr.owner;
|
||||
int nOwner = actor->spr.intowner;
|
||||
if (validSectorIndex(nOwner))
|
||||
{
|
||||
if (sector[nOwner].hasX())
|
||||
|
@ -203,7 +203,7 @@ void PropagateMarkerReferences(void)
|
|||
break;
|
||||
case kMarkerOn:
|
||||
{
|
||||
int nOwner = actor->spr.owner;
|
||||
int nOwner = actor->spr.intowner;
|
||||
if (validSectorIndex(nOwner))
|
||||
{
|
||||
if (sector[nOwner].hasX())
|
||||
|
|
|
@ -86,12 +86,12 @@ public:
|
|||
void SetSpecialOwner() // nnext hackery
|
||||
{
|
||||
ownerActor = nullptr;
|
||||
spr.owner = kMagicOwner;
|
||||
spr.intowner = kMagicOwner;
|
||||
}
|
||||
|
||||
bool GetSpecialOwner()
|
||||
{
|
||||
return ownerActor == nullptr && (spr.owner == kMagicOwner);
|
||||
return ownerActor == nullptr && (spr.intowner == kMagicOwner);
|
||||
}
|
||||
|
||||
bool IsPlayerActor()
|
||||
|
|
|
@ -285,9 +285,9 @@ void Respawn(DBloodActor* actor, sectortype*) // 9
|
|||
break;
|
||||
}
|
||||
case 3: {
|
||||
assert(actor->spr.owner != kStatRespawn);
|
||||
assert(actor->spr.owner >= 0 && actor->spr.owner < kMaxStatus);
|
||||
ChangeActorStat(actor, actor->spr.owner);
|
||||
assert(actor->spr.intowner != kStatRespawn);
|
||||
assert(actor->spr.intowner >= 0 && actor->spr.intowner < kMaxStatus);
|
||||
ChangeActorStat(actor, actor->spr.intowner);
|
||||
actor->spr.type = actor->spr.inittype;
|
||||
actor->SetOwner(nullptr);
|
||||
actor->spr.flags &= ~kHitagRespawn;
|
||||
|
|
|
@ -484,7 +484,7 @@ void dbLoadMap(const char* pPath, int* pX, int* pY, int* pZ, short* pAngle, int*
|
|||
int secno = LittleShort(load.sectnum);
|
||||
pSprite->statnum = LittleShort(load.statnum);
|
||||
pSprite->ang = LittleShort(load.ang);
|
||||
pSprite->owner = LittleShort(load.owner);
|
||||
pSprite->intowner = LittleShort(load.owner);
|
||||
pSprite->xvel = LittleShort(load.index);
|
||||
pSprite->yvel = LittleShort(load.yvel);
|
||||
pSprite->inittype = LittleShort(load.inittype);
|
||||
|
|
|
@ -1244,8 +1244,8 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
case ACTOR_OWNER:
|
||||
// there is no way to handle this well because we do not know whether this is an actor or not. Pity.
|
||||
if (bSet) act->spr.owner = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.owner, sActor, sPlayer);
|
||||
if (bSet) act->spr.intowner = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.intowner, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_XVEL:
|
||||
if (bSet) act->spr.xvel = lValue;
|
||||
|
|
|
@ -98,13 +98,13 @@ public:
|
|||
|
||||
inline bool IsActiveCrane()
|
||||
{
|
||||
return spr.owner == -2;
|
||||
return spr.intowner == -2;
|
||||
}
|
||||
|
||||
inline void SetActiveCrane(bool yes)
|
||||
{
|
||||
ownerActor = nullptr;
|
||||
spr.owner = yes ? -2 : -1;
|
||||
spr.intowner = yes ? -2 : -1;
|
||||
}
|
||||
|
||||
int PlayerIndex() const
|
||||
|
|
|
@ -99,7 +99,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, int x, int y,
|
|||
}
|
||||
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.owner = -1;
|
||||
pActor->spr.intowner = -1;
|
||||
pActor->spr.extra = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x100000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x100000);
|
||||
|
|
|
@ -102,7 +102,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
|
|||
ap->pTarget = nullptr;
|
||||
ap->nCount = 0;
|
||||
|
||||
ap->spr.owner = runlist_AddRunRec(ap->spr.lotag - 1, ap, 0x90000);
|
||||
ap->spr.intowner = runlist_AddRunRec(ap->spr.lotag - 1, ap, 0x90000);
|
||||
|
||||
runlist_AddRunRec(NewRun, ap, 0x90000);
|
||||
nCreaturesTotal++;
|
||||
|
|
|
@ -28,7 +28,7 @@ BEGIN_PS_NS
|
|||
void DestroyBubble(DExhumedActor* pActor)
|
||||
{
|
||||
runlist_DoSubRunRec(pActor->spr.lotag - 1);
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
DeleteActor(pActor);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ DExhumedActor* BuildBubble(vec3_t pos, sectortype* pSector)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nIndex = SeqOffsets[kSeqBubble] + nSize;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x140000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x140000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x140000);
|
||||
return pActor;
|
||||
|
|
|
@ -70,7 +70,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pChunkActor->spr.extra = -1;
|
||||
pChunkActor->spr.owner = runlist_AddRunRec(pChunkActor->spr.lotag - 1, pChunkActor, 0x200000);
|
||||
pChunkActor->spr.intowner = runlist_AddRunRec(pChunkActor->spr.lotag - 1, pChunkActor, 0x200000);
|
||||
pChunkActor->spr.hitag = runlist_AddRunRec(NewRun, pChunkActor, 0x200000);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
if ((pActor->spr.pos.Z - FloorZ) > 25600)
|
||||
{
|
||||
pActor->spr.zvel = 0;
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->spr.hitag);
|
||||
DeleteActor(pActor);
|
||||
|
@ -183,7 +183,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->nCount = 60;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x120000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x120000);
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x120000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
@ -216,7 +216,7 @@ void IdleFish(DExhumedActor* pActor, int edx)
|
|||
|
||||
void DestroyFish(DExhumedActor* pActor)
|
||||
{
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
DeleteActor(pActor);
|
||||
|
|
|
@ -117,7 +117,7 @@ void BuildGrenade(int nPlayer)
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.ang = pPlayerActor->spr.ang;
|
||||
pActor->spr.owner = nPlayer;
|
||||
pActor->spr.intowner = nPlayer;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -144,7 +144,7 @@ void ExplodeGrenade(DExhumedActor* pActor)
|
|||
{
|
||||
int var_28, var_20;
|
||||
|
||||
int nPlayer = pActor->spr.owner;
|
||||
int nPlayer = pActor->spr.intowner;
|
||||
auto pGrenadeSect = pActor->sector();
|
||||
|
||||
pActor->nFrame = 1;
|
||||
|
@ -225,7 +225,7 @@ void AIGrenade::Tick(RunListEvent* ev)
|
|||
pActor->nIndex2--;
|
||||
if (!pActor->nIndex2)
|
||||
{
|
||||
int nPlayer = pActor->spr.owner;
|
||||
int nPlayer = pActor->spr.intowner;
|
||||
|
||||
if (pActor->nTurn < 0)
|
||||
{
|
||||
|
|
|
@ -131,11 +131,11 @@ void BuildItemAnim(DExhumedActor* pActor)
|
|||
|
||||
ChangeActorStat(pAnimActor, pActor->spr.statnum);
|
||||
pAnimActor->spr.hitag = pActor->spr.hitag;
|
||||
pActor->spr.owner = 0;
|
||||
pActor->spr.intowner = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.owner = -1;
|
||||
pActor->spr.intowner = -1;
|
||||
pActor->spr.yrepeat = (uint8_t)nItemAnimInfo[nItem].repeat;
|
||||
pActor->spr.xrepeat = (uint8_t)nItemAnimInfo[nItem].repeat;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ void BuildItemAnim(DExhumedActor* pActor)
|
|||
|
||||
void DestroyItemAnim(DExhumedActor* actor)
|
||||
{
|
||||
if (actor && actor->spr.owner >= 0)
|
||||
if (actor && actor->spr.intowner >= 0)
|
||||
DestroyAnim(actor);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ DExhumedActor* BuildLavaLimb(DExhumedActor* pActor, int move, int ebx)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pLimbActor->spr.extra = -1;
|
||||
pLimbActor->spr.owner = runlist_AddRunRec(pLimbActor->spr.lotag - 1, pLimbActor, 0x160000);
|
||||
pLimbActor->spr.intowner = runlist_AddRunRec(pLimbActor->spr.lotag - 1, pLimbActor, 0x160000);
|
||||
pLimbActor->spr.hitag = runlist_AddRunRec(NewRun, pLimbActor, 0x160000);
|
||||
|
||||
return pLimbActor;
|
||||
|
@ -83,7 +83,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev)
|
|||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->spr.hitag);
|
||||
|
||||
|
@ -145,7 +145,7 @@ void BuildLava(DExhumedActor* pActor, int x, int y, int, sectortype* pSector, in
|
|||
pActor->nFrame = 0;
|
||||
pActor->nPhase = Counters[kCountLava]++;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x150000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x150000);
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x150000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
@ -413,7 +413,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
ecx++;
|
||||
} while (ecx < 30);
|
||||
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
DeleteActor(pActor);
|
||||
|
|
|
@ -85,7 +85,7 @@ void BuildLion(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->nCount = 0;
|
||||
pActor->nPhase = Counters[kCountLion]++;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x130000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x130000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x130000);
|
||||
|
||||
|
@ -520,7 +520,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (bVal)
|
||||
{
|
||||
runlist_SubRunRec(pActor->spr.owner);
|
||||
runlist_SubRunRec(pActor->spr.intowner);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
|
|
|
@ -1271,14 +1271,14 @@ DExhumedActor* GrabBodyGunSprite()
|
|||
nBodyGunSprite[nCurBodyGunNum] = pActor;
|
||||
|
||||
pActor->spr.lotag = -1;
|
||||
pActor->spr.owner = -1;
|
||||
pActor->spr.intowner = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyAnim(pActor);
|
||||
|
||||
pActor->spr.lotag = -1;
|
||||
pActor->spr.owner = -1;
|
||||
pActor->spr.intowner = -1;
|
||||
}
|
||||
|
||||
nCurBodyGunNum++;
|
||||
|
@ -1386,7 +1386,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pActor->spr.extra = -1;
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0xD0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0xD0000);
|
||||
pActor->spr.hitag = runlist_AddRunRec(NewRun, pActor, 0xD0000);
|
||||
|
||||
return pActor;
|
||||
|
@ -1457,7 +1457,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
}
|
||||
}
|
||||
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->spr.hitag);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void BuildMummy(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->nCount = 0;
|
||||
pActor->nPhase = Counters[kCountMummy]++;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0xE0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0xE0000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0xE0000);
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@ DExhumedActor* FindWallSprites(sectortype* pSector)
|
|||
pAct->spr.pos.Y = (ecx + edi) / 2;
|
||||
pAct->spr.pos.Z = pSector->floorz;
|
||||
pAct->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
pAct->spr.owner = -1;
|
||||
pAct->spr.intowner = -1;
|
||||
pAct->spr.lotag = 0;
|
||||
pAct->spr.hitag = 0;
|
||||
}
|
||||
|
@ -1214,7 +1214,7 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx)
|
|||
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.hitag = runlist_AddRunRec(NewRun, nTrap, 0x1F0000);
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, nTrap, 0x1F0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, nTrap, 0x1F0000);
|
||||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
|
@ -1412,7 +1412,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pSpark->spr.extra = -1;
|
||||
pSpark->spr.owner = runlist_AddRunRec(pSpark->spr.lotag - 1, pSpark, 0x260000);
|
||||
pSpark->spr.intowner = runlist_AddRunRec(pSpark->spr.lotag - 1, pSpark, 0x260000);
|
||||
pSpark->spr.hitag = runlist_AddRunRec(NewRun, pSpark, 0x260000);
|
||||
|
||||
return pSpark;
|
||||
|
@ -1460,7 +1460,7 @@ void AISpark::Tick(RunListEvent* ev)
|
|||
nSmokeSparks--;
|
||||
}
|
||||
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->spr.hitag);
|
||||
DeleteActor(pActor);
|
||||
|
@ -1601,7 +1601,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
|
|||
pActor->spr.extra = -1;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x250000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x250000);
|
||||
pActor->backuppos();
|
||||
|
||||
return pActor;
|
||||
|
@ -1802,7 +1802,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag)
|
|||
pActor->spr.extra = -1;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x170000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x170000);
|
||||
|
||||
// GrabTimeSlot(3);
|
||||
pActor->nPhase = ObjectList.Push(pActor);
|
||||
|
@ -1959,7 +1959,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
|
||||
if (!(currentLevel->gameflags & LEVEL_EX_MULTI) || nStat != kStatExplodeTrigger)
|
||||
{
|
||||
runlist_SubRunRec(pActor->spr.owner);
|
||||
runlist_SubRunRec(pActor->spr.intowner);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
|
||||
DeleteActor(pActor);
|
||||
|
|
|
@ -213,7 +213,7 @@ void InitPlayerInventory(int nPlayer)
|
|||
|
||||
int GetPlayerFromActor(DExhumedActor* pActor)
|
||||
{
|
||||
return RunData[pActor->spr.owner].nObjIndex;
|
||||
return RunData[pActor->spr.intowner].nObjIndex;
|
||||
}
|
||||
|
||||
void RestartPlayer(int nPlayer)
|
||||
|
@ -226,7 +226,7 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
if (pActor)
|
||||
{
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
|
||||
ChangeActorStat(pActor, 0);
|
||||
|
@ -240,7 +240,7 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
if (pDopSprite)
|
||||
{
|
||||
runlist_DoSubRunRec(pDopSprite->spr.owner);
|
||||
runlist_DoSubRunRec(pDopSprite->spr.intowner);
|
||||
runlist_FreeRun(pDopSprite->spr.lotag - 1);
|
||||
DeleteActor(pDopSprite);
|
||||
}
|
||||
|
@ -396,8 +396,8 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
plr->nTauntTimer = RandomSize(3) + 3;
|
||||
|
||||
pDActor->spr.owner = runlist_AddRunRec(pDActor->spr.lotag - 1, nPlayer, 0xA0000);
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, nPlayer, 0xA0000);
|
||||
pDActor->spr.intowner = runlist_AddRunRec(pDActor->spr.lotag - 1, nPlayer, 0xA0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, nPlayer, 0xA0000);
|
||||
|
||||
if (plr->nRun < 0) {
|
||||
plr->nRun = runlist_AddRunRec(NewRun, nPlayer, 0xA0000);
|
||||
|
|
|
@ -259,7 +259,7 @@ void DestroyEgg(int nEgg)
|
|||
}
|
||||
}
|
||||
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_DoSubRunRec(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(QueenEgg[nEgg].nRun);
|
||||
|
||||
|
@ -405,7 +405,7 @@ void BuildTail()
|
|||
tailspr[i] = pTailActor;
|
||||
|
||||
pTailActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pTailActor->spr.owner = runlist_AddRunRec(pTailActor->spr.lotag - 1, (i + 1), 0x1B0000);
|
||||
pTailActor->spr.intowner = runlist_AddRunRec(pTailActor->spr.lotag - 1, (i + 1), 0x1B0000);
|
||||
pTailActor->spr.shade = -12;
|
||||
pTailActor->spr.pos.X = x;
|
||||
pTailActor->spr.pos.Y = y;
|
||||
|
@ -503,7 +503,7 @@ void BuildQueenEgg(int nQueen, int nVal)
|
|||
|
||||
QueenEgg[nEgg].nAction = nVal;
|
||||
|
||||
pActor2->spr.owner = runlist_AddRunRec(pActor2->spr.lotag - 1, nEgg, 0x1D0000);
|
||||
pActor2->spr.intowner = runlist_AddRunRec(pActor2->spr.lotag - 1, nEgg, 0x1D0000);
|
||||
QueenEgg[nEgg].nRun = runlist_AddRunRec(NewRun, nEgg, 0x1D0000);
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ void BuildQueenHead(int nQueen)
|
|||
QueenHead.nIndex = 0;
|
||||
QueenHead.nChannel = QueenList[nQueen].nChannel;
|
||||
|
||||
pActor2->spr.owner = runlist_AddRunRec(pActor2->spr.lotag - 1, 0, 0x1B0000);
|
||||
pActor2->spr.intowner = runlist_AddRunRec(pActor2->spr.lotag - 1, 0, 0x1B0000);
|
||||
|
||||
QueenHead.nRun = runlist_AddRunRec(NewRun, 0, 0x1B0000);
|
||||
QueenHead.nIndex2 = 0;
|
||||
|
@ -1027,7 +1027,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
BuildLavaLimb(pActor, i, GetActorHeight(pActor));
|
||||
}
|
||||
|
||||
runlist_SubRunRec(pActor->spr.owner);
|
||||
runlist_SubRunRec(pActor->spr.intowner);
|
||||
runlist_SubRunRec(QueenHead.nRun);
|
||||
DeleteActor(pActor);
|
||||
runlist_ChangeChannel(QueenHead.nChannel, 1);
|
||||
|
@ -1160,7 +1160,7 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
|
||||
nHeadVel = 800;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, nQueen, 0x1A0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, nQueen, 0x1A0000);
|
||||
|
||||
runlist_AddRunRec(NewRun, nQueen, 0x1A0000);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ void FreeRa(int nPlayer)
|
|||
if (!pActor) return;
|
||||
|
||||
runlist_SubRunRec(nRun);
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
|
||||
DeleteActor(pActor);
|
||||
|
@ -96,7 +96,7 @@ void BuildRa(int nPlayer)
|
|||
pActor->spr.extra = -1;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, nPlayer, 0x210000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, nPlayer, 0x210000);
|
||||
pActor->spr.pal = 1;
|
||||
pActor->spr.xrepeat = 64;
|
||||
pActor->spr.yrepeat = 64;
|
||||
|
|
|
@ -118,7 +118,7 @@ void BuildRat(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
pActor->nCount = RandomSize(5);
|
||||
pActor->nPhase = RandomSize(3);
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x240000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x240000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x240000);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (bVal)
|
||||
{
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void BuildRex(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
|
||||
pActor->nRun = nChannel;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x180000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x180000);
|
||||
|
||||
// this isn't stored anywhere.
|
||||
runlist_AddRunRec(NewRun, pActor, 0x180000);
|
||||
|
|
|
@ -87,7 +87,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
|
|||
pActor->nHealth = 600;
|
||||
pActor->nPhase = Counters[kCountRoach]++;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x1C0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x1C0000);
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x1C0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
|
|
@ -1703,7 +1703,7 @@ void runlist_DamageEnemy(DExhumedActor* pActor, DExhumedActor* pActor2, int nDam
|
|||
return;
|
||||
}
|
||||
|
||||
int nRun = pActor->spr.owner;
|
||||
int nRun = pActor->spr.intowner;
|
||||
if (nRun <= -1) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ void BuildScorp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
|
||||
pActor->nChannel = nChannel;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x220000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x220000);
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x220000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
@ -391,7 +391,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
if (bVal)
|
||||
{
|
||||
runlist_SubRunRec(pActor->nRun);
|
||||
runlist_DoSubRunRec(pActor->spr.owner);
|
||||
runlist_DoSubRunRec(pActor->spr.intowner);
|
||||
runlist_FreeRun(pActor->spr.lotag - 1);
|
||||
|
||||
DeleteActor(pActor);
|
||||
|
|
|
@ -87,7 +87,7 @@ void BuildSet(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
|
||||
pActor->nChannel = nChannel;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x190000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x190000);
|
||||
|
||||
// this isn't stored anywhere.
|
||||
runlist_AddRunRec(NewRun, pActor, 0x190000);
|
||||
|
@ -125,7 +125,7 @@ void BuildSoul(DExhumedActor* pSet)
|
|||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(NewRun, pActor, 0x230000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(NewRun, pActor, 0x230000);
|
||||
}
|
||||
|
||||
void AISoul::Tick(RunListEvent* ev)
|
||||
|
|
|
@ -88,7 +88,7 @@ void DestroySnake(int nSnake)
|
|||
if (!pSnake) continue;
|
||||
|
||||
runlist_DoSubRunRec(pSnake->spr.lotag - 1);
|
||||
runlist_DoSubRunRec(pSnake->spr.owner);
|
||||
runlist_DoSubRunRec(pSnake->spr.intowner);
|
||||
|
||||
DeleteActor(pSnake);
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
auto pActor = insertActor(pViewSect, 202);
|
||||
|
||||
pActor->pTarget = pPlayerActor;
|
||||
//pActor->spr.owner = nPlayerSprite;
|
||||
//pActor->spr.intowner = nPlayerSprite;
|
||||
pActor->spr.picnum = nPic;
|
||||
|
||||
if (i == 0)
|
||||
|
@ -227,7 +227,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
|
||||
SnakeList[nSnake].pSprites[i] = pActor;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, ((nSnake << 8) | i), 0x110000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, ((nSnake << 8) | i), 0x110000);
|
||||
}
|
||||
|
||||
SnakeList[nSnake].nRun = runlist_AddRunRec(NewRun, nSnake, 0x110000);
|
||||
|
|
|
@ -80,7 +80,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, int x, int y, int z, sectortype*
|
|||
spp->nHealth = 160;
|
||||
spp->nPhase = Counters[kCountSpider]++;
|
||||
|
||||
spp->spr.owner = runlist_AddRunRec(spp->spr.lotag - 1, spp, 0xC0000);
|
||||
spp->spr.intowner = runlist_AddRunRec(spp->spr.lotag - 1, spp, 0xC0000);
|
||||
|
||||
spp->nRun = runlist_AddRunRec(NewRun, spp, 0xC0000);
|
||||
|
||||
|
@ -233,7 +233,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (!spp->nFrame)
|
||||
{
|
||||
runlist_DoSubRunRec(spp->spr.owner);
|
||||
runlist_DoSubRunRec(spp->spr.intowner);
|
||||
runlist_FreeRun(spp->spr.lotag - 1);
|
||||
runlist_SubRunRec(spp->nRun);
|
||||
spp->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
|
|
|
@ -106,7 +106,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, sectortype*
|
|||
pActor->nVel = 0;
|
||||
pActor->nAngle2 = RandomSize(7) + 127;
|
||||
|
||||
pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x1E0000);
|
||||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x1E0000);
|
||||
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x1E0000);
|
||||
|
||||
|
|
|
@ -1534,7 +1534,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
|
|||
if (actor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_FLOOR))
|
||||
{
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
actor->spr.owner = -2;
|
||||
actor->spr.intowner = -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1545,10 +1545,10 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
// Don't show sprites tagged with 257
|
||||
if (actor->spr.lotag == 257 && actor->spr.owner == -2)
|
||||
if (actor->spr.lotag == 257 && actor->spr.intowner == -2)
|
||||
{
|
||||
actor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
actor->spr.owner = -1;
|
||||
actor->spr.intowner = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2007,8 +2007,8 @@ inline int16_t& SP_TAG5(DSWActor* actor) { return actor->spr.xvel; }
|
|||
inline int16_t& SP_TAG6(DSWActor* actor) { return actor->spr.yvel; }
|
||||
inline uint8_t& SP_TAG7(DSWActor* actor) { return MSB_VAR(actor->spr.zvel); }
|
||||
inline uint8_t& SP_TAG8(DSWActor* actor) { return LSB_VAR(actor->spr.zvel); }
|
||||
inline uint8_t& SP_TAG9(DSWActor* actor) { return MSB_VAR(actor->spr.owner); }
|
||||
inline uint8_t& SP_TAG10(DSWActor* actor) { return LSB_VAR(actor->spr.owner); }
|
||||
inline uint8_t& SP_TAG9(DSWActor* actor) { return MSB_VAR(actor->spr.intowner); }
|
||||
inline uint8_t& SP_TAG10(DSWActor* actor) { return LSB_VAR(actor->spr.intowner); }
|
||||
inline int8_t& SP_TAG11(DSWActor* actor) { return actor->spr.shade; }
|
||||
inline uint8_t& SP_TAG12(DSWActor* actor) { return actor->spr.pal; }
|
||||
inline int16_t SP_TAG13(DSWActor* actor) { return int16_t(uint8_t(actor->spr.xoffset) + (actor->spr.yoffset << 8)); }
|
||||
|
|
|
@ -62,7 +62,7 @@ DSWActor* insertActor(sectortype* sect, int statnum)
|
|||
{
|
||||
auto pActor = static_cast<DSWActor*>(::InsertActor(RUNTIME_CLASS(DSWActor), sect, statnum));
|
||||
|
||||
pActor->spr.owner = -1;
|
||||
pActor->spr.intowner = -1;
|
||||
return pActor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue