forked from cafeberry/cafeberry
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a49df36cc | ||
|
|
bad3a41225 |
@@ -406,12 +406,6 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD
|
||||
unsigned int uiVersion=*(unsigned int *)pbData;
|
||||
uiCurrentByte+=sizeof(int);
|
||||
|
||||
if(uiVersion > CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
if(pbData!=NULL) delete [] pbData;
|
||||
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
|
||||
return false;
|
||||
}
|
||||
if(uiVersion < CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
if(pbData!=NULL) delete [] pbData;
|
||||
@@ -619,11 +613,6 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack)
|
||||
unsigned int uiVersion=*(unsigned int *)pbData;
|
||||
uiCurrentByte+=sizeof(int);
|
||||
|
||||
if(uiVersion > CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
|
||||
return 0;
|
||||
}
|
||||
if(uiVersion < CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
base64.cpp and base64.h
|
||||
|
||||
Copyright (C) 2004-2008 Ren� Nyffenegger
|
||||
Copyright (C) 2004-2008 René Nyffenegger
|
||||
|
||||
This source code is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the author be held liable for any damages
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Ren� Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ static inline bool is_base64(unsigned char c) {
|
||||
}
|
||||
|
||||
// 4J ADDED,
|
||||
std::string base64_encode(const std::string& str)
|
||||
std::string base64_encode(std::string str)
|
||||
{
|
||||
return base64_encode( reinterpret_cast<const unsigned char*>(str.c_str()), str.length() );
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
std::string base64_encode(const std::string& str);
|
||||
std::string base64_encode(std::string str);
|
||||
std::string base64_encode(unsigned char const* , unsigned int len);
|
||||
std::string base64_decode(std::string const& s);
|
||||
@@ -314,13 +314,13 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
// Make sure that we have transitioned through any joining/creating stages and are actually playing the game, so that we know the players should be valid
|
||||
bool changedMessage = false;
|
||||
while(!IsReadyToPlayOrIdle())
|
||||
{
|
||||
changedMessage = true;
|
||||
pMinecraft->progressRenderer->progressStage( g_NetworkManager.CorrectErrorIDS(IDS_PROGRESS_SAVING_TO_DISC) ); // "Finalizing..." vaguest message I could find
|
||||
pMinecraft->progressRenderer->progressStagePercentage( g_NetworkManager.GetJoiningReadyPercentage() );
|
||||
Sleep(0);
|
||||
}
|
||||
while(!IsReadyToPlayOrIdle())
|
||||
{
|
||||
changedMessage = true;
|
||||
pMinecraft->progressRenderer->progressStage( g_NetworkManager.CorrectErrorIDS(IDS_PROGRESS_SAVING_TO_DISC) ); // "Finalizing..." vaguest message I could find
|
||||
pMinecraft->progressRenderer->progressStagePercentage( g_NetworkManager.GetJoiningReadyPercentage() );
|
||||
Sleep(10);
|
||||
}
|
||||
if( changedMessage )
|
||||
{
|
||||
pMinecraft->progressRenderer->progressStagePercentage( 100 );
|
||||
@@ -898,7 +898,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
|
||||
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
|
||||
while ( tPack->isLoadingData() || (Minecraft::GetInstance()->skins->needsUIUpdate() || ui.IsReloadingSkin()) )
|
||||
{
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
}
|
||||
ui.CleanUpSkinReload();
|
||||
if(app.GetDisconnectReason() == DisconnectPacket::eDisconnect_None)
|
||||
@@ -935,7 +935,7 @@ int CGameNetworkManager::ServerThreadProc( void* lpParameter )
|
||||
{
|
||||
while((Minecraft::GetInstance()->skins->needsUIUpdate() || ui.IsReloadingSkin()))
|
||||
{
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
}
|
||||
param->levelGen->loadBaseSaveData();
|
||||
}
|
||||
@@ -977,7 +977,7 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc( void* lpParam )
|
||||
|
||||
while( g_NetworkManager.IsInSession() )
|
||||
{
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
// Xbox should always be online when receiving invites - on PS3 we need to check & ask the user to sign in
|
||||
@@ -1237,7 +1237,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
|
||||
// wait for the current session to end
|
||||
while( g_NetworkManager.IsInSession() )
|
||||
{
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
// Reset this flag as the we don't need to know that we only lost the room only from this point onwards, the behaviour is exactly the same
|
||||
|
||||
@@ -454,7 +454,12 @@ void CXuiSceneAbstractContainer::SetPointerText(vector<HtmlString> *description,
|
||||
return;
|
||||
}
|
||||
|
||||
wstring combinedText = HtmlString::Compose(description);
|
||||
wstring combinedText;
|
||||
for(size_t i = 0; i < description->size(); ++i)
|
||||
{
|
||||
combinedText += (*description)[i].text;
|
||||
if(i + 1 < description->size()) combinedText += L"\n";
|
||||
}
|
||||
|
||||
vector<wstring> unformattedStrings;
|
||||
for(size_t i = 0; i < description->size(); ++i)
|
||||
|
||||
@@ -145,11 +145,10 @@ void EnderDragonRenderer::render(shared_ptr<Entity> _mob, double x, double y, do
|
||||
int steps = 8;
|
||||
for (int i = 0; i <= steps; i++)
|
||||
{
|
||||
int idx = i % steps;
|
||||
double d = idx * PI * 2 / steps;
|
||||
float s = sin(d) * 0.75f;
|
||||
float c = cos(d) * 0.75f;
|
||||
float u = idx * 1.0f / steps;
|
||||
double d=i % steps * PI * 2 / steps;
|
||||
float s = sin(i % steps * PI * 2 / steps) * 0.75f;
|
||||
float c = cos(i % steps * PI * 2 / steps) * 0.75f;
|
||||
float u = i % steps * 1.0f / steps;
|
||||
//t->color(0x000000);
|
||||
t->vertexUV(s * 0.2f, c * 0.2f, 0, u, v1);
|
||||
//t->color(0xffffff);
|
||||
|
||||
@@ -94,17 +94,6 @@ void EntityRenderDispatcher::staticCtor()
|
||||
instance = new EntityRenderDispatcher();
|
||||
}
|
||||
|
||||
EntityRenderDispatcher::~EntityRenderDispatcher()
|
||||
{
|
||||
AUTO_VAR(itEnd, renderers.end());
|
||||
for( classToRendererMap::iterator it = renderers.begin(); it != itEnd; it++ )
|
||||
{
|
||||
delete it->second;
|
||||
it->second = NULL;
|
||||
}
|
||||
renderers.clear();
|
||||
}
|
||||
|
||||
EntityRenderDispatcher::EntityRenderDispatcher()
|
||||
{
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "EntityRenderer.h"
|
||||
#include "..\Minecraft.World\Entity.h"
|
||||
#include "..\Minecraft.World\JavaIntHash.h"
|
||||
class Entity;
|
||||
class font;
|
||||
using namespace std;
|
||||
|
||||
@@ -37,7 +37,6 @@ public:
|
||||
|
||||
private:
|
||||
EntityRenderDispatcher();
|
||||
~EntityRenderDispatcher();
|
||||
|
||||
public:
|
||||
EntityRenderer *getRenderer(eINSTANCEOF e);
|
||||
|
||||
@@ -105,6 +105,8 @@ GameRenderer::GameRenderer(Minecraft *mc)
|
||||
zoom = 1;
|
||||
zoom_x = 0;
|
||||
zoom_y = 0;
|
||||
rainXa = NULL;
|
||||
rainZa = NULL;
|
||||
lastActiveTime = Minecraft::currentTimeMillis();
|
||||
lastNsTime = 0;
|
||||
random = new Random();
|
||||
@@ -179,9 +181,8 @@ GameRenderer::GameRenderer(Minecraft *mc)
|
||||
// 4J Stu Added to go with 1.8.2 change
|
||||
GameRenderer::~GameRenderer()
|
||||
{
|
||||
delete random;
|
||||
delete cameraPos;
|
||||
delete lb;
|
||||
if(rainXa != NULL) delete [] rainXa;
|
||||
if(rainZa != NULL) delete [] rainZa;
|
||||
}
|
||||
|
||||
void GameRenderer::tick(bool first) // 4J - add bFirst
|
||||
@@ -837,21 +838,19 @@ void GameRenderer::updateLightTexture(float a)
|
||||
Level *level = player->level; // 4J - was mc->level when it was just to update the one light texture
|
||||
|
||||
float skyDarken1 = level->getSkyDarken((float) 1);
|
||||
float darken = skyDarken1 * 0.95f + 0.05f;
|
||||
float rsGsMul = skyDarken1 * 0.65f + 0.35f;
|
||||
float blockMul = blr * 0.1f + 1.5f;
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
float darken = skyDarken1 * 0.95f + 0.05f;
|
||||
float sky = level->dimension->brightnessRamp[i / 16] * darken;
|
||||
float block = level->dimension->brightnessRamp[i % 16] * blockMul;
|
||||
float block = level->dimension->brightnessRamp[i % 16] * (blr * 0.1f + 1.5f);
|
||||
|
||||
if (level->skyFlashTime > 0)
|
||||
{
|
||||
sky = level->dimension->brightnessRamp[i / 16];
|
||||
}
|
||||
|
||||
float rs = sky * rsGsMul;
|
||||
float gs = sky * rsGsMul;
|
||||
float rs = sky * (skyDarken1 * 0.65f + 0.35f);
|
||||
float gs = sky * (skyDarken1 * 0.65f + 0.35f);
|
||||
float bs = sky;
|
||||
|
||||
float rb = block;
|
||||
@@ -1527,30 +1526,27 @@ void GameRenderer::tickRain()
|
||||
int x = x0 + random->nextInt(r) - random->nextInt(r);
|
||||
int z = z0 + random->nextInt(r) - random->nextInt(r);
|
||||
int y = level->getTopRainBlock(x, z);
|
||||
if (y <= y0 + r && y >= y0 - r)
|
||||
int t = level->getTile(x, y - 1, z);
|
||||
Biome *biome = level->getBiome(x,z);
|
||||
if (y <= y0 + r && y >= y0 - r && biome->hasRain() && biome->getTemperature() >= 0.2f)
|
||||
{
|
||||
int t = level->getTile(x, y - 1, z);
|
||||
Biome *biome = level->getBiome(x,z);
|
||||
if (biome->hasRain() && biome->getTemperature() >= 0.2f)
|
||||
float xa = random->nextFloat();
|
||||
float za = random->nextFloat();
|
||||
if (t > 0)
|
||||
{
|
||||
float xa = random->nextFloat();
|
||||
float za = random->nextFloat();
|
||||
if (t > 0)
|
||||
if (Tile::tiles[t]->material == Material::lava)
|
||||
{
|
||||
if (Tile::tiles[t]->material == Material::lava)
|
||||
mc->particleEngine->add( shared_ptr<SmokeParticle>( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (random->nextInt(++rainPosSamples) == 0)
|
||||
{
|
||||
mc->particleEngine->add( shared_ptr<SmokeParticle>( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (random->nextInt(++rainPosSamples) == 0)
|
||||
{
|
||||
rainPosX = x + xa;
|
||||
rainPosY = y + 0.1f - Tile::tiles[t]->getShapeY0();
|
||||
rainPosZ = z + za;
|
||||
}
|
||||
mc->particleEngine->add( shared_ptr<WaterDropParticle>( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) );
|
||||
rainPosX = x + xa;
|
||||
rainPosY = y + 0.1f - Tile::tiles[t]->getShapeY0();
|
||||
rainPosZ = z + za;
|
||||
}
|
||||
mc->particleEngine->add( shared_ptr<WaterDropParticle>( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1585,12 +1581,10 @@ void GameRenderer::renderSnowAndRain(float a)
|
||||
|
||||
turnOnLightLayer(a);
|
||||
|
||||
static float rainXa[32 * 32];
|
||||
static float rainZa[32 * 32];
|
||||
static bool rainArraysInitialized = false;
|
||||
if (!rainArraysInitialized)
|
||||
if (rainXa == NULL)
|
||||
{
|
||||
rainArraysInitialized = true;
|
||||
rainXa = new float[32 * 32];
|
||||
rainZa = new float[32 * 32];
|
||||
|
||||
for (int z = 0; z < 32; z++)
|
||||
{
|
||||
|
||||
@@ -128,6 +128,8 @@ private:
|
||||
void tickRain();
|
||||
private:
|
||||
// 4J - brought forward from 1.8.2
|
||||
float *rainXa;
|
||||
float *rainZa;
|
||||
protected:
|
||||
void renderSnowAndRain(float a);
|
||||
volatile int xMod;
|
||||
|
||||
@@ -10,7 +10,7 @@ ResourceLocation HorseRenderer::HORSE_DONKEY_LOCATION = ResourceLocation(TN_MOB_
|
||||
ResourceLocation HorseRenderer::HORSE_ZOMBIE_LOCATION = ResourceLocation(TN_MOB_HORSE_ZOMBIE);
|
||||
ResourceLocation HorseRenderer::HORSE_SKELETON_LOCATION = ResourceLocation(TN_MOB_HORSE_SKELETON);
|
||||
|
||||
std::map<wstring, ResourceLocation> HorseRenderer::LAYERED_LOCATION_CACHE;
|
||||
std::map<wstring, ResourceLocation *> HorseRenderer::LAYERED_LOCATION_CACHE;
|
||||
|
||||
HorseRenderer::HorseRenderer(Model *model, float f) : MobRenderer(model, f)
|
||||
{
|
||||
@@ -114,14 +114,14 @@ ResourceLocation *HorseRenderer::getOrCreateLayeredTextureLocation(shared_ptr<En
|
||||
ResourceLocation *location;
|
||||
if (it != LAYERED_LOCATION_CACHE.end())
|
||||
{
|
||||
location = &(it->second);
|
||||
location = it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
LAYERED_LOCATION_CACHE[textureName] = ResourceLocation(horse->getLayeredTextureLayers());
|
||||
LAYERED_LOCATION_CACHE[textureName] = new ResourceLocation(horse->getLayeredTextureLayers());
|
||||
|
||||
it = LAYERED_LOCATION_CACHE.find(textureName);
|
||||
location = &(it->second);
|
||||
location = it->second;
|
||||
}
|
||||
|
||||
return location;
|
||||
|
||||
@@ -8,7 +8,7 @@ class PathfinderMob;
|
||||
class HorseRenderer : public MobRenderer
|
||||
{
|
||||
private:
|
||||
static std::map<wstring, ResourceLocation> LAYERED_LOCATION_CACHE;
|
||||
static std::map<wstring, ResourceLocation *> LAYERED_LOCATION_CACHE;
|
||||
|
||||
static ResourceLocation HORSE_LOCATION;
|
||||
static ResourceLocation HORSE_MULE_LOCATION;
|
||||
|
||||
@@ -165,7 +165,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
|
||||
//localIp = settings->getString(L"server-ip", L"");
|
||||
//onlineMode = settings->getBoolean(L"online-mode", true);
|
||||
//motd = settings->getString(L"motd", L"A Minecraft Server");
|
||||
//motd.replace('�', '$');
|
||||
//motd.replace('§', '$');
|
||||
|
||||
setAnimals(settings->getBoolean(L"spawn-animals", true));
|
||||
setNpcsEnabled(settings->getBoolean(L"spawn-npcs", true));
|
||||
@@ -210,7 +210,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
|
||||
|
||||
// 4J-JEV: Need to wait for levelGenerationOptions to load.
|
||||
while ( app.getLevelGenerationOptions() != NULL && !app.getLevelGenerationOptions()->hasLoadedData() )
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
|
||||
if ( app.getLevelGenerationOptions() != NULL && !app.getLevelGenerationOptions()->ready() )
|
||||
{
|
||||
@@ -319,7 +319,7 @@ int MinecraftServer::runPostUpdate(void* lpParam)
|
||||
{
|
||||
LeaveCriticalSection(&server->m_postProcessCS);
|
||||
}
|
||||
Sleep(0);
|
||||
Sleep(1);
|
||||
} while (!server->m_postUpdateTerminate && ShutdownManager::ShouldRun(ShutdownManager::ePostProcessThread));
|
||||
//#ifndef __PS3__
|
||||
// One final pass through updates to make sure we're done
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
base64.cpp and base64.h
|
||||
|
||||
Copyright (C) 2004-2008 Ren� Nyffenegger
|
||||
Copyright (C) 2004-2008 René Nyffenegger
|
||||
|
||||
This source code is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the author be held liable for any damages
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Ren� Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ static inline bool is_base64(unsigned char c) {
|
||||
}
|
||||
|
||||
// 4J ADDED,
|
||||
std::string base64_encode(const std::string& str)
|
||||
std::string base64_encode(std::string str)
|
||||
{
|
||||
return base64_encode( reinterpret_cast<const unsigned char*>(str.c_str()), str.length() );
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
std::string base64_encode(const std::string& str);
|
||||
std::string base64_encode(std::string str);
|
||||
std::string base64_encode(unsigned char const* , unsigned int len);
|
||||
std::string base64_decode(std::string const& s);
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
base64.cpp and base64.h
|
||||
|
||||
Copyright (C) 2004-2008 Ren� Nyffenegger
|
||||
Copyright (C) 2004-2008 René Nyffenegger
|
||||
|
||||
This source code is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the author be held liable for any damages
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Ren� Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
|
||||
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ static inline bool is_base64(unsigned char c) {
|
||||
}
|
||||
|
||||
// 4J ADDED,
|
||||
std::string base64_encode(const std::string& str)
|
||||
std::string base64_encode(std::string str)
|
||||
{
|
||||
return base64_encode( reinterpret_cast<const unsigned char*>(str.c_str()), str.length() );
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
std::string base64_encode(const std::string& str);
|
||||
std::string base64_encode(std::string str);
|
||||
std::string base64_encode(unsigned char const* , unsigned int len);
|
||||
std::string base64_decode(std::string const& s);
|
||||
@@ -141,13 +141,15 @@ void ShutdownManager::SysUtilCallback(uint64_t status, uint64_t param, void *use
|
||||
StartShutdown();
|
||||
break;
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_OPEN:
|
||||
case CELL_SYSUTIL_DRAWING_BEGIN:
|
||||
// Tell the game UI to stop processing
|
||||
StorageManager.SetSystemUIDisplaying(true);
|
||||
break;
|
||||
case CELL_SYSUTIL_DRAWING_END:
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_CLOSE:
|
||||
StorageManager.SetSystemUIDisplaying(false);
|
||||
break;
|
||||
case CELL_SYSUTIL_DRAWING_BEGIN:
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_CLOSE:
|
||||
break;
|
||||
case CELL_SYSUTIL_BGMPLAYBACK_PLAY:
|
||||
if( minecraft )
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,53 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "OldSdk.h"
|
||||
#ifdef __PSVITA__
|
||||
|
||||
int sceNpBasicGetFriendOnlineStatus(const SceNpId *friendId, SceNpBasicOnlineStatus *status) {
|
||||
if (status) *status = SCE_NP_BASIC_ONLINE_STATUS_UNKNOWN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendContextState(const SceNpId *friendId, SceNpBasicFriendContextState *state) {
|
||||
if (state) *state = SCE_NP_BASIC_FRIEND_CONTEXT_STATE_UNKNOWN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int sceNpBasicGetGamePresenceOfFriend(const SceNpId *friendId, SceNpBasicGamePresence *presence) {
|
||||
if (presence) memset(presence, 0, sizeof(SceNpBasicGamePresence));
|
||||
return -1;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendListEntryCount(SceSize *count) {
|
||||
if (count) *count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendListEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved) {
|
||||
if (retrieved) *retrieved = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendRequestEntryCount(SceSize *count) {
|
||||
if (count) *count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendRequestEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved) {
|
||||
if (retrieved) *retrieved = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceNpBasicGetRequestedFriendRequestEntryCount(SceSize *count) {
|
||||
if (count) *count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceNpBasicGetRequestedFriendRequestEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved) {
|
||||
if (retrieved) *retrieved = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SceInt32 sceAppUtilAppEventParseNpBasicJoinablePresence(const SceAppUtilAppEventParam *eventParam, SceAppUtilNpBasicJoinablePresenceParam *param) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@@ -1,55 +0,0 @@
|
||||
#pragma once
|
||||
#ifdef __PSVITA__
|
||||
#ifndef _OLD_SDK_H
|
||||
#define _OLD_SDK_H 1
|
||||
|
||||
#include <np.h>
|
||||
#include <np/np_basic.h>
|
||||
#include <apputil.h>
|
||||
#include <np_toolkit.h>
|
||||
#include <np_toolkit\friends_interface.h>
|
||||
|
||||
typedef enum {
|
||||
SCE_NP_BASIC_ONLINE_STATUS_UNKNOWN = 0,
|
||||
SCE_NP_BASIC_ONLINE_STATUS_OFFLINE = 1,
|
||||
SCE_NP_BASIC_ONLINE_STATUS_AFK = 2,
|
||||
SCE_NP_BASIC_ONLINE_STATUS_ONLINE = 3
|
||||
} SceNpBasicOnlineStatus;
|
||||
|
||||
typedef void(*SceNpBasicFriendOnlineStatusEventHandler)(
|
||||
const SceNpId *friendId,
|
||||
SceNpBasicOnlineStatus status,
|
||||
void *userdata
|
||||
);
|
||||
|
||||
typedef enum {
|
||||
SCE_NP_BASIC_FRIEND_CONTEXT_STATE_UNKNOWN = 0,
|
||||
SCE_NP_BASIC_FRIEND_CONTEXT_STATE_OUT_OF_CONTEXT = 1,
|
||||
SCE_NP_BASIC_FRIEND_CONTEXT_STATE_IN_CONTEXT = 2
|
||||
} SceNpBasicFriendContextState;
|
||||
|
||||
typedef void(*SceNpBasicFriendContextEventHandler)(
|
||||
const SceNpId *friendId,
|
||||
SceNpBasicFriendContextState state,
|
||||
void *userdata
|
||||
);
|
||||
typedef struct SceAppUtilNpBasicJoinablePresenceParam {
|
||||
SceNpCommunicationId commId;
|
||||
SceNpId npId;
|
||||
} SceAppUtilNpBasicJoinablePresenceParam;
|
||||
|
||||
int sceNpBasicGetFriendOnlineStatus(const SceNpId *friendId, SceNpBasicOnlineStatus *status);
|
||||
int sceNpBasicGetFriendContextState(const SceNpId *friendId, SceNpBasicFriendContextState *state);
|
||||
int sceNpBasicGetGamePresenceOfFriend(const SceNpId *friendId, SceNpBasicGamePresence *presence);
|
||||
int sceNpBasicGetFriendListEntryCount(SceSize *count);
|
||||
int sceNpBasicGetFriendListEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved);
|
||||
int sceNpBasicGetFriendRequestEntryCount(SceSize *count);
|
||||
int sceNpBasicGetFriendRequestEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved);
|
||||
int sceNpBasicGetRequestedFriendRequestEntryCount(SceSize *count);
|
||||
int sceNpBasicGetRequestedFriendRequestEntries(unsigned int startIndex, SceNpId *entries, SceSize numEntries, SceSize *retrieved);
|
||||
SceInt32 sceAppUtilAppEventParseNpBasicJoinablePresence(const SceAppUtilAppEventParam *eventParam, SceAppUtilNpBasicJoinablePresenceParam *param);
|
||||
|
||||
#define SCE_APPUTIL_APPEVENT_TYPE_NP_BASIC_JOINABLE_PRESENCE (3)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -141,13 +141,15 @@ void ShutdownManager::SysUtilCallback(uint64_t status, uint64_t param, void *use
|
||||
StartShutdown();
|
||||
break;
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_OPEN:
|
||||
case CELL_SYSUTIL_DRAWING_BEGIN:
|
||||
// Tell the game UI to stop processing
|
||||
StorageManager.SetSystemUIDisplaying(true);
|
||||
break;
|
||||
case CELL_SYSUTIL_DRAWING_END:
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_CLOSE:
|
||||
StorageManager.SetSystemUIDisplaying(false);
|
||||
break;
|
||||
case CELL_SYSUTIL_DRAWING_BEGIN:
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_CLOSE:
|
||||
break;
|
||||
case CELL_SYSUTIL_BGMPLAYBACK_PLAY:
|
||||
if( minecraft )
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ bool Connection::readTick()
|
||||
// printf("Con:0x%x readTick close EOS\n",this);
|
||||
|
||||
// 4J Stu - Remove this line
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened host�s game, the next game that player joins will produce a message stating that the host has left.
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened host’s game, the next game that player joins will produce a message stating that the host has left.
|
||||
//close(DisconnectPacket::eDisconnect_EndOfStream);
|
||||
}
|
||||
|
||||
@@ -666,7 +666,7 @@ int Connection::runClose(void* lpParam)
|
||||
|
||||
//try {
|
||||
|
||||
Sleep(500);
|
||||
Sleep(2000);
|
||||
if (con->running)
|
||||
{
|
||||
// 4J TODO writeThread.interrupt();
|
||||
@@ -690,7 +690,7 @@ int Connection::runSendAndQuit(void* lpParam)
|
||||
|
||||
//try {
|
||||
|
||||
Sleep(500);
|
||||
Sleep(2000);
|
||||
if (con->running)
|
||||
{
|
||||
// 4J TODO writeThread.interrupt();
|
||||
|
||||
Reference in New Issue
Block a user