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 a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -12,12 +12,12 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port)
{
aborted = false;
// System.out.println("Connecting to " + ip + ", " + port);
minecraft->setLevel(nullptr);
minecraft->setLevel(NULL);
#if 1
// 4J - removed from separate thread, but need to investigate what we actually need here
connection = new ClientConnection(minecraft, ip, port);
if (aborted) return;
connection->send(std::make_shared<PreLoginPacket>(minecraft->user->name));
connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) );
#else
new Thread() {
@@ -45,7 +45,7 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port)
void ConnectScreen::tick()
{
if (connection != nullptr)
if (connection != NULL)
{
connection->tick();
}
@@ -69,7 +69,7 @@ void ConnectScreen::buttonClicked(Button *button)
if (button->id == 0)
{
aborted = true;
if (connection != nullptr) connection->close();
if (connection != NULL) connection->close();
minecraft->setScreen(new TitleScreen());
}
}
@@ -80,7 +80,7 @@ void ConnectScreen::render(int xm, int ym, float a)
Language *language = Language::getInstance();
if (connection == nullptr)
if (connection == NULL)
{
drawCenteredString(font, language->getElement(L"connect.connecting"), width / 2, height / 2 - 50, 0xffffff);
drawCenteredString(font, L"", width / 2, height / 2 - 10, 0xffffff);