refactor: unglob std::wstring

This commit is contained in:
Tropical
2026-03-06 11:50:22 -06:00
parent 41db813a6d
commit cdc08700e4
581 changed files with 2156 additions and 2154 deletions
@@ -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();