|
|
@ -210,13 +210,8 @@ void CAsyncFileManager::CFileLoad::run (void)
|
|
|
|
FILE *f = nlfopen (_FileName, "rb");
|
|
|
|
FILE *f = nlfopen (_FileName, "rb");
|
|
|
|
if (f != NULL)
|
|
|
|
if (f != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint8 *ptr;
|
|
|
|
uint32 filesize=CFile::getFileSize (f);
|
|
|
|
long filesize=CFile::getFileSize (f);
|
|
|
|
uint8 *ptr = new uint8[filesize];
|
|
|
|
//fseek (f, 0, SEEK_END);
|
|
|
|
|
|
|
|
//long filesize = ftell (f);
|
|
|
|
|
|
|
|
//nlSleep(5);
|
|
|
|
|
|
|
|
//fseek (f, 0, SEEK_SET);
|
|
|
|
|
|
|
|
ptr = new uint8[filesize];
|
|
|
|
|
|
|
|
if (fread (ptr, filesize, 1, f) != 1)
|
|
|
|
if (fread (ptr, filesize, 1, f) != 1)
|
|
|
|
nlwarning("AFM: Couldn't read '%s'", _FileName.c_str());
|
|
|
|
nlwarning("AFM: Couldn't read '%s'", _FileName.c_str());
|
|
|
|
fclose (f);
|
|
|
|
fclose (f);
|
|
|
@ -256,13 +251,8 @@ void CAsyncFileManager::CMultipleFileLoad::run (void)
|
|
|
|
FILE *f = nlfopen (_FileNames[i], "rb");
|
|
|
|
FILE *f = nlfopen (_FileNames[i], "rb");
|
|
|
|
if (f != NULL)
|
|
|
|
if (f != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint8 *ptr;
|
|
|
|
uint32 filesize=CFile::getFileSize (f);
|
|
|
|
long filesize=CFile::getFileSize (f);
|
|
|
|
uint8 *ptr = new uint8[filesize];
|
|
|
|
//fseek (f, 0, SEEK_END);
|
|
|
|
|
|
|
|
//long filesize = ftell (f);
|
|
|
|
|
|
|
|
//nlSleep(5);
|
|
|
|
|
|
|
|
//fseek (f, 0, SEEK_SET);
|
|
|
|
|
|
|
|
ptr = new uint8[filesize];
|
|
|
|
|
|
|
|
if (fread (ptr, filesize, 1, f) != 1)
|
|
|
|
if (fread (ptr, filesize, 1, f) != 1)
|
|
|
|
nlwarning("AFM: Couldn't read '%s'", _FileNames[i].c_str());
|
|
|
|
nlwarning("AFM: Couldn't read '%s'", _FileNames[i].c_str());
|
|
|
|
fclose (f);
|
|
|
|
fclose (f);
|
|
|
|