mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Use PHYSFS_readBytes instead of deprecated PHYSFS_read
This commit is contained in:
parent
5c9c7297ed
commit
06c6de9433
2 changed files with 3 additions and 3 deletions
|
@ -91,7 +91,7 @@ bool binaryBlob::unPackBinary(const char* name)
|
||||||
|
|
||||||
size = PHYSFS_fileLength(handle);
|
size = PHYSFS_fileLength(handle);
|
||||||
|
|
||||||
PHYSFS_read(handle, &m_headers, 1, sizeof(resourceheader) * 128);
|
PHYSFS_readBytes(handle, &m_headers, sizeof(resourceheader) * 128);
|
||||||
|
|
||||||
int offset = 0 + (sizeof(resourceheader) * 128);
|
int offset = 0 + (sizeof(resourceheader) * 128);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ bool binaryBlob::unPackBinary(const char* name)
|
||||||
{
|
{
|
||||||
PHYSFS_seek(handle, offset);
|
PHYSFS_seek(handle, offset);
|
||||||
m_memblocks[i] = (char*) malloc(m_headers[i].size);
|
m_memblocks[i] = (char*) malloc(m_headers[i].size);
|
||||||
PHYSFS_read(handle, m_memblocks[i], 1, m_headers[i].size);
|
PHYSFS_readBytes(handle, m_memblocks[i], m_headers[i].size);
|
||||||
offset += m_headers[i].size;
|
offset += m_headers[i].size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ void FILESYSTEM_loadFileToMemory(const char *name, unsigned char **mem, size_t *
|
||||||
*len = length;
|
*len = length;
|
||||||
}
|
}
|
||||||
*mem = (unsigned char*) malloc(length);
|
*mem = (unsigned char*) malloc(length);
|
||||||
PHYSFS_read(handle, *mem, 1, length);
|
PHYSFS_readBytes(handle, *mem, length);
|
||||||
PHYSFS_close(handle);
|
PHYSFS_close(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue