forked from cafeberry/cafeberry
feat: Orbis & PSVita builds, Durango postbuild & More (#10)
This fixes Orbis & PSVita builds along with adds a Durango postbuild and moves PS3 to the new SonyLeaderboardManager introduced in TU19 This also fixes the Orbis strings and gets some of the other Windows64 build configurations mostly building. --------- Co-authored-by: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Co-authored-by: str1k3r <1+str1k3r@noreply.localhost> Co-authored-by: 552eden <552eden@gmail.com> Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost> Co-authored-by: str1k3r <15+str1k3r@noreply.neolegacy.dev> Co-authored-by: pieeebot <10+pieeebot@noreply.neolegacy.dev> Reviewed-on: pieeebot/cafeberry#10
This commit is contained in:
1 parent
a00c0c63eb
commit
f17ce45d6d
264 files changed
+3597
-11971
No files matched your search
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);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user