public void LoadHalo2MapHeaderInfo(ref BinaryReader BR)
{
// map stuff
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 = 352;
offsetToStringNames1 = BR.ReadInt32();
scriptReferenceCount = BR.ReadInt32();
sizeOfScriptReference = BR.ReadInt32();
offsetToStringIndex = BR.ReadInt32();
offsetToStringNames2 = BR.ReadInt32();
// map names and code to check if it is an external map
BR.BaseStream.Position = 408;
mapName = new string(BR.ReadChars(36));
BR.BaseStream.Position = 444;
scenarioPath = new string(BR.ReadChars(64));
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 = 704;
fileCount = BR.ReadInt32();
offsetTofileNames = BR.ReadInt32();
fileNamesSize = BR.ReadInt32();
offsetTofileIndex = BR.ReadInt32();
// signature
signature = BR.ReadInt32();
}