template <class type> void scriptmember<type>::Save(outputfile& SaveFile) const { if(Member) { SaveFile.Put(1); SaveFile << *Member; } else SaveFile.Put(0); }
void worldmap::Save(outputfile& SaveFile) const { area::Save(SaveFile); SaveFile.Write(reinterpret_cast<char*>(TypeBuffer[0]), XSizeTimesYSize * sizeof(uchar)); SaveFile.Write(reinterpret_cast<char*>(AltitudeBuffer[0]), XSizeTimesYSize * sizeof(short)); SaveFile.Write(reinterpret_cast<char*>(ContinentBuffer[0]), XSizeTimesYSize * sizeof(uchar)); for(ulong c = 0; c < XSizeTimesYSize; ++c) Map[0][c]->Save(SaveFile); SaveFile << Continent << PlayerGroup; }
void area::Save(outputfile& SaveFile) const { SaveFile << XSize << YSize << EntryMap; SaveFile.Write(reinterpret_cast<char*>(FlagMap[0]), XSizeTimesYSize * sizeof(uchar)); }