Пример #1
0
        static void ConvertToImage(string input)
        {
            // First read the VIF packets.
            // If it's a font texture file, the size is constant since after the data
            // it's the variable width table.
            int           size = (Path.GetExtension(input) == ".tex") ? 0x78040 : -1;
            VifPacketList vifPackets;

            using (var inputStream = new DataStream(input, 0, size, FileOpenMode.Read))
                vifPackets = inputStream.ReadFormat <VifPacketList>();

            // Now from the VIF packets get the GIF packets
            GifPacketList gifPackets;

            using (var gifStream = new DataStream()) {
                vifPackets.WriteGifData(gifStream);
                gifStream.Position = 0;
                gifPackets         = gifStream.ReadFormat <GifPacketList>();
            }

            // Finally get the image by processing the GIF commands
            GsProcessor processor = new GsProcessor();

            processor.Verbose = verbose;
            gifPackets.SendOperationsToGs(processor);
            processor.Run();
        }
Пример #2
0
 public HwReg(GsProcessor processor)
 {
     proc = processor;
 }
Пример #3
0
 public TexFlush(GsProcessor processor)
 {
     proc = processor;
 }