[SOLVED]Reading wrong walkable areas from DMap!

04/09/2012 17:01 Mr_PoP#1
Code:
public IDMap Deserialize() {
            var dMap = new DMap();
            br = new BinaryReader(new FileStream(path, FileMode.Open));

            dMap.Version = br.ReadBytes(8);
            dMap.pulPath = Encoding.ASCII.GetString(br.ReadBytes(260)).Split('\0')[0];
            dMap.Height = br.ReadInt32();
            dMap.Width = br.ReadInt32();
            dMap.Cells = new MapCell[dMap.Height, dMap.Width];

            for (int x = 0; x < dMap.Height; x++) {
                for (int y = 0; y < dMap.Width; y++) {
                    dMap.Cells[x, y].Walkable = Convert.ToBoolean(br.ReadInt16());
                    br.ReadInt32();
                }
                
                br.ReadInt32();
            }
            br.Close();

            return dMap;
        }
can anyone tell me why am reading wrong Areas? for instance 400,400 it's walkable but my reader reads it as unwalkable.

Solved: I was not inverting the walkable!