Exemple #1
0
        private void ReadHeader()
        {
            using (var stream = new FileStream(_fullPath, FileMode.Open, FileAccess.Read))
            {
                using (var reader = new BinaryReader(stream))
                {
                    var header = new FruaCommonGlbFileHeader
                                  {
                                      HeaderText = new string(reader.ReadChars(4)),
                                      FileSize = reader.ReadUInt32(),
                                  };

                    var filename = Path.GetFileName(_fullPath).ToUpper();

                    if (filename.Equals("STRG.GLB"))
                    {
                        ReadStrgGlb(reader);
                    }

                    if (filename.Equals("SCRIPT.GLB"))
                    {
                        ReadScriptGlb(reader);
                    }

                    if (filename.Equals("MONST.GLB"))
                    {
                        ReadMonsterGlb(reader);
                    }
                }
            }
        }
Exemple #2
0
        private void ReadHeader()
        {
            using (var stream = new FileStream(_fullPath, FileMode.Open, FileAccess.Read))
            {
                using (var reader = new BinaryReader(stream))
                {
                    var header = new FruaCommonGlbFileHeader
                    {
                        HeaderText = new string(reader.ReadChars(4)),
                        FileSize   = reader.ReadUInt32(),
                    };

                    var filename = Path.GetFileName(_fullPath).ToUpper();

                    if (filename.Equals("STRG.GLB"))
                    {
                        ReadStrgGlb(reader);
                    }

                    if (filename.Equals("SCRIPT.GLB"))
                    {
                        ReadScriptGlb(reader);
                    }

                    if (filename.Equals("MONST.GLB"))
                    {
                        ReadMonsterGlb(reader);
                    }
                }
            }
        }