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

Function pfile_write_hero

Source/pfile.cpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17BOOL gbValidSaveFile;
18
19void pfile_write_hero()
20{
21 DWORD save_num;
22 PkPlayerStruct pkplr;
23
24 save_num = pfile_get_save_num_from_name(plr[myplr]._pName);
25 if (pfile_open_archive(TRUE, save_num)) {
26 PackPlayer(&pkplr, myplr, gbMaxPlayers == 1);
27 pfile_encode_hero(&pkplr);
28 pfile_flush(gbMaxPlayers == 1, save_num);
29 }
30}
31
32DWORD pfile_get_save_num_from_name(const char *name)
33{

Callers 5

SaveGameFunction · 0.85
run_game_loopFunction · 0.85
GM_GameFunction · 0.85
pfile_rename_heroFunction · 0.85
pfile_updateFunction · 0.85

Calls 5

pfile_open_archiveFunction · 0.85
PackPlayerFunction · 0.85
pfile_encode_heroFunction · 0.85
pfile_flushFunction · 0.85

Tested by

no test coverage detected