mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-21 16:43:05 +00:00
Use standard types in profile content helpers
This commit is contained in:
parent
1490d0b067
commit
d2156d417c
|
|
@ -28,8 +28,8 @@ UINT C_4JProfile::RequestConvertOfflineToGuestUI(int(*Func)(void *, const bool,
|
|||
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
||||
bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
||||
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid, bool bOnlineXuid) { if (pXuid) *pXuid = 0; }
|
||||
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1, PlayerUID xuid2) { return xuid1 == xuid2; }
|
||||
BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return FALSE; }
|
||||
bool C_4JProfile::AreXUIDSEqual(PlayerUID xuid1, PlayerUID xuid2) { return xuid1 == xuid2; }
|
||||
bool C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; }
|
||||
bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; }
|
||||
bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool *pbChatRestricted, bool *pbContentRestricted, int *piAge) {
|
||||
if (pbChatRestricted) *pbChatRestricted = false;
|
||||
|
|
@ -38,13 +38,13 @@ bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool *pbChatRestricted
|
|||
return true;
|
||||
}
|
||||
void C_4JProfile::StartTrialGame() {}
|
||||
void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL *allAllowed, BOOL *friendsAllowed) {
|
||||
if (allAllowed) *allAllowed = TRUE;
|
||||
if (friendsAllowed) *friendsAllowed = TRUE;
|
||||
void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, bool *allAllowed, bool *friendsAllowed) {
|
||||
if (allAllowed) *allAllowed = true;
|
||||
if (friendsAllowed) *friendsAllowed = true;
|
||||
}
|
||||
BOOL C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount) { return TRUE; }
|
||||
bool C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, unsigned int xuidCount) { return true; }
|
||||
void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {}
|
||||
bool C_4JProfile::GetProfileAvatar(int iPad, int(*Func)(LPVOID lpParam, PBYTE pbThumbnail, DWORD dwThumbnailBytes), LPVOID lpParam) { return false; }
|
||||
bool C_4JProfile::GetProfileAvatar(int iPad, int(*Func)(void *lpParam, std::uint8_t *thumbnailData, unsigned int thumbnailBytes), void *lpParam) { return false; }
|
||||
void C_4JProfile::CancelProfileAvatarRequest() {}
|
||||
int C_4JProfile::GetPrimaryPad() { return 0; }
|
||||
void C_4JProfile::SetPrimaryPad(int iPad) {}
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ public:
|
|||
void SetPrimaryPlayerChanged(bool bVal);
|
||||
bool QuerySigninStatus(void);
|
||||
void GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid);
|
||||
BOOL AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2);
|
||||
BOOL XUIDIsGuest(PlayerUID xuid);
|
||||
bool AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2);
|
||||
bool XUIDIsGuest(PlayerUID xuid);
|
||||
bool AllowedToPlayMultiplayer(int iProf);
|
||||
bool GetChatAndContentRestrictions(int iPad,bool *pbChatRestricted,bool *pbContentRestricted,int *piAge);
|
||||
void StartTrialGame(); // disables saves and leaderboard, and change state to readyforgame from pregame
|
||||
void AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL *allAllowed, BOOL *friendsAllowed);
|
||||
BOOL CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount );
|
||||
void AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, bool *allAllowed, bool *friendsAllowed);
|
||||
bool CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, unsigned int xuidCount);
|
||||
void ShowProfileCard(int iPad, PlayerUID targetUid);
|
||||
bool GetProfileAvatar(int iPad,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam);
|
||||
bool GetProfileAvatar(int iPad,int( *Func)(void *lpParam,std::uint8_t *thumbnailData,unsigned int thumbnailBytes), void *lpParam);
|
||||
void CancelProfileAvatarRequest();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5298,7 +5298,7 @@ bool CMinecraftApp::isXuidNotch(PlayerUID xuid)
|
|||
{
|
||||
if(m_xuidNotch != INVALID_XUID && xuid != INVALID_XUID)
|
||||
{
|
||||
return ProfileManager.AreXUIDSEqual(xuid, m_xuidNotch) == TRUE;
|
||||
return ProfileManager.AreXUIDSEqual(xuid, m_xuidNotch);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
int AvatarReturnedThunk(void *lpParam, PBYTE pbThumbnail, DWORD dwThumbnailBytes);
|
||||
int AvatarReturnedThunk(void *lpParam, std::uint8_t *thumbnailData, unsigned int thumbnailBytes);
|
||||
}
|
||||
|
||||
UIScene_QuadrantSignin::UIScene_QuadrantSignin(int iPad, void *_initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
|
|
@ -258,9 +258,9 @@ void UIScene_QuadrantSignin::updateState()
|
|||
|
||||
namespace
|
||||
{
|
||||
int AvatarReturnedThunk(void *lpParam, PBYTE pbThumbnail, DWORD dwThumbnailBytes)
|
||||
int AvatarReturnedThunk(void *lpParam, std::uint8_t *thumbnailData, unsigned int thumbnailBytes)
|
||||
{
|
||||
return UIScene_QuadrantSignin::AvatarReturned(lpParam, reinterpret_cast<std::uint8_t *>(pbThumbnail), dwThumbnailBytes);
|
||||
return UIScene_QuadrantSignin::AvatarReturned(lpParam, thumbnailData, thumbnailBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -857,8 +857,8 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
|
|||
{
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
@ -1022,8 +1022,8 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
|
|||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(), false, &pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
@ -1407,8 +1407,8 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
|
|||
{
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -474,8 +474,8 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
|
|||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
//bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && m_MoreOptionsParams.bOnlineGame;
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
@ -579,8 +579,8 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
|
|||
{
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
@ -776,8 +776,8 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
|
|||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
@ -831,8 +831,8 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
|
|||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -287,8 +287,8 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
|
|||
|
||||
// Check if user-created content is allowed, as we cannot play multiplayer if it's not
|
||||
bool noUGC = false;
|
||||
BOOL pccAllowed = TRUE;
|
||||
BOOL pccFriendsAllowed = TRUE;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
|
||||
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -473,8 +473,8 @@ UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const boo
|
|||
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
|
||||
bool C_4JProfile::QuerySigninStatus(void) { return true; }
|
||||
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; }
|
||||
BOOL C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return false; }
|
||||
BOOL C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; }
|
||||
bool C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return false; }
|
||||
bool C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; }
|
||||
bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; }
|
||||
|
||||
#if defined(__ORBIS__)
|
||||
|
|
@ -488,9 +488,9 @@ bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool thisQuadrantOn
|
|||
#endif
|
||||
|
||||
void C_4JProfile::StartTrialGame() {}
|
||||
void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, BOOL *allAllowed, BOOL *friendsAllowed) {}
|
||||
BOOL C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, DWORD dwXuidCount ) { return true; }
|
||||
bool C_4JProfile::GetProfileAvatar(int iPad,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam) { return false; }
|
||||
void C_4JProfile::AllowedPlayerCreatedContent(int iPad, bool thisQuadrantOnly, bool *allAllowed, bool *friendsAllowed) {}
|
||||
bool C_4JProfile::CanViewPlayerCreatedContent(int iPad, bool thisQuadrantOnly, PPlayerUID pXuids, unsigned int xuidCount) { return true; }
|
||||
bool C_4JProfile::GetProfileAvatar(int iPad,int( *Func)(void *lpParam,std::uint8_t *thumbnailData,unsigned int thumbnailBytes), void *lpParam) { return false; }
|
||||
void C_4JProfile::CancelProfileAvatarRequest() {}
|
||||
int C_4JProfile::GetPrimaryPad() { return 0; }
|
||||
void C_4JProfile::SetPrimaryPad(int iPad) {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue