2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 18:24:55 +00:00

Implement CScriptDebris; EVNT POI fixes

This commit is contained in:
Jack Andersen
2018-05-15 18:07:38 -10:00
parent 10d36ac1d6
commit 0987866896
14 changed files with 620 additions and 193 deletions

View File

@@ -92,6 +92,8 @@ public:
bool HasShadowLight() const { return x29c_shadowLightArrIdx != -1; }
s32 GetShadowLightArrIndex() const { return x29c_shadowLightArrIdx; }
s32 GetShadowLightIndex() const { return x2a0_shadowLightIdx; }
u32 GetAreaUpdateFramePeriod() const { return x2a8_areaUpdateFramePeriod; }
void SetAreaUpdateFramePeriod(u32 p) { x2a8_areaUpdateFramePeriod = p; }
};
}

View File

@@ -74,9 +74,11 @@ u32 _getPOIList(const CCharAnimTime& time,
{
u32 idx = iterator + ret;
if (idx < capacity)
{
listOut[idx] = T::CopyNodeMinusStartTime(stream[passedCount], curTime);
++ret;
}
++passedCount;
++ret;
if (passedCount < stream.size())
nodeTime = stream[passedCount].GetTime();
}
@@ -97,13 +99,15 @@ u32 _getPOIList(const CCharAnimTime& time,
for (u32 it = iterator ; it < stream.size() ; ++it)
{
CCharAnimTime nodeTime = stream[ret].GetTime();
CCharAnimTime nodeTime = stream[it].GetTime();
if (nodeTime > targetTime)
return ret;
u32 idx = iterator + ret;
if (idx < capacity)
listOut[idx] = T::CopyNodeMinusStartTime(stream[ret], curTime);
++ret;
if (nodeTime >= curTime && idx < capacity)
{
listOut[idx] = T::CopyNodeMinusStartTime(stream[it], curTime);
++ret;
}
}
return ret;