simplified touche savegame listing
svn-id: r29112
This commit is contained in:
parent
c1eacc0357
commit
d8831b44da
4 changed files with 21 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue