コード例 #1
0
ファイル: Chunk_MPHD.cs プロジェクト: justMaku/W3DT
        public Chunk_MPHD(WDTFile file) : base(file, "MPHD", Magic)
        {
            flags = file.readUInt32();
            unk1  = file.readUInt32();
            // 4 * 6 bytes of unused data here.
            // No need to skip, seek check higher up will take care of it.

            LogValue("flags", flags);
            LogValue("unk1", unk1);
        }
コード例 #2
0
        public Chunk_MAIN(WDTFile file) : base(file, "MAIN", Magic)
        {
            map = new bool[64, 64];
            int tileCount = 0;

            for (int y = 0; y < 64; y++)
            {
                for (int x = 0; x < 64; x++)
                {
                    UInt32 flags = file.readUInt32();
                    file.skip(4); // Runtime area

                    if (flags == 1)
                    {
                        map[x, y] = true;
                        tileCount++;
                    }
                    else
                    {
                        map[x, y] = false;
                    }
                }
            }

            LogWrite(string.Format("Loaded ADT map structure with {0} tiles (out of possible 4096).", tileCount));
        }
コード例 #3
0
ファイル: Chunk_MAIN.cs プロジェクト: Kruithne/W3DT
        public Chunk_MAIN(WDTFile file)
            : base(file, "MAIN", Magic)
        {
            map = new bool[64,64];
            int tileCount = 0;

            for (int y = 0; y < 64; y++)
            {
                for (int x = 0; x < 64; x++)
                {
                    UInt32 flags = file.readUInt32();
                    file.skip(4); // Runtime area

                    if (flags == 1)
                    {
                        map[x, y] = true;
                        tileCount++;
                    }
                    else
                    {
                        map[x, y] = false;
                    }
                }
            }

            LogWrite(string.Format("Loaded ADT map structure with {0} tiles (out of possible 4096).", tileCount));
        }
コード例 #4
0
ファイル: Chunk_MVER.cs プロジェクト: justMaku/W3DT
 public Chunk_MVER(WDTFile file) : base(file, "MVER", Magic)
 {
     version = file.readUInt32();
     LogValue("version", version);
 }
コード例 #5
0
ファイル: Chunk_MVER.cs プロジェクト: Kruithne/W3DT
 public Chunk_MVER(WDTFile file)
     : base(file, "MVER", Magic)
 {
     version = file.readUInt32();
     LogValue("version", version);
 }