Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04dcde9939 | ||
|
|
2b051aa038 | ||
|
|
51ee0d8e57 | ||
|
|
9ef66ed71b | ||
|
|
b6e2886476 | ||
|
|
69541f1abf |
@@ -70,9 +70,6 @@ jobs:
|
||||
needs: build
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Download all build artifacts
|
||||
uses: https://github.com/actions/download-artifact@v3
|
||||
with:
|
||||
|
||||
@@ -1,50 +1,55 @@
|
||||
/*Debug
|
||||
/*Release
|
||||
/*ContentPackage
|
||||
/*ContentPackage_NO_TU
|
||||
/*ContentPackage_SYMBOLS
|
||||
/*ReleaseForArt
|
||||
/ORBIS_Debug
|
||||
/ORBIS_Release
|
||||
/PS3_Debug
|
||||
/PS3_Release
|
||||
/PSVita_Debug
|
||||
/PSVita_Release
|
||||
/X360_Debug
|
||||
/X360_Release
|
||||
/Release
|
||||
/Debug
|
||||
/x64
|
||||
/ipch
|
||||
.vs/
|
||||
|
||||
# Minecraft.Client
|
||||
/Minecraft.Client/x64/
|
||||
/Minecraft.Client/x64_*
|
||||
/Minecraft.Client/*Debug
|
||||
/Minecraft.Client/*Release
|
||||
/Minecraft.Client/*ContentPackage
|
||||
/Minecraft.Client/*ContentPackage_NO_TU
|
||||
/Minecraft.Client/*ContentPackage_SYMBOLS
|
||||
/Minecraft.Client/*ReleaseForArt
|
||||
/Minecraft.Client/ORBIS_Debug
|
||||
/Minecraft.Client/ORBIS_Release
|
||||
/Minecraft.Client/PS3_Debug
|
||||
/Minecraft.Client/PS3_Release
|
||||
/Minecraft.Client/PSVita_Debug
|
||||
/Minecraft.Client/PSVita_Release
|
||||
/Minecraft.Client/X360_Debug
|
||||
/Minecraft.Client/X360_Release
|
||||
/Minecraft.Client/Debug
|
||||
/Minecraft.Client/Release
|
||||
/Minecraft.Client/x64
|
||||
/Minecraft.Client/Windows64/GameHDD
|
||||
|
||||
# Minecraft.world
|
||||
/Minecraft.World/x64/
|
||||
/Minecraft.World/x64_*
|
||||
/Minecraft.World/*Debug
|
||||
/Minecraft.World/*Release
|
||||
/Minecraft.World/*ContentPackage
|
||||
/Minecraft.World/*ContentPackage_NO_TU
|
||||
/Minecraft.World/*ContentPackage_SYMBOLS
|
||||
/Minecraft.World/*ReleaseForArt
|
||||
/Minecraft.World/ORBIS_Debug
|
||||
/Minecraft.World/ORBIS_Release
|
||||
/Minecraft.World/PS3_Debug
|
||||
/Minecraft.World/PS3_Release
|
||||
/Minecraft.World/PSVita_Debug
|
||||
/Minecraft.World/PSVita_Release
|
||||
/Minecraft.World/X360_Debug
|
||||
/Minecraft.World/X360_Release
|
||||
/Minecraft.World/Debug
|
||||
/Minecraft.World/Release
|
||||
/Minecraft.World/x64_Debug
|
||||
/Minecraft.World/x64_Release
|
||||
MinecraftConsoles.opensdf
|
||||
MinecraftConsoles.v11.suo
|
||||
MinecraftConsoles.sdf
|
||||
|
||||
# PS3 SPU
|
||||
/Minecraft.Client/PS3/SPU_Tasks/objFiles/
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3*
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3*
|
||||
|
||||
# Misc
|
||||
*.pkg
|
||||
*.bat
|
||||
/*.gp4p
|
||||
/*.vpk
|
||||
/*.gp4
|
||||
*-app
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.v11.suo
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Debug
|
||||
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Release
|
||||
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Release
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: Paths
|
||||
:: -------------------------------------------------------
|
||||
set TOOLS=C:\Program Files (x86)\SCE\ORBIS\Tools\Publishing Tools\bin
|
||||
set SRC_GAME=Minecraft.Client\PS4_GAME
|
||||
set SRC_ELF=ORBIS_Release\Minecraft.Client.elf
|
||||
set STAGING=CUSA00283-app
|
||||
set OUT_PKG=CUSA00283-app.pkg
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 1. Clean and create staging folder
|
||||
:: -------------------------------------------------------
|
||||
echo [1/5] Staging files...
|
||||
if exist "%STAGING%" rmdir /S /Q "%STAGING%"
|
||||
xcopy /E /I /Y "%SRC_GAME%" "%STAGING%"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 2. Replace eboot.bin with freshly compiled ELF
|
||||
:: -------------------------------------------------------
|
||||
echo [2/5] Injecting eboot.bin...
|
||||
copy /Y "%SRC_ELF%" "%STAGING%\eboot.bin"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 3. Create placeholder keystone (256 zero bytes)
|
||||
:: Required by gengp4_app before it will generate the GP4
|
||||
:: -------------------------------------------------------
|
||||
echo [3/5] Creating keystone...
|
||||
powershell -NoProfile -Command ^
|
||||
copy /Y "keystone" "%STAGING%\sce_sys\keystone'
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 4. Generate GP4 project file
|
||||
:: Backup param.sfo first as gengp4 may modify it
|
||||
:: -------------------------------------------------------
|
||||
echo [4/5] Generating GP4...
|
||||
copy /Y "%STAGING%\sce_sys\param.sfo" "%STAGING%\sce_sys\param.sfo.bak"
|
||||
"%TOOLS%\gengp4_app.exe" "%STAGING%"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 4b. Fix gengp4 bug: default_id is 1-indexed but scenario id is 0-indexed
|
||||
:: -------------------------------------------------------
|
||||
echo [4b/5] Patching GP4 default_id...
|
||||
powershell -NoProfile -Command ^
|
||||
"(Get-Content '%STAGING%.gp4') -replace 'default_id=""1""', 'default_id=""0""' | Set-Content '%STAGING%.gp4'"
|
||||
|
||||
:: -------------------------------------------------------
|
||||
:: 5. Build PKG
|
||||
:: -------------------------------------------------------
|
||||
echo [5/5] Building PKG...
|
||||
if exist "%OUT_PKG%" del /Q "%OUT_PKG%"
|
||||
"%TOOLS%\orbis-pub-cmd.exe" img_create "%STAGING%.gp4" "%OUT_PKG%"
|
||||
|
||||
echo.
|
||||
echo Done! Output: %OUT_PKG%
|
||||
pause
|
||||
@@ -1964,7 +1964,6 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
#elif defined __PSVITA__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
int ret = -1;
|
||||
/*
|
||||
if(!CGameNetworkManager::usingAdhocMode()) // we don't need to be friends in PSN for adhoc mode
|
||||
{
|
||||
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, false);
|
||||
@@ -1975,11 +1974,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
friendCount = friendList.get()->size();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#else // __ORBIS__
|
||||
/*
|
||||
//sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
std::vector<sce::Toolkit::NP::FriendsList> friendList;
|
||||
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
|
||||
sce::Toolkit::NP::FriendInfoRequest requestParam;
|
||||
memset(&requestParam,0,sizeof(requestParam));
|
||||
@@ -1988,16 +1986,14 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
requestParam.offset = 0;
|
||||
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
|
||||
|
||||
//int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
|
||||
int ret = 42069;
|
||||
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
|
||||
if( ret == 0 )
|
||||
{
|
||||
if( friendList.hasResult())
|
||||
if( friendList.hasResult() )
|
||||
{
|
||||
friendCount = friendList.get()->size();
|
||||
}
|
||||
}*/
|
||||
int ret = 42069;
|
||||
}
|
||||
#endif
|
||||
if( ret == 0 )
|
||||
{
|
||||
@@ -2007,18 +2003,12 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
ret = sceNpBasicGetFriendListEntry( i, &npid );
|
||||
#elif defined __ORBIS__
|
||||
//dont touch npid
|
||||
#else
|
||||
npid = friendList.get()->at(i).npid;
|
||||
#endif
|
||||
if( ret == 0 )
|
||||
{
|
||||
#ifndef __ORBIS__
|
||||
if(strcmp(npid.handle.data, packet->m_playerXuids[packet->m_hostIndex].getOnlineID()) == 0)
|
||||
#else
|
||||
if(1==2)
|
||||
#endif
|
||||
{
|
||||
isFriend = true;
|
||||
break;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define _SEKRIT
|
||||
#include "..\..\Durango\Miles\include\mss.h"
|
||||
#elif defined _WINDOWS64
|
||||
#include "..\..\windows64\Miles\include\mss.h"
|
||||
#else // PS4
|
||||
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
|
||||
#define _SEKRIT2
|
||||
|
||||
@@ -16,7 +16,17 @@
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#include "..\..\Minecraft.Client\Windows64\Windows64_App.h"
|
||||
#include "..\..\Minecraft.Client\Windows64\Miles\include\imssapi.h"
|
||||
std::vector<MiniAudioSound*> m_activeSounds;
|
||||
#include "stb_vorbis.h"
|
||||
|
||||
#define MA_NO_DSOUND
|
||||
#define MA_NO_WINMM
|
||||
#define MINIAUDIO_IMPLEMENTATION
|
||||
#include "miniaudio.h"
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include "..\Filesystem\Filesystem.h"
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
@@ -77,28 +87,29 @@ char SoundEngine::m_szRedistName[]={"redist"};
|
||||
char SoundEngine::m_szSoundPath[]={"PS3/Sound/"};
|
||||
char SoundEngine::m_szMusicPath[]={"music/"};
|
||||
char SoundEngine::m_szRedistName[]={"redist"};
|
||||
#endif
|
||||
|
||||
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
char SoundEngine::m_szSoundPath[]={"Sound/"};
|
||||
#elif defined _ART_BUILD
|
||||
char SoundEngine::m_szSoundPath[]={"Sound/"};
|
||||
#endif*/
|
||||
#endif
|
||||
|
||||
#ifdef __PS3__
|
||||
#define USE_SPURS
|
||||
|
||||
#ifdef USE_SPURS
|
||||
#include <cell/spurs.h>
|
||||
#else
|
||||
#include <sys/spu_image.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _WINDOWS64
|
||||
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
|
||||
F32 distance,
|
||||
F32 rolloff_factor,
|
||||
F32 min_dist,
|
||||
F32 max_dist);
|
||||
#endif
|
||||
|
||||
char *SoundEngine::m_szStreamFileA[eStream_Max]=
|
||||
{
|
||||
@@ -156,6 +167,7 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
|
||||
// ErrorCallback
|
||||
//
|
||||
/////////////////////////////////////////////
|
||||
#ifndef _WINDOWS64
|
||||
void AILCALL ErrorCallback(S64 i_Id, char const* i_Details)
|
||||
{
|
||||
char *pchLastError=AIL_last_error();
|
||||
@@ -170,6 +182,7 @@ void AILCALL ErrorCallback(S64 i_Id, char const* i_Details)
|
||||
app.DebugPrintf("ErrorCallback - Details: %s\n", i_Details);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
// AP - this is the callback when the driver is about to mix. At this point the mutex is locked by Miles so we can now call all Miles functions without
|
||||
@@ -202,6 +215,7 @@ void AILCALL MilesMixerCB(HDIGDRIVER dig)
|
||||
/////////////////////////////////////////////
|
||||
void SoundEngine::init(Options *pOptions)
|
||||
{
|
||||
#ifndef _WINDOWS64
|
||||
app.DebugPrintf("---SoundEngine::init\n");
|
||||
#ifdef __DISABLE_MILES__
|
||||
return;
|
||||
@@ -371,6 +385,31 @@ void SoundEngine::init(Options *pOptions)
|
||||
// wait for 1 mix...
|
||||
AIL_release_sample_handle(Sample);
|
||||
#endif
|
||||
#else
|
||||
app.DebugPrintf("---SoundEngine::init\n");
|
||||
|
||||
m_engineConfig = ma_engine_config_init();
|
||||
m_engineConfig.listenerCount = MAX_LOCAL_PLAYERS;
|
||||
|
||||
if (ma_engine_init(&m_engineConfig, &m_engine) != MA_SUCCESS)
|
||||
{
|
||||
app.DebugPrintf("Failed to initialize miniaudio engine\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ma_engine_set_volume(&m_engine, 1.0f);
|
||||
|
||||
m_MasterMusicVolume = 1.0f;
|
||||
m_MasterEffectsVolume = 1.0f;
|
||||
|
||||
m_validListenerCount = 1;
|
||||
|
||||
m_bSystemMusicPlaying = false;
|
||||
|
||||
app.DebugPrintf("---miniaudio initialized\n");
|
||||
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
@@ -400,6 +439,7 @@ void SoundEngine::SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int i
|
||||
}
|
||||
|
||||
// AP - moved to a separate function so it can be called from the mixer callback on Vita
|
||||
#ifndef _WINDOWS64
|
||||
void SoundEngine::updateMiles()
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
@@ -612,6 +652,110 @@ void SoundEngine::updateMiles()
|
||||
}
|
||||
AIL_complete_event_queue_processing();
|
||||
}
|
||||
#else
|
||||
void SoundEngine::updateMiniAudio()
|
||||
{
|
||||
if (m_validListenerCount == 1)
|
||||
{
|
||||
for (size_t i = 0; i < MAX_LOCAL_PLAYERS; i++)
|
||||
{
|
||||
if (m_ListenerA[i].bValid)
|
||||
{
|
||||
ma_engine_listener_set_position(
|
||||
&m_engine,
|
||||
0,
|
||||
m_ListenerA[i].vPosition.x,
|
||||
m_ListenerA[i].vPosition.y,
|
||||
m_ListenerA[i].vPosition.z);
|
||||
|
||||
ma_engine_listener_set_direction(
|
||||
&m_engine,
|
||||
0,
|
||||
m_ListenerA[i].vOrientFront.x,
|
||||
m_ListenerA[i].vOrientFront.y,
|
||||
m_ListenerA[i].vOrientFront.z);
|
||||
|
||||
ma_engine_listener_set_world_up(
|
||||
&m_engine,
|
||||
0,
|
||||
0.0f, 1.0f, 0.0f);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ma_engine_listener_set_position(&m_engine, 0, 0.0f, 0.0f, 0.0f);
|
||||
ma_engine_listener_set_direction(&m_engine, 0, 0.0f, 0.0f, 1.0f);
|
||||
ma_engine_listener_set_world_up(&m_engine, 0, 0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
for (auto it = m_activeSounds.begin(); it != m_activeSounds.end(); )
|
||||
{
|
||||
MiniAudioSound* s = *it;
|
||||
|
||||
if (!ma_sound_is_playing(&s->sound))
|
||||
{
|
||||
ma_sound_uninit(&s->sound);
|
||||
delete s;
|
||||
it = m_activeSounds.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
float finalVolume = s->info.volume * m_MasterEffectsVolume * SFX_VOLUME_MULTIPLIER;
|
||||
if (finalVolume > SFX_MAX_GAIN)
|
||||
finalVolume = SFX_MAX_GAIN;
|
||||
|
||||
ma_sound_set_volume(&s->sound, finalVolume);
|
||||
ma_sound_set_pitch(&s->sound, s->info.pitch);
|
||||
|
||||
if (s->info.bIs3D)
|
||||
{
|
||||
if (m_validListenerCount > 1)
|
||||
{
|
||||
float fClosest=10000.0f;
|
||||
int iClosestListener=0;
|
||||
float fClosestX=0.0f,fClosestY=0.0f,fClosestZ=0.0f,fDist;
|
||||
for( size_t i = 0; i < MAX_LOCAL_PLAYERS; i++ )
|
||||
{
|
||||
if( m_ListenerA[i].bValid )
|
||||
{
|
||||
float x,y,z;
|
||||
|
||||
x=fabs(m_ListenerA[i].vPosition.x-s->info.x);
|
||||
y=fabs(m_ListenerA[i].vPosition.y-s->info.y);
|
||||
z=fabs(m_ListenerA[i].vPosition.z-s->info.z);
|
||||
fDist=x+y+z;
|
||||
|
||||
if(fDist<fClosest)
|
||||
{
|
||||
fClosest=fDist;
|
||||
fClosestX=x;
|
||||
fClosestY=y;
|
||||
fClosestZ=z;
|
||||
iClosestListener=i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float realDist = sqrtf((fClosestX*fClosestX)+(fClosestY*fClosestY)+(fClosestZ*fClosestZ));
|
||||
ma_sound_set_position(&s->sound, 0, 0, realDist);
|
||||
}
|
||||
else
|
||||
{
|
||||
ma_sound_set_position(
|
||||
&s->sound,
|
||||
s->info.x,
|
||||
s->info.y,
|
||||
s->info.z);
|
||||
}
|
||||
}
|
||||
|
||||
++it;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//#define DISTORTION_TEST
|
||||
#ifdef DISTORTION_TEST
|
||||
@@ -698,7 +842,11 @@ void SoundEngine::tick(shared_ptr<Mob> *players, float a)
|
||||
|
||||
LeaveCriticalSection(&SoundEngine_MixerMutex);
|
||||
#else
|
||||
#ifndef _WINDOWS64
|
||||
updateMiles();
|
||||
#else
|
||||
updateMiniAudio();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -710,7 +858,13 @@ void SoundEngine::tick(shared_ptr<Mob> *players, float a)
|
||||
SoundEngine::SoundEngine()
|
||||
{
|
||||
random = new Random();
|
||||
#ifndef _WINDOWS64
|
||||
m_hStream=0;
|
||||
#else
|
||||
memset(&m_engine, 0, sizeof(ma_engine));
|
||||
memset(&m_engineConfig, 0, sizeof(ma_engine_config));
|
||||
m_musicStreamActive = false;
|
||||
#endif
|
||||
m_StreamState=eMusicStreamState_Idle;
|
||||
m_iMusicDelay=0;
|
||||
m_validListenerCount=0;
|
||||
@@ -792,7 +946,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
strcat((char *)szSoundName,SoundName);
|
||||
|
||||
// app.DebugPrintf(6,"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",iSound, SoundName, szSoundName,x,y,z,volume,pitch);
|
||||
|
||||
#ifndef _WINDOWS64
|
||||
AUDIO_INFO AudioInfo;
|
||||
AudioInfo.x=x;
|
||||
AudioInfo.y=y;
|
||||
@@ -809,6 +963,124 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
S32 token = AIL_enqueue_event_start();
|
||||
AIL_enqueue_event_buffer(&token, &AudioInfo, sizeof(AUDIO_INFO), 0);
|
||||
AIL_enqueue_event_end_named(token, (char *)szSoundName);
|
||||
#else
|
||||
app.DebugPrintf(6,
|
||||
"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",
|
||||
iSound, SoundName, szSoundName, x, y, z, volume, pitch);
|
||||
|
||||
char basePath[256];
|
||||
sprintf_s(basePath, "Windows64Media/Sound/%s", (char*)szSoundName);
|
||||
|
||||
char finalPath[256];
|
||||
|
||||
// Check path cache first to avoid expensive filesystem probing
|
||||
auto cacheIt = m_soundPathCache.find(iSound);
|
||||
if (cacheIt != m_soundPathCache.end())
|
||||
{
|
||||
const auto& paths = cacheIt->second;
|
||||
if (paths.empty())
|
||||
return; // previously probed, no files found
|
||||
const std::string& chosen = paths[rand() % paths.size()];
|
||||
sprintf_s(finalPath, "%s", chosen.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cache miss — probe filesystem and store results
|
||||
std::vector<std::string> validPaths;
|
||||
const char* extensions[] = { ".ogg", ".wav", ".mp3" };
|
||||
size_t extCount = sizeof(extensions) / sizeof(extensions[0]);
|
||||
bool found = false;
|
||||
|
||||
// Check base name with each extension (non-numbered)
|
||||
for (size_t extIdx = 0; extIdx < extCount; extIdx++)
|
||||
{
|
||||
char basePlusExt[256];
|
||||
sprintf_s(basePlusExt, "%s%s", basePath, extensions[extIdx]);
|
||||
|
||||
DWORD attr = GetFileAttributesA(basePlusExt);
|
||||
if (attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
validPaths.push_back(basePlusExt);
|
||||
found = true;
|
||||
break; // non-numbered: only one base file needed
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
// Check numbered variants (e.g. sound1.ogg, sound2.ogg, ...)
|
||||
for (size_t extIdx = 0; extIdx < extCount; extIdx++)
|
||||
{
|
||||
for (int i = 1; i < 32; i++)
|
||||
{
|
||||
char numberedPath[256];
|
||||
sprintf_s(numberedPath, "%s%d%s", basePath, i, extensions[extIdx]);
|
||||
|
||||
DWORD attr = GetFileAttributesA(numberedPath);
|
||||
if (attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
validPaths.push_back(numberedPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_soundPathCache[iSound] = validPaths;
|
||||
|
||||
if (validPaths.empty())
|
||||
{
|
||||
sprintf_s(finalPath, "%s.wav", basePath); // fallback for debug print
|
||||
}
|
||||
else
|
||||
{
|
||||
const std::string& chosen = validPaths[rand() % validPaths.size()];
|
||||
sprintf_s(finalPath, "%s", chosen.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
MiniAudioSound* s = new MiniAudioSound();
|
||||
memset(&s->info, 0, sizeof(AUDIO_INFO));
|
||||
|
||||
s->info.x = x;
|
||||
s->info.y = y;
|
||||
s->info.z = z;
|
||||
|
||||
s->info.volume = volume;
|
||||
s->info.pitch = pitch;
|
||||
s->info.bIs3D = true;
|
||||
s->info.bUseSoundsPitchVal = false;
|
||||
s->info.iSound = iSound + eSFX_MAX;
|
||||
|
||||
if (ma_sound_init_from_file(
|
||||
&m_engine,
|
||||
finalPath,
|
||||
MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC,
|
||||
NULL,
|
||||
NULL,
|
||||
&s->sound) != MA_SUCCESS)
|
||||
{
|
||||
app.DebugPrintf("Failed to initialize sound from file: %s\n", finalPath);
|
||||
delete s;
|
||||
return;
|
||||
}
|
||||
|
||||
ma_sound_set_spatialization_enabled(&s->sound, MA_TRUE);
|
||||
ma_sound_set_min_distance(&s->sound, SFX_3D_MIN_DISTANCE);
|
||||
ma_sound_set_max_distance(&s->sound, SFX_3D_MAX_DISTANCE);
|
||||
ma_sound_set_rolloff(&s->sound, SFX_3D_ROLLOFF);
|
||||
|
||||
float finalVolume = volume * m_MasterEffectsVolume * SFX_VOLUME_MULTIPLIER;
|
||||
if (finalVolume > SFX_MAX_GAIN)
|
||||
finalVolume = SFX_MAX_GAIN;
|
||||
|
||||
ma_sound_set_volume(&s->sound, finalVolume);
|
||||
ma_sound_set_pitch(&s->sound, pitch);
|
||||
ma_sound_set_position(&s->sound, x, y, z);
|
||||
|
||||
ma_sound_start(&s->sound);
|
||||
|
||||
m_activeSounds.push_back(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -820,6 +1092,9 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
{
|
||||
U8 szSoundName[256];
|
||||
wstring name;
|
||||
#ifdef _WINDOWS64
|
||||
const char* soundDir;
|
||||
#endif
|
||||
// we have some game sounds played as UI sounds...
|
||||
// Not the best way to do this, but it seems to only be the portal sounds
|
||||
|
||||
@@ -832,6 +1107,9 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
// build the name
|
||||
strcpy((char *)szSoundName,"Minecraft/");
|
||||
name = wchSoundNames[iSound];
|
||||
#ifdef _WINDOWS64
|
||||
soundDir = "Minecraft";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -842,6 +1120,9 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
// build the name
|
||||
strcpy((char *)szSoundName,"Minecraft/UI/");
|
||||
name = wchUISoundNames[iSound];
|
||||
#ifdef _WINDOWS64
|
||||
soundDir = "Minecraft/UI";
|
||||
#endif
|
||||
}
|
||||
|
||||
char *SoundName = (char *)ConvertSoundPathToName(name);
|
||||
@@ -849,6 +1130,7 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
// app.DebugPrintf("UI: Playing %s, volume %f, pitch %f\n",SoundName,volume,pitch);
|
||||
|
||||
//app.DebugPrintf("PlaySound - %d - %s\n",iSound, SoundName);
|
||||
#ifndef _WINDOWS64
|
||||
|
||||
AUDIO_INFO AudioInfo;
|
||||
memset(&AudioInfo,0,sizeof(AUDIO_INFO));
|
||||
@@ -871,6 +1153,82 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
S32 token = AIL_enqueue_event_start();
|
||||
AIL_enqueue_event_buffer(&token, &AudioInfo, sizeof(AUDIO_INFO), 0);
|
||||
AIL_enqueue_event_end_named(token, (char *)szSoundName);
|
||||
#else
|
||||
char basePath[256];
|
||||
sprintf_s(basePath, "Windows64Media/Sound/%s/%s", soundDir, ConvertSoundPathToName(name));
|
||||
|
||||
char finalPath[256];
|
||||
|
||||
// Check UI sound path cache first
|
||||
auto cacheIt = m_uiSoundPathCache.find(iSound);
|
||||
if (cacheIt != m_uiSoundPathCache.end())
|
||||
{
|
||||
if (cacheIt->second.empty())
|
||||
{
|
||||
app.DebugPrintf("No sound file found for UI sound (cached): %s\n", basePath);
|
||||
return;
|
||||
}
|
||||
sprintf_s(finalPath, "%s", cacheIt->second.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cache miss — probe filesystem and store result
|
||||
const char* extensions[] = { ".ogg", ".wav", ".mp3" };
|
||||
size_t count = sizeof(extensions) / sizeof(extensions[0]);
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
sprintf_s(finalPath, "%s%s", basePath, extensions[i]);
|
||||
if (FileExists(finalPath))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
m_uiSoundPathCache[iSound] = ""; // cache negative result
|
||||
app.DebugPrintf("No sound file found for UI sound: %s\n", basePath);
|
||||
return;
|
||||
}
|
||||
m_uiSoundPathCache[iSound] = finalPath;
|
||||
}
|
||||
|
||||
MiniAudioSound* s = new MiniAudioSound();
|
||||
memset(&s->info, 0, sizeof(AUDIO_INFO));
|
||||
|
||||
s->info.volume = volume;
|
||||
s->info.pitch = pitch;
|
||||
s->info.bIs3D = false;
|
||||
s->info.bUseSoundsPitchVal = true;
|
||||
|
||||
if (ma_sound_init_from_file(
|
||||
&m_engine,
|
||||
finalPath,
|
||||
MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC,
|
||||
NULL,
|
||||
NULL,
|
||||
&s->sound) != MA_SUCCESS)
|
||||
{
|
||||
delete s;
|
||||
app.DebugPrintf("ma_sound_init_from_file failed: %s\n", finalPath);
|
||||
return;
|
||||
}
|
||||
|
||||
ma_sound_set_spatialization_enabled(&s->sound, MA_FALSE);
|
||||
|
||||
float finalVolume = volume * m_MasterEffectsVolume;
|
||||
if (finalVolume > 1.0f)
|
||||
finalVolume = 1.0f;
|
||||
printf("UI Sound volume set to %f\nEffects volume: %f\n", finalVolume, m_MasterEffectsVolume);
|
||||
|
||||
ma_sound_set_volume(&s->sound, finalVolume);
|
||||
ma_sound_set_pitch(&s->sound, pitch);
|
||||
|
||||
ma_sound_start(&s->sound);
|
||||
|
||||
m_activeSounds.push_back(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -1134,12 +1492,42 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
|
||||
return 0;
|
||||
#endif
|
||||
SoundEngine *soundEngine = (SoundEngine *)lpParameter;
|
||||
#ifndef _WINDOWS64
|
||||
soundEngine->m_hStream = AIL_open_stream(soundEngine->m_hDriver,soundEngine->m_szStreamName,0);
|
||||
|
||||
if(soundEngine->m_hStream==0)
|
||||
{
|
||||
app.DebugPrintf("SoundEngine::OpenStreamThreadProc - Could not open - %s\n",soundEngine->m_szStreamName);
|
||||
}
|
||||
#else
|
||||
const char* ext = strrchr(soundEngine->m_szStreamName, '.');
|
||||
|
||||
if (soundEngine->m_musicStreamActive)
|
||||
{
|
||||
ma_sound_stop(&soundEngine->m_musicStream);
|
||||
ma_sound_uninit(&soundEngine->m_musicStream);
|
||||
soundEngine->m_musicStreamActive = false;
|
||||
}
|
||||
|
||||
ma_result result = ma_sound_init_from_file(
|
||||
&soundEngine->m_engine,
|
||||
soundEngine->m_szStreamName,
|
||||
MA_SOUND_FLAG_STREAM,
|
||||
NULL,
|
||||
NULL,
|
||||
&soundEngine->m_musicStream);
|
||||
|
||||
if (result != MA_SUCCESS)
|
||||
{
|
||||
app.DebugPrintf("SoundEngine::OpenStreamThreadProc - Failed to open stream: %s\n", soundEngine->m_szStreamName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ma_sound_set_spatialization_enabled(&soundEngine->m_musicStream, MA_FALSE);
|
||||
ma_sound_set_looping(&soundEngine->m_musicStream, MA_FALSE);
|
||||
|
||||
soundEngine->m_musicStreamActive = true;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1159,6 +1547,7 @@ void SoundEngine::playMusicTick()
|
||||
// AP - moved to a separate function so it can be called from the mixer callback on Vita
|
||||
void SoundEngine::playMusicUpdate()
|
||||
{
|
||||
#ifndef _WINDOWS64
|
||||
//return;
|
||||
static bool firstCall = true;
|
||||
static float fMusicVol = 0.0f;
|
||||
@@ -1341,10 +1730,150 @@ void SoundEngine::playMusicUpdate()
|
||||
m_openStreamThread->Run();
|
||||
m_StreamState = eMusicStreamState_Opening;
|
||||
}
|
||||
#else
|
||||
static float fMusicVol = 0.0f;
|
||||
fMusicVol = getMasterMusicVolume();
|
||||
|
||||
switch(m_StreamState)
|
||||
{
|
||||
case eMusicStreamState_Idle:
|
||||
|
||||
// start a stream playing
|
||||
if (m_iMusicDelay > 0)
|
||||
{
|
||||
m_iMusicDelay--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
app.DebugPrintf("WARNING: m_musicStreamActive already true in Idle state, resetting to Playing\n");
|
||||
m_StreamState = eMusicStreamState_Playing;
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_musicID!=-1)
|
||||
{
|
||||
// start playing it
|
||||
strcpy((char *)m_szStreamName,m_szMusicPath);
|
||||
|
||||
// are we using a mash-up pack?
|
||||
//if(pMinecraft && !pMinecraft->skins->isUsingDefaultSkin() && pMinecraft->skins->getSelected()->hasAudio())
|
||||
if(Minecraft::GetInstance()->skins->getSelected()->hasAudio())
|
||||
{
|
||||
// It's a mash-up - need to use the DLC path for the music
|
||||
TexturePack *pTexPack=Minecraft::GetInstance()->skins->getSelected();
|
||||
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexPack;
|
||||
DLCPack *pack = pDLCTexPack->getDLCInfoParentPack();
|
||||
DLCAudioFile *dlcAudioFile = (DLCAudioFile *) pack->getFile(DLCManager::e_DLCType_Audio, 0);
|
||||
|
||||
app.DebugPrintf("Mashup pack \n");
|
||||
|
||||
// build the name
|
||||
|
||||
// if the music ID is beyond the end of the texture pack music files, then it's a CD
|
||||
if(m_musicID<m_iStream_CD_1)
|
||||
{
|
||||
SetIsPlayingStreamingGameMusic(true);
|
||||
SetIsPlayingStreamingCDMusic(false);
|
||||
m_MusicType=eMusicType_Game;
|
||||
m_StreamingAudioInfo.bIs3D=false;
|
||||
|
||||
wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID);
|
||||
char szName[255];
|
||||
wcstombs(szName,wstrSoundName.c_str(),255);
|
||||
|
||||
string strFile="TPACK:\\Data\\" + string(szName) + ".wav";
|
||||
std::string mountedPath = StorageManager.GetMountedPath(strFile);
|
||||
strcpy(m_szStreamName,mountedPath.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
SetIsPlayingStreamingGameMusic(false);
|
||||
SetIsPlayingStreamingCDMusic(true);
|
||||
m_MusicType=eMusicType_CD;
|
||||
m_StreamingAudioInfo.bIs3D=true;
|
||||
|
||||
// Need to adjust to index into the cds in the game's m_szStreamFileA
|
||||
strcat((char *)m_szStreamName,"cds/");
|
||||
strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID-m_iStream_CD_1+eStream_CD_1]);
|
||||
strcat((char *)m_szStreamName,".wav");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_musicID<m_iStream_CD_1)
|
||||
{
|
||||
SetIsPlayingStreamingGameMusic(true);
|
||||
SetIsPlayingStreamingCDMusic(false);
|
||||
m_MusicType=eMusicType_Game;
|
||||
m_StreamingAudioInfo.bIs3D=false;
|
||||
// build the name
|
||||
strcat((char *)m_szStreamName,"music/");
|
||||
}
|
||||
else
|
||||
{
|
||||
SetIsPlayingStreamingGameMusic(false);
|
||||
SetIsPlayingStreamingCDMusic(true);
|
||||
m_MusicType=eMusicType_CD;
|
||||
m_StreamingAudioInfo.bIs3D=true;
|
||||
// build the name
|
||||
strcat((char *)m_szStreamName,"cds/");
|
||||
}
|
||||
strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]);
|
||||
strcat((char *)m_szStreamName,".wav");
|
||||
}
|
||||
|
||||
FILE* pFile = NULL;
|
||||
|
||||
if (fopen_s(&pFile, reinterpret_cast<char*>(m_szStreamName), "rb") == 0 && pFile)
|
||||
{
|
||||
fclose(pFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* extensions[] = { ".ogg", ".mp3", ".wav" };
|
||||
size_t extCount = sizeof(extensions) / sizeof(extensions[0]);
|
||||
bool found = false;
|
||||
|
||||
char* dotPos = strrchr(reinterpret_cast<char*>(m_szStreamName), '.');
|
||||
if (dotPos != NULL && (dotPos - reinterpret_cast<char*>(m_szStreamName)) < 250)
|
||||
{
|
||||
for (size_t i = 0; i < extCount; i++)
|
||||
{
|
||||
strcpy_s(dotPos, 5, extensions[i]);
|
||||
|
||||
if (fopen_s(&pFile, reinterpret_cast<char*>(m_szStreamName), "rb") == 0 && pFile)
|
||||
{
|
||||
fclose(pFile);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
if (dotPos != NULL)
|
||||
{
|
||||
strcpy_s(dotPos, 5, ".wav");
|
||||
}
|
||||
app.DebugPrintf("WARNING: No audio file found for music ID %d (tried .ogg, .mp3, .wav)\n", m_musicID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
app.DebugPrintf("Starting streaming - %s\n",m_szStreamName);
|
||||
m_openStreamThread = new C4JThread(OpenStreamThreadProc, this, "OpenStreamThreadProc");
|
||||
m_openStreamThread->Run();
|
||||
m_StreamState = eMusicStreamState_Opening;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case eMusicStreamState_Opening:
|
||||
// If the open stream thread is complete, then we are ready to proceed to actually playing
|
||||
#ifndef _WINDOWS64
|
||||
if( !m_openStreamThread->isRunning() )
|
||||
{
|
||||
delete m_openStreamThread;
|
||||
@@ -1410,6 +1939,63 @@ void SoundEngine::playMusicUpdate()
|
||||
|
||||
m_StreamState=eMusicStreamState_Playing;
|
||||
}
|
||||
#else
|
||||
if( !m_openStreamThread->isRunning() )
|
||||
{
|
||||
delete m_openStreamThread;
|
||||
m_openStreamThread = NULL;
|
||||
|
||||
app.DebugPrintf("OpenStreamThreadProc finished. m_musicStreamActive=%d\n", m_musicStreamActive);
|
||||
|
||||
if (!m_musicStreamActive)
|
||||
{
|
||||
const char* currentExt = strrchr(reinterpret_cast<char*>(m_szStreamName), '.');
|
||||
if (currentExt && _stricmp(currentExt, ".wav") == 0)
|
||||
{
|
||||
const bool isCD = (m_musicID >= m_iStream_CD_1);
|
||||
const char* folder = isCD ? "cds/" : "music/";
|
||||
|
||||
int n = sprintf_s(reinterpret_cast<char*>(m_szStreamName), 512, "%s%s%s.wav", m_szMusicPath, folder, m_szStreamFileA[m_musicID]);
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
FILE* pFile = NULL;
|
||||
if (fopen_s(&pFile, reinterpret_cast<char*>(m_szStreamName), "rb") == 0 && pFile)
|
||||
{
|
||||
fclose(pFile);
|
||||
|
||||
m_openStreamThread = new C4JThread(OpenStreamThreadProc, this, "OpenStreamThreadProc");
|
||||
m_openStreamThread->Run();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_StreamState = eMusicStreamState_Idle;
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_StreamingAudioInfo.bIs3D)
|
||||
{
|
||||
ma_sound_set_spatialization_enabled(&m_musicStream, MA_TRUE);
|
||||
ma_sound_set_position(&m_musicStream, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, m_StreamingAudioInfo.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
ma_sound_set_spatialization_enabled(&m_musicStream, MA_FALSE);
|
||||
}
|
||||
|
||||
ma_sound_set_pitch(&m_musicStream, m_StreamingAudioInfo.pitch);
|
||||
|
||||
float finalVolume = m_StreamingAudioInfo.volume * getMasterMusicVolume();
|
||||
|
||||
ma_sound_set_volume(&m_musicStream, finalVolume);
|
||||
ma_result startResult = ma_sound_start(&m_musicStream);
|
||||
app.DebugPrintf("ma_sound_start result: %d\n", startResult);
|
||||
|
||||
m_StreamState=eMusicStreamState_Playing;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case eMusicStreamState_OpeningCancel:
|
||||
if( !m_openStreamThread->isRunning() )
|
||||
@@ -1421,18 +2007,46 @@ void SoundEngine::playMusicUpdate()
|
||||
break;
|
||||
case eMusicStreamState_Stop:
|
||||
// should gradually take the volume down in steps
|
||||
#ifndef _WINDOWS64
|
||||
AIL_pause_stream(m_hStream,1);
|
||||
AIL_close_stream(m_hStream);
|
||||
m_hStream=0;
|
||||
SetIsPlayingStreamingCDMusic(false);
|
||||
SetIsPlayingStreamingGameMusic(false);
|
||||
m_StreamState=eMusicStreamState_Idle;
|
||||
#else
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
ma_sound_stop(&m_musicStream);
|
||||
ma_sound_uninit(&m_musicStream);
|
||||
m_musicStreamActive = false;
|
||||
}
|
||||
|
||||
SetIsPlayingStreamingCDMusic(false);
|
||||
SetIsPlayingStreamingGameMusic(false);
|
||||
|
||||
m_StreamState = eMusicStreamState_Idle;
|
||||
#endif
|
||||
break;
|
||||
case eMusicStreamState_Stopping:
|
||||
break;
|
||||
case eMusicStreamState_Play:
|
||||
break;
|
||||
case eMusicStreamState_Playing:
|
||||
#ifdef _WINDOWS64
|
||||
{
|
||||
static int frameCount = 0;
|
||||
if (frameCount++ % 60 == 0)
|
||||
{
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
bool isPlaying = ma_sound_is_playing(&m_musicStream);
|
||||
float vol = ma_sound_get_volume(&m_musicStream);
|
||||
bool isAtEnd = ma_sound_at_end(&m_musicStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(GetIsPlayingStreamingGameMusic())
|
||||
{
|
||||
//if(m_MusicInfo.pCue!=NULL)
|
||||
@@ -1514,6 +2128,7 @@ void SoundEngine::playMusicUpdate()
|
||||
}
|
||||
|
||||
// volume change required?
|
||||
#ifndef _WINDOWS64
|
||||
if(fMusicVol!=getMasterMusicVolume())
|
||||
{
|
||||
fMusicVol=getMasterMusicVolume();
|
||||
@@ -1521,6 +2136,14 @@ void SoundEngine::playMusicUpdate()
|
||||
//AIL_set_sample_3D_position( hSample, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, m_StreamingAudioInfo.z );
|
||||
AIL_set_sample_volume_levels( hSample, fMusicVol, fMusicVol);
|
||||
}
|
||||
#else
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
float finalVolume = m_StreamingAudioInfo.volume * fMusicVol;
|
||||
|
||||
ma_sound_set_volume(&m_musicStream, finalVolume);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1528,6 +2151,7 @@ void SoundEngine::playMusicUpdate()
|
||||
// Music disc playing - if it's a 3D stream, then set the position - we don't have any streaming audio in the world that moves, so this isn't
|
||||
// required unless we have more than one listener, and are setting the listening position to the origin and setting a fake position
|
||||
// for the sound down the z axis
|
||||
#ifndef _WINDOWS64
|
||||
if(m_StreamingAudioInfo.bIs3D)
|
||||
{
|
||||
if(m_validListenerCount>1)
|
||||
@@ -1566,6 +2190,40 @@ void SoundEngine::playMusicUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (m_StreamingAudioInfo.bIs3D && m_validListenerCount > 1)
|
||||
{
|
||||
int iClosestListener = 0;
|
||||
float fClosestDist = 1e6f;
|
||||
|
||||
for (size_t i = 0; i < MAX_LOCAL_PLAYERS; i++)
|
||||
{
|
||||
if (m_ListenerA[i].bValid)
|
||||
{
|
||||
float dx = m_StreamingAudioInfo.x - m_ListenerA[i].vPosition.x;
|
||||
float dy = m_StreamingAudioInfo.y - m_ListenerA[i].vPosition.y;
|
||||
float dz = m_StreamingAudioInfo.z - m_ListenerA[i].vPosition.z;
|
||||
float dist = sqrtf(dx*dx + dy*dy + dz*dz);
|
||||
|
||||
if (dist < fClosestDist)
|
||||
{
|
||||
fClosestDist = dist;
|
||||
iClosestListener = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float relX = m_StreamingAudioInfo.x - m_ListenerA[iClosestListener].vPosition.x;
|
||||
float relY = m_StreamingAudioInfo.y - m_ListenerA[iClosestListener].vPosition.y;
|
||||
float relZ = m_StreamingAudioInfo.z - m_ListenerA[iClosestListener].vPosition.z;
|
||||
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
ma_sound_set_position(&m_musicStream, relX, relY, relZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
@@ -1617,7 +2275,7 @@ void SoundEngine::playMusicUpdate()
|
||||
}
|
||||
|
||||
// check the status of the stream - this is for when a track completes rather than is stopped by the user action
|
||||
|
||||
#ifndef _WINDOWS64
|
||||
if(m_hStream!=0)
|
||||
{
|
||||
if(AIL_stream_status(m_hStream)==SMP_DONE ) // SMP_DONE
|
||||
@@ -1630,6 +2288,7 @@ void SoundEngine::playMusicUpdate()
|
||||
m_StreamState=eMusicStreamState_Completed;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1658,7 +2317,7 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _WINDOWS64
|
||||
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
|
||||
F32 distance,
|
||||
F32 rolloff_factor,
|
||||
@@ -1681,3 +2340,4 @@ F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -3,6 +3,17 @@ class Mob;
|
||||
class Options;
|
||||
using namespace std;
|
||||
#include "..\..\Minecraft.World\SoundTypes.h"
|
||||
#ifdef _WINDOWS64
|
||||
#include "miniaudio.h"
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
||||
const float SFX_3D_MIN_DISTANCE = 1.0f;
|
||||
const float SFX_3D_MAX_DISTANCE = 16.0f;
|
||||
const float SFX_3D_ROLLOFF = 0.5f;
|
||||
const float SFX_VOLUME_MULTIPLIER = 1.5f;
|
||||
const float SFX_MAX_GAIN = 1.5f;
|
||||
#endif
|
||||
|
||||
enum eMUSICFILES
|
||||
{
|
||||
@@ -76,7 +87,11 @@ enum MUSIC_STREAMSTATE
|
||||
|
||||
typedef struct
|
||||
{
|
||||
F32 x,y,z,volume,pitch;
|
||||
#ifndef _WINDOWS64
|
||||
F32 x, y, z, volume, pitch;
|
||||
#else
|
||||
float x, y, z, volume, pitch;
|
||||
#endif
|
||||
int iSound;
|
||||
bool bIs3D;
|
||||
bool bUseSoundsPitchVal;
|
||||
@@ -86,6 +101,17 @@ typedef struct
|
||||
}
|
||||
AUDIO_INFO;
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
struct MiniAudioSound
|
||||
{
|
||||
ma_sound sound;
|
||||
AUDIO_INFO info;
|
||||
bool active;
|
||||
};
|
||||
|
||||
extern std::vector<MiniAudioSound*> m_activeSounds;
|
||||
#endif
|
||||
|
||||
class SoundEngine : public ConsoleSoundEngine
|
||||
{
|
||||
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
|
||||
@@ -112,7 +138,11 @@ public:
|
||||
int getMusicID(int iDomain);
|
||||
int getMusicID(const wstring& name);
|
||||
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCD1);
|
||||
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
|
||||
#ifdef _WINDOWS64
|
||||
void updateMiniAudio();
|
||||
#else
|
||||
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
|
||||
#endif
|
||||
void playMusicUpdate();
|
||||
|
||||
private:
|
||||
@@ -126,9 +156,18 @@ private:
|
||||
|
||||
int GetRandomishTrack(int iStart,int iEnd);
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
ma_engine m_engine;
|
||||
ma_engine_config m_engineConfig;
|
||||
ma_sound m_musicStream;
|
||||
bool m_musicStreamActive;
|
||||
std::unordered_map<int, std::vector<std::string>> m_soundPathCache;
|
||||
std::unordered_map<int, std::string> m_uiSoundPathCache;
|
||||
#else
|
||||
HMSOUNDBANK m_hBank;
|
||||
HDIGDRIVER m_hDriver;
|
||||
HSTREAM m_hStream;
|
||||
#endif
|
||||
|
||||
static char m_szSoundPath[];
|
||||
static char m_szMusicPath[];
|
||||
|
||||
@@ -127,7 +127,7 @@ CMinecraftApp::CMinecraftApp()
|
||||
m_bChangingSessionType = false;
|
||||
m_bReallyChangingSessionType = false;
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
m_bDebugOptions=false; // make them off by default in a content package build
|
||||
@@ -2386,7 +2386,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad)
|
||||
// Remove the debug settings in the content package build
|
||||
//
|
||||
////////////////////////////
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#ifdef _DEBUG
|
||||
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
#include "stdafx.h"
|
||||
#include "Filesystem.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
bool FileOrDirectoryExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool FileExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool DirectoryExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
char searchPath[MAX_PATH];
|
||||
printf(searchPath, MAX_PATH, "%s\\*", directory);
|
||||
|
||||
WIN32_FIND_DATAA findData;
|
||||
HANDLE hFind = FindFirstFileA(searchPath, &findData);
|
||||
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
// Found a file, copy its path to the output buffer
|
||||
printf(outFilePath, outFilePathSize, "%s\\%s", directory, findData.cFileName);
|
||||
FindClose(hFind);
|
||||
return true;
|
||||
}
|
||||
} while (FindNextFileA(hFind, &findData) != 0);
|
||||
|
||||
FindClose(hFind);
|
||||
return false; // No files found in the directory
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
bool FileOrDirectoryExists(const char* path);
|
||||
bool FileExists(const char* path);
|
||||
bool DirectoryExists(const char* path);
|
||||
bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize);
|
||||
#pragma once
|
||||
@@ -9,7 +9,7 @@ const wstring LeaderboardManager::filterNames[eNumFilterModes] =
|
||||
L"Friends", L"MyScore", L"TopRank"
|
||||
};
|
||||
|
||||
#if defined(__PSVITA__)// str1k3r - only needed for sony platforms.
|
||||
#if !defined(_DURANGO) && !defined(_WINDOWS64) && !defined(_XBOX) && !defined(__ORBIS__) // str1k3r - some platforms complain about this, also this wasnt in the leak?
|
||||
LeaderboardManager *LeaderboardManager::m_instance = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ void SonyLeaderboardManager::scoreboardThreadInternal()
|
||||
// The following NP call should be reserved for asynchronous multiplayer modes that require PS Plus to be accessed.
|
||||
//
|
||||
// Note 2:
|
||||
// The message is not displayed with a user without PlayStation�Plus subscription and they are able to access the Leaderboards.
|
||||
// The message is not displayed with a user without PlayStation®Plus subscription and they are able to access the Leaderboards.
|
||||
|
||||
// NotifyAsyncPlusFeature();
|
||||
|
||||
@@ -204,10 +204,11 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
|
||||
case eFM_Friends:
|
||||
{
|
||||
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
|
||||
#if (defined __PSVITA__)
|
||||
#if (defined __ORBIS__) || (defined __PSVITA__)
|
||||
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> s_friendList;
|
||||
ret = getFriendsList(s_friendList);
|
||||
|
||||
if(ret != SCE_TOOLKIT_NP_SUCCESS)
|
||||
{
|
||||
// Error handling
|
||||
@@ -245,11 +246,7 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
|
||||
|
||||
npIds[0] = myNpId;
|
||||
}
|
||||
#elif (defined __ORBIS__)
|
||||
// Error handling
|
||||
if (m_eStatsState != eStatsState_Canceled) m_eStatsState = eStatsState_Failed;
|
||||
app.DebugPrintf("[SonyLeaderboardManager] 'getFriendslist' fail, 0x%x.\n", ret);
|
||||
return false;
|
||||
|
||||
#elif (defined __PS3__)
|
||||
// PS3
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 80 KiB |
@@ -2,28 +2,14 @@
|
||||
<gamePackage>
|
||||
<language id="00" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m a j n k r a f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m a j n k r e f t</pronunciation>
|
||||
<text>シンプル シューティング ゲーム</text>
|
||||
<pronunciation>sh i N p u r u ___ sh uL t i N g u ___ g eL m u</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
<language id="01" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ay n k r ae f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ay n k r ax f t</pronunciation>
|
||||
<text>simple shooting game</text>
|
||||
<pronunciation>s ih m p ax l ___ sh uw t ih n ___ g ey m</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
<language id="18" modified="0">
|
||||
<speechRecognitionWords>
|
||||
<text>Minecraft</text>
|
||||
<pronunciation>m ih n k r aa f t</pronunciation>
|
||||
</speechRecognitionWords>
|
||||
</language>
|
||||
</gamePackage>
|
||||
</gamePackage>
|
||||
|
||||
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 45 KiB |
@@ -1,93 +1 @@
|
||||
param(
|
||||
[string]$OutDir,
|
||||
[string]$ProjectDir
|
||||
)
|
||||
|
||||
Write-Host "Durango Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"Durango\StoreImages",
|
||||
"Common\Media",
|
||||
"Common\res",
|
||||
"DLCImages",
|
||||
"Tutorial",
|
||||
"Durango",
|
||||
"music",
|
||||
"Sound",
|
||||
"Xbox",
|
||||
"DLC",
|
||||
"CU",
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||
@{ Source = "Durango\Sound"; Dest = "Sound" },
|
||||
@{ Source = "DurangoMedia\DLC"; Dest = "DLC" },
|
||||
@{ Source = "DurangoMedia\Tutorial"; Dest = "Tutorial" },
|
||||
@{ Source = "music"; Dest = "music" },
|
||||
@{ Source = "Durango\DLCImages"; Dest = "DLCImages" },
|
||||
@{ Source = "Durango\CU"; Dest = "CU" },
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
}
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Durango\DurangoExtras\xcompress.dll"; Dest = "xcompress.dll" },
|
||||
@{ Source = "Durango\DLCXbox1.cmp"; Dest = "DLCXbox1.cmp" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
}
|
||||
|
||||
$deleteDirs = @(
|
||||
"Common\Media\Sound",
|
||||
"Common\Media\Graphics",
|
||||
"Common\Media\de-DE",
|
||||
"Common\Media\es-ES",
|
||||
"Common\Media\fr-FR",
|
||||
"Common\Media\it-IT",
|
||||
"Common\Media\ja-JP",
|
||||
"Common\Media\ko-KR",
|
||||
"Common\Media\pt-BR",
|
||||
"Common\Media\pt-PT",
|
||||
"Common\Media\zh-CHT"
|
||||
)
|
||||
|
||||
foreach ($dir in $deleteDirs) {
|
||||
$path = Join-Path $OutDir $dir
|
||||
if (Test-Path $path) {
|
||||
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
$delDirs = @(
|
||||
"Common\Media",
|
||||
"Common\Media\font"
|
||||
)
|
||||
|
||||
foreach ($dir in $delDirs) {
|
||||
if ($delDirs -contains $dir) {
|
||||
$path = Join-Path $OutDir $dir
|
||||
if (Test-Path $path) {
|
||||
Get-ChildItem -Path $path -Recurse -Include *.swf, *.txt, *.resx, *.xml, *.loc, *.lang, *.col, *.h, *.xui, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", MediaWindows64.arc, MediaOrbis.arc, MediaPS3.arc, MediaPSVita.arc -File |
|
||||
Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
}
|
||||
// Currently a stub as we dont know what would go here
|
||||
@@ -6,13 +6,13 @@ param(
|
||||
Write-Host "Orbis Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"PS4_GAME\music",
|
||||
"PS4_GAME\Orbis",
|
||||
"PS4_GAME\Common",
|
||||
"PS4_GAME\Common\Media",
|
||||
"PS4_GAME\Common\Tutorial",
|
||||
"PS4_GAME\Common\res",
|
||||
"PS4_GAME\Orbis\Sound"
|
||||
"music",
|
||||
"Orbis",
|
||||
"Common",
|
||||
"Common\Media",
|
||||
"Common\Tutorial",
|
||||
"Common\res",
|
||||
"Sound"
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
@@ -20,14 +20,14 @@ foreach ($dir in $directories) {
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PS4_GAME\music" },
|
||||
@{ Source = "music\Miles"; Dest = "PS4_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PS4_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS4_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "PS4_GAME\Common\Tutorial" },
|
||||
@{ Source = "PS3\Sound"; Dest = "PS4_GAME\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" }
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" },
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
@@ -41,7 +41,7 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Orbis\PS4ProductCodes.bin"; Dest = "PS4_GAME\Orbis\PS4ProductCodes.bin" },
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" }
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" },
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
|
||||
@@ -19,7 +19,7 @@ foreach ($dir in $directories) {
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PS3_GAME\USRDIR\music" },
|
||||
@{ Source = "music\Miles"; Dest = "PS3_GAME\USRDIR\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PS3_GAME\USRDIR\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS3_GAME\USRDIR\Common\res" },
|
||||
@{ Source = "PS3Media\DLC"; Dest = "PS3_GAME\USRDIR\DLC" },
|
||||
|
||||
@@ -6,12 +6,12 @@ param(
|
||||
Write-Host "PSVita Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"PSVITA_GAME\music",
|
||||
"PSVITA_GAME\PSVita",
|
||||
"PSVITA_GAME\Common",
|
||||
"PSVITA_GAME\Common\Media",
|
||||
"PSVITA_GAME\Common\res",
|
||||
"PSVITA_GAME\Sound"
|
||||
"music",
|
||||
"PSVita",
|
||||
"Common",
|
||||
"Common\Media",
|
||||
"Common\res",
|
||||
"Sound"
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
@@ -19,20 +19,16 @@ foreach ($dir in $directories) {
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PSVITA_GAME\music" },
|
||||
@{ Source = "music\Miles"; Dest = "PSVITA_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PSVITA_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PSVITA_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
|
||||
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
|
||||
$src = $copy.Source
|
||||
} else {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
}
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
@@ -43,7 +39,7 @@ foreach ($copy in $folderCopies) {
|
||||
$fileCopies = @(
|
||||
@{ Source = "PSVita\PSVitaProductCodes.bin"; Dest = "PSVITA_GAME\PSVita\PSVitaProductCodes.bin" },
|
||||
@{ Source = "PSVita\session_image.png"; Dest = "PSVITA_GAME\PSVita\session_image.png" },
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" }
|
||||
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" },
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
|
||||
@@ -21,12 +21,10 @@ foreach ($dir in $directories) {
|
||||
$folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||
@{ Source = "DurangoMedia"; Dest = "Windows64Media" },
|
||||
@{ Source = "Windows64Media"; Dest = "Windows64Media" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" },
|
||||
@{ Source = "Windows64Media\music"; Dest = "Windows64Media\music" },
|
||||
@{ Source = "music\Miniaudio"; Dest = "music" },
|
||||
@{ Source = "Windows64Media\DLC"; Dest = "Windows64Media\DLC" },
|
||||
@{ Source = "Windows64Media\Sound"; Dest = "Windows64Media\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\redist64"; Dest = "redist64" }
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
@@ -39,9 +37,7 @@ foreach ($copy in $folderCopies) {
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\Effects.msscmp"; Dest = "Effects.msscmp" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\iggy_w64.dll"; Dest = "iggy_w64.dll" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\mss64.dll"; Dest = "mss64.dll" }
|
||||
@{ Source = "Common\Postbuilds\Contents\Windows64\iggy_w64.dll"; Dest = "iggy_w64.dll" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "..\..\TexturePack.h"
|
||||
#include "..\..\DLCTexturePack.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
#ifndef _XBOX
|
||||
#include "UI.h"
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "UI.h"
|
||||
#include "UIComponent_PressStartToPlay.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
|
||||
@@ -23,7 +23,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
|
||||
// We don't have a reinstall content, so remove the button
|
||||
removeControl( &m_buttons[BUTTON_HAO_REINSTALL], false );
|
||||
|
||||
#ifdef _FINAL_BUILD
|
||||
#ifndef _DEBUG
|
||||
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
#else
|
||||
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
@@ -121,7 +121,7 @@ void UIScene_HelpAndOptionsMenu::updateComponents()
|
||||
|
||||
void UIScene_HelpAndOptionsMenu::handleReload()
|
||||
{
|
||||
#ifdef _FINAL_BUILD
|
||||
#ifndef _DEBUG
|
||||
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
#else
|
||||
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
|
||||
|
||||
@@ -61,7 +61,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void
|
||||
|
||||
if(m_editingSelf)
|
||||
{
|
||||
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
removeControl( &m_checkboxes[eControl_Op], true );
|
||||
#else
|
||||
m_checkboxes[eControl_Op].init(L"DEBUG: Creative",eControl_Op,Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode));
|
||||
@@ -254,7 +254,7 @@ void UIScene_InGamePlayerOptionsMenu::handleReload()
|
||||
|
||||
if(m_editingSelf)
|
||||
{
|
||||
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
|
||||
removeControl( &m_checkboxes[eControl_Op], true );
|
||||
#endif
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 27 KiB |
@@ -2446,12 +2446,6 @@
|
||||
<ClInclude Include="VillagerGolemRenderer.h">
|
||||
<Filter>net\minecraft\client\renderer\entity</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\Miles\include\mss.h">
|
||||
<Filter>Windows64\Miles Sound System\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\Miles\include\rrcore.h">
|
||||
<Filter>Windows64\Miles Sound System\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Orbis\Miles\include\mss.h">
|
||||
<Filter>Orbis\Miles Sound System\include</Filter>
|
||||
</ClInclude>
|
||||
@@ -3775,6 +3769,15 @@
|
||||
<ClInclude Include="PSVita\OldSdk.h">
|
||||
<Filter>PSVita</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Filesystem\Filesystem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Audio\miniaudio.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Audio\stb_vorbis.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
@@ -5919,6 +5922,9 @@
|
||||
<ClCompile Include="PSVita\OldSdk.cpp">
|
||||
<Filter>PSVita</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\Filesystem\Filesystem.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="Xbox\4JLibs\libs\4J_Render_d.lib">
|
||||
@@ -5978,9 +5984,6 @@
|
||||
<Library Include="Windows64\4JLibs\libs\4J_Input_d.lib">
|
||||
<Filter>Windows64\4JLibs\libs</Filter>
|
||||
</Library>
|
||||
<Library Include="Windows64\Miles\lib\mss64.lib">
|
||||
<Filter>Windows64\Miles Sound System\lib</Filter>
|
||||
</Library>
|
||||
<Library Include="Windows64\Iggy\lib\iggy_w64.lib">
|
||||
<Filter>Windows64\Iggy\lib</Filter>
|
||||
</Library>
|
||||
|
||||
@@ -116,7 +116,11 @@ void Options::init()
|
||||
bobView = true;
|
||||
anaglyph3d = false;
|
||||
advancedOpengl = false;
|
||||
#ifdef _WINDOWS64
|
||||
framerateLimit = 0;
|
||||
#else
|
||||
framerateLimit = 2;
|
||||
#endif
|
||||
fancyGraphics = true;
|
||||
ambientOcclusion = true;
|
||||
renderClouds = true;
|
||||
|
||||
@@ -12,13 +12,9 @@
|
||||
|
||||
// Singleton
|
||||
OrbisNPToolkit NPToolkit;
|
||||
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
|
||||
sce::Toolkit::NP::Utilities::Future< sce::Toolkit::NP::NpSessionInformation > OrbisNPToolkit::sm_createJoinFuture;
|
||||
#endif
|
||||
sce::Toolkit::NP::NpSessionInformation OrbisNPToolkit::m_currentSessionInfo;
|
||||
#ifndef __ORBIS__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::MessageAttachment> OrbisNPToolkit::m_messageData;
|
||||
#endif
|
||||
|
||||
|
||||
void OrbisNPToolkit::presenceCallback( const sce::Toolkit::NP::Event& event )
|
||||
@@ -134,53 +130,29 @@ void OrbisNPToolkit::sessionsCallback( const sce::Toolkit::NP::Event& event)
|
||||
{
|
||||
case sce::Toolkit::NP::Event::npSessionCreateResult: ///< An event generated when the %Np session creation process has been completed.
|
||||
app.DebugPrintf("npSessionCreateResult");
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// no way to retrieve the NpSessionInformation payload; m_currentSessionInfo stays zeroed.
|
||||
if(event.returnCode >= 0)
|
||||
{
|
||||
app.DebugPrintf("Session Created Successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session Creation Failed 0x%x\n",event.returnCode);
|
||||
}
|
||||
#else
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
{
|
||||
app.DebugPrintf("Session Created Successfully\n");
|
||||
m_currentSessionInfo = *sm_createJoinFuture.get();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session Creation Failed 0x%x\n",sm_createJoinFuture.getError());
|
||||
}
|
||||
sm_createJoinFuture.reset();
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::npSessionJoinResult: ///< An event generated when the join %Np session process has been completed.
|
||||
app.DebugPrintf("npSessionJoinResult");
|
||||
#ifdef __ORBIS__
|
||||
if(event.returnCode >= 0)
|
||||
{
|
||||
app.DebugPrintf("Session joined successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session join Failed 0x%x\n",event.returnCode);
|
||||
}
|
||||
#else
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
if(sm_createJoinFuture.hasResult())
|
||||
{
|
||||
app.DebugPrintf("Session joined successfully\n");
|
||||
m_currentSessionInfo = *sm_createJoinFuture.get();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Session join Failed 0x%x\n",sm_createJoinFuture.getError());
|
||||
}
|
||||
sm_createJoinFuture.reset();
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::npSessionError: ///< An event generated when there was error performing the current %Np session process.
|
||||
app.DebugPrintf("npSessionError");
|
||||
@@ -235,12 +207,6 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::gameCustomDataGameDataResult:
|
||||
app.DebugPrintf("gameCustomDataGameDataResult");
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// the MessageAttachment payload can't be retrieved, so invite data is unavailable.
|
||||
app.DebugPrintf("gameCustomDataGameDataResult stubbed (no Future in SDK 1.70), returnCode 0x%08x\n", event.returnCode);
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
if(m_messageData.hasResult())
|
||||
{
|
||||
SQRNetworkManager_Orbis::GetInviteDataAndProcess(m_messageData.get());
|
||||
@@ -263,7 +229,6 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case sce::Toolkit::NP::Event::gameCustomDataMessageResult:
|
||||
app.DebugPrintf("gameCustomDataMessageResult");
|
||||
@@ -385,20 +350,6 @@ void OrbisNPToolkit::init()
|
||||
}
|
||||
|
||||
// Get network status and inform library
|
||||
#ifdef __ORBIS__
|
||||
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
|
||||
// query the net state directly instead of going through NetInfo::getNetInfo
|
||||
int32_t netState = SCE_NET_CTL_STATE_DISCONNECTED;
|
||||
if (sceNetCtlGetState(&netState) == SCE_OK)
|
||||
{
|
||||
ProfileManager.SetNetworkStatus(netState == SCE_NET_CTL_STATE_IPOBTAINED);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error means we're disconnected
|
||||
ProfileManager.SetNetworkStatus(false);
|
||||
}
|
||||
#else
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic> netStateFuture = sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic>();
|
||||
sce::Toolkit::NP::NetInfo::Interface::getNetInfo(&netStateFuture);
|
||||
|
||||
@@ -418,7 +369,6 @@ void OrbisNPToolkit::init()
|
||||
// Error message means we're disconnected
|
||||
ProfileManager.SetNetworkStatus(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
// // Register Client ID for Auth
|
||||
// ret = sce::Toolkit::NP::Interface::registerClientId(CLIENT_ID_FOR_SAMPLE);
|
||||
@@ -459,13 +409,7 @@ void OrbisNPToolkit::createNPSession()
|
||||
char test[3] = {'R','K','B'};
|
||||
createSessionRequest.sessionData= test;
|
||||
createSessionRequest.sessionDataSize = 3;
|
||||
#ifdef __ORBIS__
|
||||
// Sessions::Interface::create requires a Future out-param that SDK 1.70 doesn't implement
|
||||
app.DebugPrintf("createNPSession stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Sessions::Interface::create(&createSessionRequest,&sm_createJoinFuture);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -503,18 +447,12 @@ void OrbisNPToolkit::getMessageData(SceNpGameCustomDataEventParam* paramData)
|
||||
|
||||
req.itemId = paramData->itemId;
|
||||
req.userInfo.userId = userId;
|
||||
#ifdef __ORBIS__
|
||||
// GameCustomData::Interface::getGameData requires a Future out-param that SDK 1.70 doesn't implement
|
||||
app.DebugPrintf("getMessageData stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::GameCustomData::Interface::getGameData(&req, &m_messageData);
|
||||
if( ret < 0 ) {
|
||||
//Error handling
|
||||
} else {
|
||||
//Error handling
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
|
||||
@@ -809,9 +809,7 @@ int SQRNetworkManager_Orbis::BasicEventThreadProc( void *lpParameter )
|
||||
int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
{
|
||||
SQRNetworkManager_Orbis *manager = (SQRNetworkManager_Orbis *)lpParameter;
|
||||
#ifndef __ORBIS__
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
|
||||
#endif
|
||||
|
||||
int ret = 0;
|
||||
manager->m_aFriendSearchResults.clear();
|
||||
@@ -830,13 +828,13 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
|
||||
|
||||
bool async = false;
|
||||
#ifndef __ORBIS__
|
||||
ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, async);
|
||||
if(ret != SCE_OK)
|
||||
{
|
||||
app.DebugPrintf("getFriendslist failed! 0x%08x\n", ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (friendList.hasResult())
|
||||
{
|
||||
sce::Toolkit::NP::FriendsList::const_iterator iter ;
|
||||
@@ -853,11 +851,12 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
|
||||
sce::Toolkit::NP::PresenceRequest presenceRequest;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::PresenceInfo> presenceInfo;
|
||||
int presenceInfo;
|
||||
memset(&presenceRequest,0,sizeof(presenceRequest));
|
||||
strncpy(presenceRequest.onlineId.data,iter->npid.handle.data, strlen(iter->npid.handle.data));
|
||||
presenceRequest.presenceType = SCE_TOOLKIT_NP_PRESENCE_TYPE_INCONTEXT_INFO;
|
||||
presenceRequest.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());;
|
||||
|
||||
|
||||
ret = sce::Toolkit::NP::Presence::Interface::getPresence(&presenceRequest,&presenceInfo,false);
|
||||
if( ret < 0 )
|
||||
{
|
||||
@@ -904,10 +903,6 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
|
||||
app.DebugPrintf("Check sign-in status\n");
|
||||
|
||||
}
|
||||
#else
|
||||
app.DebugPrintf( "Friend list is disabled on this build -UbEr\n");
|
||||
#endif
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -44,11 +44,9 @@ bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/
|
||||
|
||||
|
||||
|
||||
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
|
||||
sce::Toolkit::NP::Utilities::Future<std::vector<sce::Toolkit::NP::ProductInfo> > g_productList;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::CategoryInfo> g_categoryInfo;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::ProductInfoDetailed> g_detailedProductInfo;
|
||||
#endif
|
||||
|
||||
|
||||
SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed;
|
||||
@@ -182,15 +180,8 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
params.serviceLabel = 0;
|
||||
app.DebugPrintf("Getting Product List ...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getProductList requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getProductList stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getProductList(&g_productList, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getProductList() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
@@ -201,8 +192,7 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyProductList(productList, g_productList.get());
|
||||
m_event = e_event_commerceGotProductList;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -251,27 +241,19 @@ int SonyCommerce_Orbis::getCategoryInfo(CategoryInfo *pInfo, char *categoryId)
|
||||
|
||||
app.DebugPrintf("Getting Category Information...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getCategoryInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getCategoryInfo(&g_categoryInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
// error
|
||||
app.DebugPrintf("Commerce::Interface::getCategoryInfo error: 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
else if (g_categoryInfo.hasResult())
|
||||
else if (g_categoryInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyCategoryInfo(pInfo, g_categoryInfo.get());
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -307,28 +289,20 @@ int SonyCommerce_Orbis::getDetailedProductInfo(ProductInfoDetailed *pInfo, const
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -365,27 +339,19 @@ int SonyCommerce_Orbis::addDetailedProductInfo(ProductInfo *pInfo, const char *p
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("addDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::addDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyAddDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceAddedDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -634,7 +600,7 @@ int SonyCommerce_Orbis::createSession()
|
||||
//
|
||||
// sce::Toolkit::NP::Commerce::Interface::CreateSession
|
||||
//
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3 platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3 platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
int ret = sce::Toolkit::NP::Commerce::Interface::createSession();
|
||||
|
||||
@@ -690,12 +656,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
}
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotCategoryInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyCategoryInfo(m_pCategoryInfo, g_categoryInfo.get());
|
||||
#endif
|
||||
m_pCategoryInfo = NULL;
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
break;
|
||||
@@ -703,12 +664,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotProductList:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotProductList stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyProductList(m_pProductInfoList, g_productList.get());
|
||||
#endif
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_event = e_event_commerceGotProductList;
|
||||
break;
|
||||
@@ -716,12 +672,6 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotDetailedProductInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_pProductInfo = NULL;
|
||||
#else
|
||||
if(m_pProductInfoDetailed)
|
||||
{
|
||||
copyDetailedProductInfo(m_pProductInfoDetailed, g_detailedProductInfo.get());
|
||||
@@ -732,7 +682,6 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
copyAddDetailedProductInfo(m_pProductInfo, g_detailedProductInfo.get());
|
||||
m_pProductInfo = NULL;
|
||||
}
|
||||
#endif
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
break;
|
||||
}
|
||||
@@ -1196,8 +1145,8 @@ void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
|
||||
setCallback(cb,lpParam);
|
||||
|
||||
// We don't need to create a session on PS4, from the Sony docs -
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3
|
||||
// platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3
|
||||
// platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,23 +35,14 @@ int g_loadedPCMVoiceDataSizes[4];
|
||||
int g_loadedPCMVoiceDataPos[4];
|
||||
char* g_loadedPCMVoiceData[4];
|
||||
|
||||
static bool CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
|
||||
{
|
||||
C4JThread::PushAffinityAllCores();
|
||||
|
||||
*portId = SCE_VOICE_INVALID_PORT_ID;
|
||||
|
||||
int err = sceVoiceCreatePort(portId, pArg);
|
||||
//assert(err == SCE_OK);
|
||||
//assert(*portId != VOICE_INVALID_PORT_ID);
|
||||
C4JThread::PopAffinity();
|
||||
|
||||
if (err != SCE_OK || *portId == SCE_VOICE_INVALID_PORT_ID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
static void CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
|
||||
{
|
||||
C4JThread::PushAffinityAllCores(); // PS4 only
|
||||
|
||||
int err = sceVoiceCreatePort( portId, pArg );
|
||||
assert(err == SCE_OK);
|
||||
assert(*portId != SCE_VOICE_INVALID_PORT_ID);
|
||||
C4JThread::PopAffinity(); // PS4 only
|
||||
}
|
||||
|
||||
static void DeletePort(uint32_t& port)
|
||||
@@ -131,12 +122,7 @@ void SonyVoiceChat_Orbis::init()
|
||||
portArgs.volume = 1.0f;
|
||||
portArgs.voice.bitrate = VOICE_ENCODED_FORMAT;
|
||||
#endif
|
||||
//CreatePort( &m_voiceOutPort, &portArgs );
|
||||
|
||||
if (!CreatePort(&m_voiceOutPort, &portArgs))
|
||||
{
|
||||
return;
|
||||
}
|
||||
CreatePort( &m_voiceOutPort, &portArgs );
|
||||
|
||||
start();
|
||||
m_bInitialised = true;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
static const int sc_maxVoiceDataSize = 2048;
|
||||
|
||||
|
||||
class VoicePacket
|
||||
{
|
||||
static const int MAX_LOCAL_PLAYER_COUNT = 4;
|
||||
@@ -85,10 +86,10 @@ public:
|
||||
SceUserServiceUserId m_localUserID;
|
||||
|
||||
public:
|
||||
SQRLocalVoiceDevice()
|
||||
: m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
|
||||
, m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
|
||||
SQRLocalVoiceDevice()
|
||||
: m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
|
||||
, m_microphonePort(SCE_VOICE_INVALID_PORT_ID)
|
||||
, m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
|
||||
{
|
||||
for(int i=0;i<4;i++)
|
||||
m_localConnections[i] = 0;
|
||||
|
||||
@@ -1675,69 +1675,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_DESC_SKULL">
|
||||
<value>Mob Heads can be placed as a decoration, or worn as a mask in the helmet slot.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_COMMAND_BLOCK">
|
||||
<value>Used to execute commands.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_BEACON">
|
||||
<value>Projects a beam of light into the sky and can provide Status Effects to nearby players.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_CHEST_TRAP">
|
||||
<value>Stores blocks and items inside. Place two chest side by side to create a larger chest with double capacity. The trapped chest also creates a Redstone charge when opened.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_WEIGHTED_PLATE_LIGHT">
|
||||
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_WEIGHTED_PLATE_HEAVY">
|
||||
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate. Requires more weight than the light plate.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_REDSTONE_BLOCK">
|
||||
<value>Used as a redstone power source. Can be crafted back into Redstone.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HOPPER">
|
||||
<value>Used to catch items or to transfer items into and out of containers.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_ACTIVATOR_RAIL">
|
||||
<value>A type of rail that can enable or disable Minecarts with Hoppers and trigger Minecarts with TNT.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_DROPPER">
|
||||
<value>Used to hold and drop items, or push items into another container, when given a Redstone charge.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_CLAY">
|
||||
<value>Colorful blocks crafted by dyeing Hardened clay.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HAY">
|
||||
<value>Can be fed to Horses, Donkeys or Mules to heal up to 10 Hearts. Speeds up the growth of foals.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_HARDENED_CLAY">
|
||||
<value>Created by smelting Clay in a furnace.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_GLASS">
|
||||
<value>Crafted from glass and a dye.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_STAINED_GLASS_PANE">
|
||||
<value>Crafted from Stained Glass</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DESC_COAL_BLOCK">
|
||||
<value>A compact way of storing Coal. Can be used as fuel in a Furnace.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SQUID">
|
||||
<data name="IDS_SQUID">
|
||||
<value>Squid</value>
|
||||
</data>
|
||||
|
||||
@@ -2955,13 +2895,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_TILE_JUNGLE_PLANKS">
|
||||
<value>Jungle Wood Planks</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TILE_PLANKS">
|
||||
<value>Wood Planks (any type)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TILE_SAPLING">
|
||||
<data name="IDS_TILE_SAPLING">
|
||||
<value>Sapling</value>
|
||||
</data>
|
||||
|
||||
@@ -5752,41 +5688,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_TOOLTIPS_CLEARSLOTS">
|
||||
<value>Clear All Slots</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_MOUNT">
|
||||
<value>Mount</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_DISMOUNT">
|
||||
<value>Dismount</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_SADDLEBAGS">
|
||||
<value>Attach Chest</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_FIREWORK_LAUNCH">
|
||||
<value>Launch</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_LEASH">
|
||||
<value>Leash</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_UNLEASH">
|
||||
<value>Release</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_ATTACH">
|
||||
<value>Attach</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_TOOLTIPS_NAME">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_OK">
|
||||
<data name="IDS_CONFIRM_OK">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
|
||||
@@ -5796,13 +5700,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_DOWNLOADABLECONTENT">
|
||||
<value>Minecraft Store</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_LEAVE_VIA_INVITE">
|
||||
<value>Are you sure you want to leave your current game and join the new one? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_EXIT_GAME">
|
||||
<data name="IDS_EXIT_GAME">
|
||||
<value>Exit Game</value>
|
||||
</data>
|
||||
|
||||
@@ -5832,17 +5732,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT">
|
||||
<value>This save is corrupt or damaged. Would you like to delete it?</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CORRUPT_OPTIONS_RETRY">
|
||||
<value>Str1k3r: Placeholder</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CORRUPT_OPTIONS_DELETE">
|
||||
<value>Str1k3r: Placeholder</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
|
||||
<value>Are you sure you want to exit to the main menu and disconnect all players from the game? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
@@ -5852,13 +5744,9 @@ Can also be used for low-level lighting.</value>
|
||||
|
||||
<data name="IDS_EXIT_GAME_NO_SAVE">
|
||||
<value>Exit without saving</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME">
|
||||
<value>Are you sure you want to exit to the main menu? Any unsaved progress will be lost.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
|
||||
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
|
||||
<value>Are you sure you want to exit to the main menu? Your progress will be lost!</value>
|
||||
</data>
|
||||
|
||||
@@ -6615,13 +6503,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_GAMEMODE_CREATIVE">
|
||||
<value>Game Mode: Creative</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEMODE_ADVENTURE">
|
||||
<value>Game Mode: Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SURVIVAL">
|
||||
<data name="IDS_SURVIVAL">
|
||||
<value>Survival</value>
|
||||
</data>
|
||||
|
||||
@@ -6633,10 +6517,6 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
<value>Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_ADVENTURE">
|
||||
<value>Adventure</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_CREATED_IN_SURVIVAL">
|
||||
<value>Created in Survival Mode</value>
|
||||
</data>
|
||||
@@ -6675,13 +6555,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_LEVELTYPE_SUPERFLAT">
|
||||
<value>Superflat</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_SEED">
|
||||
<value>Enter a seed to generate the same terrain again. Leave blank for a random world.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_ONLINE">
|
||||
<data name="IDS_GAMEOPTION_ONLINE">
|
||||
<value>When enabled, the game will be an online game.</value>
|
||||
</data>
|
||||
|
||||
@@ -6699,29 +6575,13 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_GAMEOPTION_TRUST">
|
||||
<value>When disabled, players joining the game cannot build or mine until authorised.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_INCREASE_WORLD_SIZE">
|
||||
<value>Increase World Size</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
|
||||
<value>Overwrite World Edges</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
|
||||
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
|
||||
<value>When enabled, fire may spread to nearby flammable blocks.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE">
|
||||
<value>Select a larger world size to increase the amount of the world that you can explore. Larger worlds cannot be made smaller again.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
|
||||
<value>When enabled, the outer 32 tiles around the world edge will be overwritten by newly generated tiles to make the world size increase seamless. When disabled, the world size increase will leave all original tiles intact.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
|
||||
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
|
||||
<value>When enabled, TNT will explode when activated.</value>
|
||||
</data>
|
||||
|
||||
@@ -7250,13 +7110,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_MAX_CHICKENS_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding Chickens has been reached.</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_MAX_HORSES_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding horses has been reached.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
|
||||
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
|
||||
<value>This animal can't enter Love Mode. The maximum number of breeding Mooshrooms has been reached.</value>
|
||||
</data>
|
||||
|
||||
@@ -7306,11 +7162,7 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_CREDITS">
|
||||
<value>Credits</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANGUAGE_SELECTOR">
|
||||
<value>Languages</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_REINSTALL_CONTENT">
|
||||
<value>Reinstall Content</value>
|
||||
@@ -7714,25 +7566,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_POTION_POISON">
|
||||
<value>Poison</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_WITHER">
|
||||
<value>Wither</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_HEALTHBOOST">
|
||||
<value>Health Boost</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_ABSORPTION">
|
||||
<value>Absorption</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_SATURATION">
|
||||
<value>Saturation</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_MOVESPEED_POSTFIX">
|
||||
<data name="IDS_POTION_MOVESPEED_POSTFIX">
|
||||
<value>of Swiftness</value>
|
||||
</data>
|
||||
|
||||
@@ -7806,25 +7642,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
|
||||
<data name="IDS_POTION_POISON_POSTFIX">
|
||||
<value>of Poison</value>
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_WITHER_POSTFIX">
|
||||
<value>of Decay</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_HEALTHBOOST_POSTFIX">
|
||||
<value>of Health Boost</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_ABSORPTION_POSTFIX">
|
||||
<value>of Absorption</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_SATURATION_POSTFIX">
|
||||
<value>of Saturation</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_POTENCY_0">
|
||||
<data name="IDS_POTION_POTENCY_0">
|
||||
<value/>
|
||||
|
||||
</data>
|
||||
@@ -8017,10 +7837,6 @@ Would you like to install the mash-up pack or texture pack now?</value>
|
||||
<value>Reduces health of the affected players, animals and monsters over time.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_POTION_EFFECTS_WHENDRANK">
|
||||
<value>When Applied:</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_ATTRIBUTE_NAME_HORSE_JUMPSTRENGTH">
|
||||
<value>Horse Jump Strength</value>
|
||||
</data>
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<data name="IDS_LANG_SYSTEM">
|
||||
<value>System Language</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_ENGLISH">
|
||||
<value>English</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_GERMAN">
|
||||
<value>German</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_SPANISH">
|
||||
<value>Spanish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SPANISH_SPAIN">
|
||||
<value>Spanish (Spain)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SPANISH_LATIN_AMERICA">
|
||||
<value>Spanish (Latin America)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_FRENCH">
|
||||
<value>French</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_ITALIAN">
|
||||
<value>Italian</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_PORTUGUESE">
|
||||
<value>Portuguese</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_PORTUGUESE_PORTUGAL">
|
||||
<value>Portuguese (Portugal)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_PORTUGUESE_BRAZIL">
|
||||
<value>Portuguese (Brazil)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_JAPANESE">
|
||||
<value>Japanese</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_KOREAN">
|
||||
<value>Korean</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_CHINESE_TRADITIONAL">
|
||||
<value>Chinese (Traditional)</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_CHINESE_SIMPLIFIED">
|
||||
<value>Chinese (Simplified)</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_DANISH">
|
||||
<value>Danish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_FINISH">
|
||||
<value>Finnish</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_DUTCH">
|
||||
<value>Dutch</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_POLISH">
|
||||
<value>Polish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_RUSSIAN">
|
||||
<value>Russian</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_SWEDISH">
|
||||
<value>Swedish</value>
|
||||
</data>
|
||||
<data name="IDS_LANG_NORWEGIAN">
|
||||
<value>Norwegian</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_GREEK">
|
||||
<value>Greek</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_LANG_TURKISH">
|
||||
<value>Turkish</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -270,10 +270,6 @@ If you try to save while using the trial version, you will be given the option t
|
||||
<value>Download Failed. Please try again later.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SAVE_TRANSFER_WRONG_VERSION">
|
||||
<value>The saved file in the download area has a version number that Minecraft: PlayStation®4 Edition does not yet support.</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DISCONNECTED_NAT_TYPE_MISMATCH">
|
||||
<value>Failed to join the game due to a restrictive NAT type. Please check your network settings.</value>
|
||||
</data>
|
||||
|
||||
@@ -1,33 +1,110 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common\Leaderboards\SonyLeaderboardManager.h"
|
||||
#include "Common\Leaderboards\LeaderboardManager.h"
|
||||
#include "..\..\Common\Leaderboards\LeaderboardManager.h"
|
||||
#include "..\..\..\Minecraft.World\x64headers\extraX64.h"
|
||||
|
||||
#include "PS3\Passphrase\ps3__np_conf.h"
|
||||
|
||||
class PS3LeaderboardManager : public SonyLeaderboardManager
|
||||
using namespace std;
|
||||
|
||||
class PS3LeaderboardManager : public LeaderboardManager
|
||||
{
|
||||
protected:
|
||||
enum EStatsState
|
||||
{
|
||||
eStatsState_Idle,
|
||||
eStatsState_Getting,
|
||||
eStatsState_Failed,
|
||||
eStatsState_Ready,
|
||||
eStatsState_Canceled,
|
||||
//eStatsState_Writing,
|
||||
eStatsState_Max
|
||||
};
|
||||
|
||||
public:
|
||||
PS3LeaderboardManager();
|
||||
virtual ~PS3LeaderboardManager();
|
||||
|
||||
protected:
|
||||
private:
|
||||
unsigned short m_openSessions;
|
||||
|
||||
virtual HRESULT initialiseScoreUtility();
|
||||
C4JThread *m_threadScoreboard;
|
||||
bool m_running;
|
||||
|
||||
virtual bool scoreUtilityAlreadyInitialised(HRESULT hr);
|
||||
int32_t m_titleContext;
|
||||
int m_transactionCtx;
|
||||
|
||||
virtual HRESULT createTitleContext(const SceNpId &npId);
|
||||
//SceNpId m_myNpId;
|
||||
|
||||
virtual HRESULT destroyTitleContext(int titleContext);
|
||||
static int scoreboardThreadEntry(LPVOID lpParam);
|
||||
void scoreboardThreadInternal();
|
||||
|
||||
virtual HRESULT createTransactionContext(int titleContext);
|
||||
bool getScoreByIds();
|
||||
bool getScoreByRange();
|
||||
|
||||
virtual HRESULT abortTransactionContext(int transactionContext);
|
||||
bool setScore();
|
||||
queue<RegisterScore> m_views;
|
||||
|
||||
virtual HRESULT destroyTransactionContext(int transactionContext);
|
||||
CRITICAL_SECTION m_csViewsLock;
|
||||
|
||||
virtual HRESULT getFriendsList(const SceNpId &myNpId, SceNpId* &npIds, uint32_t &len);
|
||||
EStatsState m_eStatsState; //State of the stats read
|
||||
// EFilterMode m_eFilterMode;
|
||||
|
||||
virtual char * getComment(SceNpScoreComment *comment);
|
||||
ReadScore *m_scores;
|
||||
unsigned int m_maxRank;
|
||||
//SceNpScoreRankData *m_stats;
|
||||
|
||||
public:
|
||||
virtual void Tick();
|
||||
|
||||
//Open a session
|
||||
virtual bool OpenSession();
|
||||
|
||||
//Close a session
|
||||
virtual void CloseSession();
|
||||
|
||||
//Delete a session
|
||||
virtual void DeleteSession();
|
||||
|
||||
//Write the given stats
|
||||
//This is called synchronously and will not free any memory allocated for views when it is done
|
||||
virtual bool WriteStats(unsigned int viewCount, ViewIn views);
|
||||
|
||||
virtual bool ReadStats_Friends(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int startIndex, unsigned int readCount);
|
||||
virtual bool ReadStats_MyScore(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount);
|
||||
virtual bool ReadStats_TopRank(LeaderboardReadListener *listener, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount);
|
||||
|
||||
//Perform a flush of the stats
|
||||
virtual void FlushStats();
|
||||
|
||||
//Cancel the current operation
|
||||
virtual void CancelOperation();
|
||||
|
||||
//Is the leaderboard manager idle.
|
||||
virtual bool isIdle();
|
||||
|
||||
private:
|
||||
int getBoardId(int difficulty, EStatsType);
|
||||
|
||||
//LeaderboardManager::ReadScore *filterJustScorers(unsigned int &num, LeaderboardManager::ReadScore *friendsData);
|
||||
|
||||
SceNpScorePlayerRankData *addPadding(unsigned int num, SceNpScoreRankData *rankData);
|
||||
|
||||
void convertToOutput(unsigned int &num, ReadScore *out, SceNpScorePlayerRankData *rankData, SceNpScoreComment *comm);
|
||||
|
||||
void toBinary(void *out, SceNpScoreComment *in);
|
||||
void fromBinary(SceNpScoreComment **out, void *in);
|
||||
|
||||
void toBase32(SceNpScoreComment *out, void *in);
|
||||
void fromBase32(void *out, SceNpScoreComment *in);
|
||||
|
||||
void toSymbols(char *);
|
||||
void fromSymbols(char *);
|
||||
|
||||
bool test_string(string);
|
||||
|
||||
void initReadScoreStruct(ReadScore &out, SceNpScoreRankData &);
|
||||
void fillReadScoreStruct(ReadScore &out, SceNpScoreComment &comment);
|
||||
|
||||
static bool SortByRank(const ReadScore &lhs, const ReadScore &rhs);
|
||||
};
|
||||
|
||||
|
||||