aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/ArchiveFile.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/ArchiveFile.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
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 a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/ArchiveFile.cpp')
-rw-r--r--Minecraft.Client/ArchiveFile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Minecraft.Client/ArchiveFile.cpp b/Minecraft.Client/ArchiveFile.cpp
index 608428b6..2e57a5bb 100644
--- a/Minecraft.Client/ArchiveFile.cpp
+++ b/Minecraft.Client/ArchiveFile.cpp
@@ -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!
}