| 99 | |
| 100 | |
| 101 | void cMapSerializer::SaveMapToNBT(cFastNBTWriter & a_Writer) |
| 102 | { |
| 103 | a_Writer.BeginCompound("data"); |
| 104 | |
| 105 | a_Writer.AddByte("scale", m_Map->GetScale()); |
| 106 | a_Writer.AddByte("dimension", (int) m_Map->GetDimension()); |
| 107 | |
| 108 | a_Writer.AddShort("width", m_Map->GetWidth()); |
| 109 | a_Writer.AddShort("height", m_Map->GetHeight()); |
| 110 | |
| 111 | a_Writer.AddInt("xCenter", m_Map->GetCenterX()); |
| 112 | a_Writer.AddInt("zCenter", m_Map->GetCenterZ()); |
| 113 | |
| 114 | const cMap::cColorList & Data = m_Map->GetData(); |
| 115 | a_Writer.AddByteArray("colors", (char *) &Data[0], Data.size()); |
| 116 | |
| 117 | a_Writer.EndCompound(); |
| 118 | } |
| 119 | |
| 120 | |
| 121 |
nothing calls this directly
no test coverage detected