| 504 | } |
| 505 | |
| 506 | void pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLen, DWORD qwLen) |
| 507 | { |
| 508 | DWORD save_num; |
| 509 | char FileName[MAX_PATH]; |
| 510 | |
| 511 | pfile_strcpy(FileName, pszName); |
| 512 | save_num = pfile_get_save_num_from_name(plr[myplr]._pName); |
| 513 | { |
| 514 | char password[16] = PASSWORD_SINGLE; |
| 515 | if (gbMaxPlayers > 1) |
| 516 | strcpy(password, PASSWORD_MULTI); |
| 517 | |
| 518 | codec_encode(pbData, dwLen, qwLen, password); |
| 519 | } |
| 520 | if (!pfile_open_archive(FALSE, save_num)) |
| 521 | app_fatal("Unable to write so save file archive"); |
| 522 | mpqapi_write_file(FileName, pbData, qwLen); |
| 523 | pfile_flush(TRUE, save_num); |
| 524 | } |
| 525 | |
| 526 | void pfile_strcpy(char *dst, const char *src) |
| 527 | { |
no test coverage detected