MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / WriteTerrainHeightChunk

Function WriteTerrainHeightChunk

Descent3/LoadLevel.cpp:4496–4509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4494}
4495
4496void WriteTerrainHeightChunk(CFILE *fp) {
4497 int i;
4498 uint8_t heightvals[TERRAIN_WIDTH * TERRAIN_DEPTH];
4499
4500 int start_pos;
4501 start_pos = StartChunk(fp, CHUNK_TERRAIN_HEIGHT);
4502
4503 for (i = 0; i < TERRAIN_WIDTH * TERRAIN_DEPTH; i++)
4504 heightvals[i] = Terrain_seg[i].ypos;
4505
4506 CheckToWriteCompressByte(fp, heightvals, TERRAIN_WIDTH * TERRAIN_DEPTH);
4507
4508 EndChunk(fp, start_pos);
4509}
4510
4511void WriteGamePathsChunk(CFILE *fp) {
4512 int start_pos;

Callers 1

WriteTerrainChunksFunction · 0.85

Calls 3

StartChunkFunction · 0.85
CheckToWriteCompressByteFunction · 0.85
EndChunkFunction · 0.85

Tested by

no test coverage detected