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

Function pfile_read_player_from_save

Source/pfile.cpp:380–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380void pfile_read_player_from_save()
381{
382 HANDLE archive;
383 DWORD save_num;
384 PkPlayerStruct pkplr;
385
386 save_num = pfile_get_save_num_from_name(gszHero);
387 archive = pfile_open_save_archive(NULL, save_num);
388 if (archive == NULL)
389 app_fatal("Unable to open archive");
390 if (!pfile_read_hero(archive, &pkplr))
391 app_fatal("Unable to load character");
392
393 UnPackPlayer(&pkplr, myplr, FALSE);
394 gbValidSaveFile = pfile_archive_contains_game(archive, save_num);
395 pfile_SFileCloseArchive(archive);
396}
397
398void GetTempLevelNames(char *szTemp)
399{

Callers 2

multi_init_multiFunction · 0.85

Calls 7

pfile_open_save_archiveFunction · 0.85
app_fatalFunction · 0.85
pfile_read_heroFunction · 0.85
UnPackPlayerFunction · 0.85
pfile_SFileCloseArchiveFunction · 0.85

Tested by

no test coverage detected