simplified touche savegame listing

svn-id: r29112
This commit is contained in:
Gregory Montoir 2007-09-27 20:38:23 +00:00
parent c1eacc0357
commit d8831b44da
4 changed files with 21 additions and 32 deletions

View file

@ -407,4 +407,13 @@ void ToucheEngine::generateGameStateFileName(int num, char *dst, int len, bool p
dst[len] = 0;
}
int ToucheEngine::getGameStateFileSlot(const char *filename) const {
int i = -1;
const char *slot = strrchr(filename, '.');
if (slot) {
i = atoi(slot + 1);
}
return i;
}
} // namespace Touche