forked from metin-server/m2dev-client-src
world editor defines removed
This commit is contained in:
@@ -7,69 +7,6 @@ void CMapOutdoor::SetIndexBuffer()
|
||||
long x, y;
|
||||
|
||||
DWORD dwIndexNum = TERRAIN_PATCHSIZE * TERRAIN_PATCHSIZE * 4;
|
||||
|
||||
#ifdef WORLD_EDITOR
|
||||
m_pwIndices = new WORD[dwIndexNum];
|
||||
if (!m_pwIndices)
|
||||
TraceError("CMapOutdoor::SetIndexBuffer() IndexBuffer is NULL");
|
||||
|
||||
memset(m_pwIndices, 0, sizeof(WORD) * dwIndexNum);
|
||||
if (!m_IndexBuffer.Create(dwIndexNum, D3DFMT_INDEX16))
|
||||
TraceError("CMapOutdoor::SetIndexBuffer() IndexBuffer Create Error");
|
||||
|
||||
WORD count = 0;
|
||||
WORD count2 = 0;
|
||||
long ry = 0;
|
||||
|
||||
BYTE ucNumLineWarp = TERRAIN_PATCHSIZE + 1;
|
||||
|
||||
for (y = 0; y < TERRAIN_PATCHSIZE; y++)
|
||||
{
|
||||
if (ry % 2 == 0)
|
||||
{
|
||||
m_pwIndices[count++] = count2;
|
||||
m_pwIndices[count++] = count2+ucNumLineWarp;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pwIndices[count++] = count2+ucNumLineWarp;
|
||||
m_pwIndices[count++] = count2;
|
||||
}
|
||||
|
||||
for (x = 0; x < TERRAIN_PATCHSIZE; x++)
|
||||
{
|
||||
if (ry % 2 == 1)
|
||||
{
|
||||
m_pwIndices[count++] = (WORD) (count2+ucNumLineWarp-1);
|
||||
m_pwIndices[count++] = (WORD) (count2-1);
|
||||
count2 -= (short) 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pwIndices[count++] = (WORD) (count2+1);
|
||||
m_pwIndices[count++] = (WORD) (count2+ucNumLineWarp+1);
|
||||
count2 += (short) 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (y < TERRAIN_PATCHSIZE-1)
|
||||
{
|
||||
m_pwIndices[count++] = (WORD) (count2+ucNumLineWarp);
|
||||
m_pwIndices[count++] = (WORD) (count2+ucNumLineWarp);
|
||||
count2 += ucNumLineWarp;
|
||||
}
|
||||
ry++;
|
||||
}
|
||||
|
||||
m_wNumIndices = count;
|
||||
if (!m_IndexBuffer.Lock((void **) &pIndices))
|
||||
TraceError("CMapOutdoor::SetIndexBuffer() IndexBuffer Unlock Error");
|
||||
memcpy(pIndices, m_pwIndices, count * sizeof(WORD));
|
||||
m_IndexBuffer.Unlock();
|
||||
|
||||
delete [] m_pwIndices;
|
||||
m_pwIndices = NULL;
|
||||
#else
|
||||
WORD count[TERRAINPATCH_LODMAX], count2[TERRAINPATCH_LODMAX];
|
||||
BYTE uci;
|
||||
for (uci = 0; uci < TERRAINPATCH_LODMAX; ++uci)
|
||||
@@ -199,7 +136,6 @@ void CMapOutdoor::SetIndexBuffer()
|
||||
delete [] m_pwaIndices[uci];
|
||||
m_pwaIndices[uci] = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CMapOutdoor::ADDLvl1TL(WORD * pIndices, WORD & rwCount, const WORD & c_rwCurCount, const BYTE & c_rucNumLineWarp)
|
||||
|
||||
Reference in New Issue
Block a user