mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-27 22:04:39 +00:00
Use standard byte counts in save file IO
This commit is contained in:
@@ -307,7 +307,7 @@ void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius)
|
||||
//SetSpawnToPlayerPos();
|
||||
FileEntry *origFileEntry = currentSave->createFile( std::wstring( L"level.dat" ) );
|
||||
byteArray levelData( origFileEntry->getFileSize() );
|
||||
DWORD bytesRead;
|
||||
unsigned int bytesRead;
|
||||
currentSave->setFilePointer(origFileEntry,0,NULL,FILE_BEGIN);
|
||||
currentSave->readFile(
|
||||
origFileEntry,
|
||||
@@ -317,7 +317,7 @@ void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius)
|
||||
);
|
||||
|
||||
FileEntry *newFileEntry = newSave.createFile( std::wstring( L"level.dat" ) );
|
||||
DWORD bytesWritten;
|
||||
unsigned int bytesWritten;
|
||||
newSave.writeFile( newFileEntry,
|
||||
levelData.data, // data buffer
|
||||
origFileEntry->getFileSize(), // number of bytes to write
|
||||
@@ -388,4 +388,4 @@ DataOutputStream *CScene_DebugOverlay::getChunkDataOutputStream(std::unordered_m
|
||||
RegionFile *r = getRegionFile(newFileCache, saveFile, prefix, chunkX, chunkZ);
|
||||
return r->getChunkDataOutputStream(chunkX & 31, chunkZ & 31);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user