refactor: unglob std::wstring
This commit is contained in:
@@ -474,7 +474,7 @@ public:
|
||||
eTitleStorageState TMSPP_ReadFile(int iQuadrant,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPWSTR wszFilename,int( *Func)(LPVOID,int,int,LPVOID, WCHAR *),LPVOID lpParam, int iUserData);
|
||||
eTitleStorageState TMSPP_DeleteFile(int iQuadrant,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPWSTR wszFilename,int( *Func)(LPVOID,int,int),LPVOID lpParam, int iUserData);
|
||||
eTitleStorageState TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,int( *Func)(LPVOID,int,int,LPVOID,WCHAR *)=NULL,LPVOID lpParam=NULL, int iUserData=0);
|
||||
bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const wstring &Filename);
|
||||
bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const std::wstring &Filename);
|
||||
|
||||
eTitleStorageState TMSPP_GetTitleStorageState(int iPad);
|
||||
void TMSPP_ClearTitleStorageState(int iPad);
|
||||
|
||||
@@ -169,7 +169,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
|
||||
|
||||
int CConsoleMinecraftApp::LoadLocalDLCImages()
|
||||
{
|
||||
std::unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
|
||||
std::unordered_map<std::wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
|
||||
// 4J-PB - Any local graphic files for the Minecraft Store?
|
||||
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
|
||||
{
|
||||
@@ -183,7 +183,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImages()
|
||||
void CConsoleMinecraftApp::FreeLocalDLCImages()
|
||||
{
|
||||
// 4J-PB - Any local graphic files for the Minecraft Store?
|
||||
std::unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
|
||||
std::unordered_map<std::wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
|
||||
|
||||
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
|
||||
{
|
||||
@@ -263,7 +263,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition();
|
||||
wstring wWorldName = L"TestWorld";
|
||||
std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
@@ -408,7 +408,7 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation<MXSL::
|
||||
// Build stat names
|
||||
m_statNames = ref new PC::Vector<P::String^>();
|
||||
m_statNames->Clear();
|
||||
for(wstring name : m_leaderboardStatNames[difficulty][type])
|
||||
for(std::wstring name : m_leaderboardStatNames[difficulty][type])
|
||||
{
|
||||
m_statNames->Append(ref new P::String(name.c_str()));
|
||||
}
|
||||
@@ -548,7 +548,7 @@ void DurangoLeaderboardManager::updateStatsInfo(int userIndex, int difficulty, E
|
||||
}
|
||||
|
||||
int statIndex = 0, sumScores = 0;
|
||||
for(wstring statName : m_leaderboardStatNames[difficulty][type])
|
||||
for(std::wstring statName : m_leaderboardStatNames[difficulty][type])
|
||||
{
|
||||
bool found = false;
|
||||
for(auto result : statsResult)
|
||||
@@ -585,7 +585,7 @@ void DurangoLeaderboardManager::GetProfilesCallback(LPVOID param, std::vector<Mi
|
||||
|
||||
if (profiles.size() > 0)
|
||||
{
|
||||
dlm->m_displayNames = vector<wstring>();
|
||||
dlm->m_displayNames = vector<std::wstring>();
|
||||
for (int i = 0; i < profiles.size(); i++)
|
||||
{
|
||||
dlm->m_displayNames.push_back(profiles[i]->GameDisplayName->Data());
|
||||
@@ -699,7 +699,7 @@ void DurangoLeaderboardManager::setState(EStatsState newState)
|
||||
LeaveCriticalSection(&m_csStatsState);
|
||||
}
|
||||
|
||||
wstring DurangoLeaderboardManager::stateToString(EStatsState eState)
|
||||
std::wstring DurangoLeaderboardManager::stateToString(EStatsState eState)
|
||||
{
|
||||
switch (eState)
|
||||
{
|
||||
|
||||
@@ -35,12 +35,12 @@ private:
|
||||
unsigned int m_maxRank;
|
||||
|
||||
MXS::XboxLiveContext^ m_xboxLiveContext;
|
||||
wstring m_leaderboardNames[4][eStatsType_MAX];
|
||||
wstring m_socialLeaderboardNames[4][eStatsType_MAX];
|
||||
std::vector<wstring> m_leaderboardStatNames[4][eStatsType_MAX];
|
||||
std::wstring m_leaderboardNames[4][eStatsType_MAX];
|
||||
std::wstring m_socialLeaderboardNames[4][eStatsType_MAX];
|
||||
std::vector<std::wstring> m_leaderboardStatNames[4][eStatsType_MAX];
|
||||
|
||||
// Display names for the current scores
|
||||
std::vector<wstring> m_displayNames;
|
||||
std::vector<std::wstring> m_displayNames;
|
||||
bool m_waitingForProfiles;
|
||||
|
||||
int m_difficulty;
|
||||
@@ -90,5 +90,5 @@ private:
|
||||
|
||||
EStatsState getState();
|
||||
void setState(EStatsState newState);
|
||||
wstring stateToString(EStatsState eState);
|
||||
std::wstring stateToString(EStatsState eState);
|
||||
};
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
namespace WFC = Windows::Foundation::Collections;
|
||||
namespace CC = concurrency;
|
||||
|
||||
StatParam::StatParam(const wstring &base)
|
||||
StatParam::StatParam(const std::wstring &base)
|
||||
{
|
||||
m_base = base;
|
||||
//m_numArgs = numArgs;
|
||||
m_args = vector<int>();
|
||||
|
||||
unsigned int count=0;
|
||||
wstring::size_type pos =base.find(L"*");
|
||||
std::wstring::size_type pos =base.find(L"*");
|
||||
while(pos!=string::npos)
|
||||
{
|
||||
count++;
|
||||
@@ -46,14 +46,14 @@ void StatParam::addArgs(int v1, ...)
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
vector<wstring> *StatParam::getStats()
|
||||
vector<std::wstring> *StatParam::getStats()
|
||||
{
|
||||
vector<wstring> *out = new vector<wstring>();
|
||||
vector<std::wstring> *out = new vector<std::wstring>();
|
||||
|
||||
static const int MAXSIZE = 256;
|
||||
static const wstring SUBSTR = L"*";
|
||||
static const std::wstring SUBSTR = L"*";
|
||||
|
||||
wstring wstr_itr, wstr_num;
|
||||
std::wstring wstr_itr, wstr_num;
|
||||
|
||||
if (m_args.size() <= 0 || m_numArgs <= 0)
|
||||
{
|
||||
@@ -69,10 +69,10 @@ vector<wstring> *StatParam::getStats()
|
||||
{
|
||||
for (int j=0; j<m_numArgs; j++)
|
||||
{
|
||||
wstr_num = to_wstring(m_args.at(i+j));
|
||||
wstr_num = to_std::wstring(m_args.at(i+j));
|
||||
size_t sz = wstr_itr.find(SUBSTR);
|
||||
|
||||
if (sz != wstring::npos)
|
||||
if (sz != std::wstring::npos)
|
||||
wstr_itr.replace(sz, SUBSTR.length(), wstr_num);
|
||||
}
|
||||
}
|
||||
@@ -91,13 +91,13 @@ DurangoStatsDebugger::DurangoStatsDebugger()
|
||||
InitializeCriticalSection(&m_retrievedStatsLock);
|
||||
}
|
||||
|
||||
vector<wstring> *DurangoStatsDebugger::getStats()
|
||||
vector<std::wstring> *DurangoStatsDebugger::getStats()
|
||||
{
|
||||
vector<wstring> *out = new vector<wstring>();
|
||||
vector<std::wstring> *out = new vector<std::wstring>();
|
||||
|
||||
for (auto it = m_stats.begin(); it!=m_stats.end(); it++)
|
||||
{
|
||||
vector<wstring> *sublist = (*it)->getStats();
|
||||
vector<std::wstring> *sublist = (*it)->getStats();
|
||||
out->insert(out->end(), sublist->begin(), sublist->end());
|
||||
}
|
||||
|
||||
@@ -322,11 +322,11 @@ void DurangoStatsDebugger::PrintStats(int iPad)
|
||||
{
|
||||
if (instance == NULL) instance = Initialize();
|
||||
|
||||
vector<wstring> *tmp = instance->getStats();
|
||||
vector<std::wstring> *tmp = instance->getStats();
|
||||
instance->m_printQueue.insert(instance->m_printQueue.end(), tmp->begin(), tmp->end());
|
||||
|
||||
// app.DebugPrintf("[DEBUG] START\n");
|
||||
// for (wstring t : *tmp) app.DebugPrintf("[DEBUG] %s\n", wstringtofilename(t));
|
||||
// for (std::wstring t : *tmp) app.DebugPrintf("[DEBUG] %s\n", wstringtofilename(t));
|
||||
// app.DebugPrintf("[DEBUG] END\n");
|
||||
|
||||
instance->retrieveStats(iPad);
|
||||
@@ -407,7 +407,7 @@ void DurangoStatsDebugger::retrieveStats(int iPad)
|
||||
// Create Stat retrieval threads until there is no long any stats to start retrieving.
|
||||
while ( !instance->m_printQueue.empty() )
|
||||
{
|
||||
vector<wstring> *printing = new vector<wstring>();
|
||||
vector<std::wstring> *printing = new vector<std::wstring>();
|
||||
|
||||
if (m_printQueue.size() > R_SIZE)
|
||||
{
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace MXSL = Microsoft::Xbox::Services::Leaderboard;
|
||||
class StatParam
|
||||
{
|
||||
private:
|
||||
wstring m_base;
|
||||
std::wstring m_base;
|
||||
int m_numArgs;
|
||||
|
||||
vector<int> m_args;
|
||||
|
||||
public:
|
||||
StatParam(const wstring &base);
|
||||
StatParam(const std::wstring &base);
|
||||
|
||||
void addArgs(int v1, ...);
|
||||
|
||||
vector<wstring> *getStats();
|
||||
vector<std::wstring> *getStats();
|
||||
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
|
||||
vector<StatParam *> m_stats;
|
||||
|
||||
vector<wstring> *getStats();
|
||||
vector<std::wstring> *getStats();
|
||||
|
||||
public:
|
||||
static DurangoStatsDebugger *Initialize();
|
||||
@@ -75,15 +75,15 @@ public:
|
||||
static void PrintStats(int iPad);
|
||||
|
||||
private:
|
||||
vector<wstring> m_printQueue;
|
||||
vector<std::wstring> m_printQueue;
|
||||
|
||||
void retrieveStats(int iPad);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int m_iPad;
|
||||
wstring m_statName;
|
||||
wstring m_score;
|
||||
std::wstring m_statName;
|
||||
std::wstring m_score;
|
||||
} StatResult;
|
||||
|
||||
CRITICAL_SECTION m_retrievedStatsLock;
|
||||
|
||||
@@ -22,14 +22,14 @@ DQRNetworkManager::ePartyProcessType DQRNetworkManager::m_partyProcess = DQRNetw
|
||||
|
||||
bool DQRNetworkManager::m_inviteReceived = false;
|
||||
int DQRNetworkManager::m_bootUserIndex;
|
||||
wstring DQRNetworkManager::m_bootSessionName;
|
||||
wstring DQRNetworkManager::m_bootServiceConfig;
|
||||
wstring DQRNetworkManager::m_bootSessionTemplate;
|
||||
std::wstring DQRNetworkManager::m_bootSessionName;
|
||||
std::wstring DQRNetworkManager::m_bootServiceConfig;
|
||||
std::wstring DQRNetworkManager::m_bootSessionTemplate;
|
||||
DQRNetworkManager * DQRNetworkManager::s_pDQRManager = NULL;
|
||||
|
||||
//using namespace Windows::Xbox::Networking;
|
||||
|
||||
DQRNetworkManager::SessionInfo::SessionInfo(wstring& sessionName, wstring& serviceConfig, wstring& sessionTemplate)
|
||||
DQRNetworkManager::SessionInfo::SessionInfo(std::wstring& sessionName, std::wstring& serviceConfig, std::wstring& sessionTemplate)
|
||||
{
|
||||
m_detailsValid = true;
|
||||
m_sessionName = sessionName;
|
||||
@@ -782,7 +782,7 @@ DQRNetworkPlayer *DQRNetworkManager::GetPlayerByXuid(PlayerUID xuid)
|
||||
}
|
||||
|
||||
// Retrieve player display name by gamertag
|
||||
wstring DQRNetworkManager::GetDisplayNameByGamertag(wstring gamertag)
|
||||
std::wstring DQRNetworkManager::GetDisplayNameByGamertag(std::wstring gamertag)
|
||||
{
|
||||
if (m_displayNames.find(gamertag) != m_displayNames.end())
|
||||
{
|
||||
@@ -2184,7 +2184,7 @@ int DQRNetworkManager::HostGameThreadProc()
|
||||
if( m_currentUserMask & ( 1 << i ) && ProfileManager.IsSignedIn(i))
|
||||
{
|
||||
auto user = ProfileManager.GetUser(i);
|
||||
wstring displayName = ProfileManager.GetDisplayName(i);
|
||||
std::wstring displayName = ProfileManager.GetDisplayName(i);
|
||||
|
||||
DQRNetworkPlayer* pPlayer = new DQRNetworkPlayer(this, ( ( smallId == m_hostSmallId ) ? DQRNetworkPlayer::DNP_TYPE_HOST : DQRNetworkPlayer::DNP_TYPE_LOCAL ), true, i, localSessionAddress);
|
||||
pPlayer->SetSmallId(smallId);
|
||||
@@ -3031,7 +3031,7 @@ void DQRNetworkManager::GetProfileCallback(LPVOID pParam, Microsoft::Xbox::Servi
|
||||
}
|
||||
|
||||
// Set player display name
|
||||
void DQRNetworkManager::SetDisplayName(PlayerUID xuid, wstring displayName)
|
||||
void DQRNetworkManager::SetDisplayName(PlayerUID xuid, std::wstring displayName)
|
||||
{
|
||||
EnterCriticalSection(&m_csRoomSyncData);
|
||||
for (int i = 0; i < m_roomSyncData.playerCount; i++)
|
||||
|
||||
@@ -119,12 +119,12 @@ public:
|
||||
class SessionInfo
|
||||
{
|
||||
public:
|
||||
SessionInfo(wstring& sessionName, wstring& serviceConfig, wstring& sessionTemplate);
|
||||
SessionInfo(std::wstring& sessionName, std::wstring& serviceConfig, std::wstring& sessionTemplate);
|
||||
SessionInfo();
|
||||
bool m_detailsValid;
|
||||
wstring m_sessionName;
|
||||
wstring m_serviceConfig;
|
||||
wstring m_sessionTemplate;
|
||||
std::wstring m_sessionName;
|
||||
std::wstring m_serviceConfig;
|
||||
std::wstring m_sessionTemplate;
|
||||
};
|
||||
|
||||
static const int MAX_LOCAL_PLAYER_COUNT = 4;
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
{
|
||||
public:;
|
||||
DQRNetworkPlayer* m_pPlayer;
|
||||
wstring m_name;
|
||||
std::wstring m_name;
|
||||
unsigned int m_sessionAddress;
|
||||
int m_channel;
|
||||
bool m_sync;
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
DQRNetworkPlayer *GetPlayerByIndex(int idx);
|
||||
DQRNetworkPlayer *GetPlayerBySmallId(int idx);
|
||||
DQRNetworkPlayer *GetPlayerByXuid(PlayerUID xuid);
|
||||
wstring GetDisplayNameByGamertag(wstring gamertag);
|
||||
std::wstring GetDisplayNameByGamertag(std::wstring gamertag);
|
||||
DQRNetworkPlayer *GetLocalPlayerByUserIndex(int idx);
|
||||
DQRNetworkPlayer *GetHostPlayer();
|
||||
int GetSessionIndex(DQRNetworkPlayer *player);
|
||||
@@ -223,16 +223,16 @@ public:
|
||||
public:
|
||||
SessionSearchResult() { m_extData = NULL; }
|
||||
~SessionSearchResult() { free(m_extData); }
|
||||
wstring m_partyId;
|
||||
wstring m_sessionName;
|
||||
std::wstring m_partyId;
|
||||
std::wstring m_sessionName;
|
||||
|
||||
// These names/xuids reflect the server controlled list of who is actually in the game
|
||||
wstring m_playerNames[MAX_ONLINE_PLAYER_COUNT];
|
||||
std::wstring m_playerNames[MAX_ONLINE_PLAYER_COUNT];
|
||||
PlayerUID m_playerXuids[MAX_ONLINE_PLAYER_COUNT];
|
||||
int m_playerCount;
|
||||
|
||||
// This count & set of xuids reflects the session document list of who is in the game
|
||||
wstring m_sessionXuids[MAX_ONLINE_PLAYER_COUNT];
|
||||
std::wstring m_sessionXuids[MAX_ONLINE_PLAYER_COUNT];
|
||||
int m_usedSlotCount;
|
||||
|
||||
void *m_extData;
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
bool JoinPartyFromSearchResult(SessionSearchResult *searchResult, int playerMask);
|
||||
void CancelJoinPartyFromSearchResult();
|
||||
void RequestDisplayName(DQRNetworkPlayer *player);
|
||||
void SetDisplayName(PlayerUID xuid, wstring displayName);
|
||||
void SetDisplayName(PlayerUID xuid, std::wstring displayName);
|
||||
|
||||
private:
|
||||
__int64 m_playersLeftPartyTime;
|
||||
@@ -509,7 +509,7 @@ private:
|
||||
int m_sessionResultCount;
|
||||
bool m_cancelJoinFromSearchResult;
|
||||
|
||||
map<wstring, wstring> m_displayNames; // Player display names by gamertag
|
||||
map<std::wstring, std::wstring> m_displayNames; // Player display names by gamertag
|
||||
|
||||
|
||||
|
||||
@@ -521,9 +521,9 @@ private:
|
||||
} ePartyProcessType;
|
||||
static int m_bootUserIndex;
|
||||
static ePartyProcessType m_partyProcess;
|
||||
static wstring m_bootSessionName;
|
||||
static wstring m_bootServiceConfig;
|
||||
static wstring m_bootSessionTemplate;
|
||||
static std::wstring m_bootSessionName;
|
||||
static std::wstring m_bootServiceConfig;
|
||||
static std::wstring m_bootSessionTemplate;
|
||||
static bool m_inviteReceived;
|
||||
|
||||
static DQRNetworkManager *s_pDQRManager;
|
||||
|
||||
@@ -421,7 +421,7 @@ int DQRNetworkManager::GetFriendsThreadProc()
|
||||
}
|
||||
for( int j = 0; j < m_sessionSearchResults[i].m_usedSlotCount; j++ )
|
||||
{
|
||||
m_sessionSearchResults[i].m_sessionXuids[j] = wstring( newSessionVector[i]->Members->GetAt(j)->XboxUserId->Data() );
|
||||
m_sessionSearchResults[i].m_sessionXuids[j] = std::wstring( newSessionVector[i]->Members->GetAt(j)->XboxUserId->Data() );
|
||||
}
|
||||
|
||||
m_sessionSearchResults[i].m_extData = malloc( sizeof(GameSessionData) );
|
||||
|
||||
@@ -192,13 +192,13 @@ void DQRNetworkPlayer::SetName(const wchar_t *name)
|
||||
}
|
||||
|
||||
// Return display name (if display name is not set, return name instead)
|
||||
wstring DQRNetworkPlayer::GetDisplayName()
|
||||
std::wstring DQRNetworkPlayer::GetDisplayName()
|
||||
{
|
||||
return (m_displayName == L"") ? m_name : m_displayName;
|
||||
}
|
||||
|
||||
// Set display name
|
||||
void DQRNetworkPlayer::SetDisplayName(wstring displayName)
|
||||
void DQRNetworkPlayer::SetDisplayName(std::wstring displayName)
|
||||
{
|
||||
m_displayName = displayName;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ const wchar_t *NetworkPlayerDurango::GetOnlineName()
|
||||
return m_dqrPlayer->GetName();
|
||||
}
|
||||
|
||||
wstring NetworkPlayerDurango::GetDisplayName()
|
||||
std::wstring NetworkPlayerDurango::GetDisplayName()
|
||||
{
|
||||
return m_dqrPlayer->GetDisplayName();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
virtual void SetSocket(Socket *pSocket);
|
||||
virtual Socket *GetSocket();
|
||||
virtual const wchar_t *GetOnlineName();
|
||||
virtual wstring GetDisplayName();
|
||||
virtual std::wstring GetDisplayName();
|
||||
virtual PlayerUID GetUID();
|
||||
|
||||
void SetUID(PlayerUID UID);
|
||||
|
||||
@@ -744,12 +744,12 @@ bool CPlatformNetworkManagerDurango::SystemFlagGet(INetworkPlayer *pNetworkPlaye
|
||||
return false;
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerDurango::GatherStats()
|
||||
std::wstring CPlatformNetworkManagerDurango::GatherStats()
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerDurango::GatherRTTStats()
|
||||
std::wstring CPlatformNetworkManagerDurango::GatherRTTStats()
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
@@ -883,7 +883,7 @@ INetworkPlayer * CPlatformNetworkManagerDurango::GetPlayerBySmallId(unsigned cha
|
||||
return getNetworkPlayer(m_pDQRNet->GetPlayerBySmallId(smallId));
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerDurango::GetDisplayNameByGamertag(wstring gamertag)
|
||||
std::wstring CPlatformNetworkManagerDurango::GetDisplayNameByGamertag(std::wstring gamertag)
|
||||
{
|
||||
return m_pDQRNet->GetDisplayNameByGamertag(gamertag);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
virtual INetworkPlayer *GetPlayerByIndex(int playerIndex);
|
||||
virtual INetworkPlayer * GetPlayerByXuid(PlayerUID xuid);
|
||||
virtual INetworkPlayer * GetPlayerBySmallId(unsigned char smallId);
|
||||
virtual wstring GetDisplayNameByGamertag(wstring gamertag);
|
||||
virtual std::wstring GetDisplayNameByGamertag(std::wstring gamertag);
|
||||
virtual bool ShouldMessageForFullSession();
|
||||
|
||||
virtual INetworkPlayer *GetHostPlayer();
|
||||
@@ -120,8 +120,8 @@ private:
|
||||
float m_lastPlayerEventTimeStart;
|
||||
|
||||
public:
|
||||
wstring GatherStats();
|
||||
wstring GatherRTTStats();
|
||||
std::wstring GatherStats();
|
||||
std::wstring GatherRTTStats();
|
||||
|
||||
private:
|
||||
vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT];
|
||||
|
||||
@@ -971,9 +971,9 @@ DurangoStats *CDurangoTelemetryManager::durangoStats()
|
||||
return (DurangoStats*) GenericStats::getInstance();
|
||||
}
|
||||
|
||||
wstring CDurangoTelemetryManager::guid2str(LPCGUID guid)
|
||||
std::wstring CDurangoTelemetryManager::guid2str(LPCGUID guid)
|
||||
{
|
||||
wstring out = L"GUID<";
|
||||
std::wstring out = L"GUID<";
|
||||
out += _toString<unsigned long>(guid->Data1);
|
||||
out += L":";
|
||||
out += _toString<unsigned short>(guid->Data2);
|
||||
|
||||
@@ -9,7 +9,7 @@ class CDurangoTelemetryManager : public CTelemetryManager
|
||||
public:
|
||||
static GUID ZERO_GUID;
|
||||
|
||||
std::unordered_map<wstring, float> m_multiplayerRoundStartTimes;
|
||||
std::unordered_map<std::wstring, float> m_multiplayerRoundStartTimes;
|
||||
|
||||
CDurangoTelemetryManager();
|
||||
|
||||
@@ -46,5 +46,5 @@ public:
|
||||
protected:
|
||||
DurangoStats *durangoStats();
|
||||
|
||||
wstring guid2str(LPCGUID guid);
|
||||
std::wstring guid2str(LPCGUID guid);
|
||||
};
|
||||
@@ -71,7 +71,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition();
|
||||
wstring wWorldName = L"TestWorld";
|
||||
std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
@@ -568,7 +568,7 @@ int StartMinecraftThreadProc( void* lpParameter )
|
||||
AABB::UseDefaultThreadStorage();
|
||||
Tesselator::CreateNewThreadStorage(1024*1024);
|
||||
RenderManager.InitialiseContext();
|
||||
Minecraft::start(wstring(),wstring());
|
||||
Minecraft::start(std::wstring(),std::wstring());
|
||||
delete Tesselator::getInstance();
|
||||
return 0;
|
||||
}
|
||||
@@ -991,7 +991,7 @@ Vec3::resetPool();
|
||||
|
||||
vector<uint8_t *> vRichPresenceStrings;
|
||||
|
||||
// convert wstring to UTF-8 string
|
||||
// convert std::wstring to UTF-8 string
|
||||
std::string wstring_to_utf8 (const std::wstring& str)
|
||||
{
|
||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
int GetPrimaryPad();
|
||||
void SetPrimaryPad(int iPad);
|
||||
char* GetGamertag(int iPad);
|
||||
wstring GetDisplayName(int iPad);
|
||||
std::wstring GetDisplayName(int iPad);
|
||||
bool IsFullVersion();
|
||||
void SetFullVersion(bool bFull);
|
||||
void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam);
|
||||
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
void SetDLCProductCode(const char* szProductCode);
|
||||
void SetProductUpgradeKey(const char* szKey);
|
||||
bool CheckForTrialUpgradeKey(void( *Func)(LPVOID, bool),LPVOID lpParam);
|
||||
void SetDLCInfoMap(std::unordered_map<wstring, SONYDLC *>* pSONYDLCMap);
|
||||
void SetDLCInfoMap(std::unordered_map<std::wstring, SONYDLC *>* pSONYDLCMap);
|
||||
};
|
||||
|
||||
extern C4JStorage StorageManager;
|
||||
|
||||
@@ -1005,8 +1005,8 @@ void OrbisLeaderboardManager::initReadScoreStruct(ReadScore &out, SceNpScoreRank
|
||||
out.m_uid.setOnlineID( rankData.npId.handle, true );
|
||||
out.m_rank = rankData.rank;
|
||||
|
||||
// Convert to wstring and copy name.
|
||||
wstring wstrName = convStringToWstring( string(rankData.npId.handle.data) ).c_str();
|
||||
// Convert to std::wstring and copy name.
|
||||
std::wstring wstrName = convStringToWstring( string(rankData.npId.handle.data) ).c_str();
|
||||
//memcpy(&out.m_name, wstrName.c_str(), XUSER_NAME_SIZE);
|
||||
out.m_name=wstrName;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ bool CConsoleMinecraftApp::IsAmericanSKU()
|
||||
|
||||
SONYDLC *CConsoleMinecraftApp::GetSONYDLCInfo(char *pchTitle)
|
||||
{
|
||||
wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
|
||||
AUTO_VAR(it, m_SONYDLCMap.find(wstrTemp));
|
||||
if(it == m_SONYDLCMap.end())
|
||||
@@ -191,7 +191,7 @@ BOOL CConsoleMinecraftApp::ReadProductCodes()
|
||||
|
||||
// push this into a vector
|
||||
|
||||
wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
m_SONYDLCMap[wstrTemp]=pDLCInfo;
|
||||
}
|
||||
CloseHandle(file);
|
||||
@@ -288,7 +288,7 @@ int CConsoleMinecraftApp::GetLocalTMSFileIndex(WCHAR *wchTMSFile,bool bFilenameI
|
||||
int CConsoleMinecraftApp::LoadLocalDLCImages()
|
||||
{
|
||||
// 4J-PB - Any local graphic files for the Minecraft Store?
|
||||
std::unordered_map<wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
|
||||
std::unordered_map<std::wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
|
||||
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
|
||||
{
|
||||
SONYDLC * pDLCInfo=(*it).second;
|
||||
@@ -301,7 +301,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImages()
|
||||
void CConsoleMinecraftApp::FreeLocalDLCImages()
|
||||
{
|
||||
// 4J-PB - Any local graphic files for the Minecraft Store?
|
||||
std::unordered_map<wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
|
||||
std::unordered_map<std::wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
|
||||
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
|
||||
{
|
||||
SONYDLC * pDLCInfo=(*it).second;
|
||||
@@ -394,7 +394,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition();
|
||||
wstring wWorldName = L"TestWorld";
|
||||
std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
bool DLCAlreadyPurchased(char *pchTitle);
|
||||
char *GetSkuIDFromProductList();
|
||||
void GetDLCSkuIDFromProductList(char *,char *);
|
||||
std::unordered_map<wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
|
||||
std::unordered_map<std::wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
|
||||
static void CommerceInitCallback(LPVOID lpParam,int err);
|
||||
static void CommerceGetCategoriesCallback(LPVOID lpParam,int err);
|
||||
static void CommerceGetProductListCallback(LPVOID lpParam,int err);
|
||||
@@ -210,7 +210,7 @@ private:
|
||||
// SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed;
|
||||
|
||||
PRODUCTCODES ProductCodes;
|
||||
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
|
||||
std::unordered_map<std::wstring, SONYDLC *> m_SONYDLCMap;
|
||||
|
||||
|
||||
bool m_bVoiceChatAndUGCRestricted;
|
||||
|
||||
@@ -757,7 +757,7 @@ int StartMinecraftThreadProc( void* lpParameter )
|
||||
AABB::UseDefaultThreadStorage();
|
||||
Tesselator::CreateNewThreadStorage(1024*1024);
|
||||
RenderManager.InitialiseContext();
|
||||
Minecraft::start(wstring(),wstring());
|
||||
Minecraft::start(std::wstring(),std::wstring());
|
||||
delete Tesselator::getInstance();
|
||||
return 0;
|
||||
}
|
||||
@@ -1462,8 +1462,8 @@ int main(int argc, const char *argv[] )
|
||||
|
||||
vector<uint8_t *> vRichPresenceStrings;
|
||||
|
||||
// convert wstring to UTF-8 string
|
||||
std::string wstring_to_utf8 (const std::wstring& str)
|
||||
// convert std::wstring to UTF-8 string
|
||||
std::string std::wstring_to_utf8 (const std::wstring& str)
|
||||
{
|
||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
|
||||
return myconv.to_bytes(str);
|
||||
@@ -1475,7 +1475,7 @@ uint8_t *mallocAndCreateUTF8ArrayFromString(int iID)
|
||||
LPCWSTR wchString=app.GetString(iID);
|
||||
|
||||
std::wstring srcString = wchString;
|
||||
std::string dstString = wstring_to_utf8(srcString);
|
||||
std::string dstString = std::wstring_to_utf8(srcString);
|
||||
|
||||
int dst_len = dstString.size()+1;
|
||||
uint8_t *strUtf8=(uint8_t *)malloc(dst_len);
|
||||
|
||||
@@ -41,7 +41,7 @@ PlayerUID::PlayerUID(SceUserServiceUserId userID, SceNpOnlineId& onlineID, bool
|
||||
setOnlineID(onlineID, bSignedInPSN);
|
||||
}
|
||||
|
||||
PlayerUID::PlayerUID(wstring fromString)
|
||||
PlayerUID::PlayerUID(std::wstring fromString)
|
||||
{
|
||||
// create for the format P_5e7ff8372ea9_00000004_Mark_4J
|
||||
|
||||
@@ -53,14 +53,14 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
// parse the mac address next
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
std::wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
m_macAddress[i] = _fromHEXString<int>(macDigit);
|
||||
}
|
||||
|
||||
int userIdLen = 0;
|
||||
|
||||
// parse the userID
|
||||
wstring userIDDigits = L"";
|
||||
std::wstring userIDDigits = L"";
|
||||
|
||||
while(fromString.at(15 + userIdLen) != L'_')
|
||||
{
|
||||
@@ -71,7 +71,7 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
m_userID = _fromString<int>(userIDDigits);
|
||||
|
||||
// finally, the onlineID, if there is one
|
||||
wstring onlineID = fromString.substr(15 + userIdLen + 1);
|
||||
std::wstring onlineID = fromString.substr(15 + userIdLen + 1);
|
||||
if(onlineID.size() > 0)
|
||||
{
|
||||
wcstombs(m_onlineID, onlineID.c_str(), 16);
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
int GetPrimaryPad();
|
||||
void SetPrimaryPad(int iPad);
|
||||
char* GetGamertag(int iPad);
|
||||
wstring GetDisplayName(int iPad);
|
||||
std::wstring GetDisplayName(int iPad);
|
||||
bool IsFullVersion();
|
||||
void SetFullVersion(bool bFull);
|
||||
void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam);
|
||||
|
||||
@@ -990,8 +990,8 @@ void PS3LeaderboardManager::initReadScoreStruct(ReadScore &out, SceNpScoreRankDa
|
||||
out.m_uid.setOnlineID( rankData.npId.handle, true );
|
||||
out.m_rank = rankData.rank;
|
||||
|
||||
// Convert to wstring and copy name.
|
||||
wstring wstrName = convStringToWstring( string(rankData.onlineName.data) ).c_str();
|
||||
// Convert to std::wstring and copy name.
|
||||
std::wstring wstrName = convStringToWstring( string(rankData.onlineName.data) ).c_str();
|
||||
//memcpy(&out.m_name, wstrName.c_str(), XUSER_NAME_SIZE);
|
||||
out.m_name=wstrName;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ bool CConsoleMinecraftApp::IsAmericanSKU()
|
||||
|
||||
SONYDLC *CConsoleMinecraftApp::GetSONYDLCInfo(char *pchTitle)
|
||||
{
|
||||
wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
SONYDLC *pTemp=m_SONYDLCMap.at(wstrTemp);
|
||||
|
||||
return pTemp;
|
||||
@@ -174,7 +174,7 @@ BOOL CConsoleMinecraftApp::ReadProductCodes()
|
||||
|
||||
// push this into a vector
|
||||
|
||||
wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
m_SONYDLCMap[wstrTemp]=pDLCInfo;
|
||||
}
|
||||
CloseHandle(file);
|
||||
@@ -466,7 +466,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
|
||||
|
||||
}
|
||||
|
||||
LoadSaveDataThreadParam* LoadSaveFromDisk(const wstring& pathName)
|
||||
LoadSaveDataThreadParam* LoadSaveFromDisk(const std::wstring& pathName)
|
||||
{
|
||||
File saveFile(pathName);
|
||||
__int64 fileSize = saveFile.length();
|
||||
@@ -501,7 +501,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition(); wstring wWorldName = L"TestWorld";
|
||||
app.ClearTerrainFeaturePosition(); std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
@@ -519,7 +519,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
NetworkGameInitData *param = new NetworkGameInitData();
|
||||
param->seed = seedValue;
|
||||
#ifdef SAVE_GAME_TO_LOAD
|
||||
param->saveData = LoadSaveFromDisk(wstring(SAVE_GAME_TO_LOAD));
|
||||
param->saveData = LoadSaveFromDisk(std::wstring(SAVE_GAME_TO_LOAD));
|
||||
#else
|
||||
param->saveData = NULL;
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ private:
|
||||
// SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed;
|
||||
|
||||
PRODUCTCODES ProductCodes;
|
||||
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
|
||||
std::unordered_map<std::wstring, SONYDLC *> m_SONYDLCMap;
|
||||
|
||||
|
||||
bool m_bVoiceChatAndUGCRestricted;
|
||||
|
||||
@@ -951,7 +951,7 @@ int main()
|
||||
// 4J-PB - TRC that we need to be able to see the BD in a different titled save from the digital game
|
||||
if(StorageManager.GetBootTypeDisc())
|
||||
{
|
||||
wstring wsTemp = app.GetString(IDS_GAMENAME);
|
||||
std::wstring wsTemp = app.GetString(IDS_GAMENAME);
|
||||
WCHAR wchTemp[64];
|
||||
wsTemp.append(L" (");
|
||||
mbstowcs(wchTemp,app.GetDiscProductCode(),64);
|
||||
@@ -991,7 +991,7 @@ int main()
|
||||
delete [] baSaveImage.data;
|
||||
}
|
||||
|
||||
wstring wsName=L"Graphics\\SaveChest.png";
|
||||
std::wstring wsName=L"Graphics\\SaveChest.png";
|
||||
byteArray baSaveLoadIcon = app.getArchiveFile(wsName);
|
||||
if(baSaveLoadIcon.data!=NULL)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ PlayerUID::PlayerUID(CellSysutilUserId userID, SceNpOnlineId& onlineID, bool bSi
|
||||
setOnlineID(onlineID, bSignedInPSN);
|
||||
}
|
||||
|
||||
PlayerUID::PlayerUID(wstring fromString)
|
||||
PlayerUID::PlayerUID(std::wstring fromString)
|
||||
{
|
||||
// create for the format P_5e7ff8372ea9_00000004_Mark_4J
|
||||
|
||||
@@ -42,16 +42,16 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
// parse the mac address next
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
std::wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
m_macAddress[i] = _fromHEXString<int>(macDigit);
|
||||
}
|
||||
|
||||
// parse the userID
|
||||
wstring userIDDigits = fromString.substr(15,8);
|
||||
std::wstring userIDDigits = fromString.substr(15,8);
|
||||
m_userID = _fromString<int>(userIDDigits);
|
||||
|
||||
// finally, the onlineID, if there is one
|
||||
wstring onlineID = fromString.substr(24);
|
||||
std::wstring onlineID = fromString.substr(24);
|
||||
if(onlineID.size() > 0)
|
||||
{
|
||||
wcstombs(m_onlineID, onlineID.c_str(), 16);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
class HugeMushroomTile_SPU : public Tile_SPU
|
||||
{
|
||||
public:
|
||||
// static const wstring TEXTURE_STEM;
|
||||
// static const wstring TEXTURE_INSIDE;
|
||||
// static const std::wstring TEXTURE_STEM;
|
||||
// static const std::wstring TEXTURE_INSIDE;
|
||||
|
||||
private:
|
||||
static const int HUGE_MUSHROOM_TEXTURE_COUNT = 2;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
return getV0() + (diff * ((float) offset / 16)); //SharedConstants::WORLD_RESOLUTION));
|
||||
}
|
||||
|
||||
// virtual wstring getName() const = 0;
|
||||
// virtual std::wstring getName() const = 0;
|
||||
// virtual int getSourceWidth() const = 0;
|
||||
// virtual int getSourceHeight() const = 0;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// IDS_TILE_LEAVES_BIRCH,
|
||||
// };
|
||||
//
|
||||
// const wstring LeafTile::TEXTURES[2][4] = { {L"leaves", L"leaves_spruce", L"leaves", L"leaves_jungle"}, {L"leaves_opaque", L"leaves_spruce_opaque", L"leaves_opaque", L"leaves_jungle_opaque"},};
|
||||
// const std::wstring LeafTile::TEXTURES[2][4] = { {L"leaves", L"leaves_spruce", L"leaves", L"leaves_jungle"}, {L"leaves_opaque", L"leaves_spruce_opaque", L"leaves_opaque", L"leaves_jungle_opaque"},};
|
||||
|
||||
|
||||
// from TransparentTile, since we're no longer inheriting
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
#include "../Common/spu_assert.h"
|
||||
#endif
|
||||
|
||||
// const wstring LiquidTile::TEXTURE_LAVA_STILL = L"lava";
|
||||
// const wstring LiquidTile::TEXTURE_WATER_STILL = L"water";
|
||||
// const wstring LiquidTile::TEXTURE_WATER_FLOW = L"water_flow";
|
||||
// const wstring LiquidTile::TEXTURE_LAVA_FLOW = L"lava_flow";
|
||||
// const std::wstring LiquidTile::TEXTURE_LAVA_STILL = L"lava";
|
||||
// const std::wstring LiquidTile::TEXTURE_WATER_STILL = L"water";
|
||||
// const std::wstring LiquidTile::TEXTURE_WATER_FLOW = L"water_flow";
|
||||
// const std::wstring LiquidTile::TEXTURE_LAVA_FLOW = L"lava_flow";
|
||||
|
||||
#define MATH_PI (3.141592654f)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ const int TallGrass_SPU::DEAD_SHRUB = 0;
|
||||
const int TallGrass_SPU::TALL_GRASS = 1;
|
||||
const int TallGrass_SPU::FERN = 2;
|
||||
|
||||
// const wstring TallGrass::TEXTURE_NAMES[] = {L"deadbush", L"tallgrass", L"fern"};
|
||||
// const std::wstring TallGrass::TEXTURE_NAMES[] = {L"deadbush", L"tallgrass", L"fern"};
|
||||
|
||||
|
||||
Icon_SPU *TallGrass_SPU::getTexture(int face, int data)
|
||||
|
||||
@@ -575,7 +575,7 @@ void Tile_SPU::updateDefaultShape()
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// wstring Tile_SPU::getName()
|
||||
// std::wstring Tile_SPU::getName()
|
||||
// {
|
||||
// return I18n::get(getDescriptionId() + L".name");
|
||||
// }
|
||||
@@ -655,12 +655,12 @@ Material_SPU* Tile_SPU::getMaterial()
|
||||
// icon = iconRegister->registerIcon(m_textureName);
|
||||
// }
|
||||
//
|
||||
// wstring Tile_SPU::getTileItemIconName()
|
||||
// std::wstring Tile_SPU::getTileItemIconName()
|
||||
// {
|
||||
// return L"";
|
||||
// }
|
||||
//
|
||||
// Tile *Tile_SPU::setTextureName(const wstring &name)
|
||||
// Tile *Tile_SPU::setTextureName(const std::wstring &name)
|
||||
// {
|
||||
// m_textureName = name;
|
||||
// return this;
|
||||
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
// unsigned int descriptionId;
|
||||
// unsigned int useDescriptionId; // 4J Added
|
||||
//
|
||||
// wstring m_textureName;
|
||||
// std::wstring m_textureName;
|
||||
|
||||
protected:
|
||||
// Icon *icon;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
// public:
|
||||
// ZipFile(File *file) {}
|
||||
// InputStream *getInputStream(ZipEntry *entry) { return NULL; }
|
||||
// ZipEntry *getEntry(const wstring& name) {return NULL;}
|
||||
// ZipEntry *getEntry(const std::wstring& name) {return NULL;}
|
||||
// void close() {}
|
||||
// };
|
||||
//
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
// static void create() {}
|
||||
// static void destroy() {}
|
||||
// static bool isKeyDown(int) {return false;}
|
||||
// static wstring getKeyName(int) { return L"KEYNAME"; }
|
||||
// static std::wstring getKeyName(int) { return L"KEYNAME"; }
|
||||
// static void enableRepeatEvents(bool) {}
|
||||
// static const int KEY_A = 0;
|
||||
// static const int KEY_B = 1;
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
int GetPrimaryPad();
|
||||
void SetPrimaryPad(int iPad);
|
||||
char* GetGamertag(int iPad);
|
||||
wstring GetDisplayName(int iPad);
|
||||
std::wstring GetDisplayName(int iPad);
|
||||
|
||||
bool IsFullVersion();
|
||||
void SetFullVersion(bool bFull);
|
||||
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
void SetDLCProductCode(const char* szProductCode);
|
||||
void SetProductUpgradeKey(const char* szKey);
|
||||
bool CheckForTrialUpgradeKey(void( *Func)(LPVOID, bool),LPVOID lpParam);
|
||||
void SetDLCInfoMap(std::unordered_map<wstring, SONYDLC *>* pSONYDLCMap);
|
||||
void SetDLCInfoMap(std::unordered_map<std::wstring, SONYDLC *>* pSONYDLCMap);
|
||||
void EntitlementsCallback(bool bFoundEntitlements);
|
||||
|
||||
};
|
||||
|
||||
@@ -1012,8 +1012,8 @@ void PSVitaLeaderboardManager::initReadScoreStruct(ReadScore &out, SceNpScoreRan
|
||||
out.m_uid.setOnlineID( rankData.npId.handle, true );
|
||||
out.m_rank = rankData.rank;
|
||||
|
||||
// Convert to wstring and copy name.
|
||||
wstring wstrName = convStringToWstring( string(rankData.npId.handle.data) ).c_str();
|
||||
// Convert to std::wstring and copy name.
|
||||
std::wstring wstrName = convStringToWstring( string(rankData.npId.handle.data) ).c_str();
|
||||
//memcpy(&out.m_name, wstrName.c_str(), XUSER_NAME_SIZE);
|
||||
out.m_name=wstrName;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ bool CConsoleMinecraftApp::IsAmericanSKU()
|
||||
|
||||
SONYDLC *CConsoleMinecraftApp::GetSONYDLCInfo(char *pchTitle)
|
||||
{
|
||||
wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
|
||||
AUTO_VAR(it, m_SONYDLCMap.find(wstrTemp));
|
||||
if(it == m_SONYDLCMap.end())
|
||||
@@ -105,7 +105,7 @@ SONYDLC *CConsoleMinecraftApp::GetSONYDLCInfo(char *pchTitle)
|
||||
}
|
||||
return it->second;
|
||||
|
||||
/*wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
/*std::wstring wstrTemp=convStringToWstring(pchTitle);
|
||||
SONYDLC *pTemp=m_SONYDLCMap.at(wstrTemp);
|
||||
|
||||
return pTemp;*/
|
||||
@@ -172,7 +172,7 @@ BOOL CConsoleMinecraftApp::ReadProductCodes()
|
||||
|
||||
// push this into a vector
|
||||
|
||||
wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
std::wstring wstrTemp=convStringToWstring(chDLCTitle);
|
||||
m_SONYDLCMap[wstrTemp]=pDLCInfo;
|
||||
}
|
||||
CloseHandle(file);
|
||||
@@ -304,7 +304,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition();
|
||||
wstring wWorldName = L"TestWorld";
|
||||
std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
bool isFlat = false;
|
||||
__int64 seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
bool DLCAlreadyPurchased(char *pchTitle);
|
||||
char *GetSkuIDFromProductList();
|
||||
void GetDLCSkuIDFromProductList(char *,char *);
|
||||
std::unordered_map<wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
|
||||
std::unordered_map<std::wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
|
||||
static void CommerceInitCallback(LPVOID lpParam,int err);
|
||||
static void CommerceGetCategoriesCallback(LPVOID lpParam,int err);
|
||||
static void CommerceGetProductListCallback(LPVOID lpParam,int err);
|
||||
@@ -230,7 +230,7 @@ private:
|
||||
// SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed;
|
||||
|
||||
PRODUCTCODES ProductCodes;
|
||||
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
|
||||
std::unordered_map<std::wstring, SONYDLC *> m_SONYDLCMap;
|
||||
|
||||
|
||||
bool m_bVoiceChatAndUGCRestricted;
|
||||
|
||||
@@ -35,7 +35,7 @@ PlayerUID::PlayerUID(int userID, SceNpOnlineId& onlineID, bool bSignedInPSN, int
|
||||
setOnlineID(onlineID, bSignedInPSN);
|
||||
}
|
||||
|
||||
PlayerUID::PlayerUID(wstring fromString)
|
||||
PlayerUID::PlayerUID(std::wstring fromString)
|
||||
{
|
||||
// create for the format P_5e7ff8372ea9_00000004_Mark_4J
|
||||
|
||||
@@ -47,16 +47,16 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
// parse the mac address next
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
std::wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
m_macAddress[i] = _fromHEXString<int>(macDigit);
|
||||
}
|
||||
|
||||
// parse the userID
|
||||
wstring userIDDigits = fromString.substr(15,8);
|
||||
std::wstring userIDDigits = fromString.substr(15,8);
|
||||
m_userID = _fromString<int>(userIDDigits);
|
||||
|
||||
// finally, the onlineID, if there is one
|
||||
wstring onlineID = fromString.substr(24);
|
||||
std::wstring onlineID = fromString.substr(24);
|
||||
if(onlineID.size() > 0)
|
||||
{
|
||||
wcstombs(m_onlineID, onlineID.c_str(), 16);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
int GetPrimaryPad();
|
||||
void SetPrimaryPad(int iPad);
|
||||
char* GetGamertag(int iPad);
|
||||
wstring GetDisplayName(int iPad);
|
||||
std::wstring GetDisplayName(int iPad);
|
||||
bool IsFullVersion();
|
||||
void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam);
|
||||
void SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam);
|
||||
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
C4JStorage::ETMSStatus TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)=NULL,LPVOID lpParam=NULL, int iUserData=0);
|
||||
// C4JStorage::ETMSStatus TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,CHAR *pchFilePath,int( *Func)(LPVOID,int,int,PTMSPP_FILE_LIST)=NULL,LPVOID lpParam=NULL, int iUserData=0);
|
||||
// C4JStorage::ETMSStatus TMSPP_DeleteFile(int iPad,LPCSTR szFilePath,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,int( *Func)(LPVOID,int,int),LPVOID lpParam=NULL, int iUserData=0);
|
||||
// bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const wstring &Filename);
|
||||
// bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const std::wstring &Filename);
|
||||
// unsigned int CRC(unsigned char *buf, int len);
|
||||
|
||||
// enum eXBLWS
|
||||
|
||||
@@ -71,7 +71,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////// From CScene_MultiGameCreate::CreateGame
|
||||
|
||||
app.ClearTerrainFeaturePosition();
|
||||
wstring wWorldName = L"TestWorld";
|
||||
std::wstring wWorldName = L"TestWorld";
|
||||
|
||||
StorageManager.ResetSaveData();
|
||||
StorageManager.SetSaveTitle(wWorldName.c_str());
|
||||
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
C4JStorage::ETMSStatus TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)=NULL,LPVOID lpParam=NULL, int iUserData=0);
|
||||
C4JStorage::ETMSStatus TMSPP_ReadFileList(int iPad,C4JStorage::eGlobalStorage eStorageFacility,CHAR *pchFilePath,int( *Func)(LPVOID,int,int,PTMSPP_FILE_LIST)=NULL,LPVOID lpParam=NULL, int iUserData=0);
|
||||
C4JStorage::ETMSStatus TMSPP_DeleteFile(int iPad,LPCSTR szFilePath,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,int( *Func)(LPVOID,int,int),LPVOID lpParam=NULL, int iUserData=0);
|
||||
bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const wstring &Filename);
|
||||
bool TMSPP_InFileList(eGlobalStorage eStorageFacility, int iPad,const std::wstring &Filename);
|
||||
unsigned int CRC(unsigned char *buf, int len);
|
||||
|
||||
C4JStorage::ETMSStatus TMSPP_WriteFileWithProgress(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,C4JStorage::eTMS_UGCTYPE eUGCType,CHAR *pchFilePath,CHAR *pchBuffer,DWORD dwBufferSize,int( *Func)(LPVOID,int,int)=NULL,LPVOID lpParam=NULL, int iUserData=0,
|
||||
|
||||
@@ -438,7 +438,7 @@ void SoundEngine::XACTNotificationCallback( const XACT_NOTIFICATION* pNotificati
|
||||
}
|
||||
}
|
||||
|
||||
char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpaces)
|
||||
char *SoundEngine::ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces)
|
||||
{
|
||||
static char buf[256];
|
||||
assert(name.length()<256);
|
||||
@@ -468,7 +468,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
{
|
||||
return;
|
||||
}
|
||||
wstring name = wchSoundNames[iSound];
|
||||
std::wstring name = wchSoundNames[iSound];
|
||||
//const unsigned char *name=ucSoundNames[iSound];
|
||||
|
||||
char *xboxName = ConvertSoundPathToName(name);
|
||||
@@ -576,7 +576,7 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
{
|
||||
return;
|
||||
}
|
||||
wstring name = wchSoundNames[iSound];
|
||||
std::wstring name = wchSoundNames[iSound];
|
||||
|
||||
char *xboxName = (char *)ConvertSoundPathToName(name);
|
||||
|
||||
@@ -635,7 +635,7 @@ void SoundEngine::playUI(int iSound, float, float)
|
||||
cueInstance->Play();
|
||||
}
|
||||
|
||||
void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, float vol, float pitch, bool bMusicDelay)
|
||||
void SoundEngine::playStreaming(const std::wstring& name, float x, float y, float z, float vol, float pitch, bool bMusicDelay)
|
||||
{
|
||||
IXACT3SoundBank *pSoundBank=NULL;
|
||||
|
||||
@@ -1065,14 +1065,14 @@ void SoundEngine::tick(std::shared_ptr<Mob> *players, float a)
|
||||
m_pXACT3Engine->DoWork();
|
||||
}
|
||||
|
||||
void SoundEngine::add(const wstring& name, File *file)
|
||||
void SoundEngine::add(const std::wstring& name, File *file)
|
||||
{
|
||||
}
|
||||
|
||||
void SoundEngine::addMusic(const wstring& name, File *file)
|
||||
void SoundEngine::addMusic(const std::wstring& name, File *file)
|
||||
{
|
||||
}
|
||||
|
||||
void SoundEngine::addStreaming(const wstring& name, File *file)
|
||||
void SoundEngine::addStreaming(const std::wstring& name, File *file)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
SoundEngine();
|
||||
virtual void destroy();
|
||||
virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
|
||||
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
|
||||
virtual void playStreaming(const std::wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
|
||||
virtual void playUI(int iSound, float volume, float pitch);
|
||||
virtual void playMusicTick();
|
||||
virtual void updateMusicVolume(float fVal);
|
||||
@@ -87,16 +87,16 @@ public:
|
||||
virtual void updateSoundEffectVolume(float fVal);
|
||||
virtual void init(Options *);
|
||||
virtual void tick(std::shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one
|
||||
virtual void add(const wstring& name, File *file);
|
||||
virtual void addMusic(const wstring& name, File *file);
|
||||
virtual void addStreaming(const wstring& name, File *file);
|
||||
virtual void add(const std::wstring& name, File *file);
|
||||
virtual void addMusic(const std::wstring& name, File *file);
|
||||
virtual void addStreaming(const std::wstring& name, File *file);
|
||||
#ifndef __PS3__
|
||||
static void setXACTEngine( IXACT3Engine *pXACT3Engine);
|
||||
void CreateStreamingWavebank(const char *pchName, IXACT3WaveBank **ppStreamedWaveBank);
|
||||
void CreateSoundbank(const char *pchName, IXACT3SoundBank **ppSoundBank);
|
||||
|
||||
#endif // __PS3__
|
||||
virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false);
|
||||
virtual char *ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces=false);
|
||||
bool isStreamingWavebankReady(); // 4J Added
|
||||
#ifdef _XBOX
|
||||
bool isStreamingWavebankReady(IXACT3WaveBank *pWaveBank);
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
|
||||
DWORD m_dwNestedBeginCount;
|
||||
|
||||
wstring m_fontName;
|
||||
wstring m_fallbackFont;
|
||||
std::wstring m_fontName;
|
||||
std::wstring m_fallbackFont;
|
||||
DWORD refCount;
|
||||
public:
|
||||
float getScaleFactor() { return m_fScaleFactor; }
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
// m_fXScaleFactor = m_fYScaleFactor = m_fScaleFactor;
|
||||
}
|
||||
|
||||
void SetFallbackFont(const wstring &fallbackFont) { m_fallbackFont = fallbackFont; }
|
||||
void SetFallbackFont(const std::wstring &fallbackFont) { m_fallbackFont = fallbackFont; }
|
||||
void IncRefCount() { ++refCount; }
|
||||
void DecRefCount() { --refCount; }
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
|
||||
#if 1
|
||||
for( int i = 0; i < dwCount; i++ )
|
||||
{
|
||||
wstring string;
|
||||
std::wstring string;
|
||||
string.push_back(pCharData[i].wch);
|
||||
lineYPos = pCharData[i].y;
|
||||
lineXPos = pCharData[i].x;
|
||||
@@ -257,7 +257,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
|
||||
DWORD i = 0;
|
||||
while( i < dwCount )
|
||||
{
|
||||
wstring string;
|
||||
std::wstring string;
|
||||
lineYPos = pCharData[i].y;
|
||||
lineXPos = pCharData[i].x;
|
||||
colour = pCharData[i].dwColor;
|
||||
|
||||
@@ -1097,15 +1097,15 @@ bool CPlatformNetworkManagerXbox::SystemFlagGet(INetworkPlayer *pNetworkPlayer,
|
||||
return false;
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerXbox::GatherStats()
|
||||
std::wstring CPlatformNetworkManagerXbox::GatherStats()
|
||||
{
|
||||
return L"Queue messages: " + _toString(((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_MESSAGES ) )
|
||||
+ L" Queue bytes: " + _toString( ((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_BYTES ) );
|
||||
}
|
||||
|
||||
wstring CPlatformNetworkManagerXbox::GatherRTTStats()
|
||||
std::wstring CPlatformNetworkManagerXbox::GatherRTTStats()
|
||||
{
|
||||
wstring stats(L"Rtt: ");
|
||||
std::wstring stats(L"Rtt: ");
|
||||
|
||||
wchar_t stat[32];
|
||||
|
||||
@@ -1529,7 +1529,7 @@ vector<FriendSessionInfo *> *CPlatformNetworkManagerXbox::GetSessionList(int iPa
|
||||
{
|
||||
sessionInfo->data = *(GameSessionData *)pxnqi->pbData;
|
||||
|
||||
wstring gamerName = convStringToWstring(sessionInfo->data.hostName);
|
||||
std::wstring gamerName = convStringToWstring(sessionInfo->data.hostName);
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<<eDebugSetting_DebugLeaderboards)))
|
||||
{
|
||||
@@ -1622,7 +1622,7 @@ bool CPlatformNetworkManagerXbox::GetGameSessionInfo(int iPad, SessionID session
|
||||
{
|
||||
sessionInfo->data = *(GameSessionData *)pxnqi->pbData;
|
||||
|
||||
wstring gamerName = convStringToWstring(sessionInfo->data.hostName);
|
||||
std::wstring gamerName = convStringToWstring(sessionInfo->data.hostName);
|
||||
swprintf(sessionInfo->displayLabel,app.GetString(IDS_GAME_HOST_NAME),L"MWWWWWWWWWWWWWWM");// gamerName.c_str() );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -121,8 +121,8 @@ private:
|
||||
float m_lastPlayerEventTimeStart;
|
||||
|
||||
public:
|
||||
wstring GatherStats();
|
||||
wstring GatherRTTStats();
|
||||
std::wstring GatherStats();
|
||||
std::wstring GatherRTTStats();
|
||||
|
||||
private:
|
||||
vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT];
|
||||
|
||||
@@ -316,7 +316,7 @@ void CSocialManager::DestroyPreviewPostImage()
|
||||
|
||||
void CSocialManager::SetSocialPostText(LPCWSTR pwchTitle, LPCWSTR pwchCaption, LPCWSTR pwchDesc)
|
||||
{
|
||||
wstring wTemp;
|
||||
std::wstring wTemp;
|
||||
|
||||
ZeroMemory(m_wchTitleA,sizeof(WCHAR)*(MAX_SOCIALPOST_CAPTION+1));
|
||||
ZeroMemory(m_wchCaptionA,sizeof(WCHAR)*(MAX_SOCIALPOST_CAPTION+1));
|
||||
|
||||
@@ -141,7 +141,7 @@ void ConsoleUIController::DisplayGamertag(unsigned int iPad, bool show)
|
||||
CXuiSceneBase::DisplayGamertag(iPad, show?TRUE:FALSE);
|
||||
}
|
||||
|
||||
void ConsoleUIController::SetSelectedItem(unsigned int iPad, const wstring &name)
|
||||
void ConsoleUIController::SetSelectedItem(unsigned int iPad, const std::wstring &name)
|
||||
{
|
||||
CXuiSceneBase::SetSelectedItem(iPad, name);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
virtual void PlayUISFX(ESoundEffect eSound);
|
||||
|
||||
virtual void DisplayGamertag(unsigned int iPad, bool show);
|
||||
virtual void SetSelectedItem(unsigned int iPad, const wstring &name);
|
||||
virtual void SetSelectedItem(unsigned int iPad, const std::wstring &name);
|
||||
virtual void UpdateSelectedItemPos(unsigned int iPad);
|
||||
|
||||
virtual void HandleDLCMountingComplete();
|
||||
|
||||
Reference in New Issue
Block a user