world editor defines removed

This commit is contained in:
d1str4ught
2025-08-28 21:03:15 +02:00
parent b66e045d80
commit f791ab6d8c
21 changed files with 12 additions and 688 deletions

View File

@@ -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)