示例#1
0
        public override void Read(string file)
        {
            BinaryReader br = new BinaryReader(File.OpenRead(file));

            scx = new sSCx();

            scx.type     = br.ReadChars(4);
            scx.unknown1 = br.ReadUInt32();
            scx.unknown2 = br.ReadUInt32();
            scx.unknown3 = br.ReadUInt32();    // Usually 0x00
            scx.unknown4 = br.ReadUInt32();

            ushort width  = br.ReadUInt16();
            ushort height = br.ReadUInt16();

            scx.size_mapData2 = br.ReadUInt32();   // Is alway the same?
            scx.size_mapData  = br.ReadUInt32();

            NTFS[] map = new NTFS[scx.size_mapData / 2];
            for (int i = 0; i < map.Length; i++)
            {
                map[i] = Actions.MapInfo(br.ReadUInt16());
            }

            br.Close();
            Set_Map(map, false, width, height);
        }
示例#2
0
文件: SCx.cs 项目: MetLob/tinke
        public override void Read(string file)
        {
            BinaryReader br = new BinaryReader(File.OpenRead(file));
            scx = new sSCx();

            scx.type = br.ReadChars(4);
            scx.unknown1 = br.ReadUInt32();
            scx.unknown2 = br.ReadUInt32();
            scx.unknown3 = br.ReadUInt32();    // Usually 0x00
            scx.unknown4 = br.ReadUInt32();

            ushort width = br.ReadUInt16();
            ushort height = br.ReadUInt16();
            scx.size_mapData2 = br.ReadUInt32();   // Is alway the same?
            scx.size_mapData = br.ReadUInt32();

            NTFS[] map = new NTFS[scx.size_mapData / 2];
            for (int i = 0; i < map.Length; i++)
                map[i] = Actions.MapInfo(br.ReadUInt16());

            br.Close();
            Set_Map(map, false, width, height);
        }