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