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

Function mpqapi_write_file

Source/mpqapi.cpp:437–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437BOOL mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dwLen)
438{
439 _BLOCKENTRY *blockEntry;
440
441 cur_archive.modified = true;
442 mpqapi_remove_hash_entry(pszName);
443 blockEntry = mpqapi_add_file(pszName, 0, 0);
444 if (!mpqapi_write_file_contents(pszName, pbData, dwLen, blockEntry)) {
445 mpqapi_remove_hash_entry(pszName);
446 return FALSE;
447 }
448 return TRUE;
449}
450
451_BLOCKENTRY *mpqapi_add_file(const char *pszName, _BLOCKENTRY *pBlk, int block_index)
452{

Callers 2

pfile_encode_heroFunction · 0.85
pfile_write_save_fileFunction · 0.85

Calls 3

mpqapi_remove_hash_entryFunction · 0.85
mpqapi_add_fileFunction · 0.85

Tested by

no test coverage detected