feat: update 4JLibs & add win64 to splitsave case

This commit is contained in:
str1k3r committed 2026-08-30 18:08:18 -04:00
1 parent 902a6ca641
commit fc1a6a80e3
9 files changed
+27 -74

No files matched your search

+5 -48
View File
@@ -22,44 +22,13 @@
#ifdef __ORBIS__
#include <audioout.h>
//#define __DISABLE_MILES__ // MGH disabled for now as it crashes if we call sceNpMatching2Initialize
#endif
// take out Orbis until they are done
#if defined _XBOX
SoundEngine::SoundEngine() {}
void SoundEngine::init(Options *pOptions)
{
}
void SoundEngine::tick(shared_ptr<Mob> *players, float a)
{
}
void SoundEngine::destroy() {}
void SoundEngine::play(int iSound, float x, float y, float z, float volume, float pitch)
{
app.DebugPrintf("PlaySound - %d\n",iSound);
}
void SoundEngine::playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) {}
void SoundEngine::playUI(int iSound, float volume, float pitch) {}
void SoundEngine::updateMusicVolume(float fVal) {}
void SoundEngine::updateSoundEffectVolume(float fVal) {}
void SoundEngine::add(const wstring& name, File *file) {}
void SoundEngine::addMusic(const wstring& name, File *file) {}
void SoundEngine::addStreaming(const wstring& name, File *file) {}
char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) { return NULL; }
bool SoundEngine::isStreamingWavebankReady() { return true; }
void SoundEngine::playMusicTick() {};
#else
#endif
// str1k3r: previously ps4 needed the durango folder to load sound and so did windows this fixes that and makes them use there own folders.
#ifdef _WINDOWS64
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"};
char SoundEngine::m_szRedistName[]={"Windows64\\redist64"}; //str1k3r - moved this to a the Windows64 dir so its out of plain view
char SoundEngine::m_szRedistName[]={"Windows64\\redist64"}; //str1k3r - moved this to the Windows64 dir so its out of plain view
#elif defined _DURANGO
char SoundEngine::m_szSoundPath[]={"Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"};
@@ -79,7 +48,7 @@ char SoundEngine::m_szMusicPath[]={"music/"};
char SoundEngine::m_szRedistName[]={"redist"};
#endif
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
/*#ifdef _CONTENT_PACKAGE // str1k3r - not needed use default paths instead.
char SoundEngine::m_szSoundPath[]={"Sound/"};
#elif defined _ART_BUILD
char SoundEngine::m_szSoundPath[]={"Sound/"};
@@ -111,7 +80,6 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
"hal4",
"nuance1",
"nuance2",
#ifndef _XBOX
// add the new music tracks
"creative1",
"creative2",
@@ -123,11 +91,9 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
"menu2",
"menu3",
"menu4",
#endif
"piano1",
"piano2",
"piano3",
// Nether
"nether1",
"nether2",
@@ -308,9 +274,7 @@ void SoundEngine::init(Options *pOptions)
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
}
#elif defined __PSVITA__
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
#elif defined __ORBIS__
#elif (defined __PSVITA__ || __ORBIS__)
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
#else
strcpy((char *)szBankName,m_szSoundPath);
@@ -1236,7 +1200,7 @@ void SoundEngine::playMusicUpdate()
m_MusicType=eMusicType_Game;
m_StreamingAudioInfo.bIs3D=false;
#ifdef _XBOX_ONE
#if (defined _XBOX_ONE || _WINDOWS64)
wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID);
wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka";
std::wstring mountedPath = StorageManager.GetMountedPath(wstrFile);
@@ -1245,12 +1209,7 @@ void SoundEngine::playMusicUpdate()
wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID);
char szName[255];
wcstombs(szName,wstrSoundName.c_str(),255);
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
string strFile="TPACK:/Data/" + string(szName) + ".binka";
#else
string strFile="TPACK:\\Data\\" + string(szName) + ".binka";
#endif
std::string mountedPath = StorageManager.GetMountedPath(strFile);
strcpy(m_szStreamName,mountedPath.c_str());
#endif
@@ -1668,8 +1627,6 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac
return buf;
}
#endif
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
F32 distance,
+3 -3
View File
@@ -3674,7 +3674,7 @@ void CMinecraftApp::HandleXuiActions(void)
pDLCTexPack->m_pSoundBank->Destroy();
}
#endif
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
@@ -5459,9 +5459,9 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
{
DWORD dwFilesProcessed = 0;
#ifndef _XBOX
#if defined(__PS3__) || defined(__ORBIS__) || defined(_WINDOWS64) || defined (__PSVITA__)
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
std::vector<std::string> dlcFilenames;
#elif defined _DURANGO
#elif (defined _DURANGO || _WINDOWS64)
std::vector<std::wstring> dlcFilenames;
#endif
StorageManager.GetMountedDLCFileList("DLCDrive", dlcFilenames);
+10 -10
View File
@@ -344,14 +344,14 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL
}
else if (fromArchive) return false;
#ifdef _WINDOWS64
string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#elif defined(_DURANGO)
#if (defined _DURANGO || _WINDOWS64)
wstring finalPath = StorageManager.GetMountedPath(wPath.c_str());
if(finalPath.size() == 0) finalPath = wPath;
#ifdef _DURANGO
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
HANDLE file = CreateFileW(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
#else
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
@@ -557,14 +557,14 @@ DWORD DLCManager::retrievePackIDFromDLCDataFile(const string &path, DLCPack *pac
DWORD packId = 0;
wstring wPath = convStringToWstring(path);
#ifdef _WINDOWS64
string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#elif defined(_DURANGO)
#if (defined _DURANGO || _WINDOWS64)
wstring finalPath = StorageManager.GetMountedPath(wPath.c_str());
if(finalPath.size() == 0) finalPath = wPath;
#ifdef _DURANGO
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
HANDLE file = CreateFileW(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
#else
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
@@ -464,7 +464,7 @@ void LevelGenerationOptions::loadBaseSaveData()
if(mountIndex > -1)
{
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&LevelGenerationOptions::packMounted,this,L"WPACK")!=ERROR_IO_PENDING)
#else
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&LevelGenerationOptions::packMounted,this,"WPACK")!=ERROR_IO_PENDING)
@@ -604,7 +604,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD
}
}
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
DWORD result = StorageManager.UnmountInstalledDLC(L"WPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("WPACK");
+2 -2
View File
@@ -699,7 +699,7 @@ void UIController::CleanUpSkinReload()
{
if(!Minecraft::GetInstance()->skins->getSelected()->hasAudio())
{
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
@@ -1657,7 +1657,7 @@ void UIController::NavigateToHomeMenu()
// {
// pDLCTexPack->m_pSoundBank->Destroy();
// }
#ifdef _XBOX_ONE
#if (defined _XBOX_ONE || _WINDOWS64)
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
+2 -2
View File
@@ -238,7 +238,7 @@ void DLCTexturePack::loadData()
if(mountIndex > -1)
{
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&DLCTexturePack::packMounted,this,L"TPACK")!=ERROR_IO_PENDING)
#else
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&DLCTexturePack::packMounted,this,"TPACK")!=ERROR_IO_PENDING)
@@ -552,7 +552,7 @@ void DLCTexturePack::loadUI()
#ifndef _XBOX
if(hasAudio()==false && !ui.IsReloadingSkin())
{
#ifdef _DURANGO
#if (defined _DURANGO || _WINDOWS64)
StorageManager.UnmountInstalledDLC(L"TPACK");
#else
StorageManager.UnmountInstalledDLC("TPACK");
+1 -6
View File
@@ -36,12 +36,7 @@ File::File( const wstring& pathname ) //: parent( NULL )
else
m_abstractPathName = pathname;
#ifdef _WINDOWS64
string path = wstringtochararray(m_abstractPathName);
string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path;
m_abstractPathName = convStringToWstring(finalPath);
#elif defined(_DURANGO)
#if (defined _DURANGO || _WINDOWS64)
wstring finalPath = StorageManager.GetMountedPath(m_abstractPathName.c_str());
if(finalPath.size() == 0) finalPath = m_abstractPathName;
m_abstractPathName = finalPath;
+1
View File
@@ -9,6 +9,7 @@ bool RegionFileCache::useSplitSaves(ESavePlatform platform)
{
switch(platform)
{
case SAVE_FILE_PLATFORM_WIN64:
case SAVE_FILE_PLATFORM_XBONE:
case SAVE_FILE_PLATFORM_PS4:
return true;