Remove redundant _getPOIList methods

This commit is contained in:
Jack Andersen 2016-08-27 11:19:55 -10:00
parent b25e5ad014
commit 8dacdd18b8
9 changed files with 8 additions and 160 deletions

View File

@ -167,7 +167,7 @@ u32 CAnimSourceReaderBase::VGetBoolPOIList(const CCharAnimTime& time,
if (x4_sourceInfo->HasPOIData())
{
const std::vector<CBoolPOINode>& boolNodes = x4_sourceInfo->GetBoolPOIStream();
return CBoolPOINode::_getPOIList(time, listOut, capacity, iterator, unk, boolNodes,
return _getPOIList(time, listOut, capacity, iterator, unk, boolNodes,
xc_curTime, *x4_sourceInfo, x14_passedBoolCount);
}
return 0;
@ -180,7 +180,7 @@ u32 CAnimSourceReaderBase::VGetInt32POIList(const CCharAnimTime& time,
if (x4_sourceInfo->HasPOIData())
{
const std::vector<CInt32POINode>& int32Nodes = x4_sourceInfo->GetInt32POIStream();
return CInt32POINode::_getPOIList(time, listOut, capacity, iterator, unk, int32Nodes,
return _getPOIList(time, listOut, capacity, iterator, unk, int32Nodes,
xc_curTime, *x4_sourceInfo, x18_passedIntCount);
}
return 0;
@ -193,7 +193,7 @@ u32 CAnimSourceReaderBase::VGetParticlePOIList(const CCharAnimTime& time,
if (x4_sourceInfo->HasPOIData())
{
const std::vector<CParticlePOINode>& particleNodes = x4_sourceInfo->GetParticlePOIStream();
return CParticlePOINode::_getPOIList(time, listOut, capacity, iterator, unk, particleNodes,
return _getPOIList(time, listOut, capacity, iterator, unk, particleNodes,
xc_curTime, *x4_sourceInfo, x1c_passedParticleCount);
}
return 0;
@ -206,7 +206,7 @@ u32 CAnimSourceReaderBase::VGetSoundPOIList(const CCharAnimTime& time,
if (x4_sourceInfo->HasPOIData())
{
const std::vector<CSoundPOINode>& soundNodes = x4_sourceInfo->GetSoundPOIStream();
return CSoundPOINode::_getPOIList(time, listOut, capacity, iterator, unk, soundNodes,
return _getPOIList(time, listOut, capacity, iterator, unk, soundNodes,
xc_curTime, *x4_sourceInfo, x20_passedSoundCount);
}
return 0;

View File

@ -18,36 +18,4 @@ CBoolPOINode CBoolPOINode::CopyNodeMinusStartTime(const CBoolPOINode& node,
return ret;
}
u32 CBoolPOINode::_getPOIList(const CCharAnimTime& time,
CBoolPOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CBoolPOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount)
{
u32 ret = 0;
if (animInfo.HasPOIData() && stream.size())
{
CCharAnimTime dur = animInfo.GetAnimationDuration();
CCharAnimTime targetTime = curTime + time;
if (targetTime >= dur)
targetTime = dur;
if (passedCount >= stream.size())
return ret;
CCharAnimTime nodeTime = stream[passedCount].GetTime();
while (nodeTime <= targetTime)
{
u32 idx = iterator + ret;
if (idx < capacity)
listOut[idx] = CopyNodeMinusStartTime(stream[passedCount], curTime);
++passedCount;
++ret;
nodeTime = stream[passedCount].GetTime();
}
}
return ret;
}
}

View File

@ -14,12 +14,6 @@ public:
CBoolPOINode();
CBoolPOINode(CInputStream& in);
bool GetValue() const {return x38_val;}
static u32 _getPOIList(const CCharAnimTime& time,
CBoolPOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CBoolPOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount);
static CBoolPOINode CopyNodeMinusStartTime(const CBoolPOINode& node,
const CCharAnimTime& startTime);
};

View File

@ -18,36 +18,4 @@ CInt32POINode CInt32POINode::CopyNodeMinusStartTime(const CInt32POINode& node,
return ret;
}
u32 CInt32POINode::_getPOIList(const CCharAnimTime& time,
CInt32POINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CInt32POINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount)
{
u32 ret = 0;
if (animInfo.HasPOIData() && stream.size())
{
CCharAnimTime dur = animInfo.GetAnimationDuration();
CCharAnimTime targetTime = curTime + time;
if (targetTime >= dur)
targetTime = dur;
if (passedCount >= stream.size())
return ret;
CCharAnimTime nodeTime = stream[passedCount].GetTime();
while (nodeTime <= targetTime)
{
u32 idx = iterator + ret;
if (idx < capacity)
listOut[idx] = CopyNodeMinusStartTime(stream[passedCount], curTime);
++passedCount;
++ret;
nodeTime = stream[passedCount].GetTime();
}
}
return ret;
}
}

View File

@ -17,12 +17,6 @@ public:
s32 GetValue() const {return x38_val;}
const std::string& GetLocatorName() const {return x3c_locatorName;}
static u32 _getPOIList(const CCharAnimTime& time,
CInt32POINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CInt32POINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount);
static CInt32POINode CopyNodeMinusStartTime(const CInt32POINode& node,
const CCharAnimTime& startTime);
};

View File

@ -18,36 +18,4 @@ CParticlePOINode CParticlePOINode::CopyNodeMinusStartTime(const CParticlePOINode
return ret;
}
u32 CParticlePOINode::_getPOIList(const CCharAnimTime& time,
CParticlePOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CParticlePOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount)
{
u32 ret = 0;
if (animInfo.HasPOIData() && stream.size())
{
CCharAnimTime dur = animInfo.GetAnimationDuration();
CCharAnimTime targetTime = curTime + time;
if (targetTime >= dur)
targetTime = dur;
if (passedCount >= stream.size())
return ret;
CCharAnimTime nodeTime = stream[passedCount].GetTime();
while (nodeTime <= targetTime)
{
u32 idx = iterator + ret;
if (idx < capacity)
listOut[idx] = CopyNodeMinusStartTime(stream[passedCount], curTime);
++passedCount;
++ret;
nodeTime = stream[passedCount].GetTime();
}
}
return ret;
}
}

View File

@ -16,12 +16,6 @@ public:
CParticlePOINode(CInputStream& in);
const CParticleData& GetParticleData() const {return x38_data;}
static u32 _getPOIList(const CCharAnimTime& time,
CParticlePOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CParticlePOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount);
static CParticlePOINode CopyNodeMinusStartTime(const CParticlePOINode& node,
const CCharAnimTime& startTime);
};

View File

@ -32,36 +32,4 @@ CSoundPOINode CSoundPOINode::CopyNodeMinusStartTime(const CSoundPOINode& node,
return ret;
}
u32 CSoundPOINode::_getPOIList(const CCharAnimTime& time,
CSoundPOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CSoundPOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount)
{
u32 ret = 0;
if (animInfo.HasPOIData() && stream.size())
{
CCharAnimTime dur = animInfo.GetAnimationDuration();
CCharAnimTime targetTime = curTime + time;
if (targetTime >= dur)
targetTime = dur;
if (passedCount >= stream.size())
return ret;
CCharAnimTime nodeTime = stream[passedCount].GetTime();
while (nodeTime <= targetTime)
{
u32 idx = iterator + ret;
if (idx < capacity)
listOut[idx] = CopyNodeMinusStartTime(stream[passedCount], curTime);
++passedCount;
++ret;
nodeTime = stream[passedCount].GetTime();
}
}
return ret;
}
}

View File

@ -20,12 +20,6 @@ public:
const CCharAnimTime& time, u32 b, bool c,
float d, u32 e, u32 f, u32 sfxId, float falloff, float maxDist);
static u32 _getPOIList(const CCharAnimTime& time,
CSoundPOINode* listOut,
u32 capacity, u32 iterator, u32 unk1,
const std::vector<CSoundPOINode>& stream,
const CCharAnimTime& curTime,
const IAnimSourceInfo& animInfo, u32 passedCount);
static CSoundPOINode CopyNodeMinusStartTime(const CSoundPOINode& node,
const CCharAnimTime& startTime);
};