you need to create a variable this could be "LevelN" for holding which level
then when you want to load the next level, do this:
- Code: Select all
char* tstring;
sprintf(tstring,"Level%02d.lvl",LevelN);
LoadGame(tstring);
I know that's probably not what you wanted, but you can know when there are no more Level##.lvl files with fopen
Unfortunatly, you can't just search through directorys and get every filenames, this is the closest maybe.
Of course, makslane marks evert feature request so don't worry