Exemplo n.º 1
0
        protected override bool ReadInternal()
        {
            Width  = -1;
            Height = -1;

            MagicHead = Reader.ReadChars(6);             // GRAT..
            if (MagicHead[0] != 'G' || MagicHead[1] != 'R' || MagicHead[2] != 'A' || MagicHead[3] != 'T')
            {
                return(false);
            }

            Width  = Reader.ReadInt32();
            Height = Reader.ReadInt32();
            Cells  = new RoGatCell[Width * Height];

            for (int i = 0; i < Cells.Length; i++)
            {
                Cells[i] = new RoGatCell(
                    Reader.ReadSingle(),
                    Reader.ReadSingle(),
                    Reader.ReadSingle(),
                    Reader.ReadSingle(),
                    Reader.ReadByte()
                    );
                Reader.BaseStream.Position += 3;                 // 3x unknown Char
            }

            return(true);
        }
Exemplo n.º 2
0
		protected override bool ReadInternal() {
			Width = -1;
			Height = -1;

			MagicHead = Reader.ReadChars(6); // GRAT..
			if (MagicHead[0] != 'G' || MagicHead[1] != 'R' || MagicHead[2] != 'A' || MagicHead[3] != 'T') {
				return false;
			}

			Width = Reader.ReadInt32();
			Height = Reader.ReadInt32();
			Cells = new RoGatCell[Width * Height];

			for (int i = 0; i < Cells.Length; i++) {
				Cells[i] = new RoGatCell(
					Reader.ReadSingle(),
					Reader.ReadSingle(),
					Reader.ReadSingle(),
					Reader.ReadSingle(),
					Reader.ReadByte()
				);
				Reader.BaseStream.Position += 3; // 3x unknown Char
			}

			return true;
		}