Code: Select all
int levelData[MAP_HEIGHT][MAP_WIDTH] = {{etc,etc,etc},{etc,etc,etc}};
int levelScene[MAP_HEIGHT][MAP_WIDTH] = {{etc,etc,etc},{etc,etc,etc}};
Copying and pasting the contents is what I am doing right now, but its not very practical, if the game will end up switching levels, i can't have like 80 declarations of 64*64 arrays! Anyone know how this is possible?
EDIT: Or, does anyone know the code to read a file for every space, and in between, convert that to an int?
Like this:
0 2 4 6 7 33 2 57 22 45 2
to
int levelData[adf][asdf] = {0,2,4,6,7,33,2,57,22,45,2};
??