MCPcopy Create free account
hub / github.com/diasurgical/devilution / pfile_get_save_path

Function pfile_get_save_path

Source/pfile.cpp:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void pfile_get_save_path(char *pszBuf, DWORD dwBufSize, DWORD save_num)
73{
74 char path[MAX_PATH];
75
76#ifdef SPAWN
77 const char *fmt = "%sshare_%d.sv";
78
79 if (gbMaxPlayers <= 1)
80 fmt = "%sspawn%d.sv";
81#else
82 const char *fmt = "%smulti_%d.sv";
83
84 if (gbMaxPlayers <= 1)
85 fmt = "%ssingle_%d.sv";
86#endif
87
88 GetPrefPath(path, MAX_PATH);
89 snprintf(pszBuf, MAX_PATH, fmt, path, save_num);
90}
91
92void pfile_flush(BOOL is_single_player, DWORD save_num)
93{

Callers 4

pfile_open_archiveFunction · 0.85
pfile_flushFunction · 0.85
pfile_open_save_archiveFunction · 0.85
pfile_delete_saveFunction · 0.85

Calls 1

GetPrefPathFunction · 0.85

Tested by

no test coverage detected