Count CPs

This commit is contained in:
Miloslav Ciz 2024-11-24 21:21:29 +01:00
parent f0c2977002
commit a388a915f9
4 changed files with 69 additions and 8 deletions

View file

@ -804,6 +804,20 @@ void _LCR_rendererComputeLOD(void)
}
}
/**
Unmarks all checkpoints that were marked with LCR_rendererMarkTakenCP.
*/
void LCR_rendererUnmarkCPs(void)
{
for (int i = 0; i < LCR_renderer.mapModel.triangleCount; ++i)
if ((LCR_renderer.mapTriangleData[i] & 0x0f) == LCR_RENDERER_MAT_CP1)
LCR_renderer.mapTriangleData[i] = (LCR_renderer.mapTriangleData[i] & 0xf0)
| LCR_RENDERER_MAT_CP0;
}
/**
Marks checkpoint as taken, i.e. changes how a checkpoint will be drawn.
*/
void LCR_rendererMarkTakenCP(int x, int y, int z)
{
for (int i = 0; i < LCR_renderer.mapModel.triangleCount; ++i)