fix: unglob std::{min, max}, manual stuff

This commit is contained in:
Tropical
2026-03-06 20:47:11 -06:00
parent 967ffbb2a6
commit 04ff82ba70
54 changed files with 126 additions and 126 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ std::shared_ptr<ItemInstance> ArmorDyeRecipe::assembleDyedArmor(std::shared_ptr<
float green = (float) ((color >> 8) & 0xFF) / 0xFF;
float blue = (float) (color & 0xFF) / 0xFF;
intensityTotal += max(red, max(green, blue)) * 0xFF;
intensityTotal += std::max(red, std::max(green, blue)) * 0xFF;
colorTotals[0] += red * 0xFF;
colorTotals[1] += green * 0xFF;
@@ -92,7 +92,7 @@ std::shared_ptr<ItemInstance> ArmorDyeRecipe::assembleDyedArmor(std::shared_ptr<
int green = (int) (Sheep::COLOR[tileData][1] * 0xFF);
int blue = (int) (Sheep::COLOR[tileData][2] * 0xFF);
intensityTotal += max(red, max(green, blue));
intensityTotal += std::max(red, std::max(green, blue));
colorTotals[0] += red;
colorTotals[1] += green;
@@ -113,7 +113,7 @@ std::shared_ptr<ItemInstance> ArmorDyeRecipe::assembleDyedArmor(std::shared_ptr<
int blue = (colorTotals[2] / colourCounts);
float averageIntensity = (float) intensityTotal / colourCounts;
float resultIntensity = (float) max(red, max(green, blue));
float resultIntensity = (float) std::max(red, std::max(green, blue));
// System.out.println(averageIntensity + ", " + resultIntensity);
red = (int) ((float) red * averageIntensity / resultIntensity);
+1 -1
View File
@@ -26,7 +26,7 @@ private:
static std::wstring shapes[][4];
private:
vector <Object *> *map;
std::vector <Object *> *map;
public:
void addRecipes(Recipes *r);
+1 -1
View File
@@ -10,7 +10,7 @@ public:
OreRecipies() {_init();}
private:
vector <Object *> *map;
std::vector <Object *> *map;
public:
void addRecipes(Recipes *r);
+1 -1
View File
@@ -1083,7 +1083,7 @@ void Recipes::addShapelessRecipy(ItemInstance *result,... )
Item *pItem;
Recipy::_eGroupType group = Recipy::eGroupType_Decoration;
wchar_t wchFrom;
vector <ItemInstance *> *ingredients = new std::vector<ItemInstance *>();
std::vector <ItemInstance *> *ingredients = new std::vector<ItemInstance *>();
va_start(vl,result);
// 4J-PB - second argument is a list of the types
+2 -2
View File
@@ -70,7 +70,7 @@ public:
private:
static Recipes *instance;
vector <Recipy *> *recipies;
std::vector <Recipy *> *recipies;
public:
static void staticCtor();
@@ -90,7 +90,7 @@ public:
void addShapelessRecipy(ItemInstance *result,... );
std::shared_ptr<ItemInstance> getItemFor(std::shared_ptr<CraftingContainer> craftSlots, Level *level);
vector <Recipy *> *getRecipies();
std::vector <Recipy *> *getRecipies();
// 4J-PB - Added all below for new Xbox 'crafting'
std::shared_ptr<ItemInstance> getItemForRecipe(Recipy *r);
+2 -2
View File
@@ -31,7 +31,7 @@ const ItemInstance *ShapelessRecipy::getResultItem()
bool ShapelessRecipy::matches(std::shared_ptr<CraftingContainer> craftSlots, Level *level)
{
vector <ItemInstance *> tempList = *ingredients;
std::vector <ItemInstance *> tempList = *ingredients;
for (int y = 0; y < 3; y++)
{
@@ -80,7 +80,7 @@ int ShapelessRecipy::size()
// 4J-PB
bool ShapelessRecipy::requires(int iRecipe)
{
vector <ItemInstance *> *tempList = new std::vector<ItemInstance *>;
std::vector <ItemInstance *> *tempList = new std::vector<ItemInstance *>;
*tempList=*ingredients;
+1 -1
View File
@@ -17,7 +17,7 @@ public:
private:
static std::wstring shapes[][4];
vector <Object *> *map;
std::vector <Object *> *map;
public:
void addRecipes(Recipes *r);
+1 -1
View File
@@ -15,7 +15,7 @@ public:
private:
static std::wstring shapes[][4];
vector <Object *> *map;
std::vector <Object *> *map;
public:
void addRecipes(Recipes *r);