forked from cafeberry/cafeberry
add ps4 support
This commit is contained in:
@@ -550,7 +550,9 @@ void CConsoleMinecraftApp::CommerceTick()
|
||||
{
|
||||
SonyCommerce::ProductInfo *pProductInfo=&(pvProductList->at(j));
|
||||
// just want the final 16 characters of the product id
|
||||
#ifndef DISABLE_PSN
|
||||
RegisterDLCData(&pProductInfo->productId[20],0,pProductInfo->imageUrl);
|
||||
#endif
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
@@ -1068,7 +1070,9 @@ void CConsoleMinecraftApp::SystemServiceTick()
|
||||
{
|
||||
case SCE_SYSTEM_SERVICE_EVENT_GAME_CUSTOM_DATA:
|
||||
{
|
||||
#ifndef DISABLE_PSN
|
||||
OrbisNPToolkit::getMessageData((SceNpGameCustomDataEventParam*)event.data.param);
|
||||
#endif
|
||||
// Processing after invitation
|
||||
//SceNpSessionInvitationEventParam* pInvite = (SceNpSessionInvitationEventParam*)event.data.param;
|
||||
//SQRNetworkManager_Orbis::GetInviteDataAndProcess(pInvite);
|
||||
|
||||
@@ -39,8 +39,12 @@
|
||||
#include "..\..\Minecraft.World\OldChunkStorage.h"
|
||||
#include "Leaderboards\OrbisLeaderboardManager.h"
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
#include "Network/Orbis_NPToolkit.h"
|
||||
#include "Orbis\Network\SonyVoiceChat_Orbis.h"
|
||||
#else
|
||||
#include "..\..\Minecraft.Client\Common\Network\WinsockNetLayer.h"
|
||||
#endif
|
||||
|
||||
#define THEME_NAME "584111F70AAAAAAA"
|
||||
#define THEME_FILESIZE 2797568
|
||||
@@ -702,7 +706,9 @@ 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(4,1);
|
||||
#ifndef DISABLE_PSN
|
||||
ProfileManager.SetRichPresenceSettingFn(SQRNetworkManager_Orbis::SetRichPresence);
|
||||
#endif
|
||||
char *pchRichPresenceString;
|
||||
|
||||
pchRichPresenceString=(char *)AddRichPresenceString(IDS_RICHPRESENCE_GAMESTATE);
|
||||
@@ -949,7 +955,9 @@ int main(int argc, const char *argv[] )
|
||||
|
||||
#endif
|
||||
app.InitTime();
|
||||
#ifndef DISABLE_PSN
|
||||
NPToolkit.init();
|
||||
#endif
|
||||
|
||||
// Set the number of possible joypad layouts that the user can switch between, and the number of actions
|
||||
InputManager.Initialise(1,5,MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
|
||||
@@ -1198,7 +1206,9 @@ int main(int argc, const char *argv[] )
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
#ifndef DISABLE_PSN
|
||||
SonyVoiceChat_Orbis::tick();
|
||||
#endif
|
||||
RenderManager.StartFrame();
|
||||
#if 0
|
||||
if(pMinecraft->soundEngine->isStreamingWavebankReady() &&
|
||||
|
||||
@@ -180,7 +180,7 @@ bool PlayerUID::isPrimaryUser() const /* only true if we're on the local machine
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
GameSessionUID::GameSessionUID()
|
||||
{
|
||||
memset(this,0,sizeof(GameSessionUID));
|
||||
@@ -214,4 +214,4 @@ GameSessionUID& GameSessionUID::operator=(const PlayerUID& rhs)
|
||||
m_bSignedIntoPSN = rhs.isSignedIntoPSN();
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,7 @@ class PlayerUID
|
||||
SceUserServiceUserId m_userID;
|
||||
|
||||
public:
|
||||
ULONGLONG XUID;
|
||||
|
||||
class Hash
|
||||
{
|
||||
@@ -30,6 +31,8 @@ public:
|
||||
PlayerUID();
|
||||
PlayerUID(SceUserServiceUserId 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);
|
||||
@@ -64,7 +67,7 @@ namespace std
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
class GameSessionUID
|
||||
{
|
||||
char m_onlineID[SCE_NP_ONLINEID_MAX_LENGTH];
|
||||
@@ -83,3 +86,4 @@ public:
|
||||
int getQuadrant() const { return m_quadrant; }
|
||||
bool isSignedIntoPSN() const { return m_bSignedIntoPSN; }
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user