Mercurial > otakunoraifu
comparison scn2k/scn2k_impl.cc @ 19:94fe9153efa5
Enable the 99th save
author | thib |
---|---|
date | Sat, 18 Oct 2008 19:27:05 +0000 |
parents | 92765a5661f7 |
children | 01aa5ddf7dc8 |
comparison
equal
deleted
inserted
replaced
18:4d7486cb20a9 | 19:94fe9153efa5 |
---|---|
1008 } | 1008 } |
1009 | 1009 |
1010 bool Scn2k::StatSaveFile(int num, int& year, int& month, int& day, int& wday, int& hour,int& min, int& sec, int& msec, string& title) const { | 1010 bool Scn2k::StatSaveFile(int num, int& year, int& month, int& day, int& wday, int& hour,int& min, int& sec, int& msec, string& title) const { |
1011 char buf[1024]; | 1011 char buf[1024]; |
1012 string path = MakeSaveFile(); | 1012 string path = MakeSaveFile(); |
1013 if (num <= 0 || num > 99) return false; | 1013 if (num <= 0 || num > 100) return false; |
1014 sprintf(buf,".%d",num); | 1014 sprintf(buf,".%d",num); |
1015 path += buf; | 1015 path += buf; |
1016 | 1016 |
1017 struct stat sb; | 1017 struct stat sb; |
1018 if (stat(path.c_str(), &sb) == -1) return false; | 1018 if (stat(path.c_str(), &sb) == -1) return false; |