Files
MinecraftConsoles/Minecraft.Client/ReceivingLevelScreen.cpp
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

47 lines
1007 B
C++

#include "stdafx.h"
#include "ReceivingLevelScreen.h"
#include "ClientConnection.h"
#include "..\Minecraft.World\net.minecraft.locale.h"
ReceivingLevelScreen::ReceivingLevelScreen(ClientConnection *connection)
{
tickCount = 0;
this->connection = connection;
}
void ReceivingLevelScreen::keyPressed(char eventCharacter, int eventKey)
{
}
void ReceivingLevelScreen::init()
{
buttons.clear();
}
void ReceivingLevelScreen::tick()
{
tickCount++;
if (tickCount % 20 == 0)
{
connection->send( std::shared_ptr<KeepAlivePacket>( new KeepAlivePacket() ) );
}
if (connection != NULL)
{
connection->tick();
}
}
void ReceivingLevelScreen::buttonClicked(Button *button)
{
}
void ReceivingLevelScreen::render(int xm, int ym, float a)
{
renderDirtBackground(0);
Language *language = Language::getInstance();
drawCenteredString(font, language->getElement(L"multiplayer.downloadingTerrain"), width / 2, height / 2 - 50, 0xffffff);
Screen::render(xm, ym, a);
}