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

Function pfile_create_player_description

Source/pfile.cpp:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100BOOL pfile_create_player_description(char *dst, DWORD len)
101{
102 char desc[128];
103 _uiheroinfo uihero;
104
105 myplr = 0;
106 pfile_read_player_from_save();
107 game_2_ui_player(plr, &uihero, gbValidSaveFile);
108 UiSetupPlayerInfo(gszHero, &uihero, GAME_ID);
109
110 if (dst != NULL && len) {
111 if (UiCreatePlayerDescription(&uihero, GAME_ID, desc) == 0)
112 return FALSE;
113 SStrCopy(dst, desc, len);
114 }
115 return TRUE;
116}
117
118BOOL pfile_rename_hero(const char *name_1, const char *name_2)
119{

Callers 2

StartGameFunction · 0.85

Calls 5

game_2_ui_playerFunction · 0.85
UiSetupPlayerInfoFunction · 0.85
SStrCopyFunction · 0.85

Tested by

no test coverage detected