Walls are 1's.
I've looked into my code and my structure is like this:
Code:
#define NORTH_WALL 0x01
#define WEST_WALL 0x02
#define EAST_WALL 0x04
#define SOUTH_WALL 0x08
#define ALL_WALL (NORTH_WALL | WEST_WALL | EAST_WALL | SOUTH_WALL)
struct MazeCelll
{
DWORD CellInfo;
DWORD Row;
DWORD Col;
};
Init the maze for all cells to have ALL_WALL as their cell info. Now when you move north out of the current cell (if it's empty and passes the tests I mentioned above) then simply remove the north wall from the cell before you move to the next cell. The process is the same for all other directions.
Code:
Maze[offset].CellInfo-=NORTH_WALL;
Then when you draw the maze you just look at cell info and use bit masks to determine which walls are 'up' and which are 'down'.