public void Load(Stream stream)
 {
     size   = OblivionUtil.LoadBinaryCompatible <uint>(stream);
     width  = OblivionUtil.LoadBinaryCompatible <uint>(stream);
     height = OblivionUtil.LoadBinaryCompatible <uint>(stream);
     data   = new byte[3 * width * height];
     stream.Read(data, 0, data.Length);
 }
Exemple #2
0
 public void Load(Stream stream)
 {
     flag = stream.ReadByte() > 0;
     if (flag)
     {
         iref = OblivionUtil.LoadBinaryCompatible <uint>(stream);
     }
 }
Exemple #3
0
 public void Load(Stream stream)
 {
     byte[] buffer = new byte[12];
     stream.Read(buffer, 0, 12);
     fileID       = Encoding.ASCII.GetString(buffer);
     majorVersion = (byte)stream.ReadByte();
     minorVersion = (byte)stream.ReadByte();
     exeTime      = OblivionUtil.LoadSystemTime(stream);
 }
Exemple #4
0
        public void Load(Stream stream)
        {
            byte count = (byte)stream.ReadByte();

            plugins = new string[count];
            for (int i = 0; i < count; i++)
            {
                plugins[i] = OblivionUtil.LoadBString(stream);
            }
        }
Exemple #5
0
        public void Load(Stream stream)
        {
            formID  = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            type    = (ChangeRecordType)OblivionUtil.LoadBinaryCompatible <byte>(stream);
            flags   = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            version = (byte)stream.ReadByte();

            ushort dataSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            data = new byte[dataSize];
            stream.Read(data, 0, dataSize);
        }
        public void Load(Stream stream)
        {
            headerVersion  = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            saveHeaderSize = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            saveNum        = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            pcName         = OblivionUtil.LoadBZString(stream);
            pcLevel        = OblivionUtil.LoadBinaryCompatible <ushort>(stream);
            pcLocation     = OblivionUtil.LoadBZString(stream);
            gameDays       = OblivionUtil.LoadBinaryCompatible <float>(stream);
            gameTicks      = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            gameTime   = OblivionUtil.LoadSystemTime(stream);
            screenshot = OblivionUtil.LoadScreenshot(stream);
        }
Exemple #7
0
        public void Load(Stream stream)
        {
            saveFileHeader.Load(stream);
            saveGameHeader.Load(stream);
            pluginList.Load(stream);
            globalSection.Load(stream);

            records = new ChangeRecord[globalSection.recordsNum];
            for (int i = 0; i < globalSection.recordsNum; i++)
            {
                records[i] = OblivionUtil.LoadChangeRecord(stream);
            }

            uint temporaryEffectsDataSize = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            temporaryEffectsData = new byte[temporaryEffectsDataSize];
            stream.Read(temporaryEffectsData, 0, (int)temporaryEffectsDataSize);

            uint formIDsNum = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            formIDs = new uint[formIDsNum];
            for (int i = 0; i < formIDsNum; i++)
            {
                formIDs[i] = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            }

            uint worldSpacesNum = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            worldSpaces = new uint[worldSpacesNum];
            for (int i = 0; i < worldSpacesNum; i++)
            {
                worldSpaces[i] = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            }

            //TODO: http://www.uesp.net/wiki/Tes4Mod:Save_File_Format
        }
        public void Load(Stream stream)
        {
            formIDsOffset = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            recordsNum    = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            nextObjectID  = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            worldID       = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            worldX        = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            worldY        = OblivionUtil.LoadBinaryCompatible <uint>(stream);
            pcLocation    = OblivionUtil.LoadPCLocation(stream);

            ushort globalsNum = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            globalVariables = new _GLOBALVARIABLE[globalsNum];
            for (int i = 0; i < globalsNum; i++)
            {
                globalVariables[i] = OblivionUtil.LoadGlobalVariable(stream);
            }

            tesClassSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            uint deathCountsNum = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            deathCounts = new _DEATHCOUNT[deathCountsNum];
            for (int i = 0; i < deathCountsNum; i++)
            {
                deathCounts[i] = OblivionUtil.LoadDeathCount(stream);
            }

            gameModeSeconds = OblivionUtil.LoadBinaryCompatible <float>(stream);

            ushort processesSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            processesData = new byte[processesSize];
            stream.Read(processesData, 0, processesSize);

            ushort specEventSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            specEventData = new byte[specEventSize];
            stream.Read(specEventData, 0, specEventSize);

            ushort weatherSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            weatherData = new byte[weatherSize];
            stream.Read(weatherData, 0, weatherSize);

            playerCombatCount = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            uint createdNum = OblivionUtil.LoadBinaryCompatible <uint>(stream);

            createdData = new _CREATEDDATA[createdNum];
            for (int i = 0; i < createdNum; i++)
            {
                createdData[i] = OblivionUtil.LoadCreatedData(stream);
            }

            ushort quickKeysNum = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            quickKeysData = new _QUICKKEYSDATA[quickKeysNum];
            for (int i = 0; i < quickKeysNum; i++)
            {
                quickKeysData[i] = OblivionUtil.LoadQuickKeysData(stream);
            }

            ushort reticuleSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            reticuleData = new byte[reticuleSize];
            stream.Read(reticuleData, 0, reticuleSize);

            ushort interfaceSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            interfaceData = new byte[interfaceSize];
            stream.Read(interfaceData, 0, interfaceSize);

            ushort regionsSize = OblivionUtil.LoadBinaryCompatible <ushort>(stream);
            ushort regionsNum  = OblivionUtil.LoadBinaryCompatible <ushort>(stream);

            regions = new _REGION[regionsNum];
            for (int i = 0; i < regionsNum; i++)
            {
                regions[i] = OblivionUtil.LoadRegion(stream);
            }
        }