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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user