diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 09d98f95..68c34d16 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -22,44 +22,13 @@ #ifdef __ORBIS__ #include //#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 *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, diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 754e99f2..7e14c4b0 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -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 dlcFilenames; -#elif defined _DURANGO +#elif (defined _DURANGO || _WINDOWS64) std::vector dlcFilenames; #endif StorageManager.GetMountedDLCFileList("DLCDrive", dlcFilenames); diff --git a/Minecraft.Client/Common/DLC/DLCManager.cpp b/Minecraft.Client/Common/DLC/DLCManager.cpp index 9d4c07ca..7546d7d9 100644 --- a/Minecraft.Client/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Common/DLC/DLCManager.cpp @@ -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 diff --git a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp index 51c2d2b1..d3398b0d 100644 --- a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp +++ b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp @@ -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"); diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 197d178a..35abacd7 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -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"); diff --git a/Minecraft.Client/DLCTexturePack.cpp b/Minecraft.Client/DLCTexturePack.cpp index 12a8326d..49692501 100644 --- a/Minecraft.Client/DLCTexturePack.cpp +++ b/Minecraft.Client/DLCTexturePack.cpp @@ -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"); diff --git a/Minecraft.Client/Windows64/4JLibs b/Minecraft.Client/Windows64/4JLibs index 4c506590..e00f0215 160000 --- a/Minecraft.Client/Windows64/4JLibs +++ b/Minecraft.Client/Windows64/4JLibs @@ -1 +1 @@ -Subproject commit 4c50659091a80ee82dce491f0e1d1c565fe649b7 +Subproject commit e00f0215ccb8a3ca1f44d8981cf06442429336b5 diff --git a/Minecraft.World/File.cpp b/Minecraft.World/File.cpp index 7446a746..02fba7fa 100644 --- a/Minecraft.World/File.cpp +++ b/Minecraft.World/File.cpp @@ -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; diff --git a/Minecraft.World/RegionFileCache.cpp b/Minecraft.World/RegionFileCache.cpp index 6b88f4e0..5c3d6cc6 100644 --- a/Minecraft.World/RegionFileCache.cpp +++ b/Minecraft.World/RegionFileCache.cpp @@ -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;