27 Commits
Author SHA1 Message Date
353eeea217 fix(PS5): PS5 crashing on startup (#17)
Fixed PS5 crashing on startup by migrating to JP sce_sys with english assets. since its the only working nptitle.dat i could find.
Trophies are working as well

---------

Co-authored-by: 552eden <552eden@gmail.com>
Reviewed-on: #17
Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost>
2026-07-26 23:46:04 +00:00
str1k3r 4099ed477d fix(Orbis): stop asserting when voicechat fails 2026-07-22 17:36:58 -04:00
str1k3r f992d40795 Merge branch 'main' into ps4 2026-07-21 21:07:42 +00:00
str1k3r 454fefaf20 Merge branch 'main' into ps4 2026-07-19 16:34:48 +01:00
str1k3r db803a04b5 feat(ps3): use new sonyleaderboardmanager
This also removes SPU objfiles
2026-07-19 10:59:57 -04:00
str1k3r a113e32cb0 feat: move windows64 to its own sentient folder & remove gamehdd saves 2026-07-19 08:03:30 -04:00
str1k3r f19c1b2a30 chore: remove ContentPackage_Vita
This also cleans up the vcxproj so x360 stuff isnt duplicated across platforms
2026-07-19 07:06:14 -04:00
str1k3r 1d9df53595 feat(durango): postbuild estimation 2026-07-19 06:09:34 -04:00
str1k3r 82ce6313c1 feat: ReleaseForArt almost building 2026-07-19 03:23:00 -04:00
str1k3r bb714b3706 feat: build actual final builds & contentpackage almost building
Previously Windows64 Release was just building debug with somethings disabled this builds 1:1 what 4J would of built for consoles using release

This also gets ContentPackage closer to building for Windows64
2026-07-19 00:42:36 -04:00
str1k3r 80f0e4845a fix(PSVita): postbuild copying sounds into wrong spot 2026-07-18 10:39:16 -04:00
str1k3r 5c9171ca3c chore: link postbuilds to all configurations
This also fully removes the Win32 build option
2026-07-18 09:02:39 -04:00
pieeebot 31214d179a chore: remove unnecessary note for PS Vita in README. 2026-07-18 13:29:05 +01:00
str1k3r 9a0c759b65 chore: add ReleaseForArt to .gitignore 2026-07-18 04:59:05 -04:00
str1k3r 8fd70b0fca chore: improve .gitignore 2026-07-18 04:50:21 -04:00
str1k3r 0d66c59e10 Fix(Orbis): build and update readme info for vita
Reviewed-on: https://git.neolegacy.dev/pieeebot/cafeberry/pulls/14
2026-07-18 09:33:17 +01:00
552eden 3092e99d0e fixed ps4 compile issue and updated readme 2026-07-18 11:27:23 +03:00
str1k3r 4c082384c4 refactor: cleaup 2026-07-18 03:27:30 -04:00
str1k3r a8069727c3 feat(psvita): psvita builds
Reviewed-on: https://git.neolegacy.dev/pieeebot/cafeberry/pulls/13
2026-07-18 08:23:10 +01:00
552eden 13b827d21f Merge branch 'ps4' of https://git.neolegacy.dev/pieeebot/cafeberry into ps4
# Conflicts:
#	Minecraft.Client/Common/Leaderboards/SonyLeaderboardManager.cpp
#	Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp
#	Minecraft.Client/Common/UI/UIComponent_PressStartToPlay.cpp
#	Minecraft.Client/OrbisMedia/strings.h
#	MinecraftConsoles.sln
2026-07-18 10:01:09 +03:00
552eden 9f181ba8c1 make vita content package target build 2026-07-18 09:45:14 +03:00
str1k3r 6ee614dfda fix(orbis): better fix for orbis voicechat crash
This most likely can be fixed a more proper way but this is what works and is better then the previous method
2026-07-18 01:19:10 -04:00
str1k3r 388626dbba fix(orbis): strings
Both IDS_CORRUPT_OPTIONS_DELETE & IDS_CORRUPT_OPTIONS_RETRY are placeholders as of now
2026-07-18 00:36:37 -04:00
str1k3r 0a38bb51bc fix(orbis): voicechat crash 2026-07-17 13:45:53 -04:00
str1k3r 9171922767 refactor: cleanup 2026-07-17 13:45:22 -04:00
e70ef09900 first buildable orbis version. a bit ugly. (#9)
this is the first buildable ps4 orbis version

---------

Co-authored-by: 552eden <552eden@gmail.com>
Reviewed-on: https://git.neolegacy.dev/pieeebot/cafeberry/pulls/9
Co-authored-by: ubergamer-pie <81+ubergamer-pie@noreply.neolegacy.dev>
Co-committed-by: ubergamer-pie <81+ubergamer-pie@noreply.neolegacy.dev>
2026-07-17 17:55:42 +01:00
552eden 1bd4a3455c first buildable orbis version. a bit ugly. 2026-07-17 19:24:48 +03:00
769 changed files with 18356 additions and 115414 deletions
+3
View File
@@ -70,6 +70,9 @@ 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:
+43 -48
View File
@@ -1,55 +1,50 @@
/ORBIS_Debug
/ORBIS_Release
/PS3_Debug
/PS3_Release
/PSVita_Debug
/PSVita_Release
/X360_Debug
/X360_Release
/Release
/Debug
/*Debug
/*Release
/*ContentPackage
/*ContentPackage_NO_TU
/*ContentPackage_SYMBOLS
/*ReleaseForArt
/x64
/ipch
.vs/
/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
/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/Windows64/GameHDD
/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
# 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.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
# 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
+58
View File
@@ -0,0 +1,58 @@
@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
+16 -6
View File
@@ -1964,6 +1964,7 @@ 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);
@@ -1974,10 +1975,11 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
friendCount = friendList.get()->size();
}
}
}
}*/
#else // __ORBIS__
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
/*
//sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
std::vector<sce::Toolkit::NP::FriendsList> friendList;
sce::Toolkit::NP::FriendInfoRequest requestParam;
memset(&requestParam,0,sizeof(requestParam));
@@ -1986,14 +1988,16 @@ 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 = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
int ret = 42069;
if( ret == 0 )
{
if( friendList.hasResult() )
if( friendList.hasResult())
{
friendCount = friendList.get()->size();
}
}
}*/
int ret = 42069;
#endif
if( ret == 0 )
{
@@ -2003,12 +2007,18 @@ 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,6 +15,7 @@
#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
+9 -669
View File
@@ -16,17 +16,7 @@
#ifdef _WINDOWS64
#include "..\..\Minecraft.Client\Windows64\Windows64_App.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"
#include "..\..\Minecraft.Client\Windows64\Miles\include\imssapi.h"
#endif
#ifdef __ORBIS__
@@ -87,29 +77,28 @@ char SoundEngine::m_szRedistName[]={"redist"};
char SoundEngine::m_szSoundPath[]={"PS3/Sound/"};
char SoundEngine::m_szMusicPath[]={"music/"};
char SoundEngine::m_szRedistName[]={"redist"};
#ifdef _CONTENT_PACKAGE
#endif
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
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]=
{
@@ -167,7 +156,6 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
// ErrorCallback
//
/////////////////////////////////////////////
#ifndef _WINDOWS64
void AILCALL ErrorCallback(S64 i_Id, char const* i_Details)
{
char *pchLastError=AIL_last_error();
@@ -182,7 +170,6 @@ 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
@@ -215,7 +202,6 @@ void AILCALL MilesMixerCB(HDIGDRIVER dig)
/////////////////////////////////////////////
void SoundEngine::init(Options *pOptions)
{
#ifndef _WINDOWS64
app.DebugPrintf("---SoundEngine::init\n");
#ifdef __DISABLE_MILES__
return;
@@ -385,31 +371,6 @@ 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__
@@ -439,7 +400,6 @@ 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__
@@ -652,110 +612,6 @@ 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
@@ -842,11 +698,7 @@ void SoundEngine::tick(shared_ptr<Mob> *players, float a)
LeaveCriticalSection(&SoundEngine_MixerMutex);
#else
#ifndef _WINDOWS64
updateMiles();
#else
updateMiniAudio();
#endif
#endif
}
@@ -858,13 +710,7 @@ 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;
@@ -946,7 +792,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;
@@ -963,124 +809,6 @@ 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
}
/////////////////////////////////////////////
@@ -1092,9 +820,6 @@ 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
@@ -1107,9 +832,6 @@ 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
{
@@ -1120,9 +842,6 @@ 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);
@@ -1130,7 +849,6 @@ 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));
@@ -1153,82 +871,6 @@ 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
}
/////////////////////////////////////////////
@@ -1492,42 +1134,12 @@ 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;
}
@@ -1547,7 +1159,6 @@ 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;
@@ -1730,150 +1341,10 @@ 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;
@@ -1939,63 +1410,6 @@ 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() )
@@ -2007,46 +1421,18 @@ 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)
@@ -2128,7 +1514,6 @@ void SoundEngine::playMusicUpdate()
}
// volume change required?
#ifndef _WINDOWS64
if(fMusicVol!=getMasterMusicVolume())
{
fMusicVol=getMasterMusicVolume();
@@ -2136,14 +1521,6 @@ 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
@@ -2151,7 +1528,6 @@ 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)
@@ -2190,40 +1566,6 @@ 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;
@@ -2275,7 +1617,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
@@ -2288,7 +1630,6 @@ void SoundEngine::playMusicUpdate()
m_StreamState=eMusicStreamState_Completed;
}
}
#endif
}
@@ -2317,7 +1658,7 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac
#endif
#ifndef _WINDOWS64
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
F32 distance,
F32 rolloff_factor,
@@ -2340,4 +1681,3 @@ F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
return result;
}
#endif
+2 -41
View File
@@ -3,17 +3,6 @@ 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
{
@@ -87,11 +76,7 @@ enum MUSIC_STREAMSTATE
typedef struct
{
#ifndef _WINDOWS64
F32 x, y, z, volume, pitch;
#else
float x, y, z, volume, pitch;
#endif
F32 x,y,z,volume,pitch;
int iSound;
bool bIs3D;
bool bUseSoundsPitchVal;
@@ -101,17 +86,6 @@ 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
@@ -138,11 +112,7 @@ 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);
#ifdef _WINDOWS64
void updateMiniAudio();
#else
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
#endif
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
void playMusicUpdate();
private:
@@ -156,18 +126,9 @@ 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[];
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -127,7 +127,7 @@ CMinecraftApp::CMinecraftApp()
m_bChangingSessionType = false;
m_bReallyChangingSessionType = false;
#ifdef _DEBUG
#ifdef _DEBUG_MENUS_ENABLED
#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
#ifdef _DEBUG_MENUS_ENABLED
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
return 0;
@@ -1,62 +0,0 @@
#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
}
@@ -1,7 +0,0 @@
#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(_DURANGO) && !defined(_WINDOWS64) && !defined(_XBOX) && !defined(__ORBIS__) // str1k3r - some platforms complain about this, also this wasnt in the leak?
#if defined(__PSVITA__)// str1k3r - only needed for sony platforms.
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 PlayStationPlus subscription and they are able to access the Leaderboards.
// NotifyAsyncPlusFeature();
@@ -204,11 +204,10 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
case eFM_Friends:
{
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
#if (defined __ORBIS__) || (defined __PSVITA__)
#if (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
@@ -246,7 +245,11 @@ 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
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

@@ -2,14 +2,28 @@
<gamePackage>
<language id="00" modified="0">
<speechRecognitionWords>
<text>シンプル シューティング ゲーム</text>
<pronunciation>sh i N p u r u ___ sh uL t i N g u ___ g eL m u</pronunciation>
<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>
</speechRecognitionWords>
</language>
<language id="01" modified="0">
<speechRecognitionWords>
<text>simple shooting game</text>
<pronunciation>s ih m p ax l ___ sh uw t ih n ___ g ey m</pronunciation>
<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>
</speechRecognitionWords>
</language>
</gamePackage>
<language id="18" modified="0">
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m ih n k r aa f t</pronunciation>
</speechRecognitionWords>
</language>
</gamePackage>
Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

@@ -1 +1,93 @@
// Currently a stub as we dont know what would go here
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
}
}
}
@@ -6,13 +6,13 @@ param(
Write-Host "Orbis Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"music",
"Orbis",
"Common",
"Common\Media",
"Common\Tutorial",
"Common\res",
"Sound"
"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"
)
foreach ($dir in $directories) {
@@ -20,14 +20,14 @@ foreach ($dir in $directories) {
}
$folderCopies = @(
@{ Source = "music\Miles"; Dest = "PS4_GAME\music" },
@{ Source = "music"; 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\Miles"; Dest = "PS3_GAME\USRDIR\music" },
@{ Source = "music"; 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 = @(
"music",
"PSVita",
"Common",
"Common\Media",
"Common\res",
"Sound"
"PSVITA_GAME\music",
"PSVITA_GAME\PSVita",
"PSVITA_GAME\Common",
"PSVITA_GAME\Common\Media",
"PSVITA_GAME\Common\res",
"PSVITA_GAME\Sound"
)
foreach ($dir in $directories) {
@@ -19,16 +19,20 @@ foreach ($dir in $directories) {
}
$folderCopies = @(
@{ Source = "music\Miles"; Dest = "PSVITA_GAME\music" },
@{ Source = "music"; 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\Sound" },
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_module"; Dest = "PSVITA_GAME\sce_module" },
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
)
foreach ($copy in $folderCopies) {
$src = Join-Path $ProjectDir $copy.Source
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
$src = $copy.Source
} else {
$src = Join-Path $ProjectDir $copy.Source
}
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
@@ -39,7 +43,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,10 +21,12 @@ foreach ($dir in $directories) {
$folderCopies = @(
@{ Source = "Common\Media"; Dest = "Common\Media" },
@{ Source = "Common\res"; Dest = "Common\res" },
@{ Source = "music\Miniaudio"; Dest = "music" },
@{ Source = "Windows64Media\DLC"; Dest = "Windows64Media\DLC" },
@{ Source = "DurangoMedia"; Dest = "Windows64Media" },
@{ Source = "Windows64Media"; Dest = "Windows64Media" },
@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" },
@{ Source = "Windows64Media\music"; Dest = "Windows64Media\music" },
@{ Source = "Windows64Media\Sound"; Dest = "Windows64Media\Sound" },
@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" }
@{ Source = "Common\Postbuilds\Contents\Windows64\redist64"; Dest = "redist64" }
)
foreach ($copy in $folderCopies) {
@@ -37,7 +39,9 @@ foreach ($copy in $folderCopies) {
}
$fileCopies = @(
@{ Source = "Common\Postbuilds\Contents\Windows64\iggy_w64.dll"; Dest = "iggy_w64.dll" }
@{ 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" }
)
foreach ($copy in $fileCopies) {
@@ -10,7 +10,6 @@
#include "..\..\TexturePack.h"
#include "..\..\DLCTexturePack.h"
#include "..\..\..\Minecraft.World\StringHelpers.h"
#ifndef _XBOX
#include "UI.h"
#endif
@@ -2,7 +2,6 @@
#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 );
#ifndef _DEBUG
#ifdef _FINAL_BUILD
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()
{
#ifndef _DEBUG
#ifdef _FINAL_BUILD
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)
{
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
#if (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)
{
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
removeControl( &m_checkboxes[eControl_Op], true );
#endif
Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load Diff
@@ -2446,6 +2446,12 @@
<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>
@@ -3769,15 +3775,6 @@
<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">
@@ -5922,9 +5919,6 @@
<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">
@@ -5984,6 +5978,9 @@
<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>
-4
View File
@@ -116,11 +116,7 @@ void Options::init()
bobView = true;
anaglyph3d = false;
advancedOpengl = false;
#ifdef _WINDOWS64
framerateLimit = 0;
#else
framerateLimit = 2;
#endif
fancyGraphics = true;
ambientOcclusion = true;
renderClouds = true;
@@ -12,9 +12,13 @@
// 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 )
@@ -130,29 +134,53 @@ 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");
if(sm_createJoinFuture.hasResult())
#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())
{
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");
if(sm_createJoinFuture.hasResult())
#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())
{
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");
@@ -207,6 +235,12 @@ 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());
@@ -229,6 +263,7 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
break;
}
}
#endif
break;
case sce::Toolkit::NP::Event::gameCustomDataMessageResult:
app.DebugPrintf("gameCustomDataMessageResult");
@@ -350,6 +385,20 @@ 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);
@@ -369,6 +418,7 @@ 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);
@@ -409,7 +459,13 @@ 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
}
@@ -447,12 +503,18 @@ 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,7 +809,9 @@ 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();
@@ -828,13 +830,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 ;
@@ -851,12 +853,11 @@ 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 )
{
@@ -903,6 +904,10 @@ 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,9 +44,11 @@ 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;
@@ -180,8 +182,15 @@ 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;
@@ -192,7 +201,8 @@ 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;
}
@@ -241,19 +251,27 @@ 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;
}
@@ -289,20 +307,28 @@ int SonyCommerce_Orbis::getDetailedProductInfo(ProductInfoDetailed *pInfo, const
strcpy(params.productId, productId);
app.DebugPrintf("Getting Detailed Product Information ... \n");
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
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;
}
@@ -339,19 +365,27 @@ int SonyCommerce_Orbis::addDetailedProductInfo(ProductInfo *pInfo, const char *p
strcpy(params.productId, productId);
app.DebugPrintf("Getting Detailed Product Information ... \n");
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
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;
}
@@ -600,7 +634,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 PlayStationVita and PlayStation3 platforms. Because commerce on the PlayStation4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
int ret = sce::Toolkit::NP::Commerce::Interface::createSession();
@@ -656,7 +690,12 @@ 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;
@@ -664,7 +703,12 @@ 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;
@@ -672,6 +716,12 @@ 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());
@@ -682,6 +732,7 @@ 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;
}
@@ -1145,8 +1196,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 PlayStationVita and PlayStation3
// platforms. Because commerce on the PlayStation4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
@@ -35,14 +35,23 @@ int g_loadedPCMVoiceDataSizes[4];
int g_loadedPCMVoiceDataPos[4];
char* g_loadedPCMVoiceData[4];
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 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 DeletePort(uint32_t& port)
@@ -122,7 +131,12 @@ void SonyVoiceChat_Orbis::init()
portArgs.volume = 1.0f;
portArgs.voice.bitrate = VOICE_ENCODED_FORMAT;
#endif
CreatePort( &m_voiceOutPort, &portArgs );
//CreatePort( &m_voiceOutPort, &portArgs );
if (!CreatePort(&m_voiceOutPort, &portArgs))
{
return;
}
start();
m_bInitialised = true;
@@ -8,7 +8,6 @@
static const int sc_maxVoiceDataSize = 2048;
class VoicePacket
{
static const int MAX_LOCAL_PLAYER_COUNT = 4;
@@ -86,10 +85,10 @@ public:
SceUserServiceUserId m_localUserID;
public:
SQRLocalVoiceDevice()
: m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
SQRLocalVoiceDevice()
: m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
, 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,9 +1675,69 @@ 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_SQUID">
<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">
<value>Squid</value>
</data>
@@ -2895,9 +2955,13 @@ 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_SAPLING">
<data name="IDS_TILE_PLANKS">
<value>Wood Planks (any type)</value>
</data>
<data name="IDS_TILE_SAPLING">
<value>Sapling</value>
</data>
@@ -5688,9 +5752,41 @@ Can also be used for low-level lighting.</value>
<data name="IDS_TOOLTIPS_CLEARSLOTS">
<value>Clear All Slots</value>
</data>
</data>
<data name="IDS_CONFIRM_OK">
<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">
<value>OK</value>
</data>
@@ -5700,9 +5796,13 @@ Can also be used for low-level lighting.</value>
<data name="IDS_DOWNLOADABLECONTENT">
<value>Minecraft Store</value>
</data>
</data>
<data name="IDS_EXIT_GAME">
<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">
<value>Exit Game</value>
</data>
@@ -5732,9 +5832,17 @@ 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_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
<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">
<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>
@@ -5744,9 +5852,13 @@ 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_PROGRESS_LOST">
<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">
<value>Are you sure you want to exit to the main menu? Your progress will be lost!</value>
</data>
@@ -6503,9 +6615,13 @@ 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_SURVIVAL">
<data name="IDS_GAMEMODE_ADVENTURE">
<value>Game Mode: Adventure</value>
</data>
<data name="IDS_SURVIVAL">
<value>Survival</value>
</data>
@@ -6517,6 +6633,10 @@ 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>
@@ -6555,9 +6675,13 @@ 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_ONLINE">
<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">
<value>When enabled, the game will be an online game.</value>
</data>
@@ -6575,13 +6699,29 @@ 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_GAMEOPTION_FIRE_SPREADS">
<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">
<value>When enabled, fire may spread to nearby flammable blocks.</value>
</data>
</data>
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
<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">
<value>When enabled, TNT will explode when activated.</value>
</data>
@@ -7110,9 +7250,13 @@ 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_MUSHROOMCOWS_BRED">
<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">
<value>This animal can't enter Love Mode. The maximum number of breeding Mooshrooms has been reached.</value>
</data>
@@ -7162,7 +7306,11 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_CREDITS">
<value>Credits</value>
</data>
</data>
<data name="IDS_LANGUAGE_SELECTOR">
<value>Languages</value>
</data>
<data name="IDS_REINSTALL_CONTENT">
<value>Reinstall Content</value>
@@ -7566,9 +7714,25 @@ 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_MOVESPEED_POSTFIX">
<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">
<value>of Swiftness</value>
</data>
@@ -7642,9 +7806,25 @@ 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_POTENCY_0">
<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">
<value/>
</data>
@@ -7837,6 +8017,10 @@ 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>
@@ -0,0 +1,88 @@
<?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,6 +270,10 @@ 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>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,110 +1,33 @@
#pragma once
#include "..\..\Common\Leaderboards\LeaderboardManager.h"
#include "..\..\..\Minecraft.World\x64headers\extraX64.h"
#include "Common\Leaderboards\SonyLeaderboardManager.h"
#include "Common\Leaderboards\LeaderboardManager.h"
#include "PS3\Passphrase\ps3__np_conf.h"
using namespace std;
class PS3LeaderboardManager : public LeaderboardManager
class PS3LeaderboardManager : public SonyLeaderboardManager
{
protected:
enum EStatsState
{
eStatsState_Idle,
eStatsState_Getting,
eStatsState_Failed,
eStatsState_Ready,
eStatsState_Canceled,
//eStatsState_Writing,
eStatsState_Max
};
public:
PS3LeaderboardManager();
virtual ~PS3LeaderboardManager();
private:
unsigned short m_openSessions;
protected:
C4JThread *m_threadScoreboard;
bool m_running;
virtual HRESULT initialiseScoreUtility();
int32_t m_titleContext;
int m_transactionCtx;
virtual bool scoreUtilityAlreadyInitialised(HRESULT hr);
//SceNpId m_myNpId;
virtual HRESULT createTitleContext(const SceNpId &npId);
static int scoreboardThreadEntry(LPVOID lpParam);
void scoreboardThreadInternal();
virtual HRESULT destroyTitleContext(int titleContext);
bool getScoreByIds();
bool getScoreByRange();
virtual HRESULT createTransactionContext(int titleContext);
bool setScore();
queue<RegisterScore> m_views;
virtual HRESULT abortTransactionContext(int transactionContext);
CRITICAL_SECTION m_csViewsLock;
virtual HRESULT destroyTransactionContext(int transactionContext);
EStatsState m_eStatsState; //State of the stats read
// EFilterMode m_eFilterMode;
virtual HRESULT getFriendsList(const SceNpId &myNpId, SceNpId* &npIds, uint32_t &len);
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);
virtual char * getComment(SceNpScoreComment *comment);
};

Some files were not shown because too many files have changed in this diff Show More