2016-04-16 21:49:47 +00:00
|
|
|
#include "CSortedLists.hpp"
|
2017-01-15 03:59:37 +00:00
|
|
|
#include "World/CActor.hpp"
|
2016-04-16 21:49:47 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CSortedListManager::CSortedListManager()
|
|
|
|
{
|
|
|
|
Reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CSortedListManager::Reset()
|
|
|
|
{
|
|
|
|
std::fill(std::begin(x0_nodes), std::end(x0_nodes), SNode());
|
|
|
|
for (int i=0 ; i<6 ; ++i)
|
|
|
|
xb000_sortedLists[i].Reset();
|
|
|
|
}
|
|
|
|
|
2017-01-04 04:08:30 +00:00
|
|
|
void CSortedListManager::RemoveFromList(ESortedList list, s16 id)
|
|
|
|
{
|
|
|
|
SSortedList& sl = xb000_sortedLists[u32(list)];
|
|
|
|
}
|
|
|
|
|
2017-01-15 03:59:37 +00:00
|
|
|
void CSortedListManager::Remove(const CActor* act)
|
2017-01-04 04:08:30 +00:00
|
|
|
{
|
2017-01-15 03:59:37 +00:00
|
|
|
SNode& node = x0_nodes[act->GetUniqueId() & 0x3ff];
|
|
|
|
if (node.x2a_full == false)
|
|
|
|
return;
|
2017-01-04 04:08:30 +00:00
|
|
|
|
2017-01-15 03:59:37 +00:00
|
|
|
RemoveFromList(ESortedList::Zero, node.x1c_);
|
|
|
|
RemoveFromList(ESortedList::Three, node.x22_);
|
|
|
|
RemoveFromList(ESortedList::One, node.x1e_);
|
|
|
|
RemoveFromList(ESortedList::Four, node.x24_);
|
|
|
|
RemoveFromList(ESortedList::Two, node.x20_);
|
|
|
|
RemoveFromList(ESortedList::Five, node.x26_);
|
|
|
|
node.x2a_full = false;
|
2017-01-04 04:08:30 +00:00
|
|
|
}
|
|
|
|
|
2016-04-16 21:49:47 +00:00
|
|
|
}
|