Start map text format
This commit is contained in:
parent
a388a915f9
commit
2cbbd8fb1a
5 changed files with 392 additions and 80 deletions
31
renderer.h
31
renderer.h
|
@ -848,22 +848,9 @@ void LCR_rendererMarkTakenCP(int x, int y, int z)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Call to reset currently loaded map, i.e. mark all checkpoints as untaken etc.
|
||||
*/
|
||||
void LCR_rendererRestart(void)
|
||||
uint8_t LCR_rendererLoadMap(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;
|
||||
}
|
||||
|
||||
uint8_t LCR_rendererInit(void)
|
||||
{
|
||||
LCR_LOG0("initializing renderer");
|
||||
|
||||
LCR_renderer.frame = 0;
|
||||
LCR_LOG0("loading map");
|
||||
|
||||
if (!_LCR_buildMapModel())
|
||||
return 0;
|
||||
|
@ -871,6 +858,18 @@ uint8_t LCR_rendererInit(void)
|
|||
_LCR_makeMapChunks();
|
||||
_LCR_rendererComputeLOD();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes renderer, only call once.
|
||||
*/
|
||||
uint8_t LCR_rendererInit(void)
|
||||
{
|
||||
LCR_LOG0("initializing renderer");
|
||||
|
||||
LCR_renderer.frame = 0;
|
||||
|
||||
LCR_renderer.carModel = LCR_renderer.models + 8;
|
||||
LCR_renderer.ghostModel = LCR_renderer.models + 9;
|
||||
|
||||
|
@ -1557,7 +1556,7 @@ void LCR_rendererDraw(void)
|
|||
|
||||
_LCR_rendererLoadMapChunks(); // TODO: call only once in a while?
|
||||
|
||||
LCR_rendererDrawSky(1,
|
||||
LCR_rendererDrawSky(LCR_currentMap.environment,
|
||||
LCR_renderer.scene.camera.transform.rotation.y,
|
||||
-4 * LCR_renderer.scene.camera.transform.rotation.x);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue