diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/AbstractContainerScreen.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (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/AbstractContainerScreen.cpp')
| -rw-r--r-- | Minecraft.Client/AbstractContainerScreen.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.Client/AbstractContainerScreen.cpp b/Minecraft.Client/AbstractContainerScreen.cpp index c2de6dc9..fbf1331d 100644 --- a/Minecraft.Client/AbstractContainerScreen.cpp +++ b/Minecraft.Client/AbstractContainerScreen.cpp @@ -51,7 +51,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) glColor4f(1, 1, 1, 1); glEnable(GL_RESCALE_NORMAL); - Slot *hoveredSlot = nullptr; + Slot *hoveredSlot = NULL; for ( Slot *slot : *menu->slots ) { @@ -73,7 +73,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) } shared_ptr<Inventory> inventory = minecraft->player->inventory; - if (inventory->getCarried() != nullptr) + if (inventory->getCarried() != NULL) { glTranslatef(0, 0, 32); // Slot old = carriedSlot; @@ -90,7 +90,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) renderLabels(); - if (inventory->getCarried() == nullptr && hoveredSlot != nullptr && hoveredSlot->hasItem()) + if (inventory->getCarried() == NULL && hoveredSlot != NULL && hoveredSlot->hasItem()) { wstring elementName = trimString(Language::getInstance()->getElementName(hoveredSlot->getItem()->getDescriptionId())); @@ -127,7 +127,7 @@ void AbstractContainerScreen::renderSlot(Slot *slot) int y = slot->y; shared_ptr<ItemInstance> item = slot->getItem(); - if (item == nullptr) + if (item == NULL) { int icon = slot->getNoItemIcon(); if (icon >= 0) @@ -151,7 +151,7 @@ Slot *AbstractContainerScreen::findSlot(int x, int y) { if (isHovering(slot, x, y)) return slot; } - return nullptr; + return NULL; } bool AbstractContainerScreen::isHovering(Slot *slot, int xm, int ym) @@ -177,7 +177,7 @@ void AbstractContainerScreen::mouseClicked(int x, int y, int buttonNum) bool clickedOutside = (x < xo || y < yo || x >= xo + imageWidth || y >= yo + imageHeight); int slotId = -1; - if (slot != nullptr) slotId = slot->index; + if (slot != NULL) slotId = slot->index; if (clickedOutside) { @@ -210,7 +210,7 @@ void AbstractContainerScreen::keyPressed(wchar_t eventCharacter, int eventKey) void AbstractContainerScreen::removed() { - if (minecraft->player == nullptr) return; + if (minecraft->player == NULL) return; } void AbstractContainerScreen::slotsChanged(shared_ptr<Container> container) |
