Hey guys,
I need a function that reads a text file and stores the character someway, (I am assuming a 2D Array would be best?) then a function that reads through the characters and if the char is something specific (like "X") then it would draw a square (QUAD) 10wx10h multiplied by the location.
Example:
XXXXXX
X....X
X....X
X....X
X....X
XXXXXX
Would draw:
[][][][][][]
[] []
[] []
[] []
[] []
[][][][][][]
X is the square, and . is a space (Nothing there, it would be skipped)
Im basically creating a map based on a text file.
CODE SO FAR:
void readMap(std::string MapLoc) {
int gridMap[95] [55];
std::ifstream MapLoc;
for (int i =0, int j =0; i < 95, j < 55; i++, j++)
{
}
}
Incomplete obviously, but I attempted.