Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -30,7 +30,7 @@ void ArchiveFile::_readHeader(DataInputStream *dis)
|
||||
|
||||
ArchiveFile::ArchiveFile(File file)
|
||||
{
|
||||
m_cachedData = nullptr;
|
||||
m_cachedData = NULL;
|
||||
m_sourcefile = file;
|
||||
app.DebugPrintf("Loading archive file...\n");
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
@@ -48,7 +48,7 @@ ArchiveFile::ArchiveFile(File file)
|
||||
FileInputStream fis(file);
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
byteArray readArray(static_cast<unsigned int>(file.length()));
|
||||
byteArray readArray(file.length());
|
||||
fis.read(readArray,0,file.length());
|
||||
|
||||
ByteArrayInputStream bais(readArray);
|
||||
@@ -122,20 +122,20 @@ byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
HANDLE hfile = CreateFile( m_sourcefile.getPath().c_str(),
|
||||
GENERIC_READ,
|
||||
0,
|
||||
nullptr,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
#else
|
||||
app.DebugPrintf("Createfile archive\n");
|
||||
HANDLE hfile = CreateFile( wstringtofilename(m_sourcefile.getPath()),
|
||||
GENERIC_READ,
|
||||
0,
|
||||
nullptr,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
app.DebugPrintf("hfile ok\n");
|
||||
DWORD ok = SetFilePointer( hfile,
|
||||
data->ptr,
|
||||
nullptr,
|
||||
NULL,
|
||||
FILE_BEGIN
|
||||
);
|
||||
|
||||
@@ -157,7 +157,7 @@ byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
(LPVOID) pbData,
|
||||
data->filesize,
|
||||
&bytesRead,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
if(bSuccess==FALSE)
|
||||
@@ -182,7 +182,7 @@ byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
#endif
|
||||
|
||||
// Compressed filenames are preceeded with an asterisk.
|
||||
if ( data->isCompressed && out.data != nullptr )
|
||||
if ( data->isCompressed && out.data != NULL )
|
||||
{
|
||||
/* 4J-JEV:
|
||||
* If a compressed file is accessed before compression object is
|
||||
@@ -204,7 +204,7 @@ byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
out.length = decompressedSize;
|
||||
}
|
||||
|
||||
assert(out.data != nullptr); // THERE IS NO FILE WITH THIS NAME!
|
||||
assert(out.data != NULL); // THERE IS NO FILE WITH THIS NAME!
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user