21 #include "asset_manager.hpp" 28 Result AssetManager::readBinaryFile(
const char *pPath,
void **pData,
size_t *pSize)
30 FILE *file = fopen(pPath,
"rb");
32 return RESULT_ERROR_IO;
34 fseek(file, 0, SEEK_END);
35 long len = ftell(file);
42 return RESULT_ERROR_OUT_OF_MEMORY;
46 if (fread(*pData, 1, *pSize, file) != *pSize)
50 return RESULT_ERROR_IO;
54 return RESULT_SUCCESS;