mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- Blood: removed unused CSectorListMgr class.
This commit is contained in:
parent
9b21233c98
commit
401f3cf1d7
1 changed files with 0 additions and 58 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue