Remove all MSVC __int64 (#742)

This commit is contained in:
void_17
2026-03-07 03:31:30 +07:00
committed by GitHub
parent 175fc3824e
commit 988e3042e0
277 changed files with 3672 additions and 3684 deletions

View File

@@ -38,7 +38,7 @@ void ConsoleSchematicFile::save(DataOutputStream *dos)
dos->writeInt(m_zSize);
byteArray ba(new BYTE[ m_data.length ], m_data.length);
Compression::getCompression()->CompressLZXRLE( ba.data, &ba.length,
Compression::getCompression()->CompressLZXRLE( ba.data, &ba.length,
m_data.data, m_data.length);
dos->writeInt(ba.length);
@@ -71,13 +71,13 @@ void ConsoleSchematicFile::load(DataInputStream *dis)
m_ySize = dis->readInt();
m_zSize = dis->readInt();
int compressedSize = dis->readInt();
int compressedSize = dis->readInt();
byteArray compressedBuffer(compressedSize);
dis->readFully(compressedBuffer);
if(m_data.data != NULL)
{
delete [] m_data.data;
delete [] m_data.data;
m_data.data = NULL;
}
@@ -145,7 +145,7 @@ void ConsoleSchematicFile::load(DataInputStream *dis)
double z = pos->get(2)->data;
if( type == eTYPE_PAINTING || type == eTYPE_ITEM_FRAME )
{
{
x = ((IntTag *) eTag->get(L"TileX") )->data;
y = ((IntTag *) eTag->get(L"TileY") )->data;
z = ((IntTag *) eTag->get(L"TileZ") )->data;
@@ -184,7 +184,7 @@ void ConsoleSchematicFile::save_tags(DataOutputStream *dos)
delete tag;
}
__int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{
int xStart = static_cast<int>(std::fmax<double>(destinationBox->x0, (double)chunk->x*16));
int xEnd = static_cast<int>(std::fmin<double>(destinationBox->x1, (double)((xStart >> 4) << 4) + 16));
@@ -281,7 +281,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
// blockData[i] = Tile::endStone_Id;
// }
//}
PIXBeginNamedEvent(0,"Setting Block data");
chunk->setBlockData(blockData);
PIXEndNamedEvent();
@@ -323,7 +323,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
// At the point that this is called, we have all the neighbouring chunks loaded in (and generally post-processed, apart from this lighting pass), so
// we can do the sort of lighting that might propagate out of the chunk.
__int64 ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
int64_t ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{
int xStart = max(destinationBox->x0, (double)chunk->x*16);
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);
@@ -445,7 +445,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 );
if ( teCopy != NULL )
{
{
CompoundTag *teData = new CompoundTag();
te->save(teData);
@@ -478,7 +478,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
for (auto it = m_entities.begin(); it != m_entities.end();)
{
Vec3 *source = it->first;
double targetX = source->x;
double targetY = source->y + destinationBox->y0;
double targetZ = source->z;
@@ -498,7 +498,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
if( e->GetType() == eTYPE_PAINTING )
{
shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e);
double tileX = painting->xTile;
double tileZ = painting->zTile;
schematicCoordToChunkCoord(destinationBox, painting->xTile, painting->zTile, rot, tileX, tileZ);
@@ -511,7 +511,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
else if( e->GetType() == eTYPE_ITEM_FRAME )
{
shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e);
double tileX = frame->xTile;
double tileZ = frame->zTile;
schematicCoordToChunkCoord(destinationBox, frame->xTile, frame->zTile, rot, tileX, tileZ);
@@ -559,7 +559,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
zStart-=1;
else if(zStart < 0 && zStart%2 !=0)
zStart-=1;
// We want the end to be odd to have a total size that is even
if(xEnd > 0 && xEnd%2 == 0)
xEnd+=1;
@@ -613,7 +613,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
// Every x is a whole row
for(int xPos = xStart; xPos < xStart + xSize; ++xPos)
{
{
int xc = xPos >> 4;
int x0 = xPos - xc * 16;
@@ -622,7 +622,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
if (x1 > 16) x1 = 16;
for(int zPos = zStart; zPos < zStart + zSize;)
{
{
int zc = zPos >> 4;
int z0 = zStart - zc * 16;
@@ -713,11 +713,11 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
}
// 4J-JEV: Changed to check for instances of minecarts and hangingEntities instead of just eTYPE_PAINTING, eTYPE_ITEM_FRAME and eTYPE_MINECART
if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY))
if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY))
{
CompoundTag *eTag = new CompoundTag();
if( e->save(eTag) )
{
{
ListTag<DoubleTag> *pos = (ListTag<DoubleTag> *) eTag->getList(L"Pos");
pos->get(0)->data -= xStart;
@@ -725,7 +725,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
pos->get(2)->data -= zStart;
if( e->instanceof(eTYPE_HANGING_ENTITY) )
{
{
((IntTag *) eTag->get(L"TileX") )->data -= xStart;
((IntTag *) eTag->get(L"TileY") )->data -= yStart;
((IntTag *) eTag->get(L"TileZ") )->data -= zStart;
@@ -766,7 +766,7 @@ void ConsoleSchematicFile::getBlocksAndData(LevelChunk *chunk, byteArray *data,
// skyLightP += skyLightData.length;
// return;
//}
bool bHasLower, bHasUpper;
bHasLower = bHasUpper = false;
int lowerY0, lowerY1, upperY0, upperY1;