| 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 | |
| 58 | public: |
| 59 | int m_ReadingChunkX; // 0, 1 or 2; x-offset of the chunk we're reading from the BlockTypes start |