public static LandSurf Read(StreamReader data, StreamWriter outputData, bool write = true) { LandSurf obj = new LandSurf(); obj.HasPalShift = Utils.readAndWriteUInt32(data, outputData, write); // This is always 0 if (obj.HasPalShift == 1) { // PalShift.Read would go here, if it ever actually existed...which it doesn't. } else { obj.texMerge = TexMerge.Read(data, outputData, write); } return(obj); }
public static LandSurf Read(byte[] buffer, StreamReader data, StreamWriter outputData, bool write = true) { LandSurf obj = new LandSurf(); obj.HasPalShift = Utils.ReadAndWriteUInt32(buffer, data, outputData, write); // This is always 0 if (obj.HasPalShift == 1) { // PalShift.Read would go here, if it ever actually existed...which it doesn't. // PalShift is used in software rendering in pre-ToD versions } else { obj.texMerge = TexMerge.Read(buffer, data, outputData, write); } return(obj); }