Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fae9ab3ba4 | ||
|
|
be434c42d3 | ||
|
|
415bd9a1a0 | ||
|
|
353eeea217 | ||
|
|
4099ed477d | ||
|
|
f992d40795 | ||
|
|
454fefaf20 | ||
|
|
db803a04b5 | ||
|
|
a113e32cb0 | ||
|
|
f19c1b2a30 | ||
|
|
1d9df53595 | ||
|
|
82ce6313c1 | ||
|
|
bb714b3706 | ||
|
|
80f0e4845a | ||
|
|
5c9171ca3c | ||
|
|
31214d179a | ||
|
|
9a0c759b65 | ||
|
|
8fd70b0fca | ||
|
|
0d66c59e10 | ||
|
|
3092e99d0e | ||
|
|
4c082384c4 | ||
|
|
a8069727c3 | ||
|
|
13b827d21f | ||
|
|
9f181ba8c1 | ||
|
|
6ee614dfda | ||
|
|
388626dbba | ||
|
|
0a38bb51bc | ||
|
|
9171922767 | ||
|
|
e70ef09900 | ||
|
|
1bd4a3455c |
@@ -70,6 +70,9 @@ jobs:
|
||||
needs: build
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Download all build artifacts
|
||||
uses: https://github.com/actions/download-artifact@v3
|
||||
with:
|
||||
|
||||
@@ -1,55 +1,50 @@
|
||||
/ORBIS_Debug
|
||||
/ORBIS_Release
|
||||
/PS3_Debug
|
||||
/PS3_Release
|
||||
/PSVita_Debug
|
||||
/PSVita_Release
|
||||
/X360_Debug
|
||||
/X360_Release
|
||||
/Release
|
||||
/Debug
|
||||
/*Debug
|
||||
/*Release
|
||||
/*ContentPackage
|
||||
/*ContentPackage_NO_TU
|
||||
/*ContentPackage_SYMBOLS
|
||||
/*ReleaseForArt
|
||||
/x64
|
||||
/ipch
|
||||
.vs/
|
||||
|
||||
/Minecraft.Client/ORBIS_Debug
|
||||
/Minecraft.Client/ORBIS_Release
|
||||
/Minecraft.Client/PS3_Debug
|
||||
/Minecraft.Client/PS3_Release
|
||||
/Minecraft.Client/PSVita_Debug
|
||||
/Minecraft.Client/PSVita_Release
|
||||
/Minecraft.Client/X360_Debug
|
||||
/Minecraft.Client/X360_Release
|
||||
/Minecraft.Client/Debug
|
||||
/Minecraft.Client/Release
|
||||
/Minecraft.Client/x64
|
||||
# Minecraft.Client
|
||||
/Minecraft.Client/x64/
|
||||
/Minecraft.Client/x64_*
|
||||
/Minecraft.Client/*Debug
|
||||
/Minecraft.Client/*Release
|
||||
/Minecraft.Client/*ContentPackage
|
||||
/Minecraft.Client/*ContentPackage_NO_TU
|
||||
/Minecraft.Client/*ContentPackage_SYMBOLS
|
||||
/Minecraft.Client/*ReleaseForArt
|
||||
/Minecraft.Client/Windows64/GameHDD
|
||||
|
||||
/Minecraft.World/ORBIS_Debug
|
||||
/Minecraft.World/ORBIS_Release
|
||||
/Minecraft.World/PS3_Debug
|
||||
/Minecraft.World/PS3_Release
|
||||
/Minecraft.World/PSVita_Debug
|
||||
/Minecraft.World/PSVita_Release
|
||||
/Minecraft.World/X360_Debug
|
||||
/Minecraft.World/X360_Release
|
||||
/Minecraft.World/Debug
|
||||
/Minecraft.World/Release
|
||||
/Minecraft.World/x64_Debug
|
||||
/Minecraft.World/x64_Release
|
||||
MinecraftConsoles.opensdf
|
||||
MinecraftConsoles.v11.suo
|
||||
MinecraftConsoles.sdf
|
||||
# Minecraft.world
|
||||
/Minecraft.World/x64/
|
||||
/Minecraft.World/x64_*
|
||||
/Minecraft.World/*Debug
|
||||
/Minecraft.World/*Release
|
||||
/Minecraft.World/*ContentPackage
|
||||
/Minecraft.World/*ContentPackage_NO_TU
|
||||
/Minecraft.World/*ContentPackage_SYMBOLS
|
||||
/Minecraft.World/*ReleaseForArt
|
||||
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Release
|
||||
# PS3 SPU
|
||||
/Minecraft.Client/PS3/SPU_Tasks/objFiles/
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3*
|
||||
|
||||
# Misc
|
||||
*.pkg
|
||||
*.bat
|
||||
/*.gp4p
|
||||
/*.vpk
|
||||
/*.gp4
|
||||
*-app
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.v11.suo
|
||||
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: Paths
|
||||
:: -------------------------------------------------------
|
||||
set TOOLS=C:\Program Files (x86)\SCE\ORBIS\Tools\Publishing Tools\bin
|
||||
set SRC_GAME=Minecraft.Client\PS4_GAME
|
||||
set SRC_ELF=ORBIS_Release\Minecraft.Client.elf
|
||||
set STAGING=CUSA00283-app
|
||||
set OUT_PKG=CUSA00283-app.pkg
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 1. Clean and create staging folder
|
||||
:: -------------------------------------------------------
|
||||
echo [1/5] Staging files...
|
||||
if exist "%STAGING%" rmdir /S /Q "%STAGING%"
|
||||
xcopy /E /I /Y "%SRC_GAME%" "%STAGING%"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 2. Replace eboot.bin with freshly compiled ELF
|
||||
:: -------------------------------------------------------
|
||||
echo [2/5] Injecting eboot.bin...
|
||||
copy /Y "%SRC_ELF%" "%STAGING%\eboot.bin"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 3. Create placeholder keystone (256 zero bytes)
|
||||
:: Required by gengp4_app before it will generate the GP4
|
||||
:: -------------------------------------------------------
|
||||
echo [3/5] Creating keystone...
|
||||
powershell -NoProfile -Command ^
|
||||
copy /Y "keystone" "%STAGING%\sce_sys\keystone'
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 4. Generate GP4 project file
|
||||
:: Backup param.sfo first as gengp4 may modify it
|
||||
:: -------------------------------------------------------
|
||||
echo [4/5] Generating GP4...
|
||||
copy /Y "%STAGING%\sce_sys\param.sfo" "%STAGING%\sce_sys\param.sfo.bak"
|
||||
"%TOOLS%\gengp4_app.exe" "%STAGING%"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 4b. Fix gengp4 bug: default_id is 1-indexed but scenario id is 0-indexed
|
||||
:: -------------------------------------------------------
|
||||
echo [4b/5] Patching GP4 default_id...
|
||||
powershell -NoProfile -Command ^
|
||||
"(Get-Content '%STAGING%.gp4') -replace 'default_id=""1""', 'default_id=""0""' | Set-Content '%STAGING%.gp4'"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 5. Build PKG
|
||||
:: -------------------------------------------------------
|
||||
echo [5/5] Building PKG...
|
||||
if exist "%OUT_PKG%" del /Q "%OUT_PKG%"
|
||||
"%TOOLS%\orbis-pub-cmd.exe" img_create "%STAGING%.gp4" "%OUT_PKG%"
|
||||
|
||||
echo.
|
||||
echo Done! Output: %OUT_PKG%
|
||||
pause
|
||||
@@ -1941,7 +1941,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
isAtLeastOneFriend = TRUE;
|
||||
cantPlayContentRestricted= FALSE;
|
||||
|
||||
#if !defined DISABLE_PSN && ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
|
||||
|
||||
if(!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends))
|
||||
{
|
||||
@@ -1964,6 +1964,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
#elif defined __PSVITA__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
int ret = -1;
|
||||
/*
|
||||
if(!CGameNetworkManager::usingAdhocMode()) // we don't need to be friends in PSN for adhoc mode
|
||||
{
|
||||
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, false);
|
||||
@@ -1974,10 +1975,11 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
friendCount = friendList.get()->size();
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#else // __ORBIS__
|
||||
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
/*
|
||||
//sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
std::vector<sce::Toolkit::NP::FriendsList> friendList;
|
||||
|
||||
sce::Toolkit::NP::FriendInfoRequest requestParam;
|
||||
memset(&requestParam,0,sizeof(requestParam));
|
||||
@@ -1986,14 +1988,16 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
requestParam.offset = 0;
|
||||
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
|
||||
|
||||
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
|
||||
//int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
|
||||
int ret = 42069;
|
||||
if( ret == 0 )
|
||||
{
|
||||
if( friendList.hasResult() )
|
||||
if( friendList.hasResult())
|
||||
{
|
||||
friendCount = friendList.get()->size();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
int ret = 42069;
|
||||
#endif
|
||||
if( ret == 0 )
|
||||
{
|
||||
@@ -2003,12 +2007,18 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
ret = sceNpBasicGetFriendListEntry( i, &npid );
|
||||
#elif defined __ORBIS__
|
||||
//dont touch npid
|
||||
#else
|
||||
npid = friendList.get()->at(i).npid;
|
||||
#endif
|
||||
if( ret == 0 )
|
||||
{
|
||||
#ifndef __ORBIS__
|
||||
if(strcmp(npid.handle.data, packet->m_playerXuids[packet->m_hostIndex].getOnlineID()) == 0)
|
||||
#else
|
||||
if(1==2)
|
||||
#endif
|
||||
{
|
||||
isFriend = true;
|
||||
break;
|
||||
|
||||
@@ -162,7 +162,7 @@ MOJANG_DATA;
|
||||
typedef struct
|
||||
{
|
||||
eDLCContentType eDLCType;
|
||||
#if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#if defined( __PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
char chImageURL[256];//SCE_NP_COMMERCE2_URL_LEN
|
||||
#else
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ char SoundEngine::m_szSoundPath[]={"Sound\\"};
|
||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||
char SoundEngine::m_szRedistName[]={"redist64"};
|
||||
#elif defined __ORBIS__
|
||||
char SoundEngine::m_szSoundPath[]={"PS4/Sound/"};
|
||||
char SoundEngine::m_szSoundPath[]={"Orbis/Sound/"};
|
||||
char SoundEngine::m_szMusicPath[]={"music/"};
|
||||
char SoundEngine::m_szRedistName[]={"redist64"};
|
||||
#elif defined __PSVITA__
|
||||
@@ -77,20 +77,21 @@ char SoundEngine::m_szRedistName[]={"redist"};
|
||||
char SoundEngine::m_szSoundPath[]={"PS3/Sound/"};
|
||||
char SoundEngine::m_szMusicPath[]={"music/"};
|
||||
char SoundEngine::m_szRedistName[]={"redist"};
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
#endif
|
||||
|
||||
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
|
||||
char SoundEngine::m_szSoundPath[]={"Sound/"};
|
||||
#elif defined _ART_BUILD
|
||||
char SoundEngine::m_szSoundPath[]={"Sound/"};
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
#ifdef __PS3__
|
||||
#define USE_SPURS
|
||||
|
||||
#ifdef USE_SPURS
|
||||
#include <cell/spurs.h>
|
||||
#else
|
||||
#include <sys/spu_image.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
|
||||
|
||||
@@ -127,7 +127,7 @@ CMinecraftApp::CMinecraftApp()
|
||||
m_bChangingSessionType = false;
|
||||
m_bReallyChangingSessionType = false;
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
m_bDebugOptions=false; // make them off by default in a content package build
|
||||
@@ -2386,7 +2386,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad)
|
||||
// Remove the debug settings in the content package build
|
||||
//
|
||||
////////////////////////////
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
|
||||
{
|
||||
return 0;
|
||||
@@ -5094,9 +5094,6 @@ void CMinecraftApp::NotificationsCallback(LPVOID pParam,DWORD dwNotification, un
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
@@ -5109,15 +5106,11 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
@@ -5133,7 +5126,6 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,i
|
||||
app.SetAction(iPad,eAppAction_ExitWorldTrial);
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6769,7 +6761,7 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
unordered_map<PlayerUID, MOJANG_DATA *, PlayerUID::Hash> CMinecraftApp::MojangData;
|
||||
unordered_map<int, char * > CMinecraftApp::DLCTextures_PackID;
|
||||
unordered_map<string, DLC_INFO * > CMinecraftApp::DLCInfo;
|
||||
@@ -6780,12 +6772,6 @@ unordered_map<int, wstring > CMinecraftApp::DLCTextures_PackID; // for mash-up
|
||||
//unordered_map<ULONGLONG,DLC_INFO * > CMinecraftApp::DLCInfo_Trial; // full offerid, dlc_info
|
||||
unordered_map<wstring,DLC_INFO * > CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info
|
||||
unordered_map<wstring, wstring > CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id
|
||||
#elif defined(DISABLE_PSN) && defined(__PS3__)
|
||||
unordered_map<PlayerUID, MOJANG_DATA *, PlayerUID::Hash> CMinecraftApp::MojangData;
|
||||
unordered_map<int, ULONGLONG > CMinecraftApp::DLCTextures_PackID;
|
||||
unordered_map<ULONGLONG, DLC_INFO * > CMinecraftApp::DLCInfo_Trial;
|
||||
unordered_map<ULONGLONG, DLC_INFO * > CMinecraftApp::DLCInfo_Full;
|
||||
unordered_map<wstring, ULONGLONG > CMinecraftApp::DLCInfo_SkinName;
|
||||
#else
|
||||
unordered_map<PlayerUID, MOJANG_DATA *> CMinecraftApp::MojangData;
|
||||
unordered_map<int, ULONGLONG > CMinecraftApp::DLCTextures_PackID;
|
||||
@@ -6868,7 +6854,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
|
||||
return hr;
|
||||
}
|
||||
|
||||
#if (defined _XBOX || defined _WINDOWS64 || defined DISABLE_PSN)
|
||||
#if (defined _XBOX || defined _WINDOWS64)
|
||||
HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
|
||||
{
|
||||
HRESULT hr=S_OK;
|
||||
@@ -7060,7 +7046,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
|
||||
|
||||
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal)
|
||||
{
|
||||
AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin));
|
||||
@@ -7328,7 +7314,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForProductName(WCHAR *pwchProductName)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#elif !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#else
|
||||
|
||||
DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full)
|
||||
@@ -9439,7 +9425,7 @@ byteArray CMinecraftApp::getArchiveFile(const wstring &filename)
|
||||
|
||||
// DLC
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
int CMinecraftApp::GetDLCInfoCount()
|
||||
{
|
||||
return (int)DLCInfo.size();
|
||||
|
||||
@@ -594,7 +594,7 @@ public:
|
||||
MOJANG_DATA *GetMojangDataForXuid(PlayerUID xuid);
|
||||
static HRESULT RegisterConfigValues(WCHAR *pType, int iValue);
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
HRESULT RegisterDLCData(char *pchDLCName, unsigned int uiSortIndex, char *pchImageURL);
|
||||
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
|
||||
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
||||
@@ -631,7 +631,7 @@ private:
|
||||
|
||||
std::vector <SCreditTextItemDef *> vDLCCredits;
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
|
||||
static unordered_map<int, char * > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
static unordered_map<string,DLC_INFO * > DLCInfo;
|
||||
@@ -642,12 +642,6 @@ private:
|
||||
//static unordered_map<wstring,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
|
||||
static unordered_map<wstring,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
|
||||
static unordered_map<wstring, wstring > DLCInfo_SkinName; // skin name, full offer id
|
||||
#elif defined(DISABLE_PSN) && defined(__PS3__)
|
||||
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
|
||||
static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
|
||||
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
|
||||
static unordered_map<wstring, ULONGLONG > DLCInfo_SkinName; // skin name, full offer id
|
||||
#else
|
||||
static unordered_map<PlayerUID,MOJANG_DATA * > MojangData;
|
||||
static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
@@ -778,7 +772,7 @@ public:
|
||||
void ClearTMSPPFilesRetrieved();
|
||||
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote=false);
|
||||
int GetDLCInfoTexturesOffersCount();
|
||||
#if !defined(DISABLE_PSN) && defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
DLC_INFO *GetDLCInfo(int iIndex);
|
||||
DLC_INFO *GetDLCInfo(char *);
|
||||
DLC_INFO *GetDLCInfoFromTPackID(int iTPID);
|
||||
|
||||
@@ -9,7 +9,7 @@ const wstring LeaderboardManager::filterNames[eNumFilterModes] =
|
||||
L"Friends", L"MyScore", L"TopRank"
|
||||
};
|
||||
|
||||
#if !defined(_DURANGO) && !defined(_WINDOWS64) && !defined(_XBOX) && !defined(__ORBIS__) // str1k3r - some platforms complain about this, also this wasnt in the leak?
|
||||
#if defined(__PSVITA__)// str1k3r - only needed for sony platforms.
|
||||
LeaderboardManager *LeaderboardManager::m_instance = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ void SonyLeaderboardManager::scoreboardThreadInternal()
|
||||
// The following NP call should be reserved for asynchronous multiplayer modes that require PS Plus to be accessed.
|
||||
//
|
||||
// Note 2:
|
||||
// The message is not displayed with a user without PlayStation®Plus subscription and they are able to access the Leaderboards.
|
||||
// The message is not displayed with a user without PlayStation�Plus subscription and they are able to access the Leaderboards.
|
||||
|
||||
// NotifyAsyncPlusFeature();
|
||||
|
||||
@@ -204,11 +204,10 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
|
||||
case eFM_Friends:
|
||||
{
|
||||
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
|
||||
#if (defined __ORBIS__) || (defined __PSVITA__)
|
||||
#if (defined __PSVITA__)
|
||||
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> s_friendList;
|
||||
ret = getFriendsList(s_friendList);
|
||||
|
||||
if(ret != SCE_TOOLKIT_NP_SUCCESS)
|
||||
{
|
||||
// Error handling
|
||||
@@ -246,7 +245,11 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
|
||||
|
||||
npIds[0] = myNpId;
|
||||
}
|
||||
|
||||
#elif (defined __ORBIS__)
|
||||
// Error handling
|
||||
if (m_eStatsState != eStatsState_Canceled) m_eStatsState = eStatsState_Failed;
|
||||
app.DebugPrintf("[SonyLeaderboardManager] 'getFriendslist' fail, 0x%x.\n", ret);
|
||||
return false;
|
||||
#elif (defined __PS3__)
|
||||
// PS3
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void CGameNetworkManager::Initialise()
|
||||
int flagIndexSize = LevelRenderer::getGlobalChunkCount() / (Level::maxBuildHeight / 16); // dividing here by number of renderer chunks in one column
|
||||
#ifdef _XBOX
|
||||
s_pPlatformNetworkManager = new CPlatformNetworkManagerXbox();
|
||||
#elif !defined(DISABLE_PSN) && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
s_pPlatformNetworkManager = new CPlatformNetworkManagerSony();
|
||||
#elif defined _DURANGO
|
||||
s_pPlatformNetworkManager = new CPlatformNetworkManagerDurango();
|
||||
@@ -167,11 +167,6 @@ bool CGameNetworkManager::_RunNetworkGame(LPVOID lpParameter)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Client needs QNET_STATE_GAME_PLAY so that IsInGameplay() returns true
|
||||
s_pPlatformNetworkManager->SetGamePlayState();
|
||||
}
|
||||
|
||||
if( g_NetworkManager.IsLeavingGame() ) return false;
|
||||
|
||||
@@ -341,12 +336,10 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
|
||||
// 4J Stu - Wait a while to make sure that DLC is loaded. This is the last point before the network communication starts
|
||||
// so the latest we can check this
|
||||
#ifndef DISABLE_PSN
|
||||
while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() )
|
||||
{
|
||||
Sleep( 10 );
|
||||
}
|
||||
#endif
|
||||
if( g_NetworkManager.IsLeavingGame() )
|
||||
{
|
||||
MinecraftServer::HaltServer();
|
||||
@@ -503,7 +496,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
// The connections should tick at 20 per second
|
||||
Sleep(50);
|
||||
app.DebugPrintf("<***> %d %d %d %d %d\n",IsInSession(), !connection->isStarted(),!connection->isClosed(),ProfileManager.IsSignedIn(idx),!g_NetworkManager.IsLeavingGame());
|
||||
#if defined _XBOX || defined __PS3__ && !defined DISABLE_PSN
|
||||
#if defined _XBOX || __PS3__
|
||||
} while (IsInSession() && !connection->isStarted() && !connection->isClosed() && ProfileManager.IsSignedIn(idx) && !g_NetworkManager.IsLeavingGame() );
|
||||
#else
|
||||
// TODO - This SHOULD be something just like the code above but temporarily changing here so that we don't have to depend on the profilemanager behaviour
|
||||
@@ -801,7 +794,7 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void *pParam,bool bContin
|
||||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
ProfileManager.GetChatAndContentRestrictions(iPad,false,&noUGC,NULL,NULL);
|
||||
#elif defined(__ORBIS__)
|
||||
ProfileManager.GetChatAndContentRestrictions(iPad,false,NULL,&noUGC,NULL);
|
||||
@@ -1014,9 +1007,6 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc( void* lpParam )
|
||||
// The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle this
|
||||
int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
@@ -1035,14 +1025,10 @@ int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int iPad)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
JoinFromInviteData *inviteData = (JoinFromInviteData *)pParam;
|
||||
|
||||
// If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got
|
||||
@@ -1075,16 +1061,12 @@ int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int i
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// This case happens when we were in the main menus when we got an invite, and weren't signed in... now can proceed with the normal flow of code for this situation
|
||||
// The pair of methods MustSignInReturned_1 & PSNSignInReturned_1 handle this
|
||||
int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
@@ -1096,14 +1078,10 @@ int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int iPad)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
INVITE_INFO *inviteInfo = (INVITE_INFO *)pParam;
|
||||
|
||||
// If the invite data isn't set up yet (indicated by it being all zeroes, easiest detected via the net version), then try and get it again... this can happen if we got
|
||||
@@ -1131,7 +1109,6 @@ int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int i
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1469,7 +1446,7 @@ void CGameNetworkManager::StateChange_AnyToEnding(bool bStateWasPlaying)
|
||||
if(pNetworkPlayer != NULL && ProfileManager.IsSignedIn( i ) )
|
||||
{
|
||||
app.DebugPrintf("Stats save for an offline game for the player at index %d\n", i );
|
||||
//Minecraft::GetInstance()->forceStatsSave(pNetworkPlayer->GetUserIndex());
|
||||
Minecraft::GetInstance()->forceStatsSave(pNetworkPlayer->GetUserIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1812,7 +1789,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
|
||||
#endif
|
||||
if( !g_NetworkManager.IsInSession() )
|
||||
{
|
||||
#if !defined(DISABLE_PSN) && defined (__PS3__) || defined (__PSVITA__)
|
||||
#if defined (__PS3__) || defined (__PSVITA__)
|
||||
// PS3 is more complicated here - we need to make sure that the player is online. If they are then we can do the same as the xbox, if not we need to try and get them online and then, if they do sign in, go down the same path
|
||||
|
||||
// Determine why they're not "signed in live"
|
||||
@@ -1962,7 +1939,7 @@ void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly)
|
||||
if((g_NetworkManager.GetLockedProfile()!=-1) && iPrimaryPlayer!=-1 && g_NetworkManager.IsInSession() )
|
||||
{
|
||||
m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly;
|
||||
#if !defined(DISABLE_PSN) && defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
m_bSignedOutofPSN=bPSNSignout;
|
||||
#endif
|
||||
app.SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
|
||||
|
||||
@@ -6,7 +6,7 @@ using namespace std;
|
||||
#include "NetworkPlayerInterface.h"
|
||||
#ifdef _XBOX
|
||||
#include "..\..\Xbox\Network\PlatformNetworkManagerXbox.h"
|
||||
#elif !defined DISABLE_PSN && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
#include "..\..\Common\Network\Sony\PlatformNetworkManagerSony.h"
|
||||
#elif defined _DURANGO
|
||||
#include "..\..\Durango\Network\PlatformNetworkManagerDurango.h"
|
||||
@@ -32,7 +32,7 @@ class CGameNetworkManager
|
||||
{
|
||||
#ifdef _XBOX
|
||||
friend class CPlatformNetworkManagerXbox;
|
||||
#elif !defined DISABLE_PSN && defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
#elif defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
friend class CPlatformNetworkManagerSony;
|
||||
#elif defined _DURANGO
|
||||
friend class CPlatformNetworkManagerDurango;
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
virtual void HandleSignInChange() = 0;
|
||||
|
||||
virtual bool _RunNetworkGame() = 0;
|
||||
virtual void SetGamePlayState() {}
|
||||
|
||||
private:
|
||||
virtual bool _LeaveGame(bool bMigrateHost, bool bLeaveRoom) = 0;
|
||||
virtual void _HostGame(int usersMask, unsigned char publicSlots = MINECRAFT_NET_MAX_PLAYERS, unsigned char privateSlots = 0) = 0;
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
#include "PlatformNetworkManagerStub.h"
|
||||
#include "..\..\Xbox\Network\NetworkPlayerXbox.h" // TODO - stub version of this?
|
||||
#include "..\..\Minecraft.h"
|
||||
#include "..\..\User.h"
|
||||
#if defined _WINDOWS64 || defined __PS3__
|
||||
#include "..\..\Common\Network\WinsockNetLayer.h"
|
||||
#endif
|
||||
|
||||
CPlatformNetworkManagerStub *g_pPlatformNetworkManager;
|
||||
|
||||
@@ -119,42 +114,10 @@ void CPlatformNetworkManagerStub::NotifyPlayerJoined(IQNetPlayer *pQNetPlayer )
|
||||
}
|
||||
}
|
||||
|
||||
void CPlatformNetworkManagerStub::NotifyPlayerLeaving(IQNetPlayer *pQNetPlayer)
|
||||
{
|
||||
app.DebugPrintf("Player 0x%p \"%ls\" leaving.\n", pQNetPlayer, pQNetPlayer->GetGamertag());
|
||||
|
||||
INetworkPlayer *networkPlayer = getNetworkPlayer(pQNetPlayer);
|
||||
if (networkPlayer == NULL)
|
||||
return;
|
||||
|
||||
Socket *socket = networkPlayer->GetSocket();
|
||||
if (socket != NULL)
|
||||
{
|
||||
if (m_pIQNet->IsHost())
|
||||
g_NetworkManager.CloseConnection(networkPlayer);
|
||||
}
|
||||
|
||||
if (m_pIQNet->IsHost())
|
||||
{
|
||||
SystemFlagRemovePlayer(networkPlayer);
|
||||
}
|
||||
|
||||
g_NetworkManager.PlayerLeaving(networkPlayer);
|
||||
|
||||
for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if (playerChangedCallback[idx] != NULL)
|
||||
playerChangedCallback[idx](playerChangedCallbackParam[idx], networkPlayer, true);
|
||||
}
|
||||
|
||||
removeNetworkPlayer(pQNetPlayer);
|
||||
}
|
||||
|
||||
bool CPlatformNetworkManagerStub::Initialise(CGameNetworkManager *pGameNetworkManager, int flagIndexSize)
|
||||
{
|
||||
m_pGameNetworkManager = pGameNetworkManager;
|
||||
m_flagIndexSize = flagIndexSize;
|
||||
m_pIQNet = new IQNet();
|
||||
g_pPlatformNetworkManager = this;
|
||||
for( int i = 0; i < XUSER_MAX_COUNT; i++ )
|
||||
{
|
||||
@@ -211,35 +174,6 @@ bool CPlatformNetworkManagerStub::isSystemPrimaryPlayer(IQNetPlayer *pQNetPlayer
|
||||
// We call this twice a frame, either side of the render call so is a good place to "tick" things
|
||||
void CPlatformNetworkManagerStub::DoWork()
|
||||
{
|
||||
extern QNET_STATE _iQNetStubState;
|
||||
if (_iQNetStubState == QNET_STATE_SESSION_STARTING && app.GetGameStarted())
|
||||
{
|
||||
_iQNetStubState = QNET_STATE_GAME_PLAY;
|
||||
if (m_pIQNet->IsHost())
|
||||
WinsockNetLayer::UpdateAdvertiseJoinable(true);
|
||||
}
|
||||
if (_iQNetStubState == QNET_STATE_IDLE)
|
||||
TickSearch();
|
||||
if (_iQNetStubState == QNET_STATE_GAME_PLAY && m_pIQNet->IsHost())
|
||||
{
|
||||
BYTE disconnectedSmallId;
|
||||
while (WinsockNetLayer::PopDisconnectedSmallId(&disconnectedSmallId))
|
||||
{
|
||||
IQNetPlayer *qnetPlayer = m_pIQNet->GetPlayerBySmallId(disconnectedSmallId);
|
||||
if (qnetPlayer != NULL && qnetPlayer->m_smallId == disconnectedSmallId)
|
||||
{
|
||||
NotifyPlayerLeaving(qnetPlayer);
|
||||
qnetPlayer->m_smallId = 0;
|
||||
qnetPlayer->m_isRemote = false;
|
||||
qnetPlayer->m_isHostPlayer = false;
|
||||
qnetPlayer->m_gamertag[0] = 0;
|
||||
qnetPlayer->SetCustomDataValue(0);
|
||||
WinsockNetLayer::PushFreeSmallId(disconnectedSmallId);
|
||||
if (IQNet::s_playerCount > 1)
|
||||
IQNet::s_playerCount--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int CPlatformNetworkManagerStub::GetPlayerCount()
|
||||
@@ -297,7 +231,6 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
|
||||
if( m_bLeavingGame ) return true;
|
||||
|
||||
m_bLeavingGame = true;
|
||||
WinsockNetLayer::StopAdvertising();
|
||||
|
||||
// If we are the host wait for the game server to end
|
||||
if(m_pIQNet->IsHost() && g_NetworkManager.ServerStoppedValid())
|
||||
@@ -306,20 +239,6 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
|
||||
g_NetworkManager.ServerStoppedWait();
|
||||
g_NetworkManager.ServerStoppedDestroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pIQNet->EndGame();
|
||||
}
|
||||
|
||||
for (AUTO_VAR(it, currentNetworkPlayers.begin()); it != currentNetworkPlayers.end(); it++)
|
||||
delete *it;
|
||||
currentNetworkPlayers.clear();
|
||||
m_machineQNetPrimaryPlayers.clear();
|
||||
SystemFlagReset();
|
||||
|
||||
WinsockNetLayer::Shutdown();
|
||||
WinsockNetLayer::Initialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -343,20 +262,7 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame,
|
||||
|
||||
m_pIQNet->HostGame();
|
||||
|
||||
IQNet::m_player[0].m_smallId = 0;
|
||||
IQNet::m_player[0].m_isRemote = false;
|
||||
IQNet::m_player[0].m_isHostPlayer = true;
|
||||
IQNet::s_playerCount = 1;
|
||||
|
||||
_HostGame( localUsersMask, publicSlots, privateSlots );
|
||||
|
||||
int port = WIN64_NET_DEFAULT_PORT;
|
||||
if (!WinsockNetLayer::IsActive())
|
||||
WinsockNetLayer::HostGame(port);
|
||||
|
||||
const wchar_t *hostName = IQNet::m_player[0].m_gamertag;
|
||||
unsigned int settings = app.GetGameHostOption(eGameHostOption_All);
|
||||
WinsockNetLayer::StartAdvertising(port, hostName, settings, 0, 0, MINECRAFT_NET_VERSION);
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -371,47 +277,6 @@ bool CPlatformNetworkManagerStub::_StartGame()
|
||||
|
||||
int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo *searchResult, int localUsersMask, int primaryUserIndex)
|
||||
{
|
||||
if (searchResult == NULL)
|
||||
return CGameNetworkManager::JOINGAME_FAIL_GENERAL;
|
||||
|
||||
const char *hostIP = searchResult->data.hostIP;
|
||||
int hostPort = searchResult->data.hostPort;
|
||||
|
||||
if (hostPort <= 0 || hostIP[0] == 0)
|
||||
return CGameNetworkManager::JOINGAME_FAIL_GENERAL;
|
||||
|
||||
m_bLeavingGame = false;
|
||||
IQNet::s_isHosting = false;
|
||||
m_pIQNet->ClientJoinGame();
|
||||
|
||||
IQNet::m_player[0].m_smallId = 0;
|
||||
IQNet::m_player[0].m_isRemote = true;
|
||||
IQNet::m_player[0].m_isHostPlayer = true;
|
||||
wcsncpy(IQNet::m_player[0].m_gamertag, searchResult->data.hostName, 31);
|
||||
|
||||
WinsockNetLayer::StopDiscovery();
|
||||
|
||||
if (!WinsockNetLayer::JoinGame(hostIP, hostPort))
|
||||
{
|
||||
app.DebugPrintf("Win64 LAN: Failed to connect to %s:%d\n", hostIP, hostPort);
|
||||
return CGameNetworkManager::JOINGAME_FAIL_GENERAL;
|
||||
}
|
||||
|
||||
BYTE localSmallId = WinsockNetLayer::GetLocalSmallId();
|
||||
|
||||
IQNet::m_player[localSmallId].m_smallId = localSmallId;
|
||||
IQNet::m_player[localSmallId].m_isRemote = false;
|
||||
IQNet::m_player[localSmallId].m_isHostPlayer = false;
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
wcsncpy(IQNet::m_player[localSmallId].m_gamertag, pMinecraft->user->name.c_str(), 32);
|
||||
IQNet::s_playerCount = localSmallId + 1;
|
||||
|
||||
NotifyPlayerJoined(&IQNet::m_player[0]);
|
||||
NotifyPlayerJoined(&IQNet::m_player[localSmallId]);
|
||||
|
||||
m_pGameNetworkManager->StateChange_AnyToStarting();
|
||||
|
||||
return CGameNetworkManager::JOINGAME_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -450,21 +315,6 @@ void CPlatformNetworkManagerStub::HandleSignInChange()
|
||||
|
||||
bool CPlatformNetworkManagerStub::_RunNetworkGame()
|
||||
{
|
||||
extern QNET_STATE _iQNetStubState;
|
||||
_iQNetStubState = QNET_STATE_GAME_PLAY;
|
||||
|
||||
for (DWORD i = 0; i < IQNet::s_playerCount; i++)
|
||||
{
|
||||
if (IQNet::m_player[i].m_isRemote)
|
||||
{
|
||||
INetworkPlayer *pNetworkPlayer = getNetworkPlayer(&IQNet::m_player[i]);
|
||||
if (pNetworkPlayer != NULL && pNetworkPlayer->GetSocket() != NULL)
|
||||
{
|
||||
Socket::addIncomingSocket(pNetworkPlayer->GetSocket());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -653,90 +503,10 @@ wstring CPlatformNetworkManagerStub::GatherRTTStats()
|
||||
|
||||
void CPlatformNetworkManagerStub::TickSearch()
|
||||
{
|
||||
if (m_SessionsUpdatedCallback == NULL)
|
||||
return;
|
||||
|
||||
static DWORD lastSearchTime = 0;
|
||||
DWORD now = GetTickCount();
|
||||
if (now - lastSearchTime < 2000)
|
||||
return;
|
||||
lastSearchTime = now;
|
||||
|
||||
SearchForGames();
|
||||
}
|
||||
|
||||
void CPlatformNetworkManagerStub::SearchForGames()
|
||||
{
|
||||
std::vector<Win64LANSession> lanSessions = WinsockNetLayer::GetDiscoveredSessions();
|
||||
|
||||
if (g_Win64MultiplayerJoin)
|
||||
{
|
||||
bool alreadyPresent = false;
|
||||
for (size_t i = 0; i < lanSessions.size(); i++)
|
||||
{
|
||||
if (strcmp(lanSessions[i].hostIP, g_Win64MultiplayerIP) == 0 &&
|
||||
lanSessions[i].hostPort == g_Win64MultiplayerPort)
|
||||
{
|
||||
alreadyPresent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!alreadyPresent)
|
||||
{
|
||||
Win64LANSession manual;
|
||||
memset(&manual, 0, sizeof(manual));
|
||||
strncpy(manual.hostIP, g_Win64MultiplayerIP, sizeof(manual.hostIP) - 1);
|
||||
manual.hostIP[sizeof(manual.hostIP) - 1] = '\0';
|
||||
|
||||
manual.hostPort = g_Win64MultiplayerPort;
|
||||
|
||||
swprintf(manual.hostName, 32, L"%hs:%d", g_Win64MultiplayerIP, g_Win64MultiplayerPort);
|
||||
manual.hostName[31] = L'\0';
|
||||
manual.playerCount = 0;
|
||||
manual.maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
manual.isJoinable = true;
|
||||
manual.lastSeenTick = GetTickCount();
|
||||
lanSessions.push_back(manual);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < friendsSessions[0].size(); i++)
|
||||
delete friendsSessions[0][i];
|
||||
friendsSessions[0].clear();
|
||||
|
||||
for (size_t i = 0; i < lanSessions.size(); i++)
|
||||
{
|
||||
FriendSessionInfo *info = new FriendSessionInfo();
|
||||
size_t nameLen = wcslen(lanSessions[i].hostName);
|
||||
info->displayLabel = new wchar_t[nameLen + 1];
|
||||
wcsncpy(info->displayLabel, lanSessions[i].hostName, nameLen);
|
||||
info->displayLabel[nameLen] = L'\0';
|
||||
info->displayLabelLength = (unsigned char)nameLen;
|
||||
info->displayLabelViewableStartIndex = 0;
|
||||
|
||||
info->data.netVersion = lanSessions[i].netVersion;
|
||||
info->data.m_uiGameHostSettings = lanSessions[i].gameHostSettings;
|
||||
info->data.texturePackParentId = lanSessions[i].texturePackParentId;
|
||||
info->data.subTexturePackId = lanSessions[i].subTexturePackId;
|
||||
info->data.isReadyToJoin = lanSessions[i].isJoinable;
|
||||
info->data.isJoinable = lanSessions[i].isJoinable;
|
||||
strncpy(info->data.hostIP, lanSessions[i].hostIP, sizeof(info->data.hostIP) - 1);
|
||||
info->data.hostIP[sizeof(info->data.hostIP) - 1] = '\0';
|
||||
info->data.hostPort = lanSessions[i].hostPort;
|
||||
wcsncpy(info->data.hostName, lanSessions[i].hostName, XUSER_NAME_SIZE - 1);
|
||||
info->data.hostName[XUSER_NAME_SIZE - 1] = L'\0';
|
||||
info->data.playerCount = lanSessions[i].playerCount;
|
||||
info->data.maxPlayers = lanSessions[i].maxPlayers;
|
||||
|
||||
info->sessionId = (ULONGLONG)((unsigned __int64)inet_addr(lanSessions[i].hostIP) | ((unsigned __int64)lanSessions[i].hostPort << 32));
|
||||
|
||||
friendsSessions[0].push_back(info);
|
||||
}
|
||||
|
||||
m_searchResultsCount[0] = (int)friendsSessions[0].size();
|
||||
|
||||
if (m_SessionsUpdatedCallback != NULL)
|
||||
m_SessionsUpdatedCallback(m_pSearchParam);
|
||||
}
|
||||
|
||||
int CPlatformNetworkManagerStub::SearchForGamesThreadProc( void* lpParameter )
|
||||
@@ -752,9 +522,7 @@ void CPlatformNetworkManagerStub::SetSearchResultsReady(int resultCount)
|
||||
|
||||
vector<FriendSessionInfo *> *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly)
|
||||
{
|
||||
vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>();
|
||||
for (size_t i = 0; i < friendsSessions[0].size(); i++)
|
||||
filteredList->push_back(friendsSessions[0][i]);
|
||||
vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>();;
|
||||
return filteredList;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@ public:
|
||||
virtual bool RemoveLocalPlayerByUserIndex( int userIndex );
|
||||
virtual INetworkPlayer *GetLocalPlayerByUserIndex( int userIndex );
|
||||
virtual INetworkPlayer *GetPlayerByIndex(int playerIndex);
|
||||
#ifdef __PS3
|
||||
virtual INetworkPlayer * GetPlayerByXuid(PlayerUID* xuid)
|
||||
#else
|
||||
virtual INetworkPlayer * GetPlayerByXuid(PlayerUID xuid);
|
||||
#endif
|
||||
virtual INetworkPlayer * GetPlayerBySmallId(unsigned char smallId);
|
||||
virtual bool ShouldMessageForFullSession();
|
||||
|
||||
@@ -165,9 +161,8 @@ public:
|
||||
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
|
||||
virtual void ForceFriendsSessionRefresh();
|
||||
|
||||
public:
|
||||
private:
|
||||
void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer );
|
||||
void NotifyPlayerLeaving( IQNetPlayer *pQNetPlayer );
|
||||
|
||||
#ifndef _XBOX
|
||||
void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); }
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct _GameSessionData
|
||||
subTexturePackId = 0;
|
||||
}
|
||||
} GameSessionData;
|
||||
#elif (defined __PS3__ && !defined DISABLE_PSN) || defined __ORBIS__ || defined(__PSVITA__)
|
||||
#elif defined __PS3__ || defined __ORBIS__ || defined(__PSVITA__)
|
||||
typedef struct _GameSessionData
|
||||
{
|
||||
unsigned short netVersion; // 2 bytes
|
||||
@@ -47,11 +47,6 @@ typedef struct _GameSessionData
|
||||
unsigned char playerCount; // 1 byte
|
||||
bool isReadyToJoin; // 1 byte
|
||||
|
||||
char hostIP[64]; // 64 bytes
|
||||
int hostPort; // 4 bytes
|
||||
wchar_t hostName[XUSER_NAME_SIZE]; // 64 bytes ( 32*2 )
|
||||
unsigned char maxPlayers; // 1 byte
|
||||
|
||||
_GameSessionData()
|
||||
{
|
||||
netVersion = 0;
|
||||
@@ -62,11 +57,7 @@ typedef struct _GameSessionData
|
||||
subTexturePackId = 0;
|
||||
playerCount = 0;
|
||||
isReadyToJoin = false;
|
||||
memset(hostIP, 0, sizeof(hostIP));
|
||||
hostPort = 0;
|
||||
memset(hostName, 0, sizeof(hostName));
|
||||
playerCount = 0;
|
||||
maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
|
||||
}
|
||||
} GameSessionData;
|
||||
#else
|
||||
@@ -78,13 +69,6 @@ typedef struct _GameSessionData
|
||||
unsigned char subTexturePackId; // 1 byte
|
||||
|
||||
bool isReadyToJoin; // 1 byte
|
||||
bool isJoinable; // 1 byte
|
||||
|
||||
char hostIP[64]; // 64 bytes
|
||||
int hostPort; // 4 bytes
|
||||
wchar_t hostName[XUSER_NAME_SIZE]; // 64 bytes ( 32*2 )
|
||||
unsigned char playerCount; // 1 byte
|
||||
unsigned char maxPlayers; // 1 byte
|
||||
|
||||
_GameSessionData()
|
||||
{
|
||||
@@ -92,13 +76,6 @@ typedef struct _GameSessionData
|
||||
m_uiGameHostSettings = 0;
|
||||
texturePackParentId = 0;
|
||||
subTexturePackId = 0;
|
||||
isReadyToJoin = false;
|
||||
isJoinable = true;
|
||||
memset(hostIP, 0, sizeof(hostIP));
|
||||
hostPort = 0;
|
||||
memset(hostName, 0, sizeof(hostName));
|
||||
playerCount = 0;
|
||||
maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
}
|
||||
} GameSessionData;
|
||||
#endif
|
||||
@@ -109,7 +86,7 @@ public:
|
||||
SessionID sessionId;
|
||||
#ifdef _XBOX
|
||||
XSESSION_SEARCHRESULT searchResult;
|
||||
#elif (defined __PS3__ && !defined DISABLE_PSN) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
SQRNetworkManager::SessionSearchResult searchResult;
|
||||
#elif defined(_DURANGO)
|
||||
DQRNetworkManager::SessionSearchResult searchResult;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "NetworkPlayerSony.h"
|
||||
#ifndef DISABLE_PSN
|
||||
|
||||
NetworkPlayerSony::NetworkPlayerSony(SQRNetworkPlayer *qnetPlayer)
|
||||
{
|
||||
@@ -136,4 +135,3 @@ int NetworkPlayerSony::GetTimeSinceLastChunkPacket_ms()
|
||||
__int64 currentTime = System::currentTimeMillis();
|
||||
return (int)( currentTime - m_lastChunkPacketTime );
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef _DISABLE_PSN
|
||||
|
||||
#include "..\..\Common\Network\NetworkPlayerInterface.h"
|
||||
#include "SQRNetworkPlayer.h"
|
||||
|
||||
@@ -41,4 +41,3 @@ private:
|
||||
Socket *m_pSocket;
|
||||
__int64 m_lastChunkPacketTime;
|
||||
};
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#ifndef DISABLE_PSN
|
||||
|
||||
#include "SQRNetworkManager.h"
|
||||
|
||||
bool SQRNetworkManager::s_safeToRespondToGameBootInvite = false;
|
||||
@@ -80,5 +80,4 @@ void SQRNetworkManager::TickWriteAcks()
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&m_csAckQueue);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#ifndef DISABLE_PSN
|
||||
#include "SQRNetworkPlayer.h"
|
||||
|
||||
#ifdef __PS3__
|
||||
@@ -610,4 +609,3 @@ bool SQRNetworkPlayer::IsMutedByLocalUser(int userIndex)
|
||||
return SonyVoiceChat::isMutedPlayer(pMan->m_roomSyncData.players[userIndex].m_roomMemberId);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -1,162 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if defined _WINDOWS64
|
||||
#include <WinSock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#elif defined __PS3__
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netex/net.h>
|
||||
#include <netex/errno.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include "..\..\Common\Network\NetworkPlayerInterface.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#pragma comment(lib, "Ws2_32.lib")
|
||||
#endif
|
||||
|
||||
#define WIN64_NET_DEFAULT_PORT 25565
|
||||
#define WIN64_NET_MAX_CLIENTS 7
|
||||
#define WIN64_NET_RECV_BUFFER_SIZE 65536
|
||||
#define WIN64_LAN_DISCOVERY_PORT 25566
|
||||
#define WIN64_LAN_BROADCAST_MAGIC 0x4D434C4E
|
||||
|
||||
#ifdef __PS3__
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET -1
|
||||
#endif
|
||||
|
||||
class Socket;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct Win64LANBroadcast
|
||||
{
|
||||
DWORD magic;
|
||||
WORD netVersion;
|
||||
WORD gamePort;
|
||||
char hostName[32];
|
||||
BYTE playerCount;
|
||||
BYTE maxPlayers;
|
||||
DWORD gameHostSettings;
|
||||
DWORD texturePackParentId;
|
||||
BYTE subTexturePackId;
|
||||
BYTE isJoinable;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct Win64LANSession
|
||||
{
|
||||
char hostIP[64];
|
||||
int hostPort;
|
||||
wchar_t hostName[32];
|
||||
unsigned short netVersion;
|
||||
unsigned char playerCount;
|
||||
unsigned char maxPlayers;
|
||||
unsigned int gameHostSettings;
|
||||
unsigned int texturePackParentId;
|
||||
unsigned char subTexturePackId;
|
||||
bool isJoinable;
|
||||
DWORD lastSeenTick;
|
||||
};
|
||||
|
||||
struct Win64RemoteConnection
|
||||
{
|
||||
SOCKET tcpSocket;
|
||||
BYTE smallId;
|
||||
C4JThread* recvThread;
|
||||
volatile bool active;
|
||||
};
|
||||
|
||||
class WinsockNetLayer
|
||||
{
|
||||
public:
|
||||
static bool Initialize();
|
||||
static void Shutdown();
|
||||
|
||||
static bool HostGame(int port);
|
||||
static bool JoinGame(const char *ip, int port);
|
||||
|
||||
static bool SendToSmallId(BYTE targetSmallId, const void *data, int dataSize);
|
||||
static bool SendOnSocket(SOCKET sock, const void *data, int dataSize);
|
||||
|
||||
static bool IsHosting() { return s_isHost; }
|
||||
static bool IsConnected() { return s_connected; }
|
||||
static bool IsActive() { return s_active; }
|
||||
|
||||
static BYTE GetLocalSmallId() { return s_localSmallId; }
|
||||
static BYTE GetHostSmallId() { return s_hostSmallId; }
|
||||
|
||||
static SOCKET GetSocketForSmallId(BYTE smallId);
|
||||
|
||||
static void HandleDataReceived(BYTE fromSmallId, BYTE toSmallId, unsigned char *data, unsigned int dataSize);
|
||||
|
||||
static bool PopDisconnectedSmallId(BYTE *outSmallId);
|
||||
static void PushFreeSmallId(BYTE smallId);
|
||||
|
||||
static bool StartAdvertising(int gamePort, const wchar_t *hostName, unsigned int gameSettings, unsigned int texPackId, unsigned char subTexId, unsigned short netVer);
|
||||
static void StopAdvertising();
|
||||
static void UpdateAdvertisePlayerCount(BYTE count);
|
||||
static void UpdateAdvertiseJoinable(bool joinable);
|
||||
|
||||
static bool StartDiscovery();
|
||||
static void StopDiscovery();
|
||||
static vector<Win64LANSession> GetDiscoveredSessions();
|
||||
|
||||
static int GetHostPort() { return s_hostGamePort; }
|
||||
|
||||
private:
|
||||
static int AcceptThreadProc(void* param);
|
||||
static int RecvThreadProc(void* param);
|
||||
static int ClientRecvThreadProc(void* param);
|
||||
static int AdvertiseThreadProc(void* param);
|
||||
static int DiscoveryThreadProc(void* param);
|
||||
|
||||
static SOCKET s_listenSocket;
|
||||
static SOCKET s_hostConnectionSocket;
|
||||
static C4JThread* s_acceptThread;
|
||||
static C4JThread* s_clientRecvThread;
|
||||
|
||||
static bool s_isHost;
|
||||
static bool s_connected;
|
||||
static bool s_active;
|
||||
static bool s_initialized;
|
||||
|
||||
static BYTE s_localSmallId;
|
||||
static BYTE s_hostSmallId;
|
||||
static BYTE s_nextSmallId;
|
||||
|
||||
static CRITICAL_SECTION s_sendLock;
|
||||
static CRITICAL_SECTION s_connectionsLock;
|
||||
|
||||
static std::vector<Win64RemoteConnection> s_connections;
|
||||
|
||||
static SOCKET s_advertiseSock;
|
||||
static C4JThread* s_advertiseThread;
|
||||
static volatile bool s_advertising;
|
||||
static Win64LANBroadcast s_advertiseData;
|
||||
static CRITICAL_SECTION s_advertiseLock;
|
||||
static int s_hostGamePort;
|
||||
|
||||
static SOCKET s_discoverySock;
|
||||
static C4JThread* s_discoveryThread;
|
||||
static volatile bool s_discovering;
|
||||
static CRITICAL_SECTION s_discoveryLock;
|
||||
static std::vector<Win64LANSession> s_discoveredSessions;
|
||||
|
||||
static CRITICAL_SECTION s_disconnectLock;
|
||||
static std::vector<BYTE> s_disconnectedSmallIds;
|
||||
|
||||
static CRITICAL_SECTION s_freeSmallIdLock;
|
||||
static std::vector<BYTE> s_freeSmallIds;
|
||||
};
|
||||
|
||||
extern bool g_Win64MultiplayerHost;
|
||||
extern bool g_Win64MultiplayerJoin;
|
||||
extern int g_Win64MultiplayerPort;
|
||||
extern char g_Win64MultiplayerIP[256];
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 189 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 80 KiB |
@@ -2,14 +2,28 @@
|
||||
<gamePackage>
|
||||
<language id="00" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>シンプル シューティング ゲーム</text>
|
||||
<pronunciation>sh i N p u r u ___ sh uL t i N g u ___ g eL m u</pronunciation>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m a j n k r a f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m a j n k r e f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
<language id="01" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>simple shooting game</text>
|
||||
<pronunciation>s ih m p ax l ___ sh uw t ih n ___ g ey m</pronunciation>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ay n k r ae f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ay n k r ax f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
</gamePackage>
|
||||
<language id="18" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ih n k r aa f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
</gamePackage>
|
||||
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 45 KiB |
@@ -1 +1,93 @@
|
||||
// Currently a stub as we dont know what would go here
|
||||
param(
|
||||
[string]$OutDir,
|
||||
[string]$ProjectDir
|
||||
)
|
||||
|
||||
Write-Host "Durango Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"Durango\StoreImages",
|
||||
"Common\Media",
|
||||
"Common\res",
|
||||
"DLCImages",
|
||||
"Tutorial",
|
||||
"Durango",
|
||||
"music",
|
||||
"Sound",
|
||||
"Xbox",
|
||||
"DLC",
|
||||
"CU",
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||
@{ Source = "Durango\Sound"; Dest = "Sound" },
|
||||
@{ Source = "DurangoMedia\DLC"; Dest = "DLC" },
|
||||
@{ Source = "DurangoMedia\Tutorial"; Dest = "Tutorial" },
|
||||
@{ Source = "music"; Dest = "music" },
|
||||
@{ Source = "Durango\DLCImages"; Dest = "DLCImages" },
|
||||
@{ Source = "Durango\CU"; Dest = "CU" },
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
}
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Durango\DurangoExtras\xcompress.dll"; Dest = "xcompress.dll" },
|
||||
@{ Source = "Durango\DLCXbox1.cmp"; Dest = "DLCXbox1.cmp" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
}
|
||||
|
||||
$deleteDirs = @(
|
||||
"Common\Media\Sound",
|
||||
"Common\Media\Graphics",
|
||||
"Common\Media\de-DE",
|
||||
"Common\Media\es-ES",
|
||||
"Common\Media\fr-FR",
|
||||
"Common\Media\it-IT",
|
||||
"Common\Media\ja-JP",
|
||||
"Common\Media\ko-KR",
|
||||
"Common\Media\pt-BR",
|
||||
"Common\Media\pt-PT",
|
||||
"Common\Media\zh-CHT"
|
||||
)
|
||||
|
||||
foreach ($dir in $deleteDirs) {
|
||||
$path = Join-Path $OutDir $dir
|
||||
if (Test-Path $path) {
|
||||
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
$delDirs = @(
|
||||
"Common\Media",
|
||||
"Common\Media\font"
|
||||
)
|
||||
|
||||
foreach ($dir in $delDirs) {
|
||||
if ($delDirs -contains $dir) {
|
||||
$path = Join-Path $OutDir $dir
|
||||
if (Test-Path $path) {
|
||||
Get-ChildItem -Path $path -Recurse -Include *.swf, *.txt, *.resx, *.xml, *.loc, *.lang, *.col, *.h, *.xui, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", MediaWindows64.arc, MediaOrbis.arc, MediaPS3.arc, MediaPSVita.arc -File |
|
||||
Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ param(
|
||||
Write-Host "Orbis Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"music",
|
||||
"Orbis",
|
||||
"Common",
|
||||
"Common\Media",
|
||||
"Common\Tutorial",
|
||||
"Common\res",
|
||||
"Sound"
|
||||
"PS4_GAME\music",
|
||||
"PS4_GAME\Orbis",
|
||||
"PS4_GAME\Common",
|
||||
"PS4_GAME\Common\Media",
|
||||
"PS4_GAME\Common\Tutorial",
|
||||
"PS4_GAME\Common\res",
|
||||
"PS4_GAME\Orbis\Sound"
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
@@ -24,10 +24,10 @@ $folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "PS4_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS4_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "PS4_GAME\Common\Tutorial" },
|
||||
@{ Source = "PS3\Sound"; Dest = "PS4_GAME\Sound" },
|
||||
@{ Source = "Orbis\Sound"; Dest = "PS4_GAME\Orbis\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
@@ -41,7 +41,7 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Orbis\PS4ProductCodes.bin"; Dest = "PS4_GAME\Orbis\PS4ProductCodes.bin" },
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" },
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
|
||||
@@ -6,12 +6,12 @@ param(
|
||||
Write-Host "PSVita Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"music",
|
||||
"PSVita",
|
||||
"Common",
|
||||
"Common\Media",
|
||||
"Common\res",
|
||||
"Sound"
|
||||
"PSVITA_GAME\music",
|
||||
"PSVITA_GAME\PSVita",
|
||||
"PSVITA_GAME\Common",
|
||||
"PSVITA_GAME\Common\Media",
|
||||
"PSVITA_GAME\Common\res",
|
||||
"PSVITA_GAME\Sound"
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
@@ -22,13 +22,17 @@ $folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PSVITA_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PSVITA_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PSVITA_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
|
||||
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
|
||||
$src = $copy.Source
|
||||
} else {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
}
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
@@ -39,7 +43,7 @@ foreach ($copy in $folderCopies) {
|
||||
$fileCopies = @(
|
||||
@{ Source = "PSVita\PSVitaProductCodes.bin"; Dest = "PSVITA_GAME\PSVita\PSVitaProductCodes.bin" },
|
||||
@{ Source = "PSVita\session_image.png"; Dest = "PSVITA_GAME\PSVita\session_image.png" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
|
||||
@@ -24,7 +24,7 @@ $folderCopies = @(
|
||||
@{ Source = "DurangoMedia"; Dest = "Windows64Media" },
|
||||
@{ Source = "Windows64Media"; Dest = "Windows64Media" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" },
|
||||
@{ Source = "music"; Dest = "Windows64Media\music" },
|
||||
@{ Source = "Windows64Media\music"; Dest = "Windows64Media\music" },
|
||||
@{ Source = "Windows64Media\Sound"; Dest = "Windows64Media\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\redist64"; Dest = "redist64" }
|
||||
)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "..\..\TexturePack.h"
|
||||
#include "..\..\DLCTexturePack.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
#ifndef _XBOX
|
||||
#include "UI.h"
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
|
||||
for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i)
|
||||
{
|
||||
bTexturePackAlreadyListed=false;
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
char *pchName=app.GetDLCInfoTextures(i);
|
||||
pDLCInfo=app.GetDLCInfo(pchName);
|
||||
#elif defined _XBOX_ONE
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "UI.h"
|
||||
#include "UIComponent_PressStartToPlay.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
|
||||
@@ -23,7 +23,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
|
||||
// We don't have a reinstall content, so remove the button
|
||||
removeControl( &m_buttons[BUTTON_HAO_REINSTALL], false );
|
||||
|
||||
#ifndef _DEBUG
|
||||
#ifdef _FINAL_BUILD
|
||||
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
#else
|
||||
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
@@ -121,7 +121,7 @@ void UIScene_HelpAndOptionsMenu::updateComponents()
|
||||
|
||||
void UIScene_HelpAndOptionsMenu::handleReload()
|
||||
{
|
||||
#ifndef _DEBUG
|
||||
#ifdef _FINAL_BUILD
|
||||
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
#else
|
||||
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
|
||||
@@ -502,9 +502,6 @@ UIScene_InGameInfoMenu::PlayerInfo *UIScene_InGameInfoMenu::BuildPlayerInfo(INet
|
||||
#if defined __PS3__ || defined __PSVITA__
|
||||
int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
@@ -517,7 +514,6 @@ int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_InGameInfoMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
|
||||
@@ -61,7 +61,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void
|
||||
|
||||
if(m_editingSelf)
|
||||
{
|
||||
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
removeControl( &m_checkboxes[eControl_Op], true );
|
||||
#else
|
||||
m_checkboxes[eControl_Op].init(L"DEBUG: Creative",eControl_Op,Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode));
|
||||
@@ -254,7 +254,7 @@ void UIScene_InGamePlayerOptionsMenu::handleReload()
|
||||
|
||||
if(m_editingSelf)
|
||||
{
|
||||
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
removeControl( &m_checkboxes[eControl_Op], true );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ void UIScene_JoinMenu::tick()
|
||||
|
||||
m_buttonListPlayers.init(eControl_GamePlayers);
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
|
||||
for( int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++ )
|
||||
{
|
||||
if( m_selectedSession->data.players[i] != NULL )
|
||||
@@ -353,9 +353,6 @@ void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege,
|
||||
|
||||
void UIScene_JoinMenu::StartSharedLaunchFlow()
|
||||
{
|
||||
#if defined DISABLE_PSN && defined __PS3__
|
||||
JoinGame(this);
|
||||
#else
|
||||
if(!app.IsLocalMultiplayerAvailable())
|
||||
{
|
||||
JoinGame(this);
|
||||
@@ -369,17 +366,12 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
|
||||
info.requireOnline = true;
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
{
|
||||
UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
|
||||
#if defined DISABLE_PSN && defined __PS3__
|
||||
JoinGame(pClass);
|
||||
return 0;
|
||||
#else
|
||||
if(pClass)
|
||||
{
|
||||
if(bContinue==true)
|
||||
@@ -400,7 +392,6 @@ int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Shared function to join the game that is the same whether we used the sign-in UI or not
|
||||
@@ -440,9 +431,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
|
||||
if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
|
||||
#endif
|
||||
#ifdef __PSVITA__
|
||||
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
|
||||
isSignedInLive = true;
|
||||
@@ -481,7 +470,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__PSVITA__)
|
||||
if(isSignedInLive)
|
||||
{
|
||||
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
|
||||
|
||||
@@ -731,7 +731,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__)
|
||||
#ifdef __PS3__
|
||||
// m_name can be unicode characters somehow for Japan - should use m_onlineID
|
||||
wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID());
|
||||
swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str());
|
||||
|
||||
@@ -2385,9 +2385,6 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
|
||||
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
@@ -2406,7 +2403,6 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
|
||||
@@ -550,7 +550,6 @@ int UIScene_MainMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM
|
||||
{
|
||||
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
if(result==C4JStorage::EMessage_ResultAccept)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
@@ -630,9 +629,6 @@ int UIScene_MainMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM
|
||||
pClass->m_bIgnorePress=false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
CreateLoad_SignInReturned(pClass, true, 0);
|
||||
pClass->m_bIgnorePress=false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1029,9 +1029,6 @@ int UIScene_PauseMenu::BanGameDialogReturned(void *pParam,int iPad,C4JStorage::E
|
||||
#if defined(__PS3__) || defined (__PSVITA__) || defined(__ORBIS__)
|
||||
int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
if(result==C4JStorage::EMessage_ResultAccept && pClass)
|
||||
{
|
||||
@@ -1094,7 +1091,6 @@ int UIScene_PauseMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::E
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContinue, int iPad)
|
||||
@@ -1135,9 +1131,6 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin
|
||||
|
||||
int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
#ifdef DISABLE_PSN
|
||||
return 0;
|
||||
#else
|
||||
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
|
||||
|
||||
#ifdef __ORBIS__
|
||||
@@ -1251,7 +1244,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
|
||||
}
|
||||
}
|
||||
#endif //
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId)
|
||||
|
||||
m_bIgnoreInput=true;
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
// wait for the profile to be read - this has been kicked off earlier, so should be read by now
|
||||
addTimer(PROFILE_LOADED_TIMER_ID,PROFILE_LOADED_TIMER_TIME);
|
||||
#else
|
||||
@@ -126,7 +126,7 @@ void UIScene_SaveMessage::handleTimerComplete(int id)
|
||||
{
|
||||
case PROFILE_LOADED_TIMER_ID:
|
||||
{
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
C4JStorage::eOptionsCallback eStatus=app.GetOptionsCallbackStatus(0);
|
||||
|
||||
switch(eStatus)
|
||||
|
||||
@@ -1518,7 +1518,7 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
|
||||
void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
|
||||
{
|
||||
// need to be signed in to live. get them to sign in to online
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__)
|
||||
#if defined(__PS3__)
|
||||
SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this);
|
||||
|
||||
#elif defined(__PSVITA__)
|
||||
|
||||
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 12 KiB |
@@ -5,7 +5,6 @@
|
||||
|
||||
#ifdef __PS3__
|
||||
#include "PS3\Sentient\SentientManager.h"
|
||||
#include "Common\Network\WinsockNetLayer.h"
|
||||
#include "StatsCounter.h"
|
||||
#include "PS3\Social\SocialManager.h"
|
||||
#include <libsn.h>
|
||||
@@ -18,7 +17,6 @@
|
||||
#include "Durango\DurangoExtras\xcompress.h"
|
||||
#elif defined _WINDOWS64
|
||||
#include "Windows64\Sentient\SentientManager.h"
|
||||
#include "Common\Network\WinsockNetLayer.h"
|
||||
#include "StatsCounter.h"
|
||||
#include "Windows64\Social\SocialManager.h"
|
||||
#include "Windows64\Sentient\DynamicConfigurations.h"
|
||||
@@ -170,10 +168,8 @@ void PIXSetMarkerDeprecated(int a, char *b, ...) {}
|
||||
|
||||
bool IsEqualXUID(PlayerUID a, PlayerUID b)
|
||||
{
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO)
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO)
|
||||
return (a == b);
|
||||
#elif defined(DISABLE_PSN) && defined(__PS3__)
|
||||
return (a.XUID == b.XUID);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -189,23 +185,20 @@ D3DXVECTOR3::D3DXVECTOR3() {}
|
||||
D3DXVECTOR3::D3DXVECTOR3(float x,float y,float z) : x(x), y(y), z(z) {}
|
||||
D3DXVECTOR3& D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& add ) { x += add.x; y += add.y; z += add.z; return *this; }
|
||||
|
||||
BYTE IQNetPlayer::GetSmallId() { return m_smallId; }
|
||||
BYTE IQNetPlayer::GetSmallId() { return 0; }
|
||||
void IQNetPlayer::SendData(IQNetPlayer *player, const void *pvData, DWORD dwDataSize, DWORD dwFlags)
|
||||
{
|
||||
if (WinsockNetLayer::IsActive())
|
||||
{
|
||||
WinsockNetLayer::SendToSmallId(player->m_smallId, pvData, dwDataSize);
|
||||
}
|
||||
app.DebugPrintf("Sending from 0x%x to 0x%x %d bytes\n",this,player,dwDataSize);
|
||||
}
|
||||
bool IQNetPlayer::IsSameSystem(IQNetPlayer *player) { return (this == player) || (!m_isRemote && !player->m_isRemote); }
|
||||
bool IQNetPlayer::IsSameSystem(IQNetPlayer *player) { return true; }
|
||||
DWORD IQNetPlayer::GetSendQueueSize( IQNetPlayer *player, DWORD dwFlags ) { return 0; }
|
||||
DWORD IQNetPlayer::GetCurrentRtt() { return 0; }
|
||||
bool IQNetPlayer::IsHost() { return m_isHostPlayer; }
|
||||
bool IQNetPlayer::IsHost() { return this == &IQNet::m_player[0]; }
|
||||
bool IQNetPlayer::IsGuest() { return false; }
|
||||
bool IQNetPlayer::IsLocal() { return !m_isRemote; }
|
||||
PlayerUID IQNetPlayer::GetXuid() { return (PlayerUID)(0xe000d45248242f2e + m_smallId); }
|
||||
LPCWSTR IQNetPlayer::GetGamertag() { return m_gamertag; }
|
||||
int IQNetPlayer::GetSessionIndex() { return m_smallId; }
|
||||
bool IQNetPlayer::IsLocal() { return true; }
|
||||
PlayerUID IQNetPlayer::GetXuid() { return INVALID_XUID; }
|
||||
LPCWSTR IQNetPlayer::GetGamertag() { static const wchar_t *test = L"stub"; return test; }
|
||||
int IQNetPlayer::GetSessionIndex() { return 0; }
|
||||
bool IQNetPlayer::IsTalking() { return false; }
|
||||
bool IQNetPlayer::IsMutedByLocalUser(DWORD dwUserIndex) { return false; }
|
||||
bool IQNetPlayer::HasVoice() { return false; }
|
||||
@@ -218,104 +211,23 @@ ULONG_PTR IQNetPlayer::GetCustomDataValue() {
|
||||
return m_customData;
|
||||
}
|
||||
|
||||
IQNetPlayer IQNet::m_player[MINECRAFT_NET_MAX_PLAYERS];
|
||||
DWORD IQNet::s_playerCount = 1;
|
||||
bool IQNet::s_isHosting = true;
|
||||
IQNetPlayer IQNet::m_player[4];
|
||||
|
||||
QNET_STATE _iQNetStubState = QNET_STATE_IDLE;
|
||||
|
||||
void Win64_SetupRemoteQNetPlayer(IQNetPlayer *player, BYTE smallId, bool isHost, bool isLocal)
|
||||
{
|
||||
player->m_smallId = smallId;
|
||||
player->m_isRemote = !isLocal;
|
||||
player->m_isHostPlayer = isHost;
|
||||
swprintf(player->m_gamertag, 32, L"Player%d", smallId);
|
||||
if (smallId >= IQNet::s_playerCount)
|
||||
IQNet::s_playerCount = smallId + 1;
|
||||
}
|
||||
bool _bQNetStubGameRunning = false;
|
||||
|
||||
HRESULT IQNet::AddLocalPlayerByUserIndex(DWORD dwUserIndex){ return S_OK; }
|
||||
IQNetPlayer *IQNet::GetHostPlayer() { return &m_player[0]; }
|
||||
IQNetPlayer *IQNet::GetLocalPlayerByUserIndex(DWORD dwUserIndex)
|
||||
{
|
||||
if (s_isHosting)
|
||||
{
|
||||
if (dwUserIndex < MINECRAFT_NET_MAX_PLAYERS && !m_player[dwUserIndex].m_isRemote)
|
||||
return &m_player[dwUserIndex];
|
||||
return NULL;
|
||||
}
|
||||
if (dwUserIndex != 0)
|
||||
return NULL;
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (!m_player[i].m_isRemote)
|
||||
return &m_player[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
static bool Win64_IsActivePlayer(IQNetPlayer *p, DWORD index)
|
||||
{
|
||||
if (index == 0) return true;
|
||||
return (p->GetCustomDataValue() != 0);
|
||||
}
|
||||
|
||||
IQNetPlayer *IQNet::GetPlayerByIndex(DWORD dwPlayerIndex)
|
||||
{
|
||||
DWORD found = 0;
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (Win64_IsActivePlayer(&m_player[i], i))
|
||||
{
|
||||
if (found == dwPlayerIndex) return &m_player[i];
|
||||
found++;
|
||||
}
|
||||
}
|
||||
return &m_player[0];
|
||||
}
|
||||
IQNetPlayer *IQNet::GetPlayerBySmallId(BYTE SmallId)
|
||||
{
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (m_player[i].m_smallId == SmallId && Win64_IsActivePlayer(&m_player[i], i)) return &m_player[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
IQNetPlayer *IQNet::GetPlayerByXuid(PlayerUID xuid)
|
||||
{
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (Win64_IsActivePlayer(&m_player[i], i) && m_player[i].GetXuid() == xuid) return &m_player[i];
|
||||
}
|
||||
return &m_player[0];
|
||||
}
|
||||
DWORD IQNet::GetPlayerCount()
|
||||
{
|
||||
DWORD count = 0;
|
||||
for (DWORD i = 0; i < s_playerCount; i++)
|
||||
{
|
||||
if (Win64_IsActivePlayer(&m_player[i], i)) count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
QNET_STATE IQNet::GetState() { return _iQNetStubState; }
|
||||
bool IQNet::IsHost() { return s_isHosting; }
|
||||
IQNetPlayer *IQNet::GetLocalPlayerByUserIndex(DWORD dwUserIndex) { return &m_player[dwUserIndex]; }
|
||||
IQNetPlayer *IQNet::GetPlayerByIndex(DWORD dwPlayerIndex) { return &m_player[0]; }
|
||||
IQNetPlayer *IQNet::GetPlayerBySmallId(BYTE SmallId){ return &m_player[0]; }
|
||||
IQNetPlayer *IQNet::GetPlayerByXuid(PlayerUID xuid){ return &m_player[0]; }
|
||||
DWORD IQNet::GetPlayerCount() { return 1; }
|
||||
QNET_STATE IQNet::GetState() { return _bQNetStubGameRunning ? QNET_STATE_GAME_PLAY : QNET_STATE_IDLE; }
|
||||
bool IQNet::IsHost() { return true; }
|
||||
HRESULT IQNet::JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo) { return S_OK; }
|
||||
void IQNet::HostGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; s_isHosting = true; }
|
||||
void IQNet::ClientJoinGame() { _iQNetStubState = QNET_STATE_SESSION_STARTING; s_isHosting = false; }
|
||||
void IQNet::EndGame()
|
||||
{
|
||||
_iQNetStubState = QNET_STATE_IDLE;
|
||||
s_isHosting = false;
|
||||
s_playerCount = 1;
|
||||
for (int i = 1; i < MINECRAFT_NET_MAX_PLAYERS; i++)
|
||||
{
|
||||
m_player[i].m_smallId = 0;
|
||||
m_player[i].m_isRemote = false;
|
||||
m_player[i].m_isHostPlayer = false;
|
||||
m_player[i].m_gamertag[0] = 0;
|
||||
m_player[i].SetCustomDataValue(0);
|
||||
}
|
||||
}
|
||||
void IQNet::HostGame() { _bQNetStubGameRunning = true; }
|
||||
void IQNet::EndGame() { _bQNetStubGameRunning = false; }
|
||||
|
||||
DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; }
|
||||
|
||||
void XSetThreadProcessor(HANDLE a, int b) {}
|
||||
@@ -536,8 +448,6 @@ void C_4JProfile::Initialise( DWORD dwTitleID,
|
||||
pGameSettings->ucTutorialCompletion[28] |= 1<<0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined _WINDOWS64 || (defined(__PS3__) && defined(DISABLE_PSN))
|
||||
void C_4JProfile::SetTrialTextStringTable(CXuiStringTable *pStringTable,int iAccept,int iReject) {}
|
||||
void C_4JProfile::SetTrialAwardText(eAwardType AwardType,int iTitle,int iText) {}
|
||||
int C_4JProfile::GetLockedProfile() { return 0; }
|
||||
@@ -550,24 +460,11 @@ UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const
|
||||
UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; }
|
||||
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
||||
bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
||||
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid)
|
||||
{
|
||||
if (iPad != 0)
|
||||
{
|
||||
// previously INVALID_XUID
|
||||
*pXuid = 0;
|
||||
return;
|
||||
}
|
||||
if (IQNet::s_isHosting)
|
||||
*pXuid = 0xe000d45248242f2e;
|
||||
else
|
||||
*pXuid = 0xe000d45248242f2e + WinsockNetLayer::GetLocalSmallId();
|
||||
}
|
||||
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return xuid1 == xuid2; }
|
||||
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; }
|
||||
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return false; }
|
||||
BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; }
|
||||
bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; }
|
||||
#endif
|
||||
#ifdef _WINDOWS64
|
||||
|
||||
#if defined(__ORBIS__)
|
||||
bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool thisQuadrantOnly, bool *pbChatRestricted,bool *pbContentRestricted,int *piAge)
|
||||
{
|
||||
@@ -590,8 +487,8 @@ char fakeGamerTag[32] = "PlayerName";
|
||||
void SetFakeGamertag(char *name){ strcpy_s(fakeGamerTag, name); }
|
||||
char* C_4JProfile::GetGamertag(int iPad){ return fakeGamerTag; }
|
||||
#else
|
||||
char* C_4JProfile::GetGamertag(int iPad){ extern char g_Win64Username[17]; return g_Win64Username; }
|
||||
wstring C_4JProfile::GetDisplayName(int iPad){ extern wchar_t g_Win64UsernameW[17]; return g_Win64UsernameW; }
|
||||
char* C_4JProfile::GetGamertag(int iPad){ return "PlayerName"; }
|
||||
wstring C_4JProfile::GetDisplayName(int iPad){ return L"PlayerName"; }
|
||||
#endif
|
||||
bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; }
|
||||
void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {}
|
||||
|
||||
@@ -3775,9 +3775,6 @@
|
||||
<ClInclude Include="PSVita\OldSdk.h">
|
||||
<Filter>PSVita</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Network\WinsockNetLayer.h">
|
||||
<Filter>Common\Source Files\Network</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
@@ -5922,9 +5919,6 @@
|
||||
<ClCompile Include="PSVita\OldSdk.cpp">
|
||||
<Filter>PSVita</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\Network\WinsockNetLayer.cpp">
|
||||
<Filter>Common\Source Files\Network</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="Xbox\4JLibs\libs\4J_Render_d.lib">
|
||||
|
||||
@@ -3966,7 +3966,6 @@ void Minecraft::releaseLevel(int message)
|
||||
// time when exiting from an online game
|
||||
void Minecraft::forceStatsSave(int idx)
|
||||
{
|
||||
#ifndef DISABLE_PSN
|
||||
//4J Gordon: Force a stats save
|
||||
stats[idx]->save(idx, true);
|
||||
|
||||
@@ -3978,7 +3977,6 @@ void Minecraft::forceStatsSave(int idx)
|
||||
stats[idx]->saveLeaderboards();
|
||||
ProfileManager.SetLockedProfile(tempLockedProfile);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// 4J Added
|
||||
|
||||
@@ -116,11 +116,7 @@ void Options::init()
|
||||
bobView = true;
|
||||
anaglyph3d = false;
|
||||
advancedOpengl = false;
|
||||
#ifdef _WINDOWS64
|
||||
framerateLimit = 0;
|
||||
#else
|
||||
framerateLimit = 2;
|
||||
#endif
|
||||
fancyGraphics = true;
|
||||
ambientOcclusion = true;
|
||||
renderClouds = true;
|
||||
|
||||
@@ -12,9 +12,13 @@
|
||||
|
||||
// Singleton
|
||||
OrbisNPToolkit NPToolkit;
|
||||
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
|
||||
sce::Toolkit::NP::Utilities::Future< sce::Toolkit::NP::NpSessionInformation > OrbisNPToolkit::sm_createJoinFuture;
|
||||
#endif
|
||||
sce::Toolkit::NP::NpSessionInformation OrbisNPToolkit::m_currentSessionInfo;
|
||||
#ifndef __ORBIS__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::MessageAttachment> OrbisNPToolkit::m_messageData;
|
||||
#endif
|
||||
|
||||
|
||||
void OrbisNPToolkit::presenceCallback( const sce::Toolkit::NP::Event& event )
|
||||
@@ -130,29 +134,53 @@ void OrbisNPToolkit::sessionsCallback( const sce::Toolkit::NP::Event& event)
|
||||
{
|
||||
case sce::Toolkit::NP::Event::npSessionCreateResult: ///< An event generated when the %Np session creation process has been completed.
|
||||
app.DebugPrintf("npSessionCreateResult");
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// no way to retrieve the NpSessionInformation payload; m_currentSessionInfo stays zeroed.
|
||||
if(event.returnCode >= 0)
|
||||
{
|
||||
app.DebugPrintf("Session Created Successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session Creation Failed 0x%x\n",event.returnCode);
|
||||
}
|
||||
#else
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
{
|
||||
app.DebugPrintf("Session Created Successfully\n");
|
||||
m_currentSessionInfo = *sm_createJoinFuture.get();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session Creation Failed 0x%x\n",sm_createJoinFuture.getError());
|
||||
}
|
||||
sm_createJoinFuture.reset();
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::npSessionJoinResult: ///< An event generated when the join %Np session process has been completed.
|
||||
app.DebugPrintf("npSessionJoinResult");
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
#ifdef __ORBIS__
|
||||
if(event.returnCode >= 0)
|
||||
{
|
||||
app.DebugPrintf("Session joined successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session join Failed 0x%x\n",event.returnCode);
|
||||
}
|
||||
#else
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
{
|
||||
app.DebugPrintf("Session joined successfully\n");
|
||||
m_currentSessionInfo = *sm_createJoinFuture.get();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session join Failed 0x%x\n",sm_createJoinFuture.getError());
|
||||
}
|
||||
sm_createJoinFuture.reset();
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::npSessionError: ///< An event generated when there was error performing the current %Np session process.
|
||||
app.DebugPrintf("npSessionError");
|
||||
@@ -207,6 +235,12 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::gameCustomDataGameDataResult:
|
||||
app.DebugPrintf("gameCustomDataGameDataResult");
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// the MessageAttachment payload can't be retrieved, so invite data is unavailable.
|
||||
app.DebugPrintf("gameCustomDataGameDataResult stubbed (no Future in SDK 1.70), returnCode 0x%08x\n", event.returnCode);
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
if(m_messageData.hasResult())
|
||||
{
|
||||
SQRNetworkManager_Orbis::GetInviteDataAndProcess(m_messageData.get());
|
||||
@@ -229,6 +263,7 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::gameCustomDataMessageResult:
|
||||
app.DebugPrintf("gameCustomDataMessageResult");
|
||||
@@ -350,6 +385,20 @@ void OrbisNPToolkit::init()
|
||||
}
|
||||
|
||||
// Get network status and inform library
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// query the net state directly instead of going through NetInfo::getNetInfo
|
||||
int32_t netState = SCE_NET_CTL_STATE_DISCONNECTED;
|
||||
if (sceNetCtlGetState(&netState) == SCE_OK)
|
||||
{
|
||||
ProfileManager.SetNetworkStatus(netState == SCE_NET_CTL_STATE_IPOBTAINED);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error means we're disconnected
|
||||
ProfileManager.SetNetworkStatus(false);
|
||||
}
|
||||
#else
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic> netStateFuture = sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic>();
|
||||
sce::Toolkit::NP::NetInfo::Interface::getNetInfo(&netStateFuture);
|
||||
|
||||
@@ -369,6 +418,7 @@ void OrbisNPToolkit::init()
|
||||
// Error message means we're disconnected
|
||||
ProfileManager.SetNetworkStatus(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
// // Register Client ID for Auth
|
||||
// ret = sce::Toolkit::NP::Interface::registerClientId(CLIENT_ID_FOR_SAMPLE);
|
||||
@@ -409,7 +459,13 @@ void OrbisNPToolkit::createNPSession()
|
||||
char test[3] = {'R','K','B'};
|
||||
createSessionRequest.sessionData= test;
|
||||
createSessionRequest.sessionDataSize = 3;
|
||||
#ifdef __ORBIS__
|
||||
// Sessions::Interface::create requires a Future out-param that SDK 1.70 doesn't implement
|
||||
app.DebugPrintf("createNPSession stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Sessions::Interface::create(&createSessionRequest,&sm_createJoinFuture);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -447,12 +503,18 @@ void OrbisNPToolkit::getMessageData(SceNpGameCustomDataEventParam* paramData)
|
||||
|
||||
req.itemId = paramData->itemId;
|
||||
req.userInfo.userId = userId;
|
||||
#ifdef __ORBIS__
|
||||
// GameCustomData::Interface::getGameData requires a Future out-param that SDK 1.70 doesn't implement
|
||||
app.DebugPrintf("getMessageData stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::GameCustomData::Interface::getGameData(&req, &m_messageData);
|
||||
if( ret < 0 ) {
|
||||
//Error handling
|
||||
} else {
|
||||
//Error handling
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
|
||||
@@ -809,7 +809,9 @@ int SQRNetworkManager_Orbis::BasicEventThreadProc( void *lpParameter )
|
||||
int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
{
|
||||
SQRNetworkManager_Orbis *manager = (SQRNetworkManager_Orbis *)lpParameter;
|
||||
#ifndef __ORBIS__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
#endif
|
||||
|
||||
int ret = 0;
|
||||
manager->m_aFriendSearchResults.clear();
|
||||
@@ -828,13 +830,13 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
|
||||
|
||||
bool async = false;
|
||||
#ifndef __ORBIS__
|
||||
ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, async);
|
||||
if(ret != SCE_OK)
|
||||
{
|
||||
app.DebugPrintf("getFriendslist failed! 0x%08x\n", ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (friendList.hasResult())
|
||||
{
|
||||
sce::Toolkit::NP::FriendsList::const_iterator iter ;
|
||||
@@ -851,12 +853,11 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
|
||||
sce::Toolkit::NP::PresenceRequest presenceRequest;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::PresenceInfo> presenceInfo;
|
||||
int presenceInfo;
|
||||
memset(&presenceRequest,0,sizeof(presenceRequest));
|
||||
strncpy(presenceRequest.onlineId.data,iter->npid.handle.data, strlen(iter->npid.handle.data));
|
||||
presenceRequest.presenceType = SCE_TOOLKIT_NP_PRESENCE_TYPE_INCONTEXT_INFO;
|
||||
presenceRequest.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());;
|
||||
|
||||
|
||||
ret = sce::Toolkit::NP::Presence::Interface::getPresence(&presenceRequest,&presenceInfo,false);
|
||||
if( ret < 0 )
|
||||
{
|
||||
@@ -903,6 +904,10 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
app.DebugPrintf("Check sign-in status\n");
|
||||
|
||||
}
|
||||
#else
|
||||
app.DebugPrintf( "Friend list is disabled on this build -UbEr\n");
|
||||
#endif
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -44,9 +44,11 @@ bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/
|
||||
|
||||
|
||||
|
||||
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
|
||||
sce::Toolkit::NP::Utilities::Future<std::vector<sce::Toolkit::NP::ProductInfo> > g_productList;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::CategoryInfo> g_categoryInfo;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::ProductInfoDetailed> g_detailedProductInfo;
|
||||
#endif
|
||||
|
||||
|
||||
SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed;
|
||||
@@ -180,8 +182,15 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
params.serviceLabel = 0;
|
||||
app.DebugPrintf("Getting Product List ...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getProductList requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getProductList stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getProductList(&g_productList, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getProductList() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
@@ -192,7 +201,8 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyProductList(productList, g_productList.get());
|
||||
m_event = e_event_commerceGotProductList;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -241,19 +251,27 @@ int SonyCommerce_Orbis::getCategoryInfo(CategoryInfo *pInfo, char *categoryId)
|
||||
|
||||
app.DebugPrintf("Getting Category Information...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getCategoryInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getCategoryInfo(&g_categoryInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
// error
|
||||
app.DebugPrintf("Commerce::Interface::getCategoryInfo error: 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
else if (g_categoryInfo.hasResult())
|
||||
else if (g_categoryInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyCategoryInfo(pInfo, g_categoryInfo.get());
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -289,20 +307,28 @@ int SonyCommerce_Orbis::getDetailedProductInfo(ProductInfoDetailed *pInfo, const
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -339,19 +365,27 @@ int SonyCommerce_Orbis::addDetailedProductInfo(ProductInfo *pInfo, const char *p
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("addDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::addDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyAddDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceAddedDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -600,7 +634,7 @@ int SonyCommerce_Orbis::createSession()
|
||||
//
|
||||
// sce::Toolkit::NP::Commerce::Interface::CreateSession
|
||||
//
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3 platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3 platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
int ret = sce::Toolkit::NP::Commerce::Interface::createSession();
|
||||
|
||||
@@ -656,7 +690,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
}
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotCategoryInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyCategoryInfo(m_pCategoryInfo, g_categoryInfo.get());
|
||||
#endif
|
||||
m_pCategoryInfo = NULL;
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
break;
|
||||
@@ -664,7 +703,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotProductList:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotProductList stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyProductList(m_pProductInfoList, g_productList.get());
|
||||
#endif
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_event = e_event_commerceGotProductList;
|
||||
break;
|
||||
@@ -672,6 +716,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotDetailedProductInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_pProductInfo = NULL;
|
||||
#else
|
||||
if(m_pProductInfoDetailed)
|
||||
{
|
||||
copyDetailedProductInfo(m_pProductInfoDetailed, g_detailedProductInfo.get());
|
||||
@@ -682,6 +732,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
copyAddDetailedProductInfo(m_pProductInfo, g_detailedProductInfo.get());
|
||||
m_pProductInfo = NULL;
|
||||
}
|
||||
#endif
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
break;
|
||||
}
|
||||
@@ -1145,8 +1196,8 @@ void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
|
||||
setCallback(cb,lpParam);
|
||||
|
||||
// We don't need to create a session on PS4, from the Sony docs -
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3
|
||||
// platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3
|
||||
// platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,14 +35,23 @@ int g_loadedPCMVoiceDataSizes[4];
|
||||
int g_loadedPCMVoiceDataPos[4];
|
||||
char* g_loadedPCMVoiceData[4];
|
||||
|
||||
static void CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
|
||||
{
|
||||
C4JThread::PushAffinityAllCores(); // PS4 only
|
||||
|
||||
int err = sceVoiceCreatePort( portId, pArg );
|
||||
assert(err == SCE_OK);
|
||||
assert(*portId != SCE_VOICE_INVALID_PORT_ID);
|
||||
C4JThread::PopAffinity(); // PS4 only
|
||||
static bool CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
|
||||
{
|
||||
C4JThread::PushAffinityAllCores();
|
||||
|
||||
*portId = SCE_VOICE_INVALID_PORT_ID;
|
||||
|
||||
int err = sceVoiceCreatePort(portId, pArg);
|
||||
//assert(err == SCE_OK);
|
||||
//assert(*portId != VOICE_INVALID_PORT_ID);
|
||||
C4JThread::PopAffinity();
|
||||
|
||||
if (err != SCE_OK || *portId == SCE_VOICE_INVALID_PORT_ID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void DeletePort(uint32_t& port)
|
||||
@@ -122,7 +131,12 @@ void SonyVoiceChat_Orbis::init()
|
||||
portArgs.volume = 1.0f;
|
||||
portArgs.voice.bitrate = VOICE_ENCODED_FORMAT;
|
||||
#endif
|
||||
CreatePort( &m_voiceOutPort, &portArgs );
|
||||
//CreatePort( &m_voiceOutPort, &portArgs );
|
||||
|
||||
if (!CreatePort(&m_voiceOutPort, &portArgs))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
start();
|
||||
m_bInitialised = true;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
static const int sc_maxVoiceDataSize = 2048;
|
||||
|
||||
|
||||
class VoicePacket
|
||||
{
|
||||
static const int MAX_LOCAL_PLAYER_COUNT = 4;
|
||||
@@ -86,10 +85,10 @@ public:
|
||||
SceUserServiceUserId m_localUserID;
|
||||
|
||||
public:
|
||||
SQRLocalVoiceDevice()
|
||||
: m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
|
||||
SQRLocalVoiceDevice()
|
||||
: m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
|
||||
, m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
|
||||
, m_microphonePort(SCE_VOICE_INVALID_PORT_ID)
|
||||
, m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
|
||||
{
|
||||
for(int i=0;i<4;i++)
|
||||
m_localConnections[i] = 0;
|
||||
|
||||
@@ -1675,9 +1675,69 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_DESC_SKULL">
|
||||
<value>Mob Heads can be placed as a decoration, or worn as a mask in the helmet slot.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SQUID">
|
||||
<data name="IDS_DESC_COMMAND_BLOCK">
|
||||
<value>Used to execute commands.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_BEACON">
|
||||
<value>Projects a beam of light into the sky and can provide Status Effects to nearby players.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_CHEST_TRAP">
|
||||
<value>Stores blocks and items inside. Place two chest side by side to create a larger chest with double capacity. The trapped chest also creates a Redstone charge when opened.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_WEIGHTED_PLATE_LIGHT">
|
||||
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_WEIGHTED_PLATE_HEAVY">
|
||||
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate. Requires more weight than the light plate.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_REDSTONE_BLOCK">
|
||||
<value>Used as a redstone power source. Can be crafted back into Redstone.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HOPPER">
|
||||
<value>Used to catch items or to transfer items into and out of containers.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_ACTIVATOR_RAIL">
|
||||
<value>A type of rail that can enable or disable Minecarts with Hoppers and trigger Minecarts with TNT.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_DROPPER">
|
||||
<value>Used to hold and drop items, or push items into another container, when given a Redstone charge.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_CLAY">
|
||||
<value>Colorful blocks crafted by dyeing Hardened clay.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HAY">
|
||||
<value>Can be fed to Horses, Donkeys or Mules to heal up to 10 Hearts. Speeds up the growth of foals.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HARDENED_CLAY">
|
||||
<value>Created by smelting Clay in a furnace.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_GLASS">
|
||||
<value>Crafted from glass and a dye.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_GLASS_PANE">
|
||||
<value>Crafted from Stained Glass</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_COAL_BLOCK">
|
||||
<value>A compact way of storing Coal. Can be used as fuel in a Furnace.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SQUID">
|
||||
<value>Squid</value>
|
||||
</data>
|
||||
|
||||
@@ -2895,9 +2955,13 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_TILE_JUNGLE_PLANKS">
|
||||
<value>Jungle Wood Planks</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TILE_SAPLING">
|
||||
<data name="IDS_TILE_PLANKS">
|
||||
<value>Wood Planks (any type)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TILE_SAPLING">
|
||||
<value>Sapling</value>
|
||||
</data>
|
||||
|
||||
@@ -5688,9 +5752,41 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_TOOLTIPS_CLEARSLOTS">
|
||||
<value>Clear All Slots</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_OK">
|
||||
<data name="IDS_TOOLTIPS_MOUNT">
|
||||
<value>Mount</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_DISMOUNT">
|
||||
<value>Dismount</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_SADDLEBAGS">
|
||||
<value>Attach Chest</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_FIREWORK_LAUNCH">
|
||||
<value>Launch</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_LEASH">
|
||||
<value>Leash</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_UNLEASH">
|
||||
<value>Release</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_ATTACH">
|
||||
<value>Attach</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_NAME">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_OK">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
|
||||
@@ -5700,9 +5796,13 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_DOWNLOADABLECONTENT">
|
||||
<value>Minecraft Store</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_EXIT_GAME">
|
||||
<data name="IDS_CONFIRM_LEAVE_VIA_INVITE">
|
||||
<value>Are you sure you want to leave your current game and join the new one? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_EXIT_GAME">
|
||||
<value>Exit Game</value>
|
||||
</data>
|
||||
|
||||
@@ -5732,9 +5832,17 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT">
|
||||
<value>This save is corrupt or damaged. Would you like to delete it?</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
|
||||
<data name="IDS_CORRUPT_OPTIONS_RETRY">
|
||||
<value>Str1k3r: Placeholder</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CORRUPT_OPTIONS_DELETE">
|
||||
<value>Str1k3r: Placeholder</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
|
||||
<value>Are you sure you want to exit to the main menu and disconnect all players from the game? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
@@ -5744,9 +5852,13 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_EXIT_GAME_NO_SAVE">
|
||||
<value>Exit without saving</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
|
||||
<data name="IDS_CONFIRM_EXIT_GAME">
|
||||
<value>Are you sure you want to exit to the main menu? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
|
||||
<value>Are you sure you want to exit to the main menu? Your progress will be lost!</value>
|
||||
</data>
|
||||
|
||||
@@ -6503,9 +6615,13 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_GAMEMODE_CREATIVE">
|
||||
<value>Game Mode: Creative</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SURVIVAL">
|
||||
<data name="IDS_GAMEMODE_ADVENTURE">
|
||||
<value>Game Mode: Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SURVIVAL">
|
||||
<value>Survival</value>
|
||||
</data>
|
||||
|
||||
@@ -6517,6 +6633,10 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
<value>Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_ADVENTURE">
|
||||
<value>Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CREATED_IN_SURVIVAL">
|
||||
<value>Created in Survival Mode</value>
|
||||
</data>
|
||||
@@ -6555,9 +6675,13 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_LEVELTYPE_SUPERFLAT">
|
||||
<value>Superflat</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_ONLINE">
|
||||
<data name="IDS_GAMEOPTION_SEED">
|
||||
<value>Enter a seed to generate the same terrain again. Leave blank for a random world.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_ONLINE">
|
||||
<value>When enabled, the game will be an online game.</value>
|
||||
</data>
|
||||
|
||||
@@ -6575,13 +6699,29 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_GAMEOPTION_TRUST">
|
||||
<value>When disabled, players joining the game cannot build or mine until authorised.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
|
||||
<data name="IDS_INCREASE_WORLD_SIZE">
|
||||
<value>Increase World Size</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
|
||||
<value>Overwrite World Edges</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
|
||||
<value>When enabled, fire may spread to nearby flammable blocks.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
|
||||
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE">
|
||||
<value>Select a larger world size to increase the amount of the world that you can explore. Larger worlds cannot be made smaller again.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
|
||||
<value>When enabled, the outer 32 tiles around the world edge will be overwritten by newly generated tiles to make the world size increase seamless. When disabled, the world size increase will leave all original tiles intact.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
|
||||
<value>When enabled, TNT will explode when activated.</value>
|
||||
</data>
|
||||
|
||||
@@ -7110,9 +7250,13 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_MAX_CHICKENS_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding Chickens has been reached.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
|
||||
<data name="IDS_MAX_HORSES_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding horses has been reached.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding Mooshrooms has been reached.</value>
|
||||
</data>
|
||||
|
||||
@@ -7162,7 +7306,11 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_CREDITS">
|
||||
<value>Credits</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANGUAGE_SELECTOR">
|
||||
<value>Languages</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_REINSTALL_CONTENT">
|
||||
<value>Reinstall Content</value>
|
||||
@@ -7566,9 +7714,25 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_POTION_POISON">
|
||||
<value>Poison</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_MOVESPEED_POSTFIX">
|
||||
<data name="IDS_POTION_WITHER">
|
||||
<value>Wither</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_HEALTHBOOST">
|
||||
<value>Health Boost</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_ABSORPTION">
|
||||
<value>Absorption</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_SATURATION">
|
||||
<value>Saturation</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_MOVESPEED_POSTFIX">
|
||||
<value>of Swiftness</value>
|
||||
</data>
|
||||
|
||||
@@ -7642,9 +7806,25 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_POTION_POISON_POSTFIX">
|
||||
<value>of Poison</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_POTENCY_0">
|
||||
<data name="IDS_POTION_WITHER_POSTFIX">
|
||||
<value>of Decay</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_HEALTHBOOST_POSTFIX">
|
||||
<value>of Health Boost</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_ABSORPTION_POSTFIX">
|
||||
<value>of Absorption</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_SATURATION_POSTFIX">
|
||||
<value>of Saturation</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_POTENCY_0">
|
||||
<value/>
|
||||
|
||||
</data>
|
||||
@@ -7837,6 +8017,10 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
<value>Reduces health of the affected players, animals and monsters over time.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_EFFECTS_WHENDRANK">
|
||||
<value>When Applied:</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_ATTRIBUTE_NAME_HORSE_JUMPSTRENGTH">
|
||||
<value>Horse Jump Strength</value>
|
||||
</data>
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<data name="IDS_LANG_SYSTEM">
|
||||
<value>System Language</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_ENGLISH">
|
||||
<value>English</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_GERMAN">
|
||||
<value>German</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_SPANISH">
|
||||
<value>Spanish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SPANISH_SPAIN">
|
||||
<value>Spanish (Spain)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SPANISH_LATIN_AMERICA">
|
||||
<value>Spanish (Latin America)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_FRENCH">
|
||||
<value>French</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_ITALIAN">
|
||||
<value>Italian</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_PORTUGUESE">
|
||||
<value>Portuguese</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_PORTUGUESE_PORTUGAL">
|
||||
<value>Portuguese (Portugal)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_PORTUGUESE_BRAZIL">
|
||||
<value>Portuguese (Brazil)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_JAPANESE">
|
||||
<value>Japanese</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_KOREAN">
|
||||
<value>Korean</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_CHINESE_TRADITIONAL">
|
||||
<value>Chinese (Traditional)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_CHINESE_SIMPLIFIED">
|
||||
<value>Chinese (Simplified)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_DANISH">
|
||||
<value>Danish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_FINISH">
|
||||
<value>Finnish</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_DUTCH">
|
||||
<value>Dutch</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_POLISH">
|
||||
<value>Polish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_RUSSIAN">
|
||||
<value>Russian</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SWEDISH">
|
||||
<value>Swedish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_NORWEGIAN">
|
||||
<value>Norwegian</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_GREEK">
|
||||
<value>Greek</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_TURKISH">
|
||||
<value>Turkish</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -270,6 +270,10 @@ If you try to save while using the trial version, you will be given the option t
|
||||
<value>Download Failed. Please try again later.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SAVE_TRANSFER_WRONG_VERSION">
|
||||
<value>The saved file in the download area has a version number that Minecraft: PlayStation®4 Edition does not yet support.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DISCONNECTED_NAT_TYPE_MISMATCH">
|
||||
<value>Failed to join the game due to a restrictive NAT type. Please check your network settings.</value>
|
||||
</data>
|
||||
|
||||
@@ -1,110 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "..\..\Common\Leaderboards\LeaderboardManager.h"
|
||||
#include "..\..\..\Minecraft.World\x64headers\extraX64.h"
|
||||
#include "Common\Leaderboards\SonyLeaderboardManager.h"
|
||||
#include "Common\Leaderboards\LeaderboardManager.h"
|
||||
|
||||
#include "PS3\Passphrase\ps3__np_conf.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class PS3LeaderboardManager : public LeaderboardManager
|
||||
class PS3LeaderboardManager : public SonyLeaderboardManager
|
||||
{
|
||||
protected:
|
||||
enum EStatsState
|
||||
{
|
||||
eStatsState_Idle,
|
||||
eStatsState_Getting,
|
||||
eStatsState_Failed,
|
||||
eStatsState_Ready,
|
||||
eStatsState_Canceled,
|
||||
//eStatsState_Writing,
|
||||
eStatsState_Max
|
||||
};
|
||||
|
||||
public:
|
||||
PS3LeaderboardManager();
|
||||
virtual ~PS3LeaderboardManager();
|
||||
|
||||
private:
|
||||
unsigned short m_openSessions;
|
||||
protected:
|
||||
|
||||
C4JThread *m_threadScoreboard;
|
||||
bool m_running;
|
||||
virtual HRESULT initialiseScoreUtility();
|
||||
|
||||
int32_t m_titleContext;
|
||||
int m_transactionCtx;
|
||||
virtual bool scoreUtilityAlreadyInitialised(HRESULT hr);
|
||||
|
||||
//SceNpId m_myNpId;
|
||||
virtual HRESULT createTitleContext(const SceNpId &npId);
|
||||
|
||||
static int scoreboardThreadEntry(LPVOID lpParam);
|
||||
void scoreboardThreadInternal();
|
||||
virtual HRESULT destroyTitleContext(int titleContext);
|
||||
|
||||
bool getScoreByIds();
|
||||
bool getScoreByRange();
|
||||
virtual HRESULT createTransactionContext(int titleContext);
|
||||
|
||||
bool setScore();
|
||||
queue<RegisterScore> m_views;
|
||||
virtual HRESULT abortTransactionContext(int transactionContext);
|
||||
|
||||
CRITICAL_SECTION m_csViewsLock;
|
||||
virtual HRESULT destroyTransactionContext(int transactionContext);
|
||||
|
||||
EStatsState m_eStatsState; //State of the stats read
|
||||
// EFilterMode m_eFilterMode;
|
||||
virtual HRESULT getFriendsList(const SceNpId &myNpId, SceNpId* &npIds, uint32_t &len);
|
||||
|
||||
ReadScore *m_scores;
|
||||
unsigned int m_maxRank;
|
||||
//SceNpScoreRankData *m_stats;
|
||||
|
||||
public:
|
||||
virtual void Tick();
|
||||
|
||||
//Open a session
|
||||
virtual bool OpenSession();
|
||||
|
||||
//Close a session
|
||||
virtual void CloseSession();
|
||||
|
||||
//Delete a session
|
||||
virtual void DeleteSession();
|
||||
|
||||
//Write the given stats
|
||||
//This is called synchronously and will not free any memory allocated for views when it is done
|
||||
virtual bool WriteStats(unsigned int viewCount, ViewIn views);
|
||||
|
||||
virtual bool ReadStats_Friends(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int startIndex, unsigned int readCount);
|
||||
virtual bool ReadStats_MyScore(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount);
|
||||
virtual bool ReadStats_TopRank(LeaderboardReadListener *listener, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount);
|
||||
|
||||
//Perform a flush of the stats
|
||||
virtual void FlushStats();
|
||||
|
||||
//Cancel the current operation
|
||||
virtual void CancelOperation();
|
||||
|
||||
//Is the leaderboard manager idle.
|
||||
virtual bool isIdle();
|
||||
|
||||
private:
|
||||
int getBoardId(int difficulty, EStatsType);
|
||||
|
||||
//LeaderboardManager::ReadScore *filterJustScorers(unsigned int &num, LeaderboardManager::ReadScore *friendsData);
|
||||
|
||||
SceNpScorePlayerRankData *addPadding(unsigned int num, SceNpScoreRankData *rankData);
|
||||
|
||||
void convertToOutput(unsigned int &num, ReadScore *out, SceNpScorePlayerRankData *rankData, SceNpScoreComment *comm);
|
||||
|
||||
void toBinary(void *out, SceNpScoreComment *in);
|
||||
void fromBinary(SceNpScoreComment **out, void *in);
|
||||
|
||||
void toBase32(SceNpScoreComment *out, void *in);
|
||||
void fromBase32(void *out, SceNpScoreComment *in);
|
||||
|
||||
void toSymbols(char *);
|
||||
void fromSymbols(char *);
|
||||
|
||||
bool test_string(string);
|
||||
|
||||
void initReadScoreStruct(ReadScore &out, SceNpScoreRankData &);
|
||||
void fillReadScoreStruct(ReadScore &out, SceNpScoreComment &comment);
|
||||
|
||||
static bool SortByRank(const ReadScore &lhs, const ReadScore &rhs);
|
||||
virtual char * getComment(SceNpScoreComment *comment);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
#include "SQRNetworkManager_PS3.h"
|
||||
#include "Common/Network/Sony/SQRNetworkPlayer.h"
|
||||
#ifdef __PS3__
|
||||
@@ -3623,5 +3621,4 @@ int SQRNetworkManager_PS3::GetJoiningReadyPercentage()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,13 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifdef DISABLE_PSN
|
||||
// global func, so we can call from the profile lib
|
||||
void SonyCommerce_UpgradeTrial()
|
||||
{
|
||||
// we're now calling the app function here, which manages pending requests
|
||||
app.UpgradeTrial();
|
||||
}
|
||||
#else
|
||||
#include "SonyCommerce_PS3.h"
|
||||
#include "..\PS3Extras\ShutdownManager.h"
|
||||
#include <sys/event.h>
|
||||
@@ -1519,4 +1511,3 @@ void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#ifndef DISABLE_PSN
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -762,4 +762,3 @@ void SonyVoiceChat::setState( EAVCState state )
|
||||
sm_state = state;
|
||||
printStateAndEvent();
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef _DISABLE_PSN
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -154,5 +154,4 @@ private:
|
||||
static void printStateAndEvent();
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
};
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "..\..\Minecraft.World\LevelSettings.h"
|
||||
#include "..\..\Minecraft.World\BiomeSource.h"
|
||||
#include "..\..\Minecraft.World\LevelType.h"
|
||||
#ifndef DISABLE_PSN
|
||||
#include "..\..\PS3\Network\SonyCommerce_PS3.h"
|
||||
#endif
|
||||
#include "..\..\Minecraft.World\StringHelpers.h"
|
||||
#include "PS3Extras\ShutdownManager.h"
|
||||
#include "PS3\Network\SonyRemoteStorage_PS3.h"
|
||||
@@ -562,7 +560,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
|
||||
void CConsoleMinecraftApp::CommerceInit()
|
||||
{
|
||||
#ifndef DISABLE_PSN
|
||||
m_bCommerceCategoriesRetrieved=false;
|
||||
m_bCommerceProductListRetrieved=false;
|
||||
m_bCommerceInitialised=false;
|
||||
@@ -575,12 +572,10 @@ void CConsoleMinecraftApp::CommerceInit()
|
||||
m_iCurrentCategory=0;
|
||||
m_iCurrentProduct=0;
|
||||
memset(m_pchSkuID,0,48);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::CommerceTick()
|
||||
{
|
||||
#ifndef DISABLE_PSN
|
||||
// only tick this if the primary user is signed in to the PSN
|
||||
if(ProfileManager.IsSignedInLive(0))
|
||||
{
|
||||
@@ -700,7 +695,6 @@ void CConsoleMinecraftApp::CommerceTick()
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// was the primary player signed in and is now signed out?
|
||||
if(m_eCommerce_State!=eCommerce_State_Offline)
|
||||
|
||||
@@ -24,7 +24,6 @@ SYS_PROCESS_PARAM(1001, 0x10000); // thread priority, and stack size
|
||||
#include <sysutil/sysutil_msgdialog.h>
|
||||
|
||||
#include "PS3/Network/SonyRemoteStorage_PS3.h"
|
||||
#include "..\..\Minecraft.Client\Common\Network\WinsockNetLayer.h"
|
||||
|
||||
// define to use spurs (otherwise SPU threads or raw will be used)
|
||||
#define USE_SPURS
|
||||
@@ -36,9 +35,6 @@ SYS_PROCESS_PARAM(1001, 0x10000); // thread priority, and stack size
|
||||
#include <sys/spu_image.h>
|
||||
#endif
|
||||
|
||||
#ifdef DISABLE_PSN
|
||||
#include "../Passphrase/ps3__np_conf.h"
|
||||
#endif
|
||||
/* Encrypted ID for protected data file (*) You must edit these binaries!! */
|
||||
char secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE] =
|
||||
{
|
||||
@@ -523,9 +519,7 @@ void RegisterAwardsWithProfileManager()
|
||||
// Rich Presence init - number of presences, number of contexts
|
||||
//printf("Rich presence strings are hard coded on PS3 for now, must change this!\n");
|
||||
ProfileManager.RichPresenceInit(-1,-1); // 4J-JEV - Presence and Context count not used.
|
||||
#ifndef DISABLE_PSN
|
||||
ProfileManager.SetRichPresenceSettingFn(SQRNetworkManager_PS3::SetRichPresence);
|
||||
#endif
|
||||
char *pchRichPresenceString;
|
||||
|
||||
pchRichPresenceString=(char *)AddRichPresenceString(IDS_RICHPRESENCE_GAMESTATE);
|
||||
@@ -861,9 +855,7 @@ int main()
|
||||
|
||||
app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL
|
||||
// 4J-PB - Kick of the check for trial or full version - requires ui to be initialised
|
||||
#ifndef DISABLE_PSN
|
||||
app.GetCommerce()->CheckForTrialUpgradeKey();
|
||||
#endif
|
||||
|
||||
static bool bTrialTimerDisplayed=true;
|
||||
|
||||
@@ -896,13 +888,8 @@ int main()
|
||||
|
||||
|
||||
// Initialise the profile manager with the game Title ID, Offer ID, a profile version number, and the number of profile values and settings
|
||||
#ifndef DISABLE_PSN
|
||||
ProfileManager.Initialise(SQRNetworkManager_PS3::GetSceNpCommsId(),
|
||||
SQRNetworkManager_PS3::GetSceNpCommsSig(),
|
||||
#else
|
||||
ProfileManager.Initialise(&s_npCommunicationId,
|
||||
&s_npCommunicationSignature,
|
||||
#endif
|
||||
PROFILE_VERSION_10,
|
||||
NUM_PROFILE_VALUES,
|
||||
NUM_PROFILE_SETTINGS,
|
||||
@@ -1129,7 +1116,6 @@ int main()
|
||||
if(ShutdownManager::ShouldRun(ShutdownManager::eMainThread))
|
||||
{
|
||||
g_NetworkManager.Initialise();
|
||||
WinsockNetLayer::Initialize();
|
||||
g_NetworkManager.SetLocalGame(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
//#include "stdafx.h"
|
||||
|
||||
|
||||
// Note - there are now 3 types of PlayerUID
|
||||
@@ -20,7 +19,6 @@ class PlayerUID
|
||||
CellSysutilUserId m_userID; // user logged on to the XMB
|
||||
|
||||
public:
|
||||
ULONGLONG XUID;
|
||||
|
||||
class Hash
|
||||
{
|
||||
@@ -31,8 +29,6 @@ public:
|
||||
PlayerUID();
|
||||
PlayerUID(CellSysutilUserId userID, SceNpOnlineId& onlineID, bool bSignedInPSN, int quadrant);
|
||||
PlayerUID(std::wstring fromString);
|
||||
PlayerUID(ULONGLONG xuid) { XUID = xuid; }
|
||||
operator ULONGLONG() const { return XUID; }
|
||||
|
||||
bool operator==(const PlayerUID& rhs) const;
|
||||
bool operator!=(const PlayerUID& rhs);
|
||||
|
||||