コード例 #1
0
ファイル: SSBHExporter.cs プロジェクト: trainboy2019/SSBHLib
        public static void WriteSsbhFile(string fileName, SsbhFile file, bool writeHeader = true)
        {
            using (SsbhExporter exporter = new SsbhExporter(new FileStream(fileName, FileMode.Create)))
            {
                // write ssbh header
                if (writeHeader)
                {
                    exporter.Write(new char[] { 'H', 'B', 'S', 'S' });
                    exporter.Write(0x40);
                    exporter.Pad(0x10);
                }

                // write file contents
                exporter.AddSsbhFile(file);
                exporter.Pad(4);
            }
        }
コード例 #2
0
        public static void WriteSsbhFile(string fileName, SsbhFile file, bool writeHeader = true)
        {
            using (SsbhExporter exporter = new SsbhExporter(new FileStream(fileName, FileMode.Create)))
            {
                // write ssbh header
                if (writeHeader)
                {
                    // The header is 16-byte aligned.
                    exporter.Write(new char[] { 'H', 'B', 'S', 'S' });
                    // TODO: This value is always present.
                    exporter.Write(0x40);
                    exporter.Pad(0x10);
                }

                // write file contents
                exporter.AddSsbhFile(file);
                exporter.Pad(4);
            }
        }