Search the save dir for saved games and their names.
()
| 2098 | |
| 2099 | /** Search the save dir for saved games and their names. */ |
| 2100 | private static void Create_Savestrings() { |
| 2101 | int i; |
| 2102 | QuakeFile f; |
| 2103 | String name; |
| 2104 | |
| 2105 | for (i = 0; i < MAX_SAVEGAMES; i++) { |
| 2106 | |
| 2107 | m_savestrings[i] = "<EMPTY>"; |
| 2108 | name = FS.getWriteDir() + "/save/save" + i + "/server_mapcmd.ssv"; |
| 2109 | |
| 2110 | try { |
| 2111 | f = new QuakeFile(name, "r", false, -1); |
| 2112 | String str = f.readString(); |
| 2113 | if (str != null) |
| 2114 | m_savestrings[i] = str; |
| 2115 | f.close(); |
| 2116 | m_savevalid[i] = true; |
| 2117 | } catch (Exception e) { |
| 2118 | m_savestrings[i] = "<EMPTY>"; |
| 2119 | m_savevalid[i] = false; |
| 2120 | } |
| 2121 | ; |
| 2122 | } |
| 2123 | } |
| 2124 | |
| 2125 | private static void LoadGameCallback(Object self) { |
| 2126 | menuaction_s a = (menuaction_s) self; |
no test coverage detected