qbsp: change LoadFile spec so we don't need to cast when calling
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
31a9bf78c7
commit
fda99aac20
|
|
@ -41,7 +41,7 @@ LoadBSPFile(void)
|
|||
// Load the file header
|
||||
StripExtension(options.szBSPName);
|
||||
strcat(options.szBSPName, ".bsp");
|
||||
cFileSize = LoadFile(options.szBSPName, (void *)&header, true);
|
||||
cFileSize = LoadFile(options.szBSPName, &header, true);
|
||||
|
||||
if (header->version != BSPVERSION)
|
||||
Error(errBadVersion, options.szBSPName, header->version, BSPVERSION);
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ LoadFile
|
|||
==============
|
||||
*/
|
||||
size_t
|
||||
LoadFile(const char *filename, void **buf, bool nofail)
|
||||
LoadFile(const char *filename, void *bufptr, bool nofail)
|
||||
{
|
||||
char **buf = bufptr;
|
||||
size_t len;
|
||||
FILE *f;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
size_t LoadFile(const char *filename, void **buf, bool nofail);
|
||||
size_t LoadFile(const char *filename, void *bufptr, bool nofail);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ LoadMapFile(void)
|
|||
|
||||
Message(msgProgress, "LoadMapFile");
|
||||
|
||||
length = LoadFile(options.szMapName, (void *)&buf, true);
|
||||
length = LoadFile(options.szMapName, &buf, true);
|
||||
PreParseFile(buf);
|
||||
ParserInit(buf);
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ InitQBSP(int argc, char **argv)
|
|||
options.fVerbose = true;
|
||||
options.szMapName[0] = options.szBSPName[0] = options.wadPath[0] = 0;
|
||||
|
||||
length = LoadFile("qbsp.ini", (void *)&szBuf, false);
|
||||
length = LoadFile("qbsp.ini", &szBuf, false);
|
||||
if (length) {
|
||||
Message(msgLiteral, "Loading options from qbsp.ini\n");
|
||||
ParseOptions(szBuf);
|
||||
|
|
|
|||
Loading…
Reference in New Issue