mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-23 11:06:34 +00:00
fix: unglob std::{min, max}, manual stuff
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
static std::wstring shapes[][4];
|
||||
|
||||
private:
|
||||
vector <Object *> *map;
|
||||
std::vector <Object *> *map;
|
||||
|
||||
public:
|
||||
void addRecipes(Recipes *r);
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
OreRecipies() {_init();}
|
||||
|
||||
private:
|
||||
vector <Object *> *map;
|
||||
std::vector <Object *> *map;
|
||||
|
||||
public:
|
||||
void addRecipes(Recipes *r);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
|
||||
private:
|
||||
static std::wstring shapes[][4];
|
||||
vector <Object *> *map;
|
||||
std::vector <Object *> *map;
|
||||
|
||||
public:
|
||||
void addRecipes(Recipes *r);
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
private:
|
||||
static std::wstring shapes[][4];
|
||||
vector <Object *> *map;
|
||||
std::vector <Object *> *map;
|
||||
|
||||
public:
|
||||
void addRecipes(Recipes *r);
|
||||
|
||||
Reference in New Issue
Block a user