aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/SelectWorldScreen.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/SelectWorldScreen.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
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 a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/SelectWorldScreen.cpp')
-rw-r--r--Minecraft.Client/SelectWorldScreen.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Minecraft.Client/SelectWorldScreen.cpp b/Minecraft.Client/SelectWorldScreen.cpp
index c6d417c5..ebae8c83 100644
--- a/Minecraft.Client/SelectWorldScreen.cpp
+++ b/Minecraft.Client/SelectWorldScreen.cpp
@@ -16,11 +16,11 @@ SelectWorldScreen::SelectWorldScreen(Screen *lastScreen)
title = L"Select world";
done = false;
selectedWorld = 0;
- worldSelectionList = nullptr;
+ worldSelectionList = NULL;
isDeleting = false;
- deleteButton = nullptr;
- selectButton = nullptr;
- renameButton = nullptr;
+ deleteButton = NULL;
+ selectButton = NULL;
+ renameButton = NULL;
this->lastScreen = lastScreen;
}
@@ -115,14 +115,14 @@ void SelectWorldScreen::buttonClicked(Button *button)
else
{
// create demo world
- minecraft->setScreen(nullptr);
+ minecraft->setScreen(NULL);
if (done) return;
done = true;
// 4J Stu - Not used, so commenting to stop the build failing
#if 0
minecraft->gameMode = new DemoMode(minecraft);
minecraft->selectLevel(CreateWorldScreen::findAvailableFolderName(minecraft->getLevelSource(), L"Demo"), L"Demo World", 0L);
- minecraft->setScreen(nullptr);
+ minecraft->setScreen(NULL);
#endif
}
}
@@ -142,20 +142,20 @@ void SelectWorldScreen::buttonClicked(Button *button)
void SelectWorldScreen::worldSelected(int id)
{
- minecraft->setScreen(nullptr);
+ minecraft->setScreen(NULL);
if (done) return;
done = true;
- minecraft->gameMode = nullptr; //new SurvivalMode(minecraft);
+ minecraft->gameMode = NULL; //new SurvivalMode(minecraft);
wstring worldFolderName = getWorldId(id);
- if (worldFolderName == L"") // 4J - was nullptr comparison
+ if (worldFolderName == L"") // 4J - was NULL comparison
{
worldFolderName = L"World" + std::to_wstring(id);
}
// 4J Stu - Not used, so commenting to stop the build failing
#if 0
minecraft->selectLevel(worldFolderName, getWorldName(id), 0);
- minecraft->setScreen(nullptr);
+ minecraft->setScreen(NULL);
#endif
}
@@ -235,7 +235,7 @@ SelectWorldScreen::WorldSelectionList::WorldSelectionList(SelectWorldScreen *sws
int SelectWorldScreen::WorldSelectionList::getNumberOfItems()
{
- return static_cast<int>(this->parent->levelList->size());
+ return (int)this->parent->levelList->size();
}
void SelectWorldScreen::WorldSelectionList::selectItem(int item, bool doubleClick)
@@ -259,7 +259,7 @@ bool SelectWorldScreen::WorldSelectionList::isSelectedItem(int item)
int SelectWorldScreen::WorldSelectionList::getMaxPosition()
{
- return static_cast<int>(parent->levelList->size()) * 36;
+ return (int)parent->levelList->size() * 36;
}
void SelectWorldScreen::WorldSelectionList::renderBackground()