示例#1
0
 public static bool loadDebugMap(Map.Map map)
 {
     try
     {
         // Calculate our base address so we dont need to pass map to Poke()
         if (!map.isOpen)
         {
             map.OpenMap(HaloMap.Map.MapTypes.Internal);
         }
         map.BR.BaseStream.Position = map.MapHeader.indexOffset;
         uint VirtIndexOffset = map.BR.ReadUInt32();
         map.BR.BaseStream.Position = map.MapHeader.indexOffset + 1456;
         VirtMatgOffset             = map.BR.ReadUInt32();
         uint diff = (uint)(VirtMatgOffset - (VirtIndexOffset - 32));
         BaseAddress = (uint)(VirtMatgOffset - (VirtIndexOffset - 32) + INDEX_BASE_ADDRESS);
         map.CloseMap();
     }
     catch
     {
         return(false);
     }
     return(true);
 }