コード例 #1
0
 public GlobalVariable(Reader reader)
 {
     Name = reader.ReadString();
     byte[] bytes = new byte[4];
     bytes = reader.ReadBytes(4);
     Value = (bytes[0] << 24) + (bytes[1] << 16) + (bytes[2] << 8) + (bytes[3] << 0);
 }
コード例 #2
0
        internal void ReadWAVConfiguration(Reader reader)
        {
            byte SoundFX_count = reader.ReadByte();

            for (int i = 0; i < SoundFX_count; ++i)
            {
                SoundFX.Add(reader.ReadString());
            }
        }
コード例 #3
0
ファイル: DataFile.cs プロジェクト: MGRich/sonic-3-mixed
            public FileInfo(Reader reader)
            {
                bool DontFlip = false;

                FileName = reader.ReadString();

                string ext = System.IO.Path.GetExtension(FileName);

                if (ext == ".ogg" || ext == ".wav")
                {
                    DontFlip  = true;
                    encrypted = false;
                }
                else
                {
                    encrypted = true;
                    DontFlip  = false;
                }

                Console.WriteLine(FileName + " Test " + DontFlip);
                if (DontFlip)
                {
                    fileSize = reader.ReadUInt32();
                    Filedata = reader.ReadBytes(fileSize);
                }
                else if (!DontFlip)
                {
                    fileSize = reader.ReadUInt32();
                    Filedata = reader.ReadBytes(fileSize);
                    for (int i = 0; i < Filedata.Length; i++)
                    {
                        byte b = (byte)~Filedata[i];
                        Filedata[i] = b;
                    }
                }
            }
コード例 #4
0
ファイル: DataFile.cs プロジェクト: MGRich/sonic-3-mixed
 public DirInfo(Reader reader)
 {
     Directory = reader.ReadString();
     Console.WriteLine(Directory);
     Address = reader.ReadInt32();
 }
コード例 #5
0
 public void read(Reader reader)
 {
     fileName = reader.ReadString();
     fileData = reader.ReadBytes((int)reader.ReadUInt32());
 }
コード例 #6
0
 public GlobalVariable(Reader reader)
 {
     Name = reader.ReadString();
     //Console.WriteLine(Name);
     Value = reader.ReadInt32();
 }