Use BYTE Win Typedef instead of byte typedef from Minecraft.World

This commit is contained in:
GabsPuNs
2026-05-10 21:03:03 -04:00
parent 20d395b88d
commit 3e7983ab3c
216 changed files with 798 additions and 800 deletions

View File

@@ -172,7 +172,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
Compression::getCompression()->SetDecompressionType(SAVE_FILE_PLATFORM_LOCAL); // and then set the decompression back to the local machine's standard type
}
// Only ReAlloc if we need to (we might already have enough) and align to 512 byte boundaries
// Only ReAlloc if we need to (we might already have enough) and align to 512 BYTE boundaries
DWORD currentHeapSize = pagesCommitted * CSF_PAGE_SIZE;
DWORD desiredSize = decompSize;
@@ -249,7 +249,7 @@ void ConsoleSaveFileOriginal::deleteFile( FileEntry *file )
const int bufferSize = 4096;
int amountToRead = bufferSize;
byte buffer[bufferSize];
BYTE buffer[bufferSize];
DWORD bufferDataSize = 0;
@@ -497,12 +497,12 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(FileEntry *file, DWORD nNumberOfByt
const DWORD bufferSize = 4096;
DWORD amountToRead = bufferSize;
//assert( nNumberOfBytesToWrite <= bufferSize );
static byte buffer1[bufferSize];
static byte buffer2[bufferSize];
static BYTE buffer1[bufferSize];
static BYTE buffer2[bufferSize];
DWORD buffer1Size = 0;
DWORD buffer2Size = 0;
// Only ReAlloc if we need to (we might already have enough) and align to 512 byte boundaries
// Only ReAlloc if we need to (we might already have enough) and align to 512 BYTE boundaries
DWORD currentHeapSize = pagesCommitted * CSF_PAGE_SIZE;
DWORD desiredSize = header.GetFileSize() + nNumberOfBytesToWrite;
@@ -551,7 +551,7 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(FileEntry *file, DWORD nNumberOfByt
uintptr_t uiFromStart = (uintptr_t)spaceStartOffset;
uintptr_t uiFromEnd = (uintptr_t)beginEndOfDataOffset;
// Round both of these values to get 4096 byte chunks that we will need to at least partially move
// Round both of these values to get 4096 BYTE chunks that we will need to at least partially move
uintptr_t uiFromStartChunk = uiFromStart & ~static_cast<uintptr_t>(4095);
uintptr_t uiFromEndChunk = (uiFromEnd - 1 ) & ~static_cast<uintptr_t>(4095);
@@ -689,11 +689,11 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
// On PS3, don't compress the data as we can't really afford the extra memory this requires for the output buffer. Instead we'll be writing
// directly from the save data.
StorageManager.SetSaveData(pvSaveMem,fileSize);
byte *compData = (byte *)pvSaveMem;
BYTE *compData = (BYTE *)pvSaveMem;
#else
// Attempt to allocate the required memory
// We do not own this, it belongs to the StorageManager
byte *compData = static_cast<byte *>(StorageManager.AllocateSaveData(compLength));
BYTE *compData = static_cast<BYTE *>(StorageManager.AllocateSaveData(compLength));
#ifdef __PSVITA__
// AP - make sure we always allocate just what is needed so it will only SAVE what is needed.
@@ -731,7 +731,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
compLength = compLength+8;
// Attempt to allocate the required memory
compData = static_cast<byte *>(StorageManager.AllocateSaveData(compLength));
compData = static_cast<BYTE *>(StorageManager.AllocateSaveData(compLength));
}
#endif