mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-27 11:15:43 +00:00
Some cleanup
Just a bit. i dont want to clean all the ifdef for consoles right now
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.item.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.item.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.entity.player.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.level.tile.entity.h"
|
||||
#include "../../Minecraft.World/net.minecraft.world.phys.h"
|
||||
@@ -65,12 +65,9 @@ const float CMinecraftApp::fSafeZoneY = 36.0f; // 5% of 720
|
||||
|
||||
int CMinecraftApp::s_iHTMLFontSizesA[eHTMLSize_COUNT] =
|
||||
{
|
||||
#ifdef _XBOX
|
||||
14,12,14,24
|
||||
#else
|
||||
//20,15,20,24
|
||||
//20,15,20,24 OLD?
|
||||
//14,12,14,24 XBOX
|
||||
20,13,20,26
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -193,11 +190,6 @@ CMinecraftApp::CMinecraftApp()
|
||||
|
||||
m_bResetNether=false;
|
||||
|
||||
#ifdef _XBOX
|
||||
// m_bTransferSavesToXboxOne=false;
|
||||
// m_uiTransferSlotC=5;
|
||||
#endif
|
||||
|
||||
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
|
||||
m_bUseDPadForDebug = false;
|
||||
#else
|
||||
@@ -217,10 +209,6 @@ CMinecraftApp::CMinecraftApp()
|
||||
}
|
||||
|
||||
LocaleAndLanguageInit();
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
m_hasReachedMainMenu = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +359,6 @@ void CMinecraftApp::HandleButtonPresses()
|
||||
|
||||
void CMinecraftApp::HandleButtonPresses(int iPad)
|
||||
{
|
||||
|
||||
// // test an update of the profile data
|
||||
// void *pData=ProfileManager.GetGameDefinedProfileData(iPad);
|
||||
//
|
||||
@@ -3120,21 +3107,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3145,21 +3120,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3218,21 +3181,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3243,21 +3194,9 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
|
||||
{
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3375,20 +3314,12 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(j,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(j,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
TelemetryManager->RecordLevelExit(j, eSen_LevelExitStatus_Exited);
|
||||
}
|
||||
@@ -3398,21 +3329,10 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
{
|
||||
app.SetRichPresenceContext(i,CONTEXT_GAME_STATE_BLANK);
|
||||
if(g_NetworkManager.IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
|
||||
TelemetryManager->RecordLevelExit(i, eSen_LevelExitStatus_Exited);
|
||||
}
|
||||
break;
|
||||
@@ -4924,14 +4844,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
|
||||
// Some menus require the player to be signed in to live, so if this callback happens and the primary player is
|
||||
// no longer signed in then nav back
|
||||
else if ( pApp->GetLiveLinkRequired() && !ProfileManager.IsSignedInLive( ProfileManager.GetLockedProfile() ) )
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
if(!CGameNetworkManager::usingAdhocMode()) // if we're in adhoc mode, we can ignore this
|
||||
#endif
|
||||
{
|
||||
pApp->SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
|
||||
}
|
||||
}
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
|
||||
// 4J-JEV: Need to kick of loading of profile data for sub-sign in players.
|
||||
@@ -9710,31 +9623,6 @@ wstring CMinecraftApp::getFilePath(DWORD packId, wstring filename, bool bAddData
|
||||
return getRootPath(packId, false, true, mountPoint) + filename;
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
// Texture packs that have their data in the TU data
|
||||
enum ETitleUpdateTexturePacks
|
||||
{
|
||||
eTUTP_MassEffect = 0x400,
|
||||
eTUTP_Skyrim = 0x401,
|
||||
eTUTP_Halo = 0x402,
|
||||
eTUTP_Festive = 0x405,
|
||||
|
||||
eTUTP_Plastic = 0x801,
|
||||
eTUTP_Candy = 0x802,
|
||||
eTUTP_Fantasy = 0x803,
|
||||
eTUTP_Halloween = 0x804,
|
||||
eTUTP_Natural = 0x805,
|
||||
eTUTP_City = 0x01000806, // 4J Stu - The released City pack had a sub-pack ID
|
||||
eTUTP_Cartoon = 0x807,
|
||||
eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID
|
||||
};
|
||||
|
||||
#ifdef _TU_BUILD
|
||||
wstring titleUpdateTexturePackRoot = L"UPDATE:\\res\\DLC\\";
|
||||
#else
|
||||
wstring titleUpdateTexturePackRoot = L"GAME:\\res\\TitleUpdate\\DLC\\";
|
||||
#endif
|
||||
#else
|
||||
enum ETitleUpdateTexturePacks
|
||||
{
|
||||
//eTUTP_MassEffect = 0x400,
|
||||
@@ -9752,72 +9640,12 @@ enum ETitleUpdateTexturePacks
|
||||
//eTUTP_Steampunk = 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID
|
||||
};
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
wstring titleUpdateTexturePackRoot = L"Assets/DLC/";
|
||||
#elif defined(__ORBIS__)
|
||||
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";
|
||||
#elif defined(__PSVITA__)
|
||||
wstring titleUpdateTexturePackRoot = L"PSVita/CU/DLC/";
|
||||
#elif defined(__PS3__)
|
||||
wstring titleUpdateTexturePackRoot = L"PS3/CU/DLC/";
|
||||
#else
|
||||
wstring titleUpdateTexturePackRoot = L"CU\\DLC\\";
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder, wstring mountPoint)
|
||||
{
|
||||
wstring path = mountPoint;
|
||||
#ifdef _XBOX
|
||||
if(allowOverride)
|
||||
{
|
||||
switch(packId)
|
||||
{
|
||||
case eTUTP_MassEffect:
|
||||
path = titleUpdateTexturePackRoot + L"MassEffect";
|
||||
break;
|
||||
case eTUTP_Skyrim:
|
||||
path = titleUpdateTexturePackRoot + L"Skyrim";
|
||||
break;
|
||||
case eTUTP_Halo:
|
||||
path = titleUpdateTexturePackRoot + L"Halo";
|
||||
break;
|
||||
case eTUTP_Festive:
|
||||
path = titleUpdateTexturePackRoot + L"Festive";
|
||||
break;
|
||||
case eTUTP_Plastic:
|
||||
path = titleUpdateTexturePackRoot + L"Plastic";
|
||||
break;
|
||||
case eTUTP_Candy:
|
||||
path = titleUpdateTexturePackRoot + L"Candy";
|
||||
break;
|
||||
case eTUTP_Fantasy:
|
||||
path = titleUpdateTexturePackRoot + L"Fantasy";
|
||||
break;
|
||||
case eTUTP_Halloween:
|
||||
path = titleUpdateTexturePackRoot + L"Halloween";
|
||||
break;
|
||||
case eTUTP_Natural:
|
||||
path = titleUpdateTexturePackRoot + L"Natural";
|
||||
break;
|
||||
case eTUTP_City:
|
||||
path = titleUpdateTexturePackRoot + L"City";
|
||||
break;
|
||||
case eTUTP_Cartoon:
|
||||
path = titleUpdateTexturePackRoot + L"Cartoon";
|
||||
break;
|
||||
case eTUTP_Steampunk:
|
||||
path = titleUpdateTexturePackRoot + L"Steampunk";
|
||||
break;
|
||||
};
|
||||
File folder(path);
|
||||
if(!folder.exists())
|
||||
{
|
||||
path = mountPoint;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
if(allowOverride)
|
||||
{
|
||||
switch(packId)
|
||||
@@ -9832,27 +9660,9 @@ wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDa
|
||||
path = mountPoint;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(bAddDataFolder)
|
||||
{
|
||||
return path + L"\\Data\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
return path + L"\\";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
void CMinecraftApp::SetReachedMainMenu()
|
||||
{
|
||||
m_hasReachedMainMenu = true;
|
||||
}
|
||||
|
||||
bool CMinecraftApp::HasReachedMainMenu()
|
||||
{
|
||||
return m_hasReachedMainMenu;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user