コード例 #1
0
        private PluginInfo ReadPluginInfo()
        {
            PluginInfo pi = new PluginInfo();

            pi.pluginCount = br.ReadByte();

            return(pi);
        }
コード例 #2
0
        public SkyrimSavegame Read(String label, FileStream fileStream)
        {
            br = new SkyrimBinaryReader(fileStream);

            char[] magic = br.ReadChars(13);

            UInt32 headerSize = br.ReadUInt32();

            Print("magic", new string(magic));
            Print("headerSize", headerSize);

            Header header = ReadHeader();

            header.Print();
            ReadScreenshot(header);

            byte   formVersion    = br.ReadByte(); //uint8
            UInt32 pluginInfoSize = br.ReadUInt32();

            Print("formVersion", formVersion);
            Print("pluginInfoSize", pluginInfoSize);

            //PluginInfo pluginInfo = ReadPluginInfo();

            //skip pluginInfo
            br.ReadBytes((int)pluginInfoSize);

            FileLocationTable fileLocationTable = ReadFileLocationTable();

            fileLocationTable.Print();

            GlobalDataType[] globalDataTable1 = ReadGlobalDataTable(9); //Types 0 to 8.
            //GlobalDataType[] globalDataTable2 = ReadGlobalDataTable(15); //Types 100 to 114.


            SkyrimSavegame savegame = new SkyrimSavegame(label);

            savegame.header            = header;
            savegame.formVersion       = formVersion;
            savegame.fileLocationTable = fileLocationTable;
            savegame.globalDataTable1  = globalDataTable1;
            //savegame.globalDataTable2 = globalDataTable2;

            foreach (var ms in savegame.GetMiscStats().OrderBy(p => p.category).ThenBy(n => n.name))
            {
                Print("stats", "cat({0}).{1} = {2}", ms.category, ms.name, ms.value);
            }

            return(savegame);
        }
コード例 #3
0
        public SkyrimSavegame Read(String label, FileStream fileStream)
        {
            br = new SkyrimBinaryReader(fileStream);

            char[] magic = br.ReadChars(13);

            UInt32 headerSize = br.ReadUInt32();

            Print("magic", new string(magic));
            Print("headerSize", headerSize);

            Header header = ReadHeader();
            header.Print();
            ReadScreenshot(header);

            byte formVersion = br.ReadByte(); //uint8
            UInt32 pluginInfoSize = br.ReadUInt32();

            Print("formVersion", formVersion);
            Print("pluginInfoSize", pluginInfoSize);

            //PluginInfo pluginInfo = ReadPluginInfo();

            //skip pluginInfo
            br.ReadBytes((int) pluginInfoSize);

            FileLocationTable fileLocationTable = ReadFileLocationTable();
            fileLocationTable.Print();

            GlobalDataType[] globalDataTable1 = ReadGlobalDataTable(9); //Types 0 to 8.
            //GlobalDataType[] globalDataTable2 = ReadGlobalDataTable(15); //Types 100 to 114.

            SkyrimSavegame savegame = new SkyrimSavegame(label);
            savegame.header = header;
            savegame.formVersion = formVersion;
            savegame.fileLocationTable = fileLocationTable;
            savegame.globalDataTable1 = globalDataTable1;
            //savegame.globalDataTable2 = globalDataTable2;

            foreach (var ms in savegame.GetMiscStats().OrderBy(p => p.category).ThenBy(n => n.name))
            {
                Print("stats", "cat({0}).{1} = {2}", ms.category, ms.name, ms.value);
            }

            return savegame;
        }