MCPcopy Create free account
hub / github.com/cuberite/cuberite / HeightMap

Method HeightMap

src/LightingThread.cpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44 virtual void HeightMap(const cChunkDef::HeightMap * a_Heightmap) override
45 {
46 typedef struct {HEIGHTTYPE m_Row[16]; } ROW;
47 ROW * InputRows = (ROW *)a_Heightmap;
48 ROW * OutputRows = (ROW *)m_HeightMap;
49 int InputIdx = 0;
50 int OutputIdx = m_ReadingChunkX + m_ReadingChunkZ * cChunkDef::Width * 3;
51 for (int z = 0; z < cChunkDef::Width; z++)
52 {
53 OutputRows[OutputIdx] = InputRows[InputIdx++];
54 OutputIdx += 3;
55 } // for z
56 }
57
58public:
59 int m_ReadingChunkX; // 0, 1 or 2; x-offset of the chunk we're reading from the BlockTypes start

Callers 1

GetAllDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected