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:
@@ -10,15 +10,15 @@
|
||||
#include "..\Minecraft.World\net.minecraft.world.item.h"
|
||||
|
||||
const float StatsScreen::SLOT_TEX_SIZE = 128.0f;
|
||||
ItemRenderer *StatsScreen::itemRenderer = nullptr;
|
||||
ItemRenderer *StatsScreen::itemRenderer = NULL;
|
||||
|
||||
StatsScreen::StatsScreen(Screen *lastScreen, StatsCounter *stats)
|
||||
{
|
||||
// 4J - added initialisers
|
||||
itemRenderer = new ItemRenderer();
|
||||
statsList = nullptr;
|
||||
itemStatsList = nullptr;
|
||||
blockStatsList = nullptr;
|
||||
statsList = NULL;
|
||||
itemStatsList = NULL;
|
||||
blockStatsList = NULL;
|
||||
this->lastScreen = lastScreen;
|
||||
this->stats = stats;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ StatsScreen::GeneralStatisticsList::GeneralStatisticsList(StatsScreen *ss) : Scr
|
||||
|
||||
int StatsScreen::GeneralStatisticsList::getNumberOfItems()
|
||||
{
|
||||
return static_cast<int>(Stats::generalStats->size());
|
||||
return (int)Stats::generalStats->size();
|
||||
}
|
||||
|
||||
void StatsScreen::GeneralStatisticsList::selectItem(int item, bool doubleClick)
|
||||
@@ -293,7 +293,7 @@ void StatsScreen::StatisticsList::clickedHeader(int headerMouseX, int headerMous
|
||||
|
||||
int StatsScreen::StatisticsList::getNumberOfItems()
|
||||
{
|
||||
return static_cast<int>(statItemList.size());
|
||||
return (int)statItemList.size();
|
||||
}
|
||||
|
||||
ItemStat *StatsScreen::StatisticsList::getSlotStat(int slot)
|
||||
@@ -303,7 +303,7 @@ ItemStat *StatsScreen::StatisticsList::getSlotStat(int slot)
|
||||
|
||||
void StatsScreen::StatisticsList::renderStat(ItemStat *stat, int x, int y, bool shaded)
|
||||
{
|
||||
if (stat != nullptr)
|
||||
if (stat != NULL)
|
||||
{
|
||||
wstring msg = stat->format(parent->stats->getTotalValue(stat));
|
||||
parent->drawString(parent->font, msg, x - parent->font->width(msg), y + SLOT_TEXT_OFFSET, shaded ? 0xffffff : 0x909090);
|
||||
@@ -373,7 +373,7 @@ void StatsScreen::StatisticsList::renderMousehoverTooltip(ItemStat *stat, int x,
|
||||
{
|
||||
// 4J Stu - Unused
|
||||
#if 0
|
||||
if (stat == nullptr)
|
||||
if (stat == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -429,11 +429,11 @@ StatsScreen::ItemStatisticsList::ItemStatisticsList(StatsScreen *ss) : StatsScre
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
else if (Stats::itemBroke[id] != nullptr && parent->stats->getTotalValue(Stats::itemBroke[id]) > 0)
|
||||
else if (Stats::itemBroke[id] != NULL && parent->stats->getTotalValue(Stats::itemBroke[id]) > 0)
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
else if (Stats::itemCrafted[id] != nullptr && parent->stats->getTotalValue(Stats::itemCrafted[id]) > 0)
|
||||
else if (Stats::itemCrafted[id] != NULL && parent->stats->getTotalValue(Stats::itemCrafted[id]) > 0)
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
@@ -556,11 +556,11 @@ StatsScreen::BlockStatisticsList::BlockStatisticsList(StatsScreen *ss) : Statist
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
else if (Stats::itemUsed[id] != nullptr && parent->stats->getTotalValue(Stats::itemUsed[id]) > 0)
|
||||
else if (Stats::itemUsed[id] != NULL && parent->stats->getTotalValue(Stats::itemUsed[id]) > 0)
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
else if (Stats::itemCrafted[id] != nullptr && parent->stats->getTotalValue(Stats::itemCrafted[id]) > 0)
|
||||
else if (Stats::itemCrafted[id] != NULL && parent->stats->getTotalValue(Stats::itemCrafted[id]) > 0)
|
||||
{
|
||||
addToList = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user