public static DDPixelFormat Read(BinaryReader br) { DDPixelFormat fmt = new DDPixelFormat(); fmt.size = br.ReadInt32(); fmt.flags = (DxtPixelFormat)br.ReadInt32(); fmt.fourCC = br.ReadInt32(); fmt.rgbBitCount = br.ReadInt32(); fmt.rBitMask = br.ReadInt32(); fmt.gBitMask = br.ReadInt32(); fmt.bBitMask = br.ReadInt32(); fmt.rgbAlphaBitMask = br.ReadInt32(); return fmt; }
public static DDPixelFormat Read(BinaryReader br) { DDPixelFormat fmt = new DDPixelFormat(); fmt.size = br.ReadInt32(); fmt.flags = (DxtPixelFormat)br.ReadInt32(); fmt.fourCC = br.ReadInt32(); fmt.rgbBitCount = br.ReadInt32(); fmt.rBitMask = br.ReadInt32(); fmt.gBitMask = br.ReadInt32(); fmt.bBitMask = br.ReadInt32(); fmt.rgbAlphaBitMask = br.ReadInt32(); return(fmt); }
public static DDSurfaceDesc2 Read(BinaryReader reader) { DDSurfaceDesc2 s = new DDSurfaceDesc2(); s.size = reader.ReadInt32(); s.flags = reader.ReadInt32(); s.height = reader.ReadInt32(); s.width = reader.ReadInt32(); s.pitchOrLinearSize = reader.ReadInt32(); s.depth = reader.ReadInt32(); s.mipCount = reader.ReadInt32(); for (int i = 0; i < 11; i++) // reserved1 { reader.ReadInt32(); } s.ddpfPixelFormat = DDPixelFormat.Read(reader); s.ddsCaps = DDCaps.Read(reader); reader.ReadInt32(); // reserved2 return(s); }