- Blood: removed unused CSectorListMgr class.

This commit is contained in:
Christoph Oelckers 2021-11-11 18:13:39 +01:00
parent 9b21233c98
commit 401f3cf1d7

View file

@ -370,63 +370,5 @@ void InitSectorFX(void)
}
}
class CSectorListMgr
{
public:
CSectorListMgr();
int CreateList(short);
void AddSector(int, short);
int GetSectorCount(int);
short *GetSectorList(int);
private:
int nLists;
int nListSize[32];
int nListStart[32];
short nSectors[kMaxSectors];
};
CSectorListMgr::CSectorListMgr()
{
nLists = 0;
}
int CSectorListMgr::CreateList(short nSector)
{
int nStart = 0;
if (nLists)
nStart = nListStart[nLists-1]+nListStart[nLists-1];
int nList = nLists;
nListStart[nList] = nStart;
nListSize[nList] = 1;
nLists++;
short *pList = GetSectorList(nList);
pList[0] = nSector;
return nList;
}
void CSectorListMgr::AddSector(int nList, short nSector)
{
for (int i = nLists; i > nList; i--)
{
short *pList = GetSectorList(i);
int nCount = GetSectorCount(i);
memmove(pList+1,pList,nCount*sizeof(short));
nListStart[i]++;
}
short *pList = GetSectorList(nList);
int nCount = GetSectorCount(nList);
pList[nCount] = nSector;
nListSize[nList]++;
}
int CSectorListMgr::GetSectorCount(int nList)
{
return nListSize[nList];
}
short * CSectorListMgr::GetSectorList(int nList)
{
return nSectors+nListStart[nList];
}
END_BLD_NS