コード例 #1
0
ファイル: GameInfo.cs プロジェクト: hfenigma/AnotherSc2Hack
        private void GatherAndMapMapData()
        {
            if (!CAccessMapInfo)
                return;

            _.Info("Fetching Map Data", _.InfoImportance.NotImportant);

            // Map Buffer
            var mapLength = MyOffsets.RawMapTop + 4;

            var mapChunk = Memory.ReadMemory(MyOffsets.MapStruct, mapLength);

            var map = new Map
            {
                Bottom = BitConverter.ToInt32(mapChunk, MyOffsets.RawMapBottom),
                Top = BitConverter.ToInt32(mapChunk, MyOffsets.RawMapTop),
                Right = BitConverter.ToInt32(mapChunk, MyOffsets.RawMapRight),
                Left = BitConverter.ToInt32(mapChunk, MyOffsets.RawMapLeft),
            };

            map.PlayableWidth = map.Right - map.Left;
            map.PlayableHeight = map.Top - map.Bottom;

            Map = map;
        }
コード例 #2
0
 public void SetMap(PredefinedTypes.Map map)
 {
     /* Derp */
 }