HaloMap.Map.MapHeaderInfo.LoadHaloCEMapHeaderInfo C# (CSharp) Méthode

LoadHaloCEMapHeaderInfo() public méthode

Halo 2 Vista map header info.
public LoadHaloCEMapHeaderInfo ( BinaryReader &BR ) : void
BR System.IO.BinaryReader The br.
Résultat void
        public void LoadHaloCEMapHeaderInfo(ref BinaryReader BR)
        {
            BR.BaseStream.Position = 8;
            fileSize = BR.ReadInt32();
            BR.BaseStream.Position = 16;
            indexOffset = BR.ReadInt32();
            metaStart = BR.ReadInt32();
            metaSize = BR.ReadInt32();
            combinedSize = BR.ReadInt32();
            BR.BaseStream.Position = 340;
            sizeOfCrazy = BR.ReadInt32();
            offsetToCrazy = BR.ReadInt32();

            // string stuff
            BR.BaseStream.Position = 364;
            offsetToStringNames1 = BR.ReadInt32();
            scriptReferenceCount = BR.ReadInt32();
            sizeOfScriptReference = BR.ReadInt32();
            offsetToStringIndex = BR.ReadInt32();
            offsetToStringNames2 = BR.ReadInt32();

            /*
            BR.BaseStream.Position = 364;
            SIDMetaTableOffset = BR.ReadInt32();
            SIDCount = BR.ReadInt32();
            SIDTableSize = BR.ReadInt32();
            SIDIndexOffset = BR.ReadInt32();
            SIDTableOffset = BR.ReadInt32();
            */

            // map names and code to check if it is an external map
            BR.BaseStream.Position = 420;
            mapName = new string(BR.ReadChars(36));
            BR.BaseStream.Position = 456;
            scenarioPath = new string(BR.ReadChars(80));
            mapType = MapTypes.Internal;
            if (scenarioPath.IndexOf("scenarios\\ui\\mainmenu\\mainmenu") != -1)
            {
                mapType = MapTypes.MainMenu;
            }

            if (scenarioPath.IndexOf("scenarios\\shared\\shared") != -1)
            {
                mapType = MapTypes.MPShared;
            }

            if (scenarioPath.IndexOf("scenarios\\shared\\single_player_shared") != -1)
            {
                mapType = MapTypes.SPShared;
            }

            // read in stuff about meta names
            BR.BaseStream.Position = 716;
            fileCount = BR.ReadInt32();
            offsetTofileNames = BR.ReadInt32();
            fileNamesSize = BR.ReadInt32();
            offsetTofileIndex = BR.ReadInt32();

            //Model Raw
            /*
            BR.BaseStream.Position = 744;
            ModelRawTableStart = BR.ReadInt32();
            ModelRawTableSize = BR.ReadInt32();
            */

            // signature
            BR.BaseStream.Position = 752;
            signature = BR.ReadInt32();
        }