win cpp23 compat: Minecraft.World
This commit is contained in:
@@ -69,10 +69,10 @@ void XShowAchievementsUI(int i) {}
|
||||
DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; }
|
||||
|
||||
#ifndef _DURANGO
|
||||
void PIXAddNamedCounter(int a, char* b, ...) {}
|
||||
void PIXAddNamedCounter(int a, const char* b, ...) {}
|
||||
//#define PS3_USE_PIX_EVENTS
|
||||
//#define PS4_USE_PIX_EVENTS
|
||||
void PIXBeginNamedEvent(int a, char* b, ...)
|
||||
void PIXBeginNamedEvent(int a, const char* b, ...)
|
||||
{
|
||||
#ifdef PS4_USE_PIX_EVENTS
|
||||
char buf[512];
|
||||
@@ -125,7 +125,7 @@ void PIXEndNamedEvent()
|
||||
PixDepth -= 1;
|
||||
#endif
|
||||
}
|
||||
void PIXSetMarkerDeprecated(int a, char* b, ...) {}
|
||||
void PIXSetMarkerDeprecated(int a, const char* b, ...) {}
|
||||
#else
|
||||
// 4J Stu - Removed this implementation in favour of a macro that will convert our string format
|
||||
// conversion at compile time rather than at runtime
|
||||
|
||||
@@ -15,18 +15,18 @@ void Achievement::_init()
|
||||
if (y > Achievements::yMax) Achievements::yMax = y;
|
||||
}
|
||||
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, Item *icon, Achievement *requires)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon( new ItemInstance(icon) ), x(x), y(y), requires(requires)
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, Item *icon, Achievement *reqs)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon( new ItemInstance(icon) ), x(x), y(y), reqs(reqs)
|
||||
{
|
||||
}
|
||||
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, Tile *icon, Achievement *requires)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon( new ItemInstance(icon) ), x(x), y(y), requires(requires)
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, Tile *icon, Achievement *reqs)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon( new ItemInstance(icon) ), x(x), y(y), reqs(reqs)
|
||||
{
|
||||
}
|
||||
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, shared_ptr<ItemInstance> icon, Achievement *requires)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon(icon), x(x), y(y), requires(requires)
|
||||
Achievement::Achievement(int id, const wstring& name, int x, int y, shared_ptr<ItemInstance> icon, Achievement *reqs)
|
||||
: Stat( Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(wstring(L"achievement.").append(name)) ), desc( I18n::get(wstring(L"achievement.").append(name).append(L".desc"))), icon(icon), x(x), y(y), reqs(reqs)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class Achievement : public Stat
|
||||
{
|
||||
public:
|
||||
const int x, y;
|
||||
Achievement *requires;
|
||||
Achievement *reqs;
|
||||
|
||||
private:
|
||||
const wstring desc;
|
||||
@@ -23,9 +23,9 @@ private:
|
||||
void _init();
|
||||
|
||||
public:
|
||||
Achievement(int id, const wstring& name, int x, int y, Item *icon, Achievement *requires);
|
||||
Achievement(int id, const wstring& name, int x, int y, Tile *icon, Achievement *requires);
|
||||
Achievement(int id, const wstring& name, int x, int y, shared_ptr<ItemInstance> icon, Achievement *requires);
|
||||
Achievement(int id, const wstring& name, int x, int y, Item *icon, Achievement *reqs);
|
||||
Achievement(int id, const wstring& name, int x, int y, Tile *icon, Achievement *reqs);
|
||||
Achievement(int id, const wstring& name, int x, int y, shared_ptr<ItemInstance> icon, Achievement *reqs);
|
||||
|
||||
Achievement *setAwardLocallyOnly();
|
||||
Achievement *setGolden();
|
||||
|
||||
@@ -147,12 +147,12 @@ const int ArmorDyeRecipe::getGroup()
|
||||
}
|
||||
|
||||
// 4J-PB
|
||||
bool ArmorDyeRecipe::requires(int iRecipe)
|
||||
bool ArmorDyeRecipe::reqs(int iRecipe)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void ArmorDyeRecipe::requires(INGREDIENTS_REQUIRED *pIngReq)
|
||||
void ArmorDyeRecipe::reqs(INGREDIENTS_REQUIRED *pIngReq)
|
||||
{
|
||||
//int iCount=0;
|
||||
//bool bFound;
|
||||
|
||||
@@ -18,6 +18,6 @@ public:
|
||||
virtual const int getGroup();
|
||||
|
||||
// 4J-PB
|
||||
virtual bool requires(int iRecipe);
|
||||
virtual void requires(INGREDIENTS_REQUIRED *pIngReq);
|
||||
virtual bool reqs(int iRecipe);
|
||||
virtual void reqs(INGREDIENTS_REQUIRED *pIngReq);
|
||||
};
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
virtual const int getGroup() { return 0; }
|
||||
|
||||
// 4J-PB
|
||||
virtual bool requires(int iRecipe) { return false; };
|
||||
virtual void requires(INGREDIENTS_REQUIRED *pIngReq) {};
|
||||
virtual bool reqs(int iRecipe) { return false; };
|
||||
virtual void reqs(INGREDIENTS_REQUIRED *pIngReq) {};
|
||||
|
||||
// 4J Added
|
||||
static void updatePossibleRecipes(shared_ptr<CraftingContainer> craftSlots, bool *firework, bool *charge, bool *fade);
|
||||
|
||||
@@ -1312,7 +1312,7 @@ void Recipes::buildRecipeIngredientsArray(void)
|
||||
int iCount=0;
|
||||
for (auto& recipe : *recipies)
|
||||
{
|
||||
recipe->requires(&m_pRecipeIngredientsRequired[iCount++]);
|
||||
recipe->reqs(&m_pRecipeIngredientsRequired[iCount++]);
|
||||
}
|
||||
|
||||
//printf("Total recipes in buildRecipeIngredientsArray - %d",iCount);
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
virtual const int getGroup() = 0;
|
||||
|
||||
// 4J-PB
|
||||
virtual bool requires(int iRecipe) = 0;
|
||||
virtual void requires(INGREDIENTS_REQUIRED *pIngReq) = 0;
|
||||
virtual bool reqs(int iRecipe) = 0;
|
||||
virtual void reqs(INGREDIENTS_REQUIRED *pIngReq) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ int ShapedRecipy::size()
|
||||
}
|
||||
|
||||
// 4J-PB
|
||||
bool ShapedRecipy::requires(int iRecipe)
|
||||
bool ShapedRecipy::reqs(int iRecipe)
|
||||
{
|
||||
app.DebugPrintf("ShapedRecipy %d\n",iRecipe);
|
||||
int iCount=0;
|
||||
@@ -130,7 +130,7 @@ bool ShapedRecipy::requires(int iRecipe)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShapedRecipy::requires(INGREDIENTS_REQUIRED *pIngReq)
|
||||
void ShapedRecipy::reqs(INGREDIENTS_REQUIRED *pIngReq)
|
||||
{
|
||||
//printf("ShapedRecipy %d\n",iRecipe);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
ShapedRecipy *keepTag();
|
||||
|
||||
// 4J-PB - to return the items required to make a recipe
|
||||
virtual bool requires(int iRecipe);
|
||||
virtual void requires(INGREDIENTS_REQUIRED *pIngReq);
|
||||
virtual bool reqs(int iRecipe);
|
||||
virtual void reqs(INGREDIENTS_REQUIRED *pIngReq);
|
||||
};
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ int ShapelessRecipy::size()
|
||||
}
|
||||
|
||||
// 4J-PB
|
||||
bool ShapelessRecipy::requires(int iRecipe)
|
||||
bool ShapelessRecipy::reqs(int iRecipe)
|
||||
{
|
||||
vector <ItemInstance *> *tempList = new vector<ItemInstance *>;
|
||||
|
||||
@@ -97,7 +97,7 @@ bool ShapelessRecipy::requires(int iRecipe)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShapelessRecipy::requires(INGREDIENTS_REQUIRED *pIngReq)
|
||||
void ShapelessRecipy::reqs(INGREDIENTS_REQUIRED *pIngReq)
|
||||
{
|
||||
int iCount=0;
|
||||
bool bFound;
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
virtual int size();
|
||||
|
||||
// 4J-PB - to return the items required to make a recipe
|
||||
virtual bool requires(int iRecipe);
|
||||
virtual void requires(INGREDIENTS_REQUIRED *pIngReq);
|
||||
virtual bool reqs(int iRecipe);
|
||||
virtual void reqs(INGREDIENTS_REQUIRED *pIngReq);
|
||||
|
||||
};
|
||||
|
||||
@@ -153,7 +153,7 @@ Tag *Tag::newTag(byte type, const wstring &name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wchar_t *Tag::getTagName(byte type)
|
||||
const wchar_t *Tag::getTagName(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
static Tag *readNamedTag(DataInput *dis, int tagDepth);
|
||||
static void writeNamedTag(Tag *tag, DataOutput *dos);
|
||||
static Tag *newTag(byte type, const wstring &name);
|
||||
static wchar_t *getTagName(byte type);
|
||||
static const wchar_t *getTagName(byte type);
|
||||
virtual ~Tag() {}
|
||||
virtual bool equals(Tag *obj); // 4J Brought forward from 1.2
|
||||
virtual Tag *copy() = 0; // 4J Brought foward from 1.2
|
||||
|
||||
@@ -513,7 +513,7 @@ void Villager::addOffers(int addCount)
|
||||
}
|
||||
|
||||
// shuffle the list to make it more interesting
|
||||
std::random_shuffle(newOffers->begin(), newOffers->end());
|
||||
std::shuffle(newOffers->begin(), newOffers->end(), std::mt19937{std::random_device{}()});
|
||||
|
||||
if (offers == NULL)
|
||||
{
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#define _HAS_STD_BYTE 0 // solve (std::)'byte' ambiguity with windows headers
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
@@ -16,6 +15,8 @@
|
||||
#include <d3d11.h>
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef _DURANGO
|
||||
#include <xdk.h>
|
||||
#include <wrl.h>
|
||||
|
||||
@@ -332,10 +332,10 @@ public:
|
||||
#define PIXSetMarkerDeprecated(a, b, ...) PIXSetMarker(a, L ## b, __VA_ARGS__)
|
||||
#define PIXAddNamedCounter(a, b) PIXReportCounter( L ## b, a)
|
||||
#else
|
||||
void PIXAddNamedCounter(int a, char *b, ...);
|
||||
void PIXBeginNamedEvent(int a, char *b, ...);
|
||||
void PIXAddNamedCounter(int a, const char *b, ...);
|
||||
void PIXBeginNamedEvent(int a, const char *b, ...);
|
||||
void PIXEndNamedEvent();
|
||||
void PIXSetMarkerDeprecated(int a, char *b, ...);
|
||||
void PIXSetMarkerDeprecated(int a, const char *b, ...);
|
||||
#endif
|
||||
|
||||
void XSetThreadProcessor(HANDLE a, int b);
|
||||
|
||||
Reference in New Issue
Block a user