forked from cafeberry/cafeberry
add ps4 support
This commit is contained in:
@@ -30,7 +30,7 @@ public:
|
||||
virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix) = 0;
|
||||
virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex) = 0;
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID) = 0;
|
||||
virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID) = 0;
|
||||
virtual vector<FileEntry *> *getValidPlayerDatFiles() = 0;
|
||||
|
||||
@@ -78,7 +78,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS
|
||||
}
|
||||
|
||||
// MGH added - find any player data files and copy them across
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
vector<FileEntry *>* playerFiles = sourceSave->getValidPlayerDatFiles();
|
||||
#else
|
||||
vector<FileEntry *> *playerFiles = sourceSave->getFilesWithPrefix( DirectoryLevelStorage::getPlayerDir() );
|
||||
|
||||
@@ -920,7 +920,7 @@ vector<FileEntry *> *ConsoleSaveFileOriginal::getRegionFilesByDimension(unsigned
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
wstring ConsoleSaveFileOriginal::getPlayerDataFilenameForLoad(const PlayerUID& pUID)
|
||||
{
|
||||
return header.getPlayerDataFilenameForLoad( pUID );
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
virtual vector<FileEntry *> *getFilesWithPrefix(const wstring &prefix);
|
||||
virtual vector<FileEntry *> *getRegionFilesByDimension(unsigned int dimensionIndex);
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
virtual wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID);
|
||||
virtual wstring getPlayerDataFilenameForSave(const PlayerUID& pUID);
|
||||
virtual vector<FileEntry *> *getValidPlayerDatFiles();
|
||||
|
||||
@@ -519,7 +519,7 @@ int DataInputStream::readUTFChar()
|
||||
PlayerUID DataInputStream::readPlayerUID()
|
||||
{
|
||||
PlayerUID returnValue;
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
for(int idPos=0;idPos<sizeof(PlayerUID); idPos++)
|
||||
((char*)&returnValue)[idPos] = readByte();
|
||||
#elif defined(_DURANGO)
|
||||
|
||||
@@ -265,12 +265,12 @@ void DataOutputStream::writeUTF(const wstring& str)
|
||||
// 4J Added
|
||||
void DataOutputStream::writePlayerUID(PlayerUID player)
|
||||
{
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__))
|
||||
for(int idPos=0;idPos<sizeof(PlayerUID); idPos++)
|
||||
writeByte(((char*)&player)[idPos]);
|
||||
#elif defined(_DURANGO)
|
||||
writeUTF(player.toString());
|
||||
#elif defined(DISABLE_PSN) && defined(__PS3__)
|
||||
#elif defined(DISABLE_PSN)
|
||||
writeLong(player.XUID);
|
||||
#else
|
||||
writeLong(player);
|
||||
|
||||
@@ -393,7 +393,7 @@ void DirectoryLevelStorage::save(shared_ptr<Player> player)
|
||||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
player->saveWithoutId(tag);
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForSave(playerXuid).c_str() );
|
||||
#elif defined(_DURANGO)
|
||||
ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + player->getXuid().toString() + L".dat" );
|
||||
@@ -442,7 +442,7 @@ CompoundTag *DirectoryLevelStorage::load(shared_ptr<Player> player)
|
||||
CompoundTag *DirectoryLevelStorage::loadPlayerDataTag(PlayerUID xuid)
|
||||
{
|
||||
// 4J Jev, removed try/catch.
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForLoad(xuid).c_str() );
|
||||
#elif defined(_DURANGO)
|
||||
ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + xuid.toString() + L".dat" );
|
||||
@@ -472,7 +472,7 @@ void DirectoryLevelStorage::clearOldPlayerFiles()
|
||||
{
|
||||
if(StorageManager.GetSaveDisabled() ) return;
|
||||
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles();
|
||||
#else
|
||||
vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() );
|
||||
@@ -561,7 +561,7 @@ void DirectoryLevelStorage::resetNetherPlayerPositions()
|
||||
{
|
||||
if(app.GetResetNether())
|
||||
{
|
||||
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
|
||||
vector<FileEntry *> *playerFiles = m_saveFile->getValidPlayerDatFiles();
|
||||
#else
|
||||
vector<FileEntry *> *playerFiles = m_saveFile->getFilesWithPrefix( playerDir.getName() );
|
||||
|
||||
@@ -1446,7 +1446,7 @@
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<CppExceptions>true</CppExceptions>
|
||||
<OptimizationLevel>Level2</OptimizationLevel>
|
||||
<PreprocessorDefinitions>SPLIT_SAVES;_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;_DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>SPLIT_SAVES;_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#define MULTITHREAD_ENABLE
|
||||
|
||||
#ifdef __PS3__
|
||||
#if defined(__PS3__) || defined(__ORBIS__)
|
||||
#define DISABLE_PSN
|
||||
#endif
|
||||
|
||||
@@ -35,10 +35,16 @@ const int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
#include <np/np_npid.h>
|
||||
#include <user_service.h>
|
||||
#include "..\..\Minecraft.Client\Orbis\Orbis_PlayerUID.h"
|
||||
|
||||
#ifndef DISABLE_PSN
|
||||
#include "..\..\Minecraft.Client\Orbis\Network\SQRNetworkManager_Orbis.h"
|
||||
typedef SQRNetworkManager_Orbis::SessionID SessionID;
|
||||
typedef SQRNetworkManager_Orbis::PresenceSyncInfo INVITE_INFO;
|
||||
|
||||
#else
|
||||
typedef ULONGLONG GameSessionUID;
|
||||
typedef ULONGLONG SessionID;
|
||||
class INVITE_INFO;
|
||||
#endif // DISABLE_PSN
|
||||
#elif defined __PS3__ // defined in the profile lib
|
||||
#include <np.h>
|
||||
#include <sysutil/sysutil_userinfo.h>
|
||||
|
||||
Reference in New Issue
Block a user