1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 18:27:55 +00:00

savefile selection / an option to use no savefile

This commit is contained in:
Zeno Rogue
2022-09-15 12:38:39 +02:00
parent a20063c119
commit 308fcd90aa
10 changed files with 66 additions and 13 deletions

View File

@@ -999,8 +999,11 @@ EX modecode_t modecode(int mode) {
code_for[ss.s] = next;
if(mode == 2) return next;
if(scorefile == "") return next;
FILE *f = fopen(scorefile, "at");
FILE *f = fopen(scorefile.c_str(), "at");
if(!f) return next;
string s = as_hexstring(ss.s);
fprintf(f, "MODE %d %s\n", next, s.c_str());
fclose(f);